gitarre
[SVBaL.git] / Mitgliederverwaltung / gui / index.php
1 <?php
2 //phpinfo();
3
4 // define user
5 $user = getenv("USER");
6 if ($user == "") putenv("USER=gui");
7
8 // includes
9 $path = preg_replace("/SVBaL.*/", "SVBaL", __FILE__);
10 set_include_path($path . PATH_SEPARATOR . get_include_path());
11 require_once 'util/Logger.php';
12 require_once 'util/Config.php';
13 require_once 'GenericAdmin/gui/control/GenadControl.php';
14
15 // load configuration + class loader
16 include 'gui/ConfigurationData.php';
17 Config::setConfiguration($configurationData);
18
19 // Logging
20 $logger = Logger::getInstance();
21 $requestMethod = $_SERVER["REQUEST_METHOD"];
22 $logger->log(__FILE__, $requestMethod);
23 $logger->log(__FILE__, "GET-Variabeles:");
24 while ( list($key, $value) = each($_GET) ) {
25         $logger->log(__FILE__, $key . " : " . $value);;
26 }
27 $logger->log(__FILE__, "POST-Variabeles:");
28 while ( list($key, $value) = each($_POST) ) {
29         $logger->log(__FILE__, $key . " : " . $value);;
30 }
31
32 // call implementation
33 try {
34         $control = new GenadControl();
35         $control->doIt();
36 }
37 catch (Exception $e) {
38         $logger->logException(__FILE__, $e);    
39         echo "<html><body>Error occurred!</body></html>";
40 }
41