网站地图    收藏   

主页 > 后端 > ecshop教程 >

ecshop后台如何去掉更新提醒,install、demo删除提醒

来源:自学PHP网    时间:2014-11-28 23:31 作者: 阅读:次

[导读] 首先找到如下文件admin index php一:删除更新提醒:(大概483行左右)注释掉或者删掉下面的代码:elseif($_REQUEST[ 39;act 39;]== 39;main_api 39;){require_once(ROOT_PATH 39; includes lib_b...

ecshop后台如何去掉更新提醒,install、demo删除提醒

首先找到如下文件admin\index.php

一:删除更新提醒:(大概483行左右)注释掉或者删掉下面的代码:

  1. elseif ($_REQUEST['act'] == 'main_api') 
  2. { 
  3.     require_once(ROOT_PATH . '/includes/lib_base.php'); 
  4.     $data = read_static_cache('api_str'); 
  5.  
  6.     if($data === false || API_TIME < date('Y-m-d H:i:s',time()-43200)) 
  7.     { 
  8.         include_once(ROOT_PATH . 'includes/cls_transport.php'); 
  9.         $ecs_version = VERSION; 
  10.         $ecs_lang = $_CFG['lang']; 
  11.         $ecs_release = RELEASE; 
  12.         $php_ver = PHP_VERSION; 
  13.         $mysql_ver = $db->version(); 
  14.         $order['stats'] = $db->getRow('SELECT COUNT(*) AS oCount, IFNULL(SUM(order_amount), 0) AS oAmount' . 
  15.     ' FROM ' .$ecs->table('order_info')); 
  16.         $ocount = $order['stats']['oCount']; 
  17.         $oamount = $order['stats']['oAmount']; 
  18.         $goods['total']   = $db->GetOne('SELECT COUNT(*) FROM ' .$ecs->table('goods'). 
  19.     ' WHERE is_delete = 0 AND is_alone_sale = 1 AND is_real = 1'); 
  20.         $gcount = $goods['total']; 
  21.         $ecs_charset = strtoupper(EC_CHARSET); 
  22.         $ecs_user = $db->getOne('SELECT COUNT(*) FROM ' . $ecs->table('users')); 
  23.         $ecs_template = $db->getOne('SELECT value FROM ' . $ecs->table('shop_config') . ' WHERE code = \'template\''); 
  24.         $style = $db->getOne('SELECT value FROM ' . $ecs->table('shop_config') . ' WHERE code = \'stylename\''); 
  25.         if($style == '') 
  26.         { 
  27.             $style = '0'; 
  28.         } 
  29.         $ecs_style = $style; 
  30.         $shop_url = urlencode($ecs->url()); 
  31.  
  32.         $patch_file = file_get_contents(ROOT_PATH.ADMIN_PATH."/patch_num"); 
  33.  
  34.         $apiget = "ver= $ecs_version &lang= $ecs_lang &release= $ecs_release &php_ver= $php_ver &mysql_ver= $mysql_ver &ocount= $ocount &oamount= $oamount &gcount= $gcount &charset= $ecs_charset &usecount= $ecs_user &template= $ecs_template &style= $ecs_style &url= $shop_url &patch= $patch_file "; 
  35.  
  36.         $t = new transport; 
  37.         $api_comment = $t->request('http://api.ecshop.com/checkver.php', $apiget); 
  38.         $api_str = $api_comment["body"]; 
  39.         echo $api_str; 
  40.          
  41.         $f=ROOT_PATH . 'data/config.php';  
  42.         file_put_contents($f,str_replace("'API_TIME', '".API_TIME."'","'API_TIME', '".date('Y-m-d H:i:s',time())."'",file_get_contents($f))); 
  43.          
  44.         write_static_cache('api_str', $api_str); 
  45.     } 
  46.     else  
  47.     { 
  48.         echo $data; 
  49.     } 

二:install删除提醒:(大概182行左右)注释或删除下面代码:

  1. if (file_exists('../install')) 
  2.    { 
  3.        $warning[] = $_LANG['remove_install']; 
  4.    } 

三:更新提醒:(大概187行)注释或删除代码:

  1. if (file_exists('../upgrade')) 
  2.     { 
  3.         $warning[] = $_LANG['remove_upgrade']; 
  4.     } 

四:demo删除提醒:(大概192行)注释或删除下面代码:

  1. if (file_exists('../demo')) 
  2.    { 
  3.        $warning[] = $_LANG['remove_demo']; 
  4.    } 

自学PHP网专注网站建设学习,PHP程序学习,平面设计学习,以及操作系统学习

京ICP备14009008号-1@版权所有www.zixuephp.com

网站声明:本站所有视频,教程都由网友上传,站长收集和分享给大家学习使用,如由牵扯版权问题请联系站长邮箱904561283@qq.com

添加评论