} elseif ($isreply == 2) { $isreply = 0; $wheresql .= " AND temp.isreply={$isreply}"; } } $where = " WHERE " . $wheresql . " AND temp.atdeptuid IN (" . $dept_uids . ")"; $mpurl = "plugin.php?pluginid=complain&type=complains&uid={$uid}&uname={$uname}&message={$message}&atuname={$atuname}"; //echo $where;exit(); $count = $_SGLOBAL['db']->result($_SGLOBAL['db']->query("SELECT COUNT(DISTINCT doid,atdeptuid) FROM " . tname('complain') . " temp" . $where), 0); //echo $count;exit(); if ($count) { include S_ROOT . './data/powerlevel/powerlevel.php'; $query = $_SGLOBAL['db']->query("SELECT * FROM (SELECT * FROM " . tname('complain') . " USE INDEX(id) ORDER BY id DESC) temp" . $where . " GROUP BY doid,atdeptuid ORDER BY doid DESC LIMIT {$start},{$perpage}"); while ($value = $_SGLOBAL['db']->fetch_array($query)) { $value['addtime'] = date("Y-m-d H:i", $value['addtime']); realname_set($value['uid'], $value['uname']); $value['atuname'] = $_POWERINFO[$value['atuid']]['department']; $Complains[] = $value; } $multi = multi($count, $perpage, $page, $mpurl); realname_get(); } } else { $tab = 0; $complains = array(); $totalNum = 0; $isreplyNum = 0; $firstday = date("Y-m-01", time()); $nowday = date("Y-m-d"); $startDay = $_GET['starttime'] ? trim($_GET['starttime']) : $firstday; $endDay = $_GET['endtime'] ? trim($_GET['endtime']) : $nowday;
$count = $_SGLOBAL['db']->result($_SGLOBAL['db']->query($sql),0); } if($count){ if($needquery) { $sql = "SELECT e.* FROM $fromsql $joinsql WHERE ".implode(" AND ", $wherearr) ." ORDER BY $orderby LIMIT $start, $perpage"; } $query = $_SGLOBAL['db']->query($sql); while($event = $_SGLOBAL['db']->fetch_array($query)){ if($event['poster']){ $event['pic'] = pic_get($event['poster'], $event['thumb'], $event['remote']); } else { $event['pic'] = $_SGLOBAL['eventclass'][$event['classid']]['poster']; } realname_set($event['uid'], $event['username']); if($view=="friend"){ realname_set($event['fuid'], $event['fusername']); $fevents[$event['eventid']][] = array("fuid"=>$event['fuid'], "fusername"=>$event['fusername'], "status"=>$event['status']); } $eventlist[$event['eventid']] = $event; } } realname_get(); $multi = multi($count, $perpage, $page, $theurl); $menu = array($view => ' class="active"'); $_TPL['css'] = 'event'; include template("space_event_list"); }
} $password = $value[2]; //同步获取用户源 if (!($passport = getpassport($username, $password))) { showmessage('login_failure_please_re_login', 'do.php?ac=' . $_SCONFIG['login_action']); } $setarr = array('uid' => $passport['uid'], 'username' => addslashes($passport['username']), 'password' => md5("{$passport['uid']}|{$_SGLOBAL['timestamp']}")); include_once S_ROOT . './source/function_space.php'; //开通空间 $query = $_SGLOBAL['db']->query("SELECT * FROM " . tname('space') . " WHERE uid='{$setarr['uid']}'"); if (!($space = $_SGLOBAL['db']->fetch_array($query))) { $space = space_open($setarr['uid'], $setarr['username'], 0, $passport['email']); } $_SGLOBAL['member'] = $space; //实名 realname_set($space['uid'], $space['username'], $space['name'], $space['namestatus']); //检索当前用户 $query = $_SGLOBAL['db']->query("SELECT password FROM " . tname('member') . " WHERE uid='{$setarr['uid']}'"); if ($value = $_SGLOBAL['db']->fetch_array($query)) { $setarr['password'] = addslashes($value['password']); } else { //更新本地用户库 inserttable('member', $setarr, 0, true); } //清理在线session insertsession($setarr); //同步登录 if ($_SCONFIG['uc_status']) { include_once S_ROOT . './uc_client/client.php'; $ucsynlogin = uc_user_synlogin($setarr['uid']); } else {
updatetable('notification', array('new' => '0'), array('new' => '1', 'uid' => $_SGLOBAL['supe_uid'])); updatetable('space', array('notenum' => 0), array('uid' => $_SGLOBAL['supe_uid'])); $space['notenum'] = 0; } //通知类型 $noticetypes = array('wall' => lang('wall'), 'piccomment' => lang('pic_comment'), 'blogcomment' => lang('blog_comment'), 'clickblog' => lang('clickblog'), 'clickpic' => lang('clickpic'), 'clickthread' => lang('clickthread'), 'sharecomment' => lang('share_comment'), 'sharenotice' => lang('share_notice'), 'doing' => lang('doing_comment'), 'friend' => lang('friend_notice'), 'post' => lang('thread_comment'), 'credit' => lang('credit'), 'mtag' => lang('mtag'), 'event' => lang('event'), 'eventcomment' => lang('event_comment'), 'eventmember' => lang('event_member'), 'eventmemberstatus' => lang('event_memberstatus'), 'poll' => lang('poll'), 'pollcomment' => lang('poll_comment'), 'pollinvite' => lang('poll_invite'), 'clickbwzt' => lang('clickbwzt'), 'bwztcomment' => lang('bwzt_comment')); $type = trim($_GET['type']); $typesql = $type ? "AND type='{$type}'" : ''; $newids = array(); $count = $_SGLOBAL['db']->result($_SGLOBAL['db']->query("SELECT COUNT(*) FROM " . tname('notification') . " WHERE uid='{$_SGLOBAL['supe_uid']}' {$typesql}"), 0); if ($count) { //$query = $_SGLOBAL['db']->query("SELECT * FROM ".tname('notification')." WHERE uid='$_SGLOBAL[supe_uid]' $typesql ORDER BY dateline DESC LIMIT $start,$perpage"); $query = $_SGLOBAL['db']->query("SELECT s.name,n.* FROM " . tname('notification') . " n LEFT JOIN " . tname('space') . " s ON s.uid=n.authorid WHERE n.uid='{$_SGLOBAL['supe_uid']}' {$typesql} ORDER BY n.dateline DESC LIMIT {$start},{$perpage}"); while ($value = $_SGLOBAL['db']->fetch_array($query)) { if ($value['authorid']) { realname_set($value['authorid'], $value['author']); if ($value['authorid'] != $space['uid'] && $space['friends'] && !in_array($value['authorid'], $space['friends'])) { $value['isfriend'] = 0; } else { $value['isfriend'] = 1; } } if ($value['new']) { $newids[] = $value['id']; $value['style'] = 'color:#000;font-weight:bold;'; } else { $value['style'] = ''; } preg_match_all('/<a\\s+href[^\\"]+\\"([^\\"]+do\\=(\\w+)[^\\"]+id\\=(\\d+)[^\\"]+cid\\=(\\d+))\\"[^>]*>.*<\\/a>/i', $value['note'], $matches); $value['link'] = $matches[1][0]; $n_do = $matches[2][0];
showmessage('mtag_join_field_error', '', 1, array($field['title'], $maxinputnum)); } } //加入群组 $setarr = array( 'tagid' => $tagid, 'uid' => $_SGLOBAL['supe_uid'], 'username' => $_SGLOBAL['supe_username'] ); $_SGLOBAL['db']->query("UPDATE ".tname('mtag')." SET membernum=membernum+1 WHERE tagid='$tagid'"); inserttable('tagspace', $setarr, 0, true); //事件通知 //实名 realname_set($invite['fromuid'], $invite['fromusername']); realname_get(); if(ckprivacy('mtag', 1)) { $fs = array(); $fs['icon'] = 'mtag'; $fs['title_template'] = cplang('feed_mtag_join_invite'); $fs['title_data'] = array( 'mtag' => "<a href=\"space.php?do=mtag&tagid=$tagid\">$mtag[tagname]</a>", 'field' => "<a href=\"space.php?do=mtag&id=$mtag[fieldid]\">$mtag[title]</a>", 'fromusername' => "<a href=\"space.php?uid=$invite[fromuid]\">{$_SN[$invite['fromuid']]}</a>" ); $fs['body_template'] = ''; $fs['body_data'] = array(); $fs['body_general'] = '';
$start = ($page - 1) * $perpage; $result = array(); $space = getspace($userid, 'uid'); //$DBstarttime = time(); if ($space[feedfriend]) { $wheresql = "uid IN (0,{$space['feedfriend']},{$space['uid']}) and dateline>{$time}"; } else { $wheresql = "1"; } $wheresql .= " and (body_template not like '%{eventname}%' and body_template not like '%{option}%') and icon in ('doing','blog','arrangement','thread','share','album')"; chdir(dirname(dirname(dirname(__FILE__)))); // go the ihome dir. $query = $_SGLOBAL['db']->query("SELECT * FROM " . tname('feed') . " USE INDEX(dateline) WHERE " . $wheresql . " ORDER BY dateline DESC LIMIT " . $start . "," . $perpage); //$DBendtime = time(); while ($value = $_SGLOBAL['db']->fetch_array($query)) { realname_set($value[uid], $value[username]); // start by an, modified by xuxing. 2013-3-27. //deal with the image size, if the picture is from ihome-self, get the thumb pic, if from foreign site, resize it. /*if(empty($value[image_1])){ $value[image_1]=''; }else if(preg_match("/attachment\/(.*)/",$value['image_1'],$matches) && (file_exists($_SC['attachdir'].'./'.$matches[1].'.thumb.jpg') || file_exists($_SC['attachdir'].'./'.$matches[1]))){ //echo file_exists($_SC['attachdir'].'./'.$matches[1]);exit(); if (file_exists($_SC['attachdir'].'./'.$matches[1].'.thumb.jpg')) { $value['image_1'] = $_SCONFIG[siteallurl].'attachment/'.$matches[1].'.thumb.jpg'; }else{ $value['image_1'] = $_SCONFIG[siteallurl].'attachment/'.$matches[1]; }*/ /*if (!file_exists($value['image_1'])) { $value['image_1']='(图片来自外网,耗费流量较多,请使用浏览器查看)'; }*/ /*}else{
$wherearr = array(); $_GET['key'] = stripsearchkey($_GET['key']); if ($_GET['key']) { $wherearr[] = " fusername LIKE '%{$_GET['key']}%' "; } $_GET['group'] = isset($_GET['group']) ? intval($_GET['group']) : -1; if ($_GET['group'] >= 0) { $wherearr[] = " gid='{$_GET['group']}'"; } $sql = $wherearr ? 'AND' . implode(' AND ', $wherearr) : ''; $count = $_SGLOBAL['db']->result($_SGLOBAL['db']->query("SELECT COUNT(*) FROM " . tname('friend') . " WHERE uid='{$_SGLOBAL['supe_uid']}' AND status='1' {$sql}"), 0); $fuids = array(); if ($count) { $query = $_SGLOBAL['db']->query("SELECT * FROM " . tname('friend') . " WHERE uid='{$_SGLOBAL['supe_uid']}' AND status='1' {$sql} ORDER BY num DESC, dateline DESC LIMIT {$start},{$perpage}"); while ($value = $_SGLOBAL['db']->fetch_array($query)) { realname_set($value['fuid'], $value['fusername']); $list[] = $value; $fuids[] = $value['fuid']; } } $invitearr = array(); //Already participated in the poll $query = $_SGLOBAL['db']->query("SELECT uid FROM " . tname('polluser') . " WHERE uid IN (" . simplode($fuids) . ") AND pid='{$pid}'"); while ($value = $_SGLOBAL['db']->fetch_array($query)) { $invitearr[$value['uid']] = $value['uid']; } // allready invited foreach ($uidarr as $key => $uid) { $invitearr[$uid] = $uid; } realname_get();
function DB_Set_Logined($uid) { global $db, $_SGLOBAL, $_SN; // echo var_dump($_SN)."--_SN0<br>"; $setarr = array('uid' => $uid, 'username' => '', 'password' => ''); $query = $db->query("SELECT username,password FROM " . tname('member') . " WHERE uid='{$setarr['uid']}'"); if ($value = $db->fetch_array($query)) { $setarr['username'] = addslashes($value['username']); $setarr['password'] = addslashes($value['password']); } $invitearr = $_SESSION['invitearr']; //从会话里将已有帐户登录时的邀请信息取出,不用从通行证返回信息里取 $url_plus = $_SESSION['url_plus']; //从会话里将已有帐户登录时的邀请信息取出,不用从通行证返回信息里取 $app = $_SESSION['app']; //从会话里将已有帐户登录时的邀请信息取出,不用从通行证返回信息里取 $_SN = $_SESSION['SN']; //从会话里取出后边要用的这个变量 // echo var_dump($invitearr)."--invitearr<br>"; // echo var_dump($url_plus)."--url_plus<br>"; // echo var_dump($app)."--app<br>"; // echo var_dump($_SN)."--_SN1<br>"; include_once S_ROOT . './source/function_space.php'; //开通空间 $query = $_SGLOBAL['db']->query("SELECT * FROM " . tname('space') . " WHERE uid='{$setarr['uid']}'"); if (!($space = $_SGLOBAL['db']->fetch_array($query))) { $space = space_open($setarr['uid'], $setarr['username'], 0, $passport['email']); } $_SGLOBAL['member'] = $space; //实名 realname_set($space['uid'], $space['username'], $space['name'], $space['namestatus']); //这里$_SN再次被赋值 // echo var_dump($_SN)."--_SN2<br>"; //设置cookie ssetcookie('auth', authcode("{$setarr['password']}\t{$setarr['uid']}", 'ENCODE'), $cookietime); ssetcookie('loginuser', $passport['username'], 31536000); ssetcookie('_refer', ''); //同步登录 include_once S_ROOT . './uc_client/client.php'; $ucsynlogin = uc_user_synlogin($setarr['uid']); // echo var_dump($ucsynlogin)."--ucsynlogin<br>"; //好友邀请 if ($invitearr) { // echo $_SGLOBAL."--_SGLOBAL1<br>"; // echo var_dump($_SN)."--_SN1<br>"; // echo var_dump($invitearr['id'])."--invitearr['id']<br>"; // echo var_dump($setarr['uid'])."--setarr['uid']<br>"; // echo var_dump($setarr['username'])."--setarr['username']<br>"; // echo var_dump($invitearr['uid'])."--invitearr['uid']<br>"; // echo var_dump($invitearr['username'])."--invitearr['username']<br>"; //成为好友 invite_update($invitearr['id'], $setarr['uid'], $setarr['username'], $invitearr['uid'], $invitearr['username'], $app); } // echo var_dump($_SGLOBAL['supe_uid'])."--_SGLOBAL['supe_uid']<br>"; // echo var_dump($space['uid'])."--space['uid']<br>"; //判断用户是否设置了头像 $_SGLOBAL['supe_uid'] = $space['uid']; $reward = $setarr = array(); $experience = $credit = 0; $avatar_exists = ckavatar($space['uid']); if ($avatar_exists) { if (!$space['avatar']) { //奖励积分 $reward = getreward('setavatar', 0); $credit = $reward['credit']; $experience = $reward['experience']; if ($credit) { $setarr['credit'] = "credit=credit+{$credit}"; } if ($experience) { $setarr['experience'] = "experience=experience+{$experience}"; } $setarr['avatar'] = 'avatar=1'; $setarr['updatetime'] = "updatetime={$_SGLOBAL['timestamp']}"; } } else { if ($space['avatar']) { $setarr['avatar'] = 'avatar=0'; } } if (empty($_POST['refer'])) { $_POST['refer'] = 'space.php?do=home'; } realname_get(); showmessage('login_success', $app ? "userapp.php?id={$app}" : $_POST['refer'], 1, array($ucsynlogin)); }
//应该要除去同班同学 // if(empty($fdr)) { $query = $_SGLOBAL['db']->query("SELECT academy FROM " . tname('baseprofile') . " WHERE uid=" . $space['uid'] . " AND academy IS NOT NULL LIMIT 1 "); if ($academy = $_SGLOBAL['db']->result($query)) { $query = $_SGLOBAL['db']->query("SELECT uid FROM " . tname('baseprofile') . " WHERE\tacademy='{$academy}' AND isactive = 1 LIMIT 10 "); while ($academymate = $_SGLOBAL['db']->fetch_array($query)) { if (!in_array($academymate[uid], $space[friends])) { realname_set($academymate['uid']); $fdr[$academymate['uid']] = $academymate; } } } // if (empty($fdr)) // { //依据spaceinfo来的~ $query = $_SGLOBAL['db']->query("SELECT subtitle FROM " . tname('spaceinfo') . " WHERE uid=" . $space['uid'] . " AND subtitle iS NOT NULL LIMIT 1 "); if ($subtitle = $_SGLOBAL['db']->result($query)) { $query = $_SGLOBAL['db']->query("SELECT uid FROM " . tname('spaceinfo') . " WHERE\tsubtitle='{$subtitle}' LIMIT 10 "); while ($acdsf = $_SGLOBAL['db']->fetch_array($query)) { if (!in_array($acdsf[uid], $space[friends])) { realname_set($acdsf['uid']); $fdr[$acdsf['uid']] = $acdsf; } } } // } // } $reclist = $fdr; if (is_array($reclist)) { shuffle($reclist); }
<?php /* do_getthepic.php获得相册内某个图片的相关信息 Add by am@ihome.2012-12-17 11:07 */ include_once '../data_oauth_check.php'; include_once '../../../common.php'; //$picid= 193; $picid = empty($_POST['picid']) ? 0 : intval($_POST['picid']); $result = array(); $wheresql = "a.albumid = p.albumid and p.picid = {$picid}"; $query = $_SGLOBAL['db']->query("SELECT p.albumid,p.uid,p.dateline,p.title,p.filepath,p.filename,p.albumid,a.albumname,p.username FROM " . tname('album') . " a , " . tname('pic') . " p WHERE " . $wheresql); while ($album = $_SGLOBAL['db']->fetch_array($query)) { $pic[] = $album; realname_set($album['uid'], $album['username']); } realname_get(); foreach ($pic as $album) { $result[] = array('pic_userpic' => avatar($album['uid'], small), 'pic_username' => $_SN[$album['uid']], 'pic_userid' => $album[uid], 'pic_time' => $album[dateline], 'pic_note' => $album[title], 'pic_url' => $album[filepath], 'pic_name' => $album[filename], 'pic_albumid' => $album[albumid], 'pic_album' => $album[albumname]); } $result = json_encode($result); $result = preg_replace("#\\\\u([0-9a-f]{4})#ie", "iconv('UCS-2BE', 'UTF-8', pack('H4', '\\1'))", $result); echo $result; exit;
} $a_value = mkfeed($a_value, $actors); $list['app'][] = $a_value; } } $_SGLOBAL['news_list'] = $list; if (!empty($_GET['show'])) { include_once template(cp_feed_news); exit; } //获得最新10条已处理的诉求信息 $complainQuery = $_SGLOBAL['db']->query("select * from " . tname("complain_op") . " order by dateline DESC LIMIT 10"); while ($complain = $_SGLOBAL['db']->fetch_array($complainQuery)) { $complain['dateline'] = date("Y-m-d H:i", $complain['dateline']); if (!$complain['uid']) { realname_set($complain['uid'], $complain['username']); } elseif (empty($_SN[$complain['uid']])) { $_SN[$complain['uid']] = getUsername($complain['uid'], $_SGLOBAL['db']); } $Complains[] = $complain; } $isLeader = FALSE; $dept_uids = '0'; $dept_uids .= getBaseDepartmentID($_SGLOBAL[supe_uid]); $query = $_SGLOBAL['db']->query("SELECT * FROM " . tname('complain_uid') . " WHERE uid={$_SGLOBAL['supe_uid']}"); if ($value = $_SGLOBAL['db']->fetch_array($query) || $dept_uids != '0') { $isLeader = TRUE; } //获得个性模板 $templates = $default_template = array(); $tpl_dir = sreaddir(S_ROOT . './template');
function regiter_user_to_uchome() { global $_SCONFIG, $_SGLOBAL, $_SN, $openid_identifier, $setarr, $email, $username, $newuid; // echo var_dump($_SCONFIG)."--_SCONFIG<br/>"; // echo var_dump($_SGLOBAL)."--_SGLOBAL<br/>"; // echo var_dump($setarr)."--setarr<br/>"; $invitearr = $_SESSION['invitearr']; //从会话里将已有帐户登录时的邀请信息取出,不用从通行证返回信息里取 $url_plus = $_SESSION['url_plus']; //从会话里将已有帐户登录时的邀请信息取出,不用从通行证返回信息里取 $app = $_SESSION['app']; //从会话里将已有帐户登录时的邀请信息取出,不用从通行证返回信息里取 $_SN = $_SESSION['SN']; //从会话里取出后边要用的这个变量 // echo var_dump($invitearr)."--invitearr<br>"; // echo var_dump($url_plus)."--url_plus<br>"; // echo var_dump($app)."--app<br>"; // echo var_dump($_SN)."--_SN1<br>"; // echo var_dump($_SESSION['jumpurl'])."--_SESSION['jumpurl']<br/>"; //开通空间 // echo var_dump($_SGLOBAL['db'])."--_SGLOBAL['db']<br/>"; $query = $_SGLOBAL['db']->query("SELECT * FROM " . tname('space') . " WHERE uid='{$setarr['uid']}'"); // echo var_dump($query)."--query<br/>"; include S_ROOT . './source/function_space.php'; if (!($space = $_SGLOBAL['db']->fetch_array($query))) { $space = space_open($setarr['uid'], $setarr['username'], 0, $email); } // echo var_dump($space)."--space<br/>"; // breakpoint(); $_SGLOBAL['member'] = $space; // echo var_dump($_SGLOBAL['member'])."--_SGLOBAL['member']<br/>"; //实名 realname_set($space['uid'], $space['username'], $space['name'], $space['namestatus']); //这里$_SN再次被赋值 // echo var_dump($_SN)."--_SNn2<br>"; //检索当前用户 $query = $_SGLOBAL['db']->query("SELECT password FROM " . tname('member') . " WHERE uid='{$setarr['uid']}'"); if ($value = $_SGLOBAL['db']->fetch_array($query)) { $setarr['password'] = addslashes($value['password']); } else { //更新本地用户库 inserttable('member', $setarr, 0, true); } // 关联uid和openid //$db->query("INSERT INTO {$tablepre}user_openids VALUES (null,$newuid,'$openid_identifier')");//openid自带的db链接 $openids = array('uid' => $setarr['uid'], 'url' => $openid_identifier); inserttable('user_openids', $openids, 0, true); //uchome的db链接 // showmessage($openidlang['msg_bind_ok'],$plugin_url);//绑定成功 //默认好友 $flog = $inserts = $fuids = $pokes = array(); echo var_dump($_SCONFIG['defaultfusername']) . "--_SCONFIG['defaultfusername']<br/>"; if (!empty($_SCONFIG['defaultfusername'])) { $query = $_SGLOBAL['db']->query("SELECT uid,username FROM " . tname('space') . " WHERE username IN (" . simplode(explode(',', $_SCONFIG['defaultfusername'])) . ")"); while ($value = $_SGLOBAL['db']->fetch_array($query)) { $value = saddslashes($value); $fuids[] = $value['uid']; $inserts[] = "('{$newuid}','{$value['uid']}','{$value['username']}','1','{$_SGLOBAL['timestamp']}')"; //$inserts[] = "('$value[uid]','$newuid','$username','1','$_SGLOBAL[timestamp]')"; $inserts[] = "('{$value['uid']}','{$newuid}','{$setarr['username']}','1','{$_SGLOBAL['timestamp']}')"; $pokes[] = "('{$newuid}','{$value['uid']}','{$value['username']}','" . addslashes($_SCONFIG['defaultpoke']) . "','{$_SGLOBAL['timestamp']}')"; //添加好友变更记录 $flog[] = "('{$value['uid']}','{$newuid}','add','{$_SGLOBAL['timestamp']}')"; } ///////// if ($inserts) { $_SGLOBAL['db']->query("REPLACE INTO " . tname('friend') . " (uid,fuid,fusername,status,dateline) VALUES " . implode(',', $inserts)); $_SGLOBAL['db']->query("REPLACE INTO " . tname('poke') . " (uid,fromuid,fromusername,note,dateline) VALUES " . implode(',', $pokes)); $_SGLOBAL['db']->query("REPLACE INTO " . tname('friendlog') . " (uid,fuid,action,dateline) VALUES " . implode(',', $flog)); //添加到附加表 $friendstr = empty($fuids) ? '' : implode(',', $fuids); updatetable('space', array('friendnum' => count($fuids), 'pokenum' => count($pokes)), array('uid' => $newuid)); updatetable('spacefield', array('friend' => $friendstr, 'feedfriend' => $friendstr), array('uid' => $newuid)); //更新默认用户好友缓存 include_once S_ROOT . './source/function_cp.php'; foreach ($fuids as $fuid) { friend_cache($fuid); } } } //清理在线session insertsession($setarr); //设置cookie ssetcookie('auth', authcode("{$setarr['password']}\t{$setarr['uid']}", 'ENCODE'), 2592000); ssetcookie('loginuser', $username, 31536000); ssetcookie('_refer', ''); // echo var_dump($invitearr)."--invitearr<br/>"; //好友邀请 if ($invitearr) { //成为好友 invite_update($invitearr['id'], $setarr['uid'], $setarr['username'], $invitearr['uid'], $invitearr['username'], $app); //统计更新 include_once S_ROOT . './source/function_cp.php'; if ($app) { updatestat('appinvite'); } else { updatestat('invite'); } } $_SGLOBAL['supe_uid'] = $space['uid']; //判断用户是否设置了头像 $reward = $setarr = array(); $experience = $credit = 0; $avatar_exists = ckavatar($space['uid']); if ($avatar_exists) { if (!$space['avatar']) { //奖励积分 $reward = getreward('setavatar', 0); $credit = $reward['credit']; $experience = $reward['experience']; if ($credit) { $setarr['credit'] = "credit=credit+{$credit}"; } if ($experience) { $setarr['experience'] = "experience=experience+{$experience}"; } $setarr['avatar'] = 'avatar=1'; $setarr['updatetime'] = "updatetime={$_SGLOBAL['timestamp']}"; } } else { if ($space['avatar']) { $setarr['avatar'] = 'avatar=0'; } } //变更记录 if ($_SCONFIG['my_status']) { inserttable('userlog', array('uid' => $newuid, 'action' => 'add', 'dateline' => $_SGLOBAL['timestamp']), 0, true); } // echo var_dump($_SESSION['jumpurl'])."--_SESSION['jumpurl']<br/>"; // breakpoint(); showmessage('login_success', $_SESSION['jumpurl']); }
$perpage = 20; $page = empty($_GET['page']) ? 1 : intval($_GET['page']); if ($page < 1) { $page = 1; } $start = ($page - 1) * $perpage; $result = array(); $query = $_SGLOBAL['db']->query("SELECT f.fusername, s.name, s.namestatus, s.groupid, s.uid, sf.note \r\n FROM " . tname('friend') . " f , " . tname('spacefield') . " sf , " . tname('space') . " s\r\n WHERE s.uid = f.fuid\r\n AND f.fuid = sf.uid\r\n AND f.uid =" . $userid . "\r\n AND f.status = '1' AND groupid=3 LIMIT {$start},{$perpage}"); while ($value = $_SGLOBAL['db']->fetch_array($query)) { //将好友状态中的图片进行绝对路径化。 by xuxing start<img src=\"image\/face\/24.gif\" class=\"face\"> preg_match_all("#[<]img\\s+src[=]\"(.*)\".*[>]#U", $value['note'], $matches, PREG_SET_ORDER); foreach ($matches as $item) { $TmpString = $item[1]; $HrefString = $_SCONFIG[siteallurl] . $item[1]; //echo "----matchstring: $MatchString----tmpstring: $TmpString----username: $HrefString\n"; $value['note'] = str_replace($TmpString, $HrefString, $value['note']); } //将公告中的图片进行绝对路径化。 by xuxing end $publist[] = $value; realname_set($value['uid'], $value[name]); } realname_get(); if ($publist) { foreach ($publist as $value) { $result[] = array('pub_thumb_pic' => avatar($value[uid], middle), 'pub_name' => $_SN[$value[uid]], 'pub_id' => $value[uid], 'pub_last_message' => $value[note]); } } $result = json_encode($result); $result = preg_replace("#\\\\u([0-9a-f]{4})#ie", "iconv('UCS-2BE', 'UTF-8', pack('H4', '\\1'))", $result); echo $result; exit;
//检查开始数 ckstart($start, $perpage); if ($perpage > 100) { $count = 1; $selectsql = 'feedid'; } else { $count = $_SGLOBAL['db']->result($_SGLOBAL['db']->query("SELECT COUNT(*) FROM " . tname('feed') . " WHERE {$wheresql}"), 0); $selectsql = '*'; } $mpurl .= '&perpage=' . $perpage; $perpages = array($perpage => ' selected'); $list = array(); $multi = ''; $managebatch = checkperm('managebatch'); $allowbatch = true; if ($count) { $query = $_SGLOBAL['db']->query("SELECT {$selectsql} FROM " . tname('feed') . " WHERE {$wheresql} {$ordersql} LIMIT {$start},{$perpage}"); while ($value = $_SGLOBAL['db']->fetch_array($query)) { realname_set($value['uid'], $value['username'], $value['username'], 1); if (!$managebatch && $value['uid'] != $_SGLOBAL['supe_uid']) { $allowbatch = false; } $list[] = $value; } $multi = multi($count, $perpage, $page, $mpurl); } if ($perpage > 100) { $count = count($list); } realname_get(); }
//赠送 $count = getcount('show', array('uid'=>$fuid)); if($count) { $_SGLOBAL['db']->query("UPDATE ".tname('show')." SET credit=credit+$showcredit WHERE uid='$fuid'"); } else { inserttable('show', array('uid'=>$fuid, 'username'=>$_POST['fusername'], 'credit'=>$showcredit), 0, true); } //减少自己的积分 $_SGLOBAL['db']->query("UPDATE ".tname('space')." SET credit=credit-$showcredit WHERE uid='$space[uid]'"); //给好友通知 notification_add($fuid, 'credit', cplang('note_showcredit', array($showcredit))); //实名 realname_set($fuid, $_POST['fusername']); realname_get(); //feed if(ckprivacy('show', 1)) { feed_add('show', cplang('feed_showcredit'), array( 'fusername'=>"<a href=\"space.php?uid=$fuid\">{$_SN[$fuid]}</a>", 'credit'=>$showcredit)); } showmessage('showcredit_friend_do_success', "space.php?do=top"); } elseif(submitcheck('showsubmit')) { $showcredit = intval($_POST['showcredit']); if($showcredit > $space['credit']) $showcredit = $space['credit'];
$hotarr = array('pid', $poll['pid'], $poll['hotuser']); break; case 'job': $query = $_SGLOBAL['db']->query("SELECT j.*,jc.description FROM " . tname('job') . " j left join " . tname('job_content_3') . " jc on j.id=jc.jobid where j.id={$id}"); if (!($job = $_SGLOBAL['db']->fetch_array($query))) { showmessage('job_does_not_exist'); } if ($job['uid'] == $space['uid']) { showmessage('share_not_self'); } //黑名单 if (isblacklist($job['uid'])) { showmessage('is_blacklist'); } //实名 realname_set($job['uid']); realname_get(); $arr['title_template'] = cplang('share_job'); $arr['body_template'] = '<b>{subject}</b><br>{username}<br>{message}'; $arr['body_data'] = array('userby' => $_SN[$job['uid']], 'userby_id' => $_job['uid'], 'subject' => "<a href=\"job.php?do=nei&m=view&id={$job['id']}\">{$job['title']}</a>", 'username' => "<a href=\"space.php?uid={$job['uid']}\">" . $_SN[$job['uid']] . "</a>", 'message' => getstr($job['description'], 150, 0, 1, 0, 0, -1)); //通知 $note_uid = $job['uid']; $note_message = cplang('note_share_blog', array("job.php?do=nei&m=view&id={$job['id']}", $job['title'])); break; default: //获得feed $topic = array(); $topicid = $_GET['topicid'] = intval($_GET['topicid']); if ($topicid) { $topic = topic_get($topicid); }
//print_r($_SN);exit(); $post['message'] = preg_replace("/\\<div class=\"quote\"\\>\\<span class=\"q\"\\>.*?\\<\\/span\\>\\<\\/div\\>/is", '', $post['message']); //移除编辑记录 $post['message'] = preg_replace("/<ins class=\"modify\".+?<\\/ins>/is", '', $post['message']); //$post['message'] = html2bbcode($post['message']);//显示用 $message = addslashes("<div class=\"quote\"><span class=\"q\"><b>" . $_SN[$post['uid']] . "</b>: " . getstr($post['message'], 150, 0, 0, 0, 2, 1) . '</span></div>') . $message; } } else { $query = $_SGLOBAL['db']->query("SELECT * FROM " . tname('comment') . " WHERE cid='{$cid}' AND id='{$id}' AND idtype='{$idtype}'"); $comment = $_SGLOBAL['db']->fetch_array($query); if ($comment && $comment['authorid'] != $userid) { //实名 if ($comment['author'] == '') { $_SN[$comment['authorid']] = lang('hidden_username'); } else { realname_set($comment['authorid'], $comment['author']); realname_get(); } $comment['message'] = preg_replace("/\\<div class=\"quote\"\\>\\<span class=\"q\"\\>.*?\\<\\/span\\>\\<\\/div\\>/is", '', $comment['message']); //bbcode转换 //$comment['message'] = html2bbcode($comment['message']); /*$sql = "SELECT * FROM ".tname('comment')." WHERE cid='$cid' AND id='$id' AND idtype='$idtype'"; $arrs = array('uid'=>$userid,'username'=>$username,'message'=>$message,'idtype'=>$idtype,'id'=>$id,'cid'=>$cid,'flag'=>'success','sql'=>$sql); returnflag($arrs); */ $message = addslashes("<div class=\"quote\"><span class=\"q\"><b>" . $_SN[$comment['authorid']] . "</b>: " . getstr($comment['message'], 150, 0, 0, 0, 2, 1) . '</span></div>') . $message; if ($comment['idtype'] == 'uid') { $id = $comment['authorid']; } } else { $arrs = array('flag' => $idtype . '_not_exist'); returnflag($arrs);
} else { $title = $Value['wallname']; $adminuid = $Value['uid']; } //分页 $perpage = 20; $perpage = mob_perpage($perpage); $page = empty($_GET['page']) ? 0 : intval($_GET['page']); if ($page < 1) { $page = 1; } $start = ($page - 1) * $perpage; //检查开始数 ckstart($start, $perpage); $wheresql = "wallid = '{$WallId}' AND (uid = '{$uid}' OR pass >= 1 ) "; $count = $_SGLOBAL['db']->result($_SGLOBAL['db']->query("SELECT COUNT(*) FROM " . tname('wallfield') . " WHERE {$wheresql}"), 0); if ($count) { //最好显示与屏幕相同的东西,并且显示自己的! $mine = $_SGLOBAL['db']->query("select * from " . tname(wallfield) . " where wallid = '{$WallId}' AND (uid = '{$uid}' OR pass >= 1 ) order by timeline desc limit " . $start . "," . $perpage); while ($Mine = $_SGLOBAL['db']->fetch_array($mine)) { realname_set($Mine['uid'], $Mine['username']); $TrackList[] = $Mine; } } //分页 $multi = multi($count, $perpage, $page, $theurl); //实名 realname_get(); $_TPL['css'] = 'doing'; include_once template("/plugin/wall/template/wall_track"); }
$hotarr = array('eventid', $event['eventid'], $event['hotuser']); break; case 'poll': $query = $_SGLOBAL['db']->query("SELECT p.*,pf.* FROM " . tname('poll') . " p\r\n\t\t\t\tLEFT JOIN " . tname('pollfield') . " pf ON pf.pid=p.pid\r\n\t\t\t\tWHERE p.pid='{$id}'"); if (!($poll = $_SGLOBAL['db']->fetch_array($query))) { showmessage('poll_does_not_exist'); } if ($poll['uid'] == $space['uid']) { showmessage('share_not_self'); } //Blacklist if (isblacklist($poll['uid'])) { showmessage('is_blacklist'); } // real name realname_set($poll['uid'], $poll['username']); realname_get(); $arr['title_template'] = cplang('share_poll', array($poll['percredit'] ? cplang('reward') : '')); $arr['body_template'] = '<b>{subject}</b><br>{user}<br>{option}'; $optionstr = ''; $poll['option'] = unserialize($poll['option']); foreach ($poll['option'] as $key => $val) { $optionstr .= '<input type="' . ($poll['multiple'] ? 'checkbox' : 'radio') . '" disabled name="poll_' . $key . '"/>' . $val . '<br/>'; } $arr['body_data'] = array('user' => "<a href=\"space.php?uid={$poll['uid']}\">" . $_SN[$poll['uid']] . "</a>", 'subject' => "<a href=\"space.php?uid={$poll['uid']}&do=poll&pid={$poll['pid']}\">{$poll['subject']}</a>", 'option' => $optionstr); // notice $note_uid = $poll['uid']; $note_message = cplang('note_share_poll', array("space.php?uid={$poll['uid']}&do=poll&pid={$poll['pid']}", $poll['subject'])); $hotarr = array('pid', $poll['pid'], $poll['hotuser']); break; default:
} $anonymous = empty($_POST['anonymous']) ? 0 : intval($_POST['anonymous']); $setarr = array('tagid' => intval($thread['tagid']), 'anonymous' => $anonymous, 'tid' => $tid, 'uid' => $_SGLOBAL['supe_uid'], 'username' => $_SGLOBAL['supe_username'], 'ip' => getonlineip(), 'dateline' => $_SGLOBAL['timestamp'], 'message' => $message); $pid = inserttable('post', $setarr, 1); //邮件通知 smail($thread['uid'], '', cplang('mtag_reply', array($_SN[$space['uid']], shtmlspecialchars(getsiteurl() . "space.php?uid={$thread['uid']}&do=thread&id={$thread['tid']}"))), '', 'mtag_reply'); //更新统计数据 $last_author_name = $anonymous ? 'null' : $_SGLOBAL[supe_username]; $_SGLOBAL['db']->query("UPDATE " . tname('thread') . "\r\n\t\tSET replynum=replynum+1, lastpost='{$_SGLOBAL['timestamp']}', lastauthor='{$last_author_name}', lastauthorid='{$_SGLOBAL['supe_uid']}'\r\n\t\tWHERE tid='{$tid}'"); //更新群组统计 $_SGLOBAL['db']->query("UPDATE " . tname("mtag") . " SET postnum=postnum+1 WHERE tagid='{$thread['tagid']}'"); //普通回复 if (empty($post) && $thread['uid'] != $_SGLOBAL['supe_uid']) { //积分 getreward('replythread', 1, 0, $thread['tid']); realname_set($thread['uid'], $thread['username']); realname_get(); if (empty($mtag['viewperm'])) { $fs = array(); $fs['icon'] = 'post'; $fs['body_template'] = ''; $fs['body_data'] = array(); $fs['body_general'] = ''; $fs['title_template'] = cplang('feed_thread_reply'); $fs['title_data'] = array('touser' => "<a href=\"space.php?uid={$thread['uid']}\">" . $_SN[$thread['uid']] . "</a>", 'thread' => "<a href=\"space.php?uid={$thread['uid']}&do=thread&id={$thread['tid']}\">{$thread['subject']}</a>"); if (ckprivacy('post', 1)) { feed_add($fs['icon'], $fs['title_template'], $fs['title_data'], $fs['body_template'], $fs['body_data'], $fs['body_general']); } } //通知 $note = $anonymous ? '匿名用户 ' : '';
if ($searchkey = stripsearchkey($_GET['searchkey'])) { $wheresql .= " AND subject LIKE '%{$searchkey}%'"; $theurl .= "&searchkey={$_GET['searchkey']}"; $orderby = " order by starttime desc"; cksearch($theurl); } //带有日期 if ($getdate = $_GET['date']) { $wheresql .= " AND starttime between " . strtotime($getdate) . " and " . (strtotime($getdate) + 86400 - 1); $theurl .= "&date=" . $getdate; $orderby = " order by starttime asc"; } $count = $_SGLOBAL['db']->result($_SGLOBAL['db']->query("SELECT COUNT(*) FROM " . tname('arrangement') . " WHERE {$wheresql}"), 0); if (count) { $query = $_SGLOBAL['db']->query("SELECT * from " . tname('arrangement') . " where {$wheresql} {$orderby} LIMIT {$start},{$perpage}"); while ($value = $_SGLOBAL['db']->fetch_array($query)) { realname_set($value['uid']); $value['message'] = getstr($value['message'], $summarylen, 0, 0, 0, 0, -1); if ($value['pic']) { $value['pic'] = pic_cover_get($value['pic'], $value['picflag']); } $list[] = $value; } } //分页 $multi = multi($count, $perpage, $page, $theurl); //实名 realname_get(); $_TPL['css'] = 'blog'; include_once template("space_arrangement_list"); }
$value['classid'] = mt_rand(1, 4); if($value['clicknum'] > $maxclicknum) $maxclicknum = $value['clicknum']; $clicks[$key] = $value; } $start = intval($_GET['start']); if($start < 0) $start = 0; $perpage = 18; $count = 0; $clickuserlist = array(); $query = $_SGLOBAL['db']->query("SELECT * FROM ".tname('clickuser')." WHERE id='$id' AND idtype='$idtype' ORDER BY dateline DESC LIMIT $start,$perpage"); while ($value = $_SGLOBAL['db']->fetch_array($query)) { realname_set($value['uid'], $value['username']);//实名 $value['clickname'] = $clicks[$value['clickid']]['name']; $clickuserlist[] = $value; $count++; } realname_get(); $click_multi = smulti($start, $perpage, $count, "cp.php?ac=click&op=show&clickid=$clickid&idtype=$idtype&id=$id", 'click_div'); } include_once(template('cp_click')); ?>
if (empty($blog)) { $result = array('flag' => 'blog_not_exist'); returnblog($result); } //检查好友权限 if (!ckfriend($blog['uid'], $blog['friend'], $blog['target_ids'])) { //没有权限 $result = array('flag' => 'no_privilege'); returnblog($result); } elseif ($userid != $blog['uid'] && $blog['friend'] == 4) { //密码输入问题 $result = array('flag' => 'need_password'); returnblog($result); } //检查权限 end realname_set($blog['uid'], $blog[username]); realname_get(); //访问统计 if ($userid != $blog['uid']) { $_SGLOBAL['db']->query("UPDATE " . tname('blog') . " SET viewnum=viewnum+1 WHERE blogid='{$blog['blogid']}'"); inserttable('log', array('id' => $userid, 'idtype' => 'uid')); //延迟更新 } $result = array('flag' => 'success', 'blog_authorpic' => avatar($blog[uid], small), 'blog_author' => $_SN[$blog[uid]], 'blog_authorid' => $blog[uid], 'blog_image' => $blog[pic], 'blog_noreply' => $blog[noreply], 'blog_readnum' => $blog[viewnum], 'blog_replynum' => $blog[replynum], 'blog_time' => $blog[dateline], 'blog_title' => $blog[subject], 'blog_text' => $blog[message]); returnblog($result); function returnblog($result) { $result = json_encode($result); $result = preg_replace("#\\\\u([0-9a-f]{4})#ie", "iconv('UCS-2BE', 'UTF-8', pack('H4', '\\1'))", $result); echo $result; exit;
showmessage("信息填写有误"); } if ($_POST['tel']) { if (!ismobile($_POST['tel'])) { showmessage("手机号有误!"); } } $arr = array("uid" => $_SGLOBAL[supe_uid], "username" => $_SGLOBAL[supe_username], "lpid" => $lpid, "giftname" => $thevalue[name], "time" => time(), "address" => strip_tags($_POST['address']), "tel" => ismobile(strip_tags($_POST['tel'])), "name" => strip_tags($_POST['realname'])); $id = inserttable('jifen_dhlog', $arr, 1); //插入数据 $_SGLOBAL['db']->query('UPDATE ' . tname('jifen_lp') . ' SET total=total-1,nums=nums+1 WHERE id=' . $lpid); //更新礼品信息 $_SGLOBAL['db']->query('UPDATE ' . tname('space') . ' SET credit=credit-' . $thevalue['price'] . ' WHERE uid=' . $_SGLOBAL[supe_uid]); //更新积分信息 //发全站feed $uid = $_SGLOBAL['supe_uid']; realname_set($_SGLOBAL['supe_uid'], $_SGLOBAL['supe_username']); realname_get(); include_once S_ROOT . './source/function_cp.php'; $avatar = ckavatar($uid) ? avatar($uid, 'middle', true) : UC_API . '/images/noavatar_middle.gif'; $summay = getstr($thevalue['des'], 150, 1, 1, 0, 0, -1); if ($thevalue['pic']) { $thevalue['pic'] = "jifen/uploads/image/" . $thevalue['id'] . ".jpg"; } else { $thevalue['pic'] = "jifen/images/default.jpg"; } feed_add('share', '{actor} 兑换了 [{gift}]', array('actor' => "<a href=\"space.php?uid={$uid}\">{$_SN[$uid]}</a>", 'gift' => "<a href=\"jifen.php?ac=show&id={$lpid}\">{$thevalue[name]}</a>"), '{summay}', array('summay' => $summay), '', array($thevalue['pic']), array('jifen.php?ac=show&id=' . $lpid)); showmessage("兑换成功", "index.php", 2); } else { include_once S_ROOT . "jifen/source/jifen_info.php"; }
//找热门异性有头像的用户 $wherearr = array(); $wherearr[] = "s.uid=sf.uid"; $wherearr[] = "s.avatar='1'"; if ($space['sex'] == 2) { $title = '帅哥'; $wherearr[] = "sf.sex='1'"; } else { $title = '美女'; $wherearr[] = "sf.sex='2'"; } $nouids = $space['friend'] ? $space['friend'] . ",{$space['uid']}" : $space['uid']; $wherearr[] = "s.uid NOT IN ({$nouids})"; $query = $_SGLOBAL['db']->query("SELECT s.uid,s.username,s.name,s.namestatus\r\n\t\tFROM " . tname('space') . " s, " . tname('spacefield') . " sf\r\n\t\tWHERE " . implode(' AND ', $wherearr) . "\r\n\t\tORDER BY s.friendnum DESC LIMIT 0,10"); while ($value = $_SGLOBAL['db']->fetch_array($query)) { realname_set($value['uid'], $value['username'], $value['name'], $value['namestatus']); $spaces[] = $value; } realname_get(); if ($spaces) { $task['result'] = '<p>找到' . $title . '朋友,推荐给您:</p>'; $task['result'] .= '<ul class="avatar_list">'; foreach ($spaces as $key => $value) { $task['result'] .= '<li> <div class="avatar48"><a href="space.php?uid=' . $value['uid'] . '" target="_blank"><img src="' . avatar($value['uid'], 'small') . '" class="avatar"></a></div> <p><a href="space.php?uid=' . $value['uid'] . '" target="_blank" target="_blank">' . $_SN[$value['uid']] . '</a></p> <p class=\\"time\\"><a href="cp.php?ac=friend&op=add&uid=' . $value['uid'] . '" id="a_reside_friend_' . $key . '" onclick="ajaxmenu(event, this.id, 99999, \'\', -1)">加为好友</a></p> </li>'; } $task['result'] .= '</ul>'; }
$picthumb = $value['pic']; } $result[] = array('pic_id' => $value['picid'], 'pic_desc' => $value['title'], 'pic_uid' => $value['uid'], 'pic_userfullname' => $_SN[$value['uid']], 'pic_time' => $value['dateline'], 'pic_url' => $picpath, 'pic_thumb' => $picthumb, 'pic_replynum' => $value['replynum']); } returnvalue($result); exit; } elseif ($picid > 0) { $query = $_SGLOBAL['db']->query("SELECT a.picid,a.albumid,a.dateline,a.title,a.filepath,b.albumname,b.username,b.uid FROM " . tname('pic') . " a, " . tname('album') . " b WHERE picid='{$picid}' and a.albumid=b.albumid and a.uid=b.uid limit 1"); $pic = $_SGLOBAL['db']->fetch_array($query); //当图片不存在时,进行返回 if (empty($pic)) { $result = array('flag' => 'picture_not_exist'); returnvalue($result); exit; } realname_set($pic['uid'], $pic['username']); $picreplynum = getcount('comment', array('idtype' => 'picid', 'id' => $pic['picid'])); $pic['replynum'] = $picreplynum; realname_get(); $markpos = strpos($_SC['attachurl'], "ttp://"); if ($markpos != 1) { $picpath = $_SCONFIG[siteallurl] . $_SC['attachurl'] . $pic['filepath']; } else { $picpath = $_SC['attachurl'] . $pic['filepath']; } $result = array('user_thumbpic' => avatar($pic[uid], small), 'pic_id' => $pic['picid'], 'pic_desc' => $pic['title'], 'pic_uid' => $pic['uid'], 'pic_userfullname' => $_SN[$pic['uid']], 'pic_time' => $pic['dateline'], 'pic_url' => $picpath, 'pic_replynum' => $pic['replynum'], 'pic_albumid' => $pic['albumid'], 'pic_albumname' => $pic['albumname']); returnvalue($result); exit; } //检查相册的访问权限 function ckfriend_album($album)
function invite_get($uid, $code) { global $_SGLOBAL, $_SN; $invitearr = array(); if($uid && $code) { $query = $_SGLOBAL['db']->query("SELECT i.*, s.username, s.name, s.namestatus FROM ".tname('invite')." i LEFT JOIN ".tname('space')." s ON s.uid=i.uid WHERE i.uid='$uid' AND i.code='$code' AND i.fuid='0'"); if($invitearr = $_SGLOBAL['db']->fetch_array($query)) { realname_set($invitearr['uid'], $invitearr['username'], $invitearr['name'], $invitearr['namestatus']); $invitearr = saddslashes($invitearr); } } return $invitearr; }
} $result = uc_pm_list($_SGLOBAL['supe_uid'], $page, $perpage, 'inbox', $filter, 100); $count = $result['count']; $list = $result['data']; $multi = multi($count, $perpage, $page, "space.php?do=pm&filter={$filter}"); if ($_SGLOBAL['member']['newpm']) { //取消新短消息提示 updatetable('space', array('newpm' => 0), array('uid' => $_SGLOBAL['supe_uid'])); //UCenter uc_pm_ignore($_SGLOBAL['supe_uid']); } $actives = array($filter => ' class="active"'); } //实名 if ($list) { $today = $_SGLOBAL['timestamp'] - ($_SGLOBAL['timestamp'] + $_SCONFIG['timeoffset'] * 3600) % 86400; foreach ($list as $key => $value) { realname_set($value['msgfromid'], $value['msgfrom']); $value['daterange'] = 5; if ($value['dateline'] >= $today) { $value['daterange'] = 1; } elseif ($value['dateline'] >= $today - 86400) { $value['daterange'] = 2; } elseif ($value['dateline'] >= $today - 172800) { $value['daterange'] = 3; } $list[$key] = $value; } realname_get(); } include_once template("space_pm");
include_once 'do_mobileverify.php'; //@include_once(S_ROOT.'./data/data_profield.php'); $doid = intval(trim($_POST[doingid])); //$doid = 587; $result = array(); $perpage = 20; $page = empty($_POST['page']) ? 0 : intval($_POST['page']); if ($page < 1) { $page = 1; } $start = ($page - 1) * $perpage; //echo "SELECT uid,username,id,message,dateline FROM ".tname('docomment')." where doid=$doid LIMIT $start,$perpage";exit(); $query = $_SGLOBAL['db']->query("SELECT uid,username,id,message,dateline FROM " . tname('docomment') . " where doid={$doid} LIMIT {$start},{$perpage}"); while ($value = $_SGLOBAL['db']->fetch_array($query)) { $topiclist[] = $value; realname_set($value['uid'], $value[username]); } realname_get(); if ($topiclist) { foreach ($topiclist as $value) { //将公告中的图片进行绝对路径化。 start<img src=\"image\/face\/24.gif\" class=\"face\"> preg_match_all("#[<]img\\s+src[=]\"(.*)\".*[>]#U", $value['message'], $matches, PREG_SET_ORDER); foreach ($matches as $item) { $TmpString = $item[1]; $HrefString = $_SCONFIG[siteallurl] . $item[1]; $TmpFace = $item[0]; //开始处理图片 if (preg_match_all("#image\\/face\\/(\\d+)\\.gif#i", $TmpString, $matchface, PREG_SET_ORDER)) { foreach ($matchface as $facenum) { switch ($facenum[1]) { case 1:
exit; } $vall = $value; if (time() < $vall['starttime'] - 30 * 60) { echo 'wall_not_start'; exit; } if (time() > $vall['endtime'] + 30 * 60) { echo 'wall_end'; exit; } $title = $value['wallname']; } $mine = $_SGLOBAL['db']->query("select * from " . tname(wallfield) . " where wallid = '{$wallid}' AND (uid = '{$uid}' OR display >= 1 ) order by timeline desc limit 4 "); while ($mines = $_SGLOBAL['db']->fetch_array($mine)) { realname_set($mines['uid'], $mines['username']); $tracklist[] = $mines; } realname_get(); } //print_r($title); //exit('aaaa'); if (submitcheck('track')) { $add_tracking = 1; if (empty($_POST['spacenote'])) { if (!checkperm('allowdoing')) { ckspacelog(); echo 'no_privilege'; exit; } //实名认证