Migrate to PostgreSQL & small changes
@ -12,8 +12,7 @@ Govindas Limework is a network of (Java) Minecraft servers that consists of thes
|
||||
• Govindas Survival Games
|
||||
• Knockout
|
||||
• 1v1
|
||||
Server IP: **MC.LIMEWORK.NET** (1.16.5+ version)
|
||||
|
||||
Server IP: **MC.LIMEWORK.NET** (1.16.5+ Java version or Bedrock)
|
||||
## News
|
||||
|
||||
[Join our matrix space for latest updates.](/chat)
|
||||
[New website](/news/2022/01/new-website) (2022-01-23)
|
Before Width: | Height: | Size: 132 B After Width: | Height: | Size: 7.3 MiB |
Before Width: | Height: | Size: 132 B After Width: | Height: | Size: 8.1 MiB |
Before Width: | Height: | Size: 130 B After Width: | Height: | Size: 16 KiB |
Before Width: | Height: | Size: 130 B After Width: | Height: | Size: 41 KiB |
@ -21,7 +21,7 @@
|
||||
<li><a href="/rules">Rules</a></li>
|
||||
<li><a href="https://store.limework.net" style="color:lightgreen;">🛒 Store</a></li>
|
||||
<li><div class="dropdown">
|
||||
<button class="dropbtn">𝄘</button>
|
||||
<button class="dropbtn">More</button>
|
||||
<div class="dropdown-content">
|
||||
<a href="https://git.limework.net" style="color:lightgreen;">🏗 Gitea</a>
|
||||
<a href="https://video.govindas.net" style="color:lightgreen;">📺 PeerTube</a>
|
||||
@ -32,7 +32,6 @@
|
||||
</ul>
|
||||
<div class='content'>
|
||||
<?php
|
||||
|
||||
$banid=htmlspecialchars($_POST['banid']);
|
||||
$banreason=htmlspecialchars($_POST['banreason']);
|
||||
$whyunban=htmlspecialchars($_POST['whyunban']);
|
||||
@ -56,27 +55,36 @@ if (strlen($banid) > 16) {
|
||||
$error=true;
|
||||
|
||||
} if (!$error) {
|
||||
ini_set('display_errors',1);
|
||||
error_reporting(E_ALL | E_STRICT);
|
||||
//ini_set('display_errors',1);
|
||||
//error_reporting(E_ALL | E_STRICT);
|
||||
// webbanappeal has read-only access to bans table, nothing else. It can only be accessed in localhost. Publishing password to git is fine.
|
||||
$con = mysqli_connect("localhost","webbanappeal","UpUOZhRf5WLAy920wbDqyAKLySHl677juGgL","friends");
|
||||
$con = pg_connect("host=localhost port=5432 dbname=limework user=webbanappeal password=UpUOZhRf5WLAy920wbDqyAKLySHl677juGgL");
|
||||
|
||||
if (!$con) {
|
||||
echo "<p style='color:red;'>Failed to connect to database: " . mysqli_connect_error();
|
||||
echo "<p style='color:red;'>Failed to connect to database.";
|
||||
echo "</p>";
|
||||
$error=true;
|
||||
}
|
||||
$query = "SELECT banid FROM bans WHERE banid = $1";
|
||||
$stmt = pg_prepare($con, "bancheck", $query);
|
||||
$result = pg_execute($con, "bancheck", array($banid));
|
||||
|
||||
$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 "<p style='color:red;'>Error: There is no ban with the specified ban ID. Did you enter it correctly?</p><br>";
|
||||
$banidfound=false;
|
||||
if (!$result) {
|
||||
echo "<p style='color:red;'>An database error occurred, report this to staff.";
|
||||
echo "</p>";
|
||||
$error=true;
|
||||
} else {
|
||||
// Free result set
|
||||
mysqli_free_result($result);
|
||||
while ($row = pg_fetch_assoc($result)) {
|
||||
$banidfound=true;
|
||||
}
|
||||
}
|
||||
mysqli_close($con);
|
||||
if (!$banidfound) {
|
||||
echo "<p style='color:red;'>There is no ban with the specified ban ID.";
|
||||
echo "</p>";
|
||||
$error=true;
|
||||
}
|
||||
pg_free_result($result);
|
||||
}
|
||||
//must not be else if, as error variable may be set above
|
||||
if ($error) {
|
||||
|
Before Width: | Height: | Size: 130 B After Width: | Height: | Size: 10 KiB |
Before Width: | Height: | Size: 131 B After Width: | Height: | Size: 592 KiB |
Before Width: | Height: | Size: 130 B After Width: | Height: | Size: 36 KiB |
Before Width: | Height: | Size: 129 B After Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 129 B After Width: | Height: | Size: 2.1 KiB |
Before Width: | Height: | Size: 130 B After Width: | Height: | Size: 15 KiB |
Before Width: | Height: | Size: 130 B After Width: | Height: | Size: 34 KiB |
Before Width: | Height: | Size: 130 B After Width: | Height: | Size: 26 KiB |
Before Width: | Height: | Size: 130 B After Width: | Height: | Size: 9.8 KiB |
BIN
resources/safari-pinned-tab.svg
(Stored with Git LFS)
Before Width: | Height: | Size: 129 B After Width: | Height: | Size: 1.2 KiB |