hero update
@@ -0,0 +1,205 @@
|
||||
<?php
|
||||
#################################################################################
|
||||
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Filename playerheroinfo.tpl ##
|
||||
## Developed by: ronix ##
|
||||
## License: TravianZ Project ##
|
||||
## Copyright: TravianZ (c) 2010-2014. All rights reserved. ##
|
||||
## ##
|
||||
#################################################################################
|
||||
$id = isset($_GET['uid']);
|
||||
if(isset($_GET['uid'])){
|
||||
$id = $_GET['uid'];
|
||||
include_once("../GameEngine/Data/hero_full.php");
|
||||
include_once("../GameEngine/Units.php");
|
||||
$user = $database->getUserArray($id,1);
|
||||
$result = mysql_query("SELECT * FROM " . TB_PREFIX . "hero WHERE `uid` = ".$id);
|
||||
$hero_info = mysql_fetch_array($result);
|
||||
$hero = $units->Hero($id,1);
|
||||
$unarray = array(1=>U1,U2,U3,U4,U5,U6,U7,U8,U9,U10,U11,U12,U13,U14,U15,U16,U17,U18,U19,U20,U21,U22,U23,U24,U25,U26,U27,U28,U29,U30,U31,U32,U33,U34,U35,U36,U37,U38,U39,U40,U41,U42,U43,U44,U45,U46,U47,U48,U49,U50,U99,U0);
|
||||
$utribe=($user['tribe']-1)*10;
|
||||
?>
|
||||
<style>
|
||||
td {
|
||||
vertical-align:middle; padding:2px 7px; border:1px solid silver; font-size:13px; color:black;
|
||||
}
|
||||
th {
|
||||
vertical-align:middle; padding:2px 7px; border:1px solid silver; font-size:13px; color:black;
|
||||
}
|
||||
.thead {
|
||||
background-image:url(../img/un/a/c2.gif); background-repeat:repeat; text-align:center; font-weight:bold;
|
||||
}
|
||||
</style>
|
||||
<script LANGUAGE="JavaScript">
|
||||
function changeValue(u,c) {
|
||||
var objv=document.getElementById(c);
|
||||
var objd=document.getElementById(c+'2');
|
||||
var obje=document.getElementById('exp1');
|
||||
n=objv.value;
|
||||
l=document.frmHero.hlvl.value;
|
||||
e=document.frmHero.exp.value;
|
||||
if (u==0) {
|
||||
if (n<5){
|
||||
v=0;
|
||||
}else{
|
||||
v=n-5;
|
||||
if (l>0){
|
||||
l-=1;
|
||||
}else if (v==0 && l==0) {
|
||||
obje.innerHTML='5';
|
||||
document.frmHero.exp.value='5';
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
if (u==1) {
|
||||
if (n>95){
|
||||
v=100;
|
||||
}else{
|
||||
if(e!=0) {
|
||||
obje.innerHTML='0';
|
||||
document.frmHero.exp.value='0';
|
||||
}else{
|
||||
if (l<99) l++;
|
||||
}
|
||||
v=parseInt(n) + 5;
|
||||
}
|
||||
}
|
||||
if (v>0) document.getElementById(c+'0').innerHTML="<a href=\"#\" onclick=\"return changeValue(0,'"+c+"')\">(-)</a>";
|
||||
if (v<99) document.getElementById(c+'1').innerHTML="<a href=\"#\" onclick=\"return changeValue(1,'"+c+"')\">(+)</a>";
|
||||
if (v<1) document.getElementById(c+'0').innerHTML="<font color=\"grey\">(-)</font>";
|
||||
if (v>98) document.getElementById(c+'1').innerHTML="<font color=\"grey\">(+)</font>";
|
||||
document.getElementById("hlvl").innerHTML=l;
|
||||
objd.innerHTML=v;
|
||||
objv.value=v;
|
||||
document.frmHero.hlvl.value=l;
|
||||
return(true);
|
||||
}
|
||||
function go_url(url) {
|
||||
location=url;
|
||||
return(false);
|
||||
}
|
||||
function check_unit(el) {
|
||||
var obj=el;
|
||||
var uname=obj.options[obj.options.selectedIndex].text;
|
||||
document.getElementById("unt").innerHTML=""+
|
||||
"<span><img class=\"unit u"+obj.value+"\" src=\"img/x.gif\" alt=\""+uname+"\" title=\""+uname+"\" /></span>";
|
||||
}
|
||||
</script>
|
||||
<form name="frmHero" action="../GameEngine/Admin/Mods/editHero.php" method="POST">
|
||||
<input type="hidden" name="admid" id="admid" value="<?php echo $_SESSION['id']; ?>">
|
||||
<input type="hidden" name="id" value="<?php echo $id; ?>" />
|
||||
<table style="border-collapse:collapse; margin-top:25px; line-height:16px; width:100%;">
|
||||
<tr>
|
||||
<td colspan="6" align="center"><b>Edit Player Hero</b></td>
|
||||
</tr>
|
||||
|
||||
<tr class="thead">
|
||||
<td width="30%">Details</td>
|
||||
<td width="35%" colspan="2">Old Value</td>
|
||||
<td width="35%" colspan="3">New Value</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Hero Name</td>
|
||||
<td colspan="2"><?php echo $hero_info['name'];?></td>
|
||||
<td colspan="3"><input name="hname" class="fm" value="<?php echo $hero_info['name'];?>"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Hero Level</td>
|
||||
<td colspan="2"><?php echo $hero_info['level']; ?></td>
|
||||
<td colspan="3" style="font-weight:bold"><div id="hlvl">0</div><input name="hlvl" type="hidden" value="0"</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Hero Unit</td>
|
||||
<td colspan="2"><?php echo "<img class=\"unit u".$hero_info['unit']."\" src=\"img/x.gif\" alt=\"".$technology->getUnitName($hero_info['unit'])."\" title=\"".$technology->getUnitName($hero_info['unit'])."\" /> (".$technology->getUnitName($hero_info['unit']); ?>)</td>
|
||||
<td width="10%" align="center" style="border-right:none"><div id="unt"><?php echo "<img class=\"unit u".$hero_info['unit']."\" src=\"img/x.gif\" alt=\"".$technology->getUnitName($hero_info['unit'])."\" title=\"".$technology->getUnitName($hero_info['unit'])."\" />";?></div></td>
|
||||
<td width="25%" colspan="2" style="border-left:none" align="left"><select name="hunit" class="dropdown" onchange="check_unit(this)">
|
||||
<?php
|
||||
for ($i=1;$i<7;$i++) {
|
||||
if (($i==3 && $user['tribe']==4) || ($i==4 && $user['tribe']!=3)) {
|
||||
}else{
|
||||
echo "<option value='".($utribe+$i)."'".($hero_info['unit'] == ($utribe+$i)? 'selected':'').">".$unarray[($utribe+$i)]."</option>\<br>";
|
||||
}
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="thead">
|
||||
<td>Items</td>
|
||||
<td width="18%">Point</td>
|
||||
<td width="17%">Level</td>
|
||||
<td colspan="3" width="35%">Level</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Offence</td>
|
||||
<td align="center"><?php echo $hero['atk']; ?></td>
|
||||
<td align="center"><?php echo $hero_info['attack'];?></td>
|
||||
<td width="10%" align="center" id="hatk0"><font color="grey">(-)</font></td>
|
||||
<td width="10%" align="center" id="hatk1"><a href="#" onclick="return changeValue(1,'hatk')">(+)</a></td>
|
||||
<td width="15%" align="center" style="font-weight:bold"><div id="hatk2">0</div><input id="hatk" name="hatk" type="hidden" value="0"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Defence</td>
|
||||
<td align="center"><?php echo $hero['di'] . "/" . $hero['dc']; ?></td>
|
||||
<td align="center"><?php echo $hero_info['defence'];?></td>
|
||||
<td align="center" id="hdef0"><font color="grey">(-)</font></td>
|
||||
<td align="center" id="hdef1"><a href="#" onclick="return changeValue(1,'hdef')">(+)</a></td>
|
||||
<td align="center" style="font-weight:bold"><div id="hdef2">0</div><input id="hdef" name="hdef" type="hidden" value="0"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Off-Bonus</td>
|
||||
<td align="center"><?php echo ($hero['ob']-1)*100; ?>%</td>
|
||||
<td align="center"><?php echo $hero_info['attackbonus'];?></td>
|
||||
<td align="center" id="hob0"><font color="grey">(-)</font></td>
|
||||
<td align="center" id="hob1"><a href="#" onclick="return changeValue(1,'hob')">(+)</a></td>
|
||||
<td align="center" style="font-weight:bold"><div id="hob2">0</div><input id="hob" name="hob" type="hidden" value="0"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Def-Bonus</td>
|
||||
<td align="center"><?php echo ($hero['db']-1)*100; ?>%</td>
|
||||
<td align="center"><?php echo $hero_info['defencebonus'];?></td>
|
||||
<td align="center" id="hdb0"><font color="grey">(-)</font></td>
|
||||
<td align="center" id="hdb1"><a href="#" onclick="return changeValue(1,'hdb')">(+)</a></td>
|
||||
<td align="center" style="font-weight:bold"><div id="hdb2">0</div><input id="hdb" name="hdb" type="hidden" value="0"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Regeneration</td>
|
||||
<td align="center"><?php echo ($hero_info['regeneration']*5*SPEED); ?>/Day</font></td>
|
||||
<td align="center"><?php echo $hero_info['regeneration'];?></td>
|
||||
<td align="center" id="hrege0"><font color="grey">(-)</font></td>
|
||||
<td align="center" id="hrege1"><a href="#" onclick="return changeValue(1,'hrege')">(+)</a></td>
|
||||
<td align="center" style="font-weight:bold"><div id="hrege2">0</div><input id="hrege" name="hrege" type="hidden" value="0"></td>
|
||||
<tr>
|
||||
<?php
|
||||
$count_level_exp=500-intval($hero_info['attack']+$hero_info['defence']+$hero_info['attackbonus']+$hero_info['defencebonus']+$hero_info['regeneration']);
|
||||
if ($hero_info['points']>$count_level_exp) $hero_info['points']=$count_level_exp;
|
||||
if($hero_info['experience'] < 495000){ ?>
|
||||
<td>Experience</td>
|
||||
<td colspan="2" align="center"><?php echo (int) (($hero_info['experience'] - $hero_levels[$hero_info['level']]) / ($hero_levels[$hero_info['level']+1] - $hero_levels[$hero_info['level']])*100) ?>% (
|
||||
<?php echo $hero_info['points']; ?>)</td>
|
||||
<?php }else{ ?>
|
||||
<td>Experience</td>
|
||||
<td colspan="2" align="center">100% (<?php echo $hero_info['points']; ?>)</td>
|
||||
<?php } ?>
|
||||
<td align="center" style="font-weight:bold" colspan="3"><div id="exp1">5</div><input id="exp" name="exp" type="hidden" value="5"></td>
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Health</td>
|
||||
<td colspan="2" align="center"><?php echo round($hero_info['health']);?>%</td>
|
||||
<td colspan="3" align="center"><input name="hhealth" class="fm fm40" maxlength="3" value="<?php echo round($hero_info['health']);?>">%</td>
|
||||
</tr>
|
||||
<tr class="thead">
|
||||
<td style="border-right:none" align="left"><input name="back" type="image" id="btn_back" class="dynamic_img" src="img/x.gif" value="back" alt="back" onclick="return go_url('../Admin/admin.php?p=player&uid=<?php echo $_GET["uid"];?>')" /></td>
|
||||
<td style="border-left:none" colspan="5" align="right"><input name="save" type="image" id="btn_save" class="dynamic_img" src="img/x.gif" value="save" alt="save" /></td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
<?php
|
||||
}
|
||||
if(isset($_GET['e'])){
|
||||
echo '<div align="center"><font color="Red"><b>Please fill hero name</font></b></div>';
|
||||
}
|
||||
?>
|
||||
@@ -44,8 +44,9 @@ if(isset($id))
|
||||
include("playerdeletion.tpl");
|
||||
}
|
||||
|
||||
include("playerinfo.tpl");
|
||||
include("playeradditionalinfo.tpl");
|
||||
include("playerinfo.tpl");
|
||||
include("playerheroinfo.tpl");
|
||||
include("playeradditionalinfo.tpl");
|
||||
echo "<br />";
|
||||
include("playermedals.tpl");
|
||||
include ("villages.tpl"); ?>
|
||||
|
||||
@@ -0,0 +1,150 @@
|
||||
<?php
|
||||
#################################################################################
|
||||
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Filename playerheroinfo.tpl ##
|
||||
## Developed by: ronix ##
|
||||
## License: TravianZ Project ##
|
||||
## Copyright: TravianZ (c) 2010-2014. All rights reserved. ##
|
||||
## ##
|
||||
#################################################################################
|
||||
|
||||
include_once("../GameEngine/Data/hero_full.php");
|
||||
include_once("../GameEngine/Units.php");
|
||||
$id=$user['id'];
|
||||
$hero = mysql_query("SELECT * FROM " . TB_PREFIX . "hero WHERE `uid` = ".$id);
|
||||
$hero_info = mysql_fetch_array($hero);
|
||||
if (!empty($hero_info)) {
|
||||
$hero = $units->Hero($id,1);
|
||||
}else {
|
||||
$hero="none";
|
||||
}
|
||||
?>
|
||||
<style>
|
||||
td {
|
||||
vertical-align:middle; padding:2px 7px; border:1px solid silver; font-size:13px; color:black;
|
||||
}
|
||||
th {
|
||||
vertical-align:middle; padding:2px 7px; border:1px solid silver; font-size:13px; color:black;
|
||||
}
|
||||
thead {
|
||||
background-image:url(../img/un/a/c2.gif); background-repeat:repeat; text-align:center; font-weight:bold;
|
||||
}
|
||||
|
||||
</style>
|
||||
<table style="border-collapse:collapse; margin-top:25px; line-height:16px; width:100%;">
|
||||
<thead>
|
||||
<tr>
|
||||
<td colspan="3">Player Hero Info
|
||||
<?php if (!$hero_info['dead'] && $hero!="none") {?>
|
||||
<a href='admin.php?p=editHero&uid=<?php echo $id; ?>'>
|
||||
<img src="../img/admin/edit.gif" title="Edit Player Hero Info"></a>
|
||||
<a href='?action=killHero&uid=<?php echo $id; ?>'>
|
||||
<img src="../img/admin/del.gif" title="Kill Player Hero"></a>
|
||||
<?php }?>
|
||||
</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<?php if ($hero=="none") {?>
|
||||
<tr>
|
||||
<td colspan="3" align="center">None <font color="blue">Add Hero</font>
|
||||
<?php
|
||||
$utribe=($user['tribe']-1)*10;
|
||||
echo " <a href='?action=addHero&uid=".$id."&u=".($utribe+1)."'><img class=\"unit u".($utribe+1)."\" src=\"img/x.gif\" alt=\"".$technology->getUnitName($utribe+1)."\" title=\"".$technology->getUnitName($utribe+1)."\" /></a>";
|
||||
echo " <a href='?action=addHero&uid=".$id."&u=".($utribe+2)."'><img class=\"unit u".($utribe+2)."\" src=\"img/x.gif\" alt=\"".$technology->getUnitName($utribe+2)."\" title=\"".$technology->getUnitName($utribe+2)."\" /></a>";
|
||||
if ($utribe!=20) {
|
||||
echo " <a href='?action=addHero&uid=".$id."&u=".($utribe+3)."'><img class=\"unit u".($utribe+3)."\" src=\"img/x.gif\" alt=\"".$technology->getUnitName($utribe+3)."\" title=\"".$technology->getUnitName($utribe+3)."\" /></a>";
|
||||
}else{
|
||||
echo " <a href='?action=addHero&uid=".$id."&u=".($utribe+4)."'><img class=\"unit u".($utribe+4)."\" src=\"img/x.gif\" alt=\"".$technology->getUnitName($utribe+4)."\" title=\"".$technology->getUnitName($utribe+4)."\" /></a>";
|
||||
}
|
||||
echo " <a href='?action=addHero&uid=".$id."&u=".($utribe+5)."'><img class=\"unit u".($utribe+5)."\" src=\"img/x.gif\" alt=\"".$technology->getUnitName($utribe+5)."\" title=\"".$technology->getUnitName($utribe+5)."\" /></a>";
|
||||
echo " <a href='?action=addHero&uid=".$id."&u=".($utribe+6)."'><img class=\"unit u".($utribe+6)."\" src=\"img/x.gif\" alt=\"".$technology->getUnitName($utribe+6)."\" title=\"".$technology->getUnitName($utribe+6)."\" /></a>";
|
||||
?>
|
||||
|
||||
</tr>
|
||||
<?php }else {?>
|
||||
<tr>
|
||||
<td width="35%">Hero Name</td>
|
||||
<td colspan="2" width="65%"><?php echo $hero_info['name']; ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Hero Level</td>
|
||||
<td colspan="2"><?php echo $hero_info['level']; ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Hero Unit</td>
|
||||
<td colspan="2"><?php echo "<img class=\"unit u".$hero_info['unit']."\" src=\"img/x.gif\" alt=\"".$technology->getUnitName($hero_info['unit'])."\" title=\"".$technology->getUnitName($hero_info['unit'])."\" /> (".$technology->getUnitName($hero_info['unit']); ?>)</td>
|
||||
</tr>
|
||||
<?php if (!$hero_info['dead']) {?>
|
||||
<thead>
|
||||
<tr>
|
||||
<td width="35%">Details</td>
|
||||
<td width="40%">Point</td>
|
||||
<td width="25%">Level</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tr>
|
||||
<td>Offence</td>
|
||||
<td><?php echo $hero['atk']; ?></td>
|
||||
<td><?php echo $hero_info['attack']; ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Defence</td>
|
||||
<td><?php echo $hero['di'] . "/" . $hero['dc']; ?></td>
|
||||
<td><?php echo $hero_info['defence']; ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Off-Bonus</td>
|
||||
<td><?php echo ($hero['ob']-1)*100; ?>%</td>
|
||||
<td><?php echo $hero_info['attackbonus']; ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Def-Bonus</td>
|
||||
<td><?php echo ($hero['db']-1)*100; ?>%</td>
|
||||
<td><?php echo $hero_info['defencebonus']; ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Regeneration</td>
|
||||
<td><?php echo ($hero_info['regeneration']*5*SPEED); ?>/Day</td>
|
||||
<td><?php echo $hero_info['regeneration']; ?></td>
|
||||
<tr>
|
||||
<?php
|
||||
$count_level_exp=500-intval($hero_info['attack']+$hero_info['defence']+$hero_info['attackbonus']+$hero_info['defencebonus']+$hero_info['regeneration']);
|
||||
if ($hero_info['points']>$count_level_exp) $hero_info['points']=$count_level_exp;
|
||||
if($hero_info['experience'] < 495000){ ?>
|
||||
<td>Experience: <?php echo (int) (($hero_info['experience'] - $hero_levels[$hero_info['level']]) / ($hero_levels[$hero_info['level']+1] - $hero_levels[$hero_info['level']])*100) ?>%</td>
|
||||
<td colspan="2"><?php echo $hero_info['points']; ?></td>
|
||||
<?php }else{ ?>
|
||||
<td>Experience: 100%</td>
|
||||
<td colspan="2"><?php echo $hero_info['points']; ?></td>
|
||||
<?php } ?>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Health</td>
|
||||
<td colspan="2"><?php echo round($hero_info['health']); ?>%</td>
|
||||
<tr>
|
||||
<?php }else{?>
|
||||
<tr>
|
||||
<td>Status</td>
|
||||
<td colspan="2" class="c5">Dead <a href="?action=reviveHero&uid=<?php echo $id;?>" title="Revive hero"><?php echo $refreshicon; ?></a></td>
|
||||
<tr>
|
||||
|
||||
<?php }
|
||||
}
|
||||
?>
|
||||
</table>
|
||||
<?php
|
||||
if(isset($_GET['e'])){
|
||||
echo '<div align="center"><font color="Red"><b>Problem to kill hero</font></b></div>';
|
||||
}elseif(isset($_GET['kc'])){
|
||||
echo '<div align="center"><font color="blue"><b>Kill hero has done</font></b></div>';
|
||||
}elseif(isset($_GET['rc'])){
|
||||
echo '<div align="center"><font color="blue"><b>Revive hero has done</font></b></div>';
|
||||
}elseif(isset($_GET['ac'])){
|
||||
echo '<div align="center"><font color="blue"><b>Add hero has done</font></b></div>';
|
||||
}elseif(isset($_GET['cs'])){
|
||||
echo '<div align="center"><font color="blue"><b>Change hero info has done</font></b></div>';
|
||||
}elseif(isset($_GET['ce'])){
|
||||
echo '<div align="center"><font color="Red"><b>Problem to change hero info</font></b></div>';
|
||||
}
|
||||
?>
|
||||
@@ -60,6 +60,7 @@ $up_avl = $latest - $ver ;
|
||||
<link rel=stylesheet type="text/css" href="../img/img.css">
|
||||
<script src="/mt-full.js?423cb" type="text/javascript"></script>
|
||||
<script src="ajax.js" type="text/javascript"></script>
|
||||
<script src="../new.js?0faaa" type="text/javascript"></script>
|
||||
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
|
||||
<meta http-equiv="imagetoolbar" content="no">
|
||||
</head>
|
||||
|
||||
@@ -0,0 +1,37 @@
|
||||
<?php
|
||||
#################################################################################
|
||||
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Filename addTroops.php ##
|
||||
## Developed by: Dzoki & Advocatie ##
|
||||
## License: TravianZ Project ##
|
||||
## Reworks by: ronix ##
|
||||
## Copyright: TravianZ (c) 2010-2014. All rights reserved. ##
|
||||
## ##
|
||||
#################################################################################
|
||||
|
||||
if(!isset($_SESSION)) session_start();
|
||||
if($_SESSION['access'] < 9) die("Access Denied: You are not Admin!");
|
||||
include_once("../../Database.php");
|
||||
$status="&ce=1";
|
||||
if(isset($_POST['id'])) {
|
||||
$_POST['hname'] = trim(stripslashes($_POST['hname']));
|
||||
if ($_POST['hname']=="") {
|
||||
header("Location: ../../../Admin/admin.php?p=editHero&uid=".$_POST['id']."&e=1");
|
||||
exit;
|
||||
}
|
||||
|
||||
include_once("../../Data/hero_full.php");
|
||||
|
||||
$id = $_POST['id'];
|
||||
|
||||
$q = "UPDATE ".TB_PREFIX."hero SET unit=".$_POST['hunit'].", name='".$_POST['hname']."', level=".$_POST['hlvl'].", points=".$_POST['exp'].", experience=".$hero_levels[$_POST['hlvl']].", health=".$_POST['hhealth'].",
|
||||
attack=".$_POST['hatk'].", defence=".$_POST['hdef'].", attackbonus=".$_POST['hob'].", defencebonus=".$_POST['hdb'].", regeneration=".$_POST['hrege']." WHERE uid = ".$id;
|
||||
$return=$database->query($q);
|
||||
if($return) {
|
||||
$database->query("Insert into ".TB_PREFIX."admin_log values (0,".$_SESSION['id'].",'Changed hero info',".time().")");
|
||||
$status="&cs=1";
|
||||
}
|
||||
}
|
||||
header("Location: ../../../Admin/admin.php?p=player&uid=".$id.$status);
|
||||
?>
|
||||
@@ -70,6 +70,44 @@ class funct {
|
||||
case "logout":
|
||||
$this->LogOut();
|
||||
break;
|
||||
case "killHero":
|
||||
$varray = $database->getProfileVillages($get['uid']);
|
||||
$killhero=false;
|
||||
$error="";
|
||||
for ($i = 0; $i <= count($varray)-1; $i++) {
|
||||
$killhero=$database->FindHeroInVil($varray[$i]['wref']);
|
||||
if ($killhero) break;
|
||||
$killhero=$database->FindHeroInDef($varray[$i]['wref']);
|
||||
if ($killhero) break;
|
||||
$killhero=$database->FindHeroInMovement($varray[$i]['wref']);
|
||||
if ($killhero) break;
|
||||
}
|
||||
if (!$killhero){
|
||||
$killhero=$database->FindHeroInOasis($get['uid']);
|
||||
}
|
||||
if ($killhero) {
|
||||
$database->KillMyHero($get['uid']);
|
||||
$error="&kc=1";
|
||||
}else $error="&e=1";
|
||||
header("Location: admin.php?p=player&uid=".$get['uid'].$error);
|
||||
exit;
|
||||
case "reviveHero":
|
||||
$result=$database->query("SELECT * FROM ".TB_PREFIX."hero WHERE uid='".$get['uid']."'");
|
||||
$hdata=mysql_fetch_array($result);
|
||||
$database->query("UPDATE ".TB_PREFIX."units SET hero = 1 WHERE vref = ".$hdata['wref']);
|
||||
$database->query("UPDATE ".TB_PREFIX."hero SET `dead` = '0', `inrevive` = '0', `health` = '100', `lastupdate` = ".time()." WHERE `uid` = '".$get['uid']."'");
|
||||
header("Location: admin.php?p=player&uid=".$get['uid']."&rc=1");
|
||||
exit;
|
||||
case "addHero":
|
||||
$user = $database->getUserArray($get['uid'],1);
|
||||
$vilarray=$database->getVrefCapital($get['uid']);
|
||||
|
||||
$database->query("INSERT INTO ".TB_PREFIX."hero (`uid`, `wref`, `regeneration`, `unit`, `name`, `level`, `points`,
|
||||
`experience`, `dead`, `health`, `attack`, `defence`, `attackbonus`, `defencebonus`, `trainingtime`, `autoregen`,
|
||||
`intraining`) VALUES ('".$get['uid']."', '" . $vilarray['wref'] . "', '0', '".$get['u']."', '".addslashes($user['username'])."',
|
||||
'0', '5', '0', '0', '100', '0', '0', '0', '0', '".time()."', '50', '0')");
|
||||
header("Location: admin.php?p=player&uid=".$get['uid']."&ac=1");
|
||||
exit;
|
||||
}
|
||||
if($get['action'] == 'logout'){
|
||||
header("Location: admin.php");
|
||||
|
||||
@@ -3657,10 +3657,10 @@ References:
|
||||
}
|
||||
}
|
||||
|
||||
/*****************************************
|
||||
Function to vacation mode - by advocaite
|
||||
References:
|
||||
*****************************************/
|
||||
/*****************************************
|
||||
Function to vacation mode - by advocaite
|
||||
References:
|
||||
*****************************************/
|
||||
|
||||
/***************************
|
||||
Function to get Hero Dead
|
||||
@@ -3731,6 +3731,88 @@ References:
|
||||
$q = "UPDATE " . TB_PREFIX . "hero set dead = 1 where uid = ".$id;
|
||||
return mysql_query($q, $this->connection);
|
||||
}
|
||||
|
||||
/***************************
|
||||
Function to find Hero place
|
||||
Made by: ronix
|
||||
***************************/
|
||||
function FindHeroInVil($wid) {
|
||||
$result = $this->query("SELECT * FROM ".TB_PREFIX."units WHERE hero>0 AND vref='".$wid."'");
|
||||
if (!empty($result)) {
|
||||
$dbarray = mysql_fetch_array($result);
|
||||
if(isset($dbarray['hero'])) {
|
||||
$this->query("UPDATE ".TB_PREFIX."units SET hero=0 WHERE vref='".$wid."'");
|
||||
unset($dbarray);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
function FindHeroInDef($wid) {
|
||||
$delDef=true;
|
||||
$result = $this->query_return("SELECT * FROM ".TB_PREFIX."enforcement WHERE hero>0 AND `from` = ".$wid);
|
||||
if (!empty($result)) {
|
||||
$dbarray = mysql_fetch_array($result);
|
||||
if(isset($dbarray['hero'])) {
|
||||
$this->query("UPDATE ".TB_PREFIX."enforcement SET hero=0 WHERE `from` = ".$wid);
|
||||
for ($i=0;$i<50;$i++) {
|
||||
if($dbarray['u'.$i]>0) {
|
||||
$delDef=false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if ($delDef) $this->deleteReinf($wid);
|
||||
unset($dbarray);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
function FindHeroInOasis($uid) {
|
||||
$delDef=true;
|
||||
$dbarray = $this->query_return("SELECT e.*,o.conqured,o.owner FROM ".TB_PREFIX."enforcement as e LEFT JOIN ".TB_PREFIX."odata as o ON e.vref=o.wref where o.owner=".$uid." AND e.hero>0");
|
||||
if(!empty($dbarray)) {
|
||||
foreach($dbarray as $defoasis) {
|
||||
if($defoasis['hero']>0) {
|
||||
$this->query("UPDATE ".TB_PREFIX."enforcement SET hero=0 WHERE `from` = ".$defoasis['from']);
|
||||
for ($i=0;$i<50;$i++) {
|
||||
if($dbarray['u'.$i]>0) {
|
||||
$delDef=false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if ($delDef) $this->deleteReinf($defoasis['from']);
|
||||
unset($dbarray);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
function FindHeroInMovement($wid) {
|
||||
$outgoingarray = $this->getMovement(3, $wid, 0);
|
||||
if(!empty($outgoingarray)) {
|
||||
foreach($outgoingarray as $out) {
|
||||
if ($out['t11']>0) {
|
||||
$dbarray = $this->query("UPDATE ".TB_PREFIX."attacks SET t11=0 WHERE `id` = ".$out['ref']);
|
||||
return true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
$returningarray = $this->getMovement(4, $wid, 1);
|
||||
if(!empty($returningarray)) {
|
||||
foreach($returningarray as $ret) {
|
||||
if($ret['attack_type'] != 1 && $ret['t11']>0) {
|
||||
$dbarray = $this->query("UPDATE ".TB_PREFIX."attacks SET t11=0 WHERE `id` = ".$ret['ref']);
|
||||
return true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/***************************
|
||||
Function checkAttack
|
||||
|
||||
@@ -845,7 +845,7 @@ The construction plans are conquerable immediately when they appear to the serve
|
||||
There will be a countdown in game, showing the exact time of the release, 5 days prior to the launch. ");
|
||||
|
||||
|
||||
//planos
|
||||
//Building Plans
|
||||
define("PLAN","Ancient Construction Plan");
|
||||
define("PLANVILLAGE","WW Buildingplan");
|
||||
define("PLAN_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.");
|
||||
|
||||
@@ -704,9 +704,9 @@ header("Location: banned.php");
|
||||
}
|
||||
}
|
||||
|
||||
public function Hero($uid) {
|
||||
public function Hero($uid,$all=0) {
|
||||
global $database;
|
||||
$heroarray = $database->getHero($uid);
|
||||
$heroarray = $database->getHero($uid,$all);
|
||||
$herodata = $GLOBALS["h".$heroarray[0]['unit']];
|
||||
|
||||
$h_atk = $herodata['atk'] + 5 * floor($heroarray[0]['attack'] * $herodata['atkp'] / 5);
|
||||
|
||||
@@ -541,4 +541,32 @@ table#member tbody th, table#member tbody td {text-align:left;}
|
||||
table#member td.ra {width:5%; text-align:right;}
|
||||
table#member td.hab {width:25%; text-align:center;}
|
||||
table#member td.vil {width:20%; text-align:center;}
|
||||
table#member td.on {width:5%; text-align:center;}
|
||||
table#member td.on {width:5%; text-align:center;}
|
||||
|
||||
|
||||
.dropdown {border:#71D000 solid; border-width:1px; font-size:10pt;}
|
||||
input.dynamic_img, img.dynamic_img {
|
||||
background-position: center top;
|
||||
height: 20px;
|
||||
}
|
||||
input.over, img.over {
|
||||
background-position: center bottom;
|
||||
}
|
||||
input.clicked, img.clicked {
|
||||
background-position: center center;
|
||||
}
|
||||
|
||||
input#btn_login {width:97px; background-image: url(b/login.gif);}
|
||||
input#btn_signup {width:97px; background-image: url(b/signup.gif);}
|
||||
input#btn_ok {width:47px; background-image: url(b/ok.gif);}
|
||||
input#btn_reply {width:97px; background-image: url(b/reply.gif);}
|
||||
input#btn_send {width:97px; background-image: url(b/send.gif);}
|
||||
input#btn_save {width:97px; background-image: url(b/save.gif);}
|
||||
input#btn_delete {width:97px; background-image: url(b/delete.gif);}
|
||||
input#btn_archiv {width:97px; background-image: url(b/archiv.gif);}
|
||||
input#btn_back {width:97px; background-image: url(b/zurueck.html);}
|
||||
input#btn_train {width:97px; background-image: url(b/train.gif);}
|
||||
input#btn_back {width:97px; background-image: url(b/back.gif);}
|
||||
input#btn_forward {width:97px; background-image: url(b/forward.gif);}
|
||||
input#btn_demolish {width:97px; background-image: url(b/demolish.gif);}
|
||||
input#btn_search {width:97px; background-image: url(b/search.gif);}
|
||||
|
After Width: | Height: | Size: 1.8 KiB |
|
After Width: | Height: | Size: 2.2 KiB |
|
After Width: | Height: | Size: 1.7 KiB |
|
After Width: | Height: | Size: 2.4 KiB |
|
After Width: | Height: | Size: 2.5 KiB |
|
After Width: | Height: | Size: 1.6 KiB |
|
After Width: | Height: | Size: 1.2 KiB |
|
After Width: | Height: | Size: 1.8 KiB |
|
After Width: | Height: | Size: 1.5 KiB |
|
After Width: | Height: | Size: 1.6 KiB |
|
After Width: | Height: | Size: 1.6 KiB |
|
After Width: | Height: | Size: 1.8 KiB |
|
After Width: | Height: | Size: 1.5 KiB |
@@ -0,0 +1,100 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<title>Travian com4</title>
|
||||
<meta name="content-language" content="en" />
|
||||
<meta http-equiv="cache-control" content="max-age=0" />
|
||||
<meta http-equiv="imagetoolbar" content="no" />
|
||||
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
|
||||
<script src="mt-full.js?2e3d9" type="text/javascript"></script>
|
||||
<script src="unx.js?2e3d9" type="text/javascript"></script>
|
||||
<script src="new.js?2e3d9" type="text/javascript"></script>
|
||||
<link href="gpack/travian_basic/lang/en/compact.css?2e3d9" rel="stylesheet" type="text/css" />
|
||||
<link href="gpack/travian_basic/lang/en/lang.css?2e3d9" rel="stylesheet" type="text/css" />
|
||||
<link href="gpack/travian_redesign/travian.css?2e3d9" rel="stylesheet" type="text/css" />
|
||||
<link href="gpack/travian_redesign/lang/en/lang.css?2e3d9" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
|
||||
<body class="v35 " onload="initCounter()">
|
||||
<div class="wrapper">
|
||||
<div id="dynamic_header">
|
||||
</div>
|
||||
|
||||
<div id="header"></div>
|
||||
|
||||
<div id="mid">
|
||||
<div id="side_navi">
|
||||
<a id="logo" href="http://www.travian.com/"><img src="img/x.gif" alt="Travian" /></a>
|
||||
<p>
|
||||
<a href="http://www.travian.com/index.php">Homepage</a>
|
||||
|
||||
<a href="http://www.travian.com/anleitung.php">Instructions</a>
|
||||
<a href="login.php">Login</a> <a href="anmelden.php">Register</a> </p>
|
||||
<p>
|
||||
<a href="http://forum.travian.com/" target="_blank">Forum</a> <a href="http://www.travian.com/chat/?chatname=T_guest???" target="_blank">Chat</a>
|
||||
</p>
|
||||
<p>
|
||||
<a href="http://www.travian.com/impressum.php">Imprint</a>
|
||||
<a href="support.php">Support</a>
|
||||
</p>
|
||||
</div>
|
||||
<div id="content" class="error_site"><img class="e404" src="img/x.gif" alt="Nothing here!" style="position:absolute;top:60px;left:55px;" />
|
||||
<div style="position:absolute;top:0px;left:30px;"><h1>Nothing here!</h1></div>
|
||||
<div style="position:absolute;top:235px;left:30px;z-index:15;">We looked 404 times already but can't find anything</div>
|
||||
<img src="img/x.gif" style="height:330px;width:1px;" />
|
||||
</div>
|
||||
<div id="side_info" class="outgame">
|
||||
<h5><img src="http://www.travian.com//img/en/t2/newsbox1.gif" alt="newsbox 1" /></h5>
|
||||
<div class="news"><a href="http://www.facebook.com/group.php?gid=110117025672281&ref=nf" target="_blank"><img src="http://tutorials.travianteam.com/images/boton_fb1.jpg"></a>
|
||||
<BR><BR>
|
||||
<a href="http://www.tschena.com/magazine/com_magazine_2010_07.pdf" target="_blank"><img src="http://tutorials.travianteam.com/images/btn_eng.jpg"></a>
|
||||
</div>
|
||||
<h5><img src="http://www.travian.com//img/en/t2/newsbox2.gif" alt="newsbox 2" /></h5>
|
||||
<div class="news">Dear players,
|
||||
<br><br>
|
||||
Starting from next week Travian will get a new look.
|
||||
<br><br>
|
||||
<a href="http://forum.travian.com/showthread.php?t=139020" target="_blank">Here</a> you find more information about the new layout.
|
||||
<br><br>
|
||||
Regards<br>
|
||||
Tschena & Phanttis </div>
|
||||
<h5><img src="http://www.travian.com//img/en/t2/newsbox3.gif" alt="newsbox 3" /></h5>
|
||||
<div class="news">Dear players,
|
||||
<br><br>
|
||||
<a href="http://forum.travian.com/showthread.php?t=138700" target="_blank">s4.travian.com</a> will start on August 23th as Travian version 3.6 server.
|
||||
<br><br>
|
||||
The preregistration will be opened on August 20th.
|
||||
<br><br>
|
||||
<a href="http://forum.travian.com/showthread.php?t=132400" target="_blank">Here</a> you find more information about the servers.
|
||||
<br><br>
|
||||
Regards<br>
|
||||
Tschena & Phanttis </div>
|
||||
</div>
|
||||
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
|
||||
<div class="footer-stopper outgame"></div>
|
||||
<div class="clear"></div>
|
||||
|
||||
<div id="footer">
|
||||
<div id="mfoot">
|
||||
<div class="footer-menu">
|
||||
|
||||
<a href="http://www.travian.com/anleitung.php?s=3">FAQ</a>
|
||||
| <a href="http://www.travian.com/index.php?screenshots">Screenshots</a>
|
||||
| <a href="http://www.travian.com/spielregeln.php">Game rules</a>
|
||||
| <a href="http://www.travian.com/agb.php">Terms</a>
|
||||
| <a href="http://www.travian.com/impressum.php">Imprint</a>
|
||||
<br />
|
||||
<div class="copyright">© 2004 - 2010 Travian Games GmbH</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="cfoot">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="ce"></div>
|
||||
</body>
|
||||
</html>
|
||||