|
@@ -17,23 +17,26 @@
|
|
|
|
|
|
The Initial Developer of the Original Code is
|
|
The Initial Developer of the Original Code is
|
|
Mark J Crane <[email protected]>
|
|
Mark J Crane <[email protected]>
|
|
- Portions created by the Initial Developer are Copyright (C) 2008-2016
|
|
|
|
|
|
+ Portions created by the Initial Developer are Copyright (C) 2008-2018
|
|
the Initial Developer. All Rights Reserved.
|
|
the Initial Developer. All Rights Reserved.
|
|
|
|
|
|
Contributor(s):
|
|
Contributor(s):
|
|
Mark J Crane <[email protected]>
|
|
Mark J Crane <[email protected]>
|
|
James Rose <[email protected]>
|
|
James Rose <[email protected]>
|
|
*/
|
|
*/
|
|
-include "root.php";
|
|
|
|
-require_once "resources/require.php";
|
|
|
|
-require_once "resources/check_auth.php";
|
|
|
|
-if (permission_exists('script_editor_view')) {
|
|
|
|
- //access granted
|
|
|
|
-}
|
|
|
|
-else {
|
|
|
|
- echo "access denied";
|
|
|
|
- exit;
|
|
|
|
-}
|
|
|
|
|
|
+//includes
|
|
|
|
+ include "root.php";
|
|
|
|
+ require_once "resources/require.php";
|
|
|
|
+ require_once "resources/check_auth.php";
|
|
|
|
+
|
|
|
|
+//check permissions
|
|
|
|
+ if (permission_exists('script_editor_view')) {
|
|
|
|
+ //access granted
|
|
|
|
+ }
|
|
|
|
+ else {
|
|
|
|
+ echo "access denied";
|
|
|
|
+ exit;
|
|
|
|
+ }
|
|
|
|
|
|
//add multi-lingual support
|
|
//add multi-lingual support
|
|
$language = new text;
|
|
$language = new text;
|
|
@@ -44,15 +47,29 @@ else {
|
|
$title = escape($_GET["dir"]);
|
|
$title = escape($_GET["dir"]);
|
|
unset($mode);
|
|
unset($mode);
|
|
switch ($_GET["dir"]) {
|
|
switch ($_GET["dir"]) {
|
|
- case 'xml': $mode = 'xml'; break;
|
|
|
|
- case 'provision': $mode = 'xml'; break;
|
|
|
|
- case 'php': $mode = 'php'; break;
|
|
|
|
- case 'scripts': $mode = 'lua'; break;
|
|
|
|
- case 'grammar': //use default
|
|
|
|
|
|
+ case 'xml':
|
|
|
|
+ $title = 'XML';
|
|
|
|
+ $mode = 'xml';
|
|
|
|
+ break;
|
|
|
|
+ case 'provision':
|
|
|
|
+ $title = 'Provision';
|
|
|
|
+ $mode = 'xml';
|
|
|
|
+ break;
|
|
|
|
+ case 'php':
|
|
|
|
+ $title = 'PHP';
|
|
|
|
+ $mode = 'php';
|
|
|
|
+ break;
|
|
|
|
+ case 'scripts':
|
|
|
|
+ $title = 'Scripts';
|
|
|
|
+ $mode = 'lua';
|
|
|
|
+ break;
|
|
|
|
+ case 'grammar':
|
|
|
|
+ $title = 'Grammar';
|
|
|
|
+ $mode = 'xml';
|
|
default: $mode = 'text';
|
|
default: $mode = 'text';
|
|
}
|
|
}
|
|
|
|
|
|
-// load editor preferences/defaults
|
|
|
|
|
|
+//load editor preferences/defaults
|
|
$setting_size = ($_SESSION["editor"]["font_size"]["text"] != '') ? $_SESSION["editor"]["font_size"]["text"] : '12px';
|
|
$setting_size = ($_SESSION["editor"]["font_size"]["text"] != '') ? $_SESSION["editor"]["font_size"]["text"] : '12px';
|
|
$setting_theme = ($_SESSION["editor"]["theme"]["text"] != '') ? $_SESSION["editor"]["theme"]["text"] : 'cobalt';
|
|
$setting_theme = ($_SESSION["editor"]["theme"]["text"] != '') ? $_SESSION["editor"]["theme"]["text"] : 'cobalt';
|
|
$setting_invisibles = ($_SESSION["editor"]["invisibles"]["boolean"] != '') ? $_SESSION["editor"]["invisibles"]["boolean"] : 'false';
|
|
$setting_invisibles = ($_SESSION["editor"]["invisibles"]["boolean"] != '') ? $_SESSION["editor"]["invisibles"]["boolean"] : 'false';
|