本文整理汇总了PHP中Request::getUserDateVar方法的典型用法代码示例。如果您正苦于以下问题:PHP Request::getUserDateVar方法的具体用法?PHP Request::getUserDateVar怎么用?PHP Request::getUserDateVar使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Request
的用法示例。
在下文中一共展示了Request::getUserDateVar方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: subscriptions
/**
* Display a list of subscriptions for the current journal.
*/
function subscriptions()
{
SubscriptionManagerHandler::validate();
SubscriptionManagerHandler::setupTemplate();
$journal =& Request::getJournal();
$rangeInfo =& Handler::getRangeInfo('subscriptions');
$subscriptionDao =& DAORegistry::getDAO('SubscriptionDAO');
// 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);
}
$subscriptions =& $subscriptionDao->getSubscriptionsByJournalId($journal->getJournalId(), $searchField, $searchMatch, $search, $dateSearchField, $fromDate, $toDate, $rangeInfo);
$templateMgr =& TemplateManager::getManager();
$templateMgr->assign_by_ref('subscriptions', $subscriptions);
$templateMgr->assign('helpTopicId', 'journal.managementPages.subscriptions');
// Set search parameters
foreach (SubscriptionManagerHandler::getSearchFormDuplicateParameters() as $param) {
$templateMgr->assign($param, Request::getUserVar($param));
}
$templateMgr->assign('dateFrom', $fromDate);
$templateMgr->assign('dateTo', $toDate);
$templateMgr->assign('fieldOptions', SubscriptionManagerHandler::getSearchFieldOptions());
$templateMgr->assign('dateFieldOptions', SubscriptionManagerHandler::getDateFieldOptions());
$templateMgr->display('subscription/subscriptions.tpl');
}
示例2: 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');
}
示例3: 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');
}
示例4: readInputData
/**
* Assign form data to user-submitted data.
*/
function readInputData()
{
$this->readUserVars(array('listReviewers', 'selectedFields', 'selectedOrderField', 'order'));
$this->_data['fromDate'] = Request::getUserDateVar('fromDate', 1, 1);
if ($this->_data['fromDate'] !== null) {
$this->_data['fromDate'] = date('Y-m-d', $this->_data['fromDate']);
}
$this->_data['toDate'] = Request::getUserDateVar('toDate', 1, 1);
if ($this->_data['toDate'] !== null) {
$this->_data['toDate'] = date('Y-m-d', $this->_data['toDate']);
}
}
示例5: registration
/**
* Display a list of registrations for the current scheduled conference.
*/
function registration()
{
$this->validate();
$this->setupTemplate();
$schedConf =& Request::getSchedConf();
$rangeInfo =& Handler::getRangeInfo('registrations', array());
$registrationDao =& DAORegistry::getDAO('RegistrationDAO');
// Get the user's search conditions, if any
$searchField = Request::getUserVar('searchField');
$dateSearchField = Request::getUserVar('dateSearchField');
$searchMatch = Request::getUserVar('searchMatch');
$search = Request::getUserVar('search');
$sort = Request::getUserVar('sort');
//$sort = isset($sort) ? $sort : 'user';
$sort = isset($sort) ? $sort : 'registered';
$sortDirection = Request::getUserVar('sortDirection');
$sortDirection = isset($sortDirection) ? $sortDirection : SORT_DIRECTION_DESC;
$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);
}
while (true) {
$registrations =& $registrationDao->getRegistrationsBySchedConfId($schedConf->getId(), $searchField, $searchMatch, $search, $dateSearchField, $fromDate, $toDate, $rangeInfo, $sort, $sortDirection);
if ($registrations->isInBounds()) {
break;
}
unset($rangeInfo);
$rangeInfo =& $registrations->getLastPageRangeInfo();
unset($registrations);
}
$templateMgr =& TemplateManager::getManager();
$templateMgr->assign_by_ref('registrations', $registrations);
$templateMgr->assign('helpTopicId', 'conference.currentConferences.registration');
// Set search parameters
foreach ($this->getSearchFormDuplicateParameters() as $param) {
$templateMgr->assign($param, Request::getUserVar($param));
}
$templateMgr->assign('dateFrom', $fromDate);
$templateMgr->assign('dateTo', $toDate);
$templateMgr->assign('fieldOptions', $this->getSearchFieldOptions());
$templateMgr->assign('dateFieldOptions', $this->getDateFieldOptions());
$templateMgr->assign('sort', $sort);
$templateMgr->assign('sortDirection', $sortDirection);
$templateMgr->display('registration/registrations.tpl');
}
示例6: subscriptions
/**
* Display a list of subscriptions for the current journal.
*/
function subscriptions($institutional = false)
{
$journal =& Request::getJournal();
$rangeInfo =& PKPHandler::getRangeInfo('subscriptions');
if ($institutional) {
$subscriptionDao =& DAORegistry::getDAO('InstitutionalSubscriptionDAO');
$templateFile = 'subscription/institutionalSubscriptions.tpl';
$fieldOptions = SubscriptionAction::getInstitutionalSearchFieldOptions();
} else {
$subscriptionDao =& DAORegistry::getDAO('IndividualSubscriptionDAO');
$templateFile = 'subscription/individualSubscriptions.tpl';
$fieldOptions = SubscriptionAction::getIndividualSearchFieldOptions();
}
// Subscription status
$statusOptions =& $subscriptionDao->getStatusOptions();
$filterStatus = Request::getUserVar('filterStatus') == 0 ? null : Request::getUserVar('filterStatus');
// 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);
}
$subscriptions =& $subscriptionDao->getSubscriptionsByJournalId($journal->getId(), $filterStatus, $searchField, $searchMatch, $search, $dateSearchField, $fromDate, $toDate, $rangeInfo);
$templateMgr =& TemplateManager::getManager();
$templateMgr->assign_by_ref('subscriptions', $subscriptions);
$templateMgr->assign('helpTopicId', 'journal.managementPages.subscriptions');
// Set search parameters
foreach (SubscriptionAction::getSearchFormDuplicateParameters() as $param) {
$templateMgr->assign($param, Request::getUserVar($param));
}
$templateMgr->assign('dateFrom', $fromDate);
$templateMgr->assign('dateTo', $toDate);
$templateMgr->assign('filterStatus', Request::getUserVar('filterStatus'));
$templateMgr->assign('statusOptions', array(0 => 'manager.subscriptions.allStatus') + $statusOptions);
$templateMgr->assign('fieldOptions', $fieldOptions);
$templateMgr->assign('dateFieldOptions', SubscriptionAction::getDateFieldOptions());
$templateMgr->display($templateFile);
}
示例7: display
/**
* Display the form.
*/
function display(&$args)
{
$journal =& Request::getJournal();
$journalId = $journal->getId();
$user =& Request::getUser();
$userDao =& DAORegistry::getDAO('UserDAO');
$ercMembers =& $userDao->getUsersWithReviewerRole($journalId);
$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);
}
$templateMgr =& TemplateManager::getManager();
$templateMgr->assign_by_ref('members', $ercMembers);
$templateMgr->assign('dateFrom', $fromDate);
$templateMgr->assign('dateTo', $toDate);
parent::display();
}
示例8: meetings
function meetings()
{
$this->validate();
$this->setupTemplate(true);
$journal =& Request::getJournal();
$journalId = $journal->getId();
$user =& Request::getUser();
$userId = $user->getId();
$meetingDao = DAORegistry::getDAO('MeetingDAO');
$meetingSectionDecisionDao = DAORegistry::getDAO('MeetingSectionDecisionDAO');
$sectionDecisionDao = DAORegistry::getDAO('SectionDecisionDAO');
$ercReviewersDao = DAORegistry::getDAO('ErcReviewersDAO');
$sort = Request::getUserVar('sort');
$sort = isset($sort) ? $sort : 'id';
$sortDirection = Request::getUserVar('sortDirection');
$rangeInfo = Handler::getRangeInfo('meetings');
$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);
}
$status = Request::getUserVar('status');
$replyStatus = Request::getUserVar('replyStatus');
$meetingsToArray = $meetings = $meetingDao->getMeetingsByReviewerId($userId, $sort, $rangeInfo, $sortDirection, $status, $replyStatus, $fromDate, $toDate);
$map = array();
$meetingsArray = $meetingsToArray->toArray();
foreach ($meetingsArray as $meeting) {
$mSectionDecisions = $meetingSectionDecisionDao->getMeetingSectionDecisionsByMeetingId($meeting->getId());
$sectionDecisions = array();
foreach ($mSectionDecisions as $mSectionDecision) {
$sectionDecision = $sectionDecisionDao->getSectionDecision($mSectionDecision->getSectionDecisionId());
array_push($sectionDecisions, $sectionDecision);
}
$map[$meeting->getId()] = $sectionDecisions;
}
$meetings = $meetingDao->getMeetingsByReviewerId($userId, $sort, $rangeInfo, $sortDirection, $status, $replyStatus, $fromDate, $toDate);
$templateMgr =& TemplateManager::getManager();
$templateMgr->assign_by_ref('meetings', $meetings);
$templateMgr->assign_by_ref('submissions', $sectionDecisions);
$templateMgr->assign_by_ref('map', $map);
$templateMgr->assign('sort', $sort);
$templateMgr->assign('rangeInfo', count($meetings));
$templateMgr->assign('sortDirection', $sortDirection);
$templateMgr->assign('baseUrl', Config::getVar('general', "base_url"));
$templateMgr->assign('dateFrom', $fromDate);
$templateMgr->assign('dateTo', $toDate);
$templateMgr->assign('status', $status);
$templateMgr->assign('replyStatus', $replyStatus);
$templateMgr->assign('userId', $userId);
$templateMgr->assign('isReviewer', !$ercReviewersDao->isExternalReviewer($journalId, $userId));
// Set search parameters
$duplicateParameters = array('dateFromMonth', 'dateFromDay', 'dateFromYear', 'dateToMonth', 'dateToDay', 'dateToYear', 'status', 'replyStatus');
foreach ($duplicateParameters as $param) {
$templateMgr->assign($param, Request::getUserVar($param));
}
$templateMgr->display('reviewer/meetings.tpl');
}
示例9: advancedResults
/**
* Show advanced search results.
*/
function advancedResults()
{
parent::validate();
SearchHandler::setupTemplate(true);
$rangeInfo = Handler::getRangeInfo('search');
$searchJournalId = Request::getUserVar('searchJournal');
if (!empty($searchJournalId)) {
$journalDao =& DAORegistry::getDAO('JournalDAO');
$journal =& $journalDao->getJournal($searchJournalId);
} else {
$journal =& Request::getJournal();
}
// Load the keywords array with submitted values
$keywords = array(null => ArticleSearch::parseQuery(Request::getUserVar('query')));
$keywords[ARTICLE_SEARCH_AUTHOR] = ArticleSearch::parseQuery(Request::getUserVar('author'));
$keywords[ARTICLE_SEARCH_TITLE] = ArticleSearch::parseQuery(Request::getUserVar('title'));
$keywords[ARTICLE_SEARCH_DISCIPLINE] = ArticleSearch::parseQuery(Request::getUserVar('discipline'));
$keywords[ARTICLE_SEARCH_SUBJECT] = ArticleSearch::parseQuery(Request::getUserVar('subject'));
$keywords[ARTICLE_SEARCH_TYPE] = ArticleSearch::parseQuery(Request::getUserVar('type'));
$keywords[ARTICLE_SEARCH_COVERAGE] = ArticleSearch::parseQuery(Request::getUserVar('coverage'));
$keywords[ARTICLE_SEARCH_GALLEY_FILE] = ArticleSearch::parseQuery(Request::getUserVar('fullText'));
$keywords[ARTICLE_SEARCH_SUPPLEMENTARY_FILE] = ArticleSearch::parseQuery(Request::getUserVar('supplementaryFiles'));
$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);
}
$results =& ArticleSearch::retrieveResults($journal, $keywords, $fromDate, $toDate, $rangeInfo);
$templateMgr =& TemplateManager::getManager();
$templateMgr->assign_by_ref('results', $results);
SearchHandler::assignAdvancedSearchParameters($templateMgr);
$templateMgr->display('search/searchResults.tpl');
}
示例10: advancedResults
/**
* Show advanced search results.
*/
function advancedResults()
{
parent::validate();
SearchHandler::setupTemplate(true);
$rangeInfo = Handler::getRangeInfo('search');
$publishedPaperDao =& DAORegistry::getDAO('PublishedPaperDAO');
$searchConferenceId = Request::getUserVar('searchConference');
if (!empty($searchConferenceId)) {
$conferenceDao =& DAORegistry::getDAO('ConferenceDAO');
$conference =& $conferenceDao->getConference($searchConferenceId);
$yearRange = $publishedPaperDao->getPaperYearRange($conference->getId());
} else {
$conference =& Request::getConference();
$yearRange = $publishedPaperDao->getPaperYearRange(null);
}
// Load the keywords array with submitted values
$keywords = array(null => PaperSearch::parseQuery(Request::getUserVar('query')));
$keywords[PAPER_SEARCH_AUTHOR] = PaperSearch::parseQuery(Request::getUserVar('author'));
$keywords[PAPER_SEARCH_TITLE] = PaperSearch::parseQuery(Request::getUserVar('title'));
$keywords[PAPER_SEARCH_DISCIPLINE] = PaperSearch::parseQuery(Request::getUserVar('discipline'));
$keywords[PAPER_SEARCH_SUBJECT] = PaperSearch::parseQuery(Request::getUserVar('subject'));
$keywords[PAPER_SEARCH_TYPE] = PaperSearch::parseQuery(Request::getUserVar('type'));
$keywords[PAPER_SEARCH_COVERAGE] = PaperSearch::parseQuery(Request::getUserVar('coverage'));
$keywords[PAPER_SEARCH_GALLEY_FILE] = PaperSearch::parseQuery(Request::getUserVar('fullText'));
$keywords[PAPER_SEARCH_SUPPLEMENTARY_FILE] = PaperSearch::parseQuery(Request::getUserVar('supplementaryFiles'));
$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);
}
$results =& PaperSearch::retrieveResults($conference, $keywords, $fromDate, $toDate, $rangeInfo);
$templateMgr =& TemplateManager::getManager();
$templateMgr->setCacheability(CACHEABILITY_NO_STORE);
$templateMgr->assign_by_ref('results', $results);
SearchHandler::_assignAdvancedSearchParameters($templateMgr, $yearRange);
$templateMgr->display('search/searchResults.tpl');
}
示例11: submissions
/**
* Display editor submission queue pages.
*/
function submissions($args)
{
EditorHandler::validate();
EditorHandler::setupTemplate(EDITOR_SECTION_SUBMISSIONS);
$journal =& Request::getJournal();
$journalId = $journal->getJournalId();
$user =& Request::getUser();
$editorSubmissionDao =& DAORegistry::getDAO('EditorSubmissionDAO');
$sectionDao =& DAORegistry::getDAO('SectionDAO');
$page = isset($args[0]) ? $args[0] : '';
$sections =& $sectionDao->getSectionTitles($journalId);
// 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');
switch ($page) {
case 'submissionsUnassigned':
$functionName = 'getEditorSubmissionsUnassigned';
$helpTopicId = 'editorial.editorsRole.submissions.unassigned';
break;
case 'submissionsInEditing':
$functionName = 'getEditorSubmissionsInEditing';
$helpTopicId = 'editorial.editorsRole.submissions.inEditing';
break;
case 'submissionsArchives':
$functionName = 'getEditorSubmissionsArchives';
$helpTopicId = 'editorial.editorsRole.submissions.archives';
break;
default:
$page = 'submissionsInReview';
$functionName = 'getEditorSubmissionsInReview';
$helpTopicId = 'editorial.editorsRole.submissions.inReview';
}
$filterEditor = isset($args[1]) ? $args[1] : '';
if ($filterEditor == 'filterEditor') {
$user->updateSetting('filterEditor', 'filterEditor', 'string', $journalId);
} elseif ($filterEditor == 'allEditors') {
$user->updateSetting('filterEditor', 'allEditors', 'string', $journalId);
} else {
$filterEditor = $user->getSetting('filterEditor', $journalId);
if (!$filterEditor) {
$user->updateSetting('filterEditor', 'allEditors', 'string', $journalId);
}
}
if ($filterEditor == 'filterEditor') {
$editorId = $user->getUserId();
} else {
$editorId = 0;
}
$submissions =& $editorSubmissionDao->{$functionName}($journalId, Request::getUserVar('section'), $editorId, $searchField, $searchMatch, $search, $dateSearchField, $fromDate, $toDate, $rangeInfo);
$templateMgr =& TemplateManager::getManager();
$templateMgr->assign('pageToDisplay', $page);
$templateMgr->assign('editor', $user->getFullName());
$templateMgr->assign('sectionOptions', array(0 => Locale::Translate('editor.allSections')) + $sections);
$templateMgr->assign_by_ref('submissions', $submissions);
$templateMgr->assign('section', Request::getUserVar('section'));
$templateMgr->assign('filterEditor', $filterEditor);
// Set search parameters
foreach (EditorHandler::getSearchFormDuplicateParameters() as $param) {
$templateMgr->assign($param, Request::getUserVar($param));
}
$templateMgr->assign('dateFrom', $fromDate);
$templateMgr->assign('dateTo', $toDate);
$templateMgr->assign('fieldOptions', EditorHandler::getSearchFieldOptions());
$templateMgr->assign('dateFieldOptions', EditorHandler::getDateFieldOptions());
import('issue.IssueAction');
$issueAction =& new IssueAction();
$templateMgr->register_function('print_issue_id', array($issueAction, 'smartyPrintIssueId'));
$templateMgr->assign('helpTopicId', $helpTopicId);
$templateMgr->display('editor/submissions.tpl');
}
示例12: readInputData
/**
* Assign form data to user-submitted data.
*/
function readInputData()
{
$this->readUserVars(array('name', 'description', 'notPublic', 'code'));
$this->_data['openDate'] = Request::getUserDateVar('openDate');
$this->_data['closeDate'] = Request::getUserDateVar('closeDate');
}
示例13: readInputData
/**
* Assign form data to user-submitted data.
*/
function readInputData()
{
$this->readUserVars(array('typeId', 'title', 'descriptionShort', 'description', 'dateExpireYear', 'dateExpireMonth', 'dateExpireDay'));
$this->_data['dateExpire'] = Request::getUserDateVar('dateExpire');
}
示例14: readUserDateVars
/**
* Adds specified user date variables to input data.
* @param $vars array the names of the date variables to read
*/
function readUserDateVars($vars)
{
foreach ($vars as $k) {
$this->setData($k, Request::getUserDateVar($k));
}
}
示例15: advancedResults
/**
* Show advanced search results.
*/
function advancedResults()
{
$this->validate();
$this->setupTemplate(true);
$query = Request::getUserVar('query');
$fromDate = Request::getUserVar('dateFrom');
if (!$fromDate) {
$fromDate = Request::getUserDateVar('dateFrom', 1, 1);
}
$toDate = Request::getUserVar('dateTo');
if (!$toDate) {
$toDate = Request::getUserDateVar('dateTo', 32, 12, null, 23, 59, 59);
}
$country = Request::getUserVar('proposalCountry');
$status = Request::getUserVar('status');
if ($status != '1' && $status != '2') {
$status = false;
}
$rangeInfo =& Handler::getRangeInfo('search');
$sort = Request::getUserVar('sort');
$sort = isset($sort) ? $sort : 'title';
$sortDirection = Request::getUserVar('sortDirection');
$sortDirection = isset($sortDirection) && ($sortDirection == SORT_DIRECTION_ASC || $sortDirection == SORT_DIRECTION_DESC) ? $sortDirection : SORT_DIRECTION_ASC;
$templateMgr =& TemplateManager::getManager();
$templateMgr->assign('dateFrom', $fromDate);
$templateMgr->assign('dateTo', $toDate);
if ($fromDate == '--') {
$fromDate = null;
}
if ($toDate == '--') {
$toDate = null;
}
if ($fromDate !== null) {
$fromDate = date('Y-m-d H:i:s', $fromDate);
}
if ($toDate !== null) {
$toDate = date('Y-m-d H:i:s', $toDate);
}
$articleDao =& DAORegistry::getDAO('ArticleDAO');
$extraFieldDao =& DAORegistry::getDAO('ExtraFieldDAO');
$results =& $articleDao->searchProposalsPublic($query, $fromDate, $toDate, $country, $status, $rangeInfo, $sort, $sortDirection);
$templateMgr->assign('formattedDateFrom', $fromDate);
$templateMgr->assign('formattedDateTo', $toDate);
$templateMgr->assign('statusFilter', $status);
$templateMgr->assign_by_ref('results', $results);
$templateMgr->assign('query', $query);
$templateMgr->assign('region', $country);
$extraField =& $extraFieldDao->getExtraField($country);
$templateMgr->assign('country', isset($extraField) ? $extraField->getLocalizedExtraFieldName() : null);
$templateMgr->assign('countryCode', $country);
$templateMgr->assign('proposalCountries', $extraFieldDao->getExtraFieldsList(EXTRA_FIELD_GEO_AREA));
$templateMgr->assign('sort', $sort);
$templateMgr->assign('sortDirection', $sortDirection);
$templateMgr->assign('count', $results->getCount());
$templateMgr->assign('dateFrom', $fromDate);
$templateMgr->assign('dateTo', $toDate);
$templateMgr->display('search/searchResults.tpl');
}