Esempio n. 1
0
 function registerGlobalVariables()
 {
     $variables = SJB_System::getGlobalTemplateVariables();
     foreach ($variables as $name => $value) {
         $this->assign($name, $value);
     }
     parse_str($_SERVER['QUERY_STRING'], $queryString);
     $params = array();
     $uri = SJB_System::getURI();
     if (!empty($_POST) && !in_array($uri, array('/paypal-pro-fill-payment-card/', '/add-invoice/', '/edit-invoice/', '/edit-product/', '/add-product/'))) {
         $queryString = array_merge($queryString, $_POST);
     }
     foreach ($queryString as $key => $val) {
         if (!in_array($key, array('lang', 'theme'))) {
             $params[$key] = $val;
         }
     }
     $this->assign('url', $uri);
     $this->assign('acl', SJB_Acl::getInstance());
     $this->assign('params', http_build_query($params, '', '&'));
     $this->assign('isDemo', SJB_System::getSystemSettings("isDemo"));
 }
Esempio n. 2
0
 protected function getUri()
 {
     $globalTemplateVariables = SJB_System::getGlobalTemplateVariables();
     $uri = $globalTemplateVariables['GLOBALS']['user_page_uri'];
     return preg_match("/\\/\$/", $uri) ? $uri : $uri . '/';
 }