wenn du das modul von dastiac installiert hast kannst du folgende coeds nehmen funzt 1a.
include/boxes/lastwars.php
<?php
# Copyright by Manuel Staechele
# Support www.ilch.de
defined ('main') or die ( 'no direct access' );
echo '<table width="100%" border="0" cellpadding="2" cellspacing="0">';
$erg = db_query('SELECT * FROM prefix_wars WHERE status = "3" ORDER BY datime DESC LIMIT 3');
while ($row = db_fetch_object($erg) ) {
$row->tag = ( empty($row->tag) ? $row->gegner : $row->tag );
if (file_exists("include/images/icons/$row->game.gif")){
$game = '<img src="include/images/icons/'.$row->game.'.gif"> ';
}else{
$game = '';
}
if ($row->wlp == 1) {
$was = '<img src="include/images/icons/win.gif" border="0">';
} elseif ($row->wlp == 2) {
$was = '<img src="include/images/icons/los.gif" border="0">';
} elseif ($row->wlp == 3) {
$was = '<img src="include/images/icons/pad.gif" border="0">';
}
$row->tag = get_opponent_details('tag', $row->oid);
echo'<tr><td align="left"">';
echo''.$game.''.$was.' <a href="index.php?wars-more-'.$row->id.'">';
echo $row->owp.':'.$row->opp.' - '.$row->tag.'</a></td></tr>';
}
echo '</table>';
?>
und
include/boxes/nextwars.php
<?php
# Copyright by: Manuel
# Support www.ilch.de
defined ('main') or die ( 'no direct access' );
echo '<table width="100%" border="0" cellpadding="2" cellspacing="0">';
$akttime = date('Y-m-d');
$erg = @db_query("SELECT DATE_FORMAT(datime,'%d.%m.%y - %H:%i') as time,oid, id, game FROM prefix_wars WHERE status = 2 AND datime > '".$akttime."' ORDER BY datime LIMIT 5");
if ( @db_num_rows($erg) == 0 ) {
echo '<tr><td>kein War geplant</td></tr>';
} else {
while ($row = @db_fetch_object($erg) ) {
if (file_exists("include/images/icons/$row->game.gif")){
$game = '<img src="include/images/icons/'.$row->game.'.gif"> ';
}else{
$game = '';
}
$row->tag = get_opponent_details('tag', $row->oid);
$row->gegner = get_opponent_details('name', $row->oid);
$row->tag = ( empty($row->tag) ? $row->gegner : $row->tag );
echo '<tr><td>'.get_wargameimg($row->game).'</td>';
echo '<td><a class="box" href="index.php?wars-more-'.$row->id.'">';
echo $row->time.' - '.$row->tag.'</a></td></tr>';
}
}
echo '</table>';
?>
das ganze is denn ne mischung aus dastiacs war modul und dem aus dem Modul pack 1.8 von SLJ, bei mir funzt es
Bilder müssen im ordner include/images/icons sein und genau so heißen wie das game !
Die endung ist gif!!
BSP. Das game heißt CSS dann heiß das bild CSS.gif!