public function member() { $utype = C('XMEMBER_TYPE'); $area = get_Area_list(); $uid = intval($_GET['id']); $vo = M('members m')->field("m.user_email,m.customer_name,m.user_phone,m.id,m.credits,m.is_ban,m.user_type,m.user_name,m.integral,m.active_integral,mi.*,mm.*,mb.*")->join("{$this->pre}member_info mi ON mi.uid=m.id")->join("{$this->pre}member_money mm ON mm.uid=m.id")->join("{$this->pre}member_banks mb ON mb.uid=m.id")->where("m.id={$uid}")->find(); $vo['province'] = $area[$vo['province']]; $vo['city'] = $area[$vo['city']]; $vo['area'] = $area[$vo['area']]; $vo['province_now'] = $area[$vo['province_now']]; $vo['city_now'] = $area[$vo['city_now']]; $vo['area_now'] = $area[$vo['area_now']]; $vo['is_ban'] = $vo['is_ban'] == 0 ? "未冻结" : "<span style='color:red'>已冻结</span>"; $vo['user_type'] = $utype[$vo['user_type']]; //$vo['money_collect'] = M('investor_detail')->where(" investor_uid={$uid} AND status =7 ")->sum("capital+interest-interest_fee"); //$vo['money_need'] = M('investor_detail')->where(" borrow_uid={$uid} AND status in(4,7) ")->sum("capital+interest"); //$vo['money_all'] = $vo['account_money'] + $vo['money_freeze'] + $vo['money_collect'] - $vo['money_need']; $this->assign("capitalinfo", getMemberBorrowScan($uid)); $this->assign("wc", getUserWC($uid)); $this->assign("credit", getCredit($uid)); $this->assign("vo", $vo); $this->assign("user", $vo['user_name']); //*******2013-11-23************* $minfo = getMinfo($uid, true); $this->assign("minfo", $minfo); $this->assign('benefit', get_personal_benefit($uid)); //收益相关 $this->assign('out', get_personal_out($uid)); //支出相关 $this->assign('pcount', get_personal_count($uid)); $this->display(); }
public function index() { $user = $this->api->user_getInfo($this->uid, 'name,active,sex'); //用户检查 $this->__checkUser($user); //黑名单 $black = $this->api->privacy_black($this->mid, $this->uid); if ($black) { $this->redirect("black"); } //空间主人的好友 $fuids = $this->__showUserFriends($this->uid); //访客记录 if ($this->__footPrivacy($this->uid, $this->mid, $fuids)) { D("Visitor")->foot($this->uid, $this->mid, $this->my_name); } //用户信息 $userInfo = $this->__getUserInfo($this->mid, $this->uid); $this->assign("userInfo", $userInfo); //应用的计数 $apps_num = $this->api->space_getCount($this->uid); $this->assign("apps_num", $apps_num); //自动判断他,她还是我 $show_sex = $this->__getUserSex($this->mid, $this->uid, $user); $this->assign('show_sex', $show_sex); //这个空间的主人是否对你设置隐藏了 $privacyInfo = $this->__checkPrivacy($this->mid, $this->uid); $credit = getCredit($this->uid, $this->api); $rank = getUserRank($this->uid); $this->assign('rank', $rank); $this->assign('credit', $credit); //判断和主人是否是好友 if ($this->mid != $this->uid) { setScore($this->uid, 'user_visited'); setScore($this->mid, 'visit_space'); $this->__spaceNotFrends($fuids); } //将留言板新条数设置为空 if ($this->uid == $this->mid) { $this->__spaceAreFrends(); } // if(!($privacyInfo['the_mini']['content'] == '什么都没做' || empty($privacyInfo))){ // $title = $user['name'].'的个人空间'.':'.$privacyInfo['the_mini']['content']; // }else{ // $title = $user['name'].'的个人空间'; // } $title = $user['name'] . '的个人空间'; $this->setTitle($title); $this->display(); }
/** * 礼物中心 * */ function index() { //获取分组好的礼物列表 $giftList = $this->gift_category->GiftToCategory(); //获取当前用户的积分 $money = getCredit($this->mid, $this->api); $moneyType = getC('creditName'); $this->assign('money', $money[$moneyType]); //把用户姓名和头像赋值给模板 $this->__assignNameAndFace(intval($_GET['uid'])); //赋值给模板 $this->assign('categorys', $giftList); $this->display(); }
public function userInfo() { $uid = $_GET['uid']; $out['rank'] = getUserRank($uid); $out['credit'] = getCredit($uid, $this->api); $user = $this->api->user_getInfo($uid, 'name,id,cTime'); $user['mini'] = $this->__getOneMini($uid); $userSearch = D('UserSearch'); $user['friends'] = $this->api->friend_areFriends($uid, $this->mid); $data = $userSearch->getGroupInfo($this->mid, $this->uid); $login = $this->api->LoginRecord_getUserLogin($uid); $user['login_time'] = $login['login_time']; $this->assign($data); $this->assign($out); $this->assign('user', $user); $this->display('userinfo'); }
* =========================================== */ include "init.inc.php"; $data = array(); $now = time(); $act = ""; if (isset($_GET['act'])) { $act = form_input($_GET['act']); } if ($act == "publish") { //动态发布成功,奖励积分 $uid = form_input($_POST['fromuid']); //发布人uid if (isUserExist($uid)) { addCredit($uid, "publishblog"); $credit = getCredit("publishblog"); throwJSON(array("status" => "ok", "code" => 200, "msg" => "发布动态,奖励信用,威望,贡献", "credit" => $credit)); } else { throwJSON(array("status" => "error", "code" => 300, "msg" => "uid不存在")); } } else { if ($act == "add") { //发布日志 $uid = form_input($_POST['fromuid']); //发布人uid if (isNull($uid)) { $result = array("status" => "error", "code" => 301, "msg" => "fromuid field requird"); throwJSON($result); exit; } $username = get_username($uid);
$data = array("status" => "ok", "info" => "帖子删除失败"); } } else { if ($act == "qcost") { //查询发布活动按你请我请AA扣出不同的信用值 $type = form_input($_GET['type']); if ($type < 0) { //我请客 $credit = getCredit("activity_0"); } else { if ($type > 0) { //AA $credit = getCredit("activity_1"); } else { //求请客 $credit = getCredit("activity_2"); } } $data = array("status" => "ok", "code" => 200, "msg" => "查询成功", "credit" => $credit); } else { $data = array("status" => "error", "info" => "no such module to handle this."); } } } } } } throwJSON($data); /** * 根据用户id获取用户名称 * @param [type] $uid [description]
//Aes加密解密算法 include "aes/Aes.class.php"; include "aes/AesCtr.class.php"; define("KEY_SECRET", "www.51fabu.com"); $data = array(); $now = time(); $act = "list"; if ($_GET['act']) { $act = $_GET["act"]; } if ($act == "sign") { //签到 $uid = form_input($_POST['fromuid']); if (isUserExist($uid)) { addCredit($uid, "daylogin"); $credit = getCredit("daylogin"); throwJSON(array("status" => "ok", "code" => 200, "msg" => "sign success", "credit" => $credit)); exit; } else { throwJSON(array("status" => "error", "code" => 301, "msg" => "uid no exist.")); exit; } } else { if ($act == "view") { //查看别人的资料 http://51fabu.bj-soft.cn/mobile/profile.php?act=view&fromuid=1&touid=1 $fuid = htmlspecialchars($_GET["fromuid"]); //来自谁 $tuid = htmlspecialchars($_GET["touid"]); //要查看谁的资料 $sql = "select regdate from disc_common_member where uid='{$tuid}'"; $res0 = $db->Execute($sql);
echo $info_value; ?> </td> </tr> <?php } //成绩信息 preg_match_all('/<table width="90%" class="table" [^>]*>([\\s\\S]*?)<\\/table>/', $contents, $grade_table); //用正则表达式将课表的表格取出 // print_r($table); ?> </table> <hr> <div style="width:100%;" align="center"> <h4>必修课程</h4> <h5>备注:《课程名称》是红颜色的表示不及格 《修读学年学期》是空白的表示没选过这门课</h5> </div> <?php getTable($grade_table[0][0]); ?> <hr> <div style="width:100%;" align="center"> <h4>已选修课程</h4> </div> <?php getTable($grade_table[0][1]); //数据信息 preg_match_all('/<table width="90%" border="0" [^>]*>([\\s\\S]*?)<\\/table>/', $contents, $data_table); //用正则表达式将课表的表格取出 getCredit($data_table);