Verzeichnisstruktur phpBB-2.0.0


Veröffentlicht
03.04.2002

So funktioniert es


Auf das letzte Element klicken. Dies geht jeweils ein Schritt zurück

Auf das Icon klicken, dies öffnet das Verzeichnis. Nochmal klicken schließt das Verzeichnis.
Auf den Verzeichnisnamen klicken, dies zeigt nur das Verzeichnis mit Inhalt an

(Beispiel Datei-Icons)

Auf das Icon klicken um den Quellcode anzuzeigen

nuke-db.php

Zuletzt modifiziert: 09.10.2024, 12:51 - Dateigröße: 1.30 KiB


01  <?php
02   
03  //
04  // Security message:
05  //
06  // This script is potentially dangerous.
07  // Remove or comment the next line (die(".... ) to enable this script.
08  // Do NOT FORGET to either remove this script or disable it after you have used it.
09  //
10  die("Please read the first lines of this script for instructions on how to enable it");
11   
12  //
13  // Do not change anything below this line.
14  //
15   
16   
17  // Just a handy script to completely wipe out the contents of a 
18  // database.. Use with caution :)
19   
20   
21  if(!isset($submit))
22  {
23      ?>
24      <FORM ACTION="<?php echo $PHP_SELF?>" METHOD="post" >
25      <table>
26      <tr>
27          <td>DB host:</td>
28          <td><INPUT TYPE="text" name="dbhost" value="localhost"></td>
29      </tr><tr>
30          <td>DB name:</td>
31          <td><INPUT TYPE="text" name="dbname" value="phpBB"></td>
32      </tr><tr>
33          <td>DB username:</td>
34          <td><INPUT TYPE="text" name="dbuser" value="root"></td>
35      </tr><tr>
36          <td>DB password:</td>
37          <td><INPUT TYPE="password" name="dbpass"></td>
38      </tr></table>
39      <INPUT TYPE="submit" name="submit" value="Submit">
40      </FORM>
41      <?php
42  }
43  else
44  {
45      mysql_connect($dbhost, $dbuser, $dbpass) || die(mysql_error());
46      mysql_select_db($dbname);
47   
48      $result = mysql_query("SHOW TABLES");
49      while($row = mysql_fetch_row($result)){
50          $table = $row[0];
51          print "Going to drop $table...";
52          mysql_query("DROP TABLE $table") || die();
53          print "Done.<br>\n";
54          flush();
55      }
56  }
57  ?>
58   
59