|
@@ -138,7 +138,7 @@ class Color extends Start_Controller {
|
|
|
$start = ($page - 1)*$perpage;
|
|
$start = ($page - 1)*$perpage;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- $info_list = $this->color->find_all($where,'id,title,state,type,color,lowe,img,developer,craft_process,content,time,edittime',$order_str,$start,$perpage);
|
|
|
|
|
|
|
+ $info_list = $this->color->find_all($where,'id,title,state,type,color,lowe,img,developer,craft_process,gylj,scsx,content,time,edittime',$order_str,$start,$perpage);
|
|
|
foreach ($info_list as $key=>$value)
|
|
foreach ($info_list as $key=>$value)
|
|
|
{
|
|
{
|
|
|
|
|
|
|
@@ -211,8 +211,10 @@ class Color extends Start_Controller {
|
|
|
{
|
|
{
|
|
|
$info_list[$key]['img'] = '';
|
|
$info_list[$key]['img'] = '';
|
|
|
}
|
|
}
|
|
|
- $info_list[$key]['time'] = date('Y-m-d H:i:s',$value['time']);
|
|
|
|
|
- $info_list[$key]['edittime'] = date('Y-m-d H:i:s',$value['edittime']);
|
|
|
|
|
|
|
+ $info_list[$key]['gylj'] = empty($value['gylj'])?'':$value['gylj'];
|
|
|
|
|
+ $info_list[$key]['scsx'] = empty($value['scsx'])?'0':$value['scsx'];
|
|
|
|
|
+ $info_list[$key]['time'] = date('Y-m-d H:i',$value['time']);
|
|
|
|
|
+ $info_list[$key]['edittime'] = date('Y-m-d H:i',$value['edittime']);
|
|
|
}
|
|
}
|
|
|
$total = $this->color->find_count($where);
|
|
$total = $this->color->find_count($where);
|
|
|
$pagenum = ceil($total/$perpage);
|
|
$pagenum = ceil($total/$perpage);
|
|
@@ -259,6 +261,18 @@ class Color extends Start_Controller {
|
|
|
$post['content'] = $this->input->post('content',true);
|
|
$post['content'] = $this->input->post('content',true);
|
|
|
$post['time'] = time();
|
|
$post['time'] = time();
|
|
|
$post['edittime'] = $post['time'];
|
|
$post['edittime'] = $post['time'];
|
|
|
|
|
+
|
|
|
|
|
+ $post['gylj'] = $this->input->post('gylj',true);
|
|
|
|
|
+ if(empty($post['scsx'])){
|
|
|
|
|
+ $post['scsx'] = 0;
|
|
|
|
|
+ }else{
|
|
|
|
|
+ if(is_numeric($post['scsx'])){
|
|
|
|
|
+ $post['scsx'] = $post['scsx']*1;
|
|
|
|
|
+ }else{
|
|
|
|
|
+ echo json_encode(array('msg'=>'请输入正确的生产时效!','success'=>false));exit;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
if($this->color->insert($post))
|
|
if($this->color->insert($post))
|
|
|
{
|
|
{
|
|
|
echo json_encode(array('msg'=>'添加成功','success'=>true));exit;
|
|
echo json_encode(array('msg'=>'添加成功','success'=>true));exit;
|
|
@@ -315,6 +329,17 @@ class Color extends Start_Controller {
|
|
|
}
|
|
}
|
|
|
$post['img'] = rtrim($img,'|');
|
|
$post['img'] = rtrim($img,'|');
|
|
|
$post['content'] = $this->input->post('content',true);
|
|
$post['content'] = $this->input->post('content',true);
|
|
|
|
|
+
|
|
|
|
|
+ $post['gylj'] = $this->input->post('gylj',true);
|
|
|
|
|
+ if(empty($post['scsx'])){
|
|
|
|
|
+ $post['scsx'] = 0;
|
|
|
|
|
+ }else{
|
|
|
|
|
+ if(is_numeric($post['scsx'])){
|
|
|
|
|
+ $post['scsx'] = $post['scsx']*1;
|
|
|
|
|
+ }else{
|
|
|
|
|
+ echo json_encode(array('msg'=>'请输入正确的生产时效!','success'=>false));exit;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
$post['edittime'] = time();
|
|
$post['edittime'] = time();
|
|
|
if($this->color->save($post,$id))
|
|
if($this->color->save($post,$id))
|
|
|
{
|
|
{
|