diff --git a/Admin/Templates/village.tpl b/Admin/Templates/village.tpl
index 8646b4ee..bfb977a1 100644
--- a/Admin/Templates/village.tpl
+++ b/Admin/Templates/village.tpl
@@ -6,10 +6,11 @@
## Developed by: Dzoki & Advocatie ##
## License: TravianX Project ##
## Thanks to: Dzoki & itay2277(Edit some additions) ##
-## Copyright: TravianX (c) 2010-2011. All rights reserved. ##
+## Fix by: ronix (some additions) ##
+## Copyright: TravianZ (c) 2010-2014. All rights reserved. ##
## Improved: aggenkeech ##
#################################################################################
-error_reporting(0);
+if($_SESSION['access'] < 9) die("Access Denied: You are not Admin!");
$id = $_GET['did'];
if(isset($id))
{
@@ -20,6 +21,7 @@ if(isset($id))
$type = $database->getVillageType($village['wref']);
$fdata = $database->getResourceLevel($village['wref']);
$units = $database->getUnit($village['wref']);
+ $abtech = $database->getABTech($id); // Armory/blacksmith level
if($type == 1){ $typ = array(3,3,3,9); }
elseif($type == 2){ $typ = array(3,4,5,6); }
elseif($type == 3){ $typ = array(4,4,4,6); }
@@ -32,14 +34,31 @@ if(isset($id))
elseif($type == 10){ $typ = array(3,5,4,6); }
elseif($type == 11){ $typ = array(4,5,3,6); }
elseif($type == 12){ $typ = array(5,4,3,6); }
- $refreshicon = "";
+ $ocounter = array();
+ $wood = $clay = $iron =$crop = 0;
+ $q = "SELECT o.*, w.x, w.y FROM ".TB_PREFIX."odata AS o LEFT JOIN ".TB_PREFIX."wdata AS w ON o.wref=w.id WHERE conqured = ".$village['wref'];
+ $result = $database->query_return($q);
+ if(count($result) >0)
+ {
+ foreach($result as $row)
+ {
+ $type = $row['type'];
+ if($type==1) { $type = '
+ 25%'; $wood+=1;}
+ elseif($type==2) { $type = '
+ 25%'; $wood+=1;}
+ elseif($type==3) { $type = '
+ 25%
+ 25%'; $wood+=1; $crop+=1;}
+ elseif($type==4) { $type = '
+ 25%'; $clay+=1;}
+ elseif($type==5) { $type = '
+ 25%'; $clay+=1;}
+ elseif($type==6) { $type = '
+ 25%
+ 25%'; $clay+=1;$crop+=1;}
+ elseif($type==7) { $type = '
+ 25%'; $iron+=1;}
+ elseif($type==8) { $type = '
+ 25%'; $iron+=1;}
+ elseif($type==9) { $type = '
+ 25%
+ 25%'; $iron+=1; $crop+=1;}
+ elseif($type==10){ $type = '
+ 25%'; $crop+=1;}
+ elseif($type==11){ $type = '
+ 25%'; $crop+=1;}
+ elseif($type==12){ $type = '
+ 50%'; $crop+=2;}
+ }
+ }
+ $ocounter = array($wood,$clay,$iron,$crop);
+ $production=$admin->calculateProduction($id,$user['id'],$user['b1'],$user['b2'],$user['b3'],$user['b4'],$fdata, $ocounter, $village['pop']);
$refreshiconfrm = "data:image/png;base64,
iVBORw0KGgoAAAANSUhEUgAAAAkAAAAKCAIAAADpZ+PpAAAAAXNSR0IArs4c6QAAAARnQU1BAACx
jwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAEQSURBVChTY/gPBkevHfRrtjMsU9bJ05+5eylE
@@ -48,6 +67,8 @@ if(isset($id))
91l+gRNDLzw6f+nepcsPrl14cPXW8wcMWqVaEYdtPdZYubUHww0AMs5cusygU68UtVUr87CPWbdd
9Ly83TcO7Lq2I7ozoXfZTAalCjWZemnlaYo2u0wVFkoJdwoyZDOZNDi//vqRwbkjac+dC827p2h3
Gyh3S6m0a0Qszrnz6RnQWAAxV5tT/VAiNQAAAABJRU5ErkJggg==";
+ $refreshicon = "";
+
class Generator
{
public function getMapCheck($wref)
@@ -56,6 +77,7 @@ if(isset($id))
}
};
$generator = new Generator;
+
if($village and $user)
{
include("search2.tpl"); ?>
@@ -98,7 +120,7 @@ if(isset($id))
| Resources | +Resources ![]() |
|||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Resource | - Lumber |
![]() |
+ ||||||||||||
Clay |
![]() |
+ |||||||||||||
Iron |
![]() |
+ |||||||||||||
Crop |
![]() |
+ |||||||||||||
| Oases | +Oasis | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -237,72 +245,21 @@ if(isset($id)) | |||||||||||
| - | '.$oasisarray['name'].' | -('.$oasiscoor['x'].'|'.$oasiscoor['y'].') | -'.$oasisarray['loyalty'].' | -'.$type.' | -|||||||
![]() |
+ ![]() |
".$row['name']." | -getMapCheck($row['wref'])."\" target=\"blank\">(".$oasisx."|".$oasisy.") | +getMapCheck($row['wref'])."\" target=\"blank\">(".$row['x']."|".$row['y'].") | ".$row['loyalty']."% | $type | ".$row['wood']." ![]() ".$row['clay']." ![]() ".$row['iron']." ![]() ".$row['crop']." ![]() |
+ }
}
- elseif($isthere ==0)
+ elseif($result ==0)
{
echo '||||