Skip to content

Commit

Permalink
Fixed newsboxes
Browse files Browse the repository at this point in the history
Fixed some errors that should have appeared after adding a link
Fixed some html formatting errors
  • Loading branch information
iopietro committed Apr 8, 2018
1 parent 4b1481f commit b5037e1
Show file tree
Hide file tree
Showing 3 changed files with 50 additions and 54 deletions.
46 changes: 23 additions & 23 deletions Templates/News/newsbox1.tpl
Original file line number Diff line number Diff line change
@@ -1,60 +1,60 @@
<h5><img src="img/en/t2/newsbox1.gif" alt="newsbox 1"></h5>
<?php

$online = mysqli_query($GLOBALS['link'],"SELECT Count(*) as Total FROM " . TB_PREFIX . "users WHERE timestamp > ".(time() - (60*10))." AND tribe!=0 AND tribe!=4 AND tribe!=5");
$top_rank = mysqli_fetch_assoc(mysqli_query($GLOBALS['link'],"SELECT username FROM ".TB_PREFIX."users WHERE ".(INCLUDE_ADMIN ? '' : 'access< 8 AND ')."id > 5 AND tribe<=3 AND tribe > 0 ORDER BY oldrank ASC Limit 1"));
$online = mysqli_query($database->dblink,"SELECT Count(*) as Total FROM " . TB_PREFIX . "users WHERE timestamp > ".(time() - (60*10))." AND tribe!=0 AND tribe!=4 AND tribe!=5");
$top_rank = mysqli_fetch_assoc(mysqli_query($database->dblink,"SELECT username FROM ".TB_PREFIX."users WHERE ".(INCLUDE_ADMIN ? '' : 'access< 8 AND ')."id > 5 AND tribe<=3 AND tribe > 0 ORDER BY oldrank ASC Limit 1"));

?>

<div class="news">
<table width="100%" border="0">
<table width="100%">
<tr>
<td align="left"><b>Online Users</td>
<td>: <font color="Red"><?php
<td align="left"><b>Online Users</b></td>
<td>: <font color="Red"><b><?php

if (!empty($online)) {
echo mysqli_fetch_assoc($online)['Total'];
} else {
echo 0;
}

?> users</font></b></td>
?> users</b></font></td>
</tr>
<tr>
<td><b>Server Speed</td>
<td>: <font color="Red"><?php echo ''.SPEED.'x';?></font></b></td>
<td><b>Server Speed</b></td>
<td><b>: <font color="Red"><?php echo ''.SPEED.'x';?></font></b></td>
</tr>
<tr>
<td><b>Troop Speed</td>
<td>: <font color="Red"><?php echo INCREASE_SPEED;?>x</font></b></td>
<td><b>Troop Speed</b></td>
<td><b>: <font color="Red"><?php echo INCREASE_SPEED;?>x</font></b></td>
</tr>
<tr>
<td><b>Evasion Speed</td>
<td>: <font color="Red"><?php echo EVASION_SPEED;?></font></b></td>
<td><b>Evasion Speed</b></td>
<td><b>: <font color="Red"><?php echo EVASION_SPEED;?></font></b></td>
</tr>
<tr>
<td><b>Map Size</td>
<td>: <font color="Red"><?php echo WORLD_MAX;?>x<?php echo WORLD_MAX;?></font></b></td>
<td><b>Map Size</b></td>
<td><b>: <font color="Red"><?php echo WORLD_MAX;?>x<?php echo WORLD_MAX;?></font></b></td>
</tr>
<tr>
<td><b>Village Exp.</td>
<td>: <font color="Red"><?php if(CP == 0){ echo "Fast"; } else if(CP == 1){ echo "Slow"; } ?></font></b></td>
<td><b>Village Exp.</b></td>
<td><b>: <font color="Red"><?php if(CP == 0){ echo "Fast"; } else if(CP == 1){ echo "Slow"; } ?></font></b></td>
</tr>
<tr>
<td><b>Beginners Prot.</td>
<td>: <font color="Red"><?php echo (PROTECTION/3600);?> hrs</font></b></td>
<td><b>Beginners Prot.</b></td>
<td><b>: <font color="Red"><?php echo (PROTECTION/3600);?> hrs</font></b></td>
</tr>
<tr>
<td><b>Medal Interval</td>
<td>: <font color="Red"><?php if(MEDALINTERVAL >= 86400){ echo ''.(MEDALINTERVAL/86400).' Days'; } else if(MEDALINTERVAL < 86400){ echo ''.(MEDALINTERVAL/3600).' Hours'; } ?></font></b></td>
<td><b>Medal Interval</b></td>
<td><b>: <font color="Red"><?php if(MEDALINTERVAL >= 86400){ echo ''.(MEDALINTERVAL/86400).' Days'; } else if(MEDALINTERVAL < 86400){ echo ''.(MEDALINTERVAL/3600).' Hours'; } ?></font></b></td>
</tr>
<tr>
<td><b>Server Start</td>
<td>: <font color="Red"><?php echo START_DATE;?></font></b></td>
<td><b>Server Start</b></td>
<td><b>: <font color="Red"><?php echo START_DATE;?></font></b></td>
</tr>
<tr>
<td><b>Best Player</td>
<td>: <font color="Red"><?php echo $top_rank['username'] ?></font></b></td>
<td><b>: <font color="Red"><?php echo $top_rank['username'] ?></font></b></td>
</tr>
</table>
</div>
42 changes: 21 additions & 21 deletions Templates/News/newsbox2.tpl
Original file line number Diff line number Diff line change
@@ -1,55 +1,55 @@
<h5><img src="img/en/t2/newsbox2.gif" alt="newsbox 2"></h5>
<?php

$online = mysqli_query($GLOBALS['link'],"SELECT Count(*) as Total FROM " . TB_PREFIX . "users WHERE timestamp > ".(time() - (60*10))." AND tribe!=0 AND tribe!=4 AND tribe!=5");
$online = mysqli_query($database->dblink,"SELECT Count(*) as Total FROM " . TB_PREFIX . "users WHERE timestamp > ".(time() - (60*10))." AND tribe!=0 AND tribe!=4 AND tribe!=5");

?>

<div class="news">
<table width="100%" border="0">
<table width="100%">
<tr>
<td align="left"><b>Online Users</td>
<td>: <font color="Red"><?php
<td align="left"><b>Online Users</b></td>
<td>: <font color="Red"><b><?php

if (!empty($online)) {
echo mysqli_fetch_assoc($online)['Total'];
} else {
echo 0;
}

?> users</font></b></td>
?> users</b></font></td>
</tr>
<tr>
<td><b>Server Speed</td>
<td>: <font color="Red"><?php echo ''.SPEED.'x';?></font></b></td>
<td><b>Server Speed</b></td>
<td><b>: <font color="Red"><?php echo ''.SPEED.'x';?></font></b></td>
</tr>
<tr>
<td><b>Troop Speed</td>
<td>: <font color="Red"><?php echo INCREASE_SPEED;?>x</font></b></td>
<td><b>Troop Speed</b></td>
<td><b>: <font color="Red"><?php echo INCREASE_SPEED;?>x</font></b></td>
</tr>
<tr>
<td><b>Evasion Speed</td>
<td>: <font color="Red"><?php echo EVASION_SPEED;?></font></b></td>
<td><b>Evasion Speed</b></td>
<td><b>: <font color="Red"><?php echo EVASION_SPEED;?></font></b></td>
</tr>
<tr>
<td><b>Map Size</td>
<td>: <font color="Red"><?php echo WORLD_MAX;?>x<?php echo WORLD_MAX;?></font></b></td>
<td><b>Map Size</b></td>
<td><b>: <font color="Red"><?php echo WORLD_MAX;?>x<?php echo WORLD_MAX;?></font></b></td>
</tr>
<tr>
<td><b>Village Exp.</td>
<td>: <font color="Red"><?php if(CP == 0){ echo "Fast"; } else if(CP == 1){ echo "Slow"; } ?></font></b></td>
<td><b>Village Exp.</b></td>
<td><b>: <font color="Red"><?php if(CP == 0){ echo "Fast"; } else if(CP == 1){ echo "Slow"; } ?></font></b></td>
</tr>
<tr>
<td><b>Beginners Prot.</td>
<td>: <font color="Red"><?php echo (PROTECTION/3600);?> hrs</font></b></td>
<td><b>Beginners Prot.</b></td>
<td><b>: <font color="Red"><?php echo (PROTECTION/3600);?> hrs</font></b></td>
</tr>
<tr>
<td><b>Medal Interval</td>
<td>: <font color="Red"><?php if(MEDALINTERVAL >= 86400){ echo ''.(MEDALINTERVAL/86400).' Days'; } else if(MEDALINTERVAL < 86400){ echo ''.(MEDALINTERVAL/3600).' Hours'; } ?></font></b></td>
<td><b>Medal Interval</b></td>
<td><b>: <font color="Red"><?php if(MEDALINTERVAL >= 86400){ echo ''.(MEDALINTERVAL/86400).' Days'; } else if(MEDALINTERVAL < 86400){ echo ''.(MEDALINTERVAL/3600).' Hours'; } ?></font></b></td>
</tr>
<tr>
<td><b>Server Start</td>
<td>: <font color="Red"><?php echo START_DATE;?></font></b></td>
<td><b>Server Start</b></td>
<td><b>: <font color="Red"><?php echo START_DATE;?></font></b></td>
</tr>
</table>
</div>
16 changes: 6 additions & 10 deletions Templates/News/newsbox3.tpl
Original file line number Diff line number Diff line change
@@ -1,15 +1,11 @@
<h5><img src="../img/en/t2/newsbox3.gif" alt="newsbox 2"></h5>
<div class="news">


<b><center>TravianZ by Shadow</center></b><br />
<div class="news">
<div style="text-align: center"><b>TravianZ by Shadow</b></div><br />
<b>Version: <font color="Red">v8.3.3</font></b><br />
<b>Major Changes:</b> Cache all major files , rewrite some part of script , catapults fixed. See more in readme file!<br />
<b>Minor Changes:</b> Admin panel updated , config updated, installation system updated<br />
<b>Script Price:</b> FREE!<br /><br />
<b><u><center>Released by: Shadow</u></b><br />
<b>Visit: <a href="http://forum.ragezone.com/f583/travianz-version-modified-shadow-many-967580/">RageZone.com</a></b><br /></center></b><br />
<b><u><center>Download from <a href="https://github.com/Shadowss/TravianZ/archive/master.zip">Github</a></u></b><br />


</div>
<div style="text-align: center"><u><b>Released by: Shadow</b></u></div><br />
<div style="text-align: center"><b>Visit: <a href="http://forum.ragezone.com/f583/travianz-version-modified-shadow-many-967580/">RageZone.com</a></b></div><br />
<div style="text-align: center"><b><u>Download from <a href="https://github.com/Shadowss/TravianZ/archive/master.zip">Github</a></u></b></div><br />
</div>

0 comments on commit b5037e1

Please sign in to comment.