Exemple #1
0
 /**
  * 活动列表
  */
 function listAction()
 {
     //global $_F;
     // $_F["debug"] = true;
     $page = max(1, FRequest::getInt('page'));
     $title = FRequest::getString('title');
     $where = array();
     $shanchu_id = FRequest::getInt('shanchu_id');
     if ($shanchu_id) {
         $events = new FTable('events');
         $events->where(array('id' => $shanchu_id))->remove(true);
     }
     if ($title) {
         $where["title"] = array('like' => $title);
     }
     $table = new FTable("events");
     $events = $table->fields(array("id", "style", "title", "pic", "content", "tm"))->where($where)->page($page)->limit(20)->order(array("id" => "desc"))->select();
     foreach ($events as &$event) {
         $event["pic"] = CommonUtil::getMoreSizeImg($event["pic"], 100, 100);
         $event["content"] = json_decode($event["content"]);
     }
     $page_info = $table->getPagerInfo();
     $this->assign('page_info', $page_info);
     $this->assign('events', $events);
     $this->assign('title', $title);
     $this->display('admin/events_list');
 }
Exemple #2
0
 function listAction()
 {
     //global $_F;
     // $_F["debug"] = true;
     $page = max(1, FRequest::getInt('page'));
     $uid = FRequest::getInt('uid');
     $where = array('tp.status' => '1');
     if ($uid > 0) {
         $where["ud.uid"] = $uid;
     } else {
         $where["1"] = 0;
     }
     $table = new FTable("topic", "tp");
     $topics = $table->fields(array("tp.id", "tp.uid", "tp.title", "tp.pics", "ud.nickname", "tp.picslevel"))->leftJoin("user_detail", "ud", "tp.uid=ud.uid")->where($where)->page($page)->limit(20)->order(array("tp.id" => "desc"))->select();
     foreach ($topics as &$topic) {
         $topic_tupian = explode(",", $topic['pics']);
         $pics = "";
         foreach ($topic_tupian as $topic_pics) {
             if ($topic_pics) {
                 $pics = $pics . CommonUtil::getMoreSizeImg($topic_pics, 100, 100) . ",";
             }
         }
         $topic["pics"] = $pics;
         $discovery_table = new FTable("discovery", "mmd", FDB::$DB_MUMU_SORT);
         $discovery = $discovery_table->where(array('tid' => $topic["id"]))->find();
         $topic["priority"] = $discovery["priority"];
     }
     $page_info = $table->getPagerInfo();
     $this->assign('page_info', $page_info);
     $this->assign('topics', $topics);
     $this->assign('uid', $uid);
     $this->display('admin/user_topic_zhiding_list');
 }
Exemple #3
0
 function listAction()
 {
     //global $_F;
     //$_F["debug"] = true;
     $page = max(1, FRequest::getInt('page'));
     $uid = FRequest::getInt('uid');
     $nickname = FRequest::getString('nickname');
     $where = array('ub.count' => array('gte' => '1'), 'um.stat' => '0', 'ud.uid' => array('gte' => '5000000'));
     if ($uid > 0) {
         $where["ud.uid"] = $uid;
     }
     if ($nickname) {
         $where["ud.nickname"] = array('like' => $nickname);
     }
     $table = new FTable("user_ban", "ub");
     $users = $table->fields(array("um.uid", "um.stat", "um.gender", "um.reg_time", "ud.nickname", "ud.avatar", "ud.province", "ud.city", "ud.age", "ud.height", "ud.marry", "ud.aboutme", "ub.count"))->leftJoin("user_detail", "ud", "ub.uid=ud.uid")->leftJoin("user_main", "um", "ub.uid=um.uid")->where($where)->page($page)->limit(10)->order(array("ub.count" => "desc"))->select();
     foreach ($users as &$user) {
         $marry_id = $user["marry"];
         $user["marry"] = self::$MARRY[$marry_id];
         $user["avatar"] = CommonUtil::getMoreSizeImg($user["avatar"], 50, 50);
     }
     $page_info = $table->getPagerInfo();
     $this->assign('page_info', $page_info);
     $this->assign('users', $users);
     $this->assign('uid', $uid);
     $this->assign('nickname', $nickname);
     $this->display('admin/userreport_list');
 }
Exemple #4
0
 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');
 }
Exemple #5
0
 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');
 }
Exemple #6
0
 public function indexAction()
 {
     global $_F;
     //        $_F['debug'] = 1;
     $page = max(1, FRequest::getInt('page'));
     $spmT = new FTable('stats_spm');
     $spmList = $spmT->order(array('id' => 'desc'))->page($page)->limit(20)->select();
     $this->assign('page_info', $spmT->getPagerInfo());
     $this->assign('spmList', $spmList);
     $this->display('admin/spm-index');
 }
Exemple #7
0
 function listAction()
 {
     //global $_F;
     //$_F["debug"] = true;
     $page = max(1, FRequest::getInt('page'));
     $uid = FRequest::getInt('uid');
     $nickname = FRequest::getString('nickname');
     $gender = FRequest::getInt('gender');
     $where = array();
     if ($uid || $nickname) {
         if ($uid) {
             $where["ud.uid"] = $uid;
         }
         if ($nickname) {
             $where["ud.nickname"] = array('like' => $nickname);
         }
     } else {
         $where["um.stat"] = '0';
         $where["ud.avatarlevel"] = '-2';
         $where["ud.uid"] = array('gte' => '5000000');
     }
     if ($gender) {
         $where["um.gender"] = $gender;
     }
     $table = new FTable("user_detail", "ud");
     $users = $table->fields(array("ud.uid", "um.gender", "ud.nickname", "ud.avatar", "ud.avatarlevel"))->leftJoin("user_main", "um", "ud.uid=um.uid")->where($where)->page($page)->limit(50)->order(array("ud.uid" => "asc"))->select();
     foreach ($users as &$user) {
         $uid_d = $user["uid"];
         $table2 = new FTable("image_md5", "im");
         $image_md5 = $table2->fields(array("im.md5"))->where(array("im.url" => $user["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["avatar"] . "' ", "im.type" => "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["uid_d"] = $uid_d;
         $user["uid_i"] = $i;
         $user["avatar"] = CommonUtil::getMoreSizeImg($user["avatar"], 222, 222);
     }
     $page_info = $table->getPagerInfo();
     $this->assign('page_info', $page_info);
     $this->assign('users', $users);
     $this->assign('uid', $uid);
     $this->assign('nickname', $nickname);
     $this->assign('gender', $gender);
     $this->display('admin/user_avatar_list');
 }
Exemple #8
0
 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');
 }
Exemple #9
0
 function listAction()
 {
     //global $_F;
     //$_F["debug"] = true;
     $page = max(1, FRequest::getInt('page'));
     $table = new FTable("top_menus", "tm");
     $top_menus = $table->fields(array("tm.id", "tm.name", "tm.menu"))->page($page)->limit(20)->order(array("tm.id" => "asc"))->select();
     $page_info = $table->getPagerInfo();
     $this->assign('page_info', $page_info);
     $this->assign("top_menus", $top_menus);
     $this->display('admin/top_menus_list');
 }
Exemple #10
0
 function list2Action()
 {
     //global $_F;
     //$_F["debug"] = true;
     $page = max(1, FRequest::getInt('page'));
     $uid = FRequest::getInt('uid');
     $nickname = FRequest::getString('nickname');
     $gender = FRequest::getInt('gender');
     $where = array();
     $query_str = " im.status = '1' ";
     $table = new FTable("image_md5", "im");
     $images = $table->fields(array("im.url", "im.status", "im.type"))->where(array('str' => $query_str))->page($page)->limit(50)->order(array("im.tm" => "asc"))->select();
     foreach ($images as &$image) {
         //头像
         if ($image['type'] == "avatar") {
             $table2 = new FTable("user_detail", "ud");
             $users = $table2->fields(array("ud.uid"))->where(array("ud.avatar" => $image['url']))->find();
             $image["uid"] = $users['uid'];
             $image["type_w"] = "头像";
         }
         //大头像
         if ($image['type'] == "avatar_big") {
             $image["type_w"] = "大头像";
         }
         //相册
         if ($image['type'] == "photo") {
             $table2 = new FTable("user_photo_album", "upa");
             $users = $table2->fields(array("upa.uid"))->where(array("upa.pic" => $image['url']))->find();
             $image["uid"] = $users['uid'];
             $image["type_w"] = "相册";
         }
         //聊天
         if ($image['type'] == "chat") {
             $table2 = new FTable("bad_message", "bm", FDB::$DB_MUMU_MESSAGE);
             $users = $table2->fields(array("bm.from"))->where(array("bm.origin" => $image['url']))->find();
             $image["uid"] = $users['from'];
             $image["type_w"] = "聊天";
         }
         //视屏认证
         if ($image['type'] == "video_certify") {
             $table2 = new FTable("video_record", "vr");
             $users = $table2->fields(array("vr.uid"))->where(array("vr.video_img" => $image['url']))->find();
             $image["uid"] = $users['uid'];
             $image["type_w"] = "视屏认证";
         }
         $image["url_xiao"] = CommonUtil::getMoreSizeImg($image["url"], 111, 111);
     }
     $page_info = $table->getPagerInfo();
     $this->assign('page_info', $page_info);
     $this->assign('images', $images);
     $this->display('admin/user_image_list2');
 }
Exemple #11
0
 public function appListAction()
 {
     $page = max(1, FRequest::getInt('page'));
     $table = new FTable("app_version_config");
     $app_data = $table->order(array("ver" => "desc"))->page($page)->limit(5)->select();
     foreach ($app_data as &$app) {
         $summary_arr = explode("\n", $app["summary"]);
         $app["summary"] = $summary_arr;
     }
     $page_info = $table->getPagerInfo();
     $this->assign("page_info", $page_info);
     $this->assign("app_version", $app_data);
     $this->display("app_version");
 }
Exemple #12
0
 function listAction()
 {
     //global $_F;
     // $_F["debug"] = true;
     $page = max(1, FRequest::getInt('page'));
     $uid = FRequest::getInt('uid');
     $tiaojian = FRequest::getString('tiaojian');
     $where = array('tp.picslevel' => array('gte' => '3'), 'tp.uid' => array('gte' => '5000000'), 'tp.status' => '1');
     if ($uid > 0) {
         $where["tp.uid"] = $uid;
     }
     $datetime_riqi = date("Y-m-d", time());
     $datetime_riqi_zuotian = date("Y-m-d", time() - 86400);
     $datetime_riqi_qiantian = date("Y-m-d", time() - 172800);
     if ($tiaojian == "dangri") {
         $query_str = " tp.tm >= '" . $datetime_riqi . " 00:00:00'  ";
         $where["str"] = $query_str;
     }
     if ($tiaojian == "zuori") {
         $query_str = " tp.tm >= '" . $datetime_riqi_zuotian . " 00:00:00'  and tp.tm < '" . $datetime_riqi . " 00:00:00'  ";
         $where["str"] = $query_str;
     }
     if ($tiaojian == "qianri") {
         $query_str = " tp.tm >= '" . $datetime_riqi_qiantian . " 00:00:00'  and tp.tm < '" . $datetime_riqi_zuotian . " 00:00:00'  ";
         $where["str"] = $query_str;
     }
     if ($tiaojian == "fengsuo") {
         $where["tp.status"] = '2';
     } else {
         $where["tp.status"] = '1';
     }
     $table = new FTable("topic", "tp");
     $topics = $table->fields(array("tp.id", "tp.uid", "tp.status", "um.gender", "tp.title", "tp.pics", "tp.tm", "ud.nickname", "ud.province", "ud.city", "tp.picslevel"))->leftJoin("user_detail", "ud", "tp.uid=ud.uid")->leftJoin("user_main", "um", "tp.uid=um.uid")->where($where)->page($page)->limit(20)->order(array("tp.id" => "desc"))->select();
     foreach ($topics as &$topic) {
         $topic_tupian = explode(",", $topic['pics']);
         $pics = "";
         foreach ($topic_tupian as $topic_pics) {
             if ($topic_pics) {
                 $pics = $pics . CommonUtil::getMoreSizeImg($topic_pics, 100, 100) . ",";
             }
         }
         $topic["pics"] = $pics;
     }
     $page_info = $table->getPagerInfo();
     $this->assign('page_info', $page_info);
     $this->assign('topics', $topics);
     $this->display('admin/user_topicpics_list');
 }
Exemple #13
0
 function listAction()
 {
     //global $_F;
     //$_F["debug"] = true;
     $page = max(1, FRequest::getInt('page'));
     $topid = FRequest::getInt("topid");
     $top_menus = new FTable("top_menus");
     $top_menus_menu = $top_menus->fields(array("menu", "name"))->where(array("id" => $topid))->find();
     $table = new FTable("left_menus", "fm");
     $left_menus = $table->fields(array("fm.id", "fm.name", "fm.menu", "fm.url"))->where(array("top_menus_id" => $topid))->page($page)->limit(20)->order(array("fm.id" => "asc"))->select();
     $page_info = $table->getPagerInfo();
     $this->assign('page_info', $page_info);
     $this->assign("left_menus", $left_menus);
     $this->assign("topid", $topid);
     $this->assign("top_menus_menu", $top_menus_menu);
     $this->display('admin/left_menus_list');
 }
Exemple #14
0
 function listAction()
 {
     global $_F;
     //$_F["debug"] = true;
     $admin_uid = FSession::get('manager_uid');
     $uid = FRequest::getInt("uid");
     $page = max(1, FRequest::getInt('page'));
     $user_table = new FTable("user_detail");
     $user_nickname = $user_table->fields(array("nickname"))->where(array("uid" => $uid))->find();
     $where = array('uadd.uid' => $uid);
     $table = new FTable("user_address", "uadd");
     $useradds = $table->fields(array("uadd.uid", "uadd.addrid", "uadd.phone", "uadd.province", "uadd.city", "uadd.address", "uadd.username"))->where($where)->page($page)->limit(20)->order(array("uadd.addrid" => "desc"))->select();
     $page_info = $table->getPagerInfo();
     $this->assign('page_info', $page_info);
     $this->assign("useradds", $useradds);
     $this->assign("uid", $uid);
     $this->assign("user_nickname", $user_nickname['nickname']);
     $this->display('admin/y_user_address_list');
 }
Exemple #15
0
 /**
  * 列表
  */
 function listAction()
 {
     // global $_F;
     // $_F["debug"] = true;
     $page = max(1, FRequest::getInt('page'));
     $where = array();
     $shanchu_id = FRequest::getInt('shanchu_id');
     if ($shanchu_id) {
         $mumu_bas = new FTable('mumu_ba');
         $mumu_bas->where(array('id' => $shanchu_id))->remove(true);
     }
     $table = new FTable("mumu_ba");
     $mumu_bas = $table->fields(array("id", "title", "text", "pic", "riqi", "position"))->where($where)->page($page)->limit(20)->order(array("id" => "desc"))->select();
     foreach ($mumu_bas as &$mumu_ba) {
         $mumu_ba["pic"] = CommonUtil::getMoreSizeImg($mumu_ba["pic"], 100, 100);
     }
     $page_info = $table->getPagerInfo();
     $this->assign('page_info', $page_info);
     $this->assign('mumu_ba', $mumu_bas);
     $this->display('admin/mumu_ba_list');
 }
Exemple #16
0
 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"] = 0;
     }
     $table = new FTable("video_record", "vr");
     $users = $table->fields(array("vr.uid", "vr.id", "vr.photos", "vr.status", "vr.tm", "ud.video_img", "ud.nickname", "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');
 }
Exemple #17
0
 function listAction()
 {
     $uid = FRequest::getInt("uid");
     $page = max(1, FRequest::getInt('page'));
     $shen = FRequest::getInt("shen");
     $where = array();
     //$where["vu.status2"] = -2;
     $where["vu.flag"] = 0;
     if ($uid > 0) {
         $where["vu.uid"] = $uid;
     }
     $table = new FTable("verify_user", "vu");
     $users = $table->fields(array("vu.id", "vu.status", "vu.reason", "um.uid", "um.gender", "um.reg_time", "ud.nickname", "ud.avatar", "ud.province", "ud.city", "ud.age", "ud.height", "ud.marry", "ud.aboutme"))->leftJoin("user_main", "um", "vu.uid=um.uid")->leftJoin("user_detail", "ud", "um.uid=ud.uid")->where($where)->page($page)->limit(20)->order(array("um.uid" => "desc"))->select();
     if ($shen == 1) {
         header("Location: /admin/YUser2/update?uid=" . $users[0]["uid"]);
         exit;
     }
     $page_info = $table->getPagerInfo();
     $this->assign('page_info', $page_info);
     $this->assign("users", $users);
     $this->assign("uid", $uid);
     $this->display('admin/y_user2_list');
 }
Exemple #18
0
 /**
  * 添加地址
  */
 function listAction()
 {
     //global $_F;
     // $_F["debug"] = true;
     $page = max(1, FRequest::getInt('page'));
     $type = CommonUtil::getDefStr(FRequest::getString('type'), "main");
     $this->assign('type', $type);
     $where = array();
     $shanchu_id = FRequest::getInt('shanchu_id');
     if ($shanchu_id) {
         $focus = new FTable('focus');
         $focus->where(array('id' => $shanchu_id))->remove(true);
     }
     $xiaxian_id = FRequest::getInt('xiaxian_id');
     if ($xiaxian_id) {
         $events_table = new FTable("focus");
         $events_table->where(array("id" => $xiaxian_id))->update(array("status" => 0));
     }
     $shangxian_id = FRequest::getInt('shangxian_id');
     if ($shangxian_id) {
         $events_table = new FTable("focus");
         $events_table->where(array("id" => $shangxian_id))->update(array("status" => 1));
     }
     if ($type) {
         $where['type'] = $type;
     }
     $table = new FTable("focus");
     $focus = $table->fields(array("id", "type", "text", "pic", "action", "position", "status"))->where($where)->page($page)->limit(20)->order(array("position" => "asc", "id" => "desc"))->select();
     foreach ($focus as &$focu) {
         $focu["pic"] = CommonUtil::getMoreSizeImg($focu["pic"], 100, 100);
         $focu["action"] = json_decode($focu["action"]);
     }
     $page_info = $table->getPagerInfo();
     $this->assign('page_info', $page_info);
     $this->assign('focus', $focus);
     $this->display('admin/focus_list');
 }
Exemple #19
0
 /**
  * 添加地址
  */
 function listAction()
 {
     //global $_F;
     // $_F["debug"] = true;
     $page = max(1, FRequest::getInt('page'));
     $text = FRequest::getString('text');
     $where = array();
     $shanchu_id = FRequest::getInt('shanchu_id');
     if ($shanchu_id) {
         $guanwang_newss = new FTable('guanwang_news');
         $guanwang_newss->where(array('id' => $shanchu_id))->remove(true);
     }
     $table = new FTable("guanwang_news");
     $guanwang_newss = $table->fields(array("id", "title", "text", "riqi"))->where($where)->page($page)->limit(20)->order(array("id" => "desc"))->select();
     foreach ($guanwang_newss as &$guanwang_news) {
         $query = explode("-", $guanwang_news['riqi']);
         $guanwang_news["yue"] = self::NumChinese(intval($query[1]));
         $guanwang_news["ri"] = $query[2];
     }
     $page_info = $table->getPagerInfo();
     $this->assign('page_info', $page_info);
     $this->assign('guanwang_news', $guanwang_newss);
     $this->display('admin/guanwang_news_list');
 }
Exemple #20
0
 function list2Action()
 {
     $uid = FRequest::getInt("uid");
     $page = max(1, FRequest::getInt('page'));
     $gender = FRequest::getInt('gender');
     $province = FRequest::getString('province');
     $city = FRequest::getString('city');
     $this->assign("province", $province);
     $this->assign("city", $city);
     $where = array();
     if ($uid > 0) {
         $where["um.uid"] = $uid;
     } else {
         $query_str = " ur.item <> 'all'  ";
         $where["ur.status"] = 0;
         $query_str = $query_str . " and ur.uid >= '5000000'  ";
         if ($city == "长沙") {
             $where["ud.city"] = $city;
         }
         if ($city == "北京") {
             $where["ud.city"] = $city;
         }
         if ($city == "非长沙") {
             $query_str = $query_str . " and ud.city<>'长沙'";
         }
         $where["str"] = $query_str;
     }
     if ($gender) {
         $where["um.gender"] = $gender;
     }
     if ($uid > 0) {
         $table = new FTable("user_main", "um");
         $users = $table->fields(array("um.uid", "um.gender", "um.reg_time", "ud.nickname", "ud.avatar", "ud.province", "ud.city", "ud.age", "ud.height", "ud.marry", "ud.aboutme", "ud.workarea", "ud.job", "ud.interest", "ud.birthday", "ud.workplaceid"))->leftJoin("user_detail", "ud", "um.uid=ud.uid")->where($where)->page($page)->limit(20)->select();
     } else {
         $table = new FTable("update_record", "ur");
         $users = $table->fields(array("um.uid", "um.gender", "um.reg_time", "ud.nickname", "ud.avatar", "ud.province", "ud.city", "ud.age", "ud.height", "ud.marry", "ud.aboutme", "ud.workarea", "ud.job", "ud.interest", "ud.birthday", "ud.workplaceid"))->leftJoin("user_main", "um", "ur.uid=um.uid")->leftJoin("user_detail", "ud", "um.uid=ud.uid")->where($where)->page($page)->limit(20)->groupBy("ur.uid")->order(array("ur.id" => "asc"))->select();
         $table = new FTable("update_record", "ur");
         $user_messages2 = $table->fields(array("um.uid"))->leftJoin("user_main", "um", "ur.uid=um.uid")->leftJoin("user_detail", "ud", "um.uid=ud.uid")->where($where)->groupBy("ur.uid")->select();
         $total = count($user_messages2);
     }
     foreach ($users as &$user) {
         //$user["avatar"] = CommonUtil::getMoreSizeImg($user["avatar"],200,200);
         $user["age"] = CommonUtil::birthdayToAge($user["birthday"]);
         $dynamics = new FTable("dynamics");
         $dynamic = $dynamics->fields(array("count(*) as count"))->where(array("uid" => $user["uid"], "str" => " status in (2,3,4) "))->select();
         $user["dynamics"] = $dynamic[0]['count'];
         $photo_table = new FTable("user_photo_album");
         $photos_o = $photo_table->fields(array("pic", "albumid"))->where(array("uid" => $user["uid"], "str" => " pic <> '" . $user["avatar"] . "'"))->select();
         $photos = array();
         foreach ($photos_o as &$p) {
             $p["pic"] = CommonUtil::getMoreSizeImg($p["pic"], 150, 150);
             array_push($photos, $p);
         }
         $user["photo_arr"] = $photos;
         $update_record = new FTable("update_record");
         $updates = $update_record->fields(array("item"))->where(array("uid" => $user["uid"], "status" => 0))->select();
         $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)) {
             $user["nicknamecss"] = "red";
         }
         if (in_array("avatar", $update_arr)) {
             $user["avatarcss"] = "red";
         }
         if (in_array("aboutme", $update_arr)) {
             $user["aboutmecss"] = "red";
         }
         $uid_d = $user["uid"];
         $table2 = new FTable("image_md5", "im");
         $image_md5 = $table2->fields(array("im.md5"))->where(array("im.url" => $user["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["avatar"] . "' "))->select();
         $i = 1;
         foreach ($images as $image) {
             $table4 = new FTable("user_detail", "ud");
             $users4 = $table4->fields(array("ud.uid"))->where(array("ud.avatar" => $image['url']))->find();
             if ($users4) {
                 $i++;
                 $uid_d = $uid_d . "," . $users4['uid'];
             }
         }
         $user["avatar"] = CommonUtil::getMoreSizeImg($user["avatar"], 150, 150);
         $user["uid_d"] = $uid_d;
         $user["uid_i"] = $i;
     }
     if ($uid > 0) {
         $page_info = $table->getPagerInfo();
     } else {
         $page_info = FPager::getPagerInfo($total, $page, 20);
     }
     $this->assign('page_info', $page_info);
     $this->assign("users", $users);
     $this->assign("uid", $uid);
     $this->assign('gender', $gender);
     $this->display('admin/y_user_list2');
 }
Exemple #21
0
 function levelAction()
 {
     $page = max(1, FRequest::getInt('page'));
     $uid = FRequest::getInt('uid');
     $where = array();
     if ($uid) {
         $where["usl.uid"] = $uid;
     }
     $table = new FTable("user_star_level", "usl");
     $user_messages = $table->fields(array("usl.uid", "usl.level", "um.gender", "ud.nickname", "ud.avatar"))->leftJoin("user_main", "um", "um.uid=usl.uid")->leftJoin("user_detail", "ud", "ud.uid=usl.uid")->where($where)->page($page)->limit(20)->order(array("usl.tm" => "desc"))->select();
     foreach ($user_messages as &$user_message) {
         $user_message['avatar'] = CommonUtil::getMoreSizeImg($user_message['avatar'], 222, 222);
         $photo_table = new FTable("user_photo_album");
         $photos = $photo_table->fields(array("pic"))->where(array("uid" => $user_message['uid']))->limit(3)->select();
         $photo_arr = array();
         foreach ($photos as $photo) {
             array_push($photo_arr, CommonUtil::getMoreSizeImg($photo["pic"], 222, 222));
         }
         $user_message['photo_arr'] = $photo_arr;
     }
     $page_info = $table->getPagerInfo();
     $this->assign('page_info', $page_info);
     $this->assign('users', $user_messages);
     $this->display('admin/user_xingji_level_list');
 }
Exemple #22
0
 function awardAction()
 {
     //global $_F;
     //$_F["debug"] = true;
     $page = max(1, FRequest::getInt('page'));
     $status = FRequest::getInt('status');
     $type = FRequest::getInt('type');
     $where = array();
     if ($status >= 0) {
         $where["ar.status"] = $status;
     }
     if ($type >= 0) {
         $where["ac.type"] = $type;
     } else {
         $where["ac.type"] = array('in' => "2,3,4");
     }
     $table = new FTable("award_record", "ar");
     $award_record = $table->fields(array("ud.uid", "ud.nickname", "ar.id", "ar.tm", "ar.oper_tm", "ar.status", "ar.charge_phone", "ar.log_id", "ac.name", "ac.type"))->leftJoin("user_detail", "ud", "ud.uid=ar.uid")->leftJoin("award_config", "ac", "ac.id=ar.award_id")->where($where)->page($page)->limit(10)->order(array("ar.id" => "desc"))->select();
     $page_info = $table->getPagerInfo();
     $this->assign('page_info', $page_info);
     $this->assign('award_record', $award_record);
     $this->assign('status', $status);
     $this->assign('type', $type);
     $this->display('admin/user_list_award');
 }