chengkun
2025-05-26 4462855c0033970c39ac8d0da704b7dc41eabbfe
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
<?php
 
class collection_controller extends adminCommon{
    function index_action(){
 
        $this->yunset($this->MODEL('cache')->GetCache(array('city','job','hy','com')));
        
        include(PLUS_PATH."user.cache.php");
        $this->yunset("userdata",$userdata);
        $this->yunset("userclass_name",$userclass_name);
        
        include(PLUS_PATH."part.cache.php");
        $this->yunset("partdata",$partdata);
        $this->yunset("partclass_name",$partclass_name);
        
        
        $qy_rows=$this->MODEL('rating')->getList(array('category'=>1,'orderby'=>'sort,desc'));
        $this->yunset("qy_rows",$qy_rows);
        $this->yunset("sy_weburl",$this->config['sy_weburl']);
        
        $path = APP_PATH."data/api/locoy/locoy_config.php";
        require_once $path;
        $this->yunset("locoyinfo",$locoyinfo);
        
        $this->yuntpl(array('admin/admin_collection_list'));
    }
    function save_action(){
        $config = "<?php \r\n";
        $path = APP_PATH."data/api/locoy/locoy_config.php";
        require_once $path;
        unset($_POST['resumeconfig']);
        unset($_POST['waterconfig']);
        unset($_POST['userconfig']);
        unset($_POST['mapconfig']);
        unset($_POST['config']);
        unset($_POST['otherconfig']);
        unset($_POST['partconfig']);
        if($_POST){
            $parr="";
            unset($_POST['submit']);
            foreach($_POST as $key=>$value){
                $locoyinfo[$key]=$value;
            }
            foreach($locoyinfo as $key=>$value){
                $parr .= "\"".$key."\"=>\"".$value."\",";
            }
            $parr = rtrim($parr,",");
            $config.="\$locoyinfo=array(".$parr."); \r\n";
        }
        
        $path = APP_PATH."data/api/locoy/locoy_config.php";
        $fp = @fopen($path,"w");
        fwrite($fp,$config);
        fclose($fp);
         if(is_array($locoy_type))
         
        include(APP_PATH."data/api/locoy/locoy_config.php"); 
        $this->ACT_layer_msg("保存成功!",9,"index.php?m=collection",2,1);
    }
}
 
?>