mirror of
https://github.com/Shadowss/TravianZ.git
synced 2026-07-14 00:26:07 +00:00
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:
@@ -84,7 +84,7 @@ $query2 = "SELECT
|
||||
where ".TB_PREFIX."wdata.id IN ($maparray)
|
||||
ORDER BY FIND_IN_SET(".TB_PREFIX."wdata.id,'$maparray2')";
|
||||
|
||||
$result2 = mysqli_query($GLOBALS['link'],$query2) or die(mysqli_error($database->dblink));
|
||||
$result2 = mysqli_query($database->dblink,$query2) or die(mysqli_error($database->dblink));
|
||||
|
||||
$i=0;
|
||||
//Load coor array
|
||||
|
||||
@@ -99,7 +99,7 @@ $query2 = "SELECT
|
||||
ORDER BY FIND_IN_SET(".TB_PREFIX."wdata.id,'$maparray2')";
|
||||
|
||||
//echo $query2;
|
||||
$result2 = mysqli_query($GLOBALS['link'],$query2) or die(mysqli_error($database->dblink));
|
||||
$result2 = mysqli_query($database->dblink,$query2) or die(mysqli_error($database->dblink));
|
||||
|
||||
$i=0;
|
||||
$i2=0;
|
||||
|
||||
@@ -80,7 +80,7 @@ if (isset($qact)){
|
||||
$_SESSION['qst']= 3;
|
||||
//Give Reward
|
||||
if(!$session->plus){
|
||||
mysqli_query($GLOBALS['link'],"UPDATE ".TB_PREFIX."users set plus = ('".mktime(date("H"),date("i"), date("s"),date("m") , date("d"), date("Y"))."')+86400 where `username`='".$user_sanitized."'") or die(mysqli_error($database->dblink));
|
||||
mysqli_query($database->dblink,"UPDATE ".TB_PREFIX."users set plus = ('".mktime(date("H"),date("i"), date("s"),date("m") , date("d"), date("Y"))."')+86400 where `username`='".$user_sanitized."'") or die(mysqli_error($database->dblink));
|
||||
} else {
|
||||
$plus=$database->getUserField($_SESSION['username'],'plus','username');
|
||||
$plus+=86400;
|
||||
@@ -161,7 +161,7 @@ if (isset($qact)){
|
||||
$_SESSION['qst']= 11;
|
||||
//Give Reward
|
||||
if(!$session->plus){
|
||||
mysqli_query($GLOBALS['link'],"UPDATE ".TB_PREFIX."users set plus = ('".mktime(date("H"),date("i"), date("s"),date("m") , date("d"), date("Y"))."')+172800 where `username`='".$user_sanitized."'") or die(mysqli_error());
|
||||
mysqli_query($database->dblink,"UPDATE ".TB_PREFIX."users set plus = ('".mktime(date("H"),date("i"), date("s"),date("m") , date("d"), date("Y"))."')+172800 where `username`='".$user_sanitized."'") or die(mysqli_error());
|
||||
} else {
|
||||
$plus=$database->getUserField($_SESSION['username'],'plus','username');
|
||||
$plus+=172800;
|
||||
@@ -348,7 +348,7 @@ if (isset($qact)){
|
||||
$_SESSION['qst_time'] = time()+$skipp_time;
|
||||
//Give Reward
|
||||
if(!$session->plus){
|
||||
mysqli_query($GLOBALS['link'],"UPDATE ".TB_PREFIX."users set plus = ('".mktime(date("H"),date("i"), date("s"),date("m") , date("d"), date("Y"))."')+86400 where `username`='".$user_sanitized."'") or die(mysqli_error());
|
||||
mysqli_query($database->dblink,"UPDATE ".TB_PREFIX."users set plus = ('".mktime(date("H"),date("i"), date("s"),date("m") , date("d"), date("Y"))."')+86400 where `username`='".$user_sanitized."'") or die(mysqli_error());
|
||||
} else {
|
||||
$plus=$database->getUserField($_SESSION['username'],'plus','username');
|
||||
$plus+=86400;
|
||||
@@ -411,7 +411,7 @@ if (isset($qact)){
|
||||
$_SESSION['qst']= 97;
|
||||
//Give Reward 20 gold + 2 days plus
|
||||
if(!$session->plus){
|
||||
mysqli_query($GLOBALS['link'],"UPDATE ".TB_PREFIX."users set plus = ('".mktime(date("H"),date("i"), date("s"),date("m") , date("d"), date("Y"))."')+172800 where `username`='".$user_sanitized."'") or die(mysqli_error());
|
||||
mysqli_query($database->dblink,"UPDATE ".TB_PREFIX."users set plus = ('".mktime(date("H"),date("i"), date("s"),date("m") , date("d"), date("Y"))."')+172800 where `username`='".$user_sanitized."'") or die(mysqli_error());
|
||||
} else {
|
||||
$plus=$database->getUserField($_SESSION['username'],'plus','username');
|
||||
$plus+=172800;
|
||||
|
||||
@@ -77,7 +77,7 @@ if (isset($qact)){
|
||||
$_SESSION['qst']= 3;
|
||||
//Give Reward
|
||||
if(!$session->plus){
|
||||
mysqli_query($GLOBALS['link'],"UPDATE ".TB_PREFIX."users set plus = ('".mktime(date("H"),date("i"), date("s"),date("m") , date("d"), date("Y"))."')+86400 where `username`='".$user_sanitized."'") or die(mysqli_error($database->dblink));
|
||||
mysqli_query($database->dblink,"UPDATE ".TB_PREFIX."users set plus = ('".mktime(date("H"),date("i"), date("s"),date("m") , date("d"), date("Y"))."')+86400 where `username`='".$user_sanitized."'") or die(mysqli_error($database->dblink));
|
||||
} else {
|
||||
$plus=$database->getUserField($_SESSION['username'],'plus','username');
|
||||
$plus+=86400;
|
||||
@@ -162,7 +162,7 @@ if (isset($qact)){
|
||||
$_SESSION['qst']= 11;
|
||||
//Give Reward
|
||||
if(!$session->plus){
|
||||
mysqli_query($GLOBALS['link'],"UPDATE ".TB_PREFIX."users set plus = ('".mktime(date("H"),date("i"), date("s"),date("m") , date("d"), date("Y"))."')+172800 where `username`='".$user_sanitized."'") or die(mysqli_error($database->dblink));
|
||||
mysqli_query($database->dblink,"UPDATE ".TB_PREFIX."users set plus = ('".mktime(date("H"),date("i"), date("s"),date("m") , date("d"), date("Y"))."')+172800 where `username`='".$user_sanitized."'") or die(mysqli_error($database->dblink));
|
||||
} else {
|
||||
$plus=$database->getUserField($_SESSION['username'],'plus','username');
|
||||
$plus+=172800;
|
||||
@@ -330,7 +330,7 @@ if (isset($qact)){
|
||||
$_SESSION['qst_time'] = time()+$skipp_time;
|
||||
//Give Reward
|
||||
if(!$session->plus){
|
||||
mysqli_query($GLOBALS['link'],"UPDATE ".TB_PREFIX."users set plus = ('".mktime(date("H"),date("i"), date("s"),date("m") , date("d"), date("Y"))."')+86400 where `username`='".$user_sanitized."'") or die(mysqli_error($database->dblink));
|
||||
mysqli_query($database->dblink,"UPDATE ".TB_PREFIX."users set plus = ('".mktime(date("H"),date("i"), date("s"),date("m") , date("d"), date("Y"))."')+86400 where `username`='".$user_sanitized."'") or die(mysqli_error($database->dblink));
|
||||
} else {
|
||||
$plus=$database->getUserField($_SESSION['username'],'plus',1);
|
||||
$plus+=86400;
|
||||
@@ -393,7 +393,7 @@ if (isset($qact)){
|
||||
$_SESSION['qst']= 97;
|
||||
//Give Reward 20 gold + 2 days plus
|
||||
if(!$session->plus){
|
||||
mysqli_query($GLOBALS['link'],"UPDATE ".TB_PREFIX."users set plus = ('".mktime(date("H"),date("i"), date("s"),date("m") , date("d"), date("Y"))."')+172800 where `username`='".$user_sanitized."'") or die(mysqli_error($database->dblink));
|
||||
mysqli_query($database->dblink,"UPDATE ".TB_PREFIX."users set plus = ('".mktime(date("H"),date("i"), date("s"),date("m") , date("d"), date("Y"))."')+172800 where `username`='".$user_sanitized."'") or die(mysqli_error($database->dblink));
|
||||
} else {
|
||||
$plus=$database->getUserField($_SESSION['username'],'plus',1);
|
||||
$plus+=172800;
|
||||
|
||||
@@ -9,13 +9,13 @@ if($session->access!=BANNED){
|
||||
$displayarray = $database->getUserArray($session->uid,1);
|
||||
$forumcat = $database->ForumCat(htmlspecialchars($displayarray['alliance']));
|
||||
$ally = $session->alliance;
|
||||
$public = mysqli_fetch_array(mysqli_query($GLOBALS['link'],"SELECT Count(*) as Total FROM ".TB_PREFIX."forum_cat WHERE alliance = $ally AND forum_area = 1"), MYSQLI_ASSOC);
|
||||
$public = mysqli_fetch_array(mysqli_query($database->dblink,"SELECT Count(*) as Total FROM ".TB_PREFIX."forum_cat WHERE alliance = $ally AND forum_area = 1"), MYSQLI_ASSOC);
|
||||
$public1 = $public['Total'];
|
||||
$cofederation = mysqli_fetch_array(mysqli_query($GLOBALS['link'],"SELECT Count(*) as Total FROM ".TB_PREFIX."forum_cat WHERE alliance = $ally AND forum_area = 2"), MYSQLI_ASSOC);
|
||||
$cofederation = mysqli_fetch_array(mysqli_query($database->dblink,"SELECT Count(*) as Total FROM ".TB_PREFIX."forum_cat WHERE alliance = $ally AND forum_area = 2"), MYSQLI_ASSOC);
|
||||
$cofederation1 = $cofederation['Total'];
|
||||
$alliance = mysqli_fetch_array(mysqli_query($GLOBALS['link'],"SELECT Count(*) as Total FROM ".TB_PREFIX."forum_cat WHERE alliance = $ally AND forum_area = 0"), MYSQLI_ASSOC);
|
||||
$alliance = mysqli_fetch_array(mysqli_query($database->dblink,"SELECT Count(*) as Total FROM ".TB_PREFIX."forum_cat WHERE alliance = $ally AND forum_area = 0"), MYSQLI_ASSOC);
|
||||
$alliance1 = $alliance['Total'];
|
||||
$closed = mysqli_fetch_array(mysqli_query($GLOBALS['link'],"SELECT Count(*) as Total FROM ".TB_PREFIX."forum_cat WHERE alliance = $ally AND forum_area = 3"), MYSQLI_ASSOC);
|
||||
$closed = mysqli_fetch_array(mysqli_query($database->dblink,"SELECT Count(*) as Total FROM ".TB_PREFIX."forum_cat WHERE alliance = $ally AND forum_area = 3"), MYSQLI_ASSOC);
|
||||
$closed1 = $closed['Total'];
|
||||
if($public1 != 0){
|
||||
?>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
$prefix = "".TB_PREFIX."ndata";
|
||||
$limit = "ntype!=0 AND ntype!=4 AND ntype!=5 AND ntype!=6 AND ntype!=7 AND ntype!=8 AND ntype!=9 AND ntype!=10 AND ntype!=11 AND ntype!=12 AND ntype!=13 AND ntype!=14 AND ntype!=15 AND ntype!=16 AND ntype!=17 AND ntype!=20 AND ntype!=21";
|
||||
$sql = mysqli_query($GLOBALS['link'],"SELECT * FROM $prefix WHERE ally = ".(int) $session->alliance." AND $limit ORDER BY time DESC LIMIT 20");
|
||||
$sql = mysqli_query($database->dblink,"SELECT * FROM $prefix WHERE ally = ".(int) $session->alliance." AND $limit ORDER BY time DESC LIMIT 20");
|
||||
$query = mysqli_num_rows($sql);
|
||||
$outputList = '';
|
||||
$name = 1;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
$prefix = "".TB_PREFIX."ndata";
|
||||
$limit = "ntype!=1 AND ntype!=2 AND ntype!=3 AND ntype!=8 AND ntype!=9 AND ntype!=10 AND ntype!=11 AND ntype!=12 AND ntype!=13 AND ntype!=14 AND ntype!=15 AND ntype!=16 AND ntype!=17 AND ntype!=18 AND ntype!=19";
|
||||
$sql = mysqli_query($GLOBALS['link'],"SELECT * FROM $prefix WHERE ally = ".(int) $session->alliance." AND $limit ORDER BY time DESC LIMIT 20");
|
||||
$sql = mysqli_query($database->dblink,"SELECT * FROM $prefix WHERE ally = ".(int) $session->alliance." AND $limit ORDER BY time DESC LIMIT 20");
|
||||
$query = mysqli_num_rows($sql);
|
||||
$outputList = '';
|
||||
$name = 1;
|
||||
|
||||
@@ -28,7 +28,7 @@ include("alli_menu.tpl");
|
||||
}else{
|
||||
$prefix = "".TB_PREFIX."ndata";
|
||||
$limit = "ntype!=8 AND ntype!=9 AND ntype!=10 AND ntype!=11 AND ntype!=12 AND ntype!=13 AND ntype!=14 AND ntype!=15 AND ntype!=16 AND ntype!=17";
|
||||
$sql = mysqli_query($GLOBALS['link'],"SELECT * FROM $prefix WHERE ally = ".(int) $session->alliance." AND $limit ORDER BY time DESC LIMIT 20");
|
||||
$sql = mysqli_query($database->dblink,"SELECT * FROM $prefix WHERE ally = ".(int) $session->alliance." AND $limit ORDER BY time DESC LIMIT 20");
|
||||
$query = mysqli_num_rows($sql);
|
||||
$outputList = '';
|
||||
$name = 1;
|
||||
|
||||
+10
-10
@@ -5,33 +5,33 @@ if(time() - (!empty($_SESSION['time_p']) ? $_SESSION['time_p'] : 0) > 5) {
|
||||
}
|
||||
|
||||
if($_POST AND $_GET['action'] == 'change_capital') {
|
||||
$pass = mysqli_escape_string($GLOBALS['link'],$_POST['pass']);
|
||||
$query = mysqli_query($GLOBALS['link'],'SELECT password FROM `' . TB_PREFIX . 'users` WHERE `id` = ' . (int) $session->uid);
|
||||
$pass = mysqli_escape_string($database->dblink,$_POST['pass']);
|
||||
$query = mysqli_query($database->dblink,'SELECT password FROM `' . TB_PREFIX . 'users` WHERE `id` = ' . (int) $session->uid);
|
||||
$data = mysqli_fetch_assoc($query);
|
||||
if(password_verify($pass, $data['password'])) {
|
||||
$query1 = mysqli_query($GLOBALS['link'],'SELECT wref FROM `' . TB_PREFIX . 'vdata` WHERE `owner` = ' .(int) $session->uid . ' AND `capital` = 1');
|
||||
$query1 = mysqli_query($database->dblink,'SELECT wref FROM `' . TB_PREFIX . 'vdata` WHERE `owner` = ' .(int) $session->uid . ' AND `capital` = 1');
|
||||
$data1 = mysqli_fetch_assoc($query1);
|
||||
$query2 = mysqli_query($GLOBALS['link'],'SELECT * FROM `' . TB_PREFIX . 'fdata` WHERE `vref` = ' . (int) $data1['wref']);
|
||||
$query2 = mysqli_query($database->dblink,'SELECT * FROM `' . TB_PREFIX . 'fdata` WHERE `vref` = ' . (int) $data1['wref']);
|
||||
$data2 = mysqli_fetch_assoc($query2);
|
||||
if($data2['vref'] != $village->wid) {
|
||||
for($i = 1; $i<=18; ++$i) {
|
||||
if($data2['f' . $i] > 10) {
|
||||
$query2 = mysqli_query($GLOBALS['link'],'UPDATE `' . TB_PREFIX . 'fdata` SET `f' . $i . '` = 10 WHERE `vref` = ' . (int) $data2['vref']) or die(mysqli_error($database->dblink));
|
||||
$query2 = mysqli_query($database->dblink,'UPDATE `' . TB_PREFIX . 'fdata` SET `f' . $i . '` = 10 WHERE `vref` = ' . (int) $data2['vref']) or die(mysqli_error($database->dblink));
|
||||
}
|
||||
}
|
||||
for($i=19; $i<=40; ++$i) {
|
||||
if($data2['f' . $i . 't'] == 34) {
|
||||
$query3 = mysqli_query($GLOBALS['link'],'UPDATE `' . TB_PREFIX . 'fdata` SET `f' . $i . 't` = 0, `f' . $i . '` = 0 WHERE `vref` = ' . (int) $data2['vref']) or die(mysqli_error($database->dblink));
|
||||
$query3 = mysqli_query($database->dblink,'UPDATE `' . TB_PREFIX . 'fdata` SET `f' . $i . 't` = 0, `f' . $i . '` = 0 WHERE `vref` = ' . (int) $data2['vref']) or die(mysqli_error($database->dblink));
|
||||
}
|
||||
}
|
||||
|
||||
for($i=19; $i<=40; ++$i) {
|
||||
if($data2['f' . $i . 't'] == 29 or $data2['f' . $i . 't'] == 30 or $data2['f' . $i . 't'] == 38 or $data2['f' . $i . 't'] == 39 or $data2['f' . $i . 't'] == 42) {
|
||||
$query3 = mysqli_query($GLOBALS['link'],'UPDATE `' . TB_PREFIX . 'fdata` SET `f' . $i . 't` = 0, `f' . $i . '` = 0 WHERE `vref` = ' . (int) $village->wid) or die(mysqli_error($database->dblink));
|
||||
$query3 = mysqli_query($database->dblink,'UPDATE `' . TB_PREFIX . 'fdata` SET `f' . $i . 't` = 0, `f' . $i . '` = 0 WHERE `vref` = ' . (int) $village->wid) or die(mysqli_error($database->dblink));
|
||||
}
|
||||
}
|
||||
$query3 = mysqli_query($GLOBALS['link'],'UPDATE `' . TB_PREFIX . 'vdata` SET `capital` = 0 WHERE `wref` = ' . (int) $data1['wref']);
|
||||
$query4 = mysqli_query($GLOBALS['link'],'UPDATE `' . TB_PREFIX . 'vdata` SET `capital` = 1 WHERE `wref` = ' . (int) $village->wid);
|
||||
$query3 = mysqli_query($database->dblink,'UPDATE `' . TB_PREFIX . 'vdata` SET `capital` = 0 WHERE `wref` = ' . (int) $data1['wref']);
|
||||
$query4 = mysqli_query($database->dblink,'UPDATE `' . TB_PREFIX . 'vdata` SET `capital` = 1 WHERE `wref` = ' . (int) $village->wid);
|
||||
}
|
||||
} else {
|
||||
$error = '<br /><font color="red">'.LOGIN_PW_ERROR.'</font><br />';
|
||||
@@ -67,7 +67,7 @@ else{
|
||||
?>
|
||||
|
||||
<?php
|
||||
$query = mysqli_query($GLOBALS['link'],'SELECT wref FROM `' . TB_PREFIX . 'vdata` WHERE `owner` = ' . (int) $session->uid . ' AND `capital` = 1');
|
||||
$query = mysqli_query($database->dblink,'SELECT wref FROM `' . TB_PREFIX . 'vdata` WHERE `owner` = ' . (int) $session->uid . ' AND `capital` = 1');
|
||||
$data = mysqli_fetch_assoc($query);
|
||||
if($data['wref'] == $village->wid) {
|
||||
?>
|
||||
|
||||
+12
-12
@@ -14,8 +14,8 @@ function getDistance($coorx1, $coory1, $coorx2, $coory2) {
|
||||
return round($dist, 1);
|
||||
}
|
||||
?>
|
||||
<div class="gid27">
|
||||
<body>
|
||||
<div class="gid27">
|
||||
<table id="own" cellpadding="1" cellspacing="1">
|
||||
<thead>
|
||||
<tr>
|
||||
@@ -83,7 +83,7 @@ Treasury <b>' . $reqlvl . '</b>, Effect <b>' . $effect . '</b>
|
||||
|
||||
<tbody>
|
||||
<?php
|
||||
$count = mysqli_fetch_array(mysqli_query($GLOBALS['link'],"SELECT Count(*) as Total FROM " . TB_PREFIX . "artefacts"), MYSQLI_ASSOC);
|
||||
$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_AREA.'</td>';
|
||||
@@ -103,18 +103,18 @@ if($count == 0) {
|
||||
|
||||
unset($reqlvl);
|
||||
unset($effect);
|
||||
$arts = mysqli_query($GLOBALS['link'],"SELECT type, vref, id, name, size, owner, effect FROM " . TB_PREFIX . "artefacts");
|
||||
$arts = mysqli_query($database->dblink,"SELECT type, vref, id, name, size, owner, effect FROM " . TB_PREFIX . "artefacts");
|
||||
$rows = array();
|
||||
while($row = mysqli_fetch_array($arts)) {
|
||||
$query = mysqli_query($GLOBALS['link'],'SELECT x, y FROM `' . TB_PREFIX . 'wdata` WHERE `id` = ' . (int) $row['vref']);
|
||||
$coor2 = mysqli_fetch_assoc($query);
|
||||
|
||||
|
||||
$dist = round(getDistance($coor['x'], $coor['y'], $coor2['x'], $coor2['y']),1);
|
||||
|
||||
$rows[$dist] = $row;
|
||||
|
||||
}
|
||||
$query = mysqli_query($database->dblink,'SELECT x, y FROM `' . TB_PREFIX . 'wdata` WHERE `id` = ' . (int) $row['vref']);
|
||||
$coor2 = mysqli_fetch_assoc($query);
|
||||
|
||||
|
||||
$dist = round(getDistance($coor['x'], $coor['y'], $coor2['x'], $coor2['y']),1);
|
||||
|
||||
$rows[$dist] = $row;
|
||||
|
||||
}
|
||||
ksort($rows);
|
||||
foreach($rows as $row) {
|
||||
$wref = $village->wid;
|
||||
|
||||
+11
-11
@@ -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>';
|
||||
|
||||
+17
-17
@@ -31,13 +31,13 @@
|
||||
<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 = 2 AND type = 1");
|
||||
$artefact = mysqli_query($database->dblink,"SELECT type, id, name, effect, vref, owner FROM `" . TB_PREFIX . "artefacts` WHERE size = 2 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>';
|
||||
@@ -51,7 +51,7 @@
|
||||
|
||||
unset($artefact);
|
||||
unset($row);
|
||||
$artefact = mysqli_query($GLOBALS['link'],"SELECT type, id, name, effect, vref, owner FROM `" . TB_PREFIX . "artefacts` WHERE size = 3 AND type = 1");
|
||||
$artefact = mysqli_query($database->dblink,"SELECT type, id, name, effect, vref, owner FROM `" . TB_PREFIX . "artefacts` WHERE size = 3 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>';
|
||||
@@ -71,7 +71,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 = 2");
|
||||
$artefact = mysqli_query($database->dblink,"SELECT type, id, name, effect, vref, owner FROM `" . TB_PREFIX . "artefacts` WHERE size = 2 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>';
|
||||
@@ -85,7 +85,7 @@
|
||||
|
||||
unset($artefact);
|
||||
unset($row);
|
||||
$artefact = mysqli_query($GLOBALS['link'],"SELECT type, id, name, effect, vref, owner FROM `" . TB_PREFIX . "artefacts` WHERE size = 3 AND type = 2");
|
||||
$artefact = mysqli_query($database->dblink,"SELECT type, id, name, effect, vref, owner FROM `" . TB_PREFIX . "artefacts` WHERE size = 3 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>';
|
||||
@@ -105,7 +105,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 = 3");
|
||||
$artefact = mysqli_query($database->dblink,"SELECT type, id, name, effect, vref, owner FROM `" . TB_PREFIX . "artefacts` WHERE size = 2 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>';
|
||||
@@ -119,7 +119,7 @@
|
||||
|
||||
unset($artefact);
|
||||
unset($row);
|
||||
$artefact = mysqli_query($GLOBALS['link'],"SELECT type, id, name, effect, vref, owner FROM `" . TB_PREFIX . "artefacts` WHERE size = 3 AND type = 3");
|
||||
$artefact = mysqli_query($database->dblink,"SELECT type, id, name, effect, vref, owner FROM `" . TB_PREFIX . "artefacts` WHERE size = 3 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>';
|
||||
@@ -139,7 +139,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 = 4");
|
||||
$artefact = mysqli_query($database->dblink,"SELECT type, id, name, effect, vref, owner FROM `" . TB_PREFIX . "artefacts` WHERE size = 2 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>';
|
||||
@@ -153,7 +153,7 @@
|
||||
|
||||
unset($artefact);
|
||||
unset($row);
|
||||
$artefact = mysqli_query($GLOBALS['link'],"SELECT type, id, name, effect, vref, owner FROM `" . TB_PREFIX . "artefacts` WHERE size = 3 AND type = 4");
|
||||
$artefact = mysqli_query($database->dblink,"SELECT type, id, name, effect, vref, owner FROM `" . TB_PREFIX . "artefacts` WHERE size = 3 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>';
|
||||
@@ -172,7 +172,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 = 5");
|
||||
$artefact = mysqli_query($database->dblink,"SELECT type, id, name, effect, vref, owner FROM `" . TB_PREFIX . "artefacts` WHERE size = 2 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>';
|
||||
@@ -186,7 +186,7 @@
|
||||
|
||||
unset($artefact);
|
||||
unset($row);
|
||||
$artefact = mysqli_query($GLOBALS['link'],"SELECT type, id, name, effect, vref, owner FROM `" . TB_PREFIX . "artefacts` WHERE size = 3 AND type = 5");
|
||||
$artefact = mysqli_query($database->dblink,"SELECT type, id, name, effect, vref, owner FROM `" . TB_PREFIX . "artefacts` WHERE size = 3 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>';
|
||||
@@ -205,7 +205,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 = 6");
|
||||
$artefact = mysqli_query($database->dblink,"SELECT type, id, name, effect, vref, owner FROM `" . TB_PREFIX . "artefacts` WHERE size = 2 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>';
|
||||
@@ -219,7 +219,7 @@
|
||||
|
||||
unset($artefact);
|
||||
unset($row);
|
||||
$artefact = mysqli_query($GLOBALS['link'],"SELECT type, id, name, effect, vref, owner FROM `" . TB_PREFIX . "artefacts` WHERE size = 3 AND type = 6");
|
||||
$artefact = mysqli_query($database->dblink,"SELECT type, id, name, effect, vref, owner FROM `" . TB_PREFIX . "artefacts` WHERE size = 3 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>';
|
||||
@@ -238,7 +238,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 = 7");
|
||||
$artefact = mysqli_query($database->dblink,"SELECT type, id, name, effect, vref, owner FROM `" . TB_PREFIX . "artefacts` WHERE size = 2 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>';
|
||||
@@ -252,7 +252,7 @@
|
||||
|
||||
unset($artefact);
|
||||
unset($row);
|
||||
$artefact = mysqli_query($GLOBALS['link'],"SELECT type, id, name, effect, vref, owner FROM `" . TB_PREFIX . "artefacts` WHERE size = 3 AND type = 7");
|
||||
$artefact = mysqli_query($database->dblink,"SELECT type, id, name, effect, vref, owner FROM `" . TB_PREFIX . "artefacts` WHERE size = 3 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>';
|
||||
@@ -271,7 +271,7 @@
|
||||
|
||||
unset($artefact);
|
||||
unset($row);
|
||||
$artefact = mysqli_query($GLOBALS['link'],"SELECT type, id, name, effect, vref, owner FROM `" . TB_PREFIX . "artefacts` WHERE size = 3 AND type = 8");
|
||||
$artefact = mysqli_query($database->dblink,"SELECT type, id, name, effect, vref, owner FROM `" . TB_PREFIX . "artefacts` WHERE size = 3 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>';
|
||||
|
||||
+17
-17
@@ -14,7 +14,7 @@ global $database;
|
||||
|
||||
if (isset($_POST['name']) && !empty($_POST['name'])) {
|
||||
$_POST['name'] = $database->escape(stripslashes($_POST['name']));
|
||||
mysqli_query($GLOBALS['link'],"UPDATE ".TB_PREFIX."hero SET `name`='".$_POST['name']."' where `uid`='".$database->escape($session->uid)."' AND dead = 0") or die("ERROR:".mysqli_error($database->dblink));
|
||||
mysqli_query($database->dblink,"UPDATE ".TB_PREFIX."hero SET `name`='".$_POST['name']."' where `uid`='".$database->escape($session->uid)."' AND dead = 0") or die("ERROR:".mysqli_error($database->dblink));
|
||||
$hero_info['name'] = $_POST['name'];
|
||||
echo "".NAME_CHANGED."";
|
||||
}
|
||||
@@ -172,12 +172,12 @@ if (isset($_POST['name']) && !empty($_POST['name'])) {
|
||||
if($_GET['add'] == "reset") {
|
||||
if($hero_info['level'] <= 3){
|
||||
if($hero_info['attack'] != 0 OR $hero_info['defence'] != 0 OR $hero_info['attackbonus'] != 0 OR $hero_info['defencebonus'] != 0 OR $hero_info['regeneration'] != 0){
|
||||
mysqli_query($GLOBALS['link'],"UPDATE " . TB_PREFIX . "hero SET `points` = '".(($hero_info['level']*5)+5)."' WHERE `heroid` = " . $hero_info['heroid']);
|
||||
mysqli_query($GLOBALS['link'],"UPDATE " . TB_PREFIX . "hero SET `attack` = '0' WHERE `heroid` = " . $hero_info['heroid']);
|
||||
mysqli_query($GLOBALS['link'],"UPDATE " . TB_PREFIX . "hero SET `defence` = '0' WHERE `heroid` = " . $hero_info['heroid']);
|
||||
mysqli_query($GLOBALS['link'],"UPDATE " . TB_PREFIX . "hero SET `attackbonus` = '0' WHERE `heroid` = " . $hero_info['heroid']);
|
||||
mysqli_query($GLOBALS['link'],"UPDATE " . TB_PREFIX . "hero SET `defencebonus` = '0' WHERE `heroid` = " . $hero_info['heroid']);
|
||||
mysqli_query($GLOBALS['link'],"UPDATE " . TB_PREFIX . "hero SET `regeneration` = '0' WHERE `heroid` = " . $hero_info['heroid']);
|
||||
mysqli_query($database->dblink,"UPDATE " . TB_PREFIX . "hero SET `points` = '".(($hero_info['level']*5)+5)."' WHERE `heroid` = " . $hero_info['heroid']);
|
||||
mysqli_query($database->dblink,"UPDATE " . TB_PREFIX . "hero SET `attack` = '0' WHERE `heroid` = " . $hero_info['heroid']);
|
||||
mysqli_query($database->dblink,"UPDATE " . TB_PREFIX . "hero SET `defence` = '0' WHERE `heroid` = " . $hero_info['heroid']);
|
||||
mysqli_query($database->dblink,"UPDATE " . TB_PREFIX . "hero SET `attackbonus` = '0' WHERE `heroid` = " . $hero_info['heroid']);
|
||||
mysqli_query($database->dblink,"UPDATE " . TB_PREFIX . "hero SET `defencebonus` = '0' WHERE `heroid` = " . $hero_info['heroid']);
|
||||
mysqli_query($database->dblink,"UPDATE " . TB_PREFIX . "hero SET `regeneration` = '0' WHERE `heroid` = " . $hero_info['heroid']);
|
||||
header("Location: build.php?id=".$id."");
|
||||
exit;
|
||||
}
|
||||
@@ -185,40 +185,40 @@ if (isset($_POST['name']) && !empty($_POST['name'])) {
|
||||
}
|
||||
if($_GET['add'] == "off" && $hero_info['attack'] < 100) {
|
||||
if($hero_info['points'] > 0) {
|
||||
mysqli_query($GLOBALS['link'],"UPDATE " . TB_PREFIX . "hero SET `attack` = `attack` + 1 WHERE `heroid` = " . $hero_info['heroid']);
|
||||
mysqli_query($GLOBALS['link'],"UPDATE " . TB_PREFIX . "hero SET `points` = `points` - 1 WHERE `heroid` = " . $hero_info['heroid']);
|
||||
mysqli_query($database->dblink,"UPDATE " . TB_PREFIX . "hero SET `attack` = `attack` + 1 WHERE `heroid` = " . $hero_info['heroid']);
|
||||
mysqli_query($database->dblink,"UPDATE " . TB_PREFIX . "hero SET `points` = `points` - 1 WHERE `heroid` = " . $hero_info['heroid']);
|
||||
header("Location: build.php?id=".$id."");
|
||||
exit;
|
||||
}
|
||||
}
|
||||
if($_GET['add'] == "deff" && $hero_info['defence'] < 100) {
|
||||
if($hero_info['points'] > 0) {
|
||||
mysqli_query($GLOBALS['link'],"UPDATE " . TB_PREFIX . "hero SET `defence` = `defence` + 1 WHERE `heroid` = " . $hero_info['heroid']);
|
||||
mysqli_query($GLOBALS['link'],"UPDATE " . TB_PREFIX . "hero SET `points` = `points` - 1 WHERE `heroid` = " . $hero_info['heroid']);
|
||||
mysqli_query($database->dblink,"UPDATE " . TB_PREFIX . "hero SET `defence` = `defence` + 1 WHERE `heroid` = " . $hero_info['heroid']);
|
||||
mysqli_query($database->dblink,"UPDATE " . TB_PREFIX . "hero SET `points` = `points` - 1 WHERE `heroid` = " . $hero_info['heroid']);
|
||||
header("Location: build.php?id=".$id."");
|
||||
exit;
|
||||
}
|
||||
}
|
||||
if($_GET['add'] == "obonus" && $hero_info['attackbonus'] < 100) {
|
||||
if($hero_info['points'] > 0) {
|
||||
mysqli_query($GLOBALS['link'],"UPDATE " . TB_PREFIX . "hero SET `attackbonus` = `attackbonus` + 1 WHERE `heroid` = " . $hero_info['heroid']);
|
||||
mysqli_query($GLOBALS['link'],"UPDATE " . TB_PREFIX . "hero SET `points` = `points` - 1 WHERE `heroid` = " . $hero_info['heroid']);
|
||||
mysqli_query($database->dblink,"UPDATE " . TB_PREFIX . "hero SET `attackbonus` = `attackbonus` + 1 WHERE `heroid` = " . $hero_info['heroid']);
|
||||
mysqli_query($database->dblink,"UPDATE " . TB_PREFIX . "hero SET `points` = `points` - 1 WHERE `heroid` = " . $hero_info['heroid']);
|
||||
header("Location: build.php?id=".$id."");
|
||||
exit;
|
||||
}
|
||||
}
|
||||
if($_GET['add'] == "dbonus" && $hero_info['defencebonus'] < 100) {
|
||||
if($hero_info['points'] > 0) {
|
||||
mysqli_query($GLOBALS['link'],"UPDATE " . TB_PREFIX . "hero SET `defencebonus` = `defencebonus` + 1 WHERE `heroid` = " . $hero_info['heroid']);
|
||||
mysqli_query($GLOBALS['link'],"UPDATE " . TB_PREFIX . "hero SET `points` = `points` - 1 WHERE `heroid` = " . $hero_info['heroid']);
|
||||
mysqli_query($database->dblink,"UPDATE " . TB_PREFIX . "hero SET `defencebonus` = `defencebonus` + 1 WHERE `heroid` = " . $hero_info['heroid']);
|
||||
mysqli_query($database->dblink,"UPDATE " . TB_PREFIX . "hero SET `points` = `points` - 1 WHERE `heroid` = " . $hero_info['heroid']);
|
||||
header("Location: build.php?id=".$id."");
|
||||
exit;
|
||||
}
|
||||
}
|
||||
if($_GET['add'] == "reg" && $hero_info['regeneration'] < 100) {
|
||||
if($hero_info['points'] > 0) {
|
||||
mysqli_query($GLOBALS['link'],"UPDATE " . TB_PREFIX . "hero SET `regeneration` = `regeneration` + 1 WHERE `heroid` = " . $hero_info['heroid']);
|
||||
mysqli_query($GLOBALS['link'],"UPDATE " . TB_PREFIX . "hero SET `points` = `points` - 1 WHERE `heroid` = " . $hero_info['heroid']);
|
||||
mysqli_query($database->dblink,"UPDATE " . TB_PREFIX . "hero SET `regeneration` = `regeneration` + 1 WHERE `heroid` = " . $hero_info['heroid']);
|
||||
mysqli_query($database->dblink,"UPDATE " . TB_PREFIX . "hero SET `points` = `points` - 1 WHERE `heroid` = " . $hero_info['heroid']);
|
||||
header("Location: build.php?id=".$id."");
|
||||
exit;
|
||||
}
|
||||
|
||||
@@ -197,8 +197,8 @@
|
||||
|
||||
if(isset($_GET['revive']) && $_GET['revive'] == 1 && isset($_GET['hid']) && $_GET['hid'] == $hero_datarow['heroid'] && $hero_datarow['inrevive'] == 0 && $hero_datarow['intraining'] == 0 && $hero_datarow['dead'] == 1){
|
||||
if($session->access != BANNED){
|
||||
mysqli_query($GLOBALS['link'],"UPDATE ".TB_PREFIX."hero SET `inrevive` = '1', `trainingtime` = '".(int) $training_time2."', `wref` = '".(int) $village->wid."' WHERE `heroid` = ".(int) $_GET['hid']." AND `uid` = '".(int) $session->uid."'");
|
||||
mysqli_query($GLOBALS['link'],"
|
||||
mysqli_query($database->dblink,"UPDATE ".TB_PREFIX."hero SET `inrevive` = '1', `trainingtime` = '".(int) $training_time2."', `wref` = '".(int) $village->wid."' WHERE `heroid` = ".(int) $_GET['hid']." AND `uid` = '".(int) $session->uid."'");
|
||||
mysqli_query($database->dblink,"
|
||||
UPDATE " . TB_PREFIX . "vdata
|
||||
SET
|
||||
`wood` = `wood` - ".(int) $wood.",
|
||||
|
||||
@@ -34,10 +34,10 @@
|
||||
|
||||
//check if there is unit needed in the village
|
||||
|
||||
$result = mysqli_query($GLOBALS['link'],"SELECT * FROM ".TB_PREFIX."units WHERE `vref` = ".(int) $village->wid."");
|
||||
$result = mysqli_query($database->dblink,"SELECT * FROM ".TB_PREFIX."units WHERE `vref` = ".(int) $village->wid."");
|
||||
$units_array = mysqli_fetch_array($result);
|
||||
|
||||
$count_hero = mysqli_fetch_array(mysqli_query($GLOBALS['link'],"SELECT Count(*) as Total FROM " . TB_PREFIX . "hero WHERE `uid` = " . $database->escape($session->uid) . ""), MYSQLI_ASSOC);
|
||||
$count_hero = mysqli_fetch_array(mysqli_query($database->dblink,"SELECT Count(*) as Total FROM " . TB_PREFIX . "hero WHERE `uid` = " . $database->escape($session->uid) . ""), MYSQLI_ASSOC);
|
||||
$count_hero = $count_hero['Total'];
|
||||
|
||||
if ($count_hero < 3) {
|
||||
@@ -667,9 +667,9 @@ $output.="<tr>
|
||||
if($session->access != BANNED){
|
||||
if($count_hero < 3){
|
||||
$unitID = $_GET['train'];
|
||||
mysqli_query($GLOBALS['link'],"INSERT INTO ".TB_PREFIX."hero (`uid`, `wref`, `regeneration`, `unit`, `name`, `level`, `points`, `experience`, `dead`, `health`, `attack`, `defence`, `attackbonus`, `defencebonus`, `trainingtime`, `autoregen`, `intraining`) VALUES (".$database->escape($session->uid).", " . (int) $village->wid . ", 0, ".$unitID.", '".$database->escape($session->username)."', 0, 5, 0, 0, 100, 0, 0, 0, 0, ".round((time() + (${'u'.$unitID}['time'] / SPEED)*3)).", 50, 1)");
|
||||
mysqli_query($GLOBALS['link'],"UPDATE " . TB_PREFIX . "units SET `u$unitID` = `u$unitID` - 1 WHERE `vref` = " . (int) $village->wid);
|
||||
mysqli_query($GLOBALS['link'],"
|
||||
mysqli_query($database->dblink,"INSERT INTO ".TB_PREFIX."hero (`uid`, `wref`, `regeneration`, `unit`, `name`, `level`, `points`, `experience`, `dead`, `health`, `attack`, `defence`, `attackbonus`, `defencebonus`, `trainingtime`, `autoregen`, `intraining`) VALUES (".$database->escape($session->uid).", " . (int) $village->wid . ", 0, ".$unitID.", '".$database->escape($session->username)."', 0, 5, 0, 0, 100, 0, 0, 0, 0, ".round((time() + (${'u'.$unitID}['time'] / SPEED)*3)).", 50, 1)");
|
||||
mysqli_query($database->dblink,"UPDATE " . TB_PREFIX . "units SET `u$unitID` = `u$unitID` - 1 WHERE `vref` = " . (int) $village->wid);
|
||||
mysqli_query($database->dblink,"
|
||||
UPDATE " . TB_PREFIX . "vdata
|
||||
SET
|
||||
`wood` = `wood` - ".(int) ${'u'.$unitID}['wood'].",
|
||||
|
||||
@@ -119,7 +119,7 @@ $query2 = "SELECT
|
||||
|
||||
//$query2;
|
||||
|
||||
$result2 = mysqli_query($GLOBALS['link'],$query2) or die(mysqli_error($database->dblink));
|
||||
$result2 = mysqli_query($database->dblink,$query2) or die(mysqli_error($database->dblink));
|
||||
|
||||
$targetalliance = array();
|
||||
$neutralarray = array();
|
||||
|
||||
@@ -130,7 +130,7 @@ $query2 = "SELECT
|
||||
ORDER BY FIND_IN_SET(".TB_PREFIX."wdata.id,'$maparray2')";
|
||||
|
||||
//echo $query2;
|
||||
$result2 = mysqli_query($GLOBALS['link'],$query2) or die(mysqli_error($database->dblink));
|
||||
$result2 = mysqli_query($database->dblink,$query2) or die(mysqli_error($database->dblink));
|
||||
|
||||
$targetalliance = array();
|
||||
$neutralarray = array();
|
||||
|
||||
+10
-10
@@ -2,7 +2,7 @@
|
||||
<?php
|
||||
$basearray = $database->getMInfo($_GET['d']);
|
||||
$uinfo = $database->getVillage($basearray['id']);
|
||||
$oasis1 = mysqli_query($GLOBALS['link'],'SELECT conqured, owner FROM `' . TB_PREFIX . 'odata` WHERE `wref` = ' . mysqli_real_escape_string($GLOBALS['link'],$_GET['d']));
|
||||
$oasis1 = mysqli_query($database->dblink,'SELECT conqured, owner FROM `' . TB_PREFIX . 'odata` WHERE `wref` = ' . mysqli_real_escape_string($database->dblink,$_GET['d']));
|
||||
$oasis = mysqli_fetch_assoc($oasis1);
|
||||
$access=$session->access;
|
||||
$oasislink = '';
|
||||
@@ -167,7 +167,7 @@ if($session->uid == $database->getVillage($_GET['d'])){
|
||||
}
|
||||
$toWref = $_GET['d'];
|
||||
if($session->alliance!=0){
|
||||
$result = mysqli_query($GLOBALS['link'],"SELECT data, ntype, id, topic, time FROM ".TB_PREFIX."ndata WHERE $limit AND ally = ".$session->alliance." AND toWref = ".$toWref." ORDER BY time DESC Limit 5");
|
||||
$result = mysqli_query($database->dblink,"SELECT data, ntype, id, topic, time FROM ".TB_PREFIX."ndata WHERE $limit AND ally = ".$session->alliance." AND toWref = ".$toWref." ORDER BY time DESC Limit 5");
|
||||
$query = mysqli_num_rows($result);
|
||||
if($query != 0){
|
||||
while($row = mysqli_fetch_array($result)){
|
||||
@@ -191,7 +191,7 @@ if($type==18 or $type==19 or $type==20 or $type==21){
|
||||
|
||||
<?php }
|
||||
}else{
|
||||
$result = mysqli_query($GLOBALS['link'],"SELECT data, ntype, id, topic, time FROM ".TB_PREFIX."ndata WHERE uid = ".$session->uid." AND toWref = ".$toWref." ORDER BY time DESC Limit 5");
|
||||
$result = mysqli_query($database->dblink,"SELECT data, ntype, id, topic, time FROM ".TB_PREFIX."ndata WHERE uid = ".$session->uid." AND toWref = ".$toWref." ORDER BY time DESC Limit 5");
|
||||
$query = mysqli_num_rows($result);
|
||||
if($query != 0){
|
||||
while($row = mysqli_fetch_array($result)){
|
||||
@@ -266,7 +266,7 @@ if($session->uid == $database->getVillage($_GET['d'])){
|
||||
}
|
||||
$toWref = $_GET['d'];
|
||||
if($session->alliance!=0){
|
||||
$result = mysqli_query($GLOBALS['link'],"SELECT data, ntype, id, topic, time FROM ".TB_PREFIX."ndata WHERE $limit AND ally = ".$session->alliance." AND toWref = ".$toWref." ORDER BY time DESC Limit 5");
|
||||
$result = mysqli_query($database->dblink,"SELECT data, ntype, id, topic, time FROM ".TB_PREFIX."ndata WHERE $limit AND ally = ".$session->alliance." AND toWref = ".$toWref." ORDER BY time DESC Limit 5");
|
||||
$query = mysqli_num_rows($result);
|
||||
if($query != 0){
|
||||
while($row = mysqli_fetch_array($result)){
|
||||
@@ -290,7 +290,7 @@ if($type==18 or $type==19 or $type==20 or $type==21){
|
||||
|
||||
<?php }
|
||||
}else{
|
||||
$result = mysqli_query($GLOBALS['link'],"SELECT data, ntype, id, topic, time FROM ".TB_PREFIX."ndata WHERE uid = ".$session->uid." AND toWref = ".$toWref." ORDER BY time DESC Limit 5");
|
||||
$result = mysqli_query($database->dblink,"SELECT data, ntype, id, topic, time FROM ".TB_PREFIX."ndata WHERE uid = ".$session->uid." AND toWref = ".$toWref." ORDER BY time DESC Limit 5");
|
||||
$query = mysqli_num_rows($result);
|
||||
if($query != 0){
|
||||
while($row = mysqli_fetch_array($result)){
|
||||
@@ -392,7 +392,7 @@ if($session->uid == $database->getVillage($_GET['d'])){
|
||||
}
|
||||
$toWref = $_GET['d'];
|
||||
if($session->alliance!=0){
|
||||
$result = mysqli_query($GLOBALS['link'],"SELECT data, ntype, id, topic, time FROM ".TB_PREFIX."ndata WHERE $limit AND ally = ".$session->alliance." AND toWref = ".$toWref." ORDER BY time DESC Limit 5");
|
||||
$result = mysqli_query($database->dblink,"SELECT data, ntype, id, topic, time FROM ".TB_PREFIX."ndata WHERE $limit AND ally = ".$session->alliance." AND toWref = ".$toWref." ORDER BY time DESC Limit 5");
|
||||
$query = mysqli_num_rows($result);
|
||||
if($query != 0){
|
||||
while($row = mysqli_fetch_array($result)){
|
||||
@@ -416,7 +416,7 @@ if($type==18 or $type==19 or $type==20 or $type==21 or $type==22){
|
||||
|
||||
<?php }
|
||||
}else{
|
||||
$result = mysqli_query($GLOBALS['link'],"SELECT data, ntype, id, topic, time FROM ".TB_PREFIX."ndata WHERE $limit AND uid = ".$session->uid." AND toWref = ".$toWref." ORDER BY time DESC Limit 5");
|
||||
$result = mysqli_query($database->dblink,"SELECT data, ntype, id, topic, time FROM ".TB_PREFIX."ndata WHERE $limit AND uid = ".$session->uid." AND toWref = ".$toWref." ORDER BY time DESC Limit 5");
|
||||
$query = mysqli_num_rows($result);
|
||||
if($query != 0){
|
||||
while($row = mysqli_fetch_array($result)){
|
||||
@@ -508,12 +508,12 @@ if($type==18 or $type==19 or $type==20 or $type==21){
|
||||
<td class="none">
|
||||
<?php
|
||||
if($basearray['fieldtype'] == 0){
|
||||
$query1 = mysqli_query($GLOBALS['link'],'SELECT * FROM `' . TB_PREFIX . 'odata` WHERE `wref` = ' . mysqli_escape_string($GLOBALS['link'],$_GET['d']));
|
||||
$query1 = mysqli_query($database->dblink,'SELECT * FROM `' . TB_PREFIX . 'odata` WHERE `wref` = ' . mysqli_escape_string($database->dblink,$_GET['d']));
|
||||
}else{
|
||||
$query1 = mysqli_query($GLOBALS['link'],'SELECT * FROM `' . TB_PREFIX . 'vdata` WHERE `wref` = ' . mysqli_real_escape_string($GLOBALS['link'],$_GET['d']));
|
||||
$query1 = mysqli_query($database->dblink,'SELECT * FROM `' . TB_PREFIX . 'vdata` WHERE `wref` = ' . mysqli_real_escape_string($database->dblink,$_GET['d']));
|
||||
}
|
||||
$data1 = mysqli_fetch_assoc($query1);
|
||||
$query2 = mysqli_query($GLOBALS['link'],'SELECT * FROM `' . TB_PREFIX . 'users` WHERE `id` = ' . $data1['owner']);
|
||||
$query2 = mysqli_query($database->dblink,'SELECT * FROM `' . TB_PREFIX . 'users` WHERE `id` = ' . $data1['owner']);
|
||||
$data2 = mysqli_fetch_assoc($query2);
|
||||
if($data2['access']=='0' or ($data2['access']== MULTIHUNTER && $data2['id'] == 5) or (!ADMIN_ALLOW_INCOMING_RAIDS && $data2['access']=='9')) {
|
||||
echo "» ".SENDTROOP." (".BAN.")";
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
<th class="sent"><a href="nachrichten.php?o=1">Sent</a></th>
|
||||
</tr></thead><tfoot><tr><th>
|
||||
<?php
|
||||
$MyGold = mysqli_query($GLOBALS['link'],"SELECT plus FROM ".TB_PREFIX."users WHERE `id`='".(int) $session->uid."'") or die(mysqli_error($database->dblink));
|
||||
$MyGold = mysqli_query($database->dblink,"SELECT plus FROM ".TB_PREFIX."users WHERE `id`='".(int) $session->uid."'") or die(mysqli_error($database->dblink));
|
||||
$golds = mysqli_fetch_array($MyGold);
|
||||
$date2=strtotime("NOW");
|
||||
if ($golds['plus'] <= $date2) { ?>
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
<th>Recipient</th>
|
||||
<th class="sent"><a href="nachrichten.php?t=2&s=0&t=2&o=1">Sent</a></th>
|
||||
</tr></thead><tfoot><tr><th><?php
|
||||
$MyGold = mysqli_query($GLOBALS['link'],"SELECT plus FROM ".TB_PREFIX."users WHERE `id`='".(int) $session->uid."'") or die(mysqli_error($database->dblink));
|
||||
$MyGold = mysqli_query($database->dblink,"SELECT plus FROM ".TB_PREFIX."users WHERE `id`='".(int) $session->uid."'") or die(mysqli_error($database->dblink));
|
||||
$golds = mysqli_fetch_array($MyGold);
|
||||
$date2=strtotime("NOW");
|
||||
if ($golds['plus'] <= $date2) { ?>
|
||||
|
||||
@@ -12,7 +12,7 @@ $noticeClass = array("Scout Report","Won as attacker without losses","Won as att
|
||||
</tr>
|
||||
</thead><tfoot>
|
||||
<tr><th><?php
|
||||
$MyGold = mysqli_query($GLOBALS['link'],"SELECT plus FROM ".TB_PREFIX."users WHERE `id`='".(int) $session->uid."'") or die(mysqli_error($database->dblink));
|
||||
$MyGold = mysqli_query($database->dblink,"SELECT plus FROM ".TB_PREFIX."users WHERE `id`='".(int) $session->uid."'") or die(mysqli_error($database->dblink));
|
||||
$golds = mysqli_fetch_array($MyGold);
|
||||
$date2=strtotime("NOW");
|
||||
if ($golds['plus'] <= $date2) { ?>
|
||||
|
||||
@@ -1,25 +1,25 @@
|
||||
<?php
|
||||
////////////// made by alq0rsan, improved by evader /////////////////////////
|
||||
if($session->access != BANNED && $session->gold >= 5){
|
||||
$MyGold = mysqli_query($GLOBALS['link'],"SELECT gold, b2 FROM ".TB_PREFIX."users WHERE `id`='".$session->uid."'") or die(mysqli_error($database->dblink));
|
||||
$MyGold = mysqli_query($database->dblink,"SELECT gold, b2 FROM ".TB_PREFIX."users WHERE `id`='".$session->uid."'") or die(mysqli_error($database->dblink));
|
||||
$golds = mysqli_fetch_array($MyGold);
|
||||
if($session->sit == 0) {
|
||||
if (mysqli_num_rows($MyGold) == 1) {
|
||||
if($golds['gold'] >= 5) {
|
||||
if($golds['b2'] < time()) {
|
||||
mysqli_query($GLOBALS['link'],"UPDATE ".TB_PREFIX."users set b2 = '".(time()+PLUS_PRODUCTION)."' where `id`='".$session->uid."'") or die(mysqli_error($database->dblink));
|
||||
mysqli_query($database->dblink,"UPDATE ".TB_PREFIX."users set b2 = '".(time()+PLUS_PRODUCTION)."' where `id`='".$session->uid."'") or die(mysqli_error($database->dblink));
|
||||
} else {
|
||||
mysqli_query($GLOBALS['link'],"UPDATE ".TB_PREFIX."users set b2 = '".($golds['b2']+PLUS_PRODUCTION)."' where `id`='".$session->uid."'") or die(mysqli_error($database->dblink));
|
||||
mysqli_query($database->dblink,"UPDATE ".TB_PREFIX."users set b2 = '".($golds['b2']+PLUS_PRODUCTION)."' where `id`='".$session->uid."'") or die(mysqli_error($database->dblink));
|
||||
}
|
||||
$done1 = "+25% Production: Clay";
|
||||
mysqli_query($GLOBALS['link'],"UPDATE ".TB_PREFIX."users set gold = ".($session->gold-5)." where `id`='".$session->uid."'") or die(mysqli_error($database->dblink));
|
||||
mysqli_query($GLOBALS['link'],"INSERT INTO ".TB_PREFIX."gold_fin_log (wid,log) VALUES ('".$village->wid."', '+25% Production: Clay')") or die(mysqli_error($database->dblink));
|
||||
mysqli_query($database->dblink,"UPDATE ".TB_PREFIX."users set gold = ".($session->gold-5)." where `id`='".$session->uid."'") or die(mysqli_error($database->dblink));
|
||||
mysqli_query($database->dblink,"INSERT INTO ".TB_PREFIX."gold_fin_log (wid,log) VALUES ('".$village->wid."', '+25% Production: Clay')") or die(mysqli_error($database->dblink));
|
||||
} else {
|
||||
$done1 = "You need more gold";
|
||||
}
|
||||
} else {
|
||||
$done1 = "Failed clay attempt";
|
||||
mysqli_query($GLOBALS['link'],"INSERT INTO ".TB_PREFIX."gold_fin_log (wid,log) VALUES ('".$village->wid."', 'Failed +25% Production: Clay')") or die(mysqli_error($database->dblink));
|
||||
mysqli_query($database->dblink,"INSERT INTO ".TB_PREFIX."gold_fin_log (wid,log) VALUES ('".$village->wid."', 'Failed +25% Production: Clay')") or die(mysqli_error($database->dblink));
|
||||
}
|
||||
}
|
||||
header("Location: plus.php?id=3");
|
||||
|
||||
@@ -1,25 +1,25 @@
|
||||
<?php
|
||||
////////////// made by alq0rsan, improved by evader /////////////////////////
|
||||
if($session->access != BANNED && $session->gold >= 5){
|
||||
$MyGold = mysqli_query($GLOBALS['link'],"SELECT gold, b3 FROM ".TB_PREFIX."users WHERE `id`='".$session->uid."'") or die(mysqli_error($database->dblink));
|
||||
$MyGold = mysqli_query($database->dblink,"SELECT gold, b3 FROM ".TB_PREFIX."users WHERE `id`='".$session->uid."'") or die(mysqli_error($database->dblink));
|
||||
$golds = mysqli_fetch_array($MyGold);
|
||||
if($session->sit == 0) {
|
||||
if (mysqli_num_rows($MyGold)) {
|
||||
if($golds['gold'] >= 5) {
|
||||
if($golds['b3'] < time()) {
|
||||
mysqli_query($GLOBALS['link'],"UPDATE ".TB_PREFIX."users set b3 = '".(time()+PLUS_PRODUCTION)."' where `id`='".$session->uid."'") or die(mysqli_error($database->dblink));
|
||||
mysqli_query($database->dblink,"UPDATE ".TB_PREFIX."users set b3 = '".(time()+PLUS_PRODUCTION)."' where `id`='".$session->uid."'") or die(mysqli_error($database->dblink));
|
||||
} else {
|
||||
mysqli_query($GLOBALS['link'],"UPDATE ".TB_PREFIX."users set b3 = '".($golds['b3']+PLUS_PRODUCTION)."' where `id`='".$session->uid."'") or die(mysqli_error($database->dblink));
|
||||
mysqli_query($database->dblink,"UPDATE ".TB_PREFIX."users set b3 = '".($golds['b3']+PLUS_PRODUCTION)."' where `id`='".$session->uid."'") or die(mysqli_error($database->dblink));
|
||||
}
|
||||
$done1 = "+25% Production: Iron";
|
||||
mysqli_query($GLOBALS['link'],"UPDATE ".TB_PREFIX."users set gold = ".($session->gold-5)." where `id`='".$session->uid."'") or die(mysqli_error($database->dblink));
|
||||
mysqli_query($GLOBALS['link'],"INSERT INTO ".TB_PREFIX."gold_fin_log (wid,log) VALUES ('".$village->wid."', '+25% Production: Iron')") or die(mysqli_error($database->dblink));
|
||||
mysqli_query($database->dblink,"UPDATE ".TB_PREFIX."users set gold = ".($session->gold-5)." where `id`='".$session->uid."'") or die(mysqli_error($database->dblink));
|
||||
mysqli_query($database->dblink,"INSERT INTO ".TB_PREFIX."gold_fin_log (wid,log) VALUES ('".$village->wid."', '+25% Production: Iron')") or die(mysqli_error($database->dblink));
|
||||
} else {
|
||||
$done1 = "You need more gold";
|
||||
}
|
||||
} else {
|
||||
$done1 = "Failed iron attempt";
|
||||
mysqli_query($GLOBALS['link'],"INSERT INTO ".TB_PREFIX."gold_fin_log (wid,log) VALUES ('".$village->wid."', 'Failed +25% Production: Iron')") or die(mysqli_error($database->dblink));
|
||||
mysqli_query($database->dblink,"INSERT INTO ".TB_PREFIX."gold_fin_log (wid,log) VALUES ('".$village->wid."', 'Failed +25% Production: Iron')") or die(mysqli_error($database->dblink));
|
||||
}
|
||||
}
|
||||
header("Location: plus.php?id=3");
|
||||
|
||||
@@ -1,25 +1,25 @@
|
||||
<?php
|
||||
////////////// made by alq0rsan, improved by evader /////////////////////////
|
||||
if($session->access != BANNED && $session->gold >= 5){
|
||||
$MyGold = mysqli_query($GLOBALS['link'],"SELECT gold, b4 FROM ".TB_PREFIX."users WHERE `id`='".$session->uid."'") or die(mysqli_error($database->dblink));
|
||||
$MyGold = mysqli_query($database->dblink,"SELECT gold, b4 FROM ".TB_PREFIX."users WHERE `id`='".$session->uid."'") or die(mysqli_error($database->dblink));
|
||||
$golds = mysqli_fetch_array($MyGold);
|
||||
if($session->sit == 0) {
|
||||
if (mysqli_num_rows($MyGold)) {
|
||||
if($golds['gold'] >= 5) {
|
||||
if($golds['b4'] < time()) {
|
||||
mysqli_query($GLOBALS['link'],"UPDATE ".TB_PREFIX."users set b4 = '".(time()+PLUS_PRODUCTION)."' where `id`='".$session->uid."'") or die(mysqli_error($database->dblink));
|
||||
mysqli_query($database->dblink,"UPDATE ".TB_PREFIX."users set b4 = '".(time()+PLUS_PRODUCTION)."' where `id`='".$session->uid."'") or die(mysqli_error($database->dblink));
|
||||
} else {
|
||||
mysqli_query($GLOBALS['link'],"UPDATE ".TB_PREFIX."users set b4 = '".($golds['b4']+PLUS_PRODUCTION)."' where `id`='".$session->uid."'") or die(mysqli_error($database->dblink));
|
||||
mysqli_query($database->dblink,"UPDATE ".TB_PREFIX."users set b4 = '".($golds['b4']+PLUS_PRODUCTION)."' where `id`='".$session->uid."'") or die(mysqli_error($database->dblink));
|
||||
}
|
||||
$done1 = "+25% Production: Crop";
|
||||
mysqli_query($GLOBALS['link'],"UPDATE ".TB_PREFIX."users set gold = ".($session->gold-5)." where `id`='".$session->uid."'") or die(mysqli_error($database->dblink));
|
||||
mysqli_query($GLOBALS['link'],"INSERT INTO ".TB_PREFIX."gold_fin_log (wid,log) VALUES ('".$village->wid."', '+25% Production: Crop')") or die(mysqli_error($database->dblink));
|
||||
mysqli_query($database->dblink,"UPDATE ".TB_PREFIX."users set gold = ".($session->gold-5)." where `id`='".$session->uid."'") or die(mysqli_error($database->dblink));
|
||||
mysqli_query($database->dblink,"INSERT INTO ".TB_PREFIX."gold_fin_log (wid,log) VALUES ('".$village->wid."', '+25% Production: Crop')") or die(mysqli_error($database->dblink));
|
||||
} else {
|
||||
$done1 = "You need more gold";
|
||||
}
|
||||
} else {
|
||||
$done1 = "Failed crop attempt";
|
||||
mysqli_query($GLOBALS['link'],"INSERT INTO ".TB_PREFIX."gold_fin_log (wid,log) VALUES ('".$village->wid."', 'Failed +25% Production: Crop')") or die(mysqli_error($database->dblink));
|
||||
mysqli_query($database->dblink,"INSERT INTO ".TB_PREFIX."gold_fin_log (wid,log) VALUES ('".$village->wid."', 'Failed +25% Production: Crop')") or die(mysqli_error($database->dblink));
|
||||
}
|
||||
}
|
||||
header("Location: plus.php?id=3");
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<!---<?php
|
||||
/*include("Templates/Plus/pmenu.tpl");
|
||||
$MyVilId = mysqli_query($GLOBALS['link'],"SELECT * FROM ".TB_PREFIX."vdata WHERE `wref`='".$village->wid."'") or die(mysqli_error($database->dblink));
|
||||
$MyVilId = mysqli_query($database->dblink,"SELECT * FROM ".TB_PREFIX."vdata WHERE `wref`='".$village->wid."'") or die(mysqli_error($database->dblink));
|
||||
$uuVilid = mysqli_fetch_array($MyVilId);
|
||||
$totalR = ($uuVilid['6']+$uuVilid['7']+$uuVilid['8']+$uuVilid['10']);
|
||||
$quart = ($totalR / 4);
|
||||
@@ -21,10 +21,10 @@
|
||||
<td align="center">
|
||||
<?php
|
||||
if($session->sit == 0) {
|
||||
/* $MyGold = mysqli_query($GLOBALS['link'],"SELECT * FROM ".TB_PREFIX."users WHERE `id`='".$session->uid."'") or die(mysqli_error($database->dblink));
|
||||
/* $MyGold = mysqli_query($database->dblink,"SELECT * FROM ".TB_PREFIX."users WHERE `id`='".$session->uid."'") or die(mysqli_error($database->dblink));
|
||||
$golds = mysqli_fetch_array($MyGold);
|
||||
|
||||
$MyId = mysqli_query($GLOBALS['link'],"SELECT * FROM ".TB_PREFIX."users WHERE `id`='".$session->uid."'") or die(mysqli_error($database->dblink));
|
||||
$MyId = mysqli_query($database->dblink,"SELECT * FROM ".TB_PREFIX."users WHERE `id`='".$session->uid."'") or die(mysqli_error($database->dblink));
|
||||
$uuid = mysqli_fetch_array($MyId);
|
||||
|
||||
echo "<input type='text' name='T1' size='6' value=".$quart."></td>";
|
||||
@@ -34,7 +34,7 @@ if($session->sit == 0) {
|
||||
echo "<input type='text' name='T3' size='6' value=".$quart."></td>";
|
||||
echo "<td align='center'>";
|
||||
echo "<input type='text' name='T4' size='6' value=".$quart."></td>";
|
||||
mysqli_query($GLOBALS['link'],"UPDATE ".TB_PREFIX."users set gold = ".($session->gold-1)." where `id`='".$session->uid."'") or die(mysqli_error($database->dblink));
|
||||
mysqli_query($database->dblink,"UPDATE ".TB_PREFIX."users set gold = ".($session->gold-1)." where `id`='".$session->uid."'") or die(mysqli_error($database->dblink));
|
||||
*/
|
||||
}
|
||||
?>
|
||||
|
||||
@@ -1,25 +1,25 @@
|
||||
<?php
|
||||
////////////// made by alq0rsan /////////////////////////
|
||||
if($session->access != BANNED){
|
||||
$MyVilId = mysqli_query($GLOBALS['link'],"SELECT * FROM ".TB_PREFIX."vdata WHERE `wref`='".$village->wid."'") or die(mysqli_error($database->dblink));
|
||||
$MyVilId = mysqli_query($database->dblink,"SELECT * FROM ".TB_PREFIX."vdata WHERE `wref`='".$village->wid."'") or die(mysqli_error($database->dblink));
|
||||
$uuVilid = mysqli_fetch_array($MyVilId);
|
||||
|
||||
$totalT = ($T1+$T2+$T3+$T4);
|
||||
$totalR = ($uuVilid['6']+$uuVilid['7']+$uuVilid['8']+$uuVilid['10']);
|
||||
|
||||
$goldlog = mysqli_fetch_array(mysqli_query($GLOBALS['link'],"SELECT Count(*) as Total FROM ".TB_PREFIX."gold_fin_log"), MYSQLI_ASSOC) or die(mysqli_error($database->dblink));
|
||||
$goldlog = mysqli_fetch_array(mysqli_query($database->dblink,"SELECT Count(*) as Total FROM ".TB_PREFIX."gold_fin_log"), MYSQLI_ASSOC) or die(mysqli_error($database->dblink));
|
||||
|
||||
if($totalT <= $totalR) {
|
||||
mysqli_query($GLOBALS['link'],"UPDATE ".TB_PREFIX."vdata set wood = '".$T1."' where `wref`='".$village->wid."'") or die(mysqli_error($database->dblink));
|
||||
mysqli_query($GLOBALS['link'],"UPDATE ".TB_PREFIX."vdata set clay = '".$T2."' where `wref`='".$village->wid."'") or die(mysqli_error($database->dblink));
|
||||
mysqli_query($GLOBALS['link'],"UPDATE ".TB_PREFIX."vdata set iron = '".$T3."' where `wref`='".$village->wid."'") or die(mysqli_error($database->dblink));
|
||||
mysqli_query($GLOBALS['link'],"UPDATE ".TB_PREFIX."vdata set crop = '".$T4."' where `wref`='".$village->wid."'") or die(mysqli_error($database->dblink));
|
||||
mysqli_query($GLOBALS['link'],"UPDATE ".TB_PREFIX."users set gold = ".($session->gold-3)." where `id`='".$session->uid."'") or die(mysqli_error($database->dblink));
|
||||
mysqli_query($GLOBALS['link'],"INSERT INTO ".TB_PREFIX."gold_fin_log VALUES ('".($goldlog['Total']+1)."', '".$village->wid."', 'trade 1:1')") or die(mysqli_error($database->dblink));
|
||||
mysqli_query($database->dblink,"UPDATE ".TB_PREFIX."vdata set wood = '".$T1."' where `wref`='".$village->wid."'") or die(mysqli_error($database->dblink));
|
||||
mysqli_query($database->dblink,"UPDATE ".TB_PREFIX."vdata set clay = '".$T2."' where `wref`='".$village->wid."'") or die(mysqli_error($database->dblink));
|
||||
mysqli_query($database->dblink,"UPDATE ".TB_PREFIX."vdata set iron = '".$T3."' where `wref`='".$village->wid."'") or die(mysqli_error($database->dblink));
|
||||
mysqli_query($database->dblink,"UPDATE ".TB_PREFIX."vdata set crop = '".$T4."' where `wref`='".$village->wid."'") or die(mysqli_error($database->dblink));
|
||||
mysqli_query($database->dblink,"UPDATE ".TB_PREFIX."users set gold = ".($session->gold-3)." where `id`='".$session->uid."'") or die(mysqli_error($database->dblink));
|
||||
mysqli_query($database->dblink,"INSERT INTO ".TB_PREFIX."gold_fin_log VALUES ('".($goldlog['Total']+1)."', '".$village->wid."', 'trade 1:1')") or die(mysqli_error($database->dblink));
|
||||
echo "done";
|
||||
} else {
|
||||
echo "failed";
|
||||
mysqli_query($GLOBALS['link'],"INSERT INTO ".TB_PREFIX."gold_fin_log VALUES ('".($goldlog['Total']+1)."', '".$village->wid."', 'Failed trade 1:1')") or die(mysqli_error($database->dblink));
|
||||
mysqli_query($database->dblink,"INSERT INTO ".TB_PREFIX."gold_fin_log VALUES ('".($goldlog['Total']+1)."', '".$village->wid."', 'Failed trade 1:1')") or die(mysqli_error($database->dblink));
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
////////////// made by alq0rsan /////////////////////////
|
||||
if($session->access != BANNED){
|
||||
if($session->gold >= 100 && $session->sit == 0 && $session->goldclub == 0) {
|
||||
mysqli_query($GLOBALS['link'],"UPDATE ".TB_PREFIX."users set goldclub = 1, gold = gold - 100 where `id`='".$session->uid."'");
|
||||
mysqli_query($database->dblink,"UPDATE ".TB_PREFIX."users set goldclub = 1, gold = gold - 100 where `id`='".$session->uid."'");
|
||||
}
|
||||
header("Location: plus.php?id=3");
|
||||
exit;
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
<?php
|
||||
|
||||
$MyGold = mysqli_query($GLOBALS['link'],"SELECT * FROM ".TB_PREFIX."users WHERE `id`='".$session->uid."'") or die(mysqli_error($database->dblink));
|
||||
$MyGold = mysqli_query($database->dblink,"SELECT * FROM ".TB_PREFIX."users WHERE `id`='".$session->uid."'") or die(mysqli_error($database->dblink));
|
||||
$golds = mysqli_fetch_array($MyGold);
|
||||
|
||||
include("Templates/Plus/pmenu.tpl");
|
||||
|
||||
|
||||
$MyGold = mysqli_query($GLOBALS['link'],"SELECT * FROM ".TB_PREFIX."users WHERE `id`='".$session->uid."'") or die(mysqli_error($database->dblink));
|
||||
$MyGold = mysqli_query($database->dblink,"SELECT * FROM ".TB_PREFIX."users WHERE `id`='".$session->uid."'") or die(mysqli_error($database->dblink));
|
||||
$golds = mysqli_fetch_array($MyGold);
|
||||
|
||||
$today = date("mdHi");
|
||||
@@ -60,7 +60,7 @@ $date2=strtotime("NOW");
|
||||
}else
|
||||
if ($datetimep <= $date2) {
|
||||
print "Your PLUS advantage has ended.<br>";
|
||||
mysqli_query($GLOBALS['link'],"UPDATE ".TB_PREFIX."users set plus = '0' where `id`='".$session->uid."'") or die(mysqli_error($database->dblink));
|
||||
mysqli_query($database->dblink,"UPDATE ".TB_PREFIX."users set plus = '0' where `id`='".$session->uid."'") or die(mysqli_error($database->dblink));
|
||||
} else {
|
||||
|
||||
$holdtotmin=(($datetimep-$date2)/60);
|
||||
@@ -87,7 +87,7 @@ $holdmr=intval($holdtotmin-(($holdhr*60)+($holdtotday*1440)));
|
||||
<td class="act">
|
||||
|
||||
<?php
|
||||
$MyGold = mysqli_query($GLOBALS['link'],"SELECT * FROM ".TB_PREFIX."users WHERE `id`='".$session->uid."'") or die(mysqli_error($database->dblink));
|
||||
$MyGold = mysqli_query($database->dblink,"SELECT * FROM ".TB_PREFIX."users WHERE `id`='".$session->uid."'") or die(mysqli_error($database->dblink));
|
||||
$golds = mysqli_fetch_array($MyGold);
|
||||
|
||||
if (mysqli_num_rows($MyGold)) {
|
||||
@@ -464,7 +464,7 @@ if (mysqli_num_rows($MyGold)) {
|
||||
<td class="act">
|
||||
|
||||
<?php
|
||||
$MyGold = mysqli_query($GLOBALS['link'],"SELECT * FROM ".TB_PREFIX."users WHERE `id`='".$session->uid."'") or die(mysqli_error($database->dblink));
|
||||
$MyGold = mysqli_query($database->dblink,"SELECT * FROM ".TB_PREFIX."users WHERE `id`='".$session->uid."'") or die(mysqli_error($database->dblink));
|
||||
$golds = mysqli_fetch_array($MyGold);
|
||||
|
||||
if (mysqli_num_rows($MyGold)) {
|
||||
|
||||
@@ -1,25 +1,25 @@
|
||||
<?php
|
||||
////////////// made by alq0rsan, improved by evader /////////////////////////
|
||||
if($session->access != BANNED && $session->gold >= 10){
|
||||
$MyGold = mysqli_query($GLOBALS['link'],"SELECT gold, plus FROM ".TB_PREFIX."users WHERE `id`='".$session->uid."'") or die(mysqli_error($database->dblink));
|
||||
$MyGold = mysqli_query($database->dblink,"SELECT gold, plus FROM ".TB_PREFIX."users WHERE `id`='".$session->uid."'") or die(mysqli_error($database->dblink));
|
||||
$golds = mysqli_fetch_array($MyGold);
|
||||
if($session->sit == 0) {
|
||||
if (mysqli_num_rows($MyGold) == 1) {
|
||||
if($golds['gold'] >= 10) {
|
||||
if($golds['plus'] == 0) {
|
||||
mysqli_query($GLOBALS['link'],"UPDATE ".TB_PREFIX."users set plus = ('".mktime(date("H"),date("i"), date("s"),date("m") , date("d"), date("Y"))."')+".PLUS_TIME." where `id`='".$session->uid."'") or die(mysqli_error($database->dblink));
|
||||
mysqli_query($database->dblink,"UPDATE ".TB_PREFIX."users set plus = ('".mktime(date("H"),date("i"), date("s"),date("m") , date("d"), date("Y"))."')+".PLUS_TIME." where `id`='".$session->uid."'") or die(mysqli_error($database->dblink));
|
||||
} else {
|
||||
mysqli_query($GLOBALS['link'],"UPDATE ".TB_PREFIX."users set plus = '".($golds['plus']+PLUS_TIME)."' where `id`='".$session->uid."'") or die(mysqli_error($database->dblink));
|
||||
mysqli_query($database->dblink,"UPDATE ".TB_PREFIX."users set plus = '".($golds['plus']+PLUS_TIME)."' where `id`='".$session->uid."'") or die(mysqli_error($database->dblink));
|
||||
}
|
||||
$done1 = " Plus Account";
|
||||
mysqli_query($GLOBALS['link'],"UPDATE ".TB_PREFIX."users set gold = ".($session->gold-10)." where `id`='".$session->uid."'") or die(mysqli_error($database->dblink));
|
||||
mysqli_query($GLOBALS['link'],"INSERT INTO ".TB_PREFIX."gold_fin_log (wid,log) VALUES ('".$village->wid."', 'Plus Account')") or die(mysqli_error($database->dblink));
|
||||
mysqli_query($database->dblink,"UPDATE ".TB_PREFIX."users set gold = ".($session->gold-10)." where `id`='".$session->uid."'") or die(mysqli_error($database->dblink));
|
||||
mysqli_query($database->dblink,"INSERT INTO ".TB_PREFIX."gold_fin_log (wid,log) VALUES ('".$village->wid."', 'Plus Account')") or die(mysqli_error($database->dblink));
|
||||
} else {
|
||||
$done1 = " You need more gold";
|
||||
}
|
||||
} else {
|
||||
$done1 = "Failed plus attempt";
|
||||
mysqli_query($GLOBALS['link'],"INSERT INTO ".TB_PREFIX."gold_fin_log (wid,log) VALUES ('".$village->wid."', 'Failed Plus Account')") or die(mysqli_error($database->dblink));
|
||||
mysqli_query($database->dblink,"INSERT INTO ".TB_PREFIX."gold_fin_log (wid,log) VALUES ('".$village->wid."', 'Failed Plus Account')") or die(mysqli_error($database->dblink));
|
||||
}
|
||||
}
|
||||
header("Location: plus.php?id=3");
|
||||
|
||||
@@ -1,25 +1,25 @@
|
||||
<?php
|
||||
////////////// made by alq0rsan, improved by evader /////////////////////////
|
||||
if($session->access != BANNED && $session->gold >= 5){
|
||||
$MyGold = mysqli_query($GLOBALS['link'],"SELECT gold, b1 FROM ".TB_PREFIX."users WHERE `id`='".$session->uid."'") or die(mysqli_error($database->dblink));
|
||||
$MyGold = mysqli_query($database->dblink,"SELECT gold, b1 FROM ".TB_PREFIX."users WHERE `id`='".$session->uid."'") or die(mysqli_error($database->dblink));
|
||||
$golds = mysqli_fetch_array($MyGold);
|
||||
if($session->sit == 0) {
|
||||
if (mysqli_num_rows($MyGold) == 1) {
|
||||
if($golds['gold'] >= 5) {
|
||||
if($golds['b1'] < time()) {
|
||||
mysqli_query($GLOBALS['link'],"UPDATE ".TB_PREFIX."users set b1 = '".(time()+PLUS_PRODUCTION)."' where `id`='".$session->uid."'") or die(mysqli_error($database->dblink));
|
||||
mysqli_query($database->dblink,"UPDATE ".TB_PREFIX."users set b1 = '".(time()+PLUS_PRODUCTION)."' where `id`='".$session->uid."'") or die(mysqli_error($database->dblink));
|
||||
} else {
|
||||
mysqli_query($GLOBALS['link'],"UPDATE ".TB_PREFIX."users set b1 = '".($golds['b1']+PLUS_PRODUCTION)."' where `id`='".$session->uid."'") or die(mysqli_error($database->dblink));
|
||||
mysqli_query($database->dblink,"UPDATE ".TB_PREFIX."users set b1 = '".($golds['b1']+PLUS_PRODUCTION)."' where `id`='".$session->uid."'") or die(mysqli_error($database->dblink));
|
||||
}
|
||||
$done1 = "+25% Production: Lumber";
|
||||
mysqli_query($GLOBALS['link'],"UPDATE ".TB_PREFIX."users set gold = ".($session->gold-5)." where `id`='".$session->uid."'") or die(mysqli_error($database->dblink));
|
||||
mysqli_query($GLOBALS['link'],"INSERT INTO ".TB_PREFIX."gold_fin_log (wid,log) VALUES ('".$village->wid."', '+25% Production: Lumber')") or die(mysqli_error($database->dblink));
|
||||
mysqli_query($database->dblink,"UPDATE ".TB_PREFIX."users set gold = ".($session->gold-5)." where `id`='".$session->uid."'") or die(mysqli_error($database->dblink));
|
||||
mysqli_query($database->dblink,"INSERT INTO ".TB_PREFIX."gold_fin_log (wid,log) VALUES ('".$village->wid."', '+25% Production: Lumber')") or die(mysqli_error($database->dblink));
|
||||
} else {
|
||||
$done1 = "You need more gold";
|
||||
}
|
||||
} else {
|
||||
$done1 = "Failed lumber attempt";
|
||||
mysqli_query($GLOBALS['link'],"INSERT INTO ".TB_PREFIX."gold_fin_log (wid,log) VALUES ('".$village->wid."', 'Failed +25% Production: Lumber')") or die(mysqli_error($database->dblink));
|
||||
mysqli_query($database->dblink,"INSERT INTO ".TB_PREFIX."gold_fin_log (wid,log) VALUES ('".$village->wid."', 'Failed +25% Production: Lumber')") or die(mysqli_error($database->dblink));
|
||||
}
|
||||
}
|
||||
header("Location: plus.php?id=3");
|
||||
|
||||
@@ -32,8 +32,8 @@ echo <<<EOT
|
||||
EOT;
|
||||
}else{
|
||||
|
||||
$account = mysqli_real_escape_string($GLOBALS['link'],$_POST['username']);
|
||||
$reward = mysqli_real_escape_string($GLOBALS['link'],$_POST['reward']);
|
||||
$account = mysqli_real_escape_string($database->dblink,$_POST['username']);
|
||||
$reward = mysqli_real_escape_string($database->dblink,$_POST['reward']);
|
||||
$valid=TRUE;
|
||||
|
||||
|
||||
@@ -50,7 +50,7 @@ EOT;
|
||||
$plusTime = 604800; // 7 days
|
||||
$time = time();
|
||||
$giveplus = ($time + $plustime);
|
||||
$accountCheck = mysqli_fetch_array(mysqli_query($GLOBALS['link'],"SELECT Count(*) as Total FROM ".TB_PREFIX."users WHERE `id`='".$session->uid."'"), MYSQLI_ASSOC) or die(mysqli_error($database->dblink));
|
||||
$accountCheck = mysqli_fetch_array(mysqli_query($database->dblink,"SELECT Count(*) as Total FROM ".TB_PREFIX."users WHERE `id`='".$session->uid."'"), MYSQLI_ASSOC) or die(mysqli_error($database->dblink));
|
||||
if($accountCheck['Total'] <= 0){
|
||||
echo "<b>ERROR:</b><br />";
|
||||
echo "The account name you entered does not exist.";
|
||||
@@ -60,7 +60,7 @@ EOT;
|
||||
if(!$valid) break;
|
||||
$valid=TRUE;
|
||||
|
||||
$plusCheck = mysqli_query($GLOBALS['link'],"SELECT * FROM ".TB_PREFIX."users WHERE `id`='".$session->uid."'") or die(mysqli_error($database->dblink));
|
||||
$plusCheck = mysqli_query($database->dblink,"SELECT * FROM ".TB_PREFIX."users WHERE `id`='".$session->uid."'") or die(mysqli_error($database->dblink));
|
||||
$pluss = mysqli_fetch_array($plusCheck);
|
||||
|
||||
switch($reward){
|
||||
@@ -102,17 +102,17 @@ echo' Please select the option you wish to activate or extend.<br>';
|
||||
|
||||
if(mysqli_num_rows($plusCheck) > 0){
|
||||
if($time > $pluss[$key] ){
|
||||
$editplus = mysqli_query($GLOBALS['link'],"UPDATE ".TB_PREFIX."users SET `{$key}`= `{$key}` + ('".$time."'+'".$plusTime."'), `gold` = `gold` - {$gldz} WHERE `id`='".$session->uid."'") or die(mysqli_error($database->dblink));
|
||||
$editplus = mysqli_query($database->dblink,"UPDATE ".TB_PREFIX."users SET `{$key}`= `{$key}` + ('".$time."'+'".$plusTime."'), `gold` = `gold` - {$gldz} WHERE `id`='".$session->uid."'") or die(mysqli_error($database->dblink));
|
||||
echo "<META HTTP-EQUIV=Refresh CONTENT=\"2; {$url}\" ><br /><br /><div align=center><font color=green size=4><b> Your Status has been updated!</b></font></div>";
|
||||
}else
|
||||
if($time < $pluss[$key]){
|
||||
$editplus = mysqli_query($GLOBALS['link'],"UPDATE ".TB_PREFIX."users SET `{$key}`= `{$key}` +'".$plusTime."', `gold` = `gold` - {$gldz} WHERE `id`='".$session->uid."'") or die(mysqli_error($database->dblink));
|
||||
$editplus = mysqli_query($database->dblink,"UPDATE ".TB_PREFIX."users SET `{$key}`= `{$key}` +'".$plusTime."', `gold` = `gold` - {$gldz} WHERE `id`='".$session->uid."'") or die(mysqli_error($database->dblink));
|
||||
echo "<META HTTP-EQUIV=Refresh CONTENT=\"2; {$url}\" ><br /><br /><div align=center><font color=green size=4><b> Your Status has been updated!</b></font></div>";
|
||||
|
||||
}
|
||||
}
|
||||
else{
|
||||
$insertplus = mysqli_query($GLOBALS['link'],"INSERT INTO ".TB_PREFIX."users (`username`,`{$key}`, `gold`) VALUES ('".$session->username."', ('".$time."'+'".$plusTime."'),`gold` - {$gldz})") or die(mysqli_error($database->dblink));
|
||||
$insertplus = mysqli_query($database->dblink,"INSERT INTO ".TB_PREFIX."users (`username`,`{$key}`, `gold`) VALUES ('".$session->username."', ('".$time."'+'".$plusTime."'),`gold` - {$gldz})") or die(mysqli_error($database->dblink));
|
||||
echo "<META HTTP-EQUIV=Refresh CONTENT=\"3; {$url})\" ><br /><br /><div align=center><font color=green size=4><b> Your Status has been updated!</b></font></div>";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
echo "Row ".$i;
|
||||
}
|
||||
|
||||
$result = mysqli_query($GLOBALS['link'],"SELECT * FROM ".TB_PREFIX."alidata ORDER BY ap DESC, id DESC Limit 10");
|
||||
$result2 = mysqli_query($GLOBALS['link'],"SELECT * FROM ".TB_PREFIX."alidata WHERE id = '".$session->alliance."' ORDER BY ap DESC, id DESC Limit 1");
|
||||
$result = mysqli_query($database->dblink,"SELECT * FROM ".TB_PREFIX."alidata ORDER BY ap DESC, id DESC Limit 10");
|
||||
$result2 = mysqli_query($database->dblink,"SELECT * FROM ".TB_PREFIX."alidata WHERE id = '".$session->alliance."' ORDER BY ap DESC, id DESC Limit 1");
|
||||
?>
|
||||
<table cellpadding="1" cellspacing="1">
|
||||
<thead>
|
||||
@@ -66,8 +66,8 @@
|
||||
for($i=1;$i<=0;$i++) {
|
||||
echo "Row ".$i;
|
||||
}
|
||||
$result = mysqli_query($GLOBALS['link'],"SELECT * FROM ".TB_PREFIX."alidata ORDER BY dp DESC, id DESC Limit 10");
|
||||
$result2 = mysqli_query($GLOBALS['link'],"SELECT * FROM ".TB_PREFIX."alidata WHERE id = '".$session->alliance."' ORDER BY dp DESC Limit 1");
|
||||
$result = mysqli_query($database->dblink,"SELECT * FROM ".TB_PREFIX."alidata ORDER BY dp DESC, id DESC Limit 10");
|
||||
$result2 = mysqli_query($database->dblink,"SELECT * FROM ".TB_PREFIX."alidata WHERE id = '".$session->alliance."' ORDER BY dp DESC Limit 1");
|
||||
?>
|
||||
<table cellpadding="1" cellspacing="1" id="top10_defs" class="top10 row_table_data">
|
||||
<thead>
|
||||
@@ -120,8 +120,8 @@
|
||||
for($i=1;$i<=0;$i++) {
|
||||
echo "Row ".$i;
|
||||
}
|
||||
$result = mysqli_query($GLOBALS['link'],"SELECT * FROM ".TB_PREFIX."alidata ORDER BY clp DESC, id DESC Limit 10");
|
||||
$result2 = mysqli_query($GLOBALS['link'],"SELECT * FROM ".TB_PREFIX."alidata WHERE id = '".$session->alliance."' ORDER BY clp DESC Limit 1");
|
||||
$result = mysqli_query($database->dblink,"SELECT * FROM ".TB_PREFIX."alidata ORDER BY clp DESC, id DESC Limit 10");
|
||||
$result2 = mysqli_query($database->dblink,"SELECT * FROM ".TB_PREFIX."alidata WHERE id = '".$session->alliance."' ORDER BY clp DESC Limit 1");
|
||||
?>
|
||||
<div class="clear"></div>
|
||||
<table cellpadding="1" cellspacing="1" id="top10_climbers" class="top10 row_table_data">
|
||||
@@ -173,8 +173,8 @@
|
||||
for($i=1;$i<=0;$i++) {
|
||||
echo "Row ".$i;
|
||||
}
|
||||
$result = mysqli_query($GLOBALS['link'],"SELECT * FROM ".TB_PREFIX."alidata ORDER BY RR DESC, id DESC Limit 10");
|
||||
$result2 = mysqli_query($GLOBALS['link'],"SELECT * FROM ".TB_PREFIX."alidata WHERE id = '".$session->alliance."' ORDER BY RR DESC Limit 1");
|
||||
$result = mysqli_query($database->dblink,"SELECT * FROM ".TB_PREFIX."alidata ORDER BY RR DESC, id DESC Limit 10");
|
||||
$result2 = mysqli_query($database->dblink,"SELECT * FROM ".TB_PREFIX."alidata WHERE id = '".$session->alliance."' ORDER BY RR DESC Limit 1");
|
||||
?>
|
||||
<table cellpadding="1" cellspacing="1" id="top10_raiders" class="top10 row_table_data">
|
||||
<thead>
|
||||
|
||||
@@ -9,11 +9,11 @@
|
||||
| Copyright: TravianX Project All rights reserved |
|
||||
\** --------------------------------------------------- **/
|
||||
|
||||
$tribe1 = mysqli_fetch_array(mysqli_query($GLOBALS['link'],"SELECT Count(*) as Total FROM ".TB_PREFIX."users WHERE tribe = 1"), MYSQLI_ASSOC);
|
||||
$tribe2 = mysqli_fetch_array(mysqli_query($GLOBALS['link'],"SELECT Count(*) as Total FROM ".TB_PREFIX."users WHERE tribe = 2"), MYSQLI_ASSOC);
|
||||
$tribe3 = mysqli_fetch_array(mysqli_query($GLOBALS['link'],"SELECT Count(*) as Total FROM ".TB_PREFIX."users WHERE tribe = 3"), MYSQLI_ASSOC);
|
||||
$tribe1 = mysqli_fetch_array(mysqli_query($database->dblink,"SELECT Count(*) as Total FROM ".TB_PREFIX."users WHERE tribe = 1"), MYSQLI_ASSOC);
|
||||
$tribe2 = mysqli_fetch_array(mysqli_query($database->dblink,"SELECT Count(*) as Total FROM ".TB_PREFIX."users WHERE tribe = 2"), MYSQLI_ASSOC);
|
||||
$tribe3 = mysqli_fetch_array(mysqli_query($database->dblink,"SELECT Count(*) as Total FROM ".TB_PREFIX."users WHERE tribe = 3"), MYSQLI_ASSOC);
|
||||
$tribes = array($tribe1['Total'], $tribe2['Total'], $tribe3['Total']);
|
||||
$users = mysqli_fetch_array(mysqli_query($GLOBALS['link'],"SELECT Count(*) as Total FROM " . TB_PREFIX . "users WHERE tribe!=0 AND tribe!=4 AND tribe!=5"), MYSQLI_ASSOC);
|
||||
$users = mysqli_fetch_array(mysqli_query($database->dblink,"SELECT Count(*) as Total FROM " . TB_PREFIX . "users WHERE tribe!=0 AND tribe!=4 AND tribe!=5"), MYSQLI_ASSOC);
|
||||
$users = $users['Total'];
|
||||
?>
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
<th>Active players</th>
|
||||
|
||||
<td><?php
|
||||
$active = mysqli_num_rows(mysqli_query($GLOBALS['link'],"SELECT * FROM ".TB_PREFIX."users WHERE timestamp > ".(time() - (3600*24))." AND tribe!=0 AND tribe!=4 AND tribe!=5"));
|
||||
$active = mysqli_num_rows(mysqli_query($database->dblink,"SELECT * FROM ".TB_PREFIX."users WHERE timestamp > ".(time() - (3600*24))." AND tribe!=0 AND tribe!=4 AND tribe!=5"));
|
||||
echo $active; ?></td>
|
||||
</tr>
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
<th>Players online</th>
|
||||
|
||||
<td><?php
|
||||
$online = mysqli_query($GLOBALS['link'],"SELECT Count(*) as Total FROM ".TB_PREFIX."users WHERE timestamp > ".(time() - (60*10))." AND tribe!=0 AND tribe!=4 AND tribe!=5");
|
||||
$online = mysqli_query($database->dblink,"SELECT Count(*) as Total FROM ".TB_PREFIX."users WHERE timestamp > ".(time() - (60*10))." AND tribe!=0 AND tribe!=4 AND tribe!=5");
|
||||
if (!empty($online)) {
|
||||
echo mysqli_fetch_assoc($online)['Total'];
|
||||
} else {
|
||||
|
||||
@@ -6,8 +6,8 @@
|
||||
echo "Row ".$i;
|
||||
}
|
||||
|
||||
$result = mysqli_query($GLOBALS['link'],"SELECT * FROM ".TB_PREFIX."users WHERE access<".(INCLUDE_ADMIN?"10":"8")." AND id > 5 AND tribe<=3 AND tribe > 0 ORDER BY ap DESC, id DESC Limit 10");
|
||||
$result2 = mysqli_query($GLOBALS['link'],"SELECT * FROM ".TB_PREFIX."users WHERE id = '".$session->uid."' ORDER BY ap DESC, id DESC Limit 1");
|
||||
$result = mysqli_query($database->dblink,"SELECT * FROM ".TB_PREFIX."users WHERE access<".(INCLUDE_ADMIN?"10":"8")." AND id > 5 AND tribe<=3 AND tribe > 0 ORDER BY ap DESC, id DESC Limit 10");
|
||||
$result2 = mysqli_query($database->dblink,"SELECT * FROM ".TB_PREFIX."users WHERE id = '".$session->uid."' ORDER BY ap DESC, id DESC Limit 1");
|
||||
?>
|
||||
<table cellpadding="1" cellspacing="1">
|
||||
<thead>
|
||||
@@ -67,8 +67,8 @@
|
||||
for($i=1;$i<=0;$i++) {
|
||||
echo "Row ".$i;
|
||||
}
|
||||
$result = mysqli_query($GLOBALS['link'],"SELECT * FROM ".TB_PREFIX."users WHERE access<".(INCLUDE_ADMIN?"10":"8")." AND id > 5 AND tribe<=3 AND tribe > 0 ORDER BY dp DESC, id DESC Limit 10");
|
||||
$result2 = mysqli_query($GLOBALS['link'],"SELECT * FROM ".TB_PREFIX."users WHERE id = '".$session->uid."' ORDER BY dp DESC Limit 1");
|
||||
$result = mysqli_query($database->dblink,"SELECT * FROM ".TB_PREFIX."users WHERE access<".(INCLUDE_ADMIN?"10":"8")." AND id > 5 AND tribe<=3 AND tribe > 0 ORDER BY dp DESC, id DESC Limit 10");
|
||||
$result2 = mysqli_query($database->dblink,"SELECT * FROM ".TB_PREFIX."users WHERE id = '".$session->uid."' ORDER BY dp DESC Limit 1");
|
||||
?>
|
||||
<table cellpadding="1" cellspacing="1" id="top10_defs" class="top10 row_table_data">
|
||||
<thead>
|
||||
@@ -121,8 +121,8 @@
|
||||
for($i=1;$i<=0;$i++) {
|
||||
echo "Row ".$i;
|
||||
}
|
||||
$result = mysqli_query($GLOBALS['link'],"SELECT * FROM ".TB_PREFIX."users WHERE access<".(INCLUDE_ADMIN?"10":"8")." AND id > 5 AND tribe<=3 AND tribe > 0 ORDER BY clp DESC, id DESC Limit 10");
|
||||
$result2 = mysqli_query($GLOBALS['link'],"SELECT * FROM ".TB_PREFIX."users WHERE id = '".$session->uid."' ORDER BY clp DESC Limit 1");
|
||||
$result = mysqli_query($database->dblink,"SELECT * FROM ".TB_PREFIX."users WHERE access<".(INCLUDE_ADMIN?"10":"8")." AND id > 5 AND tribe<=3 AND tribe > 0 ORDER BY clp DESC, id DESC Limit 10");
|
||||
$result2 = mysqli_query($database->dblink,"SELECT * FROM ".TB_PREFIX."users WHERE id = '".$session->uid."' ORDER BY clp DESC Limit 1");
|
||||
?>
|
||||
<div class="clear"></div>
|
||||
<table cellpadding="1" cellspacing="1" id="top10_climbers" class="top10 row_table_data">
|
||||
@@ -173,8 +173,8 @@
|
||||
for($i=1;$i<=0;$i++) {
|
||||
echo "Row ".$i;
|
||||
}
|
||||
$result = mysqli_query($GLOBALS['link'],"SELECT * FROM ".TB_PREFIX."users WHERE access<".(INCLUDE_ADMIN?"10":"8")." AND id > 5 AND tribe<=3 AND tribe > 0 ORDER BY RR DESC, id DESC Limit 10");
|
||||
$result2 = mysqli_query($GLOBALS['link'],"SELECT * FROM ".TB_PREFIX."users WHERE id = '".$session->uid."' ORDER BY RR DESC Limit 1");
|
||||
$result = mysqli_query($database->dblink,"SELECT * FROM ".TB_PREFIX."users WHERE access<".(INCLUDE_ADMIN?"10":"8")." AND id > 5 AND tribe<=3 AND tribe > 0 ORDER BY RR DESC, id DESC Limit 10");
|
||||
$result2 = mysqli_query($database->dblink,"SELECT * FROM ".TB_PREFIX."users WHERE id = '".$session->uid."' ORDER BY RR DESC Limit 1");
|
||||
?>
|
||||
<table cellpadding="1" cellspacing="1" id="top10_raiders" class="top10 row_table_data">
|
||||
<thead>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
if (WW == True)
|
||||
{
|
||||
$result = mysqli_query($GLOBALS['link'],"select " . TB_PREFIX . "users.id, " . TB_PREFIX . "users.username," . TB_PREFIX . "users.alliance, " . TB_PREFIX . "fdata.wwname, " . TB_PREFIX . "fdata.f99, " . TB_PREFIX . "vdata.name, " . TB_PREFIX . "fdata.vref
|
||||
$result = mysqli_query($database->dblink,"select " . TB_PREFIX . "users.id, " . TB_PREFIX . "users.username," . TB_PREFIX . "users.alliance, " . TB_PREFIX . "fdata.wwname, " . TB_PREFIX . "fdata.f99, " . TB_PREFIX . "vdata.name, " . TB_PREFIX . "fdata.vref
|
||||
FROM " . TB_PREFIX . "users
|
||||
INNER JOIN " . TB_PREFIX . "vdata ON " . TB_PREFIX . "users.id = " . TB_PREFIX . "vdata.owner
|
||||
INNER JOIN " . TB_PREFIX . "fdata ON " . TB_PREFIX . "fdata.vref = " . TB_PREFIX . "vdata.wref
|
||||
@@ -27,7 +27,7 @@ if (WW == True)
|
||||
while ($row = mysqli_fetch_array($result))
|
||||
{
|
||||
$ally = $database->getAlliance($row['alliance']);
|
||||
$query = @mysqli_query($GLOBALS['link'],'SELECT * FROM `' . TB_PREFIX . 'ww_attacks` WHERE `vid` = ' . $row['vref'] . ' ORDER BY `attack_time` ASC LIMIT 1');
|
||||
$query = @mysqli_query($database->dblink,'SELECT * FROM `' . TB_PREFIX . 'ww_attacks` WHERE `vid` = ' . $row['vref'] . ' ORDER BY `attack_time` ASC LIMIT 1');
|
||||
$row2 = @mysqli_fetch_assoc($query);
|
||||
?>
|
||||
<tr>
|
||||
|
||||
@@ -138,7 +138,7 @@ $tocoor = $database->getCoor($enforce['vref']);
|
||||
}
|
||||
if ($enforce['hero']>0){
|
||||
$qh = "SELECT unit FROM ".TB_PREFIX."hero WHERE uid = ".(int) $to['owner']." AND dead = 0";
|
||||
$resulth = mysqli_query($GLOBALS['link'],$qh);
|
||||
$resulth = mysqli_query($database->dblink,$qh);
|
||||
$hero_f=mysqli_fetch_array($resulth);
|
||||
$hero_unit=$hero_f['unit'];
|
||||
$speeds[] = $GLOBALS['u'.$hero_unit]['speed'];
|
||||
|
||||
@@ -139,7 +139,7 @@ $tocoor = $database->getCoor($enforce['vref']);
|
||||
}
|
||||
if ($enforce['hero']>0){
|
||||
$qh = "SELECT unit FROM ".TB_PREFIX."hero WHERE uid = ".(int) $to['owner']." AND dead = 0";
|
||||
$resulth = mysqli_query($GLOBALS['link'],$qh);
|
||||
$resulth = mysqli_query($database->dblink,$qh);
|
||||
$hero_f=mysqli_fetch_array($resulth);
|
||||
$hero_unit=$hero_f['unit'];
|
||||
$speeds[] = $GLOBALS['u'.$hero_unit]['speed'];
|
||||
|
||||
@@ -138,7 +138,7 @@ $tocoor = $database->getCoor($enforce['vref']);
|
||||
}
|
||||
if ($enforce['hero']>0){
|
||||
$qh = "SELECT unit FROM ".TB_PREFIX."hero WHERE uid = ".(int) $to['owner']." AND dead = 0";
|
||||
$resulth = mysqli_query($GLOBALS['link'],$qh);
|
||||
$resulth = mysqli_query($database->dblink,$qh);
|
||||
$hero_f=mysqli_fetch_array($resulth);
|
||||
$hero_unit=$hero_f['unit'];
|
||||
$speeds[] = $GLOBALS['u'.$hero_unit]['speed'];
|
||||
|
||||
@@ -139,7 +139,7 @@ $tocoor = $database->getCoor($enforce['vref']);
|
||||
}
|
||||
if ($enforce['hero']>0){
|
||||
$qh = "SELECT unit FROM ".TB_PREFIX."hero WHERE uid = ".(int) $to['owner']." AND dead = 0";
|
||||
$resulth = mysqli_query($GLOBALS['link'],$qh);
|
||||
$resulth = mysqli_query($database->dblink,$qh);
|
||||
$hero_f=mysqli_fetch_array($resulth);
|
||||
$hero_unit=$hero_f['unit'];
|
||||
$speeds[] = $GLOBALS['u'.$hero_unit]['speed'];
|
||||
|
||||
@@ -138,7 +138,7 @@ $tocoor = $database->getCoor($enforce['vref']);
|
||||
}
|
||||
if ($enforce['hero']>0){
|
||||
$qh = "SELECT unit FROM ".TB_PREFIX."hero WHERE uid = ".(int) $to['owner']." AND dead = 0";
|
||||
$resulth = mysqli_query($GLOBALS['link'],$qh);
|
||||
$resulth = mysqli_query($database->dblink,$qh);
|
||||
$hero_f=mysqli_fetch_array($resulth);
|
||||
$hero_unit=$hero_f['unit'];
|
||||
$speeds[] = $GLOBALS['u'.$hero_unit]['speed'];
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
$sql = "SELECT id, towref, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10 FROM ".TB_PREFIX."raidlist WHERE lid = ".$database->escape((int) $lid)." order by id asc";
|
||||
$array = $database->query_return($sql);
|
||||
foreach($array as $row){
|
||||
$sql1 = mysqli_fetch_array(mysqli_query($GLOBALS['link'],"SELECT * FROM ".TB_PREFIX."units WHERE vref = ".(int) $getFLData['wref']));
|
||||
$sql1 = mysqli_fetch_array(mysqli_query($database->dblink,"SELECT * FROM ".TB_PREFIX."units WHERE vref = ".(int) $getFLData['wref']));
|
||||
$sid = $row['id'];
|
||||
$wref = $row['towref'];
|
||||
$t1 = $row['t1'];$t2 = $row['t2'];$t3 = $row['t3'];$t4 = $row['t4'];$t5 = $row['t5'];
|
||||
|
||||
@@ -9,7 +9,7 @@ if(isset($_GET['t'])==99 && isset($_POST['action'])=='addList' && $_POST['did']!
|
||||
exit;
|
||||
}
|
||||
|
||||
$sql = mysqli_query($GLOBALS['link'],"SELECT id, name, owner, wref FROM ".TB_PREFIX."farmlist WHERE owner = ".(int) $session->uid." ORDER BY wref DESC");
|
||||
$sql = mysqli_query($database->dblink,"SELECT id, name, owner, wref FROM ".TB_PREFIX."farmlist WHERE owner = ".(int) $session->uid." ORDER BY wref DESC");
|
||||
$query = mysqli_num_rows($sql);
|
||||
while($row = mysqli_fetch_array($sql)){
|
||||
$lid = $row["id"];
|
||||
@@ -51,7 +51,7 @@ while($row = mysqli_fetch_array($sql)){
|
||||
<tbody>
|
||||
|
||||
<?php
|
||||
$sql2 = mysqli_query($GLOBALS['link'],"SELECT * FROM ".TB_PREFIX."raidlist WHERE lid = ".(int) $lid." ORDER BY distance ASC");
|
||||
$sql2 = mysqli_query($database->dblink,"SELECT * FROM ".TB_PREFIX."raidlist WHERE lid = ".(int) $lid." ORDER BY distance ASC");
|
||||
$query2 = mysqli_num_rows($sql2);
|
||||
if($query2 == 0) {
|
||||
echo '<td class="noData" colspan="7">There is not any raid list.</td>';
|
||||
@@ -193,7 +193,7 @@ $vdata = $database->getVillage($towref);
|
||||
<?php
|
||||
$noticeClass = array("Scout Report","Won as attacker without losses","Won as attacker with losses","Lost as attacker with losses","Won as defender without losses","Won as defender with losses","Lost as defender with losses","Lost as defender without losses","Reinforcement arrived","","Wood Delivered","Clay Delivered","Iron Delivered","Crop Delivered","","Won as defender without losses","Won as defender with losses","Lost as defender with losses","Won scouting as attacker","Lost scouting as attacker","Won scouting as defender","Lost scouting as defender");
|
||||
$limits = "(ntype=1 or ntype=2 or ntype=3 or ntype=18 or ntype=19 or ntype=22)";
|
||||
$getnotice = mysqli_query($GLOBALS['link'],"SELECT ntype, data, time, id FROM ".TB_PREFIX."ndata WHERE $limits AND toWref = ".(int) $towref." AND uid = ".(int) $session->uid." ORDER BY time DESC Limit 1");
|
||||
$getnotice = mysqli_query($database->dblink,"SELECT ntype, data, time, id FROM ".TB_PREFIX."ndata WHERE $limits AND toWref = ".(int) $towref." AND uid = ".(int) $session->uid." ORDER BY time DESC Limit 1");
|
||||
if(mysqli_num_rows($getnotice) > 0){
|
||||
while($row2 = mysqli_fetch_array($getnotice)){
|
||||
$dataarray = explode(",",$row2['data']);
|
||||
@@ -316,7 +316,7 @@ if(!$database->getVilFarmlist($village->wid)){
|
||||
{
|
||||
Travian.Game.RaidList.setData({
|
||||
<?php
|
||||
$result = mysqli_query($GLOBALS['link'],'SELECT id FROM '.TB_PREFIX.'farmlist WHERE wref = '.(int) $village->wid.'');
|
||||
$result = mysqli_query($database->dblink,'SELECT id FROM '.TB_PREFIX.'farmlist WHERE wref = '.(int) $village->wid.'');
|
||||
$query1 = mysqli_num_rows($result);
|
||||
$NUM1 = 1;
|
||||
while($row = mysqli_fetch_array($result)){
|
||||
@@ -327,7 +327,7 @@ $lid = $row['id'];
|
||||
"troops":{"1":<?php echo $unit1; ?>,"2":<?php echo $unit2; ?>,"3":<?php echo $unit3; ?>,"4":<?php echo $unit4; ?>,"5":<?php echo $unit5; ?>,"6":<?php echo $unit6; ?>,"7":<?php echo $unit7; ?>,"8":<?php echo $unit8; ?>,"9":<?php echo $unit9; ?>,"10":<?php echo $unit10; ?>,"11":<?php echo $getUnit['hero']; ?>},
|
||||
"directions":{"village":"none","ew":"none","distance":"asc","troops":"none","lastRaid":"none"},
|
||||
"slots":{<?php
|
||||
$result3 = mysqli_query($GLOBALS['link'],'SELECT * FROM '.TB_PREFIX.'raidlist WHERE lid = '.(int) $lid.'');
|
||||
$result3 = mysqli_query($database->dblink,'SELECT * FROM '.TB_PREFIX.'raidlist WHERE lid = '.(int) $lid.'');
|
||||
$query2 = mysqli_num_rows($result3);
|
||||
$NUM2 = 1;
|
||||
while($row3 = mysqli_fetch_array($result3)){
|
||||
|
||||
@@ -86,7 +86,7 @@ $vdata = $database->getVillage($Wref);
|
||||
<select name="lid">
|
||||
<?php
|
||||
|
||||
$sql = mysqli_query($GLOBALS['link'],"SELECT id, name, owner, wref FROM ".TB_PREFIX."farmlist WHERE owner = ".(int) $session->uid." ORDER BY name ASC");
|
||||
$sql = mysqli_query($database->dblink,"SELECT id, name, owner, wref FROM ".TB_PREFIX."farmlist WHERE owner = ".(int) $session->uid." ORDER BY name ASC");
|
||||
while($row = mysqli_fetch_array($sql)){
|
||||
$lid = $row["id"];
|
||||
$lname = $row["name"];
|
||||
@@ -124,7 +124,7 @@ $lvname = $database->getVillageField($row["wref"], 'name');
|
||||
$getwref = "SELECT towref FROM ".TB_PREFIX."raidlist WHERE lid = ".$database->escape((int) $_GET['lid'])."";
|
||||
$arraywref = $database->query_return($getwref);
|
||||
echo '<option value="">Select village</option>';
|
||||
if(mysqli_num_rows(mysqli_query($GLOBALS['link'],$getwref)) != 0){
|
||||
if(mysqli_num_rows(mysqli_query($database->dblink,$getwref)) != 0){
|
||||
foreach($arraywref as $row){
|
||||
$towref = $row["towref"];
|
||||
$tocoor = $database->getCoor($towref);
|
||||
|
||||
@@ -93,7 +93,7 @@ $lid2 = $getlid['lid'];
|
||||
<td>
|
||||
<select onchange="getTargetsByLid();" id="lid" name="lid">
|
||||
<?php
|
||||
$sql = mysqli_query($GLOBALS['link'],"SELECT id, name, owner, wref FROM ".TB_PREFIX."farmlist WHERE owner = ".(int) $session->uid." ORDER BY name ASC");
|
||||
$sql = mysqli_query($database->dblink,"SELECT id, name, owner, wref FROM ".TB_PREFIX."farmlist WHERE owner = ".(int) $session->uid." ORDER BY name ASC");
|
||||
while($row = mysqli_fetch_array($sql)){
|
||||
$lid = $row["id"];
|
||||
$lname = $row["name"];
|
||||
@@ -130,7 +130,7 @@ $lvname = $database->getVillageField($row["wref"], 'name');
|
||||
$getwref = "SELECT id, towref FROM ".TB_PREFIX."raidlist WHERE lid = ".(int) $lid2;
|
||||
$arraywref = $database->query_return($getwref);
|
||||
echo '<option value="">Select village</option>';
|
||||
if(mysqli_num_rows(mysqli_query($GLOBALS['link'],$getwref)) != 0){
|
||||
if(mysqli_num_rows(mysqli_query($database->dblink,$getwref)) != 0){
|
||||
foreach($arraywref as $row){
|
||||
$towref = $row["towref"];
|
||||
$tocoor = $database->getCoor($towref);
|
||||
|
||||
Reference in New Issue
Block a user