mirror of
https://github.com/Shadowss/TravianZ.git
synced 2026-09-03 00:47:19 +00:00
Big Cleanup
1) Removed unnecessary files 2) Trailling spaces (no all though) 3) Some space to tab conversion
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
<Files "*.tpl">
|
<Files "*.tpl">
|
||||||
Order Deny,Allow
|
Order Deny,Allow
|
||||||
Deny from all
|
Deny from all
|
||||||
</Files>
|
</Files>
|
||||||
+12
-12
@@ -25,15 +25,15 @@ function ControlVersion()
|
|||||||
try {
|
try {
|
||||||
// version will be set for 6.X players only
|
// version will be set for 6.X players only
|
||||||
axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");
|
axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");
|
||||||
|
|
||||||
// installed player is some revision of 6.0
|
// installed player is some revision of 6.0
|
||||||
// GetVariable("$version") crashes for versions 6.0.22 through 6.0.29,
|
// GetVariable("$version") crashes for versions 6.0.22 through 6.0.29,
|
||||||
// so we have to be careful.
|
// so we have to be careful.
|
||||||
|
|
||||||
// default to the first public version
|
// default to the first public version
|
||||||
version = "WIN 6,0,21,0";
|
version = "WIN 6,0,21,0";
|
||||||
|
|
||||||
// throws if AllowScripAccess does not exist (introduced in 6.0r47)
|
// throws if AllowScripAccess does not exist (introduced in 6.0r47)
|
||||||
axo.AllowScriptAccess = "always";
|
axo.AllowScriptAccess = "always";
|
||||||
|
|
||||||
// safe to call for 6.0r47 or greater
|
// safe to call for 6.0r47 or greater
|
||||||
@@ -73,7 +73,7 @@ function ControlVersion()
|
|||||||
version = -1;
|
version = -1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return version;
|
return version;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -81,13 +81,13 @@ function ControlVersion()
|
|||||||
function GetSwfVer(id){
|
function GetSwfVer(id){
|
||||||
// NS/Opera version >= 3 check for Flash plugin in plugin array
|
// NS/Opera version >= 3 check for Flash plugin in plugin array
|
||||||
var flashVer = -1;
|
var flashVer = -1;
|
||||||
|
|
||||||
if (navigator.plugins != null && navigator.plugins.length > 0) {
|
if (navigator.plugins != null && navigator.plugins.length > 0) {
|
||||||
if (navigator.plugins["Shockwave Flash 2.0"] || navigator.plugins["Shockwave Flash"]) {
|
if (navigator.plugins["Shockwave Flash 2.0"] || navigator.plugins["Shockwave Flash"]) {
|
||||||
var swVer2 = navigator.plugins["Shockwave Flash 2.0"] ? " 2.0" : "";
|
var swVer2 = navigator.plugins["Shockwave Flash 2.0"] ? " 2.0" : "";
|
||||||
var flashDescription = navigator.plugins["Shockwave Flash" + swVer2].description;
|
var flashDescription = navigator.plugins["Shockwave Flash" + swVer2].description;
|
||||||
var descArray = flashDescription.split(" ");
|
var descArray = flashDescription.split(" ");
|
||||||
var tempArrayMajor = descArray[2].split(".");
|
var tempArrayMajor = descArray[2].split(".");
|
||||||
var versionMajor = tempArrayMajor[0];
|
var versionMajor = tempArrayMajor[0];
|
||||||
var versionMinor = tempArrayMajor[1];
|
var versionMinor = tempArrayMajor[1];
|
||||||
var versionRevision = descArray[3];
|
var versionRevision = descArray[3];
|
||||||
@@ -114,11 +114,11 @@ function GetSwfVer(id){
|
|||||||
else if ( isIE && isWin && !isOpera ) {
|
else if ( isIE && isWin && !isOpera ) {
|
||||||
flashVer = ControlVersion();
|
flashVer = ControlVersion();
|
||||||
}
|
}
|
||||||
|
|
||||||
if(flashVer != -1) {
|
if(flashVer != -1) {
|
||||||
writeFlashTags(id);
|
writeFlashTags(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
return flashVer;
|
return flashVer;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -127,15 +127,15 @@ function writeFlashTags(id)
|
|||||||
{
|
{
|
||||||
var swfFilename = "stats.swf";
|
var swfFilename = "stats.swf";
|
||||||
var swfUrlWithGetParameters = swfFilename + "?id=" + id;
|
var swfUrlWithGetParameters = swfFilename + "?id=" + id;
|
||||||
|
|
||||||
document.writeln("<div style=\"position:absolute; z-index:-1; top:0px; left:0px;\"><object classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab\" width=\"1\" height=\"1\">");
|
document.writeln("<div style=\"position:absolute; z-index:-1; top:0px; left:0px;\"><object classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab\" width=\"1\" height=\"1\">");
|
||||||
document.writeln("<param name=\"movie\" value=\""+swfUrlWithGetParameters+"\" />");
|
document.writeln("<param name=\"movie\" value=\""+swfUrlWithGetParameters+"\" />");
|
||||||
document.writeln("<param name=\"quality\" value=\"low\" />");
|
document.writeln("<param name=\"quality\" value=\"low\" />");
|
||||||
document.writeln("<param name=\"allowScriptAccess\" value=\"always\" />");
|
document.writeln("<param name=\"allowScriptAccess\" value=\"always\" />");
|
||||||
document.writeln("<param name=\"allowNetworking\" value=\"true\" />");
|
document.writeln("<param name=\"allowNetworking\" value=\"true\" />");
|
||||||
document.writeln("<embed width=\"1\" height=\"1\" src=\""+swfUrlWithGetParameters+"\" ");
|
document.writeln("<embed width=\"1\" height=\"1\" src=\""+swfUrlWithGetParameters+"\" ");
|
||||||
document.writeln("quality=\"low\" allowNetworking=\"true\" name=\""+swfFilename+"\" play=\"true\" loop=\"false\" ");
|
document.writeln("quality=\"low\" allowNetworking=\"true\" name=\""+swfFilename+"\" play=\"true\" loop=\"false\" ");
|
||||||
document.writeln("allowScriptAccess=\"sameDomain\" type=\"application/x-shockwave-flash\" ");
|
document.writeln("allowScriptAccess=\"sameDomain\" type=\"application/x-shockwave-flash\" ");
|
||||||
document.writeln("pluginspage=\"http://www.macromedia.com/go/getflashplayer\"> ");
|
document.writeln("pluginspage=\"http://www.macromedia.com/go/getflashplayer\"> ");
|
||||||
document.writeln("</embed> </object></div>");
|
document.writeln("</embed> </object></div>");
|
||||||
}
|
}
|
||||||
@@ -19,10 +19,10 @@ mysql_select_db(SQL_DB);
|
|||||||
if ($session->access < ADMIN) die("Access Denied: You are not Admin!");
|
if ($session->access < ADMIN) die("Access Denied: You are not Admin!");
|
||||||
|
|
||||||
$id = $_POST['id'];
|
$id = $_POST['id'];
|
||||||
$village = $database->getVillage($id);
|
$village = $database->getVillage($id);
|
||||||
$user = $database->getUserArray($village['owner'],1);
|
$user = $database->getUserArray($village['owner'],1);
|
||||||
$coor = $database->getCoor($village['wref']);
|
$coor = $database->getCoor($village['wref']);
|
||||||
$varray = $database->getProfileVillages($village['owner']);
|
$varray = $database->getProfileVillages($village['owner']);
|
||||||
$type = $database->getVillageType($village['wref']);
|
$type = $database->getVillageType($village['wref']);
|
||||||
$fdata = $database->getResourceLevel($village['wref']);
|
$fdata = $database->getResourceLevel($village['wref']);
|
||||||
$units = $database->getUnit($village['wref']);
|
$units = $database->getUnit($village['wref']);
|
||||||
@@ -103,4 +103,4 @@ mysql_query("Insert into ".TB_PREFIX."admin_log values (0,".$_SESSION['id'].",'C
|
|||||||
|
|
||||||
header("Location: ../../../Admin/admin.php?p=addTroops&did=".$id."&d");
|
header("Location: ../../../Admin/admin.php?p=addTroops&did=".$id."&d");
|
||||||
|
|
||||||
?>
|
?>
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
<?php
|
<?php
|
||||||
#################################################################################
|
#################################################################################
|
||||||
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
||||||
## --------------------------------------------------------------------------- ##
|
## --------------------------------------------------------------------------- ##
|
||||||
|
|||||||
@@ -14,37 +14,37 @@ error_reporting(E_ALL ^ E_NOTICE);
|
|||||||
|
|
||||||
$id = $_GET['uid'];
|
$id = $_GET['uid'];
|
||||||
if(isset($id))
|
if(isset($id))
|
||||||
{
|
{
|
||||||
$user = $database->getUserArray($id,1);
|
$user = $database->getUserArray($id,1);
|
||||||
$varray = $database->getProfileVillages($id);
|
$varray = $database->getProfileVillages($id);
|
||||||
$varmedal = $database->getProfileMedal($id); ?>
|
$varmedal = $database->getProfileMedal($id); ?>
|
||||||
|
|
||||||
<link href="../<?php echo GP_LOCATE; ?>lang/en/compact.css?f4b7c" rel="stylesheet" type="text/css">
|
<link href="../<?php echo GP_LOCATE; ?>lang/en/compact.css?f4b7c" rel="stylesheet" type="text/css">
|
||||||
<style type="text/css">
|
<style type="text/css">
|
||||||
input.dynamic_img, img.dynamic_img
|
input.dynamic_img, img.dynamic_img
|
||||||
{
|
{
|
||||||
background-position: center top;
|
background-position: center top;
|
||||||
height: 20px;
|
height: 20px;
|
||||||
}
|
}
|
||||||
input#btn_send
|
input#btn_send
|
||||||
{
|
{
|
||||||
width: 97px;
|
width: 97px;
|
||||||
background-image: url(../<?php echo GP_LOCATE; ?>lang/en/b/send.gif);
|
background-image: url(../<?php echo GP_LOCATE; ?>lang/en/b/send.gif);
|
||||||
}
|
}
|
||||||
div.messages div#write_content #heading input
|
div.messages div#write_content #heading input
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<h4>Compose New Message to <a href="admin.php?p=player&uid=<?php echo $user['id'] ?>"><?php echo $user['username']; ?></a></h4>
|
<h4>Compose New Message to <a href="admin.php?p=player&uid=<?php echo $user['id'] ?>"><?php echo $user['username']; ?></a></h4>
|
||||||
|
|
||||||
<form method="post" action="../Admin/Mods/sendMessage.php" accept-charset="UTF-8" name="msg">
|
<form method="post" action="../Admin/Mods/sendMessage.php" accept-charset="UTF-8" name="msg">
|
||||||
<div id="content" class="messages">
|
<div id="content" class="messages">
|
||||||
<div id="read_head" class="msg_head"></div>
|
<div id="read_head" class="msg_head"></div>
|
||||||
<div id="read_content" class="msg_content">
|
<div id="read_content" class="msg_content">
|
||||||
<img src="../../<?php echo GP_LOCATE; ?>lang/en/msg/block_bg24b.gif" id="label" class="read" alt="">
|
<img src="../../<?php echo GP_LOCATE; ?>lang/en/msg/block_bg24b.gif" id="label" class="read" alt="">
|
||||||
|
|
||||||
<div id="heading">
|
<div id="heading">
|
||||||
<input type="hidden" name="uid" value="<?php echo $id; ?>">
|
<input type="hidden" name="uid" value="<?php echo $id; ?>">
|
||||||
<div><a href="admin.php?p=player&uid=<?php echo $user['id']; ?>"><?php echo $user['username']; ?></a></div>
|
<div><a href="admin.php?p=player&uid=<?php echo $user['id']; ?>"><?php echo $user['username']; ?></a></div>
|
||||||
@@ -53,8 +53,8 @@ if(isset($id))
|
|||||||
<div id="time">
|
<div id="time">
|
||||||
<div><?php echo date('d.m.y'); ?></div>
|
<div><?php echo date('d.m.y'); ?></div>
|
||||||
<div><?php echo date('H:i:s'); ?></div>
|
<div><?php echo date('H:i:s'); ?></div>
|
||||||
</div>
|
</div>
|
||||||
<div class="clear"></div>
|
<div class="clear"></div>
|
||||||
<div class="line"></div>
|
<div class="line"></div>
|
||||||
<div class="message" style="margin-top: 10px;">
|
<div class="message" style="margin-top: 10px;">
|
||||||
<textarea id="message" name="message" style="background-image: url('../<?php echo GP_LOCATE; ?>img/msg/underline.gif'); background-repeat: repeat; font-size: 12px; border: medium none; height: 258px; line-height: 16px; width: 412px; font-family: Verdana,Arial,Helvetica,sans-serif;">Message Here</textarea>
|
<textarea id="message" name="message" style="background-image: url('../<?php echo GP_LOCATE; ?>img/msg/underline.gif'); background-repeat: repeat; font-size: 12px; border: medium none; height: 258px; line-height: 16px; width: 412px; font-family: Verdana,Arial,Helvetica,sans-serif;">Message Here</textarea>
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
<?php
|
<?php
|
||||||
#################################################################################
|
#################################################################################
|
||||||
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
||||||
## --------------------------------------------------------------------------- ##
|
## --------------------------------------------------------------------------- ##
|
||||||
@@ -12,10 +12,10 @@
|
|||||||
error_reporting(0);
|
error_reporting(0);
|
||||||
?>
|
?>
|
||||||
<style>
|
<style>
|
||||||
.del {width:12px; height:12px; background-image: url(img/admin/icon/del.gif);}
|
.del {width:12px; height:12px; background-image: url(img/admin/icon/del.gif);}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<table id="member">
|
<table id="member">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th colspan="7">Inactive users</th>
|
<th colspan="7">Inactive users</th>
|
||||||
@@ -33,10 +33,10 @@ error_reporting(0);
|
|||||||
<tbody>
|
<tbody>
|
||||||
<?php
|
<?php
|
||||||
$inactivei = time() - 86400;
|
$inactivei = time() - 86400;
|
||||||
$q = "SELECT * FROM ".TB_PREFIX."users where timestamp < $inactivei AND access=2";
|
$q = "SELECT * FROM ".TB_PREFIX."users where timestamp < $inactivei AND access=2";
|
||||||
$result = mysql_query($q);
|
$result = mysql_query($q);
|
||||||
$active = mysql_fetch_assoc($result);
|
$active = mysql_fetch_assoc($result);
|
||||||
|
|
||||||
for ($i = 0; $i <= count($active)-1; $i++)
|
for ($i = 0; $i <= count($active)-1; $i++)
|
||||||
{
|
{
|
||||||
$uid = $database->getUserField($active[$i]['username'],'id',1);
|
$uid = $database->getUserField($active[$i]['username'],'id',1);
|
||||||
@@ -70,8 +70,8 @@ error_reporting(0);
|
|||||||
<td>".count($varray)."</td>
|
<td>".count($varray)."</td>
|
||||||
<td><img src=\"../img/admin/gold.gif\" class=\"gold\" alt=\"Gold\" title=\"This user has: ".$active[$i]['gold']." gold\"/> ".$active[$i]['gold']."</td>
|
<td><img src=\"../img/admin/gold.gif\" class=\"gold\" alt=\"Gold\" title=\"This user has: ".$active[$i]['gold']." gold\"/> ".$active[$i]['gold']."</td>
|
||||||
<td><img src=\"../<?php echo GP_LOCATE; ?>img/a/online1.gif\"></td>
|
<td><img src=\"../<?php echo GP_LOCATE; ?>img/a/online1.gif\"></td>
|
||||||
</tr>";
|
</tr>";
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
+171
-171
@@ -1,11 +1,11 @@
|
|||||||
<?php
|
<?php
|
||||||
#################################################################################
|
#################################################################################
|
||||||
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
||||||
## --------------------------------------------------------------------------- ##
|
## --------------------------------------------------------------------------- ##
|
||||||
## Filename addTroops.tpl ##
|
## Filename addTroops.tpl ##
|
||||||
## Developed by: Dzoki & Advocatie ##
|
## Developed by: Dzoki & Advocatie ##
|
||||||
## License: TravianX Project ##
|
## License: TravianX Project ##
|
||||||
## Thanks to: Dzoki & itay2277(Edit troops) ##
|
## Thanks to: Dzoki & itay2277(Edit troops) ##
|
||||||
## Copyright: TravianX (c) 2010-2011. All rights reserved. ##
|
## Copyright: TravianX (c) 2010-2011. All rights reserved. ##
|
||||||
## ##
|
## ##
|
||||||
#################################################################################
|
#################################################################################
|
||||||
@@ -16,10 +16,10 @@ if($_SESSION['access'] < ADMIN) die("Access Denied: You are not Admin!");
|
|||||||
$id = $_GET['did'];
|
$id = $_GET['did'];
|
||||||
if(isset($id))
|
if(isset($id))
|
||||||
{
|
{
|
||||||
$village = $database->getVillage($id);
|
$village = $database->getVillage($id);
|
||||||
$user = $database->getUserArray($village['owner'],1);
|
$user = $database->getUserArray($village['owner'],1);
|
||||||
$coor = $database->getCoor($village['wref']);
|
$coor = $database->getCoor($village['wref']);
|
||||||
$varray = $database->getProfileVillages($village['owner']);
|
$varray = $database->getProfileVillages($village['owner']);
|
||||||
$type = $database->getVillageType($village['wref']);
|
$type = $database->getVillageType($village['wref']);
|
||||||
$fdata = $database->getResourceLevel($village['wref']);
|
$fdata = $database->getResourceLevel($village['wref']);
|
||||||
$units = $database->getUnit($village['wref']); ?>
|
$units = $database->getUnit($village['wref']); ?>
|
||||||
@@ -27,269 +27,269 @@ if(isset($id))
|
|||||||
<input type="hidden" name="id" id="id" value="<?php echo $id; ?>">
|
<input type="hidden" name="id" id="id" value="<?php echo $id; ?>">
|
||||||
<input type="hidden" name="admid" id="admid" value="<?php echo $_SESSION['id']; ?>">
|
<input type="hidden" name="admid" id="admid" value="<?php echo $_SESSION['id']; ?>">
|
||||||
<table id="member">
|
<table id="member">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th colspan="2">Edit troops</th>
|
<th colspan="2">Edit troops</th>
|
||||||
<?php if($user['tribe'] == 1){ ?>
|
<?php if($user['tribe'] == 1){ ?>
|
||||||
</tr></thead><tbody>
|
</tr></thead><tbody>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="addTroops"><img src="../img/un/u/1.gif"></img> <?php echo U1; ?></td>
|
<td class="addTroops"><img src="../img/un/u/1.gif"></img> <?php echo U1; ?></td>
|
||||||
<td class="addTroops"><input class="addTroops" name="u1" id="u1" value="<?php echo $units['u1']; ?>" maxlength="10"> <font color="#bcbcbc" size="1">Currently: <b><?php echo $units['u1']; ?></b><font></td>
|
<td class="addTroops"><input class="addTroops" name="u1" id="u1" value="<?php echo $units['u1']; ?>" maxlength="10"> <font color="#bcbcbc" size="1">Currently: <b><?php echo $units['u1']; ?></b><font></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td><img src="../img/un/u/2.gif"></img> <?php echo U2; ?></td>
|
<td><img src="../img/un/u/2.gif"></img> <?php echo U2; ?></td>
|
||||||
<td><input class="addTroops" name="u2" id="u2" value="<?php echo $units['u2']; ?>" maxlength="10"> <font color="#bcbcbc" size="1">Currently: <b><?php echo $units['u2']; ?></b><font></td>
|
<td><input class="addTroops" name="u2" id="u2" value="<?php echo $units['u2']; ?>" maxlength="10"> <font color="#bcbcbc" size="1">Currently: <b><?php echo $units['u2']; ?></b><font></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td><img src="../img/un/u/3.gif"></img> <?php echo U3; ?></td>
|
<td><img src="../img/un/u/3.gif"></img> <?php echo U3; ?></td>
|
||||||
<td><input class="addTroops" name="u3" id="u3" value="<?php echo $units['u3']; ?>" maxlength="10"> <font color="#bcbcbc" size="1">Currently: <b><?php echo $units['u3']; ?></b><font></td>
|
<td><input class="addTroops" name="u3" id="u3" value="<?php echo $units['u3']; ?>" maxlength="10"> <font color="#bcbcbc" size="1">Currently: <b><?php echo $units['u3']; ?></b><font></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td><img src="../img/un/u/4.gif"></img> <?php echo U4; ?></td>
|
<td><img src="../img/un/u/4.gif"></img> <?php echo U4; ?></td>
|
||||||
<td><input class="addTroops" name="u4" id="u4" value="<?php echo $units['u4']; ?>" maxlength="10"> <font color="#bcbcbc" size="1">Currently: <b><?php echo $units['u4']; ?></b><font></td>
|
<td><input class="addTroops" name="u4" id="u4" value="<?php echo $units['u4']; ?>" maxlength="10"> <font color="#bcbcbc" size="1">Currently: <b><?php echo $units['u4']; ?></b><font></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td><img src="../img/un/u/5.gif"></img> <?php echo U5; ?></td>
|
<td><img src="../img/un/u/5.gif"></img> <?php echo U5; ?></td>
|
||||||
<td><input class="addTroops" name="u5" id="u5" value="<?php echo $units['u5']; ?>" maxlength="10"> <font color="#bcbcbc" size="1">Currently: <b><?php echo $units['u5']; ?></b><font></td>
|
<td><input class="addTroops" name="u5" id="u5" value="<?php echo $units['u5']; ?>" maxlength="10"> <font color="#bcbcbc" size="1">Currently: <b><?php echo $units['u5']; ?></b><font></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td><img src="../img/un/u/6.gif"></img> <?php echo U6; ?></td>
|
<td><img src="../img/un/u/6.gif"></img> <?php echo U6; ?></td>
|
||||||
<td><input class="addTroops" name="u6" id="u6" value="<?php echo $units['u6']; ?>" maxlength="10"> <font color="#bcbcbc" size="1">Currently: <b><?php echo $units['u6']; ?></b><font></td>
|
<td><input class="addTroops" name="u6" id="u6" value="<?php echo $units['u6']; ?>" maxlength="10"> <font color="#bcbcbc" size="1">Currently: <b><?php echo $units['u6']; ?></b><font></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td><img src="../img/un/u/7.gif"></img> <?php echo U7; ?></td>
|
<td><img src="../img/un/u/7.gif"></img> <?php echo U7; ?></td>
|
||||||
<td><input class="addTroops" name="u7" id="u7" value="<?php echo $units['u7']; ?>" maxlength="10"> <font color="#bcbcbc" size="1">Currently: <b><?php echo $units['u7']; ?></b><font></td>
|
<td><input class="addTroops" name="u7" id="u7" value="<?php echo $units['u7']; ?>" maxlength="10"> <font color="#bcbcbc" size="1">Currently: <b><?php echo $units['u7']; ?></b><font></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td><img src="../img/un/u/8.gif"></img> <?php echo U8; ?></td>
|
<td><img src="../img/un/u/8.gif"></img> <?php echo U8; ?></td>
|
||||||
<td><input class="addTroops" name="u8" id="u8" value="<?php echo $units['u8']; ?>" maxlength="10"> <font color="#bcbcbc" size="1">Currently: <b><?php echo $units['u8']; ?></b><font></td>
|
<td><input class="addTroops" name="u8" id="u8" value="<?php echo $units['u8']; ?>" maxlength="10"> <font color="#bcbcbc" size="1">Currently: <b><?php echo $units['u8']; ?></b><font></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td><img src="../img/un/u/9.gif"></img> <?php echo U9; ?></td>
|
<td><img src="../img/un/u/9.gif"></img> <?php echo U9; ?></td>
|
||||||
<td><input class="addTroops" name="u9" id="u9" value="<?php echo $units['u9']; ?>" maxlength="10"> <font color="#bcbcbc" size="1">Currently: <b><?php echo $units['u9']; ?></b><font></td>
|
<td><input class="addTroops" name="u9" id="u9" value="<?php echo $units['u9']; ?>" maxlength="10"> <font color="#bcbcbc" size="1">Currently: <b><?php echo $units['u9']; ?></b><font></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td><img src="../img/un/u/10.gif"></img> <?php echo U10; ?></td>
|
<td><img src="../img/un/u/10.gif"></img> <?php echo U10; ?></td>
|
||||||
<td><input class="addTroops" name="u10" id="u10" value="<?php echo $units['u10']; ?>" maxlength="10"> <font color="#bcbcbc" size="1">Currently: <b><?php echo $units['u10']; ?></b><font></td>
|
<td><input class="addTroops" name="u10" id="u10" value="<?php echo $units['u10']; ?>" maxlength="10"> <font color="#bcbcbc" size="1">Currently: <b><?php echo $units['u10']; ?></b><font></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<?php }
|
<?php }
|
||||||
else if($user['tribe'] == 2){ ?>
|
else if($user['tribe'] == 2){ ?>
|
||||||
</tr></thead><tbody>
|
</tr></thead><tbody>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="addTroops"><img src="../img/un/u/11.gif"></img> <?php echo U11; ?></td>
|
<td class="addTroops"><img src="../img/un/u/11.gif"></img> <?php echo U11; ?></td>
|
||||||
<td class="addTroops"><input class="addTroops" name="u11" id="u11" value="<?php echo $units['u11']; ?>" maxlength="10"> <font color="#bcbcbc" size="1">Currently: <b><?php echo $units['u11']; ?></td>
|
<td class="addTroops"><input class="addTroops" name="u11" id="u11" value="<?php echo $units['u11']; ?>" maxlength="10"> <font color="#bcbcbc" size="1">Currently: <b><?php echo $units['u11']; ?></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td><img src="../img/un/u/12.gif"></img> <?php echo U12; ?></td>
|
<td><img src="../img/un/u/12.gif"></img> <?php echo U12; ?></td>
|
||||||
<td><input class="addTroops" name="u12" id="u12" value="<?php echo $units['u12']; ?>" maxlength="10"> <font color="#bcbcbc" size="1">Currently: <b><?php echo $units['u12']; ?></td>
|
<td><input class="addTroops" name="u12" id="u12" value="<?php echo $units['u12']; ?>" maxlength="10"> <font color="#bcbcbc" size="1">Currently: <b><?php echo $units['u12']; ?></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td><img src="../img/un/u/13.gif"></img> <?php echo U13; ?></td>
|
<td><img src="../img/un/u/13.gif"></img> <?php echo U13; ?></td>
|
||||||
<td><input class="addTroops" name="u13" id="u13" value="<?php echo $units['u13']; ?>" maxlength="10"> <font color="#bcbcbc" size="1">Currently: <b><?php echo $units['u13']; ?></td>
|
<td><input class="addTroops" name="u13" id="u13" value="<?php echo $units['u13']; ?>" maxlength="10"> <font color="#bcbcbc" size="1">Currently: <b><?php echo $units['u13']; ?></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td><img src="../img/un/u/14.gif"></img> <?php echo U14; ?></td>
|
<td><img src="../img/un/u/14.gif"></img> <?php echo U14; ?></td>
|
||||||
<td><input class="addTroops" name="u14" id="u14" value="<?php echo $units['u14']; ?>" maxlength="10"> <font color="#bcbcbc" size="1">Currently: <b><?php echo $units['u14']; ?></td>
|
<td><input class="addTroops" name="u14" id="u14" value="<?php echo $units['u14']; ?>" maxlength="10"> <font color="#bcbcbc" size="1">Currently: <b><?php echo $units['u14']; ?></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td><img src="../img/un/u/15.gif"></img> <?php echo U15; ?></td>
|
<td><img src="../img/un/u/15.gif"></img> <?php echo U15; ?></td>
|
||||||
<td><input class="addTroops" name="u15" id="u15" value="<?php echo $units['u15']; ?>" maxlength="10"> <font color="#bcbcbc" size="1">Currently: <b><?php echo $units['u15']; ?></td>
|
<td><input class="addTroops" name="u15" id="u15" value="<?php echo $units['u15']; ?>" maxlength="10"> <font color="#bcbcbc" size="1">Currently: <b><?php echo $units['u15']; ?></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td><img src="../img/un/u/16.gif"></img> <?php echo U16; ?></td>
|
<td><img src="../img/un/u/16.gif"></img> <?php echo U16; ?></td>
|
||||||
<td><input class="addTroops" name="u16" id="u16" value="<?php echo $units['u16']; ?>" maxlength="10"> <font color="#bcbcbc" size="1">Currently: <b><?php echo $units['u16']; ?></td>
|
<td><input class="addTroops" name="u16" id="u16" value="<?php echo $units['u16']; ?>" maxlength="10"> <font color="#bcbcbc" size="1">Currently: <b><?php echo $units['u16']; ?></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td><img src="../img/un/u/17.gif"></img> <?php echo U17; ?></td>
|
<td><img src="../img/un/u/17.gif"></img> <?php echo U17; ?></td>
|
||||||
<td><input class="addTroops" name="u17" id="u17" value="<?php echo $units['u17']; ?>" maxlength="10"> <font color="#bcbcbc" size="1">Currently: <b><?php echo $units['u17']; ?></td>
|
<td><input class="addTroops" name="u17" id="u17" value="<?php echo $units['u17']; ?>" maxlength="10"> <font color="#bcbcbc" size="1">Currently: <b><?php echo $units['u17']; ?></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td><img src="../img/un/u/18.gif"></img> <?php echo U18; ?></td>
|
<td><img src="../img/un/u/18.gif"></img> <?php echo U18; ?></td>
|
||||||
<td><input class="addTroops" name="u18" id="u18" value="<?php echo $units['u18']; ?>" maxlength="10"> <font color="#bcbcbc" size="1">Currently: <b><?php echo $units['u18']; ?></td>
|
<td><input class="addTroops" name="u18" id="u18" value="<?php echo $units['u18']; ?>" maxlength="10"> <font color="#bcbcbc" size="1">Currently: <b><?php echo $units['u18']; ?></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td><img src="../img/un/u/19.gif"></img> <?php echo U19; ?></td>
|
<td><img src="../img/un/u/19.gif"></img> <?php echo U19; ?></td>
|
||||||
<td><input class="addTroops" name="u19" id="u19" value="<?php echo $units['u19']; ?>" maxlength="10"> <font color="#bcbcbc" size="1">Currently: <b><?php echo $units['u19']; ?></td>
|
<td><input class="addTroops" name="u19" id="u19" value="<?php echo $units['u19']; ?>" maxlength="10"> <font color="#bcbcbc" size="1">Currently: <b><?php echo $units['u19']; ?></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td><img src="../img/un/u/20.gif"></img> <?php echo U20; ?></td>
|
<td><img src="../img/un/u/20.gif"></img> <?php echo U20; ?></td>
|
||||||
<td><input class="addTroops" name="u20" id="u20" value="<?php echo $units['u20']; ?>" maxlength="10"> <font color="#bcbcbc" size="1">Currently: <b><?php echo $units['u20']; ?></td>
|
<td><input class="addTroops" name="u20" id="u20" value="<?php echo $units['u20']; ?>" maxlength="10"> <font color="#bcbcbc" size="1">Currently: <b><?php echo $units['u20']; ?></td>
|
||||||
</tr>
|
</tr>
|
||||||
<?php }
|
<?php }
|
||||||
else if($user['tribe'] == 3){ ?>
|
else if($user['tribe'] == 3){ ?>
|
||||||
</tr></thead><tbody>
|
</tr></thead><tbody>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="addTroops"><img src="../img/un/u/21.gif"></img> <?php echo U21; ?></td>
|
<td class="addTroops"><img src="../img/un/u/21.gif"></img> <?php echo U21; ?></td>
|
||||||
<td class="addTroops"><input class="addTroops" name="u21" id="u21" value="<?php echo $units['u21']; ?>" maxlength="10"> <font color="#bcbcbc" size="1">Currently: <b><?php echo $units['u21']; ?></td>
|
<td class="addTroops"><input class="addTroops" name="u21" id="u21" value="<?php echo $units['u21']; ?>" maxlength="10"> <font color="#bcbcbc" size="1">Currently: <b><?php echo $units['u21']; ?></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td><img src="../img/un/u/22.gif"></img> <?php echo U22; ?></td>
|
<td><img src="../img/un/u/22.gif"></img> <?php echo U22; ?></td>
|
||||||
<td><input class="addTroops" name="u22" id="u22" value="<?php echo $units['u22']; ?>" maxlength="10"> <font color="#bcbcbc" size="1">Currently: <b><?php echo $units['u22']; ?></td>
|
<td><input class="addTroops" name="u22" id="u22" value="<?php echo $units['u22']; ?>" maxlength="10"> <font color="#bcbcbc" size="1">Currently: <b><?php echo $units['u22']; ?></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td><img src="../img/un/u/23.gif"></img> <?php echo U23; ?></td>
|
<td><img src="../img/un/u/23.gif"></img> <?php echo U23; ?></td>
|
||||||
<td><input class="addTroops" name="u23" id="u23" value="<?php echo $units['u23']; ?>" maxlength="10"> <font color="#bcbcbc" size="1">Currently: <b><?php echo $units['u23']; ?></td>
|
<td><input class="addTroops" name="u23" id="u23" value="<?php echo $units['u23']; ?>" maxlength="10"> <font color="#bcbcbc" size="1">Currently: <b><?php echo $units['u23']; ?></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td><img src="../img/un/u/24.gif"></img> <?php echo U24; ?></td>
|
<td><img src="../img/un/u/24.gif"></img> <?php echo U24; ?></td>
|
||||||
<td><input class="addTroops" name="u24" id="u24" value="<?php echo $units['u24']; ?>" maxlength="10"> <font color="#bcbcbc" size="1">Currently: <b><?php echo $units['u24']; ?></td>
|
<td><input class="addTroops" name="u24" id="u24" value="<?php echo $units['u24']; ?>" maxlength="10"> <font color="#bcbcbc" size="1">Currently: <b><?php echo $units['u24']; ?></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td><img src="../img/un/u/25.gif"></img> <?php echo U25; ?></td>
|
<td><img src="../img/un/u/25.gif"></img> <?php echo U25; ?></td>
|
||||||
<td><input class="addTroops" name="u25" id="u25" value="<?php echo $units['u25']; ?>" maxlength="10"> <font color="#bcbcbc" size="1">Currently: <b><?php echo $units['u25']; ?></td>
|
<td><input class="addTroops" name="u25" id="u25" value="<?php echo $units['u25']; ?>" maxlength="10"> <font color="#bcbcbc" size="1">Currently: <b><?php echo $units['u25']; ?></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td><img src="../img/un/u/26.gif"></img> <?php echo U26; ?></td>
|
<td><img src="../img/un/u/26.gif"></img> <?php echo U26; ?></td>
|
||||||
<td><input class="addTroops" name="u26" id="u26" value="<?php echo $units['u26']; ?>" maxlength="10"> <font color="#bcbcbc" size="1">Currently: <b><?php echo $units['u26']; ?></td>
|
<td><input class="addTroops" name="u26" id="u26" value="<?php echo $units['u26']; ?>" maxlength="10"> <font color="#bcbcbc" size="1">Currently: <b><?php echo $units['u26']; ?></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td><img src="../img/un/u/27.gif"></img> <?php echo U27; ?></td>
|
<td><img src="../img/un/u/27.gif"></img> <?php echo U27; ?></td>
|
||||||
<td><input class="addTroops" name="u27" id="u27" value="<?php echo $units['u27']; ?>" maxlength="10"> <font color="#bcbcbc" size="1">Currently: <b><?php echo $units['u27']; ?></td>
|
<td><input class="addTroops" name="u27" id="u27" value="<?php echo $units['u27']; ?>" maxlength="10"> <font color="#bcbcbc" size="1">Currently: <b><?php echo $units['u27']; ?></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td><img src="../img/un/u/28.gif"></img> <?php echo U28; ?></td>
|
<td><img src="../img/un/u/28.gif"></img> <?php echo U28; ?></td>
|
||||||
<td><input class="addTroops" name="u28" id="u28" value="<?php echo $units['u28']; ?>" maxlength="10"> <font color="#bcbcbc" size="1">Currently: <b><?php echo $units['u28']; ?></td>
|
<td><input class="addTroops" name="u28" id="u28" value="<?php echo $units['u28']; ?>" maxlength="10"> <font color="#bcbcbc" size="1">Currently: <b><?php echo $units['u28']; ?></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td><img src="../img/un/u/29.gif"></img> <?php echo U29; ?></td>
|
<td><img src="../img/un/u/29.gif"></img> <?php echo U29; ?></td>
|
||||||
<td><input class="addTroops" name="u29" id="u29" value="<?php echo $units['u29']; ?>"" maxlength="10"> <font color="#bcbcbc" size="1">Currently: <b><?php echo $units['u29']; ?></td>
|
<td><input class="addTroops" name="u29" id="u29" value="<?php echo $units['u29']; ?>"" maxlength="10"> <font color="#bcbcbc" size="1">Currently: <b><?php echo $units['u29']; ?></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td><img src="../img/un/u/30.gif"></img> <?php echo U30; ?></td>
|
<td><img src="../img/un/u/30.gif"></img> <?php echo U30; ?></td>
|
||||||
<td><input class="addTroops" name="u30" id="u30" value="<?php echo $units['u30']; ?>" maxlength="10"> <font color="#bcbcbc" size="1">Currently: <b><?php echo $units['u30']; ?></td>
|
<td><input class="addTroops" name="u30" id="u30" value="<?php echo $units['u30']; ?>" maxlength="10"> <font color="#bcbcbc" size="1">Currently: <b><?php echo $units['u30']; ?></td>
|
||||||
</tr>
|
</tr>
|
||||||
<?php }
|
<?php }
|
||||||
else if($user['tribe'] == 4){ ?>
|
else if($user['tribe'] == 4){ ?>
|
||||||
</tr></thead><tbody>
|
</tr></thead><tbody>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="addTroops"><img src="../<?php echo GP_LOCATE; ?>img/u/31.gif"></img> <?php echo U31; ?></td>
|
<td class="addTroops"><img src="../<?php echo GP_LOCATE; ?>img/u/31.gif"></img> <?php echo U31; ?></td>
|
||||||
<td class="addTroops"><input class="addTroops" name="u31" id="u31" value="<?php echo $units['u31']; ?>" maxlength="10"> <font color="#bcbcbc" size="1">Currently: <b><?php echo $units['u31']; ?></td>
|
<td class="addTroops"><input class="addTroops" name="u31" id="u31" value="<?php echo $units['u31']; ?>" maxlength="10"> <font color="#bcbcbc" size="1">Currently: <b><?php echo $units['u31']; ?></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td class="addTroops"><img src="../<?php echo GP_LOCATE; ?>img/u/32.gif"></img> <?php echo U32; ?></td>
|
<td class="addTroops"><img src="../<?php echo GP_LOCATE; ?>img/u/32.gif"></img> <?php echo U32; ?></td>
|
||||||
<td><input class="addTroops" name="u32" id="u32" value="<?php echo $units['u32']; ?>" maxlength="10"> <font color="#bcbcbc" size="1">Currently: <b><?php echo $units['u32']; ?></td>
|
<td><input class="addTroops" name="u32" id="u32" value="<?php echo $units['u32']; ?>" maxlength="10"> <font color="#bcbcbc" size="1">Currently: <b><?php echo $units['u32']; ?></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td class="addTroops"><img src="../<?php echo GP_LOCATE; ?>img/u/33.gif"></img> <?php echo U33; ?></td>
|
<td class="addTroops"><img src="../<?php echo GP_LOCATE; ?>img/u/33.gif"></img> <?php echo U33; ?></td>
|
||||||
<td><input class="addTroops" name="u33" id="u33" value="<?php echo $units['u33']; ?>" maxlength="10"> <font color="#bcbcbc" size="1">Currently: <b><?php echo $units['u33']; ?></td>
|
<td><input class="addTroops" name="u33" id="u33" value="<?php echo $units['u33']; ?>" maxlength="10"> <font color="#bcbcbc" size="1">Currently: <b><?php echo $units['u33']; ?></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td class="addTroops"><img src="../<?php echo GP_LOCATE; ?>img/u/34.gif"></img> <?php echo U34; ?></td>
|
<td class="addTroops"><img src="../<?php echo GP_LOCATE; ?>img/u/34.gif"></img> <?php echo U34; ?></td>
|
||||||
<td><input class="addTroops" name="u34" id="u34" value="<?php echo $units['u34']; ?>" maxlength="10"> <font color="#bcbcbc" size="1">Currently: <b><?php echo $units['u34']; ?></td>
|
<td><input class="addTroops" name="u34" id="u34" value="<?php echo $units['u34']; ?>" maxlength="10"> <font color="#bcbcbc" size="1">Currently: <b><?php echo $units['u34']; ?></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td class="addTroops"><img src="../<?php echo GP_LOCATE; ?>img/u/35.gif"></img> <?php echo U35; ?></td>
|
<td class="addTroops"><img src="../<?php echo GP_LOCATE; ?>img/u/35.gif"></img> <?php echo U35; ?></td>
|
||||||
<td><input class="addTroops" name="u35" id="u35" value="<?php echo $units['u35']; ?>" maxlength="10"> <font color="#bcbcbc" size="1">Currently: <b><?php echo $units['u35']; ?></td>
|
<td><input class="addTroops" name="u35" id="u35" value="<?php echo $units['u35']; ?>" maxlength="10"> <font color="#bcbcbc" size="1">Currently: <b><?php echo $units['u35']; ?></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td class="addTroops"><img src="../<?php echo GP_LOCATE; ?>img/u/36.gif"></img> <?php echo U36; ?></td>
|
<td class="addTroops"><img src="../<?php echo GP_LOCATE; ?>img/u/36.gif"></img> <?php echo U36; ?></td>
|
||||||
<td><input class="addTroops" name="u36" id="u36" value="<?php echo $units['u36']; ?>" maxlength="10"> <font color="#bcbcbc" size="1">Currently: <b><?php echo $units['u36']; ?></td>
|
<td><input class="addTroops" name="u36" id="u36" value="<?php echo $units['u36']; ?>" maxlength="10"> <font color="#bcbcbc" size="1">Currently: <b><?php echo $units['u36']; ?></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td class="addTroops"><img src="../<?php echo GP_LOCATE; ?>img/u/37.gif"></img> <?php echo U37; ?></td>
|
<td class="addTroops"><img src="../<?php echo GP_LOCATE; ?>img/u/37.gif"></img> <?php echo U37; ?></td>
|
||||||
<td><input class="addTroops" name="u37" id="u37" value="<?php echo $units['u37']; ?>" maxlength="10"> <font color="#bcbcbc" size="1">Currently: <b><?php echo $units['u37']; ?></td>
|
<td><input class="addTroops" name="u37" id="u37" value="<?php echo $units['u37']; ?>" maxlength="10"> <font color="#bcbcbc" size="1">Currently: <b><?php echo $units['u37']; ?></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="addTroops"><img src="../<?php echo GP_LOCATE; ?>img/u/38.gif"></img> <?php echo U38; ?></td>
|
<td class="addTroops"><img src="../<?php echo GP_LOCATE; ?>img/u/38.gif"></img> <?php echo U38; ?></td>
|
||||||
<td><input class="addTroops" name="u38" id="u38" value="<?php echo $units['u38']; ?>" maxlength="10"> <font color="#bcbcbc" size="1">Currently: <b><?php echo $units['u38']; ?></td>
|
<td><input class="addTroops" name="u38" id="u38" value="<?php echo $units['u38']; ?>" maxlength="10"> <font color="#bcbcbc" size="1">Currently: <b><?php echo $units['u38']; ?></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td class="addTroops"><img src="../<?php echo GP_LOCATE; ?>img/u/39.gif"></img> <?php echo U39; ?></td>
|
<td class="addTroops"><img src="../<?php echo GP_LOCATE; ?>img/u/39.gif"></img> <?php echo U39; ?></td>
|
||||||
<td><input class="addTroops" name="u39" id="u39" value="<?php echo $units['u39']; ?>" maxlength="10"> <font color="#bcbcbc" size="1">Currently: <b><?php echo $units['u39']; ?></td>
|
<td><input class="addTroops" name="u39" id="u39" value="<?php echo $units['u39']; ?>" maxlength="10"> <font color="#bcbcbc" size="1">Currently: <b><?php echo $units['u39']; ?></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td class="addTroops"><img src="../<?php echo GP_LOCATE; ?>img/u/40.gif"></img> <?php echo U40; ?></td>
|
<td class="addTroops"><img src="../<?php echo GP_LOCATE; ?>img/u/40.gif"></img> <?php echo U40; ?></td>
|
||||||
<td><input class="addTroops" name="u40" id="u40" value="<?php echo $units['u40']; ?>" maxlength="10"> <font color="#bcbcbc" size="1">Currently: <b><?php echo $units['u40']; ?></td>
|
<td><input class="addTroops" name="u40" id="u40" value="<?php echo $units['u40']; ?>" maxlength="10"> <font color="#bcbcbc" size="1">Currently: <b><?php echo $units['u40']; ?></td>
|
||||||
</tr>
|
</tr>
|
||||||
<?php }
|
<?php }
|
||||||
else if($user['tribe'] == 5){ ?>
|
else if($user['tribe'] == 5){ ?>
|
||||||
</tr></thead><tbody>
|
</tr></thead><tbody>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="addTroops"><img src="../<?php echo GP_LOCATE; ?>img/u/41.gif"></img> <?php echo U41; ?></td>
|
<td class="addTroops"><img src="../<?php echo GP_LOCATE; ?>img/u/41.gif"></img> <?php echo U41; ?></td>
|
||||||
<td class="addTroops"><input class="addTroops" name="u41" id="u41" value="<?php echo $units['u41']; ?>" maxlength="10"> <font color="#bcbcbc" size="1">Currently: <b><?php echo $units['u41']; ?></td>
|
<td class="addTroops"><input class="addTroops" name="u41" id="u41" value="<?php echo $units['u41']; ?>" maxlength="10"> <font color="#bcbcbc" size="1">Currently: <b><?php echo $units['u41']; ?></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td class="addTroops"><img src="../<?php echo GP_LOCATE; ?>img/u/42.gif"></img> <?php echo U42; ?></td>
|
<td class="addTroops"><img src="../<?php echo GP_LOCATE; ?>img/u/42.gif"></img> <?php echo U42; ?></td>
|
||||||
<td><input class="addTroops" name="u42" id="u42" value="<?php echo $units['u42']; ?>" maxlength="10"> <font color="#bcbcbc" size="1">Currently: <b><?php echo $units['u42']; ?></td>
|
<td><input class="addTroops" name="u42" id="u42" value="<?php echo $units['u42']; ?>" maxlength="10"> <font color="#bcbcbc" size="1">Currently: <b><?php echo $units['u42']; ?></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td class="addTroops"><img src="../<?php echo GP_LOCATE; ?>img/u/43.gif"></img> <?php echo U43; ?></td>
|
<td class="addTroops"><img src="../<?php echo GP_LOCATE; ?>img/u/43.gif"></img> <?php echo U43; ?></td>
|
||||||
<td><input class="addTroops" name="u43" id="u43" value="<?php echo $units['u43']; ?>" maxlength="10"> <font color="#bcbcbc" size="1">Currently: <b><?php echo $units['u43']; ?></td>
|
<td><input class="addTroops" name="u43" id="u43" value="<?php echo $units['u43']; ?>" maxlength="10"> <font color="#bcbcbc" size="1">Currently: <b><?php echo $units['u43']; ?></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td class="addTroops"><img src="../<?php echo GP_LOCATE; ?>img/u/44.gif"></img> <?php echo U44; ?></td>
|
<td class="addTroops"><img src="../<?php echo GP_LOCATE; ?>img/u/44.gif"></img> <?php echo U44; ?></td>
|
||||||
<td><input class="addTroops" name="u44" id="u44" value="<?php echo $units['u44']; ?>" maxlength="10"> <font color="#bcbcbc" size="1">Currently: <b><?php echo $units['u44']; ?></td>
|
<td><input class="addTroops" name="u44" id="u44" value="<?php echo $units['u44']; ?>" maxlength="10"> <font color="#bcbcbc" size="1">Currently: <b><?php echo $units['u44']; ?></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td class="addTroops"><img src="../<?php echo GP_LOCATE; ?>img/u/45.gif"></img> <?php echo U45; ?></td>
|
<td class="addTroops"><img src="../<?php echo GP_LOCATE; ?>img/u/45.gif"></img> <?php echo U45; ?></td>
|
||||||
<td><input class="addTroops" name="u45" id="u45" value="<?php echo $units['u45']; ?>" maxlength="10"> <font color="#bcbcbc" size="1">Currently: <b><?php echo $units['u45']; ?></td>
|
<td><input class="addTroops" name="u45" id="u45" value="<?php echo $units['u45']; ?>" maxlength="10"> <font color="#bcbcbc" size="1">Currently: <b><?php echo $units['u45']; ?></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td class="addTroops"><img src="../<?php echo GP_LOCATE; ?>img/u/46.gif"></img> <?php echo U46; ?></td>
|
<td class="addTroops"><img src="../<?php echo GP_LOCATE; ?>img/u/46.gif"></img> <?php echo U46; ?></td>
|
||||||
<td><input class="addTroops" name="u46" id="u46" value="<?php echo $units['u46']; ?>" maxlength="10"> <font color="#bcbcbc" size="1">Currently: <b><?php echo $units['u46']; ?></td>
|
<td><input class="addTroops" name="u46" id="u46" value="<?php echo $units['u46']; ?>" maxlength="10"> <font color="#bcbcbc" size="1">Currently: <b><?php echo $units['u46']; ?></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td class="addTroops"><img src="../<?php echo GP_LOCATE; ?>img/u/47.gif"></img> <?php echo U47; ?></td>
|
<td class="addTroops"><img src="../<?php echo GP_LOCATE; ?>img/u/47.gif"></img> <?php echo U47; ?></td>
|
||||||
<td><input class="addTroops" name="u47" id="u47" value="<?php echo $units['u47']; ?>" maxlength="10"> <font color="#bcbcbc" size="1">Currently: <b><?php echo $units['u47']; ?></td>
|
<td><input class="addTroops" name="u47" id="u47" value="<?php echo $units['u47']; ?>" maxlength="10"> <font color="#bcbcbc" size="1">Currently: <b><?php echo $units['u47']; ?></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="addTroops"><img src="../<?php echo GP_LOCATE; ?>img/u/48.gif"></img> <?php echo U48; ?></td>
|
<td class="addTroops"><img src="../<?php echo GP_LOCATE; ?>img/u/48.gif"></img> <?php echo U48; ?></td>
|
||||||
<td><input class="addTroops" name="u48" id="u48" value="<?php echo $units['u48']; ?>" maxlength="10"> <font color="#bcbcbc" size="1">Currently: <b><?php echo $units['u48']; ?></td>
|
<td><input class="addTroops" name="u48" id="u48" value="<?php echo $units['u48']; ?>" maxlength="10"> <font color="#bcbcbc" size="1">Currently: <b><?php echo $units['u48']; ?></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td class="addTroops"><img src="../<?php echo GP_LOCATE; ?>img/u/49.gif"></img> <?php echo U49; ?></td>
|
<td class="addTroops"><img src="../<?php echo GP_LOCATE; ?>img/u/49.gif"></img> <?php echo U49; ?></td>
|
||||||
<td><input class="addTroops" name="u49" id="u49" value="<?php echo $units['u49']; ?>" maxlength="10"> <font color="#bcbcbc" size="1">Currently: <b><?php echo $units['u49']; ?></td>
|
<td><input class="addTroops" name="u49" id="u49" value="<?php echo $units['u49']; ?>" maxlength="10"> <font color="#bcbcbc" size="1">Currently: <b><?php echo $units['u49']; ?></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td class="addTroops"><img src="../<?php echo GP_LOCATE; ?>img/u/50.gif"></img> <?php echo U50; ?></td>
|
<td class="addTroops"><img src="../<?php echo GP_LOCATE; ?>img/u/50.gif"></img> <?php echo U50; ?></td>
|
||||||
<td><input class="addTroops" name="u50" id="u50" value="<?php echo $units['u50']; ?>" maxlength="10"> <font color="#bcbcbc" size="1">Currently: <b><?php echo $units['u50']; ?></td>
|
<td><input class="addTroops" name="u50" id="u50" value="<?php echo $units['u50']; ?>" maxlength="10"> <font color="#bcbcbc" size="1">Currently: <b><?php echo $units['u50']; ?></td>
|
||||||
</tr>
|
</tr>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
</tbody></table>
|
</tbody></table>
|
||||||
<br />
|
<br />
|
||||||
|
|||||||
@@ -10,17 +10,17 @@
|
|||||||
#################################################################################
|
#################################################################################
|
||||||
?>
|
?>
|
||||||
<style>
|
<style>
|
||||||
.del {width:12px; height:12px; background-image: url(img/admin/icon/del.gif);}
|
.del {width:12px; height:12px; background-image: url(img/admin/icon/del.gif);}
|
||||||
</style>
|
</style>
|
||||||
<form method="post" action="admin.php">
|
<form method="post" action="admin.php">
|
||||||
<input name="action" type="hidden" value="addVillage">
|
<input name="action" type="hidden" value="addVillage">
|
||||||
<input name="uid" type="hidden" value="<?php echo $user['id'];?>">
|
<input name="uid" type="hidden" value="<?php echo $user['id'];?>">
|
||||||
<table id="member" style="width: 125px;">
|
<table id="member" style="width: 125px;">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th colspan="2">Add Village</th>
|
<th colspan="2">Add Village</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="2"><center>Coordinates (<b>X</b>|<b>Y</b>)</center></td>
|
<td colspan="2"><center>Coordinates (<b>X</b>|<b>Y</b>)</center></td>
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
<link REL="shortcut icon" HREF="favicon.ico"/>
|
<link REL="shortcut icon" HREF="favicon.ico"/>
|
||||||
|
|
||||||
<title><?php if($_SESSION['access'] == ADMIN){ echo 'Admin Control Panel - TravianX'; } else if($_SESSION['access'] == MULTIHUNTER){ echo 'Multihunter Control Panel - TravianX'; } ?></title>
|
<title><?php if($_SESSION['access'] == ADMIN){ echo 'Admin Control Panel - TravianX'; } else if($_SESSION['access'] == MULTIHUNTER){ echo 'Multihunter Control Panel - TravianX'; } ?></title>
|
||||||
|
|
||||||
<link rel=stylesheet type="text/css" href="../img/admin/admin.css">
|
<link rel=stylesheet type="text/css" href="../img/admin/admin.css">
|
||||||
|
|
||||||
@@ -22,7 +22,7 @@
|
|||||||
<meta http-equiv="imagetoolbar" content="no">
|
<meta http-equiv="imagetoolbar" content="no">
|
||||||
|
|
||||||
</head>
|
</head>
|
||||||
<?php
|
<?php
|
||||||
#################################################################################
|
#################################################################################
|
||||||
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
||||||
## --------------------------------------------------------------------------- ##
|
## --------------------------------------------------------------------------- ##
|
||||||
@@ -36,7 +36,7 @@
|
|||||||
if($_SESSION['access'] < ADMIN) die("Access Denied: You are not Admin!"); ?>
|
if($_SESSION['access'] < ADMIN) die("Access Denied: You are not Admin!"); ?>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
$no = count($database->getAdminLog());
|
$no = count($database->getAdminLog());
|
||||||
$log = $database->getAdminLog();
|
$log = $database->getAdminLog();
|
||||||
for($i=0;$i<$no;$i++) {
|
for($i=0;$i<$no;$i++) {
|
||||||
@@ -50,7 +50,6 @@ if($_SESSION['access'] < ADMIN) die("Access Denied: You are not Admin!"); ?>
|
|||||||
?><br />
|
?><br />
|
||||||
<b>Log:</b> <?php echo $log[$i]['log']; ?><br />
|
<b>Log:</b> <?php echo $log[$i]['log']; ?><br />
|
||||||
<b>Date:</b> <?php echo date("d.m.Y H:i:s",$log[$i]['time']+3600*2); ?><br />
|
<b>Date:</b> <?php echo date("d.m.Y H:i:s",$log[$i]['time']+3600*2); ?><br />
|
||||||
|
|
||||||
|
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
|
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
<?php
|
<?php
|
||||||
#################################################################################
|
#################################################################################
|
||||||
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
||||||
## --------------------------------------------------------------------------- ##
|
## --------------------------------------------------------------------------- ##
|
||||||
@@ -20,7 +20,7 @@ if($_GET['aid'])
|
|||||||
{
|
{
|
||||||
$totalpop += $database->getVSumField($member['id'],"pop");
|
$totalpop += $database->getVSumField($member['id'],"pop");
|
||||||
} ?>
|
} ?>
|
||||||
|
|
||||||
<br>
|
<br>
|
||||||
<table id="profile" cellpadding="1" cellspacing="1">
|
<table id="profile" cellpadding="1" cellspacing="1">
|
||||||
<thead>
|
<thead>
|
||||||
@@ -65,7 +65,7 @@ if($_GET['aid'])
|
|||||||
<td><?php echo count($aliusers); ?></td>
|
<td><?php echo count($aliusers); ?></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="2" class="empty"></td>
|
<td colspan="2" class="empty"></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th>Alliance Founder</th>
|
<th>Alliance Founder</th>
|
||||||
@@ -74,7 +74,7 @@ if($_GET['aid'])
|
|||||||
<tr>
|
<tr>
|
||||||
<td colspan="2"><b>Alliance Positions</b></td>
|
<td colspan="2"><b>Alliance Positions</b></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
error_reporting(0);
|
error_reporting(0);
|
||||||
$sql = "SELECT * FROM ".TB_PREFIX."ali_permission WHERE alliance = ".$_GET['aid']."";
|
$sql = "SELECT * FROM ".TB_PREFIX."ali_permission WHERE alliance = ".$_GET['aid']."";
|
||||||
@@ -90,7 +90,7 @@ if($_GET['aid'])
|
|||||||
if($row['opt6'] == 1) { $position6 = "Alliance Diplomacy"; } else { $position6 = "No Diplomacy"; }
|
if($row['opt6'] == 1) { $position6 = "Alliance Diplomacy"; } else { $position6 = "No Diplomacy"; }
|
||||||
if($row['opt7'] == 1) { $position7 = "Mass IGMs (MMs)"; } else { $position7 = "No MMs"; }
|
if($row['opt7'] == 1) { $position7 = "Mass IGMs (MMs)"; } else { $position7 = "No MMs"; }
|
||||||
if($row['opt8'] == 1) { $position8 = "???"; } else { $position8 = "No ???"; }
|
if($row['opt8'] == 1) { $position8 = "???"; } else { $position8 = "No ???"; }
|
||||||
|
|
||||||
echo '
|
echo '
|
||||||
<tr>
|
<tr>
|
||||||
<td>Position:</td>
|
<td>Position:</td>
|
||||||
@@ -111,7 +111,7 @@ if($_GET['aid'])
|
|||||||
';
|
';
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<th>Capacity</th>
|
<th>Capacity</th>
|
||||||
<td>
|
<td>
|
||||||
@@ -167,8 +167,8 @@ if($_GET['aid'])
|
|||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
|
|
||||||
<table id="member" cellpadding="1" cellspacing="1">
|
<table id="member" cellpadding="1" cellspacing="1">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
@@ -188,11 +188,11 @@ if($_GET['aid'])
|
|||||||
$TotalVillages = $database->getProfileVillages($user['id']);
|
$TotalVillages = $database->getProfileVillages($user['id']);
|
||||||
echo "<tr>";
|
echo "<tr>";
|
||||||
echo "<td class=ra>".$rank.".</td>";
|
echo "<td class=ra>".$rank.".</td>";
|
||||||
echo "<td class=pla><a href=spieler.php?uid=".$user['id'].">".$user['username']."</a></td>";
|
echo "<td class=pla><a href=spieler.php?uid=".$user['id'].">".$user['username']."</a></td>";
|
||||||
echo "<td class=hab>".$TotalUserPop."</td>";
|
echo "<td class=hab>".$TotalUserPop."</td>";
|
||||||
echo "<td class=vil>".count($TotalVillages)."</td>";
|
echo "<td class=vil>".count($TotalVillages)."</td>";
|
||||||
if($aid == $session->alliance)
|
if($aid == $session->alliance)
|
||||||
{
|
{
|
||||||
if ((time()-600) < $user['timestamp'])
|
if ((time()-600) < $user['timestamp'])
|
||||||
{
|
{
|
||||||
// 0 Min - 10 Min
|
// 0 Min - 10 Min
|
||||||
@@ -201,29 +201,29 @@ if($_GET['aid'])
|
|||||||
elseif ((time()-86400) < $user['timestamp'] && (time()-600) > $user['timestamp'])
|
elseif ((time()-86400) < $user['timestamp'] && (time()-600) > $user['timestamp'])
|
||||||
{
|
{
|
||||||
// 10 Min - 1 Days
|
// 10 Min - 1 Days
|
||||||
echo "<td class=on><img class=online2 src=img/x.gif title=now online alt=now online /></td>";
|
echo "<td class=on><img class=online2 src=img/x.gif title=now online alt=now online /></td>";
|
||||||
}
|
}
|
||||||
elseif ((time()-259200) < $user['timestamp'] && (time()-86400) > $user['timestamp'])
|
elseif ((time()-259200) < $user['timestamp'] && (time()-86400) > $user['timestamp'])
|
||||||
{
|
{
|
||||||
// 1-3 Days
|
// 1-3 Days
|
||||||
echo "<td class=on><img class=online3 src=img/x.gif title=now online alt=now online /></td>";
|
echo "<td class=on><img class=online3 src=img/x.gif title=now online alt=now online /></td>";
|
||||||
}
|
}
|
||||||
elseif ((time()-604800) < $user['timestamp'] && (time()-259200) > $user['timestamp'])
|
elseif ((time()-604800) < $user['timestamp'] && (time()-259200) > $user['timestamp'])
|
||||||
{
|
{
|
||||||
echo "<td class=on><img class=online4 src=img/x.gif title=now online alt=now online /></td>";
|
echo "<td class=on><img class=online4 src=img/x.gif title=now online alt=now online /></td>";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
echo "<td class=on><img class=online5 src=img/x.gif title=now online alt=now online /></td>";
|
echo "<td class=on><img class=online5 src=img/x.gif title=now online alt=now online /></td>";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
echo " </tr>";
|
echo " </tr>";
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
<br /><br />
|
<br /><br />
|
||||||
|
|
||||||
<table id="profile">
|
<table id="profile">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
@@ -249,7 +249,7 @@ if($_GET['aid'])
|
|||||||
</thead>
|
</thead>
|
||||||
</table>
|
</table>
|
||||||
<br /><br />
|
<br /><br />
|
||||||
|
|
||||||
<h3>Not Sure this Diplomacy is correct, but I think it is</h3>
|
<h3>Not Sure this Diplomacy is correct, but I think it is</h3>
|
||||||
<br />
|
<br />
|
||||||
<table id="profile">
|
<table id="profile">
|
||||||
@@ -273,7 +273,7 @@ if($_GET['aid'])
|
|||||||
if($row['type'] == 3) { $type = 'Declaration of War'; }
|
if($row['type'] == 3) { $type = 'Declaration of War'; }
|
||||||
if($row['accepted'] == 0) { $accepted = "<img src=\"../../<?php echo GP_LOCATE; ?>img/a/del.gif\">"; }
|
if($row['accepted'] == 0) { $accepted = "<img src=\"../../<?php echo GP_LOCATE; ?>img/a/del.gif\">"; }
|
||||||
if($row['accepted'] ==1) { $accepted = "<img src=\"../../<?php echo GP_LOCATE; ?>img/a/acc.gif\">"; }
|
if($row['accepted'] ==1) { $accepted = "<img src=\"../../<?php echo GP_LOCATE; ?>img/a/acc.gif\">"; }
|
||||||
|
|
||||||
$ally = mysql_fetch_assoc(mysql_query("SELECT * FROM ".TB_PREFIX."alidata WHERE id = ".$row['alli2'].""));
|
$ally = mysql_fetch_assoc(mysql_query("SELECT * FROM ".TB_PREFIX."alidata WHERE id = ".$row['alli2'].""));
|
||||||
echo '
|
echo '
|
||||||
<tr>
|
<tr>
|
||||||
@@ -286,7 +286,7 @@ if($_GET['aid'])
|
|||||||
</thead>
|
</thead>
|
||||||
</table>
|
</table>
|
||||||
<br /><br />
|
<br /><br />
|
||||||
|
|
||||||
<table id="profile">
|
<table id="profile">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
@@ -308,7 +308,7 @@ if($_GET['aid'])
|
|||||||
if($row['type'] == 3) { $type = 'Declaration of War'; }
|
if($row['type'] == 3) { $type = 'Declaration of War'; }
|
||||||
if($row['accepted'] == 0) { $accepted = "<img src=\"../../<?php echo GP_LOCATE; ?>img/a/del.gif\">"; }
|
if($row['accepted'] == 0) { $accepted = "<img src=\"../../<?php echo GP_LOCATE; ?>img/a/del.gif\">"; }
|
||||||
if($row['accepted'] ==1) { $accepted = "<img src=\"../../<?php echo GP_LOCATE; ?>img/a/acc.gif\">"; }
|
if($row['accepted'] ==1) { $accepted = "<img src=\"../../<?php echo GP_LOCATE; ?>img/a/acc.gif\">"; }
|
||||||
|
|
||||||
$ally = mysql_fetch_assoc(mysql_query("SELECT * FROM ".TB_PREFIX."alidata WHERE id = ".$row['alli1'].""));
|
$ally = mysql_fetch_assoc(mysql_query("SELECT * FROM ".TB_PREFIX."alidata WHERE id = ".$row['alli1'].""));
|
||||||
echo '
|
echo '
|
||||||
<tr>
|
<tr>
|
||||||
@@ -320,9 +320,9 @@ if($_GET['aid'])
|
|||||||
?>
|
?>
|
||||||
</thead>
|
</thead>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
<br /><br />
|
<br /><br />
|
||||||
|
|
||||||
<table id="profile">
|
<table id="profile">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
@@ -344,7 +344,7 @@ if($_GET['aid'])
|
|||||||
if($row['type'] == 3) { $type = 'Declaration of War'; }
|
if($row['type'] == 3) { $type = 'Declaration of War'; }
|
||||||
if($row['accepted'] == 0) { $accepted = "<img src=\"../../<?php echo GP_LOCATE; ?>img/a/del.gif\">"; }
|
if($row['accepted'] == 0) { $accepted = "<img src=\"../../<?php echo GP_LOCATE; ?>img/a/del.gif\">"; }
|
||||||
if($row['accepted'] == 1) { $accepted = "<img src=\"../../<?php echo GP_LOCATE; ?>img/a/acc.gif\">"; }
|
if($row['accepted'] == 1) { $accepted = "<img src=\"../../<?php echo GP_LOCATE; ?>img/a/acc.gif\">"; }
|
||||||
|
|
||||||
$ally1 = mysql_fetch_assoc(mysql_query("SELECT * FROM ".TB_PREFIX."alidata WHERE id = ".$row['alli1'].""));
|
$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'].""));
|
$ally2 = mysql_fetch_assoc(mysql_query("SELECT * FROM ".TB_PREFIX."alidata WHERE id = ".$row['alli2'].""));
|
||||||
echo '
|
echo '
|
||||||
@@ -357,9 +357,9 @@ if($_GET['aid'])
|
|||||||
?>
|
?>
|
||||||
</thead>
|
</thead>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
<br /><br />
|
<br /><br />
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
include("allymedals.tpl");
|
include("allymedals.tpl");
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
<form action="../GameEngine/Admin/Mods/delallymedal.php" method="POST">
|
<form action="../GameEngine/Admin/Mods/delallymedal.php" method="POST">
|
||||||
<input type="hidden" name="aid" value="<?php echo $_GET['aid']; ?>">
|
<input type="hidden" name="aid" value="<?php echo $_GET['aid']; ?>">
|
||||||
<input type="hidden" name="admid" id="admid" value="<?php echo $_SESSION['id']; ?>">
|
<input type="hidden" name="admid" id="admid" value="<?php echo $_SESSION['id']; ?>">
|
||||||
<table id="profile">
|
<table id="profile">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th colspan="6">Alliance Medals (<?php echo sizeof($varmedal); ?>)</th>
|
<th colspan="6">Alliance Medals (<?php echo sizeof($varmedal); ?>)</th>
|
||||||
@@ -21,14 +21,14 @@
|
|||||||
<?php
|
<?php
|
||||||
if(sizeof($varmedal) ==0)
|
if(sizeof($varmedal) ==0)
|
||||||
{ ?>
|
{ ?>
|
||||||
<td colspan="5"><center>This alliance has no medals yet</center></td><?php
|
<td colspan="5"><center>This alliance has no medals yet</center></td><?php
|
||||||
}
|
}
|
||||||
elseif(sizeof($varmedal) >0)
|
elseif(sizeof($varmedal) >0)
|
||||||
{
|
{
|
||||||
foreach($varmedal as $medal)
|
foreach($varmedal as $medal)
|
||||||
{
|
{
|
||||||
$titel="Bonus";
|
$titel="Bonus";
|
||||||
switch ($medal['categorie'])
|
switch ($medal['categorie'])
|
||||||
{
|
{
|
||||||
case "1": $titel="Attackers"; break;
|
case "1": $titel="Attackers"; break;
|
||||||
case "2": $titel="Defenders"; break;
|
case "2": $titel="Defenders"; break;
|
||||||
@@ -41,7 +41,7 @@
|
|||||||
$week = $medal['week'];
|
$week = $medal['week'];
|
||||||
$points = $medal['points'];
|
$points = $medal['points'];
|
||||||
if($points == '') { $points = "<p>Bonus</p>"; } else { $points = $points; }
|
if($points == '') { $points = "<p>Bonus</p>"; } else { $points = $points; }
|
||||||
|
|
||||||
echo"
|
echo"
|
||||||
<tr>
|
<tr>
|
||||||
<td>$title</td>
|
<td>$title</td>
|
||||||
@@ -54,7 +54,7 @@
|
|||||||
</td>
|
</td>
|
||||||
</tr>";
|
</tr>";
|
||||||
}
|
}
|
||||||
|
|
||||||
$averagerank = 0;
|
$averagerank = 0;
|
||||||
foreach($varmedal as $medal)
|
foreach($varmedal as $medal)
|
||||||
{
|
{
|
||||||
@@ -73,7 +73,7 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
$average = $averagerank / $i;
|
$average = $averagerank / $i;
|
||||||
echo "</form><tr><td><b>Average Rank</b></td><td>$average</td><td></td><td></td><td>Delete All</td>";
|
echo "</form><tr><td><b>Average Rank</b></td><td>$average</td><td></td><td></td><td>Delete All</td>";
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
<td>
|
<td>
|
||||||
|
|||||||
@@ -1,8 +1,7 @@
|
|||||||
<p>
|
<p>
|
||||||
<a href="admin.php">Homepage</a>
|
<a href="admin.php">Homepage</a>
|
||||||
<a href="?page=1">Configuration</a>
|
<a href="?page=1">Configuration</a>
|
||||||
<a href="?page=2">Search</a>
|
<a href="?page=2">Search</a>
|
||||||
<a href="?page=5">Online players</a>
|
<a href="?page=5">Online players</a>
|
||||||
<a href="?page=6">Bug report</a>
|
<a href="?page=6">Bug report</a>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
@@ -7,33 +7,33 @@ $database->BugReportSetViewed();
|
|||||||
<th colspan="10">Bug report</th>
|
<th colspan="10">Bug report</th>
|
||||||
</tr>
|
</tr>
|
||||||
<tr><td></td><td>Player</td><td>Page</td><td>Report</td><td>Time</td><td>IP</td><td></td></tr>
|
<tr><td></td><td>Player</td><td>Page</td><td>Report</td><td>Time</td><td>IP</td><td></td></tr>
|
||||||
</thead><tbody>
|
</thead><tbody>
|
||||||
<?php
|
<?php
|
||||||
$bug = $database->BugReport();
|
$bug = $database->BugReport();
|
||||||
|
|
||||||
if(count($bug)>0) {
|
|
||||||
for ($i = 0; $i < count($bug); $i++) {
|
|
||||||
if($bug[$i]==0){
|
|
||||||
$del = "<td></td>";
|
|
||||||
}else{
|
|
||||||
$del = '<td ><a href="?delete='.$bug[$i]['id'].'&where=bug_report"><img src="img/x.gif" class="del" title="cancel" alt="cancel"></a></td>';
|
|
||||||
}
|
|
||||||
$id = $i+1;
|
|
||||||
echo "<tr><td class=\"ra \" >".$id.".</td>";
|
|
||||||
echo "<td><a href=\"?uid=".$bug[$i]['user']."\">".$database->getUserField($bug[$i]['user'],'username',0)."</a></td>";
|
|
||||||
echo "<td>".$bug[$i]['page']."</td>";
|
|
||||||
echo "<td>".$bug[$i]['report']."</td>";
|
|
||||||
echo "<td class=\"vil\">".date("H:i d.m.y",$bug[$i]['time'])."</td>";
|
|
||||||
echo "<td>".$bug[$i]['ip']."</td>";
|
|
||||||
echo $del;
|
|
||||||
echo "</tr>";
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
if(count($bug)>0) {
|
||||||
else {
|
for ($i = 0; $i < count($bug); $i++) {
|
||||||
echo "<tr><td class=\"none\" colspan=\"7\">No bug report</td></tr>";
|
if($bug[$i]==0){
|
||||||
}
|
$del = "<td></td>";
|
||||||
?>
|
}else{
|
||||||
|
$del = '<td ><a href="?delete='.$bug[$i]['id'].'&where=bug_report"><img src="img/x.gif" class="del" title="cancel" alt="cancel"></a></td>';
|
||||||
|
}
|
||||||
|
$id = $i+1;
|
||||||
|
echo "<tr><td class=\"ra \" >".$id.".</td>";
|
||||||
|
echo "<td><a href=\"?uid=".$bug[$i]['user']."\">".$database->getUserField($bug[$i]['user'],'username',0)."</a></td>";
|
||||||
|
echo "<td>".$bug[$i]['page']."</td>";
|
||||||
|
echo "<td>".$bug[$i]['report']."</td>";
|
||||||
|
echo "<td class=\"vil\">".date("H:i d.m.y",$bug[$i]['time'])."</td>";
|
||||||
|
echo "<td>".$bug[$i]['ip']."</td>";
|
||||||
|
echo $del;
|
||||||
|
echo "</tr>";
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
echo "<tr><td class=\"none\" colspan=\"7\">No bug report</td></tr>";
|
||||||
|
}
|
||||||
|
?>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ $database->reload('admin.php?page=1');
|
|||||||
<form action="" method="post">
|
<form action="" method="post">
|
||||||
<table id="del_acc" class="account" cellpadding="1" cellspacing="1"><thead>
|
<table id="del_acc" class="account" cellpadding="1" cellspacing="1"><thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th colspan="2">Server Settings</th>
|
<th colspan="2">Server Settings</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead><tbody>
|
</thead><tbody>
|
||||||
|
|
||||||
@@ -20,18 +20,18 @@ $database->reload('admin.php?page=1');
|
|||||||
<td>
|
<td>
|
||||||
<select class="dropdown" name="LANG"">
|
<select class="dropdown" name="LANG"">
|
||||||
<?php
|
<?php
|
||||||
$handle=opendir('GameEngine/lang');
|
$handle=opendir('GameEngine/lang');
|
||||||
while (false!==($file = readdir($handle)))
|
while (false!==($file = readdir($handle)))
|
||||||
{
|
{
|
||||||
if (similar_text(".",$file)<1)
|
if (similar_text(".",$file)<1)
|
||||||
{
|
{
|
||||||
if(LANG==$file){$sel = "selected";}else{$sel = "";}
|
if(LANG==$file){$sel = "selected";}else{$sel = "";}
|
||||||
echo '<option value="'.$file.'"'.$sel.'>'.$file.'</option>\n';
|
echo '<option value="'.$file.'"'.$sel.'>'.$file.'</option>\n';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
closedir($handle);
|
closedir($handle);
|
||||||
?>
|
?>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
@@ -54,7 +54,7 @@ closedir($handle);
|
|||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th>Server online:</th>
|
<th>Server online:</th>
|
||||||
<td>
|
<td>
|
||||||
<input class="checkbox" name="active" value="1" <?php if(active==1){echo 'checked';}?> type="radio"> On
|
<input class="checkbox" name="active" value="1" <?php if(active==1){echo 'checked';}?> type="radio"> On
|
||||||
<input class="checkbox" name="active" value="0" <?php if(active==0){echo 'checked';}?> type="radio"> Off
|
<input class="checkbox" name="active" value="0" <?php if(active==0){echo 'checked';}?> type="radio"> Off
|
||||||
</td>
|
</td>
|
||||||
@@ -62,8 +62,8 @@ closedir($handle);
|
|||||||
<tr>
|
<tr>
|
||||||
<th>Censored:</th>
|
<th>Censored:</th>
|
||||||
<td>
|
<td>
|
||||||
<input class="checkbox" name="WORD_CENSOR" value="1" <?php if(WORD_CENSOR==1){echo 'checked';}?> type="radio"> On
|
<input class="checkbox" name="WORD_CENSOR" value="1" <?php if(WORD_CENSOR==1){echo 'checked';}?> type="radio"> On
|
||||||
<input class="checkbox" name="WORD_CENSOR" value="0" <?php if(WORD_CENSOR==0){echo 'checked';}?> type="radio"> Off
|
<input class="checkbox" name="WORD_CENSOR" value="0" <?php if(WORD_CENSOR==0){echo 'checked';}?> type="radio"> Off
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
@@ -72,63 +72,63 @@ closedir($handle);
|
|||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th>Log build:</th>
|
<th>Log build:</th>
|
||||||
<td>
|
<td>
|
||||||
<input class="radio" name="LOG_BUILD" value="1" <?php if(LOG_BUILD==1){echo 'checked';}?> type="radio"> On
|
<input class="radio" name="LOG_BUILD" value="1" <?php if(LOG_BUILD==1){echo 'checked';}?> type="radio"> On
|
||||||
<input class="radio" name="LOG_BUILD" value="0" <?php if(LOG_BUILD==0){echo 'checked';}?> type="radio"> Off
|
<input class="radio" name="LOG_BUILD" value="0" <?php if(LOG_BUILD==0){echo 'checked';}?> type="radio"> Off
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th>Log Technology:</th>
|
<th>Log Technology:</th>
|
||||||
<td>
|
<td>
|
||||||
<input class="radio" name="LOG_TECH" value="1" <?php if(LOG_TECH==1){echo 'checked';}?> type="radio"> On
|
<input class="radio" name="LOG_TECH" value="1" <?php if(LOG_TECH==1){echo 'checked';}?> type="radio"> On
|
||||||
<input class="radio" name="LOG_TECH" value="0" <?php if(LOG_TECH==0){echo 'checked';}?> type="radio"> Off
|
<input class="radio" name="LOG_TECH" value="0" <?php if(LOG_TECH==0){echo 'checked';}?> type="radio"> Off
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th>Log Login:</th>
|
<th>Log Login:</th>
|
||||||
<td>
|
<td>
|
||||||
<input class="radio" name="LOG_LOGIN" value="1" <?php if(LOG_LOGIN==1){echo 'checked';}?> type="radio"> On
|
<input class="radio" name="LOG_LOGIN" value="1" <?php if(LOG_LOGIN==1){echo 'checked';}?> type="radio"> On
|
||||||
<input class="radio" name="LOG_LOGIN" value="0" <?php if(LOG_LOGIN==0){echo 'checked';}?> type="radio"> Off
|
<input class="radio" name="LOG_LOGIN" value="0" <?php if(LOG_LOGIN==0){echo 'checked';}?> type="radio"> Off
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th>Log Gold:</th>
|
<th>Log Gold:</th>
|
||||||
<td>
|
<td>
|
||||||
<input class="radio" name="LOG_GOLD_FIN" value="1" <?php if(LOG_GOLD_FIN==1){echo 'checked';}?> type="radio"> On
|
<input class="radio" name="LOG_GOLD_FIN" value="1" <?php if(LOG_GOLD_FIN==1){echo 'checked';}?> type="radio"> On
|
||||||
<input class="radio" name="LOG_GOLD_FIN" value="0" <?php if(LOG_GOLD_FIN==0){echo 'checked';}?> type="radio"> Off
|
<input class="radio" name="LOG_GOLD_FIN" value="0" <?php if(LOG_GOLD_FIN==0){echo 'checked';}?> type="radio"> Off
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th>Log Admin:</th>
|
<th>Log Admin:</th>
|
||||||
<td>
|
<td>
|
||||||
<input class="radio" name="LOG_ADMIN" value="1" <?php if(LOG_ADMIN==1){echo 'checked';}?> type="radio"> On
|
<input class="radio" name="LOG_ADMIN" value="1" <?php if(LOG_ADMIN==1){echo 'checked';}?> type="radio"> On
|
||||||
<input class="radio" name="LOG_ADMIN" value="0" <?php if(LOG_ADMIN==0){echo 'checked';}?> type="radio"> Off
|
<input class="radio" name="LOG_ADMIN" value="0" <?php if(LOG_ADMIN==0){echo 'checked';}?> type="radio"> Off
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th>Log War:</th>
|
<th>Log War:</th>
|
||||||
<td>
|
<td>
|
||||||
<input class="radio" name="LOG_WAR" value="1" <?php if(LOG_WAR==1){echo 'checked';}?> type="radio"> On
|
<input class="radio" name="LOG_WAR" value="1" <?php if(LOG_WAR==1){echo 'checked';}?> type="radio"> On
|
||||||
<input class="radio" name="LOG_WAR" value="0" <?php if(LOG_WAR==0){echo 'checked';}?> type="radio"> Off
|
<input class="radio" name="LOG_WAR" value="0" <?php if(LOG_WAR==0){echo 'checked';}?> type="radio"> Off
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th>Log Market:</th>
|
<th>Log Market:</th>
|
||||||
<td>
|
<td>
|
||||||
<input class="radio" name="LOG_MARKET" value="1" <?php if(LOG_MARKET==1){echo 'checked';}?> type="radio"> On
|
<input class="radio" name="LOG_MARKET" value="1" <?php if(LOG_MARKET==1){echo 'checked';}?> type="radio"> On
|
||||||
<input class="radio" name="LOG_MARKET" value="0" <?php if(LOG_MARKET==0){echo 'checked';}?> type="radio"> Off
|
<input class="radio" name="LOG_MARKET" value="0" <?php if(LOG_MARKET==0){echo 'checked';}?> type="radio"> Off
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th>Log Illegal:</th>
|
<th>Log Illegal:</th>
|
||||||
<td>
|
<td>
|
||||||
<input class="checkbox" name="LOG_ILLEGAL" value="1" <?php if(LOG_ILLEGAL==1){echo 'checked';}?> type="radio"> On
|
<input class="checkbox" name="LOG_ILLEGAL" value="1" <?php if(LOG_ILLEGAL==1){echo 'checked';}?> type="radio"> On
|
||||||
<input class="checkbox" name="LOG_ILLEGAL" value="0" <?php if(LOG_ILLEGAL==0){echo 'checked';}?> type="radio"> Off
|
<input class="checkbox" name="LOG_ILLEGAL" value="0" <?php if(LOG_ILLEGAL==0){echo 'checked';}?> type="radio"> Off
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th>Bug Report:</th>
|
<th>Bug Report:</th>
|
||||||
<td>
|
<td>
|
||||||
<input class="checkbox" name="BUG_REPORT" value="1" <?php if(BUG_REPORT==1){echo 'checked';}?> type="radio"> On
|
<input class="checkbox" name="BUG_REPORT" value="1" <?php if(BUG_REPORT==1){echo 'checked';}?> type="radio"> On
|
||||||
<input class="checkbox" name="BUG_REPORT" value="0" <?php if(BUG_REPORT==0){echo 'checked';}?> type="radio"> Off
|
<input class="checkbox" name="BUG_REPORT" value="0" <?php if(BUG_REPORT==0){echo 'checked';}?> type="radio"> Off
|
||||||
</td>
|
</td>
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
if(!is_numeric($_SESSION['search'])) {
|
if(!is_numeric($_SESSION['search'])) {
|
||||||
echo "<p class=\"error\">The user <b>".$_SESSION['search']."</b> does not exist.</p>";
|
echo "<p class=\"error\">The user <b>".$_SESSION['search']."</b> does not exist.</p>";
|
||||||
$search = 0;
|
$search = 0;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$search = $_SESSION['search'];
|
$search = $_SESSION['search'];
|
||||||
@@ -13,35 +13,35 @@ $search = $_SESSION['search'];
|
|||||||
<th colspan="10">Online players</th>
|
<th colspan="10">Online players</th>
|
||||||
</tr>
|
</tr>
|
||||||
<tr><td></td><td>Player</td><td>Access</td><td>Gold</td><td>Email</td><td>Alliance</td><td>Population</td><td>Villages</td><td>Tribe</td></tr>
|
<tr><td></td><td>Player</td><td>Access</td><td>Gold</td><td>Email</td><td>Alliance</td><td>Population</td><td>Villages</td><td>Tribe</td></tr>
|
||||||
</thead><tbody>
|
</thead><tbody>
|
||||||
<?php
|
<?php
|
||||||
$users = $database->getUsersAll();
|
$users = $database->getUsersAll();
|
||||||
for ($i = 0; $i < count($users); $i++) {
|
for ($i = 0; $i < count($users); $i++) {
|
||||||
|
|
||||||
if(count($users)>0) {
|
|
||||||
$users[$i]['totalvillage'] = count($database->getVillagesID($users[$i]['id']));
|
|
||||||
$users[$i]['totalpop'] = $database->getVSumField($users[$i]['id'],"pop");
|
|
||||||
$users[$i]['aname'] = $database->getAllianceName($users[$i]['alliance']);
|
|
||||||
$id = $i+1;
|
|
||||||
echo "<tr><td class=\"ra \" >".$id.".</td>";
|
|
||||||
|
|
||||||
echo "<td class=\"pla \" ><a href=\"spieler.php?uid=".$users[$i]['id']."\">".$users[$i]['username']."</a> [".$users[$i]['id']."]</td>";
|
|
||||||
echo "<td class=\"pla \" >".$users[$i]['access']."</td>";
|
|
||||||
echo "<td class=\"pla \" >".$users[$i]['gold']."</td>";
|
|
||||||
echo "<td class=\"pla \" >".$users[$i]['email']."</td>";
|
|
||||||
|
|
||||||
echo "<td class=\"al \" ><a href=\"allianz.php?aid=".$users[$i]['alliance']."\">".$users[$i]['aname']."</a></td>";
|
|
||||||
|
|
||||||
echo "<td class=\"pop \" >".$users[$i]['totalpop']."</td><td class=\"vil\">".$users[$i]['totalvillage']."</td><td class=\"vil\">".$users[$i]['tribe']."</td></tr>";
|
if(count($users)>0) {
|
||||||
|
$users[$i]['totalvillage'] = count($database->getVillagesID($users[$i]['id']));
|
||||||
|
$users[$i]['totalpop'] = $database->getVSumField($users[$i]['id'],"pop");
|
||||||
}
|
$users[$i]['aname'] = $database->getAllianceName($users[$i]['alliance']);
|
||||||
|
$id = $i+1;
|
||||||
else {
|
echo "<tr><td class=\"ra \" >".$id.".</td>";
|
||||||
echo "<td class=\"none\" colspan=\"5\">No users found</td>";
|
|
||||||
}
|
echo "<td class=\"pla \" ><a href=\"spieler.php?uid=".$users[$i]['id']."\">".$users[$i]['username']."</a> [".$users[$i]['id']."]</td>";
|
||||||
}
|
echo "<td class=\"pla \" >".$users[$i]['access']."</td>";
|
||||||
?>
|
echo "<td class=\"pla \" >".$users[$i]['gold']."</td>";
|
||||||
|
echo "<td class=\"pla \" >".$users[$i]['email']."</td>";
|
||||||
|
|
||||||
|
echo "<td class=\"al \" ><a href=\"allianz.php?aid=".$users[$i]['alliance']."\">".$users[$i]['aname']."</a></td>";
|
||||||
|
|
||||||
|
echo "<td class=\"pop \" >".$users[$i]['totalpop']."</td><td class=\"vil\">".$users[$i]['totalvillage']."</td><td class=\"vil\">".$users[$i]['tribe']."</td></tr>";
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
else {
|
||||||
|
echo "<td class=\"none\" colspan=\"5\">No users found</td>";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
?>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
|
|||||||
@@ -19,57 +19,57 @@ $database->reload('?uid='.$uid);
|
|||||||
?>
|
?>
|
||||||
<div id="content" class="player" style="width:100%">
|
<div id="content" class="player" style="width:100%">
|
||||||
<form action="" method="POST">
|
<form action="" method="POST">
|
||||||
<input type="hidden" name="ft" value="p1" />
|
<input type="hidden" name="ft" value="p1" />
|
||||||
<input type="hidden" name="uid" value="<?php echo $uid; ?>" />
|
<input type="hidden" name="uid" value="<?php echo $uid; ?>" />
|
||||||
<input type="hidden" name="id" value="<?php echo $id; ?>" />
|
<input type="hidden" name="id" value="<?php echo $id; ?>" />
|
||||||
|
|
||||||
<table cellpadding="1" cellspacing="1" id="edit" ><thead>
|
|
||||||
<tr>
|
|
||||||
<th colspan="3">Player <?php echo $user['username']; ?> </th>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td colspan="2">Details</td>
|
|
||||||
|
|
||||||
<td>Description</td>
|
<table cellpadding="1" cellspacing="1" id="edit" ><thead>
|
||||||
</tr>
|
<tr>
|
||||||
</thead>
|
<th colspan="3">Player <?php echo $user['username']; ?> </th>
|
||||||
<tbody>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="2" class="empty"></td><td class="empty"></td></tr>
|
<td colspan="2">Details</td>
|
||||||
<tr>
|
|
||||||
<?php
|
<td>Description</td>
|
||||||
if($user['birthday'] != 0) {
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td colspan="2" class="empty"></td><td class="empty"></td></tr>
|
||||||
|
<tr>
|
||||||
|
<?php
|
||||||
|
if($user['birthday'] != 0) {
|
||||||
$bday = explode("-",$user['birthday']);
|
$bday = explode("-",$user['birthday']);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$bday = array('','','');
|
$bday = array('','','');
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
<th>Birthday</th><td class="birth"><input tabindex="1" class="text day" type="text" name="tag" value="<?php echo $bday[2]; ?>" maxlength="2" /> <select tabindex="2" name="monat" size="" class="dropdown">
|
<th>Birthday</th><td class="birth"><input tabindex="1" class="text day" type="text" name="tag" value="<?php echo $bday[2]; ?>" maxlength="2" /> <select tabindex="2" name="monat" size="" class="dropdown">
|
||||||
|
|
||||||
<option value="0"></option><option value="1" <?php if($bday[1] == 1) { echo "selected"; } ?>>Jan</option><option value="2"<?php if($bday[1] == 2) { echo "selected"; } ?>>Feb</option><option value="3"<?php if($bday[1] == 3) { echo "selected"; } ?>>Mar</option><option value="4"<?php if($bday[1] == 4) { echo "selected"; } ?>>Apr</option><option value="5"<?php if($bday[1] == 5) { echo "selected"; } ?>>May</option><option value="6"<?php if($bday[1] == 6) { echo "selected"; } ?>>June</option><option value="7"<?php if($bday[1] == 7) { echo "selected"; } ?>>July</option><option value="8"<?php if($bday[1] == 8) { echo "selected"; } ?>>Aug</option><option value="9"<?php if($bday[1] == 9) { echo "selected"; } ?>>Sep</option><option value="10"<?php if($bday[1] == 10) { echo "selected"; } ?>>Oct</option><option value="11"<?php if($bday[1] == 11) { echo "selected"; } ?>>Nov</option><option value="12"<?php if($bday[1] == 12) { echo "selected"; } ?>>Dec</option></select> <input tabindex="3" type="text" name="jahr" value="<?php echo $bday[0]; ?>" maxlength="4" class="text year"></td>
|
<option value="0"></option><option value="1" <?php if($bday[1] == 1) { echo "selected"; } ?>>Jan</option><option value="2"<?php if($bday[1] == 2) { echo "selected"; } ?>>Feb</option><option value="3"<?php if($bday[1] == 3) { echo "selected"; } ?>>Mar</option><option value="4"<?php if($bday[1] == 4) { echo "selected"; } ?>>Apr</option><option value="5"<?php if($bday[1] == 5) { echo "selected"; } ?>>May</option><option value="6"<?php if($bday[1] == 6) { echo "selected"; } ?>>June</option><option value="7"<?php if($bday[1] == 7) { echo "selected"; } ?>>July</option><option value="8"<?php if($bday[1] == 8) { echo "selected"; } ?>>Aug</option><option value="9"<?php if($bday[1] == 9) { echo "selected"; } ?>>Sep</option><option value="10"<?php if($bday[1] == 10) { echo "selected"; } ?>>Oct</option><option value="11"<?php if($bday[1] == 11) { echo "selected"; } ?>>Nov</option><option value="12"<?php if($bday[1] == 12) { echo "selected"; } ?>>Dec</option></select> <input tabindex="3" type="text" name="jahr" value="<?php echo $bday[0]; ?>" maxlength="4" class="text year"></td>
|
||||||
|
|
||||||
<td rowspan="100" class="desc1"><textarea tabindex="7" name="be1"><?php echo $user['desc2']; ?></textarea></td></tr>
|
<td rowspan="100" class="desc1"><textarea tabindex="7" name="be1"><?php echo $user['desc2']; ?></textarea></td></tr>
|
||||||
|
|
||||||
<tr><th>Gender</th>
|
<tr><th>Gender</th>
|
||||||
<td class="gend">
|
<td class="gend">
|
||||||
<label><input class="radio" type="radio" name="mw" value="0" <?php if($user['gender'] == 0) { echo "checked"; } ?> tabindex="4">n/a</label>
|
<label><input class="radio" type="radio" name="mw" value="0" <?php if($user['gender'] == 0) { echo "checked"; } ?> tabindex="4">n/a</label>
|
||||||
<label><input class="radio" type="radio" name="mw" value="1" <?php if($user['gender'] == 1) { echo "checked"; } ?> >m</label>
|
<label><input class="radio" type="radio" name="mw" value="1" <?php if($user['gender'] == 1) { echo "checked"; } ?> >m</label>
|
||||||
<label><input class="radio" type="radio" name="mw" value="2" <?php if($user['gender'] == 2) { echo "checked"; } ?> >f</label>
|
<label><input class="radio" type="radio" name="mw" value="2" <?php if($user['gender'] == 2) { echo "checked"; } ?> >f</label>
|
||||||
</td></tr>
|
</td></tr>
|
||||||
|
|
||||||
<tr><th>Location</th><td><input tabindex="5" type="text" name="ort" value="<?php echo $user['location']; ?>" maxlength="30" class="text"></td></tr>
|
|
||||||
|
|
||||||
|
<tr><th>Location</th><td><input tabindex="5" type="text" name="ort" value="<?php echo $user['location']; ?>" maxlength="30" class="text"></td></tr>
|
||||||
<tr><td colspan="2" class="empty"></td></tr>
|
|
||||||
<?php
|
|
||||||
|
<tr><td colspan="2" class="empty"></td></tr>
|
||||||
|
<?php
|
||||||
$varray = $database->getProfileVillages($uid);
|
$varray = $database->getProfileVillages($uid);
|
||||||
for($i=0;$i<=count($varray)-1;$i++) {
|
for($i=0;$i<=count($varray)-1;$i++) {
|
||||||
echo "<tr><th>Village name</th><td><input tabindex=\"6\" type=\"text\" name=\"dname$i\" value=\"".$varray[$i]['name']."\" maxlength=\"20\" class=\"text\"></td></tr>";
|
echo "<tr><th>Village name</th><td><input tabindex=\"6\" type=\"text\" name=\"dname$i\" value=\"".$varray[$i]['name']."\" maxlength=\"20\" class=\"text\"></td></tr>";
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
<tr><td colspan="2" class="empty"></td></tr>
|
<tr><td colspan="2" class="empty"></td></tr>
|
||||||
|
|
||||||
<tr><td colspan="2" class="desc2"><textarea tabindex="8" name="be2"><?php echo $user['desc1']; ?></textarea></td></tr>
|
<tr><td colspan="2" class="desc2"><textarea tabindex="8" name="be2"><?php echo $user['desc1']; ?></textarea></td></tr>
|
||||||
</table><p class="btn"><input type="image" value="" tabindex="9" name="s1" id="btn_ok" class="dynamic_img" src="img/x.gif" alt="OK" /></p>
|
</table><p class="btn"><input type="image" value="" tabindex="9" name="s1" id="btn_ok" class="dynamic_img" src="img/x.gif" alt="OK" /></p>
|
||||||
</form>
|
</form>
|
||||||
|
|||||||
@@ -3,59 +3,59 @@ $ranking->procRankReq($_GET);
|
|||||||
$ranking->procRank($_POST);
|
$ranking->procRank($_POST);
|
||||||
if(!is_numeric($_SESSION['search'])) {
|
if(!is_numeric($_SESSION['search'])) {
|
||||||
echo "<p class=\"error\">The user <b>".$_SESSION['search']."</b> does not exist.</p>";
|
echo "<p class=\"error\">The user <b>".$_SESSION['search']."</b> does not exist.</p>";
|
||||||
$search = 0;
|
$search = 0;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$search = $_SESSION['search'];
|
$search = $_SESSION['search'];
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
<table cellpadding="1" cellspacing="1" id="player">
|
<table cellpadding="1" cellspacing="1" id="player">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th colspan="10">Online players</th>
|
<th colspan="10">Online players</th>
|
||||||
</tr>
|
</tr>
|
||||||
<tr><td></td><td>Player</td><td>Access</td><td>Gold</td><td>Email</td><td>Alliance</td><td>Population</td><td>Villages</td><td>Tribe</td></tr>
|
<tr><td></td><td>Player</td><td>Access</td><td>Gold</td><td>Email</td><td>Alliance</td><td>Population</td><td>Villages</td><td>Tribe</td></tr>
|
||||||
</thead><tbody>
|
</thead><tbody>
|
||||||
<?php
|
<?php
|
||||||
$users = $database->getUsersAll();
|
$users = $database->getUsersAll();
|
||||||
|
|
||||||
$holder = array();
|
$holder = array();
|
||||||
foreach($users as $value) {
|
foreach($users as $value) {
|
||||||
$value['totalvillage'] = count($database->getVillagesID($value['id']));
|
$value['totalvillage'] = count($database->getVillagesID($value['id']));
|
||||||
$value['totalpop'] = $database->getVSumField($value['id'],"pop");
|
$value['totalpop'] = $database->getVSumField($value['id'],"pop");
|
||||||
$value['aname'] = $database->getAllianceName($value['alliance']);
|
$value['aname'] = $database->getAllianceName($value['alliance']);
|
||||||
array_push($holder,$value);
|
array_push($holder,$value);
|
||||||
}
|
}
|
||||||
$users = $multisort->sorte($holder, "'totalvillage'", false, 2, "'totalpop'", false, 2);
|
$users = $multisort->sorte($holder, "'totalvillage'", false, 2, "'totalpop'", false, 2);
|
||||||
|
|
||||||
|
|
||||||
for ($i = 0; $i < count($users); $i++) {
|
|
||||||
|
|
||||||
if(count($users)>0) {
|
|
||||||
/*
|
|
||||||
$users[$i]['totalvillage'] = count($database->getVillagesID($users[$i]['id']));
|
|
||||||
$users[$i]['totalpop'] = $database->getVSumField($users[$i]['id'],"pop");
|
|
||||||
$users[$i]['aname'] = $database->getAllianceName($users[$i]['alliance']);
|
|
||||||
*/
|
|
||||||
$id = $i+1;
|
|
||||||
echo "<tr><td class=\"ra \" >".$id.".</td>";
|
|
||||||
|
|
||||||
echo "<td class=\"pla \" ><a href=\"?uid=".$users[$i]['id']."\">".$users[$i]['username']."</a> [".$users[$i]['id']."]</td>";
|
|
||||||
echo "<td class=\"pla \" >".$users[$i]['access']."</td>";
|
|
||||||
echo "<td class=\"pla \" >".$users[$i]['gold']."</td>";
|
|
||||||
echo "<td class=\"pla \" >".$users[$i]['email']."</td>";
|
|
||||||
|
|
||||||
echo "<td class=\"al \" ><a href=\"?aid=".$users[$i]['alliance']."\">".$users[$i]['aname']."</a></td>";
|
|
||||||
|
|
||||||
echo "<td class=\"pop \" >".$users[$i]['totalpop']."</td><td class=\"vil\">".$users[$i]['totalvillage']."</td><td class=\"vil\">".$users[$i]['tribe']."</td></tr>";
|
for ($i = 0; $i < count($users); $i++) {
|
||||||
|
|
||||||
}
|
if(count($users)>0) {
|
||||||
|
/*
|
||||||
else {
|
$users[$i]['totalvillage'] = count($database->getVillagesID($users[$i]['id']));
|
||||||
echo "<td class=\"none\" colspan=\"5\">No users found</td>";
|
$users[$i]['totalpop'] = $database->getVSumField($users[$i]['id'],"pop");
|
||||||
}
|
$users[$i]['aname'] = $database->getAllianceName($users[$i]['alliance']);
|
||||||
}
|
*/
|
||||||
?>
|
$id = $i+1;
|
||||||
|
echo "<tr><td class=\"ra \" >".$id.".</td>";
|
||||||
|
|
||||||
|
echo "<td class=\"pla \" ><a href=\"?uid=".$users[$i]['id']."\">".$users[$i]['username']."</a> [".$users[$i]['id']."]</td>";
|
||||||
|
echo "<td class=\"pla \" >".$users[$i]['access']."</td>";
|
||||||
|
echo "<td class=\"pla \" >".$users[$i]['gold']."</td>";
|
||||||
|
echo "<td class=\"pla \" >".$users[$i]['email']."</td>";
|
||||||
|
|
||||||
|
echo "<td class=\"al \" ><a href=\"?aid=".$users[$i]['alliance']."\">".$users[$i]['aname']."</a></td>";
|
||||||
|
|
||||||
|
echo "<td class=\"pop \" >".$users[$i]['totalpop']."</td><td class=\"vil\">".$users[$i]['totalvillage']."</td><td class=\"vil\">".$users[$i]['tribe']."</td></tr>";
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
else {
|
||||||
|
echo "<td class=\"none\" colspan=\"5\">No users found</td>";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
?>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
|
|||||||
@@ -4,101 +4,101 @@
|
|||||||
<th colspan="15">Results in <?php echo $_GET['search_in'];?></th>
|
<th colspan="15">Results in <?php echo $_GET['search_in'];?></th>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
|
|
||||||
</thead><tbody>
|
</thead><tbody>
|
||||||
<?php
|
<?php
|
||||||
if($_GET['search_in']=="player"){
|
if($_GET['search_in']=="player"){
|
||||||
|
|
||||||
|
|
||||||
echo '<tr><td></td><td>Player</td><td>Access</td><td>Gold</td><td>Email</td><td>Alliance</td><td>Population</td>
|
echo '<tr><td></td><td>Player</td><td>Access</td><td>Gold</td><td>Email</td><td>Alliance</td><td>Population</td>
|
||||||
<td>Villages</td><td>Tribe</td><td>Last activity</td><td></td></tr>';
|
<td>Villages</td><td>Tribe</td><td>Last activity</td><td></td></tr>';
|
||||||
|
|
||||||
$holder = array();
|
$holder = array();
|
||||||
foreach($search as $value) {
|
foreach($search as $value) {
|
||||||
$value['totalvillage'] = count($database->getVillagesID($value['id']));
|
$value['totalvillage'] = count($database->getVillagesID($value['id']));
|
||||||
$value['totalpop'] = $database->getVSumField($value['id'],"pop");
|
$value['totalpop'] = $database->getVSumField($value['id'],"pop");
|
||||||
$value['aname'] = $database->getAllianceName($value['alliance']);
|
$value['aname'] = $database->getAllianceName($value['alliance']);
|
||||||
array_push($holder,$value);
|
array_push($holder,$value);
|
||||||
}
|
}
|
||||||
$search = $multisort->sorte($holder, "'totalvillage'", false, 2, "'totalpop'", false, 2);
|
$search = $multisort->sorte($holder, "'totalvillage'", false, 2, "'totalpop'", false, 2);
|
||||||
|
|
||||||
|
|
||||||
for ($i = 0; $i <= count($search)-1; $i++) {
|
|
||||||
|
|
||||||
if($search[$i]['id']==0 or $search[$i]['id']==1){
|
for ($i = 0; $i <= count($search)-1; $i++) {
|
||||||
$del = "<td></td>";
|
|
||||||
}else{
|
if($search[$i]['id']==0 or $search[$i]['id']==1){
|
||||||
$del = '<td ><a href="?delete='.$search[$i]['id'].'&where=user"><img src="img/x.gif" class="del" title="cancel" alt="cancel"></a></td>';
|
$del = "<td></td>";
|
||||||
}
|
}else{
|
||||||
|
$del = '<td ><a href="?delete='.$search[$i]['id'].'&where=user"><img src="img/x.gif" class="del" title="cancel" alt="cancel"></a></td>';
|
||||||
echo'<tr>
|
}
|
||||||
<td class="ra fc">'.($i+1).'.</td>
|
|
||||||
<td class="pla "><a href="?uid='.$search[$i]['id'].'">'.$search[$i]['username'].'</a></td>
|
echo'<tr>
|
||||||
<td class="vil">'.$search[$i]['access'].'</td>
|
<td class="ra fc">'.($i+1).'.</td>
|
||||||
<td class="vil">'.$search[$i]['gold'].'</td>
|
<td class="pla "><a href="?uid='.$search[$i]['id'].'">'.$search[$i]['username'].'</a></td>
|
||||||
<td class="vil">'.$search[$i]['email'].'</td>
|
<td class="vil">'.$search[$i]['access'].'</td>
|
||||||
<td class="al "><a href="?aid='.$search[$i]['alliance'].'">'.$search[$i]['aname'].'</a></td>
|
<td class="vil">'.$search[$i]['gold'].'</td>
|
||||||
<td class="pop ">'.$search[$i]['totalpop'].'</td>
|
<td class="vil">'.$search[$i]['email'].'</td>
|
||||||
<td class="vil">'.$search[$i]['totalvillage'].'</td>
|
<td class="al "><a href="?aid='.$search[$i]['alliance'].'">'.$search[$i]['aname'].'</a></td>
|
||||||
<td class="vil">'.$search[$i]['tribe'].'</td>
|
<td class="pop ">'.$search[$i]['totalpop'].'</td>
|
||||||
<td class="pla">'.date("H:i d.m.y",$search[$i]['timestamp']).'</td>
|
<td class="vil">'.$search[$i]['totalvillage'].'</td>
|
||||||
'.$del.'
|
<td class="vil">'.$search[$i]['tribe'].'</td>
|
||||||
</tr>
|
<td class="pla">'.date("H:i d.m.y",$search[$i]['timestamp']).'</td>
|
||||||
';
|
'.$del.'
|
||||||
}
|
</tr>
|
||||||
}
|
';
|
||||||
|
}
|
||||||
if($_GET['search_in']=="village"){
|
}
|
||||||
|
|
||||||
foreach ($_GET as $value=>$el) {
|
if($_GET['search_in']=="village"){
|
||||||
if($value!="sort"){
|
|
||||||
$page .= $value."=".$el."&";
|
foreach ($_GET as $value=>$el) {
|
||||||
}
|
if($value!="sort"){
|
||||||
}
|
$page .= $value."=".$el."&";
|
||||||
echo '<tr><td></td>
|
}
|
||||||
<td><a class="rn3" href="?'.$page.'sort=name">Village</a></td>
|
}
|
||||||
<td><a class="rn3" href="?'.$page.'sort=owner">Owner</a></td>
|
echo '<tr><td></td>
|
||||||
<td><a class="rn3" href="?'.$page.'sort=wood"><img src="img/x.gif" class="r1"> Wood</a></td>
|
<td><a class="rn3" href="?'.$page.'sort=name">Village</a></td>
|
||||||
<td><a class="rn3" href="?'.$page.'sort=clay"><img src="img/x.gif" class="r2"> Clay</a></td>
|
<td><a class="rn3" href="?'.$page.'sort=owner">Owner</a></td>
|
||||||
<td><a class="rn3" href="?'.$page.'sort=iron"><img src="img/x.gif" class="r3"> Iron</a></td>
|
<td><a class="rn3" href="?'.$page.'sort=wood"><img src="img/x.gif" class="r1"> Wood</a></td>
|
||||||
<td><a class="rn3" href="?'.$page.'sort=maxstore">Max store</a></td>
|
<td><a class="rn3" href="?'.$page.'sort=clay"><img src="img/x.gif" class="r2"> Clay</a></td>
|
||||||
<td><a class="rn3" href="?'.$page.'sort=crop"><img src="img/x.gif" class="r4"> Crop</a></td>
|
<td><a class="rn3" href="?'.$page.'sort=iron"><img src="img/x.gif" class="r3"> Iron</a></td>
|
||||||
<td><a class="rn3" href="?'.$page.'sort=maxcrop">Max Crop</a></td>
|
<td><a class="rn3" href="?'.$page.'sort=maxstore">Max store</a></td>
|
||||||
<td><a class="rn3" href="?'.$page.'sort=pop">Pop</a></td>
|
<td><a class="rn3" href="?'.$page.'sort=crop"><img src="img/x.gif" class="r4"> Crop</a></td>
|
||||||
<td><a class="rn3" href="?'.$page.'sort=capital">Capital</a></td>
|
<td><a class="rn3" href="?'.$page.'sort=maxcrop">Max Crop</a></td>
|
||||||
</tr>
|
<td><a class="rn3" href="?'.$page.'sort=pop">Pop</a></td>
|
||||||
<tr><td colspan="15"></td></tr>';
|
<td><a class="rn3" href="?'.$page.'sort=capital">Capital</a></td>
|
||||||
|
</tr>
|
||||||
$sort = $_GET['sort'];
|
<tr><td colspan="15"></td></tr>';
|
||||||
if(!$sort){
|
|
||||||
$search = $multisort->sorte($search, "'pop'", false, 2);
|
$sort = $_GET['sort'];
|
||||||
}
|
if(!$sort){
|
||||||
else{
|
$search = $multisort->sorte($search, "'pop'", false, 2);
|
||||||
$search = $multisort->sorte($search, "'$sort'", true, 2);
|
}
|
||||||
}
|
else{
|
||||||
|
$search = $multisort->sorte($search, "'$sort'", true, 2);
|
||||||
|
}
|
||||||
for ($i = 0; $i <= count($search)-1; $i++) {
|
|
||||||
$owner = $database->getUserField($search[$i]['owner'],'username',0);
|
|
||||||
$owner_id = $database->getUserField($search[$i]['owner'],'id',0);
|
for ($i = 0; $i <= count($search)-1; $i++) {
|
||||||
echo '<tr>
|
$owner = $database->getUserField($search[$i]['owner'],'username',0);
|
||||||
<td>'.($i+1).'.</td>
|
$owner_id = $database->getUserField($search[$i]['owner'],'id',0);
|
||||||
<td><a href="?wref='.$search[$i]['wref'].'">'.$search[$i]['name'].'</a></td>
|
echo '<tr>
|
||||||
<td><a href="?uid='.$search[$i]['owner'].'">'.$owner.'</a></td>
|
<td>'.($i+1).'.</td>
|
||||||
<td>'.$search[$i]['wood'].'</td>
|
<td><a href="?wref='.$search[$i]['wref'].'">'.$search[$i]['name'].'</a></td>
|
||||||
<td>'.$search[$i]['clay'].'</td>
|
<td><a href="?uid='.$search[$i]['owner'].'">'.$owner.'</a></td>
|
||||||
<td>'.$search[$i]['iron'].'</td>
|
<td>'.$search[$i]['wood'].'</td>
|
||||||
<td>'.$search[$i]['maxstore'].'</td>
|
<td>'.$search[$i]['clay'].'</td>
|
||||||
<td>'.$search[$i]['crop'].'</td>
|
<td>'.$search[$i]['iron'].'</td>
|
||||||
<td>'.$search[$i]['maxcrop'].'</td>
|
<td>'.$search[$i]['maxstore'].'</td>
|
||||||
<td>'.$search[$i]['pop'].'</td>
|
<td>'.$search[$i]['crop'].'</td>
|
||||||
<td>'.$search[$i]['capital'].'</td>
|
<td>'.$search[$i]['maxcrop'].'</td>
|
||||||
</tr>';
|
<td>'.$search[$i]['pop'].'</td>
|
||||||
}
|
<td>'.$search[$i]['capital'].'</td>
|
||||||
}
|
</tr>';
|
||||||
|
}
|
||||||
?>
|
}
|
||||||
</tbody>
|
|
||||||
|
?>
|
||||||
|
</tbody>
|
||||||
|
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
<?php
|
<?php
|
||||||
if($_GET['search_in']){
|
if($_GET['search_in']){
|
||||||
if(!$_GET['sort']){$sort = $_GET['search_in'];}
|
if(!$_GET['sort']){$sort = $_GET['search_in'];}
|
||||||
else{
|
else{
|
||||||
@@ -17,8 +17,8 @@ Search
|
|||||||
</th></tr>
|
</th></tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
<select class="dropdown" name="search_in">
|
<select class="dropdown" name="search_in">
|
||||||
<option value="player" <?php if($_GET['search_in']=="player"){echo "selected";}?>>Search player</option>
|
<option value="player" <?php if($_GET['search_in']=="player"){echo "selected";}?>>Search player</option>
|
||||||
<option value="village" <?php if($_GET['search_in']=="village"){echo "selected";}?>>Search villages</option>
|
<option value="village" <?php if($_GET['search_in']=="village"){echo "selected";}?>>Search villages</option>
|
||||||
|
|||||||
@@ -9,133 +9,133 @@ foreach($varray as $vil) {
|
|||||||
?>
|
?>
|
||||||
<div id="content" class="player" style="width:100%">
|
<div id="content" class="player" style="width:100%">
|
||||||
<table id="profile" cellpadding="1" cellspacing="1" >
|
<table id="profile" cellpadding="1" cellspacing="1" >
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th colspan="2">Player <?php echo $displayarray['username']; ?> </th>
|
<th colspan="2">Player <?php echo $displayarray['username']; ?> </th>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Details</td>
|
<td>Details</td>
|
||||||
<td>Description</td>
|
<td>Description</td>
|
||||||
|
|
||||||
</tr>
|
</tr>
|
||||||
</thead><tbody>
|
</thead><tbody>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="empty"></td><td class="empty"></td>
|
<td class="empty"></td><td class="empty"></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="details">
|
<td class="details">
|
||||||
<table cellpadding="0" cellspacing="0">
|
<table cellpadding="0" cellspacing="0">
|
||||||
<tr>
|
<tr>
|
||||||
|
|
||||||
<th>Rank</th>
|
<th>Rank</th>
|
||||||
<td><?php echo $ranking->searchRank($displayarray['username'],"username"); ?></td>
|
<td><?php echo $ranking->searchRank($displayarray['username'],"username"); ?></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th>Tribe</th>
|
<th>Tribe</th>
|
||||||
<td><?php
|
<td><?php
|
||||||
if($displayarray['tribe'] == 1) {
|
if($displayarray['tribe'] == 1) {
|
||||||
echo "Roman";
|
echo "Roman";
|
||||||
}
|
}
|
||||||
else if($displayarray['tribe'] == 2) {
|
else if($displayarray['tribe'] == 2) {
|
||||||
echo "Teutons";
|
echo "Teutons";
|
||||||
}
|
}
|
||||||
else if($displayarray['tribe'] == 3) {
|
else if($displayarray['tribe'] == 3) {
|
||||||
echo "Gauls";
|
echo "Gauls";
|
||||||
} ?></td>
|
} ?></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<th>Alliance</th>
|
<th>Alliance</th>
|
||||||
<td><?php if($displayarray['alliance'] == 0) {
|
<td><?php if($displayarray['alliance'] == 0) {
|
||||||
echo "-";
|
echo "-";
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$displayalliance = $database->getAllianceName($displayarray['alliance']);
|
$displayalliance = $database->getAllianceName($displayarray['alliance']);
|
||||||
echo "<a href=\"?aid=".$displayarray['alliance']."\">".$displayalliance."</a>";
|
echo "<a href=\"?aid=".$displayarray['alliance']."\">".$displayalliance."</a>";
|
||||||
} ?></td>
|
} ?></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th>Villages</th>
|
<th>Villages</th>
|
||||||
<td><?php echo count($varray);?></td>
|
<td><?php echo count($varray);?></td>
|
||||||
|
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th>Population</th>
|
<th>Population</th>
|
||||||
<td><?php echo $totalpop; ?></td>
|
<td><?php echo $totalpop; ?></td>
|
||||||
</tr>
|
</tr>
|
||||||
<?php
|
<?php
|
||||||
if(isset($displayarray['birthday']) && $displayarray['birthday'] != 0) {
|
if(isset($displayarray['birthday']) && $displayarray['birthday'] != 0) {
|
||||||
$age = date("Y")-substr($displayarray['birthday'],0,4);
|
$age = date("Y")-substr($displayarray['birthday'],0,4);
|
||||||
echo "<tr><th>Age</th><td>$age</td></tr>";
|
echo "<tr><th>Age</th><td>$age</td></tr>";
|
||||||
}
|
}
|
||||||
if(isset($displayarray['gender']) && $displayarray['gender'] != 0) {
|
if(isset($displayarray['gender']) && $displayarray['gender'] != 0) {
|
||||||
$gender = ($displayarray['gender']== 1)? "Male" : "Female";
|
$gender = ($displayarray['gender']== 1)? "Male" : "Female";
|
||||||
echo "<tr><th>Gender</th><td>".$gender."</td></tr>";
|
echo "<tr><th>Gender</th><td>".$gender."</td></tr>";
|
||||||
}
|
}
|
||||||
if($displayarray['location'] != "") {
|
if($displayarray['location'] != "") {
|
||||||
echo "<tr><th>Location</th><td>".$displayarray['location']."</td></tr>";
|
echo "<tr><th>Location</th><td>".$displayarray['location']."</td></tr>";
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="2" class="empty"></td>
|
<td colspan="2" class="empty"></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="2"> <a href="?edit=user&uid=<?php echo $_GET['uid'];?>">» Change profile</a></td>
|
<td colspan="2"> <a href="?edit=user&uid=<?php echo $_GET['uid'];?>">» Change profile</a></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="2"> <a href="?action=message&id=<?php echo $_GET['uid'];?>">» Write message</a></td>
|
<td colspan="2"> <a href="?action=message&id=<?php echo $_GET['uid'];?>">» Write message</a></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="2"> <a href="?uid=<?php echo $_GET['uid'];?>&delete=<?php echo $_GET['uid'];?>&where=user">» Delete player</a></td>
|
<td colspan="2"> <a href="?uid=<?php echo $_GET['uid'];?>&delete=<?php echo $_GET['uid'];?>&where=user">» Delete player</a></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="2"> <a href="?log_login=<?php echo $_GET['uid'];?>">» Login Log</a></td>
|
<td colspan="2"> <a href="?log_login=<?php echo $_GET['uid'];?>">» Login Log</a></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="2" class="desc2">
|
<td colspan="2" class="desc2">
|
||||||
<div class="desc2div"><?php echo $displayarray['desc1']; ?></div>
|
<div class="desc2div"><?php echo $displayarray['desc1']; ?></div>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
</td>
|
</td>
|
||||||
<td class="desc1" >
|
<td class="desc1" >
|
||||||
<?php echo $displayarray['desc2']; ?>
|
<?php echo $displayarray['desc2']; ?>
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
<br>
|
<br>
|
||||||
<table cellpadding="1" cellspacing="1" id="villages">
|
<table cellpadding="1" cellspacing="1" id="villages">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th colspan="3">Villages</th>
|
<th colspan="3">Villages</th>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Name</td>
|
<td>Name</td>
|
||||||
|
|
||||||
<td>Inhabitants</td>
|
<td>Inhabitants</td>
|
||||||
<td>Coordinates</td>
|
<td>Coordinates</td>
|
||||||
</tr>
|
</tr>
|
||||||
</thead><tbody>
|
</thead><tbody>
|
||||||
<?php
|
<?php
|
||||||
if(count($varray)>0){
|
if(count($varray)>0){
|
||||||
foreach($varray as $vil) {
|
foreach($varray as $vil) {
|
||||||
|
|
||||||
$coor = $database->getCoor($vil['wref']);
|
|
||||||
echo "<tr><td class=\"nam\"><a href=\"?wref=".$vil['wref']."\">".$vil['name']."</a>";
|
|
||||||
if($vil['capital'] == 1) {
|
|
||||||
echo "<span class=\"none3\"> (capital)</span>";
|
|
||||||
}
|
|
||||||
echo "</td>";
|
|
||||||
echo "<td class=\"hab\">".$vil['pop']."</td><td class=\"aligned_coords\">";
|
|
||||||
echo "<div class=\"cox\">(".$coor['x']."</div><div class=\"pi\">|</div><div class=\"coy\">".$coor['y'].")</div></td></tr>";
|
|
||||||
|
|
||||||
}
|
$coor = $database->getCoor($vil['wref']);
|
||||||
}
|
echo "<tr><td class=\"nam\"><a href=\"?wref=".$vil['wref']."\">".$vil['name']."</a>";
|
||||||
else{
|
if($vil['capital'] == 1) {
|
||||||
echo "<tr><td colspan=\"3\" class=\"none\">No village</td></tr>";
|
echo "<span class=\"none3\"> (capital)</span>";
|
||||||
}
|
}
|
||||||
?>
|
echo "</td>";
|
||||||
</tbody></table>
|
echo "<td class=\"hab\">".$vil['pop']."</td><td class=\"aligned_coords\">";
|
||||||
|
echo "<div class=\"cox\">(".$coor['x']."</div><div class=\"pi\">|</div><div class=\"coy\">".$coor['y'].")</div></td></tr>";
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
echo "<tr><td colspan=\"3\" class=\"none\">No village</td></tr>";
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</tbody></table>
|
||||||
|
|||||||
@@ -1,111 +1,111 @@
|
|||||||
<?php
|
<?php
|
||||||
$village = $database->getVillage($_GET['wref']);
|
$village = $database->getVillage($_GET['wref']);
|
||||||
?>
|
?>
|
||||||
<div id="content" class="player" style="width:100%">
|
<div id="content" class="player" style="width:100%">
|
||||||
<table id="profile" cellpadding="1" cellspacing="1" >
|
<table id="profile" cellpadding="1" cellspacing="1" >
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th colspan="2">Village: <a href="?wref=<?php echo $village['wref']; ?>"><?php echo $village['name']; ?></a> - user '<?php echo $village['owner']; ?>'</th>
|
<th colspan="2">Village: <a href="?wref=<?php echo $village['wref']; ?>"><?php echo $village['name']; ?></a> - user '<?php echo $village['owner']; ?>'</th>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Details</td>
|
<td>Details</td>
|
||||||
<td>Description</td>
|
<td>Description</td>
|
||||||
|
|
||||||
</tr>
|
</tr>
|
||||||
</thead><tbody>
|
</thead><tbody>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="empty"></td><td class="empty"></td>
|
<td class="empty"></td><td class="empty"></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="details">
|
<td class="details">
|
||||||
<table cellpadding="0" cellspacing="0">
|
<table cellpadding="0" cellspacing="0">
|
||||||
<tr>
|
<tr>
|
||||||
|
|
||||||
<th>Wood</th>
|
<th>Wood</th>
|
||||||
<td><?php echo $village['wood']; ?></td>
|
<td><?php echo $village['wood']; ?></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th>Clay</th>
|
<th>Clay</th>
|
||||||
<td><?php echo $village['clay']; ?></td>
|
<td><?php echo $village['clay']; ?></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<th>Iron</th>
|
<th>Iron</th>
|
||||||
<td><?php echo $village['iron']; ?></td>
|
<td><?php echo $village['iron']; ?></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th>Max store</th>
|
<th>Max store</th>
|
||||||
<td><?php echo $village['maxstore']; ?></td>
|
<td><?php echo $village['maxstore']; ?></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th>Crop</th>
|
<th>Crop</th>
|
||||||
<td><?php echo $village['crop']; ?></td>
|
<td><?php echo $village['crop']; ?></td>
|
||||||
|
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th>Max store</th>
|
<th>Max store</th>
|
||||||
<td><?php echo $village['maxcrop']; ?></td>
|
<td><?php echo $village['maxcrop']; ?></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th>Population</th>
|
<th>Population</th>
|
||||||
<td><?php echo $village['pop']; ?></td>
|
<td><?php echo $village['pop']; ?></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="2" class="empty"></td>
|
<td colspan="2" class="empty"></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="2"> <a href="?edit=user&uid=<?php echo $_GET['uid'];?>">» Change profile</a></td>
|
<td colspan="2"> <a href="?edit=user&uid=<?php echo $_GET['uid'];?>">» Change profile</a></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="2"> <a href="?action=message&id=<?php echo $_GET['uid'];?>">» Write message</a></td>
|
<td colspan="2"> <a href="?action=message&id=<?php echo $_GET['uid'];?>">» Write message</a></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="2"> <a href="#?uid=<?php echo $_GET['uid'];?>&delete=<?php echo $_GET['uid'];?>&where=user">» Delete player</a></td>
|
<td colspan="2"> <a href="#?uid=<?php echo $_GET['uid'];?>&delete=<?php echo $_GET['uid'];?>&where=user">» Delete player</a></td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
</td>
|
</td>
|
||||||
<td class="details">
|
<td class="details">
|
||||||
<table cellpadding="0" cellspacing="0">
|
<table cellpadding="0" cellspacing="0">
|
||||||
<tr>
|
<tr>
|
||||||
|
|
||||||
<th>Capital</th>
|
<th>Capital</th>
|
||||||
<td><?php echo $village['capital']; ?></td>
|
<td><?php echo $village['capital']; ?></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th>Clay</th>
|
<th>Clay</th>
|
||||||
<td><?php echo $village['clay']; ?></td>
|
<td><?php echo $village['clay']; ?></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<th>Iron</th>
|
<th>Iron</th>
|
||||||
<td><?php echo $village['iron']; ?></td>
|
<td><?php echo $village['iron']; ?></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th>Max store</th>
|
<th>Max store</th>
|
||||||
<td><?php echo $village['maxstore']; ?></td>
|
<td><?php echo $village['maxstore']; ?></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th>Crop</th>
|
<th>Crop</th>
|
||||||
<td><?php echo $village['crop']; ?></td>
|
<td><?php echo $village['crop']; ?></td>
|
||||||
|
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th>Max store</th>
|
<th>Max store</th>
|
||||||
<td><?php echo $village['maxcrop']; ?></td>
|
<td><?php echo $village['maxcrop']; ?></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th>Population</th>
|
<th>Population</th>
|
||||||
<td><?php echo $village['pop']; ?></td>
|
<td><?php echo $village['pop']; ?></td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
<br>
|
<br>
|
||||||
<table id="villages" cellpadding="1" cellspacing="1">
|
<table id="villages" cellpadding="1" cellspacing="1">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
@@ -124,13 +124,13 @@ $coor = $database->getCoor($vil['wref']);
|
|||||||
if($vil['capital']==1) {$cap = '<span class="none3">(capital)</span>';} else{$cap = "";}
|
if($vil['capital']==1) {$cap = '<span class="none3">(capital)</span>';} else{$cap = "";}
|
||||||
echo '
|
echo '
|
||||||
<tr>
|
<tr>
|
||||||
<td class="nam"><a href="?wref='.$vil['wref'].'">'.$vil['name'].'</a> '.$cap.'</td>
|
<td class="nam"><a href="?wref='.$vil['wref'].'">'.$vil['name'].'</a> '.$cap.'</td>
|
||||||
<td class="hab">'.$vil['pop'].'</td>
|
<td class="hab">'.$vil['pop'].'</td>
|
||||||
<td class="aligned_coords">
|
<td class="aligned_coords">
|
||||||
<div class="cox">('.$coor['x'].'</div>
|
<div class="cox">('.$coor['x'].'</div>
|
||||||
<div class="pi">|</div>
|
<div class="pi">|</div>
|
||||||
<div class="coy">'.$coor['y'].')</div>
|
<div class="coy">'.$coor['y'].')</div>
|
||||||
</td>
|
</td>
|
||||||
</tr>'; }
|
</tr>'; }
|
||||||
?>
|
?>
|
||||||
</tbody></table>
|
</tbody></table>
|
||||||
@@ -7,29 +7,29 @@ $log = $database->getUser_log($_GET['log_login']);
|
|||||||
<th colspan="10">User id <?php echo $_GET['log_login'];?> login log</th>
|
<th colspan="10">User id <?php echo $_GET['log_login'];?> login log</th>
|
||||||
</tr>
|
</tr>
|
||||||
<tr><td></td><td>Player</td><td>IP</td><td>Time</td><td></td></tr>
|
<tr><td></td><td>Player</td><td>IP</td><td>Time</td><td></td></tr>
|
||||||
</thead><tbody>
|
</thead><tbody>
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
if(count($log)>0) {
|
|
||||||
for ($i = 0; $i < count($log); $i++) {
|
|
||||||
|
|
||||||
//$del = '<td class="vil"><a href="?delete='.$log[$i]['id'].'&where=login_log"><img src="img/x.gif" class="del" title="cancel" alt="cancel"></a></td>';
|
if(count($log)>0) {
|
||||||
if(!$del){$del = '<td></td>';}
|
for ($i = 0; $i < count($log); $i++) {
|
||||||
$id = $i+1;
|
|
||||||
echo "<tr><td class=\"ra \" >".$id.".</td>";
|
|
||||||
echo "<td><a href=\"?uid=".$log[$i]['id']."\">".$database->getUserField($log[$i]['uid'],'username',0)."</a></td>";
|
|
||||||
echo "<td>".$log[$i]['ip']."</td>";
|
|
||||||
echo "<td>".date("d.m.y H:i:s",$log[$i]['time'])."</td>";
|
|
||||||
echo $del;
|
|
||||||
echo "</tr>";
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
//$del = '<td class="vil"><a href="?delete='.$log[$i]['id'].'&where=login_log"><img src="img/x.gif" class="del" title="cancel" alt="cancel"></a></td>';
|
||||||
else {
|
if(!$del){$del = '<td></td>';}
|
||||||
echo "<tr><td class=\"none\" colspan=\"7\">No logs</td></tr>";
|
$id = $i+1;
|
||||||
}
|
echo "<tr><td class=\"ra \" >".$id.".</td>";
|
||||||
|
echo "<td><a href=\"?uid=".$log[$i]['id']."\">".$database->getUserField($log[$i]['uid'],'username',0)."</a></td>";
|
||||||
?>
|
echo "<td>".$log[$i]['ip']."</td>";
|
||||||
|
echo "<td>".date("d.m.y H:i:s",$log[$i]['time'])."</td>";
|
||||||
|
echo $del;
|
||||||
|
echo "</tr>";
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
echo "<tr><td class=\"none\" colspan=\"7\">No logs</td></tr>";
|
||||||
|
}
|
||||||
|
|
||||||
|
?>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
|
|||||||
+16
-16
@@ -1,4 +1,4 @@
|
|||||||
<?php
|
<?php
|
||||||
#################################################################################
|
#################################################################################
|
||||||
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
||||||
## --------------------------------------------------------------------------- ##
|
## --------------------------------------------------------------------------- ##
|
||||||
@@ -11,7 +11,7 @@
|
|||||||
#################################################################################
|
#################################################################################
|
||||||
?>
|
?>
|
||||||
<style>
|
<style>
|
||||||
.del {width:12px; height:12px; background-image: url(img/admin/icon/del.gif);}
|
.del {width:12px; height:12px; background-image: url(img/admin/icon/del.gif);}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<form action="" method="get">
|
<form action="" method="get">
|
||||||
@@ -20,29 +20,29 @@
|
|||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th colspan="6">Ban</th>
|
<th colspan="6">Ban</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr>
|
<tr>
|
||||||
<td>User ID</td>
|
<td>User ID</td>
|
||||||
<td>
|
<td>
|
||||||
<input type="text" class="fm" name="uid" value="<?php echo $_GET['uid'];?>">
|
<input type="text" class="fm" name="uid" value="<?php echo $_GET['uid'];?>">
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Reason</td>
|
<td>Reason</td>
|
||||||
<td>
|
<td>
|
||||||
<select name="reason" class="fm">
|
<select name="reason" class="fm">
|
||||||
<?php
|
<?php
|
||||||
$arr = array('Pushing','Cheat','Hack','Bug','Bad Name','Multi Account','Swearing');
|
$arr = array('Pushing','Cheat','Hack','Bug','Bad Name','Multi Account','Swearing');
|
||||||
foreach($arr as $r)
|
foreach($arr as $r)
|
||||||
{
|
{
|
||||||
echo '<option value="'.$r.'">'.$r.'</option>';
|
echo '<option value="'.$r.'">'.$r.'</option>';
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</select>
|
</select>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Duration</td>
|
<td>Duration</td>
|
||||||
<td>
|
<td>
|
||||||
@@ -61,10 +61,10 @@
|
|||||||
echo '<option value="">Forever</option>';
|
echo '<option value="">Forever</option>';
|
||||||
?>
|
?>
|
||||||
</select>
|
</select>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="2" class="on"><input type="image" src="../img/admin/b/ok1.gif" value="submit"></td>
|
<td colspan="2" class="on"><input type="image" src="../img/admin/b/ok1.gif" value="submit"></td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
@@ -75,7 +75,7 @@ $bannedUsers = $admin->search_banned();
|
|||||||
?>
|
?>
|
||||||
|
|
||||||
<table id="member" cellpadding="1" cellspacing="1">
|
<table id="member" cellpadding="1" cellspacing="1">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th colspan="6">Bannned Players (<?php echo count($bannedUsers); ?>)</th>
|
<th colspan="6">Bannned Players (<?php echo count($bannedUsers); ?>)</th>
|
||||||
</tr>
|
</tr>
|
||||||
@@ -101,7 +101,7 @@ $bannedUsers = $admin->search_banned();
|
|||||||
{
|
{
|
||||||
$name = $database->getUserField($bannedUsers[$i]['uid'],'username',0);
|
$name = $database->getUserField($bannedUsers[$i]['uid'],'username',0);
|
||||||
$link = '<a href="?p=player&uid='.$bannedUsers[$i]['uid'].'">'.$name.'<a/>';
|
$link = '<a href="?p=player&uid='.$bannedUsers[$i]['uid'].'">'.$name.'<a/>';
|
||||||
}
|
}
|
||||||
if($bannedUsers[$i]['end'])
|
if($bannedUsers[$i]['end'])
|
||||||
{
|
{
|
||||||
$end = date("d.m.y H:i",$bannedUsers[$i]['end']);
|
$end = date("d.m.y H:i",$bannedUsers[$i]['end']);
|
||||||
@@ -124,5 +124,5 @@ $bannedUsers = $admin->search_banned();
|
|||||||
echo '<tr><td colspan="6" class="on">No Players are Banned</td></tr>';
|
echo '<tr><td colspan="6" class="on">No Players are Banned</td></tr>';
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
<?php
|
<?php
|
||||||
#################################################################################
|
#################################################################################
|
||||||
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
||||||
## --------------------------------------------------------------------------- ##
|
## --------------------------------------------------------------------------- ##
|
||||||
@@ -32,8 +32,8 @@ Heed the following advice when writing your message:
|
|||||||
● Multihunters can review enormous amounts of information about accounts. <u>Stick to the truth</u> and do not make excuses to justify your violation of the rules.
|
● Multihunters can review enormous amounts of information about accounts. <u>Stick to the truth</u> and do not make excuses to justify your violation of the rules.
|
||||||
</br>
|
</br>
|
||||||
● Be cooperative and insightful, this might reduce the punishment.
|
● Be cooperative and insightful, this might reduce the punishment.
|
||||||
</br>
|
</br>
|
||||||
● If the Multihunter does not answer immediately, then he/she is probably not online. The issue will not be resolved any faster by sending multiple messages, especially if he/she did not even read the first one yet.
|
● If the Multihunter does not answer immediately, then he/she is probably not online. The issue will not be resolved any faster by sending multiple messages, especially if he/she did not even read the first one yet.
|
||||||
</br>
|
</br>
|
||||||
● If you have really been banned unjustly, try to stay <u>calm and polite</u> while talking to the Multihunter and telling him/her about your point of view.
|
● If you have really been banned unjustly, try to stay <u>calm and polite</u> while talking to the Multihunter and telling him/her about your point of view.
|
||||||
</p>
|
</p>
|
||||||
+162
-162
@@ -1,4 +1,4 @@
|
|||||||
<?php
|
<?php
|
||||||
#################################################################################
|
#################################################################################
|
||||||
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
||||||
## --------------------------------------------------------------------------- ##
|
## --------------------------------------------------------------------------- ##
|
||||||
@@ -16,78 +16,78 @@ if ($_SESSON['access'] == MULTIHUNTER) die("<br /><br /><br /><br /><br /><br />
|
|||||||
?>
|
?>
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
.del {width:12px; height:12px; background-image: url(img/admin/icon/del.gif);}
|
.del {width:12px; height:12px; background-image: url(img/admin/icon/del.gif);}
|
||||||
</style>
|
</style>
|
||||||
<h2><center>Made by Dzoki</center></h2>
|
<h2><center>Made by Dzoki</center></h2>
|
||||||
<table id="member">
|
<table id="member">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th>~ Server Settings ~</th>
|
<th>~ Server Settings ~</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
<table id="profile">
|
<table id="profile">
|
||||||
<tr>
|
|
||||||
<td class="b">Variable</td>
|
|
||||||
<td class="b">Value</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>Server Name</td>
|
|
||||||
<td><?php echo SERVER_NAME;?></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
<tr>
|
||||||
<td>Server Started</td>
|
<td class="b">Variable</td>
|
||||||
<td><?php echo date("d.m.y H:i",COMMENCE);?></td>
|
<td class="b">Value</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
|
||||||
<td>Language</td>
|
|
||||||
<td><?php if(LANG == en){ echo "English"; } ?></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>Server Speed</td>
|
|
||||||
<td><?php echo ''.SPEED.'x';?></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>Map Size</td>
|
|
||||||
<td><?php echo WORLD_MAX;?>x<?php echo WORLD_MAX;?></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
<tr>
|
||||||
<td>Troop Speed</td>
|
<td>Server Name</td>
|
||||||
<td><?php echo INCREASE_SPEED;?>x</td>
|
<td><?php echo SERVER_NAME;?></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>Server Started</td>
|
||||||
|
<td><?php echo date("d.m.y H:i",COMMENCE);?></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>Language</td>
|
||||||
|
<td><?php if(LANG == en){ echo "English"; } ?></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>Server Speed</td>
|
||||||
|
<td><?php echo ''.SPEED.'x';?></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>Map Size</td>
|
||||||
|
<td><?php echo WORLD_MAX;?>x<?php echo WORLD_MAX;?></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>Troop Speed</td>
|
||||||
|
<td><?php echo INCREASE_SPEED;?>x</td>
|
||||||
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Village Expanding Speed</td>
|
<td>Village Expanding Speed</td>
|
||||||
<td><?php if(CP == 0){ echo "Fast"; } else if(CP == 1){ echo "Slow"; } ?></td>
|
<td><?php if(CP == 0){ echo "Fast"; } else if(CP == 1){ echo "Slow"; } ?></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
|
||||||
<td>Beginners Protection</td>
|
|
||||||
<td><?php echo (PROTECTION/3600);?> hour/s</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
<tr>
|
||||||
<td>Activation Mail</td>
|
<td>Beginners Protection</td>
|
||||||
<td><?php if(AUTH_EMAIL == true) { echo "<b><font color='Green'>Enabled</font></b>"; } else if(AUTH_EMAIL == false){ echo "<b><font color='Red'>Disabled</font></b>"; } ?></td>
|
<td><?php echo (PROTECTION/3600);?> hour/s</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>Activation Mail</td>
|
||||||
|
<td><?php if(AUTH_EMAIL == true) { echo "<b><font color='Green'>Enabled</font></b>"; } else if(AUTH_EMAIL == false){ echo "<b><font color='Red'>Disabled</font></b>"; } ?></td>
|
||||||
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Quest</td>
|
<td>Quest</td>
|
||||||
<td><?php if(QUEST == true) { echo "<b><font color='Green'>Enabled</font></b>"; } else if(QUEST == false) { echo "<b><font color='Red'>Disabled</font></b>"; } ?></td>
|
<td><?php if(QUEST == true) { echo "<b><font color='Green'>Enabled</font></b>"; } else if(QUEST == false) { echo "<b><font color='Red'>Disabled</font></b>"; } ?></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Demolish - Level required</td>
|
<td>Demolish - Level required</td>
|
||||||
<td><?php echo DEMOLISH_LEVEL_REQ; ?></td>
|
<td><?php echo DEMOLISH_LEVEL_REQ; ?></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>World Wonder - Statistics</td>
|
<td>World Wonder - Statistics</td>
|
||||||
<td><?php if(WW == true) { echo "<b><font color='Green'>Enabled</font></b>"; } else if(WW == false) { echo "<b><font color='Red'>Disabled</font></b>"; } ?></td>
|
<td><?php if(WW == true) { echo "<b><font color='Green'>Enabled</font></b>"; } else if(WW == false) { echo "<b><font color='Red'>Disabled</font></b>"; } ?></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><b><font color='#71D000'>P</font><font color='#FF6F0F'>l</font><font color='#71D000'>u</font><font color='#FF6F0F'>s</font></b> account duration</td>
|
<td><b><font color='#71D000'>P</font><font color='#FF6F0F'>l</font><font color='#71D000'>u</font><font color='#FF6F0F'>s</font></b> account duration</td>
|
||||||
<td><?php if(PLUS_TIME >= 86400){ echo ''.(PLUS_TIME/86400).' Days'; } else if(PLUS_TIME < 86400){ echo ''.(PLUS_TIME/3600).' Hours'; } ?></td>
|
<td><?php if(PLUS_TIME >= 86400){ echo ''.(PLUS_TIME/86400).' Days'; } else if(PLUS_TIME < 86400){ echo ''.(PLUS_TIME/3600).' Hours'; } ?></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>+25% production duration</td>
|
<td>+25% production duration</td>
|
||||||
<td><?php if(PLUS_PRODUCTION >= 86400){ echo ''.(PLUS_PRODUCTION/86400).' Days'; } else if(PLUS_PRODUCTION < 86400){ echo ''.(PLUS_PRODUCTION/3600).' Hours'; } ?></td>
|
<td><?php if(PLUS_PRODUCTION >= 86400){ echo ''.(PLUS_PRODUCTION/86400).' Days'; } else if(PLUS_PRODUCTION < 86400){ echo ''.(PLUS_PRODUCTION/3600).' Hours'; } ?></td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
<table id="member">
|
<table id="member">
|
||||||
@@ -96,60 +96,60 @@ if ($_SESSON['access'] == MULTIHUNTER) die("<br /><br /><br /><br /><br /><br />
|
|||||||
<th>~ Log Settings ~</th>
|
<th>~ Log Settings ~</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
<table id="profile">
|
<table id="profile">
|
||||||
<tr>
|
<tr>
|
||||||
<td class="b">Variable</td>
|
<td class="b">Variable</td>
|
||||||
<td class="b">Value</td>
|
<td class="b">Value</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Log Build</td>
|
<td>Log Build</td>
|
||||||
<td><?php if(LOG_BUILD == true) { echo "<b><font color='Green'>Enabled</font></b>"; } else if(LOG_BUILD == false){ echo "<b><font color='Red'>Disabled</font></b>"; } ?></td>
|
<td><?php if(LOG_BUILD == true) { echo "<b><font color='Green'>Enabled</font></b>"; } else if(LOG_BUILD == false){ echo "<b><font color='Red'>Disabled</font></b>"; } ?></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Log Technology</td>
|
<td>Log Technology</td>
|
||||||
<td><?php if(LOG_TECH == true) { echo "<b><font color='Green'>Enabled</font></b>"; } else if(LOG_TECH == false){ echo "<b><font color='Red'>Disabled</font></b>"; } ?></td>
|
<td><?php if(LOG_TECH == true) { echo "<b><font color='Green'>Enabled</font></b>"; } else if(LOG_TECH == false){ echo "<b><font color='Red'>Disabled</font></b>"; } ?></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Log Login</td>
|
<td>Log Login</td>
|
||||||
<td><?php if(LOG_LOGIN == true) { echo "<b><font color='Green'>Enabled</font></b>"; } else if(LOG_LOGIN == false){ echo "<b><font color='Red'>Disabled</font></b>"; } ?></td>
|
<td><?php if(LOG_LOGIN == true) { echo "<b><font color='Green'>Enabled</font></b>"; } else if(LOG_LOGIN == false){ echo "<b><font color='Red'>Disabled</font></b>"; } ?></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Log Gold</td>
|
<td>Log Gold</td>
|
||||||
<td><?php if(LOG_GOLD_FIN == true) { echo "<b><font color='Green'>Enabled</font></b>"; } else if(ALOG_GOLD_FIN == false){ echo "<b><font color='Red'>Disabled</font></b>"; } ?></td>
|
<td><?php if(LOG_GOLD_FIN == true) { echo "<b><font color='Green'>Enabled</font></b>"; } else if(ALOG_GOLD_FIN == false){ echo "<b><font color='Red'>Disabled</font></b>"; } ?></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Log Admin</td>
|
<td>Log Admin</td>
|
||||||
<td><?php if(LOG_ADMIN == true) { echo "<b><font color='Green'>Enabled</font></b>"; } else if(LOG_ADMIN == false){ echo "<b><font color='Red'>Disabled</font></b>"; } ?></td>
|
<td><?php if(LOG_ADMIN == true) { echo "<b><font color='Green'>Enabled</font></b>"; } else if(LOG_ADMIN == false){ echo "<b><font color='Red'>Disabled</font></b>"; } ?></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Log War</td>
|
<td>Log War</td>
|
||||||
<td><?php if(LOG_WAR == true) { echo "<b><font color='Green'>Enabled</font></b>"; } else if(LOG_WAR == false){ echo "<b><font color='Red'>Disabled</font></b>"; } ?></td>
|
<td><?php if(LOG_WAR == true) { echo "<b><font color='Green'>Enabled</font></b>"; } else if(LOG_WAR == false){ echo "<b><font color='Red'>Disabled</font></b>"; } ?></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Log Market</td>
|
<td>Log Market</td>
|
||||||
<td><?php if(LOG_MARKET == true) { echo "<b><font color='Green'>Enabled</font></b>"; } else if(LOG_MARKET == false){ echo "<b><font color='Red'>Disabled</font></b>"; } ?></td>
|
<td><?php if(LOG_MARKET == true) { echo "<b><font color='Green'>Enabled</font></b>"; } else if(LOG_MARKET == false){ echo "<b><font color='Red'>Disabled</font></b>"; } ?></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Log Illegal</td>
|
<td>Log Illegal</td>
|
||||||
<td><?php if(LOG_ILLEGAL == true) { echo "<b><font color='Green'>Enabled</font></b>"; } else if(LOG_ILLEGAL == false){ echo "<b><font color='Red'>Disabled</font></b>"; } ?></td>
|
<td><?php if(LOG_ILLEGAL == true) { echo "<b><font color='Green'>Enabled</font></b>"; } else if(LOG_ILLEGAL == false){ echo "<b><font color='Red'>Disabled</font></b>"; } ?></td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
<table id="member">
|
<table id="member">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th>~ Newsbox Settings ~</th>
|
<th>~ Newsbox Settings ~</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
<table id="profile">
|
<table id="profile">
|
||||||
<tr>
|
<tr>
|
||||||
<td class="b">Variable</td>
|
<td class="b">Variable</td>
|
||||||
<td class="b">Value</td>
|
<td class="b">Value</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Newsbox 1</td>
|
<td>Newsbox 1</td>
|
||||||
<td><?php if(NEWSBOX1 == true){ echo "<b><font color='Green'>Enabled</font></b>"; } else if(NEWSBOX1 == false){ echo "<b><font color='Red'>Disabled</font></b>"; } ?> </td>
|
<td><?php if(NEWSBOX1 == true){ echo "<b><font color='Green'>Enabled</font></b>"; } else if(NEWSBOX1 == false){ echo "<b><font color='Red'>Disabled</font></b>"; } ?> </td>
|
||||||
@@ -168,14 +168,14 @@ if ($_SESSON['access'] == MULTIHUNTER) die("<br /><br /><br /><br /><br /><br />
|
|||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Home 2</td>
|
<td>Home 2</td>
|
||||||
<td><?php if(HOME2 == true){ echo "<b><font color='Green'>Enabled</font></b>"; } else if(HOME2 == false){ echo "<b><font color='Red'>Disabled</font></b>"; } ?> </td>
|
<td><?php if(HOME2 == true){ echo "<b><font color='Green'>Enabled</font></b>"; } else if(HOME2 == false){ echo "<b><font color='Red'>Disabled</font></b>"; } ?> </td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Home 3</td>
|
<td>Home 3</td>
|
||||||
<td><?php if(HOME3 == true){ echo "<b><font color='Green'>Enabled</font></b>"; } else if(HOME3 == false){ echo "<b><font color='Red'>Disabled</font></b>"; } ?> </td>
|
<td><?php if(HOME3 == true){ echo "<b><font color='Green'>Enabled</font></b>"; } else if(HOME3 == false){ echo "<b><font color='Red'>Disabled</font></b>"; } ?> </td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
<table id="member">
|
<table id="member">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
@@ -183,38 +183,38 @@ if ($_SESSON['access'] == MULTIHUNTER) die("<br /><br /><br /><br /><br /><br />
|
|||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
<table id="profile">
|
<table id="profile">
|
||||||
<tr>
|
<tr>
|
||||||
<td class="b">Variable</td>
|
<td class="b">Variable</td>
|
||||||
<td class="b">Value</td>
|
<td class="b">Value</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
|
||||||
<td>Hostname</td>
|
|
||||||
<td><?php echo SQL_SERVER;?></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
<tr>
|
||||||
<td>DB Username</td>
|
<td>Hostname</td>
|
||||||
<td><?php echo SQL_USER;?></td>
|
<td><?php echo SQL_SERVER;?></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>DB Password</td>
|
<td>DB Username</td>
|
||||||
<td>*********</td>
|
<td><?php echo SQL_USER;?></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>DB Name</td>
|
<td>DB Password</td>
|
||||||
<td><?php echo SQL_DB;?></td>
|
<td>*********</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Table Prefix</td>
|
<td>DB Name</td>
|
||||||
<td><?php echo TB_PREFIX;?></td>
|
<td><?php echo SQL_DB;?></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>DB Type</td>
|
<td>Table Prefix</td>
|
||||||
<td><?php if(DB_TYPE == 0) { echo "MYSQL"; } else if(DB_TYPE == 1) { echo "MYSQLi"; } ?></td>
|
<td><?php echo TB_PREFIX;?></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>DB Type</td>
|
||||||
|
<td><?php if(DB_TYPE == 0) { echo "MYSQL"; } else if(DB_TYPE == 1) { echo "MYSQLi"; } ?></td>
|
||||||
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
<table id="member">
|
<table id="member">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
@@ -223,23 +223,23 @@ if ($_SESSON['access'] == MULTIHUNTER) die("<br /><br /><br /><br /><br /><br />
|
|||||||
</thead>
|
</thead>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
<table id="profile">
|
<table id="profile">
|
||||||
<tr>
|
<tr>
|
||||||
<td class="b">Variable</td>
|
<td class="b">Variable</td>
|
||||||
<td class="b">Value</td>
|
<td class="b">Value</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
|
||||||
<td>Limit Mailbox</td>
|
|
||||||
<td><?php if(LIMIT_MAILBOX == true){ echo "<b><font color='Green'>Enabled</font></b>"; } else if(LIMIT_MAILBOX == false){ echo "<b><font color='Red'>Disabled</font></b>"; } ?></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
<tr>
|
||||||
<td>Max number of mails</td>
|
<td>Limit Mailbox</td>
|
||||||
<td><?php if(LIMIT_MAILBOX == true){ echo MAX_MAIL; } else if(LIMIT_MAILBOX == false){ echo "<font color='Gray'>Limit mailbox disabled</font>"; } ?></td>
|
<td><?php if(LIMIT_MAILBOX == true){ echo "<b><font color='Green'>Enabled</font></b>"; } else if(LIMIT_MAILBOX == false){ echo "<b><font color='Red'>Disabled</font></b>"; } ?></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Include Admin in rank</td>
|
<td>Max number of mails</td>
|
||||||
<td><?php if(INCLUDE_ADMIN == true){ echo "<b><font color='Green'>Enabled</font></b>"; } else if(INCLUDE_ADMIN == false){ echo "<b><font color='Red'>Disabled</font></b>"; } ?></td>
|
<td><?php if(LIMIT_MAILBOX == true){ echo MAX_MAIL; } else if(LIMIT_MAILBOX == false){ echo "<font color='Gray'>Limit mailbox disabled</font>"; } ?></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>Include Admin in rank</td>
|
||||||
|
<td><?php if(INCLUDE_ADMIN == true){ echo "<b><font color='Green'>Enabled</font></b>"; } else if(INCLUDE_ADMIN == false){ echo "<b><font color='Red'>Disabled</font></b>"; } ?></td>
|
||||||
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
<table id="member">
|
<table id="member">
|
||||||
@@ -249,32 +249,32 @@ if ($_SESSON['access'] == MULTIHUNTER) die("<br /><br /><br /><br /><br /><br />
|
|||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
</table>
|
</table>
|
||||||
<table id="profile">
|
<table id="profile">
|
||||||
<tr>
|
<tr>
|
||||||
<td class="b">Variable</td>
|
<td class="b">Variable</td>
|
||||||
<td class="b">Value</td>
|
<td class="b">Value</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
|
||||||
<td>Admin Email</td>
|
|
||||||
<td><?php if(ADMIN_EMAIL == ''){ echo "<b><font color='Red'>No admin email defined!</b></font>"; } else if(ADMIN_EMAIL != ''){ echo ADMIN_EMAIL; } ?></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
<tr>
|
||||||
<td>Admin Name</td>
|
<td>Admin Email</td>
|
||||||
<td><?php if(ADMIN_NAME == ''){ echo "<b><font color='Red'>No admin name defined!</b></font>"; } else if(ADMIN_NAME != ''){ echo ADMIN_NAME; } ?></td>
|
<td><?php if(ADMIN_EMAIL == ''){ echo "<b><font color='Red'>No admin email defined!</b></font>"; } else if(ADMIN_EMAIL != ''){ echo ADMIN_EMAIL; } ?></td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
<tr>
|
||||||
|
<td>Admin Name</td>
|
||||||
|
<td><?php if(ADMIN_NAME == ''){ echo "<b><font color='Red'>No admin name defined!</b></font>"; } else if(ADMIN_NAME != ''){ echo ADMIN_NAME; } ?></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
function define_array( $array, $keys = NULL )
|
function define_array( $array, $keys = NULL )
|
||||||
{
|
{
|
||||||
foreach( $array as $key => $value )
|
foreach( $array as $key => $value )
|
||||||
{
|
{
|
||||||
$keyname = ($keys ? $keys . "_" : "") . $key;
|
$keyname = ($keys ? $keys . "_" : "") . $key;
|
||||||
if( is_array( $array[$key] ) )
|
if( is_array( $array[$key] ) )
|
||||||
define_array( $array[$key], $keyname );
|
define_array( $array[$key], $keyname );
|
||||||
else
|
else
|
||||||
define( $keyname, $value );
|
define( $keyname, $value );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//define_array($array);
|
//define_array($array);
|
||||||
?>
|
?>
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
<?php
|
<?php
|
||||||
#################################################################################
|
#################################################################################
|
||||||
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
||||||
## --------------------------------------------------------------------------- ##
|
## --------------------------------------------------------------------------- ##
|
||||||
@@ -25,7 +25,7 @@ $nummedals = mysql_num_rows($sql);
|
|||||||
<tr>
|
<tr>
|
||||||
<th>Medal Information</th>
|
<th>Medal Information</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
</table>
|
</table>
|
||||||
<table id="profile">
|
<table id="profile">
|
||||||
<thead>
|
<thead>
|
||||||
@@ -60,7 +60,7 @@ $nummedals = mysql_num_rows($sql);
|
|||||||
<tr>
|
<tr>
|
||||||
<th>Medal Week by Week</th>
|
<th>Medal Week by Week</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
</table>
|
</table>
|
||||||
<table id="profile">
|
<table id="profile">
|
||||||
<thead>
|
<thead>
|
||||||
@@ -94,7 +94,7 @@ $nummedals = mysql_num_rows($sql);
|
|||||||
<tr>
|
<tr>
|
||||||
<th>All Medals (<?php echo $nummedals; ?>)</th>
|
<th>All Medals (<?php echo $nummedals; ?>)</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
</table>
|
</table>
|
||||||
<table id="profile">
|
<table id="profile">
|
||||||
<thead>
|
<thead>
|
||||||
@@ -116,7 +116,7 @@ $nummedals = mysql_num_rows($sql);
|
|||||||
{
|
{
|
||||||
$i = $i + 1;
|
$i = $i + 1;
|
||||||
$titel="Bonus";
|
$titel="Bonus";
|
||||||
switch ($row['categorie'])
|
switch ($row['categorie'])
|
||||||
{
|
{
|
||||||
case "1": $titel="Attackers"; break;
|
case "1": $titel="Attackers"; break;
|
||||||
case "2": $titel="Defenders"; break;
|
case "2": $titel="Defenders"; break;
|
||||||
@@ -129,11 +129,11 @@ $nummedals = mysql_num_rows($sql);
|
|||||||
$points = $row['points'];
|
$points = $row['points'];
|
||||||
$bb = $row['id'];
|
$bb = $row['id'];
|
||||||
$allyid = $row['allyid'];
|
$allyid = $row['allyid'];
|
||||||
|
|
||||||
$unq = "SELECT name FROM ".TB_PREFIX."alidata WHERE id = ".$allyid."";
|
$unq = "SELECT name FROM ".TB_PREFIX."alidata WHERE id = ".$allyid."";
|
||||||
$user = mysql_result(mysql_query($unq), 0);
|
$user = mysql_result(mysql_query($unq), 0);
|
||||||
$allyname = $user;
|
$allyname = $user;
|
||||||
|
|
||||||
$alliance = '<a href="admin.php?p=alliance&aid='.$allyid.'">'.$allyname.'</a>';
|
$alliance = '<a href="admin.php?p=alliance&aid='.$allyid.'">'.$allyname.'</a>';
|
||||||
echo"
|
echo"
|
||||||
<tr>
|
<tr>
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
<?php
|
<?php
|
||||||
#################################################################################
|
#################################################################################
|
||||||
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
||||||
## --------------------------------------------------------------------------- ##
|
## --------------------------------------------------------------------------- ##
|
||||||
@@ -11,8 +11,8 @@
|
|||||||
|
|
||||||
if($_GET['uid'])
|
if($_GET['uid'])
|
||||||
{
|
{
|
||||||
$user = $database->getUserArray($_GET['uid'],1);
|
$user = $database->getUserArray($_GET['uid'],1);
|
||||||
$varray = $database->getProfileVillages($_GET['uid']);
|
$varray = $database->getProfileVillages($_GET['uid']);
|
||||||
if($user)
|
if($user)
|
||||||
{
|
{
|
||||||
$totalpop = 0;
|
$totalpop = 0;
|
||||||
@@ -21,13 +21,13 @@ if($_GET['uid'])
|
|||||||
$totalpop += $vil['pop'];
|
$totalpop += $vil['pop'];
|
||||||
} ?>
|
} ?>
|
||||||
<style>
|
<style>
|
||||||
.del {width:12px; height:12px; background-image: url(img/admin/icon/del.gif);}
|
.del {width:12px; height:12px; background-image: url(img/admin/icon/del.gif);}
|
||||||
</style>
|
</style>
|
||||||
<form action="" method="post">
|
<form action="" method="post">
|
||||||
<input type="hidden" name="action" value="DelPlayer">
|
<input type="hidden" name="action" value="DelPlayer">
|
||||||
<input type="hidden" name="uid" value="<?php echo $user['id'];?>">
|
<input type="hidden" name="uid" value="<?php echo $user['id'];?>">
|
||||||
<input type="hidden" name="admid" id="admid" value="<?php echo $_SESSION['id']; ?>">
|
<input type="hidden" name="admid" id="admid" value="<?php echo $_SESSION['id']; ?>">
|
||||||
<table id="member">
|
<table id="member">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th colspan="4">Delete player</th>
|
<th colspan="4">Delete player</th>
|
||||||
@@ -57,12 +57,12 @@ if($_GET['uid'])
|
|||||||
</td>
|
</td>
|
||||||
<td><b><font color='#71D000'>P</font><font color='#FF6F0F'>l</font><font color='#71D000'>u</font><font color='#FF6F0F'>s</font></b>:</td>
|
<td><b><font color='#71D000'>P</font><font color='#FF6F0F'>l</font><font color='#71D000'>u</font><font color='#FF6F0F'>s</font></b>:</td>
|
||||||
<td>
|
<td>
|
||||||
<?php
|
<?php
|
||||||
$plus = date('d.m.Y H:i',$user['plus']);
|
$plus = date('d.m.Y H:i',$user['plus']);
|
||||||
echo $plus;
|
echo $plus;
|
||||||
?>
|
?>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Alliance:</td>
|
<td>Alliance:</td>
|
||||||
<td><?php echo $database->getAllianceName($user['alliance']);?></td>
|
<td><?php echo $database->getAllianceName($user['alliance']);?></td>
|
||||||
@@ -80,7 +80,7 @@ if($_GET['uid'])
|
|||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
<br /><br /><font color="Red"><b>NOTICE: DELETE ALL PLAYER VILLAGES BELLOW BEFORE DELETING PLAYER!</font></b><br /><br />
|
<br /><br /><font color="Red"><b>NOTICE: DELETE ALL PLAYER VILLAGES BELLOW BEFORE DELETING PLAYER!</font></b><br /><br />
|
||||||
|
|
||||||
<table id="profile">
|
<table id="profile">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
@@ -89,7 +89,7 @@ if($_GET['uid'])
|
|||||||
<th>Coordinates</th>
|
<th>Coordinates</th>
|
||||||
<th></th>
|
<th></th>
|
||||||
</tr>
|
</tr>
|
||||||
<?php
|
<?php
|
||||||
for ($i = 0; $i <= count($varray)-1; $i++)
|
for ($i = 0; $i <= count($varray)-1; $i++)
|
||||||
{
|
{
|
||||||
$coorproc = $database->getCoor($varray[$i]['wref']);
|
$coorproc = $database->getCoor($varray[$i]['wref']);
|
||||||
@@ -108,8 +108,8 @@ if($_GET['uid'])
|
|||||||
<td>'.$varray[$i]['pop'].' <a href="?action=recountPop&did='.$varray[$i]['wref'].'">Check<a/></td>
|
<td>'.$varray[$i]['pop'].' <a href="?action=recountPop&did='.$varray[$i]['wref'].'">Check<a/></td>
|
||||||
<td>('.$coorproc['x'].'|'.$coorproc['y'].')</td>
|
<td>('.$coorproc['x'].'|'.$coorproc['y'].')</td>
|
||||||
<td>'.$delLink.' </td>
|
<td>'.$delLink.' </td>
|
||||||
</tr>';
|
</tr>';
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</thead>
|
</thead>
|
||||||
</table>
|
</table>
|
||||||
@@ -120,4 +120,4 @@ else
|
|||||||
{
|
{
|
||||||
include("404.tpl");
|
include("404.tpl");
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
<?php
|
<?php
|
||||||
#################################################################################
|
#################################################################################
|
||||||
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
||||||
## --------------------------------------------------------------------------- ##
|
## --------------------------------------------------------------------------- ##
|
||||||
@@ -26,7 +26,7 @@ $nummedals = mysql_num_rows($sql);
|
|||||||
<tr>
|
<tr>
|
||||||
<th>Medal Information</th>
|
<th>Medal Information</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
</table>
|
</table>
|
||||||
<table id="profile">
|
<table id="profile">
|
||||||
<thead>
|
<thead>
|
||||||
@@ -61,7 +61,7 @@ $nummedals = mysql_num_rows($sql);
|
|||||||
<tr>
|
<tr>
|
||||||
<th>Medal Week by Week</th>
|
<th>Medal Week by Week</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
</table>
|
</table>
|
||||||
<table id="profile">
|
<table id="profile">
|
||||||
<thead>
|
<thead>
|
||||||
@@ -76,10 +76,10 @@ $nummedals = mysql_num_rows($sql);
|
|||||||
for($j = 0; $j<$week; $j++)
|
for($j = 0; $j<$week; $j++)
|
||||||
{
|
{
|
||||||
$newweek = $j+1;
|
$newweek = $j+1;
|
||||||
|
|
||||||
$sql = mysql_query("SELECT * FROM ".TB_PREFIX."medal WHERE week = $newweek");
|
$sql = mysql_query("SELECT * FROM ".TB_PREFIX."medal WHERE week = $newweek");
|
||||||
$tot = mysql_num_rows($sql);
|
$tot = mysql_num_rows($sql);
|
||||||
|
|
||||||
echo "<tr><td>$newweek</td><td>$tot</td><td><input type=\"image\" name=\"medalweek\" value=\"".$newweek."\" style=\"background-image: url('../<?php echo GP_LOCATE; ?>img/a/del.gif'); height: 12px; width: 12px;\" src=\"../<?php echo GP_LOCATE; ?>img/a/x.gif\"></td>";
|
echo "<tr><td>$newweek</td><td>$tot</td><td><input type=\"image\" name=\"medalweek\" value=\"".$newweek."\" style=\"background-image: url('../<?php echo GP_LOCATE; ?>img/a/del.gif'); height: 12px; width: 12px;\" src=\"../<?php echo GP_LOCATE; ?>img/a/x.gif\"></td>";
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
@@ -99,7 +99,7 @@ $nummedals = mysql_num_rows($sql);
|
|||||||
<tr>
|
<tr>
|
||||||
<th>All Medals (<?php echo $nummedals; ?>)</th>
|
<th>All Medals (<?php echo $nummedals; ?>)</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
</table>
|
</table>
|
||||||
<table id="profile">
|
<table id="profile">
|
||||||
<thead>
|
<thead>
|
||||||
@@ -121,7 +121,7 @@ $nummedals = mysql_num_rows($sql);
|
|||||||
{
|
{
|
||||||
$i = $i + 1;
|
$i = $i + 1;
|
||||||
$titel="Bonus";
|
$titel="Bonus";
|
||||||
switch ($row['categorie'])
|
switch ($row['categorie'])
|
||||||
{
|
{
|
||||||
case "1": $titel="Attackers"; break;
|
case "1": $titel="Attackers"; break;
|
||||||
case "2": $titel="Defenders"; break;
|
case "2": $titel="Defenders"; break;
|
||||||
@@ -142,11 +142,11 @@ $nummedals = mysql_num_rows($sql);
|
|||||||
$points = $row['points'];
|
$points = $row['points'];
|
||||||
$bb = $row['id'];
|
$bb = $row['id'];
|
||||||
$playerid = $row['userid'];
|
$playerid = $row['userid'];
|
||||||
|
|
||||||
$unq = "SELECT username FROM ".TB_PREFIX."users where id = $playerid";
|
$unq = "SELECT username FROM ".TB_PREFIX."users where id = $playerid";
|
||||||
$user = mysql_result(mysql_query($unq), 0);
|
$user = mysql_result(mysql_query($unq), 0);
|
||||||
$username = $user;
|
$username = $user;
|
||||||
|
|
||||||
$player = "<a href=\"admin.php?p=player&uid=".$playerid."\">$username</a>";
|
$player = "<a href=\"admin.php?p=player&uid=".$playerid."\">$username</a>";
|
||||||
echo"
|
echo"
|
||||||
<tr>
|
<tr>
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
<?php
|
<?php
|
||||||
#################################################################################
|
#################################################################################
|
||||||
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
||||||
## --------------------------------------------------------------------------- ##
|
## --------------------------------------------------------------------------- ##
|
||||||
@@ -10,7 +10,7 @@
|
|||||||
#################################################################################
|
#################################################################################
|
||||||
|
|
||||||
if($_SESSION['access'] < ADMIN) die("Access Denied: You are not Admin!");
|
if($_SESSION['access'] < ADMIN) die("Access Denied: You are not Admin!");
|
||||||
$id = $_SESSION['id'];
|
$id = $_SESSION['id'];
|
||||||
if(isset($_GET['uid']))
|
if(isset($_GET['uid']))
|
||||||
{
|
{
|
||||||
$sql = mysql_query("SELECT access FROM ".TB_PREFIX."users WHERE id = ".$_GET['uid']."");
|
$sql = mysql_query("SELECT access FROM ".TB_PREFIX."users WHERE id = ".$_GET['uid']."");
|
||||||
@@ -59,7 +59,7 @@ if(isset($_GET['uid']))
|
|||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</form><?php
|
</form><?php
|
||||||
if(isset($_GET['g']))
|
if(isset($_GET['g']))
|
||||||
{
|
{
|
||||||
echo '<br /><br /><font color="Red"><b>Players Access Changed</font></b>';
|
echo '<br /><br /><font color="Red"><b>Players Access Changed</font></b>';
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
|
|
||||||
$id = $_GET['uid'];
|
$id = $_GET['uid'];
|
||||||
$uid = $_GET['uid'];
|
$uid = $_GET['uid'];
|
||||||
$user = $database->getUserArray($id,1);
|
$user = $database->getUserArray($id,1);
|
||||||
if(isset($id))
|
if(isset($id))
|
||||||
{
|
{
|
||||||
?>
|
?>
|
||||||
|
|||||||
@@ -5,12 +5,12 @@ if(isset($_GET['uid']))
|
|||||||
<form action="../GameEngine/Admin/Mods/editPassword.php" method="POST">
|
<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="admid" id="admid" value="<?php echo $_SESSION['id']; ?>">
|
||||||
<input type="hidden" name="uid" id="uid" value="<?php echo $_GET['uid']; ?>">
|
<input type="hidden" name="uid" id="uid" value="<?php echo $_GET['uid']; ?>">
|
||||||
|
|
||||||
<table id="profile" cellpadding="1" cellspacing="1" >
|
<table id="profile" cellpadding="1" cellspacing="1" >
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th colspan="2">Player <a href="admin.php?p=player&uid=<?php echo $user['id'];?>"><?php echo $user['username'];?></a></th>
|
<th colspan="2">Player <a href="admin.php?p=player&uid=<?php echo $user['id'];?>"><?php echo $user['username'];?></a></th>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td></td>
|
<td></td>
|
||||||
<td>New Password</td>
|
<td>New Password</td>
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
|
|
||||||
$id = $_GET['uid'];
|
$id = $_GET['uid'];
|
||||||
$uid = $_GET['uid'];
|
$uid = $_GET['uid'];
|
||||||
$user = $database->getUserArray($id,1);
|
$user = $database->getUserArray($id,1);
|
||||||
if(isset($id))
|
if(isset($id))
|
||||||
{
|
{
|
||||||
?>
|
?>
|
||||||
@@ -20,7 +20,7 @@ if(isset($id))
|
|||||||
<input type="hidden" name="uid" value="<?php echo $uid; ?>" />
|
<input type="hidden" name="uid" value="<?php echo $uid; ?>" />
|
||||||
<input type="hidden" name="id" value="<?php echo $id; ?>" />
|
<input type="hidden" name="id" value="<?php echo $id; ?>" />
|
||||||
<br /><br />
|
<br /><br />
|
||||||
|
|
||||||
<table id="profile">
|
<table id="profile">
|
||||||
<tbody>
|
<tbody>
|
||||||
<td class="details">
|
<td class="details">
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
|
|
||||||
$id = $_GET['uid'];
|
$id = $_GET['uid'];
|
||||||
$uid = $_GET['uid'];
|
$uid = $_GET['uid'];
|
||||||
$user = $database->getUserArray($id,1);
|
$user = $database->getUserArray($id,1);
|
||||||
if(isset($id))
|
if(isset($id))
|
||||||
{
|
{
|
||||||
?>
|
?>
|
||||||
|
|||||||
@@ -11,11 +11,11 @@
|
|||||||
|
|
||||||
$id = $_GET['did'];
|
$id = $_GET['did'];
|
||||||
$village = $database->getVillage($id);
|
$village = $database->getVillage($id);
|
||||||
$user = $database->getUserArray($village['owner'],1);
|
$user = $database->getUserArray($village['owner'],1);
|
||||||
$coor = $database->getCoor($village['wref']);
|
$coor = $database->getCoor($village['wref']);
|
||||||
$varray = $database->getProfileVillages($village['owner']);
|
$varray = $database->getProfileVillages($village['owner']);
|
||||||
$type = $database->getVillageType($village['wref']);
|
$type = $database->getVillageType($village['wref']);
|
||||||
$fdata = $database->getResourceLevel($village['wref']);
|
$fdata = $database->getResourceLevel($village['wref']);
|
||||||
if(isset($id))
|
if(isset($id))
|
||||||
{
|
{
|
||||||
include("search2.tpl"); ?>
|
include("search2.tpl"); ?>
|
||||||
@@ -24,19 +24,19 @@ if(isset($id))
|
|||||||
<input type="hidden" name="admid" id="admid" value="<?php echo $_SESSION['id']; ?>">
|
<input type="hidden" name="admid" id="admid" value="<?php echo $_SESSION['id']; ?>">
|
||||||
<input type="hidden" name="did" id="did" value="<?php echo $_GET['did']; ?>">
|
<input type="hidden" name="did" id="did" value="<?php echo $_GET['did']; ?>">
|
||||||
<br />
|
<br />
|
||||||
|
|
||||||
<table id="member" cellpadding="1" cellspacing="1" >
|
<table id="member" cellpadding="1" cellspacing="1" >
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th colspan="4">Modify Resources</th>
|
<th colspan="4">Modify Resources</th>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="on">Resource</td>
|
<td class="on">Resource</td>
|
||||||
<td class="hab">Amount</td>
|
<td class="hab">Amount</td>
|
||||||
<td class="hab">Maximum Capacity</td>
|
<td class="hab">Maximum Capacity</td>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="on"><img src="../img/admin/r/1.gif"> Wood</td>
|
<td class="on"><img src="../img/admin/r/1.gif"> Wood</td>
|
||||||
<td class="hab"><input class="fm" name="wood" value="<?php echo round($village['wood'], 0); ?>"></td>
|
<td class="hab"><input class="fm" name="wood" value="<?php echo round($village['wood'], 0); ?>"></td>
|
||||||
@@ -68,7 +68,7 @@ if(isset($id))
|
|||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
<br /><br />
|
<br /><br />
|
||||||
<center><input type="image" src="../img/admin/b/ok1.gif" value="submit"></center>
|
<center><input type="image" src="../img/admin/b/ok1.gif" value="submit"></center>
|
||||||
</form><?php
|
</form><?php
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
|
|
||||||
$id = $_GET['uid'];
|
$id = $_GET['uid'];
|
||||||
$uid = $_GET['uid'];
|
$uid = $_GET['uid'];
|
||||||
$user = $database->getUserArray($id,1);
|
$user = $database->getUserArray($id,1);
|
||||||
if(isset($id))
|
if(isset($id))
|
||||||
{
|
{
|
||||||
?>
|
?>
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
<?php
|
<?php
|
||||||
#################################################################################
|
#################################################################################
|
||||||
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
||||||
## --------------------------------------------------------------------------- ##
|
## --------------------------------------------------------------------------- ##
|
||||||
@@ -12,11 +12,11 @@
|
|||||||
|
|
||||||
$id = $_GET['uid'];
|
$id = $_GET['uid'];
|
||||||
if(isset($id))
|
if(isset($id))
|
||||||
{
|
{
|
||||||
$user = $database->getUserArray($id,1);
|
$user = $database->getUserArray($id,1);
|
||||||
$varray = $database->getProfileVillages($id);
|
$varray = $database->getProfileVillages($id);
|
||||||
$varmedal = $database->getProfileMedal($id); ?>
|
$varmedal = $database->getProfileMedal($id); ?>
|
||||||
|
|
||||||
<style type="text/css">
|
<style type="text/css">
|
||||||
select.dropdown
|
select.dropdown
|
||||||
{
|
{
|
||||||
@@ -34,7 +34,7 @@ if(isset($id))
|
|||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th colspan="2">Player <a href="admin.php?p=player&uid=<?php echo $user['id']; ?>"><?php echo $user['username']; ?></a></th>
|
<th colspan="2">Player <a href="admin.php?p=player&uid=<?php echo $user['id']; ?>"><?php echo $user['username']; ?></a></th>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Details</td>
|
<td>Details</td>
|
||||||
<td>Description</td>
|
<td>Description</td>
|
||||||
@@ -64,7 +64,7 @@ if(isset($id))
|
|||||||
<td></td>
|
<td></td>
|
||||||
<td></td>
|
<td></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<th>Location</th>
|
<th>Location</th>
|
||||||
<td><input class="fm" name="location" value="<?php echo $user['location']; ?>"></td>
|
<td><input class="fm" name="location" value="<?php echo $user['location']; ?>"></td>
|
||||||
@@ -115,7 +115,7 @@ if(isset($id))
|
|||||||
foreach($varmedal as $medal)
|
foreach($varmedal as $medal)
|
||||||
{
|
{
|
||||||
$titel="Bonus";
|
$titel="Bonus";
|
||||||
switch ($medal['categorie'])
|
switch ($medal['categorie'])
|
||||||
{
|
{
|
||||||
case "1":
|
case "1":
|
||||||
$titel="Attacker of the Week";
|
$titel="Attacker of the Week";
|
||||||
@@ -129,7 +129,7 @@ if(isset($id))
|
|||||||
case "4":
|
case "4":
|
||||||
$titel="Robber of the week";
|
$titel="Robber of the week";
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
echo"
|
echo"
|
||||||
<tr>
|
<tr>
|
||||||
<td> ".$titel."</td>
|
<td> ".$titel."</td>
|
||||||
@@ -137,7 +137,7 @@ if(isset($id))
|
|||||||
<td>".$medal['week']."</td>
|
<td>".$medal['week']."</td>
|
||||||
<td>[#".$medal['id']."]</td>
|
<td>[#".$medal['id']."]</td>
|
||||||
</tr>";
|
</tr>";
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Beginners Protection</td>
|
<td>Beginners Protection</td>
|
||||||
@@ -162,10 +162,10 @@ if(isset($id))
|
|||||||
</tr>
|
</tr>
|
||||||
</tfoot>
|
</tfoot>
|
||||||
</table>
|
</table>
|
||||||
</form><?php
|
</form><?php
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
echo "<br /><br />Not found. <a href=\"javascript: history.go(-1)\"> Go Back</a>";
|
echo "<br /><br />Not found. <a href=\"javascript: history.go(-1)\"> Go Back</a>";
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
@@ -11,11 +11,11 @@
|
|||||||
|
|
||||||
$id = $_GET['did'];
|
$id = $_GET['did'];
|
||||||
$village = $database->getVillage($id);
|
$village = $database->getVillage($id);
|
||||||
$user = $database->getUserArray($village['owner'],1);
|
$user = $database->getUserArray($village['owner'],1);
|
||||||
$coor = $database->getCoor($village['wref']);
|
$coor = $database->getCoor($village['wref']);
|
||||||
$varray = $database->getProfileVillages($village['owner']);
|
$varray = $database->getProfileVillages($village['owner']);
|
||||||
$type = $database->getVillageType($village['wref']);
|
$type = $database->getVillageType($village['wref']);
|
||||||
$fdata = $database->getResourceLevel($village['wref']);
|
$fdata = $database->getResourceLevel($village['wref']);
|
||||||
if(isset($id))
|
if(isset($id))
|
||||||
{
|
{
|
||||||
include("search2.tpl"); ?>
|
include("search2.tpl"); ?>
|
||||||
@@ -24,7 +24,7 @@ if(isset($id))
|
|||||||
<input type="hidden" name="admid" id="admid" value="<?php echo $_SESSION['id']; ?>">
|
<input type="hidden" name="admid" id="admid" value="<?php echo $_SESSION['id']; ?>">
|
||||||
<input type="hidden" name="id" value="<?php echo $_GET['did']; ?>" />
|
<input type="hidden" name="id" value="<?php echo $_GET['did']; ?>" />
|
||||||
<br />
|
<br />
|
||||||
|
|
||||||
<a href="#" onclick="showStuff('instructions'); return false;">Show Instructions</a>
|
<a href="#" onclick="showStuff('instructions'); return false;">Show Instructions</a>
|
||||||
<span id="instructions" style="display: none;">
|
<span id="instructions" style="display: none;">
|
||||||
<h4>Building ID's (Position)</h4>
|
<h4>Building ID's (Position)</h4>
|
||||||
@@ -40,13 +40,13 @@ if(isset($id))
|
|||||||
?>
|
?>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="content" class="village2" style="padding: 0; margin-left: -20px;">
|
<div id="content" class="village2" style="padding: 0; margin-left: -20px;">
|
||||||
<div id="village_map" class="d2_0">
|
<div id="village_map" class="d2_0">
|
||||||
<?php
|
<?php
|
||||||
for($b =1; $b <21; $b++)
|
for($b =1; $b <21; $b++)
|
||||||
{
|
{
|
||||||
|
|
||||||
echo "<img src=\"../img/x.gif\" class=\"building d".$b." iso\">";
|
echo "<img src=\"../img/x.gif\" class=\"building d".$b." iso\">";
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
@@ -60,7 +60,7 @@ if(isset($id))
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<table id="member">
|
<table id="member">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
@@ -91,14 +91,14 @@ if(isset($id))
|
|||||||
</table>
|
</table>
|
||||||
<a href="#" onclick="hideStuff('instructions'); return false;">Hide Instructions</a>
|
<a href="#" onclick="hideStuff('instructions'); return false;">Hide Instructions</a>
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
<br />
|
<br />
|
||||||
|
|
||||||
<table id="member" cellpadding="1" cellspacing="1" >
|
<table id="member" cellpadding="1" cellspacing="1" >
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th colspan="4">Modify Buildings</th>
|
<th colspan="4">Modify Buildings</th>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="on">ID</td>
|
<td class="on">ID</td>
|
||||||
<td class="on">GID</td>
|
<td class="on">GID</td>
|
||||||
@@ -106,7 +106,7 @@ if(isset($id))
|
|||||||
<td class="on">Level</td>
|
<td class="on">Level</td>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<?php
|
<?php
|
||||||
for ($i = 1; $i <= 40; $i++)
|
for ($i = 1; $i <= 40; $i++)
|
||||||
{
|
{
|
||||||
@@ -122,17 +122,17 @@ if(isset($id))
|
|||||||
<tr>
|
<tr>
|
||||||
<td class="on">'.$i.'</td>
|
<td class="on">'.$i.'</td>
|
||||||
<td class="on"><input class="fm" name="id'.$i.'gid" value="'.$fdata['f'.$i.'t'].'"></td>
|
<td class="on"><input class="fm" name="id'.$i.'gid" value="'.$fdata['f'.$i.'t'].'"></td>
|
||||||
<td class="hab">'.$bu.'</td>
|
<td class="hab">'.$bu.'</td>
|
||||||
<td class="on"><input class="fm" name="id'.$i.'level" value="'.$fdata['f'.$i].'"></td>
|
<td class="on"><input class="fm" name="id'.$i.'level" value="'.$fdata['f'.$i].'"></td>
|
||||||
</tr>';
|
</tr>';
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
<br /><br />
|
<br /><br />
|
||||||
<center><input type="image" src="../img/admin/b/ok1.gif" value="submit"></center>
|
<center><input type="image" src="../img/admin/b/ok1.gif" value="submit"></center>
|
||||||
|
|
||||||
<br />
|
<br />
|
||||||
<div id="content" class="village1" style="min-height: 264px;">
|
<div id="content" class="village1" style="min-height: 264px;">
|
||||||
<div id="village_map" class="f<?php echo $database->getVillageType($village['wref']); ?>" style="float: left;">
|
<div id="village_map" class="f<?php echo $database->getVillageType($village['wref']); ?>" style="float: left;">
|
||||||
@@ -148,9 +148,9 @@ if(isset($id))
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<br />
|
<br />
|
||||||
|
|
||||||
<br /><br />
|
<br /><br />
|
||||||
|
|
||||||
<div id="content" class="village2">
|
<div id="content" class="village2">
|
||||||
<h1><?php echo $village['name']; ?></h1>
|
<h1><?php echo $village['name']; ?></h1>
|
||||||
<div id="village_map" class="d2_0">
|
<div id="village_map" class="d2_0">
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
|
|
||||||
$id = $_GET['uid'];
|
$id = $_GET['uid'];
|
||||||
$uid = $_GET['uid'];
|
$uid = $_GET['uid'];
|
||||||
$user = $database->getUserArray($id,1);
|
$user = $database->getUserArray($id,1);
|
||||||
if(isset($id))
|
if(isset($id))
|
||||||
{
|
{
|
||||||
?>
|
?>
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
<?php
|
<?php
|
||||||
#################################################################################
|
#################################################################################
|
||||||
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
||||||
## --------------------------------------------------------------------------- ##
|
## --------------------------------------------------------------------------- ##
|
||||||
@@ -49,7 +49,7 @@ $id = $_SESSION['id']; ?>
|
|||||||
</form>
|
</form>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
if(isset($_GET['g']))
|
if(isset($_GET['g']))
|
||||||
{
|
{
|
||||||
echo '<br /><br /><font color="Red"><b>Plus Given</font></b>';
|
echo '<br /><br /><font color="Red"><b>Plus Given</font></b>';
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
<?php
|
<?php
|
||||||
#################################################################################
|
#################################################################################
|
||||||
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
||||||
## --------------------------------------------------------------------------- ##
|
## --------------------------------------------------------------------------- ##
|
||||||
@@ -37,7 +37,7 @@ $id = $_SESSION['id']; ?>
|
|||||||
</center>
|
</center>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
<center>
|
<center>
|
||||||
@@ -50,7 +50,7 @@ $id = $_SESSION['id']; ?>
|
|||||||
</center>
|
</center>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
<center>
|
<center>
|
||||||
@@ -63,7 +63,7 @@ $id = $_SESSION['id']; ?>
|
|||||||
</center>
|
</center>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
<center>
|
<center>
|
||||||
@@ -88,7 +88,7 @@ $id = $_SESSION['id']; ?>
|
|||||||
</form>
|
</form>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
if(isset($_GET['g']))
|
if(isset($_GET['g']))
|
||||||
{
|
{
|
||||||
echo '<br /><br /><font color="Red"><b>Resource Bonuses Given</font></b>';
|
echo '<br /><br /><font color="Red"><b>Resource Bonuses Given</font></b>';
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
<?php
|
<?php
|
||||||
#################################################################################
|
#################################################################################
|
||||||
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
||||||
## --------------------------------------------------------------------------- ##
|
## --------------------------------------------------------------------------- ##
|
||||||
@@ -50,7 +50,7 @@ $id = $_SESSION['id']; ?>
|
|||||||
</form>
|
</form>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
if(isset($_GET['g']))
|
if(isset($_GET['g']))
|
||||||
{
|
{
|
||||||
echo '<br /><br /><font color="Red"><b>Gold Added</font></b>';
|
echo '<br /><br /><font color="Red"><b>Gold Added</font></b>';
|
||||||
}
|
}
|
||||||
|
|||||||
+10
-10
@@ -1,4 +1,4 @@
|
|||||||
<?php
|
<?php
|
||||||
#################################################################################
|
#################################################################################
|
||||||
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
||||||
## --------------------------------------------------------------------------- ##
|
## --------------------------------------------------------------------------- ##
|
||||||
@@ -13,27 +13,27 @@
|
|||||||
<font size="3">
|
<font size="3">
|
||||||
<b>
|
<b>
|
||||||
<center>
|
<center>
|
||||||
WELCOME TO
|
WELCOME TO
|
||||||
<?php
|
<?php
|
||||||
if($_SESSION['access'] == MULTIHUNTER)
|
if($_SESSION['access'] == MULTIHUNTER)
|
||||||
{
|
{
|
||||||
echo 'MULTIHUNTER';
|
echo 'MULTIHUNTER';
|
||||||
}
|
}
|
||||||
else if($_SESSION['access'] == ADMIN)
|
else if($_SESSION['access'] == ADMIN)
|
||||||
{
|
{
|
||||||
echo 'ADMINISTRATOR';
|
echo 'ADMINISTRATOR';
|
||||||
} ?>
|
} ?>
|
||||||
CONTROL PANEL
|
CONTROL PANEL
|
||||||
</center>
|
</center>
|
||||||
</b>
|
</b>
|
||||||
</font>
|
</font>
|
||||||
|
|
||||||
|
|
||||||
<br /><br /><br /><br />
|
<br /><br /><br /><br />
|
||||||
|
|
||||||
Hello <b><?php echo $_SESSION['username']; ?></b>, You are logged in as: <b><font color="Red">Administrator</font></b></center>
|
Hello <b><?php echo $_SESSION['username']; ?></b>, You are logged in as: <b><font color="Red">Administrator</font></b></center>
|
||||||
<br /><br /><br />
|
<br /><br /><br />
|
||||||
|
|
||||||
<br /><br /><br /><br /><br />
|
<br /><br /><br /><br /><br />
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
<?php
|
<?php
|
||||||
#################################################################################
|
#################################################################################
|
||||||
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
||||||
## --------------------------------------------------------------------------- ##
|
## --------------------------------------------------------------------------- ##
|
||||||
|
|||||||
@@ -15,9 +15,9 @@
|
|||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th colspan="2">Reset All Players Gold</th>
|
<th colspan="2">Reset All Players Gold</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="hab" colspan="2"><center><input type="image" src="../img/admin/b/ok1.gif" value="submit"></center></td>
|
<td class="hab" colspan="2"><center><input type="image" src="../img/admin/b/ok1.gif" value="submit"></center></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|||||||
@@ -15,9 +15,9 @@
|
|||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th colspan="2">Reset All Players Resource Bonus</th>
|
<th colspan="2">Reset All Players Resource Bonus</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="hab" colspan="2"><center><input type="image" src="../img/admin/b/ok1.gif" value="submit"></center></td>
|
<td class="hab" colspan="2"><center><input type="image" src="../img/admin/b/ok1.gif" value="submit"></center></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|||||||
@@ -15,9 +15,9 @@
|
|||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th colspan="2">Reset All Players Plus</th>
|
<th colspan="2">Reset All Players Plus</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="hab" colspan="2"><center><input type="image" src="../img/admin/b/ok1.gif" value="submit"></center></td>
|
<td class="hab" colspan="2"><center><input type="image" src="../img/admin/b/ok1.gif" value="submit"></center></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|||||||
+11
-11
@@ -1,4 +1,4 @@
|
|||||||
<?php
|
<?php
|
||||||
#################################################################################
|
#################################################################################
|
||||||
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
||||||
## --------------------------------------------------------------------------- ##
|
## --------------------------------------------------------------------------- ##
|
||||||
@@ -20,23 +20,23 @@ comming soon
|
|||||||
<?php
|
<?php
|
||||||
function line($x,$W){
|
function line($x,$W){
|
||||||
$a = 0;
|
$a = 0;
|
||||||
for ($i = 0; $i <= $x; $i++) {
|
for ($i = 0; $i <= $x; $i++) {
|
||||||
$X = $W.'-'.$i;
|
$X = $W.'-'.$i;
|
||||||
$c += 25;
|
$c += 25;
|
||||||
$d = $W*25+25;
|
$d = $W*25+25;
|
||||||
$b = 25*($W-1);
|
$b = 25*($W-1);
|
||||||
echo '<area shape="rect" coords="'.$a.','.$b.','.$c.','.$d.'" href="?x='.$W.'&y='.$i.'" alt="frames">';
|
echo '<area shape="rect" coords="'.$a.','.$b.','.$c.','.$d.'" href="?x='.$W.'&y='.$i.'" alt="frames">';
|
||||||
$a += 25;
|
$a += 25;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function map($x,$y){
|
function map($x,$y){
|
||||||
for ($i = 0; $i <= $y; $i++) {
|
for ($i = 0; $i <= $y; $i++) {
|
||||||
line($x,$i);
|
line($x,$i);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
map(20,20);
|
map(20,20);
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
+14
-14
@@ -1,4 +1,4 @@
|
|||||||
<?php
|
<?php
|
||||||
#################################################################################
|
#################################################################################
|
||||||
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
||||||
## --------------------------------------------------------------------------- ##
|
## --------------------------------------------------------------------------- ##
|
||||||
@@ -10,23 +10,23 @@
|
|||||||
#################################################################################
|
#################################################################################
|
||||||
?>
|
?>
|
||||||
<style>
|
<style>
|
||||||
.del {width:12px; height:12px; background-image: url(img/admin/icon/del.gif);}
|
.del {width:12px; height:12px; background-image: url(img/admin/icon/del.gif);}
|
||||||
</style>
|
</style>
|
||||||
<link href="../<?php echo GP_LOCATE; ?>lang/en/compact.css?f4b7c" rel="stylesheet" type="text/css">
|
<link href="../<?php echo GP_LOCATE; ?>lang/en/compact.css?f4b7c" rel="stylesheet" type="text/css">
|
||||||
<table id="member" style="width:225px">
|
<table id="member" style="width:225px">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th colspan="2">IGM/Reports</th>
|
<th colspan="2">IGM/Reports</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tr>
|
<tr>
|
||||||
<td>IGM ID</td>
|
<td>IGM ID</td>
|
||||||
<td><form action="" method="get"><input type="hidden" name="p" value="message"><input type="text" class="fm" name="nid" value="<?php echo $_GET['nid'];?>"> <input type="image" value="submit" src="../img/admin/b/ok1.gif"></form></td>
|
<td><form action="" method="get"><input type="hidden" name="p" value="message"><input type="text" class="fm" name="nid" value="<?php echo $_GET['nid'];?>"> <input type="image" value="submit" src="../img/admin/b/ok1.gif"></form></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Report ID</td>
|
<td>Report ID</td>
|
||||||
<td><form action="" method="get"><input type="hidden" name="p" value="message"><input type="text" class="fm" name="bid" value="<?php echo $_GET['bid'];?>"> <input type="image" value="submit" src="../img/admin/b/ok1.gif"></form></td>
|
<td><form action="" method="get"><input type="hidden" name="p" value="message"><input type="text" class="fm" name="bid" value="<?php echo $_GET['bid'];?>"> <input type="image" value="submit" src="../img/admin/b/ok1.gif"></form></td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
<br>
|
<br>
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
<?php
|
<?php
|
||||||
#################################################################################
|
#################################################################################
|
||||||
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
||||||
## --------------------------------------------------------------------------- ##
|
## --------------------------------------------------------------------------- ##
|
||||||
@@ -16,12 +16,12 @@ if($msg)
|
|||||||
<link href="../<?php echo GP_LOCATE; ?>lang/en/compact.css?f4b7c" rel="stylesheet" type="text/css">
|
<link href="../<?php echo GP_LOCATE; ?>lang/en/compact.css?f4b7c" rel="stylesheet" type="text/css">
|
||||||
<link href="../<?php echo GP_LOCATE; ?>travian.css?e21d2" rel="stylesheet" type="text/css">
|
<link href="../<?php echo GP_LOCATE; ?>travian.css?e21d2" rel="stylesheet" type="text/css">
|
||||||
<link href="../<?php echo GP_LOCATE; ?>lang/en/lang.css?e21d2" rel="stylesheet" type="text/css">
|
<link href="../<?php echo GP_LOCATE; ?>lang/en/lang.css?e21d2" rel="stylesheet" type="text/css">
|
||||||
|
|
||||||
|
|
||||||
<br />
|
<br />
|
||||||
|
|
||||||
<span class="b">Send To</span>: <?php echo $database->getUserField($msg[0]['target'],'username',0);?><br />
|
<span class="b">Send To</span>: <?php echo $database->getUserField($msg[0]['target'],'username',0);?><br />
|
||||||
|
|
||||||
<div id="content" class="messages">
|
<div id="content" class="messages">
|
||||||
<h1>Messages</h1>
|
<h1>Messages</h1>
|
||||||
<div id="read_head" class="msg_head"></div>
|
<div id="read_head" class="msg_head"></div>
|
||||||
|
|||||||
@@ -44,8 +44,8 @@ if(isset($_GET['g'])) {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
echo '<br /><br /><font color="Red"><b>WW Buidingplan villages Added</font></b>';
|
echo '<br /><br /><font color="Red"><b>WW Buidingplan villages Added</font></b>';
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
@@ -44,8 +44,8 @@ if(isset($_GET['g'])) {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
echo '<br /><br /><font color="Red"><b>World Wonders Added</font></b>';
|
echo '<br /><br /><font color="Red"><b>World Wonders Added</font></b>';
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
@@ -14,7 +14,7 @@
|
|||||||
<td class="on">Time</td>
|
<td class="on">Time</td>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<?php
|
<?php
|
||||||
$sql = "SELECT * FROM ".TB_PREFIX."activate";
|
$sql = "SELECT * FROM ".TB_PREFIX."activate";
|
||||||
$result = mysql_query($sql);
|
$result = mysql_query($sql);
|
||||||
|
|||||||
@@ -14,9 +14,9 @@
|
|||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th colspan="2">Populate Oases</th>
|
<th colspan="2">Populate Oases</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="hab" colspan="2"><center><input type="image" src="../img/admin/b/ok1.gif" value="submit"></center></td>
|
<td class="hab" colspan="2"><center><input type="image" src="../img/admin/b/ok1.gif" value="submit"></center></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|||||||
+32
-32
@@ -1,4 +1,4 @@
|
|||||||
<?php
|
<?php
|
||||||
#################################################################################
|
#################################################################################
|
||||||
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
||||||
## --------------------------------------------------------------------------- ##
|
## --------------------------------------------------------------------------- ##
|
||||||
@@ -10,28 +10,28 @@
|
|||||||
#################################################################################
|
#################################################################################
|
||||||
?>
|
?>
|
||||||
<?php
|
<?php
|
||||||
$active = $admin->getUserActive();
|
$active = $admin->getUserActive();
|
||||||
?>
|
?>
|
||||||
<style>
|
<style>
|
||||||
.del {width:12px; height:12px; background-image: url(img/admin/icon/del.gif);}
|
.del {width:12px; height:12px; background-image: url(img/admin/icon/del.gif);}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<table id="member">
|
<table id="member">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th colspan="6">Online users (<?php echo count($active);?>)</th>
|
<th colspan="6">Online users (<?php echo count($active);?>)</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Name [access]</td>
|
<td>Name [access]</td>
|
||||||
<td>Time</td>
|
<td>Time</td>
|
||||||
<td>Tribe</td>
|
<td>Tribe</td>
|
||||||
<td>Pop</td>
|
<td>Pop</td>
|
||||||
<td>Villages</td>
|
<td>Villages</td>
|
||||||
<td>Gold</td>
|
<td>Gold</td>
|
||||||
</tr>
|
</tr>
|
||||||
<?php
|
<?php
|
||||||
if($active){
|
if($active){
|
||||||
for ($i = 0; $i <= count($active)-1; $i++) {
|
for ($i = 0; $i <= count($active)-1; $i++) {
|
||||||
$uid = $database->getUserField($active[$i]['username'],'id',1);
|
$uid = $database->getUserField($active[$i]['username'],'id',1);
|
||||||
$varray = $database->getProfileVillages($uid);
|
$varray = $database->getProfileVillages($uid);
|
||||||
@@ -47,21 +47,21 @@ foreach($varray as $vil) {
|
|||||||
$tribe = "Gaul";
|
$tribe = "Gaul";
|
||||||
}
|
}
|
||||||
echo '
|
echo '
|
||||||
<tr>
|
<tr>
|
||||||
<td><a href="?p=player&uid='.$uid.'">'.$active[$i]['username'].' ['.$active[$i]['access'].']</a></td>
|
<td><a href="?p=player&uid='.$uid.'">'.$active[$i]['username'].' ['.$active[$i]['access'].']</a></td>
|
||||||
<td>'.date("d.m.y H:i:s",$active[$i]['timestamp']).'</td>
|
<td>'.date("d.m.y H:i:s",$active[$i]['timestamp']).'</td>
|
||||||
<td>'.$tribe.'</td>
|
<td>'.$tribe.'</td>
|
||||||
<td>'.$totalpop.'</td>
|
<td>'.$totalpop.'</td>
|
||||||
<td>'.count($varray).'</td>
|
<td>'.count($varray).'</td>
|
||||||
<td><img src="../img/admin/gold.gif" class="gold" alt="Gold" title="This user has: '.$active[$i]['gold'].' gold"/> '.$active[$i]['gold'].'</td>
|
<td><img src="../img/admin/gold.gif" class="gold" alt="Gold" title="This user has: '.$active[$i]['gold'].' gold"/> '.$active[$i]['gold'].'</td>
|
||||||
</tr>
|
</tr>
|
||||||
';
|
';
|
||||||
}
|
}
|
||||||
}else{
|
}else{
|
||||||
echo '<tr><td colspan="6" class="hab">No online users</td></tr>';
|
echo '<tr><td colspan="6" class="hab">No online users</td></tr>';
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
?>
|
||||||
|
|
||||||
?>
|
|
||||||
|
|
||||||
</table>
|
</table>
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
<?php
|
<?php
|
||||||
#################################################################################
|
#################################################################################
|
||||||
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
||||||
## --------------------------------------------------------------------------- ##
|
## --------------------------------------------------------------------------- ##
|
||||||
@@ -14,7 +14,7 @@ if(isset($id))
|
|||||||
{
|
{
|
||||||
include("../GameEngine/Ranking.php");
|
include("../GameEngine/Ranking.php");
|
||||||
$varmedal = $database->getProfileMedal($id);
|
$varmedal = $database->getProfileMedal($id);
|
||||||
$user = $database->getUserArray($id,1);
|
$user = $database->getUserArray($id,1);
|
||||||
$varray = $database->getProfileVillages($id);
|
$varray = $database->getProfileVillages($id);
|
||||||
$refreshicon = "<img src=\"data:image/png;base64,
|
$refreshicon = "<img src=\"data:image/png;base64,
|
||||||
iVBORw0KGgoAAAANSUhEUgAAAAkAAAAKCAIAAADpZ+PpAAAAAXNSR0IArs4c6QAAAARnQU1BAACx
|
iVBORw0KGgoAAAANSUhEUgAAAAkAAAAKCAIAAADpZ+PpAAAAAXNSR0IArs4c6QAAAARnQU1BAACx
|
||||||
@@ -35,18 +35,18 @@ if(isset($id))
|
|||||||
echo "<br />";
|
echo "<br />";
|
||||||
$deletion = false;
|
$deletion = false;
|
||||||
if($deletion)
|
if($deletion)
|
||||||
{
|
{
|
||||||
include("playerdeletion.tpl");
|
include("playerdeletion.tpl");
|
||||||
}
|
}
|
||||||
|
|
||||||
include("playerinfo.tpl");
|
include("playerinfo.tpl");
|
||||||
include("playeradditionalinfo.tpl");
|
include("playeradditionalinfo.tpl");
|
||||||
echo "<br />";
|
echo "<br />";
|
||||||
include("playermedals.tpl");
|
include("playermedals.tpl");
|
||||||
include ("villages.tpl"); ?>
|
include ("villages.tpl"); ?>
|
||||||
|
|
||||||
<div style="float: left;">
|
<div style="float: left;">
|
||||||
<?php
|
<?php
|
||||||
include ('punish.tpl');
|
include ('punish.tpl');
|
||||||
?>
|
?>
|
||||||
</div>
|
</div>
|
||||||
@@ -55,7 +55,7 @@ if(isset($id))
|
|||||||
include ('add_village.tpl');
|
include ('add_village.tpl');
|
||||||
?>
|
?>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
$sql = "SELECT * FROM ".TB_PREFIX."banlist WHERE uid = ".$id."";
|
$sql = "SELECT * FROM ".TB_PREFIX."banlist WHERE uid = ".$id."";
|
||||||
$numbans = mysql_num_rows(mysql_query($sql));
|
$numbans = mysql_num_rows(mysql_query($sql));
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
<table id="member">
|
<table id="member">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th colspan="2">Additional Information</th>
|
<th colspan="2">Additional Information</th>
|
||||||
@@ -8,7 +8,7 @@
|
|||||||
<tr>
|
<tr>
|
||||||
<td>Access</td>
|
<td>Access</td>
|
||||||
<td>
|
<td>
|
||||||
<?php
|
<?php
|
||||||
if($user['access'] == 0)
|
if($user['access'] == 0)
|
||||||
{
|
{
|
||||||
echo "Banned";
|
echo "Banned";
|
||||||
@@ -32,7 +32,7 @@
|
|||||||
<td>Gold</td>
|
<td>Gold</td>
|
||||||
<td><img src="../img/admin/gold.gif"> <?php echo $user['gold']; ?> <a href='admin.php?p=player&uid=<?php echo $id; ?>&g'><img src="../img/admin/edit.gif" title="Give Gold"></a>
|
<td><img src="../img/admin/gold.gif"> <?php echo $user['gold']; ?> <a href='admin.php?p=player&uid=<?php echo $id; ?>&g'><img src="../img/admin/edit.gif" title="Give Gold"></a>
|
||||||
</tr>
|
</tr>
|
||||||
<?php
|
<?php
|
||||||
if($_SESSION['access'] == ADMIN)
|
if($_SESSION['access'] == ADMIN)
|
||||||
{
|
{
|
||||||
if($_GET['g'] == 'ok')
|
if($_GET['g'] == 'ok')
|
||||||
@@ -53,9 +53,9 @@
|
|||||||
<input type="image" src="../<?php echo GP_LOCATE; ?>img/new/tick.png" value="submit">
|
<input type="image" src="../<?php echo GP_LOCATE; ?>img/new/tick.png" value="submit">
|
||||||
<a href="admin.php?p=player&uid=<?php echo $id; ?>"><img src="../img/admin/del.gif" title="Cancel"></a></td>
|
<a href="admin.php?p=player&uid=<?php echo $id; ?>"><img src="../img/admin/del.gif" title="Cancel"></a></td>
|
||||||
</tr>
|
</tr>
|
||||||
</form><?php
|
</form><?php
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
<tr>
|
<tr>
|
||||||
@@ -64,12 +64,12 @@
|
|||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Sitter 1</td>
|
<td>Sitter 1</td>
|
||||||
<td><a href="?p=editSitter&uid=<?php echo $user['id']; ?>"><img src="../img/admin/edit.gif" title="Edit Sitters"></a>
|
<td><a href="?p=editSitter&uid=<?php echo $user['id']; ?>"><img src="../img/admin/edit.gif" title="Edit Sitters"></a>
|
||||||
<?php
|
<?php
|
||||||
if($user['sit1'] >= 1)
|
if($user['sit1'] >= 1)
|
||||||
{
|
{
|
||||||
echo '<a href="admin.php?p=player&uid='.$user['sit1'].'">'.$database->getUserField($user['sit1'],"username",0).'</a>';
|
echo '<a href="admin.php?p=player&uid='.$user['sit1'].'">'.$database->getUserField($user['sit1'],"username",0).'</a>';
|
||||||
}
|
}
|
||||||
else if($user['sit1'] == 0)
|
else if($user['sit1'] == 0)
|
||||||
{
|
{
|
||||||
echo 'No Sitter';
|
echo 'No Sitter';
|
||||||
@@ -79,12 +79,12 @@
|
|||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Sitter 2</td>
|
<td>Sitter 2</td>
|
||||||
<td><a href="?p=editSitter&uid=<?php echo $user['id']; ?>"><img src="../img/admin/edit.gif" title="Edit Sitters"></a>
|
<td><a href="?p=editSitter&uid=<?php echo $user['id']; ?>"><img src="../img/admin/edit.gif" title="Edit Sitters"></a>
|
||||||
<?php
|
<?php
|
||||||
if($user['sit2'] >= 1)
|
if($user['sit2'] >= 1)
|
||||||
{
|
{
|
||||||
echo '<a href="admin.php?p=player&uid='.$user['sit2'].'">'.$database->getUserField($user['sit2'],"username",0).'</a>';
|
echo '<a href="admin.php?p=player&uid='.$user['sit2'].'">'.$database->getUserField($user['sit2'],"username",0).'</a>';
|
||||||
}
|
}
|
||||||
else if($user['sit2'] == 0)
|
else if($user['sit2'] == 0)
|
||||||
{
|
{
|
||||||
echo 'No Sitter';
|
echo 'No Sitter';
|
||||||
@@ -145,22 +145,22 @@
|
|||||||
<tr>
|
<tr>
|
||||||
<td>Culture Points</td>
|
<td>Culture Points</td>
|
||||||
<td><a href='admin.php?p=player&uid=<?php echo $id; ?>&cp'><img src="../img/admin/edit.gif" title="Edit Culture Points"></a>
|
<td><a href='admin.php?p=player&uid=<?php echo $id; ?>&cp'><img src="../img/admin/edit.gif" title="Edit Culture Points"></a>
|
||||||
<?php
|
<?php
|
||||||
echo round($user['cp'], 0);
|
echo round($user['cp'], 0);
|
||||||
if($_SESSION['access'] == ADMIN)
|
if($_SESSION['access'] == ADMIN)
|
||||||
{ ?>
|
{ ?>
|
||||||
<a href='admin.php?p=player&uid=<?php echo $id; ?>&cp'><?php
|
<a href='admin.php?p=player&uid=<?php echo $id; ?>&cp'><?php
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<?php
|
<?php
|
||||||
if($_SESSION['access'] == ADMIN)
|
if($_SESSION['access'] == ADMIN)
|
||||||
{
|
{
|
||||||
if($_GET['cp'] == 'ok')
|
if($_GET['cp'] == 'ok')
|
||||||
{
|
{
|
||||||
echo '';
|
echo '';
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if(isset($_GET['cp']))
|
if(isset($_GET['cp']))
|
||||||
@@ -176,15 +176,15 @@
|
|||||||
<a href="admin.php?p=player&uid=<?php echo $id; ?>"><img src="../img/admin/del.gif" title="Cancel"></a>
|
<a href="admin.php?p=player&uid=<?php echo $id; ?>"><img src="../img/admin/del.gif" title="Cancel"></a>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</form><?php
|
</form><?php
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Last Activity</td>
|
<td>Last Activity</td>
|
||||||
<td>
|
<td>
|
||||||
<?php
|
<?php
|
||||||
echo ''.date('d.m.Y H:i',$user['timestamp']+3600*2).'';
|
echo ''.date('d.m.Y H:i',$user['timestamp']+3600*2).'';
|
||||||
?>
|
?>
|
||||||
</td>
|
</td>
|
||||||
@@ -224,7 +224,7 @@
|
|||||||
<tr>
|
<tr>
|
||||||
<td>Total Attack Points</td>
|
<td>Total Attack Points</td>
|
||||||
<td><a href="admin.php?p=editOverall&uid=<?php echo $id; ?>"><img src="../img/admin/edit.gif" title="Edit Overall Points"></a>
|
<td><a href="admin.php?p=editOverall&uid=<?php echo $id; ?>"><img src="../img/admin/edit.gif" title="Edit Overall Points"></a>
|
||||||
<?php
|
<?php
|
||||||
echo $user['apall'];
|
echo $user['apall'];
|
||||||
?>
|
?>
|
||||||
</td>
|
</td>
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th colspan="2">Player <a href="admin.php?p=player&uid=<?php echo $user['id'];?>"><?php echo $user['username'];?></a></th>
|
<th colspan="2">Player <a href="admin.php?p=player&uid=<?php echo $user['id'];?>"><?php echo $user['username'];?></a></th>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Details</td>
|
<td>Details</td>
|
||||||
<td>Description</td>
|
<td>Description</td>
|
||||||
@@ -23,11 +23,11 @@
|
|||||||
<th>Tribe</th>
|
<th>Tribe</th>
|
||||||
<td>
|
<td>
|
||||||
<?php
|
<?php
|
||||||
if($user['tribe'] == 1)
|
if($user['tribe'] == 1)
|
||||||
{
|
{
|
||||||
echo "Roman";
|
echo "Roman";
|
||||||
}
|
}
|
||||||
else if($user['tribe'] == 2)
|
else if($user['tribe'] == 2)
|
||||||
{
|
{
|
||||||
echo "Teutons";
|
echo "Teutons";
|
||||||
}
|
}
|
||||||
@@ -38,7 +38,7 @@
|
|||||||
else if($user['tribe'] == 4)
|
else if($user['tribe'] == 4)
|
||||||
{
|
{
|
||||||
echo "Natars";
|
echo "Natars";
|
||||||
}
|
}
|
||||||
else if($user['tribe'] == 5)
|
else if($user['tribe'] == 5)
|
||||||
{
|
{
|
||||||
echo "Nature";
|
echo "Nature";
|
||||||
@@ -46,7 +46,7 @@
|
|||||||
?>
|
?>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th>Alliance</th>
|
<th>Alliance</th>
|
||||||
<td>
|
<td>
|
||||||
<?php
|
<?php
|
||||||
@@ -72,8 +72,8 @@
|
|||||||
<tr>
|
<tr>
|
||||||
<th>Age</td>
|
<th>Age</td>
|
||||||
<td>
|
<td>
|
||||||
<?php
|
<?php
|
||||||
if(isset($user['birthday']) && $user['birthday'] != 0)
|
if(isset($user['birthday']) && $user['birthday'] != 0)
|
||||||
{
|
{
|
||||||
$age = date("Y")-substr($user['birthday'],0,4);
|
$age = date("Y")-substr($user['birthday'],0,4);
|
||||||
echo $age;
|
echo $age;
|
||||||
@@ -101,7 +101,7 @@
|
|||||||
?>
|
?>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<th>Username</th>
|
<th>Username</th>
|
||||||
<td>
|
<td>
|
||||||
@@ -111,21 +111,21 @@
|
|||||||
<input type="text" style="width: 80%;" class="fm" name="username" value="<?php echo $user['username']; ?>"> <input type="image" value="submit" src="../img/admin/edit.gif" title="Edit Username"></a>
|
<input type="text" style="width: 80%;" class="fm" name="username" value="<?php echo $user['username']; ?>"> <input type="image" value="submit" src="../img/admin/edit.gif" title="Edit Username"></a>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<th>Location</th>
|
<th>Location</th>
|
||||||
<td>
|
<td>
|
||||||
<input type="text" style="width: 80%;" disabled="disabled" class="fm" name="location" value="<?php echo $user['location']; ?>"> <a href="admin.php?p=editUser&uid=<?php echo $id; ?>"><img src="../img/admin/edit.gif" title="Edit Location"></a>
|
<input type="text" style="width: 80%;" disabled="disabled" class="fm" name="location" value="<?php echo $user['location']; ?>"> <a href="admin.php?p=editUser&uid=<?php echo $id; ?>"><img src="../img/admin/edit.gif" title="Edit Location"></a>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<th>Password</th>
|
<th>Password</th>
|
||||||
<td>
|
<td>
|
||||||
Change <a href="admin.php?p=editPassword&uid=<?php echo $id; ?>"><img src="../img/admin/edit.gif" title="Change Password"></a>
|
Change <a href="admin.php?p=editPassword&uid=<?php echo $id; ?>"><img src="../img/admin/edit.gif" title="Change Password"></a>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<?php include("playerplusbonus.tpl"); ?>
|
<?php include("playerplusbonus.tpl"); ?>
|
||||||
<tr>
|
<tr>
|
||||||
@@ -140,7 +140,7 @@
|
|||||||
<td>
|
<td>
|
||||||
<?php
|
<?php
|
||||||
$link = "<a href=\"mailto:".$user['email']."\">".$user['email']."</a>";
|
$link = "<a href=\"mailto:".$user['email']."\">".$user['email']."</a>";
|
||||||
echo $link;
|
echo $link;
|
||||||
?>
|
?>
|
||||||
</td>
|
</td>
|
||||||
</tr> */ ?>
|
</tr> */ ?>
|
||||||
@@ -185,7 +185,7 @@
|
|||||||
<tr>
|
<tr>
|
||||||
<td colspan="2" class="empty"></td>
|
<td colspan="2" class="empty"></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
if($_SESSION['access'] == ADMIN)
|
if($_SESSION['access'] == ADMIN)
|
||||||
{
|
{
|
||||||
@@ -195,7 +195,7 @@
|
|||||||
<a href="?p=editUser&uid='.$user['id'].'"><font color="blue">»</font> Edit User</a>
|
<a href="?p=editUser&uid='.$user['id'].'"><font color="blue">»</font> Edit User</a>
|
||||||
</td>
|
</td>
|
||||||
</tr>';
|
</tr>';
|
||||||
}
|
}
|
||||||
else if($_SESSION['access'] == MULTIHUNTER)
|
else if($_SESSION['access'] == MULTIHUNTER)
|
||||||
{
|
{
|
||||||
echo '';
|
echo '';
|
||||||
@@ -208,41 +208,41 @@
|
|||||||
<a class="rn3" href="?p=deletion&uid='.$user['id'].'"><font color="red">»</font> Delete User</a>
|
<a class="rn3" href="?p=deletion&uid='.$user['id'].'"><font color="red">»</font> Delete User</a>
|
||||||
</td>
|
</td>
|
||||||
</tr>';
|
</tr>';
|
||||||
}
|
}
|
||||||
else if($_SESSION['access'] == MULTIHUNTER)
|
else if($_SESSION['access'] == MULTIHUNTER)
|
||||||
{
|
{
|
||||||
echo '';
|
echo '';
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="2"><a href="?p=ban&uid=<?php echo $user['id']; ?>">» Ban User</a></td>
|
<td colspan="2"><a href="?p=ban&uid=<?php echo $user['id']; ?>">» Ban User</a></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="2"><a href="?p=Newmessage&uid=<?php echo $user['id']; ?>">» Send Message</a></td>
|
<td colspan="2"><a href="?p=Newmessage&uid=<?php echo $user['id']; ?>">» Send Message</a></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="2"><a href="?p=editPlus&uid=<?php echo $user['id']; ?>">» Edit Plus & Bonus</a></td>
|
<td colspan="2"><a href="?p=editPlus&uid=<?php echo $user['id']; ?>">» Edit Plus & Bonus</a></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="2"><a href="?p=editSitter&uid=<?php echo $user['id']; ?>">» Edit Sitters</a></td>
|
<td colspan="2"><a href="?p=editSitter&uid=<?php echo $user['id']; ?>">» Edit Sitters</a></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="2"><a href="?p=editWeek&uid=<?php echo $user['id']; ?>">» Edit Overall Off & Def</a></td>
|
<td colspan="2"><a href="?p=editWeek&uid=<?php echo $user['id']; ?>">» Edit Overall Off & Def</a></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="2"><a href="?p=editOverall&uid=<?php echo $user['id']; ?>">» Edit Weekly Off, Def, Raid</a></td>
|
<td colspan="2"><a href="?p=editOverall&uid=<?php echo $user['id']; ?>">» Edit Weekly Off, Def, Raid</a></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="2"><a href="?p=userlogin&uid=<?php echo $user['id']; ?>">» User Login Log</a></td>
|
<td colspan="2"><a href="?p=userlogin&uid=<?php echo $user['id']; ?>">» User Login Log</a></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="2"><a href="?p=userillegallog&uid=<?php echo $user['id']; ?>">» User Illegal Log</a></td>
|
<td colspan="2"><a href="?p=userillegallog&uid=<?php echo $user['id']; ?>">» User Illegal Log</a></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<form action="../GameEngine/Admin/Mods/medals.php" method="POST">
|
<form action="../GameEngine/Admin/Mods/medals.php" method="POST">
|
||||||
<input type="hidden" name="uid" value="<?php echo $_GET['uid']; ?>">
|
<input type="hidden" name="uid" value="<?php echo $_GET['uid']; ?>">
|
||||||
<input type="hidden" name="admid" id="admid" value="<?php echo $_SESSION['id']; ?>">
|
<input type="hidden" name="admid" id="admid" value="<?php echo $_SESSION['id']; ?>">
|
||||||
<table id="profile">
|
<table id="profile">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th colspan="6">Player Medals (<?php echo sizeof($varmedal); ?>)</th>
|
<th colspan="6">Player Medals (<?php echo sizeof($varmedal); ?>)</th>
|
||||||
@@ -18,14 +18,14 @@
|
|||||||
<?php
|
<?php
|
||||||
if(sizeof($varmedal) ==0)
|
if(sizeof($varmedal) ==0)
|
||||||
{ ?>
|
{ ?>
|
||||||
<td colspan="5"><center>This player has no medals yet</center></td><?php
|
<td colspan="5"><center>This player has no medals yet</center></td><?php
|
||||||
}
|
}
|
||||||
elseif(sizeof($varmedal) >0)
|
elseif(sizeof($varmedal) >0)
|
||||||
{
|
{
|
||||||
foreach($varmedal as $medal)
|
foreach($varmedal as $medal)
|
||||||
{
|
{
|
||||||
$titel="Bonus";
|
$titel="Bonus";
|
||||||
switch ($medal['categorie'])
|
switch ($medal['categorie'])
|
||||||
{
|
{
|
||||||
case "1": $titel="Attackers"; break;
|
case "1": $titel="Attackers"; break;
|
||||||
case "2": $titel="Defenders"; break;
|
case "2": $titel="Defenders"; break;
|
||||||
@@ -46,7 +46,7 @@
|
|||||||
$week = $medal['week'];
|
$week = $medal['week'];
|
||||||
$points = $medal['points'];
|
$points = $medal['points'];
|
||||||
if($points == '') { $points = "<p>Bonus</p>"; } else { $points = $points; }
|
if($points == '') { $points = "<p>Bonus</p>"; } else { $points = $points; }
|
||||||
|
|
||||||
echo"
|
echo"
|
||||||
<tr>
|
<tr>
|
||||||
<td>$title</td>
|
<td>$title</td>
|
||||||
@@ -59,7 +59,7 @@
|
|||||||
</td>
|
</td>
|
||||||
</tr>";
|
</tr>";
|
||||||
}
|
}
|
||||||
|
|
||||||
$averagerank = 0;
|
$averagerank = 0;
|
||||||
foreach($varmedal as $medal)
|
foreach($varmedal as $medal)
|
||||||
{
|
{
|
||||||
@@ -78,7 +78,7 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
$average = $averagerank / $i;
|
$average = $averagerank / $i;
|
||||||
echo "</form><tr><td><b>Average Rank</b></td><td>$average</td><td></td><td></td><td>Delete All</td>";
|
echo "</form><tr><td><b>Average Rank</b></td><td>$average</td><td></td><td></td><td>Delete All</td>";
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
<td>
|
<td>
|
||||||
|
|||||||
@@ -66,7 +66,7 @@
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
echo "".date('d.m.Y H:i',$user['b1']+3600*2)."</tr></th>";
|
echo "".date('d.m.Y H:i',$user['b1']+3600*2)."</tr></th>";
|
||||||
} */
|
} */
|
||||||
?>
|
?>
|
||||||
<a href="admin.php?p=editPlus&uid=<?php echo $user['id']; ?>"><img src="../img/admin/edit.gif" title="Edit Plus and Bonus"></a></td>
|
<a href="admin.php?p=editPlus&uid=<?php echo $user['id']; ?>"><img src="../img/admin/edit.gif" title="Edit Plus and Bonus"></a></td>
|
||||||
@@ -104,7 +104,7 @@
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
echo "".date('d.m.Y H:i',$user['b2']+3600*2)."</tr></th>";
|
echo "".date('d.m.Y H:i',$user['b2']+3600*2)."</tr></th>";
|
||||||
} */
|
} */
|
||||||
?>
|
?>
|
||||||
<a href="admin.php?p=editPlus&uid=<?php echo $user['id']; ?>"><img src="../img/admin/edit.gif" title="Edit Plus and Bonus"></a></td>
|
<a href="admin.php?p=editPlus&uid=<?php echo $user['id']; ?>"><img src="../img/admin/edit.gif" title="Edit Plus and Bonus"></a></td>
|
||||||
@@ -142,7 +142,7 @@
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
echo "".date('d.m.Y H:i',$user['b3']+3600*2)."</tr></th>";
|
echo "".date('d.m.Y H:i',$user['b3']+3600*2)."</tr></th>";
|
||||||
} */
|
} */
|
||||||
?>
|
?>
|
||||||
<a href="admin.php?p=editPlus&uid=<?php echo $user['id']; ?>"><img src="../img/admin/edit.gif" title="Edit Plus and Bonus"></a></td>
|
<a href="admin.php?p=editPlus&uid=<?php echo $user['id']; ?>"><img src="../img/admin/edit.gif" title="Edit Plus and Bonus"></a></td>
|
||||||
@@ -180,7 +180,7 @@
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
echo "".date('d.m.Y H:i',$user['b4']+3600*2)."</tr></th>";
|
echo "".date('d.m.Y H:i',$user['b4']+3600*2)."</tr></th>";
|
||||||
} */
|
} */
|
||||||
?>
|
?>
|
||||||
<a href="admin.php?p=editPlus&uid=<?php echo $user['id']; ?>"><img src="../img/admin/edit.gif" title="Edit Plus and Bonus"></a></td>
|
<a href="admin.php?p=editPlus&uid=<?php echo $user['id']; ?>"><img src="../img/admin/edit.gif" title="Edit Plus and Bonus"></a></td>
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
<?php
|
<?php
|
||||||
#################################################################################
|
#################################################################################
|
||||||
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
||||||
## --------------------------------------------------------------------------- ##
|
## --------------------------------------------------------------------------- ##
|
||||||
@@ -13,8 +13,8 @@ $active = $admin->getUserActive();
|
|||||||
?>
|
?>
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
.del {width:12px; height:12px; background-image: url(img/admin/icon/del.gif);}
|
.del {width:12px; height:12px; background-image: url(img/admin/icon/del.gif);}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<form method="post" action="admin.php">
|
<form method="post" action="admin.php">
|
||||||
<input name="action" type="hidden" value="punish">
|
<input name="action" type="hidden" value="punish">
|
||||||
@@ -77,7 +77,7 @@ $active = $admin->getUserActive();
|
|||||||
<input name="uid" type="hidden" value="<?php echo $user['id'];?>">
|
<input name="uid" type="hidden" value="<?php echo $user['id'];?>">
|
||||||
<input type="hidden" name="admid" id="admid" value="<?php echo $_SESSION['id']; ?>">
|
<input type="hidden" name="admid" id="admid" value="<?php echo $_SESSION['id']; ?>">
|
||||||
<td colspan="1" style="text-align: center;">
|
<td colspan="1" style="text-align: center;">
|
||||||
<input type="checkbox" name="clean_ware" value="1"> Empty Warehouses
|
<input type="checkbox" name="clean_ware" value="1"> Empty Warehouses
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
<?php
|
<?php
|
||||||
#################################################################################
|
#################################################################################
|
||||||
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
||||||
## --------------------------------------------------------------------------- ##
|
## --------------------------------------------------------------------------- ##
|
||||||
## Filename renameVillage.tpl ##
|
## Filename renameVillage.tpl ##
|
||||||
## Developed by: Dzoki & Advocatie ##
|
## Developed by: Dzoki & Advocatie ##
|
||||||
## License: TravianX Project ##
|
## License: TravianX Project ##
|
||||||
## Thanks to: Dzoki & itay2277(Edit troops) ##
|
## Thanks to: Dzoki & itay2277(Edit troops) ##
|
||||||
## Copyright: TravianX (c) 2010-2011. All rights reserved. ##
|
## Copyright: TravianX (c) 2010-2011. All rights reserved. ##
|
||||||
#################################################################################
|
#################################################################################
|
||||||
|
|
||||||
@@ -16,16 +16,16 @@ $id = $_GET['did'];
|
|||||||
|
|
||||||
if(isset($id))
|
if(isset($id))
|
||||||
{
|
{
|
||||||
$village = $database->getVillage($id);
|
$village = $database->getVillage($id);
|
||||||
$user = $database->getUserArray($village['owner'],1);
|
$user = $database->getUserArray($village['owner'],1);
|
||||||
$coor = $database->getCoor($village['wref']);
|
$coor = $database->getCoor($village['wref']);
|
||||||
$varray = $database->getProfileVillages($village['owner']);
|
$varray = $database->getProfileVillages($village['owner']);
|
||||||
$type = $database->getVillageType($village['wref']);
|
$type = $database->getVillageType($village['wref']);
|
||||||
$fdata = $database->getResourceLevel($village['wref']);
|
$fdata = $database->getResourceLevel($village['wref']);
|
||||||
$units = $database->getUnit($village['wref']);
|
$units = $database->getUnit($village['wref']);
|
||||||
?>
|
?>
|
||||||
<table id="member">
|
<table id="member">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th colspan="2">Edit Village Name</th>
|
<th colspan="2">Edit Village Name</th>
|
||||||
</tr>
|
</tr>
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
<?php
|
<?php
|
||||||
#################################################################################
|
#################################################################################
|
||||||
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
||||||
## --------------------------------------------------------------------------- ##
|
## --------------------------------------------------------------------------- ##
|
||||||
@@ -13,7 +13,7 @@ $sql = "SELECT * FROM ".TB_PREFIX."ndata WHERE id = ".$_GET['bid']."";
|
|||||||
$result = mysql_query($sql);
|
$result = mysql_query($sql);
|
||||||
$rep = mysql_fetch_assoc($result);
|
$rep = mysql_fetch_assoc($result);
|
||||||
if($rep)
|
if($rep)
|
||||||
{
|
{
|
||||||
$att = $database->getUserArray($rep['uid'],1);
|
$att = $database->getUserArray($rep['uid'],1);
|
||||||
?>
|
?>
|
||||||
<h1>Under Construction</h1>
|
<h1>Under Construction</h1>
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
<?php
|
<?php
|
||||||
#################################################################################
|
#################################################################################
|
||||||
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
||||||
## --------------------------------------------------------------------------- ##
|
## --------------------------------------------------------------------------- ##
|
||||||
@@ -33,7 +33,7 @@ $id = $_SESSION['id']; ?>
|
|||||||
</form>
|
</form>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
if(isset($_GET['g']))
|
if(isset($_GET['g']))
|
||||||
{
|
{
|
||||||
echo '<br /><br /><font color="Red"><b>Plus For Everyone Reset</font></b>';
|
echo '<br /><br /><font color="Red"><b>Plus For Everyone Reset</font></b>';
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
<?php
|
<?php
|
||||||
#################################################################################
|
#################################################################################
|
||||||
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
||||||
## --------------------------------------------------------------------------- ##
|
## --------------------------------------------------------------------------- ##
|
||||||
@@ -33,7 +33,7 @@ $id = $_SESSION['id']; ?>
|
|||||||
</form>
|
</form>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
if(isset($_GET['g']))
|
if(isset($_GET['g']))
|
||||||
{
|
{
|
||||||
echo '<br /><br /><font color="Red"><b>Plus Resource Bonuses For Everyone Reset</font></b>';
|
echo '<br /><br /><font color="Red"><b>Plus Resource Bonuses For Everyone Reset</font></b>';
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
<?php
|
<?php
|
||||||
#################################################################################
|
#################################################################################
|
||||||
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
||||||
## --------------------------------------------------------------------------- ##
|
## --------------------------------------------------------------------------- ##
|
||||||
@@ -14,38 +14,38 @@ $result = $admin->search_alliance($_POST['s']);
|
|||||||
?>
|
?>
|
||||||
<table id="member">
|
<table id="member">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th class="dtbl"><a href="">1 «</a></th><th>Found alliances (<?php echo count($result);?>)</th><th class="dtbl"><a href="">» 100</a></th>
|
<th class="dtbl"><a href="">1 «</a></th><th>Found alliances (<?php echo count($result);?>)</th><th class="dtbl"><a href="">» 100</a></th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
|
|
||||||
</table>
|
</table>
|
||||||
<table id="profile">
|
<table id="profile">
|
||||||
<tr>
|
<tr>
|
||||||
<td class="b">AID</td>
|
<td class="b">AID</td>
|
||||||
<td class="b">Name</td>
|
<td class="b">Name</td>
|
||||||
<td class="b">Tag</td>
|
<td class="b">Tag</td>
|
||||||
<td class="b">Founder</td>
|
<td class="b">Founder</td>
|
||||||
</tr>
|
</tr>
|
||||||
<?php
|
<?php
|
||||||
if($result){
|
if($result){
|
||||||
for ($i = 0; $i <= count($result)-1; $i++) {
|
for ($i = 0; $i <= count($result)-1; $i++) {
|
||||||
echo '
|
echo '
|
||||||
<tr>
|
<tr>
|
||||||
<td>'.$result[$i]["id"].'</td>
|
<td>'.$result[$i]["id"].'</td>
|
||||||
<td><a href="?p=alliance&aid='.$result[$i]["id"].'">'.$result[$i]["name"].'</a></td>
|
<td><a href="?p=alliance&aid='.$result[$i]["id"].'">'.$result[$i]["name"].'</a></td>
|
||||||
<td><a href="?p=alliance&aid='.$result[$i]["id"].'">'.$result[$i]["tag"].'</a></td>
|
<td><a href="?p=alliance&aid='.$result[$i]["id"].'">'.$result[$i]["tag"].'</a></td>
|
||||||
<td><a href="?p=player&uid='.$result[$i]["id"].'">'.$database->getUserField($result[$i]["leader"],'username',0).'</a></td>
|
<td><a href="?p=player&uid='.$result[$i]["id"].'">'.$database->getUserField($result[$i]["leader"],'username',0).'</a></td>
|
||||||
</tr>
|
</tr>
|
||||||
';
|
';
|
||||||
}}
|
}}
|
||||||
else{
|
else{
|
||||||
echo '
|
echo '
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="4">No results</td>
|
<td colspan="4">No results</td>
|
||||||
</tr>
|
</tr>
|
||||||
';
|
';
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|
||||||
</table>
|
</table>
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
<?php
|
<?php
|
||||||
#################################################################################
|
#################################################################################
|
||||||
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
||||||
## --------------------------------------------------------------------------- ##
|
## --------------------------------------------------------------------------- ##
|
||||||
@@ -14,36 +14,36 @@ $result = $admin->search_email($_POST['s']);
|
|||||||
?>
|
?>
|
||||||
<table id="member">
|
<table id="member">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th class="dtbl"><a href="">1 «</a></th><th>Found emails (<?php echo count($result);?>)</th><th class="dtbl"><a href="">» 100</a></th>
|
<th class="dtbl"><a href="">1 «</a></th><th>Found emails (<?php echo count($result);?>)</th><th class="dtbl"><a href="">» 100</a></th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
|
|
||||||
</table>
|
</table>
|
||||||
<table id="profile">
|
<table id="profile">
|
||||||
<tr>
|
<tr>
|
||||||
<td class="b">UID</td>
|
<td class="b">UID</td>
|
||||||
<td class="b">Name</td>
|
<td class="b">Name</td>
|
||||||
<td class="b">Email</td>
|
<td class="b">Email</td>
|
||||||
</tr>
|
</tr>
|
||||||
<?php
|
<?php
|
||||||
if($result){
|
if($result){
|
||||||
for ($i = 0; $i <= count($result)-1; $i++) {
|
for ($i = 0; $i <= count($result)-1; $i++) {
|
||||||
echo '
|
echo '
|
||||||
<tr>
|
<tr>
|
||||||
<td>'.$result[$i]["id"].'</td>
|
<td>'.$result[$i]["id"].'</td>
|
||||||
<td><a href="?p=player&uid='.$result[$i]["id"].'">'.$database->getUserField($result[$i]["id"],'username',0).'</a></td>
|
<td><a href="?p=player&uid='.$result[$i]["id"].'">'.$database->getUserField($result[$i]["id"],'username',0).'</a></td>
|
||||||
<td>'.$result[$i]["email"].'</td>
|
<td>'.$result[$i]["email"].'</td>
|
||||||
</tr>
|
</tr>
|
||||||
';
|
';
|
||||||
}}
|
}}
|
||||||
else{
|
else{
|
||||||
echo '
|
echo '
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="4">No results</td>
|
<td colspan="4">No results</td>
|
||||||
</tr>
|
</tr>
|
||||||
';
|
';
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|
||||||
</table>
|
</table>
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
<?php
|
<?php
|
||||||
#################################################################################
|
#################################################################################
|
||||||
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
||||||
## --------------------------------------------------------------------------- ##
|
## --------------------------------------------------------------------------- ##
|
||||||
@@ -11,53 +11,53 @@
|
|||||||
?>
|
?>
|
||||||
<?php
|
<?php
|
||||||
$result = $admin->search_ip($_POST['s']);
|
$result = $admin->search_ip($_POST['s']);
|
||||||
$newArray = array();
|
$newArray = array();
|
||||||
function arr($arr,$el){
|
function arr($arr,$el){
|
||||||
global $newArray;
|
global $newArray;
|
||||||
for ($i = 0; $i <= count($arr)-1; $i++) {
|
for ($i = 0; $i <= count($arr)-1; $i++) {
|
||||||
if(in_array($el,$newArray)){
|
if(in_array($el,$newArray)){
|
||||||
return false;
|
return false;
|
||||||
}else{
|
}else{
|
||||||
array_push($newArray,$el);
|
array_push($newArray,$el);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
?>
|
?>
|
||||||
<table id="member">
|
<table id="member">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th class="dtbl"><a href="">1 «</a></th><th>Found IPs (<?php echo count($newArray);?>)</th><th class="dtbl"><a href="">» 100</a></th>
|
<th class="dtbl"><a href="">1 «</a></th><th>Found IPs (<?php echo count($newArray);?>)</th><th class="dtbl"><a href="">» 100</a></th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
|
|
||||||
</table>
|
</table>
|
||||||
<table id="profile">
|
<table id="profile">
|
||||||
<tr>
|
<tr>
|
||||||
<td class="b">IP</td>
|
<td class="b">IP</td>
|
||||||
<td class="b">Name</td>
|
<td class="b">Name</td>
|
||||||
</tr>
|
</tr>
|
||||||
<?php
|
<?php
|
||||||
if($result){
|
if($result){
|
||||||
for ($i = 0; $i <= count($result)-1; $i++) {
|
for ($i = 0; $i <= count($result)-1; $i++) {
|
||||||
if(arr($result,$result[$i]["ip"].$result[$i]["uid"])){
|
if(arr($result,$result[$i]["ip"].$result[$i]["uid"])){
|
||||||
echo '
|
echo '
|
||||||
<tr>
|
<tr>
|
||||||
<td>'.$result[$i]["ip"].'</td>
|
<td>'.$result[$i]["ip"].'</td>
|
||||||
<td><a href="?p=player&uid='.$result[$i]["uid"].'">'.$database->getUserField($result[$i]["uid"],'username',0).'</a></td>
|
<td><a href="?p=player&uid='.$result[$i]["uid"].'">'.$database->getUserField($result[$i]["uid"],'username',0).'</a></td>
|
||||||
</tr>
|
</tr>
|
||||||
';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else{
|
|
||||||
echo '
|
|
||||||
<tr>
|
|
||||||
<td colspan="4">No results</td>
|
|
||||||
</tr>
|
|
||||||
';
|
';
|
||||||
}
|
}
|
||||||
?>
|
}
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
echo '
|
||||||
|
<tr>
|
||||||
|
<td colspan="4">No results</td>
|
||||||
|
</tr>
|
||||||
|
';
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
|
||||||
</table>
|
</table>
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
<?php
|
<?php
|
||||||
#################################################################################
|
#################################################################################
|
||||||
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
||||||
## --------------------------------------------------------------------------- ##
|
## --------------------------------------------------------------------------- ##
|
||||||
@@ -14,43 +14,43 @@ $result = $admin->search_player($_POST['s']);
|
|||||||
?>
|
?>
|
||||||
<table id="member">
|
<table id="member">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th class="dtbl"><a href="">1 «</a></th><th>Found player (<?php echo count($result);?>)</th><th class="dtbl"><a href="">» 100</a></th>
|
<th class="dtbl"><a href="">1 «</a></th><th>Found player (<?php echo count($result);?>)</th><th class="dtbl"><a href="">» 100</a></th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
|
|
||||||
</table>
|
</table>
|
||||||
<table id="profile">
|
<table id="profile">
|
||||||
<tr>
|
<tr>
|
||||||
<td class="b">UID</td>
|
<td class="b">UID</td>
|
||||||
<td class="b">Player</td>
|
<td class="b">Player</td>
|
||||||
<td class="b">Villages</td>
|
<td class="b">Villages</td>
|
||||||
<td class="b">Pop</td>
|
<td class="b">Pop</td>
|
||||||
</tr>
|
</tr>
|
||||||
<?php
|
<?php
|
||||||
if($result){
|
if($result){
|
||||||
for ($i = 0; $i <= count($result)-1; $i++) {
|
for ($i = 0; $i <= count($result)-1; $i++) {
|
||||||
$varray = $database->getProfileVillages($result[$i]["id"]);
|
$varray = $database->getProfileVillages($result[$i]["id"]);
|
||||||
$totalpop = 0;
|
$totalpop = 0;
|
||||||
foreach($varray as $vil) {
|
foreach($varray as $vil) {
|
||||||
$totalpop += $vil['pop'];
|
$totalpop += $vil['pop'];
|
||||||
}
|
}
|
||||||
echo '
|
echo '
|
||||||
<tr>
|
<tr>
|
||||||
<td>'.$result[$i]["id"].'</td>
|
<td>'.$result[$i]["id"].'</td>
|
||||||
<td><a href="?p=player&uid='.$result[$i]["id"].'">'.$result[$i]["username"].'</a></td>
|
<td><a href="?p=player&uid='.$result[$i]["id"].'">'.$result[$i]["username"].'</a></td>
|
||||||
<td>'.count($varray).'</td>
|
<td>'.count($varray).'</td>
|
||||||
<td>'.$totalpop.'</td>
|
<td>'.$totalpop.'</td>
|
||||||
</tr>
|
</tr>
|
||||||
';
|
';
|
||||||
}}
|
}}
|
||||||
else{
|
else{
|
||||||
echo '
|
echo '
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="4">No results</td>
|
<td colspan="4">No results</td>
|
||||||
</tr>
|
</tr>
|
||||||
';
|
';
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|
||||||
</table>
|
</table>
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
<?php
|
<?php
|
||||||
#################################################################################
|
#################################################################################
|
||||||
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
||||||
## --------------------------------------------------------------------------- ##
|
## --------------------------------------------------------------------------- ##
|
||||||
@@ -35,15 +35,15 @@ $result = $admin->search_village($_POST['s']);
|
|||||||
<tr>
|
<tr>
|
||||||
<td style="background-color: #F3F3F3;">ID</th>
|
<td style="background-color: #F3F3F3;">ID</th>
|
||||||
<td style="background-color: #F3F3F3;">Village Name</th>
|
<td style="background-color: #F3F3F3;">Village Name</th>
|
||||||
<td style="background-color: #F3F3F3;">Village Owner</th>
|
<td style="background-color: #F3F3F3;">Village Owner</th>
|
||||||
<td style="background-color: #F3F3F3;">Population</th>
|
<td style="background-color: #F3F3F3;">Population</th>
|
||||||
<td style="background-color: #F3F3F3;"></th>
|
<td style="background-color: #F3F3F3;"></th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<?php
|
<?php
|
||||||
if($result)
|
if($result)
|
||||||
{
|
{
|
||||||
for ($i = 0; $i <= count($result)-1; $i++)
|
for ($i = 0; $i <= count($result)-1; $i++)
|
||||||
{
|
{
|
||||||
$delLink = '<a href="?action=delVil&did='.$result[$i]['wref'].'" onClick="return del(\'did\','.$result[$i]['wref'].');"><img src="../img/Admin/del.gif" class="del"></a>';
|
$delLink = '<a href="?action=delVil&did='.$result[$i]['wref'].'" onClick="return del(\'did\','.$result[$i]['wref'].');"><img src="../img/Admin/del.gif" class="del"></a>';
|
||||||
@@ -54,7 +54,7 @@ $result = $admin->search_village($_POST['s']);
|
|||||||
<td><a href="?p=player&uid='.$result[$i]["owner"].'">'.$database->getUserField($result[$i]["owner"],'username',0).'</a></td>
|
<td><a href="?p=player&uid='.$result[$i]["owner"].'">'.$database->getUserField($result[$i]["owner"],'username',0).'</a></td>
|
||||||
<td>'.$result[$i]["pop"].'</td>
|
<td>'.$result[$i]["pop"].'</td>
|
||||||
<td>'.$delLink.'</td>
|
<td>'.$delLink.'</td>
|
||||||
</tr>';
|
</tr>';
|
||||||
}
|
}
|
||||||
echo '
|
echo '
|
||||||
<tr>
|
<tr>
|
||||||
@@ -71,7 +71,7 @@ $result = $admin->search_village($_POST['s']);
|
|||||||
</tr>';
|
</tr>';
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
echo '
|
echo '
|
||||||
<tr>
|
<tr>
|
||||||
<td></td>
|
<td></td>
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
<?php
|
<?php
|
||||||
#################################################################################
|
#################################################################################
|
||||||
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
||||||
## --------------------------------------------------------------------------- ##
|
## --------------------------------------------------------------------------- ##
|
||||||
@@ -17,9 +17,9 @@
|
|||||||
<tr>
|
<tr>
|
||||||
<th colspan="3">Search v1.0</th>
|
<th colspan="3">Search v1.0</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tr class="slr3">
|
<tr class="slr3">
|
||||||
<td>
|
<td>
|
||||||
<select name="p" size="1" class="slr3">
|
<select name="p" size="1" class="slr3">
|
||||||
<option value="player" <?php if($_POST['p']=='player'){echo "selected";}?>>Search Players</option>
|
<option value="player" <?php if($_POST['p']=='player'){echo "selected";}?>>Search Players</option>
|
||||||
<option value="alliances" <?php if($_POST['p']=='alliances'){echo "selected";}?>>Search Alliances</option>
|
<option value="alliances" <?php if($_POST['p']=='alliances'){echo "selected";}?>>Search Alliances</option>
|
||||||
|
|||||||
+11
-11
@@ -1,4 +1,4 @@
|
|||||||
<?php
|
<?php
|
||||||
#################################################################################
|
#################################################################################
|
||||||
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
||||||
## --------------------------------------------------------------------------- ##
|
## --------------------------------------------------------------------------- ##
|
||||||
@@ -10,11 +10,11 @@
|
|||||||
## ##
|
## ##
|
||||||
#################################################################################
|
#################################################################################
|
||||||
|
|
||||||
if($user['tribe'] == 1)
|
if($user['tribe'] == 1)
|
||||||
{
|
{
|
||||||
$tribename = "Roman";
|
$tribename = "Roman";
|
||||||
}
|
}
|
||||||
else if($user['tribe'] == 2)
|
else if($user['tribe'] == 2)
|
||||||
{
|
{
|
||||||
$tribename = "Teutons";
|
$tribename = "Teutons";
|
||||||
}
|
}
|
||||||
@@ -25,7 +25,7 @@ else if($user['tribe'] == 3)
|
|||||||
else if($user['tribe'] == 4)
|
else if($user['tribe'] == 4)
|
||||||
{
|
{
|
||||||
$tribename = "Nature";
|
$tribename = "Nature";
|
||||||
}
|
}
|
||||||
else if($user['tribe'] == 5)
|
else if($user['tribe'] == 5)
|
||||||
{
|
{
|
||||||
$tribename ="Natars";
|
$tribename ="Natars";
|
||||||
@@ -40,27 +40,27 @@ foreach($varray as $vil)
|
|||||||
$totalpop += $vil['pop'];
|
$totalpop += $vil['pop'];
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
<form action="" method="post">
|
<form action="" method="post">
|
||||||
<table id="member">
|
<table id="member">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th colspan="3">Search <font color="red">("<?php echo $user['username']; ?>" = <?php echo $numsimplayers; ?> Similar)</font></th>
|
<th colspan="3">Search <font color="red">("<?php echo $user['username']; ?>" = <?php echo $numsimplayers; ?> Similar)</font></th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
</table>
|
</table>
|
||||||
<center>
|
<center>
|
||||||
<div id="s_nav2" >
|
<div id="s_nav2" >
|
||||||
<div align="left" style="font-size: 10pt;"><b>Player:</b> <a href="?p=player&uid=<?php echo $user['id'];?>"><?php echo $user['username'];?></a> (uid: <?php echo $user['id'];?>)</div>
|
<div align="left" style="font-size: 10pt;"><b>Player:</b> <a href="?p=player&uid=<?php echo $user['id'];?>"><?php echo $user['username'];?></a> (uid: <?php echo $user['id'];?>)</div>
|
||||||
<div align="left" style="font-size: 9pt;"><b>Tribe:</b> <?php echo $tribename; ?> | <b>Villages:</b> <?php echo count($varray);?> | <b>Inhabitants:</b> <?php echo $totalpop; ?></div>
|
<div align="left" style="font-size: 9pt;"><b>Tribe:</b> <?php echo $tribename; ?> | <b>Villages:</b> <?php echo count($varray);?> | <b>Inhabitants:</b> <?php echo $totalpop; ?></div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
if($_GET['did'])
|
if($_GET['did'])
|
||||||
{ ?>
|
{ ?>
|
||||||
<div id="s_nav4">
|
<div id="s_nav4">
|
||||||
<div align="left" style="font-size: 10pt;"><b>Village:</b> <a href="?p=village&did=<?php echo $village['wref'];?>"><?php echo $village['name'];?></a> (did: <?php echo $village['wref'];?>)</div>
|
<div align="left" style="font-size: 10pt;"><b>Village:</b> <a href="?p=village&did=<?php echo $village['wref'];?>"><?php echo $village['name'];?></a> (did: <?php echo $village['wref'];?>)</div>
|
||||||
<div align="left" style="font-size: 9pt;"><b>Coordinates:</b> (<?php echo $coor['x'];?>|<?php echo $coor['y'];?>) | <b>Inhabitants</b>: <?php echo $village['pop'];?>
|
<div align="left" style="font-size: 9pt;"><b>Coordinates:</b> (<?php echo $coor['x'];?>|<?php echo $coor['y'];?>) | <b>Inhabitants</b>: <?php echo $village['pop'];?>
|
||||||
</div><?php
|
</div><?php
|
||||||
} ?>
|
} ?>
|
||||||
</center>
|
</center>
|
||||||
</form>
|
</form>
|
||||||
+177
-177
@@ -1,182 +1,182 @@
|
|||||||
<?php
|
<?php
|
||||||
#################################################################################
|
#################################################################################
|
||||||
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
||||||
## --------------------------------------------------------------------------- ##
|
## --------------------------------------------------------------------------- ##
|
||||||
## Filename server_info.tpl ##
|
## Filename server_info.tpl ##
|
||||||
## Developed by: Dzoki ##
|
## Developed by: Dzoki ##
|
||||||
## License: TravianX Project ##
|
## License: TravianX Project ##
|
||||||
## Copyright: TravianX (c) 2010-2011. All rights reserved. ##
|
## Copyright: TravianX (c) 2010-2011. All rights reserved. ##
|
||||||
## Enhanced: aggenkeech ##
|
## Enhanced: aggenkeech ##
|
||||||
#################################################################################
|
#################################################################################
|
||||||
|
|
||||||
$tribe1 = mysql_query("SELECT SQL_CACHE * FROM ".TB_PREFIX."users WHERE tribe = 1");
|
$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");
|
$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");
|
$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));
|
$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;
|
$users = mysql_num_rows(mysql_query("SELECT SQL_CACHE * FROM ".TB_PREFIX."users")) - 1;
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<br /><br />
|
<br /><br />
|
||||||
<table id="profile">
|
<table id="profile">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th colspan="2">Player Information</th>
|
<th colspan="2">Player Information</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Registered players</td>
|
<td>Registered players</td>
|
||||||
<td><?php echo $users; ?></td>
|
<td><?php echo $users; ?></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Active players</td>
|
<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 = mysql_query("SELECT SQL_CACHE * FROM ".TB_PREFIX."active"); $num_rows = mysql_num_rows($result); echo $num_rows; ?></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Players online</td>
|
<td>Players online</td>
|
||||||
<td><?php $t =time();
|
<td><?php $t =time();
|
||||||
$result = mysql_query("SELECT SQL_CACHE * FROM ".TB_PREFIX."users WHERE ".$t." - timestamp < 300") or die(mysql_error());;
|
$result = mysql_query("SELECT SQL_CACHE * FROM ".TB_PREFIX."users WHERE ".$t." - timestamp < 300") or die(mysql_error());;
|
||||||
$num_rows = mysql_num_rows($result);
|
$num_rows = mysql_num_rows($result);
|
||||||
echo $num_rows;?>
|
echo $num_rows;?>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Players Banned</td>
|
<td>Players Banned</td>
|
||||||
<td><?php
|
<td><?php
|
||||||
$result = mysql_query("SELECT SQL_CACHE * FROM ".TB_PREFIX."users WHERE access = 0");
|
$result = mysql_query("SELECT SQL_CACHE * FROM ".TB_PREFIX."users WHERE access = 0");
|
||||||
$num_rows = mysql_num_rows($result);
|
$num_rows = mysql_num_rows($result);
|
||||||
echo $num_rows;?>
|
echo $num_rows;?>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Villages settled</td>
|
<td>Villages settled</td>
|
||||||
<td><?php
|
<td><?php
|
||||||
$result = mysql_query("SELECT SQL_CACHE * FROM ".TB_PREFIX."vdata");
|
$result = mysql_query("SELECT SQL_CACHE * FROM ".TB_PREFIX."vdata");
|
||||||
$num_rows = mysql_num_rows($result);
|
$num_rows = mysql_num_rows($result);
|
||||||
echo $num_rows; ?>
|
echo $num_rows; ?>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
<br />
|
|
||||||
|
|
||||||
<table id="profile">
|
|
||||||
<thead>
|
|
||||||
<tr><th colspan="3">Player Information</th></tr>
|
|
||||||
<td class="b">Tribe</td>
|
|
||||||
<td class="b">Registered</td>
|
|
||||||
<td class="b">Percent</td>
|
|
||||||
</thead>
|
|
||||||
<tbody>
|
|
||||||
<tr>
|
|
||||||
<td>Romans</td>
|
|
||||||
<td><?php echo $tribes[0]; ?></td>
|
|
||||||
<td><?php $percents = 100*($tribes[0] / $users); echo $percents = intval ($percents); echo "%"; ?></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>Teutons</td>
|
|
||||||
<td><?php echo $tribes[1]; ?></td>
|
|
||||||
<td><?php $percents = 100*($tribes[1] / $users); echo $percents = intval ($percents); echo "%";?></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>Gauls</td>
|
|
||||||
<td><?php echo $tribes[2]; ?></td>
|
|
||||||
<td><?php $percents = 100*($tribes[2] / $users); echo $percents = intval ($percents); echo "%"; ?></td>
|
|
||||||
</tr>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
|
|
||||||
<br />
|
<br />
|
||||||
|
|
||||||
<table id="profile">
|
<table id="profile">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr><th colspan="3">Player Information</th></tr>
|
||||||
<th colspan="3">Server Information</th>
|
<td class="b">Tribe</td>
|
||||||
</tr>
|
<td class="b">Registered</td>
|
||||||
<td class="b"></td>
|
<td class="b">Percent</td>
|
||||||
<td class="b">Total</td>
|
</thead>
|
||||||
<td class="b">Average</td>
|
<tbody>
|
||||||
</thead>
|
<tr>
|
||||||
<tbody>
|
<td>Romans</td>
|
||||||
<tr>
|
<td><?php echo $tribes[0]; ?></td>
|
||||||
<td><img src="../../<?php echo GP_LOCATE; ?>img/a/gold.gif" alt="Gold" title="Gold"> Gold</td>
|
<td><?php $percents = 100*($tribes[0] / $users); echo $percents = intval ($percents); echo "%"; ?></td>
|
||||||
<td><?php $gold = mysql_query("SELECT SUM(gold) AS sumofgold FROM ".TB_PREFIX."users"); $getgold=mysql_fetch_assoc($gold); echo $getgold['sumofgold']; ?></td>
|
</tr>
|
||||||
<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>
|
<tr>
|
||||||
</tr>
|
<td>Teutons</td>
|
||||||
</tbody>
|
<td><?php echo $tribes[1]; ?></td>
|
||||||
</table>
|
<td><?php $percents = 100*($tribes[1] / $users); echo $percents = intval ($percents); echo "%";?></td>
|
||||||
</div>
|
</tr>
|
||||||
<table id="member">
|
<tr>
|
||||||
<thead>
|
<td>Gauls</td>
|
||||||
<tr>
|
<td><?php echo $tribes[2]; ?></td>
|
||||||
<th colspan="10">Troops on the Server</th>
|
<td><?php $percents = 100*($tribes[2] / $users); echo $percents = intval ($percents); echo "%"; ?></td>
|
||||||
</tr>
|
</tr>
|
||||||
<?php
|
</tbody>
|
||||||
for($i=1; $i<11; $i++)
|
</table>
|
||||||
{
|
|
||||||
echo '<td class="on"><img src="../../'.GP_LOCATE.'img/u/'.$i.'.gif"></td>';
|
<br />
|
||||||
}
|
|
||||||
echo '</thead><tbody>';
|
<table id="profile">
|
||||||
for($i=1; $i<11; $i++)
|
<thead>
|
||||||
{
|
<tr>
|
||||||
$t = mysql_query("SELECT SUM(u".$i.") AS sumof FROM ".TB_PREFIX."units");
|
<th colspan="3">Server Information</th>
|
||||||
$troop = mysql_fetch_assoc($t);
|
</tr>
|
||||||
echo '<td class="on">'.$troop['sumof'].'</td>';
|
<td class="b"></td>
|
||||||
}
|
<td class="b">Total</td>
|
||||||
|
<td class="b">Average</td>
|
||||||
echo "</tr>";
|
</thead>
|
||||||
for($i=11; $i<21; $i++)
|
<tbody>
|
||||||
{
|
<tr>
|
||||||
echo '<td class="on"><img src="../../'.GP_LOCATE.'img/u/'.$i.'.gif"></td>';
|
<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>
|
||||||
echo '</thead><tbody>';
|
<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>
|
||||||
for($i=11; $i<21; $i++)
|
</tr>
|
||||||
{
|
</tbody>
|
||||||
$t = mysql_query("SELECT SUM(u".$i.") AS sumof FROM ".TB_PREFIX."units");
|
</table>
|
||||||
$troop = mysql_fetch_assoc($t);
|
</div>
|
||||||
echo '<td class="on">'.$troop['sumof'].'</td>';
|
<table id="member">
|
||||||
}
|
<thead>
|
||||||
|
<tr>
|
||||||
echo "</tr>";
|
<th colspan="10">Troops on the Server</th>
|
||||||
for($i=21; $i<31; $i++)
|
</tr>
|
||||||
{
|
<?php
|
||||||
echo '<td class="on"><img src="../../'.GP_LOCATE.'img/u/'.$i.'.gif"></td>';
|
for($i=1; $i<11; $i++)
|
||||||
}
|
{
|
||||||
echo '</thead><tbody>';
|
echo '<td class="on"><img src="../../'.GP_LOCATE.'img/u/'.$i.'.gif"></td>';
|
||||||
for($i=21; $i<31; $i++)
|
}
|
||||||
{
|
echo '</thead><tbody>';
|
||||||
$t = mysql_query("SELECT SUM(u".$i.") AS sumof FROM ".TB_PREFIX."units");
|
for($i=1; $i<11; $i++)
|
||||||
$troop = mysql_fetch_assoc($t);
|
{
|
||||||
echo '<td class="on">'.$troop['sumof'].'</td>';
|
$t = mysql_query("SELECT SUM(u".$i.") AS sumof FROM ".TB_PREFIX."units");
|
||||||
}
|
$troop = mysql_fetch_assoc($t);
|
||||||
|
echo '<td class="on">'.$troop['sumof'].'</td>';
|
||||||
echo "</tr>";
|
}
|
||||||
for($i=31; $i<41; $i++)
|
|
||||||
{
|
echo "</tr>";
|
||||||
echo '<td class="on"><img src="../../'.GP_LOCATE.'img/u/'.$i.'.gif"></td>';
|
for($i=11; $i<21; $i++)
|
||||||
}
|
{
|
||||||
echo '</thead><tbody>';
|
echo '<td class="on"><img src="../../'.GP_LOCATE.'img/u/'.$i.'.gif"></td>';
|
||||||
for($i=31; $i<41; $i++)
|
}
|
||||||
{
|
echo '</thead><tbody>';
|
||||||
$t = mysql_query("SELECT SUM(u".$i.") AS sumof FROM ".TB_PREFIX."units");
|
for($i=11; $i<21; $i++)
|
||||||
$troop = mysql_fetch_assoc($t);
|
{
|
||||||
echo '<td class="on">'.$troop['sumof'].'</td>';
|
$t = mysql_query("SELECT SUM(u".$i.") AS sumof FROM ".TB_PREFIX."units");
|
||||||
}
|
$troop = mysql_fetch_assoc($t);
|
||||||
|
echo '<td class="on">'.$troop['sumof'].'</td>';
|
||||||
echo "</tr>";
|
}
|
||||||
for($i=41; $i<51; $i++)
|
|
||||||
{
|
echo "</tr>";
|
||||||
echo '<td class="on"><img src="../../'.GP_LOCATE.'img/u/'.$i.'.gif"></td>';
|
for($i=21; $i<31; $i++)
|
||||||
}
|
{
|
||||||
echo '</thead><tbody>';
|
echo '<td class="on"><img src="../../'.GP_LOCATE.'img/u/'.$i.'.gif"></td>';
|
||||||
for($i=41; $i<51; $i++)
|
}
|
||||||
{
|
echo '</thead><tbody>';
|
||||||
$t = mysql_query("SELECT SUM(u".$i.") AS sumof FROM ".TB_PREFIX."units");
|
for($i=21; $i<31; $i++)
|
||||||
$troop = mysql_fetch_assoc($t);
|
{
|
||||||
echo '<td class="on">'.$troop['sumof'].'</td>';
|
$t = mysql_query("SELECT SUM(u".$i.") AS sumof FROM ".TB_PREFIX."units");
|
||||||
}
|
$troop = mysql_fetch_assoc($t);
|
||||||
?>
|
echo '<td class="on">'.$troop['sumof'].'</td>';
|
||||||
</tbody>
|
}
|
||||||
</table>
|
|
||||||
|
echo "</tr>";
|
||||||
|
for($i=31; $i<41; $i++)
|
||||||
|
{
|
||||||
|
echo '<td class="on"><img src="../../'.GP_LOCATE.'img/u/'.$i.'.gif"></td>';
|
||||||
|
}
|
||||||
|
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);
|
||||||
|
echo '<td class="on">'.$troop['sumof'].'</td>';
|
||||||
|
}
|
||||||
|
|
||||||
|
echo "</tr>";
|
||||||
|
for($i=41; $i<51; $i++)
|
||||||
|
{
|
||||||
|
echo '<td class="on"><img src="../../'.GP_LOCATE.'img/u/'.$i.'.gif"></td>';
|
||||||
|
}
|
||||||
|
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);
|
||||||
|
echo '<td class="on">'.$troop['sumof'].'</td>';
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
<div>
|
<div>
|
||||||
+14
-14
@@ -66,7 +66,7 @@
|
|||||||
else if($units['u29'] > 0){$u29 = '<font color="black">'.$units['u29'].'';}
|
else if($units['u29'] > 0){$u29 = '<font color="black">'.$units['u29'].'';}
|
||||||
if($units['u30'] == 0){$u30 = '<font color="gray">'.$units['u30'].'';}
|
if($units['u30'] == 0){$u30 = '<font color="gray">'.$units['u30'].'';}
|
||||||
else if($units['u30'] > 0){$u30 = '<font color="black">'.$units['u30'].'';}
|
else if($units['u30'] > 0){$u30 = '<font color="black">'.$units['u30'].'';}
|
||||||
## Nature
|
## Nature
|
||||||
if($units['u31'] == 0){$u31 = '<font color="gray">'.$units['u31'].'';}
|
if($units['u31'] == 0){$u31 = '<font color="gray">'.$units['u31'].'';}
|
||||||
else if($units['u31'] > 0){$u31 = '<font color="black">'.$units['u31'].'';}
|
else if($units['u31'] > 0){$u31 = '<font color="black">'.$units['u31'].'';}
|
||||||
if($units['u32'] == 0){$u32 = '<font color="gray">'.$units['u32'].'';}
|
if($units['u32'] == 0){$u32 = '<font color="gray">'.$units['u32'].'';}
|
||||||
@@ -85,7 +85,7 @@
|
|||||||
else if($units['u38'] > 0){$u38 = '<font color="black">'.$units['u38'].'';}
|
else if($units['u38'] > 0){$u38 = '<font color="black">'.$units['u38'].'';}
|
||||||
if($units['u39'] == 0){$u39 = '<font color="gray">'.$units['u39'].'';}
|
if($units['u39'] == 0){$u39 = '<font color="gray">'.$units['u39'].'';}
|
||||||
else if($units['u39'] > 0){$u39 = '<font color="black">'.$units['u39'].'';}
|
else if($units['u39'] > 0){$u39 = '<font color="black">'.$units['u39'].'';}
|
||||||
## Natars
|
## Natars
|
||||||
if($units['u40'] == 0){$u40 = '<font color="gray">'.$units['u40'].'';}
|
if($units['u40'] == 0){$u40 = '<font color="gray">'.$units['u40'].'';}
|
||||||
else if($units['u40'] > 0){$u40 = '<font color="black">'.$units['u40'].'';}
|
else if($units['u40'] > 0){$u40 = '<font color="black">'.$units['u40'].'';}
|
||||||
if($units['u41'] == 0){$u41 = '<font color="gray">'.$units['u41'].'';}
|
if($units['u41'] == 0){$u41 = '<font color="gray">'.$units['u41'].'';}
|
||||||
@@ -108,12 +108,12 @@
|
|||||||
else if($units['u49'] > 0){$u49 = '<font color="black">'.$units['u49'].'';}
|
else if($units['u49'] > 0){$u49 = '<font color="black">'.$units['u49'].'';}
|
||||||
if($units['u50'] == 0){$u50 = '<font color="gray">'.$units['u50'].'';}
|
if($units['u50'] == 0){$u50 = '<font color="gray">'.$units['u50'].'';}
|
||||||
else if($units['u50'] > 0){$u50 = '<font color="black">'.$units['u50'].'';}
|
else if($units['u50'] > 0){$u50 = '<font color="black">'.$units['u50'].'';}
|
||||||
if($_SESSION['access'] == ADMIN)
|
if($_SESSION['access'] == ADMIN)
|
||||||
{
|
{
|
||||||
if($user['tribe'] == 1)
|
if($user['tribe'] == 1)
|
||||||
{
|
{
|
||||||
echo '
|
echo '
|
||||||
</tr></thead><tbody>
|
</tr></thead><tbody>
|
||||||
<tr>
|
<tr>
|
||||||
<td><center /><img src="../img/un/u/1.gif"></img></td>
|
<td><center /><img src="../img/un/u/1.gif"></img></td>
|
||||||
<td><center /><img src="../img/un/u/2.gif"></img></td>
|
<td><center /><img src="../img/un/u/2.gif"></img></td>
|
||||||
@@ -143,7 +143,7 @@
|
|||||||
else if($user['tribe'] == 2)
|
else if($user['tribe'] == 2)
|
||||||
{
|
{
|
||||||
echo '
|
echo '
|
||||||
</tr></thead><tbody>
|
</tr></thead><tbody>
|
||||||
<tr>
|
<tr>
|
||||||
<td><center /><img src="../img/un/u/11.gif"></img></td>
|
<td><center /><img src="../img/un/u/11.gif"></img></td>
|
||||||
<td><center /><img src="../img/un/u/12.gif"></img></td>
|
<td><center /><img src="../img/un/u/12.gif"></img></td>
|
||||||
@@ -173,7 +173,7 @@
|
|||||||
else if($user['tribe'] == 3)
|
else if($user['tribe'] == 3)
|
||||||
{
|
{
|
||||||
echo '
|
echo '
|
||||||
</tr></thead><tbody>
|
</tr></thead><tbody>
|
||||||
<tr>
|
<tr>
|
||||||
<td><center /><img src="../img/un/u/21.gif"></img></td>
|
<td><center /><img src="../img/un/u/21.gif"></img></td>
|
||||||
<td><center /><img src="../img/un/u/22.gif"></img></td>
|
<td><center /><img src="../img/un/u/22.gif"></img></td>
|
||||||
@@ -186,8 +186,8 @@
|
|||||||
<td><center /><img src="../img/un/u/29.gif"></img></td>
|
<td><center /><img src="../img/un/u/29.gif"></img></td>
|
||||||
<td><center /><img src="../img/un/u/30.gif"></img></td>
|
<td><center /><img src="../img/un/u/30.gif"></img></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td><center />'.$u21.'</td>
|
<td><center />'.$u21.'</td>
|
||||||
<td><center />'.$u22.'</td>
|
<td><center />'.$u22.'</td>
|
||||||
@@ -205,7 +205,7 @@
|
|||||||
else if($user['tribe'] == 4)
|
else if($user['tribe'] == 4)
|
||||||
{
|
{
|
||||||
echo '
|
echo '
|
||||||
</tr></thead><tbody>
|
</tr></thead><tbody>
|
||||||
<tr>
|
<tr>
|
||||||
<td><center /><img src="../<?php echo GP_LOCATE; ?>img/u/31.gif"></img></td>
|
<td><center /><img src="../<?php echo GP_LOCATE; ?>img/u/31.gif"></img></td>
|
||||||
<td><center /><img src="../<?php echo GP_LOCATE; ?>img/u/32.gif"></img></td>
|
<td><center /><img src="../<?php echo GP_LOCATE; ?>img/u/32.gif"></img></td>
|
||||||
@@ -235,7 +235,7 @@
|
|||||||
else if($user['tribe'] == 5)
|
else if($user['tribe'] == 5)
|
||||||
{
|
{
|
||||||
echo '
|
echo '
|
||||||
</tr></thead><tbody>
|
</tr></thead><tbody>
|
||||||
<tr>
|
<tr>
|
||||||
<td><center /><img src="../<?php echo GP_LOCATE; ?>img/u/41.gif"></img></td>
|
<td><center /><img src="../<?php echo GP_LOCATE; ?>img/u/41.gif"></img></td>
|
||||||
<td><center /><img src="../<?php echo GP_LOCATE; ?>img/u/42.gif"></img></td>
|
<td><center /><img src="../<?php echo GP_LOCATE; ?>img/u/42.gif"></img></td>
|
||||||
@@ -248,8 +248,8 @@
|
|||||||
<td><center /><img src="../<?php echo GP_LOCATE; ?>img/u/49.gif"></img></td>
|
<td><center /><img src="../<?php echo GP_LOCATE; ?>img/u/49.gif"></img></td>
|
||||||
<td><center /><img src="../<?php echo GP_LOCATE; ?>img/u/50.gif"></img></td>
|
<td><center /><img src="../<?php echo GP_LOCATE; ?>img/u/50.gif"></img></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td><center />'.$u41.'</td>
|
<td><center />'.$u41.'</td>
|
||||||
<td><center />'.$u42.'</td>
|
<td><center />'.$u42.'</td>
|
||||||
@@ -270,7 +270,7 @@
|
|||||||
<?php
|
<?php
|
||||||
if($_SESSION['access'] == ADMIN)
|
if($_SESSION['access'] == ADMIN)
|
||||||
{
|
{
|
||||||
echo '<a href="admin.php?p=addTroops&did='.$_GET['did'].'">Edit Troops</a>';
|
echo '<a href="admin.php?p=addTroops&did='.$_GET['did'].'">Edit Troops</a>';
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
<?php
|
<?php
|
||||||
#################################################################################
|
#################################################################################
|
||||||
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
||||||
## --------------------------------------------------------------------------- ##
|
## --------------------------------------------------------------------------- ##
|
||||||
@@ -62,7 +62,7 @@ $id = $_SESSION['id']; ?>
|
|||||||
</form>
|
</form>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
if(isset($_GET['g']))
|
if(isset($_GET['g']))
|
||||||
{
|
{
|
||||||
echo '<br /><br /><font color="Red"><b>Gold Added</font></b>';
|
echo '<br /><br /><font color="Red"><b>Gold Added</font></b>';
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ if(isset($id))
|
|||||||
<td>Description</td>
|
<td>Description</td>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<?php
|
<?php
|
||||||
$sql = "SELECT * FROM ".TB_PREFIX."illegal_log WHERE user = $id";
|
$sql = "SELECT * FROM ".TB_PREFIX."illegal_log WHERE user = $id";
|
||||||
$result = mysql_query($sql);
|
$result = mysql_query($sql);
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ if(isset($id))
|
|||||||
<td>IP</td>
|
<td>IP</td>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<?php
|
<?php
|
||||||
$sql = "SELECT * FROM ".TB_PREFIX."login_log WHERE uid = $id";
|
$sql = "SELECT * FROM ".TB_PREFIX."login_log WHERE uid = $id";
|
||||||
$result = mysql_query($sql);
|
$result = mysql_query($sql);
|
||||||
|
|||||||
+35
-35
@@ -1,4 +1,4 @@
|
|||||||
<?php
|
<?php
|
||||||
#################################################################################
|
#################################################################################
|
||||||
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
||||||
## --------------------------------------------------------------------------- ##
|
## --------------------------------------------------------------------------- ##
|
||||||
@@ -48,28 +48,28 @@ if(isset($id))
|
|||||||
91l+gRNDLzw6f+nepcsPrl14cPXW8wcMWqVaEYdtPdZYubUHww0AMs5cusygU68UtVUr87CPWbdd
|
91l+gRNDLzw6f+nepcsPrl14cPXW8wcMWqVaEYdtPdZYubUHww0AMs5cusygU68UtVUr87CPWbdd
|
||||||
9Ly83TcO7Lq2I7ozoXfZTAalCjWZemnlaYo2u0wVFkoJdwoyZDOZNDi//vqRwbkjac+dC827p2h3
|
9Ly83TcO7Lq2I7ozoXfZTAalCjWZemnlaYo2u0wVFkoJdwoyZDOZNDi//vqRwbkjac+dC827p2h3
|
||||||
Gyh3S6m0a0Qszrnz6RnQWAAxV5tT/VAiNQAAAABJRU5ErkJggg==";
|
Gyh3S6m0a0Qszrnz6RnQWAAxV5tT/VAiNQAAAABJRU5ErkJggg==";
|
||||||
class Generator
|
class Generator
|
||||||
{
|
{
|
||||||
public function getMapCheck($wref)
|
public function getMapCheck($wref)
|
||||||
{
|
{
|
||||||
return substr(md5($wref),5,2);
|
return substr(md5($wref),5,2);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
$generator = new Generator;
|
$generator = new Generator;
|
||||||
if($village and $user)
|
if($village and $user)
|
||||||
{
|
{
|
||||||
include("search2.tpl"); ?>
|
include("search2.tpl"); ?>
|
||||||
<style>
|
<style>
|
||||||
.del {width:12px; height:12px; background-image: url(img/admin/icon/del.gif);}
|
.del {width:12px; height:12px; background-image: url(img/admin/icon/del.gif);}
|
||||||
</style>
|
</style>
|
||||||
<link href="../<?php echo GP_LOCATE; ?>lang/en/compact.css?f4b7c" rel="stylesheet" type="text/css">
|
<link href="../<?php echo GP_LOCATE; ?>lang/en/compact.css?f4b7c" rel="stylesheet" type="text/css">
|
||||||
<br />
|
<br />
|
||||||
|
|
||||||
<table id="profile" cellpadding="1" cellspacing="1" >
|
<table id="profile" cellpadding="1" cellspacing="1" >
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th colspan="3">Village Information</th>
|
<th colspan="3">Village Information</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr>
|
<tr>
|
||||||
@@ -107,8 +107,8 @@ if(isset($id))
|
|||||||
<tr>
|
<tr>
|
||||||
<td>Field type</td>
|
<td>Field type</td>
|
||||||
<td colspan="2">
|
<td colspan="2">
|
||||||
<?php
|
<?php
|
||||||
for ($i = 0; $i <= 3; $i++)
|
for ($i = 0; $i <= 3; $i++)
|
||||||
{
|
{
|
||||||
$a = $i+1;
|
$a = $i+1;
|
||||||
if($i != 3)
|
if($i != 3)
|
||||||
@@ -118,7 +118,7 @@ if(isset($id))
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
echo $typ[$i].'x <img src="../img/admin/r/'.$a.'.gif"> ';
|
echo $typ[$i].'x <img src="../img/admin/r/'.$a.'.gif"> ';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</td>
|
</td>
|
||||||
@@ -178,7 +178,7 @@ if(isset($id))
|
|||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
|
|
||||||
<table id="member">
|
<table id="member">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
@@ -221,19 +221,19 @@ if(isset($id))
|
|||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
<table id="member" cellpadding="1" cellspacing="1" >
|
<table id="member" cellpadding="1" cellspacing="1" >
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th colspan="6">Oases</th>
|
<th colspan="6">Oases</th>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="ra"></td>
|
<td class="ra"></td>
|
||||||
<td class="hab">Name</td>
|
<td class="hab">Name</td>
|
||||||
<td class="hab">Coordinates</td>
|
<td class="hab">Coordinates</td>
|
||||||
<td class="hab">Loyalty</td>
|
<td class="hab">Loyalty</td>
|
||||||
<td class="hab">Resources</td>
|
<td class="hab">Resources</td>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<?php
|
<?php
|
||||||
@@ -278,7 +278,7 @@ if(isset($id))
|
|||||||
$oasiswref = $row['wref'];
|
$oasiswref = $row['wref'];
|
||||||
$oasisx = mysql_result(mysql_query("SELECT x FROM ".TB_PREFIX."wdata WHERE id = ".$oasiswref.""), 0);
|
$oasisx = mysql_result(mysql_query("SELECT x FROM ".TB_PREFIX."wdata WHERE id = ".$oasiswref.""), 0);
|
||||||
$oasisy = mysql_result(mysql_query("SELECT y FROM ".TB_PREFIX."wdata WHERE id = ".$oasiswref.""), 0);
|
$oasisy = mysql_result(mysql_query("SELECT y FROM ".TB_PREFIX."wdata WHERE id = ".$oasiswref.""), 0);
|
||||||
|
|
||||||
$type = $row['type'];
|
$type = $row['type'];
|
||||||
if($type==1) { $type = '<img src="../img/admin/r/1.gif"> + 25%'; }
|
if($type==1) { $type = '<img src="../img/admin/r/1.gif"> + 25%'; }
|
||||||
elseif($type==2) { $type = '<img src="../img/admin/r/1.gif"> + 25%'; }
|
elseif($type==2) { $type = '<img src="../img/admin/r/1.gif"> + 25%'; }
|
||||||
@@ -300,7 +300,7 @@ if(isset($id))
|
|||||||
<td class=\"hab\">".$row['loyalty']."%</td>
|
<td class=\"hab\">".$row['loyalty']."%</td>
|
||||||
<td class=\"hab\">$type</td>
|
<td class=\"hab\">$type</td>
|
||||||
</tr>";
|
</tr>";
|
||||||
} ##<td class=\"hab\">".$row['wood']." <img src=\"../img/admin/r/1.gif\"><br />".$row['clay']." <img src=\"../img/admin/r/2.gif\"><br />".$row['iron']." <img src=\"../img/admin/r/3.gif\"><br />".$row['crop']." <img src=\"../img/admin/r/4.gif\"></td>
|
} ##<td class=\"hab\">".$row['wood']." <img src=\"../img/admin/r/1.gif\"><br />".$row['clay']." <img src=\"../img/admin/r/2.gif\"><br />".$row['iron']." <img src=\"../img/admin/r/3.gif\"><br />".$row['crop']." <img src=\"../img/admin/r/4.gif\"></td>
|
||||||
}
|
}
|
||||||
elseif($isthere ==0)
|
elseif($isthere ==0)
|
||||||
{
|
{
|
||||||
@@ -309,15 +309,15 @@ if(isset($id))
|
|||||||
?>
|
?>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
include('troops.tpl');
|
include('troops.tpl');
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
##include('troopUpgrades.tpl');
|
##include('troopUpgrades.tpl');
|
||||||
?>
|
?>
|
||||||
|
|
||||||
|
|
||||||
<a href="admin.php?p=editVillage&did=<?php echo $_GET['did']; ?>" title="Edit Village">
|
<a href="admin.php?p=editVillage&did=<?php echo $_GET['did']; ?>" title="Edit Village">
|
||||||
<div id="content" class="village1" style="min-height: 264px;">
|
<div id="content" class="village1" style="min-height: 264px;">
|
||||||
@@ -410,21 +410,21 @@ if(isset($id))
|
|||||||
|
|
||||||
|
|
||||||
<!--<table id="member" cellpadding="1" cellspacing="1" >
|
<!--<table id="member" cellpadding="1" cellspacing="1" >
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th colspan="4">Resources</th>
|
<th colspan="4">Resources</th>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td class="hab">Resource</td>
|
<td class="hab">Resource</td>
|
||||||
<td class="hab" colspan="2">Warehouse</td>
|
<td class="hab" colspan="2">Warehouse</td>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr>
|
<tr>
|
||||||
<td><img src="../img/admin/r/1.gif"> Lumber</td>
|
<td><img src="../img/admin/r/1.gif"> Lumber</td>
|
||||||
<td class="hab"><?php echo floor($village['wood']);?></td>
|
<td class="hab"><?php echo floor($village['wood']);?></td>
|
||||||
<td class="hab" rowspan="3"><?php echo $village['maxstore'];?></td>
|
<td class="hab" rowspan="3"><?php echo $village['maxstore'];?></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><img src="../img/admin/r/2.gif"> Clay</td>
|
<td><img src="../img/admin/r/2.gif"> Clay</td>
|
||||||
@@ -432,14 +432,14 @@ if(isset($id))
|
|||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><img src="../img/admin/r/3.gif"> Iron</td>
|
<td><img src="../img/admin/r/3.gif"> Iron</td>
|
||||||
<td class="hab"><?php echo floor($village['iron']);?></td>
|
<td class="hab"><?php echo floor($village['iron']);?></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><img src="../img/admin/r/4.gif"> Crop</td>
|
<td><img src="../img/admin/r/4.gif"> Crop</td>
|
||||||
<td class="hab"><?php echo floor($village['crop']);?></td>
|
<td class="hab"><?php echo floor($village['crop']);?></td>
|
||||||
<td class="hab"><?php echo $village['maxcrop'];?></td>
|
<td class="hab"><?php echo $village['maxcrop'];?></td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>-->
|
</table>-->
|
||||||
|
|
||||||
|
|
||||||
@@ -454,7 +454,7 @@ if(isset($id))
|
|||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th colspan="5">Buildings</th>
|
<th colspan="5">Buildings</th>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="on">ID</td>
|
<td class="on">ID</td>
|
||||||
<td class="on">GID</td>
|
<td class="on">GID</td>
|
||||||
@@ -463,7 +463,7 @@ if(isset($id))
|
|||||||
<td class="on">Edit</td>
|
<td class="on">Edit</td>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<?php
|
<?php
|
||||||
for ($i = 1; $i <= 40; $i++)
|
for ($i = 1; $i <= 40; $i++)
|
||||||
{
|
{
|
||||||
@@ -479,13 +479,13 @@ if(isset($id))
|
|||||||
<tr>
|
<tr>
|
||||||
<td class="on">'.$i.'</td>
|
<td class="on">'.$i.'</td>
|
||||||
<td class="on">'.$fdata['f'.$i.'t'].'</td>
|
<td class="on">'.$fdata['f'.$i.'t'].'</td>
|
||||||
<td class="hab">'.$bu.'</td>
|
<td class="hab">'.$bu.'</td>
|
||||||
<td class="on">'.$fdata['f'.$i].'</td>
|
<td class="on">'.$fdata['f'.$i].'</td>
|
||||||
<td class="on"><a href="admin.php?p=editVillage&did='.$_GET['did'].'"><img src="../img/admin/edit.gif" title="Edit Building & Level"></a></td>
|
<td class="on"><a href="admin.php?p=editVillage&did='.$_GET['did'].'"><img src="../img/admin/edit.gif" title="Edit Building & Level"></a></td>
|
||||||
</tr>';
|
</tr>';
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
<br /><br />
|
<br /><br />
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
<?php
|
<?php
|
||||||
#################################################################################
|
#################################################################################
|
||||||
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
||||||
## --------------------------------------------------------------------------- ##
|
## --------------------------------------------------------------------------- ##
|
||||||
@@ -10,30 +10,30 @@
|
|||||||
#################################################################################
|
#################################################################################
|
||||||
?>
|
?>
|
||||||
<style>
|
<style>
|
||||||
.del {width:12px; height:12px; background-image: url(img/admin/icon/del.gif);}
|
.del {width:12px; height:12px; background-image: url(img/admin/icon/del.gif);}
|
||||||
</style>
|
</style>
|
||||||
<table id="member">
|
<table id="member">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th>Villages</th>
|
<th>Villages</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
|
|
||||||
</table>
|
</table>
|
||||||
<table id="profile">
|
<table id="profile">
|
||||||
<tr>
|
<tr>
|
||||||
<td>Name</td>
|
<td>Name</td>
|
||||||
<td>Population</td>
|
<td>Population</td>
|
||||||
<td>Coordinates</td>
|
<td>Coordinates</td>
|
||||||
<td>Add Troops</td>
|
<td>Add Troops</td>
|
||||||
<td></td>
|
<td></td>
|
||||||
</tr>
|
</tr>
|
||||||
<?php
|
<?php
|
||||||
for ($i = 0; $i <= count($varray)-1; $i++) {
|
for ($i = 0; $i <= count($varray)-1; $i++) {
|
||||||
$coorproc = $database->getCoor($varray[$i]['wref']);
|
$coorproc = $database->getCoor($varray[$i]['wref']);
|
||||||
if($varray[$i]['capital']){
|
if($varray[$i]['capital']){
|
||||||
$capital = '<span class="c">(Capital)</span>';
|
$capital = '<span class="c">(Capital)</span>';
|
||||||
$delLink = '<a href="#"><img src="../img/Admin/del_g.gif" class="del"></a>';
|
$delLink = '<a href="#"><img src="../img/Admin/del_g.gif" class="del"></a>';
|
||||||
}else{
|
}else{
|
||||||
$capital = '';
|
$capital = '';
|
||||||
if($_SESSION['access'] == ADMIN){
|
if($_SESSION['access'] == ADMIN){
|
||||||
@@ -44,16 +44,16 @@ $delLink = '<a href="?action=delVil&did='.$varray[$i]['wref'].'" onClick="return
|
|||||||
}
|
}
|
||||||
$addTroops = '<a href="?p=addTroops&did='.$varray[$i]['wref'].'"> Edit Troops</a>';
|
$addTroops = '<a href="?p=addTroops&did='.$varray[$i]['wref'].'"> Edit Troops</a>';
|
||||||
echo '
|
echo '
|
||||||
<tr>
|
<tr>
|
||||||
<td><a href="?p=village&did='.$varray[$i]['wref'].'">'.$varray[$i]['name'].'</a> '.$capital.'</td>
|
<td><a href="?p=village&did='.$varray[$i]['wref'].'">'.$varray[$i]['name'].'</a> '.$capital.'</td>
|
||||||
<td>'.$varray[$i]['pop'].' <a href="?action=recountPop&did='.$varray[$i]['wref'].'">Recount<a/></td>
|
<td>'.$varray[$i]['pop'].' <a href="?action=recountPop&did='.$varray[$i]['wref'].'">Recount<a/></td>
|
||||||
<td>('.$coorproc['x'].'|'.$coorproc['y'].')</td>
|
<td>('.$coorproc['x'].'|'.$coorproc['y'].')</td>
|
||||||
<td>'.$addTroops.' </td>
|
<td>'.$addTroops.' </td>
|
||||||
<td>'.$delLink.' </td>
|
<td>'.$delLink.' </td>
|
||||||
</tr>
|
</tr>
|
||||||
';
|
';
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
</table>
|
</table>
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8" ?>
|
|
||||||
<dwsync>
|
|
||||||
<file name="userCount.php" server="D:/wamp/www/New/" local="129157402737451172" remote="129157402730000000" />
|
|
||||||
</dwsync>
|
|
||||||
+22
-22
@@ -18,7 +18,7 @@ include("../GameEngine/Data/buidata.php");
|
|||||||
|
|
||||||
class timeFormatGenerator
|
class timeFormatGenerator
|
||||||
{
|
{
|
||||||
public function getTimeFormat($time)
|
public function getTimeFormat($time)
|
||||||
{
|
{
|
||||||
$min = 0;
|
$min = 0;
|
||||||
$hr = 0;
|
$hr = 0;
|
||||||
@@ -38,12 +38,12 @@ class timeFormatGenerator
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
$timeformat = new timeFormatGenerator;
|
$timeformat = new timeFormatGenerator;
|
||||||
?>
|
?>
|
||||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<link REL="shortcut icon" HREF="favicon.ico"/>
|
<link REL="shortcut icon" HREF="favicon.ico"/>
|
||||||
<title>Admin Panel</title>
|
<title>Admin Panel</title>
|
||||||
<link rel=stylesheet type="text/css" href="../img/admin/admin.css">
|
<link rel=stylesheet type="text/css" href="../img/admin/admin.css">
|
||||||
<link rel=stylesheet type="text/css" href="../img/admin/acp.css">
|
<link rel=stylesheet type="text/css" href="../img/admin/acp.css">
|
||||||
<link rel=stylesheet type="text/css" href="../img/img.css">
|
<link rel=stylesheet type="text/css" href="../img/img.css">
|
||||||
@@ -58,9 +58,9 @@ $timeformat = new timeFormatGenerator;
|
|||||||
function inaktiv() {event.srcElement.className='fl2'; }
|
function inaktiv() {event.srcElement.className='fl2'; }
|
||||||
|
|
||||||
function del(e,id){
|
function del(e,id){
|
||||||
if(e == 'did'){ var conf = confirm('Dou you really want delete village id '+id+'?'); }
|
if(e == 'did'){ var conf = confirm('Dou you really want delete village id '+id+'?'); }
|
||||||
if(e == 'unban'){ var conf = confirm('Dou you really want unban player '+id+'?'); }
|
if(e == 'unban'){ var conf = confirm('Dou you really want unban player '+id+'?'); }
|
||||||
if(e == 'stopDel'){ var conf = confirm('Dou you really want stop deleting user '+id+'?'); }
|
if(e == 'stopDel'){ var conf = confirm('Dou you really want stop deleting user '+id+'?'); }
|
||||||
if(conf){return true;}else{return false;}
|
if(conf){return true;}else{return false;}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
@@ -84,10 +84,10 @@ $timeformat = new timeFormatGenerator;
|
|||||||
<table id="navi_table" cellspacing="0" cellpadding="0" style="width: 150px;">
|
<table id="navi_table" cellspacing="0" cellpadding="0" style="width: 150px;">
|
||||||
<tr>
|
<tr>
|
||||||
<td class="menu">
|
<td class="menu">
|
||||||
<?php
|
<?php
|
||||||
if($funct->CheckLogin())
|
if($funct->CheckLogin())
|
||||||
{?>
|
{?>
|
||||||
<?php
|
<?php
|
||||||
if($_SESSION['access'] == ADMIN)
|
if($_SESSION['access'] == ADMIN)
|
||||||
{ ?>
|
{ ?>
|
||||||
<a href="<?php echo HOMEPAGE; ?>">Server Homepage</a>
|
<a href="<?php echo HOMEPAGE; ?>">Server Homepage</a>
|
||||||
@@ -133,21 +133,21 @@ $timeformat = new timeFormatGenerator;
|
|||||||
<a href="#"><b>Admin:</b></a>
|
<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</font></b></a>
|
||||||
<a href="?p=config">Server Settings</a>
|
<a href="?p=config">Server Settings</a>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
else if($_SESSION['access'] == MULTIHUNTER)
|
else if($_SESSION['access'] == MULTIHUNTER)
|
||||||
{ ?>
|
{ ?>
|
||||||
<a href="admin.php">MCP Home</a>
|
<a href="admin.php">MCP Home</a>
|
||||||
<a href="<?php echo HOMEPAGE; ?>">Homepage</a>
|
<a href="<?php echo HOMEPAGE; ?>">Homepage</a>
|
||||||
<a href="#"></a><a href="#"></a>
|
<a href="#"></a><a href="#"></a>
|
||||||
<a href="?p=server_info">Server Info</a>
|
<a href="?p=server_info">Server Info</a>
|
||||||
<a href="?p=online">Online users</a>
|
<a href="?p=online">Online users</a>
|
||||||
<a href="?p=search">Search</a>
|
<a href="?p=search">Search</a>
|
||||||
<a href="?p=message">Msg/Rep</a>
|
<a href="?p=message">Msg/Rep</a>
|
||||||
<a href="?p=ban">Ban</a>
|
<a href="?p=ban">Ban</a>
|
||||||
<a href="#"></a><a href="#"></a><a href="#"></a>
|
<a href="#"></a><a href="#"></a><a href="#"></a>
|
||||||
<a href="?action=logout">Logout</a><?php
|
<a href="?action=logout">Logout</a><?php
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</td>
|
</td>
|
||||||
@@ -158,9 +158,9 @@ $timeformat = new timeFormatGenerator;
|
|||||||
<div id="lmid3">
|
<div id="lmid3">
|
||||||
<?php
|
<?php
|
||||||
if($funct->CheckLogin())
|
if($funct->CheckLogin())
|
||||||
{
|
{
|
||||||
if($_POST or $_GET)
|
if($_POST or $_GET)
|
||||||
{
|
{
|
||||||
if($_GET['p'] and $_GET['p']!="search")
|
if($_GET['p'] and $_GET['p']!="search")
|
||||||
{
|
{
|
||||||
$filename = 'Templates/'.$_GET['p'].'.tpl';
|
$filename = 'Templates/'.$_GET['p'].'.tpl';
|
||||||
@@ -176,7 +176,7 @@ $timeformat = new timeFormatGenerator;
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
include('Templates/search.tpl');
|
include('Templates/search.tpl');
|
||||||
}
|
}
|
||||||
if($_POST['p'] and $_POST['s'])
|
if($_POST['p'] and $_POST['s'])
|
||||||
{
|
{
|
||||||
$filename = 'Templates/results_'.$_POST['p'].'.tpl';
|
$filename = 'Templates/results_'.$_POST['p'].'.tpl';
|
||||||
@@ -187,22 +187,22 @@ $timeformat = new timeFormatGenerator;
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
include('Templates/404.tpl');
|
include('Templates/404.tpl');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
include('Templates/home.tpl');
|
include('Templates/home.tpl');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
include('Templates/login.tpl');
|
include('Templates/login.tpl');
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div id="lright1"></div>
|
<div id="lright1"></div>
|
||||||
<div id="ce"></div>
|
<div id="ce"></div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
+178
-178
@@ -25,13 +25,13 @@ include("../GameEngine/Data/buidata.php");
|
|||||||
}
|
}
|
||||||
class adm_DB {
|
class adm_DB {
|
||||||
var $connection;
|
var $connection;
|
||||||
|
|
||||||
function adm_DB(){
|
function adm_DB(){
|
||||||
global $database;
|
global $database;
|
||||||
$this->connection = mysql_connect(SQL_SERVER, SQL_USER, SQL_PASS) or die(mysql_error());
|
$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());
|
mysql_select_db(SQL_DB, $this->connection) or die(mysql_error());
|
||||||
}
|
}
|
||||||
|
|
||||||
function Login($username,$password){
|
function Login($username,$password){
|
||||||
$q = "SELECT password FROM ".TB_PREFIX."users where username = '$username' and access >= ".MULTIHUNTER;
|
$q = "SELECT password FROM ".TB_PREFIX."users where username = '$username' and access >= ".MULTIHUNTER;
|
||||||
$result = mysql_query($q, $this->connection);
|
$result = mysql_query($q, $this->connection);
|
||||||
@@ -45,246 +45,246 @@ class adm_DB {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function recountPopUser($uid){
|
function recountPopUser($uid){
|
||||||
global $database;
|
global $database;
|
||||||
$villages = $database->getProfileVillages($uid);
|
$villages = $database->getProfileVillages($uid);
|
||||||
for ($i = 0; $i <= count($villages)-1; $i++) {
|
for ($i = 0; $i <= count($villages)-1; $i++) {
|
||||||
$vid = $villages[$i]['wref'];
|
$vid = $villages[$i]['wref'];
|
||||||
$this->recountPop($vid);
|
$this->recountPop($vid);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function recountPop($vid){
|
function recountPop($vid){
|
||||||
global $database;
|
global $database;
|
||||||
$fdata = $database->getResourceLevel($vid);
|
$fdata = $database->getResourceLevel($vid);
|
||||||
$popTot = 0;
|
$popTot = 0;
|
||||||
for ($i = 1; $i <= 40; $i++) {
|
for ($i = 1; $i <= 40; $i++) {
|
||||||
$lvl = $fdata["f".$i];
|
$lvl = $fdata["f".$i];
|
||||||
$building = $fdata["f".$i."t"];
|
$building = $fdata["f".$i."t"];
|
||||||
if($building){
|
if($building){
|
||||||
$popTot += $this->buildingPOP($building,$lvl);
|
$popTot += $this->buildingPOP($building,$lvl);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$q = "UPDATE ".TB_PREFIX."vdata set pop = $popTot where wref = $vid";
|
$q = "UPDATE ".TB_PREFIX."vdata set pop = $popTot where wref = $vid";
|
||||||
mysql_query($q, $this->connection);
|
mysql_query($q, $this->connection);
|
||||||
}
|
}
|
||||||
|
|
||||||
function buildingPOP($f,$lvl){
|
function buildingPOP($f,$lvl){
|
||||||
$name = "bid".$f;
|
$name = "bid".$f;
|
||||||
global $$name;
|
global $$name;
|
||||||
$popT = 0;
|
$popT = 0;
|
||||||
$dataarray = $$name;
|
$dataarray = $$name;
|
||||||
for ($i = 0; $i <= $lvl; $i++) {
|
for ($i = 0; $i <= $lvl; $i++) {
|
||||||
$popT += $dataarray[$i]['pop'];
|
$popT += $dataarray[$i]['pop'];
|
||||||
}
|
}
|
||||||
return $popT;
|
return $popT;
|
||||||
}
|
}
|
||||||
|
|
||||||
function getWref($x,$y) {
|
function getWref($x,$y) {
|
||||||
$q = "SELECT id FROM ".TB_PREFIX."wdata where x = $x and y = $y";
|
$q = "SELECT id FROM ".TB_PREFIX."wdata where x = $x and y = $y";
|
||||||
$result = mysql_query($q, $this->connection);
|
$result = mysql_query($q, $this->connection);
|
||||||
$r = mysql_fetch_array($result);
|
$r = mysql_fetch_array($result);
|
||||||
return $r['id'];
|
return $r['id'];
|
||||||
}
|
}
|
||||||
|
|
||||||
function AddVillage($post){
|
function AddVillage($post){
|
||||||
global $database;
|
global $database;
|
||||||
$wid = $this->getWref($post['x'],$post['y']);
|
$wid = $this->getWref($post['x'],$post['y']);
|
||||||
$uid = $post['uid'];
|
$uid = $post['uid'];
|
||||||
$status = $database->getVillageState($wid);
|
$status = $database->getVillageState($wid);
|
||||||
$status = 0;
|
$status = 0;
|
||||||
if($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().")");
|
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().")");
|
||||||
$database->setFieldTaken($wid);
|
$database->setFieldTaken($wid);
|
||||||
$database->addVillage($wid,$uid,'new village','0');
|
$database->addVillage($wid,$uid,'new village','0');
|
||||||
$database->addResourceFields($wid,$database->getVillageType($wid));
|
$database->addResourceFields($wid,$database->getVillageType($wid));
|
||||||
$database->addUnits($wid);
|
$database->addUnits($wid);
|
||||||
$database->addTech($wid);
|
$database->addTech($wid);
|
||||||
$database->addABTech($wid);
|
$database->addABTech($wid);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function Punish($post){
|
function Punish($post){
|
||||||
global $database;
|
global $database;
|
||||||
$villages = $database->getProfileVillages($post['uid']);
|
$villages = $database->getProfileVillages($post['uid']);
|
||||||
$admid = $post['admid'];
|
$admid = $post['admid'];
|
||||||
$user = $database->getUserArray($post['uid'],1);
|
$user = $database->getUserArray($post['uid'],1);
|
||||||
for ($i = 0; $i <= count($villages)-1; $i++) {
|
for ($i = 0; $i <= count($villages)-1; $i++) {
|
||||||
$vid = $villages[$i]['wref'];
|
$vid = $villages[$i]['wref'];
|
||||||
if($post['punish']){
|
if($post['punish']){
|
||||||
$popOld = $villages[$i]['pop'];
|
$popOld = $villages[$i]['pop'];
|
||||||
$proc = 100-$post['punish'];
|
$proc = 100-$post['punish'];
|
||||||
$pop = floor(($popOld/100)*($proc));
|
$pop = floor(($popOld/100)*($proc));
|
||||||
if($pop <= 1 ){$pop = 2;}
|
if($pop <= 1 ){$pop = 2;}
|
||||||
$this->PunishBuilding($vid,$proc,$pop);
|
$this->PunishBuilding($vid,$proc,$pop);
|
||||||
|
|
||||||
}
|
}
|
||||||
if($post['del_troop']){
|
if($post['del_troop']){
|
||||||
if($user['tribe'] == 1) {
|
if($user['tribe'] == 1) {
|
||||||
$unit = 1;
|
$unit = 1;
|
||||||
}else if($user['tribe'] == 2) {
|
}else if($user['tribe'] == 2) {
|
||||||
$unit = 11;
|
$unit = 11;
|
||||||
}else if($user['tribe'] == 3) {
|
}else if($user['tribe'] == 3) {
|
||||||
$unit = 21;
|
$unit = 21;
|
||||||
}
|
}
|
||||||
$this->DelUnits($villages[$i]['wref'],$unit);
|
$this->DelUnits($villages[$i]['wref'],$unit);
|
||||||
}
|
}
|
||||||
if($post['clean_ware']){
|
if($post['clean_ware']){
|
||||||
$time = time();
|
$time = time();
|
||||||
$q = "UPDATE ".TB_PREFIX."vdata SET `wood` = '0', `clay` = '0', `iron` = '0', `crop` = '0', `lastupdate` = '$time' WHERE wref = $vid;";
|
$q = "UPDATE ".TB_PREFIX."vdata SET `wood` = '0', `clay` = '0', `iron` = '0', `crop` = '0', `lastupdate` = '$time' WHERE wref = $vid;";
|
||||||
mysql_query($q, $this->connection);
|
mysql_query($q, $this->connection);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
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().")");
|
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().")");
|
||||||
}
|
}
|
||||||
|
|
||||||
function PunishBuilding($vid,$proc,$pop){
|
function PunishBuilding($vid,$proc,$pop){
|
||||||
global $database;
|
global $database;
|
||||||
$q = "UPDATE ".TB_PREFIX."vdata set pop = $pop where wref = $vid;";
|
$q = "UPDATE ".TB_PREFIX."vdata set pop = $pop where wref = $vid;";
|
||||||
mysql_query($q, $this->connection);
|
mysql_query($q, $this->connection);
|
||||||
$fdata = $database->getResourceLevel($vid);
|
$fdata = $database->getResourceLevel($vid);
|
||||||
for ($i = 1; $i <= 40; $i++) {
|
for ($i = 1; $i <= 40; $i++) {
|
||||||
if($fdata['f'.$i]>1){
|
if($fdata['f'.$i]>1){
|
||||||
$zm = ($fdata['f'.$i]/100)*$proc;
|
$zm = ($fdata['f'.$i]/100)*$proc;
|
||||||
if($zm < 1){$zm = 1;}else{$zm = floor($zm);}
|
if($zm < 1){$zm = 1;}else{$zm = floor($zm);}
|
||||||
$q = "UPDATE ".TB_PREFIX."fdata SET `f$i` = '$zm' WHERE `vref` = $vid;";
|
$q = "UPDATE ".TB_PREFIX."fdata SET `f$i` = '$zm' WHERE `vref` = $vid;";
|
||||||
mysql_query($q, $this->connection);
|
mysql_query($q, $this->connection);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function DelUnits($vid,$unit){
|
function DelUnits($vid,$unit){
|
||||||
for ($i = $unit; $i <= 9+$unit; $i++) {
|
for ($i = $unit; $i <= 9+$unit; $i++) {
|
||||||
$this->DelUnits2($vid,$unit);
|
$this->DelUnits2($vid,$unit);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function DelUnits2($vid,$unit){
|
function DelUnits2($vid,$unit){
|
||||||
$q = "UPDATE ".TB_PREFIX."units SET `u$unit` = '0' WHERE `vref` = $vid;";
|
$q = "UPDATE ".TB_PREFIX."units SET `u$unit` = '0' WHERE `vref` = $vid;";
|
||||||
mysql_query($q, $this->connection);
|
mysql_query($q, $this->connection);
|
||||||
}
|
}
|
||||||
|
|
||||||
function DelPlayer($uid,$pass){
|
function DelPlayer($uid,$pass){
|
||||||
global $database;
|
global $database;
|
||||||
$ID = $_SESSION['id'];//$database->getUserField($_SESSION['username'],'id',1);
|
$ID = $_SESSION['id'];//$database->getUserField($_SESSION['username'],'id',1);
|
||||||
if($this->CheckPass($pass,$ID)){
|
if($this->CheckPass($pass,$ID)){
|
||||||
$villages = $database->getProfileVillages($uid);
|
$villages = $database->getProfileVillages($uid);
|
||||||
for ($i = 0; $i <= count($villages)-1; $i++) {
|
for ($i = 0; $i <= count($villages)-1; $i++) {
|
||||||
$this->DelVillage($villages[$i]['wref']);
|
$this->DelVillage($villages[$i]['wref']);
|
||||||
}
|
}
|
||||||
$name = $database->getUserField($uid,"username",0);
|
$name = $database->getUserField($uid,"username",0);
|
||||||
mysql_query("Insert into ".TB_PREFIX."admin_log values (0,$ID,'Deleted user <a>$name</a>',".time().")");
|
mysql_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;";
|
$q = "DELETE FROM ".TB_PREFIX."users WHERE `id` = $uid;";
|
||||||
mysql_query($q, $this->connection);
|
mysql_query($q, $this->connection);
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
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);
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
function CheckPass($password,$uid){
|
|
||||||
$q = "SELECT password FROM ".TB_PREFIX."users where id = '$uid' and access = ".ADMIN;
|
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);
|
||||||
|
}
|
||||||
|
|
||||||
|
function CheckPass($password,$uid){
|
||||||
|
$q = "SELECT password FROM ".TB_PREFIX."users where id = '$uid' and access = ".ADMIN;
|
||||||
$result = mysql_query($q, $this->connection);
|
$result = mysql_query($q, $this->connection);
|
||||||
$dbarray = mysql_fetch_array($result);
|
$dbarray = mysql_fetch_array($result);
|
||||||
if($dbarray['password'] == md5($password)) {
|
if($dbarray['password'] == md5($password)) {
|
||||||
return true;
|
return true;
|
||||||
}else{
|
}else{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function DelVillage($wref){
|
function DelVillage($wref){
|
||||||
$q = "SELECT * FROM ".TB_PREFIX."vdata WHERE `wref` = $wref and capital = 0";
|
$q = "SELECT * FROM ".TB_PREFIX."vdata WHERE `wref` = $wref and capital = 0";
|
||||||
$result = mysql_query($q, $this->connection);
|
$result = mysql_query($q, $this->connection);
|
||||||
if(mysql_num_rows($result) > 0){
|
if(mysql_num_rows($result) > 0){
|
||||||
mysql_query("Insert into ".TB_PREFIX."admin_log values (0,".$_SESSION['id'].",'Deleted village <b>$wref</b>',".time().")");
|
mysql_query("Insert into ".TB_PREFIX."admin_log values (0,".$_SESSION['id'].",'Deleted village <b>$wref</b>',".time().")");
|
||||||
$q = "DELETE FROM ".TB_PREFIX."vdata WHERE `wref` = $wref";
|
$q = "DELETE FROM ".TB_PREFIX."vdata WHERE `wref` = $wref";
|
||||||
mysql_query($q, $this->connection);
|
mysql_query($q, $this->connection);
|
||||||
$q = "DELETE FROM ".TB_PREFIX."units WHERE `vref` = $wref";
|
$q = "DELETE FROM ".TB_PREFIX."units WHERE `vref` = $wref";
|
||||||
mysql_query($q, $this->connection);
|
mysql_query($q, $this->connection);
|
||||||
$q = "DELETE FROM ".TB_PREFIX."bdata WHERE `wid` = $wref";
|
$q = "DELETE FROM ".TB_PREFIX."bdata WHERE `wid` = $wref";
|
||||||
mysql_query($q, $this->connection);
|
mysql_query($q, $this->connection);
|
||||||
$q = "DELETE FROM ".TB_PREFIX."abdata WHERE `wid` = $wref";
|
$q = "DELETE FROM ".TB_PREFIX."abdata WHERE `wid` = $wref";
|
||||||
mysql_query($q, $this->connection);
|
mysql_query($q, $this->connection);
|
||||||
$q = "DELETE FROM ".TB_PREFIX."fdata WHERE `vref` = $wref";
|
$q = "DELETE FROM ".TB_PREFIX."fdata WHERE `vref` = $wref";
|
||||||
mysql_query($q, $this->connection);
|
mysql_query($q, $this->connection);
|
||||||
$q = "DELETE FROM ".TB_PREFIX."training WHERE `vref` = $wref";
|
$q = "DELETE FROM ".TB_PREFIX."training WHERE `vref` = $wref";
|
||||||
mysql_query($q, $this->connection);
|
mysql_query($q, $this->connection);
|
||||||
$q = "DELETE FROM ".TB_PREFIX."movement WHERE `from` = $wref";
|
$q = "DELETE FROM ".TB_PREFIX."movement WHERE `from` = $wref";
|
||||||
mysql_query($q, $this->connection);
|
mysql_query($q, $this->connection);
|
||||||
$q = "UPDATE ".TB_PREFIX."wdata SET `occupied` = '0' WHERE `id` = $wref";
|
$q = "UPDATE ".TB_PREFIX."wdata SET `occupied` = '0' WHERE `id` = $wref";
|
||||||
mysql_query($q, $this->connection);
|
mysql_query($q, $this->connection);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function DelBan($uid,$id){
|
function DelBan($uid,$id){
|
||||||
global $database;
|
global $database;
|
||||||
$name = $database->getUserField($uid,"username",0);
|
$name = $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().")");
|
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().")");
|
||||||
$q = "UPDATE ".TB_PREFIX."users SET `access` = '".USER."' WHERE `id` = $uid;";
|
$q = "UPDATE ".TB_PREFIX."users SET `access` = '".USER."' WHERE `id` = $uid;";
|
||||||
mysql_query($q, $this->connection);
|
mysql_query($q, $this->connection);
|
||||||
$q = "UPDATE ".TB_PREFIX."banlist SET `active` = '0' WHERE `id` = $id;";
|
$q = "UPDATE ".TB_PREFIX."banlist SET `active` = '0' WHERE `id` = $id;";
|
||||||
mysql_query($q, $this->connection);
|
mysql_query($q, $this->connection);
|
||||||
}
|
}
|
||||||
|
|
||||||
function AddBan($uid,$end,$reason){
|
function AddBan($uid,$end,$reason){
|
||||||
global $database;
|
global $database;
|
||||||
$name = $database->getUserField($uid,"username",0);
|
$name = $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().")");
|
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().")");
|
||||||
$q = "UPDATE ".TB_PREFIX."users SET `access` = '0' WHERE `id` = $uid;";
|
$q = "UPDATE ".TB_PREFIX."users SET `access` = '0' WHERE `id` = $uid;";
|
||||||
mysql_query($q, $this->connection);
|
mysql_query($q, $this->connection);
|
||||||
$time = time();
|
$time = time();
|
||||||
$admin = $_SESSION['id']; //$database->getUserField($_SESSION['username'],'id',1);
|
$admin = $_SESSION['id']; //$database->getUserField($_SESSION['username'],'id',1);
|
||||||
$name = $database->getUserField($uid,'username',0);
|
$name = $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');";
|
$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);
|
mysql_query($q, $this->connection);
|
||||||
}
|
}
|
||||||
|
|
||||||
function search_player($player){
|
function search_player($player){
|
||||||
$q = "SELECT id,username FROM ".TB_PREFIX."users WHERE `username` LIKE '%$player%' and username != 'support'";
|
$q = "SELECT id,username FROM ".TB_PREFIX."users WHERE `username` LIKE '%$player%' and username != 'support'";
|
||||||
$result = mysql_query($q, $this->connection);
|
$result = mysql_query($q, $this->connection);
|
||||||
return $this->mysql_fetch_all($result);
|
return $this->mysql_fetch_all($result);
|
||||||
}
|
}
|
||||||
|
|
||||||
function search_email($email){
|
function search_email($email){
|
||||||
$q = "SELECT id,email FROM ".TB_PREFIX."users WHERE `email` LIKE '%$email%' and username != 'support'";
|
$q = "SELECT id,email FROM ".TB_PREFIX."users WHERE `email` LIKE '%$email%' and username != 'support'";
|
||||||
$result = mysql_query($q, $this->connection);
|
$result = mysql_query($q, $this->connection);
|
||||||
return $this->mysql_fetch_all($result);
|
return $this->mysql_fetch_all($result);
|
||||||
}
|
}
|
||||||
|
|
||||||
function search_village($village){
|
function search_village($village){
|
||||||
$q = "SELECT * FROM ".TB_PREFIX."vdata WHERE `name` LIKE '%$village%' or `wref` LIKE '%$village%'";
|
$q = "SELECT * FROM ".TB_PREFIX."vdata WHERE `name` LIKE '%$village%' or `wref` LIKE '%$village%'";
|
||||||
$result = mysql_query($q, $this->connection);
|
$result = mysql_query($q, $this->connection);
|
||||||
return $this->mysql_fetch_all($result);
|
return $this->mysql_fetch_all($result);
|
||||||
}
|
}
|
||||||
|
|
||||||
function search_alliance($alliance){
|
function search_alliance($alliance){
|
||||||
$q = "SELECT * FROM ".TB_PREFIX."alidata WHERE `name` LIKE '%$alliance%' or `tag` LIKE '%$alliance%' or `id` LIKE '%$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);
|
$result = mysql_query($q, $this->connection);
|
||||||
return $this->mysql_fetch_all($result);
|
return $this->mysql_fetch_all($result);
|
||||||
}
|
}
|
||||||
|
|
||||||
function search_ip($ip){
|
function search_ip($ip){
|
||||||
$q = "SELECT * FROM ".TB_PREFIX."login_log WHERE `ip` LIKE '%$ip%'";
|
$q = "SELECT * FROM ".TB_PREFIX."login_log WHERE `ip` LIKE '%$ip%'";
|
||||||
$result = mysql_query($q, $this->connection);
|
$result = mysql_query($q, $this->connection);
|
||||||
return $this->mysql_fetch_all($result);
|
return $this->mysql_fetch_all($result);
|
||||||
}
|
}
|
||||||
|
|
||||||
function search_banned(){
|
function search_banned(){
|
||||||
$q = "SELECT * FROM ".TB_PREFIX."banlist where active = '1'";
|
$q = "SELECT * FROM ".TB_PREFIX."banlist where active = '1'";
|
||||||
$result = mysql_query($q, $this->connection);
|
$result = mysql_query($q, $this->connection);
|
||||||
return $this->mysql_fetch_all($result);
|
return $this->mysql_fetch_all($result);
|
||||||
}
|
}
|
||||||
|
|
||||||
function Del_banned(){
|
function Del_banned(){
|
||||||
//$q = "SELECT * FROM ".TB_PREFIX."banlist";
|
//$q = "SELECT * FROM ".TB_PREFIX."banlist";
|
||||||
$result = mysql_query($q, $this->connection);
|
$result = mysql_query($q, $this->connection);
|
||||||
return $this->mysql_fetch_all($result);
|
return $this->mysql_fetch_all($result);
|
||||||
}
|
}
|
||||||
|
|
||||||
/***************************
|
/***************************
|
||||||
@@ -298,12 +298,12 @@ class adm_DB {
|
|||||||
return $all;
|
return $all;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function query_return($q) {
|
function query_return($q) {
|
||||||
$result = mysql_query($q, $this->connection);
|
$result = mysql_query($q, $this->connection);
|
||||||
return $this->mysql_fetch_all($result);
|
return $this->mysql_fetch_all($result);
|
||||||
}
|
}
|
||||||
|
|
||||||
/***************************
|
/***************************
|
||||||
Function to do free query
|
Function to do free query
|
||||||
References: Query
|
References: Query
|
||||||
@@ -311,10 +311,10 @@ class adm_DB {
|
|||||||
function query($query) {
|
function query($query) {
|
||||||
return mysql_query($query, $this->connection);
|
return mysql_query($query, $this->connection);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
$admin = new adm_DB;
|
$admin = new adm_DB;
|
||||||
include("function.php");
|
include("function.php");
|
||||||
?>
|
?>
|
||||||
+88
-88
@@ -9,97 +9,97 @@
|
|||||||
## ##
|
## ##
|
||||||
#################################################################################
|
#################################################################################
|
||||||
|
|
||||||
class funct {
|
class funct {
|
||||||
|
|
||||||
function CheckLogin(){
|
|
||||||
if($_SESSION['access'] >= MULTIHUNTER and $_SESSION['id']){
|
|
||||||
return true;
|
|
||||||
}else{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function Act($get){
|
|
||||||
global $admin,$database;
|
|
||||||
|
|
||||||
switch($get['action']){
|
function CheckLogin(){
|
||||||
case recountPop:
|
if($_SESSION['access'] >= MULTIHUNTER and $_SESSION['id']){
|
||||||
$admin->recountPop($get['did']);
|
return true;
|
||||||
break;
|
}else{
|
||||||
case recountPopUsr:
|
return false;
|
||||||
$admin->recountPopUser($get['uid']);
|
}
|
||||||
break;
|
|
||||||
case StopDel:
|
|
||||||
//stop deleting
|
|
||||||
break;
|
|
||||||
case delVil:
|
|
||||||
$admin->DelVillage($get['did']);
|
|
||||||
break;
|
|
||||||
case delBan:
|
|
||||||
$admin->DelBan($get['uid'],$get['id']);
|
|
||||||
//remove ban
|
|
||||||
break;
|
|
||||||
case addBan:
|
|
||||||
if($get['time']){$end = time()+$get['time']; }else{$end = '';}
|
|
||||||
|
|
||||||
if(preg_match("/^[0-9]+$/",$get['uid'])){
|
|
||||||
//if(eregi("^[0-9]*+$",$get['uid'])){
|
|
||||||
$get['uid'] = $get['uid'];
|
|
||||||
}else{
|
|
||||||
$get['uid'] = $database->getUserField($get['uid'],'id',1);
|
|
||||||
}
|
|
||||||
|
|
||||||
$admin->AddBan($get['uid'],$end,$get['reason']);
|
|
||||||
//add ban
|
|
||||||
break;
|
|
||||||
case delOas:
|
|
||||||
//oaza
|
|
||||||
break;
|
|
||||||
case logout:
|
|
||||||
$this->LogOut();
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
if($get['action'] == 'logout'){
|
|
||||||
header("Location: admin.php");
|
|
||||||
}else{
|
|
||||||
header("Location: ".$_SERVER['HTTP_REFERER']);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function Act($get){
|
||||||
|
global $admin,$database;
|
||||||
|
|
||||||
|
switch($get['action']){
|
||||||
|
case recountPop:
|
||||||
|
$admin->recountPop($get['did']);
|
||||||
|
break;
|
||||||
|
case recountPopUsr:
|
||||||
|
$admin->recountPopUser($get['uid']);
|
||||||
|
break;
|
||||||
|
case StopDel:
|
||||||
|
//stop deleting
|
||||||
|
break;
|
||||||
|
case delVil:
|
||||||
|
$admin->DelVillage($get['did']);
|
||||||
|
break;
|
||||||
|
case delBan:
|
||||||
|
$admin->DelBan($get['uid'],$get['id']);
|
||||||
|
//remove ban
|
||||||
|
break;
|
||||||
|
case addBan:
|
||||||
|
if($get['time']){$end = time()+$get['time']; }else{$end = '';}
|
||||||
|
|
||||||
|
if(preg_match("/^[0-9]+$/",$get['uid'])){
|
||||||
|
//if(eregi("^[0-9]*+$",$get['uid'])){
|
||||||
|
$get['uid'] = $get['uid'];
|
||||||
|
}else{
|
||||||
|
$get['uid'] = $database->getUserField($get['uid'],'id',1);
|
||||||
|
}
|
||||||
|
|
||||||
|
$admin->AddBan($get['uid'],$end,$get['reason']);
|
||||||
|
//add ban
|
||||||
|
break;
|
||||||
|
case delOas:
|
||||||
|
//oaza
|
||||||
|
break;
|
||||||
|
case logout:
|
||||||
|
$this->LogOut();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
if($get['action'] == 'logout'){
|
||||||
|
header("Location: admin.php");
|
||||||
|
}else{
|
||||||
|
header("Location: ".$_SERVER['HTTP_REFERER']);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
function Act2($post){
|
function Act2($post){
|
||||||
global $admin,$database;
|
global $admin,$database;
|
||||||
switch($post['action']){
|
switch($post['action']){
|
||||||
case DelPlayer:
|
case DelPlayer:
|
||||||
$admin->DelPlayer($post['uid'],$post['pass']);
|
$admin->DelPlayer($post['uid'],$post['pass']);
|
||||||
header("Location: ?p=search&msg=ursdel");
|
header("Location: ?p=search&msg=ursdel");
|
||||||
break;
|
break;
|
||||||
case punish:
|
case punish:
|
||||||
$admin->Punish($post);
|
$admin->Punish($post);
|
||||||
header("Location: ".$_SERVER['HTTP_REFERER']);
|
header("Location: ".$_SERVER['HTTP_REFERER']);
|
||||||
break;
|
break;
|
||||||
case addVillage:
|
case addVillage:
|
||||||
$admin->AddVillage($post);
|
$admin->AddVillage($post);
|
||||||
header("Location: ".$_SERVER['HTTP_REFERER']);
|
header("Location: ".$_SERVER['HTTP_REFERER']);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function LogIN($username,$password){
|
function LogIN($username,$password){
|
||||||
global $admin,$database;
|
global $admin,$database;
|
||||||
if($admin->Login($username,$password)){
|
if($admin->Login($username,$password)){
|
||||||
//$_SESSION['username'] = $username;
|
//$_SESSION['username'] = $username;
|
||||||
$_SESSION['access'] = $database->getUserField($username,'access',1);
|
$_SESSION['access'] = $database->getUserField($username,'access',1);
|
||||||
$_SESSION['id'] = $database->getUserField($username,'id',1);
|
$_SESSION['id'] = $database->getUserField($username,'id',1);
|
||||||
header("Location: ".$_SERVER['HTTP_REFERER']);
|
header("Location: ".$_SERVER['HTTP_REFERER']);
|
||||||
//header("Location: admin.php");
|
//header("Location: admin.php");
|
||||||
}else{
|
}else{
|
||||||
echo "Error";
|
echo "Error";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function LogOut(){
|
function LogOut(){
|
||||||
$_SESSION['access'] = '';
|
$_SESSION['access'] = '';
|
||||||
$_SESSION['id'] = '';
|
$_SESSION['id'] = '';
|
||||||
}
|
}
|
||||||
|
|
||||||
public function procResType($ref) {
|
public function procResType($ref) {
|
||||||
@@ -150,16 +150,16 @@ class funct {
|
|||||||
}
|
}
|
||||||
return $build;
|
return $build;
|
||||||
}
|
}
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
$funct = new funct;
|
$funct = new funct;
|
||||||
if($funct->CheckLogin()){
|
if($funct->CheckLogin()){
|
||||||
if($_GET['action']){
|
if($_GET['action']){
|
||||||
$funct->Act($_GET);
|
$funct->Act($_GET);
|
||||||
}
|
}
|
||||||
if($_POST['action']){
|
if($_POST['action']){
|
||||||
$funct->Act2($_POST);
|
$funct->Act2($_POST);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if($_POST['action']=='login'){
|
if($_POST['action']=='login'){
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
Hello %USER%,
|
Hello %USER%,
|
||||||
|
|
||||||
Thank you for registering on our server.
|
Thank you for registering on our server.
|
||||||
Since the %START% at %TIME% Romans, Gauls and Teutons attack each other on this game world. Right now, %PLAYERS% players in %ALLI% Alliances are fighting for supremacy.
|
Since the %START% at %TIME% Romans, Gauls and Teutons attack each other on this game world. Right now, %PLAYERS% players in %ALLI% Alliances are fighting for supremacy.
|
||||||
|
|
||||||
Regards, %SERVER_NAME%
|
Regards, %SERVER_NAME%
|
||||||
+230
-230
@@ -1,241 +1,241 @@
|
|||||||
<?php
|
<?php
|
||||||
#################################################################################
|
#################################################################################
|
||||||
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
||||||
## --------------------------------------------------------------------------- ##
|
## --------------------------------------------------------------------------- ##
|
||||||
## Filename Account.php ##
|
## Filename Account.php ##
|
||||||
## Developed by: Songer & Dzoki ##
|
## Developed by: Songer & Dzoki ##
|
||||||
## License: TravianX Project ##
|
## License: TravianX Project ##
|
||||||
## Copyright: TravianX (c) 2010-2011. All rights reserved. ##
|
## Copyright: TravianX (c) 2010-2011. All rights reserved. ##
|
||||||
## ##
|
## ##
|
||||||
#################################################################################
|
#################################################################################
|
||||||
|
|
||||||
include("Session.php");
|
include("Session.php");
|
||||||
|
|
||||||
class Account {
|
class Account {
|
||||||
|
|
||||||
function Account() {
|
|
||||||
global $session;
|
|
||||||
if(isset($_POST['ft'])) {
|
|
||||||
switch($_POST['ft']) {
|
|
||||||
case "a1":
|
|
||||||
$this->Signup();
|
|
||||||
break;
|
|
||||||
case "a2":
|
|
||||||
$this->Activate();
|
|
||||||
break;
|
|
||||||
case "a3":
|
|
||||||
$this->Unreg();
|
|
||||||
break;
|
|
||||||
case "a4":
|
|
||||||
$this->Login();
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
} if(isset($_GET['code'])) {
|
|
||||||
$_POST['id'] = $_GET['code']; $this->Activate();
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
if($session->logged_in && in_array("logout.php",explode("/",$_SERVER['PHP_SELF']))) {
|
|
||||||
$this->Logout();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private function Signup() {
|
|
||||||
global $database,$form,$mailer,$generator,$session;
|
|
||||||
if(!isset($_POST['name']) || trim($_POST['name']) == "") {
|
|
||||||
$form->addError("name",USRNM_EMPTY);
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
if(strlen($_POST['name']) < USRNM_MIN_LENGTH) {
|
|
||||||
$form->addError("name",USRNM_SHORT);
|
|
||||||
}
|
|
||||||
else if(!USRNM_SPECIAL && preg_match('/[^0-9A-Za-z]/',$_POST['name'])) {
|
|
||||||
$form->addError("name",USRNM_CHAR);
|
|
||||||
}
|
|
||||||
else if($database->checkExist($_POST['name'],0)) {
|
|
||||||
$form->addError("name",USRNM_TAKEN);
|
|
||||||
}
|
|
||||||
else if($database->checkExist_activate($_POST['name'],0)) {
|
|
||||||
$form->addError("name",USRNM_TAKEN);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
if(!isset($_POST['pw']) || trim($_POST['pw']) == "") {
|
|
||||||
$form->addError("pw",PW_EMPTY);
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
if(strlen($_POST['pw']) < PW_MIN_LENGTH) {
|
|
||||||
$form->addError("pw",PW_SHORT);
|
|
||||||
}
|
|
||||||
else if($_POST['pw'] == $_POST['name']) {
|
|
||||||
$form->addError("pw",PW_INSECURE);
|
|
||||||
|
|
||||||
}
|
function Account() {
|
||||||
}
|
global $session;
|
||||||
if(!isset($_POST['email'])) {
|
if(isset($_POST['ft'])) {
|
||||||
$form->addError("email",EMAIL_EMPTY);
|
switch($_POST['ft']) {
|
||||||
}
|
case "a1":
|
||||||
else {
|
$this->Signup();
|
||||||
if(!$this->validEmail($_POST['email'])) {
|
break;
|
||||||
$form->addError("email",EMAIL_INVALID);
|
case "a2":
|
||||||
}
|
$this->Activate();
|
||||||
else if($database->checkExist($_POST['email'],1)) {
|
break;
|
||||||
$form->addError("email",EMAIL_TAKEN);
|
case "a3":
|
||||||
}
|
$this->Unreg();
|
||||||
else if($database->checkExist_activate($_POST['email'],1)) {
|
break;
|
||||||
$form->addError("email",EMAIL_TAKEN);
|
case "a4":
|
||||||
}
|
$this->Login();
|
||||||
}
|
break;
|
||||||
if(!isset($_POST['vid'])) {
|
}
|
||||||
$form->addError("tribe",TRIBE_EMPTY);
|
} if(isset($_GET['code'])) {
|
||||||
}
|
$_POST['id'] = $_GET['code']; $this->Activate();
|
||||||
if(!isset($_POST['agb'])) {
|
}
|
||||||
$form->addError("agree",AGREE_ERROR);
|
else {
|
||||||
}
|
if($session->logged_in && in_array("logout.php",explode("/",$_SERVER['PHP_SELF']))) {
|
||||||
if($form->returnErrors() > 0) {
|
$this->Logout();
|
||||||
$_SESSION['errorarray'] = $form->getErrors();
|
}
|
||||||
$_SESSION['valuearray'] = $_POST;
|
}
|
||||||
|
}
|
||||||
header("Location: anmelden.php");
|
|
||||||
}
|
private function Signup() {
|
||||||
else {
|
global $database,$form,$mailer,$generator,$session;
|
||||||
if(AUTH_EMAIL){
|
if(!isset($_POST['name']) || trim($_POST['name']) == "") {
|
||||||
$act = $generator->generateRandStr(10);
|
$form->addError("name",USRNM_EMPTY);
|
||||||
$act2 = $generator->generateRandStr(5);
|
}
|
||||||
$uid = $database->activate($_POST['name'],md5($_POST['pw']),$_POST['email'],$_POST['vid'],$_POST['kid'],$act,$act2);
|
else {
|
||||||
if($uid) {
|
if(strlen($_POST['name']) < USRNM_MIN_LENGTH) {
|
||||||
|
$form->addError("name",USRNM_SHORT);
|
||||||
$mailer->sendActivate($_POST['email'],$_POST['name'],$_POST['pw'],$act);
|
}
|
||||||
header("Location: activate.php?id=$uid&q=$act2");
|
else if(!USRNM_SPECIAL && preg_match('/[^0-9A-Za-z]/',$_POST['name'])) {
|
||||||
}
|
$form->addError("name",USRNM_CHAR);
|
||||||
}
|
}
|
||||||
else {
|
else if($database->checkExist($_POST['name'],0)) {
|
||||||
$uid = $database->register($_POST['name'],md5($_POST['pw']),$_POST['email'],$_POST['vid'],$act);
|
$form->addError("name",USRNM_TAKEN);
|
||||||
if($uid) {
|
}
|
||||||
setcookie("COOKUSR",$_POST['name'],time()+COOKIE_EXPIRE,COOKIE_PATH);
|
else if($database->checkExist_activate($_POST['name'],0)) {
|
||||||
setcookie("COOKEMAIL",$_POST['email'],time()+COOKIE_EXPIRE,COOKIE_PATH);
|
$form->addError("name",USRNM_TAKEN);
|
||||||
|
}
|
||||||
$database->updateUserField($uid,"act","",1);
|
|
||||||
$database->updateUserField($uid,"invited",$_POST['invited'],1);
|
}
|
||||||
$this->generateBase($_POST['kid'],$uid,$_POST['name']);
|
if(!isset($_POST['pw']) || trim($_POST['pw']) == "") {
|
||||||
header("Location: login.php");
|
$form->addError("pw",PW_EMPTY);
|
||||||
}
|
}
|
||||||
}
|
else {
|
||||||
}
|
if(strlen($_POST['pw']) < PW_MIN_LENGTH) {
|
||||||
}
|
$form->addError("pw",PW_SHORT);
|
||||||
|
}
|
||||||
private function Activate() {
|
else if($_POST['pw'] == $_POST['name']) {
|
||||||
|
$form->addError("pw",PW_INSECURE);
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(!isset($_POST['email'])) {
|
||||||
|
$form->addError("email",EMAIL_EMPTY);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
if(!$this->validEmail($_POST['email'])) {
|
||||||
|
$form->addError("email",EMAIL_INVALID);
|
||||||
|
}
|
||||||
|
else if($database->checkExist($_POST['email'],1)) {
|
||||||
|
$form->addError("email",EMAIL_TAKEN);
|
||||||
|
}
|
||||||
|
else if($database->checkExist_activate($_POST['email'],1)) {
|
||||||
|
$form->addError("email",EMAIL_TAKEN);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(!isset($_POST['vid'])) {
|
||||||
|
$form->addError("tribe",TRIBE_EMPTY);
|
||||||
|
}
|
||||||
|
if(!isset($_POST['agb'])) {
|
||||||
|
$form->addError("agree",AGREE_ERROR);
|
||||||
|
}
|
||||||
|
if($form->returnErrors() > 0) {
|
||||||
|
$_SESSION['errorarray'] = $form->getErrors();
|
||||||
|
$_SESSION['valuearray'] = $_POST;
|
||||||
|
|
||||||
|
header("Location: anmelden.php");
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
if(AUTH_EMAIL){
|
||||||
|
$act = $generator->generateRandStr(10);
|
||||||
|
$act2 = $generator->generateRandStr(5);
|
||||||
|
$uid = $database->activate($_POST['name'],md5($_POST['pw']),$_POST['email'],$_POST['vid'],$_POST['kid'],$act,$act2);
|
||||||
|
if($uid) {
|
||||||
|
|
||||||
|
$mailer->sendActivate($_POST['email'],$_POST['name'],$_POST['pw'],$act);
|
||||||
|
header("Location: activate.php?id=$uid&q=$act2");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$uid = $database->register($_POST['name'],md5($_POST['pw']),$_POST['email'],$_POST['vid'],$act);
|
||||||
|
if($uid) {
|
||||||
|
setcookie("COOKUSR",$_POST['name'],time()+COOKIE_EXPIRE,COOKIE_PATH);
|
||||||
|
setcookie("COOKEMAIL",$_POST['email'],time()+COOKIE_EXPIRE,COOKIE_PATH);
|
||||||
|
|
||||||
|
$database->updateUserField($uid,"act","",1);
|
||||||
|
$database->updateUserField($uid,"invited",$_POST['invited'],1);
|
||||||
|
$this->generateBase($_POST['kid'],$uid,$_POST['name']);
|
||||||
|
header("Location: login.php");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private function Activate() {
|
||||||
if(START_DATE < date('m/d/Y') or START_DATE == date('m/d/Y') && START_TIME <= date('H:i'))
|
if(START_DATE < date('m/d/Y') or START_DATE == date('m/d/Y') && START_TIME <= date('H:i'))
|
||||||
{
|
{
|
||||||
global $database;
|
global $database;
|
||||||
$q = "SELECT * FROM ".TB_PREFIX."activate where act = '".$_POST['id']."'";
|
$q = "SELECT * FROM ".TB_PREFIX."activate where act = '".$_POST['id']."'";
|
||||||
$result = mysql_query($q, $database->connection);
|
$result = mysql_query($q, $database->connection);
|
||||||
$dbarray = mysql_fetch_array($result);
|
$dbarray = mysql_fetch_array($result);
|
||||||
if($dbarray['act'] == $_POST['id']) {
|
if($dbarray['act'] == $_POST['id']) {
|
||||||
$uid = $database->register($dbarray['username'],$dbarray['password'],$dbarray['email'],$dbarray['tribe'],"");
|
$uid = $database->register($dbarray['username'],$dbarray['password'],$dbarray['email'],$dbarray['tribe'],"");
|
||||||
if($uid) {
|
if($uid) {
|
||||||
$database->unreg($dbarray['username']);
|
$database->unreg($dbarray['username']);
|
||||||
$this->generateBase($dbarray['kid'],$uid,$dbarray['username']);
|
$this->generateBase($dbarray['kid'],$uid,$dbarray['username']);
|
||||||
header("Location: activate.php?e=2");
|
header("Location: activate.php?e=2");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
header("Location: activate.php?e=3");
|
header("Location: activate.php?e=3");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
header("Location: activate.php");
|
header("Location: activate.php");
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private function Unreg() {
|
private function Unreg() {
|
||||||
global $database;
|
global $database;
|
||||||
$q = "SELECT * FROM ".TB_PREFIX."activate where id = '".$_POST['id']."'";
|
$q = "SELECT * FROM ".TB_PREFIX."activate where id = '".$_POST['id']."'";
|
||||||
$result = mysql_query($q, $database->connection);
|
$result = mysql_query($q, $database->connection);
|
||||||
$dbarray = mysql_fetch_array($result);
|
$dbarray = mysql_fetch_array($result);
|
||||||
if(md5($_POST['pw']) == $dbarray['password']) {
|
if(md5($_POST['pw']) == $dbarray['password']) {
|
||||||
$database->unreg($dbarray['username']);
|
$database->unreg($dbarray['username']);
|
||||||
header("Location: anmelden.php");
|
header("Location: anmelden.php");
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
header("Location: activate.php?e=3");
|
header("Location: activate.php?e=3");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private function Login() {
|
private function Login() {
|
||||||
global $database,$session,$form;
|
global $database,$session,$form;
|
||||||
if(!isset($_POST['user']) || $_POST['user'] == "") {
|
if(!isset($_POST['user']) || $_POST['user'] == "") {
|
||||||
$form->addError("user",LOGIN_USR_EMPTY);
|
$form->addError("user",LOGIN_USR_EMPTY);
|
||||||
}
|
}
|
||||||
else if(!$database->checkExist($_POST['user'],0)) {
|
else if(!$database->checkExist($_POST['user'],0)) {
|
||||||
$form->addError("user",USR_NT_FOUND);
|
$form->addError("user",USR_NT_FOUND);
|
||||||
}
|
}
|
||||||
if(!isset($_POST['pw']) || $_POST['pw'] == "") {
|
if(!isset($_POST['pw']) || $_POST['pw'] == "") {
|
||||||
$form->addError("pw",LOGIN_PASS_EMPTY);
|
$form->addError("pw",LOGIN_PASS_EMPTY);
|
||||||
}
|
}
|
||||||
else if(!$database->login($_POST['user'],$_POST['pw']) && !$database->sitterLogin($_POST['user'],$_POST['pw'])) {
|
else if(!$database->login($_POST['user'],$_POST['pw']) && !$database->sitterLogin($_POST['user'],$_POST['pw'])) {
|
||||||
$form->addError("pw",LOGIN_PW_ERROR);
|
$form->addError("pw",LOGIN_PW_ERROR);
|
||||||
}
|
}
|
||||||
if($database->getUserField($_POST['user'],"act",1) != "") {
|
if($database->getUserField($_POST['user'],"act",1) != "") {
|
||||||
$form->addError("activate",$_POST['user']);
|
$form->addError("activate",$_POST['user']);
|
||||||
}
|
}
|
||||||
if($form->returnErrors() > 0) {
|
if($form->returnErrors() > 0) {
|
||||||
$_SESSION['errorarray'] = $form->getErrors();
|
$_SESSION['errorarray'] = $form->getErrors();
|
||||||
$_SESSION['valuearray'] = $_POST;
|
$_SESSION['valuearray'] = $_POST;
|
||||||
|
|
||||||
header("Location: login.php");
|
header("Location: login.php");
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$userid = $database->getUserArray($_POST['user'], 0);
|
$userid = $database->getUserArray($_POST['user'], 0);
|
||||||
if($database->login($_POST['user'],$_POST['pw'])){
|
if($database->login($_POST['user'],$_POST['pw'])){
|
||||||
$database->UpdateOnline("login" ,$_POST['user'],time(),$userid['id']);
|
$database->UpdateOnline("login" ,$_POST['user'],time(),$userid['id']);
|
||||||
}else if($database->sitterLogin($_POST['user'],$_POST['pw'])){
|
}else if($database->sitterLogin($_POST['user'],$_POST['pw'])){
|
||||||
$database->UpdateOnline("sitter" ,$_POST['user'],time(),$userid['id']);
|
$database->UpdateOnline("sitter" ,$_POST['user'],time(),$userid['id']);
|
||||||
}
|
}
|
||||||
setcookie("COOKUSR",$_POST['user'],time()+COOKIE_EXPIRE,COOKIE_PATH);
|
setcookie("COOKUSR",$_POST['user'],time()+COOKIE_EXPIRE,COOKIE_PATH);
|
||||||
$session->login($_POST['user']);
|
$session->login($_POST['user']);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private function Logout() {
|
private function Logout() {
|
||||||
global $session,$database;
|
global $session,$database;
|
||||||
unset($_SESSION['wid']);
|
unset($_SESSION['wid']);
|
||||||
$database->activeModify($session->username,1);
|
$database->activeModify($session->username,1);
|
||||||
$database->UpdateOnline("logout") or die(mysql_error());
|
$database->UpdateOnline("logout") or die(mysql_error());
|
||||||
$session->Logout();
|
$session->Logout();
|
||||||
}
|
}
|
||||||
|
|
||||||
private function validEmail($email) {
|
private function validEmail($email) {
|
||||||
$regexp="/^[a-z0-9]+([_\\.-][a-z0-9]+)*@([a-z0-9]+([\.-][a-z0-9]+)*)+\\.[a-z]{2,}$/i";
|
$regexp="/^[a-z0-9]+([_\\.-][a-z0-9]+)*@([a-z0-9]+([\.-][a-z0-9]+)*)+\\.[a-z]{2,}$/i";
|
||||||
if ( !preg_match($regexp, $email) ) {
|
if ( !preg_match($regexp, $email) ) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
function generateBase($kid,$uid,$username) {
|
function generateBase($kid,$uid,$username) {
|
||||||
global $database,$message;
|
global $database,$message;
|
||||||
if($kid == 0) {
|
if($kid == 0) {
|
||||||
$kid = rand(1,4);
|
$kid = rand(1,4);
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
$kid = $_POST['kid'];
|
$kid = $_POST['kid'];
|
||||||
}
|
}
|
||||||
|
|
||||||
$wid = $database->generateBase($kid);
|
$wid = $database->generateBase($kid);
|
||||||
$database->setFieldTaken($wid);
|
$database->setFieldTaken($wid);
|
||||||
$database->addVillage($wid,$uid,$username,1);
|
$database->addVillage($wid,$uid,$username,1);
|
||||||
$database->addResourceFields($wid,$database->getVillageType($wid));
|
$database->addResourceFields($wid,$database->getVillageType($wid));
|
||||||
$database->addUnits($wid);
|
$database->addUnits($wid);
|
||||||
$database->addTech($wid);
|
$database->addTech($wid);
|
||||||
$database->addABTech($wid);
|
$database->addABTech($wid);
|
||||||
$database->updateUserField($uid,"access",USER,1);
|
$database->updateUserField($uid,"access",USER,1);
|
||||||
$message->sendWelcome($uid,$username);
|
$message->sendWelcome($uid,$username);
|
||||||
}
|
}
|
||||||
|
|
||||||
};
|
};
|
||||||
$account = new Account;
|
$account = new Account;
|
||||||
?>
|
?>
|
||||||
@@ -101,4 +101,4 @@ mysql_query("Insert into ".TB_PREFIX."admin_log values (0,".$_SESSION['id'].",'C
|
|||||||
|
|
||||||
header("Location: ../../../Admin/admin.php?p=addTroops&did=".$id."&d");
|
header("Location: ../../../Admin/admin.php?p=addTroops&did=".$id."&d");
|
||||||
|
|
||||||
?>
|
?>
|
||||||
@@ -16,30 +16,30 @@ mysql_select_db(SQL_DB);
|
|||||||
|
|
||||||
$id = $_POST['id'];
|
$id = $_POST['id'];
|
||||||
$amt = $_POST['vill_amount'];
|
$amt = $_POST['vill_amount'];
|
||||||
|
|
||||||
for($i=1;$i<=$amt;$i++) {
|
for($i=1;$i<=$amt;$i++) {
|
||||||
|
|
||||||
$kid = rand(1,4);
|
$kid = rand(1,4);
|
||||||
$wid = $database->generateBase($kid);
|
$wid = $database->generateBase($kid);
|
||||||
$database->setFieldTaken($wid);
|
$database->setFieldTaken($wid);
|
||||||
$time = time();
|
$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','WW Buildingplan',0,0,0,0,0,80000.00,80000.00,80000.00,80000,80000.00,80000,1314974534,100,0,0,0,1314968914)";
|
$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','WW Buildingplan',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());
|
mysql_query($q) or die(mysql_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')";
|
$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);
|
mysql_query($q);
|
||||||
$pop = $automation->recountPop($wid);
|
$pop = $automation->recountPop($wid);
|
||||||
$cp = $automation->recountPop($wid);
|
$cp = $automation->recountPop($wid);
|
||||||
$database->addUnits($wid);
|
$database->addUnits($wid);
|
||||||
$database->addTech($wid);
|
$database->addTech($wid);
|
||||||
$database->addABTech($wid);
|
$database->addABTech($wid);
|
||||||
$q = "UPDATE ".TB_PREFIX."units SET u41 = u41 + '150000', u42 = u42 + '150000', u43 = u43 + '150000', u44 = u44 + '150000', u45 = u45 + '150000', u46 = u46 + '150000', u47 = u47 + '150000', u48 = u48 + '150000' , u49 = u49 + '150000', u50 = u50 + '150000' WHERE vref = '".$wid."'";
|
$q = "UPDATE ".TB_PREFIX."units SET u41 = u41 + '150000', u42 = u42 + '150000', u43 = u43 + '150000', u44 = u44 + '150000', u45 = u45 + '150000', u46 = u46 + '150000', u47 = u47 + '150000', u48 = u48 + '150000' , u49 = u49 + '150000', u50 = u50 + '150000' WHERE vref = '".$wid."'";
|
||||||
mysql_query($q);
|
mysql_query($q);
|
||||||
$desc = 'With this ancient construction plan you will able to build World Wonder to level 50. to build further, your alliance must hold at least two plans.';
|
$desc = 'With this ancient construction plan you will able to build World Wonder to level 50. to build further, your alliance must hold at least two plans.';
|
||||||
$database->addArtefact($wid, 3, 11, 1, 'Ancient Construction Plan', $desc, '', 'typeww.gif');
|
$database->addArtefact($wid, 3, 11, 1, 'Ancient Construction Plan', $desc, '', 'typeww.gif');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
mysql_query("Insert into ".TB_PREFIX."admin_log values (0,$id,'Added <b>$amt</b> WW Buildingplan Villages',".time().")");
|
mysql_query("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");
|
header("Location: ../../../Admin/admin.php?p=natarbuildingplan&g");
|
||||||
|
|||||||
@@ -16,29 +16,29 @@ mysql_select_db(SQL_DB);
|
|||||||
|
|
||||||
$id = $_POST['id'];
|
$id = $_POST['id'];
|
||||||
$amt = $_POST['vill_amount'];
|
$amt = $_POST['vill_amount'];
|
||||||
|
|
||||||
for($i=1;$i<=$amt;$i++) {
|
for($i=1;$i<=$amt;$i++) {
|
||||||
|
|
||||||
$kid = rand(1,4);
|
$kid = rand(1,4);
|
||||||
|
|
||||||
$wid = $database->generateBase($kid);
|
$wid = $database->generateBase($kid);
|
||||||
$database->setFieldTaken($wid);
|
$database->setFieldTaken($wid);
|
||||||
$time = time();
|
$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','WW village',0,0,0,0,0,80000.00,80000.00,80000.00,80000,80000.00,80000,1314974534,100,0,0,0,$time,1)";
|
$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','WW village',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());
|
mysql_query($q) or die(mysql_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')";
|
$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);
|
mysql_query($q);
|
||||||
$pop = $automation->recountPop($wid);
|
$pop = $automation->recountPop($wid);
|
||||||
$cp = $automation->recountPop($wid);
|
$cp = $automation->recountPop($wid);
|
||||||
$database->addUnits($wid);
|
$database->addUnits($wid);
|
||||||
$database->addTech($wid);
|
$database->addTech($wid);
|
||||||
$database->addABTech($wid);
|
$database->addABTech($wid);
|
||||||
$q = "UPDATE ".TB_PREFIX."units SET u41 = u41 + '150000', u42 = u42 + '150000', u43 = u43 + '150000', u44 = u44 + '150000', u45 = u45 + '150000', u46 = u46 + '150000', u47 = u47 + '150000', u48 = u48 + '150000' , u49 = u49 + '150000', u50 = u50 + '150000' WHERE vref = '".$wid."'";
|
$q = "UPDATE ".TB_PREFIX."units SET u41 = u41 + '150000', u42 = u42 + '150000', u43 = u43 + '150000', u44 = u44 + '150000', u45 = u45 + '150000', u46 = u46 + '150000', u47 = u47 + '150000', u48 = u48 + '150000' , u49 = u49 + '150000', u50 = u50 + '150000' WHERE vref = '".$wid."'";
|
||||||
mysql_query($q);
|
mysql_query($q);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
mysql_query("Insert into ".TB_PREFIX."admin_log values (0,$id,'Added <b>$amt</b> WW Villages',".time().")");
|
mysql_query("Insert into ".TB_PREFIX."admin_log values (0,$id,'Added <b>$amt</b> WW Villages',".time().")");
|
||||||
|
|
||||||
|
|
||||||
header("Location: ../../../Admin/admin.php?p=natarend&g");
|
header("Location: ../../../Admin/admin.php?p=natarend&g");
|
||||||
|
|||||||
@@ -9,8 +9,8 @@
|
|||||||
## ##
|
## ##
|
||||||
#################################################################################
|
#################################################################################
|
||||||
|
|
||||||
include ("../../Database.php");
|
include ("../../Database.php");
|
||||||
include ("../../Admin/database.php");
|
include ("../../Admin/database.php");
|
||||||
include ("../../config.php");
|
include ("../../config.php");
|
||||||
|
|
||||||
$database->populateOasisUnitsLow();
|
$database->populateOasisUnitsLow();
|
||||||
|
|||||||
@@ -23,87 +23,87 @@ $sessionaccess = $access['access'];
|
|||||||
|
|
||||||
if($sessionaccess != 9) die("<h1><font color=\"red\">Access Denied: You are not Admin!</font></h1>");
|
if($sessionaccess != 9) die("<h1><font color=\"red\">Access Denied: You are not Admin!</font></h1>");
|
||||||
|
|
||||||
mysql_query("UPDATE ".TB_PREFIX."fdata SET
|
mysql_query("UPDATE ".TB_PREFIX."fdata SET
|
||||||
f1 = '".$_POST['id1level']."',
|
f1 = '".$_POST['id1level']."',
|
||||||
f1t = '".$_POST['id1gid']."',
|
f1t = '".$_POST['id1gid']."',
|
||||||
f2 = '".$_POST['id2level']."',
|
f2 = '".$_POST['id2level']."',
|
||||||
f2t = '".$_POST['id2gid']."',
|
f2t = '".$_POST['id2gid']."',
|
||||||
f3 = '".$_POST['id3level']."',
|
f3 = '".$_POST['id3level']."',
|
||||||
f3t = '".$_POST['id3gid']."',
|
f3t = '".$_POST['id3gid']."',
|
||||||
f4 = '".$_POST['id4level']."',
|
f4 = '".$_POST['id4level']."',
|
||||||
f4t = '".$_POST['id4gid']."',
|
f4t = '".$_POST['id4gid']."',
|
||||||
f5 = '".$_POST['id5level']."',
|
f5 = '".$_POST['id5level']."',
|
||||||
f5t = '".$_POST['id5gid']."',
|
f5t = '".$_POST['id5gid']."',
|
||||||
f6 = '".$_POST['id6level']."',
|
f6 = '".$_POST['id6level']."',
|
||||||
f6t = '".$_POST['id6gid']."',
|
f6t = '".$_POST['id6gid']."',
|
||||||
f7 = '".$_POST['id7level']."',
|
f7 = '".$_POST['id7level']."',
|
||||||
f7t = '".$_POST['id7gid']."',
|
f7t = '".$_POST['id7gid']."',
|
||||||
f8 = '".$_POST['id8level']."',
|
f8 = '".$_POST['id8level']."',
|
||||||
f8t = '".$_POST['id8gid']."',
|
f8t = '".$_POST['id8gid']."',
|
||||||
f9 = '".$_POST['id9level']."',
|
f9 = '".$_POST['id9level']."',
|
||||||
f9t = '".$_POST['id9gid']."',
|
f9t = '".$_POST['id9gid']."',
|
||||||
f10 = '".$_POST['id10level']."',
|
f10 = '".$_POST['id10level']."',
|
||||||
f10t = '".$_POST['id10gid']."',
|
f10t = '".$_POST['id10gid']."',
|
||||||
f11 = '".$_POST['id11level']."',
|
f11 = '".$_POST['id11level']."',
|
||||||
f11t = '".$_POST['id11gid']."',
|
f11t = '".$_POST['id11gid']."',
|
||||||
f12 = '".$_POST['id12level']."',
|
f12 = '".$_POST['id12level']."',
|
||||||
f12t = '".$_POST['id12gid']."',
|
f12t = '".$_POST['id12gid']."',
|
||||||
f13 = '".$_POST['id13level']."',
|
f13 = '".$_POST['id13level']."',
|
||||||
f13t = '".$_POST['id13gid']."',
|
f13t = '".$_POST['id13gid']."',
|
||||||
f14 = '".$_POST['id14level']."',
|
f14 = '".$_POST['id14level']."',
|
||||||
f14t = '".$_POST['id14gid']."',
|
f14t = '".$_POST['id14gid']."',
|
||||||
f15 = '".$_POST['id15level']."',
|
f15 = '".$_POST['id15level']."',
|
||||||
f15t = '".$_POST['id15gid']."',
|
f15t = '".$_POST['id15gid']."',
|
||||||
f16 = '".$_POST['id16level']."',
|
f16 = '".$_POST['id16level']."',
|
||||||
f16t = '".$_POST['id16gid']."',
|
f16t = '".$_POST['id16gid']."',
|
||||||
f17 = '".$_POST['id17level']."',
|
f17 = '".$_POST['id17level']."',
|
||||||
f17t = '".$_POST['id17gid']."',
|
f17t = '".$_POST['id17gid']."',
|
||||||
f18 = '".$_POST['id18level']."',
|
f18 = '".$_POST['id18level']."',
|
||||||
f18t = '".$_POST['id18gid']."',
|
f18t = '".$_POST['id18gid']."',
|
||||||
f19 = '".$_POST['id19level']."',
|
f19 = '".$_POST['id19level']."',
|
||||||
f19t = '".$_POST['id19gid']."',
|
f19t = '".$_POST['id19gid']."',
|
||||||
f20 = '".$_POST['id20level']."',
|
f20 = '".$_POST['id20level']."',
|
||||||
f20t = '".$_POST['id20gid']."',
|
f20t = '".$_POST['id20gid']."',
|
||||||
f21 = '".$_POST['id21level']."',
|
f21 = '".$_POST['id21level']."',
|
||||||
f21t = '".$_POST['id21gid']."',
|
f21t = '".$_POST['id21gid']."',
|
||||||
f22 = '".$_POST['id22level']."',
|
f22 = '".$_POST['id22level']."',
|
||||||
f22t = '".$_POST['id22gid']."',
|
f22t = '".$_POST['id22gid']."',
|
||||||
f23 = '".$_POST['id23level']."',
|
f23 = '".$_POST['id23level']."',
|
||||||
f23t = '".$_POST['id23gid']."',
|
f23t = '".$_POST['id23gid']."',
|
||||||
f24 = '".$_POST['id24level']."',
|
f24 = '".$_POST['id24level']."',
|
||||||
f24t = '".$_POST['id24gid']."',
|
f24t = '".$_POST['id24gid']."',
|
||||||
f25 = '".$_POST['id25level']."',
|
f25 = '".$_POST['id25level']."',
|
||||||
f25t = '".$_POST['id25gid']."',
|
f25t = '".$_POST['id25gid']."',
|
||||||
f26 = '".$_POST['id26level']."',
|
f26 = '".$_POST['id26level']."',
|
||||||
f26t = '".$_POST['id26gid']."',
|
f26t = '".$_POST['id26gid']."',
|
||||||
f27 = '".$_POST['id27level']."',
|
f27 = '".$_POST['id27level']."',
|
||||||
f27t = '".$_POST['id27gid']."',
|
f27t = '".$_POST['id27gid']."',
|
||||||
f28 = '".$_POST['id28level']."',
|
f28 = '".$_POST['id28level']."',
|
||||||
f28t = '".$_POST['id28gid']."',
|
f28t = '".$_POST['id28gid']."',
|
||||||
f29 = '".$_POST['id29level']."',
|
f29 = '".$_POST['id29level']."',
|
||||||
f29t = '".$_POST['id29gid']."',
|
f29t = '".$_POST['id29gid']."',
|
||||||
f30 = '".$_POST['id30level']."',
|
f30 = '".$_POST['id30level']."',
|
||||||
f30t = '".$_POST['id30gid']."',
|
f30t = '".$_POST['id30gid']."',
|
||||||
f31 = '".$_POST['id31level']."',
|
f31 = '".$_POST['id31level']."',
|
||||||
f31t = '".$_POST['id31gid']."',
|
f31t = '".$_POST['id31gid']."',
|
||||||
f32 = '".$_POST['id32level']."',
|
f32 = '".$_POST['id32level']."',
|
||||||
f32t = '".$_POST['id32gid']."',
|
f32t = '".$_POST['id32gid']."',
|
||||||
f33 = '".$_POST['id33level']."',
|
f33 = '".$_POST['id33level']."',
|
||||||
f33t = '".$_POST['id33gid']."',
|
f33t = '".$_POST['id33gid']."',
|
||||||
f34 = '".$_POST['id34level']."',
|
f34 = '".$_POST['id34level']."',
|
||||||
f34t = '".$_POST['id34gid']."',
|
f34t = '".$_POST['id34gid']."',
|
||||||
f35 = '".$_POST['id35level']."',
|
f35 = '".$_POST['id35level']."',
|
||||||
f35t = '".$_POST['id35gid']."',
|
f35t = '".$_POST['id35gid']."',
|
||||||
f36 = '".$_POST['id36level']."',
|
f36 = '".$_POST['id36level']."',
|
||||||
f36t = '".$_POST['id36gid']."',
|
f36t = '".$_POST['id36gid']."',
|
||||||
f37 = '".$_POST['id37level']."',
|
f37 = '".$_POST['id37level']."',
|
||||||
f37t = '".$_POST['id37gid']."',
|
f37t = '".$_POST['id37gid']."',
|
||||||
f38 = '".$_POST['id38level']."',
|
f38 = '".$_POST['id38level']."',
|
||||||
f38t = '".$_POST['id38gid']."',
|
f38t = '".$_POST['id38gid']."',
|
||||||
f39 = '".$_POST['id39level']."',
|
f39 = '".$_POST['id39level']."',
|
||||||
f39t = '".$_POST['id39gid']."',
|
f39t = '".$_POST['id39gid']."',
|
||||||
f40 = '".$_POST['id40level']."',
|
f40 = '".$_POST['id40level']."',
|
||||||
f40t = '".$_POST['id40gid']."'
|
f40t = '".$_POST['id40gid']."'
|
||||||
WHERE vref = $id") or die(mysql_error());
|
WHERE vref = $id") or die(mysql_error());
|
||||||
|
|
||||||
header("Location: ../../../Admin/admin.php?action=recountPop&did=".$id."");
|
header("Location: ../../../Admin/admin.php?action=recountPop&did=".$id."");
|
||||||
|
|||||||
@@ -1,4 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8" ?>
|
|
||||||
<dwsync>
|
|
||||||
<file name="userCount.php" server="D:/wamp/www/New/" local="129157402737451172" remote="129157402730000000" />
|
|
||||||
</dwsync>
|
|
||||||
+45
-45
@@ -1,13 +1,13 @@
|
|||||||
<?php
|
<?php
|
||||||
#################################################################################
|
#################################################################################
|
||||||
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
||||||
## --------------------------------------------------------------------------- ##
|
## --------------------------------------------------------------------------- ##
|
||||||
## Filename admin.php ##
|
## Filename admin.php ##
|
||||||
## Developed by: Dzoki ##
|
## Developed by: Dzoki ##
|
||||||
## License: TravianX Project ##
|
## License: TravianX Project ##
|
||||||
## Copyright: TravianX (c) 2010-2011. All rights reserved. ##
|
## Copyright: TravianX (c) 2010-2011. All rights reserved. ##
|
||||||
## ##
|
## ##
|
||||||
#################################################################################
|
#################################################################################
|
||||||
session_start();
|
session_start();
|
||||||
include("../GameEngine/Database.php");
|
include("../GameEngine/Database.php");
|
||||||
include("../GameEngine/Admin/database.php");
|
include("../GameEngine/Admin/database.php");
|
||||||
@@ -24,9 +24,9 @@ function aktiv() {this.srcElement.className='fl1'; }
|
|||||||
<script src="ajax.js" type="text/javascript"></script>
|
<script src="ajax.js" type="text/javascript"></script>
|
||||||
|
|
||||||
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
|
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
|
||||||
<meta http-equiv="imagetoolbar" content="no">
|
<meta http-equiv="imagetoolbar" content="no">
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
|
||||||
<script language="javascript">
|
<script language="javascript">
|
||||||
function aktiv() {this.srcElement.className='fl1'; }
|
function aktiv() {this.srcElement.className='fl1'; }
|
||||||
@@ -46,16 +46,16 @@ if(conf){return true;}else{return false;}
|
|||||||
<img src="../img/x.gif" width="1" height="1">
|
<img src="../img/x.gif" width="1" height="1">
|
||||||
</div>
|
</div>
|
||||||
<img class="fl2" src="../img/admin/x1.gif" width="70" height="100" border="0" onmouseover="this.className='fl1'" onmouseout="this.className='fl2'"><img class="fl2" src="../img/admin/x2.gif" width="70" height="100" border="0" onmouseover="this.className='fl1'" onmouseout="this.className='fl2'"><img class="fl2" src="../img/admin/x3.gif" width="70" height="100" border="0" onmouseover="this.className='fl1'" onmouseout="this.className='fl2'"><img class="fl2" src="../img/admin/x4.gif" width="70" height="100" border="0" onmouseover="this.className='fl1'" onmouseout="this.className='fl2'"><img class="fl2" src="../img/admin/x5.gif" width="70" height="100" border="0" onmouseover="this.className='fl1'" onmouseout="this.className='fl2'"></div>
|
<img class="fl2" src="../img/admin/x1.gif" width="70" height="100" border="0" onmouseover="this.className='fl1'" onmouseout="this.className='fl2'"><img class="fl2" src="../img/admin/x2.gif" width="70" height="100" border="0" onmouseover="this.className='fl1'" onmouseout="this.className='fl2'"><img class="fl2" src="../img/admin/x3.gif" width="70" height="100" border="0" onmouseover="this.className='fl1'" onmouseout="this.className='fl2'"><img class="fl2" src="../img/admin/x4.gif" width="70" height="100" border="0" onmouseover="this.className='fl1'" onmouseout="this.className='fl2'"><img class="fl2" src="../img/admin/x5.gif" width="70" height="100" border="0" onmouseover="this.className='fl1'" onmouseout="this.className='fl2'"></div>
|
||||||
|
|
||||||
<div id="lmidall">
|
<div id="lmidall">
|
||||||
<div id="lmidlc">
|
<div id="lmidlc">
|
||||||
<div id="lleft">
|
<div id="lleft">
|
||||||
<a href="index.php"><img src="../img/en/a/travian0.gif" class="logo_plus" width="116" height="60" border="0"></a>
|
<a href="index.php"><img src="../img/en/a/travian0.gif" class="logo_plus" width="116" height="60" border="0"></a>
|
||||||
|
|
||||||
<table id="navi_table" cellspacing="0" cellpadding="0">
|
<table id="navi_table" cellspacing="0" cellpadding="0">
|
||||||
<tr>
|
<tr>
|
||||||
<td class="menu">
|
<td class="menu">
|
||||||
<?php
|
<?php
|
||||||
if($funct->CheckLogin()){?>
|
if($funct->CheckLogin()){?>
|
||||||
<a href="admin.php">ACP Home</a>
|
<a href="admin.php">ACP Home</a>
|
||||||
|
|
||||||
@@ -63,43 +63,43 @@ if(conf){return true;}else{return false;}
|
|||||||
|
|
||||||
<a href="#"></a><a href="#"></a>
|
<a href="#"></a><a href="#"></a>
|
||||||
|
|
||||||
<a href="?p=server_info">Server Info</a>
|
<a href="?p=server_info">Server Info</a>
|
||||||
<a href="?p=online">Online users</a>
|
<a href="?p=online">Online users</a>
|
||||||
<a href="?p=search">Search</a>
|
<a href="?p=search">Search</a>
|
||||||
<a href="?p=message">Msg/Rep</a>
|
<a href="?p=message">Msg/Rep</a>
|
||||||
<a href="?p=ban">Ban</a>
|
<a href="?p=ban">Ban</a>
|
||||||
<a href="?p=config">Config</a>
|
<a href="?p=config">Config</a>
|
||||||
<a href="?p=config_editor">Config Editor</a>
|
<a href="?p=config_editor">Config Editor</a>
|
||||||
|
|
||||||
<a href="#"></a><a href="#"></a><a href="#"></a>
|
<a href="#"></a><a href="#"></a><a href="#"></a>
|
||||||
<a href="?action=logout">Logout</a>
|
<a href="?action=logout">Logout</a>
|
||||||
<?php }?>
|
<?php }?>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table></div>
|
</table></div>
|
||||||
<div id="lmid1">
|
<div id="lmid1">
|
||||||
<div id="lmid3">
|
<div id="lmid3">
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
if($funct->CheckLogin()){
|
if($funct->CheckLogin()){
|
||||||
if($_POST or $_GET){
|
if($_POST or $_GET){
|
||||||
if($_GET['p'] and $_GET['p']!="search"){
|
if($_GET['p'] and $_GET['p']!="search"){
|
||||||
$filename = '../Templates/Admin/'.$_GET['p'].'.tpl';
|
$filename = '../Templates/Admin/'.$_GET['p'].'.tpl';
|
||||||
if(file_exists($filename)){
|
if(file_exists($filename)){
|
||||||
include($filename);
|
include($filename);
|
||||||
}else{
|
}else{
|
||||||
include('../Templates/Admin/404.tpl');
|
include('../Templates/Admin/404.tpl');
|
||||||
}
|
}
|
||||||
}else{
|
}else{
|
||||||
include('../Templates/Admin/search.tpl');
|
include('../Templates/Admin/search.tpl');
|
||||||
}
|
}
|
||||||
if($_POST['p'] and $_POST['s']){
|
if($_POST['p'] and $_POST['s']){
|
||||||
$filename = '../Templates/Admin/results_'.$_POST['p'].'.tpl';
|
$filename = '../Templates/Admin/results_'.$_POST['p'].'.tpl';
|
||||||
if(file_exists($filename)){
|
if(file_exists($filename)){
|
||||||
include($filename);
|
include($filename);
|
||||||
}else{
|
}else{
|
||||||
include('../Templates/Admin/404.tpl');
|
include('../Templates/Admin/404.tpl');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}else{
|
}else{
|
||||||
|
|||||||
+163
-163
@@ -27,9 +27,9 @@ class adm_DB {
|
|||||||
var $connection;
|
var $connection;
|
||||||
|
|
||||||
function adm_DB(){
|
function adm_DB(){
|
||||||
global $database;
|
global $database;
|
||||||
$this->connection = mysql_connect(SQL_SERVER, SQL_USER, SQL_PASS) or die(mysql_error());
|
$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());
|
mysql_select_db(SQL_DB, $this->connection) or die(mysql_error());
|
||||||
}
|
}
|
||||||
|
|
||||||
function Login($username,$password){
|
function Login($username,$password){
|
||||||
@@ -49,40 +49,40 @@ class adm_DB {
|
|||||||
function recountPopUser($uid){
|
function recountPopUser($uid){
|
||||||
global $database;
|
global $database;
|
||||||
$villages = $database->getProfileVillages($uid);
|
$villages = $database->getProfileVillages($uid);
|
||||||
for ($i = 0; $i <= count($villages)-1; $i++) {
|
for ($i = 0; $i <= count($villages)-1; $i++) {
|
||||||
$vid = $villages[$i]['wref'];
|
$vid = $villages[$i]['wref'];
|
||||||
$this->recountPop($vid);
|
$this->recountPop($vid);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function recountPop($vid){
|
function recountPop($vid){
|
||||||
global $database;
|
global $database;
|
||||||
$fdata = $database->getResourceLevel($vid);
|
$fdata = $database->getResourceLevel($vid);
|
||||||
$popTot = 0;
|
$popTot = 0;
|
||||||
for ($i = 1; $i <= 40; $i++) {
|
for ($i = 1; $i <= 40; $i++) {
|
||||||
$lvl = $fdata["f".$i];
|
$lvl = $fdata["f".$i];
|
||||||
$building = $fdata["f".$i."t"];
|
$building = $fdata["f".$i."t"];
|
||||||
if($building){
|
if($building){
|
||||||
$popTot += $this->buildingPOP($building,$lvl);
|
$popTot += $this->buildingPOP($building,$lvl);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$q = "UPDATE ".TB_PREFIX."vdata set pop = $popTot where wref = $vid";
|
$q = "UPDATE ".TB_PREFIX."vdata set pop = $popTot where wref = $vid";
|
||||||
mysql_query($q, $this->connection);
|
mysql_query($q, $this->connection);
|
||||||
}
|
}
|
||||||
|
|
||||||
function buildingPOP($f,$lvl){
|
function buildingPOP($f,$lvl){
|
||||||
$name = "bid".$f;
|
$name = "bid".$f;
|
||||||
global $$name;
|
global $$name;
|
||||||
$popT = 0;
|
$popT = 0;
|
||||||
$dataarray = $$name;
|
$dataarray = $$name;
|
||||||
for ($i = 0; $i <= $lvl; $i++) {
|
for ($i = 0; $i <= $lvl; $i++) {
|
||||||
$popT += $dataarray[$i]['pop'];
|
$popT += $dataarray[$i]['pop'];
|
||||||
}
|
}
|
||||||
return $popT;
|
return $popT;
|
||||||
}
|
}
|
||||||
|
|
||||||
function getWref($x,$y) {
|
function getWref($x,$y) {
|
||||||
$q = "SELECT id FROM ".TB_PREFIX."wdata where x = $x and y = $y";
|
$q = "SELECT id FROM ".TB_PREFIX."wdata where x = $x and y = $y";
|
||||||
$result = mysql_query($q, $this->connection);
|
$result = mysql_query($q, $this->connection);
|
||||||
$r = mysql_fetch_array($result);
|
$r = mysql_fetch_array($result);
|
||||||
return $r['id'];
|
return $r['id'];
|
||||||
@@ -92,199 +92,199 @@ class adm_DB {
|
|||||||
global $database;
|
global $database;
|
||||||
$wid = $this->getWref($post['x'],$post['y']);
|
$wid = $this->getWref($post['x'],$post['y']);
|
||||||
$uid = $post['uid'];
|
$uid = $post['uid'];
|
||||||
$status = $database->getVillageState($wid);
|
$status = $database->getVillageState($wid);
|
||||||
$status = 0;
|
$status = 0;
|
||||||
if($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().")");
|
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().")");
|
||||||
$database->setFieldTaken($wid);
|
$database->setFieldTaken($wid);
|
||||||
$database->addVillage($wid,$uid,'new village','0');
|
$database->addVillage($wid,$uid,'new village','0');
|
||||||
$database->addResourceFields($wid,$database->getVillageType($wid));
|
$database->addResourceFields($wid,$database->getVillageType($wid));
|
||||||
$database->addUnits($wid);
|
$database->addUnits($wid);
|
||||||
$database->addTech($wid);
|
$database->addTech($wid);
|
||||||
$database->addABTech($wid);
|
$database->addABTech($wid);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function Punish($post){
|
function Punish($post){
|
||||||
global $database;
|
global $database;
|
||||||
$villages = $database->getProfileVillages($post['uid']);
|
$villages = $database->getProfileVillages($post['uid']);
|
||||||
$admid = $post['admid'];
|
$admid = $post['admid'];
|
||||||
$user = $database->getUserArray($post['uid'],1);
|
$user = $database->getUserArray($post['uid'],1);
|
||||||
for ($i = 0; $i <= count($villages)-1; $i++) {
|
for ($i = 0; $i <= count($villages)-1; $i++) {
|
||||||
$vid = $villages[$i]['wref'];
|
$vid = $villages[$i]['wref'];
|
||||||
if($post['punish']){
|
if($post['punish']){
|
||||||
$popOld = $villages[$i]['pop'];
|
$popOld = $villages[$i]['pop'];
|
||||||
$proc = 100-$post['punish'];
|
$proc = 100-$post['punish'];
|
||||||
$pop = floor(($popOld/100)*($proc));
|
$pop = floor(($popOld/100)*($proc));
|
||||||
if($pop <= 1 ){$pop = 2;}
|
if($pop <= 1 ){$pop = 2;}
|
||||||
$this->PunishBuilding($vid,$proc,$pop);
|
$this->PunishBuilding($vid,$proc,$pop);
|
||||||
|
|
||||||
}
|
}
|
||||||
if($post['del_troop']){
|
if($post['del_troop']){
|
||||||
if($user['tribe'] == 1) {
|
if($user['tribe'] == 1) {
|
||||||
$unit = 1;
|
$unit = 1;
|
||||||
}else if($user['tribe'] == 2) {
|
}else if($user['tribe'] == 2) {
|
||||||
$unit = 11;
|
$unit = 11;
|
||||||
}else if($user['tribe'] == 3) {
|
}else if($user['tribe'] == 3) {
|
||||||
$unit = 21;
|
$unit = 21;
|
||||||
}
|
}
|
||||||
$this->DelUnits($villages[$i]['wref'],$unit);
|
$this->DelUnits($villages[$i]['wref'],$unit);
|
||||||
}
|
}
|
||||||
if($post['clean_ware']){
|
if($post['clean_ware']){
|
||||||
$time = time();
|
$time = time();
|
||||||
$q = "UPDATE ".TB_PREFIX."vdata SET `wood` = '0', `clay` = '0', `iron` = '0', `crop` = '0', `lastupdate` = '$time' WHERE wref = $vid;";
|
$q = "UPDATE ".TB_PREFIX."vdata SET `wood` = '0', `clay` = '0', `iron` = '0', `crop` = '0', `lastupdate` = '$time' WHERE wref = $vid;";
|
||||||
mysql_query($q, $this->connection);
|
mysql_query($q, $this->connection);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
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().")");
|
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().")");
|
||||||
}
|
}
|
||||||
|
|
||||||
function PunishBuilding($vid,$proc,$pop){
|
function PunishBuilding($vid,$proc,$pop){
|
||||||
global $database;
|
global $database;
|
||||||
$q = "UPDATE ".TB_PREFIX."vdata set pop = $pop where wref = $vid;";
|
$q = "UPDATE ".TB_PREFIX."vdata set pop = $pop where wref = $vid;";
|
||||||
mysql_query($q, $this->connection);
|
mysql_query($q, $this->connection);
|
||||||
$fdata = $database->getResourceLevel($vid);
|
$fdata = $database->getResourceLevel($vid);
|
||||||
for ($i = 1; $i <= 40; $i++) {
|
for ($i = 1; $i <= 40; $i++) {
|
||||||
if($fdata['f'.$i]>1){
|
if($fdata['f'.$i]>1){
|
||||||
$zm = ($fdata['f'.$i]/100)*$proc;
|
$zm = ($fdata['f'.$i]/100)*$proc;
|
||||||
if($zm < 1){$zm = 1;}else{$zm = floor($zm);}
|
if($zm < 1){$zm = 1;}else{$zm = floor($zm);}
|
||||||
$q = "UPDATE ".TB_PREFIX."fdata SET `f$i` = '$zm' WHERE `vref` = $vid;";
|
$q = "UPDATE ".TB_PREFIX."fdata SET `f$i` = '$zm' WHERE `vref` = $vid;";
|
||||||
mysql_query($q, $this->connection);
|
mysql_query($q, $this->connection);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function DelUnits($vid,$unit){
|
function DelUnits($vid,$unit){
|
||||||
for ($i = $unit; $i <= 9+$unit; $i++) {
|
for ($i = $unit; $i <= 9+$unit; $i++) {
|
||||||
$this->DelUnits2($vid,$unit);
|
$this->DelUnits2($vid,$unit);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function DelUnits2($vid,$unit){
|
function DelUnits2($vid,$unit){
|
||||||
$q = "UPDATE ".TB_PREFIX."units SET `u$unit` = '0' WHERE `vref` = $vid;";
|
$q = "UPDATE ".TB_PREFIX."units SET `u$unit` = '0' WHERE `vref` = $vid;";
|
||||||
mysql_query($q, $this->connection);
|
mysql_query($q, $this->connection);
|
||||||
}
|
}
|
||||||
|
|
||||||
function DelPlayer($uid,$pass){
|
function DelPlayer($uid,$pass){
|
||||||
global $database;
|
global $database;
|
||||||
$ID = $_SESSION['id'];//$database->getUserField($_SESSION['username'],'id',1);
|
$ID = $_SESSION['id'];//$database->getUserField($_SESSION['username'],'id',1);
|
||||||
if($this->CheckPass($pass,$ID)){
|
if($this->CheckPass($pass,$ID)){
|
||||||
$villages = $database->getProfileVillages($uid);
|
$villages = $database->getProfileVillages($uid);
|
||||||
for ($i = 0; $i <= count($villages)-1; $i++) {
|
for ($i = 0; $i <= count($villages)-1; $i++) {
|
||||||
$this->DelVillage($villages[$i]['wref']);
|
$this->DelVillage($villages[$i]['wref']);
|
||||||
}
|
}
|
||||||
$name = $database->getUserField($uid,"username",0);
|
$name = $database->getUserField($uid,"username",0);
|
||||||
mysql_query("Insert into ".TB_PREFIX."admin_log values (0,$ID,'Deleted user <a>$name</a>',".time().")");
|
mysql_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;";
|
$q = "DELETE FROM ".TB_PREFIX."users WHERE `id` = $uid;";
|
||||||
mysql_query($q, $this->connection);
|
mysql_query($q, $this->connection);
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
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);
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
function CheckPass($password,$uid){
|
|
||||||
$q = "SELECT password FROM ".TB_PREFIX."users where id = '$uid' and access = ".ADMIN;
|
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);
|
||||||
|
}
|
||||||
|
|
||||||
|
function CheckPass($password,$uid){
|
||||||
|
$q = "SELECT password FROM ".TB_PREFIX."users where id = '$uid' and access = ".ADMIN;
|
||||||
$result = mysql_query($q, $this->connection);
|
$result = mysql_query($q, $this->connection);
|
||||||
$dbarray = mysql_fetch_array($result);
|
$dbarray = mysql_fetch_array($result);
|
||||||
if($dbarray['password'] == md5($password)) {
|
if($dbarray['password'] == md5($password)) {
|
||||||
return true;
|
return true;
|
||||||
}else{
|
}else{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function DelVillage($wref){
|
function DelVillage($wref){
|
||||||
$q = "SELECT * FROM ".TB_PREFIX."vdata WHERE `wref` = $wref and capital = 0";
|
$q = "SELECT * FROM ".TB_PREFIX."vdata WHERE `wref` = $wref and capital = 0";
|
||||||
$result = mysql_query($q, $this->connection);
|
$result = mysql_query($q, $this->connection);
|
||||||
if(mysql_num_rows($result) > 0){
|
if(mysql_num_rows($result) > 0){
|
||||||
mysql_query("Insert into ".TB_PREFIX."admin_log values (0,".$_SESSION['id'].",'Deleted village <b>$wref</b>',".time().")");
|
mysql_query("Insert into ".TB_PREFIX."admin_log values (0,".$_SESSION['id'].",'Deleted village <b>$wref</b>',".time().")");
|
||||||
$q = "DELETE FROM ".TB_PREFIX."vdata WHERE `wref` = $wref";
|
$q = "DELETE FROM ".TB_PREFIX."vdata WHERE `wref` = $wref";
|
||||||
mysql_query($q, $this->connection);
|
mysql_query($q, $this->connection);
|
||||||
$q = "DELETE FROM ".TB_PREFIX."units WHERE `vref` = $wref";
|
$q = "DELETE FROM ".TB_PREFIX."units WHERE `vref` = $wref";
|
||||||
mysql_query($q, $this->connection);
|
mysql_query($q, $this->connection);
|
||||||
$q = "DELETE FROM ".TB_PREFIX."bdata WHERE `wid` = $wref";
|
$q = "DELETE FROM ".TB_PREFIX."bdata WHERE `wid` = $wref";
|
||||||
mysql_query($q, $this->connection);
|
mysql_query($q, $this->connection);
|
||||||
$q = "DELETE FROM ".TB_PREFIX."abdata WHERE `wid` = $wref";
|
$q = "DELETE FROM ".TB_PREFIX."abdata WHERE `wid` = $wref";
|
||||||
mysql_query($q, $this->connection);
|
mysql_query($q, $this->connection);
|
||||||
$q = "DELETE FROM ".TB_PREFIX."fdata WHERE `vref` = $wref";
|
$q = "DELETE FROM ".TB_PREFIX."fdata WHERE `vref` = $wref";
|
||||||
mysql_query($q, $this->connection);
|
mysql_query($q, $this->connection);
|
||||||
$q = "DELETE FROM ".TB_PREFIX."training WHERE `vref` = $wref";
|
$q = "DELETE FROM ".TB_PREFIX."training WHERE `vref` = $wref";
|
||||||
mysql_query($q, $this->connection);
|
mysql_query($q, $this->connection);
|
||||||
$q = "DELETE FROM ".TB_PREFIX."movement WHERE `from` = $wref";
|
$q = "DELETE FROM ".TB_PREFIX."movement WHERE `from` = $wref";
|
||||||
mysql_query($q, $this->connection);
|
mysql_query($q, $this->connection);
|
||||||
$q = "UPDATE ".TB_PREFIX."wdata SET `occupied` = '0' WHERE `id` = $wref";
|
$q = "UPDATE ".TB_PREFIX."wdata SET `occupied` = '0' WHERE `id` = $wref";
|
||||||
mysql_query($q, $this->connection);
|
mysql_query($q, $this->connection);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function DelBan($uid,$id){
|
function DelBan($uid,$id){
|
||||||
global $database;
|
global $database;
|
||||||
$name = $database->getUserField($uid,"username",0);
|
$name = $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().")");
|
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().")");
|
||||||
$q = "UPDATE ".TB_PREFIX."users SET `access` = '".USER."' WHERE `id` = $uid;";
|
$q = "UPDATE ".TB_PREFIX."users SET `access` = '".USER."' WHERE `id` = $uid;";
|
||||||
mysql_query($q, $this->connection);
|
mysql_query($q, $this->connection);
|
||||||
$q = "UPDATE ".TB_PREFIX."banlist SET `active` = '0' WHERE `id` = $id;";
|
$q = "UPDATE ".TB_PREFIX."banlist SET `active` = '0' WHERE `id` = $id;";
|
||||||
mysql_query($q, $this->connection);
|
mysql_query($q, $this->connection);
|
||||||
}
|
}
|
||||||
|
|
||||||
function AddBan($uid,$end,$reason){
|
function AddBan($uid,$end,$reason){
|
||||||
global $database;
|
global $database;
|
||||||
$name = $database->getUserField($uid,"username",0);
|
$name = $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().")");
|
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().")");
|
||||||
$q = "UPDATE ".TB_PREFIX."users SET `access` = '0' WHERE `id` = $uid;";
|
$q = "UPDATE ".TB_PREFIX."users SET `access` = '0' WHERE `id` = $uid;";
|
||||||
mysql_query($q, $this->connection);
|
mysql_query($q, $this->connection);
|
||||||
$time = time();
|
$time = time();
|
||||||
$admin = $_SESSION['id']; //$database->getUserField($_SESSION['username'],'id',1);
|
$admin = $_SESSION['id']; //$database->getUserField($_SESSION['username'],'id',1);
|
||||||
$name = $database->getUserField($uid,'username',0);
|
$name = $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');";
|
$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);
|
mysql_query($q, $this->connection);
|
||||||
}
|
}
|
||||||
|
|
||||||
function search_player($player){
|
function search_player($player){
|
||||||
$q = "SELECT id,username FROM ".TB_PREFIX."users WHERE `username` LIKE '%$player%' and username != 'support'";
|
$q = "SELECT id,username FROM ".TB_PREFIX."users WHERE `username` LIKE '%$player%' and username != 'support'";
|
||||||
$result = mysql_query($q, $this->connection);
|
$result = mysql_query($q, $this->connection);
|
||||||
return $this->mysql_fetch_all($result);
|
return $this->mysql_fetch_all($result);
|
||||||
}
|
}
|
||||||
|
|
||||||
function search_email($email){
|
function search_email($email){
|
||||||
$q = "SELECT id,email FROM ".TB_PREFIX."users WHERE `email` LIKE '%$email%' and username != 'support'";
|
$q = "SELECT id,email FROM ".TB_PREFIX."users WHERE `email` LIKE '%$email%' and username != 'support'";
|
||||||
$result = mysql_query($q, $this->connection);
|
$result = mysql_query($q, $this->connection);
|
||||||
return $this->mysql_fetch_all($result);
|
return $this->mysql_fetch_all($result);
|
||||||
}
|
}
|
||||||
|
|
||||||
function search_village($village){
|
function search_village($village){
|
||||||
$q = "SELECT * FROM ".TB_PREFIX."vdata WHERE `name` LIKE '%$village%' or `wref` LIKE '%$village%'";
|
$q = "SELECT * FROM ".TB_PREFIX."vdata WHERE `name` LIKE '%$village%' or `wref` LIKE '%$village%'";
|
||||||
$result = mysql_query($q, $this->connection);
|
$result = mysql_query($q, $this->connection);
|
||||||
return $this->mysql_fetch_all($result);
|
return $this->mysql_fetch_all($result);
|
||||||
}
|
}
|
||||||
|
|
||||||
function search_alliance($alliance){
|
function search_alliance($alliance){
|
||||||
$q = "SELECT * FROM ".TB_PREFIX."alidata WHERE `name` LIKE '%$alliance%' or `tag` LIKE '%$alliance%' or `id` LIKE '%$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);
|
$result = mysql_query($q, $this->connection);
|
||||||
return $this->mysql_fetch_all($result);
|
return $this->mysql_fetch_all($result);
|
||||||
}
|
}
|
||||||
|
|
||||||
function search_ip($ip){
|
function search_ip($ip){
|
||||||
$q = "SELECT * FROM ".TB_PREFIX."login_log WHERE `ip` LIKE '%$ip%'";
|
$q = "SELECT * FROM ".TB_PREFIX."login_log WHERE `ip` LIKE '%$ip%'";
|
||||||
$result = mysql_query($q, $this->connection);
|
$result = mysql_query($q, $this->connection);
|
||||||
return $this->mysql_fetch_all($result);
|
return $this->mysql_fetch_all($result);
|
||||||
}
|
}
|
||||||
|
|
||||||
function search_banned(){
|
function search_banned(){
|
||||||
$q = "SELECT * FROM ".TB_PREFIX."banlist where active = '1'";
|
$q = "SELECT * FROM ".TB_PREFIX."banlist where active = '1'";
|
||||||
$result = mysql_query($q, $this->connection);
|
$result = mysql_query($q, $this->connection);
|
||||||
return $this->mysql_fetch_all($result);
|
return $this->mysql_fetch_all($result);
|
||||||
}
|
}
|
||||||
|
|
||||||
function Del_banned(){
|
function Del_banned(){
|
||||||
//$q = "SELECT * FROM ".TB_PREFIX."banlist";
|
//$q = "SELECT * FROM ".TB_PREFIX."banlist";
|
||||||
$result = mysql_query($q, $this->connection);
|
$result = mysql_query($q, $this->connection);
|
||||||
return $this->mysql_fetch_all($result);
|
return $this->mysql_fetch_all($result);
|
||||||
}
|
}
|
||||||
|
|
||||||
/***************************
|
/***************************
|
||||||
@@ -316,5 +316,5 @@ class adm_DB {
|
|||||||
};
|
};
|
||||||
|
|
||||||
$admin = new adm_DB;
|
$admin = new adm_DB;
|
||||||
include("function.php");
|
include("function.php");
|
||||||
?>
|
?>
|
||||||
@@ -9,97 +9,97 @@
|
|||||||
## ##
|
## ##
|
||||||
#################################################################################
|
#################################################################################
|
||||||
|
|
||||||
class funct {
|
class funct {
|
||||||
|
|
||||||
function CheckLogin(){
|
|
||||||
if($_SESSION['access'] >= MULTIHUNTER and $_SESSION['id']){
|
|
||||||
return true;
|
|
||||||
}else{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function Act($get){
|
|
||||||
global $admin,$database;
|
|
||||||
|
|
||||||
switch($get['action']){
|
function CheckLogin(){
|
||||||
case recountPop:
|
if($_SESSION['access'] >= MULTIHUNTER and $_SESSION['id']){
|
||||||
$admin->recountPop($get['did']);
|
return true;
|
||||||
break;
|
}else{
|
||||||
case recountPopUsr:
|
return false;
|
||||||
$admin->recountPopUser($get['uid']);
|
}
|
||||||
break;
|
|
||||||
case StopDel:
|
|
||||||
//stop deleting
|
|
||||||
break;
|
|
||||||
case delVil:
|
|
||||||
$admin->DelVillage($get['did']);
|
|
||||||
break;
|
|
||||||
case delBan:
|
|
||||||
$admin->DelBan($get['uid'],$get['id']);
|
|
||||||
//remove ban
|
|
||||||
break;
|
|
||||||
case addBan:
|
|
||||||
if($get['time']){$end = time()+$get['time']; }else{$end = '';}
|
|
||||||
|
|
||||||
if(preg_match("/^[0-9]+$/",$get['uid'])){
|
|
||||||
//if(eregi("^[0-9]*+$",$get['uid'])){
|
|
||||||
$get['uid'] = $get['uid'];
|
|
||||||
}else{
|
|
||||||
$get['uid'] = $database->getUserField($get['uid'],'id',1);
|
|
||||||
}
|
|
||||||
|
|
||||||
$admin->AddBan($get['uid'],$end,$get['reason']);
|
|
||||||
//add ban
|
|
||||||
break;
|
|
||||||
case delOas:
|
|
||||||
//oaza
|
|
||||||
break;
|
|
||||||
case logout:
|
|
||||||
$this->LogOut();
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
if($get['action'] == 'logout'){
|
|
||||||
header("Location: admin.php");
|
|
||||||
}else{
|
|
||||||
header("Location: ".$_SERVER['HTTP_REFERER']);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function Act($get){
|
||||||
|
global $admin,$database;
|
||||||
|
|
||||||
|
switch($get['action']){
|
||||||
|
case recountPop:
|
||||||
|
$admin->recountPop($get['did']);
|
||||||
|
break;
|
||||||
|
case recountPopUsr:
|
||||||
|
$admin->recountPopUser($get['uid']);
|
||||||
|
break;
|
||||||
|
case StopDel:
|
||||||
|
//stop deleting
|
||||||
|
break;
|
||||||
|
case delVil:
|
||||||
|
$admin->DelVillage($get['did']);
|
||||||
|
break;
|
||||||
|
case delBan:
|
||||||
|
$admin->DelBan($get['uid'],$get['id']);
|
||||||
|
//remove ban
|
||||||
|
break;
|
||||||
|
case addBan:
|
||||||
|
if($get['time']){$end = time()+$get['time']; }else{$end = '';}
|
||||||
|
|
||||||
|
if(preg_match("/^[0-9]+$/",$get['uid'])){
|
||||||
|
//if(eregi("^[0-9]*+$",$get['uid'])){
|
||||||
|
$get['uid'] = $get['uid'];
|
||||||
|
}else{
|
||||||
|
$get['uid'] = $database->getUserField($get['uid'],'id',1);
|
||||||
|
}
|
||||||
|
|
||||||
|
$admin->AddBan($get['uid'],$end,$get['reason']);
|
||||||
|
//add ban
|
||||||
|
break;
|
||||||
|
case delOas:
|
||||||
|
//oaza
|
||||||
|
break;
|
||||||
|
case logout:
|
||||||
|
$this->LogOut();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
if($get['action'] == 'logout'){
|
||||||
|
header("Location: admin.php");
|
||||||
|
}else{
|
||||||
|
header("Location: ".$_SERVER['HTTP_REFERER']);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
function Act2($post){
|
function Act2($post){
|
||||||
global $admin,$database;
|
global $admin,$database;
|
||||||
switch($post['action']){
|
switch($post['action']){
|
||||||
case DelPlayer:
|
case DelPlayer:
|
||||||
$admin->DelPlayer($post['uid'],$post['pass']);
|
$admin->DelPlayer($post['uid'],$post['pass']);
|
||||||
header("Location: ?p=search&msg=ursdel");
|
header("Location: ?p=search&msg=ursdel");
|
||||||
break;
|
break;
|
||||||
case punish:
|
case punish:
|
||||||
$admin->Punish($post);
|
$admin->Punish($post);
|
||||||
header("Location: ".$_SERVER['HTTP_REFERER']);
|
header("Location: ".$_SERVER['HTTP_REFERER']);
|
||||||
break;
|
break;
|
||||||
case addVillage:
|
case addVillage:
|
||||||
$admin->AddVillage($post);
|
$admin->AddVillage($post);
|
||||||
header("Location: ".$_SERVER['HTTP_REFERER']);
|
header("Location: ".$_SERVER['HTTP_REFERER']);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function LogIN($username,$password){
|
function LogIN($username,$password){
|
||||||
global $admin,$database;
|
global $admin,$database;
|
||||||
if($admin->Login($username,$password)){
|
if($admin->Login($username,$password)){
|
||||||
//$_SESSION['username'] = $username;
|
//$_SESSION['username'] = $username;
|
||||||
$_SESSION['access'] = $database->getUserField($username,'access',1);
|
$_SESSION['access'] = $database->getUserField($username,'access',1);
|
||||||
$_SESSION['id'] = $database->getUserField($username,'id',1);
|
$_SESSION['id'] = $database->getUserField($username,'id',1);
|
||||||
header("Location: ".$_SERVER['HTTP_REFERER']);
|
header("Location: ".$_SERVER['HTTP_REFERER']);
|
||||||
//header("Location: admin.php");
|
//header("Location: admin.php");
|
||||||
}else{
|
}else{
|
||||||
echo "Error";
|
echo "Error";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function LogOut(){
|
function LogOut(){
|
||||||
$_SESSION['access'] = '';
|
$_SESSION['access'] = '';
|
||||||
$_SESSION['id'] = '';
|
$_SESSION['id'] = '';
|
||||||
}
|
}
|
||||||
|
|
||||||
public function procResType($ref) {
|
public function procResType($ref) {
|
||||||
@@ -150,16 +150,16 @@ class funct {
|
|||||||
}
|
}
|
||||||
return $build;
|
return $build;
|
||||||
}
|
}
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
$funct = new funct;
|
$funct = new funct;
|
||||||
if($funct->CheckLogin()){
|
if($funct->CheckLogin()){
|
||||||
if($_GET['action']){
|
if($_GET['action']){
|
||||||
$funct->Act($_GET);
|
$funct->Act($_GET);
|
||||||
}
|
}
|
||||||
if($_POST['action']){
|
if($_POST['action']){
|
||||||
$funct->Act2($_POST);
|
$funct->Act2($_POST);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if($_POST['action']=='login'){
|
if($_POST['action']=='login'){
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
Hello %USER%,
|
Hello %USER%,
|
||||||
|
|
||||||
Thank you for registering on our server.
|
Thank you for registering on our server.
|
||||||
Since the %START% at %TIME% Romans, Gauls and Teutons attack each other on this game world. Right now, %PLAYERS% players in %ALLI% Alliances are fighting for supremacy.
|
Since the %START% at %TIME% Romans, Gauls and Teutons attack each other on this game world. Right now, %PLAYERS% players in %ALLI% Alliances are fighting for supremacy.
|
||||||
|
|
||||||
Regards, %SERVER_NAME%
|
Regards, %SERVER_NAME%
|
||||||
+350
-350
@@ -3,361 +3,361 @@
|
|||||||
/*
|
/*
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
| PLEASE DO NOT REMOVE THIS COPYRIGHT NOTICE!
|
| PLEASE DO NOT REMOVE THIS COPYRIGHT NOTICE!
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
|
||||||
| Project owner: Dzoki < dzoki.travian@gmail.com >
|
| Project owner: Dzoki < dzoki.travian@gmail.com >
|
||||||
|
|
|
|
||||||
| This script is property of TravianX Project. You are allowed to change
|
| This script is property of TravianX Project. You are allowed to change
|
||||||
| its source and release it under own name, not under name `TravianX`.
|
| its source and release it under own name, not under name `TravianX`.
|
||||||
| You have no rights to remove copyright notices.
|
| You have no rights to remove copyright notices.
|
||||||
|
|
|
|
||||||
| TravianX All rights reserved
|
| TravianX All rights reserved
|
||||||
|
|
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class Alliance {
|
class Alliance {
|
||||||
|
|
||||||
public $gotInvite = false;
|
public $gotInvite = false;
|
||||||
public $inviteArray = array();
|
public $inviteArray = array();
|
||||||
public $allianceArray = array();
|
public $allianceArray = array();
|
||||||
public $userPermArray = array();
|
public $userPermArray = array();
|
||||||
|
|
||||||
public function procAlliance($get) {
|
public function procAlliance($get) {
|
||||||
global $session, $database;
|
global $session, $database;
|
||||||
|
|
||||||
if($session->alliance != 0) {
|
if($session->alliance != 0) {
|
||||||
$this->allianceArray = $database->getAlliance($session->alliance);
|
$this->allianceArray = $database->getAlliance($session->alliance);
|
||||||
// Permissions Array
|
// Permissions Array
|
||||||
// [id] => id [uid] => uid [alliance] => alliance [opt1] => X [opt2] => X [opt3] => X [opt4] => X [opt5] => X [opt6] => X [opt7] => X [opt8] => X
|
// [id] => id [uid] => uid [alliance] => alliance [opt1] => X [opt2] => X [opt3] => X [opt4] => X [opt5] => X [opt6] => X [opt7] => X [opt8] => X
|
||||||
$this->userPermArray = $database->getAlliPermissions($session->uid, $session->alliance);
|
$this->userPermArray = $database->getAlliPermissions($session->uid, $session->alliance);
|
||||||
} else {
|
} else {
|
||||||
$this->inviteArray = $database->getInvitation($session->uid);
|
$this->inviteArray = $database->getInvitation($session->uid);
|
||||||
$this->gotInvite = count($this->inviteArray) == 0 ? false : true;
|
$this->gotInvite = count($this->inviteArray) == 0 ? false : true;
|
||||||
}
|
}
|
||||||
if(isset($get['a'])) {
|
if(isset($get['a'])) {
|
||||||
switch($get['a']) {
|
switch($get['a']) {
|
||||||
case 2:
|
case 2:
|
||||||
$this->rejectInvite($get);
|
$this->rejectInvite($get);
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
$this->acceptInvite($get);
|
$this->acceptInvite($get);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(isset($get['o'])) {
|
if(isset($get['o'])) {
|
||||||
switch($get['o']) {
|
switch($get['o']) {
|
||||||
case 4:
|
case 4:
|
||||||
$this->delInvite($get);
|
$this->delInvite($get);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public function procAlliForm($post) {
|
public function procAlliForm($post) {
|
||||||
if(isset($post['ft'])) {
|
if(isset($post['ft'])) {
|
||||||
switch($post['ft']) {
|
switch($post['ft']) {
|
||||||
case "ali1":
|
case "ali1":
|
||||||
$this->createAlliance($post);
|
$this->createAlliance($post);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
if(isset($_POST['dipl']) and isset($_POST['a_name'])) {
|
if(isset($_POST['dipl']) and isset($_POST['a_name'])) {
|
||||||
$this->changediplomacy($post);
|
$this->changediplomacy($post);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(isset($post['s'])) {
|
if(isset($post['s'])) {
|
||||||
if(isset($post['o'])) {
|
if(isset($post['o'])) {
|
||||||
switch($post['o']) {
|
switch($post['o']) {
|
||||||
case 1:
|
case 1:
|
||||||
if(isset($_POST['a'])) {
|
if(isset($_POST['a'])) {
|
||||||
$this->changeUserPermissions($post);
|
$this->changeUserPermissions($post);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
if(isset($_POST['a_user'])) {
|
if(isset($_POST['a_user'])) {
|
||||||
$this->kickAlliUser($post);
|
$this->kickAlliUser($post);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 4:
|
case 4:
|
||||||
if(isset($_POST['a']) && $_POST['a'] == 4) {
|
if(isset($_POST['a']) && $_POST['a'] == 4) {
|
||||||
$this->sendInvite($post);
|
$this->sendInvite($post);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
$this->updateAlliProfile($post);
|
$this->updateAlliProfile($post);
|
||||||
break;
|
break;
|
||||||
case 11:
|
case 11:
|
||||||
$this->quitally($post);
|
$this->quitally($post);
|
||||||
break;
|
break;
|
||||||
case 100:
|
case 100:
|
||||||
$this->changeAliName($post);
|
$this->changeAliName($post);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*****************************************
|
|
||||||
Function to process of sending invitations
|
|
||||||
*****************************************/
|
|
||||||
public function sendInvite($post) {
|
|
||||||
global $form, $database, $session;
|
|
||||||
// ¿El campo posee informacion?
|
|
||||||
if(!isset($post['a_name']) || $post['a_name'] == "") {
|
|
||||||
$form->addError("name1", NAME_EMPTY);
|
|
||||||
}
|
|
||||||
// ¿Existe el usuario?
|
|
||||||
if(!$database->checkExist($post['a_name'], 0)) {
|
|
||||||
$form->addError("name2", NAME_NO_EXIST);
|
|
||||||
}
|
|
||||||
// ¿La invitacion es a si mismo?
|
|
||||||
if($post['a_name'] == ($session->username)) {
|
|
||||||
$form->addError("name3", SAME_NAME);
|
|
||||||
}
|
|
||||||
// ¿Esta ya invitado a la alianza?
|
|
||||||
$UserData = $database->getUserArray($post['a_name'], 0);
|
|
||||||
if($database->getInvitation($UserData['id'])) {
|
|
||||||
$form->addError("name4", OLRADY_INVITED);
|
|
||||||
}
|
|
||||||
// ¿Esta ya en la alianza?
|
|
||||||
$UserData = $database->getUserArray($post['a_name'], 0);
|
|
||||||
if($UserData['alliance'] == $session->alliance) {
|
|
||||||
$form->addError("name5", OLRADY_IN_ALLY);
|
|
||||||
}
|
|
||||||
// ¿La invitación la envia un autorizado?
|
|
||||||
if($this->userPermArray['opt4'] == 0) {
|
|
||||||
$form->addError("perm", NO_PERMISSION);
|
|
||||||
}
|
|
||||||
if($form->returnErrors() != 0) {
|
|
||||||
$_SESSION['errorarray'] = $form->getErrors();
|
|
||||||
$_SESSION['valuearray'] = $post;
|
|
||||||
print_r($form->getErrors());
|
|
||||||
} else {
|
|
||||||
// Obtenemos la informacion necesaria
|
|
||||||
$aid = $session->alliance;
|
|
||||||
// Insertamos invitacion
|
|
||||||
$database->sendInvitation($UserData['id'], $aid, $session->uid);
|
|
||||||
// Log the notice
|
|
||||||
$database->insertAlliNotice($session->alliance, '<a href="spieler.php?uid=' . $session->uid . '">' . $session->username . '</a> has invited <a href="spieler.php?uid=' . $UserData['id'] . '">' . $UserData['username'] . '</a> into the alliance.');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/*****************************************
|
|
||||||
Function to reject an invitation
|
|
||||||
*****************************************/
|
|
||||||
private function rejectInvite($get) {
|
|
||||||
global $database, $session;
|
|
||||||
foreach($this->inviteArray as $invite) {
|
|
||||||
if($invite['id'] == $get['d']) {
|
|
||||||
$database->removeInvitation($get['d']);
|
|
||||||
$database->insertAlliNotice($invite['alliance'], '<a href="spieler.php?uid=' . $session->uid . '">' . $session->username . '</a> has rejected the invitation.');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
header("Location: build.php?id=".$get['id']);
|
|
||||||
}
|
|
||||||
|
|
||||||
/*****************************************
|
|
||||||
Function to del an invitation
|
|
||||||
*****************************************/
|
|
||||||
private function delInvite($get) {
|
|
||||||
global $database, $session;
|
|
||||||
$inviteArray = $database->getAliInvitations($session->alliance);
|
|
||||||
foreach($inviteArray as $invite) {
|
|
||||||
if($invite['id'] == $get['d']) {
|
|
||||||
$invitename = $database->getUserArray($invite['uid'], 1);
|
|
||||||
$database->removeInvitation($get['d']);
|
|
||||||
$database->insertAlliNotice($session->alliance, '<a href="spieler.php?uid=' . $session->uid . '">' . $session->username . '</a> has deleted the invitation for <a href="spieler.php?uid=' . $invitename['id'] . '">' . $invitename['username'] . '</a>.');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/*****************************************
|
|
||||||
Function to accept an invitation
|
|
||||||
*****************************************/
|
|
||||||
private function acceptInvite($get) {
|
|
||||||
global $database, $session;
|
|
||||||
foreach($this->inviteArray as $invite) {
|
|
||||||
if($invite['id'] == $get['d']) {
|
|
||||||
$database->removeInvitation($database->RemoveXSS($get['d']));
|
|
||||||
$database->updateUserField($database->RemoveXSS($invite['uid']), "alliance", $database->RemoveXSS($invite['alliance']), 1);
|
|
||||||
$database->createAlliPermissions($database->RemoveXSS($invite['uid']), $database->RemoveXSS($invite['alliance']), '', '0', '0', '0', '0', '0', '0', '0', '0');
|
|
||||||
// Log the notice
|
|
||||||
$database->insertAlliNotice($invite['alliance'], '<a href="spieler.php?uid=' . $session->uid . '">' . $session->username . '</a> has joined the alliance.');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
header("Location: build.php?id=" . $get['id']);
|
|
||||||
}
|
|
||||||
|
|
||||||
/*****************************************
|
|
||||||
Function to create an alliance
|
|
||||||
*****************************************/
|
|
||||||
private function createAlliance($post) {
|
|
||||||
global $form, $database, $session, $bid18, $village;
|
|
||||||
if(!isset($post['ally1']) || $post['ally1'] == "") {
|
|
||||||
$form->addError("ally1", ATAG_EMPTY);
|
|
||||||
}
|
|
||||||
if(!isset($post['ally2']) || $post['ally2'] == "") {
|
|
||||||
$form->addError("ally2", ANAME_EMPTY);
|
|
||||||
}
|
|
||||||
if($database->aExist($post['ally1'], "tag")) {
|
|
||||||
$form->addError("ally1", ATAG_EXIST);
|
|
||||||
}
|
|
||||||
if($database->aExist($post['ally2'], "name")) {
|
|
||||||
$form->addError("ally2", ANAME_EXIST);
|
|
||||||
}
|
|
||||||
if($form->returnErrors() != 0) {
|
|
||||||
$_SESSION['errorarray'] = $form->getErrors();
|
|
||||||
$_SESSION['valuearray'] = $post;
|
|
||||||
|
|
||||||
header("Location: build.php?id=" . $post['id']);
|
|
||||||
} else {
|
|
||||||
$max = $bid18[$village->resarray['f' . $post['id']]]['attri'];
|
|
||||||
$aid = $database->createAlliance($database->RemoveXSS($post['ally1']), $database->RemoveXSS($post['ally2']), $session->uid, $max);
|
|
||||||
$database->updateUserField($database->RemoveXSS($session->uid), "alliance", $database->RemoveXSS($aid), 1);
|
|
||||||
// Asign Permissions
|
|
||||||
$database->createAlliPermissions($database->RemoveXSS($session->uid), $database->RemoveXSS($aid), 'Alliance founder', '1', '1', '1', '1', '1', '1', '1', '1');
|
|
||||||
// log the notice
|
|
||||||
$database->insertAlliNotice($aid, 'The alliance has been founded by <a href="spieler.php?uid=' . $session->uid . '">' . $session->username . '</a>.');
|
|
||||||
header("Location: build.php?id=" . $post['id']);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/*****************************************
|
|
||||||
Function to change the alliance name
|
|
||||||
*****************************************/
|
|
||||||
private function changeAliName($get) {
|
|
||||||
global $form, $database, $session;
|
|
||||||
|
|
||||||
if(!isset($get['ally1']) || $get['ally1'] == "") {
|
|
||||||
$form->addError("ally1", ATAG_EMPTY);
|
|
||||||
}
|
|
||||||
if(!isset($get['ally2']) || $get['ally2'] == "") {
|
|
||||||
$form->addError("ally2", ANAME_EMPTY);
|
|
||||||
}
|
|
||||||
if($database->aExist($get['ally1'], "tag")) {
|
|
||||||
$form->addError("tag", ATAG_EXIST);
|
|
||||||
}
|
|
||||||
if($database->aExist($get['ally2'], "name")) {
|
|
||||||
$form->addError("name", ANAME_EXIST);
|
|
||||||
}
|
|
||||||
if($this->userPermArray['opt3'] == 0) {
|
|
||||||
$form->addError("perm", NO_PERMISSION);
|
|
||||||
}
|
|
||||||
if($form->returnErrors() != 0) {
|
|
||||||
$_SESSION['errorarray'] = $form->getErrors();
|
|
||||||
$_SESSION['valuearray'] = $post;
|
|
||||||
//header("Location: build.php?id=".$post['id']);
|
|
||||||
} else {
|
|
||||||
$database->setAlliName($database->RemoveXSS($session->alliance), $database->RemoveXSS($get['ally2']), $database->RemoveXSS($get['ally1']));
|
|
||||||
// log the notice
|
|
||||||
$database->insertAlliNotice($session->alliance, '<a href="spieler.php?uid=' . $session->uid . '">' . $session->username . '</a> has changed the alliance name.');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/*****************************************
|
|
||||||
Function to create/change the alliance description
|
|
||||||
*****************************************/
|
|
||||||
private function updateAlliProfile($post) {
|
|
||||||
global $database, $session, $form;
|
|
||||||
if($this->userPermArray['opt3'] == 0) {
|
|
||||||
$form->addError("perm", NO_PERMISSION);
|
|
||||||
}
|
|
||||||
if($form->returnErrors() != 0) {
|
|
||||||
$_SESSION['errorarray'] = $form->getErrors();
|
|
||||||
$_SESSION['valuearray'] = $post;
|
|
||||||
//header("Location: build.php?id=".$post['id']);
|
|
||||||
} else {
|
|
||||||
$database->submitAlliProfile($database->RemoveXSS($session->alliance), $database->RemoveXSS($post['be2']), $database->RemoveXSS($post['be1']));
|
|
||||||
// log the notice
|
|
||||||
$database->insertAlliNotice($session->alliance, '<a href="spieler.php?uid=' . $session->uid . '">' . $session->username . '</a> has changed the alliance description.');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/*****************************************
|
|
||||||
Function to change the user permissions
|
|
||||||
*****************************************/
|
|
||||||
private function changeUserPermissions($post) {
|
|
||||||
global $database, $session, $form;
|
|
||||||
if($this->userPermArray['opt1'] == 0) {
|
|
||||||
$form->addError("perm", NO_PERMISSION);
|
|
||||||
}
|
|
||||||
if($form->returnErrors() != 0) {
|
|
||||||
$_SESSION['errorarray'] = $form->getErrors();
|
|
||||||
$_SESSION['valuearray'] = $post;
|
|
||||||
//header("Location: build.php?id=".$post['id']);
|
|
||||||
} else {
|
|
||||||
$database->updateAlliPermissions($post['a_user'], $session->alliance, $post['a_titel'], $post['e1'], $post['e2'], $post['e3'], $post['e4'], $post['e5'], $post['e6'], $post['e7']);
|
|
||||||
// log the notice
|
|
||||||
$database->insertAlliNotice($session->alliance, '<a href="spieler.php?uid=' . $session->uid . '">' . $session->username . '</a> has changed permissions.');
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
/*****************************************
|
|
||||||
Function to kick a user from alliance
|
|
||||||
*****************************************/
|
|
||||||
private function kickAlliUser($post) {
|
|
||||||
global $database, $session, $form;
|
|
||||||
|
|
||||||
if($this->userPermArray['opt2'] == 0) {
|
|
||||||
$form->addError("perm", NO_PERMISSION);
|
|
||||||
}
|
|
||||||
if($form->returnErrors() != 0) {
|
|
||||||
$_SESSION['errorarray'] = $form->getErrors();
|
|
||||||
$_SESSION['valuearray'] = $post;
|
|
||||||
//header("Location: build.php?id=".$post['id']);
|
|
||||||
} else {
|
|
||||||
$database->updateUserField($post['a_user'], 'alliance', 0, 1);
|
|
||||||
$database->deleteAlliPermissions($post['a_user']);
|
|
||||||
$database->deleteAlliance($session->alliance);
|
|
||||||
// log the notice
|
|
||||||
$database->insertAlliNotice($session->alliance, '<a href="spieler.php?uid=' . $session->uid . '">' . $session->username . '</a> kicked <a href="spieler.php?uid=' . $post['a_user'] . '">' . $UserData['username'] . '</a>.');
|
|
||||||
//header("Location: build.php?id=".$post['id']);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
/*****************************************
|
/*****************************************
|
||||||
Function to set forum link
|
Function to process of sending invitations
|
||||||
*****************************************/
|
*****************************************/
|
||||||
public function setForumLink($post) {
|
public function sendInvite($post) {
|
||||||
global $database, $session;
|
global $form, $database, $session;
|
||||||
if(isset($post['f_link'])){
|
// ¿El campo posee informacion?
|
||||||
$database->setAlliForumLink($session->alliance, $post['f_link']);
|
if(!isset($post['a_name']) || $post['a_name'] == "") {
|
||||||
|
$form->addError("name1", NAME_EMPTY);
|
||||||
|
}
|
||||||
|
// ¿Existe el usuario?
|
||||||
|
if(!$database->checkExist($post['a_name'], 0)) {
|
||||||
|
$form->addError("name2", NAME_NO_EXIST);
|
||||||
|
}
|
||||||
|
// ¿La invitacion es a si mismo?
|
||||||
|
if($post['a_name'] == ($session->username)) {
|
||||||
|
$form->addError("name3", SAME_NAME);
|
||||||
|
}
|
||||||
|
// ¿Esta ya invitado a la alianza?
|
||||||
|
$UserData = $database->getUserArray($post['a_name'], 0);
|
||||||
|
if($database->getInvitation($UserData['id'])) {
|
||||||
|
$form->addError("name4", OLRADY_INVITED);
|
||||||
|
}
|
||||||
|
// ¿Esta ya en la alianza?
|
||||||
|
$UserData = $database->getUserArray($post['a_name'], 0);
|
||||||
|
if($UserData['alliance'] == $session->alliance) {
|
||||||
|
$form->addError("name5", OLRADY_IN_ALLY);
|
||||||
|
}
|
||||||
|
// ¿La invitación la envia un autorizado?
|
||||||
|
if($this->userPermArray['opt4'] == 0) {
|
||||||
|
$form->addError("perm", NO_PERMISSION);
|
||||||
|
}
|
||||||
|
if($form->returnErrors() != 0) {
|
||||||
|
$_SESSION['errorarray'] = $form->getErrors();
|
||||||
|
$_SESSION['valuearray'] = $post;
|
||||||
|
print_r($form->getErrors());
|
||||||
|
} else {
|
||||||
|
// Obtenemos la informacion necesaria
|
||||||
|
$aid = $session->alliance;
|
||||||
|
// Insertamos invitacion
|
||||||
|
$database->sendInvitation($UserData['id'], $aid, $session->uid);
|
||||||
|
// Log the notice
|
||||||
|
$database->insertAlliNotice($session->alliance, '<a href="spieler.php?uid=' . $session->uid . '">' . $session->username . '</a> has invited <a href="spieler.php?uid=' . $UserData['id'] . '">' . $UserData['username'] . '</a> into the alliance.');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*****************************************
|
||||||
|
Function to reject an invitation
|
||||||
|
*****************************************/
|
||||||
|
private function rejectInvite($get) {
|
||||||
|
global $database, $session;
|
||||||
|
foreach($this->inviteArray as $invite) {
|
||||||
|
if($invite['id'] == $get['d']) {
|
||||||
|
$database->removeInvitation($get['d']);
|
||||||
|
$database->insertAlliNotice($invite['alliance'], '<a href="spieler.php?uid=' . $session->uid . '">' . $session->username . '</a> has rejected the invitation.');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
header("Location: build.php?id=".$get['id']);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*****************************************
|
||||||
|
Function to del an invitation
|
||||||
|
*****************************************/
|
||||||
|
private function delInvite($get) {
|
||||||
|
global $database, $session;
|
||||||
|
$inviteArray = $database->getAliInvitations($session->alliance);
|
||||||
|
foreach($inviteArray as $invite) {
|
||||||
|
if($invite['id'] == $get['d']) {
|
||||||
|
$invitename = $database->getUserArray($invite['uid'], 1);
|
||||||
|
$database->removeInvitation($get['d']);
|
||||||
|
$database->insertAlliNotice($session->alliance, '<a href="spieler.php?uid=' . $session->uid . '">' . $session->username . '</a> has deleted the invitation for <a href="spieler.php?uid=' . $invitename['id'] . '">' . $invitename['username'] . '</a>.');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*****************************************
|
||||||
|
Function to accept an invitation
|
||||||
|
*****************************************/
|
||||||
|
private function acceptInvite($get) {
|
||||||
|
global $database, $session;
|
||||||
|
foreach($this->inviteArray as $invite) {
|
||||||
|
if($invite['id'] == $get['d']) {
|
||||||
|
$database->removeInvitation($database->RemoveXSS($get['d']));
|
||||||
|
$database->updateUserField($database->RemoveXSS($invite['uid']), "alliance", $database->RemoveXSS($invite['alliance']), 1);
|
||||||
|
$database->createAlliPermissions($database->RemoveXSS($invite['uid']), $database->RemoveXSS($invite['alliance']), '', '0', '0', '0', '0', '0', '0', '0', '0');
|
||||||
|
// Log the notice
|
||||||
|
$database->insertAlliNotice($invite['alliance'], '<a href="spieler.php?uid=' . $session->uid . '">' . $session->username . '</a> has joined the alliance.');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
header("Location: build.php?id=" . $get['id']);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*****************************************
|
||||||
|
Function to create an alliance
|
||||||
|
*****************************************/
|
||||||
|
private function createAlliance($post) {
|
||||||
|
global $form, $database, $session, $bid18, $village;
|
||||||
|
if(!isset($post['ally1']) || $post['ally1'] == "") {
|
||||||
|
$form->addError("ally1", ATAG_EMPTY);
|
||||||
|
}
|
||||||
|
if(!isset($post['ally2']) || $post['ally2'] == "") {
|
||||||
|
$form->addError("ally2", ANAME_EMPTY);
|
||||||
|
}
|
||||||
|
if($database->aExist($post['ally1'], "tag")) {
|
||||||
|
$form->addError("ally1", ATAG_EXIST);
|
||||||
|
}
|
||||||
|
if($database->aExist($post['ally2'], "name")) {
|
||||||
|
$form->addError("ally2", ANAME_EXIST);
|
||||||
|
}
|
||||||
|
if($form->returnErrors() != 0) {
|
||||||
|
$_SESSION['errorarray'] = $form->getErrors();
|
||||||
|
$_SESSION['valuearray'] = $post;
|
||||||
|
|
||||||
|
header("Location: build.php?id=" . $post['id']);
|
||||||
|
} else {
|
||||||
|
$max = $bid18[$village->resarray['f' . $post['id']]]['attri'];
|
||||||
|
$aid = $database->createAlliance($database->RemoveXSS($post['ally1']), $database->RemoveXSS($post['ally2']), $session->uid, $max);
|
||||||
|
$database->updateUserField($database->RemoveXSS($session->uid), "alliance", $database->RemoveXSS($aid), 1);
|
||||||
|
// Asign Permissions
|
||||||
|
$database->createAlliPermissions($database->RemoveXSS($session->uid), $database->RemoveXSS($aid), 'Alliance founder', '1', '1', '1', '1', '1', '1', '1', '1');
|
||||||
|
// log the notice
|
||||||
|
$database->insertAlliNotice($aid, 'The alliance has been founded by <a href="spieler.php?uid=' . $session->uid . '">' . $session->username . '</a>.');
|
||||||
|
header("Location: build.php?id=" . $post['id']);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*****************************************
|
||||||
|
Function to change the alliance name
|
||||||
|
*****************************************/
|
||||||
|
private function changeAliName($get) {
|
||||||
|
global $form, $database, $session;
|
||||||
|
|
||||||
|
if(!isset($get['ally1']) || $get['ally1'] == "") {
|
||||||
|
$form->addError("ally1", ATAG_EMPTY);
|
||||||
|
}
|
||||||
|
if(!isset($get['ally2']) || $get['ally2'] == "") {
|
||||||
|
$form->addError("ally2", ANAME_EMPTY);
|
||||||
|
}
|
||||||
|
if($database->aExist($get['ally1'], "tag")) {
|
||||||
|
$form->addError("tag", ATAG_EXIST);
|
||||||
|
}
|
||||||
|
if($database->aExist($get['ally2'], "name")) {
|
||||||
|
$form->addError("name", ANAME_EXIST);
|
||||||
|
}
|
||||||
|
if($this->userPermArray['opt3'] == 0) {
|
||||||
|
$form->addError("perm", NO_PERMISSION);
|
||||||
|
}
|
||||||
|
if($form->returnErrors() != 0) {
|
||||||
|
$_SESSION['errorarray'] = $form->getErrors();
|
||||||
|
$_SESSION['valuearray'] = $post;
|
||||||
|
//header("Location: build.php?id=".$post['id']);
|
||||||
|
} else {
|
||||||
|
$database->setAlliName($database->RemoveXSS($session->alliance), $database->RemoveXSS($get['ally2']), $database->RemoveXSS($get['ally1']));
|
||||||
|
// log the notice
|
||||||
|
$database->insertAlliNotice($session->alliance, '<a href="spieler.php?uid=' . $session->uid . '">' . $session->username . '</a> has changed the alliance name.');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*****************************************
|
||||||
|
Function to create/change the alliance description
|
||||||
|
*****************************************/
|
||||||
|
private function updateAlliProfile($post) {
|
||||||
|
global $database, $session, $form;
|
||||||
|
if($this->userPermArray['opt3'] == 0) {
|
||||||
|
$form->addError("perm", NO_PERMISSION);
|
||||||
|
}
|
||||||
|
if($form->returnErrors() != 0) {
|
||||||
|
$_SESSION['errorarray'] = $form->getErrors();
|
||||||
|
$_SESSION['valuearray'] = $post;
|
||||||
|
//header("Location: build.php?id=".$post['id']);
|
||||||
|
} else {
|
||||||
|
$database->submitAlliProfile($database->RemoveXSS($session->alliance), $database->RemoveXSS($post['be2']), $database->RemoveXSS($post['be1']));
|
||||||
|
// log the notice
|
||||||
|
$database->insertAlliNotice($session->alliance, '<a href="spieler.php?uid=' . $session->uid . '">' . $session->username . '</a> has changed the alliance description.');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*****************************************
|
||||||
|
Function to change the user permissions
|
||||||
|
*****************************************/
|
||||||
|
private function changeUserPermissions($post) {
|
||||||
|
global $database, $session, $form;
|
||||||
|
if($this->userPermArray['opt1'] == 0) {
|
||||||
|
$form->addError("perm", NO_PERMISSION);
|
||||||
|
}
|
||||||
|
if($form->returnErrors() != 0) {
|
||||||
|
$_SESSION['errorarray'] = $form->getErrors();
|
||||||
|
$_SESSION['valuearray'] = $post;
|
||||||
|
//header("Location: build.php?id=".$post['id']);
|
||||||
|
} else {
|
||||||
|
$database->updateAlliPermissions($post['a_user'], $session->alliance, $post['a_titel'], $post['e1'], $post['e2'], $post['e3'], $post['e4'], $post['e5'], $post['e6'], $post['e7']);
|
||||||
|
// log the notice
|
||||||
|
$database->insertAlliNotice($session->alliance, '<a href="spieler.php?uid=' . $session->uid . '">' . $session->username . '</a> has changed permissions.');
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
/*****************************************
|
||||||
|
Function to kick a user from alliance
|
||||||
|
*****************************************/
|
||||||
|
private function kickAlliUser($post) {
|
||||||
|
global $database, $session, $form;
|
||||||
|
|
||||||
|
if($this->userPermArray['opt2'] == 0) {
|
||||||
|
$form->addError("perm", NO_PERMISSION);
|
||||||
|
}
|
||||||
|
if($form->returnErrors() != 0) {
|
||||||
|
$_SESSION['errorarray'] = $form->getErrors();
|
||||||
|
$_SESSION['valuearray'] = $post;
|
||||||
|
//header("Location: build.php?id=".$post['id']);
|
||||||
|
} else {
|
||||||
|
$database->updateUserField($post['a_user'], 'alliance', 0, 1);
|
||||||
|
$database->deleteAlliPermissions($post['a_user']);
|
||||||
|
$database->deleteAlliance($session->alliance);
|
||||||
|
// log the notice
|
||||||
|
$database->insertAlliNotice($session->alliance, '<a href="spieler.php?uid=' . $session->uid . '">' . $session->username . '</a> kicked <a href="spieler.php?uid=' . $post['a_user'] . '">' . $UserData['username'] . '</a>.');
|
||||||
|
//header("Location: build.php?id=".$post['id']);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/*****************************************
|
||||||
|
Function to set forum link
|
||||||
|
*****************************************/
|
||||||
|
public function setForumLink($post) {
|
||||||
|
global $database, $session;
|
||||||
|
if(isset($post['f_link'])){
|
||||||
|
$database->setAlliForumLink($session->alliance, $post['f_link']);
|
||||||
header("Location: allianz.php?s=5");
|
header("Location: allianz.php?s=5");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/*****************************************
|
/*****************************************
|
||||||
Function to quit from alliance
|
Function to quit from alliance
|
||||||
*****************************************/
|
*****************************************/
|
||||||
private function quitally($post) {
|
private function quitally($post) {
|
||||||
global $database, $session, $form;
|
global $database, $session, $form;
|
||||||
if(!isset($post['pw']) || $post['pw'] == "") {
|
if(!isset($post['pw']) || $post['pw'] == "") {
|
||||||
$form->addError("pw1", PW_EMPTY);
|
$form->addError("pw1", PW_EMPTY);
|
||||||
} elseif(md5($post['pw']) !== $session->userinfo['password']) {
|
} elseif(md5($post['pw']) !== $session->userinfo['password']) {
|
||||||
$form->addError("pw2", PW_ERR);
|
$form->addError("pw2", PW_ERR);
|
||||||
} else {
|
} else {
|
||||||
$database->updateUserField($session->uid, 'alliance', 0, 1);
|
$database->updateUserField($session->uid, 'alliance', 0, 1);
|
||||||
$database->deleteAlliPermissions($session->uid);
|
$database->deleteAlliPermissions($session->uid);
|
||||||
// log the notice
|
// log the notice
|
||||||
$database->deleteAlliance($session->alliance);
|
$database->deleteAlliance($session->alliance);
|
||||||
$database->insertAlliNotice($session->alliance, '<a href="spieler.php?uid=' . $session->uid . '">' . $session->username . '</a> has quit the alliance.');
|
$database->insertAlliNotice($session->alliance, '<a href="spieler.php?uid=' . $session->uid . '">' . $session->username . '</a> has quit the alliance.');
|
||||||
header("Location: spieler.php?uid=".$session->uid);
|
header("Location: spieler.php?uid=".$session->uid);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private function changediplomacy($post) {
|
private function changediplomacy($post) {
|
||||||
global $database, $session, $form;
|
global $database, $session, $form;
|
||||||
|
|
||||||
$aName = $database->RemoveXSS($_POST['a_name']);
|
$aName = $database->RemoveXSS($_POST['a_name']);
|
||||||
$aType = (int)intval($_POST['dipl']);
|
$aType = (int)intval($_POST['dipl']);
|
||||||
if($database->aExist($aName, "tag")) {
|
if($database->aExist($aName, "tag")) {
|
||||||
if($database->getAllianceID($aName) != $session->alliance) {
|
if($database->getAllianceID($aName) != $session->alliance) {
|
||||||
if($aType >= 1 and $aType <= 3) {
|
if($aType >= 1 and $aType <= 3) {
|
||||||
if(!$database->diplomacyInviteCheck($database->getAllianceID($aName), $session->alliance)) {
|
if(!$database->diplomacyInviteCheck($database->getAllianceID($aName), $session->alliance)) {
|
||||||
$database->diplomacyInviteAdd($session->alliance, $database->getAllianceID($aName), $aType);
|
$database->diplomacyInviteAdd($session->alliance, $database->getAllianceID($aName), $aType);
|
||||||
if($aType == 1){
|
if($aType == 1){
|
||||||
$notice = "offer a confederation to";
|
$notice = "offer a confederation to";
|
||||||
}else if($aType == 2){
|
}else if($aType == 2){
|
||||||
@@ -366,23 +366,23 @@
|
|||||||
$notice = "declare war on";
|
$notice = "declare war on";
|
||||||
}
|
}
|
||||||
$database->insertAlliNotice($session->alliance, '<a href="allianz.php?aid=' . $session->alliance . '">' . $database->getAllianceName($session->alliance) . '</a> '. $notice .' <a href="allianz.php?aid=' . $database->getAllianceID($aName) . '">' . $aName . '</a>.');
|
$database->insertAlliNotice($session->alliance, '<a href="allianz.php?aid=' . $session->alliance . '">' . $database->getAllianceName($session->alliance) . '</a> '. $notice .' <a href="allianz.php?aid=' . $database->getAllianceID($aName) . '">' . $aName . '</a>.');
|
||||||
$form->addError("name", "Invite sended");
|
$form->addError("name", "Invite sended");
|
||||||
} else {
|
} else {
|
||||||
$form->addError("name", "You have already sended them a invite");
|
$form->addError("name", "You have already sended them a invite");
|
||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
$form->addError("name", "wrong choice made");
|
$form->addError("name", "wrong choice made");
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$form->addError("name", "You can not invite your own alliance");
|
$form->addError("name", "You can not invite your own alliance");
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$form->addError("name", "Alliance does not exist");
|
$form->addError("name", "Alliance does not exist");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$alliance = new Alliance;
|
$alliance = new Alliance;
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|||||||
+2892
-2892
File diff suppressed because it is too large
Load Diff
+857
-857
File diff suppressed because it is too large
Load Diff
+42
-42
@@ -11,7 +11,7 @@
|
|||||||
#################################################################################
|
#################################################################################
|
||||||
|
|
||||||
|
|
||||||
class Building {
|
class Building {
|
||||||
|
|
||||||
public $NewBuilding = false;
|
public $NewBuilding = false;
|
||||||
private $maxConcurrent;
|
private $maxConcurrent;
|
||||||
@@ -29,10 +29,10 @@ class Building {
|
|||||||
$this->maxConcurrent += PLUS_MAX;
|
$this->maxConcurrent += PLUS_MAX;
|
||||||
}
|
}
|
||||||
$this->LoadBuilding();
|
$this->LoadBuilding();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function procBuild($get) {
|
public function procBuild($get) {
|
||||||
global $session;
|
global $session;
|
||||||
if(isset($get['a']) && $get['c'] == $session->checker && !isset($get['id'])) {
|
if(isset($get['a']) && $get['c'] == $session->checker && !isset($get['id'])) {
|
||||||
if($get['a'] == 0) {
|
if($get['a'] == 0) {
|
||||||
@@ -53,7 +53,7 @@ class Building {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public function canBuild($id,$tid) {
|
public function canBuild($id,$tid) {
|
||||||
global $village,$session,$database;
|
global $village,$session,$database;
|
||||||
$demolition = $database->getDemolition($village->wid);
|
$demolition = $database->getDemolition($village->wid);
|
||||||
@@ -112,7 +112,7 @@ class Building {
|
|||||||
return 3;
|
return 3;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
return 2;
|
return 2;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -169,7 +169,7 @@ class Building {
|
|||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function rallying() {
|
public function rallying() {
|
||||||
foreach($this->buildArray as $job) {
|
foreach($this->buildArray as $job) {
|
||||||
if($job['type'] == 16) {
|
if($job['type'] == 16) {
|
||||||
@@ -178,7 +178,7 @@ class Building {
|
|||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function procResType($ref) {
|
public function procResType($ref) {
|
||||||
global $session;
|
global $session;
|
||||||
switch($ref) {
|
switch($ref) {
|
||||||
@@ -228,7 +228,7 @@ class Building {
|
|||||||
}
|
}
|
||||||
return $build;
|
return $build;
|
||||||
}
|
}
|
||||||
|
|
||||||
private function loadBuilding() {
|
private function loadBuilding() {
|
||||||
global $database,$village,$session;
|
global $database,$village,$session;
|
||||||
$this->buildArray = $database->getJobs($village->wid);
|
$this->buildArray = $database->getJobs($village->wid);
|
||||||
@@ -255,7 +255,7 @@ class Building {
|
|||||||
$this->NewBuilding = true;
|
$this->NewBuilding = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private function removeBuilding($d) {
|
private function removeBuilding($d) {
|
||||||
global $database,$village;
|
global $database,$village;
|
||||||
foreach($this->buildArray as $jobs) {
|
foreach($this->buildArray as $jobs) {
|
||||||
@@ -275,7 +275,7 @@ class Building {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private function upgradeBuilding($id) {
|
private function upgradeBuilding($id) {
|
||||||
global $database,$village,$session,$logging;
|
global $database,$village,$session,$logging;
|
||||||
if($this->allocated < $this->maxConcurrent) {
|
if($this->allocated < $this->maxConcurrent) {
|
||||||
@@ -324,7 +324,7 @@ class Building {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private function downgradeBuilding($id) {
|
private function downgradeBuilding($id) {
|
||||||
global $database,$village,$session,$logging;
|
global $database,$village,$session,$logging;
|
||||||
if($this->allocated < $this->maxConcurrent) {
|
if($this->allocated < $this->maxConcurrent) {
|
||||||
@@ -346,7 +346,7 @@ class Building {
|
|||||||
$time = $build['timestamp'] + round($dataarray[$village->resarray['f'.$id]-1]['time'] / 4);
|
$time = $build['timestamp'] + round($dataarray[$village->resarray['f'.$id]-1]['time'] / 4);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$time = $this->buildArray[0]['timestamp'] + round($dataarray[$village->resarray['f'.$id]-1]['time'] / 4);
|
$time = $this->buildArray[0]['timestamp'] + round($dataarray[$village->resarray['f'.$id]-1]['time'] / 4);
|
||||||
@@ -357,11 +357,11 @@ class Building {
|
|||||||
$logging->addBuildLog($village->wid,$this->procResType($village->resarray['f'.$id.'t']),($village->resarray['f'.$id]-1),2);
|
$logging->addBuildLog($village->wid,$this->procResType($village->resarray['f'.$id.'t']),($village->resarray['f'.$id]-1),2);
|
||||||
header("Location: dorf2.php");
|
header("Location: dorf2.php");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
private function constructBuilding($id,$tid) {
|
private function constructBuilding($id,$tid) {
|
||||||
global $database,$village,$session,$logging;
|
global $database,$village,$session,$logging;
|
||||||
if($this->allocated < $this->maxConcurrent) {
|
if($this->allocated < $this->maxConcurrent) {
|
||||||
@@ -392,7 +392,7 @@ class Building {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private function meetRequirement($id) {
|
private function meetRequirement($id) {
|
||||||
global $village,$session,$database;
|
global $village,$session,$database;
|
||||||
switch($id) {
|
switch($id) {
|
||||||
@@ -486,12 +486,12 @@ class Building {
|
|||||||
case 37:
|
case 37:
|
||||||
if($this->getTypeLevel(15) >= 3 && $this->getTypeLevel(16) >= 1) { return true; } else { return false; }
|
if($this->getTypeLevel(15) >= 3 && $this->getTypeLevel(16) >= 1) { return true; } else { return false; }
|
||||||
break;
|
break;
|
||||||
case 38:
|
case 38:
|
||||||
if($this->getTypeLevel(15) >= 10 && $village->capital == 0) { return true; } else { return false; }
|
if($this->getTypeLevel(15) >= 10 && $village->capital == 0) { return true; } else { return false; }
|
||||||
break;
|
break;
|
||||||
case 39:
|
case 39:
|
||||||
if($this->getTypeLevel(15) >= 10 && $village->capital == 0) { return true; } else { return false; }
|
if($this->getTypeLevel(15) >= 10 && $village->capital == 0) { return true; } else { return false; }
|
||||||
break;
|
break;
|
||||||
case 40:
|
case 40:
|
||||||
$wwlevel = $village->resarray['f'.$id];
|
$wwlevel = $village->resarray['f'.$id];
|
||||||
if($wwlevel > 50){
|
if($wwlevel > 50){
|
||||||
@@ -506,7 +506,7 @@ class Building {
|
|||||||
$wwbuildingplan += 1;
|
$wwbuildingplan += 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if($village->natar == 1 && $wwbuildingplan > $needed_plan) { return true; } else { return false; }
|
if($village->natar == 1 && $wwbuildingplan > $needed_plan) { return true; } else { return false; }
|
||||||
break;
|
break;
|
||||||
case 41:
|
case 41:
|
||||||
if($this->getTypeLevel(16) >= 10 && $this->getTypeLevel(20) == 20) { return true; } else { return false; }
|
if($this->getTypeLevel(16) >= 10 && $this->getTypeLevel(20) == 20) { return true; } else { return false; }
|
||||||
@@ -516,7 +516,7 @@ class Building {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private function checkResource($tid,$id) {
|
private function checkResource($tid,$id) {
|
||||||
$name = "bid".$tid;
|
$name = "bid".$tid;
|
||||||
global $village,$$name,$database;
|
global $village,$$name,$database;
|
||||||
@@ -553,7 +553,7 @@ class Building {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public function isMax($id,$field,$loop=0) {
|
public function isMax($id,$field,$loop=0) {
|
||||||
$name = "bid".$id;
|
$name = "bid".$id;
|
||||||
global $$name,$village;
|
global $$name,$village;
|
||||||
@@ -570,7 +570,7 @@ class Building {
|
|||||||
return ($village->resarray['f'.$field] == count($dataarray) - $loop);
|
return ($village->resarray['f'.$field] == count($dataarray) - $loop);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getTypeLevel($tid,$vid=0) {
|
public function getTypeLevel($tid,$vid=0) {
|
||||||
global $village,$database;
|
global $village,$database;
|
||||||
$keyholder = array();
|
$keyholder = array();
|
||||||
@@ -583,7 +583,7 @@ class Building {
|
|||||||
if(strpos($key,'t')) {
|
if(strpos($key,'t')) {
|
||||||
$key = preg_replace("/[^0-9]/", '', $key);
|
$key = preg_replace("/[^0-9]/", '', $key);
|
||||||
array_push($keyholder, $key);
|
array_push($keyholder, $key);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$element = count($keyholder);
|
$element = count($keyholder);
|
||||||
if($element >= 2) {
|
if($element >= 2) {
|
||||||
@@ -593,8 +593,8 @@ class Building {
|
|||||||
array_push($temparray,$resourcearray['f'.$keyholder[$i]]);
|
array_push($temparray,$resourcearray['f'.$keyholder[$i]]);
|
||||||
}
|
}
|
||||||
foreach ($temparray as $key => $val) {
|
foreach ($temparray as $key => $val) {
|
||||||
if ($val == max($temparray))
|
if ($val == max($temparray))
|
||||||
$target = $key;
|
$target = $key;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
@@ -619,8 +619,8 @@ class Building {
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public function isCurrent($id) {
|
public function isCurrent($id) {
|
||||||
foreach($this->buildArray as $build) {
|
foreach($this->buildArray as $build) {
|
||||||
if($build['field'] == $id && $build['loopcon'] <> 1) {
|
if($build['field'] == $id && $build['loopcon'] <> 1) {
|
||||||
@@ -628,7 +628,7 @@ class Building {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public function isLoop($id=0) {
|
public function isLoop($id=0) {
|
||||||
foreach($this->buildArray as $build) {
|
foreach($this->buildArray as $build) {
|
||||||
if(($build['field'] == $id && $build['loopcon']) || ($build['loopcon'] == 1 && $id == 0)) {
|
if(($build['field'] == $id && $build['loopcon']) || ($build['loopcon'] == 1 && $id == 0)) {
|
||||||
@@ -637,10 +637,10 @@ class Building {
|
|||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function finishAll() {
|
public function finishAll() {
|
||||||
global $database,$session,$logging,$village,$bid18,$bid10,$bid11,$technology,$_SESSION;
|
global $database,$session,$logging,$village,$bid18,$bid10,$bid11,$technology,$_SESSION;
|
||||||
if($session->access!=BANNED){
|
if($session->access!=BANNED){
|
||||||
foreach($this->buildArray as $jobs) {
|
foreach($this->buildArray as $jobs) {
|
||||||
if($jobs['wid']==$village->wid){
|
if($jobs['wid']==$village->wid){
|
||||||
$wwvillage = $database->getResourceLevel($jobs['wid']);
|
$wwvillage = $database->getResourceLevel($jobs['wid']);
|
||||||
@@ -651,7 +651,7 @@ class Building {
|
|||||||
$resource = $this->resourceRequired($jobs['field'],$jobs['type']);
|
$resource = $this->resourceRequired($jobs['field'],$jobs['type']);
|
||||||
if($jobs['master'] == 0){
|
if($jobs['master'] == 0){
|
||||||
$q = "UPDATE ".TB_PREFIX."fdata set f".$jobs['field']." = ".$jobs['level'].", f".$jobs['field']."t = ".$jobs['type']." where vref = ".$jobs['wid'];
|
$q = "UPDATE ".TB_PREFIX."fdata set f".$jobs['field']." = ".$jobs['level'].", f".$jobs['field']."t = ".$jobs['type']." where vref = ".$jobs['wid'];
|
||||||
}else{
|
}else{
|
||||||
$villwood = $database->getVillageField($jobs['wid'],'wood');
|
$villwood = $database->getVillageField($jobs['wid'],'wood');
|
||||||
$villclay = $database->getVillageField($jobs['wid'],'clay');
|
$villclay = $database->getVillageField($jobs['wid'],'clay');
|
||||||
$villiron = $database->getVillageField($jobs['wid'],'iron');
|
$villiron = $database->getVillageField($jobs['wid'],'iron');
|
||||||
@@ -676,7 +676,7 @@ class Building {
|
|||||||
$max = $bid18[$level]['attri'];
|
$max = $bid18[$level]['attri'];
|
||||||
$q = "UPDATE ".TB_PREFIX."alidata set max = $max where leader = $owner";
|
$q = "UPDATE ".TB_PREFIX."alidata set max = $max where leader = $owner";
|
||||||
$database->query($q);
|
$database->query($q);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(($jobs['field'] >= 19 && ($session->tribe == 1 || ALLOW_ALL_TRIBE)) || (!ALLOW_ALL_TRIBE && $session->tribe != 1)) { $innertimestamp = $jobs['timestamp']; }
|
if(($jobs['field'] >= 19 && ($session->tribe == 1 || ALLOW_ALL_TRIBE)) || (!ALLOW_ALL_TRIBE && $session->tribe != 1)) { $innertimestamp = $jobs['timestamp']; }
|
||||||
}
|
}
|
||||||
@@ -699,7 +699,7 @@ class Building {
|
|||||||
header("Location: banned.php");
|
header("Location: banned.php");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public function resourceRequired($id,$tid,$plus=1) {
|
public function resourceRequired($id,$tid,$plus=1) {
|
||||||
$name = "bid".$tid;
|
$name = "bid".$tid;
|
||||||
global $$name,$village,$bid15;
|
global $$name,$village,$bid15;
|
||||||
@@ -728,7 +728,7 @@ class Building {
|
|||||||
$cp = $dataarray[$village->resarray['f'.$id]+$plus]['cp'];
|
$cp = $dataarray[$village->resarray['f'.$id]+$plus]['cp'];
|
||||||
return array("wood"=>$wood,"clay"=>$clay,"iron"=>$iron,"crop"=>$crop,"pop"=>$pop,"time"=>$time,"cp"=>$cp);
|
return array("wood"=>$wood,"clay"=>$clay,"iron"=>$iron,"crop"=>$crop,"pop"=>$pop,"time"=>$time,"cp"=>$cp);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getTypeField($type) {
|
public function getTypeField($type) {
|
||||||
global $village;
|
global $village;
|
||||||
for($i=19;$i<=40;$i++) {
|
for($i=19;$i<=40;$i++) {
|
||||||
@@ -737,7 +737,7 @@ class Building {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public function calculateAvaliable($id,$tid,$plus=1) {
|
public function calculateAvaliable($id,$tid,$plus=1) {
|
||||||
global $village,$generator;
|
global $village,$generator;
|
||||||
$uprequire = $this->resourceRequired($id,$tid,$plus);
|
$uprequire = $this->resourceRequired($id,$tid,$plus);
|
||||||
@@ -755,4 +755,4 @@ class Building {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
?>
|
?>
|
||||||
+71
-71
@@ -1,4 +1,4 @@
|
|||||||
<?php
|
<?php
|
||||||
#################################################################################
|
#################################################################################
|
||||||
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
||||||
## --------------------------------------------------------------------------- ##
|
## --------------------------------------------------------------------------- ##
|
||||||
@@ -11,13 +11,13 @@
|
|||||||
|
|
||||||
if (!isset($SAJAX_INCLUDED)) {
|
if (!isset($SAJAX_INCLUDED)) {
|
||||||
|
|
||||||
$GLOBALS['sajax_version'] = '0.12';
|
$GLOBALS['sajax_version'] = '0.12';
|
||||||
$GLOBALS['sajax_debug_mode'] = 0;
|
$GLOBALS['sajax_debug_mode'] = 0;
|
||||||
$GLOBALS['sajax_export_list'] = array();
|
$GLOBALS['sajax_export_list'] = array();
|
||||||
$GLOBALS['sajax_request_type'] = 'GET';
|
$GLOBALS['sajax_request_type'] = 'GET';
|
||||||
$GLOBALS['sajax_remote_uri'] = '';
|
$GLOBALS['sajax_remote_uri'] = '';
|
||||||
$GLOBALS['sajax_failure_redirect'] = '';
|
$GLOBALS['sajax_failure_redirect'] = '';
|
||||||
|
|
||||||
|
|
||||||
function sajax_init() {
|
function sajax_init() {
|
||||||
}
|
}
|
||||||
@@ -26,29 +26,29 @@ if (!isset($SAJAX_INCLUDED)) {
|
|||||||
return $_SERVER["REQUEST_URI"];
|
return $_SERVER["REQUEST_URI"];
|
||||||
}
|
}
|
||||||
$sajax_remote_uri = sajax_get_my_uri();
|
$sajax_remote_uri = sajax_get_my_uri();
|
||||||
|
|
||||||
|
|
||||||
function sajax_get_js_repr($value) {
|
function sajax_get_js_repr($value) {
|
||||||
$type = gettype($value);
|
$type = gettype($value);
|
||||||
|
|
||||||
if ($type == "boolean") {
|
if ($type == "boolean") {
|
||||||
return ($value) ? "Boolean(true)" : "Boolean(false)";
|
return ($value) ? "Boolean(true)" : "Boolean(false)";
|
||||||
}
|
}
|
||||||
elseif ($type == "integer") {
|
elseif ($type == "integer") {
|
||||||
return "parseInt($value)";
|
return "parseInt($value)";
|
||||||
}
|
}
|
||||||
elseif ($type == "double") {
|
elseif ($type == "double") {
|
||||||
return "parseFloat($value)";
|
return "parseFloat($value)";
|
||||||
}
|
}
|
||||||
elseif ($type == "array" || $type == "object" ) {
|
elseif ($type == "array" || $type == "object" ) {
|
||||||
|
|
||||||
$s = "{ ";
|
$s = "{ ";
|
||||||
if ($type == "object") {
|
if ($type == "object") {
|
||||||
$value = get_object_vars($value);
|
$value = get_object_vars($value);
|
||||||
}
|
}
|
||||||
foreach ($value as $k=>$v) {
|
foreach ($value as $k=>$v) {
|
||||||
$esc_key = sajax_esc($k);
|
$esc_key = sajax_esc($k);
|
||||||
if (is_numeric($k))
|
if (is_numeric($k))
|
||||||
$s .= "$k: " . sajax_get_js_repr($v) . ", ";
|
$s .= "$k: " . sajax_get_js_repr($v) . ", ";
|
||||||
else
|
else
|
||||||
$s .= "\"$esc_key\": " . sajax_get_js_repr($v) . ", ";
|
$s .= "\"$esc_key\": " . sajax_get_js_repr($v) . ", ";
|
||||||
@@ -56,7 +56,7 @@ if (!isset($SAJAX_INCLUDED)) {
|
|||||||
if (count($value))
|
if (count($value))
|
||||||
$s = substr($s, 0, -2);
|
$s = substr($s, 0, -2);
|
||||||
return $s . " }";
|
return $s . " }";
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$esc_val = sajax_esc($value);
|
$esc_val = sajax_esc($value);
|
||||||
$s = "'$esc_val'";
|
$s = "'$esc_val'";
|
||||||
@@ -66,36 +66,36 @@ if (!isset($SAJAX_INCLUDED)) {
|
|||||||
|
|
||||||
function sajax_handle_client_request() {
|
function sajax_handle_client_request() {
|
||||||
global $sajax_export_list;
|
global $sajax_export_list;
|
||||||
|
|
||||||
$mode = "";
|
$mode = "";
|
||||||
|
|
||||||
if (! empty($_GET["rs"]))
|
if (! empty($_GET["rs"]))
|
||||||
$mode = "get";
|
$mode = "get";
|
||||||
|
|
||||||
if (!empty($_POST["rs"]))
|
if (!empty($_POST["rs"]))
|
||||||
$mode = "post";
|
$mode = "post";
|
||||||
|
|
||||||
if (empty($mode))
|
if (empty($mode))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
$target = "";
|
$target = "";
|
||||||
|
|
||||||
if ($mode == "get") {
|
if ($mode == "get") {
|
||||||
|
|
||||||
header ("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
|
header ("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
|
||||||
header ("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
|
header ("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
|
||||||
|
|
||||||
header ("Cache-Control: no-cache, must-revalidate");
|
header ("Cache-Control: no-cache, must-revalidate");
|
||||||
header ("Pragma: no-cache");
|
header ("Pragma: no-cache");
|
||||||
$func_name = $_GET["rs"];
|
$func_name = $_GET["rs"];
|
||||||
if (! empty($_GET["rsargs"]))
|
if (! empty($_GET["rsargs"]))
|
||||||
$args = $_GET["rsargs"];
|
$args = $_GET["rsargs"];
|
||||||
else
|
else
|
||||||
$args = array();
|
$args = array();
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$func_name = $_POST["rs"];
|
$func_name = $_POST["rs"];
|
||||||
if (! empty($_POST["rsargs"]))
|
if (! empty($_POST["rsargs"]))
|
||||||
$args = $_POST["rsargs"];
|
$args = $_POST["rsargs"];
|
||||||
else
|
else
|
||||||
$args = array();
|
$args = array();
|
||||||
@@ -110,20 +110,20 @@ if (!isset($SAJAX_INCLUDED)) {
|
|||||||
}
|
}
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
function sajax_get_common_js() {
|
function sajax_get_common_js() {
|
||||||
global $sajax_debug_mode;
|
global $sajax_debug_mode;
|
||||||
global $sajax_request_type;
|
global $sajax_request_type;
|
||||||
global $sajax_remote_uri;
|
global $sajax_remote_uri;
|
||||||
global $sajax_failure_redirect;
|
global $sajax_failure_redirect;
|
||||||
|
|
||||||
$t = strtoupper($sajax_request_type);
|
$t = strtoupper($sajax_request_type);
|
||||||
if ($t != "" && $t != "GET" && $t != "POST")
|
if ($t != "" && $t != "GET" && $t != "POST")
|
||||||
return "// Invalid type: $t.. \n\n";
|
return "// Invalid type: $t.. \n\n";
|
||||||
|
|
||||||
ob_start();
|
ob_start();
|
||||||
?>
|
?>
|
||||||
|
|
||||||
// remote scripting library
|
// remote scripting library
|
||||||
// (c) copyright 2005 modernmethod, inc
|
// (c) copyright 2005 modernmethod, inc
|
||||||
// edited by ttmtt
|
// edited by ttmtt
|
||||||
@@ -131,18 +131,18 @@ if (!isset($SAJAX_INCLUDED)) {
|
|||||||
var sajax_request_type = "<?php echo $t; ?>";
|
var sajax_request_type = "<?php echo $t; ?>";
|
||||||
var sajax_target_id = "";
|
var sajax_target_id = "";
|
||||||
var sajax_failure_redirect = "<?php echo $sajax_failure_redirect; ?>";
|
var sajax_failure_redirect = "<?php echo $sajax_failure_redirect; ?>";
|
||||||
|
|
||||||
function sajax_debug(text) {
|
function sajax_debug(text) {
|
||||||
if (sajax_debug_mode)
|
if (sajax_debug_mode)
|
||||||
alert(text);
|
alert(text);
|
||||||
}
|
}
|
||||||
|
|
||||||
function sajax_init_object() {
|
function sajax_init_object() {
|
||||||
sajax_debug("sajax_init_object() called..")
|
sajax_debug("sajax_init_object() called..")
|
||||||
|
|
||||||
var A;
|
var A;
|
||||||
|
|
||||||
var msxmlhttp = new Array(
|
var msxmlhttp = new Array(
|
||||||
'Msxml2.XMLHTTP.5.0',
|
'Msxml2.XMLHTTP.5.0',
|
||||||
'Msxml2.XMLHTTP.4.0',
|
'Msxml2.XMLHTTP.4.0',
|
||||||
'Msxml2.XMLHTTP.3.0',
|
'Msxml2.XMLHTTP.3.0',
|
||||||
@@ -155,21 +155,21 @@ if (!isset($SAJAX_INCLUDED)) {
|
|||||||
A = null;
|
A = null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!A && typeof XMLHttpRequest != "undefined")
|
if(!A && typeof XMLHttpRequest != "undefined")
|
||||||
A = new XMLHttpRequest();
|
A = new XMLHttpRequest();
|
||||||
if (!A)
|
if (!A)
|
||||||
sajax_debug("Could not create connection object.");
|
sajax_debug("Could not create connection object.");
|
||||||
return A;
|
return A;
|
||||||
}
|
}
|
||||||
|
|
||||||
var sajax_requests = new Array();
|
var sajax_requests = new Array();
|
||||||
|
|
||||||
function sajax_cancel() {
|
function sajax_cancel() {
|
||||||
for (var i = 0; i < sajax_requests.length; i++)
|
for (var i = 0; i < sajax_requests.length; i++)
|
||||||
sajax_requests[i].abort();
|
sajax_requests[i].abort();
|
||||||
}
|
}
|
||||||
|
|
||||||
function sajax_do_call(func_name, args) {
|
function sajax_do_call(func_name, args) {
|
||||||
var i, x, n;
|
var i, x, n;
|
||||||
var uri;
|
var uri;
|
||||||
@@ -178,36 +178,36 @@ if (!isset($SAJAX_INCLUDED)) {
|
|||||||
|
|
||||||
sajax_debug("in sajax_do_call().." + sajax_request_type + "/" + sajax_target_id);
|
sajax_debug("in sajax_do_call().." + sajax_request_type + "/" + sajax_target_id);
|
||||||
target_id = sajax_target_id;
|
target_id = sajax_target_id;
|
||||||
if (typeof(sajax_request_type) == "undefined" || sajax_request_type == "")
|
if (typeof(sajax_request_type) == "undefined" || sajax_request_type == "")
|
||||||
sajax_request_type = "GET";
|
sajax_request_type = "GET";
|
||||||
|
|
||||||
uri = "<?php echo $sajax_remote_uri; ?>";
|
uri = "<?php echo $sajax_remote_uri; ?>";
|
||||||
if (sajax_request_type == "GET") {
|
if (sajax_request_type == "GET") {
|
||||||
// alert(args);
|
// alert(args);
|
||||||
if (uri.indexOf("?") == -1)
|
if (uri.indexOf("?") == -1)
|
||||||
uri += "?rs=" + escape(func_name);
|
uri += "?rs=" + escape(func_name);
|
||||||
else
|
else
|
||||||
uri += "&rs=" + escape(func_name);
|
uri += "&rs=" + escape(func_name);
|
||||||
uri += "&rst=" + escape(sajax_target_id);
|
uri += "&rst=" + escape(sajax_target_id);
|
||||||
uri += "&rsrnd=" + new Date().getTime();
|
uri += "&rsrnd=" + new Date().getTime();
|
||||||
|
|
||||||
for (i = 0; i < args.length-1; i++) {
|
for (i = 0; i < args.length-1; i++) {
|
||||||
uri += "&rsargs[]=" + args[i];
|
uri += "&rsargs[]=" + args[i];
|
||||||
}
|
}
|
||||||
post_data = null;
|
post_data = null;
|
||||||
}
|
}
|
||||||
else if (sajax_request_type == "POST") {
|
else if (sajax_request_type == "POST") {
|
||||||
post_data = "rs=" + escape(func_name);
|
post_data = "rs=" + escape(func_name);
|
||||||
post_data += "&rst=" + escape(sajax_target_id);
|
post_data += "&rst=" + escape(sajax_target_id);
|
||||||
post_data += "&rsrnd=" + new Date().getTime();
|
post_data += "&rsrnd=" + new Date().getTime();
|
||||||
|
|
||||||
for (i = 0; i < args.length-1; i++)
|
for (i = 0; i < args.length-1; i++)
|
||||||
post_data = post_data + "&rsargs[]=" + escape(args[i]);
|
post_data = post_data + "&rsargs[]=" + escape(args[i]);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
alert("Illegal request type: " + sajax_request_type);
|
alert("Illegal request type: " + sajax_request_type);
|
||||||
}
|
}
|
||||||
|
|
||||||
x = sajax_init_object();
|
x = sajax_init_object();
|
||||||
if (x == null) {
|
if (x == null) {
|
||||||
if (sajax_failure_redirect != "") {
|
if (sajax_failure_redirect != "") {
|
||||||
@@ -220,20 +220,20 @@ if (!isset($SAJAX_INCLUDED)) {
|
|||||||
} else {
|
} else {
|
||||||
x.open(sajax_request_type, uri, true);
|
x.open(sajax_request_type, uri, true);
|
||||||
// window.open(uri);
|
// window.open(uri);
|
||||||
|
|
||||||
sajax_requests[sajax_requests.length] = x;
|
sajax_requests[sajax_requests.length] = x;
|
||||||
|
|
||||||
if (sajax_request_type == "POST") {
|
if (sajax_request_type == "POST") {
|
||||||
x.setRequestHeader("Method", "POST " + uri + " HTTP/1.1");
|
x.setRequestHeader("Method", "POST " + uri + " HTTP/1.1");
|
||||||
x.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
|
x.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
|
||||||
}
|
}
|
||||||
|
|
||||||
x.onreadystatechange = function() {
|
x.onreadystatechange = function() {
|
||||||
if (x.readyState != 4)
|
if (x.readyState != 4)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
sajax_debug("received " + x.responseText);
|
sajax_debug("received " + x.responseText);
|
||||||
|
|
||||||
var status;
|
var status;
|
||||||
var data;
|
var data;
|
||||||
var txt = x.responseText.replace(/^\s*|\s*$/g,"");
|
var txt = x.responseText.replace(/^\s*|\s*$/g,"");
|
||||||
@@ -242,10 +242,10 @@ if (!isset($SAJAX_INCLUDED)) {
|
|||||||
|
|
||||||
if (status == "") {
|
if (status == "") {
|
||||||
// let's just assume this is a pre-response bailout and let it slide for now
|
// let's just assume this is a pre-response bailout and let it slide for now
|
||||||
} else if (status == "-")
|
} else if (status == "-")
|
||||||
alert("Error: " + data);
|
alert("Error: " + data);
|
||||||
else {
|
else {
|
||||||
if (target_id != "")
|
if (target_id != "")
|
||||||
document.getElementById(target_id).innerHTML = eval(data);
|
document.getElementById(target_id).innerHTML = eval(data);
|
||||||
else {
|
else {
|
||||||
try {
|
try {
|
||||||
@@ -265,24 +265,24 @@ if (!isset($SAJAX_INCLUDED)) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
sajax_debug(func_name + " uri = " + uri + "/post = " + post_data);
|
sajax_debug(func_name + " uri = " + uri + "/post = " + post_data);
|
||||||
x.send(post_data);
|
x.send(post_data);
|
||||||
sajax_debug(func_name + " waiting..");
|
sajax_debug(func_name + " waiting..");
|
||||||
delete x;
|
delete x;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
$html = ob_get_contents();
|
$html = ob_get_contents();
|
||||||
ob_end_clean();
|
ob_end_clean();
|
||||||
return $html;
|
return $html;
|
||||||
}
|
}
|
||||||
|
|
||||||
function sajax_show_common_js() {
|
function sajax_show_common_js() {
|
||||||
echo sajax_get_common_js();
|
echo sajax_get_common_js();
|
||||||
}
|
}
|
||||||
|
|
||||||
// javascript escape a value
|
// javascript escape a value
|
||||||
function sajax_esc($val)
|
function sajax_esc($val)
|
||||||
{
|
{
|
||||||
@@ -294,41 +294,41 @@ if (!isset($SAJAX_INCLUDED)) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function sajax_get_one_stub($func_name) {
|
function sajax_get_one_stub($func_name) {
|
||||||
ob_start();
|
ob_start();
|
||||||
?>
|
?>
|
||||||
|
|
||||||
// wrapper for <?php echo $func_name; ?>
|
// wrapper for <?php echo $func_name; ?>
|
||||||
|
|
||||||
function x_<?php echo $func_name; ?>() {
|
function x_<?php echo $func_name; ?>() {
|
||||||
sajax_do_call("<?php echo $func_name; ?>",
|
sajax_do_call("<?php echo $func_name; ?>",
|
||||||
x_<?php echo $func_name; ?>.arguments);
|
x_<?php echo $func_name; ?>.arguments);
|
||||||
}
|
}
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
$html = ob_get_contents();
|
$html = ob_get_contents();
|
||||||
ob_end_clean();
|
ob_end_clean();
|
||||||
return $html;
|
return $html;
|
||||||
}
|
}
|
||||||
|
|
||||||
function sajax_show_one_stub($func_name) {
|
function sajax_show_one_stub($func_name) {
|
||||||
echo sajax_get_one_stub($func_name);
|
echo sajax_get_one_stub($func_name);
|
||||||
}
|
}
|
||||||
|
|
||||||
function sajax_export() {
|
function sajax_export() {
|
||||||
global $sajax_export_list;
|
global $sajax_export_list;
|
||||||
|
|
||||||
$n = func_num_args();
|
$n = func_num_args();
|
||||||
for ($i = 0; $i < $n; $i++) {
|
for ($i = 0; $i < $n; $i++) {
|
||||||
$sajax_export_list[] = func_get_arg($i);
|
$sajax_export_list[] = func_get_arg($i);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$sajax_js_has_been_shown = 0;
|
$sajax_js_has_been_shown = 0;
|
||||||
function sajax_get_javascript()
|
function sajax_get_javascript()
|
||||||
{
|
{
|
||||||
global $sajax_js_has_been_shown;
|
global $sajax_js_has_been_shown;
|
||||||
global $sajax_export_list;
|
global $sajax_export_list;
|
||||||
|
|
||||||
$html = "";
|
$html = "";
|
||||||
if (! $sajax_js_has_been_shown) {
|
if (! $sajax_js_has_been_shown) {
|
||||||
$html .= sajax_get_common_js();
|
$html .= sajax_get_common_js();
|
||||||
@@ -339,13 +339,13 @@ if (!isset($SAJAX_INCLUDED)) {
|
|||||||
}
|
}
|
||||||
return $html;
|
return $html;
|
||||||
}
|
}
|
||||||
|
|
||||||
function sajax_show_javascript()
|
function sajax_show_javascript()
|
||||||
{
|
{
|
||||||
echo sajax_get_javascript();
|
echo sajax_get_javascript();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
$SAJAX_INCLUDED = 1;
|
$SAJAX_INCLUDED = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -356,7 +356,7 @@ if (!isset($SAJAX_INCLUDED)) {
|
|||||||
if (is_array($data)){$msg = htmlspecialchars($data[1]);}else{$msg = htmlspecialchars($data);};
|
if (is_array($data)){$msg = htmlspecialchars($data[1]);}else{$msg = htmlspecialchars($data);};
|
||||||
// $msg=htmlspecialchars($msg);
|
// $msg=htmlspecialchars($msg);
|
||||||
$name = $session->username;
|
$name = $session->username;
|
||||||
|
|
||||||
$id_user = $session->uid;
|
$id_user = $session->uid;
|
||||||
$alliance = $session->alliance;
|
$alliance = $session->alliance;
|
||||||
$now = time();
|
$now = time();
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user