diff options
| -rw-r--r-- | public_html/class/mysql.php | 3 | ||||
| -rw-r--r-- | public_html/index.php | 2 | ||||
| -rw-r--r-- | public_html/vfs_bootstrap.php | 6 | ||||
| -rw-r--r-- | public_html/vfs_config.php | 3 |
4 files changed, 11 insertions, 3 deletions
diff --git a/public_html/class/mysql.php b/public_html/class/mysql.php index d38fc2c..167c8a9 100644 --- a/public_html/class/mysql.php +++ b/public_html/class/mysql.php @@ -98,7 +98,8 @@ class vfsdb { time INTEGER, user INTEGER ) - ENGINE=InnoDB; ' + ENGINE=InnoDB;' + if ( ! $this->db->query($user_table . ' ' . $files_table . ' ' . $banned_user_table) ) failure("<p>Setting up the database failed.</p>", '500 Server Failure', false, "<h1>CREATE TABLE FAILED"); } diff --git a/public_html/index.php b/public_html/index.php index 5d705b8..54dfcdc 100644 --- a/public_html/index.php +++ b/public_html/index.php @@ -1,3 +1,3 @@ <?php -require('./vfs_config.php'); +require_once( dirname(__FILE__) . '/vfs_bootstrap.php'); diff --git a/public_html/vfs_bootstrap.php b/public_html/vfs_bootstrap.php new file mode 100644 index 0000000..d3624aa --- /dev/null +++ b/public_html/vfs_bootstrap.php @@ -0,0 +1,6 @@ +<?php +# loads the vfs environment + +require_once( dirname(__FILE__) . '/vfs_config.php'); +require(ABSPATH . 'functions.php'); +require(ABSPATH . 'class/mysql.php'); diff --git a/public_html/vfs_config.php b/public_html/vfs_config.php index da0085a..230a3b3 100644 --- a/public_html/vfs_config.php +++ b/public_html/vfs_config.php @@ -9,7 +9,8 @@ define('DBCHARSET', 'utf8'); define('DBPREFIX', 'vfs_'); # absolute path -define('ABSPATH', dirname(__FILE__)); +if( ! defined(ABSPATH) ) + define('ABSPATH', dirname(__FILE__) . '/'); # file directory define('FILEPATH', ABSPATH . '/../files'); |
