|
@@ -19,31 +19,41 @@ class Core
|
|
if (!in_array(2, $role)) {
|
|
if (!in_array(2, $role)) {
|
|
unset($this->user['msg_type'][1]);
|
|
unset($this->user['msg_type'][1]);
|
|
if ($uri == 'order' || strstr($uri, 'admin/order') || strstr($uri, 'order_')) {
|
|
if ($uri == 'order' || strstr($uri, 'admin/order') || strstr($uri, 'order_')) {
|
|
- Dever::alert('您没有权限');
|
|
|
|
|
|
+ echo '您没有权限';die;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
if (!in_array(4, $role)) {
|
|
if (!in_array(4, $role)) {
|
|
unset($this->user['msg_type'][2]);
|
|
unset($this->user['msg_type'][2]);
|
|
if (strstr($uri, 'stat')) {
|
|
if (strstr($uri, 'stat')) {
|
|
- Dever::alert('您没有权限');
|
|
|
|
|
|
+ echo '您没有权限';die;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
if (!in_array(3, $role)) {
|
|
if (!in_array(3, $role)) {
|
|
unset($this->user['msg_type'][3]);
|
|
unset($this->user['msg_type'][3]);
|
|
if (strstr($uri, 'factory_order') || strstr($uri, 'goods') || strstr($uri, 'out')) {
|
|
if (strstr($uri, 'factory_order') || strstr($uri, 'goods') || strstr($uri, 'out')) {
|
|
- Dever::alert('您没有权限');
|
|
|
|
|
|
+ echo '您没有权限';die;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
if (strstr($uri, 'set')) {
|
|
if (strstr($uri, 'set')) {
|
|
- Dever::alert('您没有权限');
|
|
|
|
|
|
+ echo '您没有权限';die;
|
|
}
|
|
}
|
|
if (strstr($uri, 'user')) {
|
|
if (strstr($uri, 'user')) {
|
|
- Dever::alert('您没有权限');
|
|
|
|
|
|
+ echo '您没有权限';die;
|
|
}
|
|
}
|
|
|
|
|
|
$this->user['msg_type'] = implode(',', $this->user['msg_type']);
|
|
$this->user['msg_type'] = implode(',', $this->user['msg_type']);
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ $this->info = Dever::db('store/info')->find($this->id);
|
|
|
|
+ if (!$this->info) {
|
|
|
|
+ echo '仓库不存在';die;
|
|
|
|
+ }
|
|
|
|
+ if ($this->info['status'] != 1) {
|
|
|
|
+ if (!strstr($uri, 'set') && !strstr($uri, 'help') && !strstr($uri, 'console')) {
|
|
|
|
+ echo '认证中或者认证失败无法访问该功能';die;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|