Some replacements

+Replaced all $GLOBALS['link'] with $database->dblink
-Removed Templates/links.tpl from build.php (it's already in
Templates/menu.tpl)
This commit is contained in:
iopietro
2018-04-08 19:55:28 +02:00
parent 6ea4430372
commit 9e44c1cd6d
58 changed files with 382 additions and 380 deletions
+11 -11
View File
@@ -31,14 +31,14 @@
<tbody>
<?php
$count = mysqli_fetch_array(mysqli_query($GLOBALS['link'],"SELECT Count(*) as Total FROM " . TB_PREFIX . "artefacts"), MYSQLI_ASSOC);
$count = $count['Total'];
$count = mysqli_fetch_array(mysqli_query($database->dblink,"SELECT Count(*) as Total FROM " . TB_PREFIX . "artefacts"), MYSQLI_ASSOC);
$count = $count['Total'];
if($count == 0) {
echo '<td colspan="4" class="none">'.NO_ARTIFACTS.'</td>';
} else {
$artefact = mysqli_query($GLOBALS['link'],"SELECT type, id, name, effect, vref, owner FROM `" . TB_PREFIX . "artefacts` WHERE size = 1 AND type = 1");
$artefact = mysqli_query($database->dblink,"SELECT type, id, name, effect, vref, owner FROM `" . TB_PREFIX . "artefacts` WHERE size = 1 AND type = 1");
while($row = mysqli_fetch_array($artefact)) {
echo '<tr>';
echo '<td class="icon"><img class="artefact_icon_' . $row['type'] . '" src="img/x.gif" alt="" title=""></td>';
@@ -58,7 +58,7 @@
unset($artefact);
unset($row);
$artefact = mysqli_query($GLOBALS['link'],"SELECT type, id, name, effect, vref, owner FROM `" . TB_PREFIX . "artefacts` WHERE size = 1 AND type = 2");
$artefact = mysqli_query($database->dblink,"SELECT type, id, name, effect, vref, owner FROM `" . TB_PREFIX . "artefacts` WHERE size = 1 AND type = 2");
while($row = mysqli_fetch_array($artefact)) {
echo '<tr>';
echo '<td class="icon"><img class="artefact_icon_' . $row['type'] . '" src="img/x.gif" alt="" title=""></td>';
@@ -78,7 +78,7 @@
unset($artefact);
unset($row);
$artefact = mysqli_query($GLOBALS['link'],"SELECT type, id, name, effect, vref, owner FROM `" . TB_PREFIX . "artefacts` WHERE size = 1 AND type = 3");
$artefact = mysqli_query($database->dblink,"SELECT type, id, name, effect, vref, owner FROM `" . TB_PREFIX . "artefacts` WHERE size = 1 AND type = 3");
while($row = mysqli_fetch_array($artefact)) {
echo '<tr>';
echo '<td class="icon"><img class="artefact_icon_' . $row['type'] . '" src="img/x.gif" alt="" title=""></td>';
@@ -98,7 +98,7 @@
unset($artefact);
unset($row);
$artefact = mysqli_query($GLOBALS['link'],"SELECT type, id, name, effect, vref, owner FROM `" . TB_PREFIX . "artefacts` WHERE size = 1 AND type = 4");
$artefact = mysqli_query($database->dblink,"SELECT type, id, name, effect, vref, owner FROM `" . TB_PREFIX . "artefacts` WHERE size = 1 AND type = 4");
while($row = mysqli_fetch_array($artefact)) {
echo '<tr>';
echo '<td class="icon"><img class="artefact_icon_' . $row['type'] . '" src="img/x.gif" alt="" title=""></td>';
@@ -117,7 +117,7 @@
unset($artefact);
unset($row);
$artefact = mysqli_query($GLOBALS['link'],"SELECT type, id, name, effect, vref, owner FROM `" . TB_PREFIX . "artefacts` WHERE size = 1 AND type = 5");
$artefact = mysqli_query($database->dblink,"SELECT type, id, name, effect, vref, owner FROM `" . TB_PREFIX . "artefacts` WHERE size = 1 AND type = 5");
while($row = mysqli_fetch_array($artefact)) {
echo '<tr>';
echo '<td class="icon"><img class="artefact_icon_' . $row['type'] . '" src="img/x.gif" alt="" title=""></td>';
@@ -136,7 +136,7 @@
unset($artefact);
unset($row);
$artefact = mysqli_query($GLOBALS['link'],"SELECT type, id, name, effect, vref, owner FROM `" . TB_PREFIX . "artefacts` WHERE size = 1 AND type = 6");
$artefact = mysqli_query($database->dblink,"SELECT type, id, name, effect, vref, owner FROM `" . TB_PREFIX . "artefacts` WHERE size = 1 AND type = 6");
while($row = mysqli_fetch_array($artefact)) {
echo '<tr>';
echo '<td class="icon"><img class="artefact_icon_' . $row['type'] . '" src="img/x.gif" alt="" title=""></td>';
@@ -155,7 +155,7 @@
unset($artefact);
unset($row);
$artefact = mysqli_query($GLOBALS['link'],"SELECT type, id, name, effect, vref, owner FROM `" . TB_PREFIX . "artefacts` WHERE size = 1 AND type = 7");
$artefact = mysqli_query($database->dblink,"SELECT type, id, name, effect, vref, owner FROM `" . TB_PREFIX . "artefacts` WHERE size = 1 AND type = 7");
while($row = mysqli_fetch_array($artefact)) {
echo '<tr>';
echo '<td class="icon"><img class="artefact_icon_' . $row['type'] . '" src="img/x.gif" alt="" title=""></td>';
@@ -174,7 +174,7 @@
unset($artefact);
unset($row);
$artefact = mysqli_query($GLOBALS['link'],"SELECT type, id, name, effect, vref, owner FROM `" . TB_PREFIX . "artefacts` WHERE size = 2 AND type = 8");
$artefact = mysqli_query($database->dblink,"SELECT type, id, name, effect, vref, owner FROM `" . TB_PREFIX . "artefacts` WHERE size = 2 AND type = 8");
while($row = mysqli_fetch_array($artefact)) {
echo '<tr>';
echo '<td class="icon"><img class="artefact_icon_' . $row['type'] . '" src="img/x.gif" alt="" title=""></td>';
@@ -188,7 +188,7 @@
unset($artefact);
unset($row);
$artefact = mysqli_query($GLOBALS['link'],"SELECT type, id, name, effect, vref, owner FROM `" . TB_PREFIX . "artefacts` WHERE size = 1 AND type = 8");
$artefact = mysqli_query($database->dblink,"SELECT type, id, name, effect, vref, owner FROM `" . TB_PREFIX . "artefacts` WHERE size = 1 AND type = 8");
while($row = mysqli_fetch_array($artefact)) {
echo '<tr>';
echo '<td class="icon"><img class="artefact_icon_' . $row['type'] . '" src="img/x.gif" alt="" title=""></td>';