Ejemplo n.º 1
0
 public function saveAction()
 {
     //        $fLogger = new FLogger('debug');
     //$fLogger->append('enter save...');
     //创建阿里云工具类,并上传到阿里云
     /* $aliyunUtil = new AliyunUtil();
             $ret = $aliyunUtil->upload();
     
             if ($ret['status'] == 200) {
                 $retData = array(
                     "state" => true,
                     "code"  => 200,
                     "url"   => $ret['url'],
                 );
             } else {
                 $retData = array(
                     "state"   => false,
                     "code"    => $ret['status'],
                     "message" => $ret['msg'],
                 );
             }*/
     $retData = null;
     if ($this->isPost()) {
         /*$url = "http://upload.img.yuanfenba.net/Index/upload?type=photo&flag=1&uid=1000";
           $res = FHttp::doPost($url,$param, nil);
           FResponse::output($res);*/
         echo FRequest::getPostString("hh");
         echo FRequest::getPostString("hhh");
         //  echo(json_encode($res));
         return;
     }
     $this->display("admin/test_upload");
 }
Ejemplo n.º 2
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');
 }
Ejemplo n.º 3
0
 /**
  * 添加焦点图
  */
 function addAction()
 {
     if ($this->isPost()) {
         $text = FRequest::getPostString('text');
         $text = str_replace("<p>", "", $text);
         $text = str_replace("</p>", "<br>", $text);
         $riqi = FRequest::getPostString('riqi');
         $title = FRequest::getPostString('title');
         if (!$title) {
             $this->showMessage("标题不能为空", error);
             return;
         }
         if (!$riqi) {
             $this->showMessage("日期不能为空", error);
             return;
         }
         //print_r($content);
         $data2 = array('title' => $title, 'text' => $text, 'riqi' => $riqi);
         $guanwang_news_table = new FTable("guanwang_news");
         $guanwang_news_table->insert($data2);
         $this->showMessage("添加成功", "success", "/GuanwangNews/list");
         return;
     }
     $this->display('admin/guanwang_news_add');
 }
Ejemplo n.º 4
0
 /**
  * 修改地址
  */
 function updateAction()
 {
     //global $_F;
     // $_F["debug"] = true;
     $uid = FRequest::getInt("uid");
     $addrid = FRequest::getInt("addrid");
     if ($this->isPost()) {
         $username = FRequest::getPostString('username');
         $phone = FRequest::getPostString('phone');
         $province = FRequest::getPostString('province');
         $city = FRequest::getPostString('city');
         $address = FRequest::getPostString('address');
         $data2 = array('uid' => $uid, 'username' => $username, 'phone' => $phone, 'province' => $province, 'city' => $city, 'address' => $address);
         $user_detail_table = new FTable("user_address");
         $user_detail_table->where(array('addrid' => $addrid))->update($data2);
         $this->showMessage("修改成功", $messageType = 'success', "/YUserAddress/list?uid=" . $uid);
         return;
     }
     $useradd_table = new FTable("user_address");
     $useradd = $useradd_table->where(array('addrid' => $addrid))->find();
     $this->assign("useradd", $useradd);
     $this->assign("uid", $uid);
     $this->assign("addrid", $addrid);
     $this->display('admin/y_user_address_update');
 }
Ejemplo n.º 5
0
 /**
  * 修改
  */
 function updateAction()
 {
     //global $_F;
     // $_F["debug"] = true;
     $topid = FRequest::getInt("topid");
     $top_menus = new FTable("top_menus");
     $top_menus_menu = $top_menus->fields(array("menu", "name"))->where(array("id" => $topid))->find();
     $leftid = FRequest::getInt("leftid");
     if ($this->isPost()) {
         $name = FRequest::getPostString('name');
         $url = FRequest::getPostString('url');
         $data2 = array('name' => $name, 'menu' => $top_menus_menu['menu'], 'url' => $url);
         $left_menus = new FTable("left_menus");
         $left_menus->where(array('id' => $leftid, 'top_menus_id' => $topid))->update($data2);
         $this->showMessage("修改成功", $messageType = 'success', "/LeftMenus/list?topid=" . $topid);
         return;
     }
     $left_menus = new FTable("left_menus");
     $left_menu = $left_menus->where(array('id' => $leftid))->find();
     $this->assign("left_menu", $left_menu);
     $this->assign("topid", $topid);
     $this->assign("leftid", $leftid);
     $this->assign("top_menus_menu", $top_menus_menu);
     $this->display('admin/left_menus_update');
 }
Ejemplo n.º 6
0
 /**
  * 添加
  */
 function addAction()
 {
     if ($this->isPost()) {
         $text = FRequest::getPostString('text');
         $riqi = date("Y-m-d", time());
         $pic = FRequest::getPostString('pic');
         $title = FRequest::getPostString('title');
         if (!$pic) {
             $this->showMessage("图片不能为空", error);
             return;
         }
         if (!$title) {
             $this->showMessage("标题不能为空", error);
             return;
         }
         //打开网页
         //print_r($content);
         $data2 = array('title' => $title, 'text' => $text, 'pic' => $pic, 'riqi' => $riqi);
         $mumu_ba_table = new FTable("mumu_ba");
         $mumu_ba_table->insert($data2);
         $this->showMessage("添加成功", "success", "/MumuBa/list");
         return;
     }
     $this->display('admin/mumu_ba_add');
 }
Ejemplo n.º 7
0
Archivo: Spm.php Proyecto: 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');
 }
Ejemplo n.º 8
0
 /**
  * 秋千图片,头像,语音上传接口
  * post提交
  * 文件字段名为file_name
  * type 类型,如头像avatar,大头像avatar_big,相册photo,语音voice,动态 dynamic
  * uid 用户ID
  * flag: 1 type和uid通过get方式获取 否则通过post获取
  */
 public function defaultAction()
 {
     global $_F;
     $log = new FLogger("images_log");
     $log->append("---being---" . time());
     if ($this->isPost()) {
         $_F['s_url_oss'] = 'http://image1.yuanfenba.net';
         //FConfig::get('global.s_url_oss');
         $flag = FRequest::getInt('flag');
         if ($flag == 1) {
             $type = FRequest::getString('type');
             $uid = FRequest::getString('uid');
         } else {
             $type = FRequest::getPostString('type');
             $uid = FRequest::getPostString('uid');
         }
         $return_arr = array();
         //  $log->append("---being-2--".($type));
         if ($type) {
             $log2 = new FLogger("images_log");
             $log2->append("---being-1--" . time());
             if ($type == 'voice') {
                 $_F['s_url_oss'] = 'http://dl.yuanfenba.net';
                 $return_arr = Service_AttachMumu::getInstance()->uploadOSS('file_name', $type, 'amr');
             } else {
                 $return_arr = Service_AttachMumu::getInstance()->uploadOSS('file_name', $type);
             }
             $file_path = $return_arr['object'];
             if ($file_path) {
                 $file_http_path = Service_AttachMumu::getInstance()->getThumbUrl($file_path);
                 // 保存图片
                 // if($type=="avatar"||$type=="avatar_big"||$type=="photo"||$type=="chat"||$type=="topic"){
                 if ($type == "avatar" || $type == "avatar_big" || $type == "chat" || $type == "photo") {
                     Service_Images::addImageMd5($file_http_path, $return_arr["md5"], $type, $uid);
                 }
                 $log2->append("---being--retun---" . json_encode($return_arr));
                 FResponse::output(array('status' => 'ok', 'msg' => '上传成功', 'code' => '00', 'res' => array('file_s_path' => $file_path, 'file_http_path' => $file_http_path, 'md5' => $return_arr["md5"])));
             } else {
                 FResponse::output(array('status' => 'error', 'msg' => '上传失败!'));
             }
         } else {
             FResponse::output(array('status' => 'error', 'msg' => '参数错误!'));
         }
     } else {
         $this->display('upload');
     }
     $log->append("---end---" . time());
 }
Ejemplo n.º 9
0
 /**
  * 修改
  */
 function updateAction()
 {
     //global $_F;
     // $_F["debug"] = true;
     $topid = FRequest::getInt("topid");
     if ($this->isPost()) {
         $name = FRequest::getPostString('name');
         $menu = FRequest::getPostString('menu');
         $data2 = array('name' => $name, 'menu' => $menu);
         $top_menus = new FTable("top_menus");
         $top_menus->where(array('id' => $topid))->update($data2);
         $this->showMessage("修改成功", $messageType = 'success', "/TopMenus/list");
         return;
     }
     $top_menus = new FTable("top_menus");
     $top_menu = $top_menus->where(array('id' => $topid))->find();
     $this->assign("top_menu", $top_menu);
     $this->assign("topid", $topid);
     $this->display('admin/top_menus_update');
 }
Ejemplo n.º 10
0
Archivo: App.php Proyecto: 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");
 }
Ejemplo n.º 11
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;
 }
Ejemplo n.º 12
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;
 }
Ejemplo n.º 13
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');
     }
 }
Ejemplo n.º 14
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;
 }
Ejemplo n.º 15
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');
 }
Ejemplo n.º 16
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;
 }
Ejemplo n.º 17
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;
 }
Ejemplo n.º 18
0
 function listAction()
 {
     //global $_F;
     //$_F["debug"] = true;
     $uid = CommonUtil::getDefStr(FRequest::getPostString('uid'), "");
     $tj25 = json_decode(FRequest::getPostString('tj25'));
     $tj26 = json_decode(FRequest::getPostString('tj26'));
     $tj27 = json_decode(FRequest::getPostString('tj27'));
     $tj28 = json_decode(FRequest::getPostString('tj28'));
     $tj30 = json_decode(FRequest::getPostString('tj30'));
     $tj31 = json_decode(FRequest::getPostString('tj31'));
     $tj32 = json_decode(FRequest::getPostString('tj32'));
     $stats_date = FRequest::getString('stats_date');
     if (!$stats_date) {
         $this->showMessage("请输入统计日期", error);
         return;
     }
     $url = FConfig::get('global.service_mumu_url') . "/user/AdminTjInfo";
     /* $params = array("uid"=>$uid,"date"=>$stats_date);
             $params=Service_Common::post($url,json_encode($params));
             $params=json_decode($params);
     
             if($params->status=="ok"){
                $this->assign("tj",$params->res);
             } else{
                 $this->showMessage("查找失败",$messageType = 'success');
                 return;
             }*/
     if (!$uid || $uid == 25) {
         $params25 = array("uid" => 25, "date" => $stats_date);
         $params25 = Service_Common::post($url, json_encode($params25));
         $params25 = json_decode($params25);
         if ($params25->status == "ok") {
             $tj25 = $params25->res;
         }
     }
     if (!$uid || $uid == 26) {
         $params26 = array("uid" => 26, "date" => $stats_date);
         $params26 = Service_Common::post($url, json_encode($params26));
         $params26 = json_decode($params26);
         if ($params26->status == "ok") {
             $tj26 = $params26->res;
         }
     }
     if (!$uid || $uid == 27) {
         $params27 = array("uid" => 27, "date" => $stats_date);
         $params27 = Service_Common::post($url, json_encode($params27));
         $params27 = json_decode($params27);
         if ($params27->status == "ok") {
             $tj27 = $params27->res;
         }
     }
     if (!$uid || $uid == 28) {
         $params28 = array("uid" => 28, "date" => $stats_date);
         $params28 = Service_Common::post($url, json_encode($params28));
         $params28 = json_decode($params28);
         if ($params28->status == "ok") {
             $tj28 = $params28->res;
         }
     }
     if (!$uid || $uid == 30) {
         $params30 = array("uid" => 30, "date" => $stats_date);
         $params30 = Service_Common::post($url, json_encode($params30));
         $params30 = json_decode($params30);
         if ($params30->status == "ok") {
             $tj30 = $params30->res;
         }
     }
     if (!$uid || $uid == 31) {
         $params31 = array("uid" => 31, "date" => $stats_date);
         $params31 = Service_Common::post($url, json_encode($params31));
         $params31 = json_decode($params31);
         if ($params31->status == "ok") {
             $tj31 = $params31->res;
         }
     }
     if (!$uid || $uid == 32) {
         $params32 = array("uid" => 32, "date" => $stats_date);
         $params32 = Service_Common::post($url, json_encode($params32));
         $params32 = json_decode($params32);
         if ($params32->status == "ok") {
             $tj32 = $params32->res;
         }
     }
     $this->assign("tj25", $tj25);
     $this->assign("tj26", $tj26);
     $this->assign("tj27", $tj27);
     $this->assign("tj28", $tj28);
     $this->assign("tj30", $tj30);
     $this->assign("tj31", $tj31);
     $this->assign("tj32", $tj32);
     $this->assign("tj25_jd", json_encode($tj25));
     $this->assign("tj26_jd", json_encode($tj26));
     $this->assign("tj27_jd", json_encode($tj27));
     $this->assign("tj28_jd", json_encode($tj28));
     $this->assign("tj30_jd", json_encode($tj30));
     $this->assign("tj31_jd", json_encode($tj31));
     $this->assign("tj32_jd", json_encode($tj32));
     $this->assign("uid", $uid);
     $this->assign("stats_date", $stats_date);
     $this->display('admin/uidtj_list');
 }
Ejemplo n.º 19
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');
 }
Ejemplo n.º 20
0
 public function awardfahuoAction()
 {
     // global $_F;
     // $_F["debug"] = true;
     $id = FRequest::getInt('id');
     $log_id = FRequest::getInt('log_id');
     $status = FRequest::getInt('status');
     $type = FRequest::getInt('type');
     if ($this->isPost()) {
         $name = FRequest::getPostString('name');
         $num = FRequest::getPostString('num');
         $address = FRequest::getPostString('address');
         $address_phone = FRequest::getPostString('address_phone');
         $address_name = FRequest::getPostString('address_name');
         if (!$name) {
             $this->showMessage("物流公司不能为空", error);
             return;
         }
         if (!$num) {
             $this->showMessage("物流单号不能为空", error);
             return;
         }
         $data2 = array('name' => $name, 'num' => $num, 'address' => $address, 'tm' => date('Y-m-d H:i:s'), 'address_phone' => $address_phone, 'address_name' => $address_name);
         $user_detail_table = new FTable("award_trans");
         $user_detail_table->where(array('id' => $log_id))->update($data2);
         $data2 = array('status' => 3, 'oper_tm' => date('Y-m-d H:i:s'));
         $user_award_record = new FTable("award_record");
         $user_award_record->where(array('id' => $id))->update($data2);
         $this->showMessage("发货成功", $messageType = 'success', "/User/award?status=" . $status . "&type=" . $type . "");
         return;
     }
     $award_trans_table = new FTable("award_trans");
     $award_trans = $award_trans_table->where(array('id' => $log_id))->find();
     $this->assign("award_trans", $award_trans);
     $this->assign("id", $id);
     $this->assign("log_id", $log_id);
     $this->assign("status", $status);
     $this->assign("type", $type);
     $this->display('admin/user_award_fahuo');
 }
Ejemplo n.º 21
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');
 }