summaryrefslogtreecommitdiff
path: root/html/pages/admin/dmatch.php
diff options
context:
space:
mode:
Diffstat (limited to 'html/pages/admin/dmatch.php')
-rw-r--r--html/pages/admin/dmatch.php34
1 files changed, 17 insertions, 17 deletions
diff --git a/html/pages/admin/dmatch.php b/html/pages/admin/dmatch.php
index 3c7ebc5..4ad3bc1 100644
--- a/html/pages/admin/dmatch.php
+++ b/html/pages/admin/dmatch.php
@@ -27,9 +27,9 @@ echo'<br><table border="0" cellpadding="0" cellspacing="0" width="600">
<tr>
<td class="smheading" align="left" width="200">Adjusting Rankings</td>';
$sql_radjust = "SELECT pid, gid, rank FROM uts_player WHERE matchid = $matchid";
-$q_radjust = mysql_query($sql_radjust) or die(mysql_error());
+$q_radjust = mysqli_query($GLOBALS["___mysqli_link"], $sql_radjust) or die(mysqli_error($GLOBALS["___mysqli_link"]));
$pids = array();
-while ($r_radjust = mysql_fetch_array($q_radjust)) {
+while ($r_radjust = mysqli_fetch_array($q_radjust)) {
$pid = $r_radjust[pid];
$pids[] = $pid;
@@ -44,57 +44,57 @@ while ($r_radjust = mysql_fetch_array($q_radjust)) {
$oldrank = $sql_crank[rank];
$matchcount = $sql_crank[matches]-1;
- mysql_query("UPDATE uts_rank SET rank = $newrank, prevrank = $oldrank, matches = $matchcount WHERE id = $rid") or die(mysql_error());
- mysql_query("DELETE FROM uts_rank WHERE matches = 0") or die(mysql_error());
+ mysqli_query($GLOBALS["___mysqli_link"], "UPDATE uts_rank SET rank = $newrank, prevrank = $oldrank, matches = $matchcount WHERE id = $rid") or die(mysqli_error($GLOBALS["___mysqli_link"]));
+ mysqli_query($GLOBALS["___mysqli_link"], "DELETE FROM uts_rank WHERE matches = 0") or die(mysqli_error($GLOBALS["___mysqli_link"]));
}
echo'<td class="grey" align="left" width="700">Done</td>
</tr>
<tr>
<td class="smheading" align="left" width="200">Removing Match Record:</td>';
-mysql_query("DELETE FROM uts_match WHERE id = $matchid") or die(mysql_error());
+mysqli_query($GLOBALS["___mysqli_link"], "DELETE FROM uts_match WHERE id = $matchid") or die(mysqli_error($GLOBALS["___mysqli_link"]));
echo'<td class="grey" align="left" width="400">Done</td>
</tr>
<tr>
<td class="smheading" align="left" width="200">Removing Player Records:</td>';
-mysql_query("DELETE FROM uts_player WHERE matchid = $matchid") or die(mysql_error());
+mysqli_query($GLOBALS["___mysqli_link"], "DELETE FROM uts_player WHERE matchid = $matchid") or die(mysqli_error($GLOBALS["___mysqli_link"]));
echo'<td class="grey" align="left" width="400">Done</td>
</tr>
<tr>
<td class="smheading" align="left" width="200">Removing Kill Matrix Entries:</td>';
-mysql_query("DELETE FROM uts_killsmatrix WHERE matchid = $matchid") or die(mysql_error());
+mysqli_query($GLOBALS["___mysqli_link"], "DELETE FROM uts_killsmatrix WHERE matchid = $matchid") or die(mysqli_error($GLOBALS["___mysqli_link"]));
echo'<td class="grey" align="left" width="400">Done</td>
</tr>
<tr>
<td class="smheading" align="left" width="200">Removing Weapon Stats:</td>';
-mysql_query("DELETE FROM uts_weaponstats WHERE matchid = $matchid") or die(mysql_error());
+mysqli_query($GLOBALS["___mysqli_link"], "DELETE FROM uts_weaponstats WHERE matchid = $matchid") or die(mysqli_error($GLOBALS["___mysqli_link"]));
echo'<td class="grey" align="left" width="400">Done</td>
</tr>
<tr>
<td class="smheading" align="left" width="200">Amending Player Weapon Stats:</td>';
foreach($pids as $pid) {
- mysql_query("DELETE FROM uts_weaponstats WHERE matchid IN ('$matchid','0') AND pid = '$pid'") or die(mysql_error());
+ mysqli_query($GLOBALS["___mysqli_link"], "DELETE FROM uts_weaponstats WHERE matchid IN ('$matchid','0') AND pid = '$pid'") or die(mysqli_error($GLOBALS["___mysqli_link"]));
- $q_weaponstats = mysql_query("SELECT weapon, SUM(kills) AS kills, SUM(shots) AS shots, SUM(hits) as hits, SUM(damage) as damage, AVG(acc) AS acc FROM uts_weaponstats WHERE pid = '$pid' GROUP BY weapon") or die(mysql_error());
- while ($r_weaponstats = mysql_fetch_array($q_weaponstats)) {
- mysql_query("INSERT INTO uts_weaponstats SET matchid='0', pid='$pid', weapon='${r_weaponstats['weapon']}', kills='${r_weaponstats['kills']}', shots='${r_weaponstats['shots']}', hits='${r_weaponstats['hits']}', damage='${r_weaponstats['damage']}', acc='${r_weaponstats['acc']}'") or die(mysql_error());
+ $q_weaponstats = mysqli_query($GLOBALS["___mysqli_link"], "SELECT weapon, SUM(kills) AS kills, SUM(shots) AS shots, SUM(hits) as hits, SUM(damage) as damage, AVG(acc) AS acc FROM uts_weaponstats WHERE pid = '$pid' GROUP BY weapon") or die(mysqli_error($GLOBALS["___mysqli_link"]));
+ while ($r_weaponstats = mysqli_fetch_array($q_weaponstats)) {
+ mysqli_query($GLOBALS["___mysqli_link"], "INSERT INTO uts_weaponstats SET matchid='0', pid='$pid', weapon='${r_weaponstats['weapon']}', kills='${r_weaponstats['kills']}', shots='${r_weaponstats['shots']}', hits='${r_weaponstats['hits']}', damage='${r_weaponstats['damage']}', acc='${r_weaponstats['acc']}'") or die(mysqli_error($GLOBALS["___mysqli_link"]));
}
}
echo'<td class="grey" align="left" width="400">Done</td>
</tr>
<tr>
<td class="smheading" align="left" width="200">Amending Global Weapon Stats:</td>';
- mysql_query("DELETE FROM uts_weaponstats WHERE matchid='0' AND pid='0'") or die(mysql_error());
+ mysqli_query($GLOBALS["___mysqli_link"], "DELETE FROM uts_weaponstats WHERE matchid='0' AND pid='0'") or die(mysqli_error($GLOBALS["___mysqli_link"]));
- $q_weaponstats = mysql_query("SELECT weapon, SUM(kills) AS kills, SUM(shots) AS shots, SUM(hits) as hits, SUM(damage) as damage, AVG(acc) AS acc FROM uts_weaponstats WHERE matchid = '0' GROUP BY weapon") or die(mysql_error());
- while ($r_weaponstats = mysql_fetch_array($q_weaponstats)) {
- mysql_query("INSERT INTO uts_weaponstats SET matchid='0', pid='0', weapon='${r_weaponstats['weapon']}', kills='${r_weaponstats['kills']}', shots='${r_weaponstats['shots']}', hits='${r_weaponstats['hits']}', damage='${r_weaponstats['damage']}', acc='${r_weaponstats['acc']}'") or die(mysql_error());
+ $q_weaponstats = mysqli_query($GLOBALS["___mysqli_link"], "SELECT weapon, SUM(kills) AS kills, SUM(shots) AS shots, SUM(hits) as hits, SUM(damage) as damage, AVG(acc) AS acc FROM uts_weaponstats WHERE matchid = '0' GROUP BY weapon") or die(mysqli_error($GLOBALS["___mysqli_link"]));
+ while ($r_weaponstats = mysqli_fetch_array($q_weaponstats)) {
+ mysqli_query($GLOBALS["___mysqli_link"], "INSERT INTO uts_weaponstats SET matchid='0', pid='0', weapon='${r_weaponstats['weapon']}', kills='${r_weaponstats['kills']}', shots='${r_weaponstats['shots']}', hits='${r_weaponstats['hits']}', damage='${r_weaponstats['damage']}', acc='${r_weaponstats['acc']}'") or die(mysqli_error($GLOBALS["___mysqli_link"]));
}
echo'<td class="grey" align="left" width="400">Done</td>
</tr>
<tr>
<td class="smheading" align="left" width="200">Removing events:</td>';
-mysql_query("DELETE FROM uts_events WHERE matchid = $matchid") or die(mysql_error());
+mysqli_query($GLOBALS["___mysqli_link"], "DELETE FROM uts_events WHERE matchid = $matchid") or die(mysqli_error($GLOBALS["___mysqli_link"]));
echo'<td class="grey" align="left" width="400">Done</td>
</tr>
<tr>