Better explanations I101
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
require "/home/hpr/php/include.php";
|
||||
|
||||
if ( $_SERVER['REQUEST_METHOD'] !== 'GET' and empty($_SERVER["REMOTE_ADDR"]) and count($_GET) !== 1 ) {
|
||||
call412("9a77e4ab24410cbf68a3a05ba97221e4");
|
||||
call412("9a77e4ab24410cbf68a3a05ba97221e4 Not a GET request");
|
||||
}
|
||||
|
||||
if ( isset( $_GET['key'] ) and strlen( $_GET['key'] ) === 45 and strlen( htmlspecialchars( stripslashes( strip_tags( $_GET['key'] ) ) ) ) === 45 and ctype_xdigit( $_GET['key'] ) ) {
|
||||
@@ -18,7 +18,7 @@ else {
|
||||
$key = htmlspecialchars( stripslashes( strip_tags( $_GET['delete'] ) ) );
|
||||
}
|
||||
else {
|
||||
call412("e8ac90fc2a8996e5fb7a83e73e636e80");
|
||||
call412("e8ac90fc2a8996e5fb7a83e73e636e80 Invalid key");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -27,11 +27,11 @@ $ip = $_SERVER["REMOTE_ADDR"];
|
||||
$query = "select * FROM reservations WHERE reservations.ip = '$ip' AND reservations.key = '$key' ";
|
||||
$result = mysqli_query($connection, $query);
|
||||
if($result === FALSE) {
|
||||
call412("91432866e3c9c36a9c4884345d578761");
|
||||
call412("91432866e3c9c36a9c4884345d578761 Could not find ip=\"$ip\" AND key=\"$key\" in the database. Did your IP address change ? Was the removed after 15 Munites ?");
|
||||
}
|
||||
$db = mysqli_fetch_array($result, MYSQLI_ASSOC);
|
||||
if ( empty($db) or empty( $db['timestamp'] ) or empty( $db['key'] ) or empty( $db['ep_num'] ) or empty( $db['ep_date'] ) or empty( $db['email'] ) ) {
|
||||
call412("b019bd29c1fe5b756e4b620a5428f730");
|
||||
call412("b019bd29c1fe5b756e4b620a5428f730 The information for this reservation is not correct in the database.");
|
||||
}
|
||||
else {
|
||||
$db_timestamp = $db['timestamp'];
|
||||
@@ -48,7 +48,7 @@ if ( isset( $_GET['delete'] ) ) {
|
||||
$query = "DELETE FROM reservations WHERE reservations.ip = '$ip' AND reservations.key = '$key' ";
|
||||
$result = mysqli_query($connection, $query);
|
||||
if($result === FALSE) {
|
||||
call412("35a7f4e80ecba8284049e9d6261ae523");
|
||||
call412("35a7f4e80ecba8284049e9d6261ae523 Could not remove the reservation.");
|
||||
}
|
||||
else {
|
||||
header( "Location: ${hubBaseurl}calendar.php" ) ;
|
||||
@@ -63,7 +63,7 @@ $status = strtotime("now") . ".EMAIL_LINK_CLICKED." . date('Y-m-d\TH:i:s\Z');
|
||||
$query = "UPDATE reservations SET `verified` = '1', `status` = 'EMAIL_LINK_CLICKED' WHERE `ip` = '$db_ip' AND `timestamp` = '$db_timestamp' AND `key` = '$db_key'";
|
||||
$result = mysqli_query($connection, $query );
|
||||
if(!isset($result)) {
|
||||
naughty("066c518314f0d3b1ad3e4af60fcf36ce");
|
||||
naughty("066c518314f0d3b1ad3e4af60fcf36ce Could not change status to EMAIL_LINK_CLICKED");
|
||||
}
|
||||
|
||||
// Display host information
|
||||
@@ -75,7 +75,7 @@ $ip = $_SERVER["REMOTE_ADDR"];
|
||||
$query = "SELECT * FROM hosts WHERE hosts.email = '$email' OR hosts.email = '$email_padded'";
|
||||
$result = mysqli_query($connection, $query);
|
||||
if($result === FALSE) {
|
||||
call412("5cb513b590ab5859bf7603b79402a5cb");
|
||||
call412("5cb513b590ab5859bf7603b79402a5cb Could not find a host with email=\"$email\"");
|
||||
}
|
||||
$db = mysqli_fetch_array($result, MYSQLI_ASSOC);
|
||||
if ( empty($db) or empty( $db['hostid'] ) or empty( $db['host'] ) or empty( $db['email'] ) ) {
|
||||
|
||||
Reference in New Issue
Block a user