Exemple #1
0
 /**
  * Service runner
  * @author Howard <*****@*****.**>
  * @return void
  */
 public function run()
 {
     /** get global settings **/
     $settings = wpl_global::get_settings();
     $wpl_qs = urldecode(wpl_global::get_wp_qvar('wpl_qs'));
     /** get view **/
     $this->view = wpl_sef::get_view($wpl_qs, $settings['sef_main_separator']);
     /** set vars **/
     wpl_sef::setVars($this->view, $wpl_qs);
     if ($this->view == 'property_show') {
         if (trim($wpl_qs) != '') {
             $ex = explode('-', $wpl_qs);
             $exp = explode('-', $ex[0]);
             $proeprty_id = $exp[0];
         } else {
             $proeprty_id = wpl_request::getVar('pid', NULL);
             if (!$proeprty_id) {
                 $proeprty_id = wpl_request::getVar('property_id', NULL);
             }
         }
         if (trim($wpl_qs) != '') {
             $this->check_property_link($proeprty_id);
         }
         $this->set_property_page_params($proeprty_id);
     } elseif ($this->view == 'profile_show') {
         $username = $wpl_qs;
         if (trim($username) != '') {
             $user_id = wpl_users::get_id_by_username($username);
         } elseif (wpl_request::getVar('sf_select_user_id', 0)) {
             $user_id = wpl_request::getVar('sf_select_user_id', 0);
         } elseif (wpl_request::getVar('uid', 0)) {
             $user_id = wpl_request::getVar('uid', 0);
         }
         $this->set_profile_page_params($user_id);
     } elseif ($this->view == 'property_listing') {
         $this->set_property_listing_page_params();
     } elseif ($this->view == 'profile_listing') {
         $this->set_profile_listing_page_params();
     } elseif ($this->view == 'features') {
         $function = str_replace('features/', '', $wpl_qs);
         if (!trim($function)) {
             $function = wpl_request::getVar('wpltype');
         }
         _wpl_import('views.basics.features.wpl_' . $function);
         $obj = new wpl_features_controller();
         $obj->display();
     } elseif ($this->view == 'addon_crm') {
         _wpl_import('views.frontend.addon_crm.wpl_main');
         $obj = new wpl_addon_crm_controller();
         $obj->display();
     } elseif ($this->view == 'payments') {
         $this->set_payments_page_params();
     } elseif ($this->view == 'addon_membership') {
         $this->set_addon_membership_page_params();
     }
     /** Print Geo Meta Tags **/
     $this->geotags();
     /** Print Geo Meta Tags **/
     $this->dublincore();
 }