function print_table($query)
{
    global $Benutzer;
    global $AllianzTag;
    $SQL_Result = tic_mysql_query($query, $SQL_DBConn) or die(mysql_errno() . " - " . mysql_error());
    $SQL_Num = mysql_num_rows($SQL_Result);
    if ($SQL_Num == 0) {
        echo '<tr><td colspan="4"><i>Keine Eintr&auml;ge gefunden</i></td></tr>';
    } else {
        for ($n = 0; $n < $SQL_Num; $n++) {
            $ftype = 'normal';
            if (mysql_result($SQL_Result, $n, 'umod') != '') {
                $ftype = 'umode';
            }
            if (mysql_result($SQL_Result, $n, 'id') == $Benutzer['id']) {
                $ftype = 'myself';
            }
            if (mysql_result($SQL_Result, $n, 'value') > 0) {
                if ($n < 9) {
                    $s = "0" . ($n + 1);
                } else {
                    $s = $n + 1;
                }
                $gala = mysql_result($SQL_Result, $n, 'gala');
                $planet = mysql_result($SQL_Result, $n, 'planet');
                if (strlen($planet) == 1) {
                    $planet = "0" . $planet;
                }
                echo '<tr>';
                echo '<td class="field' . $ftype . 'light">' . $s . '.</td>';
                echo '<td class="field' . $ftype . 'dark" align="center">[' . $AllianzTag[mysql_result($SQL_Result, $n, 'allianz')] . ']</td>';
                echo '<td class="field' . $ftype . 'light" align="right">' . $gala . ':' . $planet . '</td>';
                echo '<td  class="field' . $ftype . 'dark">' . '<a href="./main.php?modul=anzeigen&amp;id=' . mysql_result($SQL_Result, $n, 'id') . '">' . mysql_result($SQL_Result, $n, 'name') . '</a></td>';
                echo '<td class="field' . $ftype . 'light" align="right">' . ZahlZuText(mysql_result($SQL_Result, $n, 'value')) . '</td>';
                echo '</tr>';
            }
        }
    }
}
Beispiel #2
0
    $SQL_Row1 = mysql_fetch_row($SQL_Result1);
    $SQL_Result2 = tic_mysql_query('SELECT COUNT(*) FROM `gn4flottenbewegungen` where modus=1', $SQL_DBConn);
    $SQL_Row2 = mysql_fetch_row($SQL_Result2);
    $SQL_Result3 = tic_mysql_query('SELECT COUNT(*) FROM `gn4flottenbewegungen` where modus=2', $SQL_DBConn);
    $SQL_Row3 = mysql_fetch_row($SQL_Result3);
    $SQL_Result4 = tic_mysql_query('SELECT COUNT(*) FROM `gn4flottenbewegungen` where modus>2 or modus=0', $SQL_DBConn);
    $SQL_Row4 = mysql_fetch_row($SQL_Result4);
    $SQL_Result5 = tic_mysql_query('SELECT COUNT(*) FROM `gn4accounts`', $SQL_DBConn);
    $SQL_Row5 = mysql_fetch_row($SQL_Result5);
    $SQL_Result8 = tic_mysql_query('SELECT COUNT(*) FROM `gn4forum` WHERE belongsto="0"', $SQL_DBConn);
    $SQL_Row8 = mysql_fetch_row($SQL_Result8);
    $SQL_Result9 = tic_mysql_query('SELECT COUNT(*) FROM `gn4forum` WHERE NOT belongsto="0"', $SQL_DBConn);
    $SQL_Row9 = mysql_fetch_row($SQL_Result9);
    $SQL_Result10 = tic_mysql_query('SELECT COUNT(*) FROM `gn4scans`', $SQL_DBConn);
    $SQL_Row10 = mysql_fetch_row($SQL_Result10);
    $text = "00,01Anzahl Flottenbewegungen: 07,01" . ZahlZuText($SQL_Row1[0]) . "\n00,01Anzahl Verteidingungsflüge: 07,01" . ZahlZuText($SQL_Row2[0]) . "\n00,01Anzahl Angriffsflüge: 07,01" . ZahlZuText($SQL_Row3[0]) . "\n00,01Anzahl Rückflüge: 07,01" . ZahlZuText($SQL_Row4[0]) . "\n" . "00,01Anzahl der T.I.C. Accounts: 07,01" . ZahlZuText($SQL_Row5[0]) . "\n" . "00,01Forenstatistik: 07,01" . "\n" . "00,01Themen: 07,01" . ZahlZuText($SQL_Row8[0]) . "\n" . "00,01Antworten: 07,01" . ZahlZuText($SQL_Row9[0]) . "\n" . "00,01Scan Datenbank: 07,01" . "\n" . "00,01Anzahl Scans: 07,01" . ZahlZuText($SQL_Row10[0]) . "\n" . "00,01Letzte Scansäuberung: 07,01" . $lastscanclean;
} elseif ($modus == 5) {
    $SQL_Result11 = tic_mysql_query('SELECT * FROM `gn4accounts` WHERE scantyp = 1 ORDER BY svs DESC;', $SQL_DBConn);
    $text = $text . "\n" . $irc_text['farbe'] . $irc_farbe['orange'] . "MILI-SCANNER";
    for ($n = 0; $n < 5; $n++) {
        $name = mysql_result($SQL_Result11, $n, 'name');
        $svs = mysql_result($SQL_Result11, $n, 'svs');
        $gala = mysql_result($SQL_Result11, $n, 'galaxie');
        $planet = mysql_result($SQL_Result11, $n, 'planet');
        $text = $text . "\n" . $name . " ( " . $gala . ":" . $planet . " ) hat " . $svs . " svs";
    }
    $SQL_Result12 = tic_mysql_query('SELECT * FROM `gn4accounts` WHERE scantyp = 2 ORDER BY svs DESC;', $SQL_DBConn);
    $text = $text . "\n" . $irc_text['farbe'] . $irc_farbe['orange'] . "NEWS-SCANNER";
    for ($m = 0; $m < 5; $m++) {
        $name = mysql_result($SQL_Result12, $m, 'name');
        $svs = mysql_result($SQL_Result12, $m, 'svs');
Beispiel #3
0
?>
" />
						</td>
					</tr>
					<tr>
						<td>Metallextraktoren:</td>
						<td>
							<input type="text" name="txtExen_m" maxlength="10" size="10" value="<?php 
echo ZahlZuText($Benutzer['exen_m']);
?>
" />
						</td>
						<td>Kristallextraktoren:</td>
						<td>
							<input type="text" name="txtExen_k" maxlength="10" size="10" value="<?php 
echo ZahlZuText($Benutzer['exen_k']);
?>
" />
						</td>
					</tr>
					<tr>
						<td align="center" colspan="4">
							<input type="submit" value="Informationen &auml;ndern" />
						</td>
					</tr>
				</table>
			</form>
		</td>
	</tr>
	<tr>
		<td class="datatablehead">Passwort &auml;ndern</td>
}
if ($sb_spieler > 0) {
    $durchschnitt_sbs = IntVal($gesamt_sbs / $sb_spieler);
} else {
    $durchschnitt_sbs = 0;
}
?>
		<tr>
			<td colspan="2" align="right"><b>Extraktoren der Allianz:</b></td>
			<td class="fieldnormallight" align="right"><?php 
echo ZahlZuText($gesamt_exen_m);
?>
</td>
			<td class="fieldnormaldark" align="right"><?php 
echo ZahlZuText($gesamt_exen_k);
?>
</td>
			<td></td>
			<td class="fieldnormaldark" align="right"><?php 
echo ZahlZuText($durchschnitt_sbs);
?>
</td>
			<td colspan="2" align="left"><b>Scanblocker pro Spieler</b></td>
		</tr>
	</table>
	<br />
	<b>(<u class="fieldumodelight">Blau</u> makierte Spieler sind im Urlaubs-Modus)</b><br />
	<b>(<u class="fieldinactivelight">Rot</u> makierte Spieler waren seit min. drei Tagen nicht online)</b>
</center>
<!-- ENDE: inc_allianz -->
        echo '<P CLASS="hell">';
        echo '<A HREF="./main.php?modul=showgalascans&displaytype=0&xgala=' . $gala . '&xplanet=' . $planet . '">';
        echo '<font size=2>' . $stypes . '</font></A></p></TD>';
        // Sektor gescannt
        // Genauigkeit
        $gen = mysql_result($SQL_Result, $n, 'gen');
        if ($gen == 100 or $gen == 99) {
            $farbe = $htmlstyle['hell'];
        }
        if ($gen < 99) {
            $farbe = $htmlstyle['hell_rot'];
        }
        echo '	<TD BGCOLOR=#' . $farbe . '><font size=1>' . $gen . '%</font></TD>';
        $stk = mysql_result($SQL_Result, $n, 'pts');
        if ($Benutzer['punkte'] / $ATTOVERALL <= $stk) {
            // Angreifbar
            echo '	<TD ALIGN="right" BGCOLOR=#29D202><font size=1><b>' . ZahlZuText($stk) . '</font></TD>';
        } else {
            echo '	<TD ALIGN="right"><P CLASS="hell"><font size=1><b>' . ZahlZuText($stk) . '</font</TD>';
        }
        echo '	<TD ALIGN="right"><P CLASS="hell">' . ZahlZuText(mysql_result($SQL_Result, $n, 's')) . '</TD>';
        echo '	<TD ALIGN="right"><P CLASS="hell">' . ZahlZuText(mysql_result($SQL_Result, $n, 'd')) . '</TD>';
        echo '	<TD ALIGN="right"><P CLASS="hell">' . ZahlZuText(mysql_result($SQL_Result, $n, 'me')) . '</TD>';
        echo '	<TD ALIGN="right"><P CLASS="hell">' . ZahlZuText(mysql_result($SQL_Result, $n, 'ke')) . '</TD>';
        $IstEx = mysql_result($SQL_Result, $n, 'ke') + mysql_result($SQL_Result, $n, 'me');
        echo '	<TD ALIGN="right"><P CLASS="hell">' . $IstEx . '</P></TD>';
        echo '</TR>';
    }
    echo '</TABLE>';
    echo '<br><center><font size=2 color=#29D202>(Angreifbar aufgrund der Punkte 1/' . $ATTOVERALL . ')</font>';
}
     }
     echo '</TD></TR>';
 }
 $SQL3 = 'select id from `gn4attflotten` where lfd=' . $lfd . ' group by id;';
 $SQL3_Result = tic_mysql_query($SQL3) or die(tic_mysql_error(__FILE__, __LINE__));
 $SQL3_Num = mysql_num_rows($SQL3_Result);
 for ($i3 = 0; $i3 < $SQL3_Num; $i3++) {
     $upts = GetUserPts(mysql_result($SQL3_Result, $i3, "id"));
     $SumPts = $SumPts + $upts;
 }
 if ($SumPts >= $maxpts && $maxpts != 0) {
     echo '<TR><TD colspan=3 bgcolor="#' . $ATTSTATUSHTML[1] . '"><center><b>';
 } else {
     echo '<TR><TD colspan=3 bgcolor="#DDDDDD"><center>';
 }
 echo 'SumPkt:' . ZahlZuText(intval($SumPts / 1000)) . 'K max.' . ZahlZuText(intval($maxpts / 1000)) . 'K';
 echo '</table>';
 echo '</TD>';
 // Info
 echo '<TD bgcolor="#DDDDDD" width=30><center>';
 if ($allowedittext == true) {
     echo '<form name="changeinfo" method="post" action="./main.php">';
     echo '<INPUT TYPE="hidden" NAME="lfd" VALUE="' . mysql_result($SQL_Result, $i, "lfd") . '">';
     echo '<INPUT TYPE="hidden" NAME="id" VALUE="' . $Benutzer['id'] . '">';
     echo '<center><textarea NAME="info" cols=15 rows=' . $rowanzahl . '>' . mysql_result($SQL_Result, $i, "info") . '</textarea><br>';
     echo '<INPUT TYPE="hidden" NAME="fkt" VALUE="changeinfo">';
     echo '<INPUT TYPE="hidden" NAME="action" VALUE="attplaneradmin">';
     echo '<INPUT TYPE="hidden" NAME="modul"  VALUE="attplanerlist">';
     echo '<input type="submit" name="ADD" value="Speichern">';
     echo '</form>';
 } else {
$SQL_Row = mysql_fetch_row($SQL_Result);
echo '<tr><td align="left" class="fieldnormaldark">Anzahl Angriffsfl&uuml;ge:</td><td class="fieldnormallight" align="right">' . ZahlZuText($SQL_Row[0]) . '</td></tr>';
$SQL_Result = tic_mysql_query('SELECT COUNT(*) FROM `gn4flottenbewegungen` where modus>2 and ticid="' . $Benutzer['ticid'] . '" or modus=0 and ticid="' . $Benutzer['ticid'] . '"', $SQL_DBConn);
$SQL_Row = mysql_fetch_row($SQL_Result);
echo '<tr><td align="left" class="fieldnormaldark">Anzahl R&uuml;ckfl&uuml;ge:</td><td class="fieldnormallight" align="right">' . ZahlZuText($SQL_Row[0]) . '</td></tr>';
$SQL_Result = tic_mysql_query('SELECT COUNT(*) FROM `gn4accounts`', $SQL_DBConn);
$SQL_Row = mysql_fetch_row($SQL_Result);
echo '<tr><td align="left" class="fieldnormaldark">Alle T.I.C. Accounts</td><td class="fieldnormallight" align="right">' . ZahlZuText($SQL_Row[0]) . '</td></tr>';
echo '<tr><td align="left" class="fieldnormaldark" colspan="2"><b>Accounts pro Allianz:</b></td></tr>';
$SQL_Result = tic_mysql_query('SELECT id, tag, name FROM `gn4allianzen` where ticid="' . $Benutzer['ticid'] . '" ORDER BY id', $SQL_DBConn);
for ($n = 0; $n < mysql_num_rows($SQL_Result); $n++) {
    $SQL_Result2 = tic_mysql_query('SELECT COUNT(*) FROM `gn4accounts` WHERE allianz="' . mysql_result($SQL_Result, $n, 'id') . '" and ticid="' . $Benutzer['ticid'] . '"', $SQL_DBConn);
    $SQL_Row = mysql_fetch_row($SQL_Result2);
    echo '<tr><td align="left" class="fieldnormaldark">[' . mysql_result($SQL_Result, $n, 'tag') . '] ' . mysql_result($SQL_Result, $n, 'name') . '</td><td class="fieldnormallight" align="right">' . $SQL_Row[0] . '</td></tr>';
}
echo '<tr><td class="fieldnormaldark" colspan="2"><b>Forenstatistik</b></td></tr>';
$SQL_Result = tic_mysql_query('SELECT COUNT(*) FROM `gn4forum` WHERE belongsto="0" and ticid="' . $Benutzer['ticid'] . '"', $SQL_DBConn);
$SQL_Row = mysql_fetch_row($SQL_Result);
echo '<tr><td align="left" class="fieldnormaldark">Themen:</td><td class="fieldnormallight" align="right">' . ZahlZuText($SQL_Row[0]) . '</td></tr>';
$SQL_Result = tic_mysql_query('SELECT COUNT(*) FROM `gn4forum` WHERE NOT belongsto="0" and ticid="' . $Benutzer['ticid'] . '"', $SQL_DBConn);
$SQL_Row = mysql_fetch_row($SQL_Result);
echo '<tr><td align="left" class="fieldnormaldark">Antworten:</td><td class="fieldnormallight" align="right">' . ZahlZuText($SQL_Row[0]) . '</td></tr>';
echo '<tr><td align="left" class="fieldnormaldark" colspan="2"><b>Scan Datenbank</b></td></tr>';
//$SQL_Result = tic_mysql_query('SELECT COUNT(*) FROM `gn4scans` where ticid="'.$Benutzer['ticid'].'"', $SQL_DBConn);
$SQL_Result = tic_mysql_query('SELECT COUNT(*) FROM `gn4scans`', $SQL_DBConn);
$SQL_Row = mysql_fetch_row($SQL_Result);
echo '<tr><td align="left" class="fieldnormaldark">Anzahl Scans:</td><td class="fieldnormallight" align="right">' . ZahlZuText($SQL_Row[0]) . '</td></tr>';
echo '<tr><td align="left" class="fieldnormaldark">Letzte Scans&auml;uberung:</td><td class="fieldnormallight">' . $lastscanclean . '</td></tr>';
?>
</table>
Beispiel #8
0
     $SQL_Row2 = mysql_fetch_row($SQL_Result2);
     $forum_user['posts'] = $SQL_Row2[0];
     $SQL_Result2 = tic_mysql_query('SELECT tag, name FROM `gn4allianzen` WHERE  id="' . $forum_user['allianz'] . '";', $SQL_DBConn) or $error_code = 4;
     $forum_user['tag'] = mysql_result($SQL_Result2, 0, 'tag');
     $forum_user['aliname'] = mysql_result($SQL_Result2, 0, 'name');
     $SQL_Result2 = tic_mysql_query('SELECT name FROM `gn4meta` WHERE id="' . $forum_user['ticid'] . '";', $SQL_DBConn) or $error_code = 4;
     $forum_user['meta'] = mysql_result($SQL_Result2, 0, 'name');
 }
 // echo '   <TR><td COLSPAN=3><font size="-1"><BR></td></font></TR>';
 echo '  <TR>';
 echo '      <td BGCOLOR=#' . $htmlstyle['dunkel'] . ' WIDTH=20% VALIGN="top" ROWSPAN=3><font size="-1">';
 echo '          <FONT SIZE=4><B>' . $forum_user['name'] . '</B></FONT><BR>';
 echo '          <FONT SIZE="-1">[' . $forum_user['tag'] . '] ' . $forum_user['aliname'] . '<BR>';
 echo '          ' . $forum_user['meta'] . '<BR>';
 echo '          Koords: ' . $forum_user['koords'] . '<BR>';
 echo '          Posts: ' . ZahlZuText($forum_user['posts']) . '<BR>';
 echo '          Rang: ' . $RangName[$forum_user['rang']] . '</FONT><BR>';
 if ($forum_user['umod'] != '') {
     echo '<FONT SIZE="-1" COLOR=#' . $htmlstyle['dunkel_blau'] . '><B><I>U-Mod aktiviert</I></B></FONT><BR>';
 }
 echo '      </td></font>';
 $forum_topic = mysql_result($SQL_Result, $n, 'topic');
 if ($forum_topic == '') {
     $forum_topic = '<BR>';
 }
 echo '      <td BGCOLOR=#' . $htmlstyle['dunkel'] . ' WIDTH=60%><font size="-1">' . $forum_topic . '</td></font>';
 echo '      <td BGCOLOR=#' . $htmlstyle['dunkel'] . ' WIDTH=20%><font size="-1">' . mysql_result($SQL_Result, $n, 'zeit') . '</td></font>';
 echo '  </TR>';
 echo '  <TR>';
 echo '      <td COLSPAN=2 BGCOLOR=#' . $htmlstyle['dunkel'] . '><font size="-1">';
 echo '          <A HREF="./main.php?modul=anzeigen&id=' . $forum_user['id'] . '">Profil anschauen</A>';
 function PrintOverView()
 {
     $vklost = $vmlost = $aklost = $amlost = 0;
     for ($i = 0; $i < 14; $i++) {
         $vklost += $this->kcost[$i] * $this->geslostshipsdeff[$i];
         $vmlost += $this->mcost[$i] * $this->geslostshipsdeff[$i];
         if ($i < 9) {
             $aklost += $this->kcost[$i] * $this->geslostshipsatt[$i];
             $amlost += $this->mcost[$i] * $this->geslostshipsatt[$i];
         }
     }
     echo "<table class=\"datatable\" cellspacing=\"1\" align=\"center\" style=\"padding:5px;\">";
     echo "<tr><td colspan=\"3\" class=\"datatablehead\">&Uuml;bersicht</td></tr>";
     echo "<tr class=\"fieldnormaldark\" style=\"font-weight:bold\"><td colspan=\"3\">Verlorene Schiffe/Gesch&uuml;tze</td></tr>";
     echo "<tr class=\"fieldnormaldark\" style=\"font-weight:bold\"><td>Typ</td><td>Verteidiger</td><td>Angreifer</td></tr>";
     $color = 0;
     for ($i = 0; $i < 14; $i++) {
         $color = !$color;
         echo "<tr class=\"fieldnormal" . ($color ? "light" : "dark") . "\"><td>" . $this->name[$i] . "</td><td>          " . $this->geslostshipsdeff[$i] . "</td>";
         if ($i < 9) {
             echo "<td>" . $this->geslostshipsatt[$i] . "</td>";
         }
         echo "</tr>";
     }
     echo "<tr class=\"fieldnormaldark\"><td colspan=\"3\" style=\"font-weight:bold\">Kosten f&uuml;r Neubau</td></tr>";
     echo "<tr class=\"fieldnormallight\"><td>Metall</td><td>" . ZahlZuText($vmlost) . "</td><td>" . ZahlZuText($amlost) . "</td></tr>";
     echo "<tr class=\"fieldnormallight\"><td>Kristall</td><td>" . ZahlZuText($vklost) . "</td><td>" . ZahlZuText($aklost) . "</td></tr>";
     echo "<tr class=\"fieldnormaldark\"><td colspan=\"3\" style=\"font-weight:bold\">Gestohlene Extraktoren</td></tr>";
     echo "<tr class=\"fieldnormallight\"><td>Metallextraktoren:</td><td> " . $this->gesstolenexenm . "</td></tr>";
     echo "<tr class=\"fieldnormallight\"><td>Kristallextraktoren:</td><td>   " . $this->gesstolenexenk . "</td></tr>";
     echo "</table>";
 }