fix link to village in market + now when you delete report you can see it in alliance attack and in village view

This commit is contained in:
unknown
2012-05-02 15:12:28 +03:00
parent 2ff7361ed9
commit 1501ac81ba
3 changed files with 10 additions and 8 deletions
+1 -1
View File
@@ -1485,7 +1485,7 @@
} }
function removeNotice($id) { function removeNotice($id) {
$q = "DELETE FROM " . TB_PREFIX . "ndata where id = $id"; $q = "UPDATE " . TB_PREFIX . "ndata set del = 1 where id = $id";
return mysql_query($q, $this->connection); return mysql_query($q, $this->connection);
} }
+3 -5
View File
@@ -75,7 +75,7 @@ if(isset($_POST['ft'])=='check' && $allres!=0 && ($_POST['x']!="" && $_POST['y']
$getvilowner = $database->getVillageField($getwref, "owner"); $getvilowner = $database->getVillageField($getwref, "owner");
} }
?> ?>
<td><?php echo $getvilname; ?>(<?php echo $getvilcoor['y']; ?>|<?php echo $getvilcoor['x']; ?>)<span class="clear"></span></td> <td><a href="karte.php?d=<?php echo $getwref; ?>&c=<?php echo $generator->getMapCheck($getwref); ?>"><?php echo $getvilname; ?>(<?php echo $getvilcoor['y']; ?>|<?php echo $getvilcoor['x']; ?>)<span class="clear"></span></a></td>
</tr> </tr>
<tr> <tr>
<th>Player:</th> <th>Player:</th>
@@ -194,12 +194,10 @@ if(isset($_POST['ft'])=='check'){
if(!$checkexist){ if(!$checkexist){
$error = '<span class="error"><b>No Coordinates selected</b></span>'; $error = '<span class="error"><b>No Coordinates selected</b></span>';
}elseif($_POST['r1']==0){ }elseif($_POST['r1']==0 && $_POST['r2']==0 && $_POST['r3']==0 && $_POST['r4']==0){
$error = '<span class="error"><b>Resources not selected.</b></span>'; $error = '<span class="error"><b>Resources not selected.</b></span>';
}elseif(!$_POST['x'] && !$_POST['y'] && !$_POST['dname']){ }elseif(!$_POST['x'] && !$_POST['y'] && !$_POST['dname']){
$error = '<span class="error"><b>Enter the coordinates.</b></span>'; $error = '<span class="error"><b>Enter coordinates or village name.</b></span>';
}elseif($_POST['x']==0 && $_POST['y']==0 && !$_POST['dname']){
$error = '<span class="error"><b>Enter the coordinates.</b></span>';
} }
echo $error; echo $error;
} }
+6 -2
View File
@@ -63,8 +63,10 @@ $noticeClass = array("Scout Report","Won as attacker without losses","Won as att
} }
$name = 1; $name = 1;
$count = 0;
for($i=(1+$s);$i<=(10+$s);$i++) { for($i=(1+$s);$i<=(10+$s);$i++) {
if(count($message->noticearray) >= $i) { if(count($message->noticearray) >= $i) {
if($message->noticearray[$i-1]['del'] == 0){
echo "<tr><td class=\"sel\"><input class=\"check\" type=\"checkbox\" name=\"n".$name."\" value=\"".$message->noticearray[$i-1]['id']."\" /></td> echo "<tr><td class=\"sel\"><input class=\"check\" type=\"checkbox\" name=\"n".$name."\" value=\"".$message->noticearray[$i-1]['id']."\" /></td>
<td class=\"sub\">"; <td class=\"sub\">";
$type = (isset($_GET['t']) && $_GET['t'] == 5)? $message->noticearray[$i-1]['archive'] : $message->noticearray[$i-1]['ntype']; $type = (isset($_GET['t']) && $_GET['t'] == 5)? $message->noticearray[$i-1]['archive'] : $message->noticearray[$i-1]['ntype'];
@@ -82,10 +84,12 @@ $noticeClass = array("Scout Report","Won as attacker without losses","Won as att
} }
$date = $generator->procMtime($message->noticearray[$i-1]['time']); $date = $generator->procMtime($message->noticearray[$i-1]['time']);
echo "</div></td><td class=\"dat\">".$date[0]." ".$date[1]."</td></tr>"; echo "</div></td><td class=\"dat\">".$date[0]." ".$date[1]."</td></tr>";
} }else{
$count =+ 1;
}}
$name++; $name++;
} }
if(count($message->noticearray) == 0) { if(count($message->noticearray) == $count) {
echo "<td colspan=\"3\" class=\"none\">There are no reports available.</td></tr>"; echo "<td colspan=\"3\" class=\"none\">There are no reports available.</td></tr>";
} }
?> ?>