Permalink
Browse files

Change directory structure

git-svn-id: https://adminer.svn.sourceforge.net/svnroot/adminer/trunk@682 7c3ca157-0c34-0410-bff1-cbf682f78f5c
  • Loading branch information...
1 parent 2f910b9 commit e1bc7af8f3f145e40067f1a04ae2a832e5d4da6e jakubvrana committed Jun 13, 2009
Showing with 60 additions and 61 deletions.
  1. BIN { → adminer}/arrow.gif
  2. 0 { → adminer}/call.inc.php
  3. 0 { → adminer}/create.inc.php
  4. 0 { → adminer}/createv.inc.php
  5. BIN { → adminer}/cross.gif
  6. 0 { → adminer}/database.inc.php
  7. 0 { → adminer}/db.inc.php
  8. 0 { → adminer}/default.css
  9. BIN { → adminer}/down.gif
  10. 0 { → adminer}/download.inc.php
  11. 0 { → adminer}/dump.inc.php
  12. 0 { → adminer}/edit.inc.php
  13. 0 { → adminer}/event.inc.php
  14. BIN { → adminer}/favicon.ico
  15. 0 { → adminer}/foreign.inc.php
  16. +2 −2 { → adminer}/functions.js
  17. 0 { → adminer}/include/auth.inc.php
  18. 0 { → adminer}/include/connect.inc.php
  19. 0 { → adminer}/include/design.inc.php
  20. 0 { → adminer}/include/editing.inc.php
  21. 0 { → adminer}/include/export.inc.php
  22. 0 { → adminer}/include/functions.inc.php
  23. 0 { → adminer}/include/lang.inc.php
  24. 0 { → adminer}/include/mysql.inc.php
  25. 0 { → adminer}/include/pdo.inc.php
  26. 0 { → adminer}/include/sqlite.inc.php
  27. 0 { → adminer}/include/version.inc.php
  28. 0 { → adminer}/index.php
  29. 0 { → adminer}/indexes.inc.php
  30. 0 { → adminer}/lang/cs.inc.php
  31. 0 { → adminer}/lang/de.inc.php
  32. 0 { → adminer}/lang/en.inc.php
  33. 0 { → adminer}/lang/es.inc.php
  34. 0 { → adminer}/lang/et.inc.php
  35. 0 { → adminer}/lang/fr.inc.php
  36. 0 { → adminer}/lang/it.inc.php
  37. 0 { → adminer}/lang/nl.inc.php
  38. 0 { → adminer}/lang/ru.inc.php
  39. 0 { → adminer}/lang/sk.inc.php
  40. 0 { → adminer}/lang/zh.inc.php
  41. BIN { → adminer}/plus.gif
  42. 0 { → adminer}/privileges.inc.php
  43. 0 { → adminer}/procedure.inc.php
  44. 0 { → adminer}/processlist.inc.php
  45. 0 { → adminer}/schema.inc.php
  46. 0 { → adminer}/select.inc.php
  47. 0 { → adminer}/sql.inc.php
  48. 0 { → adminer}/table.inc.php
  49. 0 { → adminer}/trigger.inc.php
  50. BIN { → adminer}/up.gif
  51. 0 { → adminer}/user.inc.php
  52. 0 { → adminer}/view.inc.php
  53. +17 −17 _compile.php → compile.php
  54. +12 −13 _coverage.php → coverage.php
  55. +4 −4 _lang.php → lang.php
  56. +2 −2 tests/0-login.html
  57. +1 −1 tests/1-create-database.html
  58. +1 −1 tests/10-clone.html
  59. +1 −1 tests/11-reference.html
  60. +1 −1 tests/12-update.html
  61. +1 −1 tests/13-delete.html
  62. +1 −1 tests/14-truncate.html
  63. +1 −1 tests/15-privileges.html
  64. +1 −1 tests/16-processlist.html
  65. +1 −1 tests/17-export.html
  66. +1 −1 tests/18-events.html
  67. +1 −1 tests/19-procedures.html
  68. +1 −1 tests/2-create-table.html
  69. +1 −1 tests/20-partitioning.html
  70. +1 −1 tests/3-create-index.html
  71. +1 −1 tests/4-create-table-2.html
  72. +1 −1 tests/5-foreign-key.html
  73. +1 −1 tests/6-alter-table.html
  74. +1 −1 tests/7-create-trigger.html
  75. +1 −1 tests/8-create-view.html
  76. +2 −2 tests/9-insert.html
  77. +2 −2 tests/logout.html
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -23,9 +23,9 @@ function verify_version(version) {
function load_jush() {
var script = document.createElement('script');
- script.src = 'externals/jush/jush.js';
+ script.src = '../externals/jush/jush.js';
script.onload = function () {
- jush.style('externals/jush/jush.css');
+ jush.style('../externals/jush/jush.css');
jush.highlight_tag('pre');
jush.highlight_tag('code');
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes.
@@ -1,5 +1,5 @@
<?php
-include dirname(__FILE__) . "/include/version.inc.php";
+include dirname(__FILE__) . "/adminer/include/version.inc.php";
include dirname(__FILE__) . "/externals/jsmin-php/jsmin.php";
function add_apo_slashes($s) {
@@ -29,15 +29,15 @@ function put_file($match) {
return "";
}
$return = "";
- foreach (glob(dirname(__FILE__) . "/lang/*.inc.php") as $filename) {
+ foreach (glob(dirname(__FILE__) . "/adminer/lang/*.inc.php") as $filename) {
include $filename;
foreach ($translations as $key => $val) {
if (!isset($lang_ids[$key])) {
$lang_ids[$key] = count($lang_ids);
}
}
}
- foreach (glob(dirname(__FILE__) . "/lang/*.inc.php") as $filename) {
+ foreach (glob(dirname(__FILE__) . "/adminer/lang/*.inc.php") as $filename) {
include $filename;
$translation_ids = array_flip($lang_ids);
foreach ($translations as $key => $val) {
@@ -51,7 +51,7 @@ function put_file($match) {
}
return "switch (\$LANG) {\n$return}\n";
}
- $return = file_get_contents(dirname(__FILE__) . "/$match[2]");
+ $return = file_get_contents(dirname(__FILE__) . "/adminer/$match[2]");
if ($match[2] != "./include/lang.inc.php" || !$_COOKIE["lang"]) {
$tokens = token_get_all($return);
return "?>\n$return" . (in_array($tokens[count($tokens) - 1][0], array(T_CLOSE_TAG, T_INLINE_HTML), true) ? "<?php" : "");
@@ -155,16 +155,16 @@ function php_shrink($input) {
error_reporting(E_ALL & ~E_NOTICE);
if ($_SERVER["argc"] > 1) {
$_COOKIE["lang"] = $_SERVER["argv"][1];
- include dirname(__FILE__) . "/include/lang.inc.php";
+ include dirname(__FILE__) . "/adminer/include/lang.inc.php";
if ($_SERVER["argc"] != 2 || !isset($langs[$_COOKIE["lang"]])) {
- echo "Usage: php _compile.php [lang]\nPurpose: Compile adminer[-lang].php from index.php.\n";
+ echo "Usage: php compile.php [lang]\nPurpose: Compile adminer[-lang].php from index.php.\n";
exit(1);
}
- include dirname(__FILE__) . "/lang/$_COOKIE[lang].inc.php";
+ include dirname(__FILE__) . "/adminer/lang/$_COOKIE[lang].inc.php";
}
$filename = "adminer" . ($_COOKIE["lang"] ? "-$_COOKIE[lang]" : "") . ".php";
-$file = file_get_contents(dirname(__FILE__) . "/index.php");
+$file = file_get_contents(dirname(__FILE__) . "/adminer/index.php");
$file = preg_replace_callback('~\\b(include|require) "([^"]*)";~', 'put_file', $file);
$file = preg_replace("~if \\(isset\\(\\\$_SESSION\\[\"coverage.*\n}\n| && !isset\\(\\\$_SESSION\\[\"coverage\"\\]\\)~sU", '', $file);
if ($_COOKIE["lang"]) {
@@ -182,26 +182,26 @@ function php_shrink($input) {
header("Expires: " . gmdate("D, d M Y H:i:s", time() + 365*24*60*60) . " GMT");
if ($_GET["file"] == "favicon.ico") {
header("Content-Type: image/x-icon");
- echo base64_decode("' . base64_encode(file_get_contents(dirname(__FILE__) . "/favicon.ico")) . '");
+ echo base64_decode("' . base64_encode(file_get_contents(dirname(__FILE__) . "/adminer/favicon.ico")) . '");
} elseif ($_GET["file"] == "default.css") {
header("Content-Type: text/css");
- ?>' . preg_replace('~\\s*([:;{},])\\s*~', '\\1', file_get_contents(dirname(__FILE__) . "/default.css")) . '<?php
+ ?>' . preg_replace('~\\s*([:;{},])\\s*~', '\\1', file_get_contents(dirname(__FILE__) . "/adminer/default.css")) . '<?php
} elseif ($_GET["file"] == "functions.js") {
header("Content-Type: text/javascript");
- ?>' . JSMin::minify(file_get_contents(dirname(__FILE__) . "/functions.js")) . '<?php
+ ?>' . JSMin::minify(file_get_contents(dirname(__FILE__) . "/adminer/functions.js")) . '<?php
} else {
header("Content-Type: image/gif");
switch ($_GET["file"]) {
- case "arrow.gif": echo base64_decode("' . base64_encode(file_get_contents(dirname(__FILE__) . "/arrow.gif")) . '"); break;
- case "up.gif": echo base64_decode("' . base64_encode(file_get_contents(dirname(__FILE__) . "/up.gif")) . '"); break;
- case "down.gif": echo base64_decode("' . base64_encode(file_get_contents(dirname(__FILE__) . "/down.gif")) . '"); break;
- case "plus.gif": echo base64_decode("' . base64_encode(file_get_contents(dirname(__FILE__) . "/plus.gif")) . '"); break;
- case "cross.gif": echo base64_decode("' . base64_encode(file_get_contents(dirname(__FILE__) . "/cross.gif")) . '"); break;
+ case "arrow.gif": echo base64_decode("' . base64_encode(file_get_contents(dirname(__FILE__) . "/adminer/arrow.gif")) . '"); break;
+ case "up.gif": echo base64_decode("' . base64_encode(file_get_contents(dirname(__FILE__) . "/adminer/up.gif")) . '"); break;
+ case "down.gif": echo base64_decode("' . base64_encode(file_get_contents(dirname(__FILE__) . "/adminer/down.gif")) . '"); break;
+ case "plus.gif": echo base64_decode("' . base64_encode(file_get_contents(dirname(__FILE__) . "/adminer/plus.gif")) . '"); break;
+ case "cross.gif": echo base64_decode("' . base64_encode(file_get_contents(dirname(__FILE__) . "/adminer/cross.gif")) . '"); break;
}
}
exit;
}', $file);
-$file = str_replace("externals/jush/", "http://jush.sourceforge.net/", $file);
+$file = str_replace("../externals/jush/", "http://jush.sourceforge.net/", $file);
$file = preg_replace("~<\\?php\\s*\\?>\n?|\\?>\n?<\\?php~", '', $file);
$file = php_shrink($file);
fwrite(fopen($filename, "w"), $file);
@@ -26,12 +26,12 @@ function xhtml_open_tags($s) {
if ($_GET["start"]) {
xdebug_start_code_coverage(XDEBUG_CC_UNUSED | XDEBUG_CC_DEAD_CODE);
$_SESSION["coverage"] = array();
- include "./index.php";
+ include "./adminer/index.php";
header("Location: .");
exit;
}
-if ($_GET["filename"]) {
- $filename = basename($_GET["filename"]);
+if (preg_match('~^(include/)?[-_.a-z0-9]+$~i', $_GET["filename"])) {
+ $filename = "adminer/$_GET[filename]";
$cov = $_SESSION["coverage"][realpath($filename)];
$file = explode("<br />", highlight_file($filename, true));
unset($prev_color);
@@ -61,17 +61,16 @@ function xhtml_open_tags($s) {
}
} else {
echo "<table border='0' cellspacing='0' cellpadding='1'>\n";
- foreach (glob("*.php") as $filename) {
- if ($filename{0} != "_") {
- $cov = $_SESSION["coverage"][realpath($filename)];
- $ratio = 0;
- if (isset($cov)) {
- $values = array_count_values($cov);
- $ratio = round(100 - 100 * $values[-1] / count($cov));
- }
- echo "<tr><td align='right' style='background-color: " . ($ratio < 50 ? "Red" : ($ratio < 75 ? "#FFEA20" : "#A7FC9D")) . ";'>$ratio%</td><td><a href='_coverage.php?filename=$filename'>$filename</a></td></tr>\n";
+ foreach (array_merge(glob("adminer/*.php"), glob("adminer/include/*.php")) as $filename) {
+ $cov = $_SESSION["coverage"][realpath($filename)];
+ $filename = substr($filename, 8);
+ $ratio = 0;
+ if (isset($cov)) {
+ $values = array_count_values($cov);
+ $ratio = round(100 - 100 * $values[-1] / count($cov));
}
+ echo "<tr><td align='right' style='background-color: " . ($ratio < 50 ? "Red" : ($ratio < 75 ? "#FFEA20" : "#A7FC9D")) . ";'>$ratio%</td><td><a href='coverage.php?filename=$filename'>$filename</a></td></tr>\n";
}
echo "</table>\n";
- echo "<p><a href='_coverage.php?start=1'>Start new coverage</a> (requires <a href='http://www.xdebug.org'>Xdebug</a>)</p>\n";
+ echo "<p><a href='coverage.php?start=1'>Start new coverage</a> (requires <a href='http://www.xdebug.org'>Xdebug</a>)</p>\n";
}
View
@@ -2,22 +2,22 @@
error_reporting(E_ALL & ~E_NOTICE);
if ($_SERVER["argc"] > 1) {
$_COOKIE["lang"] = $_SERVER["argv"][1];
- include dirname(__FILE__) . "/include/lang.inc.php";
+ include dirname(__FILE__) . "/adminer/include/lang.inc.php";
if ($_SERVER["argc"] != 2 || !isset($langs[$_COOKIE["lang"]])) {
- echo "Usage: php _lang.php [lang]\nPurpose: Update lang/*.inc.php from source code messages.\n";
+ echo "Usage: php lang.php [lang]\nPurpose: Update lang/*.inc.php from source code messages.\n";
exit(1);
}
}
$messages_all = array();
-foreach (array_merge(glob(dirname(__FILE__) . "/*.php"), glob(dirname(__FILE__) . "/include/*.php")) as $filename) {
+foreach (array_merge(glob(dirname(__FILE__) . "/adminer/*.php"), glob(dirname(__FILE__) . "/adminer/include/*.php")) as $filename) {
$file = file_get_contents($filename);
if (preg_match_all("~lang\\(('(?:[^\\\\']+|\\\\.)*')([),])~", $file, $matches)) {
$messages_all += array_combine($matches[1], $matches[2]);
}
}
-foreach (glob(dirname(__FILE__) . "/lang/" . ($_COOKIE["lang"] ? $_COOKIE["lang"] : "*") . ".inc.php") as $filename) {
+foreach (glob(dirname(__FILE__) . "/adminer/lang/" . ($_COOKIE["lang"] ? $_COOKIE["lang"] : "*") . ".inc.php") as $filename) {
$messages = $messages_all;
preg_match_all("~^(\\s*)(?:// )?(('(?:[^\\\\']+|\\\\.)*') => .*[^,\n]),?~m", file_get_contents($filename), $matches, PREG_SET_ORDER);
$s = "";
View
@@ -13,12 +13,12 @@
</thead><tbody>
<tr>
<td>open</td>
- <td>/adminer/_coverage.php?start=1</td>
+ <td>/adminer/coverage.php?start=1</td>
<td></td>
</tr>
<tr>
<td>open</td>
- <td>/adminer/?lang=en&amp;username=</td>
+ <td>/adminer/adminer/?lang=en&amp;username=</td>
<td></td>
</tr>
<tr>
@@ -13,7 +13,7 @@
</thead><tbody>
<tr>
<td>open</td>
- <td>/adminer/</td>
+ <td>/adminer/adminer/</td>
<td></td>
</tr>
<tr>
View
@@ -13,7 +13,7 @@
</thead><tbody>
<tr>
<td>open</td>
- <td>/adminer/?db=selenium&amp;select=albums</td>
+ <td>/adminer/adminer/?db=selenium&amp;select=albums</td>
<td></td>
</tr>
<tr>
View
@@ -13,7 +13,7 @@
</thead><tbody>
<tr>
<td>open</td>
- <td>/adminer/?db=selenium&amp;select=albums</td>
+ <td>/adminer/adminer/?db=selenium&amp;select=albums</td>
<td></td>
</tr>
<tr>
View
@@ -13,7 +13,7 @@
</thead><tbody>
<tr>
<td>open</td>
- <td>/adminer/?db=selenium&amp;edit=albums&amp;where%5Bid%5D=2</td>
+ <td>/adminer/adminer/?db=selenium&amp;edit=albums&amp;where%5Bid%5D=2</td>
<td></td>
</tr>
<tr>
View
@@ -13,7 +13,7 @@
</thead><tbody>
<tr>
<td>open</td>
- <td>/adminer/?db=selenium&amp;edit=albums&amp;where%5Bid%5D=2</td>
+ <td>/adminer/adminer/?db=selenium&amp;edit=albums&amp;where%5Bid%5D=2</td>
<td></td>
</tr>
<tr>
View
@@ -13,7 +13,7 @@
</thead><tbody>
<tr>
<td>open</td>
- <td>/adminer/?db=selenium&amp;select=albums</td>
+ <td>/adminer/adminer/?db=selenium&amp;select=albums</td>
<td></td>
</tr>
<tr>
View
@@ -13,7 +13,7 @@
</thead><tbody>
<tr>
<td>open</td>
- <td>/adminer/?user=</td>
+ <td>/adminer/adminer/?user=</td>
<td></td>
</tr>
<tr>
@@ -13,7 +13,7 @@
</thead><tbody>
<tr>
<td>open</td>
- <td>/adminer/?processlist=</td>
+ <td>/adminer/adminer/?processlist=</td>
<td></td>
</tr>
<tr>
View
@@ -13,7 +13,7 @@
</thead><tbody>
<tr>
<td>open</td>
- <td>/adminer/?db=selenium&amp;dump=</td>
+ <td>/adminer/adminer/?db=selenium&amp;dump=</td>
<td></td>
</tr>
<tr>
View
@@ -13,7 +13,7 @@
</thead><tbody>
<tr>
<td>open</td>
- <td>/adminer/?db=selenium&amp;event=</td>
+ <td>/adminer/adminer/?db=selenium&amp;event=</td>
<td></td>
</tr>
<tr>
View
@@ -13,7 +13,7 @@
</thead><tbody>
<tr>
<td>open</td>
- <td>/adminer/?db=selenium&amp;procedure=</td>
+ <td>/adminer/adminer/?db=selenium&amp;procedure=</td>
<td></td>
</tr>
<tr>
@@ -13,7 +13,7 @@
</thead><tbody>
<tr>
<td>open</td>
- <td>/adminer/?db=selenium</td>
+ <td>/adminer/adminer/?db=selenium</td>
<td></td>
</tr>
<tr>
@@ -13,7 +13,7 @@
</thead><tbody>
<tr>
<td>open</td>
- <td>/adminer/?db=selenium&amp;table=interprets</td>
+ <td>/adminer/adminer/?db=selenium&amp;table=interprets</td>
<td></td>
</tr>
<tr>
@@ -13,7 +13,7 @@
</thead><tbody>
<tr>
<td>open</td>
- <td>/adminer/?db=selenium&amp;table=interprets</td>
+ <td>/adminer/adminer/?db=selenium&amp;table=interprets</td>
<td></td>
</tr>
<tr>
@@ -13,7 +13,7 @@
</thead><tbody>
<tr>
<td>open</td>
- <td>/adminer/?db=selenium&amp;table=interprets&amp;lang=en</td>
+ <td>/adminer/adminer/?db=selenium&amp;table=interprets&amp;lang=en</td>
<td></td>
</tr>
<tr>
View
@@ -13,7 +13,7 @@
</thead><tbody>
<tr>
<td>open</td>
- <td>/adminer/?db=selenium&amp;table=albums</td>
+ <td>/adminer/adminer/?db=selenium&amp;table=albums</td>
<td></td>
</tr>
<tr>
View
@@ -13,7 +13,7 @@
</thead><tbody>
<tr>
<td>open</td>
- <td>/adminer/?db=selenium&amp;table=interprets</td>
+ <td>/adminer/adminer/?db=selenium&amp;table=interprets</td>
<td></td>
</tr>
<tr>
@@ -13,7 +13,7 @@
</thead><tbody>
<tr>
<td>open</td>
- <td>/adminer/?db=selenium&amp;trigger=albums</td>
+ <td>/adminer/adminer/?db=selenium&amp;trigger=albums</td>
<td></td>
</tr>
<tr>
View
@@ -13,7 +13,7 @@
</thead><tbody>
<tr>
<td>open</td>
- <td>/adminer/?db=selenium&amp;createv=</td>
+ <td>/adminer/adminer/?db=selenium&amp;createv=</td>
<td></td>
</tr>
<tr>
View
@@ -13,7 +13,7 @@
</thead><tbody>
<tr>
<td>open</td>
- <td>/adminer/?db=selenium&amp;edit=interprets</td>
+ <td>/adminer/adminer/?db=selenium&amp;edit=interprets</td>
<td></td>
</tr>
<tr>
@@ -33,7 +33,7 @@
</tr>
<tr>
<td>open</td>
- <td>/adminer/?db=selenium&amp;edit=albums</td>
+ <td>/adminer/adminer/?db=selenium&amp;edit=albums</td>
<td></td>
</tr>
<tr>
View
@@ -13,7 +13,7 @@
</thead><tbody>
<tr>
<td>open</td>
- <td>/adminer/</td>
+ <td>/adminer/adminer/</td>
<td></td>
</tr>
<tr>
@@ -38,7 +38,7 @@
</tr>
<tr>
<td>open</td>
- <td>/adminer/_coverage.php</td>
+ <td>/adminer/coverage.php</td>
<td></td>
</tr>

0 comments on commit e1bc7af

Please sign in to comment.