diff --git a/Application/Admin/Controller/FileController.class.php b/Application/Admin/Controller/FileController.class.php index 0e1304463..c96c5d31d 100644 --- a/Application/Admin/Controller/FileController.class.php +++ b/Application/Admin/Controller/FileController.class.php @@ -200,6 +200,14 @@ class FileController extends AdminController /* 调用文件上传组件上传文件 */ $Picture = D('Picture'); $pic_driver = C('PICTURE_UPLOAD_DRIVER'); + + if (I('icon')) { + if ($_FILES['file']['size'] > 51200) { + $return = array('status' => 1001, 'info' => '图片大小不得超过50k', 'data' => ''); + $this->ajaxReturn($return); + } + } + $info = $Picture->upload( $_FILES, C('PICTURE_UPLOAD'), diff --git a/Application/Admin/Model/GameModel.class.php b/Application/Admin/Model/GameModel.class.php index a83665f45..7a7afb347 100644 --- a/Application/Admin/Model/GameModel.class.php +++ b/Application/Admin/Model/GameModel.class.php @@ -76,12 +76,12 @@ class GameModel extends Model{ */ public function detail($id,$display_site=''){ /* 获取基础数据 */ - $map['relation_game_id']=$id; + $map['relation_game_id'] = $id; $map['game_status'] = 1; $map['display_site'] = ['like','%'.$display_site.'%']; $info = $this->field(true)->where($map)->group('relation_game_id')->select(); - $info= game_merge($info,$map); - $info=reset($info); + $info = game_merge($info,$map); + $info = reset($info); if(!(is_array($info) || $info['game_status']!=1)){ $this->error = '游戏被禁用或已删除!'; return false; diff --git a/Application/Admin/View/Game/edit.html b/Application/Admin/View/Game/edit.html index 1108fc7a0..2fe741463 100644 --- a/Application/Admin/View/Game/edit.html +++ b/Application/Admin/View/Game/edit.html @@ -251,7 +251,7 @@ - 尺寸不得小于512*512px,圆角半径113px,不强制要求,可直接提供512*512方图 + 尺寸不得小于125*125px,大小不得超过50K