|
@@ -189,6 +189,14 @@ class Color extends Start_Controller {
|
|
$rows = array('total'=>$total,'over'=>$over,'pagenum'=>$pagenum,'rows'=>($info_list));
|
|
$rows = array('total'=>$total,'over'=>$over,'pagenum'=>$pagenum,'rows'=>($info_list));
|
|
echo json_encode($rows);exit;
|
|
echo json_encode($rows);exit;
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ if (empty($_SESSION['api'])) {
|
|
|
|
+ $userid = 0;
|
|
|
|
+ }else{
|
|
|
|
+ $user = $this->user->get_api($_SESSION['api']);
|
|
|
|
+ $userid = $user['id'];
|
|
|
|
+ }
|
|
|
|
+ $this->data['userid'] = $userid;
|
|
$this->_Template('color',$this->data);
|
|
$this->_Template('color',$this->data);
|
|
}
|
|
}
|
|
|
|
|
|
@@ -225,7 +233,14 @@ class Color extends Start_Controller {
|
|
|
|
|
|
public function _edit($arg_array)
|
|
public function _edit($arg_array)
|
|
{
|
|
{
|
|
- $user = $this->user->get_api($_SESSION['api']);
|
|
|
|
|
|
+ if (empty($_SESSION['api'])) {
|
|
|
|
+ $userid = 0;
|
|
|
|
+ }else{
|
|
|
|
+ $user = $this->user->get_api($_SESSION['api']);
|
|
|
|
+ $userid = $user['id'];
|
|
|
|
+ }
|
|
|
|
+ $this->data['user_id'] = $userid;
|
|
|
|
+ $this->data['userid'] = $user['userid'];
|
|
$post = $this->input->post(NULL, TRUE);
|
|
$post = $this->input->post(NULL, TRUE);
|
|
if(isset($post['id']))
|
|
if(isset($post['id']))
|
|
{
|
|
{
|
|
@@ -283,7 +298,6 @@ class Color extends Start_Controller {
|
|
$img = '';
|
|
$img = '';
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- $this->data['userid'] = $user['userid'];
|
|
|
|
$color['img'] = $img;
|
|
$color['img'] = $img;
|
|
$this->data['color'] = $color;
|
|
$this->data['color'] = $color;
|
|
$this->_Template('color_edit',$this->data);
|
|
$this->_Template('color_edit',$this->data);
|