|
|
@ -137,6 +137,11 @@ class GiftbagController extends ThinkController {
|
|
|
|
$data['server_name']=get_server_name($data['server_id']);
|
|
|
|
$data['server_name']=get_server_name($data['server_id']);
|
|
|
|
$data['novice_num'] = count(explode(',',$data['novice']));
|
|
|
|
$data['novice_num'] = count(explode(',',$data['novice']));
|
|
|
|
$Model->add($data);
|
|
|
|
$Model->add($data);
|
|
|
|
|
|
|
|
addOperationLog(array(
|
|
|
|
|
|
|
|
"op_type"=>0,
|
|
|
|
|
|
|
|
"key"=>$data['game_name']."/".$data['giftbag_name'],
|
|
|
|
|
|
|
|
"url"=>U("Giftbag/lists",array("giftbag_name"=>$data['giftbag_name']))
|
|
|
|
|
|
|
|
));
|
|
|
|
$this->success('添加礼包成功!', U('lists?model='.$model['name']));
|
|
|
|
$this->success('添加礼包成功!', U('lists?model='.$model['name']));
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
$this->error($Model->getError());
|
|
|
|
$this->error($Model->getError());
|
|
|
@ -190,6 +195,11 @@ class GiftbagController extends ThinkController {
|
|
|
|
$data['novice'] = str_replace(array("\r\n", "\r", "\n"), ",", $_POST['novice']);
|
|
|
|
$data['novice'] = str_replace(array("\r\n", "\r", "\n"), ",", $_POST['novice']);
|
|
|
|
$data['novice_num'] = count(explode(',',$data['novice']));
|
|
|
|
$data['novice_num'] = count(explode(',',$data['novice']));
|
|
|
|
$Model->save($data);
|
|
|
|
$Model->save($data);
|
|
|
|
|
|
|
|
addOperationLog(array(
|
|
|
|
|
|
|
|
"op_type"=>1,
|
|
|
|
|
|
|
|
"key"=>$data['game_name']."/".$data['giftbag_name'],
|
|
|
|
|
|
|
|
"url"=>U("Giftbag/lists",array("giftbag_name"=>$data['giftbag_name']))
|
|
|
|
|
|
|
|
));
|
|
|
|
$this->success('保存'.$model['title'].'成功!', U('lists',array('model'=>$model['name'],'type'=>$_REQUEST['type'])));
|
|
|
|
$this->success('保存'.$model['title'].'成功!', U('lists',array('model'=>$model['name'],'type'=>$_REQUEST['type'])));
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
$this->error($Model->getError());
|
|
|
|
$this->error($Model->getError());
|
|
|
|