blob: 4b67dd67d6f24cd0530cbbd40276ccb82531eb45 [file] [log] [blame]
Andreu66ad5cf2019-09-18 17:15:44 +02001<?php
2 // Define MySQL login variables
Andreued8e1f92019-09-18 22:26:04 +02003 $servername = "localhost"; // "fdb22.awardspace.net";
4 $username = "root"; // "3155560_users";
5 $password = ""; // "btechnoro@fox4news.info";
Andreu66ad5cf2019-09-18 17:15:44 +02006
7 // Create connection
Andreued8e1f92019-09-18 22:26:04 +02008 $conn = new mysqli($servername, $username, $password, "pastanaga");
Andreu66ad5cf2019-09-18 17:15:44 +02009 if ($conn->connect_error) die("Connection failed: " . $conn->connect_error);
10 $conn->set_charset("utf8");
11
12 // Do the query
13 $query = "";
Andreu885889c2019-09-19 00:28:20 +020014 $query2 = "";
Andreu66ad5cf2019-09-18 17:15:44 +020015 if ($_GET['msg'] == 1) $query = "UPDATE users SET requested=".$_GET['msg']." WHERE id=".$_GET['id']; // request kill
16 if ($_GET['msg'] == 2) $query = "UPDATE users SET requested=".$_GET['msg']." WHERE quimata=".$_GET['id']; // request dead
Andreu885889c2019-09-19 00:28:20 +020017 if ($_GET['msg'] == 3) {
18 $query = "UPDATE users SET mort=1 WHERE id=".$_GET['id']; // confirm dead/killed
19 $query2 = "UPDATE users SET requested=0 WHERE quimata=".$_GET['id']; // erase request from killer
20 }
Andreu10cb3042019-09-18 19:55:36 +020021 if ($_GET['msg'] == 4) $query = "UPDATE users SET requested=0 WHERE id=".$_GET['id']; // deny request
Andreu66ad5cf2019-09-18 17:15:44 +020022
Andreuffefd222019-09-19 11:09:44 +020023 $a = "UPDATE users SET quimata=".$_GET['id']
24
Andreu66ad5cf2019-09-18 17:15:44 +020025 // Fetch the information of the user
Andreu885889c2019-09-19 00:28:20 +020026 if ($result = $conn->query($query)) echo $query;
Andreu57f3ca92019-09-18 19:40:42 +020027 else die("Wrong query: " . $query);
Andreu885889c2019-09-19 00:28:20 +020028 if ($result = $conn->query($query2)) echo "\n" . $query2;
Andreu66ad5cf2019-09-18 17:15:44 +020029
30 // Close connection
31 $conn->close();
32?>