|
@@ -194,7 +194,12 @@ class Color extends Start_Controller {
|
|
|
$userid = 0;
|
|
|
}else{
|
|
|
$user = $this->user->get_api($_SESSION['api']);
|
|
|
- $userid = $user['id'];
|
|
|
+ if(in_array($user['role'],array('admin','速卖通管理员','独立站管理员','文员','文员指定下载'))){
|
|
|
+ $userid = 10;
|
|
|
+ }else{
|
|
|
+ $userid = 0;
|
|
|
+ }
|
|
|
+
|
|
|
}
|
|
|
$this->data['userid'] = $userid;
|
|
|
$this->_Template('color',$this->data);
|
|
@@ -239,8 +244,24 @@ class Color extends Start_Controller {
|
|
|
$user = $this->user->get_api($_SESSION['api']);
|
|
|
$userid = $user['id'];
|
|
|
}
|
|
|
- $this->data['user_id'] = $userid;
|
|
|
- $this->data['userid'] = $user['userid'];
|
|
|
+
|
|
|
+
|
|
|
+ if (empty($_SESSION['api'])) {
|
|
|
+ $userid = 0;
|
|
|
+ $this->data['user_id'] = $userid;
|
|
|
+ $this->data['userid'] = "";
|
|
|
+ }else{
|
|
|
+ $user = $this->user->get_api($_SESSION['api']);
|
|
|
+ if(in_array($user['role'],array('admin','速卖通管理员','独立站管理员','文员','文员指定下载'))){
|
|
|
+ $userid = 10;
|
|
|
+ }else{
|
|
|
+ $userid = 0;
|
|
|
+ }
|
|
|
+ $this->data['user_id'] = $userid;
|
|
|
+ $this->data['userid'] = $user['userid'];
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
$post = $this->input->post(NULL, TRUE);
|
|
|
if(isset($post['id']))
|
|
|
{
|