function _at($fun)
 {
     $arg = func_get_args();
     unset($arg[0]);
     restore_error_handler();
     $ret_val = @call_user_func_array($fun, $arg);
     reset_error_handler();
     return $ret_val;
 }
Exemplo n.º 2
0
 /**
  *    删除商品品牌
  *
  *    @author    Hyber
  *    @param     string $conditions
  *    @param     string $fields
  *    @return    void
  */
 function drop($conditions, $fields = '')
 {
     $droped_rows = parent::drop($conditions, $fields);
     if ($droped_rows) {
         restore_error_handler();
         reset_error_handler();
     }
     return $droped_rows;
 }
Exemplo n.º 3
0
 function drop($conditions, $fields = 'portrait')
 {
     if ($droped_rows = parent::drop($conditions, $fields)) {
         restore_error_handler();
         $droped_data = $this->getDroppedData();
         foreach ($droped_data as $row) {
             $row['portrait'] && @unlink(ROOT_PATH . '/' . $row['portrait']);
         }
         reset_error_handler();
     }
     return $droped_rows;
 }
Exemplo n.º 4
0
 /**
  *    删除友情链接
  *
  *    @author    Garbin
  *    @param     string $conditions
  *    @param     string $fields
  *    @return    void
  */
 function drop($conditions, $fields = 'logo')
 {
     $droped_rows = parent::drop($conditions, $fields);
     if ($droped_rows) {
         restore_error_handler();
         $droped_data = $this->getDroppedData();
         foreach ($droped_data as $key => $value) {
             if ($value['logo']) {
                 @unlink(ROOT_PATH . '/' . $value['logo']);
                 //删除Logo文件
             }
         }
         reset_error_handler();
     }
     return $droped_rows;
 }
Exemplo n.º 5
0
 function drop($conditions, $fields = 'ad_image,root_image,cate_image')
 {
     $this->clear_cache();
     $droped_rows = parent::drop($conditions, $fields);
     if ($droped_rows) {
         restore_error_handler();
         $droped_data = $this->getDroppedData();
         foreach ($droped_data as $key => $value) {
             if ($value['ad_image']) {
                 @unlink(ROOT_PATH . '/' . $value['ad_image']);
                 //删除Logo文件
             }
             if ($value['root_image']) {
                 @unlink(ROOT_PATH . '/' . $value['root_image']);
                 //删除Logo文件
             }
             if ($value['cate_image']) {
                 @unlink(ROOT_PATH . '/' . $value['cate_image']);
                 //删除Logo文件
             }
         }
         reset_error_handler();
     }
     return $droped_rows;
 }
Exemplo n.º 6
0
 function _chdir($dir)
 {
     restore_error_handler();
     $dirs = explode('/', $dir);
     if (empty($dirs)) {
         return true;
     }
     /* 循环创建目录 */
     foreach ($dirs as $d) {
         if (!@$this->_ftp_server->chdir($d)) {
             $this->_ftp_server->mkdir($d);
             $this->_ftp_server->chmod($d);
             $this->_ftp_server->chdir($d);
             $this->_ftp_server->put(ROOT_PATH . '/data/index.html', 'index.html');
         }
     }
     reset_error_handler();
     return true;
 }