首页 >
文章 >
杂文
ecshop后台商品列表和添加修改选择供货商处
时间:2013-05-23 11:38:23 点击: 来源: 作者:
admin/includes/lib_main.phpfunction suppliers_list_name()函数里面$suppliers_name[$suppliers['suppliers_id']] = $suppliers['suppliers_name'];修改成if($_SESSION['admin_id' ...
admin/includes/lib_main.php
function suppliers_list_name()函数里面
$suppliers_name[$suppliers['suppliers_id']] = $suppliers['suppliers_name'];修改成
if($_SESSION['admin_id']==1)
{
$suppliers_name[$suppliers['suppliers_id']] = $suppliers['suppliers_name'];
}
else
{
if($suppliers['suppliers_id']==$_SESSION['suppliers_id'])
{
$suppliers_name[$suppliers['suppliers_id']] = $suppliers['suppliers_name'];
}
}
除了初始管理员其他只显示自己管理的
ecshop商品列表只显示该管理员管理的供货商
admin/includes/lib_goods.php
if (!empty($filter['suppliers_id']))
{
$where .= " AND (suppliers_id = '" . $filter['suppliers_id'] . "')";
}
下面加上
if ($_SESSION['admin_id']==1)
{
}
else
{
$where .= " AND (suppliers_id = '" . $_SESSION['suppliers_id'] . "')";
}
除了初始管理员其他只显示自己的供货商商品
”您可通过以下微信二维码,赞赏作者“