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


PHP WebUtils::initWebApiArray_oldVersion方法代碼示例

本文整理匯總了PHP中WebUtils::initWebApiArray_oldVersion方法的典型用法代碼示例。如果您正苦於以下問題:PHP WebUtils::initWebApiArray_oldVersion方法的具體用法?PHP WebUtils::initWebApiArray_oldVersion怎麽用?PHP WebUtils::initWebApiArray_oldVersion使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在WebUtils的用法示例。


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

示例1: run

 public function run($keyword, $page = 1, $pageSize = 10, $searchid = 0)
 {
     $keyword = rawurldecode($keyword);
     $res = WebUtils::initWebApiArray_oldVersion();
     $res = $this->_getForumData($res, $keyword, $page, $pageSize, $searchid);
     echo WebUtils::outputWebApi($res, '', false);
 }
開發者ID:frogoscar,項目名稱:mobcent-discuz,代碼行數:7,代碼來源:SearchAction.php

示例2: run

 public function run($type = 'follow', $page = 1, $pageSize = 10, $orderBy = 'dateline', $longitude = '', $latitude = '', $radius = 100000)
 {
     $res = WebUtils::initWebApiArray_oldVersion();
     switch ($orderBy) {
         case 'register':
             $sortType = 'regdate';
             break;
         case 'login':
             $sortType = 'lastvisit';
             break;
         case 'followed':
             $sortType = 'follower';
             break;
         case 'distance':
             $sortType = 'range';
             break;
         case 'dateline':
             $sortType = 'default';
             break;
         case 'at':
             $sortType = 'at';
             break;
         default:
             break;
     }
     global $_G;
     $uid = $_G['uid'];
     $viewUid = isset($_GET['uid']) ? $_GET['uid'] : $uid;
     $res = $this->_getUserInfoList($res, $type, $uid, $viewUid, $page, $pageSize, $sortType, $longitude, $latitude, $radius);
     echo WebUtils::outputWebApi($res, '', false);
 }
開發者ID:caidongyun,項目名稱:CS,代碼行數:31,代碼來源:UserListAction.php

示例3: run

 public function run($tid, $act = 'apply')
 {
     $res = WebUtils::initWebApiArray_oldVersion();
     $uid = $this->getController()->uid;
     // $_REQUEST['json'] = "{'payment':1,'payvalue':100, 'realname': '請求參數11', 'qq': '8', 'message': '請求參數'}";
     $json = isset($_REQUEST['json']) ? $_REQUEST['json'] : '';
     $json = rawurldecode($json);
     $data = WebUtils::jsonDecode($json);
     if (!empty($data)) {
         foreach ($data as $key => $value) {
             if (is_string($value)) {
                 $data[$key] = WebUtils::t($value);
             }
         }
         switch ($act) {
             case 'apply':
                 $res = $this->_applyActivityTopic($res, $tid, $uid, $data);
                 break;
             case 'cancel':
                 $res = $this->_cancelActivityTopic($res, $tid, $uid, $data);
                 break;
             default:
                 $res = $this->_makeErrorInfo($res, 'activity_apply_params_error');
                 break;
         }
     } else {
         $res = $this->_makeErrorInfo($res, 'activity_apply_params_error');
     }
     echo WebUtils::outputWebApi($res, '', false);
 }
開發者ID:frogoscar,項目名稱:mobcent-discuz,代碼行數:30,代碼來源:TopicActivityAction.php

示例4: endAppWithErrorInfo

 public static function endAppWithErrorInfo($res, $message, $params = array())
 {
     $tmpRes = WebUtils::initWebApiArray_oldVersion();
     $tmpRes = WebUtils::makeErrorInfo_oldVersion($tmpRes, $message, $params);
     $tmpRes = array_merge($tmpRes, $res);
     WebUtils::outputWebApi($tmpRes);
 }
開發者ID:caidongyun,項目名稱:CS,代碼行數:7,代碼來源:WebUtils.php

示例5: run

 public function run($uid, $albumId, $page = 1, $pageSize = 10)
 {
     $res = WebUtils::initWebApiArray_oldVersion();
     $landUid = $this->getController()->uid;
     $res = $this->_getImageInfoList($res, $landUid, $uid, $page, $pageSize, $albumId);
     echo WebUtils::outputWebApi($res, '', false);
 }
開發者ID:frogoscar,項目名稱:mobcent-discuz,代碼行數:7,代碼來源:PhotoListAction.php

示例6: run

 public function run($attachment)
 {
     $res = WebUtils::initWebApiArray_oldVersion();
     $uid = $this->getController()->uid;
     // $attachment ="{'head': {'errCode': 0, 'errInfo': ''}, 'body': {'attachment': {'name': 'test', 'isPost': 1, 'data': 'ss', 'type': 'image', 'module':'forum'}, 'externInfo': {}}}";
     $attachment = rawurldecode($attachment);
     $attachment = WebUtils::jsonDecode($attachment);
     $attachment = isset($attachment['body']['attachment']) ? $attachment['body']['attachment'] : array();
     !isset($attachment['module']) && ($attachment['module'] = 'forum');
     $resAttachment = false;
     if (!empty($attachment)) {
         if ($attachment['isPost'] == 1) {
             if (($data = file_get_contents('php://input')) === false) {
                 $attachment['data'] = $GLOBALS['HTTP_RAW_POST_DATA'];
             } else {
                 $attachment['data'] = $data;
             }
         }
         // $attachment['data'] = WebUtils::httpRequest('http://bbs.appbyme.com/static/image/common/logo.png');// test
         $resAttachment = $this->_saveAttachment($uid, $attachment);
     }
     if ($resAttachment === false) {
         $attachmentTypes = array('audio' => WebUtils::t('語音'), 'image' => WebUtils::t('圖片'));
         $res = WebUtils::makeErrorInfo_oldVersion($res, 'UPLOAD_ATTACHMENT_ERROR', array('{attachment}' => $attachmentTypes[$attachment['type']]));
     } else {
         $res['body']['attachment'] = $resAttachment;
     }
     echo WebUtils::outputWebApi($res, '', false);
 }
開發者ID:frogoscar,項目名稱:mobcent-discuz,代碼行數:29,代碼來源:SendAttachmentAction.php

示例7: run

 public function run()
 {
     $res = WebUtils::initWebApiArray_oldVersion();
     global $_G;
     $uid = $_G['uid'];
     $puid = isset($_GET['userId']) ? $_GET['userId'] : $uid;
     $res = $this->_getUserInfo($res, $uid, $puid);
     $res['info'] = array();
     echo WebUtils::outputWebApi($res, '', false);
 }
開發者ID:caidongyun,項目名稱:CS,代碼行數:10,代碼來源:UserInfoAction.php

示例8: run

 public function run($page = 1, $pageSize = 10)
 {
     $res = WebUtils::initWebApiArray_oldVersion();
     $uid = $this->getController()->uid;
     $params = array('type' => 'friend', 'orderBy' => 'at', 'page' => 0, 'uid' => $uid);
     $friend = $this->_getForWardInfo($params);
     $params = array('type' => 'follow', 'orderBy' => 'dateline', 'page ' => 0, 'uid' => $uid);
     $follow = $this->_getForWardInfo($params);
     $res = $this->_getUserPostFriendPagingListInfo($res, $friend, $follow, $page, $pageSize);
     echo WebUtils::outputWebApi($res, '', false);
 }
開發者ID:caidongyun,項目名稱:CS,代碼行數:11,代碼來源:AtUserListAction.php

示例9: run

 public function run()
 {
     $res = WebUtils::initWebApiArray_oldVersion();
     $uid = $_GET['uid'];
     $page = $_GET['page'] ? $_GET['page'] : 1;
     $pageSize = $_GET['pageSize'] ? $_GET['pageSize'] : 10;
     $type = $_GET['type'];
     $idType = $_GET['idType'] ? $_GET['idType'] : 'tid';
     $res = $this->_getTopicList($res, $type, $idType, $uid, $page, $pageSize, $idtype);
     echo WebUtils::outputWebApi($res, '', false);
 }
開發者ID:frogoscar,項目名稱:mobcent-discuz,代碼行數:11,代碼來源:TopicListAction.php

示例10: run

 public function run($json)
 {
     $res = WebUtils::initWebApiArray_oldVersion();
     // $json = "{'id': 1, 'idType': 'aid', 'page': 1, 'pageSize': 10, }";
     $json = rawurldecode($json);
     $json = WebUtils::jsonDecode($json);
     $res = $this->_checkComment($res, $json);
     if (!WebUtils::checkError($res)) {
         $comments = $this->getCommentList($json);
         $res['body']['list'] = $comments['list'];
         $res = array_merge($res, WebUtils::getWebApiArrayWithPage($res, $json['page'], $json['pageSize'], $comments['count']));
     }
     echo WebUtils::outputWebApi($res, '', false);
 }
開發者ID:caidongyun,項目名稱:CS,代碼行數:14,代碼來源:CommentListAction.php

示例11: run

 public function run($json)
 {
     $res = WebUtils::initWebApiArray_oldVersion();
     // $json = "{'action': 'reply', 'idType': 'aid', 'id': 1, 'content': [{'type': 0, 'infor': '嗬嗬\r\nhaha%25E5%2591%25B5%25E5%2591%25B5%25E2%2580%259C%25E2%2580%259D%2522%2522',}], 'quoteCommentId': 12, }";
     $json = rawurldecode($json);
     $json = WebUtils::jsonDecode($json);
     !isset($json['action']) && ($json['action'] = 'reply');
     !isset($json['idType']) && ($json['idType'] = 'aid');
     switch ($json['action']) {
         case 'reply':
             $res = $this->_commentReply($res, $json);
             break;
         default:
             $res = WebUtils::makeErrorInfo_oldVersion($res, 'mobcent_error_params');
             break;
     }
     echo WebUtils::outputWebApi($res, '', false);
 }
開發者ID:frogoscar,項目名稱:mobcent-discuz,代碼行數:18,代碼來源:CommentAdminAction.php

示例12: run

 public function run()
 {
     $res = WebUtils::initWebApiArray_oldVersion();
     $uid = $this->getController()->uid;
     // get reply info
     $res['body']['replyInfo'] = $this->_getNotifyInfo($uid, 'post');
     // get @me info
     $res['body']['atMeInfo'] = $this->_getNotifyInfo($uid, 'at');
     // 獲取好友通知
     $res['body']['friendInfo'] = $this->_getNotifyInfo($uid, 'friend');
     // get private message that client unreceived
     $res['body']['pmInfos'] = $this->_getPmInfos($uid);
     if (($heartPeriod = WebUtils::getDzPluginAppbymeAppConfig('message_period')) <= 0) {
         $heartPeriod = MINUTE_SECONDS * 2;
     }
     if (($pmPeriod = WebUtils::getDzPluginAppbymeAppConfig('message_pm_period')) <= 0) {
         $pmPeriod = 20;
     }
     $res['body']['externInfo']['heartPeriod'] = $heartPeriod . '000';
     $res['body']['externInfo']['pmPeriod'] = $pmPeriod . '000';
     echo WebUtils::outputWebApi($res, '', false);
 }
開發者ID:caidongyun,項目名稱:CS,代碼行數:22,代碼來源:HeartAction.php

示例13: run

 public function run($type = 'post', $page = 1, $pageSize = 20)
 {
     require_once libfile('function/friend');
     $res = WebUtils::initWebApiArray_oldVersion();
     $uid = $this->getController()->uid;
     $notifyInfo = $this->_getNotifyInfo($uid, $type, $page, $pageSize);
     $list = $notifyInfo['list'];
     $count = $notifyInfo['count'];
     $res = array_merge($res, WebUtils::getWebApiArrayWithPage_oldVersion($page, $pageSize, $count));
     $res['list'] = $list;
     $res['body']['data'] = $notifyInfo['data'];
     // $transaction = Yii::app()->dbDz->beginTransaction();
     // try {
     echo WebUtils::outputWebApi($res, '', false);
     $this->_updateReadStatus($uid, $type);
     //  $transaction->commit();
     // } catch(Exception $e) {
     //  var_dump($e);
     //     $transaction->rollback();
     // }
     Yii::app()->end();
 }
開發者ID:frogoscar,項目名稱:mobcent-discuz,代碼行數:22,代碼來源:NotifyListAction.php

示例14: run

 public function run()
 {
     $res = WebUtils::initWebApiArray_oldVersion();
     $res = $this->_startSign($res);
     echo WebUtils::outputWebApi($res, '', false);
 }
開發者ID:frogoscar,項目名稱:mobcent-discuz,代碼行數:6,代碼來源:SignAction.php

示例15: run

 public function run()
 {
     $res = WebUtils::initWebApiArray_oldVersion();
     $res['list'] = $this->_getModuleList();
     echo WebUtils::outputWebApi($res, '', false);
 }
開發者ID:caidongyun,項目名稱:CS,代碼行數:6,代碼來源:ModuleListAction.php


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