function injsafe($value) { if (get_magic_quotes_gpc()) { return $value; } if (is_array($value)) { foreach ($value as $key => $null) { $value[$key] = injsafe($value[$key]); } } else { // return addcslashes($value, "\000\x00\n\r\\'\"\x1a"); return addslashes($value); } return $value; }
# T.I.C. | Tactical Information Center # # # # Allianzorganisationstool für Galaxy-Network # # von NataS alias Tobias Sarnowski # # von Pomel alias Achim Pomorin # # von Abrafax # # vom tic-entwickler.de Team # # und mit bytehoppers # # # ########################################################## */ // error_reporting(E_ALL); // zu testzwecken einschalten ob_start("ob_gzhandler"); include "sessionhelpers.inc.php"; $_GET = injsafe($_GET); $_POST = injsafe($_POST); foreach ($_GET as $key => $val) { ${$key} = $val; } // Session-Registrieren session_start(); if (!isset($_SESSION['is_auth']) || $_SESSION['is_auth'] != 1) { if ($userid = check_user($_POST['username'], $_POST['userpass'])) { $_SESSION['is_auth'] = 1; $_SESSION['userid'] = $userid; } else { $_SESSION['is_auth'] = 0; $_SESSION['userid'] = -1; die("Ihre Anmeldedaten waren nicht korrekt!"); } }
$planet_id = $data[$time - 604800]['planet' . ($y + 1)]; $sql_insert[$time] = $data[$time - 604800]; } else { $planet_id = 0; } } echo "<select style=\"font-size:8pt;\" name=\"nextnachtwache[" . $time . "][" . $y . "]\">"; foreach ($gala_member as $planet => $name) { if (strlen($name) > 13) { $name = substr($name, 0, 10) . "..."; } echo "<option value=\"" . $planet . "\"" . ($planet == $planet_id ? " selected=\"selected\"" : "") . ">" . ($planet != 0 ? $planet . ": " : "") . $name . "</option>"; } echo "</select>"; echo "</td>"; } $time += $NW_intervall; echo "</tr>"; } echo " <tr class=\"datatablefoot\"><td colspan=\"8\"><input type=\"submit\" value=\"Speichern\" /></td></tr>\n </table>\n </form></td></tr></table>"; foreach ($sql_insert as $time => $data) { $sqlquery1 = array(); $sqlquery2 = array(); for ($i = 1; $i <= 7; $i++) { $sqlquery1[] = "planet" . $i; $sqlquery2[] = $data['planet' + $i]; } tic_mysql_query("INSERT INTO gn4nachtwache (time, ticid, gala, " . implode(", ", $sqlquery1) . ") VALUES('" . injsafe($time) . "', '" . $Benutzer['ticid'] . "', '" . injsafe($selected_gala) . "', '" . implode("', '", $sqlquery2) . "')") or die(tic_mysql_error(__FILE__, __LINE__)); } ?> <!-- ENDE: inc_NWshow -->