From b73a1397f3845eb2fa78eba6019be876eebedd61 Mon Sep 17 00:00:00 2001 From: konrad Date: Mon, 15 Oct 2007 18:47:40 +0000 Subject: [PATCH] move loaders to inc git-svn-id: https://silmor.de/svn/softmagic/smoke/trunk@53 6e3c4bff-ac9f-4ac1-96c5-d2ea494d3e33 --- www/.htaccess | 3 --- www/admin.php | 2 +- www/inc/loader.php | 12 ++++++++++++ www/inc/loader_nonadmin.php | 9 +++++++++ www/index.php | 4 ++-- www/loader.php | 12 ------------ www/loader_nonadmin.php | 8 -------- www/machine.php | 5 ++--- 8 files changed, 26 insertions(+), 29 deletions(-) create mode 100644 www/inc/loader.php create mode 100644 www/inc/loader_nonadmin.php delete mode 100644 www/loader.php delete mode 100644 www/loader_nonadmin.php diff --git a/www/.htaccess b/www/.htaccess index 82ada0c..97e51a5 100644 --- a/www/.htaccess +++ b/www/.htaccess @@ -1,6 +1,3 @@ - - Deny from all - Deny from all diff --git a/www/admin.php b/www/admin.php index 612c861..6f25a81 100644 --- a/www/admin.php +++ b/www/admin.php @@ -1,5 +1,5 @@ canAdministrate()) die("Administration is turned off. Sorry."); diff --git a/www/inc/loader.php b/www/inc/loader.php new file mode 100644 index 0000000..de7fce0 --- /dev/null +++ b/www/inc/loader.php @@ -0,0 +1,12 @@ +tryConnect(); +//move on in loader_nonadmin.php (or admin.php) +?> \ No newline at end of file diff --git a/www/inc/loader_nonadmin.php b/www/inc/loader_nonadmin.php new file mode 100644 index 0000000..df76c9b --- /dev/null +++ b/www/inc/loader_nonadmin.php @@ -0,0 +1,9 @@ +canUseDb()) + die("Database is not correctly configured. Giving up."); +//load class-files +include('./inc/event.php'); +include('./inc/room.php'); +include("./inc/random.php"); +?> \ No newline at end of file diff --git a/www/index.php b/www/index.php index ab06ff9..fd3ac43 100644 --- a/www/index.php +++ b/www/index.php @@ -1,7 +1,7 @@ tryConnect(); -//move on in loader_nonadmin.php (or admin.php) -?> \ No newline at end of file diff --git a/www/loader_nonadmin.php b/www/loader_nonadmin.php deleted file mode 100644 index 1df82e8..0000000 --- a/www/loader_nonadmin.php +++ /dev/null @@ -1,8 +0,0 @@ -canUseDb()) - die("Database is not correctly configured. Giving up."); -//load class-files -include('inc/event.php'); -include('inc/room.php'); -?> \ No newline at end of file diff --git a/www/machine.php b/www/machine.php index a129079..d2b28b1 100644 --- a/www/machine.php +++ b/www/machine.php @@ -33,7 +33,7 @@ if(isset($HTTP_RAW_POST_DATA)){ } //initialize basics -include("loader.php"); +include("inc/loader.php"); // server info can be answered without performing any more initialization if($SMOKEREQUEST=="serverinfo"){ @@ -43,10 +43,9 @@ if($SMOKEREQUEST=="serverinfo"){ } //initialize DB -include("loader_nonadmin.php"); +include("inc/loader_nonadmin.php"); //load machine interface -include("inc/random.php"); include("inc/session.php"); // request to start a session -- 1.7.2.5