From c6e3d927c343280bc1fd6d0dfdb64658151e9aac Mon Sep 17 00:00:00 2001 From: Kelly Rauchenberger Date: Mon, 23 Jun 2008 09:47:21 +0000 Subject: Moved code needed by most pages into a single file. --- central/trunk/common.php | 13 +++++++++++++ central/trunk/db.php | 5 +++++ central/trunk/index.php | 8 +++++++- 3 files changed, 25 insertions(+), 1 deletion(-) create mode 100644 central/trunk/common.php (limited to 'central/trunk') diff --git a/central/trunk/common.php b/central/trunk/common.php new file mode 100644 index 0000000..573ce15 --- /dev/null +++ b/central/trunk/common.php @@ -0,0 +1,13 @@ + diff --git a/central/trunk/db.php b/central/trunk/db.php index 61d9bc4..c492722 100644 --- a/central/trunk/db.php +++ b/central/trunk/db.php @@ -8,6 +8,11 @@ if (!file_exists('config.php')) exit; } +if (file_exists('install.php')) +{ + die('Excuse me, but you need to delete install.php before you can use this as leaving install.php there is a biiiig security hole.'); +} + include('config.php'); mysql_connect($dbhost, $dbuser, $dbpass); diff --git a/central/trunk/index.php b/central/trunk/index.php index 31d1af7..6ba21ab 100644 --- a/central/trunk/index.php +++ b/central/trunk/index.php @@ -2,6 +2,12 @@ /* InstaDisc Server - A Four Island Project */ -include('db.php'); +include('common.php'); + +?>Welcome to the InstaDisc Server!

-- cgit 1.4.1