From 790524e3dee3ddcf5a8250adc8b38853d0014c9f Mon Sep 17 00:00:00 2001 From: Horus3 Date: Tue, 23 Sep 2014 20:16:17 +0200 Subject: rebuild with bootstrap --- bootstrap/bootstrap.php | 54 ++++++++++++++++ bootstrap/class/mysql.php | 141 ++++++++++++++++++++++++++++++++++++++++ bootstrap/class/user.php | 153 ++++++++++++++++++++++++++++++++++++++++++++ bootstrap/config.php | 30 +++++++++ bootstrap/functions.php | 24 +++++++ bootstrap/index.php | 72 +++++++++++++++++++++ bootstrap/setup.php | 12 ++++ bootstrap/static/footer.php | 12 ++++ bootstrap/static/header.php | 36 +++++++++++ 9 files changed, 534 insertions(+) create mode 100644 bootstrap/bootstrap.php create mode 100644 bootstrap/class/mysql.php create mode 100644 bootstrap/class/user.php create mode 100644 bootstrap/config.php create mode 100644 bootstrap/functions.php create mode 100644 bootstrap/index.php create mode 100644 bootstrap/setup.php create mode 100755 bootstrap/static/footer.php create mode 100644 bootstrap/static/header.php (limited to 'bootstrap') diff --git a/bootstrap/bootstrap.php b/bootstrap/bootstrap.php new file mode 100644 index 0000000..262113a --- /dev/null +++ b/bootstrap/bootstrap.php @@ -0,0 +1,54 @@ +open(); + } + + public function open(){ + try { + $this->db = new mysqli(DBHOST, DBUSER, DBPASSWORD, DBNAME); + } catch (Exception $e){ + failure("
".$e->getMessage()."
", '500 Server Failure', false, 'Can't connect to the database. MySQL gave this error code: " . $this->db->connect_errno . "
", '500 Server Failure', false, 'Can't reach MySQL server. Server says: " . $this->db->error . "
", '500 Server Failure', false, "Can't set " . DBCHARSET . " as the charset on your MySQL server.
" , '500 Server Failure', false, "There was a problem during bootstrapping the database schema. " . $this->db->error . "
", '500 Server Failure', false, "Welcome!
+Successfully created the database.
"; + +# rename this file to avoid setting up the tables twice +rename(ABSPATH . 'setup.php', ABSPATH . '_setup.php'); diff --git a/bootstrap/static/footer.php b/bootstrap/static/footer.php new file mode 100755 index 0000000..4a14ac7 --- /dev/null +++ b/bootstrap/static/footer.php @@ -0,0 +1,12 @@ + + + + ?> + + +