From fd550ce96e96205c85bf6a2064f6e5ad653e89a0 Mon Sep 17 00:00:00 2001 From: moparisthebest Date: Wed, 26 Dec 2012 22:32:54 -0600 Subject: [PATCH] Minor database type update, various other edits --- ss_sources/register.php | 15 +++++++-------- ss_sources/verify.php | 28 +++++++++++++++------------- 2 files changed, 22 insertions(+), 21 deletions(-) diff --git a/ss_sources/register.php b/ss_sources/register.php index 42076f5..99c7417 100755 --- a/ss_sources/register.php +++ b/ss_sources/register.php @@ -86,7 +86,7 @@ function register2() { if ($edit) { $sql = 'UPDATE `servers` SET `name` = ?, `pic_url` = ?, `version` = ?, `info` = ? WHERE `uid` = ? LIMIT 1'; $stmt = $g_mysqli->prepare($sql) or debug($g_mysqli->error); - $stmt->bind_param("ssisi", $name, $pic_url, $version, $message, $uid); + $stmt->bind_param("ssssi", $name, $pic_url, $version, $message, $uid); $success_msg = "Server $name succesfully updated."; $fail_msg = "Editing $name failed, did you actually change anything?"; } else { @@ -131,7 +131,7 @@ function register2() { If you have problems with this, PM $g_admin_contact on the forums."; } - global $uname, $g_admin_contact, $g_checker_ip; + global $uname, $g_admin_contact; // don't bother with pic_url, they can edit it if they are sponsored $sql = 'INSERT INTO `toadd` (`uid`, `uname`, `name`, `ip`, `port`, `version`, `time`, `info`, `ipaddress`, `rs_name`, `rs_pass`, `key`, `verified`) VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)'; $stmt = $g_mysqli->prepare($sql) or debug($g_mysqli->error); @@ -140,7 +140,7 @@ function register2() { Username: $rs_name\n
Password: $rs_pass\n
to make sure it is online, and if successful, it will be posted.
-You must register this username and password for me on your server and allow it to be logged into from the IP $g_checker_ip
+You must register this username and password for me on your server and allow it to be logged into from the IP 69.39.224.55
The server will be deleted from the queue if not verified and logged into within 24 hours of posting.
" . $verify_msg; $fail_msg = 'Registration failed, PM ' . $g_admin_contact . ' on the forums to with details so he can fix it.'; } @@ -281,7 +281,7 @@ function echoPostForm($edit = null) { } function echoForm($name, $ip, $port, $version, $message, $pic_url, $edit = false) { - global $g_versions, $g_img_dir, $g_default_port; + global $g_versions, $g_img_dir; if (isset($name)) censor($name); $preview_message = $message; @@ -347,7 +347,7 @@ function echoForm($name, $ip, $port, $version, $message, $pic_url, $edit = false Port - + + "storeCaret(this);" onchange="storeCaret(this);" tabindex="2"> + diff --git a/ss_sources/verify.php b/ss_sources/verify.php index 0a40272..df25ef5 100755 --- a/ss_sources/verify.php +++ b/ss_sources/verify.php @@ -68,11 +68,12 @@ function verify() { if ($verified == 1) { writeToFile("already verified"); - echo "You have already verified that you own this server.\n -Your server will be checked by logging into it with the following credentials:\n -Username: $rs_name\n -Password: $rs_pass\n -to make sure it is online, and if successful, it will be posted."; + echo "You have already verified that you own this server. +Your server will be checked by logging into it with the following credentials: +Username: $rs_name +Password: $rs_pass +to make sure it is online, and if successful, it will be posted. +"; return; } @@ -85,11 +86,12 @@ to make sure it is online, and if successful, it will be posted."; $stmt->execute(); if ($stmt->affected_rows == 1) { writeToFile("success verified"); - echo "Congratulations, you have verified you own this IP.\n -Your server will now be checked by logging into it with the following credentials:\n -Username: $rs_name\n -Password: $rs_pass\n -to make sure it is online, and if successful, it will be posted."; + echo "Congratulations, you have verified you own this IP. +Your server will now be checked by logging into it with the following credentials: +Username: $rs_name +Password: $rs_pass +to make sure it is online, and if successful, it will be posted. +"; } else { writeToFile("strange failure"); global $g_admin_contact; @@ -101,9 +103,9 @@ to make sure it is online, and if successful, it will be posted."; } function writeToFile($message, $fname = 'verify_log', $mode = 'a') { - $fp = fopen($fname, $mode); - fwrite($fp, time() . ': ' . $message . "\n"); - fclose($fp); + @$fp = fopen($fname, $mode); + @fwrite($fp, time() . ': ' . $message . "\n"); + @fclose($fp); } ?> \ No newline at end of file