about summary refs log tree commit diff stats
path: root/central
diff options
context:
space:
mode:
authorKelly Rauchenberger <fefferburbia@gmail.com>2008-06-23 09:47:21 +0000
committerKelly Rauchenberger <fefferburbia@gmail.com>2008-06-23 09:47:21 +0000
commitc6e3d927c343280bc1fd6d0dfdb64658151e9aac (patch)
tree2748a3fef5c547503433cde7ae93da64430bbf28 /central
parent3598c1a205bd3419f75ae481ad20d3f54b154bad (diff)
downloadinstadisc-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.php13
-rw-r--r--central/trunk/db.php5
-rw-r--r--central/trunk/index.php8
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
5include('db.php');
6
7$getconfig = "SELECT * FROM config";
8$getconfig2 = mysql_query($getconfig);
9$config = mysql_fetch_array($getconfig2);
10
11include('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
11if (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
11include('config.php'); 16include('config.php');
12 17
13mysql_connect($dbhost, $dbuser, $dbpass); 18mysql_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
5include('db.php'); 5include('common.php');
6
7?>Welcome to the <?php echo($config['title']); ?> InstaDisc Server!<P><?php
8
9echo($config['text']);
10
11include('footer.php');
6 12
7?> 13?>