Esempio n. 1
0
 /**
  * 添加焦点图
  */
 function addAction()
 {
     if ($this->isPost()) {
         $text = FRequest::getPostString('text');
         $pic = FRequest::getPostString('pic');
         $url = FRequest::getPostString('url');
         $title = FRequest::getPostString('title');
         $position = CommonUtil::getComParam(FRequest::getPostInt('position'), 0);
         if (!$pic) {
             $this->showMessage("图片不能为空", error);
             return;
         }
         if (!$title) {
             $this->showMessage("标题不能为空", error);
             return;
         }
         //打开网页
         //print_r($content);
         $data2 = array('title' => $title, 'text' => $text, 'pic' => $pic, 'url' => $url, 'position' => $position);
         $mumu_youxi_table = new FTable("mumu_youxi");
         $mumu_youxi_table->insert($data2);
         $this->showMessage("添加成功", "success", "/MumuYouxi/list");
         return;
     }
     $this->display('admin/mumu_youxi_add');
 }
Esempio n. 2
0
File: Spm.php Progetto: jiatower/php
 public function addAction()
 {
     $spmT = new FTable('stats_spm');
     if ($this->isPost()) {
         $auto_id = FRequest::getPostInt('id');
         $spm = FRequest::getPostString('spm');
         $url = FRequest::getPostString('url');
         $spm_name = FRequest::getPostString('spm_name');
         $text = "";
         if ($auto_id) {
             $spmT->where(array('id' => $auto_id))->update(array('spm' => $spm, 'url' => $url, 'spm_name' => $spm_name));
             $text = "修改成功";
         } else {
             $spmT->insert(array('spm' => $spm, 'url' => $url, 'spm_name' => $spm_name));
             $text = "添加成功";
         }
         return $this->success($text, '/admin/spm/index');
     }
     $auto_id = FRequest::getInt('id');
     $spmData = $spmT->where(array('id' => $auto_id))->find();
     if ($spmData) {
         $this->assign('spmData', $spmData);
     }
     $this->display('admin/spm-add');
 }
Esempio n. 3
0
 public function shenheAction()
 {
     global $_F;
     // $_F["debug"] = true;
     $tid = FRequest::getPostInt('tid');
     $params = array("tid" => $tid);
     // $params =json_encode($params);
     // echo($params);
     $url = FConfig::get('global.service_mumu_url') . "/s/topic/IClose";
     // $url =  "http://yfservice.admin.docker:8081/s/topic/IClose";
     // echo( $url);
     //$params=Service_Common::post($url,$params);
     //$cookie = "sid=306123456;uid=5000513;key=306123456";
     $cookie = "sid=" . FSession::get('sid') . ";uid=" . FSession::get('user_id') . ";key=" . FSession::get('sid');
     $params = FHttp::doPost($url, $params, $cookie);
     //print_r($params);
     $params = json_decode($params);
     if ($params->status == "ok") {
         $this->showMessage("封闭成功", $messageType = 'success');
         echo "<script LANGUAGE='javascript'>guanbi('guanbi_" . $tid . "');</script>";
     } else {
         $this->showMessage("封闭失败", $messageType = 'success');
     }
     return;
 }
Esempio n. 4
0
 public function chexiaoAction()
 {
     //global $_F;
     // $_F["debug"] = true;
     $tid = FRequest::getInt('tid');
     $priority = FRequest::getPostInt('priority');
     $discovery_table = new FTable("discovery", "mmd", FDB::$DB_MUMU_SORT);
     $discovery_table->where(array("tid" => $tid))->update(array("priority" => "0"));
     echo "<script LANGUAGE='javascript'> document.getElementById('priority_" . $tid . "').value=0;</script>";
     $this->showMessage("撤销成功", "success");
     return;
 }
Esempio n. 5
0
 public function shenheAction()
 {
     //global $_F;
     // $_F["debug"] = true;
     $id = FRequest::getInt('id');
     $picslevel = FRequest::getPostInt('picslevel');
     $topic_table = new FTable("topic");
     $topic_table->where(array('id' => $id))->update(array("picslevel" => $picslevel));
     $params = array("tid" => "200");
     $params = json_encode($params);
     $url = FConfig::get('global.service_mumu_url') . "/topic/ClearCache";
     $params = Service_Common::post($url, $params);
     $params = json_decode($params);
     if ($params->status == "ok") {
         $this->showMessage("审核成功", $messageType = 'success');
     } else {
         $this->showMessage("审核失败", $messageType = 'success');
     }
     return;
 }
Esempio n. 6
0
File: App.php Progetto: jiatower/php
 public function editAppVersionAction()
 {
     if ($this->isPost()) {
         $title = trim(FRequest::getPostString("title"));
         $ver = CommonUtil::getComParam(FRequest::getPostInt("ver"), 0);
         $is_force = FRequest::getPostInt("is_force") == 1 ? 1 : 0;
         $summary = trim(FRequest::getPostString("summary"));
         if ($title == "") {
             $this->error('更新失败,title未填写', '');
             return;
         }
         if ($ver == 0) {
             $this->error('更新失败,版本号未填写', '');
             return;
         }
         if ($summary == "") {
             $this->error('更新失败,升级说明未填写', '');
             return;
         }
         $table = new FTable("app_version_config");
         $app_data = $table->where(array("ver" => $ver))->find();
         $data = array('title' => $title, 'ver' => $ver, 'summary' => $summary, 'status' => 1, 'is_force' => $is_force, 'tm' => date('Y-m-d H:i:s'));
         if ($app_data) {
             $table = new FTable("app_version_config");
             $table->where(array("ver" => $ver))->update($data);
         } else {
             FDB::insert("app_version_config", $data);
         }
         // FDB::insert("app_version_config", $data);
         $this->showMessage("更新成功", "success", "/admin/app/appList");
         // $this->success('更新成功', '/admin/app/appList');
         exit;
     }
     $ver = FRequest::getInt("ver");
     $where = array('ver' => $ver);
     $table = new FTable("app_version_config");
     $app_data = $table->where($where)->find();
     $this->assign("app_version", $app_data);
     $this->display("edit_version");
 }
Esempio n. 7
0
 public function shenheAction()
 {
     global $_F;
     // $_F["debug"] = true;
     $size = FRequest::getPostInt('size');
     $list = FRequest::getPostString('avatarlevel' . $size);
     $query = explode(",", $list);
     $params_uid = array("id" => $query[0], "status" => $query[1]);
     $url_rztz = FConfig::get('global.service_mumu_url') . "/s/user/ICertifyVideo";
     $cookie = "sid=" . FSession::get('sid') . ";uid=" . FSession::get('user_id') . ";key=" . FSession::get('sid');
     $params_rztz = FHttp::doPost($url_rztz, $params_uid, $cookie);
     $params = json_decode($params_rztz);
     if ($params->status == "ok") {
         // $this->showMessage("审核成功",$messageType = 'success');
     } else {
         // $this->showMessage("审核失败",$messageType = 'success');
     }
     //echo(json_encode($params_uid));
     // $this->showMessage("审核失败",$messageType = 'success');
     //exit;
     return;
 }
Esempio n. 8
0
 public function shenheAction()
 {
     global $_F;
     // $_F["debug"] = true;
     $size = FRequest::getPostInt('size');
     $list = array();
     /*
     for($j=1;$j <$size;$j++) {
         $list[$j-1] =FRequest::getPostString('avatarlevel'.$j);
     }
     $list[$size-1] = FRequest::getPostString('avatarlevel'.$size);
     */
     $list[0] = FRequest::getPostString('avatarlevel' . $size);
     $params = array("list" => $list);
     $query = explode(",", $list[0]);
     $query = $query[0];
     $params_uid = array("uid" => $query);
     $params = json_encode($params);
     //$this->showMessage($params,$messageType = 'success');
     // exit;
     $url = FConfig::get('global.service_mumu_url') . "/user/AdminSetAvatarStat";
     $params = Service_Common::post($url, $params);
     /*$url_rztz =  FConfig::get('global.service_mumu_url')."/s/user/ICertifyAvatar";
       $params_rztz=Service_Common::post($url_rztz,json_encode($params_uid));*/
     $url_rztz = FConfig::get('global.service_mumu_url') . "/s/user/ICertifyAvatar";
     $cookie = "sid=" . FSession::get('sid') . ";uid=" . FSession::get('user_id') . ";key=" . FSession::get('sid');
     $params_rztz = FHttp::doPost($url_rztz, $params_uid, $cookie);
     $params = json_decode($params);
     /* $url_rztz =  FConfig::get('global.service_mumu_url')."/s/user/ICertifyAvatar";
        $params_rztz=Service_Common::post($url_rztz,$params_uid);*/
     if ($params->status == "ok") {
         //$this->showMessage("审核成功",$messageType = 'success');
     } else {
         $this->showMessage("审核失败", $messageType = 'success');
     }
     return;
 }
Esempio n. 9
0
 public function shenheAction()
 {
     // global $_F;
     // $_F["debug"] = true;
     $status = FRequest::getPostInt('status');
     $url = FRequest::getPostString('url');
     $data2 = array('sexy_review' => '0', 'ad_review' => '0', 'status' => $status);
     $image_md5_table = new FTable("image_md5");
     $result = $image_md5_table->where(array('url' => $url))->update($data2);
     if ($result) {
         echo '修改成功!';
     } else {
         echo "修改失败";
     }
     return;
 }
Esempio n. 10
0
 /**
  * 修改活动
  */
 function updateAction()
 {
     $id = FRequest::getInt("id");
     if ($this->isPost()) {
         $text = FRequest::getPostString('text');
         $textlong = FRequest::getPostString('textlong');
         $pic = FRequest::getPostString('pic');
         $picda = FRequest::getPostString('picda');
         $tip = FRequest::getPostString('tip');
         $anniu_caozuo = FRequest::getPostInt('anniu_caozuo');
         $timeout = FRequest::getPostString('timeout');
         if (!$text) {
             $this->showMessage("活动标题不能为空", error);
             return;
         }
         if (!$textlong) {
             $this->showMessage("活动内容不能为空", error);
             return;
         }
         if (!$pic) {
             $this->showMessage("活动图片不能为空", error);
             return;
         }
         if (!$tip) {
             $this->showMessage("按钮文字不能为空", error);
             return;
         }
         $textlong = str_replace("<p>", "", $textlong);
         $textlong = str_replace("</p>", "<br>", $textlong);
         //打开网页
         $url = FRequest::getPostString('url');
         //打开圈子
         $topic_id = FRequest::getPostString('topic_id');
         //打开游戏
         $gid = FRequest::getPostString('gid');
         $area_id = FRequest::getPostString('area_id');
         $buts = array();
         $buts[0] = array("tip" => "忽略", "cmd" => "cmd_close", "def" => false);
         if ($anniu_caozuo == 1) {
             $data = array("url" => $url);
             if (!$url) {
                 $this->showMessage("链接地址不能为空", error);
                 return;
             }
             $buts[1] = array("tip" => $tip, "cmd" => "cmd_open_web", "def" => true, "data" => $data);
         }
         if ($anniu_caozuo == 2) {
             $data = array("tid" => $topic_id);
             if (!$topic_id) {
                 $this->showMessage("圈子话题ID不能为空", error);
                 return;
             }
             $buts[1] = array("tip" => $tip, "cmd" => "cmd_open_topic", "def" => true, "data" => $data);
         }
         if ($anniu_caozuo == 3) {
             $data = array("gid" => $gid, "area_id" => $area_id);
             $buts[1] = array("tip" => $tip, "cmd" => "cmd_entry_game", "def" => true, "data" => $data);
         }
         $content = array("text" => $textlong, "pic" => $picda, "buts" => $buts);
         $content = self::decodeUnicode(json_encode($content));
         //print_r($content);
         $data2 = array('title' => $text, 'pic' => $pic, 'timeout' => $timeout . ":00", 'content' => $content);
         if ($picda) {
             $data2["style"] = 2;
         } else {
             $data2["style"] = 1;
         }
         $events_table = new FTable("events");
         $events_table->where(array("id" => $id))->update($data2);
         $this->showMessage("修改活动成功", "success", "/EventsList/list");
         return;
     }
     $events_table = new FTable("events");
     $events = $events_table->where(array('id' => $id))->find();
     $events["content"] = json_decode($events["content"]);
     $events["timeout"] = substr($events["timeout"], 0, -3);
     $this->assign("events", $events);
     $this->assign("id", $id);
     $this->display('admin/events_update');
 }
Esempio n. 11
0
 public function shenheAction()
 {
     // global $_F;
     // $_F["debug"] = true;
     $size = FRequest::getPostInt('size');
     $list = array();
     /*
     for($j=1;$j <$size;$j++) {
         $list[$j-1] =FRequest::getPostString('avatarlevel'.$j);
     }
     $list[$size-1] = FRequest::getPostString('avatarlevel'.$size);
     */
     $list[0] = FRequest::getPostString('avatarlevel' . $size);
     $params = array("list" => $list);
     $params = json_encode($params);
     //$this->showMessage($params,$messageType = 'success');
     // exit;
     $url = FConfig::get('global.service_mumu_url') . "/user/AdminSetAvatarStat";
     $params = Service_Common::post($url, $params);
     $params = json_decode($params);
     if ($params->status == "ok") {
         //$this->showMessage("审核成功",$messageType = 'success');
     } else {
         $this->showMessage("审核失败", $messageType = 'success');
     }
     return;
 }
Esempio n. 12
0
 public function editAction()
 {
     if (FRequest::isPost()) {
         $manager = $_POST['manager'];
         $id = FRequest::getPostInt('id');
         $password = FRequest::getPostString('password');
         if ($password) {
             $manager['password'] = md5($password);
         }
         $quanxianid = FRequest::getPostString('quanxianid');
         $quanxianidx = FRequest::getPostString('quanxianidx');
         if ($quanxianid && count($quanxianid) > 0) {
             $top_menus_id = implode(",", $quanxianid);
         }
         if ($quanxianidx && count($quanxianidx) > 0) {
             $left_menus_id = implode(",", $quanxianidx);
         }
         $manager['top_menus_id'] = $top_menus_id;
         $manager['left_menus_id'] = $left_menus_id;
         $result = $this->db_manager->update($manager, array('uid' => $_POST['id']));
         if ($result) {
             return $this->success('修改成功!', '/admin/manager/list');
         } else {
             return $this->error("342");
         }
     } else {
         $uid = FRequest::getInt('uid');
         $status = array('启用' => '1', '禁用' => '0');
         //获取用户组
         $group = array();
         $manager_group = $this->db_manager_group->select();
         foreach ($manager_group as $v) {
             $group[$v['name']] = $v['gid'];
         }
         $this->assign('group', $group);
         $this->assign('status', $status);
         $action = 'add';
         if ($uid) {
             $action = 'edit';
             $where = array('uid' => $uid);
             $manager = $this->db_manager->where($where)->find();
             $this->assign('manager', $manager);
         }
         /*$top_menus_table = new FTable("top_menus");
                     $top_menus = $top_menus_table->fields(array("name","id"))->select();
         
                     foreach($top_menus as &$top_menu){
         
                         $left_menus_table = new FTable("left_menus");
                         $left_menus = $left_menus_table->fields(array("name","id"))->where(array("top_menus_id"=>$top_menu["id"]))->select();
                         $top_menu["left_menus"]=$left_menus;
         
                     }
                     // echo(json_encode($top_menus));
                     $this->assign('top_menus',$top_menus);*/
         $top_menus_ids = explode(",", $manager['top_menus_id']);
         $left_menus_ids = explode(",", $manager['left_menus_id']);
         $top_menus_table = new FTable("top_menus");
         $top_menus = $top_menus_table->fields(array("name", "id"))->select();
         foreach ($top_menus as &$top_menu) {
             $isin = in_array($top_menu['id'], $top_menus_ids);
             if ($isin) {
                 $top_menu["checked"] = "checked";
             } else {
                 $top_menu["checked"] = "";
             }
             $left_menus_table = new FTable("left_menus");
             $left_menus = $left_menus_table->fields(array("name", "id"))->where(array("top_menus_id" => $top_menu["id"]))->select();
             foreach ($left_menus as &$left_menu) {
                 $isin = in_array($left_menu['id'], $left_menus_ids);
                 if ($isin) {
                     $left_menu["checked"] = "checked";
                 } else {
                     $left_menu["checked"] = "";
                 }
             }
             $top_menu["left_menus"] = $left_menus;
         }
         // echo(json_encode($top_menus));
         $this->assign('top_menus', $top_menus);
         $this->assign('action', $action);
         $this->display('admin/manager-add');
     }
 }
Esempio n. 13
0
 /**
  * 添加焦点图
  */
 function addAction()
 {
     $type = FRequest::getString('type');
     $this->assign('type', $type);
     if ($this->isPost()) {
         $text = FRequest::getPostString('text');
         $pic = FRequest::getPostString('pic');
         $anniu_caozuo = FRequest::getPostInt('anniu_caozuo');
         $events_id = FRequest::getPostInt('events_id');
         $type = FRequest::getPostString('type');
         $position = CommonUtil::getComParam(FRequest::getPostInt('position'), 0);
         if (!$pic) {
             $this->showMessage("图片不能为空", error);
             return;
         }
         //打开网页
         $url = FRequest::getPostString('url');
         //打开游戏
         $gid = FRequest::getPostString('gid');
         $area_id = FRequest::getPostString('area_id');
         $buts = array();
         if ($anniu_caozuo == 1) {
             $data = array("url" => $url);
             if (!$url) {
                 $this->showMessage("链接地址不能为空", error);
                 return;
             }
             $buts = array("cmd" => "cmd_open_web", "data" => $data);
         }
         if ($anniu_caozuo == 2) {
             $data = array();
             $buts = array("cmd" => "cmd_open_actlist", "data" => $data);
         }
         if ($anniu_caozuo == 3) {
             $data = array("id" => $events_id);
             $buts = array("cmd" => "cmd_open_act", "data" => $data);
         }
         if ($anniu_caozuo == 4) {
             $data = array();
             $buts = array("cmd" => "cmd_open_actaward", "data" => $data);
         }
         if ($anniu_caozuo == 5) {
             $data = array("gid" => $gid, "area_id" => $area_id);
             $buts = array("cmd" => "cmd_entry_game", "data" => $data);
         }
         $text = str_replace("<p>", "", $text);
         $text = str_replace("</p>", "<br>", $text);
         $action = self::decodeUnicode(json_encode($buts));
         //print_r($content);
         $data2 = array('type' => $type, 'text' => $text, 'pic' => $pic, 'action' => $action, 'position' => $position, 'status' => 1);
         $events_table = new FTable("focus");
         $events_table->insert($data2);
         $this->showMessage("添加成功", "success", "/FocusList/list?type=" . $type . "");
         return;
     }
     $this->display('admin/focus_add');
 }
Esempio n. 14
0
 /**
  * 添加活动
  */
 function addAction()
 {
     //global $_F;
     // $_F["debug"] = true;
     if ($this->isPost()) {
         $text = FRequest::getPostString('text');
         $textlong = FRequest::getPostString('textlong');
         $pic = FRequest::getPostString('pic');
         $picda = FRequest::getPostString('picda');
         $tip = FRequest::getPostString('tip');
         $anniu_caozuo = FRequest::getPostInt('anniu_caozuo');
         $timeout = FRequest::getPostString('timeout');
         if (!$text) {
             $this->showMessage("活动标题不能为空", error);
             return;
         }
         if (!$textlong) {
             $this->showMessage("活动内容不能为空", error);
             return;
         }
         if (!$pic) {
             $this->showMessage("活动图片不能为空", error);
             return;
         }
         if (!$tip) {
             $this->showMessage("按钮文字不能为空", error);
             return;
         }
         $textlong = str_replace("<p>", "", $textlong);
         $textlong = str_replace("</p>", "<br>", $textlong);
         //打开网页
         $url = FRequest::getPostString('url');
         //打开圈子
         $topic_id = FRequest::getPostString('topic_id');
         //打开游戏
         $gid = FRequest::getPostString('gid');
         $area_id = FRequest::getPostString('area_id');
         $buts = array();
         $buts[0] = array("tip" => "忽略", "cmd" => "cmd_close", "def" => false);
         if ($anniu_caozuo == 1) {
             $data = array("url" => $url);
             if (!$url) {
                 $this->showMessage("链接地址不能为空", error);
                 return;
             }
             $buts[1] = array("tip" => $tip, "cmd" => "cmd_open_web", "def" => true, "data" => $data);
         }
         if ($anniu_caozuo == 2) {
             $data = array("tid" => $topic_id);
             if (!$topic_id) {
                 $this->showMessage("圈子话题ID不能为空", error);
                 return;
             }
             $buts[1] = array("tip" => $tip, "cmd" => "cmd_open_topic", "def" => true, "data" => $data);
         }
         if ($anniu_caozuo == 3) {
             $data = array("gid" => $gid, "area_id" => $area_id);
             $buts[1] = array("tip" => $tip, "cmd" => "cmd_entry_game", "def" => true, "data" => $data);
         }
         $content = array("text" => $textlong, "pic" => $picda, "buts" => $buts);
         $content = self::decodeUnicode(json_encode($content));
         //print_r($content);
         $data2 = array('title' => $text, 'pic' => $pic, 'timeout' => $timeout . ":00", 'content' => $content);
         if ($picda) {
             $data2["style"] = 2;
         } else {
             $data2["style"] = 1;
         }
         $events_table = new FTable("events");
         $events_table->insert($data2);
         $this->showMessage("创建成功", $messageType = 'success');
         return;
     }
     $this->display('admin/events_add');
 }
Esempio n. 15
0
 public function shenheAction()
 {
     // global $_F;
     // $_F["debug"] = true;
     $size = FRequest::getPostInt('size');
     $list = FRequest::getPostString('avatarlevel' . $size);
     $query = explode(",", $list);
     $uid = $query[0];
     $gender = $query[1];
     $status = $query[2];
     $data2 = array('uid' => $uid, 'gender' => $gender, 'level' => $status, 'changes' => 1);
     $user_star_level_table = new FTable("user_star_level");
     $result = $user_star_level_table->insert($data2);
     if ($result) {
         //$this->success('修改成功!');
     } else {
         //$this->error("修改失败");
     }
     return;
 }