diff --git a/Application/Admin/Controller/GameController.class.php b/Application/Admin/Controller/GameController.class.php index 5638da792..0f5e8e217 100644 --- a/Application/Admin/Controller/GameController.class.php +++ b/Application/Admin/Controller/GameController.class.php @@ -298,6 +298,9 @@ class GameController extends ThinkController $this->error('一句话简介不能超过30个字!'); exit; } + if (!preg_match("/^((https|http|ftp|rtsp|mms)?:\/\/)[^\s]+/i", $_POST['beta_url'])) { + return $this->error("请填写正确的Bata链接"); + } /*if($_POST['apply_status']==0&&$_POST['game_status']==1){ $this->error('游戏未审核不允许显示');//游戏添加完成 }*/ @@ -349,6 +352,8 @@ class GameController extends ThinkController $phone['flooring_page_video'] = $sibling['flooring_page_video']; $phone['flooring_page_video_cover'] = $sibling['flooring_page_video_cover']; $phone['supersign_status'] = $sibling['supersign_status']; + $phone['beta_url'] = $_POST['beta_url']; + $phone['beta_status'] = $_POST['beta_status']; M('Game', 'tab_')->data($phone)->where(array('id' => $another['id']))->save(); //同时修改代充游戏折扣 $set_fidel['status'] = 1; diff --git a/Application/Admin/Controller/PromoteController.class.php b/Application/Admin/Controller/PromoteController.class.php index 73c1a1b0a..a76becf9a 100644 --- a/Application/Admin/Controller/PromoteController.class.php +++ b/Application/Admin/Controller/PromoteController.class.php @@ -227,7 +227,9 @@ class PromoteController extends ThinkController if (preg_match('/^[a-zA-Z0-9]{6,15}$/', $account)==false) { $this->error('账号只能是6-15位字母或数字'); } - + if (empty($company_id)) { + $this->error('请选择推广公司'); + } $promoteService = new PromoteService(); $status = $promoteService->addPromote($data); if ($status) { @@ -278,7 +280,8 @@ class PromoteController extends ThinkController $data['account'] = I('post.account'); $map1['id'] = array('neq',$_POST['id']); $map1['account'] = $data['account']; - if ($this->accountExist($data['account'])) { + + if ($this->accountExist($data['account'], $_POST['id'])) { $this->error('该账号已存在'); } $pdata = D('Promote')->where($map1)->find(); diff --git a/Application/Admin/View/Game/edit.html b/Application/Admin/View/Game/edit.html index 595e67d20..f3ff9f62d 100644 --- a/Application/Admin/View/Game/edit.html +++ b/Application/Admin/View/Game/edit.html @@ -429,6 +429,28 @@ +