chengkun
2025-04-29 ab5d7bddae4557b9d56d17f21fc8ca232d7d8693
admin/model/link.class.php
@@ -6,7 +6,7 @@
      $lo_time      =   array('1'=>'今天','3'=>'最近三天','7'=>'最近七天','15'=>'最近半月','30'=>'最近一个月');
      if($this->config["sy_web_site"]=='1'){
         $cacheM     =   $this -> MODEL('cache');
         $domains   =   $cacheM -> GetCache('domain',$Options=array('needreturn'=>true,'needassign'=>true,'needall'=>true));
            $domains = $cacheM->GetCache('domain', $Options = array('needreturn' => TRUE, 'needassign' => TRUE, 'needall' => TRUE));
         
          $domain=array();
          foreach($domains['site_domain'] as $val){
@@ -20,6 +20,7 @@
      
      $this->yunset("search_list",$search_list);
   }
   function index_action(){
      $this->set_search();
      if($_GET['state']=='1'){
@@ -98,7 +99,7 @@
      
      //提取分站内容
       $cacheM  =   $this -> MODEL('cache');
       $domain  =   $cacheM -> GetCache('domain',$Options=array('needreturn'=>true,'needassign'=>true,'needall'=>true));
        $domain = $cacheM->GetCache('domain', $Options = array('needreturn' => TRUE, 'needassign' => TRUE, 'needall' => TRUE));
       
       $this -> yunset('Dname', $domain['Dname']);
      /***分站******/
@@ -109,7 +110,7 @@
   function add_action(){
      //提取分站内容
       $cacheM  =   $this -> MODEL('cache');
       $domain  =   $cacheM -> GetCache('domain',$Options=array('needreturn'=>true,'needassign'=>true,'needall'=>true));
        $domain = $cacheM->GetCache('domain', $Options = array('needreturn' => TRUE, 'needassign' => TRUE, 'needall' => TRUE));
       
       $this -> yunset('Dname', $domain['Dname']);
      
@@ -122,6 +123,7 @@
      }
      $this->yuntpl(array('admin/admin_link_add'));
   }
   //删除链接
   function del_action(){
      
@@ -136,6 +138,7 @@
      $return   =   $linkM -> delInfo($id);
      $this->layer_msg($return['msg'],$return['errcode'],$return['layertype'],$_SERVER['HTTP_REFERER']);
   }
   //审核链接
   function status_action(){
         
@@ -145,12 +148,15 @@
      $return   =   $linkM -> setLinkStatus($id,array('status'=>$_POST['status']));
      $this->ACT_layer_msg($return['msg'],$return['errcode'],$_SERVER['HTTP_REFERER']);
   }
   //保存信息
   function save_action(){
      $linkM         =   $this  -> MODEL('link');
//        $data = $_POST;
//        var_dump($data);exit();
        $linkM = $this->MODEL("link");
//        var_dump($linkM);
//        exit();
      if($_POST['phototype']==1){
         if($_FILES['file']['tmp_name']){
             $upArr    =  array(
               'file'  =>  $_FILES['file'],
@@ -192,17 +198,17 @@
         $post['pic']   =   $pictures;
      }
//        var_dump($post);exit();
      $data   =   array(
         'post'   =>   $post,
         'id'   =>   $_POST['id'],
         'utype'   =>   'admin'
      );
      $return   =   $linkM -> addInfo($data);
      
      $this->ACT_layer_msg($return['msg'],$return['errcode'],"index.php?m=link");
        $this->layer_msg($return['msg'], $return['errcode']);
   }
   function checksitedid_action(){
      $linkM   =   $this  -> MODEL('link');
      $data   =   array(