/**
  * Display the form.
  */
 function display(&$request)
 {
     $templateMgr =& TemplateManager::getManager();
     $templateMgr->assign('new', true);
     if ($this->captchaEnabled && $this->recaptchaEnabled) {
         import('lib.pkp.lib.recaptcha.recaptchalib');
         $publicKey = Config::getVar('captcha', 'recaptcha_public_key');
         $useSSL = Config::getVar('security', 'force_ssl') ? true : false;
         $reCaptchaHtml = recaptcha_get_html($publicKey, null, $useSSL);
         $templateMgr->assign('reCaptchaHtml', $reCaptchaHtml);
         $templateMgr->assign('captchaEnabled', true);
     } elseif ($this->captchaEnabled) {
         import('lib.pkp.classes.captcha.CaptchaManager');
         $captchaManager = new CaptchaManager();
         $captcha =& $captchaManager->createCaptcha();
         if ($captcha) {
             $templateMgr->assign('captchaEnabled', $this->captchaEnabled);
             $this->setData('captchaId', $captcha->getId());
         }
     }
     $context =& $request->getContext();
     if ($context) {
         $templateMgr->assign('allowRegReviewer', $context->getSetting('allowRegReviewer'));
         $templateMgr->assign('allowRegAuthor', $context->getSetting('allowRegAuthor'));
     }
     return parent::display();
 }
Ejemplo n.º 2
0
 /**
  * Display the form.
  */
 function display()
 {
     $templateMgr =& TemplateManager::getManager();
     $site =& Request::getSite();
     $templateMgr->assign('minPasswordLength', $site->getMinPasswordLength());
     $press =& Request::getPress();
     if ($this->captchaEnabled) {
         import('lib.pkp.classes.captcha.CaptchaManager');
         $captchaManager = new CaptchaManager();
         $captcha =& $captchaManager->createCaptcha();
         if ($captcha) {
             $templateMgr->assign('captchaEnabled', $this->captchaEnabled);
             $this->setData('captchaId', $captcha->getId());
         }
     }
     $countryDao =& DAORegistry::getDAO('CountryDAO');
     $countries =& $countryDao->getCountries();
     $templateMgr->assign_by_ref('countries', $countries);
     $userDao =& DAORegistry::getDAO('UserDAO');
     $templateMgr->assign('genderOptions', $userDao->getGenderOptions());
     $templateMgr->assign('privacyStatement', $press->getLocalizedSetting('privacyStatement'));
     $templateMgr->assign('allowRegReader', $press->getSetting('allowRegReader') == 1 ? 1 : 0);
     $templateMgr->assign('allowRegAuthor', $press->getSetting('allowRegAuthor') == 1 ? 1 : 0);
     $templateMgr->assign('allowRegReviewer', $press->getSetting('allowRegReviewer') == 1 ? 1 : 0);
     $templateMgr->assign('source', Request::getUserVar('source'));
     $site =& Request::getSite();
     $templateMgr->assign('availableLocales', $site->getSupportedLocaleNames());
     $templateMgr->assign('helpTopicId', 'user.registerAndProfile');
     parent::display();
 }
Ejemplo n.º 3
0
 /**
  * Display the form.
  */
 function display()
 {
     $templateMgr =& TemplateManager::getManager();
     $site =& Request::getSite();
     $templateMgr->assign('minPasswordLength', $site->getMinPasswordLength());
     $conference =& Request::getConference();
     $schedConf =& Request::getSchedConf();
     if ($this->captchaEnabled) {
         import('captcha.CaptchaManager');
         $captchaManager = new CaptchaManager();
         $captcha =& $captchaManager->createCaptcha();
         if ($captcha) {
             $templateMgr->assign('captchaEnabled', $this->captchaEnabled);
             $this->setData('captchaId', $captcha->getId());
         }
     }
     $countryDao =& DAORegistry::getDAO('CountryDAO');
     $countries =& $countryDao->getCountries();
     $templateMgr->assign_by_ref('countries', $countries);
     import('schedConf.SchedConfAction');
     $userDao =& DAORegistry::getDAO('UserDAO');
     $templateMgr->assign('genderOptions', $userDao->getGenderOptions());
     $templateMgr->assign('privacyStatement', $conference->getLocalizedSetting('privacyStatement'));
     $templateMgr->assign('enableOpenAccessNotification', $schedConf->getSetting('enableOpenAccessNotification') == 1 ? 1 : 0);
     $templateMgr->assign('allowRegReader', SchedConfAction::allowRegReader($schedConf));
     $templateMgr->assign('allowRegAuthor', SchedConfAction::allowRegAuthor($schedConf));
     $templateMgr->assign('allowRegReviewer', SchedConfAction::allowRegReviewer($schedConf));
     $templateMgr->assign('source', Request::getUserVar('source'));
     $templateMgr->assign('pageHierarchy', array(array(Request::url(null, 'index', 'index'), $conference->getConferenceTitle(), true), array(Request::url(null, null, 'index'), $schedConf->getSchedConfTitle(), true)));
     $site =& Request::getSite();
     $templateMgr->assign('availableLocales', $site->getSupportedLocaleNames());
     $templateMgr->assign('helpTopicId', 'conference.users.index');
     parent::display();
 }
 /**
  * Display the form.
  */
 function display()
 {
     $templateMgr =& TemplateManager::getManager();
     $templateMgr->assign('new', true);
     if ($this->captchaEnabled) {
         import('lib.pkp.classes.captcha.CaptchaManager');
         $captchaManager = new CaptchaManager();
         $captcha =& $captchaManager->createCaptcha();
         if ($captcha) {
             $templateMgr->assign('captchaEnabled', $this->captchaEnabled);
             $this->setData('captchaId', $captcha->getId());
         }
     }
     $templateMgr->assign('settings', Notification::getSubscriptionSettings());
     return parent::display();
 }
 /**
  * Display the form.
  */
 function display(&$request)
 {
     $templateMgr =& TemplateManager::getManager();
     $templateMgr->assign('new', true);
     if ($this->captchaEnabled) {
         import('lib.pkp.classes.captcha.CaptchaManager');
         $captchaManager = new CaptchaManager();
         $captcha =& $captchaManager->createCaptcha();
         if ($captcha) {
             $templateMgr->assign('captchaEnabled', $this->captchaEnabled);
             $this->setData('captchaId', $captcha->getId());
         }
     }
     $context =& $request->getContext();
     if ($context) {
         $templateMgr->assign('allowRegReviewer', $context->getSetting('allowRegReviewer'));
         $templateMgr->assign('allowRegAuthor', $context->getSetting('allowRegAuthor'));
     }
     return parent::display();
 }
Ejemplo n.º 6
0
 /**
  * Display the form.
  */
 function display()
 {
     $templateMgr =& TemplateManager::getManager();
     $site =& Request::getSite();
     $templateMgr->assign('minPasswordLength', $site->getMinPasswordLength());
     if ($this->captchaEnabled) {
         import('lib.pkp.classes.captcha.CaptchaManager');
         $captchaManager = new CaptchaManager();
         $captcha =& $captchaManager->createCaptcha();
         if ($captcha) {
             $templateMgr->assign('captchaEnabled', $this->captchaEnabled);
             $this->setData('captchaId', $captcha->getId());
         }
     }
     $countryDao =& DAORegistry::getDAO('CountryDAO');
     $countries =& $countryDao->getCountries();
     $templateMgr->assign_by_ref('countries', $countries);
     $userDao =& DAORegistry::getDAO('UserDAO');
     $templateMgr->assign('genderOptions', $userDao->getGenderOptions());
     $templateMgr->assign('source', Request::getUserVar('source'));
     $templateMgr->assign('allowRegSubmitter', $site->getSetting('enableSubmit'));
     $templateMgr->assign('availableLocales', $site->getSupportedLocaleNames());
     parent::display();
 }
Ejemplo n.º 7
0
 /**
  * Display the form.
  */
 function display()
 {
     $thesisPlugin =& PluginRegistry::getPlugin('generic', $this->parentPluginName);
     $thesisPlugin->import('Thesis');
     $templateMgr =& TemplateManager::getManager();
     if ($this->captchaEnabled) {
         import('lib.pkp.classes.captcha.CaptchaManager');
         $captchaManager = new CaptchaManager();
         $captcha =& $captchaManager->createCaptcha();
         if ($captcha) {
             $templateMgr->assign('captchaEnabled', $this->captchaEnabled);
             $this->setData('captchaId', $captcha->getId());
         }
     }
     $templateMgr->assign('uploadCodeEnabled', $this->uploadCodeEnabled);
     $templateMgr->assign('validDegrees', $this->validDegrees);
     $templateMgr->assign('yearOffsetPast', THESIS_APPROVED_YEAR_OFFSET_PAST);
     parent::display();
 }
Ejemplo n.º 8
0
 /**
  * Captcha support.
  */
 function viewCaptcha($args)
 {
     $this->validate();
     $captchaId = (int) array_shift($args);
     import('lib.pkp.classes.captcha.CaptchaManager');
     $captchaManager = new CaptchaManager();
     if ($captchaManager->isEnabled()) {
         $captchaDao =& DAORegistry::getDAO('CaptchaDAO');
         $captcha =& $captchaDao->getCaptcha($captchaId);
         if ($captcha) {
             $captchaManager->generateImage($captcha);
             exit;
         }
     }
     Request::redirect(null, 'thesis');
 }
Ejemplo n.º 9
0
 /**
  * Display the form.
  */
 function display()
 {
     $templateMgr =& TemplateManager::getManager();
     $templateMgr->assign('archiveId', $this->archiveId);
     if ($this->captchaEnabled && !Validation::isSiteAdmin()) {
         import('lib.pkp.classes.captcha.CaptchaManager');
         $captchaManager = new CaptchaManager();
         $captcha =& $captchaManager->createCaptcha();
         if ($captcha) {
             $templateMgr->assign('captchaEnabled', $this->captchaEnabled);
             $this->setData('captchaId', $captcha->getId());
         }
     }
     if ($this->archive) {
         $templateMgr->assign('archiveImage', $this->archive->getSetting('archiveImage'));
     }
     $templateMgr->assign_by_ref('harvesters', PluginRegistry::getPlugins('harvesters'));
     $templateMgr->assign('allowManagement', $this->allowManagement);
     HookRegistry::call('ArchiveForm::display', array(&$this, &$templateMgr, $this->harvesterPluginName));
     parent::display();
 }
Ejemplo n.º 10
0
 /**
  * Display the form.
  */
 function display()
 {
     $templateMgr =& TemplateManager::getManager();
     $user =& Request::getUser();
     $schedConf =& Request::getSchedConf();
     $site =& Request::getSite();
     $registrationOptionDao =& DAORegistry::getDAO('RegistrationOptionDAO');
     $registrationOptions =& $registrationOptionDao->getRegistrationOptionsBySchedConfId($schedConf->getId());
     $templateMgr->assign_by_ref('registrationOptions', $registrationOptions);
     $templateMgr->assign('registrationTypeId', $this->typeId);
     $templateMgr->assign('userLoggedIn', $user ? true : false);
     $templateMgr->assign('requestUri', $_SERVER['REQUEST_URI']);
     if ($user) {
         $templateMgr->assign('userFullName', $user->getFullName());
     }
     if ($this->captchaEnabled) {
         import('captcha.CaptchaManager');
         $captchaManager = new CaptchaManager();
         $captcha =& $captchaManager->createCaptcha();
         if ($captcha) {
             $templateMgr->assign('captchaEnabled', $this->captchaEnabled);
             $this->setData('captchaId', $captcha->getId());
         }
     }
     $countryDao =& DAORegistry::getDAO('CountryDAO');
     $countries =& $countryDao->getCountries();
     $templateMgr->assign_by_ref('countries', $countries);
     $registrationTypeDao =& DAORegistry::getDAO('RegistrationTypeDAO');
     $registrationOptionCosts = $registrationTypeDao->getRegistrationOptionCosts($this->typeId);
     $templateMgr->assign('registrationOptionCosts', $registrationOptionCosts);
     $registrationType =& $registrationTypeDao->getRegistrationType($this->typeId);
     $templateMgr->assign_by_ref('registrationType', $registrationType);
     $templateMgr->assign('minPasswordLength', $site->getMinPasswordLength());
     $templateMgr->assign_by_ref('user', $user);
     parent::display();
 }
Ejemplo n.º 11
0
 /**
  * Display the form.
  */
 function display()
 {
     $conference = Request::getConference();
     $schedConf = Request::getSchedConf();
     $templateMgr =& TemplateManager::getManager();
     if (isset($this->comment)) {
         $templateMgr->assign_by_ref('comment', $this->comment);
         $templateMgr->assign('commentId', $this->commentId);
     }
     $user = Request::getUser();
     if ($user) {
         $templateMgr->assign('userName', $user->getFullName());
         $templateMgr->assign('userEmail', $user->getEmail());
     }
     if ($this->captchaEnabled) {
         import('captcha.CaptchaManager');
         $captchaManager = new CaptchaManager();
         $captcha =& $captchaManager->createCaptcha();
         if ($captcha) {
             $templateMgr->assign('captchaEnabled', $this->captchaEnabled);
             $this->setData('captchaId', $captcha->getId());
         }
     }
     $templateMgr->assign('parentId', $this->parentId);
     $templateMgr->assign('paperId', $this->paperId);
     $templateMgr->assign('galleyId', $this->galleyId);
     $closeCommentsDate = $schedConf->getSetting('closeCommentsDate');
     $commentsClosed = $schedConf->getSetting('closeComments') ? true : false && strtotime($closeCommentsDate < time());
     $templateMgr->assign('closeCommentsDate', $closeCommentsDate);
     $templateMgr->assign('commentsClosed', $commentsClosed);
     $templateMgr->assign('enableComments', $conference->getSetting('enableComments'));
     $templateMgr->assign('commentsRequireRegistration', $conference->getSetting('commentsRequireRegistration'));
     $templateMgr->assign('commentsAllowAnonymous', $conference->getSetting('commentsAllowAnonymous'));
     parent::display();
 }
Ejemplo n.º 12
0
 /**
  * Display the form.
  */
 function display()
 {
     $journal = Request::getJournal();
     $templateMgr =& TemplateManager::getManager();
     if (isset($this->comment)) {
         $templateMgr->assign_by_ref('comment', $this->comment);
         $templateMgr->assign('commentId', $this->commentId);
     }
     $user = Request::getUser();
     if ($user) {
         $templateMgr->assign('userName', $user->getFullName());
         $templateMgr->assign('userEmail', $user->getEmail());
     }
     if ($this->captchaEnabled) {
         $templateMgr->assign('reCaptchaEnabled', $this->reCaptchaEnabled);
         if ($this->reCaptchaEnabled) {
             import('lib.pkp.lib.recaptcha.recaptchalib');
             $publicKey = Config::getVar('captcha', 'recaptcha_public_key');
             $useSSL = Config::getVar('security', 'force_ssl') ? true : false;
             $reCaptchaHtml = recaptcha_get_html($publicKey, null, $useSSL);
             $templateMgr->assign('reCaptchaHtml', $reCaptchaHtml);
             $templateMgr->assign('captchaEnabled', $this->captchaEnabled);
         } else {
             import('lib.pkp.classes.captcha.CaptchaManager');
             $captchaManager = new CaptchaManager();
             $captcha =& $captchaManager->createCaptcha();
             if ($captcha) {
                 $templateMgr->assign('captchaEnabled', $this->captchaEnabled);
                 $this->setData('captchaId', $captcha->getId());
             }
         }
     }
     $templateMgr->assign('parentId', $this->parentId);
     $templateMgr->assign('articleId', $this->articleId);
     $templateMgr->assign('galleyId', $this->galleyId);
     $templateMgr->assign('enableComments', $journal->getSetting('enableComments'));
     parent::display();
 }
Ejemplo n.º 13
0
                    <div class="rowDiv">
                      <label for="chkThumbSize[]"> <span class="pad20"> <?php 
    echo $l->m('in_020');
    ?>
 </span> </label>
                      <div id="fmtDiv">
                        <?php 
    echo thumbSizes($cfg['thumbs']);
    ?>
                      </div>
                    </div>
                  
					<?php 
    if ($cfg['captcha']) {
        import('captcha.CaptchaManager');
        $captchaManager = new CaptchaManager();
        if ($captchaManager->isEnabled()) {
            $captcha = $captchaManager->createCaptcha();
            ?>
							<div class="rowDiv">
							<label for="captchaPic"> <span class="pad20"> Captcha </span> </label>
									<img src="<?php 
            echo $init['captchaPath'] . $captcha->getId();
            ?>
"/><br />
							</div><br />
							<div class="rowDiv">
							<label for="captchaInput"> <span class="pad20"> <?php 
            echo $l->m('im_101');
            ?>
 </span> </label>
Ejemplo n.º 14
0
 /**
  * Display the form.
  */
 function display()
 {
     $templateMgr =& TemplateManager::getManager();
     $user =& Request::getUser();
     $schedConf =& Request::getSchedConf();
     $site =& Request::getSite();
     $registrationOptionDao =& DAORegistry::getDAO('RegistrationOptionDAO');
     $registrationOptions =& $registrationOptionDao->getRegistrationOptionsBySchedConfId($schedConf->getId());
     $templateMgr->assign_by_ref('registrationOptions', $registrationOptions);
     $templateMgr->assign('registrationTypeId', $this->typeId);
     $templateMgr->assign('userLoggedIn', $user ? true : false);
     $templateMgr->assign('requestUri', $_SERVER['REQUEST_URI']);
     if ($user) {
         $templateMgr->assign('userFullName', $user->getFullName());
     }
     if ($this->captchaEnabled) {
         import('captcha.CaptchaManager');
         $captchaManager = new CaptchaManager();
         $captcha =& $captchaManager->createCaptcha();
         if ($captcha) {
             $templateMgr->assign('captchaEnabled', $this->captchaEnabled);
             $this->setData('captchaId', $captcha->getId());
         }
     }
     $countryDao =& DAORegistry::getDAO('CountryDAO');
     $countries =& $countryDao->getCountries();
     $templateMgr->assign_by_ref('countries', $countries);
     $registrationTypeDao =& DAORegistry::getDAO('RegistrationTypeDAO');
     $registrationOptionCosts = $registrationTypeDao->getRegistrationOptionCosts($this->typeId);
     $templateMgr->assign('registrationOptionCosts', $registrationOptionCosts);
     $registrationType =& $registrationTypeDao->getRegistrationType($this->typeId);
     $templateMgr->assign_by_ref('registrationType', $registrationType);
     if (is_object($registrationType)) {
         if ($registrationType->getCost() > 0) {
             $templateMgr->assign('message', 'schedConf.registration.alreadyRegisteredAndPaid');
         } else {
             $templateMgr->assign('message', 'schedConf.registration.alreadyRegisteredNoPaid');
         }
         $applicationFormDefault = $registrationType->getLocalizedData("applicationForm");
         $templateMgr->assign('applicationFormDefault', $applicationFormDefault);
         $applicationForm = $applicationFormDefault;
         $templateMgr->assign('surveyConfig', $registrationType->getLocalizedData("survey"));
     }
     $registrationDao =& DAORegistry::getDAO('RegistrationDAO');
     if ($user && ($registrationId = $registrationDao->getRegistrationIdByUser($user->getId(), $schedConf->getId()))) {
         $templateMgr->assign('isRegistered', true);
         $registration =& $registrationDao->getRegistration($registrationId);
         $templateMgr->assign('specialRequests', $registration->getSpecialRequests());
         $applicationForm = $registration->getData("applicationForm");
         if (is_null($registration->getData("applicationForm"))) {
             $applicationForm = $applicationFormDefault;
         }
         $templateMgr->assign('survey', $registration->getData("survey"));
     }
     $templateMgr->assign('applicationForm', $applicationForm);
     $templateMgr->assign('minPasswordLength', $site->getMinPasswordLength());
     $templateMgr->assign_by_ref('user', $user);
     parent::display();
 }
Ejemplo n.º 15
0
 /**
  * Display the form.
  */
 function display()
 {
     $journal = Request::getJournal();
     $templateMgr =& TemplateManager::getManager();
     if (isset($this->comment)) {
         $templateMgr->assign_by_ref('comment', $this->comment);
         $templateMgr->assign('commentId', $this->commentId);
     }
     $user = Request::getUser();
     if ($user) {
         $templateMgr->assign('userName', $user->getFullName());
         $templateMgr->assign('userEmail', $user->getEmail());
     }
     if ($this->captchaEnabled) {
         import('lib.pkp.classes.captcha.CaptchaManager');
         $captchaManager = new CaptchaManager();
         $captcha =& $captchaManager->createCaptcha();
         if ($captcha) {
             $templateMgr->assign('captchaEnabled', $this->captchaEnabled);
             $this->setData('captchaId', $captcha->getId());
         }
     }
     $templateMgr->assign('parentId', $this->parentId);
     $templateMgr->assign('articleId', $this->articleId);
     $templateMgr->assign('galleyId', $this->galleyId);
     $templateMgr->assign('enableComments', $journal->getSetting('enableComments'));
     parent::display();
 }
Ejemplo n.º 16
0
 function viewCaptcha($args)
 {
     $captchaId = (int) array_shift($args);
     import('captcha.CaptchaManager');
     $captchaManager = new CaptchaManager();
     if ($captchaManager->isEnabled()) {
         $captchaDao =& DAORegistry::getDAO('CaptchaDAO');
         $captcha =& $captchaDao->getCaptcha($captchaId);
         if ($captcha) {
             $captchaManager->generateImage($captcha);
             exit;
         }
     }
     Request::redirect(null, null, 'user');
 }
Ejemplo n.º 17
0
 /**
  * Display the form.
  */
 function display()
 {
     $templateMgr =& TemplateManager::getManager();
     $site =& Request::getSite();
     $templateMgr->assign('minPasswordLength', $site->getMinPasswordLength());
     $journal =& Request::getJournal();
     if ($this->captchaEnabled) {
         $templateMgr->assign('reCaptchaEnabled', $this->reCaptchaEnabled);
         if ($this->reCaptchaEnabled) {
             import('lib.pkp.lib.recaptcha.recaptchalib');
             $publicKey = Config::getVar('captcha', 'recaptcha_public_key');
             $useSSL = Config::getVar('security', 'force_ssl') ? true : false;
             $reCaptchaHtml = recaptcha_get_html($publicKey, null, $useSSL);
             $templateMgr->assign('reCaptchaHtml', $reCaptchaHtml);
             $templateMgr->assign('captchaEnabled', $this->captchaEnabled);
         } else {
             import('lib.pkp.classes.captcha.CaptchaManager');
             $captchaManager = new CaptchaManager();
             $captcha =& $captchaManager->createCaptcha();
             if ($captcha) {
                 $templateMgr->assign('captchaEnabled', $this->captchaEnabled);
                 $this->setData('captchaId', $captcha->getId());
             }
         }
     }
     $countryDao =& DAORegistry::getDAO('CountryDAO');
     $countries =& $countryDao->getCountries();
     $templateMgr->assign_by_ref('countries', $countries);
     $userDao =& DAORegistry::getDAO('UserDAO');
     $templateMgr->assign('genderOptions', $userDao->getGenderOptions());
     $templateMgr->assign('privacyStatement', $journal->getLocalizedSetting('privacyStatement'));
     $templateMgr->assign('allowRegReader', $journal->getSetting('allowRegReader'));
     $templateMgr->assign('enableOpenAccessNotification', $journal->getSetting('enableOpenAccessNotification'));
     $templateMgr->assign('allowRegAuthor', $journal->getSetting('allowRegAuthor'));
     $templateMgr->assign('allowRegReviewer', $journal->getSetting('allowRegReviewer'));
     $templateMgr->assign('source', Request::getUserVar('source'));
     $site =& Request::getSite();
     $templateMgr->assign('availableLocales', $site->getSupportedLocaleNames());
     $templateMgr->assign('helpTopicId', 'user.registerAndProfile');
     parent::display();
 }