diff --git a/admin/customize.php b/admin/customize.php index 5729bd93..0ba2ae36 100644 --- a/admin/customize.php +++ b/admin/customize.php @@ -3,7 +3,7 @@ * @Author: printempw * @Date: 2016-03-19 14:34:21 * @Last Modified by: printempw - * @Last Modified time: 2016-04-03 07:55:53 + * @Last Modified time: 2016-04-03 11:00:02 */ require "../libraries/session.inc.php"; if (!$user->is_admin) Utils::redirect('../index.php?msg=看起来你并不是管理员'); @@ -128,6 +128,47 @@ $db = new Database\Database('users'); + +
+
+

自定义 CSS/JavaScript + +

+
+
+ +
+ 设置已保存。
'; + } else { + echo '
内容将会被追加至每个页面的 <style> 和 <script> 标签中
'; + } ?> + + + + + + + + + + + + +
CSS + +
JavaScript + +
+
+ + + diff --git a/index.php b/index.php index 62a0bc29..be0937e9 100755 --- a/index.php +++ b/index.php @@ -3,7 +3,7 @@ * @Author: printempw * @Date: 2016-01-17 13:55:20 * @Last Modified by: printempw - * @Last Modified time: 2016-03-27 10:56:06 + * @Last Modified time: 2016-04-03 10:53:41 */ session_start(); $dir = dirname(__FILE__); @@ -39,6 +39,7 @@ if (isset($_COOKIE['uname']) && isset($_COOKIE['token'])) { background-image: url(""); } + @@ -127,6 +128,7 @@ if (isset($_COOKIE['uname']) && isset($_COOKIE['token'])) { + diff --git a/libraries/Utils.class.php b/libraries/Utils.class.php index da5eb6ec..f5848196 100644 --- a/libraries/Utils.class.php +++ b/libraries/Utils.class.php @@ -3,7 +3,7 @@ * @Author: printempw * @Date: 2016-01-16 23:01:33 * @Last Modified by: printempw - * @Last Modified time: 2016-04-03 08:07:39 + * @Last Modified time: 2016-04-03 10:58:15 */ class Utils @@ -102,7 +102,7 @@ class Utils * @return string */ public static function convertString($string) { - return stripslashes(trim($string)); + return addslashes(trim($string)); } /** diff --git a/templates/admin/header.tpl.php b/templates/admin/header.tpl.php index 3b7bc5f7..3a94cf3f 100644 --- a/templates/admin/header.tpl.php +++ b/templates/admin/header.tpl.php @@ -13,6 +13,7 @@ + diff --git a/templates/footer.tpl.php b/templates/footer.tpl.php index 236d0ee8..ce2137b6 100644 --- a/templates/footer.tpl.php +++ b/templates/footer.tpl.php @@ -17,5 +17,6 @@ + diff --git a/templates/header.tpl.php b/templates/header.tpl.php index 71913185..2183570d 100644 --- a/templates/header.tpl.php +++ b/templates/header.tpl.php @@ -12,6 +12,7 @@ +