|
|
|
@ -66,6 +66,13 @@ class GameSourceController extends ThinkController
|
|
|
|
|
$d = D('Game_source') -> where($map) -> find();
|
|
|
|
|
$source = A('Source', 'Event');
|
|
|
|
|
if (empty($d)) {
|
|
|
|
|
//添加原包操作日志
|
|
|
|
|
$gamename = M("Game","tab_")->where("id = '{$_POST['game_id']}'")->field("game_name")->find()['game_name'];
|
|
|
|
|
addOperationLog(array(
|
|
|
|
|
"op_type"=>0,
|
|
|
|
|
"key"=>$gamename,
|
|
|
|
|
"url"=>U("GameSource/lists",array("game_name"=>$gamename))
|
|
|
|
|
));
|
|
|
|
|
$source -> add_source();
|
|
|
|
|
} else {
|
|
|
|
|
$type = $_POST['develop_id'] == 0 ? 1 : 2;//判断是添加官方游戏还是开发者游戏
|
|
|
|
@ -120,6 +127,12 @@ class GameSourceController extends ThinkController
|
|
|
|
|
@unlink($value['file_url']);
|
|
|
|
|
@unlink($value['description_url']);
|
|
|
|
|
@unlink($value['plist_url']);
|
|
|
|
|
//操作日志
|
|
|
|
|
addOperationLog(array(
|
|
|
|
|
"op_type"=>2,
|
|
|
|
|
"key"=>$value['game_name'],
|
|
|
|
|
"url"=>U("GameSource/lists",array("game_name"=>$value['game_name']))
|
|
|
|
|
));
|
|
|
|
|
}
|
|
|
|
|
if ($Model -> where($map) -> delete()) {
|
|
|
|
|
$this -> success('删除成功');
|
|
|
|
@ -152,6 +165,12 @@ class GameSourceController extends ThinkController
|
|
|
|
|
if (empty($d)) {
|
|
|
|
|
$source->add_source();
|
|
|
|
|
} else {
|
|
|
|
|
//更新原包
|
|
|
|
|
addOperationLog(array(
|
|
|
|
|
"op_type"=>1,
|
|
|
|
|
"key"=>$d['game_name'],
|
|
|
|
|
"url"=>U("GameSource/lists",array("game_name"=>$d['game_name']))
|
|
|
|
|
));
|
|
|
|
|
$source->update_source($d['id'], $d['file_name']);
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|