added some message outputs, edited libs in register html

This commit is contained in:
Lukas Heiligenbrunner 2020-04-17 18:11:23 +02:00
parent f4fbce7977
commit 3a51b08de8
2 changed files with 11 additions and 13 deletions

View File

@ -152,12 +152,12 @@ public class JDBC {
*/ */
public void checkDBStructure() { public void checkDBStructure() {
try { try {
ResultSet seti = executeQuery("SELECT COUNT(*) FROM information_schema.tables WHERE table_schema = '" + dbnamec + "'"); ResultSet seti = executeQuery("SELECT COUNT(*) FROM information_schema.tables WHERE table_schema = '" + dbnamec + "'");
seti.last(); seti.last();
Log.Log.debug("found " + seti.getInt(1) + " tables in db"); Log.Log.debug("found " + seti.getInt(1) + " tables in db");
if (seti.getInt(1) != 5) { if (seti.getInt(1) != 5) {
// structure not valid // structure not valid
Log.Log.info("recreating Database structure!");
Scanner s = new Scanner(getClass().getResourceAsStream("/db.sql")); Scanner s = new Scanner(getClass().getResourceAsStream("/db.sql"));
s.useDelimiter("(;(\r)?\n)|(--\n)"); s.useDelimiter("(;(\r)?\n)|(--\n)");
Statement st = null; Statement st = null;
@ -180,8 +180,8 @@ public class JDBC {
} else { } else {
Log.Log.message("found valid database structure!"); Log.Log.message("found valid database structure!");
} }
} catch (SQLException throwables) { } catch (SQLException e) {
throwables.printStackTrace(); Log.Log.error("a unhandled SQLexception occured at db structure creation.");
} }
} }
} }

View File

@ -3,19 +3,17 @@
<head> <head>
<meta charset="utf-8"> <meta charset="utf-8">
<title>Login Page</title> <title>Login Page</title>
<!--Made with love by Mutiullah Samim --> <!-- Latest compiled and minified CSS -->
<link rel="stylesheet" href="lib/bootstrap.min.css">
<!-- Latest compiled and minified CSS --> <!-- jQuery library -->
<link rel="stylesheet" href="lib/bootstrap.min.css"> <script src="lib/AdminLTE/plugins/jquery/jquery.min.js"></script>
<!-- jQuery library --> <!-- Popper JS -->
<script src="lib/jquery.min.js"></script> <script src="lib/popper.min.js"></script>
<!-- Popper JS --> <!-- Latest compiled JavaScript -->
<script src="lib/popper.min.js"></script> <script src="lib/AdminLTE/plugins/bootstrap/js/bootstrap.min.js"></script>
<!-- Latest compiled JavaScript -->
<script src="lib/bootstrap.min.js"></script>
<!--Fontawesome CDN--> <!--Fontawesome CDN-->
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.3.1/css/all.css" integrity="sha384-mzrmE5qonljUremFsqc01SB46JvROS7bZs3IO2EmfFsd15uHvIt+Y8vEf7N7fWAU" crossorigin="anonymous"> <link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.3.1/css/all.css" integrity="sha384-mzrmE5qonljUremFsqc01SB46JvROS7bZs3IO2EmfFsd15uHvIt+Y8vEf7N7fWAU" crossorigin="anonymous">