让ecshop暂时关闭后管理员可查看页面

ecshop本身具备暂时关闭网站的功能,并可以自定义关闭的公告。ECSHOP开发中心()介绍一下如何让ecshop暂时关闭后管理员可查看页面。

代码修改:找到 根目录\includes\init.php文件找到122 行左右if ($_CFG[‘shop_closed’] == 1) { /* 商店关闭了,输出关闭的消息 */ header(‘Content-type: text/html; charset=’.EC_CHARSET); die(‘<div style="margin: 150px; text-align: center; font-size: 14px"><p>’ . $_LANG[‘shop_closed’] . ‘</p><p>’ . $_CFG[‘close_comment’] . ‘</p></div>’); } 修改成if ($_CFG[‘shop_closed’] == 1) { /* 商店关闭了,,输出关闭的消息 */ if (!isset($_SESSION[‘admin_name’])) { header(‘Content-type: text/html; charset=’.EC_CHARSET); die(‘<div style="margin: 150px; text-align: center; font-size: 14px"><p>’ . $_LANG[‘shop_closed’] . ‘</p><p>’ . $_CFG[‘close_comment’] . ‘</p></div>’); } }

仿佛松树就是一位威风的将军,守护着国家的国民。

让ecshop暂时关闭后管理员可查看页面

相关文章:

你感兴趣的文章:

标签云: