mirror of
https://github.com/Shadowss/TravianZ.git
synced 2026-07-01 10:04:21 +00:00
@@ -20,3 +20,7 @@ GameEngine/Notes/*
|
||||
|
||||
# Install instalation_done marker left by install script
|
||||
install/installation_done
|
||||
/.buildpath
|
||||
/.project
|
||||
/installed_*/
|
||||
/installation_done
|
||||
|
||||
@@ -13,8 +13,8 @@
|
||||
|
||||
include_once("../../Account.php");
|
||||
|
||||
mysql_connect(SQL_SERVER, SQL_USER, SQL_PASS);
|
||||
mysql_select_db(SQL_DB);
|
||||
mysqli_connect(SQL_SERVER, SQL_USER, SQL_PASS);
|
||||
mysqli_select_db(SQL_DB);
|
||||
|
||||
if (!isset($_SESSION)) session_start();
|
||||
if($_SESSION['access'] < ADMIN) die("Access Denied: You are not Admin!");
|
||||
@@ -85,22 +85,22 @@ $u50 = $_POST['u50'];
|
||||
|
||||
if($user['tribe'] == 1){
|
||||
$q = "UPDATE ".TB_PREFIX."units SET u1 = $u1, u2 = $u2, u3 = $u3, u4 = $u4, u5 = $u5, u6 = $u6, u7 = $u7, u8 = $u8, u9 = $u9, u10 = $u10 WHERE vref = $id";
|
||||
mysql_query($q);
|
||||
mysqli_query($GLOBALS["link"], $q);
|
||||
} else if($user['tribe'] == 2){
|
||||
$q = "UPDATE ".TB_PREFIX."units SET u11 = '$u11', u12 = '$u12', u13 = '$u13', u14 = '$u14', u15 = '$u15', u16 = '$u16', u17 = '$u17', u18 = '$u18', u19 = '$u19', u20 = '$u20' WHERE vref = $id";
|
||||
mysql_query($q);
|
||||
mysqli_query($GLOBALS["link"], $q);
|
||||
} else if($user['tribe'] == 3){
|
||||
$q = "UPDATE ".TB_PREFIX."units SET u21 = '$u21', u22 = '$u22', u23 = '$u23', u24 = '$u24', u25 = '$u25', u26 = '$u26', u27 = '$u27', u28 = '$u28', u29 = '$u29', u30 = '$u30' WHERE vref = $id";
|
||||
mysql_query($q);
|
||||
mysqli_query($GLOBALS["link"], $q);
|
||||
} else if($user['tribe'] == 4){
|
||||
$q = "UPDATE ".TB_PREFIX."units SET u31 = '$u31', u32 = '$u32', u33 = '$u33', u34 = '$u34', u35 = '$u35', u36 = '$u36', u37 = '$u37', u38 = '$u38', u39 = '$u39', u40 = '$u40' WHERE vref = $id";
|
||||
mysql_query($q);
|
||||
mysqli_query($GLOBALS["link"], $q);
|
||||
} else if($user['tribe'] == 5){
|
||||
$q = "UPDATE ".TB_PREFIX."units SET u41 = '$u41', u42 = '$u42', u43 = '$u43', u44 = '$u44', u45 = '$u45', u46 = '$u46', u47 = '$u47', u48 = '$u48', u49 = '$u49', u50 = '$u50' WHERE vref = $id";
|
||||
mysql_query($q);
|
||||
mysqli_query($GLOBALS["link"], $q);
|
||||
}
|
||||
|
||||
mysql_query("Insert into ".TB_PREFIX."admin_log values (0,".$_SESSION['id'].",'Changed troop anmount in village <a href=\'admin.php?p=village&did=$id\'>$id</a> ',".time().")");
|
||||
mysqli_query($GLOBALS["link"], "Insert into ".TB_PREFIX."admin_log values (0,".$_SESSION['id'].",'Changed troop anmount in village <a href=\'admin.php?p=village&did=$id\'>$id</a> ',".time().")");
|
||||
|
||||
header("Location: ../../../Admin/admin.php?p=addTroops&did=".$id."&d");
|
||||
|
||||
|
||||
+4
-4
@@ -10,17 +10,17 @@
|
||||
## ##
|
||||
#################################################################################
|
||||
include_once("../../Account.php");
|
||||
mysql_connect(SQL_SERVER, SQL_USER, SQL_PASS);
|
||||
mysql_select_db(SQL_DB);
|
||||
mysqli_connect(SQL_SERVER, SQL_USER, SQL_PASS);
|
||||
mysqli_select_db(SQL_DB);
|
||||
if (!isset($_SESSION)) session_start();
|
||||
if($_SESSION['access'] < ADMIN) die("Access Denied: You are not Admin!");
|
||||
|
||||
$id = $_POST['id'];
|
||||
$admid = $_POST['admid'];
|
||||
mysql_query("UPDATE ".TB_PREFIX."users SET cp = cp + ".$_POST['cp']." WHERE id = ".$id."");
|
||||
mysqli_query($GLOBALS["link"], "UPDATE ".TB_PREFIX."users SET cp = cp + ".$_POST['cp']." WHERE id = ".$id."");
|
||||
|
||||
$name = $database->getUserField($id,"username",0);
|
||||
mysql_query("Insert into ".TB_PREFIX."admin_log values (0,$admid,'Added ".$_POST['cp']." Cultural Points to user <a href=\'admin.php?p=player&uid=$id\'>$name</a> ',".time().")");
|
||||
mysqli_query($GLOBALS["link"], "Insert into ".TB_PREFIX."admin_log values (0,$admid,'Added ".$_POST['cp']." Cultural Points to user <a href=\'admin.php?p=player&uid=$id\'>$name</a> ',".time().")");
|
||||
|
||||
header("Location: ../../../Admin/admin.php?p=player&uid=".$id."&cp=ok");
|
||||
?>
|
||||
@@ -10,15 +10,15 @@
|
||||
#################################################################################
|
||||
|
||||
include_once("../../Account.php");
|
||||
mysql_connect(SQL_SERVER, SQL_USER, SQL_PASS);
|
||||
mysql_select_db(SQL_DB);
|
||||
mysqli_connect(SQL_SERVER, SQL_USER, SQL_PASS);
|
||||
mysqli_select_db(SQL_DB);
|
||||
if (!isset($_SESSION)) session_start();
|
||||
if($_SESSION['access'] < ADMIN) die("Access Denied: You are not Admin!");
|
||||
|
||||
|
||||
|
||||
$userid = $_POST['userid'];
|
||||
mysql_query("DELETE FROM ".TB_PREFIX."medal WHERE userid = ".$userid."");
|
||||
mysqli_query($GLOBALS["link"], "DELETE FROM ".TB_PREFIX."medal WHERE userid = ".$userid."");
|
||||
|
||||
header("Location: ../../../Admin/admin.php?p=player&uid=".$userid."");
|
||||
?>
|
||||
@@ -10,15 +10,15 @@
|
||||
#################################################################################
|
||||
|
||||
include_once("../../Account.php");
|
||||
mysql_connect(SQL_SERVER, SQL_USER, SQL_PASS);
|
||||
mysql_select_db(SQL_DB);
|
||||
mysqli_connect(SQL_SERVER, SQL_USER, SQL_PASS);
|
||||
mysqli_select_db(SQL_DB);
|
||||
if (!isset($_SESSION)) session_start();
|
||||
if($_SESSION['access'] < ADMIN) die("Access Denied: You are not Admin!");
|
||||
|
||||
|
||||
|
||||
$deleteweek = $_POST['medalweek'];
|
||||
mysql_query("DELETE FROM ".TB_PREFIX."medal WHERE week = ".$deleteweek."");
|
||||
mysqli_query($GLOBALS["link"], "DELETE FROM ".TB_PREFIX."medal WHERE week = ".$deleteweek."");
|
||||
|
||||
header("Location: ../../../Admin/admin.php?p=delmedal");
|
||||
?>
|
||||
@@ -10,15 +10,15 @@
|
||||
## ##
|
||||
#################################################################################
|
||||
include_once("../../Account.php");
|
||||
mysql_connect(SQL_SERVER, SQL_USER, SQL_PASS);
|
||||
mysql_select_db(SQL_DB);
|
||||
mysqli_connect(SQL_SERVER, SQL_USER, SQL_PASS);
|
||||
mysqli_select_db(SQL_DB);
|
||||
if (!isset($_SESSION)) session_start();
|
||||
if($_SESSION['access'] < ADMIN) die("Access Denied: You are not Admin!");
|
||||
|
||||
$id = $_POST['id'];
|
||||
$user = $database->getUserArray($id,1);
|
||||
mysql_query("UPDATE ".TB_PREFIX."users SET email = '".$_POST['email']."', tribe = ".$_POST['tribe'].", location = '".$_POST['location']."', desc1 = '".$_POST['desc1']."', `desc2` = '".$_POST['desc2']."' WHERE id = ".$_POST['id']."");
|
||||
mysql_query("Insert into ".TB_PREFIX."admin_log values (0,".$_SESSION['id'].",'Changed <a href=\'admin.php?p=village&did=$id\'>".$user['username']."</a>\'s profile',".time().")");
|
||||
mysqli_query($GLOBALS["link"], "UPDATE ".TB_PREFIX."users SET email = '".$_POST['email']."', tribe = ".$_POST['tribe'].", location = '".$_POST['location']."', desc1 = '".$_POST['desc1']."', `desc2` = '".$_POST['desc2']."' WHERE id = ".$_POST['id']."");
|
||||
mysqli_query($GLOBALS["link"], "Insert into ".TB_PREFIX."admin_log values (0,".$_SESSION['id'].",'Changed <a href=\'admin.php?p=village&did=$id\'>".$user['username']."</a>\'s profile',".time().")");
|
||||
|
||||
|
||||
header("Location: ../../../Admin/admin.php?p=player&uid=".$id."");
|
||||
|
||||
+4
-4
@@ -10,8 +10,8 @@
|
||||
## ##
|
||||
#################################################################################
|
||||
include_once("../../Account.php");
|
||||
mysql_connect(SQL_SERVER, SQL_USER, SQL_PASS);
|
||||
mysql_select_db(SQL_DB);
|
||||
mysqli_connect(SQL_SERVER, SQL_USER, SQL_PASS);
|
||||
mysqli_select_db(SQL_DB);
|
||||
if (!isset($_SESSION)) session_start();
|
||||
if($_SESSION['access'] < ADMIN) die("Access Denied: You are not Admin!");
|
||||
|
||||
@@ -19,8 +19,8 @@ $id = $_POST['id'];
|
||||
$gold = $_POST['gold'];
|
||||
|
||||
$q = "UPDATE ".TB_PREFIX."users SET gold = gold + ".$_POST['gold']." WHERE id != '0'";
|
||||
mysql_query($q);
|
||||
mysql_query("Insert into ".TB_PREFIX."admin_log values (0,$id,'Added <b>$gold</b> gold to all users',".time().")");
|
||||
mysqli_query($GLOBALS["link"], $q);
|
||||
mysqli_query($GLOBALS["link"], "Insert into ".TB_PREFIX."admin_log values (0,$id,'Added <b>$gold</b> gold to all users',".time().")");
|
||||
|
||||
|
||||
header("Location: ../../../Admin/admin.php?p=gold&g");
|
||||
|
||||
@@ -10,17 +10,17 @@
|
||||
## ##
|
||||
#################################################################################
|
||||
include_once("../../Account.php");
|
||||
mysql_connect(SQL_SERVER, SQL_USER, SQL_PASS);
|
||||
mysql_select_db(SQL_DB);
|
||||
mysqli_connect(SQL_SERVER, SQL_USER, SQL_PASS);
|
||||
mysqli_select_db(SQL_DB);
|
||||
if (!isset($_SESSION)) session_start();
|
||||
if($_SESSION['access'] < ADMIN) die("Access Denied: You are not Admin!");
|
||||
|
||||
$id = $_POST['id'];
|
||||
$admid = $_POST['admid'];
|
||||
mysql_query("UPDATE ".TB_PREFIX."users SET gold = gold + ".$_POST['gold']." WHERE id = ".$id."");
|
||||
mysqli_query($GLOBALS["link"], "UPDATE ".TB_PREFIX."users SET gold = gold + ".$_POST['gold']." WHERE id = ".$id."");
|
||||
|
||||
$name = $database->getUserField($id,"username",0);
|
||||
mysql_query("Insert into ".TB_PREFIX."admin_log values (0,$admid,'Added <b>".$_POST['gold']."</b> gold to user <a href=\'admin.php?p=player&uid=$id\'>$name</a> ',".time().")");
|
||||
mysqli_query($GLOBALS["link"], "Insert into ".TB_PREFIX."admin_log values (0,$admid,'Added <b>".$_POST['gold']."</b> gold to user <a href=\'admin.php?p=player&uid=$id\'>$name</a> ',".time().")");
|
||||
|
||||
header("Location: ../../../Admin/admin.php?p=player&uid=".$id."&g=ok");
|
||||
?>
|
||||
@@ -10,10 +10,10 @@
|
||||
#################################################################################
|
||||
?>
|
||||
<div style="margin-top: 50px;">
|
||||
<center>
|
||||
<div style="text-align: center">
|
||||
<h1>404 - File not found</h1>
|
||||
<img src="../../gpack/travian_default/img/misc/404.gif" title="Not Found" alt="Not Found"><br />
|
||||
<p>We looked 404 times already but can't find anything, Not even an X marking the spot.</p>
|
||||
<p>This system is not complete yet. So the page probably does not exist.</p><br>
|
||||
</center>
|
||||
</div>
|
||||
</div>
|
||||
@@ -11,8 +11,8 @@
|
||||
|
||||
include_once("../../Account.php");
|
||||
|
||||
mysql_connect(SQL_SERVER, SQL_USER, SQL_PASS);
|
||||
mysql_select_db(SQL_DB);
|
||||
mysqli_connect(SQL_SERVER, SQL_USER, SQL_PASS);
|
||||
mysqli_select_db(SQL_DB);
|
||||
|
||||
if (!isset($_SESSION)) session_start();
|
||||
if($_SESSION['access'] < ADMIN) die("Access Denied: You are not Admin!");
|
||||
@@ -20,16 +20,16 @@ if($_SESSION['access'] < ADMIN) die("Access Denied: You are not Admin!");
|
||||
$medalid = $_POST['medalid'];
|
||||
$uid = $_POST['uid'];
|
||||
|
||||
mysql_query("DELETE FROM ".TB_PREFIX."medal WHERE id = ".$medalid."");
|
||||
mysqli_query($GLOBALS["link"], "DELETE FROM ".TB_PREFIX."medal WHERE id = ".$medalid."");
|
||||
|
||||
$name = mysql_query("SELECT name FROM ".TB_PREFIX."users WHERE id= ".$uid."");
|
||||
$name = mysql_result($name, 0);
|
||||
$name = mysqli_query($GLOBALS["link"], "SELECT name FROM ".TB_PREFIX."users WHERE id= ".$uid."");
|
||||
$name = mysqli_result($name, 0);
|
||||
|
||||
mysql_query("Insert into ".TB_PREFIX."admin_log values (0,$admid,'Deleted medal id [#".$medalid."] from the user <a href=\'admin.php?p=player&uid=$uid\'>$name</a> ',".time().")");
|
||||
mysqli_query($GLOBALS["link"], "Insert into ".TB_PREFIX."admin_log values (0,$admid,'Deleted medal id [#".$medalid."] from the user <a href=\'admin.php?p=player&uid=$uid\'>$name</a> ',".time().")");
|
||||
|
||||
|
||||
$deleteweek = $_POST['medalweek'];
|
||||
mysql_query("DELETE FROM ".TB_PREFIX."medal WHERE week = ".$deleteweek."");
|
||||
mysqli_query($GLOBALS["link"], "DELETE FROM ".TB_PREFIX."medal WHERE week = ".$deleteweek."");
|
||||
|
||||
header("Location: ../../../Admin/admin.php?p=player&uid=".$uid."");
|
||||
?>
|
||||
@@ -10,8 +10,8 @@
|
||||
|
||||
include_once("../../Account.php");
|
||||
|
||||
mysql_connect(SQL_SERVER, SQL_USER, SQL_PASS);
|
||||
mysql_select_db(SQL_DB);
|
||||
mysqli_connect(SQL_SERVER, SQL_USER, SQL_PASS);
|
||||
mysqli_select_db(SQL_DB);
|
||||
|
||||
if (!isset($_SESSION)) session_start();
|
||||
if($_SESSION['access'] < ADMIN) die("Access Denied: You are not Admin!");
|
||||
@@ -20,7 +20,7 @@ $did = $_POST['did'];
|
||||
$name = $_POST['villagename'];
|
||||
$sql = "UPDATE ".TB_PREFIX."vdata SET name = '$name' WHERE wref = $did";
|
||||
|
||||
mysql_query($sql);
|
||||
mysqli_query($GLOBALS["link"], $sql);
|
||||
|
||||
header("Location: ../../../Admin/admin.php?p=village&did=".$did."&name=".$name."");
|
||||
?>
|
||||
@@ -9,8 +9,8 @@
|
||||
#################################################################################
|
||||
|
||||
include_once("../../GameEngine/Account.php");
|
||||
mysql_connect(SQL_SERVER, SQL_USER, SQL_PASS);
|
||||
mysql_select_db(SQL_DB);
|
||||
mysqli_connect(SQL_SERVER, SQL_USER, SQL_PASS);
|
||||
mysqli_select_db(SQL_DB);
|
||||
if (!isset($_SESSION)) session_start();
|
||||
if($_SESSION['access'] < ADMIN) die("Access Denied: You are not Admin!");
|
||||
|
||||
@@ -21,7 +21,7 @@ $time = time();
|
||||
|
||||
$query = "INSERT INTO ".TB_PREFIX."mdata (target, owner, topic, message, viewed, time) VALUES ('$uid', 1, '$topic', '$message', 0, '$time')";
|
||||
|
||||
mysql_query($query);
|
||||
mysqli_query($GLOBALS["link"], $query);
|
||||
|
||||
header("Location: ../../../Admin/admin.php?p=Newmessage&uid=".$uid."&msg=ok");
|
||||
?>
|
||||
@@ -12,8 +12,8 @@ $noticeClass = array("Scout Report","Won as attacker without losses","Won as att
|
||||
</tr>
|
||||
</thead><tfoot>
|
||||
<tr><th><?php
|
||||
$MyGold = mysql_query("SELECT * FROM ".TB_PREFIX."users WHERE `id`='".$session->uid."'") or die(mysql_error());
|
||||
$golds = mysql_fetch_array($MyGold);
|
||||
$MyGold = mysqli_query($GLOBALS["link"], "SELECT * FROM ".TB_PREFIX."users WHERE `id`='".$session->uid."'") or die(mysqli_error());
|
||||
$golds = mysqli_fetch_array($MyGold);
|
||||
$date2=strtotime("NOW");
|
||||
if ($golds['plus'] <= $date2) { ?>
|
||||
<?php } else { ?>
|
||||
|
||||
@@ -78,10 +78,10 @@ if($_GET['aid'])
|
||||
<?php
|
||||
error_reporting(0);
|
||||
$sql = "SELECT * FROM ".TB_PREFIX."ali_permission WHERE alliance = ".$_GET['aid']."";
|
||||
$result = mysql_query($sql);
|
||||
while($row = mysql_fetch_assoc($result))
|
||||
$result = mysqli_query($GLOBALS["link"], $sql);
|
||||
while($row = mysqli_fetch_assoc($result))
|
||||
{
|
||||
$player = mysql_fetch_assoc(mysql_query("SELECT * FROM ".TB_PREFIX."users WHERE id = ".$row['uid'].""));
|
||||
$player = mysqli_fetch_assoc(mysqli_query($GLOBALS["link"], "SELECT * FROM ".TB_PREFIX."users WHERE id = ".$row['uid'].""));
|
||||
if($row['opt1'] == 1) { $position1 = "Assign To Position"; } else { $position1 = "No Assigning Positions"; }
|
||||
if($row['opt2'] == 1) { $position2 = "Kick Players"; } else { $position2 = "No Kicking Players"; }
|
||||
if($row['opt3'] == 1) { $position3 = "Change Alliance Description"; } else { $position3 = "No Changing Description"; }
|
||||
@@ -236,8 +236,8 @@ if($_GET['aid'])
|
||||
</thead>
|
||||
<?php
|
||||
$sql = "SELECT * FROM ".TB_PREFIX."ali_log WHERE aid = ".$_GET['aid']."";
|
||||
$result = mysql_query($sql);
|
||||
while($row = mysql_fetch_assoc($result))
|
||||
$result = mysqli_query($GLOBALS["link"], $sql);
|
||||
while($row = mysqli_fetch_assoc($result))
|
||||
{
|
||||
echo '
|
||||
<tr>
|
||||
@@ -265,8 +265,8 @@ if($_GET['aid'])
|
||||
</thead>
|
||||
<?php
|
||||
$sql = "SELECT * FROM ".TB_PREFIX."diplomacy WHERE alli1 = ".$_GET['aid']."";
|
||||
$result = mysql_query($sql);
|
||||
while($row = mysql_fetch_assoc($result))
|
||||
$result = mysqli_query($GLOBALS["link"], $sql);
|
||||
while($row = mysqli_fetch_assoc($result))
|
||||
{
|
||||
if($row['type'] == 1) { $type = 'Confederation Pact'; }
|
||||
if($row['type'] == 2) { $type = 'Non Agression Pact'; }
|
||||
@@ -274,7 +274,7 @@ if($_GET['aid'])
|
||||
if($row['accepted'] == 0) { $accepted = "<img src=\"../../gpack/travian_default/img/a/del.gif\">"; }
|
||||
if($row['accepted'] ==1) { $accepted = "<img src=\"../../gpack/travian_default/img/a/acc.gif\">"; }
|
||||
|
||||
$ally = mysql_fetch_assoc(mysql_query("SELECT * FROM ".TB_PREFIX."alidata WHERE id = ".$row['alli2'].""));
|
||||
$ally = mysqli_fetch_assoc(mysqli_query($GLOBALS["link"], "SELECT * FROM ".TB_PREFIX."alidata WHERE id = ".$row['alli2'].""));
|
||||
echo '
|
||||
<tr>
|
||||
<td><a href="admin.php?p=alliance&aid='.$row['alli1'].'">'.$ally['tag'].'</a></td>
|
||||
@@ -300,8 +300,8 @@ if($_GET['aid'])
|
||||
</thead>
|
||||
<?php
|
||||
$sql = "SELECT * FROM ".TB_PREFIX."diplomacy WHERE alli2 = ".$_GET['aid']."";
|
||||
$result = mysql_query($sql);
|
||||
while($row = mysql_fetch_assoc($result))
|
||||
$result = mysqli_query($GLOBALS["link"], $sql);
|
||||
while($row = mysqli_fetch_assoc($result))
|
||||
{
|
||||
if($row['type'] == 1) { $type = 'Confederation Pact'; }
|
||||
if($row['type'] == 2) { $type = 'Non Agression Pact'; }
|
||||
@@ -309,7 +309,7 @@ if($_GET['aid'])
|
||||
if($row['accepted'] == 0) { $accepted = "<img src=\"../../gpack/travian_default/img/a/del.gif\">"; }
|
||||
if($row['accepted'] ==1) { $accepted = "<img src=\"../../gpack/travian_default/img/a/acc.gif\">"; }
|
||||
|
||||
$ally = mysql_fetch_assoc(mysql_query("SELECT * FROM ".TB_PREFIX."alidata WHERE id = ".$row['alli1'].""));
|
||||
$ally = mysqli_fetch_assoc(mysqli_query($GLOBALS["link"], "SELECT * FROM ".TB_PREFIX."alidata WHERE id = ".$row['alli1'].""));
|
||||
echo '
|
||||
<tr>
|
||||
<td><a href="admin.php?p=alliance&aid='.$row['alli2'].'">'.$ally['tag'].'</a></td>
|
||||
@@ -336,8 +336,8 @@ if($_GET['aid'])
|
||||
</thead>
|
||||
<?php
|
||||
$sql = "SELECT * FROM ".TB_PREFIX."diplomacy WHERE alli1 = ".$_GET['aid']." OR alli2 = ".$_GET['aid']." AND accepted = 1";
|
||||
$result = mysql_query($sql);
|
||||
while($row = mysql_fetch_assoc($result))
|
||||
$result = mysqli_query($GLOBALS["link"], $sql);
|
||||
while($row = mysqli_fetch_assoc($result))
|
||||
{
|
||||
if($row['type'] == 1) { $type = 'Confederation Pact'; }
|
||||
if($row['type'] == 2) { $type = 'Non Agression Pact'; }
|
||||
@@ -345,8 +345,8 @@ if($_GET['aid'])
|
||||
if($row['accepted'] == 0) { $accepted = "<img src=\"../../gpack/travian_default/img/a/del.gif\">"; }
|
||||
if($row['accepted'] == 1) { $accepted = "<img src=\"../../gpack/travian_default/img/a/acc.gif\">"; }
|
||||
|
||||
$ally1 = mysql_fetch_assoc(mysql_query("SELECT * FROM ".TB_PREFIX."alidata WHERE id = ".$row['alli1'].""));
|
||||
$ally2 = mysql_fetch_assoc(mysql_query("SELECT * FROM ".TB_PREFIX."alidata WHERE id = ".$row['alli2'].""));
|
||||
$ally1 = mysqli_fetch_assoc(mysqli_query($GLOBALS["link"], "SELECT * FROM ".TB_PREFIX."alidata WHERE id = ".$row['alli1'].""));
|
||||
$ally2 = mysqli_fetch_assoc(mysqli_query($GLOBALS["link"], "SELECT * FROM ".TB_PREFIX."alidata WHERE id = ".$row['alli2'].""));
|
||||
echo '
|
||||
<tr>
|
||||
<td><a href="admin.php?p=alliance&aid='.$row['alli1'].'">'.$ally1['tag'].'</a> & <a href="admin.php?p=alliance&aid='.$row['alli2'].'">'.$ally2['tag'].'</a></td>
|
||||
|
||||
@@ -10,10 +10,10 @@
|
||||
#################################################################################
|
||||
?>
|
||||
<div style="margin-top: 50px;">
|
||||
<center>
|
||||
<div style="text-align: center">
|
||||
<h1>404 - File not found</h1>
|
||||
<img src="../../gpack/travian_default/img/misc/404.gif" title="Not Found" alt="Not Found"><br />
|
||||
<p>We looked 404 times already but can't find anything, Not even an X marking the spot.</p>
|
||||
<p>This system is not complete yet. So the page probably does not exist.</p><br>
|
||||
</center>
|
||||
</div>
|
||||
</div>
|
||||
@@ -8,8 +8,8 @@
|
||||
## ##
|
||||
#################################################################################
|
||||
$time = time();
|
||||
$ban = mysql_query("SELECT * FROM ".TB_PREFIX."banlist WHERE `uid` = '".$session->uid."' and active = 1");
|
||||
$ban1 = mysql_fetch_array($ban);
|
||||
$ban = mysqli_query($GLOBALS["link"], "SELECT * FROM ".TB_PREFIX."banlist WHERE `uid` = '".$session->uid."' and active = 1");
|
||||
$ban1 = mysqli_fetch_array($ban);
|
||||
?>
|
||||
|
||||
<p></br>
|
||||
|
||||
@@ -12,8 +12,8 @@
|
||||
if($_SESSION['access'] < ADMIN) die("Access Denied: You are not Admin!");
|
||||
include("../GameEngine/config.php");
|
||||
$id = $_SESSION['id'];
|
||||
$sql = mysql_query("SELECT * FROM ".TB_PREFIX."allimedal");
|
||||
$nummedals = mysql_num_rows($sql);
|
||||
$sql = mysqli_query($GLOBALS["link"], "SELECT * FROM ".TB_PREFIX."allimedal");
|
||||
$nummedals = mysqli_num_rows($sql);
|
||||
?>
|
||||
|
||||
|
||||
@@ -36,11 +36,11 @@ $nummedals = mysql_num_rows($sql);
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
$sql = mysql_query("SELECT * FROM ".TB_PREFIX."allimedal");
|
||||
$tot = mysql_num_rows($sql);
|
||||
$sql = mysql_query("SELECT week FROM ".TB_PREFIX."allimedal ORDER BY week DESC LIMIT 1");
|
||||
if(mysql_num_rows($sql) > 0){
|
||||
$week = mysql_result($sql, 0);
|
||||
$sql = mysqli_query($GLOBALS["link"], "SELECT * FROM ".TB_PREFIX."allimedal");
|
||||
$tot = mysqli_num_rows($sql);
|
||||
$sql = mysqli_query($GLOBALS["link"], "SELECT week FROM ".TB_PREFIX."allimedal ORDER BY week DESC LIMIT 1");
|
||||
if(mysqli_num_rows($sql) > 0){
|
||||
$week = mysqli_result($sql, 0);
|
||||
echo "<tr><td><center>$week</center></td><td><center>$tot</center></td></tr>";
|
||||
}else{
|
||||
echo "<tr><td><center>0</center></td><td><center>$tot</center></td></tr>";
|
||||
@@ -75,8 +75,8 @@ $nummedals = mysql_num_rows($sql);
|
||||
for($j = 0; $j<$week; $j++)
|
||||
{
|
||||
$newweek = $j+1;
|
||||
$sql = mysql_query("SELECT * FROM ".TB_PREFIX."allimedal WHERE week = $newweek");
|
||||
$tot = mysql_num_rows($sql);
|
||||
$sql = mysqli_query($GLOBALS["link"], "SELECT * FROM ".TB_PREFIX."allimedal WHERE week = $newweek");
|
||||
$tot = mysqli_num_rows($sql);
|
||||
echo "<tr>
|
||||
<td>$newweek</td>
|
||||
<td>$tot</td>
|
||||
@@ -111,8 +111,8 @@ $nummedals = mysql_num_rows($sql);
|
||||
<tbody>
|
||||
<?php
|
||||
$query = "SELECT * FROM ".TB_PREFIX."allimedal ORDER BY id DESC";
|
||||
$result = mysql_query($query);
|
||||
while($row = mysql_fetch_array($result))
|
||||
$result = mysqli_query($GLOBALS["link"], $query);
|
||||
while($row = mysqli_fetch_array($result))
|
||||
{
|
||||
$i = $i + 1;
|
||||
$titel="Bonus";
|
||||
@@ -131,7 +131,7 @@ $nummedals = mysql_num_rows($sql);
|
||||
$allyid = $row['allyid'];
|
||||
|
||||
$unq = "SELECT name FROM ".TB_PREFIX."alidata WHERE id = ".$allyid."";
|
||||
$user = mysql_result(mysql_query($unq), 0);
|
||||
$user = mysqli_result(mysqli_query($GLOBALS["link"], $unq), 0);
|
||||
$allyname = $user;
|
||||
|
||||
$alliance = '<a href="admin.php?p=alliance&aid='.$allyid.'">'.$allyname.'</a>';
|
||||
|
||||
@@ -50,8 +50,8 @@ if($_GET['uid'])
|
||||
<td>Villages:</td>
|
||||
<td>
|
||||
<?php
|
||||
$result = mysql_query("SELECT SQL_CACHE * FROM ".TB_PREFIX."vdata WHERE owner = ".$user['id']."");
|
||||
$num_rows = mysql_num_rows($result);
|
||||
$result = mysqli_query($GLOBALS["link"], "SELECT SQL_CACHE * FROM ".TB_PREFIX."vdata WHERE owner = ".$user['id']."");
|
||||
$num_rows = mysqli_num_rows($result);
|
||||
echo $num_rows;
|
||||
?>
|
||||
</td>
|
||||
|
||||
@@ -13,8 +13,8 @@ if($_SESSION['access'] < ADMIN) die("Access Denied: You are not Admin!");
|
||||
include("../GameEngine/config.php");
|
||||
$id = $_SESSION['id'];
|
||||
|
||||
$sql = mysql_query("SELECT * FROM ".TB_PREFIX."medal");
|
||||
$nummedals = mysql_num_rows($sql);
|
||||
$sql = mysqli_query($GLOBALS["link"], "SELECT * FROM ".TB_PREFIX."medal");
|
||||
$nummedals = mysqli_num_rows($sql);
|
||||
?>
|
||||
|
||||
|
||||
@@ -37,11 +37,11 @@ $nummedals = mysql_num_rows($sql);
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
$sql = mysql_query("SELECT * FROM ".TB_PREFIX."medal");
|
||||
$tot = mysql_num_rows($sql);
|
||||
$sql = mysql_query("SELECT week FROM ".TB_PREFIX."medal ORDER BY week DESC LIMIT 1");
|
||||
if(mysql_num_rows($sql) > 0){
|
||||
$week = mysql_result($sql, 0);
|
||||
$sql = mysqli_query($GLOBALS["link"], "SELECT * FROM ".TB_PREFIX."medal");
|
||||
$tot = mysqli_num_rows($sql);
|
||||
$sql = mysqli_query($GLOBALS["link"], "SELECT week FROM ".TB_PREFIX."medal ORDER BY week DESC LIMIT 1");
|
||||
if(mysqli_num_rows($sql) > 0){
|
||||
$week = mysqli_result($sql, 0);
|
||||
echo "<tr><td><center>$week</center></td><td><center>$tot</center></td></tr>";
|
||||
}else{
|
||||
echo "<tr><td><center>0</center></td><td><center>$tot</center></td></tr>";
|
||||
@@ -77,8 +77,8 @@ $nummedals = mysql_num_rows($sql);
|
||||
{
|
||||
$newweek = $j+1;
|
||||
|
||||
$sql = mysql_query("SELECT * FROM ".TB_PREFIX."medal WHERE week = $newweek");
|
||||
$tot = mysql_num_rows($sql);
|
||||
$sql = mysqli_query($GLOBALS["link"], "SELECT * FROM ".TB_PREFIX."medal WHERE week = $newweek");
|
||||
$tot = mysqli_num_rows($sql);
|
||||
|
||||
echo "<tr><td>$newweek</td><td>$tot</td><td><input type=\"image\" name=\"medalweek\" value=\"".$newweek."\" style=\"background-image: url('../gpack/travian_default/img/a/del.gif'); height: 12px; width: 12px;\" src=\"../gpack/travian_default/img/a/x.gif\"></td>";
|
||||
}
|
||||
@@ -116,8 +116,8 @@ $nummedals = mysql_num_rows($sql);
|
||||
<tbody>
|
||||
<?php
|
||||
$query = "SELECT * FROM ".TB_PREFIX."medal ORDER BY id DESC";
|
||||
$result = mysql_query($query);
|
||||
while($row = mysql_fetch_array($result))
|
||||
$result = mysqli_query($GLOBALS["link"], $query);
|
||||
while($row = mysqli_fetch_array($result))
|
||||
{
|
||||
$i = $i + 1;
|
||||
$titel="Bonus";
|
||||
@@ -144,7 +144,7 @@ $nummedals = mysql_num_rows($sql);
|
||||
$playerid = $row['userid'];
|
||||
|
||||
$unq = "SELECT username FROM ".TB_PREFIX."users where id = $playerid";
|
||||
$user = mysql_result(mysql_query($unq), 0);
|
||||
$user = mysqli_result(mysqli_query($GLOBALS["link"], $unq), 0);
|
||||
$username = $user;
|
||||
|
||||
$player = "<a href=\"admin.php?p=player&uid=".$playerid."\">$username</a>";
|
||||
|
||||
@@ -13,9 +13,9 @@ if($_SESSION['access'] < ADMIN) die("Access Denied: You are not Admin!");
|
||||
$id = $_SESSION['id'];
|
||||
if(isset($_GET['uid']))
|
||||
{
|
||||
$sql = mysql_query("SELECT access FROM ".TB_PREFIX."users WHERE id = ".$_GET['uid']."");
|
||||
$curaccess = mysql_result($sql, 0);
|
||||
$player = mysql_fetch_assoc(mysql_query("SELECT * FROM ".TB_PREFIX."users WHERE id = ".$id.""));
|
||||
$sql = mysqli_query($GLOBALS["link"], "SELECT access FROM ".TB_PREFIX."users WHERE id = ".$_GET['uid']."");
|
||||
$curaccess = mysqli_result($sql, 0);
|
||||
$player = mysqli_fetch_assoc(mysqli_query($GLOBALS["link"], "SELECT * FROM ".TB_PREFIX."users WHERE id = ".$id.""));
|
||||
?>
|
||||
|
||||
<form action="../GameEngine/Admin/Mods/editAccess.php" method="POST">
|
||||
|
||||
@@ -14,8 +14,8 @@ if(isset($_GET['uid'])){
|
||||
include_once("../GameEngine/Data/hero_full.php");
|
||||
include_once("../GameEngine/Units.php");
|
||||
$user = $database->getUserArray($id,1);
|
||||
$result = mysql_query("SELECT * FROM " . TB_PREFIX . "hero WHERE `uid` = ".$id);
|
||||
$hero_info = mysql_fetch_array($result);
|
||||
$result = mysqli_query($GLOBALS["link"], "SELECT * FROM " . TB_PREFIX . "hero WHERE `uid` = ".$id);
|
||||
$hero_info = mysqli_fetch_array($result);
|
||||
$hero = $units->Hero($id,1);
|
||||
$unarray = array(1=>U1,U2,U3,U4,U5,U6,U7,U8,U9,U10,U11,U12,U13,U14,U15,U16,U17,U18,U19,U20,U21,U22,U23,U24,U25,U26,U27,U28,U29,U30,U31,U32,U33,U34,U35,U36,U37,U38,U39,U40,U41,U42,U43,U44,U45,U46,U47,U48,U49,U50,U99,U0);
|
||||
$utribe=($user['tribe']-1)*10;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
if(isset($_GET['uid']))
|
||||
{
|
||||
$user = mysql_fetch_assoc(mysql_query("SELECT * FROM ".TB_PREFIX."users WHERE id = ".$_GET['uid']."")); ?>
|
||||
$user = mysqli_fetch_assoc(mysqli_query($GLOBALS["link"], "SELECT * FROM ".TB_PREFIX."users WHERE id = ".$_GET['uid']."")); ?>
|
||||
<form action="../GameEngine/Admin/Mods/editPassword.php" method="POST">
|
||||
<input type="hidden" name="admid" id="admid" value="<?php echo $_SESSION['id']; ?>">
|
||||
<input type="hidden" name="uid" id="uid" value="<?php echo $_GET['uid']; ?>">
|
||||
|
||||
@@ -46,7 +46,7 @@ global $database;
|
||||
}
|
||||
|
||||
$result = $database->query($q);
|
||||
$active = $database->mysql_fetch_all($result);
|
||||
$active = $database->mysqli_fetch_all($result);
|
||||
for ($i = 0; $i <= count($active)-1; $i++){
|
||||
$uid = $database->getUserField($active[$i]['username'],'id',1);
|
||||
$varray = $database->getProfileVillages($uid);
|
||||
|
||||
@@ -10,10 +10,10 @@
|
||||
#################################################################################
|
||||
?>
|
||||
<div style="margin-top: 50px;">
|
||||
<center>
|
||||
<div style="text-align: center">
|
||||
<h1>404 - File not found</h1>
|
||||
<img src="../../gpack/travian_default/img/misc/404.gif" title="Not Found" alt="Not Found"><br />
|
||||
<p>We looked 404 times already but can't find anything, Not even an X marking the spot.</p>
|
||||
<p>This system is not complete yet. So the page probably does not exist.</p><br>
|
||||
</center>
|
||||
</div>
|
||||
</div>
|
||||
@@ -68,7 +68,7 @@ if ($check1=="" && $check2=="") {$criteria="WHERE tribe=0)";}
|
||||
$player_info=$database->query_return($q);
|
||||
foreach($player_info as $p_array) {
|
||||
$p_name=$p_array['username'];
|
||||
$p_village=mysql_real_escape_string($p_array['name']);
|
||||
$p_village=mysqli_real_escape_string($GLOBALS["link"], $p_array['name']);
|
||||
$p_coor="(".$p_array['x']."|".$p_array['y'].")";
|
||||
$p_pop=$p_array['pop'];
|
||||
$p_tribe=$array_tribe[$p_array['tribe']];
|
||||
|
||||
@@ -17,8 +17,8 @@
|
||||
<tbody>
|
||||
<?php
|
||||
$sql = "SELECT * FROM ".TB_PREFIX."activate";
|
||||
$result = mysql_query($sql);
|
||||
while($row = mysql_fetch_assoc($result))
|
||||
$result = mysqli_query($GLOBALS["link"], $sql);
|
||||
while($row = mysqli_fetch_assoc($result))
|
||||
{
|
||||
$i++;
|
||||
if($row['tribe'] == 1) {$tribe = "Roman"; }
|
||||
|
||||
@@ -58,7 +58,7 @@ if(isset($id))
|
||||
|
||||
<?php
|
||||
$sql = "SELECT * FROM ".TB_PREFIX."banlist WHERE uid = ".$id."";
|
||||
$numbans = mysql_num_rows(mysql_query($sql));
|
||||
$numbans = mysqli_num_rows(mysqli_query($GLOBALS["link"], $sql));
|
||||
?>
|
||||
<table id="member" cellpadding="1" cellspacing="1">
|
||||
<thead>
|
||||
@@ -74,8 +74,8 @@ if(isset($id))
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
$result = mysql_query($sql);
|
||||
while($row = mysql_fetch_assoc($result))
|
||||
$result = mysqli_query($GLOBALS["link"], $sql);
|
||||
while($row = mysqli_fetch_assoc($result))
|
||||
{
|
||||
echo '
|
||||
<tr>
|
||||
|
||||
@@ -12,8 +12,8 @@
|
||||
include_once("../GameEngine/Data/hero_full.php");
|
||||
include_once("../GameEngine/Units.php");
|
||||
$id=$user['id'];
|
||||
$hero = mysql_query("SELECT * FROM " . TB_PREFIX . "hero WHERE `uid` = ".$id);
|
||||
$hero_info = mysql_fetch_array($hero);
|
||||
$hero = mysqli_query($GLOBALS["link"], "SELECT * FROM " . TB_PREFIX . "hero WHERE `uid` = ".$id);
|
||||
$hero_info = mysqli_fetch_array($hero);
|
||||
if (!empty($hero_info)) {
|
||||
$hero = $units->Hero($id,1);
|
||||
}else {
|
||||
|
||||
@@ -15,8 +15,8 @@ if ($_GET['bid']){
|
||||
$rep = $database->getNotice4($_GET['bid']);
|
||||
}else
|
||||
$sql = "SELECT * FROM ".TB_PREFIX."ndata ORDER BY time DESC ";
|
||||
$result = mysql_query($sql);
|
||||
$rep1 = $database->mysql_fetch_all($result);
|
||||
$result = mysqli_query($GLOBALS["link"], $sql);
|
||||
$rep1 = $database->mysqli_fetch_all($result);
|
||||
if($rep1)
|
||||
{
|
||||
//$att = $database->getUserArray($rep1['uid'],1);
|
||||
|
||||
@@ -10,10 +10,10 @@
|
||||
#################################################################################
|
||||
?>
|
||||
<div style="margin-top: 50px;">
|
||||
<center>
|
||||
<div style="text-align: center">
|
||||
<h1>404 - File not found</h1>
|
||||
<img src="../../gpack/travian_default/img/misc/404.gif" title="Not Found" alt="Not Found"><br />
|
||||
<p>We looked 404 times already but can't find anything, Not even an X marking the spot.</p>
|
||||
<p>This system is not complete yet. So the page probably does not exist.</p><br>
|
||||
</center>
|
||||
</div>
|
||||
</div>
|
||||
@@ -12,67 +12,67 @@
|
||||
include_once("../../GameEngine/config.php");
|
||||
include_once("../../GameEngine/Database.php");
|
||||
|
||||
mysql_connect(SQL_SERVER, SQL_USER, SQL_PASS);
|
||||
mysql_select_db(SQL_DB);
|
||||
mysqli_connect(SQL_SERVER, SQL_USER, SQL_PASS);
|
||||
mysqli_select_db(SQL_DB);
|
||||
|
||||
if (!isset($_SESSION)) {
|
||||
session_start();
|
||||
}
|
||||
if($_SESSION['access'] != ADMIN) die("<h1><font color=\"red\">Access Denied: You are not Admin!</font></h1>");
|
||||
set_time_limit(0);
|
||||
mysql_query("TRUNCATE TABLE ".TB_PREFIX."a2b");
|
||||
mysql_query("TRUNCATE TABLE ".TB_PREFIX."abdata");
|
||||
mysql_query("TRUNCATE TABLE ".TB_PREFIX."activate");
|
||||
mysql_query("TRUNCATE TABLE ".TB_PREFIX."active");
|
||||
mysql_query("TRUNCATE TABLE ".TB_PREFIX."admin_log");
|
||||
mysql_query("TRUNCATE TABLE ".TB_PREFIX."alidata");
|
||||
mysql_query("TRUNCATE TABLE ".TB_PREFIX."ali_invite");
|
||||
mysql_query("TRUNCATE TABLE ".TB_PREFIX."ali_log");
|
||||
mysql_query("TRUNCATE TABLE ".TB_PREFIX."ali_permission");
|
||||
mysql_query("TRUNCATE TABLE ".TB_PREFIX."allimedal");
|
||||
mysql_query("TRUNCATE TABLE ".TB_PREFIX."artefacts");
|
||||
mysql_query("TRUNCATE TABLE ".TB_PREFIX."attacks");
|
||||
mysql_query("TRUNCATE TABLE ".TB_PREFIX."banlist");
|
||||
mysql_query("TRUNCATE TABLE ".TB_PREFIX."bdata");
|
||||
mysql_query("TRUNCATE TABLE ".TB_PREFIX."build_log");
|
||||
mysql_query("TRUNCATE TABLE ".TB_PREFIX."chat");
|
||||
mysql_query("TRUNCATE TABLE ".TB_PREFIX."config");
|
||||
mysql_query("TRUNCATE TABLE ".TB_PREFIX."deleting");
|
||||
mysql_query("TRUNCATE TABLE ".TB_PREFIX."demolition");
|
||||
mysql_query("TRUNCATE TABLE ".TB_PREFIX."diplomacy");
|
||||
mysql_query("TRUNCATE TABLE ".TB_PREFIX."enforcement");
|
||||
mysql_query("TRUNCATE TABLE ".TB_PREFIX."farmlist");
|
||||
mysql_query("TRUNCATE TABLE ".TB_PREFIX."fdata");
|
||||
mysql_query("TRUNCATE TABLE ".TB_PREFIX."forum_cat");
|
||||
mysql_query("TRUNCATE TABLE ".TB_PREFIX."forum_edit");
|
||||
mysql_query("TRUNCATE TABLE ".TB_PREFIX."forum_post");
|
||||
mysql_query("TRUNCATE TABLE ".TB_PREFIX."forum_survey");
|
||||
mysql_query("TRUNCATE TABLE ".TB_PREFIX."forum_topic");
|
||||
mysql_query("TRUNCATE TABLE ".TB_PREFIX."general");
|
||||
mysql_query("TRUNCATE TABLE ".TB_PREFIX."gold_fin_log");
|
||||
mysql_query("TRUNCATE TABLE ".TB_PREFIX."hero");
|
||||
mysql_query("TRUNCATE TABLE ".TB_PREFIX."illegal_log");
|
||||
mysql_query("TRUNCATE TABLE ".TB_PREFIX."links");
|
||||
mysql_query("TRUNCATE TABLE ".TB_PREFIX."login_log");
|
||||
mysql_query("TRUNCATE TABLE ".TB_PREFIX."market");
|
||||
mysql_query("TRUNCATE TABLE ".TB_PREFIX."market_log");
|
||||
mysql_query("TRUNCATE TABLE ".TB_PREFIX."mdata");
|
||||
mysql_query("TRUNCATE TABLE ".TB_PREFIX."medal");
|
||||
mysql_query("TRUNCATE TABLE ".TB_PREFIX."movement");
|
||||
mysql_query("TRUNCATE TABLE ".TB_PREFIX."ndata");
|
||||
mysql_query("TRUNCATE TABLE ".TB_PREFIX."online");
|
||||
mysql_query("TRUNCATE TABLE ".TB_PREFIX."password");
|
||||
mysql_query("TRUNCATE TABLE ".TB_PREFIX."prisoners");
|
||||
mysql_query("TRUNCATE TABLE ".TB_PREFIX."raidlist");
|
||||
mysql_query("TRUNCATE TABLE ".TB_PREFIX."research");
|
||||
mysql_query("TRUNCATE TABLE ".TB_PREFIX."route");
|
||||
mysql_query("TRUNCATE TABLE ".TB_PREFIX."send");
|
||||
mysql_query("TRUNCATE TABLE ".TB_PREFIX."tdata");
|
||||
mysql_query("TRUNCATE TABLE ".TB_PREFIX."tech_log");
|
||||
mysql_query("TRUNCATE TABLE ".TB_PREFIX."training");
|
||||
mysql_query("TRUNCATE TABLE ".TB_PREFIX."units");
|
||||
mysqli_query($GLOBALS["link"], "TRUNCATE TABLE ".TB_PREFIX."a2b");
|
||||
mysqli_query($GLOBALS["link"], "TRUNCATE TABLE ".TB_PREFIX."abdata");
|
||||
mysqli_query($GLOBALS["link"], "TRUNCATE TABLE ".TB_PREFIX."activate");
|
||||
mysqli_query($GLOBALS["link"], "TRUNCATE TABLE ".TB_PREFIX."active");
|
||||
mysqli_query($GLOBALS["link"], "TRUNCATE TABLE ".TB_PREFIX."admin_log");
|
||||
mysqli_query($GLOBALS["link"], "TRUNCATE TABLE ".TB_PREFIX."alidata");
|
||||
mysqli_query($GLOBALS["link"], "TRUNCATE TABLE ".TB_PREFIX."ali_invite");
|
||||
mysqli_query($GLOBALS["link"], "TRUNCATE TABLE ".TB_PREFIX."ali_log");
|
||||
mysqli_query($GLOBALS["link"], "TRUNCATE TABLE ".TB_PREFIX."ali_permission");
|
||||
mysqli_query($GLOBALS["link"], "TRUNCATE TABLE ".TB_PREFIX."allimedal");
|
||||
mysqli_query($GLOBALS["link"], "TRUNCATE TABLE ".TB_PREFIX."artefacts");
|
||||
mysqli_query($GLOBALS["link"], "TRUNCATE TABLE ".TB_PREFIX."attacks");
|
||||
mysqli_query($GLOBALS["link"], "TRUNCATE TABLE ".TB_PREFIX."banlist");
|
||||
mysqli_query($GLOBALS["link"], "TRUNCATE TABLE ".TB_PREFIX."bdata");
|
||||
mysqli_query($GLOBALS["link"], "TRUNCATE TABLE ".TB_PREFIX."build_log");
|
||||
mysqli_query($GLOBALS["link"], "TRUNCATE TABLE ".TB_PREFIX."chat");
|
||||
mysqli_query($GLOBALS["link"], "TRUNCATE TABLE ".TB_PREFIX."config");
|
||||
mysqli_query($GLOBALS["link"], "TRUNCATE TABLE ".TB_PREFIX."deleting");
|
||||
mysqli_query($GLOBALS["link"], "TRUNCATE TABLE ".TB_PREFIX."demolition");
|
||||
mysqli_query($GLOBALS["link"], "TRUNCATE TABLE ".TB_PREFIX."diplomacy");
|
||||
mysqli_query($GLOBALS["link"], "TRUNCATE TABLE ".TB_PREFIX."enforcement");
|
||||
mysqli_query($GLOBALS["link"], "TRUNCATE TABLE ".TB_PREFIX."farmlist");
|
||||
mysqli_query($GLOBALS["link"], "TRUNCATE TABLE ".TB_PREFIX."fdata");
|
||||
mysqli_query($GLOBALS["link"], "TRUNCATE TABLE ".TB_PREFIX."forum_cat");
|
||||
mysqli_query($GLOBALS["link"], "TRUNCATE TABLE ".TB_PREFIX."forum_edit");
|
||||
mysqli_query($GLOBALS["link"], "TRUNCATE TABLE ".TB_PREFIX."forum_post");
|
||||
mysqli_query($GLOBALS["link"], "TRUNCATE TABLE ".TB_PREFIX."forum_survey");
|
||||
mysqli_query($GLOBALS["link"], "TRUNCATE TABLE ".TB_PREFIX."forum_topic");
|
||||
mysqli_query($GLOBALS["link"], "TRUNCATE TABLE ".TB_PREFIX."general");
|
||||
mysqli_query($GLOBALS["link"], "TRUNCATE TABLE ".TB_PREFIX."gold_fin_log");
|
||||
mysqli_query($GLOBALS["link"], "TRUNCATE TABLE ".TB_PREFIX."hero");
|
||||
mysqli_query($GLOBALS["link"], "TRUNCATE TABLE ".TB_PREFIX."illegal_log");
|
||||
mysqli_query($GLOBALS["link"], "TRUNCATE TABLE ".TB_PREFIX."links");
|
||||
mysqli_query($GLOBALS["link"], "TRUNCATE TABLE ".TB_PREFIX."login_log");
|
||||
mysqli_query($GLOBALS["link"], "TRUNCATE TABLE ".TB_PREFIX."market");
|
||||
mysqli_query($GLOBALS["link"], "TRUNCATE TABLE ".TB_PREFIX."market_log");
|
||||
mysqli_query($GLOBALS["link"], "TRUNCATE TABLE ".TB_PREFIX."mdata");
|
||||
mysqli_query($GLOBALS["link"], "TRUNCATE TABLE ".TB_PREFIX."medal");
|
||||
mysqli_query($GLOBALS["link"], "TRUNCATE TABLE ".TB_PREFIX."movement");
|
||||
mysqli_query($GLOBALS["link"], "TRUNCATE TABLE ".TB_PREFIX."ndata");
|
||||
mysqli_query($GLOBALS["link"], "TRUNCATE TABLE ".TB_PREFIX."online");
|
||||
mysqli_query($GLOBALS["link"], "TRUNCATE TABLE ".TB_PREFIX."password");
|
||||
mysqli_query($GLOBALS["link"], "TRUNCATE TABLE ".TB_PREFIX."prisoners");
|
||||
mysqli_query($GLOBALS["link"], "TRUNCATE TABLE ".TB_PREFIX."raidlist");
|
||||
mysqli_query($GLOBALS["link"], "TRUNCATE TABLE ".TB_PREFIX."research");
|
||||
mysqli_query($GLOBALS["link"], "TRUNCATE TABLE ".TB_PREFIX."route");
|
||||
mysqli_query($GLOBALS["link"], "TRUNCATE TABLE ".TB_PREFIX."send");
|
||||
mysqli_query($GLOBALS["link"], "TRUNCATE TABLE ".TB_PREFIX."tdata");
|
||||
mysqli_query($GLOBALS["link"], "TRUNCATE TABLE ".TB_PREFIX."tech_log");
|
||||
mysqli_query($GLOBALS["link"], "TRUNCATE TABLE ".TB_PREFIX."training");
|
||||
mysqli_query($GLOBALS["link"], "TRUNCATE TABLE ".TB_PREFIX."units");
|
||||
$time=time();
|
||||
mysql_query("TRUNCATE TABLE ".TB_PREFIX."odata");
|
||||
mysqli_query($GLOBALS["link"], "TRUNCATE TABLE ".TB_PREFIX."odata");
|
||||
|
||||
$database->populateOasisdata();
|
||||
$database->populateOasis();
|
||||
@@ -80,21 +80,21 @@ $database->populateOasisUnits2();
|
||||
$uid=$database->getVillageID(5);
|
||||
|
||||
$passw=md5('123456');
|
||||
mysql_query("TRUNCATE TABLE ".TB_PREFIX."users");
|
||||
mysql_query("INSERT INTO ".TB_PREFIX."users (id, username, password, email, tribe, access, gold, gender, birthday, location, desc1, desc2, plus, b1, b2, b3, b4, sit1, sit2, alliance, sessid, act, timestamp, ap, apall, dp, dpall, protect, quest, gpack, cp, lastupdate, RR, Rc, ok) VALUES
|
||||
mysqli_query($GLOBALS["link"], "TRUNCATE TABLE ".TB_PREFIX."users");
|
||||
mysqli_query($GLOBALS["link"], "INSERT INTO ".TB_PREFIX."users (id, username, password, email, tribe, access, gold, gender, birthday, location, desc1, desc2, plus, b1, b2, b3, b4, sit1, sit2, alliance, sessid, act, timestamp, ap, apall, dp, dpall, protect, quest, gpack, cp, lastupdate, RR, Rc, ok) VALUES
|
||||
(5, 'Multihunter', '".$passw."', 'multihunter@travianx.mail', 0, 9, 0, 0, '0000-00-00', '', '', '', 0, 0, 0, 0, 0, 0, 0, 0, '', '', 0, 0, 0, 0, 0, 0, 0, 'gpack/travian_default/', 1, 0, 0, 0, 0),
|
||||
(1, 'Support', '', 'support@travianx.mail', 0, 8, 0, 0, '0000-00-00', '', '', '', 0, 0, 0, 0, 0, 0, 0, 0, '', '', 0, 0, 0, 0, 0, 0, 0, 'gpack/travian_default/', 1, 0, 0, 0, 0),
|
||||
(2, 'Nature', '', 'support@travianx.mail', 4, 8, 0, 0, '0000-00-00', '', '', '', 0, 0, 0, 0, 0, 0, 0, 0, '', '', 0, 0, 0, 0, 0, 0, 0, 'gpack/travian_default/', 1, 0, 0, 0, 0),
|
||||
(4, 'Taskmaster', '', 'support@travianx.mail', 0, 8, 0, 0, '0000-00-00', '', '', '', 0, 0, 0, 0, 0, 0, 0, 0, '', '', 0, 0, 0, 0, 0, 0, 0, 'gpack/travian_default/', 1, 0, 0, 0, 0)");
|
||||
|
||||
mysql_query("INSERT INTO ".TB_PREFIX."units (vref) VALUES ($uid)");
|
||||
mysql_query("INSERT INTO ".TB_PREFIX."tdata (vref) VALUES ($uid)");
|
||||
mysqli_query($GLOBALS["link"], "INSERT INTO ".TB_PREFIX."units (vref) VALUES ($uid)");
|
||||
mysqli_query($GLOBALS["link"], "INSERT INTO ".TB_PREFIX."tdata (vref) VALUES ($uid)");
|
||||
|
||||
mysql_query("INSERT INTO ".TB_PREFIX."fdata (vref, f1t, f2t, f3t, f4t, f5t, f6t, f7t, f8t, f9t, f10t, f11t, f12t, f13t, f14t, f15t, f16t, f17t, f18t, f26, f26t, wwname) VALUES ($uid, '1', '4', '1', '3', '2', '2', '3', '4', '4', '3', '3', '4', '4', '1', '4', '2', '1', '2', '1', '15', 'World Wonder')");
|
||||
mysqli_query($GLOBALS["link"], "INSERT INTO ".TB_PREFIX."fdata (vref, f1t, f2t, f3t, f4t, f5t, f6t, f7t, f8t, f9t, f10t, f11t, f12t, f13t, f14t, f15t, f16t, f17t, f18t, f26, f26t, wwname) VALUES ($uid, '1', '4', '1', '3', '2', '2', '3', '4', '4', '3', '3', '4', '4', '1', '4', '2', '1', '2', '1', '15', 'World Wonder')");
|
||||
|
||||
mysql_query("DELETE FROM ".TB_PREFIX."vdata WHERE owner<>5");
|
||||
mysql_query("UPDATE ".TB_PREFIX."wdata SET occupied=0 WHERE id<>$uid");
|
||||
mysql_query("TRUNCATE TABLE ".TB_PREFIX."ww_attacks");
|
||||
mysqli_query($GLOBALS["link"], "DELETE FROM ".TB_PREFIX."vdata WHERE owner<>5");
|
||||
mysqli_query($GLOBALS["link"], "UPDATE ".TB_PREFIX."wdata SET occupied=0 WHERE id<>$uid");
|
||||
mysqli_query($GLOBALS["link"], "TRUNCATE TABLE ".TB_PREFIX."ww_attacks");
|
||||
|
||||
header("Location: ../admin.php?p=resetdone");
|
||||
?>
|
||||
|
||||
@@ -19,8 +19,10 @@ unset($_SESSION['username'], $_SESSION['sessid']);
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<br>
|
||||
<center>Resetting Server already done.</center><br>Multihunter password is: 123456<br>
|
||||
<br />
|
||||
<div style="text-align: center">
|
||||
Resetting Server already done.</div>
|
||||
<br />Multihunter password is: 123456<br>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
|
||||
@@ -9,11 +9,11 @@
|
||||
## Enhanced: aggenkeech ##
|
||||
#################################################################################
|
||||
|
||||
$tribe1 = mysql_query("SELECT SQL_CACHE * FROM ".TB_PREFIX."users WHERE tribe = 1");
|
||||
$tribe2 = mysql_query("SELECT SQL_CACHE * FROM ".TB_PREFIX."users WHERE tribe = 2");
|
||||
$tribe3 = mysql_query("SELECT SQL_CACHE * FROM ".TB_PREFIX."users WHERE tribe = 3");
|
||||
$tribes = Array(mysql_num_rows($tribe1),mysql_num_rows($tribe2),mysql_num_rows($tribe3));
|
||||
$users = mysql_num_rows(mysql_query("SELECT SQL_CACHE * FROM ".TB_PREFIX."users")) - 1;
|
||||
$tribe1 = mysqli_query($GLOBALS["link"], "SELECT SQL_CACHE * FROM ".TB_PREFIX."users WHERE tribe = 1");
|
||||
$tribe2 = mysqli_query($GLOBALS["link"], "SELECT SQL_CACHE * FROM ".TB_PREFIX."users WHERE tribe = 2");
|
||||
$tribe3 = mysqli_query($GLOBALS["link"], "SELECT SQL_CACHE * FROM ".TB_PREFIX."users WHERE tribe = 3");
|
||||
$tribes = Array(mysqli_num_rows($tribe1),mysqli_num_rows($tribe2),mysqli_num_rows($tribe3));
|
||||
$users = mysqli_num_rows(mysqli_query($GLOBALS["link"], "SELECT SQL_CACHE * FROM ".TB_PREFIX."users")) - 1;
|
||||
?>
|
||||
|
||||
<br /><br />
|
||||
@@ -30,29 +30,29 @@ $users = mysql_num_rows(mysql_query("SELECT SQL_CACHE * FROM ".TB_PREFIX."users"
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Active players</td>
|
||||
<td><?php $result = mysql_query("SELECT SQL_CACHE * FROM ".TB_PREFIX."active"); $num_rows = mysql_num_rows($result); echo $num_rows; ?></td>
|
||||
<td><?php $result = mysqli_query($GLOBALS["link"], "SELECT SQL_CACHE * FROM ".TB_PREFIX."active"); $num_rows = mysqli_num_rows($result); echo $num_rows; ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Players online</td>
|
||||
<td><?php $t =time();
|
||||
$result = mysql_query("SELECT SQL_CACHE * FROM ".TB_PREFIX."users WHERE ".$t." - timestamp < 300") or die(mysql_error());;
|
||||
$num_rows = mysql_num_rows($result);
|
||||
$result = mysqli_query($GLOBALS["link"], "SELECT SQL_CACHE * FROM ".TB_PREFIX."users WHERE ".$t." - timestamp < 300") or die(mysqli_error());;
|
||||
$num_rows = mysqli_num_rows($result);
|
||||
echo $num_rows;?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Players Banned</td>
|
||||
<td><?php
|
||||
$result = mysql_query("SELECT SQL_CACHE * FROM ".TB_PREFIX."users WHERE access = 0");
|
||||
$num_rows = mysql_num_rows($result);
|
||||
$result = mysqli_query($GLOBALS["link"], "SELECT SQL_CACHE * FROM ".TB_PREFIX."users WHERE access = 0");
|
||||
$num_rows = mysqli_num_rows($result);
|
||||
echo $num_rows;?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Villages settled</td>
|
||||
<td><?php
|
||||
$result = mysql_query("SELECT SQL_CACHE * FROM ".TB_PREFIX."vdata");
|
||||
$num_rows = mysql_num_rows($result);
|
||||
$result = mysqli_query($GLOBALS["link"], "SELECT SQL_CACHE * FROM ".TB_PREFIX."vdata");
|
||||
$num_rows = mysqli_num_rows($result);
|
||||
echo $num_rows; ?>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -101,8 +101,8 @@ $users = mysql_num_rows(mysql_query("SELECT SQL_CACHE * FROM ".TB_PREFIX."users"
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><img src="../<?php echo GP_LOCATE; ?>img/a/gold.gif" alt="Gold" title="Gold"> Gold</td>
|
||||
<td><?php $gold = mysql_query("SELECT SUM(gold) AS sumofgold FROM ".TB_PREFIX."users"); $getgold=mysql_fetch_assoc($gold); echo $getgold['sumofgold']; ?></td>
|
||||
<td><?php $gold = mysql_query("SELECT SUM(gold) AS sumofgold FROM ".TB_PREFIX."users"); $getgold=mysql_fetch_assoc($gold); echo round($getgold['sumofgold'] / $users);?></td>
|
||||
<td><?php $gold = mysqli_query($GLOBALS["link"], "SELECT SUM(gold) AS sumofgold FROM ".TB_PREFIX."users"); $getgold=mysqli_fetch_assoc($gold); echo $getgold['sumofgold']; ?></td>
|
||||
<td><?php $gold = mysqli_query($GLOBALS["link"], "SELECT SUM(gold) AS sumofgold FROM ".TB_PREFIX."users"); $getgold=mysqli_fetch_assoc($gold); echo round($getgold['sumofgold'] / $users);?></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
@@ -120,8 +120,8 @@ $users = mysql_num_rows(mysql_query("SELECT SQL_CACHE * FROM ".TB_PREFIX."users"
|
||||
echo '</thead><tbody>';
|
||||
for($i=1; $i<11; $i++)
|
||||
{
|
||||
$t = mysql_query("SELECT SUM(u".$i.") AS sumof FROM ".TB_PREFIX."units");
|
||||
$troop = mysql_fetch_assoc($t);
|
||||
$t = mysqli_query($GLOBALS["link"], "SELECT SUM(u".$i.") AS sumof FROM ".TB_PREFIX."units");
|
||||
$troop = mysqli_fetch_assoc($t);
|
||||
echo '<td class="on">'.$troop['sumof'].'</td>';
|
||||
}
|
||||
|
||||
@@ -133,8 +133,8 @@ $users = mysql_num_rows(mysql_query("SELECT SQL_CACHE * FROM ".TB_PREFIX."users"
|
||||
echo '</thead><tbody>';
|
||||
for($i=11; $i<21; $i++)
|
||||
{
|
||||
$t = mysql_query("SELECT SUM(u".$i.") AS sumof FROM ".TB_PREFIX."units");
|
||||
$troop = mysql_fetch_assoc($t);
|
||||
$t = mysqli_query($GLOBALS["link"], "SELECT SUM(u".$i.") AS sumof FROM ".TB_PREFIX."units");
|
||||
$troop = mysqli_fetch_assoc($t);
|
||||
echo '<td class="on">'.$troop['sumof'].'</td>';
|
||||
}
|
||||
|
||||
@@ -146,8 +146,8 @@ $users = mysql_num_rows(mysql_query("SELECT SQL_CACHE * FROM ".TB_PREFIX."users"
|
||||
echo '</thead><tbody>';
|
||||
for($i=21; $i<31; $i++)
|
||||
{
|
||||
$t = mysql_query("SELECT SUM(u".$i.") AS sumof FROM ".TB_PREFIX."units");
|
||||
$troop = mysql_fetch_assoc($t);
|
||||
$t = mysqli_query($GLOBALS["link"], "SELECT SUM(u".$i.") AS sumof FROM ".TB_PREFIX."units");
|
||||
$troop = mysqli_fetch_assoc($t);
|
||||
echo '<td class="on">'.$troop['sumof'].'</td>';
|
||||
}
|
||||
|
||||
@@ -159,8 +159,8 @@ $users = mysql_num_rows(mysql_query("SELECT SQL_CACHE * FROM ".TB_PREFIX."users"
|
||||
echo '</thead><tbody>';
|
||||
for($i=31; $i<41; $i++)
|
||||
{
|
||||
$t = mysql_query("SELECT SUM(u".$i.") AS sumof FROM ".TB_PREFIX."units");
|
||||
$troop = mysql_fetch_assoc($t);
|
||||
$t = mysqli_query($GLOBALS["link"], "SELECT SUM(u".$i.") AS sumof FROM ".TB_PREFIX."units");
|
||||
$troop = mysqli_fetch_assoc($t);
|
||||
echo '<td class="on">'.$troop['sumof'].'</td>';
|
||||
}
|
||||
|
||||
@@ -172,8 +172,8 @@ $users = mysql_num_rows(mysql_query("SELECT SQL_CACHE * FROM ".TB_PREFIX."users"
|
||||
echo '</thead><tbody>';
|
||||
for($i=41; $i<51; $i++)
|
||||
{
|
||||
$t = mysql_query("SELECT SUM(u".$i.") AS sumof FROM ".TB_PREFIX."units");
|
||||
$troop = mysql_fetch_assoc($t);
|
||||
$t = mysqli_query($GLOBALS["link"], "SELECT SUM(u".$i.") AS sumof FROM ".TB_PREFIX."units");
|
||||
$troop = mysqli_fetch_assoc($t);
|
||||
echo '<td class="on">'.$troop['sumof'].'</td>';
|
||||
}
|
||||
?>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
$id = $_GET['uid'];
|
||||
if(isset($id))
|
||||
{
|
||||
$player = mysql_fetch_assoc(mysql_query("SELECT * FROM ".TB_PREFIX."users WHERE id = $id"));
|
||||
$player = mysqli_fetch_assoc(mysqli_query($GLOBALS["link"], "SELECT * FROM ".TB_PREFIX."users WHERE id = $id"));
|
||||
?>
|
||||
<table cellpadding="1" cellspacing="1" id="member">
|
||||
<thead>
|
||||
@@ -18,8 +18,8 @@ if(isset($id))
|
||||
<tbody>
|
||||
<?php
|
||||
$sql = "SELECT * FROM ".TB_PREFIX."illegal_log WHERE user = $id";
|
||||
$result = mysql_query($sql);
|
||||
while($row = mysql_fetch_assoc($result))
|
||||
$result = mysqli_query($GLOBALS["link"], $sql);
|
||||
while($row = mysqli_fetch_assoc($result))
|
||||
{
|
||||
$i++;
|
||||
echo '
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
$id = $_GET['uid'];
|
||||
if(isset($id))
|
||||
{
|
||||
$player = mysql_fetch_assoc(mysql_query("SELECT * FROM ".TB_PREFIX."users WHERE id = $id"));
|
||||
$player = mysqli_fetch_assoc(mysqli_query($GLOBALS["link"], "SELECT * FROM ".TB_PREFIX."users WHERE id = $id"));
|
||||
?>
|
||||
<table cellpadding="1" cellspacing="1" id="member">
|
||||
<thead>
|
||||
@@ -18,8 +18,8 @@ if(isset($id))
|
||||
<tbody>
|
||||
<?php
|
||||
$sql = "SELECT * FROM ".TB_PREFIX."login_log WHERE uid = $id";
|
||||
$result = mysql_query($sql);
|
||||
while($row = mysql_fetch_assoc($result))
|
||||
$result = mysqli_query($GLOBALS["link"], $sql);
|
||||
while($row = mysqli_fetch_assoc($result))
|
||||
{
|
||||
$i++;
|
||||
echo '
|
||||
|
||||
@@ -17,8 +17,8 @@ if(isset($id))
|
||||
</thead>
|
||||
<?php
|
||||
$sql = "SELECT * FROM ".TB_PREFIX."build_log WHERE wid = ".$_GET['did']."";
|
||||
$result = mysql_query($sql);
|
||||
while($row = mysql_fetch_assoc($result))
|
||||
$result = mysqli_query($GLOBALS["link"], $sql);
|
||||
while($row = mysqli_fetch_assoc($result))
|
||||
{
|
||||
$j++;
|
||||
echo '
|
||||
|
||||
+3
-2
@@ -18,6 +18,7 @@
|
||||
#################################################################################
|
||||
|
||||
session_start();
|
||||
include_once("../GameEngine/config.php");
|
||||
include_once("../GameEngine/Database.php");
|
||||
include_once ("../GameEngine/Lang/" . LANG . ".php");
|
||||
include_once("../GameEngine/Admin/database.php");
|
||||
@@ -53,7 +54,7 @@ $up_avl = $latest - $ver ;
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<link REL="shortcut icon" HREF="favicon.ico"/>
|
||||
<link rel="shortcut icon" href="favicon.ico"/>
|
||||
<title>Admin Panel</title>
|
||||
<link rel=stylesheet type="text/css" href="../img/admin/admin.css">
|
||||
<link rel=stylesheet type="text/css" href="../img/admin/acp.css">
|
||||
@@ -203,7 +204,7 @@ $up_avl = $latest - $ver ;
|
||||
<a href="?p=natarbuildingplan">Add WW Building Plan Villages</a>
|
||||
<br />
|
||||
<a href="#"><b>Admin:</b></a>
|
||||
<a href="?p=admin_log"><font color="Red"><b>Admin Log</font></b></a>
|
||||
<a href="?p=admin_log"><font color="Red"><b>Admin Log</b></font></a>
|
||||
<a href="?p=config">Server Settings</a>
|
||||
<a href="?p=resetServer">Server Resetting</a>
|
||||
<?php
|
||||
|
||||
+68
-68
@@ -31,20 +31,20 @@ class adm_DB {
|
||||
|
||||
function adm_DB(){
|
||||
global $database;
|
||||
$this->connection = mysql_connect(SQL_SERVER, SQL_USER, SQL_PASS) or die(mysql_error());
|
||||
mysql_select_db(SQL_DB, $this->connection) or die(mysql_error());
|
||||
$this->connection = mysqli_connect(SQL_SERVER, SQL_USER, SQL_PASS) or die(mysqli_error());
|
||||
mysqli_select_db($this->connection, SQL_DB) or die(mysqli_error());
|
||||
}
|
||||
|
||||
function Login($username,$password){
|
||||
$q = "SELECT password FROM ".TB_PREFIX."users where username = '$username' and access >= ".MULTIHUNTER;
|
||||
$result = mysql_query($q, $this->connection);
|
||||
$dbarray = mysql_fetch_array($result);
|
||||
$result = mysqli_query($this->connection, $q);
|
||||
$dbarray = mysqli_fetch_array($result);
|
||||
if($dbarray['password'] == md5($password)) {
|
||||
mysql_query("Insert into ".TB_PREFIX."admin_log values (0,'X','$username logged in (IP: <b>".$_SERVER['REMOTE_ADDR']."</b>)',".time().")");
|
||||
mysqli_query("Insert into ".TB_PREFIX."admin_log values (0,'X','$username logged in (IP: <b>".$_SERVER['REMOTE_ADDR']."</b>)',".time().")");
|
||||
return true;
|
||||
}
|
||||
else {
|
||||
mysql_query("Insert into ".TB_PREFIX."admin_log values (0,'X','<font color=\'red\'><b>IP: ".$_SERVER['REMOTE_ADDR']." tried to log in with username <u> $username</u> but access was denied!</font></b>',".time().")");
|
||||
mysqli_query("Insert into ".TB_PREFIX."admin_log values (0,'X','<font color=\'red\'><b>IP: ".$_SERVER['REMOTE_ADDR']." tried to log in with username <u> $username</u> but access was denied!</font></b>',".time().")");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -71,7 +71,7 @@ class adm_DB {
|
||||
}
|
||||
}
|
||||
$q = "UPDATE ".TB_PREFIX."vdata set pop = $popTot where wref = $vid";
|
||||
mysql_query($q, $this->connection);
|
||||
mysqli_query($this->connection, $q);
|
||||
}
|
||||
|
||||
function buildingPOP($f,$lvl){
|
||||
@@ -109,13 +109,13 @@ class adm_DB {
|
||||
}
|
||||
}
|
||||
$q = "UPDATE ".TB_PREFIX."vdata set cp = $popTot where wref = $vid";
|
||||
mysql_query($q, $this->connection);
|
||||
mysqli_query($this->connection, $q);
|
||||
}
|
||||
|
||||
function getWref($x,$y) {
|
||||
$q = "SELECT id FROM ".TB_PREFIX."wdata where x = $x and y = $y";
|
||||
$result = mysql_query($q, $this->connection);
|
||||
$r = mysql_fetch_array($result);
|
||||
$result = mysqli_query($this->connection, $q);
|
||||
$r = mysqli_fetch_array($result);
|
||||
return $r['id'];
|
||||
}
|
||||
|
||||
@@ -126,7 +126,7 @@ class adm_DB {
|
||||
$status = $database->getVillageState($wid);
|
||||
$status = 0;
|
||||
if($status == 0){
|
||||
mysql_query("Insert into ".TB_PREFIX."admin_log values (0,".$_SESSION['id'].",'Added new village <b><a href=\'admin.php?p=village&did=$wid\'>$wid</a></b> to user <b><a href=\'admin.php?p=player&uid=$uid\'>$uid</a></b>',".time().")");
|
||||
mysqli_query("Insert into ".TB_PREFIX."admin_log values (0,".$_SESSION['id'].",'Added new village <b><a href=\'admin.php?p=village&did=$wid\'>$wid</a></b> to user <b><a href=\'admin.php?p=player&uid=$uid\'>$uid</a></b>',".time().")");
|
||||
$database->setFieldTaken($wid);
|
||||
$database->addVillage($wid,$uid,'new village','0');
|
||||
$database->addResourceFields($wid,$database->getVillageType($wid));
|
||||
@@ -164,23 +164,23 @@ class adm_DB {
|
||||
if($post['clean_ware']){
|
||||
$time = time();
|
||||
$q = "UPDATE ".TB_PREFIX."vdata SET `wood` = '0', `clay` = '0', `iron` = '0', `crop` = '0', `lastupdate` = '$time' WHERE wref = $vid;";
|
||||
mysql_query($q, $this->connection);
|
||||
mysqli_query($this->connection, $q);
|
||||
}
|
||||
}
|
||||
mysql_query("Insert into ".TB_PREFIX."admin_log values (0,".$_SESSION['id'].",'Punished user: <a href=\'admin.php?p=player&uid=".$post['uid']."\'>".$post['uid']."</a> with <b>-".$post['punish']."%</b> population',".time().")");
|
||||
mysqli_query("Insert into ".TB_PREFIX."admin_log values (0,".$_SESSION['id'].",'Punished user: <a href=\'admin.php?p=player&uid=".$post['uid']."\'>".$post['uid']."</a> with <b>-".$post['punish']."%</b> population',".time().")");
|
||||
}
|
||||
|
||||
function PunishBuilding($vid,$proc,$pop){
|
||||
global $database;
|
||||
$q = "UPDATE ".TB_PREFIX."vdata set pop = $pop where wref = $vid;";
|
||||
mysql_query($q, $this->connection);
|
||||
mysqli_query($this->connection, $q);
|
||||
$fdata = $database->getResourceLevel($vid);
|
||||
for ($i = 1; $i <= 40; $i++) {
|
||||
if($fdata['f'.$i]>1){
|
||||
$zm = ($fdata['f'.$i]/100)*$proc;
|
||||
if($zm < 1){$zm = 1;}else{$zm = floor($zm);}
|
||||
$q = "UPDATE ".TB_PREFIX."fdata SET `f$i` = '$zm' WHERE `vref` = $vid;";
|
||||
mysql_query($q, $this->connection);
|
||||
mysqli_query($this->connection, $q);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -193,7 +193,7 @@ class adm_DB {
|
||||
|
||||
function DelUnits2($vid,$unit){
|
||||
$q = "UPDATE ".TB_PREFIX."units SET `u$unit` = '0' WHERE `vref` = $vid;";
|
||||
mysql_query($q, $this->connection);
|
||||
mysqli_query($this->connection, $q);
|
||||
}
|
||||
|
||||
function DelPlayer($uid,$pass){
|
||||
@@ -205,26 +205,26 @@ class adm_DB {
|
||||
$this->DelVillage($villages[$i]['wref'], 1);
|
||||
}
|
||||
$q = "DELETE FROM ".TB_PREFIX."hero where uid = $uid";
|
||||
mysql_query($q, $this->connection);
|
||||
mysqli_query($this->connection, $q);
|
||||
|
||||
$name = $database->getUserField($uid,"username",0);
|
||||
mysql_query("Insert into ".TB_PREFIX."admin_log values (0,$ID,'Deleted user <a>$name</a>',".time().")");
|
||||
mysqli_query("Insert into ".TB_PREFIX."admin_log values (0,$ID,'Deleted user <a>$name</a>',".time().")");
|
||||
$q = "DELETE FROM ".TB_PREFIX."users WHERE `id` = $uid;";
|
||||
mysql_query($q, $this->connection);
|
||||
mysqli_query($this->connection, $q);
|
||||
}
|
||||
}
|
||||
|
||||
function getUserActive() {
|
||||
$time = time() - (60*5);
|
||||
$q = "SELECT * FROM ".TB_PREFIX."users where timestamp > $time and username != 'support'";
|
||||
$result = mysql_query($q, $this->connection);
|
||||
return $this->mysql_fetch_all($result);
|
||||
$result = mysqli_query($this->connection, $q);
|
||||
return $this->mysqli_fetch_all($result);
|
||||
}
|
||||
|
||||
function CheckPass($password,$uid){
|
||||
$q = "SELECT password FROM ".TB_PREFIX."users where id = '$uid' and access = ".ADMIN;
|
||||
$result = mysql_query($q, $this->connection);
|
||||
$dbarray = mysql_fetch_array($result);
|
||||
$result = mysqli_query($this->connection, $q);
|
||||
$dbarray = mysqli_fetch_array($result);
|
||||
if($dbarray['password'] == md5($password)) {
|
||||
return true;
|
||||
}else{
|
||||
@@ -239,37 +239,37 @@ class adm_DB {
|
||||
}else{
|
||||
$q = "SELECT * FROM ".TB_PREFIX."vdata WHERE `wref` = $wref";
|
||||
}
|
||||
$result = mysql_query($q, $this->connection);
|
||||
if(mysql_num_rows($result) > 0){
|
||||
mysql_query("Insert into ".TB_PREFIX."admin_log values (0,".$_SESSION['id'].",'Deleted village <b>$wref</b>',".time().")");
|
||||
$result = mysqli_query($this->connection, $q);
|
||||
if(mysqli_num_rows($result) > 0){
|
||||
mysqli_query("Insert into ".TB_PREFIX."admin_log values (0,".$_SESSION['id'].",'Deleted village <b>$wref</b>',".time().")");
|
||||
|
||||
$database->clearExpansionSlot($wref);
|
||||
|
||||
$q = "DELETE FROM ".TB_PREFIX."abdata where vref = $wref";
|
||||
mysql_query($q, $this->connection);
|
||||
mysqli_query($this->connection, $q);
|
||||
$q = "DELETE FROM ".TB_PREFIX."bdata where wid = $wref";
|
||||
mysql_query($q, $this->connection);
|
||||
mysqli_query($this->connection, $q);
|
||||
$q = "DELETE FROM ".TB_PREFIX."market where vref = $wref";
|
||||
mysql_query($q, $this->connection);
|
||||
mysqli_query($this->connection, $q);
|
||||
$q = "DELETE FROM ".TB_PREFIX."odata where wref = $wref";
|
||||
mysql_query($q, $this->connection);
|
||||
mysqli_query($this->connection, $q);
|
||||
$q = "DELETE FROM ".TB_PREFIX."research where vref = $wref";
|
||||
mysql_query($q, $this->connection);
|
||||
mysqli_query($this->connection, $q);
|
||||
$q = "DELETE FROM ".TB_PREFIX."tdata where vref = $wref";
|
||||
mysql_query($q, $this->connection);
|
||||
mysqli_query($this->connection, $q);
|
||||
$q = "DELETE FROM ".TB_PREFIX."fdata where vref = $wref";
|
||||
mysql_query($q, $this->connection);
|
||||
mysqli_query($this->connection, $q);
|
||||
$q = "DELETE FROM ".TB_PREFIX."training where vref = $wref";
|
||||
mysql_query($q, $this->connection);
|
||||
mysqli_query($this->connection, $q);
|
||||
$q = "DELETE FROM ".TB_PREFIX."units where vref = $wref";
|
||||
mysql_query($q, $this->connection);
|
||||
mysqli_query($this->connection, $q);
|
||||
$q = "DELETE FROM ".TB_PREFIX."farmlist where wref = $wref";
|
||||
mysql_query($q, $this->connection);
|
||||
mysqli_query($this->connection, $q);
|
||||
$q = "DELETE FROM ".TB_PREFIX."raidlist where towref = $wref";
|
||||
mysql_query($q, $this->connection);
|
||||
mysqli_query($this->connection, $q);
|
||||
|
||||
$q = "DELETE FROM ".TB_PREFIX."movement where `from` = $wref and proc=0";
|
||||
mysql_query($q, $this->connection);
|
||||
mysqli_query($this->connection, $q);
|
||||
|
||||
$getmovement = $database->getMovement(3,$wref,1);
|
||||
foreach($getmovement as $movedata) {
|
||||
@@ -284,11 +284,11 @@ class adm_DB {
|
||||
$this->returnTroops($wref);
|
||||
|
||||
$q = "DELETE FROM ".TB_PREFIX."vdata WHERE `wref` = $wref";
|
||||
mysql_query($q, $this->connection);
|
||||
mysqli_query($this->connection, $q);
|
||||
|
||||
if (mysql_affected_rows()>0) {
|
||||
if (mysqli_affected_rows()>0) {
|
||||
$q = "UPDATE ".TB_PREFIX."wdata set occupied = 0 where id = $wref";
|
||||
mysql_query($q, $this->connection);
|
||||
mysqli_query($this->connection, $q);
|
||||
|
||||
$getprisoners = $database->getPrisoners($wref);
|
||||
foreach($getprisoners as $pris) {
|
||||
@@ -355,8 +355,8 @@ class adm_DB {
|
||||
|
||||
if( intval($enforce['hero']) > 0){
|
||||
$q = "SELECT * FROM ".TB_PREFIX."hero WHERE uid = ".$from['owner']."";
|
||||
$result = mysql_query($q);
|
||||
$hero_f=mysql_fetch_array($result);
|
||||
$result = mysqli_query($q);
|
||||
$hero_f=mysqli_fetch_array($result);
|
||||
$hero_unit=$hero_f['unit'];
|
||||
$speeds[] = $GLOBALS['u'.$hero_unit]['speed'];
|
||||
} else {
|
||||
@@ -471,83 +471,83 @@ class adm_DB {
|
||||
function DelBan($uid,$id){
|
||||
global $database;
|
||||
$name = addslashes($database->getUserField($uid,"username",0));
|
||||
mysql_query("Insert into ".TB_PREFIX."admin_log values (0,".$_SESSION['id'].",'Unbanned user <a href=\'admin.php?p=player&uid=$uid\'>$name</a>',".time().")");
|
||||
mysqli_query("Insert into ".TB_PREFIX."admin_log values (0,".$_SESSION['id'].",'Unbanned user <a href=\'admin.php?p=player&uid=$uid\'>$name</a>',".time().")");
|
||||
$q = "UPDATE ".TB_PREFIX."users SET `access` = '".USER."' WHERE `id` = $uid;";
|
||||
mysql_query($q, $this->connection);
|
||||
mysqli_query($this->connection, $q);
|
||||
$q = "UPDATE ".TB_PREFIX."banlist SET `active` = '0' WHERE `id` = $id;";
|
||||
mysql_query($q, $this->connection);
|
||||
mysqli_query($this->connection, $q);
|
||||
}
|
||||
|
||||
function AddBan($uid,$end,$reason){
|
||||
global $database;
|
||||
$name = addslashes($database->getUserField($uid,"username",0));
|
||||
mysql_query("Insert into ".TB_PREFIX."admin_log values (0,".$_SESSION['id'].",'Banned user <a href=\'admin.php?p=player&uid=$uid\'>$name</a>',".time().")");
|
||||
mysqli_query("Insert into ".TB_PREFIX."admin_log values (0,".$_SESSION['id'].",'Banned user <a href=\'admin.php?p=player&uid=$uid\'>$name</a>',".time().")");
|
||||
$q = "UPDATE ".TB_PREFIX."users SET `access` = '0' WHERE `id` = $uid;";
|
||||
mysql_query($q, $this->connection);
|
||||
mysqli_query($this->connection, $q);
|
||||
$time = time();
|
||||
$admin = $_SESSION['id']; //$database->getUserField($_SESSION['username'],'id',1);
|
||||
$name = addslashes($database->getUserField($uid,'username',0));
|
||||
$q = "INSERT INTO ".TB_PREFIX."banlist (`uid`, `name`, `reason`, `time`, `end`, `admin`, `active`) VALUES ($uid, '$name' , '$reason', '$time', '$end', '$admin', '1');";
|
||||
mysql_query($q, $this->connection);
|
||||
mysqli_query($this->connection, $q);
|
||||
}
|
||||
|
||||
function search_player($player){
|
||||
$q = "SELECT id,username FROM ".TB_PREFIX."users WHERE `username` LIKE '%$player%' and username != 'support'";
|
||||
$result = mysql_query($q, $this->connection);
|
||||
return $this->mysql_fetch_all($result);
|
||||
$result = mysqli_query($this->connection, $q);
|
||||
return $this->mysqli_fetch_all($result);
|
||||
}
|
||||
|
||||
function search_email($email){
|
||||
$q = "SELECT id,email FROM ".TB_PREFIX."users WHERE `email` LIKE '%$email%' and username != 'support'";
|
||||
$result = mysql_query($q, $this->connection);
|
||||
return $this->mysql_fetch_all($result);
|
||||
$result = mysqli_query($this->connection, $q);
|
||||
return $this->mysqli_fetch_all($result);
|
||||
}
|
||||
|
||||
function search_village($village){
|
||||
$q = "SELECT * FROM ".TB_PREFIX."vdata WHERE `name` LIKE '%$village%' or `wref` LIKE '%$village%'";
|
||||
$result = mysql_query($q, $this->connection);
|
||||
return $this->mysql_fetch_all($result);
|
||||
$result = mysqli_query($this->connection, $q);
|
||||
return $this->mysqli_fetch_all($result);
|
||||
}
|
||||
|
||||
function search_alliance($alliance){
|
||||
$q = "SELECT * FROM ".TB_PREFIX."alidata WHERE `name` LIKE '%$alliance%' or `tag` LIKE '%$alliance%' or `id` LIKE '%$alliance%'";
|
||||
$result = mysql_query($q, $this->connection);
|
||||
return $this->mysql_fetch_all($result);
|
||||
$result = mysqli_query($this->connection, $q);
|
||||
return $this->mysqli_fetch_all($result);
|
||||
}
|
||||
|
||||
function search_ip($ip){
|
||||
$q = "SELECT * FROM ".TB_PREFIX."login_log WHERE `ip` LIKE '%$ip%'";
|
||||
$result = mysql_query($q, $this->connection);
|
||||
return $this->mysql_fetch_all($result);
|
||||
$result = mysqli_query($this->connection, $q);
|
||||
return $this->mysqli_fetch_all($result);
|
||||
}
|
||||
|
||||
function search_banned(){
|
||||
$q = "SELECT * FROM ".TB_PREFIX."banlist where active = '1'";
|
||||
$result = mysql_query($q, $this->connection);
|
||||
return $this->mysql_fetch_all($result);
|
||||
$result = mysqli_query($this->connection, $q);
|
||||
return $this->mysqli_fetch_all($result);
|
||||
}
|
||||
|
||||
function Del_banned(){
|
||||
//$q = "SELECT * FROM ".TB_PREFIX."banlist";
|
||||
$result = mysql_query($q, $this->connection);
|
||||
return $this->mysql_fetch_all($result);
|
||||
$result = mysqli_query($this->connection, $q);
|
||||
return $this->mysqli_fetch_all($result);
|
||||
}
|
||||
|
||||
/***************************
|
||||
Function to process MYSQLi->fetch_all (Only exist in MYSQL)
|
||||
References: Result
|
||||
***************************/
|
||||
function mysql_fetch_all($result) {
|
||||
function mysqli_fetch_all($result) {
|
||||
$all = array();
|
||||
if($result) {
|
||||
while ($row = mysql_fetch_assoc($result)){ $all[] = $row; }
|
||||
while ($row = mysqli_fetch_assoc($result)){ $all[] = $row; }
|
||||
return $all;
|
||||
}
|
||||
}
|
||||
|
||||
function query_return($q) {
|
||||
$result = mysql_query($q, $this->connection);
|
||||
return $this->mysql_fetch_all($result);
|
||||
$result = mysqli_query($this->connection, $q);
|
||||
return $this->mysqli_fetch_all($result);
|
||||
}
|
||||
|
||||
/***************************
|
||||
@@ -555,7 +555,7 @@ class adm_DB {
|
||||
References: Query
|
||||
***************************/
|
||||
function query($query) {
|
||||
return mysql_query($query, $this->connection);
|
||||
return mysqli_query($query, $this->connection);
|
||||
}
|
||||
|
||||
|
||||
|
||||
+1
-1
@@ -93,7 +93,7 @@ class funct {
|
||||
exit;
|
||||
case "reviveHero":
|
||||
$result=$database->query("SELECT * FROM ".TB_PREFIX."hero WHERE uid='".$get['uid']."'");
|
||||
$hdata=mysql_fetch_array($result);
|
||||
$hdata=mysqli_fetch_array($result);
|
||||
$database->query("UPDATE ".TB_PREFIX."units SET hero = 1 WHERE vref = ".$hdata['wref']);
|
||||
$database->query("UPDATE ".TB_PREFIX."hero SET `dead` = '0', `inrevive` = '0', `health` = '100', `lastupdate` = ".time()." WHERE `uid` = '".$get['uid']."'");
|
||||
header("Location: admin.php?p=player&uid=".$get['uid']."&rc=1");
|
||||
|
||||
@@ -20,7 +20,7 @@ include("Session.php");
|
||||
|
||||
class Account {
|
||||
|
||||
function Account() {
|
||||
function __construct() {
|
||||
global $session;
|
||||
if(isset($_POST['ft'])) {
|
||||
switch($_POST['ft']) {
|
||||
@@ -140,8 +140,8 @@ class Account {
|
||||
{
|
||||
global $database;
|
||||
$q = "SELECT * FROM ".TB_PREFIX."activate where act = '".$_POST['id']."'";
|
||||
$result = mysql_query($q, $database->connection);
|
||||
$dbarray = mysql_fetch_array($result);
|
||||
$result = mysqli_query($GLOBALS['link'],$q);
|
||||
$dbarray = mysqli_fetch_array($result);
|
||||
if($dbarray['act'] == $_POST['id']) {
|
||||
$uid = $database->register($dbarray['username'],$dbarray['password'],$dbarray['email'],$dbarray['tribe'],"");
|
||||
if($uid) {
|
||||
@@ -165,8 +165,8 @@ class Account {
|
||||
private function Unreg() {
|
||||
global $database;
|
||||
$q = "SELECT * FROM ".TB_PREFIX."activate where id = '".$_POST['id']."'";
|
||||
$result = mysql_query($q, $database->connection);
|
||||
$dbarray = mysql_fetch_array($result);
|
||||
$result = mysqli_query($GLOBALS['link'],$q);
|
||||
$dbarray = mysqli_fetch_array($result);
|
||||
if(md5($_POST['pw']) == $dbarray['password']) {
|
||||
$database->unreg($dbarray['username']);
|
||||
header("Location: anmelden.php");
|
||||
@@ -178,9 +178,10 @@ class Account {
|
||||
|
||||
private function Login() {
|
||||
global $database,$session,$form;
|
||||
$_POST['user'] = mysql_real_escape_string($_POST['user']);
|
||||
$user = $_POST['user'];
|
||||
$user = mysqli_real_escape_string($GLOBALS['link'], $user);
|
||||
if(!isset($_POST['user']) || $_POST['user'] == "") {
|
||||
$form->addError("user",LOGIN_USR_EMPTY);
|
||||
$form->addError("user",$user);
|
||||
}
|
||||
else if(!$database->checkExist($_POST['user'],0)) {
|
||||
$form->addError("user",USR_NT_FOUND);
|
||||
@@ -224,7 +225,7 @@ class Account {
|
||||
global $session,$database;
|
||||
unset($_SESSION['wid']);
|
||||
$database->activeModify(addslashes($session->username),1);
|
||||
$database->UpdateOnline("logout") or die(mysql_error());
|
||||
$database->UpdateOnline("logout") or die(mysqli_error());
|
||||
$session->Logout();
|
||||
}
|
||||
|
||||
|
||||
@@ -11,8 +11,8 @@
|
||||
include_once("../../config.php");
|
||||
include_once("../../Session.php");
|
||||
include_once("../../Automation.php");
|
||||
mysql_connect(SQL_SERVER, SQL_USER, SQL_PASS);
|
||||
mysql_select_db(SQL_DB);
|
||||
$GLOBALS["link"] = mysqli_connect(SQL_SERVER, SQL_USER, SQL_PASS);
|
||||
mysqli_select_db($GLOBALS["link"], SQL_DB);
|
||||
|
||||
$wgarray=array(1=>1200,1700,2300,3100,4000,5000,6300,7800,9600,11800,14400,17600,21400,25900,31300,37900,45700,55100,66400,80000);
|
||||
|
||||
@@ -102,7 +102,7 @@ else
|
||||
// Need a $database function for this
|
||||
// (assuming we don't already have one as creating Natars also updates this way)
|
||||
$q = "UPDATE " . TB_PREFIX . "users SET desc2 = '[#0]' WHERE id = $uid";
|
||||
mysql_query($q) or die(mysql_error());
|
||||
mysqli_query($GLOBALS["link"], $q) or die(mysqli_error());
|
||||
|
||||
if (!$beginnersProtection)
|
||||
{
|
||||
@@ -111,9 +111,9 @@ else
|
||||
// also used in editProtection.php so assuming no function
|
||||
// already exists
|
||||
$protection = time();
|
||||
mysql_query("UPDATE ".TB_PREFIX."users SET
|
||||
mysqli_query($GLOBALS["link"], "UPDATE ".TB_PREFIX."users SET
|
||||
protect = '".$protection."'
|
||||
WHERE id = $uid") or die(mysql_error());
|
||||
WHERE id = $uid") or die(mysqli_error());
|
||||
}
|
||||
|
||||
$database->updateUserField($uid,"act","",1);
|
||||
@@ -129,9 +129,9 @@ WHERE id = $uid") or die(mysql_error());
|
||||
//insert village with all resource and building with random level
|
||||
$time = time();
|
||||
$q = "INSERT INTO ".TB_PREFIX."vdata (`wref`,`owner`,`name`,`capital`,`pop`,`cp`,`celebration`,`type`,`wood`,`clay`,`iron`,`maxstore`,`crop`,`maxcrop`,`lastupdate`,`loyalty`,`exp1`,`exp2`,`exp3`,`created`) values ('$wid','$uid','".$userName."\'s village',1,200,1,0,0,$rand_resource,$rand_resource,$rand_resource,$cap_storage,$rand_resource,$cap_storage,$time,100,0,0,0,$time)";
|
||||
mysql_query($q) or die(mysql_error());
|
||||
mysqli_query($GLOBALS["link"], $q) or die(mysqli_error());
|
||||
$q = "insert into ".TB_PREFIX."fdata (`vref`,`f1`,`f1t`,`f2`,`f2t`,`f3`,`f3t`,`f4`,`f4t`,`f5`,`f5t`,`f6`,`f6t`,`f7`,`f7t`,`f8`,`f8t`,`f9`,`f9t`,`f10`,`f10t`,`f11`,`f11t`,`f12`,`f12t`,`f13`,`f13t`,`f14`,`f14t`,`f15`,`f15t`,`f16`,`f16t`,`f17`,`f17t`,`f18`,`f18t`,`f19`,`f19t`,`f20`,`f20t`,`f21`,`f21t`,`f22`,`f22t`,`f23`,`f23t`,`f24`,`f24t`,`f25`,`f25t`,`f26`,`f26t`,`f27`,`f27t`,`f28`,`f28t`,`f29`,`f29t`,`f30`,`f30t`,`f31`,`f31t`,`f32`,`f32t`,`f33`,`f33t`,`f34`,`f34t`,`f35`,`f35t`,`f36`,`f36t`,`f37`,`f37t`,`f38`,`f38t`,`f39`,`f39t`,`f40`,`f40t`,`f99`,`f99t`,`wwname`) values ($wid ,".rand(5,10).",1,".rand(5,10).",4,".rand(5,10).",1,".rand(5,10).",3,".rand(5,10).",2,".rand(5,10).",2,".rand(5,10).",3,".rand(5,10).",4,".rand(5,10).",4,".rand(5,10).",3,".rand(5,10).",3,".rand(5,10).",4,".rand(5,10).",4,".rand(5,10).",1,".rand(5,10).",4,".rand(5,10).",2,".rand(5,10).",1,".rand(5,10).",2,".rand(2,5).",8,".rand(5,20).",37,".rand(10,20).",26,".rand(10,20).",22,".rand(10,20).",19,".rand(2,5).",9,$level_storage,11,".rand(10,20).",15,".rand(10,20).",20,0,0,".rand(10,15).",17,$level_storage,10,".rand(5,10).",12,0,0,10,23,0,0,0,0,0,0,0,0,".rand(5,10).",18,".rand(5,10).",16,0,0,0,0,'World Wonder')";
|
||||
mysql_query($q);
|
||||
mysqli_query($GLOBALS["link"], $q);
|
||||
$pop = $automation->recountPop($wid);
|
||||
$cp = $automation->recountPop($wid);
|
||||
$database->addUnits($wid);
|
||||
@@ -141,7 +141,7 @@ WHERE id = $uid") or die(mysql_error());
|
||||
|
||||
//insert units randomly generate the number of troops
|
||||
$q = "UPDATE " . TB_PREFIX . "units SET u".(($tribe-1)*10+1)." = ".rand(100, 2000).", u".(($tribe-1)*10+2)." = ".rand(100, 2400).", u".(($tribe-1)*10+3)." = ".rand(100, 1600).", u".(($tribe-1)*10+4)." = ".rand(100, 1500).", u".(($tribe-1)*10+5)." = " .rand(48, 1700).", u".(($tribe-1)*10+6)." = ".rand(60, 1800)." WHERE vref = '".$wid."'";
|
||||
mysql_query($q);
|
||||
mysqli_query($GLOBALS["link"], $q);
|
||||
|
||||
$created ++;
|
||||
|
||||
|
||||
@@ -11,14 +11,14 @@
|
||||
include_once("../../config.php");
|
||||
if (!isset($_SESSION)) session_start();
|
||||
if($_SESSION['access'] < 9) die("Access Denied: You are not Admin!");
|
||||
mysql_connect(SQL_SERVER, SQL_USER, SQL_PASS);
|
||||
mysql_select_db(SQL_DB);
|
||||
$GLOBALS["link"] = mysqli_connect(SQL_SERVER, SQL_USER, SQL_PASS);
|
||||
mysqli_select_db($GLOBALS["link"], SQL_DB);
|
||||
|
||||
$id = $_POST['id'];
|
||||
$admid = $_POST['admid'];
|
||||
|
||||
//$sql = mysql_query("SELECT * FROM ".TB_PREFIX."users WHERE id = ".$admid."");
|
||||
//$access = mysql_fetch_array($sql);
|
||||
//$sql = mysqli_query($GLOBALS["link"], "SELECT * FROM ".TB_PREFIX."users WHERE id = ".$admid."");
|
||||
//$access = mysqli_fetch_array($sql);
|
||||
//$sessionaccess = $access['access'];
|
||||
if (!isset($_SESSION)) {
|
||||
session_start();
|
||||
@@ -30,7 +30,7 @@ $access = $_POST['access'];
|
||||
$dur = $_POST['protect'] * 86400;
|
||||
$protection = (time() + $dur);
|
||||
|
||||
mysql_query("UPDATE ".TB_PREFIX."users SET
|
||||
mysqli_query($GLOBALS["link"], "UPDATE ".TB_PREFIX."users SET
|
||||
access = ".$access.",
|
||||
gold = ".$_POST['gold'].",
|
||||
sit1 = '".$_POST['sitter1']."',
|
||||
@@ -42,7 +42,7 @@ mysql_query("UPDATE ".TB_PREFIX."users SET
|
||||
RR = '".$_POST['res']."',
|
||||
apall = '".$_POST['ooff']."',
|
||||
dpall = '".$_POST['odef']."'
|
||||
WHERE id = ".$id."") or die(mysql_error());
|
||||
WHERE id = ".$id."") or die(mysqli_error());
|
||||
|
||||
header("Location: ../../../Admin/admin.php?p=player&uid=".$id."");
|
||||
?>
|
||||
@@ -252,6 +252,8 @@ define("ADMIN_NAME", "%ANAME%");
|
||||
//////////////////////////////////////////
|
||||
// **** DO NOT EDIT SETTINGS **** //
|
||||
//////////////////////////////////////////
|
||||
define("AUTO_DEL_INACTIVE",false); // auto-delete inactive players; default = false
|
||||
define("UN_ACT_TIME", 3628800); // 6 weeks to consider a player inactive
|
||||
define("TRACK_USR","%UTRACK%");
|
||||
define("USER_TIMEOUT","%UTOUT%");
|
||||
define("ALLOW_BURST",false);
|
||||
|
||||
@@ -12,19 +12,19 @@ if (!isset($_SESSION)) session_start();
|
||||
if($_SESSION['access'] < 9) die("Access Denied: You are not Admin!");
|
||||
include_once("../../config.php");
|
||||
|
||||
mysql_connect(SQL_SERVER, SQL_USER, SQL_PASS);
|
||||
mysql_select_db(SQL_DB);
|
||||
$GLOBALS["link"] = mysqli_connect(SQL_SERVER, SQL_USER, SQL_PASS);
|
||||
mysqli_select_db($GLOBALS["link"], SQL_DB);
|
||||
|
||||
$id = $_POST['id'];
|
||||
$admid = $_POST['admid'];
|
||||
|
||||
$sql = mysql_query("SELECT * FROM ".TB_PREFIX."users WHERE id = ".$admid."");
|
||||
$access = mysql_fetch_array($sql);
|
||||
$sql = mysqli_query($GLOBALS["link"], "SELECT * FROM ".TB_PREFIX."users WHERE id = ".$admid."");
|
||||
$access = mysqli_fetch_array($sql);
|
||||
$sessionaccess = $access['access'];
|
||||
|
||||
if($sessionaccess != 9) die("<h1><font color=\"red\">Access Denied: You are not Admin!</font></h1>");
|
||||
|
||||
mysql_query("UPDATE ".TB_PREFIX."users SET cp = cp + ".$_POST['cp']." WHERE id = ".$id."");
|
||||
mysqli_query($GLOBALS["link"], "UPDATE ".TB_PREFIX."users SET cp = cp + ".$_POST['cp']." WHERE id = ".$id."");
|
||||
|
||||
header("Location: ../../../Admin/admin.php?p=player&uid=".$id."");
|
||||
?>
|
||||
@@ -12,20 +12,20 @@ if (!isset($_SESSION)) session_start();
|
||||
if($_SESSION['access'] < 9) die("Access Denied: You are not Admin!");
|
||||
include_once("../../config.php");
|
||||
|
||||
mysql_connect(SQL_SERVER, SQL_USER, SQL_PASS);
|
||||
mysql_select_db(SQL_DB);
|
||||
$GLOBALS["link"] = mysqli_connect(SQL_SERVER, SQL_USER, SQL_PASS);
|
||||
mysqli_select_db($GLOBALS["link"], SQL_DB);
|
||||
|
||||
$delete = $_POST['medalid'];
|
||||
$aid = $_POST['aid'];
|
||||
$session = $_POST['admid'];
|
||||
|
||||
$sql = mysql_query("SELECT * FROM ".TB_PREFIX."users WHERE id = ".$session."");
|
||||
$access = mysql_fetch_array($sql);
|
||||
$sql = mysqli_query($GLOBALS["link"], "SELECT * FROM ".TB_PREFIX."users WHERE id = ".$session."");
|
||||
$access = mysqli_fetch_array($sql);
|
||||
$sessionaccess = $access['access'];
|
||||
|
||||
if($sessionaccess != 9) die("<h1><font color=\"red\">Access Denied: You are not Admin!</font></h1>");
|
||||
|
||||
mysql_query("UPDATE ".TB_PREFIX."allimedal set del = 1 WHERE id = ".$delete."");
|
||||
mysqli_query($GLOBALS["link"], "UPDATE ".TB_PREFIX."allimedal set del = 1 WHERE id = ".$delete."");
|
||||
|
||||
header("Location: ../../../Admin/admin.php?p=alliance&aid=".$aid."");
|
||||
?>
|
||||
@@ -12,20 +12,20 @@ if (!isset($_SESSION)) session_start();
|
||||
if($_SESSION['access'] < 9) die("Access Denied: You are not Admin!");
|
||||
include_once("../../config.php");
|
||||
|
||||
mysql_connect(SQL_SERVER, SQL_USER, SQL_PASS);
|
||||
mysql_select_db(SQL_DB);
|
||||
$GLOBALS["link"] = mysqli_connect(SQL_SERVER, SQL_USER, SQL_PASS);
|
||||
mysqli_select_db($GLOBALS["link"], SQL_DB);
|
||||
|
||||
$allyid = $_POST['allyid'];
|
||||
$aid = $_POST['aid'];
|
||||
$session = $_POST['admid'];
|
||||
|
||||
$sql = mysql_query("SELECT * FROM ".TB_PREFIX."users WHERE id = ".$session."");
|
||||
$access = mysql_fetch_array($sql);
|
||||
$sql = mysqli_query($GLOBALS["link"], "SELECT * FROM ".TB_PREFIX."users WHERE id = ".$session."");
|
||||
$access = mysqli_fetch_array($sql);
|
||||
$sessionaccess = $access['access'];
|
||||
|
||||
if($sessionaccess != 9) die("<h1><font color=\"red\">Access Denied: You are not Admin!</font></h1>");
|
||||
|
||||
mysql_query("UPDATE ".TB_PREFIX."allimedal set del = 1 WHERE allyid = ".$aid."");
|
||||
mysqli_query($GLOBALS["link"], "UPDATE ".TB_PREFIX."allimedal set del = 1 WHERE allyid = ".$aid."");
|
||||
|
||||
header("Location: ../../../Admin/admin.php?p=alliance&aid=".$aid."");
|
||||
?>
|
||||
@@ -12,19 +12,19 @@ if (!isset($_SESSION)) session_start();
|
||||
if($_SESSION['access'] < 9) die("Access Denied: You are not Admin!");
|
||||
include_once("../../config.php");
|
||||
|
||||
mysql_connect(SQL_SERVER, SQL_USER, SQL_PASS);
|
||||
mysql_select_db(SQL_DB);
|
||||
$GLOBALS["link"] = mysqli_connect(SQL_SERVER, SQL_USER, SQL_PASS);
|
||||
mysqli_select_db($GLOBALS["link"], SQL_DB);
|
||||
|
||||
$deleteweek = $_POST['deleteweek'];
|
||||
$session = $_POST['admid'];
|
||||
|
||||
$sql = mysql_query("SELECT * FROM ".TB_PREFIX."users WHERE id = ".$session."");
|
||||
$access = mysql_fetch_array($sql);
|
||||
$sql = mysqli_query($GLOBALS["link"], "SELECT * FROM ".TB_PREFIX."users WHERE id = ".$session."");
|
||||
$access = mysqli_fetch_array($sql);
|
||||
$sessionaccess = $access['access'];
|
||||
|
||||
if($sessionaccess != 9) die("<h1><font color=\"red\">Access Denied: You are not Admin!</font></h1>");
|
||||
|
||||
mysql_query("UPDATE ".TB_PREFIX."allimedal set del = 1 WHERE week = ".$deleteweek."");
|
||||
mysqli_query($GLOBALS["link"], "UPDATE ".TB_PREFIX."allimedal set del = 1 WHERE week = ".$deleteweek."");
|
||||
|
||||
header("Location: ../../../Admin/admin.php?p=delallymedal");
|
||||
?>
|
||||
@@ -12,19 +12,19 @@ if (!isset($_SESSION)) session_start();
|
||||
if($_SESSION['access'] < 9) die("Access Denied: You are not Admin!");
|
||||
include_once("../../config.php");
|
||||
|
||||
mysql_connect(SQL_SERVER, SQL_USER, SQL_PASS);
|
||||
mysql_select_db(SQL_DB);
|
||||
$GLOBALS["link"] = mysqli_connect(SQL_SERVER, SQL_USER, SQL_PASS);
|
||||
mysqli_select_db($GLOBALS["link"], SQL_DB);
|
||||
|
||||
$userid = $_POST['userid'];
|
||||
$session = $_POST['admid'];
|
||||
|
||||
$sql = mysql_query("SELECT * FROM ".TB_PREFIX."users WHERE id = ".$session."");
|
||||
$access = mysql_fetch_array($sql);
|
||||
$sql = mysqli_query($GLOBALS["link"], "SELECT * FROM ".TB_PREFIX."users WHERE id = ".$session."");
|
||||
$access = mysqli_fetch_array($sql);
|
||||
$sessionaccess = $access['access'];
|
||||
|
||||
if($sessionaccess != 9) die("<h1><font color=\"red\">Access Denied: You are not Admin!</font></h1>");
|
||||
|
||||
mysql_query("UPDATE ".TB_PREFIX."medal set del = 1 WHERE userid = ".$userid."");
|
||||
mysqli_query($GLOBALS["link"], "UPDATE ".TB_PREFIX."medal set del = 1 WHERE userid = ".$userid."");
|
||||
|
||||
header("Location: ../../../Admin/admin.php?p=player&uid=".$userid."");
|
||||
?>
|
||||
@@ -12,19 +12,19 @@ if (!isset($_SESSION)) session_start();
|
||||
if($_SESSION['access'] < 9) die("Access Denied: You are not Admin!");
|
||||
include_once("../../config.php");
|
||||
|
||||
mysql_connect(SQL_SERVER, SQL_USER, SQL_PASS);
|
||||
mysql_select_db(SQL_DB);
|
||||
$GLOBALS["link"] = mysqli_connect(SQL_SERVER, SQL_USER, SQL_PASS);
|
||||
mysqli_select_db($GLOBALS["link"], SQL_DB);
|
||||
|
||||
$deleteweek = $_POST['medalweek'];
|
||||
$session = $_POST['admid'];
|
||||
|
||||
$sql = mysql_query("SELECT * FROM ".TB_PREFIX."users WHERE id = ".$session."");
|
||||
$access = mysql_fetch_array($sql);
|
||||
$sql = mysqli_query($GLOBALS["link"], "SELECT * FROM ".TB_PREFIX."users WHERE id = ".$session."");
|
||||
$access = mysqli_fetch_array($sql);
|
||||
$sessionaccess = $access['access'];
|
||||
|
||||
if($sessionaccess != 9) die("<h1><font color=\"red\">Access Denied: You are not Admin!</font></h1>");
|
||||
|
||||
mysql_query("UPDATE ".TB_PREFIX."medal set del = 1 WHERE week = ".$deleteweek."");
|
||||
mysqli_query($GLOBALS["link"], "UPDATE ".TB_PREFIX."medal set del = 1 WHERE week = ".$deleteweek."");
|
||||
|
||||
header("Location: ../../../Admin/admin.php?p=delmedal");
|
||||
?>
|
||||
@@ -12,23 +12,23 @@ if (!isset($_SESSION)) session_start();
|
||||
if($_SESSION['access'] < 9) die("Access Denied: You are not Admin!");
|
||||
include_once("../../config.php");
|
||||
|
||||
mysql_connect(SQL_SERVER, SQL_USER, SQL_PASS);
|
||||
mysql_select_db(SQL_DB);
|
||||
$GLOBALS["link"] = mysqli_connect(SQL_SERVER, SQL_USER, SQL_PASS);
|
||||
mysqli_select_db($GLOBALS["link"], SQL_DB);
|
||||
|
||||
$session = $_POST['admid'];
|
||||
$id = $_POST['uid'];
|
||||
|
||||
$sql = mysql_query("SELECT * FROM ".TB_PREFIX."users WHERE id = ".$session."");
|
||||
$access = mysql_fetch_array($sql);
|
||||
$sql = mysqli_query($GLOBALS["link"], "SELECT * FROM ".TB_PREFIX."users WHERE id = ".$session."");
|
||||
$access = mysqli_fetch_array($sql);
|
||||
$sessionaccess = $access['access'];
|
||||
|
||||
if($sessionaccess != 9) die("<h1><font color=\"red\">Access Denied: You are not Admin!</font></h1>");
|
||||
|
||||
$access = $_POST['access'];
|
||||
|
||||
mysql_query("UPDATE ".TB_PREFIX."users SET
|
||||
mysqli_query($GLOBALS["link"], "UPDATE ".TB_PREFIX."users SET
|
||||
access = ".$access."
|
||||
WHERE id = ".$id."") or die(mysql_error());
|
||||
WHERE id = ".$id."") or die(mysqli_error());
|
||||
|
||||
header("Location: ../../../Admin/admin.php?p=player&uid=".$id."");
|
||||
?>
|
||||
@@ -15,12 +15,12 @@ if($_SESSION['access'] < 9) die("<h1><font color=\"red\">Access Denied: You are
|
||||
|
||||
include_once("../../config.php");
|
||||
|
||||
mysql_connect(SQL_SERVER, SQL_USER, SQL_PASS);
|
||||
mysql_select_db(SQL_DB);
|
||||
$GLOBALS["link"] = mysqli_connect(SQL_SERVER, SQL_USER, SQL_PASS);
|
||||
mysqli_select_db($GLOBALS["link"], SQL_DB);
|
||||
|
||||
$id = $_POST['id'];
|
||||
|
||||
mysql_query("UPDATE ".TB_PREFIX."fdata SET
|
||||
mysqli_query($GLOBALS["link"], "UPDATE ".TB_PREFIX."fdata SET
|
||||
f1 = '".$_POST['id1level']."',
|
||||
f1t = '".$_POST['id1gid']."',
|
||||
f2 = '".$_POST['id2level']."',
|
||||
@@ -101,7 +101,7 @@ mysql_query("UPDATE ".TB_PREFIX."fdata SET
|
||||
f39t = '".$_POST['id39gid']."',
|
||||
f40 = '".$_POST['id40level']."',
|
||||
f40t = '".$_POST['id40gid']."'
|
||||
WHERE vref = $id") or die(mysql_error());
|
||||
WHERE vref = $id") or die(mysqli_error());
|
||||
|
||||
header("Location: ../../../Admin/admin.php?p=village&did=".$id."");
|
||||
?>
|
||||
|
||||
@@ -12,22 +12,22 @@ if (!isset($_SESSION)) session_start();
|
||||
if($_SESSION['access'] < 9) die("Access Denied: You are not Admin!");
|
||||
include_once("../../config.php");
|
||||
|
||||
mysql_connect(SQL_SERVER, SQL_USER, SQL_PASS);
|
||||
mysql_select_db(SQL_DB);
|
||||
$GLOBALS["link"] = mysqli_connect(SQL_SERVER, SQL_USER, SQL_PASS);
|
||||
mysqli_select_db($GLOBALS["link"], SQL_DB);
|
||||
|
||||
$session = $_POST['admid'];
|
||||
$id = $_POST['id'];
|
||||
|
||||
$sql = mysql_query("SELECT * FROM ".TB_PREFIX."users WHERE id = ".$session."");
|
||||
$access = mysql_fetch_array($sql);
|
||||
$sql = mysqli_query($GLOBALS["link"], "SELECT * FROM ".TB_PREFIX."users WHERE id = ".$session."");
|
||||
$access = mysqli_fetch_array($sql);
|
||||
$sessionaccess = $access['access'];
|
||||
|
||||
if($sessionaccess != 9) die("<h1><font color=\"red\">Access Denied: You are not Admin!</font></h1>");
|
||||
|
||||
mysql_query("UPDATE ".TB_PREFIX."users SET
|
||||
mysqli_query($GLOBALS["link"], "UPDATE ".TB_PREFIX."users SET
|
||||
apall = '".$_POST['off']."',
|
||||
dpall = '".$_POST['def']."'
|
||||
WHERE id = $id") or die(mysql_error());
|
||||
WHERE id = $id") or die(mysqli_error());
|
||||
|
||||
header("Location: ../../../Admin/admin.php?p=player&uid=".$id."");
|
||||
?>
|
||||
@@ -12,22 +12,22 @@ if (!isset($_SESSION)) session_start();
|
||||
if($_SESSION['access'] < 9) die("Access Denied: You are not Admin!");
|
||||
include_once("../../config.php");
|
||||
|
||||
mysql_connect(SQL_SERVER, SQL_USER, SQL_PASS);
|
||||
mysql_select_db(SQL_DB);
|
||||
$GLOBALS["link"] = mysqli_connect(SQL_SERVER, SQL_USER, SQL_PASS);
|
||||
mysqli_select_db($GLOBALS["link"], SQL_DB);
|
||||
|
||||
$session = $_POST['admid'];
|
||||
$id = $_POST['uid'];
|
||||
$pass = md5($_POST['newpw']);
|
||||
|
||||
$sql = mysql_query("SELECT * FROM ".TB_PREFIX."users WHERE id = ".$session."");
|
||||
$access = mysql_fetch_array($sql);
|
||||
$sql = mysqli_query($GLOBALS["link"], "SELECT * FROM ".TB_PREFIX."users WHERE id = ".$session."");
|
||||
$access = mysqli_fetch_array($sql);
|
||||
$sessionaccess = $access['access'];
|
||||
|
||||
if($sessionaccess != 9) die("<h1><font color=\"red\">Access Denied: You are not Admin!</font></h1>");
|
||||
|
||||
mysql_query("UPDATE ".TB_PREFIX."users SET
|
||||
mysqli_query($GLOBALS["link"], "UPDATE ".TB_PREFIX."users SET
|
||||
password = '".$pass."'
|
||||
WHERE id = $id") or die(mysql_error());
|
||||
WHERE id = $id") or die(mysqli_error());
|
||||
|
||||
header("Location: ../../../Admin/admin.php?p=player&uid=".$id."");
|
||||
?>
|
||||
@@ -12,14 +12,14 @@ if (!isset($_SESSION)) session_start();
|
||||
if($_SESSION['access'] < 9) die("Access Denied: You are not Admin!");
|
||||
include_once("../../config.php");
|
||||
|
||||
mysql_connect(SQL_SERVER, SQL_USER, SQL_PASS);
|
||||
mysql_select_db(SQL_DB);
|
||||
$GLOBALS["link"] = mysqli_connect(SQL_SERVER, SQL_USER, SQL_PASS);
|
||||
mysqli_select_db($GLOBALS["link"], SQL_DB);
|
||||
|
||||
$session = $_POST['admid'];
|
||||
$id = $_POST['id'];
|
||||
|
||||
$sql = mysql_query("SELECT * FROM ".TB_PREFIX."users WHERE id = ".$session."");
|
||||
$access = mysql_fetch_array($sql);
|
||||
$sql = mysqli_query($GLOBALS["link"], "SELECT * FROM ".TB_PREFIX."users WHERE id = ".$session."");
|
||||
$access = mysqli_fetch_array($sql);
|
||||
$sessionaccess = $access['access'];
|
||||
|
||||
if($sessionaccess != 9) die("<h1><font color=\"red\">Access Denied: You are not Admin!</font></h1>");
|
||||
@@ -30,8 +30,8 @@ $b2dur = $_POST['clay'] * 86400;
|
||||
$b3dur = $_POST['iron'] * 86400;
|
||||
$b4dur = $_POST['crop'] * 86400;
|
||||
|
||||
$sql1 = mysql_query("SELECT * FROM ".TB_PREFIX."users WHERE id = ".$id."");
|
||||
$user = mysql_fetch_array($sql1);
|
||||
$sql1 = mysqli_query($GLOBALS["link"], "SELECT * FROM ".TB_PREFIX."users WHERE id = ".$id."");
|
||||
$user = mysqli_fetch_array($sql1);
|
||||
|
||||
if($user['plus'] < time()){
|
||||
if($pdur > 1){ $plus = (time() + $pdur); } else { $plus = time(); }
|
||||
@@ -59,13 +59,13 @@ if($b4dur > 1){ $crop = (time() + $b4dur); } else { $crop = time(); }
|
||||
if($b4dur > 1){ $crop = ($user['b4'] + $b4dur); } else { $crop = $user['b4']; }
|
||||
}
|
||||
|
||||
mysql_query("UPDATE ".TB_PREFIX."users SET
|
||||
mysqli_query($GLOBALS["link"], "UPDATE ".TB_PREFIX."users SET
|
||||
plus = '".$plus."',
|
||||
b1 = '".$wood."',
|
||||
b2 = '".$clay."',
|
||||
b3 = '".$iron."',
|
||||
b4 = '".$crop."'
|
||||
WHERE id = $id") or die(mysql_error());
|
||||
WHERE id = $id") or die(mysqli_error());
|
||||
|
||||
header("Location: ../../../Admin/admin.php?p=player&uid=".$id."");
|
||||
?>
|
||||
@@ -12,14 +12,14 @@ if (!isset($_SESSION)) session_start();
|
||||
if($_SESSION['access'] < 9) die("Access Denied: You are not Admin!");
|
||||
include_once("../../config.php");
|
||||
|
||||
mysql_connect(SQL_SERVER, SQL_USER, SQL_PASS);
|
||||
mysql_select_db(SQL_DB);
|
||||
$GLOBALS["link"] = mysqli_connect(SQL_SERVER, SQL_USER, SQL_PASS);
|
||||
mysqli_select_db($GLOBALS["link"], SQL_DB);
|
||||
|
||||
$session = $_POST['admid'];
|
||||
$id = $_POST['id'];
|
||||
|
||||
$sql = mysql_query("SELECT * FROM ".TB_PREFIX."users WHERE id = ".$session."");
|
||||
$access = mysql_fetch_array($sql);
|
||||
$sql = mysqli_query($GLOBALS["link"], "SELECT * FROM ".TB_PREFIX."users WHERE id = ".$session."");
|
||||
$access = mysqli_fetch_array($sql);
|
||||
$sessionaccess = $access['access'];
|
||||
|
||||
if($sessionaccess != 9) die("<h1><font color=\"red\">Access Denied: You are not Admin!</font></h1>");
|
||||
@@ -27,9 +27,9 @@ if($sessionaccess != 9) die("<h1><font color=\"red\">Access Denied: You are not
|
||||
$dur = $_POST['protect'] * 86400;
|
||||
$protection = (time() + $dur);
|
||||
|
||||
mysql_query("UPDATE ".TB_PREFIX."users SET
|
||||
mysqli_query($GLOBALS["link"], "UPDATE ".TB_PREFIX."users SET
|
||||
protect = '".$protection."'
|
||||
WHERE id = $id") or die(mysql_error());
|
||||
WHERE id = $id") or die(mysqli_error());
|
||||
|
||||
header("Location: ../../../Admin/admin.php?p=player&uid=".$id."");
|
||||
?>
|
||||
@@ -12,26 +12,26 @@ if (!isset($_SESSION)) session_start();
|
||||
if($_SESSION['access'] < 9) die("Access Denied: You are not Admin!");
|
||||
include_once("../../config.php");
|
||||
|
||||
mysql_connect(SQL_SERVER, SQL_USER, SQL_PASS);
|
||||
mysql_select_db(SQL_DB);
|
||||
$GLOBALS["link"] = mysqli_connect(SQL_SERVER, SQL_USER, SQL_PASS);
|
||||
mysqli_select_db($GLOBALS["link"], SQL_DB);
|
||||
|
||||
$session = $_POST['admid'];
|
||||
$id = $_POST['did'];
|
||||
|
||||
$sql = mysql_query("SELECT * FROM ".TB_PREFIX."users WHERE id = ".$session."");
|
||||
$access = mysql_fetch_array($sql);
|
||||
$sql = mysqli_query($GLOBALS["link"], "SELECT * FROM ".TB_PREFIX."users WHERE id = ".$session."");
|
||||
$access = mysqli_fetch_array($sql);
|
||||
$sessionaccess = $access['access'];
|
||||
|
||||
if($sessionaccess != 9) die("<h1><font color=\"red\">Access Denied: You are not Admin!</font></h1>");
|
||||
|
||||
mysql_query("UPDATE ".TB_PREFIX."vdata SET
|
||||
mysqli_query($GLOBALS["link"], "UPDATE ".TB_PREFIX."vdata SET
|
||||
wood = '".$_POST['wood']."',
|
||||
clay = '".$_POST['clay']."',
|
||||
iron = '".$_POST['iron']."',
|
||||
crop = '".$_POST['crop']."',
|
||||
maxstore = '".$_POST['maxstore']."',
|
||||
maxcrop = '".$_POST['maxcrop']."'
|
||||
WHERE wref = '".$id."'") or die(mysql_error());
|
||||
WHERE wref = '".$id."'") or die(mysqli_error());
|
||||
|
||||
header("Location: ../../../Admin/admin.php?p=village&did=".$id."");
|
||||
?>
|
||||
@@ -12,22 +12,22 @@ if (!isset($_SESSION)) session_start();
|
||||
if($_SESSION['access'] < 9) die("Access Denied: You are not Admin!");
|
||||
include_once("../../config.php");
|
||||
|
||||
mysql_connect(SQL_SERVER, SQL_USER, SQL_PASS);
|
||||
mysql_select_db(SQL_DB);
|
||||
$GLOBALS["link"] = mysqli_connect(SQL_SERVER, SQL_USER, SQL_PASS);
|
||||
mysqli_select_db($GLOBALS["link"], SQL_DB);
|
||||
|
||||
$session = $_POST['admid'];
|
||||
$id = $_POST['id'];
|
||||
|
||||
$sql = mysql_query("SELECT * FROM ".TB_PREFIX."users WHERE id = ".$session."");
|
||||
$access = mysql_fetch_array($sql);
|
||||
$sql = mysqli_query($GLOBALS["link"], "SELECT * FROM ".TB_PREFIX."users WHERE id = ".$session."");
|
||||
$access = mysqli_fetch_array($sql);
|
||||
$sessionaccess = $access['access'];
|
||||
|
||||
if($sessionaccess != 9) die("<h1><font color=\"red\">Access Denied: You are not Admin!</font></h1>");
|
||||
|
||||
mysql_query("UPDATE ".TB_PREFIX."users SET
|
||||
mysqli_query($GLOBALS["link"], "UPDATE ".TB_PREFIX."users SET
|
||||
sit1 = '".$_POST['sitter1']."',
|
||||
sit2 = '".$_POST['sitter2']."'
|
||||
WHERE id = $id") or die(mysql_error());
|
||||
WHERE id = $id") or die(mysqli_error());
|
||||
|
||||
header("Location: ../../../Admin/admin.php?p=player&uid=".$id."");
|
||||
?>
|
||||
@@ -12,26 +12,26 @@ if (!isset($_SESSION)) session_start();
|
||||
if($_SESSION['access'] < 9) die("Access Denied: You are not Admin!");
|
||||
include_once("../../config.php");
|
||||
|
||||
mysql_connect(SQL_SERVER, SQL_USER, SQL_PASS);
|
||||
mysql_select_db(SQL_DB);
|
||||
$GLOBALS["link"] = mysqli_connect(SQL_SERVER, SQL_USER, SQL_PASS);
|
||||
mysqli_select_db($GLOBALS["link"], SQL_DB);
|
||||
|
||||
$session = $_POST['admid'];
|
||||
$id = $_POST['id'];
|
||||
|
||||
$sql = mysql_query("SELECT * FROM ".TB_PREFIX."users WHERE id = ".$session."");
|
||||
$access = mysql_fetch_array($sql);
|
||||
$sql = mysqli_query($GLOBALS["link"], "SELECT * FROM ".TB_PREFIX."users WHERE id = ".$session."");
|
||||
$access = mysqli_fetch_array($sql);
|
||||
$sessionaccess = $access['access'];
|
||||
|
||||
if($sessionaccess != 9) die("<h1><font color=\"red\">Access Denied: You are not Admin!</font></h1>");
|
||||
|
||||
mysql_query("UPDATE ".TB_PREFIX."users SET
|
||||
mysqli_query($GLOBALS["link"], "UPDATE ".TB_PREFIX."users SET
|
||||
email = '".$_POST['email']."',
|
||||
tribe = ".$_POST['tribe'].",
|
||||
location = '".$_POST['location']."',
|
||||
desc1 = '".$_POST['desc1']."',
|
||||
desc2 = '".$_POST['desc2']."',
|
||||
quest = '".$_POST['quest']."'
|
||||
WHERE id = $id") or die(mysql_error());
|
||||
WHERE id = $id") or die(mysqli_error());
|
||||
|
||||
header("Location: ../../../Admin/admin.php?p=player&uid=".$id."");
|
||||
?>
|
||||
@@ -12,19 +12,19 @@ if (!isset($_SESSION)) session_start();
|
||||
if($_SESSION['access'] < 9) die("Access Denied: You are not Admin!");
|
||||
include_once("../../config.php");
|
||||
|
||||
mysql_connect(SQL_SERVER, SQL_USER, SQL_PASS);
|
||||
mysql_select_db(SQL_DB);
|
||||
$GLOBALS["link"] = mysqli_connect(SQL_SERVER, SQL_USER, SQL_PASS);
|
||||
mysqli_select_db($GLOBALS["link"], SQL_DB);
|
||||
|
||||
$uid = $_POST['uid'];
|
||||
$session = $_POST['admid'];
|
||||
|
||||
$sql = mysql_query("SELECT * FROM ".TB_PREFIX."users WHERE id = ".$session."");
|
||||
$access = mysql_fetch_array($sql);
|
||||
$sql = mysqli_query($GLOBALS["link"], "SELECT * FROM ".TB_PREFIX."users WHERE id = ".$session."");
|
||||
$access = mysqli_fetch_array($sql);
|
||||
$sessionaccess = $access['access'];
|
||||
|
||||
if($sessionaccess != 9) die("<h1><font color=\"red\">Access Denied: You are not Admin!</font></h1>");
|
||||
|
||||
mysql_query("UPDATE ".TB_PREFIX."users SET username = '".$_POST['username']."' WHERE id = ".$uid."");
|
||||
mysqli_query($GLOBALS["link"], "UPDATE ".TB_PREFIX."users SET username = '".$_POST['username']."' WHERE id = ".$uid."");
|
||||
|
||||
header("Location: ../../../Admin/admin.php?p=player&uid=".$uid."");
|
||||
?>
|
||||
@@ -12,21 +12,21 @@ if (!isset($_SESSION)) session_start();
|
||||
if($_SESSION['access'] < 9) die("Access Denied: You are not Admin!");
|
||||
include_once("../../config.php");
|
||||
|
||||
mysql_connect(SQL_SERVER, SQL_USER, SQL_PASS);
|
||||
mysql_select_db(SQL_DB);
|
||||
$GLOBALS["link"] = mysqli_connect(SQL_SERVER, SQL_USER, SQL_PASS);
|
||||
mysqli_select_db($GLOBALS["link"], SQL_DB);
|
||||
|
||||
$session = $_POST['admid'];
|
||||
$id = $_POST['did'];
|
||||
|
||||
$sql = mysql_query("SELECT * FROM ".TB_PREFIX."users WHERE id = ".$session."");
|
||||
$access = mysql_fetch_array($sql);
|
||||
$sql = mysqli_query($GLOBALS["link"], "SELECT * FROM ".TB_PREFIX."users WHERE id = ".$session."");
|
||||
$access = mysqli_fetch_array($sql);
|
||||
$sessionaccess = $access['access'];
|
||||
|
||||
if($sessionaccess != 9) die("<h1><font color=\"red\">Access Denied: You are not Admin!</font></h1>");
|
||||
|
||||
mysql_query("UPDATE ".TB_PREFIX."vdata SET
|
||||
mysqli_query($GLOBALS["link"], "UPDATE ".TB_PREFIX."vdata SET
|
||||
owner = '".$_POST['newowner']."'
|
||||
WHERE wref = $id") or die(mysql_error());
|
||||
WHERE wref = $id") or die(mysqli_error());
|
||||
|
||||
header("Location: ../../../Admin/admin.php?p=player&uid=".$_POST['newowner']."");
|
||||
?>
|
||||
@@ -12,23 +12,23 @@ if (!isset($_SESSION)) session_start();
|
||||
if($_SESSION['access'] < 9) die("Access Denied: You are not Admin!");
|
||||
include_once("../../config.php");
|
||||
|
||||
mysql_connect(SQL_SERVER, SQL_USER, SQL_PASS);
|
||||
mysql_select_db(SQL_DB);
|
||||
$GLOBALS["link"] = mysqli_connect(SQL_SERVER, SQL_USER, SQL_PASS);
|
||||
mysqli_select_db($GLOBALS["link"], SQL_DB);
|
||||
|
||||
$session = $_POST['admid'];
|
||||
$id = $_POST['id'];
|
||||
|
||||
$sql = mysql_query("SELECT * FROM ".TB_PREFIX."users WHERE id = ".$session."");
|
||||
$access = mysql_fetch_array($sql);
|
||||
$sql = mysqli_query($GLOBALS["link"], "SELECT * FROM ".TB_PREFIX."users WHERE id = ".$session."");
|
||||
$access = mysqli_fetch_array($sql);
|
||||
$sessionaccess = $access['access'];
|
||||
|
||||
if($sessionaccess != 9) die("<h1><font color=\"red\">Access Denied: You are not Admin!</font></h1>");
|
||||
|
||||
mysql_query("UPDATE ".TB_PREFIX."users SET
|
||||
mysqli_query($GLOBALS["link"], "UPDATE ".TB_PREFIX."users SET
|
||||
ap = '".$_POST['off']."',
|
||||
dp = '".$_POST['def']."',
|
||||
RR = '".$_POST['res']."'
|
||||
WHERE id = $id") or die(mysql_error());
|
||||
WHERE id = $id") or die(mysqli_error());
|
||||
|
||||
header("Location: ../../../Admin/admin.php?p=player&uid=".$id."");
|
||||
?>
|
||||
@@ -12,30 +12,36 @@ if (!isset($_SESSION)) session_start();
|
||||
if($_SESSION['access'] < 9) die("Access Denied: You are not Admin!");
|
||||
include_once("../../config.php");
|
||||
|
||||
mysql_connect(SQL_SERVER, SQL_USER, SQL_PASS);
|
||||
mysql_select_db(SQL_DB);
|
||||
function mysqli_result($res, $row, $field=0) {
|
||||
$res->data_seek($row);
|
||||
$datarow = $res->fetch_array();
|
||||
return $datarow[$field];
|
||||
}
|
||||
|
||||
$GLOBALS["link"] = mysqli_connect(SQL_SERVER, SQL_USER, SQL_PASS);
|
||||
mysqli_select_db($GLOBALS["link"], SQL_DB);
|
||||
|
||||
$session = $_POST['admid'];
|
||||
|
||||
$sql = mysql_query("SELECT * FROM ".TB_PREFIX."users WHERE id = ".$session."");
|
||||
$access = mysql_fetch_array($sql);
|
||||
$sql = mysqli_query($GLOBALS["link"], "SELECT * FROM ".TB_PREFIX."users WHERE id = ".$session."");
|
||||
$access = mysqli_fetch_array($sql);
|
||||
$sessionaccess = $access['access'];
|
||||
|
||||
if($sessionaccess != 9) die("<h1><font color=\"red\">Access Denied: You are not Admin!</font></h1>");
|
||||
|
||||
$sql = "SELECT id FROM ".TB_PREFIX."users ORDER BY ID DESC LIMIT 1";
|
||||
$loops = mysql_result(mysql_query($sql), 0);
|
||||
$loops = mysqli_result(mysqli_query($GLOBALS["link"], $sql), 0);
|
||||
|
||||
$plusdur = $_POST['plus'] * 86400;
|
||||
|
||||
for($i = 0; $i < $loops + 1; $i++)
|
||||
{
|
||||
$query = "SELECT * FROM ".TB_PREFIX."users WHERE id = ".$i."";
|
||||
$result = mysql_query($query);
|
||||
while($row = mysql_fetch_assoc($result))
|
||||
$result = mysqli_query($GLOBALS["link"], $query);
|
||||
while($row = mysqli_fetch_assoc($result))
|
||||
{
|
||||
if($row['plus'] < time()) { $plusbefore = time(); $addplus = $plusbefore + $plusdur; } elseif($row['plus'] > time()) { $plusbefore = $row['plus']; $addplus = $plusbefore + $plusdur; }
|
||||
mysql_query("UPDATE ".TB_PREFIX."users SET
|
||||
mysqli_query($GLOBALS["link"], "UPDATE ".TB_PREFIX."users SET
|
||||
plus = '".$addplus."'
|
||||
WHERE id = '".$row['id']."'");
|
||||
}
|
||||
|
||||
@@ -12,19 +12,25 @@ if (!isset($_SESSION)) session_start();
|
||||
if($_SESSION['access'] < 9) die("Access Denied: You are not Admin!");
|
||||
include_once("../../config.php");
|
||||
|
||||
mysql_connect(SQL_SERVER, SQL_USER, SQL_PASS);
|
||||
mysql_select_db(SQL_DB);
|
||||
function mysqli_result($res, $row, $field=0) {
|
||||
$res->data_seek($row);
|
||||
$datarow = $res->fetch_array();
|
||||
return $datarow[$field];
|
||||
}
|
||||
|
||||
$GLOBALS["link"] = mysqli_connect(SQL_SERVER, SQL_USER, SQL_PASS);
|
||||
mysqli_select_db($GLOBALS["link"], SQL_DB);
|
||||
|
||||
$session = $_POST['admid'];
|
||||
|
||||
$sql = mysql_query("SELECT * FROM ".TB_PREFIX."users WHERE id = ".$session."");
|
||||
$access = mysql_fetch_array($sql);
|
||||
$sql = mysqli_query($GLOBALS["link"], "SELECT * FROM ".TB_PREFIX."users WHERE id = ".$session."");
|
||||
$access = mysqli_fetch_array($sql);
|
||||
$sessionaccess = $access['access'];
|
||||
|
||||
if($sessionaccess != 9) die("<h1><font color=\"red\">Access Denied: You are not Admin!</font></h1>");
|
||||
|
||||
$sql = "SELECT id FROM ".TB_PREFIX."users ORDER BY ID DESC LIMIT 1";
|
||||
$loops = mysql_result(mysql_query($sql), 0);
|
||||
$loops = mysqli_result(mysqli_query($GLOBALS["link"], $sql), 0);
|
||||
|
||||
$wood = $_POST['wood'] * 86400;
|
||||
$clay = $_POST['clay'] * 86400;
|
||||
@@ -34,14 +40,14 @@ $crop = $_POST['crop'] * 86400;
|
||||
for($i = 0; $i < $loops + 1; $i++)
|
||||
{
|
||||
$query = "SELECT * FROM ".TB_PREFIX."users WHERE id = ".$i."";
|
||||
$result = mysql_query($query);
|
||||
while($row = mysql_fetch_assoc($result))
|
||||
$result = mysqli_query($GLOBALS["link"], $query);
|
||||
while($row = mysqli_fetch_assoc($result))
|
||||
{
|
||||
if($row['b1'] < time()) { $b1before = time(); $addb1 = $b1before + $wood; } elseif($row['b1'] > time()) { $b1before = $row['b1']; $addb1 = $b1before + $wood; }
|
||||
if($row['b2'] < time()) { $b2before = time(); $addb2 = $b1before + $clay; } elseif($row['b2'] > time()) { $b2before = $row['b2']; $addb2 = $b1before + $clay; }
|
||||
if($row['b3'] < time()) { $b3before = time(); $addb3 = $b1before + $iron; } elseif($row['b3'] > time()) { $b3before = $row['b3']; $addb3 = $b1before + $iron; }
|
||||
if($row['b4'] < time()) { $b4before = time(); $addb4 = $b1before + $crop; } elseif($row['b4'] > time()) { $b4before = $row['b4']; $addb4 = $b1before + $crop; }
|
||||
mysql_query("UPDATE ".TB_PREFIX."users SET
|
||||
mysqli_query($GLOBALS["link"], "UPDATE ".TB_PREFIX."users SET
|
||||
b1 = '".$addb1."',
|
||||
b2 = '".$addb2."',
|
||||
b3 = '".$addb3."',
|
||||
|
||||
@@ -14,19 +14,19 @@ include_once("../../config.php");
|
||||
|
||||
error_reporting(E_ALL);
|
||||
|
||||
mysql_connect(SQL_SERVER, SQL_USER, SQL_PASS);
|
||||
mysql_select_db(SQL_DB);
|
||||
$GLOBALS["link"] = mysqli_connect(SQL_SERVER, SQL_USER, SQL_PASS);
|
||||
mysqli_select_db($GLOBALS["link"], SQL_DB);
|
||||
|
||||
$session = $_POST['admid'];
|
||||
|
||||
$sql = mysql_query("SELECT * FROM ".TB_PREFIX."users WHERE id = ".$session."");
|
||||
$access = mysql_fetch_array($sql);
|
||||
$sql = mysqli_query($GLOBALS["link"], "SELECT * FROM ".TB_PREFIX."users WHERE id = ".$session."");
|
||||
$access = mysqli_fetch_array($sql);
|
||||
$sessionaccess = $access['access'];
|
||||
|
||||
if($sessionaccess != 9) die("<h1><font color=\"red\">Access Denied: You are not Admin!</font></h1>");
|
||||
|
||||
$q = "UPDATE ".TB_PREFIX."users SET gold = gold + ".$_POST['gold']." WHERE id != '0'";
|
||||
mysql_query($q) or die(mysql_error());
|
||||
mysqli_query($GLOBALS["link"], $q) or die(mysqli_error());
|
||||
|
||||
header("Location: ../../../Admin/admin.php?p=maintenenceResetPlusBonus&g");
|
||||
?>
|
||||
@@ -14,19 +14,19 @@ include_once("../../config.php");
|
||||
|
||||
error_reporting(E_ALL);
|
||||
|
||||
mysql_connect(SQL_SERVER, SQL_USER, SQL_PASS);
|
||||
mysql_select_db(SQL_DB);
|
||||
$GLOBALS["link"] = mysqli_connect(SQL_SERVER, SQL_USER, SQL_PASS);
|
||||
mysqli_select_db($GLOBALS["link"], SQL_DB);
|
||||
|
||||
$session = $_POST['admid'];
|
||||
|
||||
$sql = mysql_query("SELECT * FROM ".TB_PREFIX."users WHERE id = ".$session."");
|
||||
$access = mysql_fetch_array($sql);
|
||||
$sql = mysqli_query($GLOBALS["link"], "SELECT * FROM ".TB_PREFIX."users WHERE id = ".$session."");
|
||||
$access = mysqli_fetch_array($sql);
|
||||
$sessionaccess = $access['access'];
|
||||
|
||||
if($sessionaccess != 9) die("<h1><font color=\"red\">Access Denied: You are not Admin!</font></h1>");
|
||||
|
||||
$q = "UPDATE ".TB_PREFIX."users SET gold = gold + ".$_POST['gold']." WHERE id != '0'";
|
||||
mysql_query($q) or die(mysql_error());
|
||||
mysqli_query($GLOBALS["link"], $q) or die(mysqli_error());
|
||||
|
||||
header("Location: ../../../Admin/admin.php?p=gold&g");
|
||||
?>
|
||||
@@ -12,19 +12,19 @@ if (!isset($_SESSION)) session_start();
|
||||
if($_SESSION['access'] < 9) die("Access Denied: You are not Admin!");
|
||||
include_once("../../config.php");
|
||||
|
||||
mysql_connect(SQL_SERVER, SQL_USER, SQL_PASS);
|
||||
mysql_select_db(SQL_DB);
|
||||
$GLOBALS["link"] = mysqli_connect(SQL_SERVER, SQL_USER, SQL_PASS);
|
||||
mysqli_select_db($GLOBALS["link"], SQL_DB);
|
||||
|
||||
$session = $_POST['admid'];
|
||||
$id = $_POST['id'];
|
||||
|
||||
$sql = mysql_query("SELECT * FROM ".TB_PREFIX."users WHERE id = ".$session."");
|
||||
$access = mysql_fetch_array($sql);
|
||||
$sql = mysqli_query($GLOBALS["link"], "SELECT * FROM ".TB_PREFIX."users WHERE id = ".$session."");
|
||||
$access = mysqli_fetch_array($sql);
|
||||
$sessionaccess = $access['access'];
|
||||
|
||||
if($sessionaccess != 9) die("<h1><font color=\"red\">Access Denied: You are not Admin!</font></h1>");
|
||||
|
||||
mysql_query("UPDATE ".TB_PREFIX."users SET gold = gold + ".$_POST['gold']." WHERE id = ".$id."");
|
||||
mysqli_query($GLOBALS["link"], "UPDATE ".TB_PREFIX."users SET gold = gold + ".$_POST['gold']." WHERE id = ".$id."");
|
||||
|
||||
header("Location: ../../../Admin/admin.php?p=usergold&g");
|
||||
?>
|
||||
@@ -10,10 +10,10 @@
|
||||
#################################################################################
|
||||
?>
|
||||
<div style="margin-top: 50px;">
|
||||
<center>
|
||||
<div style="text-align: center">
|
||||
<h1>404 - File not found</h1>
|
||||
<img src="../../gpack/travian_default/img/misc/404.gif" title="Not Found" alt="Not Found"><br />
|
||||
<p>We looked 404 times already but can't find anything, Not even an X marking the spot.</p>
|
||||
<p>This system is not complete yet. So the page probably does not exist.</p><br>
|
||||
</center>
|
||||
</div>
|
||||
</div>
|
||||
@@ -12,18 +12,18 @@ if (!isset($_SESSION)) session_start();
|
||||
if($_SESSION['access'] < 9) die("Access Denied: You are not Admin!");
|
||||
include_once("../../config.php");
|
||||
|
||||
mysql_connect(SQL_SERVER, SQL_USER, SQL_PASS);
|
||||
mysql_select_db(SQL_DB);
|
||||
$GLOBALS["link"] = mysqli_connect(SQL_SERVER, SQL_USER, SQL_PASS);
|
||||
mysqli_select_db($GLOBALS["link"], SQL_DB);
|
||||
|
||||
$session = $_POST['admid'];
|
||||
|
||||
$sql = mysql_query("SELECT * FROM ".TB_PREFIX."users WHERE id = ".$session."");
|
||||
$access = mysql_fetch_array($sql);
|
||||
$sql = mysqli_query($GLOBALS["link"], "SELECT * FROM ".TB_PREFIX."users WHERE id = ".$session."");
|
||||
$access = mysqli_fetch_array($sql);
|
||||
$sessionaccess = $access['access'];
|
||||
|
||||
if($sessionaccess != 9) die("<h1><font color=\"red\">Access Denied: You are not Admin!</font></h1>");
|
||||
|
||||
$users = mysql_num_rows(mysql_query("SELECT * FROM ".TB_PREFIX."users"));
|
||||
$users = mysqli_num_rows(mysqli_query($GLOBALS["link"], "SELECT * FROM ".TB_PREFIX."users"));
|
||||
|
||||
$duration = $_POST['duration'] * 3600;
|
||||
$start = $_POST['start'];
|
||||
@@ -34,17 +34,23 @@ $admin = $session;
|
||||
$active = '1';
|
||||
$access = '2';
|
||||
|
||||
function mysqli_result($res, $row, $field=0) {
|
||||
$res->data_seek($row);
|
||||
$datarow = $res->fetch_array();
|
||||
return $datarow[$field];
|
||||
}
|
||||
|
||||
$sql = "SELECT id FROM ".TB_PREFIX."users ORDER BY ID DESC LIMIT 1";
|
||||
$loops = mysql_result(mysql_query($sql), 0);
|
||||
$loops = mysqli_result(mysqli_query($GLOBALS["link"], $sql), 0);
|
||||
|
||||
for($i = 0; $i < $loops + 1; $i++)
|
||||
{
|
||||
$query = "SELECT * FROM ".TB_PREFIX."users WHERE id = ".$i." AND access = ".$access."";
|
||||
$result = mysql_query($query);
|
||||
while($row = mysql_fetch_assoc($result))
|
||||
$result = mysqli_query($GLOBALS["link"], $query);
|
||||
while($row = mysqli_fetch_assoc($result))
|
||||
{
|
||||
mysql_query("INSERT INTO ".TB_PREFIX."banlist ".$row['id'].", ".$row['username'].", ".$reason.", ".$startts.", ".$endts.", ".$admin.", ".$active."");
|
||||
##mysql_query("INSERT INTO ".TB_PREFIX."banlist (`uid`, `name`, `reason`, `time`, `end`, `admin`, `active`) VALUES (".$row['id'].", '".$row['username']."' , '$reason', '$startts', '$endts', '$admin', '1')");
|
||||
mysqli_query($GLOBALS["link"], "INSERT INTO ".TB_PREFIX."banlist ".$row['id'].", ".$row['username'].", ".$reason.", ".$startts.", ".$endts.", ".$admin.", ".$active."");
|
||||
##mysqli_query($GLOBALS["link"], "INSERT INTO ".TB_PREFIX."banlist (`uid`, `name`, `reason`, `time`, `end`, `admin`, `active`) VALUES (".$row['id'].", '".$row['username']."' , '$reason', '$startts', '$endts', '$admin', '1')");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -12,18 +12,18 @@ if (!isset($_SESSION)) session_start();
|
||||
if($_SESSION['access'] < 9) die("Access Denied: You are not Admin!");
|
||||
include_once("../../config.php");
|
||||
|
||||
mysql_connect(SQL_SERVER, SQL_USER, SQL_PASS);
|
||||
mysql_select_db(SQL_DB);
|
||||
$GLOBALS["link"] = mysqli_connect(SQL_SERVER, SQL_USER, SQL_PASS);
|
||||
mysqli_select_db($GLOBALS["link"], SQL_DB);
|
||||
|
||||
$session = $_POST['admid'];
|
||||
|
||||
$sql = mysql_query("SELECT * FROM ".TB_PREFIX."users WHERE id = ".$session."");
|
||||
$access = mysql_fetch_array($sql);
|
||||
$sql = mysqli_query($GLOBALS["link"], "SELECT * FROM ".TB_PREFIX."users WHERE id = ".$session."");
|
||||
$access = mysqli_fetch_array($sql);
|
||||
$sessionaccess = $access['access'];
|
||||
|
||||
if($sessionaccess != 9) die("<h1><font color=\"red\">Access Denied: You are not Admin!</font></h1>");
|
||||
|
||||
mysql_query("TRUNCATE ".TB_PREFIX."banlist");
|
||||
mysqli_query($GLOBALS["link"], "TRUNCATE ".TB_PREFIX."banlist");
|
||||
|
||||
header("Location: ../../../Admin/admin.php?p=ban");
|
||||
?>
|
||||
@@ -12,18 +12,18 @@ if (!isset($_SESSION)) session_start();
|
||||
if($_SESSION['access'] < 9) die("Access Denied: You are not Admin!");
|
||||
include_once("../../config.php");
|
||||
|
||||
mysql_connect(SQL_SERVER, SQL_USER, SQL_PASS);
|
||||
mysql_select_db(SQL_DB);
|
||||
$GLOBALS["link"] = mysqli_connect(SQL_SERVER, SQL_USER, SQL_PASS);
|
||||
mysqli_select_db($GLOBALS["link"], SQL_DB);
|
||||
|
||||
$session = $_POST['admid'];
|
||||
|
||||
$sql = mysql_query("SELECT * FROM ".TB_PREFIX."users WHERE id = ".$session."");
|
||||
$access = mysql_fetch_array($sql);
|
||||
$sql = mysqli_query($GLOBALS["link"], "SELECT * FROM ".TB_PREFIX."users WHERE id = ".$session."");
|
||||
$access = mysqli_fetch_array($sql);
|
||||
$sessionaccess = $access['access'];
|
||||
|
||||
if($sessionaccess != 9) die("<h1><font color=\"red\">Access Denied: You are not Admin!</font></h1>");
|
||||
|
||||
mysql_query("UPDATE ".TB_PREFIX."users SET gold = '0' WHERE id !=0");
|
||||
mysqli_query($GLOBALS["link"], "UPDATE ".TB_PREFIX."users SET gold = '0' WHERE id !=0");
|
||||
|
||||
header("Location: ../../../Admin/admin.php?p=maintenenceResetGold&g");
|
||||
?>
|
||||
@@ -12,18 +12,18 @@ if (!isset($_SESSION)) session_start();
|
||||
if($_SESSION['access'] < 9) die("Access Denied: You are not Admin!");
|
||||
include_once("../../config.php");
|
||||
|
||||
mysql_connect(SQL_SERVER, SQL_USER, SQL_PASS);
|
||||
mysql_select_db(SQL_DB);
|
||||
$GLOBALS["link"] = mysqli_connect(SQL_SERVER, SQL_USER, SQL_PASS);
|
||||
mysqli_select_db($GLOBALS["link"], SQL_DB);
|
||||
|
||||
$session = $_POST['admid'];
|
||||
|
||||
$sql = mysql_query("SELECT * FROM ".TB_PREFIX."users WHERE id = ".$session."");
|
||||
$access = mysql_fetch_array($sql);
|
||||
$sql = mysqli_query($GLOBALS["link"], "SELECT * FROM ".TB_PREFIX."users WHERE id = ".$session."");
|
||||
$access = mysqli_fetch_array($sql);
|
||||
$sessionaccess = $access['access'];
|
||||
|
||||
if($sessionaccess != 9) die("<h1><font color=\"red\">Access Denied: You are not Admin!</font></h1>");
|
||||
|
||||
mysql_query("UPDATE ".TB_PREFIX."users SET plus = '0' WHERE id !=0");
|
||||
mysqli_query($GLOBALS["link"], "UPDATE ".TB_PREFIX."users SET plus = '0' WHERE id !=0");
|
||||
|
||||
header("Location: ../../../Admin/admin.php?p=resetPlusBonus&g");
|
||||
?>
|
||||
@@ -12,18 +12,18 @@ if (!isset($_SESSION)) session_start();
|
||||
if($_SESSION['access'] < 9) die("Access Denied: You are not Admin!");
|
||||
include_once("../../config.php");
|
||||
|
||||
mysql_connect(SQL_SERVER, SQL_USER, SQL_PASS);
|
||||
mysql_select_db(SQL_DB);
|
||||
$GLOBALS["link"] = mysqli_connect(SQL_SERVER, SQL_USER, SQL_PASS);
|
||||
mysqli_select_db($GLOBALS["link"], SQL_DB);
|
||||
|
||||
$session = $_POST['admid'];
|
||||
|
||||
$sql = mysql_query("SELECT * FROM ".TB_PREFIX."users WHERE id = ".$session."");
|
||||
$access = mysql_fetch_array($sql);
|
||||
$sql = mysqli_query($GLOBALS["link"], "SELECT * FROM ".TB_PREFIX."users WHERE id = ".$session."");
|
||||
$access = mysqli_fetch_array($sql);
|
||||
$sessionaccess = $access['access'];
|
||||
|
||||
if($sessionaccess != 9) die("<h1><font color=\"red\">Access Denied: You are not Admin!</font></h1>");
|
||||
|
||||
mysql_query("UPDATE ".TB_PREFIX."users SET b1 = '0', b2 = '0', b3='0', b4='0' WHERE id !=0");
|
||||
mysqli_query($GLOBALS["link"], "UPDATE ".TB_PREFIX."users SET b1 = '0', b2 = '0', b3='0', b4='0' WHERE id !=0");
|
||||
|
||||
header("Location: ../../../Admin/admin.php?p=givePlus&g");
|
||||
?>
|
||||
@@ -12,18 +12,18 @@ if (!isset($_SESSION)) session_start();
|
||||
if($_SESSION['access'] < 9) die("Access Denied: You are not Admin!");
|
||||
include_once("../../config.php");
|
||||
|
||||
mysql_connect(SQL_SERVER, SQL_USER, SQL_PASS);
|
||||
mysql_select_db(SQL_DB);
|
||||
$GLOBALS["link"] = mysqli_connect(SQL_SERVER, SQL_USER, SQL_PASS);
|
||||
mysqli_select_db($GLOBALS["link"], SQL_DB);
|
||||
|
||||
$session = $_POST['admid'];
|
||||
|
||||
$sql = mysql_query("SELECT * FROM ".TB_PREFIX."users WHERE id = ".$session."");
|
||||
$access = mysql_fetch_array($sql);
|
||||
$sql = mysqli_query($GLOBALS["link"], "SELECT * FROM ".TB_PREFIX."users WHERE id = ".$session."");
|
||||
$access = mysqli_fetch_array($sql);
|
||||
$sessionaccess = $access['access'];
|
||||
|
||||
if($sessionaccess != 9) die("<h1><font color=\"red\">Access Denied: You are not Admin!</font></h1>");
|
||||
|
||||
$users = mysql_num_rows(mysql_query("SELECT * FROM ".TB_PREFIX."users"));
|
||||
$users = mysqli_num_rows(mysqli_query($GLOBALS["link"], "SELECT * FROM ".TB_PREFIX."users"));
|
||||
|
||||
$reason = $_POST['unbanreason'];
|
||||
$admin = $session;
|
||||
@@ -32,15 +32,15 @@ $access = '2';
|
||||
$actualend = time();
|
||||
|
||||
$sql = "SELECT id FROM ".TB_PREFIX."users ORDER BY ID DESC LIMIT 1";
|
||||
$loops = mysql_result(mysql_query($sql), 0);
|
||||
$loops = mysqli_result(mysqli_query($GLOBALS["link"], $sql), 0);
|
||||
|
||||
for($i = 0; $i < $loops + 1; $i++)
|
||||
{
|
||||
$query = "SELECT * FROM ".TB_PREFIX."users WHERE id = ".$i." AND access = ".$access."";
|
||||
$result = mysql_query($query);
|
||||
while($row = mysql_fetch_assoc($result))
|
||||
$result = mysqli_query($GLOBALS["link"], $query);
|
||||
while($row = mysqli_fetch_assoc($result))
|
||||
{
|
||||
mysql_query("UPDATE ".TB_PREFIX."banlist SET active = '".$active."', end = '".$actualend."' WHERE reason = '".$reason."'");
|
||||
mysqli_query($GLOBALS["link"], "UPDATE ".TB_PREFIX."banlist SET active = '".$active."', end = '".$actualend."' WHERE reason = '".$reason."'");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -12,8 +12,8 @@ if (!isset($_SESSION)) session_start();
|
||||
if($_SESSION['access'] < 9) die("Access Denied: You are not Admin!");
|
||||
include_once("../../Account.php");
|
||||
|
||||
mysql_connect(SQL_SERVER, SQL_USER, SQL_PASS);
|
||||
mysql_select_db(SQL_DB);
|
||||
$GLOBALS["link"] = mysqli_connect(SQL_SERVER, SQL_USER, SQL_PASS);
|
||||
mysqli_select_db($GLOBALS["link"], SQL_DB);
|
||||
|
||||
if (!isset($_SESSION)) session_start();
|
||||
if($_SESSION['access'] < ADMIN) die("Access Denied: You are not Admin!");
|
||||
@@ -21,16 +21,16 @@ if($_SESSION['access'] < ADMIN) die("Access Denied: You are not Admin!");
|
||||
$medalid = $_POST['medalid'];
|
||||
$uid = $_POST['uid'];
|
||||
|
||||
mysql_query("UPDATE ".TB_PREFIX."medal set del = 1 WHERE id = ".$medalid."");
|
||||
mysqli_query($GLOBALS["link"], "UPDATE ".TB_PREFIX."medal set del = 1 WHERE id = ".$medalid."");
|
||||
|
||||
$name = mysql_query("SELECT name FROM ".TB_PREFIX."users WHERE id= ".$uid."");
|
||||
$name = mysql_result($name, 0);
|
||||
$name = mysqli_query($GLOBALS["link"], "SELECT name FROM ".TB_PREFIX."users WHERE id= ".$uid."");
|
||||
$name = mysqli_result($name, 0);
|
||||
|
||||
mysql_query("Insert into ".TB_PREFIX."admin_log values (0,$admid,'Deleted medal id [#".$medalid."] from the user <a href=\'admin.php?p=player&uid=$uid\'>$name</a> ',".time().")");
|
||||
mysqli_query($GLOBALS["link"], "Insert into ".TB_PREFIX."admin_log values (0,$admid,'Deleted medal id [#".$medalid."] from the user <a href=\'admin.php?p=player&uid=$uid\'>$name</a> ',".time().")");
|
||||
|
||||
|
||||
$deleteweek = $_POST['medalweek'];
|
||||
mysql_query("UPDATE ".TB_PREFIX."medal set del = 1 WHERE week = ".$deleteweek."");
|
||||
mysqli_query($GLOBALS["link"], "UPDATE ".TB_PREFIX."medal set del = 1 WHERE week = ".$deleteweek."");
|
||||
|
||||
header("Location: ../../../Admin/admin.php?p=player&uid=".$uid."");
|
||||
?>
|
||||
@@ -12,8 +12,8 @@
|
||||
include_once("../../config.php");
|
||||
include_once("../../Session.php");
|
||||
include_once("../../Automation.php");
|
||||
mysql_connect(SQL_SERVER, SQL_USER, SQL_PASS);
|
||||
mysql_select_db(SQL_DB);
|
||||
$GLOBALS["link"] = mysqli_connect(SQL_SERVER, SQL_USER, SQL_PASS);
|
||||
mysqli_select_db($GLOBALS["link"], SQL_DB);
|
||||
|
||||
$id = $_POST['id'];
|
||||
$amt = $_POST['vill_amount'];
|
||||
@@ -25,9 +25,9 @@ for($i=1;$i<=$amt;$i++) {
|
||||
$database->setFieldTaken($wid);
|
||||
$time = time();
|
||||
$q = "insert into ".TB_PREFIX."vdata (`wref`,`owner`,`name`,`capital`,`pop`,`cp`,`celebration`,`type`,`wood`,`clay`,`iron`,`maxstore`,`crop`,`maxcrop`,`lastupdate`,`loyalty`,`exp1`,`exp2`,`exp3`,`created`) values ('$wid','3','".PLANVILLAGE."',0,0,0,0,0,80000.00,80000.00,80000.00,80000,80000.00,80000,1314974534,100,0,0,0,1314968914)";
|
||||
mysql_query($q) or die(mysql_error());
|
||||
mysqli_query($GLOBALS["link"], $q) or die(mysqli_error());
|
||||
$q = "insert into ".TB_PREFIX."fdata (`vref`,`f1`,`f1t`,`f2`,`f2t`,`f3`,`f3t`,`f4`,`f4t`,`f5`,`f5t`,`f6`,`f6t`,`f7`,`f7t`,`f8`,`f8t`,`f9`,`f9t`,`f10`,`f10t`,`f11`,`f11t`,`f12`,`f12t`,`f13`,`f13t`,`f14`,`f14t`,`f15`,`f15t`,`f16`,`f16t`,`f17`,`f17t`,`f18`,`f18t`,`f19`,`f19t`,`f20`,`f20t`,`f21`,`f21t`,`f22`,`f22t`,`f23`,`f23t`,`f24`,`f24t`,`f25`,`f25t`,`f26`,`f26t`,`f27`,`f27t`,`f28`,`f28t`,`f29`,`f29t`,`f30`,`f30t`,`f31`,`f31t`,`f32`,`f32t`,`f33`,`f33t`,`f34`,`f34t`,`f35`,`f35t`,`f36`,`f36t`,`f37`,`f37t`,`f38`,`f38t`,`f39`,`f39t`,`f40`,`f40t`,`f99`,`f99t`,`wwname`) values ($wid,0,1,0,4,0,1,0,3,0,2,0,2,0,3,0,4,0,4,0,3,0,3,0,4,0,4,0,1,0,4,0,2,0,1,0,2,20,17,20,11,10,27,20,10,10,22,10,25,0,0,20,15,10,19,0,0,0,0,0,0,10,23,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,16,0,0,0,0,'World Wonder')";
|
||||
mysql_query($q);
|
||||
mysqli_query($GLOBALS["link"], $q);
|
||||
$pop = $automation->recountPop($wid);
|
||||
$cp = $automation->recountPop($wid);
|
||||
$database->addUnits($wid);
|
||||
@@ -35,7 +35,7 @@ for($i=1;$i<=$amt;$i++) {
|
||||
$database->addABTech($wid);
|
||||
$speed = NATARS_UNITS;
|
||||
$q = "UPDATE ".TB_PREFIX."units SET u41 = u41 + " . (1500 * $speed) . ", u42 = u42 + " . (1500 * $speed) . ", u43 = u43 + " . (1500 * $speed) . ", u44 = u44 + " . (1500 * $speed) . ", u45 = u45 + " . (1500 * $speed) . ", u46 = u46 + " . (1500 * $speed) . ", u47 = u47 + " . (1500 * $speed) . ", u48 = u48 + " . (1500 * $speed) . " , u49 = u49 + " . (1500 * $speed) . ", u50 = u50 + " . (1500 * $speed) . " WHERE vref = '".$wid."'";
|
||||
mysql_query($q);
|
||||
mysqli_query($GLOBALS["link"], $q);
|
||||
$desc = PLAN_DESC;
|
||||
$database->addArtefact($wid, 3, 11, 1, PLAN, $desc, '', 'typeww.gif');
|
||||
}
|
||||
@@ -46,13 +46,13 @@ for($i=1;$i<=$amt;$i++) {
|
||||
fwrite($fh, $text);
|
||||
|
||||
$query="SELECT * FROM ".TB_PREFIX."users ORDER BY id + 0 DESC";
|
||||
$result=mysql_query($query) or die (mysql_error());
|
||||
for ($i=0; $row=mysql_fetch_row($result); $i++) {
|
||||
$updateattquery = mysql_query("UPDATE ".TB_PREFIX."users SET ok = '1' WHERE id = '".$row[0]."'")
|
||||
or die(mysql_error());
|
||||
$result=mysqli_query($GLOBALS["link"], $query) or die (mysqli_error());
|
||||
for ($i=0; $row=mysqli_fetch_row($result); $i++) {
|
||||
$updateattquery = mysqli_query($GLOBALS["link"], "UPDATE ".TB_PREFIX."users SET ok = '1' WHERE id = '".$row[0]."'")
|
||||
or die(mysqli_error());
|
||||
}
|
||||
|
||||
mysql_query("Insert into ".TB_PREFIX."admin_log values (0,$id,'Added <b>$amt</b> WW Buildingplan Villages',".time().")");
|
||||
mysqli_query($GLOBALS["link"], "Insert into ".TB_PREFIX."admin_log values (0,$id,'Added <b>$amt</b> WW Buildingplan Villages',".time().")");
|
||||
|
||||
|
||||
header("Location: ../../../Admin/admin.php?p=natarbuildingplan&g");
|
||||
|
||||
@@ -12,8 +12,8 @@
|
||||
include_once("../../config.php");
|
||||
include_once("../../Session.php");
|
||||
include_once("../../Automation.php");
|
||||
mysql_connect(SQL_SERVER, SQL_USER, SQL_PASS);
|
||||
mysql_select_db(SQL_DB);
|
||||
$GLOBALS["link"] = mysqli_connect(SQL_SERVER, SQL_USER, SQL_PASS);
|
||||
mysqli_select_db($GLOBALS["link"], SQL_DB);
|
||||
|
||||
$id = $_POST['id'];
|
||||
$amt = $_POST['vill_amount'];
|
||||
@@ -26,9 +26,9 @@ for($i=1;$i<=$amt;$i++) {
|
||||
$database->setFieldTaken($wid);
|
||||
$time = time();
|
||||
$q = "insert into ".TB_PREFIX."vdata (`wref`,`owner`,`name`,`capital`,`pop`,`cp`,`celebration`,`type`,`wood`,`clay`,`iron`,`maxstore`,`crop`,`maxcrop`,`lastupdate`,`loyalty`,`exp1`,`exp2`,`exp3`,`created`,`natar`) values ('$wid','3','".WWVILLAGE."',0,0,0,0,0,80000.00,80000.00,80000.00,80000,80000.00,80000,1314974534,100,0,0,0,$time,1)";
|
||||
mysql_query($q) or die(mysql_error());
|
||||
mysqli_query($GLOBALS["link"], $q) or die(mysqli_error());
|
||||
$q = "insert into ".TB_PREFIX."fdata (`vref`,`f1`,`f1t`,`f2`,`f2t`,`f3`,`f3t`,`f4`,`f4t`,`f5`,`f5t`,`f6`,`f6t`,`f7`,`f7t`,`f8`,`f8t`,`f9`,`f9t`,`f10`,`f10t`,`f11`,`f11t`,`f12`,`f12t`,`f13`,`f13t`,`f14`,`f14t`,`f15`,`f15t`,`f16`,`f16t`,`f17`,`f17t`,`f18`,`f18t`,`f19`,`f19t`,`f20`,`f20t`,`f21`,`f21t`,`f22`,`f22t`,`f23`,`f23t`,`f24`,`f24t`,`f25`,`f25t`,`f26`,`f26t`,`f27`,`f27t`,`f28`,`f28t`,`f29`,`f29t`,`f30`,`f30t`,`f31`,`f31t`,`f32`,`f32t`,`f33`,`f33t`,`f34`,`f34t`,`f35`,`f35t`,`f36`,`f36t`,`f37`,`f37t`,`f38`,`f38t`,`f39`,`f39t`,`f40`,`f40t`,`f99`,`f99t`,`wwname`) values ($wid,0,1,0,4,0,1,0,3,0,2,0,2,0,3,0,4,0,4,0,3,0,3,0,4,0,4,0,1,0,4,0,2,0,1,0,2,20,17,20,11,20,15,20,10,10,22,10,25,0,0,0,0,10,19,0,0,0,0,0,0,10,23,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,16,0,0,0,40,'World Wonder')";
|
||||
mysql_query($q);
|
||||
mysqli_query($GLOBALS["link"], $q);
|
||||
$pop = $automation->recountPop($wid);
|
||||
$cp = $automation->recountPop($wid);
|
||||
$database->addUnits($wid);
|
||||
@@ -38,11 +38,11 @@ for($i=1;$i<=$amt;$i++) {
|
||||
|
||||
//new with random amount of troops
|
||||
$q = "UPDATE " . TB_PREFIX . "units SET u41 = " . (rand(50, 1200) * $speed) . ", u42 = " . (rand(100, 1400) * $speed) . ", u43 = " . (rand(200, 1600) * $speed) . ", u44 = " . (rand(10, 50) * $speed) . ", u45 = " . (rand(48, 1700) * $speed) . ", u46 = " . (rand(60, 1800) * $speed) . ", u47 = " . (rand(200, 1600) * $speed) . ", u48 = " . (rand(40, 200) * $speed) . " , u49 = " . (rand(4, 20) * $speed) . ", u50 = " . (rand(5, 25) * $speed) . " WHERE vref = '".$wid."'";
|
||||
mysql_query($q);
|
||||
mysqli_query($GLOBALS["link"], $q);
|
||||
}
|
||||
|
||||
|
||||
mysql_query("Insert into ".TB_PREFIX."admin_log values (0,$id,'Added <b>$amt</b> WW Villages',".time().")");
|
||||
mysqli_query($GLOBALS["link"], "Insert into ".TB_PREFIX."admin_log values (0,$id,'Added <b>$amt</b> WW Villages',".time().")");
|
||||
|
||||
|
||||
header("Location: ../../../Admin/admin.php?p=natarend&g");
|
||||
|
||||
@@ -12,19 +12,19 @@ if (!isset($_SESSION)) session_start();
|
||||
if($_SESSION['access'] < 9) die("Access Denied: You are not Admin!");
|
||||
include_once("../../config.php");
|
||||
|
||||
mysql_connect(SQL_SERVER, SQL_USER, SQL_PASS);
|
||||
mysql_select_db(SQL_DB);
|
||||
$GLOBALS["link"] = mysqli_connect(SQL_SERVER, SQL_USER, SQL_PASS);
|
||||
mysqli_select_db($GLOBALS["link"], SQL_DB);
|
||||
|
||||
$session = $_POST['admid'];
|
||||
$id = $_POST['id'];
|
||||
|
||||
$sql = mysql_query("SELECT * FROM ".TB_PREFIX."users WHERE id = ".$session."");
|
||||
$access = mysql_fetch_array($sql);
|
||||
$sql = mysqli_query($GLOBALS["link"], "SELECT * FROM ".TB_PREFIX."users WHERE id = ".$session."");
|
||||
$access = mysqli_fetch_array($sql);
|
||||
$sessionaccess = $access['access'];
|
||||
|
||||
if($sessionaccess != 9) die("<h1><font color=\"red\">Access Denied: You are not Admin!</font></h1>");
|
||||
|
||||
mysql_query("UPDATE ".TB_PREFIX."fdata SET
|
||||
mysqli_query($GLOBALS["link"], "UPDATE ".TB_PREFIX."fdata SET
|
||||
f1 = '".$_POST['id1level']."',
|
||||
f1t = '".$_POST['id1gid']."',
|
||||
f2 = '".$_POST['id2level']."',
|
||||
@@ -105,7 +105,7 @@ mysql_query("UPDATE ".TB_PREFIX."fdata SET
|
||||
f39t = '".$_POST['id39gid']."',
|
||||
f40 = '".$_POST['id40level']."',
|
||||
f40t = '".$_POST['id40gid']."'
|
||||
WHERE vref = $id") or die(mysql_error());
|
||||
WHERE vref = $id") or die(mysqli_error());
|
||||
|
||||
header("Location: ../../../Admin/admin.php?action=recountPop&did=".$id."");
|
||||
?>
|
||||
@@ -12,21 +12,21 @@ if (!isset($_SESSION)) session_start();
|
||||
if($_SESSION['access'] < 9) die("Access Denied: You are not Admin!");
|
||||
include_once("../../config.php");
|
||||
|
||||
mysql_connect(SQL_SERVER, SQL_USER, SQL_PASS);
|
||||
mysql_select_db(SQL_DB);
|
||||
$GLOBALS["link"] = mysqli_connect(SQL_SERVER, SQL_USER, SQL_PASS);
|
||||
mysqli_select_db($GLOBALS["link"], SQL_DB);
|
||||
|
||||
$did = $_POST['did'];
|
||||
$name = $_POST['villagename'];
|
||||
$session = $_POST['admid'];
|
||||
|
||||
$sql = mysql_query("SELECT * FROM ".TB_PREFIX."users WHERE id = ".$session."");
|
||||
$access = mysql_fetch_array($sql);
|
||||
$sql = mysqli_query($GLOBALS["link"], "SELECT * FROM ".TB_PREFIX."users WHERE id = ".$session."");
|
||||
$access = mysqli_fetch_array($sql);
|
||||
$sessionaccess = $access['access'];
|
||||
|
||||
if($sessionaccess != 9) die("<h1><font color=\"red\">Access Denied: You are not Admin!</font></h1>");
|
||||
|
||||
$sql = "UPDATE ".TB_PREFIX."vdata SET name = '$name' WHERE wref = $did";
|
||||
mysql_query($sql);
|
||||
mysqli_query($GLOBALS["link"], $sql);
|
||||
|
||||
header("Location: ../../../Admin/admin.php?p=village&did=".$did."&name=".$name."");
|
||||
?>
|
||||
@@ -12,21 +12,21 @@ if (!isset($_SESSION)) session_start();
|
||||
if($_SESSION['access'] < 9) die("Access Denied: You are not Admin!");
|
||||
include_once("../../config.php");
|
||||
|
||||
mysql_connect(SQL_SERVER, SQL_USER, SQL_PASS);
|
||||
mysql_select_db(SQL_DB);
|
||||
$GLOBALS["link"] = mysqli_connect(SQL_SERVER, SQL_USER, SQL_PASS);
|
||||
mysqli_select_db($GLOBALS["link"], SQL_DB);
|
||||
|
||||
$session = $_POST['admid'];
|
||||
|
||||
|
||||
$sql = mysql_query("SELECT * FROM ".TB_PREFIX."users WHERE id = ".$session."");
|
||||
$access = mysql_fetch_array($sql);
|
||||
$sql = mysqli_query($GLOBALS["link"], "SELECT * FROM ".TB_PREFIX."users WHERE id = ".$session."");
|
||||
$access = mysqli_fetch_array($sql);
|
||||
$sessionaccess = $access['access'];
|
||||
|
||||
if($sessionaccess != 9) die("<h1><font color=\"red\">Access Denied: You are not Admin!</font></h1>");
|
||||
|
||||
$query = "INSERT INTO ".TB_PREFIX."mdata (target, owner, topic, message, viewed, time) VALUES ('$uid', 1, '$topic', '$message', 0, '$time')";
|
||||
|
||||
mysql_query($query);
|
||||
mysqli_query($GLOBALS["link"], $query);
|
||||
|
||||
header("Location: ../../../Admin/admin.php?p=Newmessage&uid=".$uid."&msg=ok");
|
||||
?>
|
||||
@@ -24,7 +24,7 @@ include("../GameEngine/Admin/database.php");
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<link REL="shortcut icon" HREF="favicon.ico"/>
|
||||
<link rel="shortcut icon" href="favicon.ico"/>
|
||||
<title>Admin Control Panel - TravianX</title>
|
||||
<link rel=stylesheet type="text/css" href="../img/admin/admin.css">
|
||||
<link rel=stylesheet type="text/css" href="../img/admin/acp.css">
|
||||
@@ -118,7 +118,7 @@ if(conf){return true;}else{return false;}
|
||||
<div id="lright1"></div>
|
||||
|
||||
<div id="ce"></div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</body>
|
||||
|
||||
@@ -24,25 +24,26 @@ include_once("../GameEngine/Data/unitdata.php");
|
||||
include_once("../GameEngine/Technology.php");
|
||||
include_once("../GameEngine/Data/buidata.php");
|
||||
}
|
||||
include_once("../GameEngine/Database.php");
|
||||
class adm_DB {
|
||||
var $connection;
|
||||
|
||||
function adm_DB(){
|
||||
global $database;
|
||||
$this->connection = mysql_connect(SQL_SERVER, SQL_USER, SQL_PASS) or die(mysql_error());
|
||||
mysql_select_db(SQL_DB, $this->connection) or die(mysql_error());
|
||||
|
||||
var $connection;
|
||||
function adm_DB(){
|
||||
global $database;
|
||||
$database = new MYSQLi_DB;
|
||||
$this->connection = $database->return_link();
|
||||
}
|
||||
|
||||
function Login($username,$password){
|
||||
$q = "SELECT password FROM ".TB_PREFIX."users where username = '$username' and access >= ".MULTIHUNTER;
|
||||
$result = mysql_query($q, $this->connection);
|
||||
$dbarray = mysql_fetch_array($result);
|
||||
$result = mysqli_query($this->connection,$q);
|
||||
$dbarray = mysqli_fetch_array($result);
|
||||
if($dbarray['password'] == md5($password)) {
|
||||
mysql_query("Insert into ".TB_PREFIX."admin_log values (0,'X','$username logged in (IP: <b>".$_SERVER['REMOTE_ADDR']."</b>)',".time().")");
|
||||
mysqli_query($this->connection,"Insert into ".TB_PREFIX."admin_log values (0,'X','$username logged in (IP: <b>".$_SERVER['REMOTE_ADDR']."</b>)',".time().")");
|
||||
return true;
|
||||
}
|
||||
else {
|
||||
mysql_query("Insert into ".TB_PREFIX."admin_log values (0,'X','<font color=\'red\'><b>IP: ".$_SERVER['REMOTE_ADDR']." tried to log in with username <u> $username</u> but access was denied!</font></b>',".time().")");
|
||||
mysqli_query($this->connection,"Insert into ".TB_PREFIX."admin_log values (0,'X','<font color=\'red\'><b>IP: ".$_SERVER['REMOTE_ADDR']." tried to log in with username <u> $username</u> but access was denied!</font></b>',".time().")");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -70,7 +71,7 @@ class adm_DB {
|
||||
}
|
||||
|
||||
$q = "UPDATE ".TB_PREFIX."vdata set pop = $popTot where wref = $vid";
|
||||
mysql_query($q, $this->connection);
|
||||
mysqli_query($this->connection, $q);
|
||||
}
|
||||
|
||||
function recountCP($vid){
|
||||
@@ -85,7 +86,7 @@ class adm_DB {
|
||||
}
|
||||
}
|
||||
$q = "UPDATE ".TB_PREFIX."vdata set cp = $popTot where wref = $vid";
|
||||
mysql_query($q, $this->connection);
|
||||
mysqli_query($this->connection,$q);
|
||||
}
|
||||
|
||||
function buildingPOP($f,$lvl){
|
||||
@@ -114,8 +115,8 @@ class adm_DB {
|
||||
|
||||
function getWref($x,$y) {
|
||||
$q = "SELECT id FROM ".TB_PREFIX."wdata where x = $x and y = $y";
|
||||
$result = mysql_query($q, $this->connection);
|
||||
$r = mysql_fetch_array($result);
|
||||
$result = mysqli_query($this->connection,$q);
|
||||
$r = mysqli_fetch_array($result);
|
||||
return $r['id'];
|
||||
}
|
||||
|
||||
@@ -126,7 +127,7 @@ class adm_DB {
|
||||
$status = $database->getVillageState($wid);
|
||||
$status = 0;
|
||||
if($status == 0){
|
||||
mysql_query("Insert into ".TB_PREFIX."admin_log values (0,".$_SESSION['id'].",'Added new village <b><a href=\'admin.php?p=village&did=$wid\'>$wid</a></b> to user <b><a href=\'admin.php?p=player&uid=$uid\'>$uid</a></b>',".time().")");
|
||||
mysqli_query("Insert into ".TB_PREFIX."admin_log values (0,".$_SESSION['id'].",'Added new village <b><a href=\'admin.php?p=village&did=$wid\'>$wid</a></b> to user <b><a href=\'admin.php?p=player&uid=$uid\'>$uid</a></b>',".time().")");
|
||||
$database->setFieldTaken($wid);
|
||||
$database->addVillage($wid,$uid,'new village','0');
|
||||
$database->addResourceFields($wid,$database->getVillageType($wid));
|
||||
@@ -164,23 +165,23 @@ class adm_DB {
|
||||
if($post['clean_ware']){
|
||||
$time = time();
|
||||
$q = "UPDATE ".TB_PREFIX."vdata SET `wood` = '0', `clay` = '0', `iron` = '0', `crop` = '0', `lastupdate` = '$time' WHERE wref = $vid;";
|
||||
mysql_query($q, $this->connection);
|
||||
mysqli_query($this->connection,$q);
|
||||
}
|
||||
}
|
||||
mysql_query("Insert into ".TB_PREFIX."admin_log values (0,".$_SESSION['id'].",'Punished user: <a href=\'admin.php?p=player&uid=".$post['uid']."\'>".$post['uid']."</a> with <b>-".$post['punish']."%</b> population',".time().")");
|
||||
mysqli_query($this->connection,"Insert into ".TB_PREFIX."admin_log values (0,".$_SESSION['id'].",'Punished user: <a href=\'admin.php?p=player&uid=".$post['uid']."\'>".$post['uid']."</a> with <b>-".$post['punish']."%</b> population',".time().")");
|
||||
}
|
||||
|
||||
function PunishBuilding($vid,$proc,$pop){
|
||||
global $database;
|
||||
$q = "UPDATE ".TB_PREFIX."vdata set pop = $pop where wref = $vid;";
|
||||
mysql_query($q, $this->connection);
|
||||
mysqli_query($this->connection,$q);
|
||||
$fdata = $database->getResourceLevel($vid);
|
||||
for ($i = 1; $i <= 40; $i++) {
|
||||
if($fdata['f'.$i]>1){
|
||||
$zm = ($fdata['f'.$i]/100)*$proc;
|
||||
if($zm < 1){$zm = 1;}else{$zm = floor($zm);}
|
||||
$q = "UPDATE ".TB_PREFIX."fdata SET `f$i` = '$zm' WHERE `vref` = $vid;";
|
||||
mysql_query($q, $this->connection);
|
||||
mysqli_query($this->connection, $q);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -193,7 +194,7 @@ class adm_DB {
|
||||
|
||||
function DelUnits2($vid,$unit){
|
||||
$q = "UPDATE ".TB_PREFIX."units SET `u$unit` = '0' WHERE `vref` = $vid;";
|
||||
mysql_query($q, $this->connection);
|
||||
mysqli_query($this->connection,$q);
|
||||
}
|
||||
|
||||
function DelPlayer($uid,$pass){
|
||||
@@ -205,26 +206,26 @@ class adm_DB {
|
||||
$this->DelVillage($villages[$i]['wref'], 1);
|
||||
}
|
||||
$q = "DELETE FROM ".TB_PREFIX."hero where uid = $uid";
|
||||
mysql_query($q, $this->connection);
|
||||
mysqli_query($this->connection,$q);
|
||||
|
||||
$name = $database->getUserField($uid,"username",0);
|
||||
mysql_query("Insert into ".TB_PREFIX."admin_log values (0,$ID,'Deleted user <a>$name</a>',".time().")");
|
||||
mysqli_query($this->connection,"Insert into ".TB_PREFIX."admin_log values (0,$ID,'Deleted user <a>$name</a>',".time().")");
|
||||
$q = "DELETE FROM ".TB_PREFIX."users WHERE `id` = $uid;";
|
||||
mysql_query($q, $this->connection);
|
||||
mysqli_query($this->connection,$q);
|
||||
}
|
||||
}
|
||||
|
||||
function getUserActive() {
|
||||
$time = time() - (60*5);
|
||||
$q = "SELECT * FROM ".TB_PREFIX."users where timestamp > $time and username != 'support'";
|
||||
$result = mysql_query($q, $this->connection);
|
||||
return $this->mysql_fetch_all($result);
|
||||
$result = mysqli_query($this->connection, $q);
|
||||
return $this->mysqli_fetch_all($result);
|
||||
}
|
||||
|
||||
function CheckPass($password,$uid){
|
||||
$q = "SELECT password FROM ".TB_PREFIX."users where id = '$uid' and access = ".ADMIN;
|
||||
$result = mysql_query($q, $this->connection);
|
||||
$dbarray = mysql_fetch_array($result);
|
||||
$result = mysqli_query($this->connection, $q);
|
||||
$dbarray = mysqli_fetch_array($result);
|
||||
if($dbarray['password'] == md5($password)) {
|
||||
return true;
|
||||
}else{
|
||||
@@ -239,37 +240,37 @@ class adm_DB {
|
||||
}else{
|
||||
$q = "SELECT * FROM ".TB_PREFIX."vdata WHERE `wref` = $wref";
|
||||
}
|
||||
$result = mysql_query($q, $this->connection);
|
||||
if(mysql_num_rows($result) > 0){
|
||||
mysql_query("Insert into ".TB_PREFIX."admin_log values (0,".$_SESSION['id'].",'Deleted village <b>$wref</b>',".time().")");
|
||||
$result = mysqli_query($this->connection, $q);
|
||||
if(mysqli_num_rows($result) > 0){
|
||||
mysqli_query("Insert into ".TB_PREFIX."admin_log values (0,".$_SESSION['id'].",'Deleted village <b>$wref</b>',".time().")");
|
||||
|
||||
$database->clearExpansionSlot($wref);
|
||||
|
||||
$q = "DELETE FROM ".TB_PREFIX."abdata where vref = $wref";
|
||||
mysql_query($q, $this->connection);
|
||||
mysqli_query($this->connection, $q);
|
||||
$q = "DELETE FROM ".TB_PREFIX."bdata where wid = $wref";
|
||||
mysql_query($q, $this->connection);
|
||||
mysqli_query($this->connection, $q);
|
||||
$q = "DELETE FROM ".TB_PREFIX."market where vref = $wref";
|
||||
mysql_query($q, $this->connection);
|
||||
mysqli_query($this->connection, $q);
|
||||
$q = "DELETE FROM ".TB_PREFIX."odata where wref = $wref";
|
||||
mysql_query($q, $this->connection);
|
||||
mysqli_query($this->connection, $q);
|
||||
$q = "DELETE FROM ".TB_PREFIX."research where vref = $wref";
|
||||
mysql_query($q, $this->connection);
|
||||
mysqli_query($this->connection, $q);
|
||||
$q = "DELETE FROM ".TB_PREFIX."tdata where vref = $wref";
|
||||
mysql_query($q, $this->connection);
|
||||
mysqli_query($this->connection, $q);
|
||||
$q = "DELETE FROM ".TB_PREFIX."fdata where vref = $wref";
|
||||
mysql_query($q, $this->connection);
|
||||
mysqli_query($this->connection, $q);
|
||||
$q = "DELETE FROM ".TB_PREFIX."training where vref = $wref";
|
||||
mysql_query($q, $this->connection);
|
||||
mysqli_query($this->connection, $q);
|
||||
$q = "DELETE FROM ".TB_PREFIX."units where vref = $wref";
|
||||
mysql_query($q, $this->connection);
|
||||
mysqli_query($this->connection, $q);
|
||||
$q = "DELETE FROM ".TB_PREFIX."farmlist where wref = $wref";
|
||||
mysql_query($q, $this->connection);
|
||||
mysqli_query($this->connection, $q);
|
||||
$q = "DELETE FROM ".TB_PREFIX."raidlist where towref = $wref";
|
||||
mysql_query($q, $this->connection);
|
||||
mysqli_query($this->connection, $q);
|
||||
|
||||
$q = "DELETE FROM ".TB_PREFIX."movement where `from` = $wref and proc=0";
|
||||
mysql_query($q, $this->connection);
|
||||
mysqli_query($this->connection, $q);
|
||||
|
||||
$getmovement = $database->getMovement(3,$wref,1);
|
||||
foreach($getmovement as $movedata) {
|
||||
@@ -284,11 +285,11 @@ class adm_DB {
|
||||
$this->returnTroops($wref);
|
||||
|
||||
$q = "DELETE FROM ".TB_PREFIX."vdata WHERE `wref` = $wref";
|
||||
mysql_query($q, $this->connection);
|
||||
mysqli_query($this->connection, $q);
|
||||
|
||||
if (mysql_affected_rows()>0) {
|
||||
if (mysqli_affected_rows()>0) {
|
||||
$q = "UPDATE ".TB_PREFIX."wdata set occupied = 0 where id = $wref";
|
||||
mysql_query($q, $this->connection);
|
||||
mysqli_query($this->connection, $q);
|
||||
|
||||
$getprisoners = $database->getPrisoners($wref);
|
||||
foreach($getprisoners as $pris) {
|
||||
@@ -315,83 +316,83 @@ class adm_DB {
|
||||
function DelBan($uid,$id){
|
||||
global $database;
|
||||
$name = addslashes($database->getUserField($uid,"username",0));
|
||||
mysql_query("Insert into ".TB_PREFIX."admin_log values (0,".$_SESSION['id'].",'Unbanned user <a href=\'admin.php?p=player&uid=$uid\'>$name</a>',".time().")");
|
||||
mysqli_query("Insert into ".TB_PREFIX."admin_log values (0,".$_SESSION['id'].",'Unbanned user <a href=\'admin.php?p=player&uid=$uid\'>$name</a>',".time().")");
|
||||
$q = "UPDATE ".TB_PREFIX."users SET `access` = '".USER."' WHERE `id` = $uid;";
|
||||
mysql_query($q, $this->connection);
|
||||
mysqli_query($this->connection, $q);
|
||||
$q = "UPDATE ".TB_PREFIX."banlist SET `active` = '0' WHERE `id` = $id;";
|
||||
mysql_query($q, $this->connection);
|
||||
mysqli_query($this->connection, $q);
|
||||
}
|
||||
|
||||
function AddBan($uid,$end,$reason){
|
||||
global $database;
|
||||
$name = addslashes($database->getUserField($uid,"username",0));
|
||||
mysql_query("Insert into ".TB_PREFIX."admin_log values (0,".$_SESSION['id'].",'Banned user <a href=\'admin.php?p=player&uid=$uid\'>$name</a>',".time().")");
|
||||
mysqli_query("Insert into ".TB_PREFIX."admin_log values (0,".$_SESSION['id'].",'Banned user <a href=\'admin.php?p=player&uid=$uid\'>$name</a>',".time().")");
|
||||
$q = "UPDATE ".TB_PREFIX."users SET `access` = '0' WHERE `id` = $uid;";
|
||||
mysql_query($q, $this->connection);
|
||||
mysqli_query($this->connection, $q);
|
||||
$time = time();
|
||||
$admin = $_SESSION['id']; //$database->getUserField($_SESSION['username'],'id',1);
|
||||
$name = addslashes($database->getUserField($uid,'username',0));
|
||||
$q = "INSERT INTO ".TB_PREFIX."banlist (`uid`, `name`, `reason`, `time`, `end`, `admin`, `active`) VALUES ($uid, '$name' , '$reason', '$time', '$end', '$admin', '1');";
|
||||
mysql_query($q, $this->connection);
|
||||
mysqli_query($this->connection, $q);
|
||||
}
|
||||
|
||||
function search_player($player){
|
||||
$q = "SELECT id,username FROM ".TB_PREFIX."users WHERE `username` LIKE '%$player%' and username != 'support'";
|
||||
$result = mysql_query($q, $this->connection);
|
||||
return $this->mysql_fetch_all($result);
|
||||
$result = mysqli_query($this->connection, $q);
|
||||
return $this->mysqli_fetch_all($result);
|
||||
}
|
||||
|
||||
function search_email($email){
|
||||
$q = "SELECT id,email FROM ".TB_PREFIX."users WHERE `email` LIKE '%$email%' and username != 'support'";
|
||||
$result = mysql_query($q, $this->connection);
|
||||
return $this->mysql_fetch_all($result);
|
||||
$result = mysqli_query($this->connection, $q);
|
||||
return $this->mysqli_fetch_all($result);
|
||||
}
|
||||
|
||||
function search_village($village){
|
||||
$q = "SELECT * FROM ".TB_PREFIX."vdata WHERE `name` LIKE '%$village%' or `wref` LIKE '%$village%'";
|
||||
$result = mysql_query($q, $this->connection);
|
||||
return $this->mysql_fetch_all($result);
|
||||
$result = mysqli_query($this->connection, $q);
|
||||
return $this->mysqli_fetch_all($result);
|
||||
}
|
||||
|
||||
function search_alliance($alliance){
|
||||
$q = "SELECT * FROM ".TB_PREFIX."alidata WHERE `name` LIKE '%$alliance%' or `tag` LIKE '%$alliance%' or `id` LIKE '%$alliance%'";
|
||||
$result = mysql_query($q, $this->connection);
|
||||
return $this->mysql_fetch_all($result);
|
||||
$result = mysqli_query($this->connection, $q);
|
||||
return $this->mysqli_fetch_all($result);
|
||||
}
|
||||
|
||||
function search_ip($ip){
|
||||
$q = "SELECT * FROM ".TB_PREFIX."login_log WHERE `ip` LIKE '%$ip%'";
|
||||
$result = mysql_query($q, $this->connection);
|
||||
return $this->mysql_fetch_all($result);
|
||||
$result = mysqli_query($this->connection, $q);
|
||||
return $this->mysqli_fetch_all($result);
|
||||
}
|
||||
|
||||
function search_banned(){
|
||||
$q = "SELECT * FROM ".TB_PREFIX."banlist where active = '1'";
|
||||
$result = mysql_query($q, $this->connection);
|
||||
return $this->mysql_fetch_all($result);
|
||||
$result = mysqli_query($this->connection, $q);
|
||||
return $this->mysqli_fetch_all($result);
|
||||
}
|
||||
|
||||
function Del_banned(){
|
||||
//$q = "SELECT * FROM ".TB_PREFIX."banlist";
|
||||
$result = mysql_query($q, $this->connection);
|
||||
return $this->mysql_fetch_all($result);
|
||||
$result = mysqli_query($this->connection, $q);
|
||||
return $this->mysqli_fetch_all($result);
|
||||
}
|
||||
|
||||
/***************************
|
||||
Function to process MYSQLi->fetch_all (Only exist in MYSQL)
|
||||
References: Result
|
||||
***************************/
|
||||
function mysql_fetch_all($result) {
|
||||
function mysqli_fetch_all($result) {
|
||||
$all = array();
|
||||
if($result) {
|
||||
while ($row = mysql_fetch_assoc($result)){ $all[] = $row; }
|
||||
while ($row = mysqli_fetch_assoc($result)){ $all[] = $row; }
|
||||
return $all;
|
||||
}
|
||||
}
|
||||
|
||||
function query_return($q) {
|
||||
$result = mysql_query($q, $this->connection);
|
||||
return $this->mysql_fetch_all($result);
|
||||
$result = mysqli_query($this->connection, $q);
|
||||
return $this->mysqli_fetch_all($result);
|
||||
}
|
||||
|
||||
/***************************
|
||||
@@ -399,7 +400,7 @@ class adm_DB {
|
||||
References: Query
|
||||
***************************/
|
||||
function query($query) {
|
||||
return mysql_query($query, $this->connection);
|
||||
return mysqli_query($query, $this->connection);
|
||||
}
|
||||
|
||||
public function getTypeLevel($tid,$vid) {
|
||||
@@ -519,8 +520,8 @@ class adm_DB {
|
||||
|
||||
if( intval($enforce['hero']) > 0){
|
||||
$q = "SELECT * FROM ".TB_PREFIX."hero WHERE uid = ".$from['owner']."";
|
||||
$result = mysql_query($q);
|
||||
$hero_f=mysql_fetch_array($result);
|
||||
$result = mysqli_query($q);
|
||||
$hero_f=mysqli_fetch_array($result);
|
||||
$hero_unit=$hero_f['unit'];
|
||||
$speeds[] = $GLOBALS['u'.$hero_unit]['speed'];
|
||||
} else {
|
||||
|
||||
@@ -93,7 +93,7 @@ class funct {
|
||||
exit;
|
||||
case "reviveHero":
|
||||
$result=$database->query("SELECT * FROM ".TB_PREFIX."hero WHERE uid='".$get['uid']."'");
|
||||
$hdata=mysql_fetch_array($result);
|
||||
$hdata=mysqli_fetch_array($result);
|
||||
$database->query("UPDATE ".TB_PREFIX."units SET hero = 1 WHERE vref = ".$hdata['wref']);
|
||||
$database->query("UPDATE ".TB_PREFIX."hero SET `dead` = '0', `inrevive` = '0', `health` = '100', `lastupdate` = ".time()." WHERE `uid` = '".$get['uid']."'");
|
||||
header("Location: admin.php?p=player&uid=".$get['uid']."&rc=1");
|
||||
|
||||
@@ -454,8 +454,8 @@
|
||||
|
||||
private function updateMax($leader) {
|
||||
global $bid18, $database;
|
||||
$q = mysql_query("SELECT * FROM " . TB_PREFIX . "alidata where leader = $leader");
|
||||
if(mysql_num_rows($q) > 0){
|
||||
$q = mysqli_query($GLOBALS['link'],"SELECT * FROM " . TB_PREFIX . "alidata where leader = $leader");
|
||||
if(mysqli_num_rows($q) > 0){
|
||||
$villages = $database->getVillagesID2($leader);
|
||||
$max = 0;
|
||||
foreach($villages as $village){
|
||||
|
||||
+215
-214
File diff suppressed because it is too large
Load Diff
+22
-15
@@ -168,6 +168,13 @@ class Battle {
|
||||
$walllevel=$post['walllevel'];
|
||||
$wall = $walllevel;
|
||||
$palast = $post['palast'];
|
||||
|
||||
if($scout ==1 && $defscout==0) {
|
||||
$walllevel = 0;
|
||||
$wall = 0;
|
||||
$palast = 0;
|
||||
}
|
||||
|
||||
if($scout ==1) {
|
||||
$palast = 0; //no def point palace n residence when scout
|
||||
}
|
||||
@@ -652,8 +659,8 @@ class Battle {
|
||||
|
||||
if (isset($units['Att_unit']['hero']) && $units['Att_unit']['hero'] >0){
|
||||
|
||||
$_result=mysql_query("select * from " . TB_PREFIX . "hero where `dead`='0' and `heroid`='".$atkhero['heroid']."'");
|
||||
$fdb = mysql_fetch_array($_result);
|
||||
$_result=mysqli_query($GLOBALS['link'],"select * from " . TB_PREFIX . "hero where `dead`='0' and `heroid`='".$atkhero['heroid']."'");
|
||||
$fdb = mysqli_fetch_array($_result);
|
||||
$hero_id=$fdb['heroid'];
|
||||
$hero_health=$fdb['health'];
|
||||
$damage_health=round(100*$result[1]);
|
||||
@@ -661,10 +668,10 @@ class Battle {
|
||||
if ($hero_health<=$damage_health or $damage_health>90){
|
||||
//hero die
|
||||
$result['casualties_attacker']['11'] = 1;
|
||||
mysql_query("update " . TB_PREFIX . "hero set `dead`='1' where `heroid`='".$hero_id."'");
|
||||
mysql_query("update " . TB_PREFIX . "hero set `health`='0' where `heroid`='".$hero_id."'");
|
||||
mysqli_query($GLOBALS['link'],"update " . TB_PREFIX . "hero set `dead`='1' where `heroid`='".$hero_id."'");
|
||||
mysqli_query($GLOBALS['link'],"update " . TB_PREFIX . "hero set `health`='0' where `heroid`='".$hero_id."'");
|
||||
}else{
|
||||
mysql_query("update " . TB_PREFIX . "hero set `health`=`health`-".$damage_health." where `heroid`='".$hero_id."'");
|
||||
mysqli_query($GLOBALS['link'],"update " . TB_PREFIX . "hero set `health`=`health`-".$damage_health." where `heroid`='".$hero_id."'");
|
||||
}
|
||||
}
|
||||
unset($_result,$fdb,$hero_id,$hero_health,$damage_health);
|
||||
@@ -672,19 +679,19 @@ class Battle {
|
||||
|
||||
if (isset($units['Def_unit']['hero']) && $units['Def_unit']['hero'] >0){
|
||||
|
||||
$_result=mysql_query("select * from " . TB_PREFIX . "hero where `dead`='0' and `heroid`='".$defenderhero['heroid']."'");
|
||||
$fdb = mysql_fetch_array($_result);
|
||||
$_result=mysqli_query($GLOBALS['link'],"select * from " . TB_PREFIX . "hero where `dead`='0' and `heroid`='".$defenderhero['heroid']."'");
|
||||
$fdb = mysqli_fetch_array($_result);
|
||||
$hero_id=$fdb['heroid'];
|
||||
$hero_health=$fdb['health'];
|
||||
$damage_health=round(100*$result[2]);
|
||||
if ($hero_health<=$damage_health or $damage_health>90){
|
||||
//hero die
|
||||
$result['deadherodef'] = 1;
|
||||
mysql_query("update " . TB_PREFIX . "hero set `dead`='1' where `heroid`='".$hero_id."'");
|
||||
mysql_query("update " . TB_PREFIX . "hero set `health`='0' where `heroid`='".$hero_id."'");
|
||||
mysqli_query($GLOBALS['link'],"update " . TB_PREFIX . "hero set `dead`='1' where `heroid`='".$hero_id."'");
|
||||
mysqli_query($GLOBALS['link'],"update " . TB_PREFIX . "hero set `health`='0' where `heroid`='".$hero_id."'");
|
||||
}else{
|
||||
$result['deadherodef'] = 0;
|
||||
mysql_query("update " . TB_PREFIX . "hero set `health`=`health`-".$damage_health." where `heroid`='".$hero_id."'");
|
||||
mysqli_query($GLOBALS['link'],"update " . TB_PREFIX . "hero set `health`=`health`-".$damage_health." where `heroid`='".$hero_id."'");
|
||||
}
|
||||
}
|
||||
unset($_result,$fdb,$hero_id,$hero_health,$damage_health);
|
||||
@@ -696,19 +703,19 @@ class Battle {
|
||||
if(!empty($heroarray)) { reset($heroarray); }
|
||||
$Reinforcer = $database->getVillageField($defenders['from'],"owner");
|
||||
$heroarraydefender = $this->getBattleHero($Reinforcer);
|
||||
$_result=mysql_query("select * from " . TB_PREFIX . "hero where `dead`='0' and `heroid`='".$heroarraydefender['heroid']."'");
|
||||
$fdb = mysql_fetch_array($_result);
|
||||
$_result=mysqli_query($GLOBALS['link'],"select * from " . TB_PREFIX . "hero where `dead`='0' and `heroid`='".$heroarraydefender['heroid']."'");
|
||||
$fdb = mysqli_fetch_array($_result);
|
||||
$hero_id=$fdb['heroid'];
|
||||
$hero_health=$fdb['health'];
|
||||
$damage_health=round(100*$result[2]);
|
||||
if ($hero_health<=$damage_health or $damage_health>90){
|
||||
//hero die
|
||||
$result['deadheroref'][$defenders['id']] = 1;
|
||||
mysql_query("update " . TB_PREFIX . "hero set `dead`='1' where `heroid`='".$hero_id."'");
|
||||
mysql_query("update " . TB_PREFIX . "hero set `health`='0' where `heroid`='".$hero_id."'");
|
||||
mysqli_query($GLOBALS['link'],"update " . TB_PREFIX . "hero set `dead`='1' where `heroid`='".$hero_id."'");
|
||||
mysqli_query($GLOBALS['link'],"update " . TB_PREFIX . "hero set `health`='0' where `heroid`='".$hero_id."'");
|
||||
}else{
|
||||
$result['deadheroref'][$defenders['id']] = 0;
|
||||
mysql_query("update " . TB_PREFIX . "hero set `health`=`health`-".$damage_health." where `heroid`='".$hero_id."'");
|
||||
mysqli_query($GLOBALS['link'],"update " . TB_PREFIX . "hero set `health`=`health`-".$damage_health." where `heroid`='".$hero_id."'");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
## Version: 22.06.2015 ##
|
||||
## Filename Building.php ##
|
||||
## Developed by: Mr.php , Advocaite , brainiacX , yi12345 , Shadow , ronix ##
|
||||
## Fixed by: Shadow - STARVATION , HERO FIXED COMPL. ##
|
||||
## Fixed by: Shadow - STARVATION , HERO FIXED COMPL., TPLinux ##
|
||||
## Fixed by: InCube - double troops ##
|
||||
## License: TravianZ Project ##
|
||||
## Copyright: TravianZ (c) 2010-2015. All rights reserved. ##
|
||||
@@ -97,7 +97,7 @@ class Building {
|
||||
}
|
||||
}
|
||||
if(isset($get['buildingFinish']) && $session->plus) {
|
||||
if($session->gold >= 2 && $session->sit == 0) {
|
||||
if(intval($session->gold) >= 2 && $session->sit == 0) {
|
||||
$this->finishAll();
|
||||
}
|
||||
}
|
||||
@@ -278,7 +278,7 @@ class Building {
|
||||
return $build;
|
||||
}
|
||||
|
||||
private function loadBuilding() {
|
||||
public function loadBuilding() {
|
||||
global $database,$village,$session;
|
||||
$this->buildArray = $database->getJobs($village->wid);
|
||||
$this->allocated = count($this->buildArray);
|
||||
@@ -301,8 +301,11 @@ class Building {
|
||||
}
|
||||
}
|
||||
}
|
||||
// echo var_dump($this->buildArray);
|
||||
$this->NewBuilding = true;
|
||||
}
|
||||
}else{
|
||||
$this->NewBuilding = false;
|
||||
}
|
||||
}
|
||||
|
||||
private function removeBuilding($d) {
|
||||
|
||||
+3
-3
@@ -362,7 +362,7 @@ if (!isset($SAJAX_INCLUDED)) {
|
||||
$alliance = $session->alliance;
|
||||
$now = time();
|
||||
echo $q = "INSERT into ".TB_PREFIX."chat (id_user,name,alli,date,msg) values ('$id_user','$name','$alliance','$now','$msg')";
|
||||
mysql_query($q, $database->connection);
|
||||
mysqli_query($GLOBALS['link'],$q);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -370,8 +370,8 @@ if (!isset($SAJAX_INCLUDED)) {
|
||||
global $session,$database;
|
||||
|
||||
$alliance = $session->alliance;
|
||||
$query = mysql_query("select * from ".TB_PREFIX."chat where alli='$alliance' order by id desc limit 0,13");
|
||||
while ($r = mysql_fetch_array($query)) {
|
||||
$query = mysqli_query($GLOBALS['link'],"select * from ".TB_PREFIX."chat where alli='$alliance' order by id desc limit 0,13");
|
||||
while ($r = mysqli_fetch_array($query)) {
|
||||
$dates = date("g:i",$r[date]);
|
||||
$data .= "[{$dates}] <a href='spieler.php?uid={$r['id_user']}'>{$r['name']}</a>: {$r[msg]} <br>";
|
||||
}
|
||||
|
||||
@@ -8,8 +8,8 @@
|
||||
## Copyright: TravianX (c) 2010-2011. All rights reserved. ##
|
||||
## ##
|
||||
#################################################################################
|
||||
$getheroinfo = mysql_query("SELECT * FROM ".TB_PREFIX."hero WHERE `uid`='".$session->uid."'") or die(mysql_error());
|
||||
$heroinfo = mysql_fetch_array($getheroinfo);
|
||||
$getheroinfo = mysqli_query($GLOBALS["link"], "SELECT * FROM ".TB_PREFIX."hero WHERE `uid`='".$session->uid."'") or die(mysqli_error());
|
||||
$heroinfo = mysqli_fetch_array($getheroinfo);
|
||||
echo $heroinfo['attackpower'];
|
||||
$hero=array('atk'=>40*$heroinfo['attackpower'],'di'=>35,'dc'=>50,'wood'=>120,'clay'=>100,'iron'=>150,'crop'=>30,'pop'=>6,'speed'=>6,'time'=>1600,'cap'=>0);
|
||||
|
||||
|
||||
@@ -10,10 +10,10 @@
|
||||
#################################################################################
|
||||
?>
|
||||
<div style="margin-top: 50px;">
|
||||
<center>
|
||||
<div style="text-align: center">
|
||||
<h1>404 - File not found</h1>
|
||||
<img src="../../gpack/travian_default/img/misc/404.gif" title="Not Found" alt="Not Found"><br />
|
||||
<p>We looked 404 times already but can't find anything, Not even an X marking the spot.</p>
|
||||
<p>This system is not complete yet. So the page probably does not exist.</p><br>
|
||||
</center>
|
||||
</div>
|
||||
</div>
|
||||
+3867
-17
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -1,19 +0,0 @@
|
||||
<?php
|
||||
#################################################################################
|
||||
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Filename 404.tpl ##
|
||||
## Developed by: aggenkeech ##
|
||||
## License: TravianX Project ##
|
||||
## Copyright: TravianX (c) 2010-2012. All rights reserved. ##
|
||||
## ##
|
||||
#################################################################################
|
||||
?>
|
||||
<div style="margin-top: 50px;">
|
||||
<center>
|
||||
<h1>404 - File not found</h1>
|
||||
<img src="../../gpack/travian_default/img/misc/404.gif" title="Not Found" alt="Not Found"><br />
|
||||
<p>We looked 404 times already but can't find anything, Not even an X marking the spot.</p>
|
||||
<p>This system is not complete yet. So the page probably does not exist.</p><br>
|
||||
</center>
|
||||
</div>
|
||||
@@ -10,10 +10,10 @@
|
||||
#################################################################################
|
||||
?>
|
||||
<div style="margin-top: 50px;">
|
||||
<center>
|
||||
<div style="text-align: center">
|
||||
<h1>404 - File not found</h1>
|
||||
<img src="../../gpack/travian_default/img/misc/404.gif" title="Not Found" alt="Not Found"><br />
|
||||
<p>We looked 404 times already but can't find anything, Not even an X marking the spot.</p>
|
||||
<p>This system is not complete yet. So the page probably does not exist.</p><br>
|
||||
</center>
|
||||
</div>
|
||||
</div>
|
||||
@@ -931,7 +931,7 @@ define("CELEBRATIONS_COMMENCE_TOWNHALL","Celebrations can commence when the town
|
||||
define("GREAT_CELEBRATIONS","Great celebration");
|
||||
define("CULTURE_POINTS","Culture points");
|
||||
define("HOLD","hold");
|
||||
define("CELEBRATIONS_IN_PROGRESS","Celebration</br>in progress");
|
||||
define("CELEBRATIONS_IN_PROGRESS","Celebration<br />in progress");
|
||||
define("CELEBRATIONS","Celebrations");
|
||||
define("TOWNHALL_DESC","You can hold pompous celebrations in the Town Hall. Such a celebration increases your culture points. Building up your Town Hall to a higher level will decrease the length of the celebration.");
|
||||
|
||||
|
||||
@@ -906,7 +906,7 @@ define("CELEBRATIONS_COMMENCE_TOWNHALL","Celebraciones pueden comenzar cuando se
|
||||
define("GREAT_CELEBRATIONS","Gran Fiesta");
|
||||
define("CULTURE_POINTS","puntos de cultura");
|
||||
define("HOLD","celebrar");
|
||||
define("CELEBRATIONS_IN_PROGRESS","Celebracion</br>en proceso");
|
||||
define("CELEBRATIONS_IN_PROGRESS","Celebracion<br />en proceso");
|
||||
define("CELEBRATIONS","Fiesta");
|
||||
define("TOWNHALL_DESC","En el Centro Cívico puedes organizar grandes o pequeñas fiestas para los habitantes de tu aldea. Cada fiesta incrementará tus Puntos de Cultura.");
|
||||
|
||||
|
||||
@@ -10,10 +10,10 @@
|
||||
#################################################################################
|
||||
?>
|
||||
<div style="margin-top: 50px;">
|
||||
<center>
|
||||
<div style="text-align: center">
|
||||
<h1>404 - File not found</h1>
|
||||
<img src="../../gpack/travian_default/img/misc/404.gif" title="Not Found" alt="Not Found"><br />
|
||||
<p>We looked 404 times already but can't find anything, Not even an X marking the spot.</p>
|
||||
<p>This system is not complete yet. So the page probably does not exist.</p><br>
|
||||
</center>
|
||||
</div>
|
||||
</div>
|
||||
@@ -742,7 +742,7 @@ define("CELEBRATIONS_COMMENCE_TOWNHALL","Celebrations can commence when the town
|
||||
define("GREAT_CELEBRATIONS","Great celebration");
|
||||
define("CULTURE_POINTS","culture points");
|
||||
define("HOLD","hold");
|
||||
define("CELEBRATIONS_IN_PROGRESS","Celebration</br>in progress");
|
||||
define("CELEBRATIONS_IN_PROGRESS","Celebration<br />in progress");
|
||||
define("CELEBRATIONS","Celebrations");
|
||||
define("TOWNHALL_DESC","You can hold pompous celebrations in the Town Hall. Such a celebration increases your culture points. Building up your Town Hall to a higher level will decrease the length of the celebration.");
|
||||
|
||||
|
||||
@@ -752,7 +752,7 @@ define("CELEBRATIONS_COMMENCE_TOWNHALL","Celebrations can commence when the town
|
||||
define("GREAT_CELEBRATIONS","Great celebration");
|
||||
define("CULTURE_POINTS","culture points");
|
||||
define("HOLD","hold");
|
||||
define("CELEBRATIONS_IN_PROGRESS","Celebration</br>in progress");
|
||||
define("CELEBRATIONS_IN_PROGRESS","Celebration<br />in progress");
|
||||
define("CELEBRATIONS","Celebrations");
|
||||
define("TOWNHALL_DESC","You can hold pompous celebrations in the Town Hall. Such a celebration increases your culture points. Building up your Town Hall to a higher level will decrease the length of the celebration.");
|
||||
|
||||
|
||||
@@ -210,8 +210,8 @@ class Message {
|
||||
global $database,$session;
|
||||
for($i = 1; $i <= 10; $i++) {
|
||||
if(isset($post['n' . $i])) {
|
||||
$message1 = mysql_query("SELECT * FROM " . TB_PREFIX . "mdata where id = ".$post['n' . $i]."");
|
||||
$message = mysql_fetch_array($message1);
|
||||
$message1 = mysqli_query($GLOBALS['link'],"SELECT * FROM " . TB_PREFIX . "mdata where id = ".$post['n' . $i]."");
|
||||
$message = mysqli_fetch_array($message1);
|
||||
if($message['target'] == $session->uid && $message['owner'] == $session->uid){
|
||||
$database->getMessage($post['n' . $i], 8);
|
||||
}else if($message['target'] == $session->uid){
|
||||
@@ -321,16 +321,16 @@ class Message {
|
||||
// Vulnerability closed by Shadow
|
||||
|
||||
$q = "SELECT * FROM ".TB_PREFIX."mdata WHERE owner='".$session->uid."' AND time > ".time()." - 60";
|
||||
$res = mysql_query($q) or die(mysql_error(). " query ".$q);
|
||||
$flood = mysql_num_rows($res);
|
||||
$res = mysqli_query($GLOBALS['link'],$q) or die(mysqli_error(). " query ".$q);
|
||||
$flood = mysqli_num_rows($res);
|
||||
if($flood > 5)
|
||||
return; //flood
|
||||
|
||||
// Vulnerability closed by Shadow
|
||||
|
||||
$allmembersQ = mysql_query("SELECT id FROM ".TB_PREFIX."users WHERE alliance='".$session->alliance."'");
|
||||
$allmembersQ = mysqli_query($GLOBALS['link'],"SELECT id FROM ".TB_PREFIX."users WHERE alliance='".$session->alliance."'");
|
||||
$userally = $database->getUserField($session->uid,"alliance",0);
|
||||
$permission=mysql_fetch_array(mysql_query("SELECT opt7 FROM ".TB_PREFIX."ali_permission WHERE uid='".$session->uid."'"));
|
||||
$permission=mysqli_fetch_array(mysqli_query($GLOBALS['link'],"SELECT opt7 FROM ".TB_PREFIX."ali_permission WHERE uid='".$session->uid."'"));
|
||||
if(WORD_CENSOR) {
|
||||
$topic = $this->wordCensor($topic);
|
||||
$text = $this->wordCensor($text);
|
||||
@@ -395,7 +395,7 @@ class Message {
|
||||
}
|
||||
if($permission[opt7]==1){
|
||||
if ($userally != 0) {
|
||||
while ($allmembers = mysql_fetch_array($allmembersQ)) {
|
||||
while ($allmembers = mysqli_fetch_array($allmembersQ)) {
|
||||
$database->sendMessage($allmembers[id],$session->uid,htmlspecialchars(addslashes($topic)),htmlspecialchars(addslashes($text)),0,$alliance,$player,$coor,$report);
|
||||
}
|
||||
}
|
||||
@@ -410,8 +410,8 @@ class Message {
|
||||
// Vulnerability closed by Shadow
|
||||
|
||||
$q = "SELECT * FROM ".TB_PREFIX."mdata WHERE owner='".$session->uid."' AND time > ".time()." - 60";
|
||||
$res = mysql_query($q) or die(mysql_error(). " query ".$q);
|
||||
$flood = mysql_num_rows($res);
|
||||
$res = mysqli_query($GLOBALS['link'],$q) or die(mysqli_error(). " query ".$q);
|
||||
$flood = mysqli_num_rows($res);
|
||||
if($flood > 5)
|
||||
return; //flood
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user