Add all vs all mode

Change-Id: I4a379704ab869e5301ae211ae31ee0f8d66620ee
diff --git a/php/request.php b/php/request.php
index 39f17dd..03cebd8 100644
--- a/php/request.php
+++ b/php/request.php
@@ -1,6 +1,7 @@
 <?php
 	require '../credentials.php';
 	require 'utils.php';
+	require 'security.php';
 
 	$credentials = new Credentials();
 	$usersdb = $credentials->usersdb();
@@ -18,9 +19,18 @@
 					"UPDATE $usersdb SET requested=0, quimata=".(int)$_POST['user_quimata'].", bits=".(int)rand(1,512)." WHERE quimata=".(int)$_POST['user_id'], 	// assign new victim to killer
 					"UPDATE $usersdb SET quimata=0, mort=1 WHERE id=".(int)$_POST['user_id']];		// confirm victim dead/killed										
 	}
-	// Fetch the information of the user
+	if ($_POST['msg'] == "INSTAKILL" && Security::isSignedIn() && Credentials::isAllVsAllModeEnabled()) {
+		$mort = get_users($_POST['mort']);
+		$queries = [
+			"INSERT INTO $mortsdb (id, quimatava, assassi, curs, grau) VALUES (".(int)$_POST['mort'].", ".(int)$mort->quimata.", ".(int)$_SESSION['id'].", ".(int)$mort->curs.", ".(int)$mort->grau.")", 	// add to 'morts'
+			"UPDATE $usersdb SET mort=1 WHERE id = ".(int)$_POST['mort'],	// kill person
+		];
+	}
 	foreach ($queries as $query) {
 		if ($query != "" and $result = query($query)) echo $query;
 		else die("Query failed: " . $query);
 	}
+	if ($_POST['msg'] == "INSTAKILL" && Credentials::isAllVsAllModeEnabled()) {
+		Security::go('/main.php?killsuccess=1');
+	}
 ?>