This commit is contained in:
yi12345
2013-05-17 08:45:03 +03:00
parent 5df4ee6687
commit 7674747f1a
5 changed files with 22 additions and 3 deletions
+4
View File
@@ -1444,7 +1444,11 @@ class MYSQL_DB {
}
function getVSumField($uid, $field) {
if($field != "cp"){
$q = "SELECT sum(" . $field . ") FROM " . TB_PREFIX . "vdata where owner = $uid";
}else{
$q = "SELECT sum(" . $field . ") FROM " . TB_PREFIX . "vdata where owner = $uid and natar = 0";
}
$result = mysql_query($q, $this->connection);
$row = mysql_fetch_row($result);
return $row[0];
+4
View File
@@ -1447,7 +1447,11 @@ class MYSQLi_DB {
}
function getVSumField($uid, $field) {
if($field != "cp"){
$q = "SELECT sum(" . $field . ") FROM " . TB_PREFIX . "vdata where owner = $uid";
}else{
$q = "SELECT sum(" . $field . ") FROM " . TB_PREFIX . "vdata where owner = $uid and natar = 0";
}
$result = mysqli_query($this->connection, $q);
$row = mysqli_fetch_row($result);
return $row[0];
+4
View File
@@ -14,7 +14,11 @@
<table cellpadding="1" cellspacing="1" id="build_value">
<tr>
<th>Production of this village:</th>
<?php if($database->getVillageField($village->wid, 'natar') == 0){ ?>
<td><b><?php echo $database->getVillageField($village->wid, 'cp'); ?></b> Culture points per day</td>
<?php }else{ ?>
<td><b>0</b> Culture points per day</td>
<?php } ?>
</tr>
<tr>
<th>Production of all villages:</th>
+4 -1
View File
@@ -10,11 +10,14 @@
<?php include("26_menu.tpl"); ?>
<p>In order to extend your empire you need culture points. These culture points increase in the course of time and do so faster as your building levels increase.</p>
<table cellpadding="1" cellspacing="1" id="build_value">
<tr>
<th>Production of this village:</th>
<?php if($database->getVillageField($village->wid, 'natar') == 0){ ?>
<td><b><?php echo $database->getVillageField($village->wid, 'cp'); ?></b> Culture points per day</td>
<?php }else{ ?>
<td><b>0</b> Culture points per day</td>
<?php } ?>
</tr>
<tr>
<th>Production of all villages:</th>
+6 -2
View File
@@ -1,11 +1,15 @@
<?php
$artefact = $database->getArtefactDetails($_GET['show']);
if($artefact['size'] == 1){
if($artefact['size'] == 1 && $artefact['type'] != 11){
$reqlvl = 10;
$effect = "village";
}elseif($artefact['size'] == 2 OR $artefact['size'] == 3){
}else{
if($artefact['type'] != 11){
$reqlvl = 20;
}else{
$reqlvl = 10;
}
$effect = "account";
}
if ($artefact['conquered'] >= (time()-86400)){