mirror of
https://github.com/Shadowss/TravianZ.git
synced 2026-06-30 17:44:22 +00:00
big update (details in comment)
This commit is contained in:
+48
-90
@@ -1260,7 +1260,11 @@ private function loyaltyRegeneration() {
|
||||
$tblevel = $bdo['f'.$rand];
|
||||
$tbgid = $bdo['f'.$rand.'t'];
|
||||
$tbid = $rand;
|
||||
$needed_cata = round((($battlepart[5] * (pow($tblevel,2) + $tblevel + 1)) / (8 * (round(200 * pow(1.0205,$battlepart[6]))/200) / (1 * $bid34[$stonemason]['attri']/100))) + 0.5);
|
||||
if($bid34[$stonemason]==0){
|
||||
$needed_cata = round((($battlepart[5] * (pow($tblevel,2) + $tblevel + 1)) / (8 * (round(200 * pow(1.0205,$battlepart[6]))/200))) + 0.5);
|
||||
}else{
|
||||
$needed_cata = round((($battlepart[5] * (pow($tblevel,2) + $tblevel + 1)) / (8 * (round(200 * pow(1.0205,$battlepart[6]))/200) / (1 * $bid34[$stonemason]['attri']/100))) + 0.5);
|
||||
}
|
||||
if ($battlepart[4]>$needed_cata)
|
||||
{
|
||||
$info_cat = "".$catp_pic.", ".$this->procResType($tbgid)." destroyed.";
|
||||
@@ -1409,7 +1413,11 @@ private function loyaltyRegeneration() {
|
||||
$tblevel = $bdo['f'.$rand];
|
||||
$tbgid = $bdo['f'.$rand.'t'];
|
||||
$tbid = $rand;
|
||||
$needed_cata = round((($battlepart[5] * (pow($tblevel,2) + $tblevel + 1)) / (8 * (round(200 * pow(1.0205,$battlepart[6]))/200) / (1 * $bid34[$stonemason]['attri']/100))) + 0.5);
|
||||
if($bid34[$stonemason]==0){
|
||||
$needed_cata = round((($battlepart[5] * (pow($tblevel,2) + $tblevel + 1)) / (8 * (round(200 * pow(1.0205,$battlepart[6]))/200))) + 0.5);
|
||||
}else{
|
||||
$needed_cata = round((($battlepart[5] * (pow($tblevel,2) + $tblevel + 1)) / (8 * (round(200 * pow(1.0205,$battlepart[6]))/200) / (1 * $bid34[$stonemason]['attri']/100))) + 0.5);
|
||||
}
|
||||
if (($battlepart[4]/2)>$needed_cata)
|
||||
{
|
||||
$info_cat = "".$catp_pic.", ".$this->procResType($tbgid)." destroyed.";
|
||||
@@ -1555,7 +1563,11 @@ private function loyaltyRegeneration() {
|
||||
$tblevel = $bdo['f'.$rand];
|
||||
$tbgid = $bdo['f'.$rand.'t'];
|
||||
$tbid = $rand;
|
||||
$needed_cata = round((($battlepart[5] * (pow($tblevel,2) + $tblevel + 1)) / (8 * (round(200 * pow(1.0205,$battlepart[6]))/200) / (1 * $bid34[$stonemason]['attri']/100))) + 0.5);
|
||||
if($bid34[$stonemason]==0){
|
||||
$needed_cata = round((($battlepart[5] * (pow($tblevel,2) + $tblevel + 1)) / (8 * (round(200 * pow(1.0205,$battlepart[6]))/200))) + 0.5);
|
||||
}else{
|
||||
$needed_cata = round((($battlepart[5] * (pow($tblevel,2) + $tblevel + 1)) / (8 * (round(200 * pow(1.0205,$battlepart[6]))/200) / (1 * $bid34[$stonemason]['attri']/100))) + 0.5);
|
||||
}
|
||||
if (($battlepart[4]/2)>$needed_cata)
|
||||
{
|
||||
$info_cat .= "<br><tbody class=\"goods\"><tr><th>Information</th><td colspan=\"11\">
|
||||
@@ -1723,95 +1735,41 @@ private function loyaltyRegeneration() {
|
||||
}
|
||||
}
|
||||
|
||||
if($data['t11']>0)
|
||||
{
|
||||
if ($isoasis != 0)
|
||||
{
|
||||
if (abs($tocoor['x']-$fromcoor['x'])<=3 && abs($tocoor['y']-$fromcoor['y'])<=3)
|
||||
{
|
||||
//count oasis troops: $troops_o
|
||||
$troops_o=0;
|
||||
$o_unit2=mysql_query("select * from ".TB_PREFIX."units where `vref`='".$data['to']."'");
|
||||
$o_unit=mysql_fetch_array($o_unit2);
|
||||
|
||||
for ($i=1;$i<51;$i++)
|
||||
{
|
||||
$troops_o+=$o_unit[$i];
|
||||
}
|
||||
$troops_o+=$o_unit['hero'];
|
||||
|
||||
$o_unit2=mysql_query("select * from ".TB_PREFIX."enforcement where `vref`='".$data['to']."'");
|
||||
while ($o_unit=@mysql_fetch_array($o_unit2))
|
||||
{
|
||||
for ($i=1;$i<51;$i++)
|
||||
{
|
||||
$troops_o+=$o_unit[$i];
|
||||
}
|
||||
$troops_o+=$o_unit['hero'];
|
||||
}
|
||||
|
||||
|
||||
if ($troops_o<=0)
|
||||
{
|
||||
//check hero mansion level
|
||||
$hero_mansion_level=0;
|
||||
$dbo2=mysql_query("select * from ".TB_PREFIX."fdata where `vref`='".$data['from']."'");
|
||||
$dbo=mysql_fetch_array($dbo2);
|
||||
for ($i=19;$i<=40;$i++)
|
||||
{
|
||||
if ($dbo['f'.$i.'t']==37)
|
||||
{
|
||||
$hero_mansion_level=$dbo['f'.$i];
|
||||
}
|
||||
}
|
||||
|
||||
//check number of occupied oasis
|
||||
$dbo2=mysql_query("select * from ".TB_PREFIX."odata where `conqured`='".$data['from']."'");
|
||||
$number_o=mysql_num_rows($dbo2);
|
||||
|
||||
if ($number_o<3)
|
||||
{
|
||||
$needed_hero_mansion_level=$number_o*5+10;
|
||||
if ($hero_mansion_level>=$needed_hero_mansion_level)
|
||||
{
|
||||
$dbo2=mysql_query("select * from ".TB_PREFIX."odata where `wref`='".$data['to']."'");
|
||||
$dbo=mysql_fetch_array($dbo2);
|
||||
$o_owner=$dbo['owner'];
|
||||
$o_conqured=$dbo['conqured'];
|
||||
$o_loyalty=$dbo['loyalty'];
|
||||
if ($o_conqured==""||$o_conqured=='0'||($o_loyalty<=25&&$o_conqured!=$data['from']))
|
||||
{
|
||||
@mysql_query("update ".TB_PREFIX."odata set `conqured`='".$data['from']."', `owner`='".$a_uid."', `name`='Occupied Oasis', `lastupdated`='".time()."', `loyalty`='100' where `wref`='".$data['to']."' ");
|
||||
@mysql_query("update ".TB_PREFIX."wdata set `occupied`='1' where `id`='".$data['to']."' ");
|
||||
$info_chief = "".$hero_pic.", The hero has occupied this oasis and gained ".$heroxp." XP";
|
||||
}
|
||||
else
|
||||
{
|
||||
if ($o_conqured!=$data['from'])
|
||||
{
|
||||
$o_loyalty=$o_loyalty-25;
|
||||
@mysql_query("update ".TB_PREFIX."odata set `lastupdated`='".time()."', `loyalty`='".$o_loyalty."' where `wref`='".$data['to']."' ");
|
||||
$info_chief = "".$hero_pic.", The hero gained ".$heroxp." XP. The loyalty of this oasis is ".$o_loyalty."%";
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$info_chief = "".$hero_pic.", The hero gained ".$heroxp." XP. To occupy this oasis you need a Hero Mansion Level ".$needed_hero_mansion_level;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$info_chief = "".$hero_pic.", The hero has occupied maximun of 3 oases already. Hero gained ".$heroxp." XP";
|
||||
}
|
||||
|
||||
}
|
||||
if($data['t11'] > 0){
|
||||
if ($isoasis != 0) {
|
||||
if ($database->canConquerOasis($data['from'],$data['to'])) {
|
||||
$database->conquerOasis($data['from'],$data['to']);
|
||||
$info_chief = $hero_pic." Your hero has conquered this oasis and gained ".$heroxp." XP";
|
||||
} else {
|
||||
$OasisInfo = $database->getOasisInfo($data['to']);
|
||||
if ($OasisInfo['conqured'] != 0) {
|
||||
$Oloyaltybefore = $OasisInfo['loyalty'];
|
||||
$database->modifyOasisLoyalty($data['to']);
|
||||
$OasisInfo = $database->getOasisInfo($data['to']);
|
||||
$Oloyaltynow = $OasisInfo['loyalty'];
|
||||
$info_chief = $hero_pic." Your hero has reduced oasis loyalty to ".$Oloyaltynow." from ".$Oloyaltybefore." and gained ".$heroxp." XP";
|
||||
} else {
|
||||
if ($heroxp == 0) {
|
||||
$info_chief = $hero_pic." Your hero had nothing to kill therfore gains no XP at all";
|
||||
} else {
|
||||
$info_chief = $hero_pic." Your hero gained ".$heroxp." XP";
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
$artifact = $database->getOwnArtefactInfo($data['to']);
|
||||
if ($artifact['vref'] == $data['to']){
|
||||
if($database->canClaimArtifact($artifact['vref'],$artifact['size'])) {
|
||||
$database->claimArtefact($data['to'],$data['to'],$database->getVillageField($data['from'],"owner"));
|
||||
$info_chief = $hero_pic." Your hero is carrying home a artifact, and gained ".$heroxp." XP from the battle";
|
||||
}else{
|
||||
$info_chief = $hero_pic." Your hero could not claim the artifact, and gained ".$heroxp." XP from the battle";
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if($scout){
|
||||
if ($data['spy'] == 1){
|
||||
$info_spy = "".$spy_pic.",<div class=\"res\"><img class=\"r1\" src=\"img/x.gif\" alt=\"Lumber\" title=\"Lumber\" />".round($totwood)." |
|
||||
|
||||
@@ -49,42 +49,42 @@ header("Content-Type: application/json;");
|
||||
$maparray = (substr($maparray, 0, -1));
|
||||
|
||||
$query2 = "SELECT
|
||||
s1_wdata.id AS map_id,
|
||||
s1_wdata.fieldtype AS map_fieldtype,
|
||||
s1_wdata.oasistype AS map_oasis,
|
||||
s1_wdata.x AS map_x,
|
||||
s1_wdata.y AS map_y,
|
||||
s1_wdata.occupied AS map_occupied,
|
||||
s1_wdata.image AS map_image,
|
||||
".TB_PREFIX."wdata.id AS map_id,
|
||||
".TB_PREFIX."wdata.fieldtype AS map_fieldtype,
|
||||
".TB_PREFIX."wdata.oasistype AS map_oasis,
|
||||
".TB_PREFIX."wdata.x AS map_x,
|
||||
".TB_PREFIX."wdata.y AS map_y,
|
||||
".TB_PREFIX."wdata.occupied AS map_occupied,
|
||||
".TB_PREFIX."wdata.image AS map_image,
|
||||
|
||||
s1_odata.conqured AS oasis_conqured,
|
||||
".TB_PREFIX."odata.conqured AS oasis_conqured,
|
||||
info_user_oasis.username AS oasis_user,
|
||||
info_user_oasis.tribe AS oasis_tribe,
|
||||
info_alliance_oasis.tag AS oasis_alli_name,
|
||||
|
||||
s1_vdata.wref AS ville_id,
|
||||
s1_vdata.owner AS ville_user,
|
||||
s1_vdata.name AS ville_name,
|
||||
s1_vdata.capital AS ville_capital,
|
||||
s1_vdata.pop AS ville_pop,
|
||||
".TB_PREFIX."vdata.wref AS ville_id,
|
||||
".TB_PREFIX."vdata.owner AS ville_user,
|
||||
".TB_PREFIX."vdata.name AS ville_name,
|
||||
".TB_PREFIX."vdata.capital AS ville_capital,
|
||||
".TB_PREFIX."vdata.pop AS ville_pop,
|
||||
|
||||
s1_users.id AS user_id,
|
||||
s1_users.username AS user_username,
|
||||
s1_users.tribe AS user_tribe,
|
||||
s1_users.alliance AS user_alliance,
|
||||
".TB_PREFIX."users.id AS user_id,
|
||||
".TB_PREFIX."users.username AS user_username,
|
||||
".TB_PREFIX."users.tribe AS user_tribe,
|
||||
".TB_PREFIX."users.alliance AS user_alliance,
|
||||
|
||||
s1_alidata.id AS aliance_id,
|
||||
s1_alidata.tag AS aliance_name
|
||||
".TB_PREFIX."alidata.id AS aliance_id,
|
||||
".TB_PREFIX."alidata.tag AS aliance_name
|
||||
|
||||
FROM ((((((s1_wdata
|
||||
LEFT JOIN s1_vdata ON s1_vdata.wref = s1_wdata.id )
|
||||
LEFT JOIN s1_odata ON s1_odata.wref = s1_wdata.id )
|
||||
LEFT JOIN s1_users AS info_user_oasis ON info_user_oasis.id = s1_odata.owner )
|
||||
LEFT JOIN s1_alidata AS info_alliance_oasis ON info_alliance_oasis.id = info_user_oasis.alliance )
|
||||
LEFT JOIN s1_users ON s1_users.id = s1_vdata.owner )
|
||||
LEFT JOIN s1_alidata ON s1_alidata.id = s1_users.alliance )
|
||||
where s1_wdata.id IN ($maparray)
|
||||
ORDER BY FIND_IN_SET(s1_wdata.id,'$maparray2')";
|
||||
FROM ((((((".TB_PREFIX."wdata
|
||||
LEFT JOIN ".TB_PREFIX."vdata ON ".TB_PREFIX."vdata.wref = ".TB_PREFIX."wdata.id )
|
||||
LEFT JOIN ".TB_PREFIX."odata ON ".TB_PREFIX."odata.wref = ".TB_PREFIX."wdata.id )
|
||||
LEFT JOIN ".TB_PREFIX."users AS info_user_oasis ON info_user_oasis.id = ".TB_PREFIX."odata.owner )
|
||||
LEFT JOIN ".TB_PREFIX."alidata AS info_alliance_oasis ON info_alliance_oasis.id = info_user_oasis.alliance )
|
||||
LEFT JOIN ".TB_PREFIX."users ON ".TB_PREFIX."users.id = ".TB_PREFIX."vdata.owner )
|
||||
LEFT JOIN ".TB_PREFIX."alidata ON ".TB_PREFIX."alidata.id = ".TB_PREFIX."users.alliance )
|
||||
where ".TB_PREFIX."wdata.id IN ($maparray)
|
||||
ORDER BY FIND_IN_SET(".TB_PREFIX."wdata.id,'$maparray2')";
|
||||
$result2 = mysql_query($query2) or die(mysql_error());
|
||||
|
||||
$targetalliance = array();
|
||||
|
||||
@@ -63,42 +63,42 @@ $maparray2 = (substr($maparray2, 0, -1));
|
||||
//echo $maparray;
|
||||
|
||||
$query2 = "SELECT
|
||||
s1_wdata.id AS map_id,
|
||||
s1_wdata.fieldtype AS map_fieldtype,
|
||||
s1_wdata.oasistype AS map_oasis,
|
||||
s1_wdata.x AS map_x,
|
||||
s1_wdata.y AS map_y,
|
||||
s1_wdata.occupied AS map_occupied,
|
||||
s1_wdata.image AS map_image,
|
||||
".TB_PREFIX."wdata.id AS map_id,
|
||||
".TB_PREFIX."wdata.fieldtype AS map_fieldtype,
|
||||
".TB_PREFIX."wdata.oasistype AS map_oasis,
|
||||
".TB_PREFIX."wdata.x AS map_x,
|
||||
".TB_PREFIX."wdata.y AS map_y,
|
||||
".TB_PREFIX."wdata.occupied AS map_occupied,
|
||||
".TB_PREFIX."wdata.image AS map_image,
|
||||
|
||||
s1_odata.conqured AS oasis_conqured,
|
||||
".TB_PREFIX."odata.conqured AS oasis_conqured,
|
||||
info_user_oasis.username AS oasis_user,
|
||||
info_user_oasis.tribe AS oasis_tribe,
|
||||
info_alliance_oasis.tag AS oasis_alli_name,
|
||||
|
||||
s1_vdata.wref AS ville_id,
|
||||
s1_vdata.owner AS ville_user,
|
||||
s1_vdata.name AS ville_name,
|
||||
s1_vdata.capital AS ville_capital,
|
||||
s1_vdata.pop AS ville_pop,
|
||||
".TB_PREFIX."vdata.wref AS ville_id,
|
||||
".TB_PREFIX."vdata.owner AS ville_user,
|
||||
".TB_PREFIX."vdata.name AS ville_name,
|
||||
".TB_PREFIX."vdata.capital AS ville_capital,
|
||||
".TB_PREFIX."vdata.pop AS ville_pop,
|
||||
|
||||
s1_users.id AS user_id,
|
||||
s1_users.username AS user_username,
|
||||
s1_users.tribe AS user_tribe,
|
||||
s1_users.alliance AS user_alliance,
|
||||
".TB_PREFIX."users.id AS user_id,
|
||||
".TB_PREFIX."users.username AS user_username,
|
||||
".TB_PREFIX."users.tribe AS user_tribe,
|
||||
".TB_PREFIX."users.alliance AS user_alliance,
|
||||
|
||||
s1_alidata.id AS aliance_id,
|
||||
s1_alidata.tag AS aliance_name
|
||||
".TB_PREFIX."alidata.id AS aliance_id,
|
||||
".TB_PREFIX."alidata.tag AS aliance_name
|
||||
|
||||
FROM ((((((s1_wdata
|
||||
LEFT JOIN s1_vdata ON s1_vdata.wref = s1_wdata.id )
|
||||
LEFT JOIN s1_odata ON s1_odata.wref = s1_wdata.id )
|
||||
LEFT JOIN s1_users AS info_user_oasis ON info_user_oasis.id = s1_odata.owner )
|
||||
LEFT JOIN s1_alidata AS info_alliance_oasis ON info_alliance_oasis.id = info_user_oasis.alliance )
|
||||
LEFT JOIN s1_users ON s1_users.id = s1_vdata.owner )
|
||||
LEFT JOIN s1_alidata ON s1_alidata.id = s1_users.alliance )
|
||||
where s1_wdata.id IN ($maparray)
|
||||
ORDER BY FIND_IN_SET(s1_wdata.id,'$maparray2')";
|
||||
FROM ((((((".TB_PREFIX."wdata
|
||||
LEFT JOIN ".TB_PREFIX."vdata ON ".TB_PREFIX."vdata.wref = ".TB_PREFIX."wdata.id )
|
||||
LEFT JOIN ".TB_PREFIX."odata ON ".TB_PREFIX."odata.wref = ".TB_PREFIX."wdata.id )
|
||||
LEFT JOIN ".TB_PREFIX."users AS info_user_oasis ON info_user_oasis.id = ".TB_PREFIX."odata.owner )
|
||||
LEFT JOIN ".TB_PREFIX."alidata AS info_alliance_oasis ON info_alliance_oasis.id = info_user_oasis.alliance )
|
||||
LEFT JOIN ".TB_PREFIX."users ON ".TB_PREFIX."users.id = ".TB_PREFIX."vdata.owner )
|
||||
LEFT JOIN ".TB_PREFIX."alidata ON ".TB_PREFIX."alidata.id = ".TB_PREFIX."users.alliance )
|
||||
where ".TB_PREFIX."wdata.id IN ($maparray)
|
||||
ORDER BY FIND_IN_SET(".TB_PREFIX."wdata.id,'$maparray2')";
|
||||
//echo $query2;
|
||||
$result2 = mysql_query($query2) or die(mysql_error());
|
||||
|
||||
|
||||
@@ -7,11 +7,12 @@ $aid = $session->alliance;
|
||||
}
|
||||
$varmedal = $database->getProfileMedalAlly($aid);
|
||||
|
||||
|
||||
$allianceinfo = $database->getAlliance($aid);
|
||||
$memberlist = $database->getAllMember($aid);
|
||||
$totalpop = 0;
|
||||
|
||||
if($allianceinfo['tag']==""){
|
||||
header("Location: allianz.php");
|
||||
}
|
||||
foreach($memberlist as $member) {
|
||||
$totalpop += $database->getVSumField($member['id'],"pop");
|
||||
}
|
||||
|
||||
@@ -34,10 +34,18 @@ $uprequire = $building->resourceRequired($id,$bid);
|
||||
echo "<span class=\"none\">Enough resources ".$neededtime[0]." at ".$neededtime[1]."</span>";
|
||||
}
|
||||
else if($bindicator == 8) {
|
||||
if($session->access!=BANNED){
|
||||
echo "<a class=\"build\" href=\"dorf2.php?a=$bid&id=$id&c=".$session->checker."\">Construct building.</a>";
|
||||
}else{
|
||||
echo "<a class=\"build\" href=\"banned.php\">Construct building.</a>";
|
||||
}
|
||||
}
|
||||
else if($bindicator == 9) {
|
||||
if($session->access!=BANNED){
|
||||
echo "<a class=\"build\" href=\"dorf2.php?a=$bid&id=$id&c=".$session->checker."\">Construct building. (waiting loop)</a>";
|
||||
}else{
|
||||
echo "<a class=\"build\" href=\"banned.php?a=$bid&id=$id&c=".$session->checker."\">Construct building. (waiting loop)</a>";
|
||||
}
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
+106
-5
@@ -1,8 +1,14 @@
|
||||
<div id="content" class="map">
|
||||
<?php
|
||||
$basearray = $database->getMInfo($_GET['d']);
|
||||
$oasis1 = mysql_query('SELECT * FROM `' . TB_PREFIX . 'odata` WHERE `wref` = ' . mysql_escape_string($_GET['d']));
|
||||
$oasis = mysql_fetch_assoc($oasis1);
|
||||
?>
|
||||
<h1><?php echo !$basearray['occupied']? $basearray['fieldtype']? "Abandoned valley" : "Unoccupied oasis" : $basearray['name']; echo " (".$basearray['x']."|".$basearray['y'].")"; ?></h1>
|
||||
<h1><?php if($basearray['fieldtype']!=0){
|
||||
echo !$basearray['occupied']? $basearray['fieldtype']? "Abandoned valley" : "Unoccupied oasis" : $basearray['name']; echo " (".$basearray['x']."|".$basearray['y'].")";
|
||||
}else{
|
||||
echo $oasis['name']; echo " (".$basearray['x']."|".$basearray['y'].")";
|
||||
} ?></h1>
|
||||
<?php if($basearray['occupied'] && $basearray['capital']) { echo "<div id=\"dmain\">(capital)</div>"; } ?>
|
||||
|
||||
<img src="img/x.gif" id="detailed_map" class="<?php echo ($basearray['fieldtype'] == 0)? 'w'.$basearray['oasistype'] : 'f'.$basearray['fieldtype'] ?>" alt="<?php
|
||||
@@ -92,6 +98,7 @@ $landd = explode("-",$tt);?> />
|
||||
|
||||
<div id="map_details">
|
||||
<?php if($basearray['fieldtype'] == 0) {
|
||||
if($oasis['owner'] == 2){
|
||||
?>
|
||||
<table cellpadding="1" cellspacing="1" id="bonus" class="tableNone bonus">
|
||||
<thead><tr>
|
||||
@@ -183,12 +190,102 @@ while($row = mysql_fetch_array($result)){
|
||||
<td>There is no
|
||||
<br>information available.</td>
|
||||
</tr>
|
||||
|
||||
<?php }} ?>
|
||||
</tbody>
|
||||
</table>
|
||||
</tbody>
|
||||
</table>
|
||||
<?php
|
||||
}else if (!$basearray['occupied']) {
|
||||
}else{
|
||||
?>
|
||||
<table cellpadding="1" cellspacing="1" id="village_info" class="tableNone">
|
||||
<?php
|
||||
$uinfo = $database->getUserArray($oasis['owner'],1); ?>
|
||||
<tbody><tr>
|
||||
<th>Tribe</th>
|
||||
<td><?php switch($uinfo['tribe']) { case 1: echo Romans; break; case 2: echo Teutons; break; case 3: echo Gauls; break; case 4: echo Nature; break; case 5: echo Natars; break;} ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Alliance</th>
|
||||
<?php if($uinfo['alliance'] == 0){
|
||||
echo '<td>-</td>';
|
||||
} else echo '
|
||||
<td><a href="allianz.php?aid='.$uinfo['alliance'].' ">'.$database->getUserAlliance($oasis['owner']).'</a></td>'; ?>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Owner</th>
|
||||
<td><a href="spieler.php?uid=<?php echo $oasis['owner']; ?>"><?php echo $database->getUserField($oasis['owner'],'username',0); ?></a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Village</th>
|
||||
<td><a href="karte.php?d=<?php echo $oasis['conqured'];?>&c=<?php echo $generator->getMapCheck($oasis['conqured']);?>"><?php echo $database->getVillageField($oasis['conqured'], "name");?> </a></td>
|
||||
</tr></tbody>
|
||||
</table>
|
||||
|
||||
<table cellpadding="1" cellspacing="1" id="bonus" class="tableNone bonus">
|
||||
<thead><tr>
|
||||
<th>Bonus:</th>
|
||||
</tr></thead>
|
||||
<tbody>
|
||||
<?php
|
||||
echo $ttt;
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<table cellpadding="1" cellspacing="1" id="troop_info" class="tableNone rep">
|
||||
<thead><tr>
|
||||
<th>Reports:</th>
|
||||
</tr></thead>
|
||||
<tbody>
|
||||
<?php
|
||||
if($session->uid == $database->getVillage($_GET['d'])){
|
||||
$limit = "ntype=0 and ntype=4 and ntype=5 and ntype=6 and ntype=7";
|
||||
}else{
|
||||
$limit = "ntype!=8 and ntype!=9 and ntype!=10 and ntype!=11 and ntype!=12 and ntype!=13 and ntype!=14";
|
||||
}
|
||||
$toWref = $_GET['d'];
|
||||
if($session->alliance!=0){
|
||||
$result = mysql_query("SELECT * FROM ".TB_PREFIX."ndata WHERE $limit AND ally = ".$session->alliance." AND toWref = ".$toWref." ORDER BY time DESC Limit 5");
|
||||
$query = mysql_num_rows($result);
|
||||
if($query != 0){
|
||||
while($row = mysql_fetch_array($result)){
|
||||
$dataarray = explode(",",$row['data']);
|
||||
$type = $row['ntype'];
|
||||
echo "<tr><td>";
|
||||
echo "<img src=\"img/x.gif\" class=\"iReport iReport".$row['ntype']."\" title=\"".$topic."\"> ";
|
||||
$date = $generator->procMtime($row['time']);
|
||||
echo "<a href=\"berichte.php?id=".$row['id']."\">".$date[0]." ".date('H:i',$row['time'])."</a> ";
|
||||
echo "</td></tr>";
|
||||
}
|
||||
}else{ ?>
|
||||
<tr>
|
||||
<td>There is no
|
||||
<br>information available.</td>
|
||||
</tr>
|
||||
|
||||
<?php }
|
||||
}else{
|
||||
$result = mysql_query("SELECT * FROM ".TB_PREFIX."ndata WHERE uid = ".$session->uid." AND toWref = ".$toWref." ORDER BY time DESC Limit 5");
|
||||
$query = mysql_num_rows($result);
|
||||
if($query != 0){
|
||||
while($row = mysql_fetch_array($result)){
|
||||
$dataarray = explode(",",$row['data']);
|
||||
$type = $row['ntype'];
|
||||
echo "<tr><td>";
|
||||
echo "<img src=\"img/x.gif\" class=\"iReport iReport".$row['ntype']."\" title=\"".$topic."\"> ";
|
||||
$date = $generator->procMtime($row['time']);
|
||||
echo "<a href=\"berichte.php?id=".$row['id']."\">".$date[0]." ".date('H:i',$row['time'])."</a> ";
|
||||
echo "</td></tr>";
|
||||
}
|
||||
}else{ ?>
|
||||
<tr>
|
||||
<td>There is no
|
||||
<br>information available.</td>
|
||||
</tr>
|
||||
<?php }} ?>
|
||||
</tbody>
|
||||
</table>
|
||||
<?php
|
||||
}}else if (!$basearray['occupied']) {
|
||||
?>
|
||||
<table cellpadding="1" cellspacing="1" id="distribution" class="tableNone">
|
||||
|
||||
@@ -358,7 +455,11 @@ while($row = mysql_fetch_array($result)){
|
||||
<tr>
|
||||
<td class="none">
|
||||
<?php
|
||||
if($basearray['fieldtype'] == 0){
|
||||
$query1 = mysql_query('SELECT * FROM `' . TB_PREFIX . 'odata` WHERE `wref` = ' . mysql_escape_string($_GET['d']));
|
||||
}else{
|
||||
$query1 = mysql_query('SELECT * FROM `' . TB_PREFIX . 'vdata` WHERE `wref` = ' . mysql_escape_string($_GET['d']));
|
||||
}
|
||||
$data1 = mysql_fetch_assoc($query1);
|
||||
$query2 = mysql_query('SELECT * FROM `' . TB_PREFIX . 'users` WHERE `id` = ' . $data1['owner']);
|
||||
$data2 = mysql_fetch_assoc($query2);
|
||||
|
||||
@@ -17,7 +17,7 @@ if(count($session->villages) > 1){?>
|
||||
for($i=1;$i<=count($session->villages);++$i){echo'
|
||||
<tr>
|
||||
<td class="dot '.(($_SESSION['wid'] == $returnVillageArray[$i-1]['wref'] ) ? 'hl':'').'">●</td>
|
||||
<td class="link"><a href="?newdid='.$returnVillageArray[$i-1]['wref'].(($id>=19) ? "&id=".$id : "&id=0").'">'.htmlspecialchars($returnVillageArray[$i-1]['name']).'</a></td>
|
||||
<td class="link"><a href="?newdid='.$returnVillageArray[$i-1]['wref'].(($id>=19) ? "&id=".$id : "&id=".$_GET['id']).'">'.htmlspecialchars($returnVillageArray[$i-1]['name']).'</a></td>
|
||||
<td class="aligned_coords"><div class="cox">('.$returnVillageArray[$i-1]['x'].'</div><div class="pi">|</div><div class="coy">'.$returnVillageArray[$i-1]['y'].')</div></td></tr>';
|
||||
}?>
|
||||
</tbody>
|
||||
|
||||
@@ -20,9 +20,7 @@
|
||||
session_start();
|
||||
include("GameEngine/Database.php");
|
||||
include("GameEngine/Admin/database.php");
|
||||
|
||||
if($session->access < ADMIN)
|
||||
die("Access Denied: You are not Admin!");
|
||||
|
||||
?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html>
|
||||
|
||||
+1
-1
@@ -22,7 +22,7 @@
|
||||
if(isset($_GET['s'])){
|
||||
$automation->isWinner();
|
||||
}
|
||||
if($_GET['aid']!=0 or $session->alliance!=0){
|
||||
if($_GET['aid'] or $session->alliance!=0){
|
||||
?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html>
|
||||
|
||||
+1
-1
@@ -63,7 +63,7 @@
|
||||
$wid = mysql_fetch_assoc(mysql_query("SELECT * FROM " . TB_PREFIX . "vdata WHERE owner = $uid"));
|
||||
$q = "UPDATE " . TB_PREFIX . "vdata SET pop = 834 WHERE owner = $uid";
|
||||
mysql_query($q) or die(mysql_error());
|
||||
$q2 = "UPDATE " . TB_PREFIX . "users SET access = 2 WHERE id = $uid";
|
||||
$q2 = "UPDATE " . TB_PREFIX . "users SET access = 8 WHERE id = $uid";
|
||||
mysql_query($q2) or die(mysql_error());
|
||||
if(SPEED > 3) {
|
||||
$speed = 5;
|
||||
|
||||
@@ -93,8 +93,8 @@ include ("GameEngine/Lang/".LANG.".php");
|
||||
|
||||
<td><?php
|
||||
|
||||
$users = mysql_num_rows(mysql_query("SELECT * FROM " . TB_PREFIX . "users"));
|
||||
echo ($users)-4;
|
||||
$users = mysql_num_rows(mysql_query("SELECT * FROM " . TB_PREFIX . "users WHERE tribe!=0 AND tribe!=4 AND tribe!=5"));
|
||||
echo $users;
|
||||
|
||||
?></td>
|
||||
</tr>
|
||||
@@ -108,7 +108,7 @@ include ("GameEngine/Lang/".LANG.".php");
|
||||
|
||||
<td><?php
|
||||
|
||||
$active = mysql_num_rows(mysql_query("SELECT * FROM " . TB_PREFIX . "users WHERE " . time() . "-timestamp < (3600*24) AND tribe!=5 AND tribe!=0"));
|
||||
$active = mysql_num_rows(mysql_query("SELECT * FROM " . TB_PREFIX . "users WHERE " . time() . "-timestamp < (3600*24) AND tribe!=0 AND tribe!=4 AND tribe!=5"));
|
||||
echo $active;
|
||||
|
||||
?></td>
|
||||
@@ -123,7 +123,7 @@ include ("GameEngine/Lang/".LANG.".php");
|
||||
|
||||
<td><?php
|
||||
|
||||
$online = mysql_num_rows(mysql_query("SELECT * FROM " . TB_PREFIX . "users WHERE " . time() . "-timestamp < (60*5) AND tribe!=5 AND tribe!=0"));
|
||||
$online = mysql_num_rows(mysql_query("SELECT * FROM " . TB_PREFIX . "users WHERE " . time() . "-timestamp < (60*5) AND tribe!=0 AND tribe!=4 AND tribe!=5"));
|
||||
echo $online;
|
||||
|
||||
?></td>
|
||||
@@ -185,10 +185,10 @@ include ("GameEngine/Lang/".LANG.".php");
|
||||
<a href="#" class="closer"><img class="dynamic_img" alt="Close" src="img/un/x.gif" /></a>
|
||||
<ul class="world_list">
|
||||
<li class="w_big c3" style="background-image:url('img/en/welten/en1_big_g.jpg');">
|
||||
<a href="login.php"><img class="w_button" src="img/un/x.gif" alt="World" title="<?php echo $users-4; echo " "; echo PLAYERS; echo " | "; echo $active; echo " "; echo ACTIVE; echo " | "; echo $online; echo " "; echo ONLINE; ?>" /></a>
|
||||
<a href="login.php"><img class="w_button" src="img/un/x.gif" alt="World" title="<?php echo $users; echo " "; echo PLAYERS; echo " | "; echo $active; echo " "; echo ACTIVE; echo " | "; echo $online; echo " "; echo ONLINE; ?>" /></a>
|
||||
<div class="label_players c0"><?php echo PLAYERS; ?>:</div>
|
||||
<div class="label_online c0"><?php echo ONLINE; ?>:</div>
|
||||
<div class="players c1"><?php echo $users-4; ?></div>
|
||||
<div class="players c1"><?php echo $users; ?></div>
|
||||
<div class="online c1"><?php echo $online; ?></div>
|
||||
</li>
|
||||
</ul>
|
||||
@@ -205,7 +205,7 @@ include ("GameEngine/Lang/".LANG.".php");
|
||||
<a href="anmelden.php"><img class="w_button" src="img/un/x.gif" alt="World" title="<?php echo $users; echo " "; echo PLAYERS; echo " | "; echo $active; echo " "; echo ACTIVE; echo " | "; echo $online; echo " "; echo ONLINE; ?>" /></a>
|
||||
<div class="label_players c0"><?php echo PLAYERS; ?>:</div>
|
||||
<div class="label_online c0"><?php echo ONLINE; ?>:</div>
|
||||
<div class="players c1"><?php echo $users-4; ?></div>
|
||||
<div class="players c1"><?php echo $users; ?></div>
|
||||
<div class="online c1"><?php echo $online; ?></div>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
@@ -1267,9 +1267,9 @@ CREATE TABLE IF NOT EXISTS `%PREFIX%users` (
|
||||
|
||||
INSERT INTO `%PREFIX%users` (`id`, `username`, `password`, `email`, `tribe`, `access`, `gold`, `gender`, `birthday`, `location`, `desc1`, `desc2`, `plus`, `b1`, `b2`, `b3`, `b4`, `sit1`, `sit2`, `alliance`, `sessid`, `act`, `timestamp`, `ap`, `apall`, `dp`, `dpall`, `protect`, `quest`, `gpack`, `cp`, `lastupdate`, `RR`, `Rc`, `ok`) VALUES
|
||||
(5, 'Multihunter', '', 'multihunter@travianx.mail', 0, 9, 0, 0, '0000-00-00', '', '', '', 0, 0, 0, 0, 0, 0, 0, 0, '', '', 0, 0, 0, 0, 0, 0, 0, 'gpack/travian_default/', 1, 0, 0, 0, 0),
|
||||
(1, 'Support', '', 'support@travianx.mail', 1, 8, 0, 0, '0000-00-00', '', '', '', 0, 0, 0, 0, 0, 0, 0, 0, '', '', 0, 0, 0, 0, 0, 0, 0, 'gpack/travian_default/', 1, 0, 0, 0, 0),
|
||||
(1, 'Support', '', 'support@travianx.mail', 0, 8, 0, 0, '0000-00-00', '', '', '', 0, 0, 0, 0, 0, 0, 0, 0, '', '', 0, 0, 0, 0, 0, 0, 0, 'gpack/travian_default/', 1, 0, 0, 0, 0),
|
||||
(2, 'Nature', '', 'support@travianx.mail', 4, 8, 0, 0, '0000-00-00', '', '', '', 0, 0, 0, 0, 0, 0, 0, 0, '', '', 0, 0, 0, 0, 0, 0, 0, 'gpack/travian_default/', 1, 0, 0, 0, 0),
|
||||
(4, 'Taskmaster', '', 'support@travianx.mail', 1, 8, 0, 0, '0000-00-00', '', '', '', 0, 0, 0, 0, 0, 0, 0, 0, '', '', 0, 0, 0, 0, 0, 0, 0, 'gpack/travian_default/', 1, 0, 0, 0, 0);
|
||||
(4, 'Taskmaster', '', 'support@travianx.mail', 0, 8, 0, 0, '0000-00-00', '', '', '', 0, 0, 0, 0, 0, 0, 0, 0, '', '', 0, 0, 0, 0, 0, 0, 0, 'gpack/travian_default/', 1, 0, 0, 0, 0);
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
|
||||
Reference in New Issue
Block a user