Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 56 lines (51 sloc) 2.037 kb
b95f24e Editor: User friendly data editor
jakubvrana authored
1 <?php
2 /** Adminer Editor - Compact MySQL editor
3 * @link http://www.adminer.org/
4 * @author Jakub Vrana, http://php.vrana.cz/
5 * @copyright 2009 Jakub Vrana
6 * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License, Version 2.0
7 */
8
9 include "../adminer/include/bootstrap.inc.php";
10 include "../adminer/include/version.inc.php";
11 include "../adminer/include/functions.inc.php";
12 include "../adminer/include/lang.inc.php";
13 include "../adminer/lang/$LANG.inc.php"; //! subset and superset
14 include "./include/adminer.inc.php";
15 include "../adminer/include/design.inc.php";
16 if (isset($_GET["coverage"])) {
17 include "../adminer/coverage.inc.php";
18 }
19 include "../adminer/include/pdo.inc.php";
20 include "../adminer/include/mysql.inc.php";
21 include "./include/auth.inc.php";
22 include "./include/connect.inc.php";
23 include "../adminer/include/editing.inc.php";
24 include "../adminer/include/export.inc.php";
25
26 $confirm = " onclick=\"return confirm('" . lang('Are you sure?') . "');\"";
27 $error = "";
28
29 if (isset($_GET["download"])) {
30 include "../adminer/download.inc.php";
31 } else { // uses CSRF token
32 $token = $_SESSION["tokens"][$_GET["server"]];
33 if ($_POST) {
34 if ($_POST["token"] != $token) {
35 $error = lang('Invalid CSRF token. Send the form again.');
36 }
37 } elseif ($_SERVER["REQUEST_METHOD"] == "POST") {
38 // posted form with no data means exceeded post_max_size because Adminer always sends token at least
39 $error = lang('Too big POST data. Reduce the data or increase the "post_max_size" configuration directive.');
40 }
41 if (isset($_GET["select"]) && $_POST && (!$_POST["delete"] && !$_POST["export"] && !$_POST["import"] && !$_POST["save"])) {
42 // POST form on select page is used to edit or clone data
43 $_GET["edit"] = $_GET["select"];
44 }
45 if (isset($_GET["edit"])) {
46 include "../adminer/edit.inc.php";
47 } elseif (isset($_GET["select"])) {
48 include "../adminer/select.inc.php";
49 } else {
50 include "./db.inc.php";
51 }
52 }
53
54 // each page calls its own page_header(), if the footer should not be called then the page exits
55 page_footer();
Something went wrong with that request. Please try again.