/* * Copyright (c) 2006 * * Florian Schreier. All rights reserved. * * Redistribution and use in source and binary forms, with or without modification, * are permitted provided that the following conditions are met: * * 1. Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * 3. The names of its contributors may never be used to endorse or promote * products derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ include "config.php"; security(); //Datumausgabe function datum($eingabe, $farbe) { if ($eingabe == "0000-00-00") { return "
=text('admin_header')?> | |||||||||||||||||||||||||||||||||
=text('admin_player')?> | =text('volk_rom')?> | =text('volk_ger')?> | =text('volk_gal')?> | =text('admin_lastchange')?> | |||||||||||||||||||||||||||||
');\" onmouseout=\"return nd();\">".$row['name']." | "; } else { echo "".$row['name']." | "; } //Truppenquery $sqltruppen="SELECT sum(t1), sum(t2), sum(t3), sum(t4), sum(t5), sum(t6), sum(t7), sum(t8), sum(t9), sum(t10) FROM ".PREFIX."truppen WHERE sid='".$row['sid']."'"; $resulttruppen = mysql_query($sqltruppen) OR die(mysql_error()); $rowtruppen = mysql_fetch_assoc($resulttruppen); //definiert $nix. (10 Zellen mit 0) $nix=""; for ($i=1; $i<=10; $i++) { $nix.="".zero(0)." | "; } //definiert $truppen (8 Zellen mit der entsprechenden Truppenzahl) $truppen=""; for ($i=1; $i<=10; $i++) { $truppen.="".zero($rowtruppen['sum(t'.$i.')'])." | "; } //weist dem entsprechenden Volk die Truppenzahlen zu $t=array(); $t['rom']=$nix; $t['ger']=$nix; $t['gal']=$nix; $t[$row['volk']]=$truppen; //Ausgabe der Truppenzahlen (die beiden anderen Völker entsprechen $nix) echo $t['rom']."".$t['ger']." | ".$t['gal']; //Ausgabe des Datums echo datum($row['lastchange'], $farbe); //Ende der Spielerzeile echo " | ||||||||||||||||||||||||||||
".text('admin_sum')." | "; echo truppensum('rom'); echo ""; echo truppensum('ger'); echo " | "; echo truppensum('gal'); echo " | "; echo " |