Files
TravianZ/Templates/links.tpl
iopietro 6ea4430372 Fixed some bugs
+If you conquer a village with an artifact inside, the new owner will be
changed correctly
+Moved plus links under the menu
+Renewed the "debug" function in Logging.php
+Fixed some errors that could have shown in Ranking.php
2018-04-08 18:28:24 +02:00

40 lines
1.6 KiB
Smarty

<?php
#################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ##
## Filename links.tpl ##
## Developed by: Slim, Manuel Mannhardt < manuel_mannhardt@web.de > ##
## License: TravianX Project ##
## Copyright: TravianX (c) 2010-2011. All rights reserved. ##
## ##
#################################################################################
// Fetch all links
$query = $database->getLinks($session->uid);
if (mysqli_num_rows($query) > 0){
$links = array();
while($data = mysqli_fetch_assoc($query)) {
$links[] = $data;
}
print '<table cellpadding="1" cellspacing="1"><thead><tr><td colspan="3"><a href="spieler.php?s=2">Links:</a></td></tr></thead><tbody>';
foreach($links as $link) {
// Check, if the url is extern
if(substr($link['url'], -1, 1) == '*') {
$target = ' target="_blank"';
$external = '<img src="gpack/travian_default/img/a/external.gif" />';
$link['url'] = str_replace('*', '', $link['url']);
} else {
$target = '';
$external = '';
}
echo '<tr><td class="dot">●</td><td class="link">';
if($session->plus == 0) { echo "buy Plus"; } else {
echo '<a href="' . $link['url'] . '"' . $target . '>' . $link['name'] . $external . '</a></td></tr>';
}
}
print '</tbody></table>';
}
?>