mirror of
https://github.com/Shadowss/TravianZ.git
synced 2026-07-02 18:44:21 +00:00
fix reports
This commit is contained in:
@@ -1507,6 +1507,12 @@
|
||||
$result = mysql_query($q, $this->connection);
|
||||
return $this->mysql_fetch_all($result);
|
||||
}
|
||||
|
||||
function getDelNotice($uid) {
|
||||
$q = "SELECT * FROM " . TB_PREFIX . "ndata where uid = $uid and del = 1 ORDER BY time DESC";
|
||||
$result = mysql_query($q, $this->connection);
|
||||
return $this->mysql_fetch_all($result);
|
||||
}
|
||||
|
||||
function getNotice2($id, $field) {
|
||||
$q = "SELECT ".$field." FROM " . TB_PREFIX . "ndata where `id` = '$id'";
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
|
||||
public $unread, $nunread = false;
|
||||
public $note;
|
||||
public $inbox, $sent, $reading, $reply, $archived, $noticearray, $readingNotice = array();
|
||||
public $inbox, $sent, $reading, $reply, $archived, $noticearray, $delnoticearray, $readingNotice = array();
|
||||
private $totalMessage, $totalNotice;
|
||||
private $allNotice = array();
|
||||
|
||||
@@ -112,6 +112,7 @@
|
||||
}
|
||||
if (!is_array($type)) { $type = array($type); }
|
||||
$this->noticearray = $this->filter_by_value($database->getNotice($session->uid), "ntype", $type);
|
||||
$this->delnoticearray = $this->filter_by_value($database->getDelNotice($session->uid), "ntype", $type);
|
||||
}
|
||||
if(isset($get['id'])) {
|
||||
$this->readingNotice = $this->getReadNotice($get['id']);
|
||||
@@ -214,6 +215,7 @@
|
||||
global $database, $session;
|
||||
$this->allNotice = $database->getNotice($session->uid);
|
||||
$this->noticearray = $this->filter_by_value_except($this->allNotice, "ntype", 9);
|
||||
$this->delnoticearray = $this->filter_by_value_except($database->getDelNotice($session->uid), "ntype", 9);
|
||||
$this->totalNotice = count($this->allNotice);
|
||||
}
|
||||
|
||||
|
||||
@@ -84,12 +84,10 @@ $noticeClass = array("Scout Report","Won as attacker without losses","Won as att
|
||||
}
|
||||
$date = $generator->procMtime($message->noticearray[$i-1]['time']);
|
||||
echo "</div></td><td class=\"dat\">".$date[0]." ".$date[1]."</td></tr>";
|
||||
}else{
|
||||
$count =+ 1;
|
||||
}}
|
||||
}}
|
||||
$name++;
|
||||
}
|
||||
if(count($message->noticearray) == $count) {
|
||||
if(count($message->noticearray)-count($message->delnoticearray) == 0) {
|
||||
echo "<td colspan=\"3\" class=\"none\">There are no reports available.</td></tr>";
|
||||
}
|
||||
?>
|
||||
|
||||
Reference in New Issue
Block a user