function addGalaxieSekScans($galaxiemitglieder)
{
    global $Benutzer;
    global $SQL_DBConn;
    for ($i = 0; $i < sizeof($galaxiemitglieder); $i++) {
        echo $galaxiemitglieder[$i]["galaxie"] . ":" . $galaxiemitglieder[$i]["planet"] . " " . $galaxiemitglieder[$i]["name"] . " -> " . $galaxiemitglieder[$i]["punkte"] . "<br>\n";
        addgnuser($galaxiemitglieder[$i]["galaxie"], $galaxiemitglieder[$i]["planet"], $galaxiemitglieder[$i]["name"]);
        $delcommand = "DELETE FROM `gn4scans` WHERE rg='" . $galaxiemitglieder[$i]["galaxie"] . "' AND rp='" . $galaxiemitglieder[$i]["planet"] . "' AND type='0';";
        $SQL_Result = tic_mysql_query($delcommand, $SQL_DBConn) or die(mysql_errno() . " - " . mysql_error());
        $addcommand = "INSERT INTO `gn4scans` (type, zeit, g, p, rg, rp, gen, pts, s, d, me, ke, a)\n\t\tVALUES ('0', '" . date("H:i d.m.Y") . "', '" . $Benutzer['galaxie'] . "', '" . $Benutzer['planet'] . "', '" . $galaxiemitglieder[$i]["galaxie"] . "', '" . $galaxiemitglieder[$i]["planet"] . "', '99', '" . $galaxiemitglieder[$i]["punkte"] . "', '" . $galaxiemitglieder[$i]["flotte"] . "', '" . $galaxiemitglieder[$i]["geschuetze"] . "', '" . $galaxiemitglieder[$i]["mextraktoren"] . "', '" . $galaxiemitglieder[$i]["kextraktoren"] . "', '" . $galaxiemitglieder[$i]["asteroiden"] . "');";
        $SQL_Result = tic_mysql_query($addcommand, $SQL_DBConn) or die(mysql_errno() . " - " . mysql_error());
    }
}
示例#2
0
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>';
            }
        }
    }
}
示例#3
0
function icq_auslesen()
{
    global $RangName;
    global $Benutzer;
    $icq_lnk_about = "http://www.icq.com/people/about_me.php?uin=";
    $icq_lnk_online = "http://web.icq.com/whitepages/online?icq=";
    $bild = 5;
    $breite = 18;
    $hoehe = 18;
    $qry = "SELECT gn4accounts.name AS name, " . "messangerID AS icq, " . "gn4allianzen.name AS allianz, " . "galaxie, " . "planet, " . "rang " . "FROM gn4accounts JOIN gn4allianzen ON gn4accounts.allianz = gn4allianzen.id " . "WHERE gn4accounts.ticid = '{$Benutzer['ticid']}' AND messangerID != '' " . "ORDER BY gn4accounts.allianz,galaxie,planet;";
    $result = tic_mysql_query($qry);
    $row = mysql_fetch_array($result);
    for ($i = 0; $row != FALSE; $row = mysql_fetch_array($result), $i++) {
        $row['icq'] = preg_replace("/[^0-9]+/", '', $row['icq']);
        if (!preg_match('/^[0-9]{6,9}$/', $row['icq'])) {
            $i--;
            continue;
        }
        if ($i % 2 == 0) {
            echo "<tr class=\"fieldnormallight\">\n";
        } else {
            echo "<tr class=\"fieldnormaldark\">\n";
        }
        echo '<td align="middle">';
        echo "<img src=\"{$icq_lnk_online}{$row['icq']}&img={$bild}\" width=\"{$breite}\" height=\"{$hoehe}\" border=\"0\"></a>";
        echo "</td>\n";
        echo '<td align="middle">';
        echo "<a href=\"{$icq_lnk_about}{$row['icq']}\" target=\"_blank\" class=\"nlink\">" . number_format($row['icq'], 0, ',', '-');
        echo "</td>\n";
        echo "<td align=\"middle\">{$row['allianz']}</td>\n";
        echo "<td align=\"middle\">{$row['galaxie']}</td>\n";
        echo "<td align=\"middle\">{$row['planet']}</td>\n";
        echo "<td align=\"middle\">{$row['name']}</td>\n";
        echo "<td align=\"middle\">{$RangName[$row['rang']]}</td>\n";
        echo "</tr>\n";
    }
}
示例#4
0
 echo '</TR>';
 //            }
 ?>
 <TR>
   <TD><font size="-1"><BR>
     </font></TD>
 </TR>
 <TR>
   <TD>
     <P CLASS="dunkel"><B><font size="-1">Rückflug:</font></B></P>
   </TD>
 </TR>
 <TR>
   <TD> <font size="-1">
     <?php 
 $SQL_Result = tic_mysql_query('SELECT * FROM `gn4flottenbewegungen` WHERE ( modus="0" or modus="3" or modus="4" ) AND angreifer_galaxie="' . $zeig_galaxie . '" AND angreifer_planet="' . $zeig_planet . '" ORDER BY eta;', $SQL_DBConn) or $error_code = 4;
 $SQL_Num = mysql_num_rows($SQL_Result);
 if ($SQL_Num == 0) {
     echo '<P CLASS="hell">Es befindet sich keine Flotte auf dem Rückflug.</P>';
 } else {
     echo '<CENTER><P CLASS="hell">';
     echo '  Folgende Flotten sind auf dem Rückflug:';
     echo '  <TABLE>';
     for ($n = 0; $n < $SQL_Num; $n++) {
         echo '<TR><TD><font size="-1">Name: <B>' . mysql_result($SQL_Result, $n, 'verteidiger_galaxie') . ':' . mysql_result($SQL_Result, $n, 'verteidiger_planet') . '</B></font></TD>';
         $disptime = mysql_result($SQL_Result, $n, 'eta') * $Ticks['lange'] - $tick_abzug;
         $disptime = getime4display($disptime);
         echo '<TD><font size="-1">ETA: <B>' . $disptime . '</B></font></TD>';
         echo '<TD><font size="-1">Flotte: ' . $flottennr[mysql_result($SQL_Result, $n, 'flottennr')] . '</font></TD>';
         echo '<TD>';
         //                            if ($Benutzer['rang'] > $Rang_GC || !($Benutzer['rang'] <= $Rang_GC && $Benutzer['galaxie'] != $zeig_galaxie)) echo '<A HREF="./main.php?modul=anzeigen&id='.$id.'&action=flotteloeschen&flottenid='.mysql_result($SQL_Result, $n, 'id').'">Löschen</A>, <A HREF="./main.php?modul=flotteaendern&id='.$id.'&flottenid='.mysql_result($SQL_Result, $n, 'id').'">Ändern</A></TD>';
<?php

$SQL_Result = tic_mysql_query('SELECT * FROM `gn4accounts` WHERE id="' . $_SESSION['userid'] . '" and ticid="' . $Benutzer['ticid'] . '";', $SQL_DBConn);
$rang = mysql_result($SQL_Result, 0, 'rang');
if ($rang == $Rang_STechniker) {
    $SQL_Result = tic_mysql_query('UPDATE `gn4vars` SET value="' . $_POST['newmeta'] . '" WHERE name="ticeb" and ticid="' . $Benutzer['ticid'] . '";', $SQL_DBConn);
    $SQL_Result = tic_mysql_query('UPDATE `gn4vars` SET value="' . $_POST['newsystemnachricht'] . '" WHERE name="systemnachricht" and ticid="' . $Benutzer['ticid'] . '";', $SQL_DBConn);
    $SQL_Result = tic_mysql_query('UPDATE `gn4vars` SET value="' . $_POST['newbotpw'] . '" WHERE name="botpw" and ticid="' . $Benutzer['ticid'] . '";', $SQL_DBConn);
    $systemnachricht = $_POST['newsystemnachricht'];
}
示例#6
0
    $action = $_POST['action'];
} else {
    if (isset($_GET['action']) && $_GET['action'] != "") {
        $action = $_GET['action'];
    } else {
        $action = "";
    }
}
// Incoming makieren
if (isset($_GET['need_planet']) && isset($_GET['need_galaxie'])) {
    LogAction($_GET['need_galaxie'] . ":" . $_GET['need_planet'] . " -> Unsafe", LOG_SETSAFE);
    tic_mysql_query("UPDATE `gn4flottenbewegungen` SET save='0' WHERE verteidiger_galaxie='" . $_GET['need_galaxie'] . "' AND verteidiger_planet='" . $_GET['need_planet'] . "'") or die(tic_mysql_error(__FILE__, __LINE__));
}
if (isset($_GET['needno_planet']) && isset($_GET['needno_galaxie'])) {
    LogAction($_GET['needno_galaxie'] . ":" . $_GET['needno_planet'] . " -> Safe", LOG_SETSAFE);
    tic_mysql_query("UPDATE `gn4flottenbewegungen` SET save='1' WHERE verteidiger_galaxie='" . $_GET['needno_galaxie'] . "' AND verteidiger_planet='" . $_GET['needno_planet'] . "'") or die(tic_mysql_error(__FILE__, __LINE__));
}
if (isset($irc_log)) {
    if ($irc_log) {
        include 'irc-scans.inc.php';
    }
}
// Funktion einbinden
if ($action != "") {
    include "./function." . $action . ".php";
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="de" lang="de" dir="ltr">
	<head>
		<title>TIC - <?php 
示例#7
0
      <td>ICQ</td>
      <td>Zusatzinfos</td>
      <?php 
if ($Benutzer['rang'] > $Rang_GC) {
    // vize admiral oder mehr
    echo '<td>Aktion</td>';
}
?>
    </tr>
        <?php 
$sql = 'SELECT name, galaxie, planet, handy, ';
$sql .= 'messangerID, infotext, id ';
$sql .= 'FROM `gn4accounts`';
$sql .= 'where ticid="' . $Benutzer['ticid'] . '" ORDER BY galaxie, planet';
$color = 0;
$SQL_Result = tic_mysql_query($sql, $SQL_DBConn);
for ($i = 0; $i < mysql_num_rows($SQL_Result); $i++) {
    $color = !$color;
    $name = mysql_result($SQL_Result, $i, 'name');
    $gala = mysql_result($SQL_Result, $i, 'galaxie');
    $gala = $gala . ':' . mysql_result($SQL_Result, $i, 'planet');
    $telno = mysql_result($SQL_Result, $i, 'handy');
    $icq = mysql_result($SQL_Result, $i, 'messangerID');
    $infotext = mysql_result($SQL_Result, $i, 'infotext');
    $teleid = mysql_result($SQL_Result, $i, 'id');
    // used later, to delete the record
    echo '<tr align="left" class="fieldnormal' . ($color ? 'light' : 'dark') . '">';
    echo '<td align="center">' . $gala . '</td>';
    echo '<td>' . $name . '</td>';
    echo '<td>' . $telno . '</td>';
    echo '<td>' . $icq . '</td>';
示例#8
0
         $start = 0;
     }
     $SQL_Result = tic_mysql_query("SELECT name, accid, rang, allianz, zeit, aktion, ip FROM gn4log WHERE" . $SQL_where . " AND type='" . $_GET['type'] . "' ORDER BY id DESC LIMIT " . $start . "," . LOG_PER_PAGE) or die(tic_mysql_error(__FILE__, __LINE__));
     echo "<div style=\"font-size:9pt;font-weight:bold;\">T.I.C Log - " . $typetostring[$_GET['type']] . "</div><table class=\"datatable\" align=\"center\"><tr class=\"datatablehead\"><th>Zeit</th><th>Meta</th><th>Benutzer</th><th>Meldung</th><th>IP</th></tr>";
     $i = 0;
     while ($row = mysql_fetch_assoc($SQL_Result)) {
         echo "<tr class=\"fieldnormal" . $style[$i % 2] . "\">\n\t\t\t\t\t\t<td>" . $row['zeit'] . "</td>\n\t\t\t\t\t\t<td>" . (isset($AllianzInfo[$row['allianz']]['metaname']) ? $AllianzInfo[$row['allianz']]['metaname'] : "") . "</td><td>" . (isset($RangImage[$row['rang']]) ? "<img src=\"" . $RangImage[$row['rang']] . "\" alt=\"" . $RangName[$row['rang']] . "\" width=\"20\" height=\"20\" />" : $row['rang']) . "<a href=\"?modul=anzeigen&amp;id=" . $row['accid'] . "\">" . (isset($AllianzTag[$row['allianz']]) ? "[" . $AllianzTag[$row['allianz']] . "]" : "") . $row['name'] . "</a></td><td>" . $row['aktion'] . "</td><td>" . $row['ip'] . "</td></tr>";
         $i++;
     }
     if ($i == 0) {
         echo "<tr class=\"fieldnormallight\"><td colspan=\"4\">Es sind keine Logeinträge fr diesen Typ vorhanden.</td></tr>";
     }
     echo "<tr><td colspan=\"4\">Seite: " . constructPageIndex("?modul=log&amp;type=" . $_GET['type'], $start, $count[0], LOG_PER_PAGE) . "</td></tr>\n";
     echo "</table>[<a href=\"?modul=log\">Zurück</a>]";
 } else {
     $SQL_Result = tic_mysql_query("SELECT type, COUNT(type) FROM gn4log WHERE" . $SQL_where . " GROUP BY type") or die(tic_mysql_error(__FILE__, __LINE__));
     while ($row = mysql_fetch_row($SQL_Result)) {
         $count[$row[0]] = $row[1];
     }
     $i = 0;
     echo "<table cellpadding=\"5\" align=\"center\"><tr><th colspan=\"3\">T.I.C Log</th></tr>";
     foreach ($typetostring as $type => $string) {
         if ($i == 0) {
             echo "<tr>";
         }
         $i++;
         echo "<td><a href=\"?modul=log&amp;type=" . $type . "\"><img src=\"bilder/icons/folder.gif\" alt=\"\" border=\"0\" /> " . $string . "(" . (isset($count[$type]) ? $count[$type] : "0") . ")</a></td>";
         if ($i == 3) {
             echo "</tr>";
             $i = 0;
         }
        }
        if (!isset($_POST['txtAccGalaxie'])) {
            $_POST['txtAccGalaxie'] = '';
        }
        if (!isset($_POST['txtAccPlanet'])) {
            $_POST['txtAccPlanet'] = '';
        }
        if (!isset($_POST['txtAccPasswort'])) {
            $_POST['txtAccPasswort'] = '';
        }
        if (!isset($_POST['lstAllianz'])) {
            $_POST['lstAllianz'] = '';
        }
        if (!isset($_POST['lstRang'])) {
            $_POST['lstRang'] = 0;
        }
        if ($_POST['txtAccName'] == '' || $_POST['txtAccGalaxie'] == '' || $_POST['txtAccPlanet'] == '' || $_POST['txtAccPasswort'] == '' || $_POST['lstAllianz'] == '') {
            $error_code = 6;
        } else {
            if ($Benutzer['rang'] <= $_POST['lstRang']) {
                $error_code = 5;
            } else {
                addgnuser($_POST['txtAccGalaxie'], $_POST['txtAccPlanet'], $_POST['txtAccName']);
                $SQL_Result = tic_mysql_query('INSERT INTO `gn4accounts` (ticid, name, passwort, galaxie, planet, rang, allianz) VALUES ("' . $AllianzInfo[$_POST['lstAllianz']]['meta'] . '", "' . $_POST['txtAccName'] . '", "' . md5($_POST['txtAccPasswort']) . '","' . $_POST['txtAccGalaxie'] . '", "' . $_POST['txtAccPlanet'] . '", "' . $_POST['lstRang'] . '", "' . $_POST['lstAllianz'] . '")', $SQL_DBConn) or $error_code = 7;
                if ($error_code == 0) {
                    LogAction("Account erstellt: Name=" . $_POST['txtAccName'] . "; Koordinaten=" . $_POST['txtAccGalaxie'] . ":" . $_POST['txtAccPlanet'] . "; Rang=" . $_POST['lstRang'] . "; Allianz=" . $_POST['lstAllianz'] . ";");
                }
            }
        }
    }
}
示例#10
0
function mili_edit()
{
    global $SQL_DBConn;
    $qry = 'sf0j, sf0b, sf0f, sf0z, sf0kr, sf0sa, sf0t, sf0ko, sf0ka, sf0su,';
    $qry = $qry . 'sf1j, sf1b, sf1f, sf1z, sf1kr, sf1sa, sf1t, sf1ko, sf1ka, sf1su,';
    $qry = $qry . 'sf2j, sf2b, sf2f, sf2z, sf2kr, sf2sa, sf2t, sf2ko, sf2ka, sf2su';
    $SQL_Result2 = tic_mysql_query('SELECT ' . $qry . ' FROM `gn4scans` WHERE rg="' . $_POST['galakoord'] . '" AND rp="' . $_POST['planetkoord'] . '" AND type="2";', $SQL_DBConn) or die(mysql_errno() . " - " . mysql_error());
    $SQL_Num = mysql_num_rows($SQL_Result2);
    if ($SQL_Num == 0) {
        // keine scans da
        $scan_rn = gnuser($_POST['galakoord'], $_POST['planetkoord']);
        // J�er
        $scan_sf0j = 0;
        $scan_sf1j = 0;
        $scan_sf2j = 0;
        // bomber
        $scan_sf0b = 0;
        $scan_sf1b = 0;
        $scan_sf2b = 0;
        // fregs
        $scan_sf0f = 0;
        $scan_sf1f = 0;
        $scan_sf2f = 0;
        // zerries
        $scan_sf0z = 0;
        $scan_sf1z = 0;
        $scan_sf2z = 0;
        // kreuzer
        $scan_sf0kr = 0;
        $scan_sf1kr = 0;
        $scan_sf2kr = 0;
        // schlachter
        $scan_sf0sa = 0;
        $scan_sf1sa = 0;
        $scan_sf2sa = 0;
        // tr�er
        $scan_sf0t = 0;
        $scan_sf1t = 0;
        $scan_sf2t = 0;
        // Kaper
        $scan_sf0ka = 0;
        $scan_sf1ka = 0;
        $scan_sf2ka = 0;
        // schutzies
        $scan_sf0su = 0;
        $scan_sf1su = 0;
        $scan_sf2su = 0;
    } else {
        // scan ist in db vorhanden
        $scan_rn = gnuser($_POST['galakoord'], $_POST['planetkoord']);
        // J�er
        $scan_sf0j = mysql_result($SQL_Result2, 0, 'sf0j');
        $scan_sf1j = mysql_result($SQL_Result2, 0, 'sf1j');
        $scan_sf2j = mysql_result($SQL_Result2, 0, 'sf2j');
        // bomber
        $scan_sf0b = mysql_result($SQL_Result2, 0, 'sf0b');
        $scan_sf1b = mysql_result($SQL_Result2, 0, 'sf1b');
        $scan_sf2b = mysql_result($SQL_Result2, 0, 'sf2b');
        // fregs
        $scan_sf0f = mysql_result($SQL_Result2, 0, 'sf0f');
        $scan_sf1f = mysql_result($SQL_Result2, 0, 'sf1f');
        $scan_sf2f = mysql_result($SQL_Result2, 0, 'sf2f');
        // zerries
        $scan_sf0z = mysql_result($SQL_Result2, 0, 'sf0z');
        $scan_sf1z = mysql_result($SQL_Result2, 0, 'sf1z');
        $scan_sf2z = mysql_result($SQL_Result2, 0, 'sf2z');
        // kreuzer
        $scan_sf0kr = mysql_result($SQL_Result2, 0, 'sf0kr');
        $scan_sf1kr = mysql_result($SQL_Result2, 0, 'sf1kr');
        $scan_sf2kr = mysql_result($SQL_Result2, 0, 'sf2kr');
        // schlachter
        $scan_sf0sa = mysql_result($SQL_Result2, 0, 'sf0sa');
        $scan_sf1sa = mysql_result($SQL_Result2, 0, 'sf1sa');
        $scan_sf2sa = mysql_result($SQL_Result2, 0, 'sf2sa');
        // tr�er
        $scan_sf0t = mysql_result($SQL_Result2, 0, 'sf0t');
        $scan_sf1t = mysql_result($SQL_Result2, 0, 'sf1t');
        $scan_sf2t = mysql_result($SQL_Result2, 0, 'sf2t');
        // Kaper
        $scan_sf0ka = mysql_result($SQL_Result2, 0, 'sf0ka');
        $scan_sf1ka = mysql_result($SQL_Result2, 0, 'sf1ka');
        $scan_sf2ka = mysql_result($SQL_Result2, 0, 'sf2ka');
        // schutzies
        $scan_sf0su = mysql_result($SQL_Result2, 0, 'sf0su');
        $scan_sf1su = mysql_result($SQL_Result2, 0, 'sf1su');
        $scan_sf2su = mysql_result($SQL_Result2, 0, 'sf2su');
    }
    ?>
<form name="form1" method="post" action="./main.php?modul=scans">
  <input type="hidden" name="action" value="scan_edit" />
  <input type="hidden" name="scanart" value="mili">
  <input type="hidden" name="galakoord" value="<?php 
    echo $_POST['galakoord'];
    ?>
" />
  <input type="hidden" name="planetkoord" value="<?php 
    echo $_POST['planetkoord'];
    ?>
" />
  <input type="hidden" name="txtScanGalaxie" value="<?php 
    echo $_POST['galakoord'];
    ?>
" />
  <input type="hidden" name="txtScanPlanet" value="<?php 
    echo $_POST['planetkoord'];
    ?>
" />
  <table align="center">
    <tr>
      <td colspan="4" class="datatablehead">Manuelle Milit&auml;rbearbeitung (<?php 
    echo $_POST['galakoord'] . ':' . $_POST['planetkoord'];
    ?>
)</td>
    </tr>
    <tr class="fieldnormaldark" align="left">
      <td>Name:</td><td colspan="3"><input type="text" name="trn" value="<?php 
    echo $scan_rn;
    ?>
" /></td>
    </tr>
    <tr class="fieldnormallight" style="font-weight:bold;">
      <td></td>
      <td>Orbit</td>
      <td>Flotte 1</td>
      <td>Flotte 2</td>
    </tr>
    <tr class="fieldnormaldark" align="left">
      <td>J&auml;ger &quot;Leo&quot;:</td>
      <td><input type="text" name="tsf0j" size="8" value="<?php 
    echo $scan_sf0j;
    ?>
" /></td>
      <td><input type="text" name="tsf1j" size="8" value="<?php 
    echo $scan_sf1j;
    ?>
" /></td>
      <td><input type="text" name="tsf2j" size="8" value="<?php 
    echo $scan_sf2j;
    ?>
" /></td>
    </tr>
    <tr class="fieldnormallight" align="left">
      <td>Bomber &quot;Aquilae&quot;:</td>
      <td><input type="text" name="tsf0b" size="8" value="<?php 
    echo $scan_sf0b;
    ?>
" /></td>
      <td><input type="text" name="tsf1b" size="8" value="<?php 
    echo $scan_sf1b;
    ?>
" /></td>
      <td><input type="text" name="tsf2b" size="8" value="<?php 
    echo $scan_sf2b;
    ?>
" /></td>
    </tr>
    <tr class="fieldnormaldark" align="left">
      <td>Fregatten &quot;Fornax&quot;:</td>
      <td><input type="text" name="tsf0f" size="8" value="<?php 
    echo $scan_sf0f;
    ?>
" /></td>
      <td><input type="text" name="tsf1f" size="8" value="<?php 
    echo $scan_sf1f;
    ?>
" /></td>
      <td><input type="text" name="tsf2f" size="8" value="<?php 
    echo $scan_sf2f;
    ?>
" /></td>
    </tr>
    <tr class="fieldnormallight" align="left">
      <td>Zerst&ouml;rer &quot;Draco&quot;:</td>
      <td><input type="text" name="tsf0z" size="8" value="<?php 
    echo $scan_sf0z;
    ?>
" /></td>
      <td><input type="text" name="tsf1z" size="8" value="<?php 
    echo $scan_sf1z;
    ?>
" /></td>
      <td><input type="text" name="tsf2z" size="8" value="<?php 
    echo $scan_sf2z;
    ?>
" /></td>
    </tr>
    <tr class="fieldnormaldark" align="left">
      <td>Kreuzer &quot;Goron&quot;:</td>
      <td><input type="text" name="tsf0kr" size="8" value="<?php 
    echo $scan_sf0kr;
    ?>
" /></td>
      <td><input type="text" name="tsf1kr" size="8" value="<?php 
    echo $scan_sf1kr;
    ?>
" /></td>
      <td><input type="text" name="tsf2kr" size="8" value="<?php 
    echo $scan_sf2kr;
    ?>
" /></td>
    </tr>
    <tr class="fieldnormallight" align="left">
      <td>Schlachtschiffe &quot;Pentalin&quot;:</td>
      <td><input type="text" name="tsf0sa" size="8" value="<?php 
    echo $scan_sf0sa;
    ?>
" /></td>
      <td><input type="text" name="tsf1sa" size="8" value="<?php 
    echo $scan_sf1sa;
    ?>
" /></td>
      <td><input type="text" name="tsf2sa" size="8" value="<?php 
    echo $scan_sf2sa;
    ?>
" /></td>
    </tr>
    <tr class="fieldnormaldark" align="left">
      <td>Tr&auml;ger &quot;Zenit&quot;:</td>
      <td><input type="text" name="tsf0t" size="8" value="<?php 
    echo $scan_sf0t;
    ?>
" /></td>
      <td><input type="text" name="tsf1t" size="8" value="<?php 
    echo $scan_sf1t;
    ?>
" /></td>
      <td><input type="text" name="tsf2t" size="8" value="<?php 
    echo $scan_sf2t;
    ?>
" /></td>
    </tr>
    <tr class="fieldnormallight" align="left">
      <td>Kaperschiffe &quot;Kleptor&quot;&quot;:</td>
      <td><input type="text" name="tsf0ka" size="8" value="<?php 
    echo $scan_sf0ka;
    ?>
" /> </td>
      <td><input type="text" name="tsf1ka" size="8" value="<?php 
    echo $scan_sf1ka;
    ?>
" /></td>
      <td><input type="text" name="tsf2ka" size="8" value="<?php 
    echo $scan_sf2ka;
    ?>
" /></td>
    </tr>
    <tr class="fieldnormaldark" align="left">
      <td>Schutzschiffe &quot;Cancri&quot;:</td>
      <td><input type="text" name="tsf0su" size="8" value="<?php 
    echo $scan_sf0su;
    ?>
" /></td>
      <td><input type="text" name="tsf1su" size="8" value="<?php 
    echo $scan_sf1su;
    ?>
" /></td>
      <td><input type="text" name="tsf2su" size="8" value="<?php 
    echo $scan_sf2su;
    ?>
" /></td>
    </tr>
    <tr class="datatablefoot">
      <td colspan="4"><input type="submit" name="Abschicken" value="&Auml;nderungen speichern" /></td>
    </tr>
  </table>
</form>
<?php 
}
示例#11
0
                $eintrag_eta = (int) (($ankunft - $akt_time) / $tsec);
                $SQL_Result2 = tic_mysql_query('UPDATE `gn4flottenbewegungen` SET eta="' . $eintrag_eta . '" WHERE id="' . $eintrag_id . '" ;', $SQL_DBConn) or die(mysql_errno() . " - " . mysql_error());
                //echo "Hin: UPDATE `gn4flottenbewegungen` SET eta='$eintrag_eta' WHERE id='$eintrag_id';<br />";
            } elseif ($flugzeit_ende > $akt_time) {
                $eintrag_flugzeit = (int) (($flugzeit_ende - $akt_time) / $tsec);
                $SQL_Result2 = tic_mysql_query('UPDATE `gn4flottenbewegungen` SET flugzeit="' . $eintrag_flugzeit . '", eta=0 WHERE id="' . $eintrag_id . '" ;', $SQL_DBConn) or die(mysql_errno() . " - " . mysql_error());
                //echo "Ang/Vert: UPDATE `gn4flottenbewegungen` SET flugzeit='$eintrag_flugzeit', eta=0 WHERE id='.$eintrag_id.';'<br />";
            } elseif ($ruckflug_ende <= $akt_time) {
                $SQL_Result2 = tic_mysql_query('DELETE FROM `gn4flottenbewegungen` WHERE id=' . $eintrag_id, $SQL_DBConn) or die(mysql_errno() . " - " . mysql_error());
                //echo "ENDE: DELETE FROM `gn4flottenbewegungen` WHERE id=$eintrag_id<br />";
            } elseif ($ruckflug_ende > $akt_time) {
                if ($eintrag_modus == 1) {
                    $eintrag_eta = (int) (($ruckflug_ende - $akt_time) / $tsec);
                    $SQL_Result2 = tic_mysql_query('UPDATE `gn4flottenbewegungen` SET modus="3", flugzeit="0", eta="' . $eintrag_eta . '" WHERE id="' . $eintrag_id . '";', $SQL_DBConn) or die(mysql_errno() . " - " . mysql_error());
                    //echo "Rück: UPDATE `gn4flottenbewegungen` SET modus='0', flugzeit='0', eta='$eintrag_eta' WHERE id='$eintrag_id';'<br />";
                }
                if ($eintrag_modus == 2) {
                    $eintrag_eta = (int) (($ruckflug_ende - $akt_time) / $tsec);
                    $SQL_Result2 = tic_mysql_query('UPDATE `gn4flottenbewegungen` SET modus="4", flugzeit="0", eta="' . $eintrag_eta . '" WHERE id="' . $eintrag_id . '";', $SQL_DBConn) or die(mysql_errno() . " - " . mysql_error());
                    //echo "Rück: UPDATE `gn4flottenbewegungen` SET modus='0', flugzeit='0', eta='$eintrag_eta' WHERE id='$eintrag_id';'<br />";
                }
            }
        }
    }
    //echo 'UPDATE `gn4vars` SET value="'.$minute_naechste.'" WHERE name="lasttick_minute";<br>';
    //	echo 'UPDATE `gn4vars` SET value="'.date('H').':'.date('i').':'.date('s').'" WHERE name="lasttick";';
    //	$SQL_Result = tic_mysql_query('UPDATE `gn4vars` SET value="'.$minute_naechste.'" WHERE name="lasttick_minute";', $SQL_DBConn) or $error_code = 7;
    $time = $null_ticks * $tsec;
    $SQL_Result = tic_mysql_query('UPDATE `gn4vars` SET value="' . date("H:i:s", $time) . '" WHERE name="lasttick";', $SQL_DBConn) or die(mysql_errno() . " - " . mysql_error());
    include "cleanscans.php";
}
        }
    }
}
if ($md_orderby == "sektor") {
    $orderstring = "galaxie " . $md_orderdir . ", planet " . $md_orderdir;
} elseif ($md_orderby == "rang") {
    $orderstring = "rang " . $md_orderdir . ", galaxie , planet";
} elseif ($md_orderby == "name") {
    $orderstring = "name " . $md_orderdir;
}
switch ($mode) {
    case 1:
    case 2:
    case 3:
        $SQL_Query = "\n\t\t\t\tSELECT gn4accounts.* FROM gn4accounts\n\t\t\t\tLEFT JOIN gn4allianzen ON gn4accounts.allianz = gn4allianzen.id\n\t\t\t\tWHERE gn4allianzen.ticid='" . $_SESSION['metanr'] . "' ORDER BY " . $orderstring . ";";
        break;
    case 4:
        $SQL_Query = "SELECT * FROM gn4accounts WHERE allianz=" . $allianz . " ORDER BY " . $orderstring . ";";
        break;
    case 5:
        $SQL_Query = "SELECT * FROM gn4accounts WHERE galaxie=" . $Benutzer['galaxie'] . " ORDER BY " . $orderstring . ";";
        break;
}
$SQL_Result_user = tic_mysql_query($SQL_Query, $SQL_DBConn);
// or error("Error while bilding 'taktik' (step 1).<br>".$SQL_Query, ERROR_SQL, false);
$SQL_Num_user = mysql_num_rows($SQL_Result_user);
$time_online = time() - 300;
include './inc_taktikbildschirm' . $Benutzer['tcausw'] . '.php';
?>
<!-- ENDE: inc_taktikbildschirm -->
<?php

if ($Benutzer['rang'] >= RANG_TECHNIKER) {
    if (isset($_POST['newmeta']) && $Benutzer['rang'] == RANG_STECHNIKER) {
        tic_mysql_query('insert INTO `gn4meta` (name,duell,wars,naps,bnds,sysmsg) VALUES ("' . $_POST['meta'] . '", "' . $_POST['duell'] . '", "' . $_POST['wars'] . '", "' . $_POST['naps'] . '","' . $_POST['bnds'] . '" , "' . $_POST['sysmsg'] . '");', __FILE__, __LINE__);
        $newmetaid = mysql_insert_id();
        //		echo $_POST['meta'].' angelegt!';
    }
    if (isset($_POST['metaspeichern'])) {
        if ($Benutzer['rang'] == RANG_TECHNIKER) {
            $_POST['metaid'] == $Benutzer['ticid'];
        }
        tic_mysql_query('Update `gn4meta` set name="' . $_POST['meta'] . '", duell="' . $_POST['duell'] . '", naps="' . $_POST['naps'] . '", bnds="' . $_POST['bnds'] . '", wars="' . $_POST['wars'] . '", sysmsg="' . $_POST['sysmsg'] . '" where id="' . $_POST['metaid'] . '" ;', __FILE__, __LINE__);
        //	echo '�derung gespeichert';
    }
    if (isset($_POST['metadelet']) && $Benutzer['rang'] == RANG_STECHNIKER) {
        $SQL_Result = tic_mysql_query('Select id FROM `gn4allianzen` where ticid="' . $_POST['metaid'] . '";', __FILE__, __LINE__);
        if (mysql_num_rows($SQL_Result) != '0') {
            LogAction($Benutzer['name'] . ' hat Versucht den Meta mit der id ' . $_POST['metaid'] . ' zul&ouml;schen ohne die Allianzen vorher zu l&ouml;schen !');
            $metaerror = "Es m&uuml;ssen erst die Allianzen gel&ouml;scht werden bevor das Meta gel&ouml;scht werdne kann!";
        } else {
            tic_mysql_query('DELETE FROM `gn4meta` WHERE id="' . $_POST['metaid'] . '"', __FILE__, __LINE__);
            unset($_POST['metaid']);
        }
    }
}
<?php

$handy = htmlentities($_POST['handy']);
$messangerID = htmlentities($_POST['icq']);
$ticscreen = htmlentities($_POST['ticscreen']);
$infotext = htmlentities($_POST['infotext']);
$authnick = htmlentities($_POST['authnick']);
$incfreigabe = htmlentities($_POST['check']);
$lstZeitformat = htmlentities($_POST['lstZeitformat']);
if ($incfreigabe == '') {
    $incfreigabe = 0;
} else {
    $incfreigabe = 1;
}
$sql = "Update gn4accounts set handy='{$handy}', infotext='{$infotext}', authnick='{$authnick}', tcausw='{$ticscreen}', zeitformat='{$lstZeitformat}', messangerID='{$messangerID}', help='{$incfreigabe}' where id=" . $Benutzer["id"] . ";";
$SQL_Result = tic_mysql_query($sql);
$Benutzer["zeitformat"] = $lstZeitformat;
$Benutzer["help"] = $incfreigabe;
$Benutzer['tcausw'] = $ticscreen;
//echo $sql;
示例#15
0
<?php

$SQL_Result = tic_mysql_query('SELECT * FROM `gn4vars` ORDER BY id;');
for ($n = 0; $n < mysql_num_rows($SQL_Result); $n++) {
    $var = mysql_result($SQL_Result, $n, 'name');
    ${$var} = mysql_result($SQL_Result, $n, 'value');
}
$SQL_Result = tic_mysql_query("SELECT * FROM gn4meta WHERE id = '" . $Benutzer['ticid'] . "'") or die(tic_mysql_error(__FILE__, __LINE__));
$MetaInfo = mysql_fetch_assoc($SQL_Result);
// Allianzen
$SQL_Result = tic_mysql_query("SELECT a.*, b.name as metaname FROM `gn4allianzen` as a LEFT JOIN gn4meta as b ON(a.ticid = b.id) ORDER BY tag;", $SQL_DBConn) or $error_code = 4;
$SQL_Num = mysql_num_rows($SQL_Result);
if ($SQL_Num == 0) {
    $error_code = 12;
} else {
    for ($n = 0; $n < $SQL_Num; $n++) {
        $AllianzName[mysql_result($SQL_Result, $n, 'id')] = mysql_result($SQL_Result, $n, 'name');
        $AllianzTag[mysql_result($SQL_Result, $n, 'id')] = mysql_result($SQL_Result, $n, 'tag');
        $AllianzInfo[mysql_result($SQL_Result, $n, 'id')]['name'] = mysql_result($SQL_Result, $n, 'name');
        $AllianzInfo[mysql_result($SQL_Result, $n, 'id')]['tag'] = mysql_result($SQL_Result, $n, 'tag');
        $AllianzInfo[mysql_result($SQL_Result, $n, 'id')]['meta'] = mysql_result($SQL_Result, $n, 'ticid');
        $AllianzInfo[mysql_result($SQL_Result, $n, 'id')]['metaname'] = mysql_result($SQL_Result, $n, 'metaname');
        $AllianzInfo[mysql_result($SQL_Result, $n, 'id')]['info_bnds'] = mysql_result($SQL_Result, $n, 'info_bnds');
        $AllianzInfo[mysql_result($SQL_Result, $n, 'id')]['info_naps'] = mysql_result($SQL_Result, $n, 'info_naps');
        $AllianzInfo[mysql_result($SQL_Result, $n, 'id')]['info_inoffizielle_naps'] = mysql_result($SQL_Result, $n, 'info_inoffizielle_naps');
        $AllianzInfo[mysql_result($SQL_Result, $n, 'id')]['info_kriege'] = mysql_result($SQL_Result, $n, 'info_kriege');
        $AllianzInfo[mysql_result($SQL_Result, $n, 'id')]['code'] = mysql_result($SQL_Result, $n, 'code');
        $AllianzInfo[mysql_result($SQL_Result, $n, 'id')]['blind'] = mysql_result($SQL_Result, $n, 'blind');
    }
}
$tick_abzug = intval(date('i') / $Ticks['lange']);
            $_POST['txtTitel'] = '';
        }
        if (!isset($_POST['txtText'])) {
            $_POST['txtText'] = '';
        }
        if (!isset($_POST['txtHC'])) {
            $_POST['txtHC'] = '';
        }
        if ($_POST['txtTitel'] == '' || $_POST['txtText'] == '') {
            $error_code = 6;
        } else {
            $_POST['txtText'] = str_replace("\n", '<BR>', $_POST['txtText']);
            $ticid = $Benutzer['ticid'];
            if ($_POST['txtHC'] == 'HC') {
                $ticid = "H" . $Benutzer['ticid'];
            } else {
                if ($_POST['txtHC'] == 'SHC') {
                    $ticid = "SHC";
                } else {
                    if ($_POST['txtHC'] == 'alle') {
                        $ticid = "alle";
                    }
                }
            }
            $SQL_Result = tic_mysql_query('INSERT INTO `gn4nachrichten` (ticid, name, zeit, titel, text) VALUES ("' . $ticid . '", "' . $Benutzer['galaxie'] . ':' . $Benutzer['planet'] . ' ' . $Benutzer['name'] . ' (' . $RangName[$Benutzer['rang']] . ' @ [' . $AllianzTag[$Benutzer['allianz']] . '])", "' . date("H") . ':' . date("i") . ' ' . date("d") . '.' . date("m") . '.' . date("Y") . '", "' . $_POST['txtTitel'] . '", "' . $_POST['txtText'] . '")', $SQL_DBConn) or $error_code = 7;
            if ($error_code == 0) {
                LogAction("Nachricht geschrieben: Titel='" . $_POST['txtTitel'] . "';");
            }
        }
    }
}
<?php

if ($_POST['action'] == 'settaktiksort') {
    $SQL_command = 'UPDATE `gn4accounts` SET taktiksort="' . $_POST['taktik_sort'] . '" WHERE id="' . $Benutzer['id'] . '";';
    $SQL_Result = tic_mysql_query($SQL_command, $SQL_DBConn) or $error_code = 7;
    $Benutzer['taktiksort'] = $_POST['taktik_sort'];
}
示例#18
0
function GetAllianzName($id)
{
    global $SQL_DBConn;
    $SQL = 'SELECT * FROM `gn4accounts` WHERE id ="' . $id . '";';
    $SQL_Result = tic_mysql_query($SQL) or die(tic_mysql_error(__FILE__, __LINE__));
    $SQL_Num = mysql_num_rows($SQL_Result);
    if ($SQL_Num == 0) {
        return '';
    } else {
        $SQL = 'SELECT * FROM `gn4allianzen` WHERE ticid =' . mysql_result($SQL_Result, 0, "ticid") . ';';
        $SQL_Result = tic_mysql_query($SQL) or die(tic_mysql_error(__FILE__, __LINE__));
        $SQL_Num = mysql_num_rows($SQL_Result);
        if ($SQL_Num == 0) {
            return '';
        } else {
            return mysql_result($SQL_Result, 0, "tag");
        }
    }
}
示例#19
0
    if (!isset($_GET['txtChPlanet'])) {
        $_GET['txtChPlanet'] = '';
    }
    if (!isset($_GET['lstChAllianz'])) {
        $_GET['lstChAllianz'] = '';
    }
    if ($Benutzer['rang'] == $Rang_GC) {
        $_GET['txtChGalaxie'] = $Benutzer['galaxie'];
    }
    if ($Benutzer['rang'] != $Rang_Techniker) {
        $_GET['lstChAllianz'] = $Benutzer['allianz'];
    }
    if ($_GET['id'] != '' && $_GET['lstChRang'] != '' && $_GET['txtChGalaxie'] != '' && $_GET['txtChPlanet'] != '' && $_GET['lstChAllianz'] != '') {
        $SQL_Result = tic_mysql_query('SELECT * FROM `gn4accounts` WHERE id="' . $_GET['id'] . '";', $SQL_DBConn) or $error_code = 4;
        if (mysql_num_rows($SQL_Result) == 1) {
            $tmp_rang = mysql_result($SQL_Result, 0, 'rang');
            if ($tmp_rang >= $Benutzer['rang'] || $_GET['lstChRang'] >= $Benutzer['rang']) {
                $error_code = 5;
            } else {
                $SQL_Result = tic_mysql_query('UPDATE `gn4accounts` SET rang="' . $_GET['lstChRang'] . '", galaxie="' . $_GET['txtChGalaxie'] . '", planet="' . $_GET['txtChPlanet'] . '", allianz="' . $_GET['lstChAllianz'] . '" WHERE id="' . $_GET['id'] . '" and ticid="' . $Benutzer['ticid'] . '";', $SQL_DBConn) or $error_code = 7;
                if ($error_code == 0) {
                    LogAction("Accountdaten geändert: ID=" . $_GET['id'] . "; Koordinaten=" . $_GET['txtChGalaxie'] . ":" . $_GET['txtChPlanet'] . "; Rang=" . $_GET['lstChRang'] . "; Allianz=" . $_GET['lstChAllianz'] . ";");
                }
            }
        } else {
            $error_code = 8;
        }
    } else {
        $error_code = 6;
    }
}
    if (!isset($_POST['txtExen_m'])) {
        $_POST['txtExen_m'] = 0;
    }
    if (!isset($_POST['txtExen_k'])) {
        $_POST['txtExen_k'] = 0;
    }
    $_POST['txtSVs'] = TextZuZahl($_POST['txtSVs']);
    $_POST['txtSBs'] = TextZuZahl($_POST['txtSBs']);
    $_POST['txtPunkte'] = TextZuZahl($_POST['txtPunkte']);
    $_POST['txtSchiffe'] = TextZuZahl($_POST['txtSchiffe']);
    $_POST['txtDefensiv'] = TextZuZahl($_POST['txtDefensiv']);
    $_POST['txtExen_m'] = TextZuZahl($_POST['txtExen_m']);
    $_POST['txtExen_k'] = TextZuZahl($_POST['txtExen_k']);
    if ($_POST['lstScanTyp'] != '') {
        $SQL_Result = tic_mysql_query('UPDATE `gn4accounts` SET svs="' . $_POST['txtSVs'] . '", sbs="' . $_POST['txtSBs'] . '", scantyp="' . $_POST['lstScanTyp'] . '" WHERE id="' . $Benutzer['id'] . '";', $SQL_DBConn) or die(mysql_errno() . " - " . mysql_error());
        $SQL_Result = tic_mysql_query('delete FROM `gn4scans` where rg="' . $Benutzer['galaxie'] . '" and rp="' . $Benutzer['planet'] . '" and type="0";', $SQL_DBConn);
        $SQL_Result = tic_mysql_query('INSERT INTO `gn4scans` (type, zeit, g, p, rg, rp, gen, pts, s, d, me, ke) VALUES ("0", "' . date("H") . ':' . date("i") . ' ' . date("d") . '.' . date("m") . '.' . date("Y") . '", "' . $Benutzer['galaxie'] . '", "' . $Benutzer['planet'] . '", "' . $Benutzer['galaxie'] . '", "' . $Benutzer['planet'] . '", "100", "' . $_POST['txtPunkte'] . '", "' . $_POST['txtSchiffe'] . '", "' . $_POST['txtDefensiv'] . '", "' . $_POST['txtExen_m'] . '", "' . $_POST['txtExen_k'] . '")');
        if ($error_code == 0) {
            $Benutzer['scantyp'] = $_POST['lstScanTyp'];
            $Benutzer['svs'] = $_POST['txtSVs'];
            $Benutzer['sbs'] = $_POST['txtSBs'];
            $Benutzer['punkte'] = $_POST['txtPunkte'];
            $Benutzer['schiffe'] = $_POST['txtSchiffe'];
            $Benutzer['defensiv'] = $_POST['txtDefensiv'];
            $Benutzer['exen_m'] = $_POST['txtExen_m'];
            $Benutzer['exen_k'] = $_POST['txtExen_k'];
        }
    } else {
        $error_code = 6;
    }
}
if ($Benutzer['rang'] >= RANG_TECHNIKER) {
    if (isset($metaerror)) {
        echo "<div class=\"error\">" . $metaerror . "</div>";
    }
    echo '<form action="./main.php?modul=management_meta" method="post">
<input type="hidden" name="action" value="management_meta" />
<table cellpadding="3">

	<tr class="datatablehead" align="center"><td colspan="4">Meta-Managment</td></tr>
<tr>
	<td class="fieldnormallight" colspan="4">Meta: <select onchange="this.form.submit();" name="selectMeta">';
    $query = '';
    if ($Benutzer['rang'] == RANG_TECHNIKER) {
        $query = 'where id="' . $Benutzer['ticid'] . '"';
    }
    $SQL_Result = tic_mysql_query('select id,name,sysmsg,duell,wars,naps,bnds FROM `gn4meta` ' . $query . ' order by id asc;', __FILE__, __LINE__);
    $SQL_Num = mysql_num_rows($SQL_Result);
    if (isset($newmetaid)) {
        $selectMeta = $newmetaid;
    } else {
        if (isset($_POST['selectMeta'])) {
            $selectMeta = $_POST['selectMeta'];
        }
    }
    if (!isset($selectMeta) || $selectMeta < 1) {
        $selectMeta = $Benutzer['ticid'];
    }
    for ($x = 0; $x < $SQL_Num; $x++) {
        $meta = mysql_result($SQL_Result, $x, 'name');
        $selected = '';
        if (mysql_result($SQL_Result, $x, 'id') == $selectMeta) {
      <td><font size="-1"><b><font color="#000000">Fregs</font></b></font></td>
      <td><font size="-1"><b><font color="#000000">Zerries</font></b></font></td>
      <td><font size="-1"><b><font color="#000000">Kreuzer</font></b></font></td>
      <td><font size="-1"><b><font color="#000000">Schlachter</font></b></font></td>
      <td><font size="-1"><b><font color="#000000">Tr&auml;ger</font></b></font></td>
      <td><font size="-1"><b><font color="#000000">Kapers</font></b></font></td>
      <td><font size="-1"><b><font color="#000000">Schutzies</font></b></font></td>
    </tr>
    <?php 
$SQL_Result2 = tic_mysql_query('SELECT id, name, galaxie, planet FROM `gn4accounts` WHERE allianz="' . $Benutzer['allianz'] . '" and ticid="' . $Benutzer['ticid'] . '" order by galaxie, planet', $SQL_DBConn);
for ($i = 0; $i < mysql_num_rows($SQL_Result2); $i++) {
    $_POST['gala'] = mysql_result($SQL_Result2, $i, 'galaxie');
    $_POST['planet'] = mysql_result($SQL_Result2, $i, 'planet');
    $name = mysql_result($SQL_Result2, $i, 'name');
    $SQL_Result = tic_mysql_query('SELECT sfj ,sfb ,sff ,sfz ,sfkr ,sfsa ,sft ,sfka ,sfsu FROM `gn4scans` WHERE rg="' . $_POST['gala'] . '" and rp="' . $_POST['planet'] . '" and ticid="' . $Benutzer['ticid'] . '" and type=1', $SQL_DBConn);
    $SQL_Result3 = tic_mysql_query('SELECT glo,glr,gmr,gsr,ga FROM `gn4scans` WHERE rg="' . $_POST['gala'] . '" and rp="' . $_POST['planet'] . '" and ticid="' . $Benutzer['ticid'] . '" and type=3', $SQL_DBConn);
    if (mysql_num_rows($SQL_Result) == 0) {
        $ja = " ";
        $bo = " ";
        $fr = " ";
        $ze = " ";
        $kr = " ";
        $sl = " ";
        $tr = " ";
        $ka = " ";
        $ca = " ";
    } else {
        $ja = mysql_result($SQL_Result, 0, 'sfj');
        $bo = mysql_result($SQL_Result, 0, 'sfb');
        $fr = mysql_result($SQL_Result, 0, 'sff');
        $ze = mysql_result($SQL_Result, 0, 'sfz');
 }
 echo '</Table><br>';
 // Neuer Attplaner anlegen
 if ($Benutzer['rang'] >= $Rang_VizeAdmiral) {
     echo '<center> <table border="" cellspacing="0" cellpadding="0"><TR>';
     echo '<TD bgcolor="#6490BB">';
     echo '<form name="newattplaner" method="post" action="./main.php">';
     echo '<INPUT TYPE="hidden" NAME="action" VALUE="attplaneradmin">';
     echo '<INPUT TYPE="hidden" NAME="fkt"    VALUE="newattplaner">';
     echo '<INPUT TYPE="hidden" NAME="modul"  VALUE="attplaneradmin">';
     $SQL2 = "select * from gn4accounts where Attplaner = 0 and ticid = " . $Meta . " AND allianz=" . $Ally . " order by galaxie,planet;";
     if ($Benutzer['rang'] > $Rang_Techniker) {
         $SQL2 = "select * from gn4accounts order by galaxie, planet;";
     }
     //
     $SQL2_Result = tic_mysql_query($SQL2) or die(tic_mysql_error(__FILE__, __LINE__));
     $SQL2_Num = mysql_num_rows($SQL2_Result);
     echo '<b>Neuer ATT-Planer bestimmen: <select name="id">';
     for ($i2 = 0; $i2 < $SQL2_Num; $i2++) {
         echo '<option value="' . mysql_result($SQL2_Result, $i2, 'id') . '">';
         echo mysql_result($SQL2_Result, $i2, 'galaxie') . ':' . mysql_result($SQL2_Result, $i2, 'planet') . ' ' . mysql_result($SQL2_Result, $i2, 'name') . ' - ' . $RangName[mysql_result($SQL2_Result, $i2, 'rang')];
         echo '</option>';
     }
     echo '</select>';
     echo '</TD></TR>';
     echo '<TR><TD bgcolor="#6490BB"><center>';
     echo '<b>Berechtigung: <select name="attplaner">';
     for ($i2 = 1; $i2 < 4; $i2++) {
         echo '<option value="' . $i2 . '">' . $PlanerTyps[$i2] . '</option>';
     }
     echo '</select>';
                    $SQL_Result = tic_mysql_query($sql, $SQL_DBConn);
                    if (mysql_num_rows($SQL_Result) == 1) {
                        $sins = mysql_result($SQL_Result, 0, 'vorgemerkt');
                        $s = $_POST['playergala'] . ':' . $_POST['playerplanet'] . '@' . $_POST['fleet'];
                        $sins = RemoveKoordsFrom($s, $sins);
                        $sql2 = 'UPDATE `gn4incplanets` SET vorgemerkt="' . $sins . '" WHERE gala="' . $_POST['gala'] . '" and planet="' . $_POST['plant'] . '"';
                        $SQL_Result2 = tic_mysql_query($sql2, $SQL_DBConn);
                    }
                } else {
                    if (strcmp($_POST['subaction'], "removeplanet") == 0) {
                        // remove a specila planet from list
                        $sql = 'SELECT bestaetigt, vorgemerkt FROM `gn4incplanets` WHERE gala="' . $_POST['gala'] . '" and planet="' . $_POST['plant'] . '"';
                        $SQL_Result = tic_mysql_query($sql, $SQL_DBConn);
                        if (mysql_num_rows($SQL_Result) == 1) {
                            $sins = mysql_result($SQL_Result, 0, 'vorgemerkt');
                            $s = $_POST['playergala'] . ':' . $_POST['playerplanet'] . '@' . $_POST['fleet'];
                            $sins = RemoveKoordsFrom($s, $sins);
                            $sql2 = 'DELETE FROM `gn4incplanets` WHERE gala="' . $_POST['gala'] . '" and planet="' . $_POST['plant'] . '"';
                            $SQL_Result2 = tic_mysql_query($sql2, $SQL_DBConn);
                        }
                    } else {
                        if (strcmp($_POST['subaction'], "close") == 0) {
                            $sql2 = 'UPDATE `gn4incplanets` SET frei="' . $offen . '" WHERE gala="' . $_POST['gala'] . '" and planet="' . $_POST['plant'] . '"';
                            $SQL_Result2 = tic_mysql_query($sql2, $SQL_DBConn);
                        }
                    }
                }
            }
        }
    }
}
            $flugzeit = mysql_result($SQL_Result, 0, 'flugzeit_ende');
            $ruckflug = mysql_result($SQL_Result, 0, 'ruckflug_ende');
            $tmp_modus = mysql_result($SQL_Result, 0, 'modus');
            $_ruckflug = $_flugzeit + eta($flugzeit, $ruckflug) * $tsec;
        }
        if ($_POST['optModus'] == 0 or $_POST['optModus'] == 3 or $_POST['optModus'] == 4) {
            switch ($tmp_modus) {
                case 1:
                case 2:
                    echo "<br>mode changed from " . $tmp_modus;
                    $tmp_modus += 2;
                    echo "to mode " . $tmp_modus . "<br>";
                    break;
                case 3:
                case 4:
                    // do nothing
                    break;
                case 0:
                default:
                    // besser als nix ...
                    $tmp_modus = 3;
                    break;
            }
            $SQL_Result = tic_mysql_query('UPDATE `gn4flottenbewegungen` SET modus="' . $tmp_modus . '", flugzeit="0", save="", ankunft="0", flugzeit_ende="0", eta="' . $_POST['lst_ETA0'] . '", ruckflug_ende="' . $_ruckflug . '", flottennr="' . $_POST['lst_Flotte'] . '" WHERE id="' . $_POST['flottenid'] . '";', $SQL_DBConn) or $error_code = 7;
        } else {
            $SQL_Result = tic_mysql_query('UPDATE `gn4flottenbewegungen` SET modus="' . $_POST['optModus'] . '", eta="' . $_POST['lst_ETA'] . '", ankunft="' . $_ankunft . '", flugzeit_ende="' . $_flugzeit . '", ruckflug_ende="' . $_ruckflug . '", flugzeit="' . $_POST['lst_Flugzeit'] . '", flottennr="' . $_POST['lst_Flotte'] . '" WHERE id="' . $_POST['flottenid'] . '";', $SQL_DBConn) or $error_code = 7;
        }
    } else {
        $error_code = 6;
    }
}
示例#26
0
    $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');
        $gala = mysql_result($SQL_Result12, $m, 'galaxie');
        $planet = mysql_result($SQL_Result12, $m, 'planet');
        $text = $text . "\n" . $name . " ( " . $gala . ":" . $planet . " ) hat " . $svs . " svs";
    }
}
if ($modus == 4) {
    $text = $irc_text['fett'] . $irc_text['farbe'] . $irc_farbe['weiss'] . ',' . $irc_farbe['dunkelblau'] . '[T.I.C - Statistik]' . $irc_text['farbe'] . $irc_text['fett'] . "\n" . $text;
    $text = $text . "\n" . $irc_text['farbe'] . $irc_farbe['weiss'] . ',' . $irc_farbe['dunkelgrau'] . '[ http://' . $HTTP_HOST . '     coding by http://www.tic-entwickler.de]' . $irc_text['farbe'];
} elseif ($modus == 5) {
    $text = $irc_text['fett'] . $irc_text['farbe'] . $irc_farbe['weiss'] . ',' . $irc_farbe['dunkelblau'] . '[T.I.C - Scanner]' . $irc_text['farbe'] . $irc_text['fett'] . $text;
    $text = $text . "\n" . $irc_text['farbe'] . $irc_farbe['weiss'] . ',' . $irc_farbe['dunkelgrau'] . '[ http://' . $HTTP_HOST . '     coding by http://www.tic-entwickler.de]' . $irc_text['farbe'];
示例#27
0
<?php

if (!isset($_POST['id'])) {
    $_POST['id'] = 0;
}
if ($_POST['id'] == 0) {
    $error_code = 8;
}
$SQL_Result = tic_mysql_query('SELECT * FROM `gn4accounts` WHERE id="' . $_POST['id'] . '";', $SQL_DBConn) or $error_code = 4;
if (mysql_num_rows($SQL_Result) != 1) {
    $error_code = 8;
}
if ($error_code != 0) {
    include './inc_errors.php';
} else {
    $zeig_name = mysql_result($SQL_Result, 0, 'name');
    $zeig_galaxie = mysql_result($SQL_Result, 0, 'galaxie');
    $zeig_planet = mysql_result($SQL_Result, 0, 'planet');
    ?>
<CENTER>

<TABLE>
  <TR>
    <TD BGCOLOR=#333333><font color="#FFFFFF" size="-1"><B>Flottenbewegung hinzufügen</B></font></TD>
  </TR>
  <TR>
    <TD>
      <P CLASS="hell">
      <FORM ACTION="./main.php" METHOD="POST" NAME="frmFlottenbewegung">
        <font size="-1">
        <INPUT TYPE="hidden" NAME="modul" VALUE="anzeigen">
示例#28
0
}
?>
				</td></tr>
			</table>
		</td></tr>
<?php 
foreach ($AllianzName as $AllianzNummer => $AllianzNummerName) {
    ?>
		<tr><td>
			<table width="100%">
				<tr><td colspan="2" class="datatablehead" align="center"><?php 
    echo "[" . $AllianzTag[$AllianzNummer] . "] " . $AllianzNummerName;
    ?>
</td></tr>
				<tr class="fieldnormaldark" style="font-weight:bold;" align="center"><td>Rang</td><td>Name</td></tr>
<?php 
    $color = false;
    $SQL_Result = tic_mysql_query('SELECT * FROM `gn4accounts` WHERE allianz="' . $AllianzNummer . '" AND (rang >= "' . $Rang_GC . '" AND rang <= "' . $Rang_Admiral . '") ORDER BY rang DESC, galaxie, planet;', $SQL_DBConn) or $error_code = 4;
    while ($userdata = mysql_fetch_assoc($SQL_Result)) {
        $color = !$color;
        echo '	<tr class="fieldnormal' . ($color ? 'light' : 'dark') . '"><td>' . $RangName[$userdata['rang']] . '</td><td>' . $userdata['galaxie'] . ':' . $userdata['planet'] . ' ' . $userdata['name'] . '</td></tr>';
    }
    ?>
			</table>
		</td></tr>
<?php 
}
?>
	</table>
</center>
示例#29
0
}
if (isset($_GET['txtScanPlanet'])) {
    $coords_planet = $_GET['txtScanPlanet'];
} else {
    if (isset($_POST['txtScanPlanet'])) {
        $coords_planet = $_POST['txtScanPlanet'];
    } else {
        if (isset($_POST['planetkoord'])) {
            $coords_planet = $_POST['planetkoord'];
        } else {
            $coords_planet = null;
        }
    }
}
if (!isset($coords_gala) || !isset($coords_planet)) {
    $SQL_Result = tic_mysql_query('SELECT * FROM `gn4scans` WHERE rg<>"0" AND rp<>"0" and ticid="' . $Benutzer['ticid'] . '" ORDER BY rg, rp LIMIT 1;', $SQL_DBConn);
    if (mysql_num_rows($SQL_Result) != 0) {
        $coords_gala = mysql_result($SQL_Result, 0, 'rg');
        $coords_planet = mysql_result($SQL_Result, 0, 'rp');
    } else {
        $coords_gala = $Benutzer['galaxie'];
        $coords_planet = $Benutzer['planet'];
    }
}
?>
  <table width="90%" align="center">
    <tr><td>
        <table border="0" cellspacing="2" cellpadding="0" width="100%">
          <tr>
            <td valign="top" width="33%" rowspan="2">
              <table border="0" cellspacing="2" cellpadding="0" align="center" width="100%">
示例#30
0
    $von_planet = $_GET['ursprungssek'];
} else {
    // verteidiger=ziel
    $setcmd = $setcmd . 'VALUES ( "' . $d_typ . '",';
    $setcmd = $setcmd . '"' . $_GET['zielgala'] . '",';
    $setcmd = $setcmd . '"' . $_GET['zielsek'] . '",';
    $setcmd = $setcmd . '"' . $_GET['ursprungsgala'] . '",';
    $setcmd = $setcmd . '"' . $_GET['ursprungssek'] . '",';
    $setcmd = $setcmd . '"' . $_GET['eta'] . '",';
    $setcmd = $setcmd . '"' . $_GET['flugzeit'] . '",';
    $setcmd = $setcmd . '"' . $_GET['flotte'] . '")';
    $von_gala = $_GET['zielgala'];
    $von_planet = $_GET['zielsek'];
}
if ($d_typ == 1 and $reverse == 1) {
    $SQL_Resultx = tic_mysql_query('select deff from `gn4accounts` where galaxie="' . $_GET['zielgala'] . '" and planet="' . $_GET['zielsek'] . '" and ticid="' . $ticid . '"', $SQL_DBConn) or die('<br>mist - n db-error!!!');
    if (mysql_num_rows($SQL_Resultx) > 0) {
        $SQL_Resultx = tic_mysql_query('select id from `gn4flottenbewegungen` where verteidiger_galaxie="' . $_GET['zielgala'] . '" and verteidiger_planet="' . $_GET['zielsek'] . '" and flottennr="' . $_GET['flotte'] . '" and ticid="' . $ticid . '"', $SQL_DBConn) or die('<br>mist - n db-error!!!');
        if (mysql_num_rows($SQL_Resultx) == 0) {
            /* noch kein eintrag drin */
            tic_mysql_query('UPDATE `gn4accounts` SET deff=1 WHERE where galaxie="' . $_GET['zielgala'] . '" and planet="' . $_GET['zielsek'] . '" and ticid="' . $ticid . '"', $SQL_DBConn) or die('<br>mist - n db-error!!!');
        }
    }
}
$delcommand = 'DELETE FROM `gn4flottenbewegungen` WHERE flottennr=' . $_GET['flotte'] . ' and angreifer_galaxie=' . $von_gala . ' and angreifer_planet=' . $von_planet . ' and ticid=' . $ticid . '';
$SQL_Result = tic_mysql_query($delcommand, $SQL_DBConn) or die('<br>mist - n db-error!!!');
$SQL_Result = tic_mysql_query($setcmd, $SQL_DBConn) or die("dberror d<br>");
?>
</body>
</html>