本文整理汇总了PHP中PageNav::getPageNavTemplateForSpace方法的典型用法代码示例。如果您正苦于以下问题:PHP PageNav::getPageNavTemplateForSpace方法的具体用法?PHP PageNav::getPageNavTemplateForSpace怎么用?PHP PageNav::getPageNavTemplateForSpace使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PageNav
的用法示例。
在下文中一共展示了PageNav::getPageNavTemplateForSpace方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: ajaxSelectList
public function ajaxSelectList($request, $response)
{
/*{{{*/
header('Content-Type: text/html; charset=GBK');
$page = intval($request->getRequest('p', 1));
$res = ReplyTemplateClient::getInstance()->getInfosAndPage('replytemplate', $this->space->user->id, $page, 15);
$response->templateList = $res['replyInfos'];
$pagelink = '';
if (empty($res['page']) == false) {
$pageInfo = $res['page'];
$pagelink = PageNav::getNavLink(PageNav::getPageNavTemplateForSpace($this->space->getUrl() . 'replytemplate/ajaxselectlist?p='), $pageInfo['nowpage'], $pageInfo['pagesize'], $pageInfo['total']);
}
$response->pagelink = $pagelink;
}
示例2: orderList
public function orderList($request, $response)
{
/*{{{*/
$params = array('url' => "http://" . URL_PREFIX . $this->space->userName . ".haodf.com/adminbooking/contractform", 'text' => '点击这里填写预约要求,申请开通服务', 'module' => Space::MODULE_ADMIN_BOOKING);
if ($this->space->isBookingOpened() == false && $this->space->host->isAdminLevel4() && in_array($request->action, array('contractform', 'contractpost', 'whatdofordoctor')) == false) {
$this->message('您好,您还没开通网上转诊预约服务', $response, $params);
return;
}
$params1 = array('url' => $this->space->getUrl(), 'text' => '点击这里返回', 'module' => Space::MODULE_ADMIN_BOOKING);
if ($this->space->getSpaceBusinessRequirement4Booking()->isRefused() && $this->space->host->isAdminLevel4() && in_array($request->action, array('contractform', 'contractpost', 'whatdofordoctor')) == false) {
$this->message('您好,您开通网上转诊预约服务的申请未通过审核', $response, $params1);
return;
}
$orderCount = BookingClient::getInstance()->getOrderListCount4Doctor($this->space->user->id);
$status = $request->status;
if ($status == false && $orderCount['pending'] > 0) {
$status = 'pending';
}
if ($status == false && $orderCount['pending'] == 0 && $orderCount['confirmed'] > 0) {
$status = 'confirmed';
}
if ($status == false && $orderCount['pending'] == 0 && $orderCount['confirmed'] == 0) {
$status = 'finished';
}
$page = $request->getRequest('page', 1);
$res = BookingClient::getInstance()->getSpaceOrderList($this->space->user->id, $status, $page, 10);
$pagelink = "";
if (isset($res['pageInfo']) && empty($res['pageInfo']) == false) {
$pagelink = PageNav::getNavLink(PageNav::getPageNavTemplateForSpace("/adminbooking/orderlist?status={$status}&page="), $res['pageInfo']['nowpage'], $res['pageInfo']['pagesize'], $res['pageInfo']['total']);
}
$lastFinishSchedule = '';
if ($status == 'finished') {
$lastFinishSchedule = BookingClient::getInstance()->getBookingOrderSchedule('BookingOrder', $this->space->id);
$lastFinishSchedule = date('Y-m-d', strtotime($lastFinishSchedule));
}
$response->orderCount = $orderCount;
$response->status = $status;
$response->orderList = $res['list'];
$response->pagelink = $pagelink;
$response->page = $page;
$response->lastFinishSchedule = $lastFinishSchedule;
}
示例3: manageMembers
/** 成员管理**/
public function manageMembers($request, $response)
{
/*{{{*/
$groupId = $request->groupid;
$member = new NullEntity();
if ($groupId && $this->user->id) {
$member = ForumClient::getInstance()->getMemberByUserIdAndGroupId($this->user->id, $groupId);
$group = DAL::get()->find('regroup', $groupId);
}
if ($member->isNull() || false == $member->isNull() && false == $member->isLeader()) {
$msg = rawurlencode('你没有权限操作!');
header('Location: ' . $this->space->getUrl() . 'index/showmessage?msg=' . $msg);
echo $userid;
exit;
}
$userNameArr = $request->username ? array('username' => $request->username) : array();
$nowPage = $request->getRequest('p', 1);
$pageSize = 20;
$res = ForumClient::getInstance()->getMembersByGroupIdAndSpaceId($this->space->id, $groupId, $nowPage, $pageSize, $userNameArr);
$pagelink = "";
if (isset($res['pageInfo']) && false == empty($res['pageInfo'])) {
$pageInfo = $res['pageInfo'];
$pagelink = PageNav::getNavLink(PageNav::getPageNavTemplateForSpace("/patient/managemembers?groupid={$groupId}&p="), $pageInfo['nowpage'], $pageInfo['pagesize'], $pageInfo['total']);
}
$response->members = $res['list'];
$response->pageLink = $pagelink;
$response->groupId = $groupId;
$response->page = $nowPage;
$response->group = $group;
}
示例4: ajaxShowTelOrders
public function ajaxShowTelOrders($request, $response)
{
/*{{{*/
$doctor = $this->space->host->getPrimaryDoctor();
$options = array();
$nowPage = (int) $request->getRequest('nowPage', 1);
$options['status'] = array(TelOrder::STATUS_FINISHED, TelOrder::STATUS_CLOSED);
$res = TelOrderClient::getInstance()->getOrderList4Space($this->space->id, $nowPage, 6, $options);
$pageInfo = $res['pageInfo'];
$pageLink = PageNav::getNavLink(PageNav::getPageNavTemplateForSpace("/payment/ajaxshowtelorders?nowPage=", 2, 5, 1, false), $pageInfo['nowpage'], $pageInfo['pagesize'], $pageInfo['total']);
$orderList = $res['list'];
$response->orderList = $orderList;
$response->pageLink = $pageLink;
$response->nowPage = $nowPage;
}
示例5: replyTpl
public function replyTpl($request, $response)
{
/*{{{*/
$response->subMenu = 'replyTpl';
$nowPage = intval($request->getRequest('page', 1));
$res = ReplyTemplateClient::getInstance()->getAll($this->user->id, $nowPage, 10, array('page' => true));
$response->replyTemplateList = $res['templates'];
$pagelink = '';
if (empty($res['page']) == false) {
$pageInfo = $res['page'];
$pagelink = PageNav::getNavLink(PageNav::getPageNavTemplateForSpace('?page='), $pageInfo['nowpage'], $pageInfo['pagesize'], $pageInfo['total']);
}
$response->pagelink = $pagelink;
}
示例6: showWithdrawStatement
public function showWithdrawStatement($request, $response)
{
/*{{{*/
$nowPage = $request->page ? $request->page : 1;
$pageSize = 20;
$response->incomeAccountAmount = $this->space->getIncomeAccount()->amount;
$response->subsidyAccountAmount = $this->space->getSubsidyAccount()->amount;
$settleOrders = DAL::get()->find_all_by_spaceid('SettleOrder', $this->space->id);
$settleOrders = array_reverse($settleOrders);
$response->settleOrders = array_slice($settleOrders, ($nowPage - 1) * $pageSize, $pageSize);
$withdrawAmount = $noWithdrawAmount = 0;
$noWithdrawCnt = 0;
foreach ($settleOrders as $order) {
$noTaxAmount = $order->getAmountWithoutTax();
if ($order->isWithdraw()) {
$withdrawAmount += $noTaxAmount;
} else {
$noWithdrawCnt++;
}
}
$response->withdrawAmount = $withdrawAmount;
$response->noWithdrawCnt = $noWithdrawCnt;
$pageInfo = Pager::calcPageInfo(count($settleOrders), $nowPage, $pageSize);
$response->pagelink = PageNav::getNavLink(PageNav::getPageNavTemplateForSpace("showwithdrawstatement?actionclass={$request->actionclass}&page="), $pageInfo['nowpage'], $pageInfo['pagesize'], $pageInfo['total']);
$response->actionClass = $request->actionclass;
}
示例7: patientCaseHistoryList
/**
* @brief 当前流所对应随访患者的病例库
* @author lhl
* @version branches/v2.14.23
* @date 2013-07-25
*/
public function patientCaseHistoryList($request, $response)
{
/*{{{*/
$doctorPatientRefId = Codec::getInstance()->decodeId($request->refid);
$ref = DAL::get()->find('DoctorPatientRef', $doctorPatientRefId);
$response->ref = $ref;
$user = DAL::get()->find('user', $ref->user->id);
$params = array();
$params['userId'] = $user->id;
$pageParams = 'refid=' . $ref->getEncodeId();
$page = $request->getRequest('page', 1);
$pageSize = 10;
$res = PatientCaseHistoryClient::getInstance()->getCaseHistoryList($page, $pageSize, $params);
$caseHistoryList = $res['caseHistoryList'];
$response->caseHistoryList = $caseHistoryList;
$response->pageLink = '';
if (false == empty($res['pageInfo'])) {
$response->pageLink = PageNav::getNavLink(PageNav::getPageNavTemplateForSpace('/flow/patientcasehistorylist?' . $pageParams . '&page='), $res['pageInfo']['nowpage'], $res['pageInfo']['pagesize'], $res['pageInfo']['total']);
}
}
示例8: searchReTopic
public function searchReTopic($request, $response)
{
/*{{{*/
$keyword = $request->keyword;
$response->keyword = $keyword;
$page = $request->getRequest('p', 1);
if (false == empty($keyword)) {
$res = DAL::get()->querySearchRetopic4Dzone('retopic', $this->space->id, $keyword, $page, 15);
}
if (isset($res['ids']) && false == empty($res['ids'])) {
$response->retopics = DAL::get()->find('retopic', $res['ids']);
$response->pagelink = pageNav::getNavLink(PageNav::getPageNavTemplateForSpace("/search/search?type=retopic&keyword={$keyword}&p=", 2, 5, 1, false), $res['pageInfo']['nowpage'], $res['pageInfo']['pagesize'], $res['pageInfo']['total']);
$response->total = $res['pageInfo']['total'];
}
}
示例9: ajaxShowPresent
public function ajaxShowPresent($request, $response)
{
/*{{{*/
//获取有数据的分类
$response->validPresentCates = PresentClient::getInstance()->getValidPresentCateList();
$patientId = $request->patientid;
$response->patientId = $patientId;
if ($this->user->isNull()) {
$response->redirectUrl = User::getLoginUrl();
return;
}
list($canSend, $errorMsg) = $this->canSendPresent($patientId);
$response->canSend = $canSend;
$response->errorMsg = $errorMsg;
if (false == $canSend) {
return;
}
//先看礼物后选 过来的firstlook by 重新选择礼物
$response->firstLook = $request->getRequest('firstlook', false);
list($featAmount, $heartImgHtml) = ScoreClient::getInstance()->showFlagsforPage($this->space->user->id);
//爱心图片
$response->heartImgHtml = $heartImgHtml;
//爱心值
$response->featAmount = $featAmount;
/********开始:处理未支付的订单(选择了赠送礼物,但是从付费页面跳出去了,就会生成一个未付费订单,页面会显示立即取消,重选礼物)*******/
$presentOrder = PresentClient::getInstance()->getValidUnpaidPresentOrder($this->space->id, $patientId, $this->user->id);
$new = $request->new;
if (false == $presentOrder->isNull()) {
if (false == empty($new) || $presentOrder->present->isExpired()) {
//点击重新选择礼物时,会传来参数new=1
PresentClient::getInstance()->setPresentOrderUnvalid($presentOrder->id);
} else {
$response->presentOrder = $presentOrder;
$response->present = $presentOrder->present;
$response->wish = $presentOrder->wish;
$response->presentId = $presentOrder->present->id;
if (false == $this->user->isNull()) {
$flows = FlowClient::getInstance()->getFlowListByUser($this->user->id, array('status' => DoctorPatientRef::STATUS_INIT));
$otherDoctorFlows = array();
foreach ($flows as $flow) {
if ($flow->spaceid != $this->space->id) {
array_push($otherDoctorFlows, $flow);
}
}
$response->otherDoctorFlows = $otherDoctorFlows;
}
$patient = DAL::get()->find('patient', $patientId);
$userId = empty($patientId) ? $this->user->id : $patient->user->id;
$response->leftAmount = ScoreClient::getInstance()->getIntegralAmount($userId);
return 'ajaxapplypresent';
}
}
/********结束:处理未支付的订单*******/
$page = $request->getRequest('page', 1);
$response->page = $page;
$pageSize = 4;
$options = array();
$presentCategoryId = $request->getRequest('categoryid', 0);
$options['categoryid'] = $presentCategoryId;
$response->categoryId = $presentCategoryId;
$result = PresentClient::getInstance()->showPresentList4Front($page, $pageSize, $options);
$response->presentList = $result['presents'];
$response->presentSoldCounts = array();
//(false == empty($result['presents'])) ? PresentClient::getInstance()->getPresentCountOfSold(array_keys($result['presents'])) : 0 ;
$pageInfo = $result['pageInfo'];
$response->pagelink = PageNav::getNavLink(PageNav::getPageNavTemplateForSpace('/api/present/ajaxshowpresent?patientid=' . $patientId . '&categoryid=' . $presentCategoryId . '&uname=' . $this->space->user->name . '&page=', 2, 3, 1, false), $pageInfo['nowpage'], $pageInfo['pagesize'], $pageInfo['total'], false);
}
示例10: patientHealthRecordDetail
public function patientHealthRecordDetail($request, $response)
{
/*{{{*/
$patientId = $request->patientId;
$patient = DAL::get()->find('Patient', $patientId);
$patientCaseId = $request->patientCaseId;
$response->patientId = $patientId;
$response->patientCaseId = $patientCaseId;
$p = $request->getRequest("p", 1);
$abNormal = $request->abNormal;
$doctorPatientRefs = DAL::get()->find_all_by_spaceid_and_userid('DoctorPatientRef', $this->space->id, $patient->user->id);
$proposals = DAL::get()->find_all_by_spaceid_and_userid_and_servicedef('Proposal', $this->space->id, $patient->user->id, 'FLOW');
if (empty($doctorPatientRefs) && empty($proposals)) {
throw new BizException('您没有权限查看此患者健康日记');
}
if ($abNormal) {
$res = PatientFileClient::getInstance()->getAbnormalRecordListByPatientId($patientId, $p, 10);
} else {
$res = PatientFileClient::getInstance()->getRecordListByPatientId($patientId, $p, 10);
}
$response->healthRecordList = $healthRecordList = $res['list'];
if (empty($res['pageInfo']) == false) {
$url = "/adminpatient/patienthealthrecorddetail?patientId=" . $patientId;
$pageLink = PageNav::getNavLink(PageNav::getPageNavTemplateForSpace($url . "&abNormal={$abNormal}&p="), $res['pageInfo']['nowpage'], $res['pageInfo']['pagesize'], $res['pageInfo']['total']);
}
$answerArrs = $wrapperCntArr = $wrapperArrs = $uploadArr = array();
foreach ($healthRecordList as $record) {
$wrapperCntArr[$record->id] = array();
foreach ($record->answerSheet->answers as $answer) {
if ($answer->getAnswerContent() == '' || $answer->getAnswerContent() instanceof NullEntity) {
continue;
}
if ($answer->question->isUpload()) {
$uploadArr[$record->id][] = $answer->getAnswerContent();
}
$answerArrs[$record->id][$answer->question->id] = $answer;
$question = $answer->question;
if (array_key_exists($question->wrapperid, $wrapperCntArr[$record->id])) {
$wrapperCntArr[$record->id][$question->wrapperid]++;
} else {
$wrapperCntArr[$record->id][$question->wrapperid] = 1;
}
}
$questionIdAnswerArr = $record->answerSheet->getQuestionId_answerArr();
$answerSheetQuestionIds = array_keys($questionIdAnswerArr);
$questionSheetQuestionIds = array_keys($record->answerSheet->questionSheet->questions);
$deleteQuestionIds = array_diff($answerSheetQuestionIds, $questionSheetQuestionIds);
$questionIds = array_merge($questionSheetQuestionIds, $deleteQuestionIds);
$questions = DAL::get()->find('question', $questionIds);
foreach ($questions as $question) {
$wrapperArrs[$record->id][$question->wrapperid][] = $question;
}
}
$response->answerArrs = $answerArrs;
$response->wrapperArrs = $wrapperArrs;
$response->wrapperCntArr = $wrapperCntArr;
$response->uploadArr = $uploadArr;
$response->pageLink = $pageLink;
$response->abNormal = $abNormal = $abNormal == 1 ? 1 : 0;
$response->patient = DAL::get()->find('Patient', $patientId);
}
示例11: getArticleList
/** 获取文章列表 zj **/
private function getArticleList($categoryId, $classicCategoryId, $request, $response)
{
/*{{{*/
if ($request->category_id == '') {
$page = intval($request->getRequest('page', 1));
} else {
$page = intval($request->getRequest('p', 1));
}
$options = array();
$options['articleLevel'] = Article::LEVEL_0;
$userId = UserClient::getInstance()->getCheckedSeed('id');
$res = ArticleClient::getInstance()->getList($this->space->id, $categoryId, $page, $pageSize = 20, $options, $userId);
$articleList = $res['articleList'];
$pagelink = "";
if (isset($res['pageInfo']) && false == empty($res['pageInfo']) && '' == $request->category_id) {
$pageInfo = $res['pageInfo'];
$pagelink = PageNav::getNavLink(PageNav::getPageNavTemplateForSpace('lanmu_', 2, 3, 1, true), $pageInfo['nowpage'], $pageInfo['pagesize'], $pageInfo['total']);
$pagelink = str_replace("href=\"lanmu_1\"", "href=\"lanmu\"", $pagelink);
} else {
if (isset($res['pageInfo']) && false == empty($res['pageInfo'])) {
$pageInfo = $res['pageInfo'];
$pagelink = PageNav::getNavLink(PageNav::getPageNavTemplateForSpace('?p='), $pageInfo['nowpage'], $pageInfo['pagesize'], $pageInfo['total']);
}
}
$category = new NullEntity();
if ($categoryId) {
$category = DAL::get()->find('ArticleCategory', $categoryId);
}
$response->category = $category;
$response->categoryId = $categoryId;
$response->isClassicsCase = $categoryId == $classicCategoryId;
$topArticleList = array();
$downArticleList = array();
foreach ($articleList as $article) {
if ($article->topLevel) {
$topArticleList[] = $article;
} else {
$downArticleList[] = $article;
}
}
XString::sortArray($topArticleList, 'topLevel');
$response->topArticleList = $topArticleList;
XString::sortArray($downArticleList, 'ctime');
$response->downArticleList = $downArticleList;
$newHitRes = array();
if (false == empty($articleList) && false == $this->isSpaceLogin()) {
$hitRes = HitClient::getInstance()->getHitsNoCache(array_keys($articleList));
$articleIds = array_keys($articleList);
foreach ($articleIds as $articleId) {
$redisKey = "article_" . $articleId;
$newHitRes[$articleId] = HitClient::getInstance()->getHitCntByKey($redisKey);
}
}
$response->hitRes = $newHitRes;
if ($this->isSpaceLogin()) {
$response->maxTop = ArticleClient::getInstance()->getMaxTopLevel($this->space->id, $isAll = false);
$response->minTop = ArticleClient::getInstance()->getMinTopLevel($this->space->id);
}
$response->pagelink = $pagelink;
$response->articleId = $request->articleId;
}