public function checkInputBDE($trackingId)
 {
     // load parameters
     $confFile = './protected/pages/components/timuxuser/config.xml';
     if (file_exists($confFile)) {
         $config = new TApplicationConfiguration();
         $config->loadFromFile($confFile);
         $param = new TMap();
         foreach ($config->getParameters() as $id => $parameter) {
             if (is_array($parameter)) {
                 $component = Prado::createComponent($parameter[0]);
                 foreach ($parameter[1] as $name => $value) {
                     $component->setSubProperty($name, $value);
                 }
                 $param->add($id, $component);
             } else {
                 $param->add($id, $parameter);
             }
         }
     } else {
         $param = Prado::getApplication()->getParameters();
     }
     $computation2 = $param['computation2'];
     if ($computation2 != '') {
         Prado::using('horux.pages.components.timuxuser.' . $computation2);
         if (class_exists($computation2)) {
             $extend = new $computation2();
             if ($extend) {
                 return $extend->checkInputBDE($trackingId);
             }
         }
     }
     return true;
 }
示例#2
0
 protected function initApplication()
 {
     if ($this->_configFile !== null) {
         if ($this->_cacheFile === null || @filemtime($this->_cacheFile) < filemtime($this->_configFile)) {
             $config = new TApplicationConfiguration();
             $config->loadFromFile($this->_configFile);
             if ($this->_cacheFile !== null) {
                 file_put_contents($this->_cacheFile, Prado::serialize($config), LOCK_EX);
             }
         } else {
             $config = Prado::unserialize(file_get_contents($this->_cacheFile));
         }
         $this->applyConfiguration($config, false);
     }
     if (($serviceID = $this->getRequest()->resolveRequest(array_keys($this->_services))) === null) {
         $serviceID = $this->getPageServiceID();
     }
     $this->startService($serviceID);
 }
示例#3
0
                $user = substr($username, 0, $pos);
                $domain = substr($domain, 1, strlen($domain) - 1);
                if (file_exists('./protected/application_' . $domain . '.xml')) {
                    $config_file = './protected/application_' . $domain . '.xml';
                    $session['application.xml'] = $config_file;
                    $_REQUEST['ctl0$Main$username'] = $user;
                    $_POST['ctl0$Main$username'] = $user;
                    $_REQUEST['username'] = $user;
                    $_GET['username'] = $user;
                } else {
                    $_REQUEST['ctl0$Main$username'] = "";
                    $_POST['ctl0$Main$username'] = "";
                    $_REQUEST['username'] = "";
                    $_GET['username'] = "";
                }
            } else {
                $_REQUEST['ctl0$Main$username'] = "";
                $_POST['ctl0$Main$username'] = "";
                $_REQUEST['username'] = "";
                $_GET['username'] = "";
            }
        }
    }
    if ($session['application.xml']) {
        $config_file = $session['application.xml'];
    }
    $session->close();
    $app_conf->loadFromFile($config_file);
    $application->applyConfiguration($app_conf, true);
    $application->run();
}