} //检查开始数 ckstart($start, $perpage); $_GET['grade'] = intval($_GET['grade']); $query = $_SGLOBAL['db']->query("SELECT * FROM ".tname('tagspace')." WHERE tagid='$tagid' AND grade='$_GET[grade]' $wheresql LIMIT $start,$perpage"); while ($value = $_SGLOBAL['db']->fetch_array($query)) { realname_set($value['uid'], $value['username']); $list[] = $value; $count++; } realname_get(); $multi = smulti($start, $perpage, $count, "cp.php?ac=mtag&op=manage&tagid=$mtag[tagid]&subop=members&grade=$_GET[grade]&key=$_GET[key]"); } elseif($_GET['subop'] == 'invite') { //邀请 //分页 $perpage = 24; $page = empty($_GET['page'])?0:intval($_GET['page']); if($page<1) $page = 1; $start = ($page-1)*$perpage; //检查开始数 ckstart($start, $perpage);
$list[$key][] = $value; $count++; } elseif (!$type) { $list[$key][] = $value; $count++; } } } } //统计更新 $myinvitenum = getcount('myinvite', array('touid' => $space['uid'])); if ($myinvitenum != $space['myinvitenum']) { updatetable('space', array('myinvitenum' => $myinvitenum), array('uid' => $space['uid'])); } //分页 $multi = smulti($start, $perpage, $count, "space.php?do={$do}&view=userapp"); } else { if (!empty($_GET['ignore'])) { 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}");
$prinum = 0; $query = $_SGLOBAL['db']->query("SELECT blog.* FROM " . tname('tagblog') . " tb , " . tname('blog') . " blog WHERE tb.tagid='{$tag['tagid']}' AND blog.blogid=tb.blogid LIMIT {$start},{$perpage}"); while ($value = $_SGLOBAL['db']->fetch_array($query)) { if (empty($value['friend'])) { realname_set($value['uid'], $value['username']); $list[] = $value; } else { $prinum++; } $count++; } // real name realname_get(); // pagination $multi = smulti($start, $perpage, $count, "space.php?uid={$space['uid']}&do={$do}&id={$id}"); include_once template("space_tag_view"); } else { // pagination $perpage = 100; //Check start number ckstart($start, $perpage); //处理查询 $query = $_SGLOBAL['db']->query("SELECT * FROM " . tname('tag') . " ORDER BY blognum DESC LIMIT {$start},{$perpage}"); while ($value = $_SGLOBAL['db']->fetch_array($query)) { $list[] = $value; $count++; } // pagination $multi = smulti($start, $perpage, $count, "space.php?uid={$space['uid']}&do={$do}"); include_once template("space_tag_list"); }
$wheresql = ''; $_GET['key'] = stripsearchkey($_GET['key']); if ($_GET['key']) { $wheresql = " AND username LIKE '%{$_GET['key']}%' "; } //检查开始数 ckstart($start, $perpage); $_GET['grade'] = intval($_GET['grade']); $query = $_SGLOBAL['db']->query("SELECT * FROM " . tname('tagspace') . " WHERE tagid='{$tagid}' AND grade='{$_GET['grade']}' {$wheresql} LIMIT {$start},{$perpage}"); while ($value = $_SGLOBAL['db']->fetch_array($query)) { realname_set($value['uid'], $value['username']); $list[] = $value; $count++; } realname_get(); $multi = smulti($start, $perpage, $count, "cp.php?ac=mtag&op=manage&tagid={$mtag['tagid']}&subop=members&grade={$_GET['grade']}&key={$_GET['key']}"); } elseif ($_GET['subop'] == 'invite') { //邀请 //分页 $perpage = 24; $page = empty($_GET['page']) ? 0 : intval($_GET['page']); if ($page < 1) { $page = 1; } $start = ($page - 1) * $perpage; //检查开始数 ckstart($start, $perpage); $list = array(); $wherearr = array(); $_GET['key'] = stripsearchkey($_GET['key']); if ($_GET['key']) {
//Notice notification_add($item['uid'], $note_type, $q_note); showmessage('click_success', $_SGLOBAL['refer']); } elseif ($_GET['op'] == 'show') { foreach ($clicks as $key => $value) { $value['clicknum'] = $item["click_{$key}"]; $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') . "\r\n\t\tWHERE id='{$id}' AND idtype='{$idtype}'\r\n\t\tORDER BY dateline DESC\r\n\t\tLIMIT {$start},{$perpage}"); while ($value = $_SGLOBAL['db']->fetch_array($query)) { realname_set($value['uid'], $value['username']); // real name $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');
} //实名 realname_get(); //分页 $multi = smulti($start, $perpage, $count, "space.php?uid=$space[uid]&do=$do&id=$id"); include_once template("space_tag_view"); } else { //分页 $perpage = 100; //检查开始数 ckstart($start, $perpage); //处理查询 $query = $_SGLOBAL['db']->query("SELECT * FROM ".tname('tag')." ORDER BY blognum DESC LIMIT $start,$perpage"); while ($value = $_SGLOBAL['db']->fetch_array($query)) { $list[] = $value; $count++; } //分页 $multi = smulti($start, $perpage, $count, "space.php?uid=$space[uid]&do=$do"); include_once template("space_tag_list"); } ?>
} else { $_GET['status'] = intval($_GET['status']); $wheresql = " AND status='{$_GET['status']}'"; } //Check start number ckstart($start, $perpage); $query = $_SGLOBAL['db']->query("SELECT * FROM " . tname('userevent') . " WHERE eventid='{$eventid}' {$wheresql} LIMIT {$start},{$perpage}"); while ($value = $_SGLOBAL['db']->fetch_array($query)) { realname_set($value['uid'], $value['username']); $list[] = $value; $count++; } if ($_GET['key']) { $_GET['status'] = $list[0]['status']; } $multi = smulti($start, $perpage, $count, "cp.php?ac=event&op=members&id={$eventid}&status={$_GET['status']}&key={$_GET['key']}"); } elseif ($op == 'member') { // Settings for each individual Members if ($_SGLOBAL['supe_userevent']['status'] < 3) { showmessage('no_privilege_manage_event_members'); //No permission to manage event Members } if (submitcheck("membersubmit")) { $_POST['status'] = intval($_POST['status']); if ($_POST['uid'] && verify_eventmembers(array($_POST['uid']), $_POST['status'])) { $refer = empty($_POST['refer']) ? "space.php?do=event&id={$eventid}&view=member&status={$_POST['status']}" : $_POST['refer']; showmessage("do_success", $refer, 0); } else { showmessage("choose_right_eventmember"); } }
<?php if (!defined('IN_UCHOME')) { exit('Access Denied'); } //Page $start = empty($_GET['start']) ? 0 : intval($_GET['start']); $theurl = "gift.php?do=view"; //Check the starting number ckstart($start, $_VPERPAGE); $sql = "SELECT * FROM " . tname("gift") . "\r\n WHERE touid = {$_SGLOBAL['supe_uid']}\r\n ORDER BY dateline DESC\r\n LIMIT {$start},{$_VPERPAGE}"; $query = $_SGLOBAL['db']->query($sql); if ($_SGLOBAL['db']->num_rows($query) > 0) { while ($value = $_SGLOBAL['db']->fetch_array($query)) { $list[] = $value; } $count = count($list); //Page $multi = smulti($start, $_VPERPAGE, $count, $theurl); } else { } include_once template('gift/view/view');
$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')); ?>
$query = $_SGLOBAL['db']->query("SELECT s.*, sf.friend, f.* FROM " . tname('friend') . " f\r\n\t\tLEFT JOIN " . tname('space') . " s ON s.uid=f.uid\r\n\t\tLEFT JOIN " . tname('spacefield') . " sf ON sf.uid=f.uid\r\n\t\tWHERE f.fuid='{$space['uid']}' AND f.status='0'\r\n\t\tORDER BY f.dateline DESC\r\n\t\tLIMIT {$start},{$perpage}"); while ($value = $_SGLOBAL['db']->fetch_array($query)) { realname_set($value['uid'], $value['username']); //共有的好友 $cfriend = array(); $friend2 = empty($value['friend']) ? array() : explode(',', $value['friend']); if ($friend1 && $friend2) { $cfriend = array_intersect($friend1, $friend2); } $value['cfriend'] = implode(',', $cfriend); $value['cfcount'] = count($cfriend); $count++; $list[] = $value; } //分页 $multi = smulti($start, $perpage, $count, "cp.php?ac=friend&op=request"); realname_get(); } elseif ($op == 'groupname') { $groups = getfriendgroup(); $group = intval($_GET['group']); if (!isset($groups[$group])) { showmessage('change_friend_groupname_error'); } if (submitcheck('groupnamesubmit')) { $space['privacy']['groupname'][$group] = getstr($_POST['groupname'], 20, 1, 1); privacy_update(); showmessage('do_success', $_POST['refer']); } } elseif ($op == 'groupignore') { $groups = getfriendgroup(); $group = intval($_GET['group']);
if (empty($_SGLOBAL['supe_uid'])) { showmessage('to_login', 'do.php?ac=' . $_SCONFIG['login_action']); } $perpage = 10; //检查开始数 ckstart($start, $perpage); $count = 0; $piclist = array(); $query = $_SGLOBAL['db']->query("SELECT * FROM " . tname('pic') . " WHERE albumid='{$id}' AND uid='{$_SGLOBAL['supe_uid']}' ORDER BY dateline DESC LIMIT {$start},{$perpage}"); while ($value = $_SGLOBAL['db']->fetch_array($query)) { $value['bigpic'] = pic_get($value['filepath'], $value['thumb'], $value['remote'], 0); $value['pic'] = pic_get($value['filepath'], $value['thumb'], $value['remote']); $piclist[] = $value; $count++; } $multi = smulti($start, $perpage, $count, "do.php?ac=ajax&op=album&id={$id}", $_GET['ajaxdiv']); } elseif ($op == 'docomment') { $doid = intval($_GET['doid']); $clist = $do = array(); $icon = $_GET['icon'] == 'plus' ? 'minus' : 'plus'; if ($doid) { $query = $_SGLOBAL['db']->query("SELECT * FROM " . tname('doing') . " WHERE doid='{$doid}'"); if ($value = $_SGLOBAL['db']->fetch_array($query)) { realname_set($value['uid'], $value['username']); $value['icon'] = 'plus'; //自动展开最多20个评论 if ($value['replynum'] > 0 && ($value['replynum'] < 20 || $doid == $value['doid'])) { $doids[] = $value['doid']; $value['icon'] = 'minus'; } elseif ($value['replynum'] < 1) { $value['icon'] = 'minus';
$wheresql .= " AND appid='0'"; } $feed_list = array(); $count = 0; $query = $_SGLOBAL['db']->query("SELECT * FROM " . tname('feed') . " {$f_index}\r\n\tWHERE {$wheresql}\r\n\tORDER BY dateline DESC\r\n\tLIMIT {$start},{$perpage}"); if (empty($space['feedfriend'])) { //个人动态 while ($value = $_SGLOBAL['db']->fetch_array($query)) { if (ckfriend($value) && ckicon_uid($value)) { realname_set($value['uid'], $value['username']); $feed_list[] = $value; } $count++; } //分页 $multi = smulti($start, $perpage, $count, $theurl); } else { //好友动态 $space['filter_icon'] = empty($space['privacy']['filter_icon']) ? array() : array_keys($space['privacy']['filter_icon']); while ($value = $_SGLOBAL['db']->fetch_array($query)) { if (empty($feed_list[$value['hash_data']][$value['uid']])) { if (ckfriend($value) && ckicon_uid($value)) { realname_set($value['uid'], $value['username']); $feed_list[$value['hash_data']][$value['uid']] = $value; } } $count++; } } $olfriendlist = $visitorlist = $task = $ols = $birthlist = $myapp = array(); $namestatus = $addfriendcount = $mtaginvitecount = $myinvitecount = $pokecount = $newreport = 0;
//检查开始数 ckstart($start, $perpage); $query = $_SGLOBAL['db']->query("SELECT * FROM ".tname('userevent')." WHERE eventid='$eventid' $wheresql LIMIT $start,$perpage"); while ($value = $_SGLOBAL['db']->fetch_array($query)) { realname_set($value['uid'], $value['username']); $list[] = $value; $count++; } if($_GET['key']){ $_GET['status'] = $list[0]['status']; } $multi = smulti($start, $perpage, $count, "cp.php?ac=event&op=members&id=$eventid&status=$_GET[status]&key=$_GET[key]"); } elseif($op == 'member'){ // 设置单个成员 if($_SGLOBAL['supe_userevent']['status'] < 3){ showmessage('no_privilege_manage_event_members');//您没有权限管理活动成员 } if(submitcheck("membersubmit")){ $_POST['status'] = intval($_POST['status']); if($_POST['uid'] && verify_eventmembers(array($_POST['uid']), $_POST['status'])){ $refer = empty($_POST['refer']) ? "space.php?do=event&id=$eventid&view=member&status=$_POST[status]" : $_POST['refer']; showmessage("do_success", $refer , 0); } else { showmessage("choose_right_eventmember");
$noticetypes = array('wall' => lang('wall'), 'piccomment' => lang('pic_comment'), 'blogcomment' => lang('blog_comment'), 'blogtrace' => lang('blog_trace'), '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')); $type = trim($_GET['type']); $typesql = $type ? "AND type='{$type}'" : ''; $users = array(); //处理查询 $query = $_SGLOBAL['db']->query("SELECT * FROM " . tname('notification') . " WHERE uid='{$_SGLOBAL['supe_uid']}' {$typesql} ORDER BY dateline DESC LIMIT {$start},{$perpage}"); while ($value = $_SGLOBAL['db']->fetch_array($query)) { realname_set($value['authorid'], $value['author']); if ($value['authorid'] != $space['uid'] && $space['friends'] && !in_array($value['authorid'], $space['friends'])) { $users[$value['authorid']] = $value; } $list[] = $value; $count++; } //分页 $multi = smulti($start, $perpage, $count, "space.php?do={$do}"); //设置本次查看时间 $wherearr = array('uid' => $_SGLOBAL['supe_uid'], 'new' => 1); if ($type) { $wherearr['type'] = $type; } updatetable('notification', array('new' => 0), $wherearr); realname_get(); //更新未读的 $newcount = $_SGLOBAL['db']->result($_SGLOBAL['db']->query("SELECT COUNT(*) FROM " . tname('notification') . " WHERE uid='{$_SGLOBAL['supe_uid']}' AND new='1'"), 0); $newcount = intval($newcount); if ($_SGLOBAL['member']['notenum'] != $newcount) { updatetable('space', array('notenum' => $newcount), array('uid' => $_SGLOBAL['supe_uid'])); } } include_once template("space_notice");