|
@@ -202,6 +202,11 @@ class Typeclass extends Start_Controller {
|
|
}
|
|
}
|
|
$post['bm'] = substr(strval($bm[0]['bm']+1+$num),1,3);
|
|
$post['bm'] = substr(strval($bm[0]['bm']+1+$num),1,3);
|
|
}
|
|
}
|
|
|
|
+ if($post['is_check'] == 1){
|
|
|
|
+ $post['is_check'] = 1;
|
|
|
|
+ }else{
|
|
|
|
+ $post['is_check'] = 0;
|
|
|
|
+ }
|
|
if($this->typeclass->insert($post))
|
|
if($this->typeclass->insert($post))
|
|
{
|
|
{
|
|
echo json_encode(array('msg'=>'添加成功','success'=>true));exit;
|
|
echo json_encode(array('msg'=>'添加成功','success'=>true));exit;
|
|
@@ -251,6 +256,11 @@ class Typeclass extends Start_Controller {
|
|
}
|
|
}
|
|
$post['time'] = time();
|
|
$post['time'] = time();
|
|
$post['zh'] = str_replace(array('(',')'),array('(',')'),$post['zh']);
|
|
$post['zh'] = str_replace(array('(',')'),array('(',')'),$post['zh']);
|
|
|
|
+ if($post['is_check'] == 1){
|
|
|
|
+ $post['is_check'] = 1;
|
|
|
|
+ }else{
|
|
|
|
+ $post['is_check'] = 0;
|
|
|
|
+ }
|
|
if($this->typeclass->save($post,$id))
|
|
if($this->typeclass->save($post,$id))
|
|
{
|
|
{
|
|
echo json_encode(array('msg'=>'修改成功','success'=>true));exit;
|
|
echo json_encode(array('msg'=>'修改成功','success'=>true));exit;
|