Esempio n. 1
0
 private function showErrorsIfExist()
 {
     if (!empty($GLOBALS[SJB_SocialPlugin::SOCIAL_LOGIN_ERROR])) {
         $this->tp->assign('errors', $GLOBALS[SJB_SocialPlugin::SOCIAL_LOGIN_ERROR]);
         $this->tp->display('../users/errors.tpl');
     }
     if (!empty($GLOBALS[SJB_SocialPlugin::SOCIAL_ACCESS_ERROR])) {
         $this->tp->assign('errors', $GLOBALS[SJB_SocialPlugin::SOCIAL_ACCESS_ERROR]);
         $this->tp->assign('socialNetwork', SJB_SocialPlugin::getNetwork());
         $this->tp->display('../users/errors.tpl');
     }
 }
Esempio n. 2
0
 public function execute()
 {
     $this->tp = SJB_System::getTemplateProcessor();
     $template = SJB_Request::getVar('template', 'promotions.tpl');
     $errors = array();
     try {
         $this->search();
     } catch (Exception $e) {
         array_push($errors, $e->getMessage());
     }
     $this->tp->assign('errors', $errors);
     $this->tp->display($template);
 }
Esempio n. 3
0
 public function showSearchForm()
 {
     $guestAlert = new SJB_GuestAlert(array());
     $guestAlert->addSubscriptionDateProperty();
     $guestAlert->addStatusProperty();
     $searchFormBuilder = new SJB_SearchFormBuilder($guestAlert);
     $this->criteriaSaver = new SJB_GuestAlertCriteriaSaver();
     if (isset($_REQUEST['restore'])) {
         $_REQUEST = array_merge($_REQUEST, $this->criteriaSaver->getCriteria());
     }
     $this->criteria = $searchFormBuilder->extractCriteriaFromRequestData($_REQUEST, $guestAlert);
     $searchFormBuilder->setCriteria($this->criteria);
     $searchFormBuilder->registerTags($this->tp);
     $this->tp->display('search_form.tpl');
 }
Esempio n. 4
0
 private function assignParametersAndDisplayLog($foundPayments)
 {
     $this->templateProcessor->assign('paginationInfo', $this->paginator->getPaginationInfo());
     $this->templateProcessor->assign("found_payments", $foundPayments);
     $this->templateProcessor->assign("searchFields", $this->getFields());
     $this->templateProcessor->display('payment_log.tpl');
 }
Esempio n. 5
0
 /**
  * Display
  */
 public function display()
 {
     if ($this->isCaptcha) {
         $this->tp->assign('displayMode', SJB_Request::getVar('displayMode', 'label'));
         $this->tp->assign('captcha', array_pop($this->captchaForm->form_fields));
         $this->tp->display('captchaHandle.tpl');
     }
 }
 /**
  * @param SJB_SocialMediaPostingsPublisher $feedManager
  */
 public function displayResult(SJB_SocialMediaPostingsPublisher $feedManager)
 {
     $this->tp->assign('postingLimit', $feedManager->getPostingLimitForFeed());
     $this->tp->assign('feedInfo', $feedManager->feedInfo);
     $this->tp->assign('postedListingsNum', $feedManager->postedListingsNum);
     $this->tp->assign('network', $this->networkID);
     $this->tp->assign('errors', $this->errors);
     $this->tp->display('post_results.tpl');
 }
Esempio n. 7
0
 public function execute()
 {
     $errors = array();
     $this->setEtGroups(SJB_EmailTemplateEditor::getEmailTemplateGroups());
     if (isset($_REQUEST['passed_parameters_via_uri'])) {
         $passed_parameters_via_uri = SJB_UrlParamProvider::getParams();
         $etGroup = SJB_Array::get($passed_parameters_via_uri, 0);
         $etSID = SJB_Array::get($passed_parameters_via_uri, 1);
         $action = SJB_Array::get($passed_parameters_via_uri, 2);
         if ($etGroup && SJB_Array::get($this->etGroups, $etGroup)) {
             $this->tp->assign('group', $etGroup);
             if ($etSID) {
                 switch ($action) {
                     case 'delete':
                         $this->deleteEmailTemplate($etGroup, $etSID);
                         break;
                     case 'getvars':
                         $this->prepareTemplateVarsInfo($etGroup);
                         exit;
                         break;
                     default:
                         if (isset($_FILES['file']) && $_FILES['file']['name'] && $_FILES['file']['error']) {
                             $errors['Attachment'] = 'UPLOAD_ERR_INI_SIZE';
                         } else {
                             $filename = SJB_Request::getVar('filename', false);
                             if ($filename) {
                                 SJB_UploadFileManager::openEmailTemplateFile($filename, $etSID);
                                 $errors['NO_SUCH_FILE'] = true;
                             }
                         }
                         $this->editEmailTemplate($etSID, $errors);
                         break;
                 }
             } else {
                 $this->addNewTemplateForm($etGroup);
                 $this->getEmailTemplatesByGroup($etGroup);
             }
         }
     } else {
         $this->addNewTemplateForm();
     }
     if ($errors || $this->errors) {
         $errors = array_merge($errors, $this->errors);
     }
     $this->tp->assign('message', $this->successMessage);
     $this->tp->assign('error', $this->error);
     $this->tp->assign('errors', $errors);
     $this->tp->assign('etGroups', $this->etGroups);
     $this->tp->assign('uploadMaxFilesize', SJB_UploadFileManager::getIniUploadMaxFilesize());
     $this->tp->display($this->template);
 }
Esempio n. 8
0
 public function execute()
 {
     $this->tp = SJB_System::getTemplateProcessor();
     $action = SJB_Request::getVar('action', 'search');
     $template = SJB_Request::getVar('template', 'guest_alerts.tpl');
     $errors = array();
     try {
         switch ($action) {
             case 'export':
                 $this->export();
                 break;
             case 'search':
                 $this->search();
                 break;
         }
     } catch (Exception $e) {
         array_push($errors, $e->getMessage());
     }
     $listingTypes = SJB_ListingTypeManager::getListingAllTypesForListType();
     $this->tp->assign('listingTypes', $listingTypes);
     $this->tp->assign('errors', $errors);
     $this->tp->assign('action', $action);
     $this->tp->display($template);
 }