Example #1
0
 function output()
 {
     global $_G;
     $noticelang = lang('notification', 'reppost_noticeauthor');
     $noticepreg = '/^' . str_replace(array('\\{actor\\}', '\\{subject\\}', '\\{tid\\}', '\\{pid\\}'), array('(.+?)', '(.+?)', '(\\d+)', '(\\d+)'), preg_quote($noticelang, '/')) . '$/';
     $actorlang = '<a href="home.php?mod=space&uid={actoruid}">{actorusername}</a>';
     $actorpreg = '/^' . str_replace(array('\\{actoruid\\}', '\\{actorusername\\}'), array('(\\d+)', '(.+?)'), preg_quote($actorlang, '/')) . '$/';
     foreach ($GLOBALS['list'] as $_k => $_v) {
         if (preg_match($noticepreg, $_v['note'], $_r)) {
             list(, $actor, $tid, $pid, $subject) = $_r;
             if (preg_match($actorpreg, $actor, $_r)) {
                 list(, $actoruid, $actorusername) = $_r;
             }
             //取出回帖的内容
             include_once libfile('function/forum');
             require_once libfile('function/discuzcode');
             loadforum(null, $tid);
             if ($pid) {
                 $postlist = $this->post = get_post_by_pid($pid, 'message');
                 $GLOBALS['list'][$_k]['message'] = discuzcode($postlist['message']);
             }
             $GLOBALS['list'][$_k]['dateline'] = dgmdate($GLOBALS['list'][$_k]['dateline']);
             $GLOBALS['list'][$_k]['dbdateline'] = $GLOBALS['list'][$_k]['dateline'];
             $GLOBALS['list'][$_k]['notevar'] = array('tid' => $tid, 'pid' => $pid, 'subject' => $subject, 'actoruid' => $actoruid, 'actorusername' => $actorusername);
         }
     }
     $variable = array('hash' => md5(substr(md5($_G['config']['security']['authkey']), 8) . $_G['uid']), 'list' => mobile_core::getvalues(array_values($GLOBALS['list']), array('/^\\d+$/'), array('id', 'uid', 'type', 'new', 'authorid', 'author', 'note', 'dateline', 'from_id', 'from_idtype', 'from_num', 'style', 'rowid', 'notevar', 'message')), 'count' => $GLOBALS['count'], 'perpage' => $GLOBALS['perpage'], 'page' => intval($GLOBALS['page']));
     mobile_core::result(mobile_core::variable($variable));
 }
Example #2
0
 function output()
 {
     global $_G;
     $variable = array('sublist' => mobile_core::getvalues($GLOBALS['sublist'], array('/^\\d+$/'), array('fid', 'name', 'threads', 'todayposts', 'posts')));
     $variable['forum']['password'] = $variable['forum']['password'] ? '1' : '0';
     mobile_core::result(mobile_core::variable($variable));
 }
Example #3
0
 function output()
 {
     global $_G;
     $forums = $GLOBALS['forums'] ? $GLOBALS['forums'] : C::t('forum_forum')->fetch_all_by_status(1);
     foreach ($forums as $forum) {
         if ($forum['fup'] && $GLOBALS['forumlist'][$forum['fup']]) {
             $GLOBALS['forumlist'][$forum['fup']]['sublist'][] = mobile_core::getvalues($forum, array('fid', 'name', 'threads', 'posts', 'redirect', 'todayposts', 'description'));
         }
         if ($GLOBALS['forumlist'][$forum['fid']]['icon']) {
             $icon = preg_match('/src="(.+?)"/', $GLOBALS['forumlist'][$forum['fid']]['icon'], $r) ? $r[1] : '';
             if (!preg_match('/^http:\\//', $icon)) {
                 $icon = $_G['siteurl'] . $icon;
             }
             $GLOBALS['forumlist'][$forum['fid']]['icon'] = $icon;
         }
         //TODO:现在是用发帖总量来展示"今日发布量",数据量大了改回来
         if ($GLOBALS['forumlist'][$forum['fid']]['posts']) {
             $GLOBALS['forumlist'][$forum['fid']]['posts'] = "今日 " . $GLOBALS['forumlist'][$forum['fid']]['posts'];
         }
     }
     if ($_GET['checknotice']) {
         $variable = array();
     } else {
         $variable = array('member_email' => $_G['member']['email'], 'member_credits' => $_G['member']['credits'], 'setting_bbclosed' => $_G['setting']['bbclosed'], 'group' => mobile_core::getvalues($_G['group'], array('groupid', 'grouptitle', '/^allow.+?$/')), 'catlist' => array_values(mobile_core::getvalues($GLOBALS['catlist'], array('/^\\d+$/'), array('fid', 'name', 'forums'))), 'forumlist' => array_values(mobile_core::getvalues($GLOBALS['forumlist'], array('/^\\d+$/'), array('fid', 'name', 'threads', 'posts', 'redirect', 'todayposts', 'description', 'sublist', 'icon'))));
     }
     mobile_core::result(mobile_core::variable($variable));
 }
Example #4
0
 function output()
 {
     global $_G;
     foreach ($_G['forum_threadlist'] as $k => $thread) {
         $_G['forum_threadlist'][$k]['tid'] = $thread['icontid'];
         if ($thread['displayorder'] > 0) {
             unset($_G['forum_threadlist'][$k]);
             continue;
         }
         $_G['forum_threadlist'][$k]['cover'] = array();
         if ($thread['cover']) {
             $_img = @getimagesize($thread['coverpath']);
             if ($_img) {
                 $_G['forum_threadlist'][$k]['cover'] = array('w' => $_img[0], 'h' => $_img[1]);
             }
         }
     }
     $variable = array('forum' => mobile_core::getvalues($_G['forum'], array('fid', 'fup', 'name', 'threads', 'posts', 'rules', 'autoclose', 'password')), 'group' => mobile_core::getvalues($_G['group'], array('groupid', 'grouptitle')), 'forum_threadlist' => mobile_core::getvalues(array_values($_G['forum_threadlist']), array('/^\\d+$/'), array('tid', 'author', 'authorid', 'subject', 'subject', 'dbdateline', 'dateline', 'dblastpost', 'lastpost', 'lastposter', 'attachment', 'replies', 'readperm', 'views', 'digest', 'cover')), 'sublist' => mobile_core::getvalues($GLOBALS['sublist'], array('/^\\d+$/'), array('fid', 'name', 'threads', 'todayposts', 'posts')), 'tpp' => $_G['tpp'], 'page' => $GLOBALS['page']);
     if (!empty($_G['forum']['threadtypes']) || !empty($_GET['debug'])) {
         $variable['threadtypes'] = $_G['forum']['threadtypes'];
     }
     if (!empty($_G['forum']['threadsorts']) || !empty($_GET['debug'])) {
         $variable['threadsorts'] = $_G['forum']['threadsorts'];
     }
     $variable['forum']['password'] = $variable['forum']['password'] ? '1' : '0';
     mobile_core::result(mobile_core::variable($variable));
 }
 function output()
 {
     global $_G, $thread;
     if ($GLOBALS['hiddenreplies']) {
         foreach ($GLOBALS['postlist'] as $k => $post) {
             if (!$post['first'] && $_G['uid'] != $post['authorid'] && $_G['uid'] != $_G['forum_thread']['authorid'] && !$_G['forum']['ismoderator']) {
                 $GLOBALS['postlist'][$k]['message'] = '';
                 $GLOBALS['postlist'][$k]['attachments'] = array();
             }
         }
     }
     $variable = array('thread' => mobile_core::getvalues($_G['thread'], array('tid', 'author', 'authorid', 'subject', 'views', 'replies', 'attachment', 'price', 'freemessage')), 'fid' => $_G['fid'], 'postlist' => array_values(mobile_core::getvalues($GLOBALS['postlist'], array('/^\\d+$/'), array('pid', 'tid', 'author', 'first', 'dbdateline', 'dateline', 'useip', 'username', 'adminid', 'email', 'memberstatus', 'authorid', 'username', 'groupid', 'memberstatus', 'status', 'message', 'number', 'memberstatus', 'groupid', 'attachment', 'attachments', 'attachlist', 'imagelist', 'anonymous'))), 'ppp' => $_G['ppp'], 'setting_rewriterule' => $_G['setting']['rewriterule'], 'setting_rewritestatus' => $_G['setting']['rewritestatus'], 'forum_threadpay' => $_G['forum_threadpay'], 'cache_custominfo_postno' => $_G['cache']['custominfo']['postno']);
     if (!empty($GLOBALS['threadsortshow'])) {
         $optionlist = array();
         foreach ($GLOBALS['threadsortshow']['optionlist'] as $key => $val) {
             $val['optionid'] = $key;
             $optionlist[] = $val;
         }
         if (!empty($optionlist)) {
             $GLOBALS['threadsortshow']['optionlist'] = $optionlist;
             $GLOBALS['threadsortshow']['threadsortname'] = $_G['forum']['threadsorts']['types'][$thread['sortid']];
         }
     }
     $threadsortshow = mobile_core::getvalues($GLOBALS['threadsortshow'], array('/^(?!typetemplate).*$/'));
     if (!empty($threadsortshow)) {
         $variable['threadsortshow'] = $threadsortshow;
     }
     foreach ($variable['$postlist'] as $k => $v) {
         $variable['$postlist'][$k]['attachments'] = array_values(mobile_core::getvalues($v['attachments'], array('/^\\d+$/'), array('aid', 'tid', 'uid', 'dbdateline', 'dateline', 'filename', 'filesize', 'url', 'attachment', 'remote', 'description', 'readperm', 'price', 'width', 'thumb', 'picid', 'ext', 'imgalt', 'attachsize', 'payed', 'downloads')));
     }
     $variable['forum']['password'] = $variable['forum']['password'] ? '1' : '0';
     mobile_core::result(mobile_core::variable($variable));
 }
Example #6
0
 function output()
 {
     global $_G;
     $variable = array('list' => mobile_core::getvalues($GLOBALS['list'], array('/^\\d+$/'), array('plid', 'isnew', 'pmnum', 'lastupdate', 'lastdateline', 'authorid', 'author', 'pmtype', 'subject', 'members', 'dateline', 'touid', 'pmid', 'lastauthorid', 'lastauthor', 'lastsummary', 'msgfromid', 'msgfrom', 'message', 'msgtoid', 'tousername')), 'count' => $GLOBALS['count'], 'perpage' => $GLOBALS['perpage'], 'page' => intval($GLOBALS['page']));
     if ($_GET['subop']) {
         $variable = array_merge($variable, array('pmid' => $GLOBALS['pmid']));
     }
     mobile_core::result(mobile_core::variable($variable));
 }
Example #7
0
 function output()
 {
     $comments = mobile_core::getvalues($GLOBALS['comments'], array('/^\\d+$/'), array('id', 'tid', 'pid', 'author', 'authorid', 'dateline', 'comment', 'avatar'));
     foreach ($GLOBALS['comments'] as $k => $c) {
         $comments[$k]['avatar'] = avatar($c['authorid'], 'small', true);
     }
     $variables = array('tid' => $_GET['tid'], 'pid' => $_GET['pid'], 'comments' => array($_GET['pid'] => $comments), 'totalcomment' => $GLOBALS['totalcomment'], 'count' => $GLOBALS['count']);
     mobile_core::result(mobile_core::variable($variables));
 }
Example #8
0
 function output()
 {
     global $_G;
     if ($_GET['checknotice']) {
         $variable = array();
     } else {
         $variable = array('member_email' => $_G['member']['email'], 'member_credits' => $_G['member']['credits'], 'setting_bbclosed' => $_G['setting']['bbclosed'], 'group' => mobile_core::getvalues($_G['group'], array('groupid', 'grouptitle', '/^allow.+?$/')), 'catlist' => array_values(mobile_core::getvalues($GLOBALS['catlist'], array('/^\\d+$/'), array('fid', 'name', 'forums'))), 'forumlist' => array_values(mobile_core::getvalues($GLOBALS['forumlist'], array('/^\\d+$/'), array('fid', 'name', 'threads', 'posts', 'redirect', 'todayposts', 'description'))));
     }
     mobile_core::result(mobile_core::variable($variable));
 }
Example #9
0
 function common()
 {
     global $_G;
     $forums = array();
     $sql = !empty($_G['member']['accessmasks']) ? "SELECT f.fid, f.type, f.name, f.fup, f.status, ff.password, ff.redirect, ff.viewperm, ff.postperm, ff.threadtypes, ff.threadsorts\r\n\t\t\t\tFROM " . DB::table('forum_forum') . " f\r\n\t\t\t\tLEFT JOIN " . DB::table('forum_forumfield') . " ff ON ff.fid=f.fid\r\n\t\t\t\tLEFT JOIN " . DB::table('forum_access') . " a ON a.uid='{$_G['uid']}' AND a.allowview>'0' AND a.fid=f.fid\r\n\t\t\t\tWHERE f.status='1' ORDER BY f.type, f.displayorder" : "SELECT f.fid, f.type, f.name, f.fup, f.status, ff.password, ff.redirect, ff.viewperm, ff.postperm, ff.threadtypes, ff.threadsorts\r\n\t\t\t\tFROM " . DB::table('forum_forum') . " f\r\n\t\t\t\tLEFT JOIN " . DB::table('forum_forumfield') . " ff USING(fid)\r\n\t\t\t\tWHERE f.status='1' ORDER BY f.type, f.displayorder";
     $query = DB::query($sql);
     //$query = DB::query("SELECT f.fid, f.type, f.name, f.fup, f.status, ff.password, ff.redirect, ff.viewperm, ff.postperm, ff.threadtypes, ff.threadsorts FROM ".DB::table('forum_forum')." f LEFT JOIN ".DB::table('forum_forumfield')." ff ON ff.fid=f.fid LEFT JOIN ".DB::table('forum_access')." a ON a.fid=f.fid AND a.allowview>'0' WHERE f.status='1' ORDER BY f.type, f.displayorder");
     while ($forum = DB::fetch($query)) {
         if ($forum['redirect'] || $forum['password']) {
             continue;
         }
         if (!$forum['viewperm'] || $forum['viewperm'] && forumperm($forum['viewperm'])) {
             $forum['name'] = strip_tags($forum['name']);
             if ($forum['threadsorts']) {
                 $forum['threadsorts'] = unserialize($forum['threadsorts']);
                 foreach ($forum['threadsorts']['types'] as $k => $v) {
                     $forum['threadsorts']['types'][$k] = strip_tags($v);
                 }
                 $forum['threadsorts'] = mobile_core::getvalues($forum['threadsorts'], array('required', 'types'));
             }
             if ($forum['threadtypes']) {
                 $forum['threadtypes'] = unserialize($forum['threadtypes']);
                 $unsetthreadtype = false;
                 if ($_G['adminid'] == 3 && strpos($forum['moderators'], $_G['username']) === false) {
                     $unsetthreadtype = true;
                 }
                 if ($_G['adminid'] == 0) {
                     $unsetthreadtype = true;
                 }
                 if ($unsetthreadtype) {
                     foreach ($forum['threadtypes']['moderators'] as $k => $v) {
                         if (!empty($v)) {
                             unset($forum['threadtypes']['types'][$k]);
                         }
                     }
                 }
                 $flag = 0;
                 foreach ($forum['threadtypes']['types'] as $k => $v) {
                     $forum['threadtypes']['types'][$k] = strip_tags($v);
                     if ($k == 0) {
                         $flag = 1;
                     }
                 }
                 if ($flag == 1) {
                     krsort($forum['threadtypes']['types']);
                 }
                 $forum['threadtypes'] = mobile_core::getvalues($forum['threadtypes'], array('required', 'types'));
             }
             $forums[] = mobile_core::getvalues($forum, array('fid', 'type', 'name', 'fup', 'viewperm', 'postperm', 'status', 'threadsorts', 'threadtypes'));
         }
     }
     $variable['forums'] = $forums;
     mobile_core::result(mobile_core::variable($variable));
 }
 function output()
 {
     global $_G;
     $variable = array('forum' => mobile_core::getvalues($_G['forum'], array('fid', 'fup', 'name', 'threads', 'posts', 'rules', 'autoclose', 'password')), 'group' => mobile_core::getvalues($_G['group'], array('groupid', 'grouptitle')), 'forum_threadlist' => mobile_core::getvalues($_G['forum_threadlist'], array('/^\\d+$/'), array('tid', 'author', 'authorid', 'subject', 'subject', 'dbdateline', 'dateline', 'dblastpost', 'lastpost', 'lastposter', 'attachment', 'replies', 'readperm', 'views', 'digest')), 'sublist' => mobile_core::getvalues($GLOBALS['sublist'], array('/^\\d+$/'), array('fid', 'name', 'threads', 'todayposts', 'posts')), 'tpp' => $_G['tpp'], 'page' => $GLOBALS['page']);
     if (!empty($_G['forum']['threadtypes']) || !empty($_GET['debug'])) {
         $variable['threadtypes'] = $_G['forum']['threadtypes'];
     }
     if (!empty($_G['forum']['threadsorts']) || !empty($_GET['debug'])) {
         $variable['threadsorts'] = $_G['forum']['threadsorts'];
     }
     $variable['forum']['password'] = $variable['forum']['password'] ? '1' : '0';
     mobile_core::result(mobile_core::variable($variable));
 }
Example #11
0
 function output()
 {
     global $_G;
     foreach ($GLOBALS['sublist'] as $k => $sublist) {
         if ($sublist['icon']) {
             $icon = preg_match('/src="(.+?)"/', $sublist['icon'], $r) ? $r[1] : '';
             if (!preg_match('/^http:\\//', $icon)) {
                 $icon = $_G['siteurl'] . $icon;
             }
             $GLOBALS['sublist'][$k]['icon'] = $icon;
         }
     }
     $variable = array('sublist' => mobile_core::getvalues($GLOBALS['sublist'], array('/^\\d+$/'), array('fid', 'name', 'threads', 'todayposts', 'posts', 'icon')));
     $variable['forum']['password'] = $variable['forum']['password'] ? '1' : '0';
     mobile_core::result(mobile_core::variable($variable));
 }
Example #12
0
 function common()
 {
     global $_G;
     $start = !empty($_GET['start']) ? $_GET['start'] : 0;
     $limit = !empty($_GET['limit']) ? $_GET['limit'] : 20;
     $variable['data'] = C::t('forum_newthread')->fetch_all_by_fids(dintval(explode(',', $_GET['fids']), true), $start, $limit);
     foreach (C::t('forum_thread')->fetch_all_by_tid(array_keys($variable['data']), 0, $limit) as $thread) {
         $thread['dbdateline'] = $thread['dateline'];
         $thread['dblastpost'] = $thread['lastpost'];
         $thread['dateline'] = dgmdate($thread['dateline'], 'u');
         $thread['lastpost'] = dgmdate($thread['lastpost'], 'u');
         $variable['data'][$thread['tid']] = mobile_core::getvalues($thread, array('tid', 'author', 'authorid', 'subject', 'subject', 'dbdateline', 'dateline', 'dblastpost', 'lastpost', 'lastposter', 'attachment', 'replies', 'readperm', 'views', 'digest'));
     }
     $variable['data'] = array_values($variable['data']);
     mobile_core::result(mobile_core::variable($variable));
 }
Example #13
0
 function output()
 {
     global $_G;
     foreach ($GLOBALS['list'] as $_k => $_v) {
         if ($_v['lastdateline']) {
             $GLOBALS['list'][$_k]['vdateline'] = dgmdate($_v['lastdateline'], 'u');
         } elseif ($_v['dateline']) {
             $GLOBALS['list'][$_k]['vdateline'] = dgmdate($_v['dateline'], 'u');
         }
     }
     $variable = array('list' => mobile_core::getvalues($GLOBALS['list'], array('/^\\d+$/'), array('plid', 'isnew', 'vdateline', 'subject', 'pmid', 'msgfromid', 'msgfrom', 'message', 'touid', 'tousername')), 'count' => $GLOBALS['count'], 'perpage' => $GLOBALS['perpage'], 'page' => intval($GLOBALS['page']));
     if ($_GET['subop']) {
         $variable = array_merge($variable, array('pmid' => $GLOBALS['pmid']));
     }
     mobile_core::result(mobile_core::variable($variable));
 }
Example #14
0
	function getvalues($variables, $keys, $subkeys = array()) {
		$return = array();
		foreach($variables as $key => $value) {
			foreach($keys as $k) {
				if($k{0} == '/' && preg_match($k, $key) || $key == $k) {
					if($subkeys) {
						$return[$key] = mobile_core::getvalues($value, $subkeys);
					} else {
						if(!empty($value) || !empty($_GET['debug']) || (is_numeric($value) && intval($value) === 0 )) {
							$return[$key] = is_array($value) ? mobile_core::arraystring($value) : (string)$value;
						}
					}
				}
			}
		}
		return $return;
	}
Example #15
0
 public function output()
 {
     global $_G;
     $variable = array("count" => $GLOBALS['count'], "list" => array_values(mobile_core::getvalues($GLOBALS['list'], array('/^.+?$/'), array('uid', 'username', 'gid', 'groupid', 'adminid'))));
     foreach ($variable["list"] as &$item) {
         $uid = $item["uid"];
         $gid = $item["groupid"];
         //unset($item["gid"]);
         //$item["groupid"] = $gid;
         $item["groupname"] = "unknown";
         if (isset($_G['cache']['usergroups'][$gid]['grouptitle'])) {
             $item['groupname'] = preg_replace('/<.*?\\>/', '', $_G['cache']['usergroups'][$gid]['grouptitle']);
         }
         $item["avatar"] = avatar($uid, 'big', 'true');
     }
     bigapp_core::result(bigapp_core::variable($variable));
 }
Example #16
0
 function common()
 {
     global $_G;
     loadcache('mobile_hotforum');
     if (!$_G['cache']['mobile_hotforum'] || TIMESTAMP - $_G['cache']['mobile_hotforum']['expiration'] > 3600) {
         $query = DB::query("SELECT * FROM " . DB::table('forum_forum') . " WHERE status='1' AND type='forum' ORDER BY todayposts DESC");
         $data = array();
         while ($row = DB::fetch($query)) {
             $data[] = mobile_core::getvalues($row, array('fid', 'name', 'threads', 'posts', 'lastpost', 'todayposts'));
         }
         $variable = array('data' => $data);
         savecache('mobile_hotforum', array('variable' => $variable, 'expiration' => TIMESTAMP));
     } else {
         $variable = $_G['cache']['mobile_hotforum']['variable'];
     }
     mobile_core::result(mobile_core::variable($variable));
 }
Example #17
0
 function output()
 {
     global $_G;
     $noticelang = lang('notification', 'reppost_noticeauthor');
     $noticepreg = '/^' . str_replace(array('\\{actor\\}', '\\{subject\\}', '\\{tid\\}', '\\{pid\\}'), array('(.+?)', '(.+?)', '(\\d+)', '(\\d+)'), preg_quote($noticelang, '/')) . '$/';
     $actorlang = '<a href="home.php?mod=space&uid={actoruid}">{actorusername}</a>';
     $actorpreg = '/^' . str_replace(array('\\{actoruid\\}', '\\{actorusername\\}'), array('(\\d+)', '(.+?)'), preg_quote($actorlang, '/')) . '$/';
     foreach ($GLOBALS['list'] as $_k => $_v) {
         if (preg_match($noticepreg, $_v['note'], $_r)) {
             list(, $actor, $tid, $pid, $subject) = $_r;
             if (preg_match($actorpreg, $actor, $_r)) {
                 list(, $actoruid, $actorusername) = $_r;
             }
             $GLOBALS['list'][$_k]['notevar'] = array('tid' => $tid, 'pid' => $pid, 'subject' => $subject, 'actoruid' => $actoruid, 'actorusername' => $actorusername);
         }
     }
     $variable = array('list' => mobile_core::getvalues(array_values($GLOBALS['list']), array('/^\\d+$/'), array('id', 'uid', 'type', 'new', 'authorid', 'author', 'note', 'dateline', 'from_id', 'from_idtype', 'from_num', 'style', 'rowid', 'notevar')), 'count' => $GLOBALS['count'], 'perpage' => $GLOBALS['perpage'], 'page' => intval($GLOBALS['page']));
     mobile_core::result(mobile_core::variable($variable));
 }
Example #18
0
 public function output()
 {
     global $_G;
     $only_count = false;
     if (isset($_GET["only_count"]) && $_GET["only_count"] == 1) {
         $only_count = true;
     }
     if ($only_count) {
         $variable = array("count" => $GLOBALS['count']);
         bigapp_core::result(bigapp_core::variable($variable));
         return;
     }
     $variable = array("count" => $GLOBALS['count'], "list" => array_values(mobile_core::getvalues($GLOBALS['list'], array('/^.+?$/'), array('fuid', 'fusername', 'note', 'dateline', 'gid'))));
     $uidarr = array();
     foreach ($variable["list"] as &$item) {
         $uid = $item["fuid"];
         $username = $item["fusername"];
         unset($item["fuid"]);
         unset($item["fusername"]);
         $item["uid"] = $uid;
         $item["username"] = $username;
         $item["avatar"] = avatar($uid, 'big', 'true');
         $uidarr[] = $uid;
     }
     ////////////////////////////////
     // map group
     $ugmap = BigAppAPI::get_user_group_map($uidarr);
     foreach ($variable["list"] as &$item) {
         $uid = $item["uid"];
         $item["groupname"] = "unknown";
         if (!isset($ugmap[$uid])) {
             $item["groupid"] = 0;
         } else {
             $gid = $ugmap[$uid];
             $item["groupid"] = $gid;
             if (isset($_G['cache']['usergroups'][$gid]['grouptitle'])) {
                 $item['groupname'] = preg_replace('/<.*?\\>/', '', $_G['cache']['usergroups'][$gid]['grouptitle']);
             }
         }
     }
     ////////////////////////////////
     bigapp_core::result(bigapp_core::variable($variable));
 }
Example #19
0
 public function output()
 {
     global $_G;
     $map = array();
     foreach ($GLOBALS["nearlist"] as $uid => &$item) {
         $map[$uid] = $item;
     }
     foreach ($GLOBALS["onlinelist"] as $uid => &$item) {
         $map[$uid] = $item;
     }
     $variable = array("count" => count($map), "list" => array_values(mobile_core::getvalues($map, array('/^.+?$/'), array('uid', 'username', 'groupid'))));
     foreach ($variable["list"] as &$item) {
         $uid = $item["uid"];
         $gid = $item["groupid"];
         $item["groupname"] = "unknown";
         if (isset($_G['cache']['usergroups'][$gid]['grouptitle'])) {
             $item['groupname'] = preg_replace('/<.*?\\>/', '', $_G['cache']['usergroups'][$gid]['grouptitle']);
         }
         $item["avatar"] = avatar($uid, 'big', 'true');
     }
     bigapp_core::result(bigapp_core::variable($variable));
 }
Example #20
0
 function output()
 {
     global $_G;
     $threads = array();
     loadcache('mobile_toplist_' . $_G['fid']);
     if (!$_G['cache']['mobile_toplist_' . $_G['fid']] || TIMESTAMP - $_G['cache']['mobile_toplist_' . $_G['fid']]['expiration'] > 3600) {
         $query = DB::query("SELECT * FROM " . DB::table('forum_thread') . " WHERE tid IN (" . dimplode($GLOBALS['stickytids']) . ") ORDER BY lastpost DESC");
         while ($thread = DB::fetch($query)) {
             $threads[] = $thread;
         }
         $query = DB::query("SELECT * FROM " . DB::table('forum_thread') . " WHERE `fid`='" . $_G['fid'] . "' AND `displayorder`='1' ORDER BY lastpost DESC");
         while ($thread = DB::fetch($query)) {
             $threads[] = $thread;
         }
         savecache('mobile_toplist_' . $_G['fid'], array('variable' => $threads, 'expiration' => TIMESTAMP));
     } else {
         $threads = $_G['cache']['mobile_toplist_' . $_G['fid']]['variable'];
     }
     $variable = array('forum_threadlist' => mobile_core::getvalues($threads, array('/^\\d+$/')));
     $variable['forum']['password'] = $variable['forum']['password'] ? '1' : '0';
     mobile_core::result(mobile_core::variable($variable));
 }
Example #21
0
 function common()
 {
     global $_G;
     loadcache('mobile_hotforum');
     if (!$_G['cache']['mobile_hotforum'] || TIMESTAMP - $_G['cache']['mobile_hotforum']['expiration'] > 3600) {
         $query = DB::query("SELECT f.*, ff.redirect FROM " . DB::table('forum_forum') . " f LEFT JOIN " . DB::table('forum_forumfield') . " ff ON ff.fid=f.fid WHERE f.status='1' AND f.type='forum' ORDER BY f.todayposts DESC");
         $data = array();
         while ($row = DB::fetch($query)) {
             if ($row['redirect']) {
                 continue;
             }
             list($row['lastpost_tid'], $row['lastpost_subject'], $row['lastpost'], $row['lastposter']) = explode("\t", $row['lastpost']);
             $row['lastpost'] = dgmdate($row['lastpost']);
             $data[] = mobile_core::getvalues($row, array('fid', 'name', 'threads', 'posts', 'lastpost', 'lastposter', 'lastpost_tid', 'lastpost_subject', 'todayposts'));
         }
         $variable = array('data' => $data);
         savecache('mobile_hotforum', array('variable' => $variable, 'expiration' => TIMESTAMP));
     } else {
         $variable = $_G['cache']['mobile_hotforum']['variable'];
     }
     mobile_core::result(mobile_core::variable($variable));
 }
Example #22
0
 function common()
 {
     global $_G;
     $forums = array();
     $query = DB::query("SELECT f.fid, f.type, f.name, f.fup, f.status, ff.password, ff.redirect, ff.viewperm, ff.postperm, ff.threadtypes, ff.threadsorts FROM " . DB::table('forum_forum') . " f LEFT JOIN " . DB::table('forum_forumfield') . " ff ON ff.fid=f.fid LEFT JOIN " . DB::table('forum_access') . " a ON a.fid=f.fid AND a.allowview>'0' WHERE f.status='1' ORDER BY f.type, f.displayorder");
     while ($forum = DB::fetch($query)) {
         if ($forum['redirect'] || $forum['password']) {
             continue;
         }
         if (!$forum['viewperm'] || $forum['viewperm'] && forumperm($forum['viewperm'])) {
             if ($forum['threadsorts']) {
                 $forum['threadsorts'] = mobile_core::getvalues(unserialize($forum['threadsorts']), array('required', 'types'));
             }
             if ($forum['threadtypes']) {
                 $forum['threadtypes'] = mobile_core::getvalues(unserialize($forum['threadtypes']), array('required', 'types'));
             }
             $forums[] = mobile_core::getvalues($forum, array('fid', 'type', 'name', 'fup', 'viewperm', 'postperm', 'status', 'threadsorts', 'threadtypes'));
         }
     }
     $variable['forums'] = $forums;
     mobile_core::result(mobile_core::variable($variable));
 }
Example #23
0
 function output()
 {
     global $_G;
     $variable = array('filename' => $GLOBALS['attach']['filename'], 'description' => $GLOBALS['attach']['description'], 'authorid' => $GLOBALS['attach']['uid'], 'author' => $GLOBALS['attach']['author'], 'price' => $GLOBALS['attach']['price'], 'balance' => $GLOBALS['balance'], 'credit' => mobile_core::getvalues($_G['setting']['extcredits'][$_G['setting']['creditstransextra'][1]], array('title', 'unit')));
     mobile_core::result(mobile_core::variable($variable));
 }
Example #24
0
 function output()
 {
     global $_G;
     $variable = array('list' => array_values(mobile_core::getvalues($GLOBALS['list'], array('/^.+?$/'), array('uid', 'username'))), 'count' => $GLOBALS['count']);
     mobile_core::result(mobile_core::variable($variable));
 }
Example #25
0
 function output()
 {
     global $_G;
     $variable = array('data' => array_values(mobile_core::getvalues($GLOBALS['data']['hot']['threadlist'], array('/^.+?$/'), array('tid', 'fid', 'author', 'authorid', 'dbdateline', 'dateline', 'replies', 'dblastpost', 'lastpost', 'lastposter', 'subject', 'attachment', 'views'))), 'perpage' => $GLOBALS['perpage']);
     mobile_core::result(mobile_core::variable($variable));
 }
    foreach ($_G['forum_threadlist'] as $k => $thread) {
        $_G['forum_threadlist'][$k]['recommend'] = isset($memberrecommends[$thread['icontid']]) ? 1 : 0;
    }
}
foreach ($GLOBALS['sublist'] as $k => $sublist) {
    if ($sublist['icon']) {
        $icon = preg_match('/src="(.+?)"/', $sublist['icon'], $r) ? $r[1] : '';
        if (!preg_match('/^http:\\//', $icon)) {
            $icon = $_G['siteurl'] . $icon;
        }
        $GLOBALS['sublist'][$k]['icon'] = $icon;
    }
}
if ($_G['forum']['icon']) {
    require_once libfile('function/forumlist');
    if (strncasecmp($_G['forum']['icon'], 'http://', 7) !== 0) {
        $_G['forum']['icon'] = get_forumimg($_G['forum']['icon']);
        if (strncasecmp($_G['forum']['icon'], 'http://', 7) !== 0) {
            $_G['forum']['icon'] = $_G['siteurl'] . $_G['forum']['icon'];
        }
    }
}
$_G['forum']['threadcount'] = $_G['forum_threadcount'];
$variable = array('forum' => mobile_core::getvalues($_G['forum'], array('fid', 'fup', 'name', 'threads', 'posts', 'rules', 'autoclose', 'password', 'icon', 'threadcount', 'picstyle')), 'group' => mobile_core::getvalues($_G['group'], array('groupid', 'grouptitle')), 'forum_threadlist' => mobile_core::getvalues(array_values($_G['forum_threadlist']), array('/^\\d+$/'), array('tid', 'author', 'authorid', 'subject', 'subject', 'dbdateline', 'dateline', 'dblastpost', 'lastpost', 'lastposter', 'attachment', 'replies', 'readperm', 'views', 'digest', 'cover', 'recommend', 'recommend_add', 'reply', 'avatar', 'displayorder', 'coverpath', 'typeid')), 'groupiconid' => $groupiconIds, 'sublist' => mobile_core::getvalues($GLOBALS['sublist'], array('/^\\d+$/'), array('fid', 'name', 'threads', 'todayposts', 'posts', 'icon')), 'tpp' => $_G['tpp'], 'page' => $GLOBALS['page']);
if (!empty($_G['forum']['threadtypes']) || !empty($_GET['debug'])) {
    $variable['threadtypes'] = $_G['forum']['threadtypes'];
}
if (!empty($_G['forum']['threadsorts']) || !empty($_GET['debug'])) {
    $variable['threadsorts'] = $_G['forum']['threadsorts'];
}
$variable['forum']['password'] = $variable['forum']['password'] ? '1' : '0';
Example #27
0
 function output()
 {
     global $_G, $thread;
     if ($GLOBALS['hiddenreplies']) {
         foreach ($GLOBALS['postlist'] as $k => $post) {
             if (!$post['first'] && $_G['uid'] != $post['authorid'] && $_G['uid'] != $_G['forum_thread']['authorid'] && !$_G['forum']['ismoderator']) {
                 $GLOBALS['postlist'][$k]['message'] = lang('plugin/mobile', 'mobile_post_author_visible');
                 $GLOBALS['postlist'][$k]['attachments'] = array();
             }
         }
     }
     $_G['thread']['lastpost'] = dgmdate($_G['thread']['lastpost']);
     $variable = array('thread' => $_G['thread'], 'fid' => $_G['fid'], 'postlist' => array_values(mobile_core::getvalues($GLOBALS['postlist'], array('/^\\d+$/'), array('pid', 'tid', 'author', 'first', 'dbdateline', 'dateline', 'username', 'adminid', 'memberstatus', 'authorid', 'username', 'groupid', 'memberstatus', 'status', 'message', 'number', 'memberstatus', 'groupid', 'attachment', 'attachments', 'attachlist', 'imagelist', 'anonymous'))), 'imagelist' => array(), 'ppp' => $_G['ppp'], 'setting_rewriterule' => $_G['setting']['rewriterule'], 'setting_rewritestatus' => $_G['setting']['rewritestatus'], 'forum_threadpay' => $_G['forum_threadpay'], 'cache_custominfo_postno' => $_G['cache']['custominfo']['postno']);
     if (!empty($GLOBALS['threadsortshow'])) {
         $optionlist = array();
         foreach ($GLOBALS['threadsortshow']['optionlist'] as $key => $val) {
             $val['optionid'] = $key;
             $optionlist[] = $val;
         }
         if (!empty($optionlist)) {
             $GLOBALS['threadsortshow']['optionlist'] = $optionlist;
             $GLOBALS['threadsortshow']['threadsortname'] = $_G['forum']['threadsorts']['types'][$thread['sortid']];
         }
     }
     $threadsortshow = mobile_core::getvalues($GLOBALS['threadsortshow'], array('/^(?!typetemplate).*$/'));
     if (!empty($threadsortshow)) {
         $variable['threadsortshow'] = $threadsortshow;
     }
     foreach ($variable['postlist'] as $k => $post) {
         if (!$_G['forum']['ismoderator'] && $_G['setting']['bannedmessages'] & 1 && ($post['authorid'] && !$post['username'] || $_G['thread']['digest'] == 0 && ($post['groupid'] == 4 || $post['groupid'] == 5 || $post['memberstatus'] == '-1'))) {
             $message = lang('forum/template', 'message_banned');
         } elseif (!$_G['forum']['ismoderator'] && $post['status'] & 1) {
             $message = lang('forum/template', 'message_single_banned');
         } elseif ($GLOBALS['needhiddenreply']) {
             $message = lang('forum/template', 'message_ishidden_hiddenreplies');
         } elseif ($post['first'] && $_G['forum_threadpay']) {
             $message = lang('forum/template', 'pay_threads') . ' ' . $GLOBALS['thread']['price'] . ' ' . $_G['setting']['extcredits'][$_G['setting']['creditstransextra'][1]]['unit'] . $_G['setting']['extcredits'][$_G['setting']['creditstransextra'][1]]['title'];
         } elseif ($_G['forum_discuzcode']['passwordlock']) {
             $message = lang('forum/template', 'message_password_exists');
         } else {
             $message = '';
         }
         if ($message) {
             $variable['postlist'][$k]['message'] = $message;
         }
         if ($post['anonymous'] && !$_G['forum']['ismoderator']) {
             $variable['postlist'][$k]['username'] = $variable['postlist'][$k]['author'] = '';
             $variable['postlist'][$k]['adminid'] = $variable['postlist'][$k]['groupid'] = $variable['postlist'][$k]['authorid'] = 0;
         }
         if (strpos($variable['postlist'][$k]['message'], '[/tthread]') !== FALSE) {
             $matches = array();
             preg_match('/\\[tthread=(.+?),(.+?)\\](.*?)\\[\\/tthread\\]/', $variable['postlist'][$k]['message'], $matches);
             $variable['postlist'][$k]['message'] = preg_replace('/\\[tthread=(.+?)\\](.*?)\\[\\/tthread\\]/', lang('plugin/qqconnect', 'connect_tthread_message', array('username' => $matches[1], 'nick' => $matches[2])), $variable['postlist'][$k]['message']);
         }
     }
     foreach ($GLOBALS['aimgs'] as $pid => $aids) {
         foreach ($aids as $aid) {
             $variable['imagelist'][] = $GLOBALS['postlist'][$pid]['attachments'][$aid]['url'] . $GLOBALS['postlist'][$pid]['attachments'][$aid]['attachment'];
         }
     }
     if (!empty($GLOBALS['polloptions'])) {
         $variable['special_poll']['polloptions'] = $GLOBALS['polloptions'];
         $variable['special_poll']['expirations'] = $GLOBALS['expirations'];
         $variable['special_poll']['multiple'] = $GLOBALS['multiple'];
         $variable['special_poll']['maxchoices'] = $GLOBALS['maxchoices'];
         $variable['special_poll']['voterscount'] = $GLOBALS['voterscount'];
         $variable['special_poll']['visiblepoll'] = $GLOBALS['visiblepoll'];
         $variable['special_poll']['allowvote'] = $_G['group']['allowvote'];
         $variable['special_poll']['remaintime'] = $thread['remaintime'];
     }
     if (!empty($GLOBALS['rewardprice'])) {
         $variable['special_reward']['rewardprice'] = $GLOBALS['rewardprice'] . ' ' . $_G['setting']['extcredits'][$_G['setting']['creditstransextra'][2]]['title'];
         $variable['special_reward']['bestpost'] = $GLOBALS['bestpost'];
     }
     if (!empty($GLOBALS['trades'])) {
         $variable['special_trade'] = $GLOBALS['trades'];
     }
     if (!empty($GLOBALS['debate'])) {
         $variable['special_debate'] = $GLOBALS['debate'];
     }
     if (!empty($GLOBALS['activity'])) {
         $variable['special_activity'] = $GLOBALS['activity'];
     }
     $variable['forum']['password'] = $variable['forum']['password'] ? '1' : '0';
     mobile_core::result(mobile_core::variable($variable));
 }
Example #28
0
 function output()
 {
     global $_G, $thread;
     if ($GLOBALS['hiddenreplies']) {
         foreach ($GLOBALS['postlist'] as $k => $post) {
             if (!$post['first'] && $_G['uid'] != $post['authorid'] && $_G['uid'] != $_G['forum_thread']['authorid'] && !$_G['forum']['ismoderator']) {
                 $GLOBALS['postlist'][$k]['message'] = lang('plugin/mobile', 'mobile_post_author_visible');
                 $GLOBALS['postlist'][$k]['attachments'] = array();
             }
         }
     }
     $_G['thread']['lastpost'] = dgmdate($_G['thread']['lastpost']);
     $_G['thread']['recommend'] = $_G['uid'] && C::t('forum_memberrecommend')->fetch_by_recommenduid_tid($_G['uid'], $_G['tid']) ? 1 : 0;
     $variable = array('thread' => $_G['thread'], 'fid' => $_G['fid'], 'postlist' => array_values(mobile_core::getvalues($GLOBALS['postlist'], array('/^\\d+$/'), array('pid', 'tid', 'author', 'first', 'dbdateline', 'dateline', 'username', 'adminid', 'memberstatus', 'authorid', 'username', 'groupid', 'memberstatus', 'status', 'message', 'number', 'memberstatus', 'groupid', 'attachment', 'attachments', 'attachlist', 'imagelist', 'anonymous'))), 'ppp' => $_G['ppp'], 'setting_rewriterule' => $_G['setting']['rewriterule'], 'setting_rewritestatus' => $_G['setting']['rewritestatus'], 'forum_threadpay' => $_G['forum_threadpay'], 'cache_custominfo_postno' => $_G['cache']['custominfo']['postno']);
     if (!empty($GLOBALS['threadsortshow'])) {
         $optionlist = array();
         foreach ($GLOBALS['threadsortshow']['optionlist'] as $key => $val) {
             $val['optionid'] = $key;
             $optionlist[] = $val;
         }
         if (!empty($optionlist)) {
             $GLOBALS['threadsortshow']['optionlist'] = $optionlist;
             $GLOBALS['threadsortshow']['threadsortname'] = $_G['forum']['threadsorts']['types'][$thread['sortid']];
         }
     }
     $threadsortshow = mobile_core::getvalues($GLOBALS['threadsortshow'], array('/^(?!typetemplate).*$/'));
     if (!empty($threadsortshow)) {
         $variable['threadsortshow'] = $threadsortshow;
     }
     foreach ($variable['postlist'] as $k => $post) {
         if (!$_G['forum']['ismoderator'] && $_G['setting']['bannedmessages'] & 1 && ($post['authorid'] && !$post['username'] || $_G['thread']['digest'] == 0 && ($post['groupid'] == 4 || $post['groupid'] == 5 || $post['memberstatus'] == '-1'))) {
             $message = lang('forum/template', 'message_banned');
         } elseif (!$_G['forum']['ismoderator'] && $post['status'] & 1) {
             $message = lang('forum/template', 'message_single_banned');
         } elseif ($GLOBALS['needhiddenreply']) {
             $message = lang('forum/template', 'message_ishidden_hiddenreplies');
         } elseif ($post['first'] && $_G['forum_threadpay']) {
             $message = lang('forum/template', 'pay_threads') . ' ' . $GLOBALS['thread']['price'] . ' ' . $_G['setting']['extcredits'][$_G['setting']['creditstransextra'][1]]['unit'] . $_G['setting']['extcredits'][$_G['setting']['creditstransextra'][1]]['title'];
         } elseif ($_G['forum_discuzcode']['passwordlock']) {
             $message = lang('forum/template', 'message_password_exists');
         } else {
             $message = '';
         }
         if ($message) {
             $variable['postlist'][$k]['message'] = $message;
         }
         if ($post['anonymous'] && !$_G['forum']['ismoderator']) {
             $variable['postlist'][$k]['username'] = $variable['postlist'][$k]['author'] = '';
             $variable['postlist'][$k]['adminid'] = $variable['postlist'][$k]['groupid'] = $variable['postlist'][$k]['authorid'] = 0;
         }
         if (strpos($variable['postlist'][$k]['message'], '[/tthread]') !== FALSE) {
             $matches = array();
             preg_match('/\\[tthread=(.+?),(.+?)\\](.*?)\\[\\/tthread\\]/', $variable['postlist'][$k]['message'], $matches);
             $variable['postlist'][$k]['message'] = preg_replace('/\\[tthread=(.+?)\\](.*?)\\[\\/tthread\\]/', lang('plugin/qqconnect', 'connect_tthread_message', array('username' => $matches[1], 'nick' => $matches[2])), $variable['postlist'][$k]['message']);
         }
         $variable['postlist'][$k]['message'] = preg_replace("/<a\\shref=\"([^\"]+?)\"\\starget=\"_blank\">\\[viewimg\\]<\\/a>/is", "<img src=\"\\1\" />", $variable['postlist'][$k]['message']);
         $variable['postlist'][$k]['message'] = mobile_api::_findimg($variable['postlist'][$k]['message']);
         if ($GLOBALS['aimgs'][$post['pid']]) {
             $imagelist = array();
             foreach ($GLOBALS['aimgs'][$post['pid']] as $aid) {
                 $url = mobile_api::_parseimg('', $GLOBALS['postlist'][$post['pid']]['attachments'][$aid]['url'] . $GLOBALS['postlist'][$post['pid']]['attachments'][$aid]['attachment'], '');
                 if (strexists($variable['postlist'][$k]['message'], '[attach]' . $aid . '[/attach]')) {
                     $variable['postlist'][$k]['message'] = str_replace('[attach]' . $aid . '[/attach]', mobile_image($url), $variable['postlist'][$k]['message']);
                     unset($variable['postlist'][$k]['attachments'][$aid]);
                 } else {
                     $imagelist[] = $aid;
                 }
             }
             $variable['postlist'][$k]['imagelist'] = $imagelist;
         }
         $variable['postlist'][$k]['message'] = preg_replace("/\\[attach\\]\\d+\\[\\/attach\\]/i", '', $variable['postlist'][$k]['message']);
         $variable['postlist'][$k]['message'] = preg_replace('/(&nbsp;){2,}/', '', $variable['postlist'][$k]['message']);
         $variable['postlist'][$k]['avatar'] = avatar($post['authorid'], 'small', true);
         $variable['postlist'][$k]['dateline'] = strip_tags($post['dateline']);
     }
     if (!empty($GLOBALS['polloptions'])) {
         $variable['special_poll']['polloptions'] = $GLOBALS['polloptions'];
         $variable['special_poll']['expirations'] = $GLOBALS['expirations'];
         $variable['special_poll']['multiple'] = $GLOBALS['multiple'];
         $variable['special_poll']['maxchoices'] = $GLOBALS['maxchoices'];
         $variable['special_poll']['voterscount'] = $GLOBALS['voterscount'];
         $variable['special_poll']['visiblepoll'] = $GLOBALS['visiblepoll'];
         $variable['special_poll']['allowvote'] = $_G['group']['allowvote'];
         $variable['special_poll']['remaintime'] = $thread['remaintime'];
     }
     if (!empty($GLOBALS['rewardprice'])) {
         $variable['special_reward']['rewardprice'] = $GLOBALS['rewardprice'] . ' ' . $_G['setting']['extcredits'][$_G['setting']['creditstransextra'][2]]['title'];
         $variable['special_reward']['bestpost'] = $GLOBALS['bestpost'];
     }
     if (!empty($GLOBALS['trades'])) {
         $variable['special_trade'] = $GLOBALS['trades'];
     }
     if (!empty($GLOBALS['debate'])) {
         $variable['special_debate'] = $GLOBALS['debate'];
     }
     if (!empty($GLOBALS['activity'])) {
         $variable['special_activity'] = $GLOBALS['activity'];
     }
     $variable['forum']['password'] = $variable['forum']['password'] ? '1' : '0';
     mobile_core::result(mobile_core::variable($variable));
 }
Example #29
0
 function output()
 {
     global $_G;
     $variable = array('list' => mobile_core::getvalues($GLOBALS['grouppms'], array('/^\\d+$/'), array('id', 'authorid', 'author', 'dateline', 'message')), 'count' => count($GLOBALS['grouppms']), 'perpage' => $GLOBALS['perpage'], 'page' => $GLOBALS['page']);
     mobile_core::result(mobile_core::variable($variable));
 }
Example #30
0
 function output()
 {
     global $_G;
     $variable = array('list' => mobile_core::getvalues($GLOBALS['list'], array('/^\\d+$/'), array('id', 'uid', 'type', 'new', 'authorid', 'author', 'note', 'dateline', 'from_id', 'from_idtype', 'from_num', 'style', 'rowid')), 'count' => $GLOBALS['count'], 'perpage' => $GLOBALS['perpage'], 'page' => intval($GLOBALS['page']));
     mobile_core::result(mobile_core::variable($variable));
 }