當前位置: 首頁>>代碼示例>>PHP>>正文


PHP mobile_core類代碼示例

本文整理匯總了PHP中mobile_core的典型用法代碼示例。如果您正苦於以下問題:PHP mobile_core類的具體用法?PHP mobile_core怎麽用?PHP mobile_core使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


在下文中一共展示了mobile_core類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: output

 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));
 }
開發者ID:lemonstory,項目名稱:bbs,代碼行數:27,代碼來源:forumindex.php

示例2: common

 function common()
 {
     global $_G;
     $seccodecheck = $secqaacheck = false;
     if ($_GET['type'] == 'register') {
         $seccodecheck = $_G['setting']['seccodestatus'] & 1;
         $secqaacheck = $_G['setting']['secqaa']['status'] & 1;
     } elseif ($_GET['type'] == 'login') {
         $seccodecheck = $_G['setting']['seccodestatus'] & 2;
     } elseif ($_GET['type'] == 'post') {
         $seccodecheck = $_G['setting']['seccodestatus'] & 4 && (!$_G['setting']['seccodedata']['minposts'] || getuserprofile('posts') < $_G['setting']['seccodedata']['minposts']);
         $secqaacheck = $_G['setting']['secqaa']['status'] & 2 && (!$_G['setting']['secqaa']['minposts'] || getuserprofile('posts') < $_G['setting']['secqaa']['minposts']);
     }
     $sechash = random(8);
     if ($seccodecheck || $secqaacheck) {
         $variable = array('sechash' => $sechash);
         if ($seccodecheck) {
             $variable['seccode'] = $_G['siteurl'] . 'api/mobile/index.php?module=seccode&sechash=' . $sechash . '&version=' . (empty($_GET['secversion']) ? '1' : $_GET['secversion']);
         }
         if ($secqaacheck) {
             require_once libfile('function/seccode');
             $variable['secqaa'] = make_secqaa($sechash);
         }
     }
     mobile_core::result(mobile_core::variable($variable));
 }
開發者ID:dalinhuang,項目名稱:healthshop,代碼行數:26,代碼來源:secure.php

示例3: output

 function output()
 {
     global $_G;
     include_once 'source/plugin/mobile/api/4/sub_threadlist.php';
     $variable['hash'] = md5(substr(md5($_G['config']['security']['authkey']), 8) . $_G['uid']);
     mobile_core::result(mobile_core::variable($variable));
 }
開發者ID:lemonstory,項目名稱:bbs,代碼行數:7,代碼來源:forumdisplay.php

示例4: output

 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));
 }
開發者ID:samyex6,項目名稱:discuz3.2-lite,代碼行數:27,代碼來源:forumdisplay.php

示例5: output

 function output()
 {
     global $_G;
     //帖子列表增加圖片 -start
     require_once libfile('function/discuzcode');
     foreach ($GLOBALS['data']['my']['threadlist'] as $k => $thread) {
         $post = C::t('forum_post')->fetch_threadpost_by_tid_invisible($GLOBALS['data']['my']['threadlist'][$k]['tid'], 0);
         $attachment[$post['pid']] = array();
         $GLOBALS['data']['my']['threadlist'][$k]['pid'] = $post['pid'];
         //TODO:下麵的代碼直接調用discuzcode時,會報錯
         //./source/plugin/mobile/template/discuzcode.htm 文件不存在
         //cp ./source/plugin/mobile/template/mobile/discuzcode.htm ./source/plugin/mobile/template/
         //拷貝一份就可以了,原因未查明
         $GLOBALS['data']['my']['threadlist'][$k]['message'] = discuzcode($post['message']);
         //附件,0無附件 1普通附件 2有圖片附件
         if (!empty($post['attachment']) && intval($post['attachment']) == 2) {
             $GLOBALS['data']['my']['threadlist'][$k]['attachments'] = array();
             $GLOBALS['data']['my']['threadlist'][$k]['imagelist'] = array();
             require_once libfile('function/attachment');
             $_G['tid'] = $post['tid'];
             parseattach(array_keys($attachment), array(), $attachment);
             $GLOBALS['data']['my']['threadlist'][$k]['attachments'] = $attachment[$post['pid']]['attachments'];
             $GLOBALS['data']['my']['threadlist'][$k]['imagelist'] = $attachment[$post['pid']]['imagelist'];
             unset($_G['tid']);
         }
     }
     //帖子列表增加圖片 -end
     $data['forumnames'] = $GLOBALS['data']['my']['forumnames'];
     $data['threadcount'] = $GLOBALS['data']['my']['threadcount'];
     $data['threadlist'] = array_values($GLOBALS['data']['my']['threadlist']);
     $variable = array('data' => $data, 'perpage' => $GLOBALS['perpage']);
     mobile_core::result(mobile_core::variable($variable));
 }
開發者ID:lemonstory,項目名稱:bbs,代碼行數:33,代碼來源:mythread.php

示例6: output

 function output()
 {
     global $_G;
     $list = array_values($GLOBALS['list']);
     foreach ($list as $key => $value) {
         $list[$key]['dateline'] = date("Y-m-d H:i", $value['dateline']);
         if (isset($value['url'])) {
             unset($list[$key]['url']);
         }
         if (isset($value['url'])) {
             unset($list[$key]['url']);
         }
         if (isset($value['icon'])) {
             unset($list[$key]['icon']);
         }
     }
     if (!isset($_GET['page']) || !is_numeric($_GET['page']) || $_GET['page'] <= 0) {
         $_GET['page'] = 1;
     }
     $start = $GLOBALS['perpage'] * ($_GET['page'] - 1);
     $end = count($GLOBALS['list']) + $start;
     if ($end >= $GLOBALS['count']) {
         $GLOBALS['need_more'] = 0;
     } else {
         $GLOBALS['need_more'] = 1;
     }
     $variable = array('list' => $list, 'perpage' => $GLOBALS['perpage'], 'need_more' => $GLOBALS['need_more'], 'count' => $GLOBALS['count']);
     mobile_core::result(mobile_core::variable($variable));
 }
開發者ID:Mushan3420,項目名稱:BigApp-PHP7,代碼行數:29,代碼來源:myfavarticle.php

示例7: output

 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));
 }
開發者ID:softhui,項目名稱:discuz,代碼行數:7,代碼來源:sublist.php

示例8: output

 function output()
 {
     $variable = array();
     global $_G;
     if (true === BigAppConf::$debug) {
         $_G['trace'][] = __CLASS__ . '::' . __FUNCTION__;
     }
     $variable = array();
     if (isset($_G['messageparam'])) {
         foreach ($_G['messageparam'] as $value) {
             if (is_array($value) && isset($value['favid'])) {
                 $variable['favid'] = $value['favid'];
                 break;
             }
         }
     }
     if (!isset($variable['favid']) || empty($variable['favid'])) {
         $sql = 'SELECT favid FROM ' . DB::table('home_favorite') . ' WHERE uid = ' . $_G['uid'] . ' AND id = ' . $_GET['id'] . ' AND idtype = \'aid\'';
         $query = DB::query($sql);
         while ($dbRet = DB::fetch($query)) {
             if (isset($dbRet['favid'])) {
                 $variable['favid'] = $dbRet['favid'];
                 break;
             }
         }
     }
     if (!isset($variable['favid'])) {
         $variable['favid'] = 0;
     }
     mobile_core::result(mobile_core::variable($variable));
 }
開發者ID:Mushan3420,項目名稱:BigApp-PHP7,代碼行數:31,代碼來源:favarticle.php

示例9: output

 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));
 }
開發者ID:Jaedeok-seol,項目名稱:discuz_template,代碼行數:33,代碼來源:viewthread.php

示例10: output

 function output()
 {
     if ($_GET['t'] == 'output') {
         $variable = array();
         mobile_core::result(mobile_core::variable($variable));
     }
 }
開發者ID:samyex6,項目名稱:discuz3.2-lite,代碼行數:7,代碼來源:forummisc.php

示例11: output

 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));
 }
開發者ID:lemonstory,項目名稱:bbs,代碼行數:29,代碼來源:mynotelist.php

示例12: output

 function output()
 {
     global $_G;
     $data = $GLOBALS['space'];
     unset($data['password'], $data['email'], $data['regip'], $data['lastip'], $data['regip_loc'], $data['lastip_loc']);
     $variable = array('space' => $data, 'extcredits' => $_G['setting']['extcredits']);
     mobile_core::result(mobile_core::variable($variable));
 }
開發者ID:MCHacker,項目名稱:discuz-docker,代碼行數:8,代碼來源:profile.php

示例13: common

 function common()
 {
     $apifile = 'source/plugin/mobile/api/' . $_GET['version'] . '/sub_checkpost.php';
     if (file_exists($apifile)) {
         require_once $apifile;
     }
     mobile_core::result(mobile_core::variable(mobile_api_sub::getvariable()));
 }
開發者ID:MCHacker,項目名稱:discuz-docker,代碼行數:8,代碼來源:checkpost.php

示例14: output

 function output()
 {
     global $_G;
     foreach ($GLOBALS['data']['hot']['threadlist'] as $tid => $thread) {
         $GLOBALS['data']['hot']['threadlist'][$tid]['avatar'] = avatar($thread['authorid'], 'big', true);
     }
     $variable = array('data' => array_values($GLOBALS['data']['hot']['threadlist']), 'perpage' => $GLOBALS['perpage']);
     mobile_core::result(mobile_core::variable($variable));
 }
開發者ID:renning,項目名稱:html,代碼行數:9,代碼來源:hotthread.php

示例15: output

 function output()
 {
     $comments = array();
     foreach ($GLOBALS['comments'] as $comment) {
         $comments[] = array('author' => $comment['author'], 'authorid' => $comment['authorid'], 'avatar' => avatar($comment['authorid'], 'small', 1), 'message' => $comment['comment'], 'dateline' => strip_tags($comment['dateline']));
     }
     $variable = array('tid' => $_GET['tid'], 'pid' => $_GET['pid'], 'postlist' => $comments);
     mobile_core::result(mobile_core::variable($variable));
 }
開發者ID:hacktea8,項目名稱:d_z_s_t_u_d_e_n_t,代碼行數:9,代碼來源:showactivity.php


注:本文中的mobile_core類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。