// // // require "/usr/WWW/ehlermann.de/lib/db.inc"; $dbh = connect(); function print_games() { global $dbh, $offen, $anzahl, $limit, $timelimit; $offen=$_POST["offen"]; $anzahl=$_POST["anzahl"]; $limit=$_POST["limit"]; $timelimit=$_POST["timelimit"]; $wclause="where "; if (isset ($offen) and $offen == "set") { $wclause=$wclause . "status like '%offen%' and "; } if (isset ($anzahl) and ! $anzahl == "") { $wclause=$wclause . "num = '" . $anzahl . "' and "; } if ( $timelimit != "set") { //$wclause=$wclause . "datum - '0' > CURRENT_DATE - '300' and"; $wclause=$wclause . "MONTH(datum) + 12* YEAR(datum) +3 > MONTH(CURRENT_DATE) + 12*YEAR(CURRENT_DATE) and"; } $wclause=$wclause . " 1=1"; if (isset ($limit) and ! $limit == "") { $lclause=" limit " . $limit; } $sql = sprintf("SELECT * FROM civgame %s ORDER BY datum desc %s", $wclause, $lclause); log_db($sql); $result = query($dbh,$sql); while ($row = mysql_fetch_array($result)) { printf("
CIV-Spielstände |
|
||
if (! $skip) {?>whiteboard
if (! $skip) {?>Freeciv-Seite }?> }?> |