当前位置: 首页>>代码示例>>PHP>>正文


PHP Request::getUserVar方法代码示例

本文整理汇总了PHP中Request::getUserVar方法的典型用法代码示例。如果您正苦于以下问题:PHP Request::getUserVar方法的具体用法?PHP Request::getUserVar怎么用?PHP Request::getUserVar使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Request的用法示例。


在下文中一共展示了Request::getUserVar方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: pendingUsers

 function pendingUsers()
 {
     $this->validate();
     $this->setupTemplate();
     $journal =& Request::getJournal();
     $templateMgr =& TemplateManager::getManager();
     $CBPPlatformDao =& DAORegistry::getDAO('CBPPlatformDAO');
     $journalId = $journal->getJournalId();
     if (Request::getUserVar('approve') && Request::getUserVar('role')) {
         $userId = Request::getUserVar('approve');
         $roleId = Request::getUserVar('role');
         if ($CBPPlatformDao->setUserRegistration($userId, $roleId, $journalId) == true) {
             $templateMgr->assign('usersApproved', true);
         }
     }
     $roleDao =& DAORegistry::getDAO('RoleDAO');
     $pendingUsers = $CBPPlatformDao->getPendingUserRegistrations($journalId);
     foreach ($pendingUsers as &$pendingUser) {
         $role = $roleDao->getRole($pendingUser['journal_id'], $pendingUser['user_id'], $pendingUser['role_id']);
         $roleArr = explode(".", $role->getRoleName());
         $pendingUser['role'] = ucfirst($roleArr[2]);
     }
     $templateMgr->assign('pendingUsers', $pendingUsers);
     $templateMgr->display('manager/pendingUsers/index.tpl');
 }
开发者ID:master3395,项目名称:CBPPlatform,代码行数:25,代码来源:PendingUsersHandler.inc.php

示例2: become

 /**
  * Become a given role.
  */
 function become($args)
 {
     parent::validate(true, true);
     $user =& Request::getUser();
     if (!$user) {
         Request::redirect(null, null, 'index');
     }
     switch (array_shift($args)) {
         case 'submitter':
             $roleId = ROLE_ID_SUBMITTER;
             $setting = 'enableSubmit';
             $deniedKey = 'user.noRoles.enableSubmitClosed';
             break;
         default:
             Request::redirect('index');
     }
     $site =& Request::getSite();
     if ($site->getSetting($setting)) {
         $role = new Role();
         $role->setRoleId($roleId);
         $role->setUserId($user->getId());
         $roleDao =& DAORegistry::getDAO('RoleDAO');
         $roleDao->insertRole($role);
         Request::redirectUrl(Request::getUserVar('source'));
     } else {
         $templateMgr =& TemplateManager::getManager();
         $templateMgr->assign('message', $deniedKey);
         return $templateMgr->display('common/message.tpl');
     }
 }
开发者ID:jalperin,项目名称:harvester,代码行数:33,代码来源:UserHandler.inc.php

示例3: display

 /**
  * Display the form.
  */
 function display()
 {
     $conference =& Request::getConference();
     $templateMgr =& TemplateManager::getManager();
     $templateMgr->assign('enablePublicSuppFileId', $conference->getSetting('enablePublicSuppFileId'));
     $templateMgr->assign('rolePath', Request::getRequestedPage());
     $templateMgr->assign('paperId', $this->paper->getPaperId());
     $templateMgr->assign('suppFileId', $this->suppFileId);
     $typeOptionsOutput = array('author.submit.suppFile.researchInstrument', 'author.submit.suppFile.researchMaterials', 'author.submit.suppFile.researchResults', 'author.submit.suppFile.transcripts', 'author.submit.suppFile.dataAnalysis', 'author.submit.suppFile.dataSet', 'author.submit.suppFile.sourceText');
     $typeOptionsValues = $typeOptionsOutput;
     array_push($typeOptionsOutput, 'common.other');
     array_push($typeOptionsValues, '');
     $templateMgr->assign('typeOptionsOutput', $typeOptionsOutput);
     $templateMgr->assign('typeOptionsValues', $typeOptionsValues);
     // Sometimes it's necessary to track the page we came from in
     // order to redirect back to the right place
     $templateMgr->assign('from', Request::getUserVar('from'));
     if (isset($this->paper)) {
         $templateMgr->assign('submissionProgress', $this->paper->getSubmissionProgress());
     }
     if (isset($this->suppFile)) {
         $templateMgr->assign_by_ref('suppFile', $this->suppFile);
     }
     $templateMgr->assign('helpTopicId', 'submission.supplementaryFiles');
     parent::display();
 }
开发者ID:sedici,项目名称:ocs,代码行数:29,代码来源:SuppFileForm.inc.php

示例4: display

 function display(&$args)
 {
     $conference =& Request::getConference();
     $schedConf =& Request::getSchedConf();
     Locale::requireComponents(array(LOCALE_COMPONENT_APPLICATION_COMMON, LOCALE_COMPONENT_PKP_SUBMISSION, LOCALE_COMPONENT_PKP_USER, LOCALE_COMPONENT_OCS_MANAGER));
     $this->import('PaperFormSettings');
     $form = new PaperFormSettings($this, $conference->getId());
     if (Request::getUserVar('GenerateReport')) {
         $ReportHandlerDAO =& DAORegistry::getDAO('MultiPaperReportDAO');
         $iterator =& $ReportHandlerDAO->getPaperReport($conference->getId(), $schedConf->getId());
         $form->readInputData();
         if ($form->validate()) {
             $form->execute();
             $custom_Class = $form->getData('reportClass');
             if (class_exists($custom_Class)) {
                 $Report = new $custom_Class($iterator, $this);
                 $Report->makeReport();
                 Request::redirect(null, null, 'manager', 'plugin');
             } else {
                 echo Locale::translate('plugins.reports.MultiGeneratorPaperReport.classNotFound');
                 $form->display();
             }
         } else {
             $this->setBreadCrumbs(true);
             $form->makeOptions();
             $form->display();
         }
     } else {
         $this->setBreadCrumbs(true);
         $form->initData();
         $form->display();
     }
 }
开发者ID:sedici,项目名称:ocs,代码行数:33,代码来源:MultiPaperReportPlugin.inc.php

示例5: index

 /**
  * Display record list or archive list.
  */
 function index($args)
 {
     $this->validate();
     $templateMgr =& TemplateManager::getManager();
     $archiveDao =& DAORegistry::getDAO('ArchiveDAO');
     $recordDao =& DAORegistry::getDAO('RecordDAO');
     $archiveId = array_shift($args);
     $archive = null;
     if (($archive =& $archiveDao->getArchive($archiveId)) || $archiveId == 'all') {
         $this->setupTemplate($archive, true);
         $rangeInfo = PKPHandler::getRangeInfo('records');
         $sortOrderDao =& DAORegistry::getDAO('SortOrderDAO');
         $sortOrderId = Request::getUserVar('sortOrderId');
         $sortOrder =& $sortOrderDao->getSortOrder($sortOrderId);
         if ($sortOrder) {
             $templateMgr->assign('sortOrderId', $sortOrderId);
         }
         $sortOrders =& $sortOrderDao->getSortOrders();
         $templateMgr->assign_by_ref('sortOrders', $sortOrders);
         // The user has chosen an archive or opted to browse all
         $records =& $recordDao->getRecords($archive ? (int) $archiveId : null, true, $sortOrder, $rangeInfo);
         $templateMgr->assign_by_ref('records', $records);
         $templateMgr->assign_by_ref('archive', $archive);
         $templateMgr->display('browse/records.tpl');
     } else {
         $this->setupTemplate($archive);
         // List archives for the user to browse.
         $rangeInfo = PKPHandler::getRangeInfo('archives');
         $archives =& $archiveDao->getArchives(true, $rangeInfo);
         $templateMgr->assign_by_ref('archives', $archives);
         $templateMgr->display('browse/index.tpl');
     }
 }
开发者ID:ramonsodoma,项目名称:harvester,代码行数:36,代码来源:BrowseHandler.inc.php

示例6: index

 /**
  * Display section editor index page.
  */
 function index($args)
 {
     SectionEditorHandler::validate();
     SectionEditorHandler::setupTemplate();
     $journal =& Request::getJournal();
     $user =& Request::getUser();
     $rangeInfo = Handler::getRangeInfo('submissions');
     // Get the user's search conditions, if any
     $searchField = Request::getUserVar('searchField');
     $dateSearchField = Request::getUserVar('dateSearchField');
     $searchMatch = Request::getUserVar('searchMatch');
     $search = Request::getUserVar('search');
     $fromDate = Request::getUserDateVar('dateFrom', 1, 1);
     if ($fromDate !== null) {
         $fromDate = date('Y-m-d H:i:s', $fromDate);
     }
     $toDate = Request::getUserDateVar('dateTo', 32, 12, null, 23, 59, 59);
     if ($toDate !== null) {
         $toDate = date('Y-m-d H:i:s', $toDate);
     }
     $sectionDao =& DAORegistry::getDAO('SectionDAO');
     $sectionEditorSubmissionDao =& DAORegistry::getDAO('SectionEditorSubmissionDAO');
     $page = isset($args[0]) ? $args[0] : '';
     $sections =& $sectionDao->getSectionTitles($journal->getJournalId());
     switch ($page) {
         case 'submissionsInEditing':
             $functionName = 'getSectionEditorSubmissionsInEditing';
             $helpTopicId = 'editorial.sectionEditorsRole.submissions.inEditing';
             break;
         case 'submissionsArchives':
             $functionName = 'getSectionEditorSubmissionsArchives';
             $helpTopicId = 'editorial.sectionEditorsRole.submissions.archives';
             break;
         default:
             $page = 'submissionsInReview';
             $functionName = 'getSectionEditorSubmissionsInReview';
             $helpTopicId = 'editorial.sectionEditorsRole.submissions.inReview';
     }
     $submissions =& $sectionEditorSubmissionDao->{$functionName}($user->getUserId(), $journal->getJournalId(), Request::getUserVar('section'), $searchField, $searchMatch, $search, $dateSearchField, $fromDate, $toDate, $rangeInfo);
     $templateMgr =& TemplateManager::getManager();
     $templateMgr->assign('helpTopicId', $helpTopicId);
     $templateMgr->assign('sectionOptions', array(0 => Locale::Translate('editor.allSections')) + $sections);
     $templateMgr->assign_by_ref('submissions', $submissions);
     $templateMgr->assign('section', Request::getUserVar('section'));
     $templateMgr->assign('pageToDisplay', $page);
     $templateMgr->assign('sectionEditor', $user->getFullName());
     // Set search parameters
     $duplicateParameters = array('searchField', 'searchMatch', 'search', 'dateFromMonth', 'dateFromDay', 'dateFromYear', 'dateToMonth', 'dateToDay', 'dateToYear', 'dateSearchField');
     foreach ($duplicateParameters as $param) {
         $templateMgr->assign($param, Request::getUserVar($param));
     }
     $templateMgr->assign('dateFrom', $fromDate);
     $templateMgr->assign('dateTo', $toDate);
     $templateMgr->assign('fieldOptions', array(SUBMISSION_FIELD_TITLE => 'article.title', SUBMISSION_FIELD_AUTHOR => 'user.role.author', SUBMISSION_FIELD_EDITOR => 'user.role.editor'));
     $templateMgr->assign('dateFieldOptions', array(SUBMISSION_FIELD_DATE_SUBMITTED => 'submissions.submitted', SUBMISSION_FIELD_DATE_COPYEDIT_COMPLETE => 'submissions.copyeditComplete', SUBMISSION_FIELD_DATE_LAYOUT_COMPLETE => 'submissions.layoutComplete', SUBMISSION_FIELD_DATE_PROOFREADING_COMPLETE => 'submissions.proofreadingComplete'));
     import('issue.IssueAction');
     $issueAction =& new IssueAction();
     $templateMgr->register_function('print_issue_id', array($issueAction, 'smartyPrintIssueId'));
     $templateMgr->display('sectionEditor/index.tpl');
 }
开发者ID:alenoosh,项目名称:ojs,代码行数:63,代码来源:SectionEditorHandler.inc.php

示例7: saveSettings

 function saveSettings()
 {
     RTAdminHandler::validate();
     // Bring in the comments constants.
     $commentDao =& DAORegistry::getDao('CommentDAO');
     $journal = Request::getJournal();
     if ($journal) {
         $rtDao =& DAORegistry::getDAO('RTDAO');
         $rt = $rtDao->getJournalRTByJournal($journal);
         if (Request::getUserVar('version') == '') {
             $rt->setVersion(null);
         } else {
             $rt->setVersion(Request::getUserVar('version'));
         }
         $rt->setEnabled(Request::getUserVar('enabled') == true);
         $rt->setAbstract(Request::getUserVar('abstract') == true);
         $rt->setCaptureCite(Request::getUserVar('captureCite') == true);
         $rt->setViewMetadata(Request::getUserVar('viewMetadata') == true);
         $rt->setSupplementaryFiles(Request::getUserVar('supplementaryFiles') == true);
         $rt->setPrinterFriendly(Request::getUserVar('printerFriendly') == true);
         $rt->setAuthorBio(Request::getUserVar('authorBio') == true);
         $rt->setDefineTerms(Request::getUserVar('defineTerms') == true);
         $rt->setEmailAuthor(Request::getUserVar('emailAuthor') == true);
         $rt->setEmailOthers(Request::getUserVar('emailOthers') == true);
         $rt->setFindingReferences(Request::getUserVar('findingReferences') == true);
         $journal->updateSetting('enableComments', Request::getUserVar('enableComments') ? Request::getUserVar('enableCommentsMode') : COMMENTS_DISABLED);
         $rtDao->updateJournalRT($rt);
     }
     Request::redirect(null, Request::getRequestedPage());
 }
开发者ID:LiteratimBi,项目名称:jupitertfn,代码行数:30,代码来源:RTSetupHandler.inc.php

示例8: display

 /**
  * Display the form.
  */
 function display(&$args)
 {
     $meetingId = isset($args[0]) ? $args[0] : 0;
     $journal =& Request::getJournal();
     $journalId = $journal->getId();
     $user =& Request::getUser();
     $sectionDecisionDao =& DAORegistry::getDAO('SectionDecisionDAO');
     $sort = Request::getUserVar('sort');
     $sort = isset($sort) ? $sort : 'id';
     $sortDirection = Request::getUserVar('sortDirection');
     $availableSectionDecisions =& $sectionDecisionDao->getSectionDecisionsAvailableForMeeting($user->getSecretaryCommitteeId(), $journalId, $sort, $sortDirection);
     /*Get the selected submissions to be reviewed*/
     $meetingDao =& DAORegistry::getDAO('MeetingDAO');
     $meeting =& $meetingDao->getMeetingById($meetingId);
     /*Get the selected submissions to be reviewed*/
     $meetingSectionDecisionDao =& DAORegistry::getDAO('MeetingSectionDecisionDAO');
     $mSectionDecisions = $meetingSectionDecisionDao->getMeetingSectionDecisionsByMeetingId($meetingId);
     $sectionDecisionsId = array();
     foreach ($mSectionDecisions as $mSectionDecision) {
         array_push($sectionDecisionsId, $mSectionDecision->getSectionDecisionId());
     }
     $templateMgr =& TemplateManager::getManager();
     $templateMgr->assign('sort', $sort);
     $templateMgr->assign('sortDirection', $sortDirection);
     $templateMgr->assign('meetingId', $meetingId);
     $templateMgr->assign('meetingDate', $meeting->getDate());
     $templateMgr->assign('meetingLength', $meeting->getLength());
     $templateMgr->assign('location', $meeting->getLocation());
     $templateMgr->assign('investigator', $meeting->getInvestigator());
     $templateMgr->assign_by_ref('availableSectionDecisions', $availableSectionDecisions);
     $templateMgr->assign_by_ref('sectionDecisionsId', $sectionDecisionsId);
     $templateMgr->assign('baseUrl', Config::getVar('general', "base_url"));
     parent::display();
 }
开发者ID:JovanyJeff,项目名称:hrp,代码行数:37,代码来源:SetMeetingForm.inc.php

示例9: manage

 function manage($verb, $args)
 {
     if (parent::manage($verb, $args)) {
         return true;
     }
     if (!$this->getEnabled()) {
         return false;
     }
     switch ($verb) {
         case 'settings':
             $journal =& Request::getJournal();
             $this->import('SettingsForm');
             $form = new SettingsForm($this, $journal->getId());
             if (Request::getUserVar('save')) {
                 $form->readInputData();
                 if ($form->validate()) {
                     $form->execute();
                     Request::redirect(null, null, 'plugins');
                 } else {
                     $form->display();
                 }
             } else {
                 $form->initData();
                 $form->display();
             }
             break;
         default:
             return false;
     }
     return true;
 }
开发者ID:farhanabbas1983,项目名称:ojs-1,代码行数:31,代码来源:MetsGatewayPlugin.inc.php

示例10: index

 /**
  * Display proofreader index page.
  */
 function index($args)
 {
     $this->validate();
     $this->setupTemplate();
     $journal =& Request::getJournal();
     $user =& Request::getUser();
     $proofreaderSubmissionDao =& DAORegistry::getDAO('ProofreaderSubmissionDAO');
     // Get the user's search conditions, if any
     $searchField = Request::getUserVar('searchField');
     $dateSearchField = Request::getUserVar('dateSearchField');
     $searchMatch = Request::getUserVar('searchMatch');
     $search = Request::getUserVar('search');
     $fromDate = Request::getUserDateVar('dateFrom', 1, 1);
     if ($fromDate !== null) {
         $fromDate = date('Y-m-d H:i:s', $fromDate);
     }
     $toDate = Request::getUserDateVar('dateTo', 32, 12, null, 23, 59, 59);
     if ($toDate !== null) {
         $toDate = date('Y-m-d H:i:s', $toDate);
     }
     $rangeInfo = Handler::getRangeInfo('submissions');
     $page = isset($args[0]) ? $args[0] : '';
     switch ($page) {
         case 'completed':
             $active = false;
             break;
         default:
             $page = 'active';
             $active = true;
     }
     $sort = Request::getUserVar('sort');
     $sort = isset($sort) ? $sort : 'title';
     $sortDirection = Request::getUserVar('sortDirection');
     $countryField = Request::getUserVar('countryField');
     $submissions = $proofreaderSubmissionDao->getSubmissions($user->getId(), $journal->getId(), $searchField, $searchMatch, $search, $dateSearchField, $fromDate, $toDate, $countryField, $active, $rangeInfo, $sort, $sortDirection);
     $templateMgr =& TemplateManager::getManager();
     $templateMgr->assign('pageToDisplay', $page);
     $templateMgr->assign_by_ref('submissions', $submissions);
     // Set search parameters
     $duplicateParameters = array('searchField', 'searchMatch', 'search', 'dateFromMonth', 'dateFromDay', 'dateFromYear', 'dateToMonth', 'dateToDay', 'dateToYear', 'dateSearchField');
     foreach ($duplicateParameters as $param) {
         $templateMgr->assign($param, Request::getUserVar($param));
     }
     $templateMgr->assign('dateFrom', $fromDate);
     $templateMgr->assign('dateTo', $toDate);
     $templateMgr->assign('fieldOptions', array(SUBMISSION_FIELD_TITLE => 'article.title', SUBMISSION_FIELD_AUTHOR => 'user.role.author', SUBMISSION_FIELD_EDITOR => 'user.role.editor'));
     $templateMgr->assign('dateFieldOptions', array(SUBMISSION_FIELD_DATE_SUBMITTED => 'submissions.submitted', SUBMISSION_FIELD_DATE_COPYEDIT_COMPLETE => 'submissions.copyeditComplete', SUBMISSION_FIELD_DATE_LAYOUT_COMPLETE => 'submissions.layoutComplete', SUBMISSION_FIELD_DATE_PROOFREADING_COMPLETE => 'submissions.proofreadingComplete'));
     $extraFieldDao =& DAORegistry::getDAO('ExtraFieldDAO');
     $countries =& $extraFieldDao->getExtraFieldsList(EXTRA_FIELD_GEO_AREA);
     $templateMgr->assign_by_ref('countries', $countries);
     import('classes.issue.IssueAction');
     $issueAction = new IssueAction();
     $templateMgr->register_function('print_issue_id', array($issueAction, 'smartyPrintIssueId'));
     $templateMgr->assign('helpTopicId', 'editorial.proofreadersRole.submissions');
     $templateMgr->assign('sort', $sort);
     $templateMgr->assign('sortDirection', $sortDirection);
     // Added by igm 9/24/11
     $templateMgr->assign('countryField', $countryField);
     $templateMgr->display('proofreader/index.tpl');
 }
开发者ID:JovanyJeff,项目名称:hrp,代码行数:63,代码来源:ProofreaderHandler.inc.php

示例11: saveSettings

 function saveSettings()
 {
     $this->validate();
     $conference = Request::getConference();
     if ($conference) {
         $rtDao =& DAORegistry::getDAO('RTDAO');
         $rt = $rtDao->getConferenceRTByConference($conference);
         if (Request::getUserVar('version') == '') {
             $rt->setVersion(null);
         } else {
             $rt->setVersion(Request::getUserVar('version'));
         }
         $rt->setEnabled(Request::getUserVar('enabled') == true);
         $rt->setAbstract(Request::getUserVar('abstract') == true);
         $rt->setCaptureCite(Request::getUserVar('captureCite') == true);
         $rt->setViewMetadata(Request::getUserVar('viewMetadata') == true);
         $rt->setSupplementaryFiles(Request::getUserVar('supplementaryFiles') == true);
         $rt->setPrinterFriendly(Request::getUserVar('printerFriendly') == true);
         $rt->setAuthorBio(Request::getUserVar('authorBio') == true);
         $rt->setDefineTerms(Request::getUserVar('defineTerms') == true);
         $rt->setAddComment(Request::getUserVar('addComment') == true);
         $rt->setEmailAuthor(Request::getUserVar('emailAuthor') == true);
         $rt->setEmailOthers(Request::getUserVar('emailOthers') == true);
         $rt->setFindingReferences(Request::getUserVar('findingReferences') == true);
         $rtDao->updateConferenceRT($rt);
     }
     Request::redirect(null, null, Request::getRequestedPage());
 }
开发者ID:ramonsodoma,项目名称:ocs,代码行数:28,代码来源:RTSetupHandler.inc.php

示例12: saveProgramSettings

 /**
  * Save changes to program settings.
  */
 function saveProgramSettings()
 {
     $this->validate();
     $this->setupTemplate(true);
     $schedConf =& Request::getSchedConf();
     if (!$schedConf) {
         Request::redirect(null, null, 'index');
     }
     import('classes.manager.form.ProgramSettingsForm');
     $settingsForm = new ProgramSettingsForm();
     $settingsForm->readInputData();
     $formLocale = $settingsForm->getFormLocale();
     $programTitle = Request::getUserVar('programFileTitle');
     $editData = false;
     if (Request::getUserVar('uploadProgramFile')) {
         if (!$settingsForm->uploadProgram('programFile', $formLocale)) {
             $settingsForm->addError('programFile', Locale::translate('common.uploadFailed'));
         }
         $editData = true;
     } elseif (Request::getUserVar('deleteProgramFile')) {
         $settingsForm->deleteProgram('programFile', $formLocale);
         $editData = true;
     }
     if (!$editData && $settingsForm->validate()) {
         $settingsForm->execute();
         $templateMgr =& TemplateManager::getManager();
         $templateMgr->assign(array('currentUrl' => Request::url(null, null, null, 'program'), 'pageTitle' => 'schedConf.program', 'message' => 'common.changesSaved', 'backLink' => Request::url(null, null, Request::getRequestedPage()), 'backLinkLabel' => 'manager.conferenceSiteManagement'));
         $templateMgr->display('common/message.tpl');
     } else {
         $settingsForm->display();
     }
 }
开发者ID:ramonsodoma,项目名称:ocs,代码行数:35,代码来源:ManagerProgramHandler.inc.php

示例13: updateReferral

 /**
  * Save changes to an announcement type.
  */
 function updateReferral()
 {
     $referralId = (int) Request::getUserVar('referralId');
     if ($referralId === 0) {
         $referralId = null;
     }
     list($plugin, $referral, $article) = $this->validate($referralId);
     // If it's an insert, ensure that it's allowed for this article
     if (!isset($referral)) {
         $publishedArticleDao =& DAORegistry::getDAO('PublishedArticleDAO');
         $journal =& Request::getJournal();
         $article =& $publishedArticleDao->getPublishedArticleByArticleId((int) Request::getUserVar('articleId'));
         if (!$article || $article->getUserId() != $user->getId() && !Validation::isSectionEditor($journal->getId()) && !Validation::isEditor($journal->getId())) {
             Request::redirect(null, 'author');
         }
     }
     $this->setupTemplate();
     $plugin->import('ReferralForm');
     $referralForm = new ReferralForm($plugin, $article, $referralId);
     $referralForm->readInputData();
     if ($referralForm->validate()) {
         $referralForm->execute();
         Request::redirect(null, 'author');
     } else {
         $templateMgr =& TemplateManager::getManager();
         if ($referralId == null) {
             $templateMgr->assign('referralTitle', 'plugins.generic.referral.createReferral');
         } else {
             $templateMgr->assign('referralTitle', 'plugins.generic.referral.editReferral');
         }
         $referralForm->display();
     }
 }
开发者ID:ingmarschuster,项目名称:MindResearchRepository,代码行数:36,代码来源:ReferralHandler.inc.php

示例14: view

 function view($args)
 {
     $articleId = isset($args[0]) ? (int) $args[0] : 0;
     $galleyId = isset($args[1]) ? (int) $args[1] : 0;
     $commentId = isset($args[2]) ? (int) $args[2] : 0;
     list($journal, $issue, $article) = CommentHandler::validate($articleId);
     $user =& Request::getUser();
     $userId = isset($user) ? $user->getUserId() : null;
     $commentDao =& DAORegistry::getDAO('CommentDAO');
     $comment =& $commentDao->getComment($commentId, $articleId, 2);
     $roleDao =& DAORegistry::getDAO('RoleDAO');
     $isManager = $roleDao->roleExists($journal->getJournalId(), $userId, ROLE_ID_JOURNAL_MANAGER);
     if (!$comment) {
         $comments =& $commentDao->getRootCommentsByArticleId($articleId, 1);
     } else {
         $comments =& $comment->getChildren();
     }
     CommentHandler::setupTemplate($article, $galleyId, $comment);
     $templateMgr =& TemplateManager::getManager();
     if (Request::getUserVar('refresh')) {
         $templateMgr->setCacheability(CACHEABILITY_NO_CACHE);
     }
     if ($comment) {
         $templateMgr->assign_by_ref('comment', $comment);
         $templateMgr->assign_by_ref('parent', $commentDao->getComment($comment->getParentCommentId(), $articleId));
     }
     $templateMgr->assign_by_ref('comments', $comments);
     $templateMgr->assign('articleId', $articleId);
     $templateMgr->assign('galleyId', $galleyId);
     $templateMgr->assign('enableComments', $journal->getSetting('enableComments'));
     $templateMgr->assign('isManager', $isManager);
     $templateMgr->display('comment/comments.tpl');
 }
开发者ID:Jouper,项目名称:jouper,代码行数:33,代码来源:CommentHandler.inc.php

示例15: AuthorHandler

 /**
  * Constructor
  **/
 function AuthorHandler()
 {
     parent::Handler();
     $this->addCheck(new HandlerValidatorConference($this));
     $this->addCheck(new HandlerValidatorSchedConf($this));
     $this->addCheck(new HandlerValidatorRoles($this, true, null, array('requiresAuthor' => Request::getUserVar('requiresAuthor')), array(ROLE_ID_AUTHOR)));
 }
开发者ID:artkuo,项目名称:ocs,代码行数:10,代码来源:AuthorHandler.inc.php


注:本文中的Request::getUserVar方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。