Inheritance: extends Object
Ejemplo n.º 1
0
 /**
  * Execute the action
  */
 public function execute()
 {
     parent::execute();
     //--Get the id
     $id = $this->URL->getParameter(1);
     //--check if the id is not empty
     if (empty($id)) {
         $this->redirect(FrontendNavigation::getURL(404));
     }
     //--Explode the id
     $ids = explode("-", $id);
     //--check if the id contains 2 elements
     if (count($ids) != 2) {
         $this->redirect(FrontendNavigation::getURL(404));
     }
     //--Get the ids and decrypt
     $send_id = (int) FrontendMailengineModel::decryptId($ids[0]);
     $user_id = (int) FrontendMailengineModel::decryptId($ids[1]);
     //--check if the ids are integers
     if ($send_id <= 0) {
         $this->redirect(FrontendNavigation::getURL(404));
     }
     if ($user_id > 0) {
         $data = array();
         $data["send_id"] = $send_id;
         $data["user_id"] = $user_id;
         //--Add open-mail to the database
         FrontendMailengineModel::insertMailOpen($data);
     }
     //--Create an empty image
     $this->createImage();
     //--Stop the script
     die;
 }
Ejemplo n.º 2
0
 /**
  * Execute the extra
  *
  * @return void
  */
 public function execute()
 {
     parent::execute();
     // Define email from the subscribe widget
     $email = $this->getEmail();
     // Create the form
     $form = $this->createForm($this->get('mailmotor.form.subscription'), new Subscription($email, FRONTEND_LANGUAGE));
     $form->handleRequest($this->get('request'));
     if (!$form->isValid()) {
         $this->tpl->assign('form', $form->createView());
         if ($form->isSubmitted()) {
             $this->tpl->assign('mailmotorSubscribeHasFormError', true);
         }
         $this->loadTemplate();
         $this->parse();
         return;
     }
     $redirectLink = FrontendNavigation::getURLForBlock('Mailmotor', 'Subscribe') . '?subscribed=true';
     /** @var Subscription $subscription */
     $subscription = $form->getData();
     try {
         // The command bus will handle the unsubscription
         $this->get('command_bus')->handle($subscription);
     } catch (NotImplementedException $e) {
         // fallback for when no mail-engine is chosen in the Backend
         $this->get('event_dispatcher')->dispatch(NotImplementedSubscribedEvent::EVENT_NAME, new NotImplementedSubscribedEvent($subscription));
         $redirectLink .= '&double-opt-in=false';
     }
     $redirectLink .= '#mailmotorSubscribeForm';
     return $this->redirect($redirectLink);
 }
Ejemplo n.º 3
0
 /**
  * Execute the extra.
  */
 public function execute()
 {
     // get reset key
     $key = $this->URL->getParameter(0);
     // do we have an reset key?
     if (isset($key)) {
         // load parent
         parent::execute();
         // load template
         $this->loadTemplate();
         // get profile id
         $profileId = FrontendProfilesModel::getIdBySetting('forgot_password_key', $key);
         // have id?
         if ($profileId !== 0) {
             // load
             $this->loadForm();
             // validate
             $this->validateForm();
         } elseif ($this->URL->getParameter('sent') != 'true') {
             $this->redirect(FrontendNavigation::getURL(404));
         }
         // parse
         $this->parse();
     } else {
         $this->redirect(FrontendNavigation::getURL(404));
     }
 }
Ejemplo n.º 4
0
 /**
  * Execute the action
  */
 public function execute()
 {
     parent::execute();
     $this->loadTemplate();
     $this->getData();
     $this->parse();
 }
Ejemplo n.º 5
0
 /**
  * Execute the action
  */
 public function execute()
 {
     parent::execute();
     $this->addJS('https://maps.googleapis.com/maps/api/js?sensor=false', true, false);
     $this->addJS('/src/Frontend/Modules/Addresses/Js/markerclusterer.js', true, false);
     $this->addJS('/src/Frontend/Modules/Addresses/Js/bootstrap.min.js', true, false);
     $this->addJS('/src/Frontend/Modules/Addresses/Js/bootstrap-multiselect.js', true, false);
     $this->addCSS('/src/Frontend/Modules/Addresses/Layout/Css/bootstrap-multiselect.css', true, false);
     $this->addCSS('/src/Frontend/Modules/Addresses/Layout/Css/Addresses.css', true, false);
     //--Get search
     $this->search = urldecode(\SpoonFilter::getGetValue("search", null, ""));
     if ($this->search != "") {
         $this->lat = urldecode(\SpoonFilter::getGetValue("lat", null, ""));
         $this->lng = urldecode(\SpoonFilter::getGetValue("lng", null, ""));
     }
     $this->addJSData('search', $this->search);
     $this->addJSData('lat', $this->lat);
     $this->addJSData('lng', $this->lng);
     $this->searchGroups = \SpoonFilter::getGetValue("groups", null, array(), 'array');
     //$this ->searchTopGroups = (\SpoonFilter::getGetValue("topgroups", null, array(),'array'));
     $this->loadTemplate();
     $this->loadData();
     $this->loadForm();
     $this->parse();
 }
Ejemplo n.º 6
0
 /**
  * Execute the extra
  */
 public function execute()
 {
     parent::execute();
     $this->tpl->assign('hideContentTitle', true);
     $this->loadTemplate();
     $this->getData();
     $this->parse();
 }
Ejemplo n.º 7
0
 /**
  * Execute the extra
  */
 public function execute()
 {
     $this->addJS('http://maps.google.com/maps/api/js?sensor=true', true, false);
     parent::execute();
     $this->loadTemplate();
     $this->loadData();
     $this->parse();
 }
Ejemplo n.º 8
0
 /**
  * Execute the action
  */
 public function execute()
 {
     parent::execute();
     $this->header->addCSS('/src/Frontend/Modules/' . $this->getModule() . '/Layout/Css/Agenda.css');
     $this->loadTemplate();
     $this->getData();
     $this->parse();
 }
Ejemplo n.º 9
0
 /**
  * Execute the action
  */
 public function execute()
 {
     parent::execute();
     $this->loadForm();
     $this->validateForm();
     $this->loadTemplate();
     $this->parse();
 }
Ejemplo n.º 10
0
 /**
  * Execute the extra
  */
 public function execute()
 {
     parent::execute();
     // overwrite the template path
     $this->setOverwrite(true);
     $this->setTemplatePath(FRONTEND_MODULES_PATH . '/' . $this->getModule() . '/Layout/Templates/Detail.tpl');
     $this->loadData();
     $this->parse();
 }
Ejemplo n.º 11
0
 /**
  * Execute the action
  */
 public function execute()
 {
     $this->addJS('http://maps.google.com/maps/api/js?sensor=true', true, false);
     $this->addJS('/src/Frontend/Modules/Addresses/Js/bootstrap.min.js', true, false);
     $this->addJS('/src/Frontend/Modules/Addresses/Js/bootstrap-multiselect.js', true, false);
     $this->addCSS('/src/Frontend/Modules/Addresses/Layout/Css/Addresses.css', true, false);
     parent::execute();
     $this->loadTemplate();
     $this->loadData();
     $this->parse();
 }
 /**
  * Execute the extra
  *
  * @return void
  */
 public function execute()
 {
     // call the parent
     parent::execute();
     // load template
     $this->loadTemplate();
     // load the data
     $this->getData();
     // parse
     $this->parse();
 }
Ejemplo n.º 13
0
 /**
  * Execute the action
  */
 public function execute()
 {
     $this->addJS('http://maps.google.com/maps/api/js?sensor=true', true, false);
     parent::execute();
     $this->tpl->assign('hideContentTitle', true);
     $this->loadTemplate();
     $this->getData();
     $this->loadForm();
     $this->validateForm();
     $this->parse();
 }
Ejemplo n.º 14
0
 /**
  * Execute the action
  */
 public function execute()
 {
     parent::execute();
     $this->loadTemplate();
     $this->loadData();
     //--Add css
     $this->header->addCSS('/src/Frontend/Modules/' . $this->getModule() . '/Layout/Css/Gallery.css');
     //$this->header->addCSS('/src/Frontend/Modules/' . $this->getModule() . '/Layout/Css/Colorbox.css');
     //--Add javascript
     //$this->header->addJS('/src/Frontend/Modules/' . $this->getModule() . '/Js/Jquery.colorbox-min.js');
     $this->parse();
 }
Ejemplo n.º 15
0
 /**
  * Execute the extra
  */
 public function execute()
 {
     parent::execute();
     // hide contentTitle, in the template the title is wrapped with an inverse-option
     $this->tpl->assignGlobal('hideContentTitle', true);
     $this->loadTemplate();
     $this->getData();
     $this->updateStatistics();
     $this->loadForm();
     $this->validateForm();
     $this->parse();
 }
Ejemplo n.º 16
0
 /**
  * Execute the extra
  */
 public function execute()
 {
     $this->id = $this->URL->getParameter(1);
     // validate incoming parameters
     if ($this->id === null) {
         $this->redirect(FrontendNavigation::getURL(404));
     }
     parent::execute();
     $this->loadTemplate();
     $this->getData();
     $this->parse();
 }
Ejemplo n.º 17
0
 /**
  * Execute the action
  */
 public function execute()
 {
     parent::execute();
     //--Get the id
     $this->id = \SpoonFilter::getGetValue('id', null, 0, 'int');
     //--Check if mailing exist
     if (!FrontendMailengineModel::extistSend($this->id)) {
         $this->redirect(FrontendNavigation::getURL(404));
     }
     $this->loadTemplate();
     $this->loadData();
     $this->parse();
 }
Ejemplo n.º 18
0
 /**
  * Execute the extra.
  */
 public function execute()
 {
     // only for guests
     if (!FrontendProfilesAuthentication::isLoggedIn()) {
         parent::execute();
         $this->loadTemplate();
         $this->loadForm();
         $this->validateForm();
         $this->parse();
     } else {
         // already logged in, redirect to settings
         $this->redirect(FrontendNavigation::getURLForBlock('Profiles', 'Settings'));
     }
 }
Ejemplo n.º 19
0
 /**
  * Execute the extra
  */
 public function execute()
 {
     // profile not logged in
     if (!FrontendProfilesAuthentication::isLoggedIn()) {
         parent::execute();
         $this->loadTemplate();
         $this->loadForm();
         $this->validateForm();
         $this->parse();
     } else {
         // profile logged in
         $this->redirect(FrontendNavigation::getURL(404));
     }
 }
Ejemplo n.º 20
0
 /**
  * Execute the extra.
  */
 public function execute()
 {
     // profile logged in
     if (FrontendProfilesAuthentication::isLoggedIn()) {
         parent::execute();
         $this->getData();
         $this->loadTemplate();
         $this->loadForm();
         $this->validateForm();
         $this->parse();
     } else {
         $this->redirect(FrontendNavigation::getURLForBlock('Profiles', 'Login') . '?queryString=' . FrontendNavigation::getURLForBlock('Profiles', 'ChangePassword'), 307);
     }
 }
Ejemplo n.º 21
0
 /**
  * Execute the extra
  */
 public function execute()
 {
     // define Google Maps API key
     $apikey = $this->get('fork.settings')->get('Core', 'google_maps_key');
     // check Google Maps API key, otherwise show error
     if ($apikey == null) {
         trigger_error('Please provide a Google Maps API key.');
     }
     $this->addJS('https://maps.googleapis.com/maps/api/js?key=' . $apikey, true, false);
     $this->addJS(FrontendLocationModel::getPathToMapStyles(false), true);
     parent::execute();
     $this->loadTemplate();
     $this->loadData();
     $this->parse();
 }
Ejemplo n.º 22
0
 /**
  * Execute the extra.
  */
 public function execute()
 {
     // only logged in profiles can seer their dashboard
     if (FrontendProfilesAuthentication::isLoggedIn()) {
         // call the parent
         parent::execute();
         /*
          * You could use this as some kind of dashboard where you can show an activity
          * stream, some statistics, ...
          */
         $this->loadTemplate();
     } else {
         // profile not logged in
         $this->redirect(FrontendNavigation::getURLForBlock('Profiles', 'Login') . '?queryString=' . FrontendNavigation::getURLForBlock('Profiles'), 307);
     }
 }
Ejemplo n.º 23
0
 /**
  * Execute.
  */
 public function execute()
 {
     parent::execute();
     // profile not logged in
     if (!FrontendProfilesAuthentication::isLoggedIn()) {
         $this->loadTemplate();
         $this->loadForm();
         $this->validateForm();
         $this->parse();
     } else {
         // profile already logged in
         // query string
         $queryString = urldecode(\SpoonFilter::getGetValue('queryString', null, SITE_URL));
         // redirect
         $this->redirect($queryString);
     }
 }
Ejemplo n.º 24
0
 /**
  * Execute the extra.
  */
 public function execute()
 {
     parent::execute();
     $this->loadTemplate();
     // profile not logged in
     if (!FrontendProfilesAuthentication::isLoggedIn()) {
         $this->loadForm();
         $this->validateForm();
         $this->parse();
     } elseif ($this->URL->getParameter('sent') == true) {
         // just registered so show success message
         $this->parse();
     } else {
         // already logged in, so you can not register
         $this->redirect(SITE_URL);
     }
 }
Ejemplo n.º 25
0
 /**
  * Execute the action
  */
 public function execute()
 {
     parent::execute();
     //--Get the id
     $id = $this->URL->getParameter(1);
     //--check if the id is not empty
     if (empty($id)) {
         $this->redirect(FrontendNavigation::getURL(404));
     }
     //--Explode the id
     $ids = explode("-", $id);
     //--check if the id contains 2 elements
     if (count($ids) != 2) {
         $this->redirect(FrontendNavigation::getURL(404));
     }
     //--Get the ids and decrypt
     $link_id = (int) FrontendMailengineModel::decryptId($ids[0]);
     $user_id = (int) FrontendMailengineModel::decryptId($ids[1]);
     //--check if the ids are integers
     if ($link_id <= 0) {
         //--Redirect to 404
         $this->redirect(FrontendNavigation::getURL(404));
     }
     //--Only if userid > 0 (because of the preview on the frontend)
     if ($user_id > 0) {
         $data = array();
         $data["link_id"] = $link_id;
         $data["user_id"] = $user_id;
         //--Add click-link to the database
         FrontendMailengineModel::insertLinkClicked($data);
     }
     //--Redirect the page
     $this->redirectLink($link_id);
     //--Stop the script
     die;
 }
Ejemplo n.º 26
0
 /**
  * Get the assigned template.
  *
  * @return array
  */
 public function getTemplate()
 {
     return $this->object->getTemplate();
 }
Ejemplo n.º 27
0
 /**
  * Execute the extra
  */
 public function execute()
 {
     parent::execute();
     $this->loadTemplate();
     $this->loadForm();
     $this->validateForm();
     $this->display();
     $this->saveStatistics();
 }