muban大师 发表于 2015-12-1 09:24:29

ecshop暂时关闭后管理员可查看页面的方法

ecshop本身具备暂时关闭网站的功能,并可以自定义关闭的公告。那么ecshop暂时关闭后管理员如何可以查看页面呢?
打开 /includes/init.php 文件
找到(约122行)
if ($_CFG['shop_closed', == 1)
{
    /* 商店关闭了,输出关闭的消息 */
    header('Content-type: text/html; charset='.EC_CHARSET);
    die('' . $_LANG['shop_closed', . '
' . $_CFG['close_comment', . '
');
}
修改为
if ($_CFG['shop_closed', == 1)
{
    /* 商店关闭了,输出关闭的消息 */
    if (!isset($_SESSION['admin_name',))
    {
      header('Content-type: text/html; charset='.EC_CHARSET);
      die('' . $_LANG['shop_closed', . '
' . $_CFG['close_comment', . '
');      
    }
}
页: [1]
查看完整版本: ecshop暂时关闭后管理员可查看页面的方法