guck mal auf www.unat.net
Wenn du das so in etwa möchtest, hier die Codes
include/boxes/nextwars.php
<?php
# Copyright by Manuel
# Support www.ilch.de
defined ('main') or die ( 'no direct access' );
$akttime = date('Y-m-d');
$erg = @db_query("SELECT DATE_FORMAT(datime,'%d.%m.%y - %H:%i') as time,tag,gegner, id, game, page FROM prefix_wars WHERE status = 2 AND datime > '".$akttime."' ORDER BY datime LIMIT 5");
if ( @db_num_rows($erg) == 0 ) {
echo '<div style="color:#FF0000;">kein War geplant</div>';
} else {
while ($row = @db_fetch_object($erg) ) {
$row->tag = ( empty($row->tag) ? $row->gegner : $row->tag );
echo '<div style="border:ridge thin; border-color:#99ccff;">';
echo '<table width="100%" border="0" cellspacing="2" cellpadding="0">';
echo '<tr>';
echo '<td align="center" rowspan="2">'.get_wargameimg($row->game).'</td>';
echo '<td align="center"><a class="box" href="index.php?wars-more-'.$row->id.'">'.$row->time.'</a></td>';
echo '</tr>';
echo '<tr>';
echo '<td align="center"><a href="'.$row->page.'" target="_blank">'.$row->tag.'</a></td>';
echo '</tr>';
echo '</table>';
echo '</div>';
}
}
?>
include/boxes/lastwars.php
<?php
# Copyright by Manuel
# Support www.ilch.de
defined ('main') or die ( 'no direct access' );
$farbe = '';
$farb2 = '';
$erg = db_query('SELECT * FROM prefix_wars WHERE status = "3" ORDER BY datime DESC LIMIT 5');
while ($row = db_fetch_object($erg) ) {
$row->tag = ( empty($row->tag) ? $row->gegner : $row->tag );
# Hier die Farben für die Wars einstellen
if ($row->wlp == 1) {
$alt = 'gewonnen';
$backgrnd ='#DFFFDF';
$bild = 'include/images/icons/win.gif';
$farbe = '#C8E1B8';
$farb2 = '#00BB00';
} elseif ($row->wlp == 2) {
$alt = 'verloren';
$backgrnd ='#FFDFDF';
$bild = 'include/images/icons/los.gif';
$farbe = '#D8B9B9';
$farb2 = '#BB0000';
} elseif ($row->wlp == 3) {
$alt = 'unendschieden';
$backgrnd ='include/images/diverse/pad.gif';
$bild = 'include/images/icons/pad.gif';
$farbe = '#FDFBB7';
$farb2 = '#BBBB00';
}
echo '<div style="border:ridge thin; border-color:'.$farb2.'; background-image:url('.$backgrnd.');">';
echo '<table width="100%" border="0" cellpadding="0" cellspacing="2">';
echo '<tr>';
echo '<td width="16" rowspan="2" align="center"><div style="vertical-align:middle;"><img src="'.$bild.'"/></div></td>';
echo '<td><div align="center" style="outline-color:#999999 font-size:12px; outline-style:none ;">'.get_wargameimg($row->game).' vs. <a style="font-size:10px;" href="index.php?wars-more-'.$row->id.'">'.$row->tag.'</a></div></td>';
echo '</tr>';
echo '<tr>';
echo ' <td><div align="center" style="font-size:10px; outline-style:none;"><font style="color:'.$farb2.'">'.$row->owp.' '.$lang['at2'].' '.$row->opp.'</font></div></td>';
echo '</tr>';
echo '</table>';
echo '</div>';
echo '<div style="height:4"></div>';
}
?>
In der include/includes/func/allg.php muss dann noch dieser Code hinzugefügt werden sofern nicht schon vorhanden.
function get_wargameimg ($img) {
if (file_exists('include/images/wargames/'.$img.'.gif')) {
return ('<img src="include/images/wargames/'.$img.'.gif" alt="'.$img.'" border="0">');
} elseif (file_exists('include/images/wargames/'.$img.'.jpg')) {
return ('<img src="include/images/wargames/'.$img.'.jpg" alt="'.$img.'" border="0">');
} elseif (file_exists('include/images/wargames/'.$img.'.jpeg')) {
return ('<img src="include/images/wargames/'.$img.'.jpeg" alt="'.$img.'" border="0">');
} elseif (file_exists('include/images/wargames/'.$img.'.png')) {
return ('<img src="include/images/wargames/'.$img.'.png" alt="'.$img.'" border="0">');
}
return ('');
}
Ich hoffe das ich alles was damit zusammenhängt hier gepostet habe.