<?php

/*
// +--------------------------------------------------------------------------+
// | Project:    NVTracker - NetVision BitTorrent Tracker                     |
// +--------------------------------------------------------------------------+
// | NVTracker is free software; you can redistribute it and/or modify        |
// | it under the terms of the GNU General Public License as published by     |
// | the Free Software Foundation; either version 2 of the License, or        |
// | (at your option) any later version.                                      |
// |                                                                          |
// | NVTracker is distributed in the hope that it will be useful,             |
// | but WITHOUT ANY WARRANTY; without even the implied warranty of           |
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the            |
// | GNU General Public License for more details.                             |
// |                                                                          |
// | You should have received a copy of the GNU General Public License        |
// | along with NVTracker; if not, write to the Free Software Foundation,     |
// | Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA            |
// +--------------------------------------------------------------------------+
// | Obige Zeilen dürfen nicht entfernt werden!    Do not remove above lines! |
// +--------------------------------------------------------------------------+
//
// erstellt von Cerberus - für e-Xtreme-Tracker -- 21.01.2008
*/

// hier je nach dem, was bei euch funzt
require_once($_SERVER["DOCUMENT_ROOT"] . "/include/bittorrent.php");
// require_once($_SERVER["DOCUMENT_ROOT"] . "include/bittorrent.php");

dbconn();
loggedinorreturn();

// UC_CODER -- wer den nicht hat, bitte anpassen
if (get_user_class() != UC_CODER) {
        stderr("Error", "Du bist es nicht wert, diese Seite zu betrachten. Geh nach Hause zu deiner Mama!!!");
        exit;
    }

stdhead("Tracker-ACP v1.0 - SQL");
begin_frame($GLOBALS["TRACKER-NAME"] . " - Tracker-SQL", FALSE, "900px");

$sql_querry = $_POST[sql];
if ($sql_querry != '')
{
  $result = mysql_query($sql_querry);
  if ($result)
  {
    print("Die Abfrage: <font color=\"blue\"><b>" . $sql_querry . "</b></font> wurde erfolgreich ausgef&uuml;hrt<br><br>\n");
  }
  else
  {
    print("Die Abfrage: <font color=\"red\"><b>" . $sql_querry . "</b></font> konnte nicht ausgef&uuml;hrt werden<br><br>\n");
  }
  print("<br><a href=\"" . $_SERVER[PHP_SELF] . "\" target=\_self\">Weiter</a>\n");
}
else
{
//tracker_sql.php
  print("<form action=\"" . $_SERVER[PHP_SELF] . "\" method=\"post\">\n");
  print(" <center>\n");
  print("  <font color=\"red\" size=\"6\"><b><u>!! ACHTUNG !!</u><br>Das eingetragene SQL wird ungepr&uuml;ft ausgef&uuml;hrt</b></font><br><br>\n");
  print("  <textarea name=\"sql\" cols=\"120\" rows=\"5\"></textarea>\n");
  print("  <br>\n");
  print("  <input type=\"submit\" value=\"absenden\" name=\"go\">\n");
  print(" </center>\n");
  print("</form>\n");
}

end_frame();
stdfoot();
?> 