<?
//auslagerungsfiles
$ext = ".gif";
$exf = ".rar";
$srg = "files/maps/";
$srf = "files/mapfiles/";
$ofit= "#FFFF99";
include("".$path."connect_sql.php");
$verbindung = @mysql_connect($mysqlserver, $mysqluser, $mysqlpass)
or die("Konnte keine Verbindung zum Datenbankserver aufbauen!");
$selectdb = @mysql_select_db($mysqldb)
or die("Konnte die Datenbank <b>$mysqldb</b> nicht auswählen!");
function bgcolor($row = 1) {
static $i;
static $col = array('#6699CC','#B2B2B2');
$bg = $col[(int)($i + .00000001)];
$i += 1 / $row;
if ($i >= count($col)) $i = 0;
return $bg;
}
$aktuell = mysql_query("SELECT map_rate, map_vote, COUNT(*) As Anzahl FROM map_list");
$ergebnis = 1;
while($data = mysql_fetch_array($aktuell)) {
$ergebnis += $data['map_rate'];
}
$ergebnis /= $data['Anzahl'];
$link=mysql_query("SELECT * FROM map_list ORDER BY map_id DESC");
echo mysql_error();
while($data = mysql_fetch_array($link))
{
if ($data[map_typ] == 'cs') {
printf("<tr bgcolor='%s'>
<td style=\"height: 90px; width: 130px;\"><img src=\"".$path.$srg.$data[map_name].$ext."\" style=\"height: 80px; width: 120px;\" align=\"center\" alt=\"".$data[map_name]."\"></td>
<td align=\"top\" style=\"height: 90px; width: 390px;\">
<table width=\"390px\">
<tr>
<td style=\"width: 90px;\"><font size=\"-2\">Mapname:</font></td>
<td style=\"width: 300px;\">[<font color=\"".$ofit."\" size=\"-2\">".$data[map_name]."</font>]</td>
</tr>
<tr>
<td><font size=\"-2\">Beschreibung:</font></td>
<td>[<font color=\"".$ofit."\" size=\"-2\">".$data[map_info]."</font>]</td>
</tr>
<tr>
<td><font size=\"-2\">Grösse der Map:</font></td>
<td>[<font color=\"".$ofit."\" size=\"-2\">".$data[map_size]."</font><font size=\"-2\"> KB</font>]</td>
</tr>
<tr>
<td><font size=\"-2\">Eingerichtet am:</font></td>
<td>[<font color=\"".$ofit."\" size=\"-2\">".$data[map_upload]."</font>]</td>
</tr>
</table>
</td>
</tr>\n", bgcolor(1));
printf("<tr bgcolor='%s'>
<td colspan=\"2\" align=\"center\">[<a href=\"".$path.$srf.$data[map_name].$exf."\">Download</a>] *** Unsere Bewertung: [".$data[map_bewertung]."] *** Eure Bewertung: [".substr($ergebnis,0,4)."]
[<a href=\"index.php?file=downloads/vote&map_id=".$data[$map_id]."&map_name=".$data[$map_name]."\">Vote?</a>]</td>
</tr>", bgcolor(1));
printf("<tr><td><br></td></tr>");
}
}
printf("<tr><td colspan=\"2\" align=\"center\"><font color=\"".$ofit."\" size=\"-3\">DLAdmin V0.8 - © by Infernal Alliance</font></td></tr>");
?>