public function run()
 {
     $langCode = Vi_Registry::get('langCode');
     //	    if ($langCode) {
     //		    $this->view->baseContentUrl = Vi_Registry::get('APP_BASE_URL') . "content/$langCode/";
     //		    $this->view->baseProductUrl = Vi_Registry::get('APP_BASE_URL') . "mit/product/index/lang/$langCode/";
     //	    } else {
     //	        $this->view->baseContentUrl = Vi_Registry::get('APP_BASE_URL') . 'content/';
     //	        $this->view->baseProductUrl = Vi_Registry::get('APP_BASE_URL') . 'mit/product/index/';
     //	    }
     $menus = array(0 => array('url' => Vi_Registry::getBaseUrl(), 'name' => 'Find a restaurant', 'id' => 'home'), 1 => array('url' => Vi_Registry::getContentUrl(1), 'name' => 'How it works', 'id' => 1), 2 => array('url' => Vi_Registry::getContentUrl(2), 'name' => 'Coropporate Accounts', 'id' => 2), 4 => array('url' => Vi_Registry::getContentUrl(4), 'name' => 'Refer a Restaurant', 'id' => 4), 5 => array('url' => Vi_Registry::getContentUrl(5), 'name' => 'Refer a friend', 'id' => 5), 6 => array('url' => Vi_Registry::getContentUrl(6), 'name' => 'About us', 'id' => 6), 7 => array('url' => Vi_Registry::getBaseUrl() . 'contact-us.html', 'name' => 'Contact us', 'id' => 'contactus'));
     $this->view->menus = $menus;
 }
 public function run()
 {
     $langCode = Vi_Registry::get('langCode');
     $menus1 = array(0 => array('url' => Vi_Registry::getContentUrl(6), 'name' => 'About Us', 'id' => 6), 1 => array('url' => Vi_Registry::getContentUrl(1), 'name' => 'How it Works', 'id' => 1), 2 => array('url' => Vi_Registry::getBaseUrl() . 'restaurant?mark=pickup', 'name' => 'Browse Restaurants', 'id' => 'home'), 3 => array('url' => Vi_Registry::getContentUrl(9), 'name' => 'Newsroom', 'id' => 9));
     $menus2 = array(0 => array('url' => Vi_Registry::getContentUrl(3), 'name' => 'Share the Bounty', 'id' => 3), 1 => array('url' => Vi_Registry::getContentUrl(13), 'name' => 'Fundraising', 'id' => 13), 2 => array('url' => Vi_Registry::getContentUrl(5), 'name' => 'Refer a Friend', 'id' => 5), 3 => array('url' => Vi_Registry::getContentUrl(4), 'name' => 'Refer a Restaurant', 'id' => 4));
     $menus3 = array(0 => array('url' => Vi_Registry::getContentUrl(2), 'name' => 'Corporate Accounts', 'id' => 2), 1 => array('url' => Vi_Registry::getBaseUrl() . 'restaurant-owner-register.html', 'name' => 'Restaurant Owners', 'id' => 'restaurant_owners'), 2 => array('url' => Vi_Registry::getContentUrl(18), 'name' => 'Business Partners', 'id' => 18));
     $menus4 = array(0 => array('url' => Vi_Registry::getContentUrl(10), 'name' => 'Term of Use', 'id' => 10), 1 => array('url' => Vi_Registry::getContentUrl(14), 'name' => 'Privacy Policy', 'id' => 14), 2 => array('url' => Vi_Registry::getContentUrl(16), 'name' => 'Copyright', 'id' => 16));
     $menus5 = array(0 => array('url' => Vi_Registry::getContentUrl(15), 'name' => 'FAQs', 'id' => 15), 1 => array('url' => Vi_Registry::getBaseUrl() . 'contact-us.html', 'name' => 'Contact Us', 'id' => 'contactus'));
     $this->view->menus1 = $menus1;
     $this->view->menus2 = $menus2;
     $this->view->menus3 = $menus3;
     $this->view->menus4 = $menus4;
     $this->view->menus5 = $menus5;
 }
Exemple #3
0
 public function __construct($params)
 {
     if (Vi_Registry::isRegistered('EDIT_LAYOUT_MODE')) {
         $this->_sampleMode = Vi_Registry::get('EDIT_LAYOUT_MODE');
     }
     $this->_name = $params['name'];
     if (isset($params['title'])) {
         $this->_title = $params['title'];
         $this->_holderId = $params['holder_id'];
     }
     $this->_params = $params;
     $view = Vi_Layout::getMvcInstance()->getView();
     $this->view = clone $view;
     $this->db = Vi_Registry::get('db');
     $this->session = Vi_Registry::getSession();
     $this->auth = Vi_Registry::getAuth();
     $this->aclFront = Vi_Registry::getAclFront();
     $this->aclAdmin = Vi_Registry::getAclAdmin();
     $this->view->setEngine(clone $view->getEngine());
     $this->_langCode = Vi_Language::getCurrentLangCode();
     $config = Vi_Registry::getConfig();
     $this->_compileDir = $config['viewConfig']['compile_dir'];
     $this->_cacheDir = $config['viewConfig']['cache_dir'];
     /*
     * set up dir for smarty
     * 'template_dir' => 'stickers/$stickerName',
     			'compile_dir' => 'tmp/compile/stickers/$stickerName/$langCode',
     			'cache_dir' => 'tmp/cache/stickers/$stickerName/$langCode',
     */
     $this->view->setScriptPath('./');
     $this->view->setCompilePath($config['viewConfig']['compile_dir']);
     $this->view->setCachePath($config['viewConfig']['cache_dir']);
     /*
      * call main funtion
      */
     $this->_saveInfo['currentType'] = Vi_Language::$currentType;
     $this->_saveInfo['currentName'] = Vi_Language::$currentName;
     Vi_Language::$currentType = Vi_Language::TYPE_STICKER;
     Vi_Language::$currentName = $this->_name;
     $this->view->STICKER_URL = Vi_Registry::getBaseUrl() . "stickers/{$this->_name}/";
     $this->view->HELPER_URL = $this->view->STICKER_URL . 'helpers/';
     $this->init();
     $this->run();
 }
 private function _getImagePath($path)
 {
     return substr($path, strlen(Vi_Registry::getBaseUrl()));
 }
Exemple #5
0
 /**
  * Get relative image path
  * @param string $path
  * 
  * @return string
  * @example: media/userfiles/images/restaurant/img.jpg
  */
 public function getImagePath($path)
 {
     return substr($path, strlen(Vi_Registry::getBaseUrl()));
 }