/** * return user api data * * @param Object $oMbqEtUser * @return Array */ public function returnApiDataSysStatistics($oMbqEtSysStatistics) { if (MbqMain::isJsonProtocol()) { return $this->returnJsonApiDataSysStatistics($oMbqEtSysStatistics); } $data = array(); if ($oMbqEtSysStatistics->forumTotalThreads->hasSetOriValue()) { $data['total_threads'] = (int) $oMbqEtSysStatistics->forumTotalThreads->oriValue; } if ($oMbqEtSysStatistics->forumTotalPosts->hasSetOriValue()) { $data['total_posts'] = (int) $oMbqEtSysStatistics->forumTotalPosts->oriValue; } if ($oMbqEtSysStatistics->forumTotalMembers->hasSetOriValue()) { $data['total_members'] = (int) $oMbqEtSysStatistics->forumTotalMembers->oriValue; } if ($oMbqEtSysStatistics->forumActiveMembers->hasSetOriValue()) { $data['active_members'] = (int) $oMbqEtSysStatistics->forumActiveMembers->oriValue; } if ($oMbqEtSysStatistics->forumTotalOnline->hasSetOriValue()) { $data['total_online'] = (int) $oMbqEtSysStatistics->forumTotalOnline->oriValue; } if ($oMbqEtSysStatistics->forumGuestOnline->hasSetOriValue()) { $data['guest_online'] = (int) $oMbqEtSysStatistics->forumGuestOnline->oriValue; } return $data; }
/** * return attachment api data * * @param Object $oMbqEtAtt * @return Array */ public function returnApiDataAttachment($oMbqEtAtt) { if (MbqMain::isJsonProtocol()) { return $this->returnJsonApiDataAttachment($oMbqEtAtt); } $data = array(); if ($oMbqEtAtt->attId->hasSetOriValue()) { $data['attachment_id'] = (string) $oMbqEtAtt->attId->oriValue; } if ($oMbqEtAtt->groupId->hasSetOriValue()) { $data['group_id'] = (string) $oMbqEtAtt->groupId->oriValue; } if ($oMbqEtAtt->forumId->hasSetOriValue()) { $data['forum_id'] = (string) $oMbqEtAtt->forumId->oriValue; } if ($oMbqEtAtt->postId->hasSetOriValue()) { $data['post_id'] = (string) $oMbqEtAtt->postId->oriValue; } if ($oMbqEtAtt->filtersSize->hasSetOriValue()) { $data['filters_size'] = (int) $oMbqEtAtt->filtersSize->oriValue; //$data['filesize'] = (int) $oMbqEtAtt->filtersSize->oriValue; } if ($oMbqEtAtt->contentType->hasSetOriValue()) { $data['content_type'] = (string) $oMbqEtAtt->contentType->oriValue; } if ($oMbqEtAtt->thumbnailUrl->hasSetOriValue()) { $data['thumbnail_url'] = (string) $oMbqEtAtt->thumbnailUrl->oriValue; } if ($oMbqEtAtt->url->hasSetOriValue()) { $data['url'] = (string) $oMbqEtAtt->url->oriValue; } return $data; }
function getInput() { $in = new stdClass(); if (MbqMain::isJsonProtocol()) { } else { } return $in; }
/** * transform timestamp to iso8601 format */ public function datetimeIso8601Encode($timeStamp) { if (MbqMain::isJsonProtocol()) { return date('Y-m-d\\TH:i:s', $timeStamp) . '+00:00'; } else { return date('Ymd\\TH:i:s', $timeStamp) . '+00:00'; } }
function getInput() { $in = new stdClass(); if (MbqMain::isJsonProtocol()) { $in->messageId = $this->getInputParam('messageId'); } else { $in->messageId = $this->getInputParam(0); } return $in; }
function getInput() { $in = new stdClass(); if (MbqMain::isJsonProtocol()) { $in->email = $this->getInputParam('email'); } else { $in->email = $this->getInputParam(0); } return $in; }
function getInput() { $in = new stdClass(); if (MbqMain::isJsonProtocol()) { $in->convId = $this->getInputParam('conversationId'); } else { $in->convId = $this->getInputParam(0); } return $in; }
function getInput() { $in = new stdClass(); $oMbqDataPage = MbqMain::$oClk->newObj('MbqDataPage'); if (MbqMain::isJsonProtocol()) { $filters = $this->getInputParam('filters'); $search_filter = $filters[0]; $in->searchId = $this->getValue($search_filter, 'searchId'); $in->keywords = $this->getValue($search_filter, 'keywords'); $in->userId = $this->getValue($search_filter, 'userId'); $in->searchId = $this->getValue($search_filter, 'searchId'); $in->searchUser = $this->getValue($search_filter, 'searchUser'); $in->forumId = $this->getValue($search_filter, 'forumId'); $in->topicId = $this->getValue($search_filter, 'topicId'); $in->titleOnly = $this->getValue($search_filter, 'titleOnly'); $in->showPosts = $this->getValue($search_filter, 'showPosts'); $in->searchTime = $this->getValue($search_filter, 'searchTime'); $in->onlyIn = $this->getValue($search_filter, 'onlyIn'); $in->notIn = $this->getValue($search_filter, 'notIn'); $in->startedBy = $this->getValue($search_filter, 'started_by'); $page = $this->getValue($search_filter, 'page', 1); $perpage = $this->getValue($search_filter, 'perpage', 20); $oMbqDataPage->initByPageAndPerPage($page, $perpage); if ($in->startedBy) { $in->showPosts = 0; } } else { $search_filter = $this->getInputParam(0); $in->searchId = $this->getValue($search_filter, 'searchid'); $in->keywords = $this->getValue($search_filter, 'keywords'); $in->userId = $this->getValue($search_filter, 'userid'); $in->searchId = $this->getValue($search_filter, 'searchid'); $in->searchUser = $this->getValue($search_filter, 'searchuser'); $in->forumId = $this->getValue($search_filter, 'forumid'); $in->topicId = $this->getValue($search_filter, 'threadid'); $in->titleOnly = $this->getValue($search_filter, 'titleonly'); $in->showPosts = $this->getValue($search_filter, 'showposts'); $in->searchTime = $this->getValue($search_filter, 'searchtime'); $in->onlyIn = $this->getValue($search_filter, 'only_in'); $in->notIn = $this->getValue($search_filter, 'not_in'); $in->startedBy = $this->getValue($search_filter, 'started_by'); if ($in->startedBy) { $in->showPosts = 0; } $page = $this->getValue($search_filter, 'page', 1); $perpage = $this->getValue($search_filter, 'perpage', 20); $oMbqDataPage->initByPageAndPerPage($page, $perpage); } if (isset($in->keywords) && strlen($in->keywords) < MbqBaseFdt::getFdt('MbqFdtConfig.forum.min_search_length.default')) { MbqError::alert('', "Search words too short!", '', MBQ_ERR_APP); } $in->oMbqDataPage = $oMbqDataPage; return $in; }
function getInput() { $in = new stdClass(); if (MbqMain::isJsonProtocol()) { $in->username = $this->getInputParam('username'); $in->userId = $this->getInputParam('userId'); } else { $in->username = $this->getInputParam(0); $in->userId = $this->getInputParam(1); } return $in; }
function getInput() { $in = new stdClass(); if (MbqMain::isJsonProtocol()) { $in->twoStepCode = $this->getInputParam('twoStepCode'); $in->trust = $this->getInputParam('trust'); } else { $in->twoStepCode = $this->getInputParam(0); $in->trust = $this->getInputParam(1); } return $in; }
function getInput() { $in = new stdClass(); if (MbqMain::isJsonProtocol()) { $in->userPassword = $this->getInputParam('password'); $in->userEmail = $this->getInputParam('newEmail'); } else { $in->userPassword = $this->getInputParam(0); $in->userEmail = $this->getInputParam(1); } return $in; }
function getInput() { $in = new stdClass(); if (MbqMain::isJsonProtocol()) { $in->postId = $this->getInputParam('postId'); $in->reason = $this->getInputParam('reason'); } else { $in->postId = $this->getInputParam(0); $in->reason = $this->getInputParam(1); } return $in; }
function getInput() { $in = new stdClass(); if (MbqMain::isJsonProtocol()) { $in->topicId = $this->getInputParam('topicId'); $in->title = $this->getInputParam('title'); } else { $in->topicId = $this->getInputParam(0); $in->title = $this->getInputParam(1); } return $in; }
function getInput() { $in = new stdClass(); if (MbqMain::isJsonProtocol()) { $in->forumId = $this->getInputParam('forumId'); $in->password = $this->getInputParam('password'); } else { $in->forumId = $this->getInputParam(0); $in->password = $this->getInputParam(1); } return $in; }
function getInput() { $in = new stdClass(); if (MbqMain::isJsonProtocol()) { $in->login = $this->getInputParam('username'); $in->token = $this->getInputParam('token'); $in->code = $this->getInputParam('code'); } else { $in->login = $this->getInputParam(0); $in->token = $this->getInputParam(1); $in->code = $this->getInputParam(2); } return $in; }
function getInput() { $in = new stdClass(); if (MbqMain::isJsonProtocol()) { $in->postId = $this->getInputParam('postId'); $in->postsPerRequest = (int) $this->getInputParam('perPage', 20); $in->returnHtml = (bool) $this->getInputParam('returnHtml'); } else { $in->postId = $this->getInputParam(0); $in->postsPerRequest = (int) $this->getInputParam(1, 20); $in->returnHtml = (bool) $this->getInputParam(2); } return $in; }
function getInput() { $in = new stdClass(); if (MbqMain::isJsonProtocol()) { $in->topicIdA = $this->getInputParam('topicIdFrom'); $in->topicIdB = $this->getInputParam('topicIdTo'); $in->redirect = $this->getInputParam('redirect'); } else { $in->topicIdA = $this->getInputParam(0); $in->topicIdB = $this->getInputParam(1); $in->redirect = $this->getInputParam(2); } return $in; }
function getInput() { $in = new stdClass(); $oMbqDataPage = MbqMain::$oClk->newObj('MbqDataPage'); if (MbqMain::isJsonProtocol()) { $in->keywords = $this->getInputParam('keywords'); $oMbqDataPage->initByPageAndPerPage($this->getInputParam('page'), $this->getInputParam('perPage')); } else { $in->keywords = $this->getInputParam(0); $oMbqDataPage->initByPageAndPerPage($this->getInputParam(1), $this->getInputParam(2)); } $in->oMbqDataPage = $oMbqDataPage; return $in; }
function getInput() { $in = new stdClass(); if (MbqMain::isJsonProtocol()) { $in->usernames = $this->getInputParam('username'); $in->conversationId = $this->getInputParam('conversationId'); $in->reason = $this->getInputParam('reason'); } else { $in->usernames = $this->getInputParam(0); $in->conversationId = $this->getInputParam(1); $in->reason = $this->getInputParam(2); } return $in; }
function getInput() { $in = new stdClass(); $oMbqDataPage = MbqMain::$oClk->newObj('MbqDataPage'); if (MbqMain::isJsonProtocol()) { $oMbqDataPage->initByPageAndPerPage($this->getInputParam('page'), $this->getInputParam('perPage')); } else { $startNum = (int) $this->getInputParam(0); $lastNum = (int) $this->getInputParam(1); $oMbqDataPage->initByStartAndLast($startNum, $lastNum); } $in->oMbqDataPage = $oMbqDataPage; return $in; }
function getInput() { $in = new stdClass(); if (MbqMain::isJsonProtocol()) { $in->topicId = $this->getInputParam('topicId'); $in->mode = (int) $this->getInputParam('mode'); } else { $in->topicId = $this->getInputParam(0); $in->mode = (int) $this->getInputParam(1); } if ($in->mode != 1 && $in->mode != 2) { MbqError::alert('', "Need valid mode!", '', MBQ_ERR_APP); } return $in; }
function getInput() { $in = new stdClass(); if (MbqMain::isJsonProtocol()) { $in->login = $this->getInputParam('login'); $in->password = $this->getInputParam('password'); $in->anonymous = $this->getInputParam('anonymous'); $in->trustCode = $this->getInputParam('trustCode'); } else { $in->login = $this->getInputParam(0); $in->password = $this->getInputParam(1); $in->anonymous = $this->getInputParam(2); $in->trustCode = $this->getInputParam(3); } return $in; }
function getInput() { $in = new stdClass(); if (MbqMain::isJsonProtocol()) { $in->attId = $this->getInputParam('attachmentId'); $in->forumId = $this->getInputParam('forumId'); $in->groupId = $this->getInputParam('groupId'); $in->postId = $this->getInputParam('postId'); } else { $in->attId = $this->getInputParam(0); $in->forumId = $this->getInputParam(1); $in->groupId = $this->getInputParam(2); $in->postId = $this->getInputParam(3); } return $in; }
function getInput() { $in = new stdClass(); if (MbqMain::isJsonProtocol()) { $in->username = $this->getInputParam('username'); $in->password = $this->getInputParam('password'); $in->email = $this->getInputParam('email'); $in->token = $this->getInputParam('token'); $in->code = $this->getInputParam('code'); } else { $in->username = $this->getInputParam(0); $in->password = $this->getInputParam(1); $in->email = $this->getInputParam(2); $in->token = $this->getInputParam(3); $in->code = $this->getInputParam(4); } return $in; }
function getInput() { $in = new stdClass(); if (MbqMain::isJsonProtocol()) { $in->usernames = $this->getInputParam('username'); $in->subject = $this->getInputParam('subject'); $in->body = $this->getInputParam('body'); $in->action = $this->getInputParam('action'); $in->messageId = $this->getInputParam('messageId'); } else { $in->usernames = (array) $this->getInputParam(0); $in->subject = $this->getInputParam(1); $in->body = $this->getInputParam(2); $in->action = $this->getInputParam(3); $in->messageId = (int) $this->getInputParam(4); } return $in; }
function getInput() { $in = new stdClass(); if (MbqMain::isJsonProtocol()) { $in->returnDescription = $this->getInputParam('returnHtml'); $in->forumId = $this->getInputParam('forumId'); } else { $in->returnDescription = $this->getInputParam(0); $in->forumId = $this->getInputParam(1); } if ($in->returnDescription == null) { $in->returnDescription = true; } if ($in->forumId == null) { $in->forumId = 0; } return $in; }
function getInput() { $in = new stdClass(); if (MbqMain::isJsonProtocol()) { $in->postId = $this->getInputParam('postId'); $in->topicId = $this->getInputParam('topicId'); $in->topicTitle = $this->getInputParam('topicTitle'); $in->forumId = $this->getInputParam('forumId'); } else { $in->postId = $this->getInputParam(0); $in->topicId = $this->getInputParam(1); $in->topicTitle = $this->getInputParam(2); $in->forumId = $this->getInputParam(3); } $in->postId = explode(',', $in->postId); $in->postId = array_map("trim", $in->postId); return $in; }
function getInput() { $in = new stdClass(); if (MbqMain::isJsonProtocol()) { $in->usernames = (array) $this->getInputParam('username'); $in->subject = $this->getInputParam('subject'); $in->body = $this->getInputParam('body'); $in->attachmentIds = $this->getInputParam('attachmentIds'); $in->groupId = $this->getInputParam('groupId'); } else { $in->usernames = (array) $this->getInputParam(0); $in->subject = $this->getInputParam(1); $in->body = $this->getInputParam(2); $in->attachmentIds = $this->getInputParam(3); $in->groupId = $this->getInputParam(4); } return $in; }
function getInput() { $in = new stdClass(); if (MbqMain::isJsonProtocol()) { $in->username = $this->getInputParam('username'); $in->mode = $this->getInputParam('mode'); $in->reason = $this->getInputParam('reason'); $in->expires = $this->getInputParam('expires'); } else { $in->username = $this->getInputParam(0); $in->mode = $this->getInputParam(1); $in->reason = $this->getInputParam(2); $in->expires = $this->getInputParam(3); } if ($in->mode != 1 && $in->mode != 2) { MbqError::alert('', "Need valid mode!", '', MBQ_ERR_APP); } return $in; }
function getInput() { $in = new stdClass(); if (MbqMain::isJsonProtocol()) { $in->forumId = $this->getInputParam('forumId'); $in->subject = $this->getInputParam('subject'); $in->body = $this->getInputParam('body'); $in->prefixId = $this->getInputParam('prefixId'); $in->attachmentIds = $this->getInputParam('attachmentIds'); $in->groupId = $this->getInputParam('groupId'); } else { $in->forumId = $this->getInputParam(0); $in->subject = $this->getInputParam(1); $in->body = $this->getInputParam(2); $in->prefixId = $this->getInputParam(3); $in->attachmentIds = $this->getInputParam(4); $in->groupId = $this->getInputParam(5); } return $in; }