本文整理汇总了PHP中Mobile::output方法的典型用法代码示例。如果您正苦于以下问题:PHP Mobile::output方法的具体用法?PHP Mobile::output怎么用?PHP Mobile::output使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Mobile
的用法示例。
在下文中一共展示了Mobile::output方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: reminded
function reminded()
{
$my = jsg_member_info(MEMBER_ID);
if (!$my) {
Mobile::error("No User", 300);
}
$ret = array('at_count' => $my['at_new'], 'comment_count' => $my['comment_new'], 'pm_count' => $my['newpm'], 'total' => (string) ($my['at_new'] + $my['comment_new'] + $my['newpm']));
Mobile::output($ret);
}
示例2: getHistoryList
function getHistoryList()
{
$uid = intval($this->Get['uid']);
if (empty($uid)) {
Mobile::error("No Error Tips", 321);
}
$info = $this->MyPmLogic->getHistoryList(MEMBER_ID, $uid, array("per_page_num" => Mobile::config("perpage_pm")));
if (!empty($info)) {
$info['current_page'] = empty($info['current_page']) ? 1 : $info['current_page'];
Mobile::output($info);
} else {
Mobile::error("No Error Tips", 400);
}
}
示例3: searchUser
function searchUser()
{
Mobile::logic('member');
$MemberLogic = new MemberLogic();
$q = trim($this->Get['q']);
if (empty($q)) {
Mobile::error("No Data", 400);
}
$param = array('limit' => Mobile::config("perpage_member"), 'nickname' => $q, 'max_id' => $this->Get['max_id']);
$ret = $MemberLogic->getMemberList($param);
if (is_array($ret)) {
Mobile::output($ret);
} else {
Mobile::error("No Data", $ret);
}
}
示例4: blacklist
function blacklist()
{
$param = array('limit' => Mobile::config("perpage_member"), 'uid' => intval($this->Get['uid']), 'max_id' => intval($this->Get['max_id']));
$ret = $this->FriendLogic->getBlackList($param);
if (is_array($ret)) {
Mobile::output($ret);
} else {
Mobile::error("No Error Tips", $ret);
}
}
示例5: add
function add()
{
if (MEMBER_ID < 1) {
Mobile::error('No Login', 410);
}
if ($this->MemberHandler->HasPermission($this->Module, $this->Code) == false) {
Mobile::error('No Permission', 411);
}
$content = trim(strip_tags($this->Post['content']));
if (!$content) {
Mobile::error('No Content', 420);
}
$topic_type = $this->Post['topictype'];
if ('both' == $topic_type) {
$type = 'both';
} elseif ('reply' == $topic_type) {
$type = 'reply';
} elseif ('forward' == $topic_type) {
$type = 'forward';
} elseif ('qun' == $topic_type) {
$type = 'qun';
} elseif ('personal' == $topic_type) {
$type = 'personal';
} elseif (is_numeric($topic_type)) {
$type = 'first';
} else {
$type = 'first';
}
$totid = max(0, (int) $this->Post['totid']);
$imageid = $this->Upload();
$videoid = max(0, (int) $this->Post['videoid']);
$longtextid = max(0, (int) $this->Post['longtextid']);
$subjectid = max(0, (int) $this->Post['subjectid']);
$from = trim(strtolower($this->Post['from']));
$item = trim($this->Post['item']);
$item_id = intval(trim($this->Post['item_id']));
if (!empty($item_id)) {
jfunc('app');
$ret = app_check($item, $item_id);
if (!$ret) {
$item = '';
$item_id = 0;
}
} else {
$item = '';
$item_id = 0;
}
$data = array('content' => $content, 'totid' => $totid, 'imageid' => $imageid, 'videoid' => $videoid, 'from' => empty($from) ? 'mobile' : $from, 'type' => $type, 'item' => $item, 'item_id' => $item_id, 'longtextid' => $longtextid, 'subjectid' => $subjectid);
$return = $this->TopicLogic->Add($data);
if (is_array($return) && $return['tid'] > 0) {
Mobile::success('Publish Success' . $subjectid, 200);
} else {
$return = is_string($return) ? $return : (is_array($return) ? implode("", $return) : "Unkown Error");
Mobile::output($return, 'Error', 430);
}
}
示例6: error
function error($e)
{
$text = "ERROR<br><br>";
if ($e == "fileNotFound") {
$text .= "テンプレートファイルが見つかりません。<br><br>";
}
$this->tempData = array("{%text}" => $text);
$html_temp = "{%text}";
$html = Mobile::tempReplace($html_temp, $this->tempData);
Mobile::output($html);
//HTMLを出力
exit;
}
示例7: success
function success($msg, $code = 200, $halt = true)
{
Mobile::output($msg, 'Success', $code, false);
$halt && exit;
}
示例8: getUserInfo
function getUserInfo()
{
Mobile::is_login();
$uid = trim($this->Get['uid']);
$nick = get_safe_code(trim($this->Get['nick']));
if (!empty($uid) && $uid > 0) {
$member = DB::fetch_first("SELECT * FROM " . DB::table('members') . " WHERE uid='{$uid}'");
} else {
if (!empty($nick)) {
$member = DB::fetch_first("SELECT * FROM " . DB::table('members') . " WHERE nickname='{$nick}'");
}
}
if (empty($member)) {
Mobile::error("No User", 300);
}
$ret = array('uid' => $member['uid'], 'nick' => $member['nickname'], 'gender' => $member['gender'], 'face' => face_get($member), 'face_original' => face_get($member, 'big'), 'signature' => $member['signature'], 'province' => $member['province'], 'city' => $member['city'], 'fans_num' => $member['fans_count'], 'follower_num' => $member['follow_count'], 'mblog_num' => $member['topic_count'], 'topic_num' => $member['tag_favorite_count']);
Mobile::output($ret);
}