]> wagnertech.de Git - projects.git/blobdiff - verleihnix/gui/mKrimiGui.php
phpide-d10
[projects.git] / verleihnix / gui / mKrimiGui.php
diff --git a/verleihnix/gui/mKrimiGui.php b/verleihnix/gui/mKrimiGui.php
new file mode 100644 (file)
index 0000000..a1abc94
--- /dev/null
@@ -0,0 +1,42 @@
+<?php
+//phpinfo();
+
+// define user
+$user = getenv("USER");
+if ($user == "") putenv("USER=gui");
+
+// includes
+$path = preg_replace("/mKrimi.*/", "mKrimi", __FILE__);
+set_include_path($path . PATH_SEPARATOR . get_include_path());
+require_once 'util/Logger.php';
+require_once 'util/Config.php';
+require_once 'GenericAdmin/gui/control/GenadControl.php';
+
+// load configuration + class loader
+include 'gui/ConfigurationData.php';
+Config::setConfiguration($configurationData);
+
+// Logging
+$logger = Logger::getInstance();
+$requestMethod = $_SERVER["REQUEST_METHOD"];
+$logger->log(__FILE__, $requestMethod);
+$logger->log(__FILE__, "GET-Variabeles:");
+while ( list($key, $value) = each($_GET) ) {
+       $logger->log(__FILE__, $key . " : " . $value);;
+}
+$logger->log(__FILE__, "POST-Variabeles:");
+while ( list($key, $value) = each($_POST) ) {
+       $logger->log(__FILE__, $key . " : " . $value);;
+}
+$logger->log(__FILE__,"Redirect-URL:".$_SERVER["REDIRECT_URL"]);
+
+// call implementation
+try {
+       $control = new GenadControl();
+       $control->doIt();
+}
+catch (Exception $e) {
+       $logger->logException(__FILE__, $e);    
+       echo "<html><body>Error occurred!</body></html>";
+}
+