diff --git a/bans.php b/bans.php
index a569922..bbfad05 100644
--- a/bans.php
+++ b/bans.php
@@ -1,9 +1,6 @@
print_title();
diff --git a/check.php b/check.php
index 0f4bf3e..7182bac 100644
--- a/check.php
+++ b/check.php
@@ -1,9 +1,5 @@
getMessage());
+ Settings::handle_database_error($page->settings, $ex);
}
}
diff --git a/error/access-denied.php b/error/access-denied.php
new file mode 100644
index 0000000..2e2a03d
--- /dev/null
+++ b/error/access-denied.php
@@ -0,0 +1,25 @@
+
+
+
+
+
+
+ litebans-php - Database Error
+
+
+
+
+
+
Database Error
+
+
+ The web interface was unable to connect to the database using the configuration provided.
+
+ Database error: Access denied
+
+
+
Try Again
+
+
+
+
diff --git a/error/tables-not-found.php b/error/tables-not-found.php
new file mode 100644
index 0000000..b05dd7e
--- /dev/null
+++ b/error/tables-not-found.php
@@ -0,0 +1,33 @@
+
+
+
+
+
+
+ litebans-php - Database Error
+
+
+
+
+
+
Database Error
+
+ The web interface has connected to the database, but could not find any tables generated by LiteBans.
+
+ This means that the plugin has not successfully connected to this database before with the same configuration.
+
+ Solutions:
+
+ - Check the startup logs to see if there are any errors.
+
+ - Ensure that the plugin is using the MySQL driver (not SQLite) to connect to the database.
+
+ - Ensure that the table prefix is the same in config.yml and settings.php.
+
+
+
+
Try Again
+
+
+
+
diff --git a/history.php b/history.php
index 32f6261..baf372a 100644
--- a/history.php
+++ b/history.php
@@ -1,11 +1,5 @@
table_begin();
@@ -211,5 +205,5 @@ try {
$page->print_footer();
} catch (PDOException $ex) {
- die($ex->getMessage());
+ Settings::handle_database_error($page->settings, $ex);
}
diff --git a/includes/css/bootstrap.css b/inc/css/bootstrap.css
similarity index 100%
rename from includes/css/bootstrap.css
rename to inc/css/bootstrap.css
diff --git a/includes/css/bootstrap.min.css b/inc/css/bootstrap.min.css
similarity index 100%
rename from includes/css/bootstrap.min.css
rename to inc/css/bootstrap.min.css
diff --git a/includes/css/custom.css b/inc/css/custom.css
similarity index 100%
rename from includes/css/custom.css
rename to inc/css/custom.css
diff --git a/includes/fonts/glyphicons-halflings-regular.eot b/inc/fonts/glyphicons-halflings-regular.eot
similarity index 100%
rename from includes/fonts/glyphicons-halflings-regular.eot
rename to inc/fonts/glyphicons-halflings-regular.eot
diff --git a/includes/fonts/glyphicons-halflings-regular.svg b/inc/fonts/glyphicons-halflings-regular.svg
similarity index 100%
rename from includes/fonts/glyphicons-halflings-regular.svg
rename to inc/fonts/glyphicons-halflings-regular.svg
diff --git a/includes/fonts/glyphicons-halflings-regular.ttf b/inc/fonts/glyphicons-halflings-regular.ttf
similarity index 100%
rename from includes/fonts/glyphicons-halflings-regular.ttf
rename to inc/fonts/glyphicons-halflings-regular.ttf
diff --git a/includes/fonts/glyphicons-halflings-regular.woff b/inc/fonts/glyphicons-halflings-regular.woff
similarity index 100%
rename from includes/fonts/glyphicons-halflings-regular.woff
rename to inc/fonts/glyphicons-halflings-regular.woff
diff --git a/inc/footer.php b/inc/footer.php
new file mode 100644
index 0000000..2027265
--- /dev/null
+++ b/inc/footer.php
@@ -0,0 +1,3 @@
+
+
+"; ?>
diff --git a/includes/header.php b/inc/header.php
similarity index 92%
rename from includes/header.php
rename to inc/header.php
index 03a18a7..7484097 100644
--- a/includes/header.php
+++ b/inc/header.php
@@ -1,8 +1,4 @@
$row['c_kicks'],
);
} catch (PDOException $ex) {
- die($ex->getMessage());
+ Settings::handle_database_error($page->settings, $ex);
}
}
}
@@ -62,10 +58,10 @@ $settings = $this->page->settings;
-
+
-
-
+
+
";
+
+ die;
+ }
}
diff --git a/includes/footer.php b/includes/footer.php
deleted file mode 100644
index 1979518..0000000
--- a/includes/footer.php
+++ /dev/null
@@ -1,3 +0,0 @@
-
-
-"; ?>
diff --git a/index.php b/index.php
index 1689c83..00dcfdd 100644
--- a/index.php
+++ b/index.php
@@ -1,10 +1,8 @@
print_title();
-
?>
diff --git a/info.php b/info.php
index c34899f..a914c48 100644
--- a/info.php
+++ b/info.php
@@ -1,9 +1,5 @@
print_title();
diff --git a/mutes.php b/mutes.php
index a1dc2c4..8eae54e 100644
--- a/mutes.php
+++ b/mutes.php
@@ -1,9 +1,6 @@
print_title();
diff --git a/warnings.php b/warnings.php
index 0c55ea1..fbab429 100644
--- a/warnings.php
+++ b/warnings.php
@@ -1,9 +1,6 @@
print_title();