Big Cleanup

1) Removed unnecessary files
2) Trailling spaces (no all though)
3)  Some space to tab conversion
This commit is contained in:
Neranjen
2012-06-18 05:06:05 +05:30
parent e081116620
commit 786cbf1f8e
195 changed files with 23522 additions and 23537 deletions
+4 -4
View File
@@ -1,4 +1,4 @@
<Files "*.tpl">
Order Deny,Allow
Deny from all
</Files>
<Files "*.tpl">
Order Deny,Allow
Deny from all
</Files>
+12 -12
View File
@@ -25,15 +25,15 @@ function ControlVersion()
try {
// version will be set for 6.X players only
axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");
// installed player is some revision of 6.0
// 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
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";
// safe to call for 6.0r47 or greater
@@ -73,7 +73,7 @@ function ControlVersion()
version = -1;
}
}
return version;
}
@@ -81,13 +81,13 @@ function ControlVersion()
function GetSwfVer(id){
// NS/Opera version >= 3 check for Flash plugin in plugin array
var flashVer = -1;
if (navigator.plugins != null && navigator.plugins.length > 0) {
if (navigator.plugins["Shockwave Flash 2.0"] || navigator.plugins["Shockwave Flash"]) {
var swVer2 = navigator.plugins["Shockwave Flash 2.0"] ? " 2.0" : "";
var flashDescription = navigator.plugins["Shockwave Flash" + swVer2].description;
var descArray = flashDescription.split(" ");
var tempArrayMajor = descArray[2].split(".");
var tempArrayMajor = descArray[2].split(".");
var versionMajor = tempArrayMajor[0];
var versionMinor = tempArrayMajor[1];
var versionRevision = descArray[3];
@@ -114,11 +114,11 @@ function GetSwfVer(id){
else if ( isIE && isWin && !isOpera ) {
flashVer = ControlVersion();
}
if(flashVer != -1) {
writeFlashTags(id);
}
return flashVer;
}
@@ -127,15 +127,15 @@ function writeFlashTags(id)
{
var swfFilename = "stats.swf";
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("<param name=\"movie\" value=\""+swfUrlWithGetParameters+"\" />");
document.writeln("<param name=\"quality\" value=\"low\" />");
document.writeln("<param name=\"allowScriptAccess\" value=\"always\" />");
document.writeln("<param name=\"allowNetworking\" value=\"true\" />");
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("pluginspage=\"http://www.macromedia.com/go/getflashplayer\"> ");
document.writeln("</embed> </object></div>");
}
}
+5 -5
View File
@@ -19,10 +19,10 @@ mysql_select_db(SQL_DB);
if ($session->access < ADMIN) die("Access Denied: You are not Admin!");
$id = $_POST['id'];
$village = $database->getVillage($id);
$user = $database->getUserArray($village['owner'],1);
$coor = $database->getCoor($village['wref']);
$varray = $database->getProfileVillages($village['owner']);
$village = $database->getVillage($id);
$user = $database->getUserArray($village['owner'],1);
$coor = $database->getCoor($village['wref']);
$varray = $database->getProfileVillages($village['owner']);
$type = $database->getVillageType($village['wref']);
$fdata = $database->getResourceLevel($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");
?>
?>
+1 -1
View File
@@ -1,4 +1,4 @@
<?php
<?php
#################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ##
+11 -11
View File
@@ -14,37 +14,37 @@ error_reporting(E_ALL ^ E_NOTICE);
$id = $_GET['uid'];
if(isset($id))
{
$user = $database->getUserArray($id,1);
{
$user = $database->getUserArray($id,1);
$varray = $database->getProfileVillages($id);
$varmedal = $database->getProfileMedal($id); ?>
<link href="../<?php echo GP_LOCATE; ?>lang/en/compact.css?f4b7c" rel="stylesheet" type="text/css">
<style type="text/css">
input.dynamic_img, img.dynamic_img
input.dynamic_img, img.dynamic_img
{
background-position: center top;
height: 20px;
}
input#btn_send
input#btn_send
{
width: 97px;
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>
<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">
<div id="content" class="messages">
<div id="read_head" class="msg_head"></div>
<div id="read_content" class="msg_content">
<img src="../../<?php echo GP_LOCATE; ?>lang/en/msg/block_bg24b.gif" id="label" class="read" alt="">
<div id="heading">
<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>
@@ -53,8 +53,8 @@ if(isset($id))
<div id="time">
<div><?php echo date('d.m.y'); ?></div>
<div><?php echo date('H:i:s'); ?></div>
</div>
<div class="clear"></div>
</div>
<div class="clear"></div>
<div class="line"></div>
<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>
+9 -9
View File
@@ -1,4 +1,4 @@
<?php
<?php
#################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ##
@@ -12,10 +12,10 @@
error_reporting(0);
?>
<style>
.del {width:12px; height:12px; background-image: url(img/admin/icon/del.gif);}
</style>
.del {width:12px; height:12px; background-image: url(img/admin/icon/del.gif);}
</style>
<table id="member">
<table id="member">
<thead>
<tr>
<th colspan="7">Inactive users</th>
@@ -33,10 +33,10 @@ error_reporting(0);
<tbody>
<?php
$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);
$active = mysql_fetch_assoc($result);
for ($i = 0; $i <= count($active)-1; $i++)
{
$uid = $database->getUserField($active[$i]['username'],'id',1);
@@ -70,8 +70,8 @@ error_reporting(0);
<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=\"../<?php echo GP_LOCATE; ?>img/a/online1.gif\"></td>
</tr>";
}
?>
</tr>";
}
?>
</tbody>
</table>
+171 -171
View File
@@ -1,11 +1,11 @@
<?php
<?php
#################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ##
## Filename addTroops.tpl ##
## Developed by: Dzoki & Advocatie ##
## License: TravianX Project ##
## Thanks to: Dzoki & itay2277(Edit troops) ##
## Thanks to: Dzoki & itay2277(Edit troops) ##
## 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'];
if(isset($id))
{
$village = $database->getVillage($id);
$user = $database->getUserArray($village['owner'],1);
$coor = $database->getCoor($village['wref']);
$varray = $database->getProfileVillages($village['owner']);
$village = $database->getVillage($id);
$user = $database->getUserArray($village['owner'],1);
$coor = $database->getCoor($village['wref']);
$varray = $database->getProfileVillages($village['owner']);
$type = $database->getVillageType($village['wref']);
$fdata = $database->getResourceLevel($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="admid" id="admid" value="<?php echo $_SESSION['id']; ?>">
<table id="member">
<thead>
<tr>
<th colspan="2">Edit troops</th>
<thead>
<tr>
<th colspan="2">Edit troops</th>
<?php if($user['tribe'] == 1){ ?>
</tr></thead><tbody>
<tr>
</tr></thead><tbody>
<tr>
<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">&nbsp;&nbsp;&nbsp;<font color="#bcbcbc" size="1">Currently: <b><?php echo $units['u1']; ?></b><font></td>
</tr>
<tr>
<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">&nbsp;&nbsp;&nbsp;<font color="#bcbcbc" size="1">Currently: <b><?php echo $units['u2']; ?></b><font></td>
</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">&nbsp;&nbsp;&nbsp;<font color="#bcbcbc" size="1">Currently: <b><?php echo $units['u3']; ?></b><font></td>
</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">&nbsp;&nbsp;&nbsp;<font color="#bcbcbc" size="1">Currently: <b><?php echo $units['u4']; ?></b><font></td>
</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">&nbsp;&nbsp;&nbsp;<font color="#bcbcbc" size="1">Currently: <b><?php echo $units['u5']; ?></b><font></td>
</tr>
<tr>
<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">&nbsp;&nbsp;&nbsp;<font color="#bcbcbc" size="1">Currently: <b><?php echo $units['u6']; ?></b><font></td>
</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">&nbsp;&nbsp;&nbsp;<font color="#bcbcbc" size="1">Currently: <b><?php echo $units['u7']; ?></b><font></td>
</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">&nbsp;&nbsp;&nbsp;<font color="#bcbcbc" size="1">Currently: <b><?php echo $units['u8']; ?></b><font></td>
</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">&nbsp;&nbsp;&nbsp;<font color="#bcbcbc" size="1">Currently: <b><?php echo $units['u9']; ?></b><font></td>
</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">&nbsp;&nbsp;&nbsp;<font color="#bcbcbc" size="1">Currently: <b><?php echo $units['u10']; ?></b><font></td>
</tr>
</tr>
<?php }
else if($user['tribe'] == 2){ ?>
</tr></thead><tbody>
<tr>
</tr></thead><tbody>
<tr>
<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">&nbsp;&nbsp;&nbsp;<font color="#bcbcbc" size="1">Currently: <b><?php echo $units['u11']; ?></td>
</tr>
<tr>
<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">&nbsp;&nbsp;&nbsp;<font color="#bcbcbc" size="1">Currently: <b><?php echo $units['u12']; ?></td>
</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">&nbsp;&nbsp;&nbsp;<font color="#bcbcbc" size="1">Currently: <b><?php echo $units['u13']; ?></td>
</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">&nbsp;&nbsp;&nbsp;<font color="#bcbcbc" size="1">Currently: <b><?php echo $units['u14']; ?></td>
</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">&nbsp;&nbsp;&nbsp;<font color="#bcbcbc" size="1">Currently: <b><?php echo $units['u15']; ?></td>
</tr>
<tr>
<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">&nbsp;&nbsp;&nbsp;<font color="#bcbcbc" size="1">Currently: <b><?php echo $units['u16']; ?></td>
</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">&nbsp;&nbsp;&nbsp;<font color="#bcbcbc" size="1">Currently: <b><?php echo $units['u17']; ?></td>
</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">&nbsp;&nbsp;&nbsp;<font color="#bcbcbc" size="1">Currently: <b><?php echo $units['u18']; ?></td>
</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">&nbsp;&nbsp;&nbsp;<font color="#bcbcbc" size="1">Currently: <b><?php echo $units['u19']; ?></td>
</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">&nbsp;&nbsp;&nbsp;<font color="#bcbcbc" size="1">Currently: <b><?php echo $units['u20']; ?></td>
</tr>
</tr>
<?php }
else if($user['tribe'] == 3){ ?>
</tr></thead><tbody>
<tr>
</tr></thead><tbody>
<tr>
<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">&nbsp;&nbsp;&nbsp;<font color="#bcbcbc" size="1">Currently: <b><?php echo $units['u21']; ?></td>
</tr>
<tr>
<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">&nbsp;&nbsp;&nbsp;<font color="#bcbcbc" size="1">Currently: <b><?php echo $units['u22']; ?></td>
</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">&nbsp;&nbsp;&nbsp;<font color="#bcbcbc" size="1">Currently: <b><?php echo $units['u23']; ?></td>
</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">&nbsp;&nbsp;&nbsp;<font color="#bcbcbc" size="1">Currently: <b><?php echo $units['u24']; ?></td>
</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">&nbsp;&nbsp;&nbsp;<font color="#bcbcbc" size="1">Currently: <b><?php echo $units['u25']; ?></td>
</tr>
<tr>
<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">&nbsp;&nbsp;&nbsp;<font color="#bcbcbc" size="1">Currently: <b><?php echo $units['u26']; ?></td>
</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">&nbsp;&nbsp;&nbsp;<font color="#bcbcbc" size="1">Currently: <b><?php echo $units['u27']; ?></td>
</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">&nbsp;&nbsp;&nbsp;<font color="#bcbcbc" size="1">Currently: <b><?php echo $units['u28']; ?></td>
</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">&nbsp;&nbsp;&nbsp;<font color="#bcbcbc" size="1">Currently: <b><?php echo $units['u29']; ?></td>
</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">&nbsp;&nbsp;&nbsp;<font color="#bcbcbc" size="1">Currently: <b><?php echo $units['u30']; ?></td>
</tr>
<?php }
else if($user['tribe'] == 4){ ?>
</tr></thead><tbody>
<tr>
<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">&nbsp;&nbsp;&nbsp;<font color="#bcbcbc" size="1">Currently: <b><?php echo $units['u31']; ?></td>
</tr>
<tr>
<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">&nbsp;&nbsp;&nbsp;<font color="#bcbcbc" size="1">Currently: <b><?php echo $units['u32']; ?></td>
</tr>
<tr>
<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">&nbsp;&nbsp;&nbsp;<font color="#bcbcbc" size="1">Currently: <b><?php echo $units['u33']; ?></td>
</tr>
<tr>
<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">&nbsp;&nbsp;&nbsp;<font color="#bcbcbc" size="1">Currently: <b><?php echo $units['u34']; ?></td>
</tr>
<tr>
<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">&nbsp;&nbsp;&nbsp;<font color="#bcbcbc" size="1">Currently: <b><?php echo $units['u35']; ?></td>
</tr>
<tr>
<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">&nbsp;&nbsp;&nbsp;<font color="#bcbcbc" size="1">Currently: <b><?php echo $units['u36']; ?></td>
</tr>
<tr>
<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">&nbsp;&nbsp;&nbsp;<font color="#bcbcbc" size="1">Currently: <b><?php echo $units['u37']; ?></td>
</tr>
<tr>
<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">&nbsp;&nbsp;&nbsp;<font color="#bcbcbc" size="1">Currently: <b><?php echo $units['u38']; ?></td>
</tr>
<tr>
<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">&nbsp;&nbsp;&nbsp;<font color="#bcbcbc" size="1">Currently: <b><?php echo $units['u39']; ?></td>
</tr>
<tr>
<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">&nbsp;&nbsp;&nbsp;<font color="#bcbcbc" size="1">Currently: <b><?php echo $units['u40']; ?></td>
</tr>
<?php }
else if($user['tribe'] == 5){ ?>
</tr></thead><tbody>
<tr>
<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">&nbsp;&nbsp;&nbsp;<font color="#bcbcbc" size="1">Currently: <b><?php echo $units['u41']; ?></td>
</tr>
<tr>
<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">&nbsp;&nbsp;&nbsp;<font color="#bcbcbc" size="1">Currently: <b><?php echo $units['u42']; ?></td>
</tr>
<tr>
<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">&nbsp;&nbsp;&nbsp;<font color="#bcbcbc" size="1">Currently: <b><?php echo $units['u43']; ?></td>
</tr>
<tr>
<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">&nbsp;&nbsp;&nbsp;<font color="#bcbcbc" size="1">Currently: <b><?php echo $units['u44']; ?></td>
</tr>
<tr>
<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">&nbsp;&nbsp;&nbsp;<font color="#bcbcbc" size="1">Currently: <b><?php echo $units['u45']; ?></td>
</tr>
<tr>
<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">&nbsp;&nbsp;&nbsp;<font color="#bcbcbc" size="1">Currently: <b><?php echo $units['u46']; ?></td>
</tr>
<tr>
<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">&nbsp;&nbsp;&nbsp;<font color="#bcbcbc" size="1">Currently: <b><?php echo $units['u47']; ?></td>
</tr>
<tr>
<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">&nbsp;&nbsp;&nbsp;<font color="#bcbcbc" size="1">Currently: <b><?php echo $units['u48']; ?></td>
</tr>
<tr>
<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">&nbsp;&nbsp;&nbsp;<font color="#bcbcbc" size="1">Currently: <b><?php echo $units['u49']; ?></td>
</tr>
<tr>
<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">&nbsp;&nbsp;&nbsp;<font color="#bcbcbc" size="1">Currently: <b><?php echo $units['u50']; ?></td>
</tr>
</tr>
<?php }
else if($user['tribe'] == 4){ ?>
</tr></thead><tbody>
<tr>
<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">&nbsp;&nbsp;&nbsp;<font color="#bcbcbc" size="1">Currently: <b><?php echo $units['u31']; ?></td>
</tr>
<tr>
<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">&nbsp;&nbsp;&nbsp;<font color="#bcbcbc" size="1">Currently: <b><?php echo $units['u32']; ?></td>
</tr>
<tr>
<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">&nbsp;&nbsp;&nbsp;<font color="#bcbcbc" size="1">Currently: <b><?php echo $units['u33']; ?></td>
</tr>
<tr>
<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">&nbsp;&nbsp;&nbsp;<font color="#bcbcbc" size="1">Currently: <b><?php echo $units['u34']; ?></td>
</tr>
<tr>
<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">&nbsp;&nbsp;&nbsp;<font color="#bcbcbc" size="1">Currently: <b><?php echo $units['u35']; ?></td>
</tr>
<tr>
<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">&nbsp;&nbsp;&nbsp;<font color="#bcbcbc" size="1">Currently: <b><?php echo $units['u36']; ?></td>
</tr>
<tr>
<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">&nbsp;&nbsp;&nbsp;<font color="#bcbcbc" size="1">Currently: <b><?php echo $units['u37']; ?></td>
</tr>
<tr>
<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">&nbsp;&nbsp;&nbsp;<font color="#bcbcbc" size="1">Currently: <b><?php echo $units['u38']; ?></td>
</tr>
<tr>
<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">&nbsp;&nbsp;&nbsp;<font color="#bcbcbc" size="1">Currently: <b><?php echo $units['u39']; ?></td>
</tr>
<tr>
<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">&nbsp;&nbsp;&nbsp;<font color="#bcbcbc" size="1">Currently: <b><?php echo $units['u40']; ?></td>
</tr>
<?php }
else if($user['tribe'] == 5){ ?>
</tr></thead><tbody>
<tr>
<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">&nbsp;&nbsp;&nbsp;<font color="#bcbcbc" size="1">Currently: <b><?php echo $units['u41']; ?></td>
</tr>
<tr>
<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">&nbsp;&nbsp;&nbsp;<font color="#bcbcbc" size="1">Currently: <b><?php echo $units['u42']; ?></td>
</tr>
<tr>
<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">&nbsp;&nbsp;&nbsp;<font color="#bcbcbc" size="1">Currently: <b><?php echo $units['u43']; ?></td>
</tr>
<tr>
<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">&nbsp;&nbsp;&nbsp;<font color="#bcbcbc" size="1">Currently: <b><?php echo $units['u44']; ?></td>
</tr>
<tr>
<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">&nbsp;&nbsp;&nbsp;<font color="#bcbcbc" size="1">Currently: <b><?php echo $units['u45']; ?></td>
</tr>
<tr>
<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">&nbsp;&nbsp;&nbsp;<font color="#bcbcbc" size="1">Currently: <b><?php echo $units['u46']; ?></td>
</tr>
<tr>
<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">&nbsp;&nbsp;&nbsp;<font color="#bcbcbc" size="1">Currently: <b><?php echo $units['u47']; ?></td>
</tr>
<tr>
<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">&nbsp;&nbsp;&nbsp;<font color="#bcbcbc" size="1">Currently: <b><?php echo $units['u48']; ?></td>
</tr>
<tr>
<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">&nbsp;&nbsp;&nbsp;<font color="#bcbcbc" size="1">Currently: <b><?php echo $units['u49']; ?></td>
</tr>
<tr>
<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">&nbsp;&nbsp;&nbsp;<font color="#bcbcbc" size="1">Currently: <b><?php echo $units['u50']; ?></td>
</tr>
<?php } ?>
</tbody></table>
<br />
+4 -4
View File
@@ -10,17 +10,17 @@
#################################################################################
?>
<style>
.del {width:12px; height:12px; background-image: url(img/admin/icon/del.gif);}
</style>
.del {width:12px; height:12px; background-image: url(img/admin/icon/del.gif);}
</style>
<form method="post" action="admin.php">
<input name="action" type="hidden" value="addVillage">
<input name="uid" type="hidden" value="<?php echo $user['id'];?>">
<table id="member" style="width: 125px;">
<table id="member" style="width: 125px;">
<thead>
<tr>
<th colspan="2">Add Village</th>
</tr>
</thead>
</thead>
<tbody>
<tr>
<td colspan="2"><center>Coordinates (<b>X</b>|<b>Y</b>)</center></td>
+6 -7
View File
@@ -3,7 +3,7 @@
<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">
@@ -22,7 +22,7 @@
<meta http-equiv="imagetoolbar" content="no">
</head>
<?php
<?php
#################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ##
@@ -36,7 +36,7 @@
if($_SESSION['access'] < ADMIN) die("Access Denied: You are not Admin!"); ?>
<?php
$no = count($database->getAdminLog());
$log = $database->getAdminLog();
for($i=0;$i<$no;$i++) {
@@ -50,7 +50,6 @@ if($_SESSION['access'] < ADMIN) die("Access Denied: You are not Admin!"); ?>
?><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 />
<?php } ?>
<?php } ?>
+28 -28
View File
@@ -1,4 +1,4 @@
<?php
<?php
#################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ##
@@ -20,7 +20,7 @@ if($_GET['aid'])
{
$totalpop += $database->getVSumField($member['id'],"pop");
} ?>
<br>
<table id="profile" cellpadding="1" cellspacing="1">
<thead>
@@ -65,7 +65,7 @@ if($_GET['aid'])
<td><?php echo count($aliusers); ?></td>
</tr>
<tr>
<td colspan="2" class="empty"></td>
<td colspan="2" class="empty"></td>
</tr>
<tr>
<th>Alliance Founder</th>
@@ -74,7 +74,7 @@ if($_GET['aid'])
<tr>
<td colspan="2"><b>Alliance Positions</b></td>
</tr>
<?php
error_reporting(0);
$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['opt7'] == 1) { $position7 = "Mass IGMs (MMs)"; } else { $position7 = "No MMs"; }
if($row['opt8'] == 1) { $position8 = "???"; } else { $position8 = "No ???"; }
echo '
<tr>
<td>Position:</td>
@@ -111,7 +111,7 @@ if($_GET['aid'])
';
}
?>
<tr>
<th>Capacity</th>
<td>
@@ -167,8 +167,8 @@ if($_GET['aid'])
</tr>
</tbody>
</table>
<table id="member" cellpadding="1" cellspacing="1">
<thead>
<tr>
@@ -188,11 +188,11 @@ if($_GET['aid'])
$TotalVillages = $database->getProfileVillages($user['id']);
echo "<tr>";
echo "<td class=ra>".$rank.".</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=pla><a href=spieler.php?uid=".$user['id'].">".$user['username']."</a></td>";
echo "<td class=hab>".$TotalUserPop."</td>";
echo "<td class=vil>".count($TotalVillages)."</td>";
if($aid == $session->alliance)
{
{
if ((time()-600) < $user['timestamp'])
{
// 0 Min - 10 Min
@@ -201,29 +201,29 @@ if($_GET['aid'])
elseif ((time()-86400) < $user['timestamp'] && (time()-600) > $user['timestamp'])
{
// 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'])
{
{
// 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'])
{
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
{
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>
</table>
<br /><br />
<table id="profile">
<thead>
<tr>
@@ -249,7 +249,7 @@ if($_GET['aid'])
</thead>
</table>
<br /><br />
<h3>Not Sure this Diplomacy is correct, but I think it is</h3>
<br />
<table id="profile">
@@ -273,7 +273,7 @@ if($_GET['aid'])
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'] ==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'].""));
echo '
<tr>
@@ -286,7 +286,7 @@ if($_GET['aid'])
</thead>
</table>
<br /><br />
<table id="profile">
<thead>
<tr>
@@ -308,7 +308,7 @@ if($_GET['aid'])
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'] ==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'].""));
echo '
<tr>
@@ -320,9 +320,9 @@ if($_GET['aid'])
?>
</thead>
</table>
<br /><br />
<table id="profile">
<thead>
<tr>
@@ -344,7 +344,7 @@ if($_GET['aid'])
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'] == 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'].""));
$ally2 = mysql_fetch_assoc(mysql_query("SELECT * FROM ".TB_PREFIX."alidata WHERE id = ".$row['alli2'].""));
echo '
@@ -357,9 +357,9 @@ if($_GET['aid'])
?>
</thead>
</table>
<br /><br />
<?php
include("allymedals.tpl");
}
+7 -7
View File
@@ -4,7 +4,7 @@
<form action="../GameEngine/Admin/Mods/delallymedal.php" method="POST">
<input type="hidden" name="aid" value="<?php echo $_GET['aid']; ?>">
<input type="hidden" name="admid" id="admid" value="<?php echo $_SESSION['id']; ?>">
<table id="profile">
<table id="profile">
<thead>
<tr>
<th colspan="6">Alliance Medals (<?php echo sizeof($varmedal); ?>)</th>
@@ -21,14 +21,14 @@
<?php
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)
{
foreach($varmedal as $medal)
foreach($varmedal as $medal)
{
$titel="Bonus";
switch ($medal['categorie'])
switch ($medal['categorie'])
{
case "1": $titel="Attackers"; break;
case "2": $titel="Defenders"; break;
@@ -41,7 +41,7 @@
$week = $medal['week'];
$points = $medal['points'];
if($points == '') { $points = "<p>Bonus</p>"; } else { $points = $points; }
echo"
<tr>
<td>$title</td>
@@ -54,7 +54,7 @@
</td>
</tr>";
}
$averagerank = 0;
foreach($varmedal as $medal)
{
@@ -73,7 +73,7 @@
}
}
$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>
+4 -5
View File
@@ -1,8 +1,7 @@
<p>
<a href="admin.php">Homepage</a>
<a href="?page=1">Configuration</a>
<a href="?page=2">Search</a>
<a href="?page=1">Configuration</a>
<a href="?page=2">Search</a>
<a href="?page=5">Online players</a>
<a href="?page=6">Bug report</a>
</p>
<a href="?page=6">Bug report</a>
</p>
+26 -26
View File
@@ -7,33 +7,33 @@ $database->BugReportSetViewed();
<th colspan="10">Bug report</th>
</tr>
<tr><td></td><td>Player</td><td>Page</td><td>Report</td><td>Time</td><td>IP</td><td></td></tr>
</thead><tbody>
<?php
$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>";
}
</thead><tbody>
<?php
$bug = $database->BugReport();
}
else {
echo "<tr><td class=\"none\" colspan=\"7\">No bug report</td></tr>";
}
?>
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>";
}
}
else {
echo "<tr><td class=\"none\" colspan=\"7\">No bug report</td></tr>";
}
?>
</tbody>
</table>
+24 -24
View File
@@ -7,7 +7,7 @@ $database->reload('admin.php?page=1');
<form action="" method="post">
<table id="del_acc" class="account" cellpadding="1" cellspacing="1"><thead>
<tr>
<th colspan="2">Server Settings</th>
<th colspan="2">Server Settings</th>
</tr>
</thead><tbody>
@@ -20,18 +20,18 @@ $database->reload('admin.php?page=1');
<td>
<select class="dropdown" name="LANG"">
<?php
$handle=opendir('GameEngine/lang');
while (false!==($file = readdir($handle)))
{
if (similar_text(".",$file)<1)
{
if(LANG==$file){$sel = "selected";}else{$sel = "";}
echo '<option value="'.$file.'"'.$sel.'>'.$file.'</option>\n';
}
$handle=opendir('GameEngine/lang');
while (false!==($file = readdir($handle)))
{
if (similar_text(".",$file)<1)
{
if(LANG==$file){$sel = "selected";}else{$sel = "";}
echo '<option value="'.$file.'"'.$sel.'>'.$file.'</option>\n';
}
}
closedir($handle);
closedir($handle);
?>
</select>
</select>
</td>
</tr>
@@ -54,7 +54,7 @@ closedir($handle);
</tr>
<tr>
<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="0" <?php if(active==0){echo 'checked';}?> type="radio"> Off
</td>
@@ -62,8 +62,8 @@ closedir($handle);
<tr>
<th>Censored:</th>
<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="0" <?php if(WORD_CENSOR==0){echo 'checked';}?> type="radio"> Off
<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
</td>
</tr>
<tr>
@@ -72,63 +72,63 @@ closedir($handle);
</tr>
<tr>
<th>Log build:</th>
<td>
<input class="radio" name="LOG_BUILD" value="1" <?php if(LOG_BUILD==1){echo 'checked';}?> type="radio"> On
<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="0" <?php if(LOG_BUILD==0){echo 'checked';}?> type="radio"> Off
</td>
</tr>
<tr>
<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="0" <?php if(LOG_TECH==0){echo 'checked';}?> type="radio"> Off
</td>
</tr>
<tr>
<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="0" <?php if(LOG_LOGIN==0){echo 'checked';}?> type="radio"> Off
</td>
</tr>
<tr>
<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="0" <?php if(LOG_GOLD_FIN==0){echo 'checked';}?> type="radio"> Off
</td>
</tr>
<tr>
<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="0" <?php if(LOG_ADMIN==0){echo 'checked';}?> type="radio"> Off
</td>
</tr>
<tr>
<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="0" <?php if(LOG_WAR==0){echo 'checked';}?> type="radio"> Off
</td>
</tr>
<tr>
<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="0" <?php if(LOG_MARKET==0){echo 'checked';}?> type="radio"> Off
</td>
</tr>
<tr>
<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="0" <?php if(LOG_ILLEGAL==0){echo 'checked';}?> type="radio"> Off
</td>
</tr>
<tr>
<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="0" <?php if(BUG_REPORT==0){echo 'checked';}?> type="radio"> Off
</td>
+29 -29
View File
@@ -1,7 +1,7 @@
<?php
if(!is_numeric($_SESSION['search'])) {
echo "<p class=\"error\">The user <b>".$_SESSION['search']."</b> does not exist.</p>";
$search = 0;
$search = 0;
}
else {
$search = $_SESSION['search'];
@@ -13,35 +13,35 @@ $search = $_SESSION['search'];
<th colspan="10">Online players</th>
</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>
<?php
$users = $database->getUsersAll();
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>";
</thead><tbody>
<?php
$users = $database->getUsersAll();
for ($i = 0; $i < count($users); $i++) {
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>";
}
}
?>
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>";
}
else {
echo "<td class=\"none\" colspan=\"5\">No users found</td>";
}
}
?>
</tbody>
</table>
+41 -41
View File
@@ -19,57 +19,57 @@ $database->reload('?uid='.$uid);
?>
<div id="content" class="player" style="width:100%">
<form action="" method="POST">
<input type="hidden" name="ft" value="p1" />
<input type="hidden" name="uid" value="<?php echo $uid; ?>" />
<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>
<input type="hidden" name="ft" value="p1" />
<input type="hidden" name="uid" value="<?php echo $uid; ?>" />
<input type="hidden" name="id" value="<?php echo $id; ?>" />
<td>Description</td>
</tr>
</thead>
<tbody>
<tr>
<td colspan="2" class="empty"></td><td class="empty"></td></tr>
<tr>
<?php
if($user['birthday'] != 0) {
<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>
</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']);
}
else {
$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>
<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="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>
</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>Gender</th>
<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="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>
</td></tr>
<tr><td colspan="2" class="empty"></td></tr>
<?php
<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
$varray = $database->getProfileVillages($uid);
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>";
}
?>
<tr><td colspan="2" class="empty"></td></tr>
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>";
}
?>
<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>
</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>
<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>
</form>
+37 -37
View File
@@ -3,59 +3,59 @@ $ranking->procRankReq($_GET);
$ranking->procRank($_POST);
if(!is_numeric($_SESSION['search'])) {
echo "<p class=\"error\">The user <b>".$_SESSION['search']."</b> does not exist.</p>";
$search = 0;
$search = 0;
}
else {
$search = $_SESSION['search'];
}
?>
?>
<table cellpadding="1" cellspacing="1" id="player">
<thead>
<tr>
<th colspan="10">Online players</th>
</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>
<?php
$users = $database->getUsersAll();
$holder = array();
foreach($users as $value) {
</thead><tbody>
<?php
$users = $database->getUsersAll();
$holder = array();
foreach($users as $value) {
$value['totalvillage'] = count($database->getVillagesID($value['id']));
$value['totalpop'] = $database->getVSumField($value['id'],"pop");
$value['aname'] = $database->getAllianceName($value['alliance']);
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>";
}
else {
echo "<td class=\"none\" colspan=\"5\">No users found</td>";
}
}
?>
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>";
}
else {
echo "<td class=\"none\" colspan=\"5\">No users found</td>";
}
}
?>
</tbody>
</table>
+88 -88
View File
@@ -4,101 +4,101 @@
<th colspan="15">Results in <?php echo $_GET['search_in'];?></th>
</tr>
</thead><tbody>
<?php
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>
<td>Villages</td><td>Tribe</td><td>Last activity</td><td></td></tr>';
$holder = array();
foreach($search as $value) {
<?php
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>
<td>Villages</td><td>Tribe</td><td>Last activity</td><td></td></tr>';
$holder = array();
foreach($search as $value) {
$value['totalvillage'] = count($database->getVillagesID($value['id']));
$value['totalpop'] = $database->getVSumField($value['id'],"pop");
$value['aname'] = $database->getAllianceName($value['alliance']);
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){
$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>
<td class="vil">'.$search[$i]['access'].'</td>
<td class="vil">'.$search[$i]['gold'].'</td>
<td class="vil">'.$search[$i]['email'].'</td>
<td class="al "><a href="?aid='.$search[$i]['alliance'].'">'.$search[$i]['aname'].'</a></td>
<td class="pop ">'.$search[$i]['totalpop'].'</td>
<td class="vil">'.$search[$i]['totalvillage'].'</td>
<td class="vil">'.$search[$i]['tribe'].'</td>
<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($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>
<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=clay"><img src="img/x.gif" class="r2"> Clay</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=maxstore">Max store</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=maxcrop">Max Crop</a></td>
<td><a class="rn3" href="?'.$page.'sort=pop">Pop</a></td>
<td><a class="rn3" href="?'.$page.'sort=capital">Capital</a></td>
</tr>
<tr><td colspan="15"></td></tr>';
$sort = $_GET['sort'];
if(!$sort){
$search = $multisort->sorte($search, "'pop'", false, 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);
echo '<tr>
<td>'.($i+1).'.</td>
<td><a href="?wref='.$search[$i]['wref'].'">'.$search[$i]['name'].'</a></td>
<td><a href="?uid='.$search[$i]['owner'].'">'.$owner.'</a></td>
<td>'.$search[$i]['wood'].'</td>
<td>'.$search[$i]['clay'].'</td>
<td>'.$search[$i]['iron'].'</td>
<td>'.$search[$i]['maxstore'].'</td>
<td>'.$search[$i]['crop'].'</td>
<td>'.$search[$i]['maxcrop'].'</td>
<td>'.$search[$i]['pop'].'</td>
<td>'.$search[$i]['capital'].'</td>
</tr>';
}
}
?>
</tbody>
for ($i = 0; $i <= count($search)-1; $i++) {
if($search[$i]['id']==0 or $search[$i]['id']==1){
$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>
<td class="vil">'.$search[$i]['access'].'</td>
<td class="vil">'.$search[$i]['gold'].'</td>
<td class="vil">'.$search[$i]['email'].'</td>
<td class="al "><a href="?aid='.$search[$i]['alliance'].'">'.$search[$i]['aname'].'</a></td>
<td class="pop ">'.$search[$i]['totalpop'].'</td>
<td class="vil">'.$search[$i]['totalvillage'].'</td>
<td class="vil">'.$search[$i]['tribe'].'</td>
<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($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>
<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=clay"><img src="img/x.gif" class="r2"> Clay</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=maxstore">Max store</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=maxcrop">Max Crop</a></td>
<td><a class="rn3" href="?'.$page.'sort=pop">Pop</a></td>
<td><a class="rn3" href="?'.$page.'sort=capital">Capital</a></td>
</tr>
<tr><td colspan="15"></td></tr>';
$sort = $_GET['sort'];
if(!$sort){
$search = $multisort->sorte($search, "'pop'", false, 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);
echo '<tr>
<td>'.($i+1).'.</td>
<td><a href="?wref='.$search[$i]['wref'].'">'.$search[$i]['name'].'</a></td>
<td><a href="?uid='.$search[$i]['owner'].'">'.$owner.'</a></td>
<td>'.$search[$i]['wood'].'</td>
<td>'.$search[$i]['clay'].'</td>
<td>'.$search[$i]['iron'].'</td>
<td>'.$search[$i]['maxstore'].'</td>
<td>'.$search[$i]['crop'].'</td>
<td>'.$search[$i]['maxcrop'].'</td>
<td>'.$search[$i]['pop'].'</td>
<td>'.$search[$i]['capital'].'</td>
</tr>';
}
}
?>
</tbody>
</table>
+3 -3
View File
@@ -1,4 +1,4 @@
<?php
<?php
if($_GET['search_in']){
if(!$_GET['sort']){$sort = $_GET['search_in'];}
else{
@@ -17,8 +17,8 @@ Search
</th></tr>
</thead>
<tbody>
<tr>
<td>
<tr>
<td>
<select class="dropdown" name="search_in">
<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>
+114 -114
View File
@@ -9,133 +9,133 @@ foreach($varray as $vil) {
?>
<div id="content" class="player" style="width:100%">
<table id="profile" cellpadding="1" cellspacing="1" >
<thead>
<tr>
<th colspan="2">Player <?php echo $displayarray['username']; ?> </th>
</tr>
<tr>
<td>Details</td>
<td>Description</td>
<thead>
<tr>
<th colspan="2">Player <?php echo $displayarray['username']; ?> </th>
</tr>
<tr>
<td>Details</td>
<td>Description</td>
</tr>
</thead><tbody>
<tr>
<td class="empty"></td><td class="empty"></td>
</tr>
<tr>
<td class="details">
<table cellpadding="0" cellspacing="0">
<tr>
</tr>
</thead><tbody>
<tr>
<td class="empty"></td><td class="empty"></td>
</tr>
<tr>
<td class="details">
<table cellpadding="0" cellspacing="0">
<tr>
<th>Rank</th>
<td><?php echo $ranking->searchRank($displayarray['username'],"username"); ?></td>
</tr>
<tr>
<th>Tribe</th>
<td><?php
if($displayarray['tribe'] == 1) {
echo "Roman";
}
else if($displayarray['tribe'] == 2) {
echo "Teutons";
}
else if($displayarray['tribe'] == 3) {
echo "Gauls";
} ?></td>
</tr>
<th>Rank</th>
<td><?php echo $ranking->searchRank($displayarray['username'],"username"); ?></td>
</tr>
<tr>
<th>Tribe</th>
<td><?php
if($displayarray['tribe'] == 1) {
echo "Roman";
}
else if($displayarray['tribe'] == 2) {
echo "Teutons";
}
else if($displayarray['tribe'] == 3) {
echo "Gauls";
} ?></td>
</tr>
<tr>
<th>Alliance</th>
<td><?php if($displayarray['alliance'] == 0) {
echo "-";
}
else {
$displayalliance = $database->getAllianceName($displayarray['alliance']);
echo "<a href=\"?aid=".$displayarray['alliance']."\">".$displayalliance."</a>";
} ?></td>
</tr>
<tr>
<th>Villages</th>
<td><?php echo count($varray);?></td>
<tr>
<th>Alliance</th>
<td><?php if($displayarray['alliance'] == 0) {
echo "-";
}
else {
$displayalliance = $database->getAllianceName($displayarray['alliance']);
echo "<a href=\"?aid=".$displayarray['alliance']."\">".$displayalliance."</a>";
} ?></td>
</tr>
<tr>
<th>Villages</th>
<td><?php echo count($varray);?></td>
</tr>
<tr>
<th>Population</th>
<td><?php echo $totalpop; ?></td>
</tr>
<?php
if(isset($displayarray['birthday']) && $displayarray['birthday'] != 0) {
$age = date("Y")-substr($displayarray['birthday'],0,4);
echo "<tr><th>Age</th><td>$age</td></tr>";
}
if(isset($displayarray['gender']) && $displayarray['gender'] != 0) {
$gender = ($displayarray['gender']== 1)? "Male" : "Female";
echo "<tr><th>Gender</th><td>".$gender."</td></tr>";
}
if($displayarray['location'] != "") {
echo "<tr><th>Location</th><td>".$displayarray['location']."</td></tr>";
}
?>
<tr>
<td colspan="2" class="empty"></td>
</tr>
<tr>
<td colspan="2"> <a href="?edit=user&uid=<?php echo $_GET['uid'];?>">&raquo; Change profile</a></td>
</tr>
<tr>
<td colspan="2"> <a href="?action=message&amp;id=<?php echo $_GET['uid'];?>">&raquo; Write message</a></td>
</tr>
<tr>
<td colspan="2"> <a href="?uid=<?php echo $_GET['uid'];?>&delete=<?php echo $_GET['uid'];?>&where=user">&raquo; Delete player</a></td>
</tr>
<tr>
<td colspan="2"> <a href="?log_login=<?php echo $_GET['uid'];?>">&raquo; Login Log</a></td>
</tr>
<tr>
</tr>
<tr>
<th>Population</th>
<td><?php echo $totalpop; ?></td>
</tr>
<?php
if(isset($displayarray['birthday']) && $displayarray['birthday'] != 0) {
$age = date("Y")-substr($displayarray['birthday'],0,4);
echo "<tr><th>Age</th><td>$age</td></tr>";
}
if(isset($displayarray['gender']) && $displayarray['gender'] != 0) {
$gender = ($displayarray['gender']== 1)? "Male" : "Female";
echo "<tr><th>Gender</th><td>".$gender."</td></tr>";
}
if($displayarray['location'] != "") {
echo "<tr><th>Location</th><td>".$displayarray['location']."</td></tr>";
}
?>
<tr>
<td colspan="2" class="empty"></td>
</tr>
<tr>
<td colspan="2"> <a href="?edit=user&uid=<?php echo $_GET['uid'];?>">&raquo; Change profile</a></td>
</tr>
<tr>
<td colspan="2"> <a href="?action=message&amp;id=<?php echo $_GET['uid'];?>">&raquo; Write message</a></td>
</tr>
<tr>
<td colspan="2"> <a href="?uid=<?php echo $_GET['uid'];?>&delete=<?php echo $_GET['uid'];?>&where=user">&raquo; Delete player</a></td>
</tr>
<tr>
<td colspan="2"> <a href="?log_login=<?php echo $_GET['uid'];?>">&raquo; Login Log</a></td>
</tr>
<tr>
<td colspan="2" class="desc2">
<div class="desc2div"><?php echo $displayarray['desc1']; ?></div>
</td>
</tr>
</table>
</table>
</td>
<td class="desc1" >
</td>
<td class="desc1" >
<?php echo $displayarray['desc2']; ?>
</td>
</td>
</tr>
</tbody>
</tr>
</tbody>
</table>
<br>
<table cellpadding="1" cellspacing="1" id="villages">
<thead>
<tr>
<th colspan="3">Villages</th>
</tr>
<tr>
<td>Name</td>
<thead>
<tr>
<th colspan="3">Villages</th>
</tr>
<tr>
<td>Name</td>
<td>Inhabitants</td>
<td>Coordinates</td>
</tr>
</thead><tbody>
<?php
if(count($varray)>0){
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>";
<td>Inhabitants</td>
<td>Coordinates</td>
</tr>
</thead><tbody>
<?php
if(count($varray)>0){
foreach($varray as $vil) {
}
}
else{
echo "<tr><td colspan=\"3\" class=\"none\">No village</td></tr>";
}
?>
</tbody></table>
$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>";
}
}
else{
echo "<tr><td colspan=\"3\" class=\"none\">No village</td></tr>";
}
?>
</tbody></table>
+97 -97
View File
@@ -1,111 +1,111 @@
<?php
<?php
$village = $database->getVillage($_GET['wref']);
?>
<div id="content" class="player" style="width:100%">
<table id="profile" cellpadding="1" cellspacing="1" >
<thead>
<tr>
<th colspan="2">Village: <a href="?wref=<?php echo $village['wref']; ?>"><?php echo $village['name']; ?></a> - user '<?php echo $village['owner']; ?>'</th>
</tr>
<tr>
<td>Details</td>
<td>Description</td>
<thead>
<tr>
<th colspan="2">Village: <a href="?wref=<?php echo $village['wref']; ?>"><?php echo $village['name']; ?></a> - user '<?php echo $village['owner']; ?>'</th>
</tr>
<tr>
<td>Details</td>
<td>Description</td>
</tr>
</thead><tbody>
<tr>
<td class="empty"></td><td class="empty"></td>
</tr>
<tr>
<td class="details">
<table cellpadding="0" cellspacing="0">
<tr>
</tr>
</thead><tbody>
<tr>
<td class="empty"></td><td class="empty"></td>
</tr>
<tr>
<td class="details">
<table cellpadding="0" cellspacing="0">
<tr>
<th>Wood</th>
<td><?php echo $village['wood']; ?></td>
</tr>
<tr>
<th>Clay</th>
<td><?php echo $village['clay']; ?></td>
</tr>
<th>Wood</th>
<td><?php echo $village['wood']; ?></td>
</tr>
<tr>
<th>Clay</th>
<td><?php echo $village['clay']; ?></td>
</tr>
<tr>
<th>Iron</th>
<td><?php echo $village['iron']; ?></td>
</tr>
<tr>
<th>Max store</th>
<td><?php echo $village['maxstore']; ?></td>
</tr>
<tr>
<th>Crop</th>
<td><?php echo $village['crop']; ?></td>
<tr>
<th>Iron</th>
<td><?php echo $village['iron']; ?></td>
</tr>
<tr>
<th>Max store</th>
<td><?php echo $village['maxstore']; ?></td>
</tr>
<tr>
<th>Crop</th>
<td><?php echo $village['crop']; ?></td>
</tr>
<tr>
<th>Max store</th>
<td><?php echo $village['maxcrop']; ?></td>
</tr>
<tr>
<th>Population</th>
<td><?php echo $village['pop']; ?></td>
</tr>
<tr>
<td colspan="2" class="empty"></td>
</tr>
<tr>
<td colspan="2"> <a href="?edit=user&uid=<?php echo $_GET['uid'];?>">&raquo; Change profile</a></td>
</tr>
<tr>
<td colspan="2"> <a href="?action=message&amp;id=<?php echo $_GET['uid'];?>">&raquo; Write message</a></td>
</tr>
<tr>
<td colspan="2"> <a href="#?uid=<?php echo $_GET['uid'];?>&delete=<?php echo $_GET['uid'];?>&where=user">&raquo; Delete player</a></td>
</tr>
</table>
</tr>
<tr>
<th>Max store</th>
<td><?php echo $village['maxcrop']; ?></td>
</tr>
<tr>
<th>Population</th>
<td><?php echo $village['pop']; ?></td>
</tr>
<tr>
<td colspan="2" class="empty"></td>
</tr>
<tr>
<td colspan="2"> <a href="?edit=user&uid=<?php echo $_GET['uid'];?>">&raquo; Change profile</a></td>
</tr>
<tr>
<td colspan="2"> <a href="?action=message&amp;id=<?php echo $_GET['uid'];?>">&raquo; Write message</a></td>
</tr>
<tr>
<td colspan="2"> <a href="#?uid=<?php echo $_GET['uid'];?>&delete=<?php echo $_GET['uid'];?>&where=user">&raquo; Delete player</a></td>
</tr>
</table>
</td>
<td class="details">
<table cellpadding="0" cellspacing="0">
<tr>
</td>
<td class="details">
<table cellpadding="0" cellspacing="0">
<tr>
<th>Capital</th>
<td><?php echo $village['capital']; ?></td>
</tr>
<tr>
<th>Clay</th>
<td><?php echo $village['clay']; ?></td>
</tr>
<th>Capital</th>
<td><?php echo $village['capital']; ?></td>
</tr>
<tr>
<th>Clay</th>
<td><?php echo $village['clay']; ?></td>
</tr>
<tr>
<th>Iron</th>
<td><?php echo $village['iron']; ?></td>
</tr>
<tr>
<th>Max store</th>
<td><?php echo $village['maxstore']; ?></td>
</tr>
<tr>
<th>Crop</th>
<td><?php echo $village['crop']; ?></td>
<tr>
<th>Iron</th>
<td><?php echo $village['iron']; ?></td>
</tr>
<tr>
<th>Max store</th>
<td><?php echo $village['maxstore']; ?></td>
</tr>
<tr>
<th>Crop</th>
<td><?php echo $village['crop']; ?></td>
</tr>
<tr>
<th>Max store</th>
<td><?php echo $village['maxcrop']; ?></td>
</tr>
<tr>
<th>Population</th>
<td><?php echo $village['pop']; ?></td>
</tr>
</table>
</tr>
<tr>
<th>Max store</th>
<td><?php echo $village['maxcrop']; ?></td>
</tr>
<tr>
<th>Population</th>
<td><?php echo $village['pop']; ?></td>
</tr>
</table>
</td>
</td>
</tr>
</tbody>
</table>
<br>
</tr>
</tbody>
</table>
<br>
<table id="villages" cellpadding="1" cellspacing="1">
<thead>
<tr>
@@ -124,13 +124,13 @@ $coor = $database->getCoor($vil['wref']);
if($vil['capital']==1) {$cap = '<span class="none3">(capital)</span>';} else{$cap = "";}
echo '
<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="aligned_coords">
<div class="cox">('.$coor['x'].'</div>
<div class="pi">|</div>
<div class="coy">'.$coor['y'].')</div>
</td>
</td>
</tr>'; }
?>
</tbody></table>
</tbody></table>
+21 -21
View File
@@ -7,29 +7,29 @@ $log = $database->getUser_log($_GET['log_login']);
<th colspan="10">User id <?php echo $_GET['log_login'];?> login log</th>
</tr>
<tr><td></td><td>Player</td><td>IP</td><td>Time</td><td></td></tr>
</thead><tbody>
<?php
if(count($log)>0) {
for ($i = 0; $i < count($log); $i++) {
</thead><tbody>
<?php
//$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(!$del){$del = '<td></td>';}
$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>";
}
if(count($log)>0) {
for ($i = 0; $i < count($log); $i++) {
}
else {
echo "<tr><td class=\"none\" colspan=\"7\">No logs</td></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>';
if(!$del){$del = '<td></td>';}
$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>
</table>
+16 -16
View File
@@ -1,4 +1,4 @@
<?php
<?php
#################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ##
@@ -11,7 +11,7 @@
#################################################################################
?>
<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>
<form action="" method="get">
@@ -20,29 +20,29 @@
<thead>
<tr>
<th colspan="6">Ban</th>
</tr>
</tr>
</thead>
<tbody>
<tr>
<td>User ID</td>
<td>
<td>User ID</td>
<td>
<input type="text" class="fm" name="uid" value="<?php echo $_GET['uid'];?>">
</td>
</td>
</tr>
<tr>
<td>Reason</td>
<td>
<select name="reason" class="fm">
<?php
$arr = array('Pushing','Cheat','Hack','Bug','Bad Name','Multi Account','Swearing');
<select name="reason" class="fm">
<?php
$arr = array('Pushing','Cheat','Hack','Bug','Bad Name','Multi Account','Swearing');
foreach($arr as $r)
{
echo '<option value="'.$r.'">'.$r.'</option>';
echo '<option value="'.$r.'">'.$r.'</option>';
}
?>
</select>
</td>
</tr>
</tr>
<tr>
<td>Duration</td>
<td>
@@ -61,10 +61,10 @@
echo '<option value="">Forever</option>';
?>
</select>
</td>
</td>
</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>
</tbody>
</table>
@@ -75,7 +75,7 @@ $bannedUsers = $admin->search_banned();
?>
<table id="member" cellpadding="1" cellspacing="1">
<thead>
<thead>
<tr>
<th colspan="6">Bannned Players (<?php echo count($bannedUsers); ?>)</th>
</tr>
@@ -101,7 +101,7 @@ $bannedUsers = $admin->search_banned();
{
$name = $database->getUserField($bannedUsers[$i]['uid'],'username',0);
$link = '<a href="?p=player&uid='.$bannedUsers[$i]['uid'].'">'.$name.'<a/>';
}
}
if($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>';
}
?>
</tbody>
</tbody>
</table>
+3 -3
View File
@@ -1,4 +1,4 @@
<?php
<?php
#################################################################################
## -= 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.
</br>
● 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.
</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.
</p>
+162 -162
View File
@@ -1,4 +1,4 @@
<?php
<?php
#################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ##
@@ -16,78 +16,78 @@ if ($_SESSON['access'] == MULTIHUNTER) die("<br /><br /><br /><br /><br /><br />
?>
<style>
.del {width:12px; height:12px; background-image: url(img/admin/icon/del.gif);}
</style>
.del {width:12px; height:12px; background-image: url(img/admin/icon/del.gif);}
</style>
<h2><center>Made by Dzoki</center></h2>
<table id="member">
<thead>
<tr>
<th>~ Server Settings ~</th>
</tr>
</thead>
</thead>
</table>
<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>
<table id="profile">
<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>
<td class="b">Variable</td>
<td class="b">Value</td>
</tr>
<tr>
<td>Troop Speed</td>
<td><?php echo INCREASE_SPEED;?>x</td>
</tr>
<td>Server Name</td>
<td><?php echo SERVER_NAME;?></td>
</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>
<td>Village Expanding Speed</td>
<td><?php if(CP == 0){ echo "Fast"; } else if(CP == 1){ echo "Slow"; } ?></td>
</tr>
<tr>
<td>Beginners Protection</td>
<td><?php echo (PROTECTION/3600);?> hour/s</td>
</tr>
<td><?php if(CP == 0){ echo "Fast"; } else if(CP == 1){ echo "Slow"; } ?></td>
</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>
<td>Beginners Protection</td>
<td><?php echo (PROTECTION/3600);?> hour/s</td>
</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>
<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>
</tr>
<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>
<td>Demolish - Level required</td>
<td><?php echo DEMOLISH_LEVEL_REQ; ?></td>
</tr>
<td>Demolish - Level required</td>
<td><?php echo DEMOLISH_LEVEL_REQ; ?></td>
</tr>
<tr>
<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>
</tr>
<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>
</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><?php if(PLUS_TIME >= 86400){ echo ''.(PLUS_TIME/86400).' Days'; } else if(PLUS_TIME < 86400){ echo ''.(PLUS_TIME/3600).' Hours'; } ?></td>
</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><?php if(PLUS_TIME >= 86400){ echo ''.(PLUS_TIME/86400).' Days'; } else if(PLUS_TIME < 86400){ echo ''.(PLUS_TIME/3600).' Hours'; } ?></td>
</tr>
<tr>
<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>
</tr>
<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>
</tr>
</table>
<table id="member">
@@ -96,60 +96,60 @@ if ($_SESSON['access'] == MULTIHUNTER) die("<br /><br /><br /><br /><br /><br />
<th>~ Log Settings ~</th>
</tr>
</thead>
</table>
<table id="profile">
</table>
<table id="profile">
<tr>
<td class="b">Variable</td>
<td class="b">Value</td>
</tr>
<tr>
<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>
</tr>
<tr>
<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>
</tr>
<tr>
<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>
</tr>
<tr>
<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>
</tr>
<tr>
<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>
</tr>
<tr>
<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>
</tr>
<tr>
<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>
</tr>
<tr>
<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>
</tr>
<td class="b">Variable</td>
<td class="b">Value</td>
</tr>
<tr>
<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>
</tr>
<tr>
<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>
</tr>
<tr>
<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>
</tr>
<tr>
<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>
</tr>
<tr>
<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>
</tr>
<tr>
<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>
</tr>
<tr>
<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>
</tr>
<tr>
<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>
</tr>
</table>
<table id="member">
<thead>
<tr>
<th>~ Newsbox Settings ~</th>
</tr>
</thead>
</table>
<table id="profile">
</table>
<table id="profile">
<tr>
<td class="b">Variable</td>
<td class="b">Value</td>
</tr>
<td class="b">Variable</td>
<td class="b">Value</td>
</tr>
<tr>
<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>
@@ -168,14 +168,14 @@ if ($_SESSON['access'] == MULTIHUNTER) die("<br /><br /><br /><br /><br /><br />
</tr>
<tr>
<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>
<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>
</table>
<table id="member">
<thead>
<tr>
@@ -183,38 +183,38 @@ if ($_SESSON['access'] == MULTIHUNTER) die("<br /><br /><br /><br /><br /><br />
</tr>
</thead>
</table>
<table id="profile">
<table id="profile">
<tr>
<td class="b">Variable</td>
<td class="b">Value</td>
</tr>
<tr>
<td>Hostname</td>
<td><?php echo SQL_SERVER;?></td>
</tr>
<td class="b">Variable</td>
<td class="b">Value</td>
</tr>
<tr>
<td>DB Username</td>
<td><?php echo SQL_USER;?></td>
</tr>
<td>Hostname</td>
<td><?php echo SQL_SERVER;?></td>
</tr>
<tr>
<td>DB Password</td>
<td>*********</td>
</tr>
<td>DB Username</td>
<td><?php echo SQL_USER;?></td>
</tr>
<tr>
<td>DB Name</td>
<td><?php echo SQL_DB;?></td>
</tr>
<td>DB Password</td>
<td>*********</td>
</tr>
<tr>
<td>Table Prefix</td>
<td><?php echo TB_PREFIX;?></td>
</tr>
<td>DB Name</td>
<td><?php echo SQL_DB;?></td>
</tr>
<tr>
<td>DB Type</td>
<td><?php if(DB_TYPE == 0) { echo "MYSQL"; } else if(DB_TYPE == 1) { echo "MYSQLi"; } ?></td>
</tr>
<td>Table Prefix</td>
<td><?php echo TB_PREFIX;?></td>
</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 id="member">
<thead>
<tr>
@@ -223,23 +223,23 @@ if ($_SESSON['access'] == MULTIHUNTER) die("<br /><br /><br /><br /><br /><br />
</thead>
</table>
<table id="profile">
<table id="profile">
<tr>
<td class="b">Variable</td>
<td class="b">Value</td>
</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>
<td class="b">Value</td>
</tr>
<tr>
<td>Max number of mails</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>
<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>
<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>
<td>Max number of mails</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>
<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 id="member">
@@ -249,32 +249,32 @@ if ($_SESSON['access'] == MULTIHUNTER) die("<br /><br /><br /><br /><br /><br />
</tr>
</thead>
</table>
<table id="profile">
<table id="profile">
<tr>
<td class="b">Variable</td>
<td class="b">Value</td>
</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>
<td class="b">Variable</td>
<td class="b">Value</td>
</tr>
<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>
<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>
<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
function define_array( $array, $keys = NULL )
{
foreach( $array as $key => $value )
{
$keyname = ($keys ? $keys . "_" : "") . $key;
if( is_array( $array[$key] ) )
define_array( $array[$key], $keyname );
else
define( $keyname, $value );
}
foreach( $array as $key => $value )
{
$keyname = ($keys ? $keys . "_" : "") . $key;
if( is_array( $array[$key] ) )
define_array( $array[$key], $keyname );
else
define( $keyname, $value );
}
}
//define_array($array);
?>
?>
+7 -7
View File
@@ -1,4 +1,4 @@
<?php
<?php
#################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ##
@@ -25,7 +25,7 @@ $nummedals = mysql_num_rows($sql);
<tr>
<th>Medal Information</th>
</tr>
</thead>
</thead>
</table>
<table id="profile">
<thead>
@@ -60,7 +60,7 @@ $nummedals = mysql_num_rows($sql);
<tr>
<th>Medal Week by Week</th>
</tr>
</thead>
</thead>
</table>
<table id="profile">
<thead>
@@ -94,7 +94,7 @@ $nummedals = mysql_num_rows($sql);
<tr>
<th>All Medals (<?php echo $nummedals; ?>)</th>
</tr>
</thead>
</thead>
</table>
<table id="profile">
<thead>
@@ -116,7 +116,7 @@ $nummedals = mysql_num_rows($sql);
{
$i = $i + 1;
$titel="Bonus";
switch ($row['categorie'])
switch ($row['categorie'])
{
case "1": $titel="Attackers"; break;
case "2": $titel="Defenders"; break;
@@ -129,11 +129,11 @@ $nummedals = mysql_num_rows($sql);
$points = $row['points'];
$bb = $row['id'];
$allyid = $row['allyid'];
$unq = "SELECT name FROM ".TB_PREFIX."alidata WHERE id = ".$allyid."";
$user = mysql_result(mysql_query($unq), 0);
$allyname = $user;
$alliance = '<a href="admin.php?p=alliance&aid='.$allyid.'">'.$allyname.'</a>';
echo"
<tr>
+13 -13
View File
@@ -1,4 +1,4 @@
<?php
<?php
#################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ##
@@ -11,8 +11,8 @@
if($_GET['uid'])
{
$user = $database->getUserArray($_GET['uid'],1);
$varray = $database->getProfileVillages($_GET['uid']);
$user = $database->getUserArray($_GET['uid'],1);
$varray = $database->getProfileVillages($_GET['uid']);
if($user)
{
$totalpop = 0;
@@ -21,13 +21,13 @@ if($_GET['uid'])
$totalpop += $vil['pop'];
} ?>
<style>
.del {width:12px; height:12px; background-image: url(img/admin/icon/del.gif);}
</style>
.del {width:12px; height:12px; background-image: url(img/admin/icon/del.gif);}
</style>
<form action="" method="post">
<input type="hidden" name="action" value="DelPlayer">
<input type="hidden" name="uid" value="<?php echo $user['id'];?>">
<input type="hidden" name="admid" id="admid" value="<?php echo $_SESSION['id']; ?>">
<table id="member">
<table id="member">
<thead>
<tr>
<th colspan="4">Delete player</th>
@@ -57,12 +57,12 @@ if($_GET['uid'])
</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>
<?php
<?php
$plus = date('d.m.Y H:i',$user['plus']);
echo $plus;
?>
</td>
</tr>
</tr>
<tr>
<td>Alliance:</td>
<td><?php echo $database->getAllianceName($user['alliance']);?></td>
@@ -80,7 +80,7 @@ if($_GET['uid'])
</tbody>
</table>
<br /><br /><font color="Red"><b>NOTICE: DELETE ALL PLAYER VILLAGES BELLOW BEFORE DELETING PLAYER!</font></b><br /><br />
<table id="profile">
<thead>
<tr>
@@ -89,7 +89,7 @@ if($_GET['uid'])
<th>Coordinates</th>
<th></th>
</tr>
<?php
<?php
for ($i = 0; $i <= count($varray)-1; $i++)
{
$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>('.$coorproc['x'].'|'.$coorproc['y'].')</td>
<td>'.$delLink.' </td>
</tr>';
}
</tr>';
}
?>
</thead>
</table>
@@ -120,4 +120,4 @@ else
{
include("404.tpl");
}
?>
?>
+9 -9
View File
@@ -1,4 +1,4 @@
<?php
<?php
#################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ##
@@ -26,7 +26,7 @@ $nummedals = mysql_num_rows($sql);
<tr>
<th>Medal Information</th>
</tr>
</thead>
</thead>
</table>
<table id="profile">
<thead>
@@ -61,7 +61,7 @@ $nummedals = mysql_num_rows($sql);
<tr>
<th>Medal Week by Week</th>
</tr>
</thead>
</thead>
</table>
<table id="profile">
<thead>
@@ -76,10 +76,10 @@ $nummedals = mysql_num_rows($sql);
for($j = 0; $j<$week; $j++)
{
$newweek = $j+1;
$sql = mysql_query("SELECT * FROM ".TB_PREFIX."medal WHERE week = $newweek");
$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>";
}
?>
@@ -99,7 +99,7 @@ $nummedals = mysql_num_rows($sql);
<tr>
<th>All Medals (<?php echo $nummedals; ?>)</th>
</tr>
</thead>
</thead>
</table>
<table id="profile">
<thead>
@@ -121,7 +121,7 @@ $nummedals = mysql_num_rows($sql);
{
$i = $i + 1;
$titel="Bonus";
switch ($row['categorie'])
switch ($row['categorie'])
{
case "1": $titel="Attackers"; break;
case "2": $titel="Defenders"; break;
@@ -142,11 +142,11 @@ $nummedals = mysql_num_rows($sql);
$points = $row['points'];
$bb = $row['id'];
$playerid = $row['userid'];
$unq = "SELECT username FROM ".TB_PREFIX."users where id = $playerid";
$user = mysql_result(mysql_query($unq), 0);
$username = $user;
$player = "<a href=\"admin.php?p=player&uid=".$playerid."\">$username</a>";
echo"
<tr>
+3 -3
View File
@@ -1,4 +1,4 @@
<?php
<?php
#################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ##
@@ -10,7 +10,7 @@
#################################################################################
if($_SESSION['access'] < ADMIN) die("Access Denied: You are not Admin!");
$id = $_SESSION['id'];
$id = $_SESSION['id'];
if(isset($_GET['uid']))
{
$sql = mysql_query("SELECT access FROM ".TB_PREFIX."users WHERE id = ".$_GET['uid']."");
@@ -59,7 +59,7 @@ if(isset($_GET['uid']))
</tbody>
</table>
</form><?php
if(isset($_GET['g']))
if(isset($_GET['g']))
{
echo '<br /><br /><font color="Red"><b>Players Access Changed</font></b>';
}
+1 -1
View File
@@ -11,7 +11,7 @@
$id = $_GET['uid'];
$uid = $_GET['uid'];
$user = $database->getUserArray($id,1);
$user = $database->getUserArray($id,1);
if(isset($id))
{
?>
+2 -2
View File
@@ -5,12 +5,12 @@ if(isset($_GET['uid']))
<form action="../GameEngine/Admin/Mods/editPassword.php" method="POST">
<input type="hidden" name="admid" id="admid" value="<?php echo $_SESSION['id']; ?>">
<input type="hidden" name="uid" id="uid" value="<?php echo $_GET['uid']; ?>">
<table id="profile" cellpadding="1" cellspacing="1" >
<thead>
<tr>
<th colspan="2">Player <a href="admin.php?p=player&uid=<?php echo $user['id'];?>"><?php echo $user['username'];?></a></th>
</tr>
</tr>
<tr>
<td></td>
<td>New Password</td>
+2 -2
View File
@@ -11,7 +11,7 @@
$id = $_GET['uid'];
$uid = $_GET['uid'];
$user = $database->getUserArray($id,1);
$user = $database->getUserArray($id,1);
if(isset($id))
{
?>
@@ -20,7 +20,7 @@ if(isset($id))
<input type="hidden" name="uid" value="<?php echo $uid; ?>" />
<input type="hidden" name="id" value="<?php echo $id; ?>" />
<br /><br />
<table id="profile">
<tbody>
<td class="details">
+1 -1
View File
@@ -11,7 +11,7 @@
$id = $_GET['uid'];
$uid = $_GET['uid'];
$user = $database->getUserArray($id,1);
$user = $database->getUserArray($id,1);
if(isset($id))
{
?>
+8 -8
View File
@@ -11,11 +11,11 @@
$id = $_GET['did'];
$village = $database->getVillage($id);
$user = $database->getUserArray($village['owner'],1);
$coor = $database->getCoor($village['wref']);
$varray = $database->getProfileVillages($village['owner']);
$user = $database->getUserArray($village['owner'],1);
$coor = $database->getCoor($village['wref']);
$varray = $database->getProfileVillages($village['owner']);
$type = $database->getVillageType($village['wref']);
$fdata = $database->getResourceLevel($village['wref']);
$fdata = $database->getResourceLevel($village['wref']);
if(isset($id))
{
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="did" id="did" value="<?php echo $_GET['did']; ?>">
<br />
<table id="member" cellpadding="1" cellspacing="1" >
<thead>
<tr>
<th colspan="4">Modify Resources</th>
</tr>
</tr>
<tr>
<td class="on">Resource</td>
<td class="hab">Amount</td>
<td class="hab">Maximum Capacity</td>
</tr>
</thead>
<tbody>
<tbody>
<tr>
<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>
@@ -68,7 +68,7 @@ if(isset($id))
</tr>
</tbody>
</table>
<br /><br />
<center><input type="image" src="../img/admin/b/ok1.gif" value="submit"></center>
</form><?php
+1 -1
View File
@@ -11,7 +11,7 @@
$id = $_GET['uid'];
$uid = $_GET['uid'];
$user = $database->getUserArray($id,1);
$user = $database->getUserArray($id,1);
if(isset($id))
{
?>
+11 -11
View File
@@ -1,4 +1,4 @@
<?php
<?php
#################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ##
@@ -12,11 +12,11 @@
$id = $_GET['uid'];
if(isset($id))
{
$user = $database->getUserArray($id,1);
{
$user = $database->getUserArray($id,1);
$varray = $database->getProfileVillages($id);
$varmedal = $database->getProfileMedal($id); ?>
<style type="text/css">
select.dropdown
{
@@ -34,7 +34,7 @@ if(isset($id))
<thead>
<tr>
<th colspan="2">Player <a href="admin.php?p=player&uid=<?php echo $user['id']; ?>"><?php echo $user['username']; ?></a></th>
</tr>
</tr>
<tr>
<td>Details</td>
<td>Description</td>
@@ -64,7 +64,7 @@ if(isset($id))
<td></td>
<td></td>
</tr>
<tr>
<th>Location</th>
<td><input class="fm" name="location" value="<?php echo $user['location']; ?>"></td>
@@ -115,7 +115,7 @@ if(isset($id))
foreach($varmedal as $medal)
{
$titel="Bonus";
switch ($medal['categorie'])
switch ($medal['categorie'])
{
case "1":
$titel="Attacker of the Week";
@@ -129,7 +129,7 @@ if(isset($id))
case "4":
$titel="Robber of the week";
break;
}
}
echo"
<tr>
<td> ".$titel."</td>
@@ -137,7 +137,7 @@ if(isset($id))
<td>".$medal['week']."</td>
<td>[#".$medal['id']."]</td>
</tr>";
}
}
?>
<tr>
<td>Beginners Protection</td>
@@ -162,10 +162,10 @@ if(isset($id))
</tr>
</tfoot>
</table>
</form><?php
</form><?php
}
else
{
echo "<br /><br />Not found. <a href=\"javascript: history.go(-1)\"> Go Back</a>";
}
}
?>
+18 -18
View File
@@ -11,11 +11,11 @@
$id = $_GET['did'];
$village = $database->getVillage($id);
$user = $database->getUserArray($village['owner'],1);
$coor = $database->getCoor($village['wref']);
$varray = $database->getProfileVillages($village['owner']);
$user = $database->getUserArray($village['owner'],1);
$coor = $database->getCoor($village['wref']);
$varray = $database->getProfileVillages($village['owner']);
$type = $database->getVillageType($village['wref']);
$fdata = $database->getResourceLevel($village['wref']);
$fdata = $database->getResourceLevel($village['wref']);
if(isset($id))
{
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="id" value="<?php echo $_GET['did']; ?>" />
<br />
<a href="#" onclick="showStuff('instructions'); return false;">Show Instructions</a>
<span id="instructions" style="display: none;">
<h4>Building ID's (Position)</h4>
@@ -40,13 +40,13 @@ if(isset($id))
?>
</div>
</div>
<div id="content" class="village2" style="padding: 0; margin-left: -20px;">
<div id="village_map" class="d2_0">
<?php
for($b =1; $b <21; $b++)
{
echo "<img src=\"../img/x.gif\" class=\"building d".$b." iso\">";
}
?>
@@ -60,7 +60,7 @@ if(isset($id))
</div>
</div>
</div>
<table id="member">
<thead>
<tr>
@@ -91,14 +91,14 @@ if(isset($id))
</table>
<a href="#" onclick="hideStuff('instructions'); return false;">Hide Instructions</a>
</span>
<br />
<table id="member" cellpadding="1" cellspacing="1" >
<thead>
<tr>
<th colspan="4">Modify Buildings</th>
</tr>
</tr>
<tr>
<td class="on">ID</td>
<td class="on">GID</td>
@@ -106,7 +106,7 @@ if(isset($id))
<td class="on">Level</td>
</tr>
</thead>
<tbody>
<tbody>
<?php
for ($i = 1; $i <= 40; $i++)
{
@@ -122,17 +122,17 @@ if(isset($id))
<tr>
<td class="on">'.$i.'</td>
<td class="on"><input class="fm" name="id'.$i.'gid" value="'.$fdata['f'.$i.'t'].'"></td>
<td class="hab">'.$bu.'</td>
<td class="on"><input class="fm" name="id'.$i.'level" value="'.$fdata['f'.$i].'"></td>
<td class="hab">'.$bu.'</td>
<td class="on"><input class="fm" name="id'.$i.'level" value="'.$fdata['f'.$i].'"></td>
</tr>';
}
?>
</tbody>
</table>
<br /><br />
<center><input type="image" src="../img/admin/b/ok1.gif" value="submit"></center>
<br />
<div id="content" class="village1" style="min-height: 264px;">
<div id="village_map" class="f<?php echo $database->getVillageType($village['wref']); ?>" style="float: left;">
@@ -148,9 +148,9 @@ if(isset($id))
</div>
</div>
<br />
<br /><br />
<div id="content" class="village2">
<h1><?php echo $village['name']; ?></h1>
<div id="village_map" class="d2_0">
+1 -1
View File
@@ -11,7 +11,7 @@
$id = $_GET['uid'];
$uid = $_GET['uid'];
$user = $database->getUserArray($id,1);
$user = $database->getUserArray($id,1);
if(isset($id))
{
?>
+2 -2
View File
@@ -1,4 +1,4 @@
<?php
<?php
#################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ##
@@ -49,7 +49,7 @@ $id = $_SESSION['id']; ?>
</form>
<?php
if(isset($_GET['g']))
if(isset($_GET['g']))
{
echo '<br /><br /><font color="Red"><b>Plus Given</font></b>';
}
+5 -5
View File
@@ -1,4 +1,4 @@
<?php
<?php
#################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ##
@@ -37,7 +37,7 @@ $id = $_SESSION['id']; ?>
</center>
</td>
</tr>
<tr>
<td>
<center>
@@ -50,7 +50,7 @@ $id = $_SESSION['id']; ?>
</center>
</td>
</tr>
<tr>
<td>
<center>
@@ -63,7 +63,7 @@ $id = $_SESSION['id']; ?>
</center>
</td>
</tr>
<tr>
<td>
<center>
@@ -88,7 +88,7 @@ $id = $_SESSION['id']; ?>
</form>
<?php
if(isset($_GET['g']))
if(isset($_GET['g']))
{
echo '<br /><br /><font color="Red"><b>Resource Bonuses Given</font></b>';
}
+2 -2
View File
@@ -1,4 +1,4 @@
<?php
<?php
#################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ##
@@ -50,7 +50,7 @@ $id = $_SESSION['id']; ?>
</form>
<?php
if(isset($_GET['g']))
if(isset($_GET['g']))
{
echo '<br /><br /><font color="Red"><b>Gold Added</font></b>';
}
+10 -10
View File
@@ -1,4 +1,4 @@
<?php
<?php
#################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ##
@@ -13,27 +13,27 @@
<font size="3">
<b>
<center>
WELCOME TO
<?php
WELCOME TO
<?php
if($_SESSION['access'] == MULTIHUNTER)
{
echo 'MULTIHUNTER';
}
}
else if($_SESSION['access'] == ADMIN)
{
echo 'ADMINISTRATOR';
} ?>
{
echo 'ADMINISTRATOR';
} ?>
CONTROL PANEL
</center>
</b>
</font>
<br /><br /><br /><br />
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 />
+1 -1
View File
@@ -1,4 +1,4 @@
<?php
<?php
#################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ##
+2 -2
View File
@@ -15,9 +15,9 @@
<thead>
<tr>
<th colspan="2">Reset All Players Gold</th>
</tr>
</tr>
</thead>
<tbody>
<tbody>
<tr>
<td class="hab" colspan="2"><center><input type="image" src="../img/admin/b/ok1.gif" value="submit"></center></td>
</tr>
+2 -2
View File
@@ -15,9 +15,9 @@
<thead>
<tr>
<th colspan="2">Reset All Players Resource Bonus</th>
</tr>
</tr>
</thead>
<tbody>
<tbody>
<tr>
<td class="hab" colspan="2"><center><input type="image" src="../img/admin/b/ok1.gif" value="submit"></center></td>
</tr>
@@ -15,9 +15,9 @@
<thead>
<tr>
<th colspan="2">Reset All Players Plus</th>
</tr>
</tr>
</thead>
<tbody>
<tbody>
<tr>
<td class="hab" colspan="2"><center><input type="image" src="../img/admin/b/ok1.gif" value="submit"></center></td>
</tr>
+11 -11
View File
@@ -1,4 +1,4 @@
<?php
<?php
#################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ##
@@ -20,23 +20,23 @@ comming soon
<?php
function line($x,$W){
$a = 0;
for ($i = 0; $i <= $x; $i++) {
for ($i = 0; $i <= $x; $i++) {
$X = $W.'-'.$i;
$c += 25;
$d = $W*25+25;
$b = 25*($W-1);
echo '<area shape="rect" coords="'.$a.','.$b.','.$c.','.$d.'" href="?x='.$W.'&y='.$i.'" alt="frames">';
$a += 25;
$c += 25;
$d = $W*25+25;
$b = 25*($W-1);
echo '<area shape="rect" coords="'.$a.','.$b.','.$c.','.$d.'" href="?x='.$W.'&y='.$i.'" alt="frames">';
$a += 25;
}
}
function map($x,$y){
for ($i = 0; $i <= $y; $i++) {
line($x,$i);
function map($x,$y){
for ($i = 0; $i <= $y; $i++) {
line($x,$i);
}
}
map(20,20);
+14 -14
View File
@@ -1,4 +1,4 @@
<?php
<?php
#################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ##
@@ -10,23 +10,23 @@
#################################################################################
?>
<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>
<link href="../<?php echo GP_LOCATE; ?>lang/en/compact.css?f4b7c" rel="stylesheet" type="text/css">
<table id="member" style="width:225px">
<thead>
<tr>
<th colspan="2">IGM/Reports</th>
</tr>
</thead>
<tr>
<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>
</tr>
<tr>
<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>
</tr>
<tr>
<th colspan="2">IGM/Reports</th>
</tr>
</thead>
<tr>
<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>
</tr>
<tr>
<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>
</tr>
</table>
<br>
+5 -5
View File
@@ -1,4 +1,4 @@
<?php
<?php
#################################################################################
## -= 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; ?>travian.css?e21d2" rel="stylesheet" type="text/css">
<link href="../<?php echo GP_LOCATE; ?>lang/en/lang.css?e21d2" rel="stylesheet" type="text/css">
<br />
<span class="b">Send To</span>: <?php echo $database->getUserField($msg[0]['target'],'username',0);?><br />
<div id="content" class="messages">
<h1>Messages</h1>
<div id="read_head" class="msg_head"></div>
+2 -2
View File
@@ -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>';
}
}
?>
+2 -2
View File
@@ -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>';
}
}
?>
+1 -1
View File
@@ -14,7 +14,7 @@
<td class="on">Time</td>
</tr>
</thead>
<tbody>
<tbody>
<?php
$sql = "SELECT * FROM ".TB_PREFIX."activate";
$result = mysql_query($sql);
+2 -2
View File
@@ -14,9 +14,9 @@
<thead>
<tr>
<th colspan="2">Populate Oases</th>
</tr>
</tr>
</thead>
<tbody>
<tbody>
<tr>
<td class="hab" colspan="2"><center><input type="image" src="../img/admin/b/ok1.gif" value="submit"></center></td>
</tr>
+32 -32
View File
@@ -1,4 +1,4 @@
<?php
<?php
#################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ##
@@ -10,28 +10,28 @@
#################################################################################
?>
<?php
$active = $admin->getUserActive();
$active = $admin->getUserActive();
?>
<style>
.del {width:12px; height:12px; background-image: url(img/admin/icon/del.gif);}
</style>
.del {width:12px; height:12px; background-image: url(img/admin/icon/del.gif);}
</style>
<table id="member">
<table id="member">
<thead>
<tr>
<th colspan="6">Online users (<?php echo count($active);?>)</th>
</tr>
</thead>
<tr>
<td>Name [access]</td>
<td>Time</td>
<td>Tribe</td>
<td>Pop</td>
<td>Villages</td>
<td>Gold</td>
</tr>
<?php
if($active){
<tr>
<th colspan="6">Online users (<?php echo count($active);?>)</th>
</tr>
</thead>
<tr>
<td>Name [access]</td>
<td>Time</td>
<td>Tribe</td>
<td>Pop</td>
<td>Villages</td>
<td>Gold</td>
</tr>
<?php
if($active){
for ($i = 0; $i <= count($active)-1; $i++) {
$uid = $database->getUserField($active[$i]['username'],'id',1);
$varray = $database->getProfileVillages($uid);
@@ -47,21 +47,21 @@ foreach($varray as $vil) {
$tribe = "Gaul";
}
echo '
<tr>
<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>'.$tribe.'</td>
<td>'.$totalpop.'</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>
</tr>
';
}
<tr>
<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>'.$tribe.'</td>
<td>'.$totalpop.'</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>
</tr>
';
}
}else{
echo '<tr><td colspan="6" class="hab">No online users</td></tr>';
}
}
?>
?>
</table>
+7 -7
View File
@@ -1,4 +1,4 @@
<?php
<?php
#################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ##
@@ -14,7 +14,7 @@ if(isset($id))
{
include("../GameEngine/Ranking.php");
$varmedal = $database->getProfileMedal($id);
$user = $database->getUserArray($id,1);
$user = $database->getUserArray($id,1);
$varray = $database->getProfileVillages($id);
$refreshicon = "<img src=\"data:image/png;base64,
iVBORw0KGgoAAAANSUhEUgAAAAkAAAAKCAIAAADpZ+PpAAAAAXNSR0IArs4c6QAAAARnQU1BAACx
@@ -35,18 +35,18 @@ if(isset($id))
echo "<br />";
$deletion = false;
if($deletion)
{
{
include("playerdeletion.tpl");
}
}
include("playerinfo.tpl");
include("playeradditionalinfo.tpl");
echo "<br />";
include("playermedals.tpl");
include ("villages.tpl"); ?>
<div style="float: left;">
<?php
<?php
include ('punish.tpl');
?>
</div>
@@ -55,7 +55,7 @@ if(isset($id))
include ('add_village.tpl');
?>
</div>
<?php
$sql = "SELECT * FROM ".TB_PREFIX."banlist WHERE uid = ".$id."";
$numbans = mysql_num_rows(mysql_query($sql));
+20 -20
View File
@@ -1,4 +1,4 @@
<table id="member">
<table id="member">
<thead>
<tr>
<th colspan="2">Additional Information</th>
@@ -8,7 +8,7 @@
<tr>
<td>Access</td>
<td>
<?php
<?php
if($user['access'] == 0)
{
echo "Banned";
@@ -32,7 +32,7 @@
<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>
</tr>
<?php
<?php
if($_SESSION['access'] == ADMIN)
{
if($_GET['g'] == 'ok')
@@ -53,9 +53,9 @@
<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>
</tr>
</form><?php
}
}
</form><?php
}
}
}
?>
<tr>
@@ -64,12 +64,12 @@
</tr>
<tr>
<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
if($user['sit1'] >= 1)
{
echo '<a href="admin.php?p=player&uid='.$user['sit1'].'">'.$database->getUserField($user['sit1'],"username",0).'</a>';
}
}
else if($user['sit1'] == 0)
{
echo 'No Sitter';
@@ -79,12 +79,12 @@
</tr>
<tr>
<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
if($user['sit2'] >= 1)
{
echo '<a href="admin.php?p=player&uid='.$user['sit2'].'">'.$database->getUserField($user['sit2'],"username",0).'</a>';
}
}
else if($user['sit2'] == 0)
{
echo 'No Sitter';
@@ -145,22 +145,22 @@
<tr>
<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>
<?php
<?php
echo round($user['cp'], 0);
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>
</tr>
<?php
<?php
if($_SESSION['access'] == ADMIN)
{
if($_GET['cp'] == 'ok')
{
echo '';
}
}
else
{
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>
</td>
</tr>
</form><?php
}
}
</form><?php
}
}
}
?>
<tr>
<td>Last Activity</td>
<td>
<?php
<?php
echo ''.date('d.m.Y H:i',$user['timestamp']+3600*2).'';
?>
</td>
@@ -224,7 +224,7 @@
<tr>
<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>
<?php
<?php
echo $user['apall'];
?>
</td>
+23 -23
View File
@@ -2,7 +2,7 @@
<thead>
<tr>
<th colspan="2">Player <a href="admin.php?p=player&uid=<?php echo $user['id'];?>"><?php echo $user['username'];?></a></th>
</tr>
</tr>
<tr>
<td>Details</td>
<td>Description</td>
@@ -23,11 +23,11 @@
<th>Tribe</th>
<td>
<?php
if($user['tribe'] == 1)
if($user['tribe'] == 1)
{
echo "Roman";
}
else if($user['tribe'] == 2)
else if($user['tribe'] == 2)
{
echo "Teutons";
}
@@ -38,7 +38,7 @@
else if($user['tribe'] == 4)
{
echo "Natars";
}
}
else if($user['tribe'] == 5)
{
echo "Nature";
@@ -46,7 +46,7 @@
?>
</td>
</tr>
<tr>
<tr>
<th>Alliance</th>
<td>
<?php
@@ -72,8 +72,8 @@
<tr>
<th>Age</td>
<td>
<?php
if(isset($user['birthday']) && $user['birthday'] != 0)
<?php
if(isset($user['birthday']) && $user['birthday'] != 0)
{
$age = date("Y")-substr($user['birthday'],0,4);
echo $age;
@@ -101,7 +101,7 @@
?>
</td>
</tr>
<tr>
<th>Username</th>
<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>
</td>
</tr>
<tr>
<th>Location</th>
<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>
</td>
</tr>
<tr>
<th>Password</th>
<td>
Change <a href="admin.php?p=editPassword&uid=<?php echo $id; ?>"><img src="../img/admin/edit.gif" title="Change Password"></a>
</td>
</tr>
<tr>
<?php include("playerplusbonus.tpl"); ?>
<tr>
@@ -140,7 +140,7 @@
<td>
<?php
$link = "<a href=\"mailto:".$user['email']."\">".$user['email']."</a>";
echo $link;
echo $link;
?>
</td>
</tr> */ ?>
@@ -185,7 +185,7 @@
<tr>
<td colspan="2" class="empty"></td>
</tr>
<?php
if($_SESSION['access'] == ADMIN)
{
@@ -195,7 +195,7 @@
<a href="?p=editUser&uid='.$user['id'].'"><font color="blue">&raquo;</font> Edit User</a>
</td>
</tr>';
}
}
else if($_SESSION['access'] == MULTIHUNTER)
{
echo '';
@@ -208,41 +208,41 @@
<a class="rn3" href="?p=deletion&uid='.$user['id'].'"><font color="red">&raquo;</font> Delete User</a>
</td>
</tr>';
}
}
else if($_SESSION['access'] == MULTIHUNTER)
{
echo '';
}
?>
<tr>
<td colspan="2"><a href="?p=ban&uid=<?php echo $user['id']; ?>">&raquo; Ban User</a></td>
</tr>
<tr>
<td colspan="2"><a href="?p=Newmessage&uid=<?php echo $user['id']; ?>">&raquo; Send Message</a></td>
</tr>
<tr>
<td colspan="2"><a href="?p=editPlus&uid=<?php echo $user['id']; ?>">&raquo; Edit Plus & Bonus</a></td>
</tr>
<tr>
<td colspan="2"><a href="?p=editSitter&uid=<?php echo $user['id']; ?>">&raquo; Edit Sitters</a></td>
</tr>
<tr>
<td colspan="2"><a href="?p=editWeek&uid=<?php echo $user['id']; ?>">&raquo; Edit Overall Off & Def</a></td>
</tr>
<tr>
<td colspan="2"><a href="?p=editOverall&uid=<?php echo $user['id']; ?>">&raquo; Edit Weekly Off, Def, Raid</a></td>
</tr>
<tr>
<td colspan="2"><a href="?p=userlogin&uid=<?php echo $user['id']; ?>">&raquo; User Login Log</a></td>
</tr>
<tr>
<td colspan="2"><a href="?p=userillegallog&uid=<?php echo $user['id']; ?>">&raquo; User Illegal Log</a></td>
</tr>
+7 -7
View File
@@ -1,7 +1,7 @@
<form action="../GameEngine/Admin/Mods/medals.php" method="POST">
<input type="hidden" name="uid" value="<?php echo $_GET['uid']; ?>">
<input type="hidden" name="admid" id="admid" value="<?php echo $_SESSION['id']; ?>">
<table id="profile">
<table id="profile">
<thead>
<tr>
<th colspan="6">Player Medals (<?php echo sizeof($varmedal); ?>)</th>
@@ -18,14 +18,14 @@
<?php
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)
{
foreach($varmedal as $medal)
foreach($varmedal as $medal)
{
$titel="Bonus";
switch ($medal['categorie'])
switch ($medal['categorie'])
{
case "1": $titel="Attackers"; break;
case "2": $titel="Defenders"; break;
@@ -46,7 +46,7 @@
$week = $medal['week'];
$points = $medal['points'];
if($points == '') { $points = "<p>Bonus</p>"; } else { $points = $points; }
echo"
<tr>
<td>$title</td>
@@ -59,7 +59,7 @@
</td>
</tr>";
}
$averagerank = 0;
foreach($varmedal as $medal)
{
@@ -78,7 +78,7 @@
}
}
$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>
+4 -4
View File
@@ -66,7 +66,7 @@
}
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>
@@ -104,7 +104,7 @@
}
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>
@@ -142,7 +142,7 @@
}
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>
@@ -180,7 +180,7 @@
}
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>
+4 -4
View File
@@ -1,4 +1,4 @@
<?php
<?php
#################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ##
@@ -13,8 +13,8 @@ $active = $admin->getUserActive();
?>
<style>
.del {width:12px; height:12px; background-image: url(img/admin/icon/del.gif);}
</style>
.del {width:12px; height:12px; background-image: url(img/admin/icon/del.gif);}
</style>
<form method="post" action="admin.php">
<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 type="hidden" name="admid" id="admid" value="<?php echo $_SESSION['id']; ?>">
<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>
</tr>
<tr>
+7 -7
View File
@@ -1,11 +1,11 @@
<?php
<?php
#################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ##
## Filename renameVillage.tpl ##
## Developed by: Dzoki & Advocatie ##
## License: TravianX Project ##
## Thanks to: Dzoki & itay2277(Edit troops) ##
## Thanks to: Dzoki & itay2277(Edit troops) ##
## Copyright: TravianX (c) 2010-2011. All rights reserved. ##
#################################################################################
@@ -16,16 +16,16 @@ $id = $_GET['did'];
if(isset($id))
{
$village = $database->getVillage($id);
$user = $database->getUserArray($village['owner'],1);
$coor = $database->getCoor($village['wref']);
$varray = $database->getProfileVillages($village['owner']);
$village = $database->getVillage($id);
$user = $database->getUserArray($village['owner'],1);
$coor = $database->getCoor($village['wref']);
$varray = $database->getProfileVillages($village['owner']);
$type = $database->getVillageType($village['wref']);
$fdata = $database->getResourceLevel($village['wref']);
$units = $database->getUnit($village['wref']);
?>
<table id="member">
<thead>
<thead>
<tr>
<th colspan="2">Edit Village Name</th>
</tr>
+2 -2
View File
@@ -1,4 +1,4 @@
<?php
<?php
#################################################################################
## -= 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);
$rep = mysql_fetch_assoc($result);
if($rep)
{
{
$att = $database->getUserArray($rep['uid'],1);
?>
<h1>Under Construction</h1>
+2 -2
View File
@@ -1,4 +1,4 @@
<?php
<?php
#################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ##
@@ -33,7 +33,7 @@ $id = $_SESSION['id']; ?>
</form>
<?php
if(isset($_GET['g']))
if(isset($_GET['g']))
{
echo '<br /><br /><font color="Red"><b>Plus For Everyone Reset</font></b>';
}
+2 -2
View File
@@ -1,4 +1,4 @@
<?php
<?php
#################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ##
@@ -33,7 +33,7 @@ $id = $_SESSION['id']; ?>
</form>
<?php
if(isset($_GET['g']))
if(isset($_GET['g']))
{
echo '<br /><br /><font color="Red"><b>Plus Resource Bonuses For Everyone Reset</font></b>';
}
+28 -28
View File
@@ -1,4 +1,4 @@
<?php
<?php
#################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ##
@@ -14,38 +14,38 @@ $result = $admin->search_alliance($_POST['s']);
?>
<table id="member">
<thead>
<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>
</tr>
</thead>
<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>
</tr>
</thead>
</table>
<table id="profile">
<tr>
<td class="b">AID</td>
<td class="b">Name</td>
<td class="b">Tag</td>
<td class="b">Founder</td>
</tr>
<?php
if($result){
for ($i = 0; $i <= count($result)-1; $i++) {
<table id="profile">
<tr>
<td class="b">AID</td>
<td class="b">Name</td>
<td class="b">Tag</td>
<td class="b">Founder</td>
</tr>
<?php
if($result){
for ($i = 0; $i <= count($result)-1; $i++) {
echo '
<tr>
<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]["tag"].'</a></td>
<td><a href="?p=player&uid='.$result[$i]["id"].'">'.$database->getUserField($result[$i]["leader"],'username',0).'</a></td>
</tr>
';
<tr>
<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]["tag"].'</a></td>
<td><a href="?p=player&uid='.$result[$i]["id"].'">'.$database->getUserField($result[$i]["leader"],'username',0).'</a></td>
</tr>
';
}}
else{
else{
echo '
<tr>
<td colspan="4">No results</td>
</tr>
<tr>
<td colspan="4">No results</td>
</tr>
';
}
?>
?>
</table>
+26 -26
View File
@@ -1,4 +1,4 @@
<?php
<?php
#################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ##
@@ -14,36 +14,36 @@ $result = $admin->search_email($_POST['s']);
?>
<table id="member">
<thead>
<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>
</tr>
</thead>
<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>
</tr>
</thead>
</table>
<table id="profile">
<tr>
<td class="b">UID</td>
<td class="b">Name</td>
<td class="b">Email</td>
</tr>
<?php
if($result){
for ($i = 0; $i <= count($result)-1; $i++) {
<table id="profile">
<tr>
<td class="b">UID</td>
<td class="b">Name</td>
<td class="b">Email</td>
</tr>
<?php
if($result){
for ($i = 0; $i <= count($result)-1; $i++) {
echo '
<tr>
<td>'.$result[$i]["id"].'</td>
<td><a href="?p=player&uid='.$result[$i]["id"].'">'.$database->getUserField($result[$i]["id"],'username',0).'</a></td>
<td>'.$result[$i]["email"].'</td>
</tr>
';
<tr>
<td>'.$result[$i]["id"].'</td>
<td><a href="?p=player&uid='.$result[$i]["id"].'">'.$database->getUserField($result[$i]["id"],'username',0).'</a></td>
<td>'.$result[$i]["email"].'</td>
</tr>
';
}}
else{
else{
echo '
<tr>
<td colspan="4">No results</td>
</tr>
<tr>
<td colspan="4">No results</td>
</tr>
';
}
?>
?>
</table>
+37 -37
View File
@@ -1,4 +1,4 @@
<?php
<?php
#################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ##
@@ -11,53 +11,53 @@
?>
<?php
$result = $admin->search_ip($_POST['s']);
$newArray = array();
$newArray = array();
function arr($arr,$el){
global $newArray;
for ($i = 0; $i <= count($arr)-1; $i++) {
if(in_array($el,$newArray)){
return false;
}else{
array_push($newArray,$el);
return true;
}
if(in_array($el,$newArray)){
return false;
}else{
array_push($newArray,$el);
return true;
}
}
}
}
?>
<table id="member">
<thead>
<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>
</tr>
</thead>
<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>
</tr>
</thead>
</table>
<table id="profile">
<tr>
<td class="b">IP</td>
<td class="b">Name</td>
</tr>
<?php
if($result){
for ($i = 0; $i <= count($result)-1; $i++) {
if(arr($result,$result[$i]["ip"].$result[$i]["uid"])){
<table id="profile">
<tr>
<td class="b">IP</td>
<td class="b">Name</td>
</tr>
<?php
if($result){
for ($i = 0; $i <= count($result)-1; $i++) {
if(arr($result,$result[$i]["ip"].$result[$i]["uid"])){
echo '
<tr>
<td>'.$result[$i]["ip"].'</td>
<td><a href="?p=player&uid='.$result[$i]["uid"].'">'.$database->getUserField($result[$i]["uid"],'username',0).'</a></td>
</tr>
';
}
}
}
else{
echo '
<tr>
<td colspan="4">No results</td>
</tr>
<tr>
<td>'.$result[$i]["ip"].'</td>
<td><a href="?p=player&uid='.$result[$i]["uid"].'">'.$database->getUserField($result[$i]["uid"],'username',0).'</a></td>
</tr>
';
}
?>
}
}
else{
echo '
<tr>
<td colspan="4">No results</td>
</tr>
';
}
?>
</table>
+28 -28
View File
@@ -1,4 +1,4 @@
<?php
<?php
#################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ##
@@ -14,43 +14,43 @@ $result = $admin->search_player($_POST['s']);
?>
<table id="member">
<thead>
<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>
</tr>
</thead>
<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>
</tr>
</thead>
</table>
<table id="profile">
<tr>
<td class="b">UID</td>
<td class="b">Player</td>
<td class="b">Villages</td>
<td class="b">Pop</td>
</tr>
<?php
if($result){
for ($i = 0; $i <= count($result)-1; $i++) {
<table id="profile">
<tr>
<td class="b">UID</td>
<td class="b">Player</td>
<td class="b">Villages</td>
<td class="b">Pop</td>
</tr>
<?php
if($result){
for ($i = 0; $i <= count($result)-1; $i++) {
$varray = $database->getProfileVillages($result[$i]["id"]);
$totalpop = 0;
foreach($varray as $vil) {
$totalpop += $vil['pop'];
}
echo '
<tr>
<td>'.$result[$i]["id"].'</td>
<td><a href="?p=player&uid='.$result[$i]["id"].'">'.$result[$i]["username"].'</a></td>
<td>'.count($varray).'</td>
<td>'.$totalpop.'</td>
</tr>
';
<tr>
<td>'.$result[$i]["id"].'</td>
<td><a href="?p=player&uid='.$result[$i]["id"].'">'.$result[$i]["username"].'</a></td>
<td>'.count($varray).'</td>
<td>'.$totalpop.'</td>
</tr>
';
}}
else{
else{
echo '
<tr>
<td colspan="4">No results</td>
</tr>
<tr>
<td colspan="4">No results</td>
</tr>
';
}
?>
?>
</table>
+6 -6
View File
@@ -1,4 +1,4 @@
<?php
<?php
#################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ##
@@ -35,15 +35,15 @@ $result = $admin->search_village($_POST['s']);
<tr>
<td style="background-color: #F3F3F3;">ID</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;"></th>
</tr>
</thead>
<tbody>
<?php
<?php
if($result)
{
{
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>';
@@ -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>'.$result[$i]["pop"].'</td>
<td>'.$delLink.'</td>
</tr>';
</tr>';
}
echo '
<tr>
@@ -71,7 +71,7 @@ $result = $admin->search_village($_POST['s']);
</tr>';
}
else
{
{
echo '
<tr>
<td></td>
+3 -3
View File
@@ -1,4 +1,4 @@
<?php
<?php
#################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ##
@@ -17,9 +17,9 @@
<tr>
<th colspan="3">Search v1.0</th>
</tr>
</thead>
</thead>
<tr class="slr3">
<td>
<td>
<select name="p" size="1" class="slr3">
<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>
+11 -11
View File
@@ -1,4 +1,4 @@
<?php
<?php
#################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ##
@@ -10,11 +10,11 @@
## ##
#################################################################################
if($user['tribe'] == 1)
if($user['tribe'] == 1)
{
$tribename = "Roman";
}
else if($user['tribe'] == 2)
else if($user['tribe'] == 2)
{
$tribename = "Teutons";
}
@@ -25,7 +25,7 @@ else if($user['tribe'] == 3)
else if($user['tribe'] == 4)
{
$tribename = "Nature";
}
}
else if($user['tribe'] == 5)
{
$tribename ="Natars";
@@ -40,27 +40,27 @@ foreach($varray as $vil)
$totalpop += $vil['pop'];
}
?>
<form action="" method="post">
<form action="" method="post">
<table id="member">
<thead>
<tr>
<th colspan="3">Search <font color="red">("<?php echo $user['username']; ?>" = <?php echo $numsimplayers; ?> Similar)</font></th>
</tr>
</thead>
</table>
</thead>
</table>
<center>
<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: 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>
<?php
if($_GET['did'])
{ ?>
{ ?>
<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: 9pt;"><b>Coordinates:</b> (<?php echo $coor['x'];?>|<?php echo $coor['y'];?>) | <b>Inhabitants</b>: <?php echo $village['pop'];?>
</div><?php
</div><?php
} ?>
</center>
</form>
+177 -177
View File
@@ -1,182 +1,182 @@
<?php
#################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ##
## Filename server_info.tpl ##
## Developed by: Dzoki ##
## License: TravianX Project ##
## Copyright: TravianX (c) 2010-2011. All rights reserved. ##
## Enhanced: aggenkeech ##
#################################################################################
<?php
#################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ##
## Filename server_info.tpl ##
## Developed by: Dzoki ##
## License: TravianX Project ##
## Copyright: TravianX (c) 2010-2011. All rights reserved. ##
## Enhanced: aggenkeech ##
#################################################################################
$tribe1 = mysql_query("SELECT SQL_CACHE * FROM ".TB_PREFIX."users WHERE tribe = 1");
$tribe2 = mysql_query("SELECT SQL_CACHE * FROM ".TB_PREFIX."users WHERE tribe = 2");
$tribe3 = mysql_query("SELECT SQL_CACHE * FROM ".TB_PREFIX."users WHERE tribe = 3");
$tribes = Array(mysql_num_rows($tribe1),mysql_num_rows($tribe2),mysql_num_rows($tribe3));
$users = mysql_num_rows(mysql_query("SELECT SQL_CACHE * FROM ".TB_PREFIX."users")) - 1;
?>
$tribe1 = mysql_query("SELECT SQL_CACHE * FROM ".TB_PREFIX."users WHERE tribe = 1");
$tribe2 = mysql_query("SELECT SQL_CACHE * FROM ".TB_PREFIX."users WHERE tribe = 2");
$tribe3 = mysql_query("SELECT SQL_CACHE * FROM ".TB_PREFIX."users WHERE tribe = 3");
$tribes = Array(mysql_num_rows($tribe1),mysql_num_rows($tribe2),mysql_num_rows($tribe3));
$users = mysql_num_rows(mysql_query("SELECT SQL_CACHE * FROM ".TB_PREFIX."users")) - 1;
?>
<br /><br />
<table id="profile">
<thead>
<tr>
<th colspan="2">Player Information</th>
</tr>
</thead>
<tbody>
<tr>
<td>Registered players</td>
<td><?php echo $users; ?></td>
</tr>
<tr>
<td>Active players</td>
<td><?php $result = mysql_query("SELECT SQL_CACHE * FROM ".TB_PREFIX."active"); $num_rows = mysql_num_rows($result); echo $num_rows; ?></td>
</tr>
<tr>
<td>Players online</td>
<td><?php $t =time();
$result = mysql_query("SELECT SQL_CACHE * FROM ".TB_PREFIX."users WHERE ".$t." - timestamp < 300") or die(mysql_error());;
$num_rows = mysql_num_rows($result);
echo $num_rows;?>
</td>
</tr>
<tr>
<td>Players Banned</td>
<td><?php
$result = mysql_query("SELECT SQL_CACHE * FROM ".TB_PREFIX."users WHERE access = 0");
$num_rows = mysql_num_rows($result);
echo $num_rows;?>
</td>
</tr>
<tr>
<td>Villages settled</td>
<td><?php
$result = mysql_query("SELECT SQL_CACHE * FROM ".TB_PREFIX."vdata");
$num_rows = mysql_num_rows($result);
echo $num_rows; ?>
</td>
</tr>
</tbody>
</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">
<thead>
<tr>
<th colspan="2">Player Information</th>
</tr>
</thead>
<tbody>
<tr>
<td>Registered players</td>
<td><?php echo $users; ?></td>
</tr>
<tr>
<td>Active players</td>
<td><?php $result = mysql_query("SELECT SQL_CACHE * FROM ".TB_PREFIX."active"); $num_rows = mysql_num_rows($result); echo $num_rows; ?></td>
</tr>
<tr>
<td>Players online</td>
<td><?php $t =time();
$result = mysql_query("SELECT SQL_CACHE * FROM ".TB_PREFIX."users WHERE ".$t." - timestamp < 300") or die(mysql_error());;
$num_rows = mysql_num_rows($result);
echo $num_rows;?>
</td>
</tr>
<tr>
<td>Players Banned</td>
<td><?php
$result = mysql_query("SELECT SQL_CACHE * FROM ".TB_PREFIX."users WHERE access = 0");
$num_rows = mysql_num_rows($result);
echo $num_rows;?>
</td>
</tr>
<tr>
<td>Villages settled</td>
<td><?php
$result = mysql_query("SELECT SQL_CACHE * FROM ".TB_PREFIX."vdata");
$num_rows = mysql_num_rows($result);
echo $num_rows; ?>
</td>
</tr>
</tbody>
</table>
<br />
<br />
<table id="profile">
<thead>
<tr>
<th colspan="3">Server Information</th>
</tr>
<td class="b"></td>
<td class="b">Total</td>
<td class="b">Average</td>
</thead>
<tbody>
<tr>
<td><img src="../../<?php echo GP_LOCATE; ?>img/a/gold.gif" alt="Gold" title="Gold"> Gold</td>
<td><?php $gold = mysql_query("SELECT SUM(gold) AS sumofgold FROM ".TB_PREFIX."users"); $getgold=mysql_fetch_assoc($gold); echo $getgold['sumofgold']; ?></td>
<td><?php $gold = mysql_query("SELECT SUM(gold) AS sumofgold FROM ".TB_PREFIX."users"); $getgold=mysql_fetch_assoc($gold); echo round($getgold['sumofgold'] / $users);?></td>
</tr>
</tbody>
</table>
</div>
<table id="member">
<thead>
<tr>
<th colspan="10">Troops on the Server</th>
</tr>
<?php
for($i=1; $i<11; $i++)
{
echo '<td class="on"><img src="../../'.GP_LOCATE.'img/u/'.$i.'.gif"></td>';
}
echo '</thead><tbody>';
for($i=1; $i<11; $i++)
{
$t = mysql_query("SELECT SUM(u".$i.") AS sumof FROM ".TB_PREFIX."units");
$troop = mysql_fetch_assoc($t);
echo '<td class="on">'.$troop['sumof'].'</td>';
}
echo "</tr>";
for($i=11; $i<21; $i++)
{
echo '<td class="on"><img src="../../'.GP_LOCATE.'img/u/'.$i.'.gif"></td>';
}
echo '</thead><tbody>';
for($i=11; $i<21; $i++)
{
$t = mysql_query("SELECT SUM(u".$i.") AS sumof FROM ".TB_PREFIX."units");
$troop = mysql_fetch_assoc($t);
echo '<td class="on">'.$troop['sumof'].'</td>';
}
echo "</tr>";
for($i=21; $i<31; $i++)
{
echo '<td class="on"><img src="../../'.GP_LOCATE.'img/u/'.$i.'.gif"></td>';
}
echo '</thead><tbody>';
for($i=21; $i<31; $i++)
{
$t = mysql_query("SELECT SUM(u".$i.") AS sumof FROM ".TB_PREFIX."units");
$troop = mysql_fetch_assoc($t);
echo '<td class="on">'.$troop['sumof'].'</td>';
}
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>
<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 />
<table id="profile">
<thead>
<tr>
<th colspan="3">Server Information</th>
</tr>
<td class="b"></td>
<td class="b">Total</td>
<td class="b">Average</td>
</thead>
<tbody>
<tr>
<td><img src="../../<?php echo GP_LOCATE; ?>img/a/gold.gif" alt="Gold" title="Gold"> Gold</td>
<td><?php $gold = mysql_query("SELECT SUM(gold) AS sumofgold FROM ".TB_PREFIX."users"); $getgold=mysql_fetch_assoc($gold); echo $getgold['sumofgold']; ?></td>
<td><?php $gold = mysql_query("SELECT SUM(gold) AS sumofgold FROM ".TB_PREFIX."users"); $getgold=mysql_fetch_assoc($gold); echo round($getgold['sumofgold'] / $users);?></td>
</tr>
</tbody>
</table>
</div>
<table id="member">
<thead>
<tr>
<th colspan="10">Troops on the Server</th>
</tr>
<?php
for($i=1; $i<11; $i++)
{
echo '<td class="on"><img src="../../'.GP_LOCATE.'img/u/'.$i.'.gif"></td>';
}
echo '</thead><tbody>';
for($i=1; $i<11; $i++)
{
$t = mysql_query("SELECT SUM(u".$i.") AS sumof FROM ".TB_PREFIX."units");
$troop = mysql_fetch_assoc($t);
echo '<td class="on">'.$troop['sumof'].'</td>';
}
echo "</tr>";
for($i=11; $i<21; $i++)
{
echo '<td class="on"><img src="../../'.GP_LOCATE.'img/u/'.$i.'.gif"></td>';
}
echo '</thead><tbody>';
for($i=11; $i<21; $i++)
{
$t = mysql_query("SELECT SUM(u".$i.") AS sumof FROM ".TB_PREFIX."units");
$troop = mysql_fetch_assoc($t);
echo '<td class="on">'.$troop['sumof'].'</td>';
}
echo "</tr>";
for($i=21; $i<31; $i++)
{
echo '<td class="on"><img src="../../'.GP_LOCATE.'img/u/'.$i.'.gif"></td>';
}
echo '</thead><tbody>';
for($i=21; $i<31; $i++)
{
$t = mysql_query("SELECT SUM(u".$i.") AS sumof FROM ".TB_PREFIX."units");
$troop = mysql_fetch_assoc($t);
echo '<td class="on">'.$troop['sumof'].'</td>';
}
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>
+14 -14
View File
@@ -66,7 +66,7 @@
else if($units['u29'] > 0){$u29 = '<font color="black">'.$units['u29'].'';}
if($units['u30'] == 0){$u30 = '<font color="gray">'.$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'].'';}
else if($units['u31'] > 0){$u31 = '<font color="black">'.$units['u31'].'';}
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'].'';}
if($units['u39'] == 0){$u39 = '<font color="gray">'.$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'].'';}
else if($units['u40'] > 0){$u40 = '<font color="black">'.$units['u40'].'';}
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'].'';}
if($units['u50'] == 0){$u50 = '<font color="gray">'.$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)
{
echo '
</tr></thead><tbody>
</tr></thead><tbody>
<tr>
<td><center /><img src="../img/un/u/1.gif"></img></td>
<td><center /><img src="../img/un/u/2.gif"></img></td>
@@ -143,7 +143,7 @@
else if($user['tribe'] == 2)
{
echo '
</tr></thead><tbody>
</tr></thead><tbody>
<tr>
<td><center /><img src="../img/un/u/11.gif"></img></td>
<td><center /><img src="../img/un/u/12.gif"></img></td>
@@ -173,7 +173,7 @@
else if($user['tribe'] == 3)
{
echo '
</tr></thead><tbody>
</tr></thead><tbody>
<tr>
<td><center /><img src="../img/un/u/21.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/30.gif"></img></td>
</tr>
<tr>
<td><center />'.$u21.'</td>
<td><center />'.$u22.'</td>
@@ -205,7 +205,7 @@
else if($user['tribe'] == 4)
{
echo '
</tr></thead><tbody>
</tr></thead><tbody>
<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/32.gif"></img></td>
@@ -235,7 +235,7 @@
else if($user['tribe'] == 5)
{
echo '
</tr></thead><tbody>
</tr></thead><tbody>
<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/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/50.gif"></img></td>
</tr>
<tr>
<td><center />'.$u41.'</td>
<td><center />'.$u42.'</td>
@@ -270,7 +270,7 @@
<?php
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>';
}
?>
+2 -2
View File
@@ -1,4 +1,4 @@
<?php
<?php
#################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ##
@@ -62,7 +62,7 @@ $id = $_SESSION['id']; ?>
</form>
<?php
if(isset($_GET['g']))
if(isset($_GET['g']))
{
echo '<br /><br /><font color="Red"><b>Gold Added</font></b>';
}
+1 -1
View File
@@ -15,7 +15,7 @@ if(isset($id))
<td>Description</td>
</tr>
</thead>
<tbody>
<tbody>
<?php
$sql = "SELECT * FROM ".TB_PREFIX."illegal_log WHERE user = $id";
$result = mysql_query($sql);
+1 -1
View File
@@ -15,7 +15,7 @@ if(isset($id))
<td>IP</td>
</tr>
</thead>
<tbody>
<tbody>
<?php
$sql = "SELECT * FROM ".TB_PREFIX."login_log WHERE uid = $id";
$result = mysql_query($sql);
+35 -35
View File
@@ -1,4 +1,4 @@
<?php
<?php
#################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ##
@@ -48,28 +48,28 @@ if(isset($id))
91l+gRNDLzw6f+nepcsPrl14cPXW8wcMWqVaEYdtPdZYubUHww0AMs5cusygU68UtVUr87CPWbdd
9Ly83TcO7Lq2I7ozoXfZTAalCjWZemnlaYo2u0wVFkoJdwoyZDOZNDi//vqRwbkjac+dC827p2h3
Gyh3S6m0a0Qszrnz6RnQWAAxV5tT/VAiNQAAAABJRU5ErkJggg==";
class Generator
class Generator
{
public function getMapCheck($wref)
public function getMapCheck($wref)
{
return substr(md5($wref),5,2);
}
};
$generator = new Generator;
if($village and $user)
{
{
include("search2.tpl"); ?>
<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>
<link href="../<?php echo GP_LOCATE; ?>lang/en/compact.css?f4b7c" rel="stylesheet" type="text/css">
<br />
<table id="profile" cellpadding="1" cellspacing="1" >
<thead>
<tr>
<th colspan="3">Village Information</th>
</tr>
</tr>
</thead>
<tbody>
<tr>
@@ -107,8 +107,8 @@ if(isset($id))
<tr>
<td>Field type</td>
<td colspan="2">
<?php
for ($i = 0; $i <= 3; $i++)
<?php
for ($i = 0; $i <= 3; $i++)
{
$a = $i+1;
if($i != 3)
@@ -118,7 +118,7 @@ if(isset($id))
else
{
echo $typ[$i].'x <img src="../img/admin/r/'.$a.'.gif"> ';
}
}
}
?>
</td>
@@ -178,7 +178,7 @@ if(isset($id))
</tbody>
</table>
<table id="member">
<thead>
<tr>
@@ -221,19 +221,19 @@ if(isset($id))
</tr>
</tbody>
</table>
<table id="member" cellpadding="1" cellspacing="1" >
<thead>
<tr>
<th colspan="6">Oases</th>
</tr>
</tr>
<tr>
<td class="ra"></td>
<td class="hab">Name</td>
<td class="hab">Coordinates</td>
<td class="hab">Coordinates</td>
<td class="hab">Loyalty</td>
<td class="hab">Resources</td>
</tr>
</tr>
</thead>
<tbody>
<?php
@@ -278,7 +278,7 @@ if(isset($id))
$oasiswref = $row['wref'];
$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);
$type = $row['type'];
if($type==1) { $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\">$type</td>
</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)
{
@@ -309,15 +309,15 @@ if(isset($id))
?>
</tbody>
</table>
<?php
include('troops.tpl');
?>
<?php
##include('troopUpgrades.tpl');
?>
<a href="admin.php?p=editVillage&did=<?php echo $_GET['did']; ?>" title="Edit Village">
<div id="content" class="village1" style="min-height: 264px;">
@@ -410,21 +410,21 @@ if(isset($id))
<!--<table id="member" cellpadding="1" cellspacing="1" >
<thead>
<thead>
<tr>
<th colspan="4">Resources</th>
</tr>
</tr>
<tr>
<td class="hab">Resource</td>
<td class="hab" colspan="2">Warehouse</td>
</tr>
<td class="hab" colspan="2">Warehouse</td>
</tr>
</thead>
<tbody>
<tbody>
<tr>
<td><img src="../img/admin/r/1.gif"> Lumber</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>
<td><img src="../img/admin/r/2.gif"> Clay</td>
@@ -432,14 +432,14 @@ if(isset($id))
</tr>
<tr>
<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>
<td><img src="../img/admin/r/4.gif"> 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>
</tbody>
</tbody>
</table>-->
@@ -454,7 +454,7 @@ if(isset($id))
<thead>
<tr>
<th colspan="5">Buildings</th>
</tr>
</tr>
<tr>
<td class="on">ID</td>
<td class="on">GID</td>
@@ -463,7 +463,7 @@ if(isset($id))
<td class="on">Edit</td>
</tr>
</thead>
<tbody>
<tbody>
<?php
for ($i = 1; $i <= 40; $i++)
{
@@ -479,13 +479,13 @@ if(isset($id))
<tr>
<td class="on">'.$i.'</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"><a href="admin.php?p=editVillage&did='.$_GET['did'].'"><img src="../img/admin/edit.gif" title="Edit Building & Level"></a></td>
</tr>';
}
?>
</tbody>
}
?>
</tbody>
</table>
<br /><br />
+25 -25
View File
@@ -1,4 +1,4 @@
<?php
<?php
#################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ##
@@ -10,30 +10,30 @@
#################################################################################
?>
<style>
.del {width:12px; height:12px; background-image: url(img/admin/icon/del.gif);}
</style>
.del {width:12px; height:12px; background-image: url(img/admin/icon/del.gif);}
</style>
<table id="member">
<thead>
<tr>
<th>Villages</th>
</tr>
</thead>
<tr>
<th>Villages</th>
</tr>
</thead>
</table>
<table id="profile">
<tr>
<td>Name</td>
<td>Population</td>
<td>Coordinates</td>
<table id="profile">
<tr>
<td>Name</td>
<td>Population</td>
<td>Coordinates</td>
<td>Add Troops</td>
<td></td>
</tr>
<?php
</tr>
<?php
for ($i = 0; $i <= count($varray)-1; $i++) {
$coorproc = $database->getCoor($varray[$i]['wref']);
if($varray[$i]['capital']){
$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{
$capital = '';
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>';
echo '
<tr>
<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>('.$coorproc['x'].'|'.$coorproc['y'].')</td>
<tr>
<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>('.$coorproc['x'].'|'.$coorproc['y'].')</td>
<td>'.$addTroops.' </td>
<td>'.$delLink.' </td>
</tr>
';
}
</tr>
';
}
?>
</table>
?>
</table>
-4
View File
@@ -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
View File
@@ -18,7 +18,7 @@ include("../GameEngine/Data/buidata.php");
class timeFormatGenerator
{
public function getTimeFormat($time)
public function getTimeFormat($time)
{
$min = 0;
$hr = 0;
@@ -38,12 +38,12 @@ class timeFormatGenerator
}
};
$timeformat = new timeFormatGenerator;
?>
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<link REL="shortcut icon" HREF="favicon.ico"/>
<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/acp.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 del(e,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 == 'stopDel'){ var conf = confirm('Dou you really want stop deleting user '+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 == 'stopDel'){ var conf = confirm('Dou you really want stop deleting user '+id+'?'); }
if(conf){return true;}else{return false;}
}
</script>
@@ -84,10 +84,10 @@ $timeformat = new timeFormatGenerator;
<table id="navi_table" cellspacing="0" cellpadding="0" style="width: 150px;">
<tr>
<td class="menu">
<?php
<?php
if($funct->CheckLogin())
{?>
<?php
<?php
if($_SESSION['access'] == ADMIN)
{ ?>
<a href="<?php echo HOMEPAGE; ?>">Server Homepage</a>
@@ -133,21 +133,21 @@ $timeformat = new timeFormatGenerator;
<a href="#"><b>Admin:</b></a>
<a href="?p=admin_log"><font color="Red"><b>Admin Log</font></b></a>
<a href="?p=config">Server Settings</a>
<?php
}
<?php
}
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="#"></a><a href="#"></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=message">Msg/Rep</a>
<a href="?p=ban">Ban</a>
<a href="#"></a><a href="#"></a><a href="#"></a>
<a href="?action=logout">Logout</a><?php
}
}
}
?>
</td>
@@ -158,9 +158,9 @@ $timeformat = new timeFormatGenerator;
<div id="lmid3">
<?php
if($funct->CheckLogin())
{
{
if($_POST or $_GET)
{
{
if($_GET['p'] and $_GET['p']!="search")
{
$filename = 'Templates/'.$_GET['p'].'.tpl';
@@ -176,7 +176,7 @@ $timeformat = new timeFormatGenerator;
else
{
include('Templates/search.tpl');
}
}
if($_POST['p'] and $_POST['s'])
{
$filename = 'Templates/results_'.$_POST['p'].'.tpl';
@@ -187,22 +187,22 @@ $timeformat = new timeFormatGenerator;
else
{
include('Templates/404.tpl');
}
}
}
}
else
{
include('Templates/home.tpl');
include('Templates/home.tpl');
}
}
else
{
{
include('Templates/login.tpl');
}
}
?>
</div>
</div>
</div>
</div>
</div>
<div id="lright1"></div>
<div id="ce"></div>
</div>
+178 -178
View File
@@ -25,13 +25,13 @@ include("../GameEngine/Data/buidata.php");
}
class adm_DB {
var $connection;
function adm_DB(){
global $database;
global $database;
$this->connection = mysql_connect(SQL_SERVER, SQL_USER, SQL_PASS) or die(mysql_error());
mysql_select_db(SQL_DB, $this->connection) or die(mysql_error());
mysql_select_db(SQL_DB, $this->connection) or die(mysql_error());
}
function Login($username,$password){
$q = "SELECT password FROM ".TB_PREFIX."users where username = '$username' and access >= ".MULTIHUNTER;
$result = mysql_query($q, $this->connection);
@@ -45,246 +45,246 @@ class adm_DB {
return false;
}
}
function recountPopUser($uid){
global $database;
$villages = $database->getProfileVillages($uid);
for ($i = 0; $i <= count($villages)-1; $i++) {
$vid = $villages[$i]['wref'];
$this->recountPop($vid);
}
for ($i = 0; $i <= count($villages)-1; $i++) {
$vid = $villages[$i]['wref'];
$this->recountPop($vid);
}
}
function recountPop($vid){
global $database;
$fdata = $database->getResourceLevel($vid);
$popTot = 0;
for ($i = 1; $i <= 40; $i++) {
$lvl = $fdata["f".$i];
$building = $fdata["f".$i."t"];
if($building){
$popTot += $this->buildingPOP($building,$lvl);
}
}
$q = "UPDATE ".TB_PREFIX."vdata set pop = $popTot where wref = $vid";
mysql_query($q, $this->connection);
global $database;
$fdata = $database->getResourceLevel($vid);
$popTot = 0;
for ($i = 1; $i <= 40; $i++) {
$lvl = $fdata["f".$i];
$building = $fdata["f".$i."t"];
if($building){
$popTot += $this->buildingPOP($building,$lvl);
}
}
$q = "UPDATE ".TB_PREFIX."vdata set pop = $popTot where wref = $vid";
mysql_query($q, $this->connection);
}
function buildingPOP($f,$lvl){
$name = "bid".$f;
global $$name;
$name = "bid".$f;
global $$name;
$popT = 0;
$dataarray = $$name;
for ($i = 0; $i <= $lvl; $i++) {
$popT += $dataarray[$i]['pop'];
}
return $popT;
$dataarray = $$name;
for ($i = 0; $i <= $lvl; $i++) {
$popT += $dataarray[$i]['pop'];
}
return $popT;
}
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);
$r = mysql_fetch_array($result);
return $r['id'];
}
function AddVillage($post){
global $database;
$wid = $this->getWref($post['x'],$post['y']);
$uid = $post['uid'];
$status = $database->getVillageState($wid);
$status = 0;
if($status == 0){
$status = $database->getVillageState($wid);
$status = 0;
if($status == 0){
mysql_query("Insert into ".TB_PREFIX."admin_log values (0,".$_SESSION['id'].",'Added new village <b><a href=\'admin.php?p=village&did=$wid\'>$wid</a></b> to user <b><a href=\'admin.php?p=player&uid=$uid\'>$uid</a></b>',".time().")");
$database->setFieldTaken($wid);
$database->setFieldTaken($wid);
$database->addVillage($wid,$uid,'new village','0');
$database->addResourceFields($wid,$database->getVillageType($wid));
$database->addUnits($wid);
$database->addTech($wid);
$database->addABTech($wid);
}
$database->addABTech($wid);
}
}
function Punish($post){
global $database;
global $database;
$villages = $database->getProfileVillages($post['uid']);
$admid = $post['admid'];
$user = $database->getUserArray($post['uid'],1);
for ($i = 0; $i <= count($villages)-1; $i++) {
$vid = $villages[$i]['wref'];
if($post['punish']){
$popOld = $villages[$i]['pop'];
$proc = 100-$post['punish'];
$pop = floor(($popOld/100)*($proc));
if($pop <= 1 ){$pop = 2;}
$this->PunishBuilding($vid,$proc,$pop);
}
if($post['del_troop']){
if($user['tribe'] == 1) {
$unit = 1;
}else if($user['tribe'] == 2) {
$unit = 11;
}else if($user['tribe'] == 3) {
$unit = 21;
}
$this->DelUnits($villages[$i]['wref'],$unit);
}
if($post['clean_ware']){
$time = time();
$q = "UPDATE ".TB_PREFIX."vdata SET `wood` = '0', `clay` = '0', `iron` = '0', `crop` = '0', `lastupdate` = '$time' WHERE wref = $vid;";
mysql_query($q, $this->connection);
}
}
$user = $database->getUserArray($post['uid'],1);
for ($i = 0; $i <= count($villages)-1; $i++) {
$vid = $villages[$i]['wref'];
if($post['punish']){
$popOld = $villages[$i]['pop'];
$proc = 100-$post['punish'];
$pop = floor(($popOld/100)*($proc));
if($pop <= 1 ){$pop = 2;}
$this->PunishBuilding($vid,$proc,$pop);
}
if($post['del_troop']){
if($user['tribe'] == 1) {
$unit = 1;
}else if($user['tribe'] == 2) {
$unit = 11;
}else if($user['tribe'] == 3) {
$unit = 21;
}
$this->DelUnits($villages[$i]['wref'],$unit);
}
if($post['clean_ware']){
$time = time();
$q = "UPDATE ".TB_PREFIX."vdata SET `wood` = '0', `clay` = '0', `iron` = '0', `crop` = '0', `lastupdate` = '$time' WHERE wref = $vid;";
mysql_query($q, $this->connection);
}
}
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){
global $database;
$q = "UPDATE ".TB_PREFIX."vdata set pop = $pop where wref = $vid;";
mysql_query($q, $this->connection);
$fdata = $database->getResourceLevel($vid);
for ($i = 1; $i <= 40; $i++) {
if($fdata['f'.$i]>1){
$zm = ($fdata['f'.$i]/100)*$proc;
if($zm < 1){$zm = 1;}else{$zm = floor($zm);}
$q = "UPDATE ".TB_PREFIX."fdata SET `f$i` = '$zm' WHERE `vref` = $vid;";
mysql_query($q, $this->connection);
}
}
global $database;
$q = "UPDATE ".TB_PREFIX."vdata set pop = $pop where wref = $vid;";
mysql_query($q, $this->connection);
$fdata = $database->getResourceLevel($vid);
for ($i = 1; $i <= 40; $i++) {
if($fdata['f'.$i]>1){
$zm = ($fdata['f'.$i]/100)*$proc;
if($zm < 1){$zm = 1;}else{$zm = floor($zm);}
$q = "UPDATE ".TB_PREFIX."fdata SET `f$i` = '$zm' WHERE `vref` = $vid;";
mysql_query($q, $this->connection);
}
}
}
function DelUnits($vid,$unit){
for ($i = $unit; $i <= 9+$unit; $i++) {
$this->DelUnits2($vid,$unit);
}
for ($i = $unit; $i <= 9+$unit; $i++) {
$this->DelUnits2($vid,$unit);
}
}
function DelUnits2($vid,$unit){
$q = "UPDATE ".TB_PREFIX."units SET `u$unit` = '0' WHERE `vref` = $vid;";
mysql_query($q, $this->connection);
$q = "UPDATE ".TB_PREFIX."units SET `u$unit` = '0' WHERE `vref` = $vid;";
mysql_query($q, $this->connection);
}
function DelPlayer($uid,$pass){
global $database;
$ID = $_SESSION['id'];//$database->getUserField($_SESSION['username'],'id',1);
global $database;
$ID = $_SESSION['id'];//$database->getUserField($_SESSION['username'],'id',1);
if($this->CheckPass($pass,$ID)){
$villages = $database->getProfileVillages($uid);
for ($i = 0; $i <= count($villages)-1; $i++) {
$this->DelVillage($villages[$i]['wref']);
}
$villages = $database->getProfileVillages($uid);
for ($i = 0; $i <= count($villages)-1; $i++) {
$this->DelVillage($villages[$i]['wref']);
}
$name = $database->getUserField($uid,"username",0);
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;";
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);
$q = "DELETE FROM ".TB_PREFIX."users WHERE `id` = $uid;";
mysql_query($q, $this->connection);
}
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);
$dbarray = mysql_fetch_array($result);
if($dbarray['password'] == md5($password)) {
if($dbarray['password'] == md5($password)) {
return true;
}else{
return false;
}
}else{
return false;
}
}
function DelVillage($wref){
$q = "SELECT * FROM ".TB_PREFIX."vdata WHERE `wref` = $wref and capital = 0";
$result = mysql_query($q, $this->connection);
if(mysql_num_rows($result) > 0){
$result = mysql_query($q, $this->connection);
if(mysql_num_rows($result) > 0){
mysql_query("Insert into ".TB_PREFIX."admin_log values (0,".$_SESSION['id'].",'Deleted village <b>$wref</b>',".time().")");
$q = "DELETE FROM ".TB_PREFIX."vdata WHERE `wref` = $wref";
$q = "DELETE FROM ".TB_PREFIX."vdata WHERE `wref` = $wref";
mysql_query($q, $this->connection);
$q = "DELETE FROM ".TB_PREFIX."units WHERE `vref` = $wref";
mysql_query($q, $this->connection);
$q = "DELETE FROM ".TB_PREFIX."bdata WHERE `wid` = $wref";
mysql_query($q, $this->connection);
$q = "DELETE FROM ".TB_PREFIX."abdata WHERE `wid` = $wref";
mysql_query($q, $this->connection);
$q = "DELETE FROM ".TB_PREFIX."fdata WHERE `vref` = $wref";
mysql_query($q, $this->connection);
$q = "DELETE FROM ".TB_PREFIX."training WHERE `vref` = $wref";
mysql_query($q, $this->connection);
$q = "DELETE FROM ".TB_PREFIX."movement WHERE `from` = $wref";
mysql_query($q, $this->connection);
$q = "UPDATE ".TB_PREFIX."wdata SET `occupied` = '0' WHERE `id` = $wref";
mysql_query($q, $this->connection);
}
$q = "DELETE FROM ".TB_PREFIX."units WHERE `vref` = $wref";
mysql_query($q, $this->connection);
$q = "DELETE FROM ".TB_PREFIX."bdata WHERE `wid` = $wref";
mysql_query($q, $this->connection);
$q = "DELETE FROM ".TB_PREFIX."abdata WHERE `wid` = $wref";
mysql_query($q, $this->connection);
$q = "DELETE FROM ".TB_PREFIX."fdata WHERE `vref` = $wref";
mysql_query($q, $this->connection);
$q = "DELETE FROM ".TB_PREFIX."training WHERE `vref` = $wref";
mysql_query($q, $this->connection);
$q = "DELETE FROM ".TB_PREFIX."movement WHERE `from` = $wref";
mysql_query($q, $this->connection);
$q = "UPDATE ".TB_PREFIX."wdata SET `occupied` = '0' WHERE `id` = $wref";
mysql_query($q, $this->connection);
}
}
function DelBan($uid,$id){
global $database;
$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().")");
$q = "UPDATE ".TB_PREFIX."users SET `access` = '".USER."' WHERE `id` = $uid;";
mysql_query($q, $this->connection);
$q = "UPDATE ".TB_PREFIX."banlist SET `active` = '0' WHERE `id` = $id;";
mysql_query($q, $this->connection);
$q = "UPDATE ".TB_PREFIX."users SET `access` = '".USER."' WHERE `id` = $uid;";
mysql_query($q, $this->connection);
$q = "UPDATE ".TB_PREFIX."banlist SET `active` = '0' WHERE `id` = $id;";
mysql_query($q, $this->connection);
}
function AddBan($uid,$end,$reason){
global $database;
global $database;
$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().")");
$q = "UPDATE ".TB_PREFIX."users SET `access` = '0' WHERE `id` = $uid;";
mysql_query($q, $this->connection);
$time = time();
$admin = $_SESSION['id']; //$database->getUserField($_SESSION['username'],'id',1);
$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');";
mysql_query($q, $this->connection);
$q = "UPDATE ".TB_PREFIX."users SET `access` = '0' WHERE `id` = $uid;";
mysql_query($q, $this->connection);
$time = time();
$admin = $_SESSION['id']; //$database->getUserField($_SESSION['username'],'id',1);
$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');";
mysql_query($q, $this->connection);
}
function search_player($player){
$q = "SELECT id,username FROM ".TB_PREFIX."users WHERE `username` LIKE '%$player%' and username != 'support'";
$result = mysql_query($q, $this->connection);
return $this->mysql_fetch_all($result);
}
$q = "SELECT id,username FROM ".TB_PREFIX."users WHERE `username` LIKE '%$player%' and username != 'support'";
$result = mysql_query($q, $this->connection);
return $this->mysql_fetch_all($result);
}
function search_email($email){
$q = "SELECT id,email FROM ".TB_PREFIX."users WHERE `email` LIKE '%$email%' and username != 'support'";
$result = mysql_query($q, $this->connection);
return $this->mysql_fetch_all($result);
$q = "SELECT id,email FROM ".TB_PREFIX."users WHERE `email` LIKE '%$email%' and username != 'support'";
$result = mysql_query($q, $this->connection);
return $this->mysql_fetch_all($result);
}
function search_village($village){
$q = "SELECT * FROM ".TB_PREFIX."vdata WHERE `name` LIKE '%$village%' or `wref` LIKE '%$village%'";
$result = mysql_query($q, $this->connection);
return $this->mysql_fetch_all($result);
$q = "SELECT * FROM ".TB_PREFIX."vdata WHERE `name` LIKE '%$village%' or `wref` LIKE '%$village%'";
$result = mysql_query($q, $this->connection);
return $this->mysql_fetch_all($result);
}
function search_alliance($alliance){
$q = "SELECT * FROM ".TB_PREFIX."alidata WHERE `name` LIKE '%$alliance%' or `tag` LIKE '%$alliance%' or `id` LIKE '%$alliance%'";
$result = mysql_query($q, $this->connection);
return $this->mysql_fetch_all($result);
$q = "SELECT * FROM ".TB_PREFIX."alidata WHERE `name` LIKE '%$alliance%' or `tag` LIKE '%$alliance%' or `id` LIKE '%$alliance%'";
$result = mysql_query($q, $this->connection);
return $this->mysql_fetch_all($result);
}
function search_ip($ip){
$q = "SELECT * FROM ".TB_PREFIX."login_log WHERE `ip` LIKE '%$ip%'";
$result = mysql_query($q, $this->connection);
return $this->mysql_fetch_all($result);
$q = "SELECT * FROM ".TB_PREFIX."login_log WHERE `ip` LIKE '%$ip%'";
$result = mysql_query($q, $this->connection);
return $this->mysql_fetch_all($result);
}
function search_banned(){
$q = "SELECT * FROM ".TB_PREFIX."banlist where active = '1'";
$result = mysql_query($q, $this->connection);
return $this->mysql_fetch_all($result);
$q = "SELECT * FROM ".TB_PREFIX."banlist where active = '1'";
$result = mysql_query($q, $this->connection);
return $this->mysql_fetch_all($result);
}
function Del_banned(){
//$q = "SELECT * FROM ".TB_PREFIX."banlist";
$result = mysql_query($q, $this->connection);
return $this->mysql_fetch_all($result);
//$q = "SELECT * FROM ".TB_PREFIX."banlist";
$result = mysql_query($q, $this->connection);
return $this->mysql_fetch_all($result);
}
/***************************
@@ -298,12 +298,12 @@ class adm_DB {
return $all;
}
}
function query_return($q) {
$result = mysql_query($q, $this->connection);
return $this->mysql_fetch_all($result);
}
/***************************
Function to do free query
References: Query
@@ -311,10 +311,10 @@ class adm_DB {
function query($query) {
return mysql_query($query, $this->connection);
}
};
$admin = new adm_DB;
include("function.php");
include("function.php");
?>
+88 -88
View File
@@ -9,97 +9,97 @@
## ##
#################################################################################
class funct {
function CheckLogin(){
if($_SESSION['access'] >= MULTIHUNTER and $_SESSION['id']){
return true;
}else{
return false;
}
}
function Act($get){
global $admin,$database;
class funct {
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 CheckLogin(){
if($_SESSION['access'] >= MULTIHUNTER and $_SESSION['id']){
return true;
}else{
return false;
}
}
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){
global $admin,$database;
switch($post['action']){
case DelPlayer:
$admin->DelPlayer($post['uid'],$post['pass']);
header("Location: ?p=search&msg=ursdel");
break;
case punish:
$admin->Punish($post);
header("Location: ".$_SERVER['HTTP_REFERER']);
break;
case addVillage:
$admin->AddVillage($post);
header("Location: ".$_SERVER['HTTP_REFERER']);
break;
}
global $admin,$database;
switch($post['action']){
case DelPlayer:
$admin->DelPlayer($post['uid'],$post['pass']);
header("Location: ?p=search&msg=ursdel");
break;
case punish:
$admin->Punish($post);
header("Location: ".$_SERVER['HTTP_REFERER']);
break;
case addVillage:
$admin->AddVillage($post);
header("Location: ".$_SERVER['HTTP_REFERER']);
break;
}
}
function LogIN($username,$password){
global $admin,$database;
if($admin->Login($username,$password)){
//$_SESSION['username'] = $username;
$_SESSION['access'] = $database->getUserField($username,'access',1);
$_SESSION['id'] = $database->getUserField($username,'id',1);
header("Location: ".$_SERVER['HTTP_REFERER']);
//header("Location: admin.php");
}else{
echo "Error";
}
global $admin,$database;
if($admin->Login($username,$password)){
//$_SESSION['username'] = $username;
$_SESSION['access'] = $database->getUserField($username,'access',1);
$_SESSION['id'] = $database->getUserField($username,'id',1);
header("Location: ".$_SERVER['HTTP_REFERER']);
//header("Location: admin.php");
}else{
echo "Error";
}
}
function LogOut(){
$_SESSION['access'] = '';
$_SESSION['id'] = '';
function LogOut(){
$_SESSION['access'] = '';
$_SESSION['id'] = '';
}
public function procResType($ref) {
@@ -150,16 +150,16 @@ class funct {
}
return $build;
}
};
$funct = new funct;
if($funct->CheckLogin()){
if($_GET['action']){
$funct->Act($_GET);
$funct->Act($_GET);
}
if($_POST['action']){
$funct->Act2($_POST);
$funct->Act2($_POST);
}
}
if($_POST['action']=='login'){
+1 -1
View File
@@ -1,6 +1,6 @@
Hello %USER%,
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%
+230 -230
View File
@@ -1,241 +1,241 @@
<?php
#################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ##
## Filename Account.php ##
## Developed by: Songer & Dzoki ##
## License: TravianX Project ##
## Copyright: TravianX (c) 2010-2011. All rights reserved. ##
## ##
#################################################################################
<?php
#################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ##
## Filename Account.php ##
## Developed by: Songer & Dzoki ##
## License: TravianX Project ##
## Copyright: TravianX (c) 2010-2011. All rights reserved. ##
## ##
#################################################################################
include("Session.php");
include("Session.php");
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);
class Account {
}
}
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() {
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);
}
}
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'))
{
global $database;
$q = "SELECT * FROM ".TB_PREFIX."activate where act = '".$_POST['id']."'";
$result = mysql_query($q, $database->connection);
$dbarray = mysql_fetch_array($result);
if($dbarray['act'] == $_POST['id']) {
$uid = $database->register($dbarray['username'],$dbarray['password'],$dbarray['email'],$dbarray['tribe'],"");
if($uid) {
$database->unreg($dbarray['username']);
$this->generateBase($dbarray['kid'],$uid,$dbarray['username']);
header("Location: activate.php?e=2");
}
}
else
{
header("Location: activate.php?e=3");
}
}
else
{
header("Location: activate.php");
}
}
private function Unreg() {
global $database;
$q = "SELECT * FROM ".TB_PREFIX."activate where id = '".$_POST['id']."'";
$result = mysql_query($q, $database->connection);
$dbarray = mysql_fetch_array($result);
if(md5($_POST['pw']) == $dbarray['password']) {
$database->unreg($dbarray['username']);
header("Location: anmelden.php");
}
else {
header("Location: activate.php?e=3");
}
}
private function Login() {
global $database,$session,$form;
if(!isset($_POST['user']) || $_POST['user'] == "") {
$form->addError("user",LOGIN_USR_EMPTY);
}
else if(!$database->checkExist($_POST['user'],0)) {
$form->addError("user",USR_NT_FOUND);
}
if(!isset($_POST['pw']) || $_POST['pw'] == "") {
$form->addError("pw",LOGIN_PASS_EMPTY);
}
else if(!$database->login($_POST['user'],$_POST['pw']) && !$database->sitterLogin($_POST['user'],$_POST['pw'])) {
$form->addError("pw",LOGIN_PW_ERROR);
}
if($database->getUserField($_POST['user'],"act",1) != "") {
$form->addError("activate",$_POST['user']);
}
if($form->returnErrors() > 0) {
$_SESSION['errorarray'] = $form->getErrors();
$_SESSION['valuearray'] = $_POST;
header("Location: login.php");
}
else {
{
global $database;
$q = "SELECT * FROM ".TB_PREFIX."activate where act = '".$_POST['id']."'";
$result = mysql_query($q, $database->connection);
$dbarray = mysql_fetch_array($result);
if($dbarray['act'] == $_POST['id']) {
$uid = $database->register($dbarray['username'],$dbarray['password'],$dbarray['email'],$dbarray['tribe'],"");
if($uid) {
$database->unreg($dbarray['username']);
$this->generateBase($dbarray['kid'],$uid,$dbarray['username']);
header("Location: activate.php?e=2");
}
}
else
{
header("Location: activate.php?e=3");
}
}
else
{
header("Location: activate.php");
}
}
private function Unreg() {
global $database;
$q = "SELECT * FROM ".TB_PREFIX."activate where id = '".$_POST['id']."'";
$result = mysql_query($q, $database->connection);
$dbarray = mysql_fetch_array($result);
if(md5($_POST['pw']) == $dbarray['password']) {
$database->unreg($dbarray['username']);
header("Location: anmelden.php");
}
else {
header("Location: activate.php?e=3");
}
}
private function Login() {
global $database,$session,$form;
if(!isset($_POST['user']) || $_POST['user'] == "") {
$form->addError("user",LOGIN_USR_EMPTY);
}
else if(!$database->checkExist($_POST['user'],0)) {
$form->addError("user",USR_NT_FOUND);
}
if(!isset($_POST['pw']) || $_POST['pw'] == "") {
$form->addError("pw",LOGIN_PASS_EMPTY);
}
else if(!$database->login($_POST['user'],$_POST['pw']) && !$database->sitterLogin($_POST['user'],$_POST['pw'])) {
$form->addError("pw",LOGIN_PW_ERROR);
}
if($database->getUserField($_POST['user'],"act",1) != "") {
$form->addError("activate",$_POST['user']);
}
if($form->returnErrors() > 0) {
$_SESSION['errorarray'] = $form->getErrors();
$_SESSION['valuearray'] = $_POST;
header("Location: login.php");
}
else {
$userid = $database->getUserArray($_POST['user'], 0);
if($database->login($_POST['user'],$_POST['pw'])){
$database->UpdateOnline("login" ,$_POST['user'],time(),$userid['id']);
}else if($database->sitterLogin($_POST['user'],$_POST['pw'])){
$database->UpdateOnline("sitter" ,$_POST['user'],time(),$userid['id']);
}
setcookie("COOKUSR",$_POST['user'],time()+COOKIE_EXPIRE,COOKIE_PATH);
$session->login($_POST['user']);
}
}
private function Logout() {
global $session,$database;
unset($_SESSION['wid']);
$database->activeModify($session->username,1);
$database->UpdateOnline("logout") or die(mysql_error());
$session->Logout();
}
private function validEmail($email) {
$regexp="/^[a-z0-9]+([_\\.-][a-z0-9]+)*@([a-z0-9]+([\.-][a-z0-9]+)*)+\\.[a-z]{2,}$/i";
if ( !preg_match($regexp, $email) ) {
return false;
}
return true;
}
function generateBase($kid,$uid,$username) {
global $database,$message;
if($kid == 0) {
$kid = rand(1,4);
}
else{
$kid = $_POST['kid'];
}
$wid = $database->generateBase($kid);
$database->setFieldTaken($wid);
$database->addVillage($wid,$uid,$username,1);
$database->addResourceFields($wid,$database->getVillageType($wid));
$database->addUnits($wid);
$database->addTech($wid);
$database->addABTech($wid);
$database->updateUserField($uid,"access",USER,1);
$message->sendWelcome($uid,$username);
}
};
$account = new Account;
setcookie("COOKUSR",$_POST['user'],time()+COOKIE_EXPIRE,COOKIE_PATH);
$session->login($_POST['user']);
}
}
private function Logout() {
global $session,$database;
unset($_SESSION['wid']);
$database->activeModify($session->username,1);
$database->UpdateOnline("logout") or die(mysql_error());
$session->Logout();
}
private function validEmail($email) {
$regexp="/^[a-z0-9]+([_\\.-][a-z0-9]+)*@([a-z0-9]+([\.-][a-z0-9]+)*)+\\.[a-z]{2,}$/i";
if ( !preg_match($regexp, $email) ) {
return false;
}
return true;
}
function generateBase($kid,$uid,$username) {
global $database,$message;
if($kid == 0) {
$kid = rand(1,4);
}
else{
$kid = $_POST['kid'];
}
$wid = $database->generateBase($kid);
$database->setFieldTaken($wid);
$database->addVillage($wid,$uid,$username,1);
$database->addResourceFields($wid,$database->getVillageType($wid));
$database->addUnits($wid);
$database->addTech($wid);
$database->addABTech($wid);
$database->updateUserField($uid,"access",USER,1);
$message->sendWelcome($uid,$username);
}
};
$account = new Account;
?>
+1 -1
View File
@@ -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");
?>
?>
+18 -18
View File
@@ -16,30 +16,30 @@ mysql_select_db(SQL_DB);
$id = $_POST['id'];
$amt = $_POST['vill_amount'];
for($i=1;$i<=$amt;$i++) {
$kid = rand(1,4);
$wid = $database->generateBase($kid);
$database->setFieldTaken($wid);
$time = time();
$q = "insert into ".TB_PREFIX."vdata (`wref`,`owner`,`name`,`capital`,`pop`,`cp`,`celebration`,`type`,`wood`,`clay`,`iron`,`maxstore`,`crop`,`maxcrop`,`lastupdate`,`loyalty`,`exp1`,`exp2`,`exp3`,`created`) values ('$wid','3','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());
$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);
$kid = rand(1,4);
$wid = $database->generateBase($kid);
$database->setFieldTaken($wid);
$time = time();
$q = "insert into ".TB_PREFIX."vdata (`wref`,`owner`,`name`,`capital`,`pop`,`cp`,`celebration`,`type`,`wood`,`clay`,`iron`,`maxstore`,`crop`,`maxcrop`,`lastupdate`,`loyalty`,`exp1`,`exp2`,`exp3`,`created`) values ('$wid','3','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());
$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);
$pop = $automation->recountPop($wid);
$cp = $automation->recountPop($wid);
$database->addUnits($wid);
$database->addTech($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."'";
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.';
$database->addUnits($wid);
$database->addTech($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."'";
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.';
$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");
+18 -18
View File
@@ -16,29 +16,29 @@ mysql_select_db(SQL_DB);
$id = $_POST['id'];
$amt = $_POST['vill_amount'];
for($i=1;$i<=$amt;$i++) {
$kid = rand(1,4);
$wid = $database->generateBase($kid);
$database->setFieldTaken($wid);
$time = time();
$q = "insert into ".TB_PREFIX."vdata (`wref`,`owner`,`name`,`capital`,`pop`,`cp`,`celebration`,`type`,`wood`,`clay`,`iron`,`maxstore`,`crop`,`maxcrop`,`lastupdate`,`loyalty`,`exp1`,`exp2`,`exp3`,`created`,`natar`) values ('$wid','3','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());
$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);
$kid = rand(1,4);
$wid = $database->generateBase($kid);
$database->setFieldTaken($wid);
$time = time();
$q = "insert into ".TB_PREFIX."vdata (`wref`,`owner`,`name`,`capital`,`pop`,`cp`,`celebration`,`type`,`wood`,`clay`,`iron`,`maxstore`,`crop`,`maxcrop`,`lastupdate`,`loyalty`,`exp1`,`exp2`,`exp3`,`created`,`natar`) values ('$wid','3','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());
$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);
$pop = $automation->recountPop($wid);
$cp = $automation->recountPop($wid);
$database->addUnits($wid);
$database->addTech($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."'";
mysql_query($q);
$database->addUnits($wid);
$database->addTech($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."'";
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");
+2 -2
View File
@@ -9,8 +9,8 @@
## ##
#################################################################################
include ("../../Database.php");
include ("../../Admin/database.php");
include ("../../Database.php");
include ("../../Admin/database.php");
include ("../../config.php");
$database->populateOasisUnitsLow();
+81 -81
View File
@@ -23,87 +23,87 @@ $sessionaccess = $access['access'];
if($sessionaccess != 9) die("<h1><font color=\"red\">Access Denied: You are not Admin!</font></h1>");
mysql_query("UPDATE ".TB_PREFIX."fdata SET
f1 = '".$_POST['id1level']."',
f1t = '".$_POST['id1gid']."',
f2 = '".$_POST['id2level']."',
f2t = '".$_POST['id2gid']."',
f3 = '".$_POST['id3level']."',
f3t = '".$_POST['id3gid']."',
f4 = '".$_POST['id4level']."',
f4t = '".$_POST['id4gid']."',
f5 = '".$_POST['id5level']."',
f5t = '".$_POST['id5gid']."',
f6 = '".$_POST['id6level']."',
f6t = '".$_POST['id6gid']."',
f7 = '".$_POST['id7level']."',
f7t = '".$_POST['id7gid']."',
f8 = '".$_POST['id8level']."',
f8t = '".$_POST['id8gid']."',
f9 = '".$_POST['id9level']."',
f9t = '".$_POST['id9gid']."',
f10 = '".$_POST['id10level']."',
f10t = '".$_POST['id10gid']."',
f11 = '".$_POST['id11level']."',
f11t = '".$_POST['id11gid']."',
f12 = '".$_POST['id12level']."',
f12t = '".$_POST['id12gid']."',
f13 = '".$_POST['id13level']."',
f13t = '".$_POST['id13gid']."',
f14 = '".$_POST['id14level']."',
f14t = '".$_POST['id14gid']."',
f15 = '".$_POST['id15level']."',
f15t = '".$_POST['id15gid']."',
f16 = '".$_POST['id16level']."',
f16t = '".$_POST['id16gid']."',
f17 = '".$_POST['id17level']."',
f17t = '".$_POST['id17gid']."',
f18 = '".$_POST['id18level']."',
f18t = '".$_POST['id18gid']."',
f19 = '".$_POST['id19level']."',
f19t = '".$_POST['id19gid']."',
f20 = '".$_POST['id20level']."',
f20t = '".$_POST['id20gid']."',
f21 = '".$_POST['id21level']."',
f21t = '".$_POST['id21gid']."',
f22 = '".$_POST['id22level']."',
f22t = '".$_POST['id22gid']."',
f23 = '".$_POST['id23level']."',
f23t = '".$_POST['id23gid']."',
f24 = '".$_POST['id24level']."',
f24t = '".$_POST['id24gid']."',
f25 = '".$_POST['id25level']."',
f25t = '".$_POST['id25gid']."',
f26 = '".$_POST['id26level']."',
f26t = '".$_POST['id26gid']."',
f27 = '".$_POST['id27level']."',
f27t = '".$_POST['id27gid']."',
f28 = '".$_POST['id28level']."',
f28t = '".$_POST['id28gid']."',
f29 = '".$_POST['id29level']."',
f29t = '".$_POST['id29gid']."',
f30 = '".$_POST['id30level']."',
f30t = '".$_POST['id30gid']."',
f31 = '".$_POST['id31level']."',
f31t = '".$_POST['id31gid']."',
f32 = '".$_POST['id32level']."',
f32t = '".$_POST['id32gid']."',
f33 = '".$_POST['id33level']."',
f33t = '".$_POST['id33gid']."',
f34 = '".$_POST['id34level']."',
f34t = '".$_POST['id34gid']."',
f35 = '".$_POST['id35level']."',
f35t = '".$_POST['id35gid']."',
f36 = '".$_POST['id36level']."',
f36t = '".$_POST['id36gid']."',
f37 = '".$_POST['id37level']."',
f37t = '".$_POST['id37gid']."',
f38 = '".$_POST['id38level']."',
f38t = '".$_POST['id38gid']."',
f39 = '".$_POST['id39level']."',
f39t = '".$_POST['id39gid']."',
f40 = '".$_POST['id40level']."',
f40t = '".$_POST['id40gid']."'
mysql_query("UPDATE ".TB_PREFIX."fdata SET
f1 = '".$_POST['id1level']."',
f1t = '".$_POST['id1gid']."',
f2 = '".$_POST['id2level']."',
f2t = '".$_POST['id2gid']."',
f3 = '".$_POST['id3level']."',
f3t = '".$_POST['id3gid']."',
f4 = '".$_POST['id4level']."',
f4t = '".$_POST['id4gid']."',
f5 = '".$_POST['id5level']."',
f5t = '".$_POST['id5gid']."',
f6 = '".$_POST['id6level']."',
f6t = '".$_POST['id6gid']."',
f7 = '".$_POST['id7level']."',
f7t = '".$_POST['id7gid']."',
f8 = '".$_POST['id8level']."',
f8t = '".$_POST['id8gid']."',
f9 = '".$_POST['id9level']."',
f9t = '".$_POST['id9gid']."',
f10 = '".$_POST['id10level']."',
f10t = '".$_POST['id10gid']."',
f11 = '".$_POST['id11level']."',
f11t = '".$_POST['id11gid']."',
f12 = '".$_POST['id12level']."',
f12t = '".$_POST['id12gid']."',
f13 = '".$_POST['id13level']."',
f13t = '".$_POST['id13gid']."',
f14 = '".$_POST['id14level']."',
f14t = '".$_POST['id14gid']."',
f15 = '".$_POST['id15level']."',
f15t = '".$_POST['id15gid']."',
f16 = '".$_POST['id16level']."',
f16t = '".$_POST['id16gid']."',
f17 = '".$_POST['id17level']."',
f17t = '".$_POST['id17gid']."',
f18 = '".$_POST['id18level']."',
f18t = '".$_POST['id18gid']."',
f19 = '".$_POST['id19level']."',
f19t = '".$_POST['id19gid']."',
f20 = '".$_POST['id20level']."',
f20t = '".$_POST['id20gid']."',
f21 = '".$_POST['id21level']."',
f21t = '".$_POST['id21gid']."',
f22 = '".$_POST['id22level']."',
f22t = '".$_POST['id22gid']."',
f23 = '".$_POST['id23level']."',
f23t = '".$_POST['id23gid']."',
f24 = '".$_POST['id24level']."',
f24t = '".$_POST['id24gid']."',
f25 = '".$_POST['id25level']."',
f25t = '".$_POST['id25gid']."',
f26 = '".$_POST['id26level']."',
f26t = '".$_POST['id26gid']."',
f27 = '".$_POST['id27level']."',
f27t = '".$_POST['id27gid']."',
f28 = '".$_POST['id28level']."',
f28t = '".$_POST['id28gid']."',
f29 = '".$_POST['id29level']."',
f29t = '".$_POST['id29gid']."',
f30 = '".$_POST['id30level']."',
f30t = '".$_POST['id30gid']."',
f31 = '".$_POST['id31level']."',
f31t = '".$_POST['id31gid']."',
f32 = '".$_POST['id32level']."',
f32t = '".$_POST['id32gid']."',
f33 = '".$_POST['id33level']."',
f33t = '".$_POST['id33gid']."',
f34 = '".$_POST['id34level']."',
f34t = '".$_POST['id34gid']."',
f35 = '".$_POST['id35level']."',
f35t = '".$_POST['id35gid']."',
f36 = '".$_POST['id36level']."',
f36t = '".$_POST['id36gid']."',
f37 = '".$_POST['id37level']."',
f37t = '".$_POST['id37gid']."',
f38 = '".$_POST['id38level']."',
f38t = '".$_POST['id38gid']."',
f39 = '".$_POST['id39level']."',
f39t = '".$_POST['id39gid']."',
f40 = '".$_POST['id40level']."',
f40t = '".$_POST['id40gid']."'
WHERE vref = $id") or die(mysql_error());
header("Location: ../../../Admin/admin.php?action=recountPop&did=".$id."");
-4
View File
@@ -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
View File
@@ -1,13 +1,13 @@
<?php
#################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ##
## Filename admin.php ##
## --------------------------------------------------------------------------- ##
## Filename admin.php ##
## Developed by: Dzoki ##
## License: TravianX Project ##
## Copyright: TravianX (c) 2010-2011. All rights reserved. ##
## ##
#################################################################################
#################################################################################
session_start();
include("../GameEngine/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>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<meta http-equiv="imagetoolbar" content="no">
</head>
<body>
<meta http-equiv="imagetoolbar" content="no">
</head>
<body>
<script language="javascript">
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">
</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="lmidlc">
<div id="lleft">
<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">
<tr>
<td class="menu">
<?php
<div id="lmidlc">
<div id="lleft">
<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">
<tr>
<td class="menu">
<?php
if($funct->CheckLogin()){?>
<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="?p=server_info">Server Info</a>
<a href="?p=server_info">Server Info</a>
<a href="?p=online">Online users</a>
<a href="?p=search">Search</a>
<a href="?p=message">Msg/Rep</a>
<a href="?p=ban">Ban</a>
<a href="?p=config">Config</a>
<a href="?p=config_editor">Config Editor</a>
<a href="#"></a><a href="#"></a><a href="#"></a>
<a href="?action=logout">Logout</a>
<?php }?>
</td>
</tr>
</table></div>
<div id="lmid1">
<div id="lmid3">
<?php
if($funct->CheckLogin()){
if($_POST or $_GET){
if($_GET['p'] and $_GET['p']!="search"){
$filename = '../Templates/Admin/'.$_GET['p'].'.tpl';
if(file_exists($filename)){
include($filename);
}else{
include('../Templates/Admin/404.tpl');
}
<a href="?p=search">Search</a>
<a href="?p=message">Msg/Rep</a>
<a href="?p=ban">Ban</a>
<a href="?p=config">Config</a>
<a href="?p=config_editor">Config Editor</a>
<a href="#"></a><a href="#"></a><a href="#"></a>
<a href="?action=logout">Logout</a>
<?php }?>
</td>
</tr>
</table></div>
<div id="lmid1">
<div id="lmid3">
<?php
if($funct->CheckLogin()){
if($_POST or $_GET){
if($_GET['p'] and $_GET['p']!="search"){
$filename = '../Templates/Admin/'.$_GET['p'].'.tpl';
if(file_exists($filename)){
include($filename);
}else{
include('../Templates/Admin/404.tpl');
}
}else{
include('../Templates/Admin/search.tpl');
}
}
if($_POST['p'] and $_POST['s']){
$filename = '../Templates/Admin/results_'.$_POST['p'].'.tpl';
if(file_exists($filename)){
if(file_exists($filename)){
include($filename);
}else{
include('../Templates/Admin/404.tpl');
include('../Templates/Admin/404.tpl');
}
}
}else{
+163 -163
View File
@@ -27,9 +27,9 @@ class adm_DB {
var $connection;
function adm_DB(){
global $database;
global $database;
$this->connection = mysql_connect(SQL_SERVER, SQL_USER, SQL_PASS) or die(mysql_error());
mysql_select_db(SQL_DB, $this->connection) or die(mysql_error());
mysql_select_db(SQL_DB, $this->connection) or die(mysql_error());
}
function Login($username,$password){
@@ -49,40 +49,40 @@ class adm_DB {
function recountPopUser($uid){
global $database;
$villages = $database->getProfileVillages($uid);
for ($i = 0; $i <= count($villages)-1; $i++) {
$vid = $villages[$i]['wref'];
$this->recountPop($vid);
}
for ($i = 0; $i <= count($villages)-1; $i++) {
$vid = $villages[$i]['wref'];
$this->recountPop($vid);
}
}
function recountPop($vid){
global $database;
$fdata = $database->getResourceLevel($vid);
$popTot = 0;
for ($i = 1; $i <= 40; $i++) {
$lvl = $fdata["f".$i];
$building = $fdata["f".$i."t"];
if($building){
$popTot += $this->buildingPOP($building,$lvl);
}
}
$q = "UPDATE ".TB_PREFIX."vdata set pop = $popTot where wref = $vid";
mysql_query($q, $this->connection);
global $database;
$fdata = $database->getResourceLevel($vid);
$popTot = 0;
for ($i = 1; $i <= 40; $i++) {
$lvl = $fdata["f".$i];
$building = $fdata["f".$i."t"];
if($building){
$popTot += $this->buildingPOP($building,$lvl);
}
}
$q = "UPDATE ".TB_PREFIX."vdata set pop = $popTot where wref = $vid";
mysql_query($q, $this->connection);
}
function buildingPOP($f,$lvl){
$name = "bid".$f;
global $$name;
$name = "bid".$f;
global $$name;
$popT = 0;
$dataarray = $$name;
for ($i = 0; $i <= $lvl; $i++) {
$popT += $dataarray[$i]['pop'];
}
return $popT;
$dataarray = $$name;
for ($i = 0; $i <= $lvl; $i++) {
$popT += $dataarray[$i]['pop'];
}
return $popT;
}
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);
$r = mysql_fetch_array($result);
return $r['id'];
@@ -92,199 +92,199 @@ class adm_DB {
global $database;
$wid = $this->getWref($post['x'],$post['y']);
$uid = $post['uid'];
$status = $database->getVillageState($wid);
$status = 0;
if($status == 0){
$status = $database->getVillageState($wid);
$status = 0;
if($status == 0){
mysql_query("Insert into ".TB_PREFIX."admin_log values (0,".$_SESSION['id'].",'Added new village <b><a href=\'admin.php?p=village&did=$wid\'>$wid</a></b> to user <b><a href=\'admin.php?p=player&uid=$uid\'>$uid</a></b>',".time().")");
$database->setFieldTaken($wid);
$database->setFieldTaken($wid);
$database->addVillage($wid,$uid,'new village','0');
$database->addResourceFields($wid,$database->getVillageType($wid));
$database->addUnits($wid);
$database->addTech($wid);
$database->addABTech($wid);
}
$database->addABTech($wid);
}
}
function Punish($post){
global $database;
global $database;
$villages = $database->getProfileVillages($post['uid']);
$admid = $post['admid'];
$user = $database->getUserArray($post['uid'],1);
for ($i = 0; $i <= count($villages)-1; $i++) {
$vid = $villages[$i]['wref'];
if($post['punish']){
$popOld = $villages[$i]['pop'];
$proc = 100-$post['punish'];
$pop = floor(($popOld/100)*($proc));
if($pop <= 1 ){$pop = 2;}
$this->PunishBuilding($vid,$proc,$pop);
$user = $database->getUserArray($post['uid'],1);
for ($i = 0; $i <= count($villages)-1; $i++) {
$vid = $villages[$i]['wref'];
if($post['punish']){
$popOld = $villages[$i]['pop'];
$proc = 100-$post['punish'];
$pop = floor(($popOld/100)*($proc));
if($pop <= 1 ){$pop = 2;}
$this->PunishBuilding($vid,$proc,$pop);
}
if($post['del_troop']){
if($user['tribe'] == 1) {
$unit = 1;
}else if($user['tribe'] == 2) {
$unit = 11;
}else if($user['tribe'] == 3) {
$unit = 21;
}
$this->DelUnits($villages[$i]['wref'],$unit);
}
if($post['clean_ware']){
$time = time();
$q = "UPDATE ".TB_PREFIX."vdata SET `wood` = '0', `clay` = '0', `iron` = '0', `crop` = '0', `lastupdate` = '$time' WHERE wref = $vid;";
mysql_query($q, $this->connection);
}
}
}
if($post['del_troop']){
if($user['tribe'] == 1) {
$unit = 1;
}else if($user['tribe'] == 2) {
$unit = 11;
}else if($user['tribe'] == 3) {
$unit = 21;
}
$this->DelUnits($villages[$i]['wref'],$unit);
}
if($post['clean_ware']){
$time = time();
$q = "UPDATE ".TB_PREFIX."vdata SET `wood` = '0', `clay` = '0', `iron` = '0', `crop` = '0', `lastupdate` = '$time' WHERE wref = $vid;";
mysql_query($q, $this->connection);
}
}
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){
global $database;
$q = "UPDATE ".TB_PREFIX."vdata set pop = $pop where wref = $vid;";
mysql_query($q, $this->connection);
$fdata = $database->getResourceLevel($vid);
for ($i = 1; $i <= 40; $i++) {
if($fdata['f'.$i]>1){
$zm = ($fdata['f'.$i]/100)*$proc;
if($zm < 1){$zm = 1;}else{$zm = floor($zm);}
$q = "UPDATE ".TB_PREFIX."fdata SET `f$i` = '$zm' WHERE `vref` = $vid;";
mysql_query($q, $this->connection);
}
}
global $database;
$q = "UPDATE ".TB_PREFIX."vdata set pop = $pop where wref = $vid;";
mysql_query($q, $this->connection);
$fdata = $database->getResourceLevel($vid);
for ($i = 1; $i <= 40; $i++) {
if($fdata['f'.$i]>1){
$zm = ($fdata['f'.$i]/100)*$proc;
if($zm < 1){$zm = 1;}else{$zm = floor($zm);}
$q = "UPDATE ".TB_PREFIX."fdata SET `f$i` = '$zm' WHERE `vref` = $vid;";
mysql_query($q, $this->connection);
}
}
}
function DelUnits($vid,$unit){
for ($i = $unit; $i <= 9+$unit; $i++) {
$this->DelUnits2($vid,$unit);
}
for ($i = $unit; $i <= 9+$unit; $i++) {
$this->DelUnits2($vid,$unit);
}
}
function DelUnits2($vid,$unit){
$q = "UPDATE ".TB_PREFIX."units SET `u$unit` = '0' WHERE `vref` = $vid;";
mysql_query($q, $this->connection);
$q = "UPDATE ".TB_PREFIX."units SET `u$unit` = '0' WHERE `vref` = $vid;";
mysql_query($q, $this->connection);
}
function DelPlayer($uid,$pass){
global $database;
$ID = $_SESSION['id'];//$database->getUserField($_SESSION['username'],'id',1);
global $database;
$ID = $_SESSION['id'];//$database->getUserField($_SESSION['username'],'id',1);
if($this->CheckPass($pass,$ID)){
$villages = $database->getProfileVillages($uid);
for ($i = 0; $i <= count($villages)-1; $i++) {
$this->DelVillage($villages[$i]['wref']);
}
$villages = $database->getProfileVillages($uid);
for ($i = 0; $i <= count($villages)-1; $i++) {
$this->DelVillage($villages[$i]['wref']);
}
$name = $database->getUserField($uid,"username",0);
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;";
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);
$q = "DELETE FROM ".TB_PREFIX."users WHERE `id` = $uid;";
mysql_query($q, $this->connection);
}
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);
$dbarray = mysql_fetch_array($result);
if($dbarray['password'] == md5($password)) {
if($dbarray['password'] == md5($password)) {
return true;
}else{
return false;
}
}else{
return false;
}
}
function DelVillage($wref){
$q = "SELECT * FROM ".TB_PREFIX."vdata WHERE `wref` = $wref and capital = 0";
$result = mysql_query($q, $this->connection);
if(mysql_num_rows($result) > 0){
$result = mysql_query($q, $this->connection);
if(mysql_num_rows($result) > 0){
mysql_query("Insert into ".TB_PREFIX."admin_log values (0,".$_SESSION['id'].",'Deleted village <b>$wref</b>',".time().")");
$q = "DELETE FROM ".TB_PREFIX."vdata WHERE `wref` = $wref";
$q = "DELETE FROM ".TB_PREFIX."vdata WHERE `wref` = $wref";
mysql_query($q, $this->connection);
$q = "DELETE FROM ".TB_PREFIX."units WHERE `vref` = $wref";
mysql_query($q, $this->connection);
$q = "DELETE FROM ".TB_PREFIX."bdata WHERE `wid` = $wref";
mysql_query($q, $this->connection);
$q = "DELETE FROM ".TB_PREFIX."abdata WHERE `wid` = $wref";
mysql_query($q, $this->connection);
$q = "DELETE FROM ".TB_PREFIX."fdata WHERE `vref` = $wref";
mysql_query($q, $this->connection);
$q = "DELETE FROM ".TB_PREFIX."training WHERE `vref` = $wref";
mysql_query($q, $this->connection);
$q = "DELETE FROM ".TB_PREFIX."movement WHERE `from` = $wref";
mysql_query($q, $this->connection);
$q = "UPDATE ".TB_PREFIX."wdata SET `occupied` = '0' WHERE `id` = $wref";
mysql_query($q, $this->connection);
}
$q = "DELETE FROM ".TB_PREFIX."units WHERE `vref` = $wref";
mysql_query($q, $this->connection);
$q = "DELETE FROM ".TB_PREFIX."bdata WHERE `wid` = $wref";
mysql_query($q, $this->connection);
$q = "DELETE FROM ".TB_PREFIX."abdata WHERE `wid` = $wref";
mysql_query($q, $this->connection);
$q = "DELETE FROM ".TB_PREFIX."fdata WHERE `vref` = $wref";
mysql_query($q, $this->connection);
$q = "DELETE FROM ".TB_PREFIX."training WHERE `vref` = $wref";
mysql_query($q, $this->connection);
$q = "DELETE FROM ".TB_PREFIX."movement WHERE `from` = $wref";
mysql_query($q, $this->connection);
$q = "UPDATE ".TB_PREFIX."wdata SET `occupied` = '0' WHERE `id` = $wref";
mysql_query($q, $this->connection);
}
}
function DelBan($uid,$id){
global $database;
$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().")");
$q = "UPDATE ".TB_PREFIX."users SET `access` = '".USER."' WHERE `id` = $uid;";
mysql_query($q, $this->connection);
$q = "UPDATE ".TB_PREFIX."banlist SET `active` = '0' WHERE `id` = $id;";
mysql_query($q, $this->connection);
$q = "UPDATE ".TB_PREFIX."users SET `access` = '".USER."' WHERE `id` = $uid;";
mysql_query($q, $this->connection);
$q = "UPDATE ".TB_PREFIX."banlist SET `active` = '0' WHERE `id` = $id;";
mysql_query($q, $this->connection);
}
function AddBan($uid,$end,$reason){
global $database;
global $database;
$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().")");
$q = "UPDATE ".TB_PREFIX."users SET `access` = '0' WHERE `id` = $uid;";
mysql_query($q, $this->connection);
$time = time();
$admin = $_SESSION['id']; //$database->getUserField($_SESSION['username'],'id',1);
$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');";
mysql_query($q, $this->connection);
$q = "UPDATE ".TB_PREFIX."users SET `access` = '0' WHERE `id` = $uid;";
mysql_query($q, $this->connection);
$time = time();
$admin = $_SESSION['id']; //$database->getUserField($_SESSION['username'],'id',1);
$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');";
mysql_query($q, $this->connection);
}
function search_player($player){
$q = "SELECT id,username FROM ".TB_PREFIX."users WHERE `username` LIKE '%$player%' and username != 'support'";
$result = mysql_query($q, $this->connection);
return $this->mysql_fetch_all($result);
}
$q = "SELECT id,username FROM ".TB_PREFIX."users WHERE `username` LIKE '%$player%' and username != 'support'";
$result = mysql_query($q, $this->connection);
return $this->mysql_fetch_all($result);
}
function search_email($email){
$q = "SELECT id,email FROM ".TB_PREFIX."users WHERE `email` LIKE '%$email%' and username != 'support'";
$result = mysql_query($q, $this->connection);
return $this->mysql_fetch_all($result);
$q = "SELECT id,email FROM ".TB_PREFIX."users WHERE `email` LIKE '%$email%' and username != 'support'";
$result = mysql_query($q, $this->connection);
return $this->mysql_fetch_all($result);
}
function search_village($village){
$q = "SELECT * FROM ".TB_PREFIX."vdata WHERE `name` LIKE '%$village%' or `wref` LIKE '%$village%'";
$result = mysql_query($q, $this->connection);
return $this->mysql_fetch_all($result);
$q = "SELECT * FROM ".TB_PREFIX."vdata WHERE `name` LIKE '%$village%' or `wref` LIKE '%$village%'";
$result = mysql_query($q, $this->connection);
return $this->mysql_fetch_all($result);
}
function search_alliance($alliance){
$q = "SELECT * FROM ".TB_PREFIX."alidata WHERE `name` LIKE '%$alliance%' or `tag` LIKE '%$alliance%' or `id` LIKE '%$alliance%'";
$result = mysql_query($q, $this->connection);
return $this->mysql_fetch_all($result);
$q = "SELECT * FROM ".TB_PREFIX."alidata WHERE `name` LIKE '%$alliance%' or `tag` LIKE '%$alliance%' or `id` LIKE '%$alliance%'";
$result = mysql_query($q, $this->connection);
return $this->mysql_fetch_all($result);
}
function search_ip($ip){
$q = "SELECT * FROM ".TB_PREFIX."login_log WHERE `ip` LIKE '%$ip%'";
$result = mysql_query($q, $this->connection);
return $this->mysql_fetch_all($result);
$q = "SELECT * FROM ".TB_PREFIX."login_log WHERE `ip` LIKE '%$ip%'";
$result = mysql_query($q, $this->connection);
return $this->mysql_fetch_all($result);
}
function search_banned(){
$q = "SELECT * FROM ".TB_PREFIX."banlist where active = '1'";
$result = mysql_query($q, $this->connection);
return $this->mysql_fetch_all($result);
$q = "SELECT * FROM ".TB_PREFIX."banlist where active = '1'";
$result = mysql_query($q, $this->connection);
return $this->mysql_fetch_all($result);
}
function Del_banned(){
//$q = "SELECT * FROM ".TB_PREFIX."banlist";
$result = mysql_query($q, $this->connection);
return $this->mysql_fetch_all($result);
//$q = "SELECT * FROM ".TB_PREFIX."banlist";
$result = mysql_query($q, $this->connection);
return $this->mysql_fetch_all($result);
}
/***************************
@@ -316,5 +316,5 @@ class adm_DB {
};
$admin = new adm_DB;
include("function.php");
include("function.php");
?>
+88 -88
View File
@@ -9,97 +9,97 @@
## ##
#################################################################################
class funct {
function CheckLogin(){
if($_SESSION['access'] >= MULTIHUNTER and $_SESSION['id']){
return true;
}else{
return false;
}
}
function Act($get){
global $admin,$database;
class funct {
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 CheckLogin(){
if($_SESSION['access'] >= MULTIHUNTER and $_SESSION['id']){
return true;
}else{
return false;
}
}
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){
global $admin,$database;
switch($post['action']){
case DelPlayer:
$admin->DelPlayer($post['uid'],$post['pass']);
header("Location: ?p=search&msg=ursdel");
break;
case punish:
$admin->Punish($post);
header("Location: ".$_SERVER['HTTP_REFERER']);
break;
case addVillage:
$admin->AddVillage($post);
header("Location: ".$_SERVER['HTTP_REFERER']);
break;
}
global $admin,$database;
switch($post['action']){
case DelPlayer:
$admin->DelPlayer($post['uid'],$post['pass']);
header("Location: ?p=search&msg=ursdel");
break;
case punish:
$admin->Punish($post);
header("Location: ".$_SERVER['HTTP_REFERER']);
break;
case addVillage:
$admin->AddVillage($post);
header("Location: ".$_SERVER['HTTP_REFERER']);
break;
}
}
function LogIN($username,$password){
global $admin,$database;
if($admin->Login($username,$password)){
//$_SESSION['username'] = $username;
$_SESSION['access'] = $database->getUserField($username,'access',1);
$_SESSION['id'] = $database->getUserField($username,'id',1);
header("Location: ".$_SERVER['HTTP_REFERER']);
//header("Location: admin.php");
}else{
echo "Error";
}
global $admin,$database;
if($admin->Login($username,$password)){
//$_SESSION['username'] = $username;
$_SESSION['access'] = $database->getUserField($username,'access',1);
$_SESSION['id'] = $database->getUserField($username,'id',1);
header("Location: ".$_SERVER['HTTP_REFERER']);
//header("Location: admin.php");
}else{
echo "Error";
}
}
function LogOut(){
$_SESSION['access'] = '';
$_SESSION['id'] = '';
function LogOut(){
$_SESSION['access'] = '';
$_SESSION['id'] = '';
}
public function procResType($ref) {
@@ -150,16 +150,16 @@ class funct {
}
return $build;
}
};
$funct = new funct;
if($funct->CheckLogin()){
if($_GET['action']){
$funct->Act($_GET);
$funct->Act($_GET);
}
if($_POST['action']){
$funct->Act2($_POST);
$funct->Act2($_POST);
}
}
if($_POST['action']=='login'){
+1 -1
View File
@@ -1,6 +1,6 @@
Hello %USER%,
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%
+350 -350
View File
@@ -3,361 +3,361 @@
/*
|--------------------------------------------------------------------------
| PLEASE DO NOT REMOVE THIS COPYRIGHT NOTICE!
|--------------------------------------------------------------------------
|--------------------------------------------------------------------------
|
| Project owner: Dzoki < dzoki.travian@gmail.com >
|
|
| 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.
|
| TravianX All rights reserved
|
*/
class Alliance {
class Alliance {
public $gotInvite = false;
public $inviteArray = array();
public $allianceArray = array();
public $userPermArray = array();
public $gotInvite = false;
public $inviteArray = array();
public $allianceArray = array();
public $userPermArray = array();
public function procAlliance($get) {
global $session, $database;
public function procAlliance($get) {
global $session, $database;
if($session->alliance != 0) {
$this->allianceArray = $database->getAlliance($session->alliance);
// Permissions Array
// [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);
} else {
$this->inviteArray = $database->getInvitation($session->uid);
$this->gotInvite = count($this->inviteArray) == 0 ? false : true;
}
if(isset($get['a'])) {
switch($get['a']) {
case 2:
$this->rejectInvite($get);
break;
case 3:
$this->acceptInvite($get);
break;
default:
break;
}
}
if(isset($get['o'])) {
switch($get['o']) {
case 4:
$this->delInvite($get);
break;
default:
break;
}
}
}
if($session->alliance != 0) {
$this->allianceArray = $database->getAlliance($session->alliance);
// Permissions Array
// [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);
} else {
$this->inviteArray = $database->getInvitation($session->uid);
$this->gotInvite = count($this->inviteArray) == 0 ? false : true;
}
if(isset($get['a'])) {
switch($get['a']) {
case 2:
$this->rejectInvite($get);
break;
case 3:
$this->acceptInvite($get);
break;
default:
break;
}
}
if(isset($get['o'])) {
switch($get['o']) {
case 4:
$this->delInvite($get);
break;
default:
break;
}
}
}
public function procAlliForm($post) {
if(isset($post['ft'])) {
switch($post['ft']) {
case "ali1":
$this->createAlliance($post);
break;
}
public function procAlliForm($post) {
if(isset($post['ft'])) {
switch($post['ft']) {
case "ali1":
$this->createAlliance($post);
break;
}
}
if(isset($_POST['dipl']) and isset($_POST['a_name'])) {
$this->changediplomacy($post);
}
}
if(isset($_POST['dipl']) and isset($_POST['a_name'])) {
$this->changediplomacy($post);
}
if(isset($post['s'])) {
if(isset($post['o'])) {
switch($post['o']) {
case 1:
if(isset($_POST['a'])) {
$this->changeUserPermissions($post);
}
break;
case 2:
if(isset($_POST['a_user'])) {
$this->kickAlliUser($post);
}
break;
case 4:
if(isset($_POST['a']) && $_POST['a'] == 4) {
$this->sendInvite($post);
}
break;
case 3:
$this->updateAlliProfile($post);
break;
case 11:
$this->quitally($post);
break;
case 100:
$this->changeAliName($post);
break;
}
}
}
}
if(isset($post['s'])) {
if(isset($post['o'])) {
switch($post['o']) {
case 1:
if(isset($_POST['a'])) {
$this->changeUserPermissions($post);
}
break;
case 2:
if(isset($_POST['a_user'])) {
$this->kickAlliUser($post);
}
break;
case 4:
if(isset($_POST['a']) && $_POST['a'] == 4) {
$this->sendInvite($post);
}
break;
case 3:
$this->updateAlliProfile($post);
break;
case 11:
$this->quitally($post);
break;
case 100:
$this->changeAliName($post);
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
*****************************************/
public function setForumLink($post) {
global $database, $session;
if(isset($post['f_link'])){
$database->setAlliForumLink($session->alliance, $post['f_link']);
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
*****************************************/
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");
}
}
/*****************************************
Function to quit from alliance
*****************************************/
private function quitally($post) {
global $database, $session, $form;
if(!isset($post['pw']) || $post['pw'] == "") {
$form->addError("pw1", PW_EMPTY);
} elseif(md5($post['pw']) !== $session->userinfo['password']) {
$form->addError("pw2", PW_ERR);
} else {
$database->updateUserField($session->uid, 'alliance', 0, 1);
$database->deleteAlliPermissions($session->uid);
// log the notice
$database->deleteAlliance($session->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);
}
}
}
/*****************************************
Function to quit from alliance
*****************************************/
private function quitally($post) {
global $database, $session, $form;
if(!isset($post['pw']) || $post['pw'] == "") {
$form->addError("pw1", PW_EMPTY);
} elseif(md5($post['pw']) !== $session->userinfo['password']) {
$form->addError("pw2", PW_ERR);
} else {
$database->updateUserField($session->uid, 'alliance', 0, 1);
$database->deleteAlliPermissions($session->uid);
// log the notice
$database->deleteAlliance($session->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);
}
}
private function changediplomacy($post) {
global $database, $session, $form;
private function changediplomacy($post) {
global $database, $session, $form;
$aName = $database->RemoveXSS($_POST['a_name']);
$aType = (int)intval($_POST['dipl']);
if($database->aExist($aName, "tag")) {
if($database->getAllianceID($aName) != $session->alliance) {
if($aType >= 1 and $aType <= 3) {
if(!$database->diplomacyInviteCheck($database->getAllianceID($aName), $session->alliance)) {
$database->diplomacyInviteAdd($session->alliance, $database->getAllianceID($aName), $aType);
$aName = $database->RemoveXSS($_POST['a_name']);
$aType = (int)intval($_POST['dipl']);
if($database->aExist($aName, "tag")) {
if($database->getAllianceID($aName) != $session->alliance) {
if($aType >= 1 and $aType <= 3) {
if(!$database->diplomacyInviteCheck($database->getAllianceID($aName), $session->alliance)) {
$database->diplomacyInviteAdd($session->alliance, $database->getAllianceID($aName), $aType);
if($aType == 1){
$notice = "offer a confederation to";
}else if($aType == 2){
@@ -366,23 +366,23 @@
$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>.');
$form->addError("name", "Invite sended");
} else {
$form->addError("name", "You have already sended them a invite");
}
$form->addError("name", "Invite sended");
} else {
$form->addError("name", "You have already sended them a invite");
}
} else {
$form->addError("name", "wrong choice made");
}
} else {
$form->addError("name", "You can not invite your own alliance");
}
} else {
$form->addError("name", "Alliance does not exist");
}
}
}
} else {
$form->addError("name", "wrong choice made");
}
} else {
$form->addError("name", "You can not invite your own alliance");
}
} else {
$form->addError("name", "Alliance does not exist");
}
}
}
$alliance = new Alliance;
$alliance = new Alliance;
?>
+2892 -2892
View File
File diff suppressed because it is too large Load Diff
+857 -857
View File
File diff suppressed because it is too large Load Diff
+42 -42
View File
@@ -11,7 +11,7 @@
#################################################################################
class Building {
class Building {
public $NewBuilding = false;
private $maxConcurrent;
@@ -29,10 +29,10 @@ class Building {
$this->maxConcurrent += PLUS_MAX;
}
$this->LoadBuilding();
}
public function procBuild($get) {
public function procBuild($get) {
global $session;
if(isset($get['a']) && $get['c'] == $session->checker && !isset($get['id'])) {
if($get['a'] == 0) {
@@ -53,7 +53,7 @@ class Building {
}
}
}
public function canBuild($id,$tid) {
global $village,$session,$database;
$demolition = $database->getDemolition($village->wid);
@@ -112,7 +112,7 @@ class Building {
return 3;
}
}
else {
else {
return 2;
}
}
@@ -169,7 +169,7 @@ class Building {
}
return false;
}
public function rallying() {
foreach($this->buildArray as $job) {
if($job['type'] == 16) {
@@ -178,7 +178,7 @@ class Building {
}
return false;
}
public function procResType($ref) {
global $session;
switch($ref) {
@@ -228,7 +228,7 @@ class Building {
}
return $build;
}
private function loadBuilding() {
global $database,$village,$session;
$this->buildArray = $database->getJobs($village->wid);
@@ -255,7 +255,7 @@ class Building {
$this->NewBuilding = true;
}
}
private function removeBuilding($d) {
global $database,$village;
foreach($this->buildArray as $jobs) {
@@ -275,7 +275,7 @@ class Building {
}
}
}
private function upgradeBuilding($id) {
global $database,$village,$session,$logging;
if($this->allocated < $this->maxConcurrent) {
@@ -324,7 +324,7 @@ class Building {
}
}
}
private function downgradeBuilding($id) {
global $database,$village,$session,$logging;
if($this->allocated < $this->maxConcurrent) {
@@ -346,7 +346,7 @@ class Building {
$time = $build['timestamp'] + round($dataarray[$village->resarray['f'.$id]-1]['time'] / 4);
}
}
}
}
}
else {
$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);
header("Location: dorf2.php");
}
}
}
}
private function constructBuilding($id,$tid) {
global $database,$village,$session,$logging;
if($this->allocated < $this->maxConcurrent) {
@@ -392,7 +392,7 @@ class Building {
}
}
}
private function meetRequirement($id) {
global $village,$session,$database;
switch($id) {
@@ -486,12 +486,12 @@ class Building {
case 37:
if($this->getTypeLevel(15) >= 3 && $this->getTypeLevel(16) >= 1) { return true; } else { return false; }
break;
case 38:
if($this->getTypeLevel(15) >= 10 && $village->capital == 0) { return true; } else { return false; }
break;
case 39:
if($this->getTypeLevel(15) >= 10 && $village->capital == 0) { return true; } else { return false; }
break;
case 38:
if($this->getTypeLevel(15) >= 10 && $village->capital == 0) { return true; } else { return false; }
break;
case 39:
if($this->getTypeLevel(15) >= 10 && $village->capital == 0) { return true; } else { return false; }
break;
case 40:
$wwlevel = $village->resarray['f'.$id];
if($wwlevel > 50){
@@ -506,7 +506,7 @@ class Building {
$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;
case 41:
if($this->getTypeLevel(16) >= 10 && $this->getTypeLevel(20) == 20) { return true; } else { return false; }
@@ -516,7 +516,7 @@ class Building {
break;
}
}
private function checkResource($tid,$id) {
$name = "bid".$tid;
global $village,$$name,$database;
@@ -553,7 +553,7 @@ class Building {
}
}
}
public function isMax($id,$field,$loop=0) {
$name = "bid".$id;
global $$name,$village;
@@ -570,7 +570,7 @@ class Building {
return ($village->resarray['f'.$field] == count($dataarray) - $loop);
}
}
public function getTypeLevel($tid,$vid=0) {
global $village,$database;
$keyholder = array();
@@ -583,7 +583,7 @@ class Building {
if(strpos($key,'t')) {
$key = preg_replace("/[^0-9]/", '', $key);
array_push($keyholder, $key);
}
}
}
$element = count($keyholder);
if($element >= 2) {
@@ -593,8 +593,8 @@ class Building {
array_push($temparray,$resourcearray['f'.$keyholder[$i]]);
}
foreach ($temparray as $key => $val) {
if ($val == max($temparray))
$target = $key;
if ($val == max($temparray))
$target = $key;
}
}
else {
@@ -619,8 +619,8 @@ class Building {
return 0;
}
}
public function isCurrent($id) {
foreach($this->buildArray as $build) {
if($build['field'] == $id && $build['loopcon'] <> 1) {
@@ -628,7 +628,7 @@ class Building {
}
}
}
public function isLoop($id=0) {
foreach($this->buildArray as $build) {
if(($build['field'] == $id && $build['loopcon']) || ($build['loopcon'] == 1 && $id == 0)) {
@@ -637,10 +637,10 @@ class Building {
}
return false;
}
public function finishAll() {
global $database,$session,$logging,$village,$bid18,$bid10,$bid11,$technology,$_SESSION;
if($session->access!=BANNED){
if($session->access!=BANNED){
foreach($this->buildArray as $jobs) {
if($jobs['wid']==$village->wid){
$wwvillage = $database->getResourceLevel($jobs['wid']);
@@ -651,7 +651,7 @@ class Building {
$resource = $this->resourceRequired($jobs['field'],$jobs['type']);
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'];
}else{
}else{
$villwood = $database->getVillageField($jobs['wid'],'wood');
$villclay = $database->getVillageField($jobs['wid'],'clay');
$villiron = $database->getVillageField($jobs['wid'],'iron');
@@ -676,7 +676,7 @@ class Building {
$max = $bid18[$level]['attri'];
$q = "UPDATE ".TB_PREFIX."alidata set max = $max where leader = $owner";
$database->query($q);
}
}
}
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");
}
}
public function resourceRequired($id,$tid,$plus=1) {
$name = "bid".$tid;
global $$name,$village,$bid15;
@@ -728,7 +728,7 @@ class Building {
$cp = $dataarray[$village->resarray['f'.$id]+$plus]['cp'];
return array("wood"=>$wood,"clay"=>$clay,"iron"=>$iron,"crop"=>$crop,"pop"=>$pop,"time"=>$time,"cp"=>$cp);
}
public function getTypeField($type) {
global $village;
for($i=19;$i<=40;$i++) {
@@ -737,7 +737,7 @@ class Building {
}
}
}
public function calculateAvaliable($id,$tid,$plus=1) {
global $village,$generator;
$uprequire = $this->resourceRequired($id,$tid,$plus);
@@ -755,4 +755,4 @@ class Building {
}
};
?>
?>
+71 -71
View File
@@ -1,4 +1,4 @@
<?php
<?php
#################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ##
@@ -11,13 +11,13 @@
if (!isset($SAJAX_INCLUDED)) {
$GLOBALS['sajax_version'] = '0.12';
$GLOBALS['sajax_version'] = '0.12';
$GLOBALS['sajax_debug_mode'] = 0;
$GLOBALS['sajax_export_list'] = array();
$GLOBALS['sajax_request_type'] = 'GET';
$GLOBALS['sajax_remote_uri'] = '';
$GLOBALS['sajax_failure_redirect'] = '';
function sajax_init() {
}
@@ -26,29 +26,29 @@ if (!isset($SAJAX_INCLUDED)) {
return $_SERVER["REQUEST_URI"];
}
$sajax_remote_uri = sajax_get_my_uri();
function sajax_get_js_repr($value) {
$type = gettype($value);
if ($type == "boolean") {
return ($value) ? "Boolean(true)" : "Boolean(false)";
}
}
elseif ($type == "integer") {
return "parseInt($value)";
}
}
elseif ($type == "double") {
return "parseFloat($value)";
}
}
elseif ($type == "array" || $type == "object" ) {
$s = "{ ";
if ($type == "object") {
$value = get_object_vars($value);
}
}
foreach ($value as $k=>$v) {
$esc_key = sajax_esc($k);
if (is_numeric($k))
if (is_numeric($k))
$s .= "$k: " . sajax_get_js_repr($v) . ", ";
else
$s .= "\"$esc_key\": " . sajax_get_js_repr($v) . ", ";
@@ -56,7 +56,7 @@ if (!isset($SAJAX_INCLUDED)) {
if (count($value))
$s = substr($s, 0, -2);
return $s . " }";
}
}
else {
$esc_val = sajax_esc($value);
$s = "'$esc_val'";
@@ -66,36 +66,36 @@ if (!isset($SAJAX_INCLUDED)) {
function sajax_handle_client_request() {
global $sajax_export_list;
$mode = "";
if (! empty($_GET["rs"]))
if (! empty($_GET["rs"]))
$mode = "get";
if (!empty($_POST["rs"]))
$mode = "post";
if (empty($mode))
if (empty($mode))
return;
$target = "";
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 ("Cache-Control: no-cache, must-revalidate");
header ("Pragma: no-cache");
header ("Cache-Control: no-cache, must-revalidate");
header ("Pragma: no-cache");
$func_name = $_GET["rs"];
if (! empty($_GET["rsargs"]))
if (! empty($_GET["rsargs"]))
$args = $_GET["rsargs"];
else
$args = array();
}
else {
$func_name = $_POST["rs"];
if (! empty($_POST["rsargs"]))
if (! empty($_POST["rsargs"]))
$args = $_POST["rsargs"];
else
$args = array();
@@ -110,20 +110,20 @@ if (!isset($SAJAX_INCLUDED)) {
}
exit;
}
function sajax_get_common_js() {
global $sajax_debug_mode;
global $sajax_request_type;
global $sajax_remote_uri;
global $sajax_failure_redirect;
$t = strtoupper($sajax_request_type);
if ($t != "" && $t != "GET" && $t != "POST")
if ($t != "" && $t != "GET" && $t != "POST")
return "// Invalid type: $t.. \n\n";
ob_start();
?>
// remote scripting library
// (c) copyright 2005 modernmethod, inc
// edited by ttmtt
@@ -131,18 +131,18 @@ if (!isset($SAJAX_INCLUDED)) {
var sajax_request_type = "<?php echo $t; ?>";
var sajax_target_id = "";
var sajax_failure_redirect = "<?php echo $sajax_failure_redirect; ?>";
function sajax_debug(text) {
if (sajax_debug_mode)
alert(text);
}
function sajax_init_object() {
sajax_debug("sajax_init_object() called..")
var A;
var msxmlhttp = new Array(
function sajax_init_object() {
sajax_debug("sajax_init_object() called..")
var A;
var msxmlhttp = new Array(
'Msxml2.XMLHTTP.5.0',
'Msxml2.XMLHTTP.4.0',
'Msxml2.XMLHTTP.3.0',
@@ -155,21 +155,21 @@ if (!isset($SAJAX_INCLUDED)) {
A = null;
}
}
if(!A && typeof XMLHttpRequest != "undefined")
A = new XMLHttpRequest();
if (!A)
sajax_debug("Could not create connection object.");
return A;
}
var sajax_requests = new Array();
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();
}
function sajax_do_call(func_name, args) {
var i, x, n;
var uri;
@@ -178,36 +178,36 @@ if (!isset($SAJAX_INCLUDED)) {
sajax_debug("in sajax_do_call().." + sajax_request_type + "/" + 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";
uri = "<?php echo $sajax_remote_uri; ?>";
if (sajax_request_type == "GET") {
// alert(args);
if (uri.indexOf("?") == -1)
if (uri.indexOf("?") == -1)
uri += "?rs=" + escape(func_name);
else
uri += "&rs=" + escape(func_name);
uri += "&rst=" + escape(sajax_target_id);
uri += "&rsrnd=" + new Date().getTime();
for (i = 0; i < args.length-1; i++) {
uri += "&rsargs[]=" + args[i];
}
post_data = null;
}
}
else if (sajax_request_type == "POST") {
post_data = "rs=" + escape(func_name);
post_data += "&rst=" + escape(sajax_target_id);
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]);
}
else {
alert("Illegal request type: " + sajax_request_type);
}
x = sajax_init_object();
if (x == null) {
if (sajax_failure_redirect != "") {
@@ -220,20 +220,20 @@ if (!isset($SAJAX_INCLUDED)) {
} else {
x.open(sajax_request_type, uri, true);
// window.open(uri);
sajax_requests[sajax_requests.length] = x;
if (sajax_request_type == "POST") {
x.setRequestHeader("Method", "POST " + uri + " HTTP/1.1");
x.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
}
x.onreadystatechange = function() {
if (x.readyState != 4)
if (x.readyState != 4)
return;
sajax_debug("received " + x.responseText);
var status;
var data;
var txt = x.responseText.replace(/^\s*|\s*$/g,"");
@@ -242,10 +242,10 @@ if (!isset($SAJAX_INCLUDED)) {
if (status == "") {
// 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);
else {
if (target_id != "")
if (target_id != "")
document.getElementById(target_id).innerHTML = eval(data);
else {
try {
@@ -265,24 +265,24 @@ if (!isset($SAJAX_INCLUDED)) {
}
}
}
sajax_debug(func_name + " uri = " + uri + "/post = " + post_data);
x.send(post_data);
sajax_debug(func_name + " waiting..");
delete x;
return true;
}
<?php
$html = ob_get_contents();
ob_end_clean();
return $html;
}
function sajax_show_common_js() {
echo sajax_get_common_js();
}
// javascript escape a value
function sajax_esc($val)
{
@@ -294,41 +294,41 @@ if (!isset($SAJAX_INCLUDED)) {
}
function sajax_get_one_stub($func_name) {
ob_start();
ob_start();
?>
// wrapper for <?php echo $func_name; ?>
function x_<?php echo $func_name; ?>() {
sajax_do_call("<?php echo $func_name; ?>",
x_<?php echo $func_name; ?>.arguments);
}
<?php
$html = ob_get_contents();
ob_end_clean();
return $html;
}
function sajax_show_one_stub($func_name) {
echo sajax_get_one_stub($func_name);
}
function sajax_export() {
global $sajax_export_list;
$n = func_num_args();
for ($i = 0; $i < $n; $i++) {
$sajax_export_list[] = func_get_arg($i);
}
}
$sajax_js_has_been_shown = 0;
function sajax_get_javascript()
{
global $sajax_js_has_been_shown;
global $sajax_export_list;
$html = "";
if (! $sajax_js_has_been_shown) {
$html .= sajax_get_common_js();
@@ -339,13 +339,13 @@ if (!isset($SAJAX_INCLUDED)) {
}
return $html;
}
function sajax_show_javascript()
{
echo sajax_get_javascript();
}
$SAJAX_INCLUDED = 1;
}
@@ -356,7 +356,7 @@ if (!isset($SAJAX_INCLUDED)) {
if (is_array($data)){$msg = htmlspecialchars($data[1]);}else{$msg = htmlspecialchars($data);};
// $msg=htmlspecialchars($msg);
$name = $session->username;
$id_user = $session->uid;
$alliance = $session->alliance;
$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