diff options
author | Kelly Rauchenberger <fefferburbia@gmail.com> | 2008-06-23 09:47:21 +0000 |
---|---|---|
committer | Kelly Rauchenberger <fefferburbia@gmail.com> | 2008-06-23 09:47:21 +0000 |
commit | c6e3d927c343280bc1fd6d0dfdb64658151e9aac (patch) | |
tree | 2748a3fef5c547503433cde7ae93da64430bbf28 /central | |
parent | 3598c1a205bd3419f75ae481ad20d3f54b154bad (diff) | |
download | instadisc-c6e3d927c343280bc1fd6d0dfdb64658151e9aac.tar.gz instadisc-c6e3d927c343280bc1fd6d0dfdb64658151e9aac.tar.bz2 instadisc-c6e3d927c343280bc1fd6d0dfdb64658151e9aac.zip |
Moved code needed by most pages into a single file.
Diffstat (limited to 'central')
-rw-r--r-- | central/trunk/common.php | 13 | ||||
-rw-r--r-- | central/trunk/db.php | 5 | ||||
-rw-r--r-- | central/trunk/index.php | 8 |
3 files changed, 25 insertions, 1 deletions
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 @@ | |||
1 | <?php | ||
2 | |||
3 | /* InstaDisc Server - A Four Island Project */ | ||
4 | |||
5 | include('db.php'); | ||
6 | |||
7 | $getconfig = "SELECT * FROM config"; | ||
8 | $getconfig2 = mysql_query($getconfig); | ||
9 | $config = mysql_fetch_array($getconfig2); | ||
10 | |||
11 | include('header.php'); | ||
12 | |||
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')) | |||
8 | exit; | 8 | exit; |
9 | } | 9 | } |
10 | 10 | ||
11 | if (file_exists('install.php')) | ||
12 | { | ||
13 | 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.'); | ||
14 | } | ||
15 | |||
11 | include('config.php'); | 16 | include('config.php'); |
12 | 17 | ||
13 | mysql_connect($dbhost, $dbuser, $dbpass); | 18 | 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 @@ | |||
2 | 2 | ||
3 | /* InstaDisc Server - A Four Island Project */ | 3 | /* InstaDisc Server - A Four Island Project */ |
4 | 4 | ||
5 | include('db.php'); | 5 | include('common.php'); |
6 | |||
7 | ?>Welcome to the <?php echo($config['title']); ?> InstaDisc Server!<P><?php | ||
8 | |||
9 | echo($config['text']); | ||
10 | |||
11 | include('footer.php'); | ||
6 | 12 | ||
7 | ?> | 13 | ?> |