Failed to connect to database: " . mysqli_connect_error(); - echo "
"; - $error=true; - } + $con = pg_connect("host=localhost port=5432 dbname=limework user=webbanappeal password=UpUOZhRf5WLAy920wbDqyAKLySHl677juGgL"); - $sanitized_banid = mysqli_real_escape_string($con, $banid); - if ($result = mysqli_query($con, "SELECT `banid` FROM `bans` WHERE `banid` = '$sanitized_banid'")) { - if (mysqli_num_rows($result) == 0) { - echo "Error: There is no ban with the specified ban ID. Did you enter it correctly?
"; - $error=true; - } else { - // Free result set - mysqli_free_result($result); - } + if (!$con) { + echo "
Failed to connect to database."; + echo "
"; + $error=true; } - mysqli_close($con); + $query = "SELECT banid FROM bans WHERE banid = $1"; + $stmt = pg_prepare($con, "bancheck", $query); + $result = pg_execute($con, "bancheck", array($banid)); + + $banidfound=false; + if (!$result) { + echo "An database error occurred, report this to staff."; + echo "
"; + $error=true; + } else { + while ($row = pg_fetch_assoc($result)) { + $banidfound=true; + } + } + if (!$banidfound) { + echo "There is no ban with the specified ban ID."; + echo "
"; + $error=true; + } + pg_free_result($result); } //must not be else if, as error variable may be set above if ($error) { diff --git a/resources/apple-touch-icon.png b/resources/apple-touch-icon.png index c2586f5..a6f39d5 100755 Binary files a/resources/apple-touch-icon.png and b/resources/apple-touch-icon.png differ diff --git a/resources/banner.gif b/resources/banner.gif index 4d0f768..05ae2a9 100755 Binary files a/resources/banner.gif and b/resources/banner.gif differ diff --git a/resources/banner.jpg b/resources/banner.jpg index d7c14ff..d87f5f5 100755 Binary files a/resources/banner.jpg and b/resources/banner.jpg differ diff --git a/resources/downloads/GovindaSK.jar b/resources/downloads/GovindaSK.jar index 5563b47..c387fd2 100755 Binary files a/resources/downloads/GovindaSK.jar and b/resources/downloads/GovindaSK.jar differ diff --git a/resources/favicon-16x16.png b/resources/favicon-16x16.png index b0a72cf..0028166 100755 Binary files a/resources/favicon-16x16.png and b/resources/favicon-16x16.png differ diff --git a/resources/favicon-32x32.png b/resources/favicon-32x32.png index 5586fec..f357767 100755 Binary files a/resources/favicon-32x32.png and b/resources/favicon-32x32.png differ diff --git a/resources/favicon.ico b/resources/favicon.ico index 407a562..072d55d 100755 Binary files a/resources/favicon.ico and b/resources/favicon.ico differ diff --git a/resources/greenapple-server-icon.png b/resources/greenapple-server-icon.png index a012679..ad96b48 100755 Binary files a/resources/greenapple-server-icon.png and b/resources/greenapple-server-icon.png differ diff --git a/resources/logo.png b/resources/logo.png index c1c3cbc..5241d72 100755 Binary files a/resources/logo.png and b/resources/logo.png differ diff --git a/resources/mstile-150x150.png b/resources/mstile-150x150.png index 65b446d..cee7872 100755 Binary files a/resources/mstile-150x150.png and b/resources/mstile-150x150.png differ diff --git a/resources/safari-pinned-tab.svg b/resources/safari-pinned-tab.svg index 8857139..d29cb7c 100755 --- a/resources/safari-pinned-tab.svg +++ b/resources/safari-pinned-tab.svg @@ -1,3 +1,22 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:f7fe5b55f7046df575775392aaa4f3c0289de249a6aa56fc22ac9248cee58307 -size 1201 + + +