diff --git a/app/edit/app_config.php b/app/edit/app_config.php deleted file mode 100644 index 9017febffd..0000000000 --- a/app/edit/app_config.php +++ /dev/null @@ -1,160 +0,0 @@ - diff --git a/app/edit/app_languages.php b/app/edit/app_languages.php deleted file mode 100644 index 6f8223cd05..0000000000 --- a/app/edit/app_languages.php +++ /dev/null @@ -1,644 +0,0 @@ - diff --git a/app/edit/app_menu.php b/app/edit/app_menu.php deleted file mode 100644 index 932b60a1c4..0000000000 --- a/app/edit/app_menu.php +++ /dev/null @@ -1,134 +0,0 @@ - diff --git a/app/edit/clip_add.php b/app/edit/clip_add.php deleted file mode 100644 index 7b9a4c2dc9..0000000000 --- a/app/edit/clip_add.php +++ /dev/null @@ -1,138 +0,0 @@ - - Portions created by the Initial Developer are Copyright (C) 2008-2019 - the Initial Developer. All Rights Reserved. - - Contributor(s): - Mark J Crane - James Rose -*/ - -//includes - include "root.php"; - require_once "resources/require.php"; - require_once "resources/check_auth.php"; - -//check permissions - if (permission_exists('edit_save')) { - //access granted - } - else { - echo "access denied"; - exit; - } - -//add multi-lingual support - $language = new text; - $text = $language->get(); - -if (count($_POST)>0) { - $clip_name = $_POST["clip_name"]; - $clip_folder = $_POST["clip_folder"]; - $clip_text_start = $_POST["clip_text_start"]; - $clip_text_end = $_POST["clip_text_end"]; - $clip_desc = $_POST["clip_desc"]; - $clip_order = $_POST["clip_order"]; - if (strlen($clip_order) == 0) { $clip_order = 0; } - - //no slashes - $clip_name = str_replace('/', '|', $clip_name); - $clip_name = str_replace('\\', '|', $clip_name); - - //sql insert - $array['clips'][0]['clip_uuid'] = uuid(); - $array['clips'][0]['clip_name'] = $clip_name; - $array['clips'][0]['clip_folder'] = $clip_folder; - $array['clips'][0]['clip_text_start'] = $clip_text_start; - $array['clips'][0]['clip_text_end'] = $clip_text_end; - $array['clips'][0]['clip_desc'] = $clip_desc; - $array['clips'][0]['clip_order'] = $clip_order; - - $p = new permissions; - $p->add('clip_add', 'temp'); - - $database = new database; - $database->app_name = 'edit'; - $database->app_uuid = '17e628ee-ccfa-49c0-29ca-9894a0384b9b'; - $database->save($array); - unset($array); - - $p->add('clip_add', 'temp'); - - require_once "header.php"; - echo "\n"; - echo $text['message-add']; - require_once "footer.php"; - exit; -} - -//show the content - require_once "header.php"; - echo "\n"; - echo "\n"; - echo " "; - echo " "; - echo "
\n"; - - echo "
"; - echo ""; - echo " "; - echo " "; - echo " "; - echo " "; - - echo " "; - echo " "; - echo " "; - echo " "; - - echo " "; - echo " "; - echo " "; - - echo " "; - echo " "; - echo " "; - - echo " "; - echo " "; - echo " "; - - echo " "; - echo " "; - echo " "; - echo " "; - echo "
Name
".$text['label-folder']."
".$text['label-before-selection']."
"; - echo " "; - echo "
".$text['label-after-selection']."
"; - echo " "; - echo "
".$text['label-notes']."
"; - echo " "; - echo "
"; - echo "
"; - - echo "
"; - - echo ""; - -//include the footer - require_once "footer.php"; - -?> diff --git a/app/edit/clip_delete.php b/app/edit/clip_delete.php deleted file mode 100644 index 77a10b1998..0000000000 --- a/app/edit/clip_delete.php +++ /dev/null @@ -1,68 +0,0 @@ - - Portions created by the Initial Developer are Copyright (C) 2008-2019 - the Initial Developer. All Rights Reserved. - - Contributor(s): - Mark J Crane - James Rose -*/ - -//includes - include "root.php"; - require_once "resources/require.php"; - require_once "resources/check_auth.php"; - -//check permissions - if (permission_exists('clip_delete')) { - //access granted - } - else { - echo "access denied"; - exit; - } - -//add multi-lingual support - $language = new text; - $text = $language->get(); - -//get the uuid from http values - $clip_uuid = $_GET["id"]; - -//delete the clip - if (is_uuid($clip_uuid)) { - $array['clips'][0]['clip_uuid'] = $clip_uuid; - - $p = new permissions; - $p->add('clip_delete', 'temp'); - - $database = new database; - $database->app_name = 'edit'; - $database->app_uuid = '17e628ee-ccfa-49c0-29ca-9894a0384b9b'; - $database->delete($array); - unset($array); - - $p->delete('clip_delete', 'temp'); - } - -//redirect the browser - header("Location: clip_options.php"); - -?> diff --git a/app/edit/clip_list.php b/app/edit/clip_list.php deleted file mode 100644 index 679e3e63ad..0000000000 --- a/app/edit/clip_list.php +++ /dev/null @@ -1,229 +0,0 @@ - - Portions created by the Initial Developer are Copyright (C) 2008-2019 - the Initial Developer. All Rights Reserved. - - Contributor(s): - Mark J Crane - James Rose -*/ -//includes - include "root.php"; - require_once "resources/require.php"; - require_once "resources/check_auth.php"; - -//check permissions - if (permission_exists('clip_view')) { - //access granted - } - else { - echo "access denied"; - exit; - } - -//include the header - require_once "header.php"; - -//add multi-lingual support - $language = new text; - $text = $language->get(); - -//check if this is a file - function isfile($filename) { - return @filesize($filename) > 0 ? true : false; - } - -//count the spaces - function space($count) { - $r=''; $i=0; - while($i < $count) { - $r .= ' '; - $i++; - } - return $r; - } - -//setup ajax - echo ""; - -//setup the tree view - //echo "// ---------------------------------------------\n"; - //echo "// --- http://www.codeproject.com/jscript/dhtml_treeview.asp\n"; - //echo "// --- Name: Easy DHTML Treeview --\n"; - //echo "// --- Author: D.D. de Kerf --\n"; - //echo "// --- Version: 0.2 Date: 13-6-2001 --\n"; - //echo "// ---------------------------------------------\n"; - echo ""; - -// keyboard shortcut bindings - echo "\n"; - echo "\n"; - -//save file - key_press('ctrl+s', 'down', 'window', null, null, "if (parent.document.getElementById('frm_edit')) { parent.$('form#frm_edit').submit(); return false; }", true); - -//open file manager/clip library pane - key_press('ctrl+q', 'down', 'window', null, null, "if (parent.document.getElementById('sidebar')) { parent.toggle_sidebar(); parent.focus_editor(); return false; }", true); - -//prevent backspace (browser history back) - key_press('backspace', 'down', 'window', null, null, 'return false;', true); - -//keyboard shortcut to execute command (when included on command page) - key_press('ctrl+enter', 'down', 'window', null, null, "if (!parent.document.getElementById('sidebar')) { parent.$('form#frm').submit(); return false; }", true); - -//show the content - echo "\n"; - echo "\n"; - - echo "
\n"; - echo "\n"; - - $sql = "select * from v_clips order by clip_folder asc, clip_name asc"; - $database = new database; - $result = $database->select($sql, null, 'all'); - unset($sql); - - if (is_array($result) && @sizeof($result) != 0) { - $master_array = array(); - foreach ($result as $row) { - $clip_folder = rtrim($row['clip_folder'], '/'); - $clip_folder .= '/'.$row['clip_name']; - - $parts = explode('/', $clip_folder); - $folders = array(); - while ($bottom = array_pop($parts)) { - if (sizeof($folders) > 0) { - $folders = array($bottom => $folders); - } - else { - $clip['uuid'] = $row['clip_uuid']; - $clip['name'] = $row['clip_name']; - $clip['before'] = $row['clip_text_start']; - $clip['after'] = $row['clip_text_end']; - $folders = array($bottom => $clip); - } - } - - $master_array = array_merge_recursive($master_array, $folders); - } - unset($result, $row); - - function parse_array($arr) { - if (is_array($arr)) { - //folder/clip - foreach ($arr as $name => $sub_arr) { - if ($name != $sub_arr['name']) { - //folder - echo "".$name.""; - echo "
\n"; - parse_array($sub_arr); - echo "
\n"; - } - else { - //clip - echo "
\n"; - echo ""; - echo ""; - echo escape($sub_arr['name']); - echo "\n"; - echo "\n"; - echo "\n"; - echo "
\n"; - } - } - } - } - parse_array($master_array); - } - echo "
\n"; - -//inclue the footer -require_once "footer.php"; - -?> diff --git a/app/edit/clip_options.php b/app/edit/clip_options.php deleted file mode 100644 index fe5f164ed8..0000000000 --- a/app/edit/clip_options.php +++ /dev/null @@ -1,76 +0,0 @@ - - Portions created by the Initial Developer are Copyright (C) 2008-2019 - the Initial Developer. All Rights Reserved. - - Contributor(s): - Mark J Crane - James Rose -*/ - -//includes - include "root.php"; - require_once "resources/require.php"; - require_once "resources/check_auth.php"; - -//check permissions - if (permission_exists('clip_edit')) { - //access granted - } - else { - echo "access denied"; - exit; - } - -//add multi-lingual support - $language = new text; - $text = $language->get(); - -//prepare the header - $title = $text['title-manage-clips']; - require_once "header.php"; - -//show the content - echo "\n"; - echo ""; - echo "\n"; - echo ""; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "
".$text['label-selected-clip']."
"; - echo " "; - echo ""; - - echo ""; - echo " \n"; - echo " \n"; - echo " \n"; - echo " \n"; - echo " \n"; - echo "
 
"; - - echo "
"; - -//include footer - require_once "footer.php"; - -?> diff --git a/app/edit/clip_options_list.php b/app/edit/clip_options_list.php deleted file mode 100644 index c5a69bfb3a..0000000000 --- a/app/edit/clip_options_list.php +++ /dev/null @@ -1,188 +0,0 @@ - - Portions created by the Initial Developer are Copyright (C) 2008-2019 - the Initial Developer. All Rights Reserved. - - Contributor(s): - Mark J Crane - James Rose -*/ - -//includes - include "root.php"; - require_once "resources/require.php"; - require_once "resources/check_auth.php"; - -//check permissions - if (permission_exists('clip_edit')) { - //access granted - } - else { - echo "access denied"; - exit; - } - -//add multi-lingual support - $language = new text; - $text = $language->get(); - -//include - require_once "header.php"; - -//show the content - echo ""; - - echo ""; - - echo "\n"; - echo "\n"; - - echo "
\n"; - - $sql = "select * from v_clips order by clip_folder asc, clip_name asc"; - $database = new database; - $result = $database->select($sql, null, 'all'); - unset($sql); - - if (is_array($result) && @sizeof($result) != 0) { - $master_array = array(); - foreach ($result as $row) { - $clip_folder = rtrim($row['clip_folder'], '/'); - $clip_folder .= '/'.$row['clip_name']; - - $parts = explode('/', $clip_folder); - $folders = array(); - while ($bottom = array_pop($parts)) { - if (sizeof($folders) > 0) { - $folders = array($bottom => $folders); - } - else { - $clip['uuid'] = $row['clip_uuid']; - $clip['name'] = $row['clip_name']; - $clip['before'] = $row['clip_text_start']; - $clip['after'] = $row['clip_text_end']; - $folders = array($bottom => $clip); - } - } - - $master_array = array_merge_recursive($master_array, $folders); - } - - function parse_array($arr) { - if (is_array($arr)) { - //folder/clip - foreach ($arr as $name => $sub_arr) { - if ($name != $sub_arr['name']) { - //folder - echo "".escape($name).""; - echo "
\n"; - parse_array($sub_arr); - echo "
\n"; - } - else { - //clip - echo "
\n"; - echo ""; - echo ""; - echo escape($sub_arr['name']); - echO "\n"; - echo "\n"; - echo "\n"; - echo "
\n"; - } - } - } - } - parse_array($master_array); - } - unset($result, $row); - echo "
\n"; - -//include the footer - require_once "footer.php"; - -?> diff --git a/app/edit/clip_update.php b/app/edit/clip_update.php deleted file mode 100644 index 78fd0ecec1..0000000000 --- a/app/edit/clip_update.php +++ /dev/null @@ -1,160 +0,0 @@ - - Portions created by the Initial Developer are Copyright (C) 2008-2012 - the Initial Developer. All Rights Reserved. - - Contributor(s): - Mark J Crane -*/ - -//includes - include "root.php"; - require_once "resources/require.php"; - require_once "resources/check_auth.php"; - -//check permissions - if (permission_exists('clip_edit')) { - //access granted - } - else { - echo "access denied"; - exit; - } - -//add multi-lingual support - $language = new text; - $text = $language->get(); - -//process the HTTP POST - if (count($_POST) > 0) { - $clip_uuid = $_POST["id"]; - $clip_name = $_POST["clip_name"]; - $clip_folder = $_POST["clip_folder"]; - $clip_text_start = $_POST["clip_text_start"]; - $clip_text_end = $_POST["clip_text_end"]; - $clip_desc = $_POST["clip_desc"]; - $clip_order = $_POST["clip_order"]; - - //no slashes - $clip_name = str_replace('/', '|', $clip_name); - $clip_name = str_replace('\\', '|', $clip_name); - - //sql update - $array['clips'][0]['clip_uuid'] = $clip_uuid; - $array['clips'][0]['clip_name'] = $clip_name; - $array['clips'][0]['clip_folder'] = $clip_folder; - $array['clips'][0]['clip_text_start'] = $clip_text_start; - $array['clips'][0]['clip_text_end'] = $clip_text_end; - $array['clips'][0]['clip_desc'] = $clip_desc; - $array['clips'][0]['clip_order'] = $clip_order; - - $p = new permissions; - $p->add('clip_edit', 'temp'); - - $database = new database; - $database->app_name = 'edit'; - $database->app_uuid = '17e628ee-ccfa-49c0-29ca-9894a0384b9b'; - $database->save($array); - unset($array); - - $p->add('clip_edit', 'temp'); - - //redirect the browser - require_once "header.php"; - echo "\n"; - echo $text['message-update']; - require_once "footer.php"; - exit; - } - else { - //get the uuid from http values - $clip_uuid = $_GET["id"]; - - //get the clip - $sql = "select * from v_clips "; - $sql .= "where clip_uuid = :clip_uuid "; - $parameters['clip_uuid'] = $clip_uuid; - $database = new database; - $row = $database->select($sql, $parameters, 'row'); - if (is_array($row) && @sizeof($row) != 0) { - $clip_name = $row["clip_name"]; - $clip_folder = $row["clip_folder"]; - $clip_text_start = $row["clip_text_start"]; - $clip_text_end = $row["clip_text_end"]; - $clip_desc = $row["clip_desc"]; - $clip_order = $row["clip_order"]; - } - unset($sql, $parameters, $row); - } - -//show the content - require_once "header.php"; - echo "\n"; - echo "\n"; - echo " "; - echo " "; - echo "
\n"; - - echo "
"; - echo ""; - echo " "; - echo " "; - echo " "; - echo " "; - - echo " "; - echo " "; - echo " "; - echo " "; - - echo " "; - echo " "; - echo " "; - - echo " "; - echo " "; - echo " "; - - echo " "; - echo " "; - echo " "; - - echo " "; - echo " "; - echo " "; - echo " "; - echo "
Name
Folder
Before Selection
"; - echo " "; - echo "
After Selection
"; - echo " "; - echo "
Notes
"; - echo " "; - echo "
"; - echo " "; - echo " "; - echo "
"; - echo "
"; - - echo "
"; - -//include the footer - require_once "footer.php"; - -?> diff --git a/app/edit/file_delete.php b/app/edit/file_delete.php deleted file mode 100644 index 37234ceb2a..0000000000 --- a/app/edit/file_delete.php +++ /dev/null @@ -1,112 +0,0 @@ - - Portions created by the Initial Developer are Copyright (C) 2008-2019 - the Initial Developer. All Rights Reserved. - - Contributor(s): - Mark J Crane - James Rose -*/ - -//disable this feature - exit; - -//includes - include "root.php"; - require_once "resources/require.php"; - require_once "resources/check_auth.php"; - -//check permissions - if (permission_exists('edit_save')) { - //access granted - } - else { - echo "access denied"; - exit; - } - -//add multi-lingual support - $language = new text; - $text = $language->get(); - -//set the variabls - $folder = $_REQUEST["folder"]; - $folder = str_replace ("\\", "/", $folder); - $folder = realpath($folder); - $file = $_REQUEST["file"]; - -//delete the file or show the html form - if (strlen($folder) > 0 && strlen($file) > 0 && isset($_POST['token'])) { - //compare the tokens - $key_name = '/app/edit/file_delete'; - $hash = hash_hmac('sha256', $key_name, $_SESSION['keys'][$key_name]); - if (!hash_equals($hash, $_POST['token'])) { - echo "access denied"; - exit; - } - - //delete the file - unlink($folder.'/'.$file); - - //redirect the browser - header("Location: file_options.php"); - } - else { - //create the token - $key_name = '/app/edit/file_delete'; - $_SESSION['keys'][$key_name] = bin2hex(random_bytes(32)); - $_SESSION['token'] = hash_hmac('sha256', $key_name, $_SESSION['keys'][$key_name]); - - //display form - require_once "header.php"; - echo "
"; - echo "
"; - echo "
"; - echo " "; - echo " "; - echo " "; - echo " "; - echo " "; - echo " "; - echo " "; - echo "
".$text['label-path']."
".escape($folder)."
"; - echo "
"; - echo " "; - echo " "; - echo " "; - echo " "; - echo " "; - echo " "; - echo " "; - echo " "; - echo " "; - echo " "; - echo "
".$text['label-file-name']."
"; - echo " "; - echo " "; - echo " "; - echo "
"; - echo "
"; - echo "
"; - - //include the footer - require_once "footer.php"; - } -?> diff --git a/app/edit/file_list.php b/app/edit/file_list.php deleted file mode 100644 index 5c5ab8b5ef..0000000000 --- a/app/edit/file_list.php +++ /dev/null @@ -1,270 +0,0 @@ - - Portions created by the Initial Developer are Copyright (C) 2008-2019 - the Initial Developer. All Rights Reserved. - - Contributor(s): - Mark J Crane - James Rose -*/ - -//includes - include "root.php"; - require_once "resources/require.php"; - require_once "resources/check_auth.php"; - -//check permissions - if (permission_exists('edit_view')) { - //access granted - } - else { - echo "access denied"; - exit; - } - -//add css and javascript - require_once "header.php"; - -//define function recure_dir - function recur_dir($dir) { - clearstatcache(); - $htmldirlist = ''; - $htmlfilelist = ''; - $dirlist = opendir($dir); - $dir_array = array(); - if($dirlist !== false) while (false !== ($file = readdir($dirlist))) { - if ($file != "." AND $file != ".."){ - $newpath = $dir.'/'.$file; - $level = explode('/',$newpath); - if ( - substr(strtolower($newpath), -4) == ".svn" || - substr(strtolower($newpath), -4) == ".git" || - substr(strtolower($newpath), -3) == ".db" || - substr(strtolower($newpath), -4) == ".jpg" || - substr(strtolower($newpath), -4) == ".gif" || - substr(strtolower($newpath), -4) == ".png" || - substr(strtolower($newpath), -4) == ".ico" || - substr(strtolower($newpath), -4) == ".ttf" - ) { - //ignore certain files (and folders) - } - else { - $dir_array[] = $newpath; - } - if ($x > 1000) { break; }; - $x++; - } - } - - asort($dir_array); - foreach ($dir_array as $newpath){ - $level = explode('/',$newpath); - - if (is_dir($newpath)) { - $dirname = end($level); - $htmldirlist .= "
\n"; - $htmldirlist .= "".$dirname.""; - $htmldirlist .= "
".recur_dir($newpath)."
\n"; - $htmldirlist .= "
\n"; - } - else { - $filename = end($level); - $filesize = round(filesize($newpath)/1024, 2); - $newpath = str_replace ('//', '/', $newpath); - $newpath = str_replace ("\\", "/", $newpath); - $htmlfilelist .= "
\n"; - $htmlfilelist .= ""; - $htmlfilelist .= "".$filename."\n"; - $htmlfilelist .= "
\n"; - } - } - - closedir($dirlist); - return $htmldirlist ."\n". $htmlfilelist; - } - -//get the directory - if (!isset($_SESSION)) { session_start(); } - switch ($_SESSION["app"]["edit"]["dir"]) { - case 'scripts': - $edit_directory = $_SESSION['switch']['scripts']['dir']; - break; - case 'php': - $edit_directory = $_SERVER["DOCUMENT_ROOT"].'/'.PROJECT_PATH; - break; - case 'grammar': - $edit_directory = $_SESSION['switch']['grammar']['dir']; - break; - case 'provision': - switch (PHP_OS) { - case "Linux": - if (file_exists('/etc/fusionpbx/resources/templates/provision')) { - $edit_directory = '/etc/fusionpbx/resources/templates/provision'; - } - else { - $edit_directory = $_SERVER["DOCUMENT_ROOT"].PROJECT_PATH."/resources/templates/provision/"; - } - break; - case "FreeBSD": - if (file_exists('/usr/local/etc/fusionpbx/resources/templates/provision')) { - $edit_directory = $_SERVER["DOCUMENT_ROOT"].PROJECT_PATH."/resources/templates/provision/"; - } - else { - $edit_directory = $_SERVER["DOCUMENT_ROOT"].PROJECT_PATH."/resources/templates/provision/"; - } - break; - case "NetBSD": - $edit_directory = $_SERVER["DOCUMENT_ROOT"].PROJECT_PATH."/resources/templates/provision/"; - break; - case "OpenBSD": - $edit_directory = $_SERVER["DOCUMENT_ROOT"].PROJECT_PATH."/resources/templates/provision/"; - break; - default: - $edit_directory = $_SERVER["DOCUMENT_ROOT"].PROJECT_PATH."/resources/templates/provision/"; - } - break; - case 'xml': - $edit_directory = $_SESSION['switch']['conf']['dir']; - break; - } - if (!isset($edit_directory)) { - foreach ($_SESSION['editor']['path'] as $path) { - if ($_SESSION["app"]["edit"]["dir"] == $path) { - $edit_directory = $path; - break; - } - } - } - -//define ajax functions -echo ""; - - -echo ""; - -// keyboard shortcut bindings -echo "\n"; -echo "\n"; - -//save file -key_press('ctrl+s', 'down', 'window', null, null, "parent.$('form#frm_edit').submit(); return false;", true); - -//open file manager/clip library pane -key_press('ctrl+q', 'down', 'window', null, null, 'parent.toggle_sidebar(); parent.focus_editor(); return false;', true); - -//prevent backspace (browser history back) -key_press('backspace', 'down', 'window', null, null, 'return false;', true); - -echo "\n"; -echo "\n"; - -echo "\n"; -echo "
\n"; -if (file_exists($edit_directory)) { - echo recur_dir($edit_directory); -} -echo "
\n"; - -require_once "footer.php"; - -unset ($result_count); -unset ($result); -unset ($key); -unset ($val); -unset ($c); - -?> diff --git a/app/edit/file_new.php b/app/edit/file_new.php deleted file mode 100644 index 0659d96314..0000000000 --- a/app/edit/file_new.php +++ /dev/null @@ -1,119 +0,0 @@ - - Portions created by the Initial Developer are Copyright (C) 2008-2019 - the Initial Developer. All Rights Reserved. - - Contributor(s): - Mark J Crane - James Rose -*/ - -//disable this feature - exit; - -//includes - include "root.php"; - require_once "resources/require.php"; - require_once "resources/check_auth.php"; - -//check permissions - if (permission_exists('edit_save')) { - //access granted - } - else { - echo "access denied"; - exit; - } - -//add multi-lingual support - $language = new text; - $text = $language->get(); - -//handle the directory and file - $folder = $_REQUEST["folder"]; - $folder = str_replace ("\\", "/", $folder); - if (substr($folder, -1) != "/") { $folder = $folder.'/'; } - $file = $_REQUEST["file"]; - -//write the file or show the html form - if (strlen($folder) > 0 && strlen($file) > 0) { - //compare the tokens - $key_name = '/app/edit/file_new'; - $hash = hash_hmac('sha256', $key_name, $_SESSION['keys'][$key_name]); - if (!hash_equals($hash, $_POST['token'])) { - echo "access denied"; - exit; - } - - //create new file - $handle = fopen($folder.$file, 'wb') or die("Error!!"); - $content = ""; - fwrite($handle, $content); - fclose($handle); - header("Location: file_options.php"); - } - else { - //create a token - $key_name = '/app/edit/file_new'; - $_SESSION['keys'][$key_name] = bin2hex(random_bytes(32)); - $_SESSION['token'] = hash_hmac('sha256', $key_name, $_SESSION['keys'][$key_name]); - - //include the header - require_once "header.php"; - - //show the content - echo "
"; - echo "
"; - echo "
"; - echo ""; - echo " "; - echo " "; - echo " "; - echo " "; - echo " "; - echo " "; - echo "
Path:
".$folder.$file."
"; - - echo "
"; - - echo ""; - echo " "; - echo " "; - echo " "; - - echo " "; - echo " "; - echo " "; - - echo " "; - echo " "; - echo " "; - echo "
".$text['label-file-name']."
"; - echo " "; - echo " "; - echo " "; - echo "
"; - echo "
"; - echo "
"; - - require_once "footer.php"; - } - -?> diff --git a/app/edit/file_options.php b/app/edit/file_options.php deleted file mode 100644 index a3e15fd861..0000000000 --- a/app/edit/file_options.php +++ /dev/null @@ -1,90 +0,0 @@ - - Portions created by the Initial Developer are Copyright (C) 2008-2019 - the Initial Developer. All Rights Reserved. - - Contributor(s): - Mark J Crane - James Rose -*/ - -//includes - include "root.php"; - require_once "resources/require.php"; - require_once "resources/check_auth.php"; - -//check permissions - if (permission_exists('edit_save')) { - //access granted - } - else { - echo "access denied"; - exit; - } - -//add multi-lingual support - $language = new text; - $text = $language->get(); - -//set the title and include the header - $title = $text['title-manage-files']; - require_once "header.php"; - -//set the variables - $file = $_GET["file"]; - $file = str_replace ("\\", "/", $file); - $folder = $_GET["folder"]; - $folder = str_replace ($file, "", $folder); - $urlpath = str_replace ($_SERVER["DOCUMENT_ROOT"], "", $folder); - -//show the content - echo "\n"; - echo " "; - echo " \n"; - echo " \n"; - echo " \n"; - echo " \n"; - echo " \n"; - echo " \n"; - echo "
"; - echo " "; - echo " "; - echo " \n"; - echo " \n"; - echo " "; - echo "
".$text['label-path']."
".$text['label-file']."
"; - echo "
"; - echo " "; - echo " "; - echo " "; - echo " \n"; - echo " \n"; - echo " \n"; - echo " \n"; - echo " \n"; - echo " \n"; - echo " \n"; - echo "
 
"; - echo "
"; - -//include the footer - require_once "footer.php"; - -?> diff --git a/app/edit/file_options_list.php b/app/edit/file_options_list.php deleted file mode 100644 index 63d3148698..0000000000 --- a/app/edit/file_options_list.php +++ /dev/null @@ -1,254 +0,0 @@ - - Portions created by the Initial Developer are Copyright (C) 2008-2019 - the Initial Developer. All Rights Reserved. - - Contributor(s): - Mark J Crane - James Rose -*/ - -//includes - include "root.php"; - require_once "resources/require.php"; - require_once "resources/check_auth.php"; - -//check permissions - if (permission_exists('edit_view')) { - //access granted - } - else { - echo "access denied"; - exit; - } - -//add multi-lingual support - $language = new text; - $text = $language->get(); - -//include - require_once "header.php"; - -//define function recure_dir - function recur_dir($dir) { - clearstatcache(); - $htmldirlist = ''; - $htmlfilelist = ''; - $dirlist = opendir($dir); - $dir_array = array(); - if($dirlist !== false) while (false !== ($file = readdir($dirlist))) { - if ($file != "." AND $file != ".."){ - $newpath = $dir.'/'.$file; - $level = explode('/',$newpath); - if ( - substr(strtolower($newpath), -4) == ".svn" || - substr(strtolower($newpath), -4) == ".git" || - substr(strtolower($newpath), -3) == ".db" || - substr(strtolower($newpath), -4) == ".jpg" || - substr(strtolower($newpath), -4) == ".gif" || - substr(strtolower($newpath), -4) == ".png" || - substr(strtolower($newpath), -4) == ".ico" || - substr(strtolower($newpath), -4) == ".ttf" - ){ - //ignore certain files (and folders) - } - else { - $dir_array[] = $newpath; - } - if ($x > 1000) { break; }; - $x++; - } - } - - asort($dir_array); - foreach ($dir_array as $newpath){ - $level = explode('/',$newpath); - - if (is_dir($newpath)) { - $dirname = end($level); - $newpath = str_replace ('//', '/', $newpath); - $htmldirlist .= " - - - - -
- ".$dirname."
".recur_dir($newpath)."
-
\n"; - } - else { - $filename = end($level); - $filesize = round(filesize($newpath)/1024, 2); - $newpath = str_replace ('//', '/', $newpath); - $newpath = str_replace ("\\", "/", $newpath); - $newpath = str_replace ($filename, '', $newpath); - $htmlfilelist .= " - - - - -
- ".$filename." -
\n"; - } - } - - closedir($dirlist); - return $htmldirlist ."\n". $htmlfilelist; - } - -echo "\n"; - -echo "\n"; - -echo "\n"; -echo "\n"; - -echo "
\n"; - -if (!isset($_SESSION)) { session_start(); } -//get the directory - if (!isset($_SESSION)) { session_start(); } - switch ($_SESSION["app"]["edit"]["dir"]) { - case 'scripts': - $edit_directory = $_SESSION['switch']['scripts']['dir']; - break; - case 'php': - $edit_directory = $_SERVER["DOCUMENT_ROOT"].'/'.PROJECT_PATH; - break; - case 'grammar': - $edit_directory = $_SESSION['switch']['grammar']['dir']; - break; - case 'provision': - switch (PHP_OS) { - case "Linux": - if (file_exists('/etc/fusionpbx/resources/templates/provision')) { - $edit_directory = '/etc/fusionpbx/resources/templates/provision'; - } - else { - $edit_directory = $_SERVER["DOCUMENT_ROOT"].PROJECT_PATH."/resources/templates/provision/"; - } - break; - case "FreeBSD": - if (file_exists('/usr/local/etc/fusionpbx/resources/templates/provision')) { - $edit_directory = $_SERVER["DOCUMENT_ROOT"].PROJECT_PATH."/resources/templates/provision/"; - } - else { - $edit_directory = $_SERVER["DOCUMENT_ROOT"].PROJECT_PATH."/resources/templates/provision/"; - } - break; - case "NetBSD": - $edit_directory = $_SERVER["DOCUMENT_ROOT"].PROJECT_PATH."/resources/templates/provision/"; - break; - case "OpenBSD": - $edit_directory = $_SERVER["DOCUMENT_ROOT"].PROJECT_PATH."/resources/templates/provision/"; - break; - default: - $edit_directory = $_SERVER["DOCUMENT_ROOT"].PROJECT_PATH."/resources/templates/provision/"; - } - break; - case 'xml': - $edit_directory = $_SESSION['switch']['conf']['dir']; - break; - } - if (file_exists($edit_directory)) { - echo recur_dir($edit_directory); - } - -echo "
\n"; - -require_once "footer.php"; - -?> diff --git a/app/edit/file_read.php b/app/edit/file_read.php deleted file mode 100644 index fdf5e81de7..0000000000 --- a/app/edit/file_read.php +++ /dev/null @@ -1,120 +0,0 @@ - - Portions created by the Initial Developer are Copyright (C) 2008-2019 - the Initial Developer. All Rights Reserved. - - Contributor(s): - Mark J Crane -*/ - -//includes - include "root.php"; - require_once "resources/require.php"; - require_once "resources/check_auth.php"; - -//check permissions - if (permission_exists('edit_view')) { - //access granted - } - else { - echo "access denied"; - exit; - } - -//get the directory - if (!isset($_SESSION)) { session_start(); } - switch ($_SESSION["app"]["edit"]["dir"]) { - case 'scripts': - $edit_directory = $_SESSION['switch']['scripts']['dir']; - break; - case 'php': - $edit_directory = $_SERVER["DOCUMENT_ROOT"].'/'.PROJECT_PATH; - break; - case 'grammar': - $edit_directory = $_SESSION['switch']['grammar']['dir']; - break; - case 'provision': - switch (PHP_OS) { - case "Linux": - if (file_exists('/etc/fusionpbx/resources/templates/provision')) { - $edit_directory = '/etc/fusionpbx/resources/templates/provision'; - } - else { - $edit_directory = $_SERVER["DOCUMENT_ROOT"].PROJECT_PATH."/resources/templates/provision/"; - } - break; - case "FreeBSD": - if (file_exists('/usr/local/etc/fusionpbx/resources/templates/provision')) { - $edit_directory = $_SERVER["DOCUMENT_ROOT"].PROJECT_PATH."/resources/templates/provision/"; - } - else { - $edit_directory = $_SERVER["DOCUMENT_ROOT"].PROJECT_PATH."/resources/templates/provision/"; - } - break; - case "NetBSD": - $edit_directory = $_SERVER["DOCUMENT_ROOT"].PROJECT_PATH."/resources/templates/provision/"; - break; - case "OpenBSD": - $edit_directory = $_SERVER["DOCUMENT_ROOT"].PROJECT_PATH."/resources/templates/provision/"; - break; - default: - $edit_directory = $_SERVER["DOCUMENT_ROOT"].PROJECT_PATH."/resources/templates/provision/"; - } - break; - case 'xml': - $edit_directory = $_SESSION['switch']['conf']['dir']; - break; - } - if (!isset($edit_directory)) { - foreach ($_SESSION['editor']['path'] as $path) { - if ($_SESSION["app"]["edit"]["dir"] == $path) { - $edit_directory = $path; - break; - } - } - } - -//set the file variable - $file_name = $_POST["file"]; - -//remove attempts to change the directory - $file_name = str_replace('..', '', $file_name); - $file_name = str_replace ("\\", "/", $file_name); - -//break the path into an array - $path_array = pathinfo($file_name); - $path_prefix = substr($path_array['dirname'], 0, strlen($edit_directory)); - -//validate the path - if (realpath($path_prefix) == realpath($edit_directory)) { - - //get the contents of the file - $handle = fopen($file_name, "r"); - if ($handle) { - while (!feof($handle)) { - $buffer = fgets($handle, 4096); - echo $buffer; - } - fclose($handle); - } - - } - -?> diff --git a/app/edit/file_rename.php b/app/edit/file_rename.php deleted file mode 100644 index dea1c228c2..0000000000 --- a/app/edit/file_rename.php +++ /dev/null @@ -1,129 +0,0 @@ - - Portions created by the Initial Developer are Copyright (C) 2008-2019 - the Initial Developer. All Rights Reserved. - - Contributor(s): - Mark J Crane - James Rose -*/ - -//disable this feature - exit; - -//includes - include "root.php"; - require_once "resources/require.php"; - require_once "resources/check_auth.php"; - -//check permissions - if (permission_exists('edit_save')) { - //access granted - } - else { - echo "access denied"; - exit; - } - -//add multi-lingual support - $language = new text; - $text = $language->get(); - -//set the variables - $folder = $_REQUEST["folder"]; - //$folder = str_replace ("\\", "/", $folder); - //if (substr($folder, -1) != "/") { $folder = $folder.'/'; } - $new_file_name = $_REQUEST["new_file_name"]; - $fil_ename = $_REQUEST["filename"]; - -//rename the file or show the html form - if (strlen($folder) > 0 && strlen($newfilename) > 0) { - //compare the tokens - $key_name = '/app/edit/file_new'; - $hash = hash_hmac('sha256', $key_name, $_SESSION['keys'][$key_name]); - if (!hash_equals($hash, $_POST['token'])) { - echo "access denied"; - exit; - } - - //rename the file - //echo "new file: ".$newfilename."
"; - //echo "folder: ".$folder."
"; - //echo "orig filename: ".$file_name."
";; - rename($folder.$file_name, $folder.$new_file_name); - header("Location: file_options.php"); - } - else { - //create the token - $key_name = '/app/edit/file_new'; - $_SESSION['keys'][$key_name] = bin2hex(random_bytes(32)); - $_SESSION['token'] = hash_hmac('sha256', $key_name, $_SESSION['keys'][$key_name]); - - //display the form - require_once "header.php"; - echo "
"; - echo "
"; - echo "
"; - echo ""; - echo " "; - echo " "; - echo " "; - echo " "; - echo " "; - echo " "; - echo " "; - echo " "; - echo " "; - echo " "; - echo " "; - echo " "; - echo " "; - echo " "; - echo " "; - echo "
".$text['label-path']."
".escape($folder.$file_name)."

".$text['label-file-name-orig']."
".escape($file_name)."
"; - - echo "
"; - - echo ""; - echo " "; - echo " "; - echo " "; - - echo " "; - echo " "; - echo " "; - - echo " "; - echo " "; - echo " "; - echo "
".$text['label-rename-file-to']."
"; - echo " "; - echo " "; - echo " "; - echo " "; - echo "
"; - echo "
"; - echo "
"; - - require_once "footer.php"; - - } - -?> diff --git a/app/edit/file_save.php b/app/edit/file_save.php deleted file mode 100644 index 520516db9e..0000000000 --- a/app/edit/file_save.php +++ /dev/null @@ -1,148 +0,0 @@ - - Portions created by the Initial Developer are Copyright (C) 2008-2019 - the Initial Developer. All Rights Reserved. - - Contributor(s): - Mark J Crane - James Rose -*/ - -//includes - include "root.php"; - require_once "resources/require.php"; - require_once "resources/check_auth.php"; - -//check permissions - if (permission_exists('edit_save')) { - //access granted - } - else { - echo "access denied"; - exit; - } - -//add multi-lingual support - $language = new text; - $text = $language->get(); - -//compare the tokens - $key_name = '/app/edit/'.$_POST['mode']; - $hash = hash_hmac('sha256', $key_name, $_SESSION['keys'][$key_name]); - if (!hash_equals($hash, $_POST['token'])) { - echo "access denied"; - exit; - } - -//get the directory - if (!isset($_SESSION)) { session_start(); } - switch ($_SESSION["app"]["edit"]["dir"]) { - case 'scripts': - $edit_directory = $_SESSION['switch']['scripts']['dir']; - break; - case 'php': - $edit_directory = $_SERVER["DOCUMENT_ROOT"].'/'.PROJECT_PATH; - break; - case 'grammar': - $edit_directory = $_SESSION['switch']['grammar']['dir']; - break; - case 'provision': - switch (PHP_OS) { - case "Linux": - if (file_exists('/etc/fusionpbx/resources/templates/provision')) { - $edit_directory = '/etc/fusionpbx/resources/templates/provision'; - } - else { - $edit_directory = $_SERVER["DOCUMENT_ROOT"].PROJECT_PATH."/resources/templates/provision/"; - } - break; - case "FreeBSD": - if (file_exists('/usr/local/etc/fusionpbx/resources/templates/provision')) { - $edit_directory = $_SERVER["DOCUMENT_ROOT"].PROJECT_PATH."/resources/templates/provision/"; - } - else { - $edit_directory = $_SERVER["DOCUMENT_ROOT"].PROJECT_PATH."/resources/templates/provision/"; - } - break; - case "NetBSD": - $edit_directory = $_SERVER["DOCUMENT_ROOT"].PROJECT_PATH."/resources/templates/provision/"; - break; - case "OpenBSD": - $edit_directory = $_SERVER["DOCUMENT_ROOT"].PROJECT_PATH."/resources/templates/provision/"; - break; - default: - $edit_directory = $_SERVER["DOCUMENT_ROOT"].PROJECT_PATH."/resources/templates/provision/"; - } - break; - case 'xml': - $edit_directory = $_SESSION['switch']['conf']['dir']; - break; - } - if (!isset($edit_directory)) { - foreach ($_SESSION['editor']['path'] as $path) { - if ($_SESSION["app"]["edit"]["dir"] == $path) { - $edit_directory = $path; - break; - } - } - } - -//set the file variable - $file_path = $_POST["filepath"]; - -//remove attempts to change the directory - $file_path = str_replace('..', '', $file_path); - $file_path = str_replace ("\\", "/", $file_path); - -//break the path into an array - $path_array = pathinfo($file_path); - $path_prefix = substr($path_array['dirname'], 0, strlen($edit_directory)); - -//validate the path - if (realpath($path_prefix) == realpath($edit_directory)) { - if ($file_path != '') { - try { - //save file content - $file_path = realpath($file_path); - $file_path = str_replace ('//', '/', $file_path); - $file_path = str_replace ("\\", "/", $file_path); - if (file_exists($file_path)) { - $handle = fopen($file_path, 'wb'); - if (!$handle) { - throw new Exception('Write Failed - Check File Owner & Permissions'); - } - fwrite($handle, $_POST["content"]); - fclose($handle); - } - - //set the reload_xml value to true - $_SESSION["reload_xml"] = true; - - //alert user of success - echo "Changes Saved"; - } - catch(Exception $e) { - //alert error - echo $e->getMessage(); - } - } - } - -?> diff --git a/app/edit/folder_delete.php b/app/edit/folder_delete.php deleted file mode 100644 index 12fe7b5f21..0000000000 --- a/app/edit/folder_delete.php +++ /dev/null @@ -1,98 +0,0 @@ - - Portions created by the Initial Developer are Copyright (C) 2008-2019 - the Initial Developer. All Rights Reserved. - - Contributor(s): - Mark J Crane -*/ - -//disable this feature - exit; - -//includes - include "root.php"; - require_once "resources/require.php"; - require_once "resources/check_auth.php"; - -//check the permissions - if (permission_exists('edit_save')) { - //access granted - } - else { - echo "access denied"; - exit; - } - -//set the variables - $folder = $_GET["folder"]; - $folder = str_replace ("\\", "/", $folder); - -//delete the directory - if (strlen($folder) > 0 && isset($_POST['token'])) { - //compare the tokens - $key_name = '/app/edit/folder_delete'; - $hash = hash_hmac('sha256', $key_name, $_SESSION['keys'][$key_name]); - if (!hash_equals($hash, $_POST['token'])) { - echo "access denied"; - exit; - } - - //delete the folder - rmdir($folder); //, 0700 - header("Location: file_options.php"); - } - else { - //create the token - $key_name = '/app/edit/folder_delete'; - $_SESSION['keys'][$key_name] = bin2hex(random_bytes(32)); - $_SESSION['token'] = hash_hmac('sha256', $key_name, $_SESSION['keys'][$key_name]); - - //display form - require_once "header.php"; - echo "
"; - echo "
"; - echo "
"; - echo " "; - echo " "; - echo " "; - echo " "; - echo " "; - echo " "; - echo " "; - echo "
".$text['label-path']."
".$folder."
"; - echo "
"; - echo " "; - echo " "; - echo " "; - echo " "; - echo "
"; - echo " "; - echo " "; - echo " "; - echo "
"; - echo "
"; - echo "
"; - - //include the footer - require_once "footer.php"; - } - -?> diff --git a/app/edit/folder_new.php b/app/edit/folder_new.php deleted file mode 100644 index 53503100e6..0000000000 --- a/app/edit/folder_new.php +++ /dev/null @@ -1,118 +0,0 @@ - - Portions created by the Initial Developer are Copyright (C) 2008-2019 - the Initial Developer. All Rights Reserved. - - Contributor(s): - Mark J Crane - James Rose -*/ - -//disable this feature - exit; - -//includes - include "root.php"; - require_once "resources/require.php"; - require_once "resources/check_auth.php"; - -//check permissions - if (permission_exists('edit_save')) { - //access granted - } - else { - echo "access denied"; - exit; - } - -//add multi-lingual support - $language = new text; - $text = $language->get(); - -//preparing the directory - $folder = $_REQUEST["folder"]; - $folder = str_replace ("\\", "/", $folder); - $foldername = $_REQUEST["foldername"]; - -//create the directory or show the html form - if (strlen($folder) > 0 && strlen($foldername) > 0) { - - //compare the tokens - $key_name = '/app/edit/folder_new'; - $hash = hash_hmac('sha256', $key_name, $_SESSION['keys'][$key_name]); - if (!hash_equals($hash, $_POST['token'])) { - echo "access denied"; - exit; - } - - //create new folder - mkdir($folder.'/'.$foldername); //, 0700 - header("Location: file_options.php"); - } - else { - - //create a token - $key_name = '/app/edit/folder_new'; - $_SESSION['keys'][$key_name] = bin2hex(random_bytes(32)); - $_SESSION['token'] = hash_hmac('sha256', $key_name, $_SESSION['keys'][$key_name]); - - //show the footer - require_once "header.php"; - - //show the content - echo "
"; - echo "
"; - echo "
"; - echo ""; - echo " "; - echo " "; - echo " "; - echo " "; - echo " "; - echo " "; - echo "
".$text['label-path']."
".$folder."
"; - - echo "
"; - - echo ""; - echo " "; - echo " "; - echo " "; - - echo " "; - echo " "; - echo " "; - - echo " "; - echo " "; - echo " "; - echo "
".$text['label-folder-name']."
"; - echo " "; - echo " "; - echo " "; - echo "
"; - echo "
"; - echo "
"; - - //show the footer - require_once "footer.php"; - } - -?> diff --git a/app/edit/footer.php b/app/edit/footer.php deleted file mode 100644 index 45fff9c89f..0000000000 --- a/app/edit/footer.php +++ /dev/null @@ -1,31 +0,0 @@ - - Portions created by the Initial Developer are Copyright (C) 2008-2012 - the Initial Developer. All Rights Reserved. - - Contributor(s): - Mark J Crane -*/ - -echo "
"; -echo ""; -echo ""; - -?> \ No newline at end of file diff --git a/app/edit/header.php b/app/edit/header.php deleted file mode 100644 index 5bd754a763..0000000000 --- a/app/edit/header.php +++ /dev/null @@ -1,88 +0,0 @@ - - Portions created by the Initial Developer are Copyright (C) 2008-2012 - the Initial Developer. All Rights Reserved. - - Contributor(s): - Mark J Crane - James Rose -*/ - -//add multi-lingual support - $language = new text; - $text = $language->get(); - -echo ""; -echo ""; -echo "".$title.""; -//echo ""; -echo ""; - - -echo ""; -echo ""; -echo ""; -echo "
"; - -?> \ No newline at end of file diff --git a/app/edit/index.php b/app/edit/index.php deleted file mode 100644 index 786ae94ccc..0000000000 --- a/app/edit/index.php +++ /dev/null @@ -1,354 +0,0 @@ - - Portions created by the Initial Developer are Copyright (C) 2008-2019 - the Initial Developer. All Rights Reserved. - - Contributor(s): - Mark J Crane - James Rose -*/ -//includes - include "root.php"; - require_once "resources/require.php"; - require_once "resources/check_auth.php"; - -//check permissions - if (permission_exists('edit_view')) { - //access granted - } - else { - echo "access denied"; - exit; - } - -//add multi-lingual support - $language = new text; - $text = $language->get(); - -//set the directory title and mode - $_SESSION["app"]["edit"]["dir"] = $_GET["dir"]; - $title = escape($_GET["dir"]); - unset($mode); - switch ($_GET["dir"]) { - 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'; - } - -//load editor preferences/defaults - $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_invisibles = ($_SESSION["editor"]["invisibles"]["boolean"] != '') ? $_SESSION["editor"]["invisibles"]["boolean"] : 'false'; - $setting_indenting = ($_SESSION["editor"]["indent_guides"]["boolean"] != '') ? $_SESSION["editor"]["indent_guides"]["boolean"] : 'false'; - $setting_numbering = ($_SESSION["editor"]["line_numbers"]["boolean"] != '') ? $_SESSION["editor"]["line_numbers"]["boolean"] : 'true'; - -//get and then set the favicon - if (isset($_SESSION['theme']['favicon']['text'])){ - $favicon = $_SESSION['theme']['favicon']['text']; - } - else { - $favicon = $project_path .'/themes/default/favicon.ico'; - } - -//create a token - $key_name = '/app/edit/'.$mode; - $_SESSION['keys'][$key_name] = bin2hex(random_bytes(32)); - $_SESSION['token'] = hash_hmac('sha256', $key_name, $_SESSION['keys'][$key_name]); - -//generate the captcha image - $_SESSION['captcha'] = generate_password(7, 2); - $captcha = new captcha; - $captcha->code = $_SESSION['captcha']; - $image_base64 = $captcha->image_base64(); - -?> - - - - - <?php echo $title; ?> - - - - - - - - - - - - -
-
- - - '> - - - - - - - - - - - - - - - - -
- - - - - -
-
-
-
- - - - - - diff --git a/app/edit/readme.txt b/app/edit/readme.txt deleted file mode 100644 index cafc4144ae..0000000000 --- a/app/edit/readme.txt +++ /dev/null @@ -1,7 +0,0 @@ -Notes - -IFrame -http://www.quirksmode.org/js/iframe.html - -Tree View -http://www.dddekerf.dds.nl/DHTML_Treeview/DHTML_Treeview.htm \ No newline at end of file diff --git a/app/edit/resources/images/blank.gif b/app/edit/resources/images/blank.gif deleted file mode 100644 index 75b945d255..0000000000 Binary files a/app/edit/resources/images/blank.gif and /dev/null differ diff --git a/app/edit/resources/images/icon_file.png b/app/edit/resources/images/icon_file.png deleted file mode 100644 index c8d71de0c4..0000000000 Binary files a/app/edit/resources/images/icon_file.png and /dev/null differ diff --git a/app/edit/resources/images/icon_folder.png b/app/edit/resources/images/icon_folder.png deleted file mode 100644 index 7efc21fe2e..0000000000 Binary files a/app/edit/resources/images/icon_folder.png and /dev/null differ diff --git a/app/edit/resources/images/icon_gear.png b/app/edit/resources/images/icon_gear.png deleted file mode 100644 index 0fde59125d..0000000000 Binary files a/app/edit/resources/images/icon_gear.png and /dev/null differ diff --git a/app/edit/resources/images/icon_goto.png b/app/edit/resources/images/icon_goto.png deleted file mode 100644 index 89f5d28531..0000000000 Binary files a/app/edit/resources/images/icon_goto.png and /dev/null differ diff --git a/app/edit/resources/images/icon_indenting.png b/app/edit/resources/images/icon_indenting.png deleted file mode 100644 index c6d4c733f1..0000000000 Binary files a/app/edit/resources/images/icon_indenting.png and /dev/null differ diff --git a/app/edit/resources/images/icon_invisibles.png b/app/edit/resources/images/icon_invisibles.png deleted file mode 100644 index 9e2973bb6e..0000000000 Binary files a/app/edit/resources/images/icon_invisibles.png and /dev/null differ diff --git a/app/edit/resources/images/icon_numbering.png b/app/edit/resources/images/icon_numbering.png deleted file mode 100644 index 305144c8d4..0000000000 Binary files a/app/edit/resources/images/icon_numbering.png and /dev/null differ diff --git a/app/edit/resources/images/icon_replace.png b/app/edit/resources/images/icon_replace.png deleted file mode 100644 index 4b2ec21788..0000000000 Binary files a/app/edit/resources/images/icon_replace.png and /dev/null differ diff --git a/app/edit/resources/images/icon_save.png b/app/edit/resources/images/icon_save.png deleted file mode 100644 index bccf65520a..0000000000 Binary files a/app/edit/resources/images/icon_save.png and /dev/null differ diff --git a/app/edit/resources/images/icon_sidebar.png b/app/edit/resources/images/icon_sidebar.png deleted file mode 100644 index 56276e6978..0000000000 Binary files a/app/edit/resources/images/icon_sidebar.png and /dev/null differ diff --git a/app/edit/root.php b/app/edit/root.php deleted file mode 100644 index 6fdf32f37b..0000000000 --- a/app/edit/root.php +++ /dev/null @@ -1,90 +0,0 @@ - - Portions created by the Initial Developer are Copyright (C) 2008-2012 - the Initial Developer. All Rights Reserved. - - Contributor(s): - Mark J Crane -*/ - -// make sure the PATH_SEPARATOR is defined - umask(2); - if (!defined("PATH_SEPARATOR")) { - if (strpos($_ENV["OS"], "Win") !== false) { - define("PATH_SEPARATOR", ";"); - } else { - define("PATH_SEPARATOR", ":"); - } - } - - if (!isset($output_format)) $output_format = (PHP_SAPI == 'cli') ? 'text' : 'html'; - - // make sure the document_root is set - $_SERVER["SCRIPT_FILENAME"] = str_replace("\\", '/', $_SERVER["SCRIPT_FILENAME"]); - if(PHP_SAPI == 'cli'){ - chdir(pathinfo(realpath($_SERVER["PHP_SELF"]), PATHINFO_DIRNAME)); - $script_full_path = str_replace("\\", '/', getcwd() . '/' . $_SERVER["SCRIPT_FILENAME"]); - $dirs = explode('/', pathinfo($script_full_path, PATHINFO_DIRNAME)); - if (file_exists('/project_root.php')) { - $path = '/'; - } else { - $i = 1; - $path = ''; - while ($i < count($dirs)) { - $path .= '/' . $dirs[$i]; - if (file_exists($path. '/project_root.php')) { - break; - } - $i++; - } - } - $_SERVER["DOCUMENT_ROOT"] = $path; - }else{ - $_SERVER["DOCUMENT_ROOT"] = str_replace($_SERVER["PHP_SELF"], "", $_SERVER["SCRIPT_FILENAME"]); - } - $_SERVER["DOCUMENT_ROOT"] = realpath($_SERVER["DOCUMENT_ROOT"]); -// try to detect if a project path is being used - if (!defined('PROJECT_PATH')) { - if (is_dir($_SERVER["DOCUMENT_ROOT"]. '/fusionpbx')) { - define('PROJECT_PATH', '/fusionpbx'); - } elseif (file_exists($_SERVER["DOCUMENT_ROOT"]. '/project_root.php')) { - define('PROJECT_PATH', ''); - } else { - $dirs = explode('/', str_replace('\\', '/', pathinfo($_SERVER["PHP_SELF"], PATHINFO_DIRNAME))); - $i = 1; - $path = $_SERVER["DOCUMENT_ROOT"]; - while ($i < count($dirs)) { - $path .= '/' . $dirs[$i]; - if (file_exists($path. '/project_root.php')) { - break; - } - $i++; - } - if(!file_exists($path. '/project_root.php')){ - die("Failed to locate the Project Root by searching for project_root.php please contact support for assistance"); - } - $project_path = str_replace($_SERVER["DOCUMENT_ROOT"], "", $path); - define('PROJECT_PATH', $project_path); - } - $_SERVER["PROJECT_ROOT"] = realpath($_SERVER["DOCUMENT_ROOT"] . PROJECT_PATH); - set_include_path(get_include_path() . PATH_SEPARATOR . $_SERVER["PROJECT_ROOT"]); - } - -?> \ No newline at end of file