mirror of
https://github.com/Shadowss/TravianZ.git
synced 2026-07-20 19:46:10 +00:00
Optimizations
-Removed the "sort_type" 6 from the movement table, looted resources will now be saved in the "sort_type" 4 returing attack. This reduces a lot the spam in the tables "send" and "movement" of the database -Removed some useless methods in Database.php and Message.php +Optimized report loading, own report will be loaded only once (and not twice at random) and allied reports aren't loaded anymore +Minor improovements and better indentation
This commit is contained in:
+10
-14
@@ -11,12 +11,13 @@
|
||||
include_once("../GameEngine/Generator.php");
|
||||
include_once("../GameEngine/Technology.php");
|
||||
include_once("../GameEngine/Message.php");
|
||||
if ($_GET['bid']){
|
||||
$rep = $database->getNotice4($_GET['bid']);
|
||||
}else
|
||||
$sql = "SELECT * FROM ".TB_PREFIX."ndata ORDER BY time DESC ";
|
||||
$result = mysqli_query($GLOBALS["link"], $sql);
|
||||
$rep1 = $database->mysqli_fetch_all($result);
|
||||
if ($_GET['bid']) $rep = $database->getNotice2($_GET['bid']);
|
||||
else
|
||||
{
|
||||
$sql = "SELECT * FROM " . TB_PREFIX . "ndata ORDER BY time DESC ";
|
||||
$result = mysqli_query($GLOBALS["link"], $sql);
|
||||
$rep1 = $database->mysqli_fetch_all($result);
|
||||
}
|
||||
if($rep1)
|
||||
{
|
||||
//$att = $database->getUserArray($rep1['uid'],1);
|
||||
@@ -47,13 +48,8 @@ if($rep)
|
||||
<div id="content" class="reports">
|
||||
<h1>Reporte</h1>
|
||||
<?php
|
||||
$type = $rep[0]['ntype'];
|
||||
include("Notice/".$type.".tpl");
|
||||
|
||||
$type = $rep[0]['ntype'];
|
||||
include ("Notice/" . $type . ".tpl");
|
||||
}
|
||||
else
|
||||
{
|
||||
echo "Report ID ".$_GET['bid']." doesn't exist!";
|
||||
}
|
||||
|
||||
else echo "Report ID ".$_GET['bid']." doesn't exist!";
|
||||
?>
|
||||
|
||||
Reference in New Issue
Block a user