예제 #1
0
if (!isset($ga)) {
    $ga = 0;
}
if (!isset($gr)) {
    $gr = 0;
}
if ($action == '') {
    header('Location: ./scan_help.html');
    die;
}
$SQL_Result = tic_mysql_query('SELECT id, name, passwort FROM `gn4accounts` WHERE galaxie="' . $g . '" and passwort="' . md5($pw) . '" AND planet="' . $p . '";', $SQL_DBConn);
if (mysql_num_rows($SQL_Result) != 1) {
    die("<html>\n<body>\nERROR 0 Spieler nicht gefunden\n</body>\n</html>");
}
$name = mysql_result($SQL_Result, 0, 'name');
CountScans(mysql_result($SQL_Result, 0, 'id'));
addgnuser($rg, $rp, $rn);
if ($action == 'ss') {
    $SQL_Result = tic_mysql_query('DELETE FROM `gn4scans` WHERE rg="' . $rg . '" AND rp="' . $rp . '" AND type="0";', $SQL_DBConn);
    $insert_names = 'pts, s, d, me, ke, a';
    $insert_values = '"' . $pts . '", "' . $s . '", "' . $d . '", "' . $me . '", "' . $ke . '", "' . $a . '"';
    $SQL_Result = tic_mysql_query('INSERT INTO `gn4scans` (type, zeit, g, p, rg, rp, gen, ' . $insert_names . ') VALUES ("0", "' . date("H") . ':' . date("i") . ' ' . date("d") . '.' . date("m") . '.' . date("Y") . '", "' . $g . '", "' . $p . '", "' . $rg . '", "' . $rp . '", "' . $gen . '", ' . $insert_values . ');', $SQL_DBConn) or die("<html>\n<body>\nERROR 2 Konnte Datensatz nicht schreiben\n</body>\n</html>");
}
if ($action == 'se') {
    $SQL_Result = tic_mysql_query('DELETE FROM `gn4scans` WHERE rg="' . $rg . '" AND rp="' . $rp . '" AND type="1";', $SQL_DBConn);
    $insert_names = 'sfj, sfb, sff, sfz, sfkr, sfsa, sft, sfko, sfka, sfsu';
    $insert_values = '"' . $sfj . '", "' . $sfb . '", "' . $sff . '", "' . $sfz . '", "' . $sfkr . '", "' . $sfsa . '", "' . $sft . '", "' . $sfko . '", "' . $sfka . '", "' . $sfsu . '"';
    $SQL_Result = tic_mysql_query('INSERT INTO `gn4scans` (type, zeit, g, p, rg, rp, gen, ' . $insert_names . ') VALUES ("1", "' . date("H") . ':' . date("i") . ' ' . date("d") . '.' . date("m") . '.' . date("Y") . '", "' . $g . '", "' . $p . '", "' . $rg . '", "' . $rp . '", "' . $gen . '", ' . $insert_values . ');', $SQL_DBConn) or die("<html>\n<body>\nERROR 2 Konnte Datensatz nicht schreiben\n</body>\n</html>");
}
if ($action == 'sm') {
    $SQL_Result = tic_mysql_query('DELETE FROM `gn4scans` WHERE rg="' . $rg . '" AND rp="' . $rp . '" AND type="2";', $SQL_DBConn);
예제 #2
0
         // Mittleres Raumgeschütz 0
         $scan_gmr = trim($daten[4]);
         $daten = parseLine($zeilen[6]);
         // Schweres Raumgeschütz 0
         $scan_gsr = trim($daten[4]);
         $daten = parseLine($zeilen[7]);
         // Abfangjäger 1000
         $scan_ga = trim($daten[3]);
         addgnuser($scan_rg, $scan_rp, $scan_rn);
         $SQL_Result = tic_mysql_query('DELETE FROM `gn4scans` WHERE rg="' . $scan_rg . '" and rp="' . $scan_rp . '" AND type="' . $scan_type . '";', $SQL_DBConn);
         $insert_names = 'glo, glr, gmr, gsr, ga';
         $insert_values = '"' . $scan_glo . '", "' . $scan_glr . '", "' . $scan_gmr . '", "' . $scan_gsr . '", "' . $scan_ga . '"';
         $SQL_Result = tic_mysql_query('INSERT INTO `gn4scans` (type, zeit, g, p, rg, rp, gen, ' . $insert_names . ') VALUES ("' . $scan_type . '", "' . date("H:i d.m.Y") . '", "' . $Benutzer['galaxie'] . '", "' . $Benutzer['planet'] . '", "' . $scan_rg . '", "' . $scan_rp . '", "' . $scan_gen . '", ' . $insert_values . ');', $SQL_DBConn) or die('ERROR 2 Konnte Datensatz nicht schreiben');
     }
     // 2
     CountScans($Benutzer['id']);
     $modul = 'scans';
     $txtScanGalaxie = $scan_rg;
     $txtScanPlanet = $scan_rp;
 } else {
     // 1
     $error_code = 6;
 }
 // 1
 // Abrafax:
 if (strlen($tmpGala) > 0) {
     // 1
     // Flottenbewegungen wurden gescannt,
     // Anzeige auf Taktikbildschirm umleiten
     $modul = 'taktikbildschirm';
 }