From: Joey Schulze Date: Sun, 23 Dec 2018 15:36:32 +0000 (+0100) Subject: Rename admin to passwd, and index to admin X-Git-Url: https://git.infodrom.org/?p=infodrom%2Fmusiikki-web.git;a=commitdiff_plain;h=3f73693bc0eba6dd6465a212d61504e2a217c6d6 Rename admin to passwd, and index to admin --- diff --git a/class/ajax.class.php b/class/ajax.class.php index 8a6f673..2c873ef 100644 --- a/class/ajax.class.php +++ b/class/ajax.class.php @@ -86,12 +86,12 @@ class AJAX { return $ok; } - public static function getadminAction() + public static function getpasswdAction() { return array(); } - public static function adminAction() + public static function passwdAction() { if (!strlen($_POST['password'])) return false; diff --git a/html/admin/index.php b/html/admin/index.php index 1317ab9..13333c0 100644 --- a/html/admin/index.php +++ b/html/admin/index.php @@ -2,7 +2,7 @@ require_once(__DIR__.'/../../class/autoloader.class.php'); if ($_SERVER['REQUEST_METHOD'] == 'GET') { - $template = new Template('index'); + $template = new Template('admin'); echo $template->render([]); } elseif ($_SERVER['REQUEST_METHOD'] == 'POST') { $method = $_POST['action'] . 'Action'; diff --git a/html/admin/musiikki.js b/html/admin/musiikki.js index 38f2ddf..1006d99 100644 --- a/html/admin/musiikki.js +++ b/html/admin/musiikki.js @@ -86,9 +86,9 @@ function submit_rescan() { return false; } -function submit_admin() { +function submit_passwd() { $.post('index.php', - 'action=admin&' + $('div.w3-container#admin form').serialize()); + 'action=passwd&' + $('div.w3-container#passwd form').serialize()); response('Admin-Passwort neu gesetzt.
Sie müssen sich erneut anmelden.'); return false; diff --git a/templates/admin.phtml b/templates/admin.phtml index ab1b134..36ef6c3 100644 --- a/templates/admin.phtml +++ b/templates/admin.phtml @@ -1,12 +1,59 @@ - -
-

Admin.

-
-
-
- - -
- -
+ + + + +<?=Config::main()->get('title')?> + + + + + + + + + + + + + + + +
+ = + get('title')?> +
+ + + + + +
+ + + + + + + + + + +
+ + + diff --git a/templates/index.phtml b/templates/index.phtml deleted file mode 100644 index ae6faf9..0000000 --- a/templates/index.phtml +++ /dev/null @@ -1,59 +0,0 @@ - - - - -<?=Config::main()->get('title')?> - - - - - - - - - - - - - - - -
- = - get('title')?> -
- - - - - -
- - - - - - - - - - - -
- - - diff --git a/templates/passwd.phtml b/templates/passwd.phtml new file mode 100644 index 0000000..f456f01 --- /dev/null +++ b/templates/passwd.phtml @@ -0,0 +1,12 @@ + +
+

Admin.

+
+
+
+ + +
+ +
+