public function actionRequestSent() { $reqId = $_REQUEST['reqid']; $userIds = $_REQUEST['userids']; if (isset($reqId) && isset($userIds)) { if (strpos($userIds, ',')) { $arr = explode(',', $userIds); foreach ($arr as $id) { if (!empty($id)) { $req = new FRequest(); $req->requestId = $reqId; $req->friendId = $id; $req->fbId = $_SESSION["fbid"]; $req->save(); } } } else { $req = new FRequest(); $req->requestId = $reqId; $req->friendId = $userIds; $req->fbId = $_SESSION["fbid"]; $req->save(); } echo $reqId . ':' . $userIds; } else { echo 'error:' . $reqId . ':' . $userIds; } }
/** * 添加焦点图 */ 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'); }
/** * 添加焦点图 */ 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'); }
function listAction() { //global $_F; // $_F["debug"] = true; $page = max(1, FRequest::getInt('page')); $uid = FRequest::getInt('uid'); $query_str = " ( mm.type='pic' or mm.type='text' ) "; $where = array(); if ($uid > 0) { $where["mm.from"] = $uid; //$query_str=$query_str." and (mm.from='$uid' or mm.to='$uid') and mm.from<>1 and mm.to<>1 "; $where["str"] = $query_str; $user_detail_table = new FTable("user_detail"); $user_detail = $user_detail_table->where(array('uid' => $uid))->find(); $user_avatar = CommonUtil::getMoreSizeImg($user_detail["avatar"], 100, 100); $table = new FTable("message", "mm", FDB::$DB_MUMU_MESSAGE); $user_messages = $table->fields(array("mm.tm", "mm.from", "mm.to", "mm.content"))->where($where)->groupBy("mm.to")->page($page)->limit(20)->order(array("mm.tm" => "desc"))->select(); $user_messages1 = $table->fields(array("mm.tm", "mm.from", "mm.to", "mm.content"))->where($where)->groupBy("mm.to")->order(array("mm.tm" => "desc"))->select(); $total = count($user_messages1); foreach ($user_messages as &$user_message) { $user_detail_table = new FTable("user_detail"); $user_detail = $user_detail_table->where(array('uid' => $user_message["to"]))->find(); $user_message["to_avatar"] = CommonUtil::getMoreSizeImg($user_detail["avatar"], 100, 100); $user_message["content"] = json_decode($user_message["content"]); } } if ($uid > 0) { $page_info = $table->getPagerInfo(); $this->assign('page_info', FPager::getPagerInfo($total, $page, '20')); $this->assign('user_messages', $user_messages); $this->assign('user_avatar', $user_avatar); } $this->assign('uid', $uid); $this->display('admin/usermessage_list'); }
/** * 某商品结果(二维码,密码) * @throws Exception */ public function detailAction() { global $_F; /*echo "cookie: ".json_encode($_COOKIE)."<br>";*/ if (!$this->isLogin()) { return; } $id = FRequest::getInt("id"); $table = new FTable("mall_buy_history", "mb"); $buy = $table->where(array("id" => $id))->find(); if ($buy["uid"] != $_F["uid"]) { /* echo "信息不符".json_encode($buy)."---".$_F["uid"]."---".json_encode($_COOKIE);*/ return; } if (!$buy["item_id"] || $buy["item_id"] <= 0) { return; } $this->assign("buy", $buy); $table = new FTable("mall_inventory", "mi"); $r = $table->fields(array("mall.title", "mall.pic", "mi.goods_id", "mi.secrete", "mi.status"))->leftJoin("mall", "mall", "mi.goods_id = mall.id")->where(array("mi.id" => $buy["item_id"]))->find(); $secrete = json_decode($r["secrete"], true); $this->assign("secrete", $secrete); $this->assign("buy_info", $r); $this->assign("base_url", FConfig::get('global.base_url') . "/mall/info"); $this->display('mall_detail'); }
function listAction() { //global $_F; // $_F["debug"] = true; $page = max(1, FRequest::getInt('page')); $uid = FRequest::getInt('uid'); $query_str = " ( mm.type='pic' or mm.type='text' ) "; $where = array(); if ($uid > 0) { $where["mm.from"] = $uid; $where["str"] = $query_str; } $table = new FTable("message", "mm", FDB::$DB_MUMU_MESSAGE); $user_messages = $table->fields(array("mm.to", "mm.content"))->where($where)->page($page)->limit(100)->order(array("mm.id" => "desc"))->select(); foreach ($user_messages as &$user_message) { // $useradd_table = new FTable("user_address"); // $useradd = $useradd_table->where(array('addrid' => $addrid))->find(); $user_message["content"] = json_decode($user_message["content"]); } $page_info = $table->getPagerInfo(); if ($uid > 0) { $this->assign('page_info', $page_info); $this->assign('user_messages', $user_messages); } $this->assign('uid', $uid); $this->display('admin/usermessage_list_jd'); }
public function cntAction() { global $_F; $tm = date("Y-m-d"); $c_uid = FRequest::getString('c_uid'); $c_sid = FRequest::getString('c_sid'); if ($c_uid == "" || $c_sid == "") { $rs = array("msg" => "参数错误,必选参数c_uid,c_sid", "code" => 201); FResponse::output($rs); return; } $fields = array("stats_date", "c_uid", "c_sid", "sum(reg_cnt) as reg_cnt"); $stats_table = new FTable("stats"); $stats_table->fields($fields); $where = array(); if ($c_uid != "") { $where["c_uid"] = $c_uid; } if ($c_sid != "") { $where["c_sid"] = $c_sid; } $where["stats_date"] = $tm; $logList = $stats_table->where($where)->select(); $empty = array("stats_date" => $tm, "c_uid" => $c_uid, "c_sid" => $c_sid, "reg_cnt" => 0); if (count($logList) > 0) { FResponse::output($logList[0]); return; } FResponse::output($empty); }
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"); }
public function getCategoryAction() { $parent_id = FRequest::getInt('parent_id'); $categoryTable = new FTable('category'); $cateList = $categoryTable->fields(array('cat_id', 'cat_name'))->where(array('status' => 1, 'parent_id' => $parent_id))->order(array('sort' => 'desc'))->select(); FResponse::output($cateList); }
public function deleteAction() { $spmT = new FTable('stats_spm'); $auto_id = FRequest::getInt('id'); $spmT->where(array('id' => $auto_id))->remove(true); FResponse::redirect('r'); }
public function deleteAction() { $top_menus = new FTable('top_menus'); $topid = FRequest::getInt('topid'); $top_menus->where(array('id' => $topid))->remove(true); FResponse::redirect('r'); }
/** * 添加 */ 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'); }
public function start() { global $_F; $life_time = FConfig::get('global.session.life_time'); $life_time = $life_time ? $life_time : ini_get('session.gc_maxlifetime'); ini_set('session.name', 'sid'); // 不使用 GET/POST 变量方式 ini_set('session.use_trans_sid', 1); // 设置垃圾回收最大生存时间 ini_set('session.gc_maxlifetime', $life_time); ini_set('session.gc_probability', 1); ini_set('session.gc_divisor', 100); // 使用 COOKIE 保存 SESSION ID 的方式 ini_set('session.use_cookies', 1); ini_set('session.cookie_path', '/'); // 多主机共享保存 SESSION ID 的 COOKIE,注意此处域名为一级域名 if ($_F['cookie_domain']) { ini_set('session.cookie_domain', $_F['cookie_domain']); } $session_id = FRequest::getRequestString('session_id'); if ($session_id) { session_id($session_id); } session_start(); }
public function defaultAction() { //global $_F; //$_F["debug"] = true; $url = FRequest::getString('url'); $this->assign('url', $url); $this->display('sliding'); }
public function defaultAction() { //global $_F; //$_F["debug"] = true; $id = FRequest::getInt('id'); $this->assign('id', $id); $this->display('shareDynamic'); }
public function loginAction() { global $_F; // $_F['debug'] = 1; if ($this->isPost()) { $username = trim($_POST['username']); $password = trim($_POST['password']); /*$checkCode = FRequest::getPostString('check_code'); if (!$checkCode) { return $this->error('请输入验证码!'); }*/ session_start(); // if ($checkCode != $_SESSION['rand_code']) { // return $this->error('验证码错误!'); // } $refer = trim($_POST['refer']); if (strpos($refer, 'login')) { $refer = null; } $managerTable = new FTable('manager'); $encryptPassword = Service_Manager::getEncryptPassword($password); $managerData = $managerTable->where(array('username' => $username))->find(); $managerLoginLogTable = new FTable('manager_login_log'); $newLoginLogData = array('username' => $username, 'login_time' => date('Y-m-d H:i:s'), 'login_ip' => FRequest::getClientIP()); if (!$managerData) { $newLoginLogData['result'] = 2; $newLoginLogData['comment'] = '用户名不存在'; $managerLoginLogTable->insert($newLoginLogData); return $this->error('用户名不存在!'); } else { if ($managerData['password'] == $encryptPassword) { $user_id = $managerData['user_id']; // 获取管理员user_id 和 密钥 $user_table = new FTable("user_main"); $user = $user_table->where(array("uid" => $user_id))->find(); // $auth_str = md5("{$managerData['username']}|{$managerData['password']}|{$managerData['gid']}"); FSession::set('manager_uid', $managerData['uid']); FSession::set('user_id', $user_id); FSession::set('sid', $user['sid']); // 更新登录时间 $managerTable->where(array("uid" => $managerData['uid']))->update(array('last_login_time' => date('Y-m-d H:i:s'))); $newLoginLogData['uid'] = $managerData['uid']; $newLoginLogData['result'] = 1; $managerLoginLogTable->insert($newLoginLogData); // FCookie::set('manager_auth', "{$managerData['uid']}\t{$auth_str}", 3600000); FResponse::redirect('/'); return true; } else { $newLoginLogData['result'] = 2; $newLoginLogData['comment'] = '密码错误'; $managerLoginLogTable->insert($newLoginLogData); return $this->error('对不起,密码错误!'); } } } $this->display('admin/login'); }
public function defaultAction() { global $_F; $url = FRequest::getString('url'); $gender = FRequest::getString('gender'); $this->assign('url', $url); $this->assign('gender', $gender); $this->assign('title', '匹配'); $this->display('zhanbu2'); }
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; }
public function logAction() { global $_F; $page = FRequest::getInt('page'); $actionLogTable = new FTable('auction_log'); $where = array('status' => 1); $actionList = $actionLogTable->where($where)->page($page)->limit(50)->select(); $pagerInfo = $actionLogTable->getPagerInfo(); $this->assign('page_info', $pagerInfo); $this->assign('auction_logs', $actionList); $this->display('admin/auction-log'); }
public function defaultAction() { global $_F; $url = "http://down.mumu123.cn/mumu/MuMu_1617_1000_6_1.005.apk"; $mumu_auth = FCookie::get('mumu_auth'); $v = FRequest::getString('v'); if ($v) { FResponse::redirect($url); } else { if ($mumu_auth) { FResponse::redirect($url); } else { FResponse::redirect('/public/reg'); } } }
public function modifyAction() { if ($this->isPost()) { $group = $_POST['group']; $result = $this->db_group->update($group, array('gid' => $_POST['gid'])); if ($result) { return $this->success('修改成功!', '/admin/group/list'); } } $action = 'modify'; $this->assign('action', $action); $where = array('gid' => FRequest::getInt('gid')); $group_info = $this->db_group->where($where)->find(); $this->assign('group_info', $group_info); $this->display('admin/group-add'); }
/** * 图片检测接口 * img 图片url */ public function checkImgAction() { //sleep(50); $log = new FLogger("images_log"); $url = FRequest::getString('imgs'); $item = FRequest::getInt("type"); if (!$url) { FResponse::output(array('status' => 'fail', 'msg' => 'parm img is empty')); return; } if (!$item || $item <= 0) { FResponse::output(array('status' => 'fail', 'msg' => 'parm type is empty')); return; } $images = explode(",", $url); if (!$images || count($images) <= 0) { FResponse::output(array('status' => 'fail', 'msg' => 'the length of images is less than 0')); return; } // 检测图片域名 foreach ($images as &$url) { $S = parse_url($url); $S = strtolower($S['host']); //取域名部分 if ($item == Service_TupuTech::$SEXY_AND_AD && !(strpos($S, "yuanfenba.net") || strpos($S, "mumu123.cn"))) { FResponse::output(array('status' => 'fail', 'msg' => 'the host of image is error')); return; } if (strpos($S, "yuanfenba.net") || strpos($S, "mumu123.cn")) { $url = CommonUtil::getImgBySize($url, 256); } } $log->append("checkImgAction - begin :" . time() . json_encode($images)); $res = Service_TupuTech::doCheckImages($images, $item); $log->append("checkImgAction - 1 :" . time()); if ($res["code"] == 0) { $data = Service_Images::addImagesRecord($res, $item); FResponse::output($data); } else { $log->append("[ERROR] checkImgAction is error" . json_encode($res)); FResponse::output(array('status' => 'fail', 'msg' => 'check img is error')); } $log->append("checkImgAction - end :" . time()); }
public function defaultAction() { // global $_F; //$_F["debug"] = true; $c_uid = FRequest::getString('c_uid'); $c_sid = FRequest::getString('c_sid'); if ($c_uid && $c_sid) { $this->assign('xiazai', 'http://service.imswing.cn/common/Download?c_uid=' . $c_uid . '&c_sid=' . $c_sid); } else { $this->assign('xiazai', 'http://service.imswing.cn/common/Download?c_uid=8000&c_sid=1001'); } $this->assign('c_uid', $c_uid); $this->assign('c_sid', $c_sid); if (self::isMobile()) { $this->display('m'); } else { $this->display('index'); } }
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; }
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; }
function listAction() { //global $_F; //$_F["debug"] = true; $page = max(1, FRequest::getInt('page')); $uid = FRequest::getInt('uid'); $where = array(); if ($uid) { $where["vr.uid"] = $uid; } else { $where["vr.status"] = array('neq' => '0'); } $table = new FTable("video_record", "vr"); $users = $table->fields(array("vr.uid", "vr.id", "vr.photos", "vr.status", "ud.video_img", "ud.nickname", "vr.tm", "um.reg_ip", "um.model", "um.sysver"))->leftJoin("user_detail", "ud", "vr.uid=ud.uid")->leftJoin("user_main", "um", "vr.uid=um.uid")->where($where)->page($page)->limit(20)->order(array("vr.id" => "asc"))->select(); foreach ($users as &$user) { $user["video_img"] = CommonUtil::getMoreSizeImg($user["video_img"], 222, 222); } $page_info = $table->getPagerInfo(); $this->assign('page_info', $page_info); $this->assign('users', $users); $this->assign('uid', $uid); $this->display('admin/user_video_record_yi'); }
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; }
/** *处理微信服务器消息 */ public function defaultAction() { global $_F; $this->openDebug(); require_once APP_ROOT . 'lib/weixin/WeixinChat.class.php'; $options = array('token' => 'mumu2015api', 'appid' => 'wxe3ae7e3cf42d0825', 'appsecret' => '2d7b39fcb0813e7b07830683cc3caa50'); $weixin = new WeixinChat($options); // $weixin->valid(); $logger = new FLogger("weixn"); $logger->append('==============开始:==============='); $getRev = $weixin->getRev(); $logger->append($getRev->getRevText()); if ($weixin->getRevType()) { $logger->append('getRevType:' . $weixin->getRevType()); $eventData = $weixin->getRevEvent(); $logger->append('eventData:' . var_export($eventData, true)); if ($eventData) { $openid = $weixin->getRevFrom(); if ($eventData['event'] == 'click') { switch ($eventData['key']) { case 'V1001_FREE': $type = 1; break; case 'V1001_TODAY_ACTIVITY': $type = 2; break; case 'V1001_FOUND': $type = 3; break; default: $type = 1; break; } $data = $this->getNewsMsgData($type); } else { if ($eventData['event'] == 'subscribe') { // $upData = array( // 'subscribe' => 1, // 'subscribe_time' => date('Y-m-d H:i:s', time()) // ); $userInfo = $weixin->getUserInfo($openid); FLogger::write($userInfo, 'subscribe'); Service_UserWechat::reg($userInfo, $openid); // $data = $this->getNewsMsgData(2); $data = '欢迎关注缘分吧'; } if ($eventData['event'] == 'unsubscribe') { // $upData = array( // 'subscribe' => 0 // ); } } } if ($data) { $logger->append(var_export($data, true)); $logger->append(FRequest::getClientIP()); // $logger->append(json_encode($weixin->getRevData())); $weixin->text($data); $weixin->reply(); } } else { $logger->append('getRevType为空' . $weixin->getRevType()); } $logger->append('==============结束:==============='); }
/** * 进行临时统计 */ public function doTempReportAction() { $time_str = date("Y-m-d"); $stm = date('Y-m-d 00:00:00', strtotime($time_str)); $time = FRequest::getString("time"); if (CommonUtil::parmIsEmpty($time)) { $time = $stm; } // $time = "2014-11-15 00:00:00"; $sql = "select count(*) as count from user where reg_time > '" . $time . "' "; // 注册人数 $sql2 = "select count(*) as count from user where reg_time > '" . $time . "' and cell_phone>0"; // 注册绑定 $sql3 = "select count(*) as count from user where reg_time > '" . $time . "' and cell_phone>0 and common_status = 1 "; // 注帮领 $sql4 = "select count(*) as count from user where reg_time > '" . $time . "' and cell_phone>0 and common_status = 1 and rename_reward = 2 "; $sql5 = "select count(*) as count from user where reg_time > '" . $time . "' and cell_phone>0 and common_status = 1 and addpic_reward = 2 "; $sql6 = "select count(distinct uid) as count from bid where uid in (select uid from user where reg_time>'" . $time . " and cell_phone>0 and common_status = 1') "; // 领出价 $sql7 = "select count(*) as count from user where reg_time > '" . $time . "' and addpic_reward = 2 "; $sql8 = "select count(*) as count from user where reg_time > '" . $time . "' and rename_reward = 2 "; $sql9 = "select count(distinct uid) as count from bid where uid in (select uid from user where reg_time>'" . $time . "') "; // 领出价 $reg_data = FDB::fetch($sql); $reg_bind_data = FDB::fetch($sql2); $reg_bind_ling = FDB::fetch($sql3); $reg_b_l_rename = FDB::fetch($sql4); $reg_b_l_addpic = FDB::fetch($sql5); $reg_b_l_bid = FDB::fetch($sql6); $reg_rename = FDB::fetch($sql7); $reg_addpic = FDB::fetch($sql8); $reg_bid = FDB::fetch($sql9); $reg_b_l_name_num = $reg_b_l_rename[0]["count"]; $reg_b_l_num = $reg_bind_ling[0]["count"]; $reg_b_l_pic_num = $reg_b_l_addpic[0]["count"]; $reg_b_l_bid_num = $reg_b_l_bid[0]["count"]; echo "注册人数 :" . $reg_data[0]["count"] . " <br>"; echo "注册绑定人数 :" . $reg_bind_data[0]["count"] . " <br>"; echo "注册绑定领取礼包人数 :" . $reg_b_l_num . " <br>"; echo "注改昵称 :" . $reg_rename[0]["count"] . " <br>"; echo "注该头像 :" . $reg_addpic[0]["count"] . " <br>"; echo "注册出价 :" . $reg_bid[0]["count"] . " <br>"; echo "注绑领改昵称 :" . $reg_b_l_name_num . " ----- " . sprintf("%.2f", $reg_b_l_name_num * 100 / $reg_b_l_num) . "% <br>"; echo "注绑领改头像 :" . $reg_b_l_pic_num . " ----- " . sprintf("%.2f", $reg_b_l_pic_num * 100 / $reg_b_l_num) . "% <br>"; echo "注绑领出价 :" . $reg_b_l_bid[0]["count"] . " ----- " . sprintf("%.2f", $reg_b_l_bid_num * 100 / $reg_b_l_num) . "% <br>"; }
/** * 审核用户详情 */ function updateAction() { global $_F; $uid = FRequest::getInt("uid"); $user_detail_table = new FTable("user_main", "um"); $user = $user_detail_table->leftJoin("user_detail", "ud", "um.uid=ud.uid")->where(array("um.uid" => $uid))->select(); $user[0]["age"] = CommonUtil::birthdayToAge($user[0]["birthday"]); $interests = explode(",", $user[0]["interest"]); $this->assign("old_interests", $interests); $photo_table = new FTable("user_photo_album"); $photos = $photo_table->fields(array("pic", "albumid"))->where(array("uid" => $uid, "first_status" => 0))->select(); $photo_arr = $photos; $uid_d = $uid; $table2 = new FTable("image_md5", "im"); $image_md5 = $table2->fields(array("im.md5"))->where(array("im.url" => $user[0]["avatar"]))->find(); // echo($user["avatar"]); $table3 = new FTable("image_md5", "im"); $images = $table3->fields(array("im.url"))->where(array("im.md5" => $image_md5["md5"], "str" => " im.url<>'" . $user[0]["avatar"] . "' "))->select(); $i = 1; foreach ($images as $image) { $i++; $table4 = new FTable("user_detail", "ud"); $users4 = $table4->fields(array("ud.uid"))->where(array("ud.avatar" => $image['url']))->find(); if ($users4) { $uid_d = $uid_d . "," . $users4['uid']; } } $user[0]["uid_d"] = $uid_d; $user[0]["uid_i"] = $i; $user[0]["avatar"] = CommonUtil::getMoreSizeImg($user[0]["avatar"], 222, 222); $this->assign("user", $user[0]); $update_record = new FTable("update_record"); $updates = $update_record->fields(array("item"))->where(array("uid" => $uid, "status" => 0))->select(); //$update_arr = $updates; //$size = count($updates); $update_arr = array(); $j = 0; foreach ($updates as $update) { $update_arr[$j] = $update['item']; $j++; } //echo(json_encode($update_arr)); if (in_array("nickname", $update_arr)) { $nickname = "red"; } if (in_array("avatar", $update_arr)) { $avatar = "red"; } if (in_array("aboutme", $update_arr)) { $aboutme = "red"; } /* $photo_arr = array(); foreach($photos as $photo){ array_push($photo_arr,$photo["pic"]); }*/ //echo(count($photo_arr)); $this->assign("photos", $photo_arr); $this->assign("photos_num", count($photo_arr)); $this->assign("stars", self::$STARS); $this->assign("nickname", $nickname); $this->assign("avatar", $avatar); $this->assign("aboutme", $aboutme); $this->display('admin/y_user_update'); }