diff --git a/app/grammar_edit/app_config.php b/app/grammar_edit/app_config.php deleted file mode 100644 index 0db48ad0ed..0000000000 --- a/app/grammar_edit/app_config.php +++ /dev/null @@ -1,46 +0,0 @@ - \ No newline at end of file diff --git a/app/grammar_edit/clipadd.php b/app/grammar_edit/clipadd.php deleted file mode 100644 index 044f922b9b..0000000000 --- a/app/grammar_edit/clipadd.php +++ /dev/null @@ -1,126 +0,0 @@ - - Portions created by the Initial Developer are Copyright (C) 2008-2012 - the Initial Developer. All Rights Reserved. - - Contributor(s): - Mark J Crane -*/ -include "root.php"; -require_once "includes/require.php"; -require_once "includes/checkauth.php"; -if (permission_exists('grammar_save')) { - //access granted -} -else { - echo "access denied"; - exit; -} - -if (count($_POST)>0) { - $clip_name = check_str($_POST["clip_name"]); - $clip_folder = check_str($_POST["clip_folder"]); - $clip_text_start = check_str($_POST["clip_text_start"]); - $clip_text_end = check_str($_POST["clip_text_end"]); - $clip_desc = check_str($_POST["clip_desc"]); - $clip_order = check_str($_POST["clip_order"]); - if (strlen($clip_order) == 0) { $clip_order = 0; } - - $sql = "insert into v_clips "; - $sql .= "("; - $sql .= "clip_uuid, "; - $sql .= "clip_name, "; - $sql .= "clip_folder, "; - $sql .= "clip_text_start, "; - $sql .= "clip_text_end, "; - $sql .= "clip_desc, "; - $sql .= "clip_order "; - $sql .= ")"; - $sql .= "values "; - $sql .= "("; - $sql .= "'".uuid()."', "; - $sql .= "'$clip_name', "; - $sql .= "'$clip_folder', "; - $sql .= "'$clip_text_start', "; - $sql .= "'$clip_text_end', "; - $sql .= "'$clip_desc', "; - $sql .= "'$clip_order' "; - $sql .= ")"; - $db->exec(check_sql($sql)); - unset($sql,$db); - - require_once "header.php"; - echo "\n"; - echo "Add Complete"; - require_once "footer.php"; - return; -} - -//show the content - require_once "header.php"; - echo "
"; - echo "\n"; - echo "\n"; - echo " "; - echo " "; - echo "
\n"; - - //echo "Clip Library"; - //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 "
"; - - require_once "footer.php"; -?> \ No newline at end of file diff --git a/app/grammar_edit/clipdelete.php b/app/grammar_edit/clipdelete.php deleted file mode 100644 index 63951df09a..0000000000 --- a/app/grammar_edit/clipdelete.php +++ /dev/null @@ -1,56 +0,0 @@ - - Portions created by the Initial Developer are Copyright (C) 2008-2012 - the Initial Developer. All Rights Reserved. - - Contributor(s): - Mark J Crane -*/ -include "root.php"; -require_once "includes/require.php"; -require_once "includes/checkauth.php"; -if (permission_exists('grammar_save')) { - //access granted -} -else { - echo "access denied"; - exit; -} - -//get the uuid from http values - $clip_uuid = check_str($_GET["id"]); - -//delete the clip - if (strlen($_GET["id"])>0) { - $sql = "delete from v_clips "; - $sql .= "where clip_uuid = '".$clip_uuid."' "; - $prep_statement = $db->prepare(check_sql($sql)); - $prep_statement->execute(); - unset($sql,$db); - } - -//redirect the browser - require_once "header.php"; - echo "\n"; - echo "Delete Complete"; - require_once "footer.php"; - return; - -?> diff --git a/app/grammar_edit/cliplist.php b/app/grammar_edit/cliplist.php deleted file mode 100644 index 2f7c8d97f5..0000000000 --- a/app/grammar_edit/cliplist.php +++ /dev/null @@ -1,235 +0,0 @@ - - Portions created by the Initial Developer are Copyright (C) 2008-2012 - the Initial Developer. All Rights Reserved. - - Contributor(s): - Mark J Crane -*/ -include "root.php"; -require_once "includes/require.php"; -require_once "includes/checkauth.php"; -require_once "includes/checkauth.php"; -if (permission_exists('grammar_view')) { - //access granted -} -else { - echo "access denied"; - exit; -} -//require_once "edit/header.php"; - -echo ""; -echo ""; -echo ""; - -function isfile($filename) { - if (@filesize($filename) > 0) { return true; } else { return false; } -} - -function space($count) { - $r=''; $i=0; - while($i < $count) { - $r .= ' '; - $i++; - } - return $r; -} - -echo ""; - -echo ""; - -echo ""; -echo ""; -echo "
"; -echo "\n"; -echo "\n"; -echo "
\n"; -echo "
Clip Library
\n"; //display:none - -$sql = "select * from v_clips "; -$sql .= "order by clip_folder "; -$prep_statement = $db->prepare(check_sql($sql)); -$prep_statement->execute(); -$result = $prep_statement->fetchAll(PDO::FETCH_NAMED); -$result_count = count($result); - -if ($result_count > 0) { //no results - $last_folder = ''; - $tag_open = ''; - $x = 0; - $current_depth = 0; - $previous_depth = 0; - foreach($result as $row) { - $current_depth = count(explode ("/", $row['clip_folder'])); - if ($current_depth < $previous_depth) { - $count = ($previous_depth - $current_depth); - $i=0; - while($i < $count){ - echo "
\n"; - $i++; - } - echo "
\n"; - } - - if ($last_folder != $row['clip_folder']) { - $clip_folder_name = str_replace ($previous_folder_name, "", $row['clip_folder']); - $clip_folder_name = str_replace ("/", "", $clip_folder_name); - echo "
 ".$clip_folder_name."  
\n\n"; - $tag_open = 1; - } - - $previous_depth = $current_depth; - $previous_folder_name = $row['clip_folder']; - - echo "\n"; - echo "\n"; - echo "\n"; - echo "
\n"; - echo "".$row['clip_name']."\n"; - echo "
\n"; - echo "\n\n"; - - $last_folder = $row['clip_folder']; - - if ($c==0) { $c=1; } else { $c=0; } - } //end foreach - unset($sql, $result, $row_count); - -} //end if results - -echo "\n"; -echo "
\n"; - -echo "\n"; -echo "\n"; -echo "\n"; -echo "
"; - -echo "

"; -//require_once "includes/footer.php"; - -unset ($result_count); -unset ($result); -unset ($key); -unset ($val); -unset ($c); - -echo ""; -echo ""; - -?> diff --git a/app/grammar_edit/clipoptions.php b/app/grammar_edit/clipoptions.php deleted file mode 100644 index 8be0d61402..0000000000 --- a/app/grammar_edit/clipoptions.php +++ /dev/null @@ -1,71 +0,0 @@ - - Portions created by the Initial Developer are Copyright (C) 2008-2012 - the Initial Developer. All Rights Reserved. - - Contributor(s): - Mark J Crane -*/ -include "root.php"; -require_once "includes/require.php"; -require_once "includes/checkauth.php"; -if (permission_exists('grammar_view')) { - //access granted -} -else { - echo "access denied"; - exit; -} -require_once "header.php"; - -echo "
"; -echo "\n"; -echo ""; -echo "\n"; -echo ""; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "
Selected Clip:
"; -echo " "; -echo ""; - -echo " "; -//echo " \n"; -//echo " \n"; -//echo " \n"; - -echo " \n"; -echo " \n"; -//echo " \n"; -echo " \n"; -echo " \n"; - -echo " \n"; -echo "
Options











"; - -echo "
"; -echo "
"; - -require_once "footer.php"; -?> diff --git a/app/grammar_edit/clipoptionslist.php b/app/grammar_edit/clipoptionslist.php deleted file mode 100644 index 5a5dc5b127..0000000000 --- a/app/grammar_edit/clipoptionslist.php +++ /dev/null @@ -1,228 +0,0 @@ - - Portions created by the Initial Developer are Copyright (C) 2008-2012 - the Initial Developer. All Rights Reserved. - - Contributor(s): - Mark J Crane -*/ -include "root.php"; -require_once "includes/require.php"; -require_once "includes/checkauth.php"; -if (permission_exists('grammar_view')) { - //access granted -} -else { - echo "access denied"; - exit; -} - -echo ""; -echo ""; - -echo ""; - -function isfile($filename) { - if (@filesize($filename) > 0) { return true; } else { return false; } -} - -function space($count) { - $r=''; $i=0; - while($i < $count) { - $r .= ' '; - $i++; - } - return $r; -} - -//show the content - echo ""; - - echo ""; - -echo ""; -echo ""; - - echo "
"; - echo "\n"; - - echo "\n"; - echo "
\n"; - echo "
Clip Library
\n"; //display:none - - $sql = "select * from v_clips "; - $sql .= "order by clip_folder "; - $prep_statement = $db->prepare(check_sql($sql)); - $prep_statement->execute(); - $result = $prep_statement->fetchAll(PDO::FETCH_NAMED); - $result_count = count($result); - - if ($result_count > 0) { //no results - $last_folder = ''; - $tag_open = ''; - $x = 0; - $current_depth = 0; - $previous_depth = 0; - foreach($result as $row) { - $current_depth = count(explode("/", $row[clip_folder])); - if ($current_depth < $previous_depth) { - $count = ($previous_depth - $current_depth); - $i=0; - while($i < $count){ - echo "
\n"; - $i++; - } - echo "
\n"; - - } - - if ($last_folder != $row['clip_folder']) { - $clip_folder_name = str_replace ($previous_folder_name, "", $row['clip_folder']); - $clip_folder_name = str_replace ("/", "", $clip_folder_name); - echo "
 ".$clip_folder_name."  
\n\n"; - $tag_open = 1; - } - - $previous_depth = $current_depth; - $previous_folder_name = $row['clip_folder']; - - echo "\n"; - echo "\n"; - echo "\n"; - echo "
\n"; - echo "".$row['clip_name']."\n"; - - echo "
\n"; - echo "\n\n"; - - $last_folder = $row['clip_folder']; - if ($c==0) { $c=1; } else { $c=0; } - } //end foreach - unset($sql, $result, $row_count); - } //end if results - - echo "\n"; - echo "
\n"; - - echo "\n"; - echo "\n"; - echo "\n"; - echo "
"; - - echo "

"; - - unset ($result_count); - unset ($result); - unset ($key); - unset ($val); - unset ($c); - - echo ""; - echo ""; - -?> diff --git a/app/grammar_edit/clipsearch.php b/app/grammar_edit/clipsearch.php deleted file mode 100644 index cf19239107..0000000000 --- a/app/grammar_edit/clipsearch.php +++ /dev/null @@ -1,180 +0,0 @@ - - Portions created by the Initial Developer are Copyright (C) 2008-2012 - the Initial Developer. All Rights Reserved. - - Contributor(s): - Mark J Crane -*/ -include "root.php"; -require_once "includes/checkauth.php"; -if (permission_exists('grammar_view')) { - //access granted -} -else { - echo "access denied"; - exit; -} - -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"]; - - require_once "header.php"; - echo "
"; - echo "\n"; - echo "\n"; - echo " \n"; - echo "\n"; - - } //end if results - - echo "
\n"; - echo "
"; - - $sql .= "select * from v_clips "; - $sql .= "where "; - if (strlen($clip_uuid) > 0) { $sql .= "and id = '$clip_uuid' "; } - if (strlen($clip_name) > 0) { $sql .= "and clip_name like '%$clip_name%' "; } - if (strlen($clip_folder) > 0) { $sql .= "and clip_folder like '%$clip_folder%' "; } - if (strlen($clip_text_start) > 0) { $sql .= "and clip_text_start like '%$clip_text_start%' "; } - if (strlen($clip_text_end) > 0) { $sql .= "and clip_text_end like '%$clip_text_end%' "; } - if (strlen($clip_desc) > 0) { $sql .= "and clip_desc like '%$clip_desc%' "; } - if (strlen($clip_order) > 0) { $sql .= "and clip_order like '%$clip_order%' "; } - - $sql = trim($sql); - if (substr($sql, -5) == "where"){ $sql = substr($sql, 0, (strlen($sql)-5)); } - $sql = str_replace ("where and", "where", $sql); - $prep_statement = $db->prepare(check_sql($sql)); - $prep_statement->execute(); - $result = $prep_statement->fetchAll(PDO::FETCH_NAMED); - $result_count = count($result); - - $c = 0; - $row_style["0"] = "background-color: #F5F5DC;"; - $row_style["1"] = "background-color: #FFFFFF;"; - - echo "
\n"; - echo "\n"; - echo ""; - - if ($result_count == 0) { - //no results - echo ""; - } - else { //received results - echo ""; - //echo ""; - echo ""; - //echo ""; - //echo ""; - //echo ""; - //echo ""; - //echo ""; - echo ""; - echo "\n"; - - foreach($result as $row) { - //print_r( $row ); - echo "\n"; - //echo ""; - echo ""; - //echo ""; - //echo ""; - //echo ""; - //echo ""; - //echo ""; - echo ""; - - echo "\n"; - if ($c==0) { $c=1; } else { $c=0; } - } //end foreach unset($sql, $result, $row_count); - echo "
 
    Id        clip_name Search         clip_folder        clip_text_start        clip_text_end        clip_desc        clip_order   
".$row[id]."".$row[clip_name]."".$row[clip_folder]."".$row[clip_text_start]."".$row[clip_text_end]."".$row[clip_desc]."".$row[clip_order]."
\n"; - echo "
\n"; - - echo "

"; - echo "
\n"; - echo "
"; - echo "

"; - require_once "footer.php"; - - unset ($result_count); - unset ($result); - unset ($key); - unset ($val); - unset ($c); - -} -else { - - //show the content - require_once "header.php"; - echo "
"; - 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 " "; - //echo " "; - //echo " "; - //echo " "; - echo " "; - echo " "; - echo " "; - echo "
Name:
Folder:
Start:
End:
Desc:
clip_order:
"; - echo "
"; - - echo "
"; - echo "
"; - - require_once "footer.php"; - -} //end if not post -?> diff --git a/app/grammar_edit/clipupdate.php b/app/grammar_edit/clipupdate.php deleted file mode 100644 index c69ca0af1c..0000000000 --- a/app/grammar_edit/clipupdate.php +++ /dev/null @@ -1,138 +0,0 @@ - - Portions created by the Initial Developer are Copyright (C) 2008-2012 - the Initial Developer. All Rights Reserved. - - Contributor(s): - Mark J Crane -*/ -include "root.php"; -require_once "includes/require.php"; -require_once "includes/checkauth.php"; -if (permission_exists('grammar_save')) { - //access granted -} -else { - echo "access denied"; - exit; -} - -if (count($_POST)>0) { - $clip_uuid = check_str($_POST["id"]); - $clip_name = check_str($_POST["clip_name"]); - $clip_folder = check_str($_POST["clip_folder"]); - $clip_text_start = check_str($_POST["clip_text_start"]); - $clip_text_end = check_str($_POST["clip_text_end"]); - $clip_desc = check_str($_POST["clip_desc"]); - $clip_order = check_str($_POST["clip_order"]); - - //sql update - $sql = "update v_clips set "; - $sql .= "clip_name = '$clip_name', "; - $sql .= "clip_folder = '$clip_folder', "; - $sql .= "clip_text_start = '$clip_text_start', "; - $sql .= "clip_text_end = '$clip_text_end', "; - $sql .= "clip_desc = '$clip_desc', "; - $sql .= "clip_order = '$clip_order' "; - $sql .= "where clip_uuid = '$clip_uuid' "; - $count = $db->exec(check_sql($sql)); - //echo "affected rows: ".$count; - - //redirect the browser - require_once "header.php"; - echo "\n"; - echo "Update Complete"; - require_once "footer.php"; - return; -} -else { - //get the uuid from http values - $clip_uuid = check_str($_GET["id"]); - - //get the clip - $sql = "select * from v_clips "; - $sql .= "where clip_uuid = '$clip_uuid' "; - $prep_statement = $db->prepare(check_sql($sql)); - $prep_statement->execute(); - $result = $prep_statement->fetchAll(PDO::FETCH_NAMED); - foreach ($result as &$row) { - $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"]; - break; //limit to 1 row - } -} - -//show the content - require_once "header.php"; - echo "
"; - 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 "
Name:
Folder:
Before Selection:
"; - echo " "; - echo "
After Selection:
"; - echo " "; - echo "
Notes:
"; - echo " "; - echo "
"; - echo " "; - echo " "; - echo "
"; - echo "
"; - - echo "
"; - echo "
"; - - require_once "footer.php"; -?> diff --git a/app/grammar_edit/filedelete.php b/app/grammar_edit/filedelete.php deleted file mode 100644 index 1f6522c8b5..0000000000 --- a/app/grammar_edit/filedelete.php +++ /dev/null @@ -1,84 +0,0 @@ - - Portions created by the Initial Developer are Copyright (C) 2008-2012 - the Initial Developer. All Rights Reserved. - - Contributor(s): - Mark J Crane -*/ -include "root.php"; -require_once "includes/require.php"; -require_once "includes/checkauth.php"; -if (permission_exists('grammar_save')) { - //access granted -} -else { - echo "access denied"; - exit; -} - -$folder = $_GET["folder"]; -$folder = str_replace ("\\", "/", $folder); -if (substr($folder, -1) != "/") { $folder = $folder.'/'; } -$file = $_GET["file"]; - -if (strlen($folder) > 0 && strlen($file) > 0) { - unlink($folder.$file); - header("Location: fileoptions.php"); -} -else { - //display form - require_once "header.php"; - 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 "
File Name:
"; - echo " "; - echo " "; - echo "
"; - echo "
"; - echo "
"; - - require_once "footer.php"; -} -?> diff --git a/app/grammar_edit/filelist.php b/app/grammar_edit/filelist.php deleted file mode 100644 index 546d762ac2..0000000000 --- a/app/grammar_edit/filelist.php +++ /dev/null @@ -1,252 +0,0 @@ - - Portions created by the Initial Developer are Copyright (C) 2008-2012 - the Initial Developer. All Rights Reserved. - - Contributor(s): - Mark J Crane -*/ -include "root.php"; -require_once "includes/require.php"; -require_once "includes/checkauth.php"; -if (permission_exists('grammar_view')) { - //access granted -} -else { - echo "access denied"; - exit; -} -require_once "header.php"; - -function isfile($filename) { - //if (@filesize($filename) > 0) { return true; } else { return false; } -} - -function space($count) { - $r=''; $i=0; - while($i < $count) { - $r .= ' '; - $i++; - } - return $r; -} - -function recur_dir($dir) { - clearstatcache(); - $htmldirlist = ''; - $htmlfilelist = ''; - $dirlist = opendir($dir); - $dir_array = array(); - while (false !== ($file = readdir($dirlist))) { - if ($file != "." AND $file != ".."){ - $newpath = $dir.'/'.$file; - $level = explode('/',$newpath); - if (substr($newpath, -4) == ".svn") { - //ignore .svn dir and subdir - } - elseif (substr($newpath, -3) == ".db") { - //ignore .db files - } - else { - $dir_array[] = $newpath; - } - if ($x > 1000) { break; }; - $x++; - } - } - - asort($dir_array); - foreach ($dir_array as $newpath){ - $level = explode('/',$newpath); - - if (is_dir($newpath)) { - /*$mod_array[] = array( - 'level'=>count($level)-1, - 'path'=>$newpath, - 'name'=>end($level), - 'type'=>'dir', - 'mod_time'=>filemtime($newpath), - 'size'=>''); - $mod_array[] = recur_dir($newpath); - */ - $dirname = end($level); - $htmldirlist .= space(count($level))."
$dirname
\n"; - //$htmldirlist .= space(count($level))."
Tools
\n"; - //$htmldirlist .= space(count($level))."
New Folder
\n"; //parent.document.getElementById('file').value='".urlencode($newpath)."' - //$htmldirlist .= space(count($level))."
\n"; - //$htmldirlist .= space(count($level))."
New File
\n"; //parent.document.getElementById('file').value='".urlencode($newpath)."' - //$htmldirlist .= space(count($level))."
\n"; - //$htmldirlist .= space(count($level))."
\n"; - //$htmldirlist .= space(count($level))."
Options
\n"; //parent.document.getElementById('file').value='".urlencode($newpath)."' - //$htmldirlist .= space(count($level))."
\n"; - $htmldirlist .= recur_dir($newpath); - $htmldirlist .= space(count($level))."
\n"; - } - else { - /*$mod_array[] = array( - 'level'=>count($level)-1, - 'path'=>$newpath, - 'name'=>end($level), - 'type'=>'file', - 'mod_time'=>filemtime($newpath), - 'size'=>filesize($newpath)); - */ - $filename = end($level); - $filesize = round(filesize($newpath)/1024, 2); - $htmlfilelist .= space(count($level))."
$filename
\n"; - $htmlfilelist .= space(count($level))."
\n"; - } - } - closedir($dirlist); - return $htmldirlist ."\n". $htmlfilelist; -} - -echo ""; - - -echo ""; - -echo "
"; -echo "\n"; -echo "\n"; -echo " \n"; -echo "\n"; -echo "
\n"; -//echo "
"; - -echo "\n"; -echo " \n"; -echo "\n"; -echo "
Files
\n"; //display:none -//echo "
Files
\n"; //display:none -echo recur_dir($_SESSION['switch']['grammar']['dir']); -echo "
\n"; - -echo "
\n"; -echo ""; - -echo "

"; -require_once "footer.php"; - -unset ($result_count); -unset ($result); -unset ($key); -unset ($val); -unset ($c); - -echo ""; -echo ""; - -?> diff --git a/app/grammar_edit/filenew.php b/app/grammar_edit/filenew.php deleted file mode 100644 index 63ced8c921..0000000000 --- a/app/grammar_edit/filenew.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 -*/ -include "root.php"; -require_once "includes/require.php"; -require_once "includes/checkauth.php"; -if (permission_exists('grammar_save')) { - //access granted -} -else { - echo "access denied"; - exit; -} - -$folder = $_GET["folder"]; -$folder = str_replace ("\\", "/", $folder); -if (substr($folder, -1) != "/") { $folder = $folder.'/'; } -$file = $_GET["file"]; - -if (strlen($folder) > 0 && strlen($file) > 0) { - //create new file - $handle = fopen($folder.$file, 'wb') or die("Error!!"); - $content = ""; - fwrite($handle, $content); - fclose($handle); - header("Location: fileoptions.php"); -} -else { - require_once "header.php"; - 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 "
File Name:
"; - echo " "; - echo " "; - echo "
"; - echo "
"; - echo "
"; - - require_once "footer.php"; -} - -?> diff --git a/app/grammar_edit/fileoptions.php b/app/grammar_edit/fileoptions.php deleted file mode 100644 index 6780000b20..0000000000 --- a/app/grammar_edit/fileoptions.php +++ /dev/null @@ -1,85 +0,0 @@ - - Portions created by the Initial Developer are Copyright (C) 2008-2012 - the Initial Developer. All Rights Reserved. - - Contributor(s): - Mark J Crane -*/ -include "root.php"; -require_once "includes/require.php"; -require_once "includes/checkauth.php"; -if (permission_exists('grammar_view')) { - //access granted -} -else { - echo "access denied"; - exit; -} -require_once "header.php"; - -$file = $_GET["file"]; -$file = str_replace ("\\", "/", $file); -$folder = $_GET["folder"]; -$folder = str_replace ($file, "", $folder); -$urlpath = str_replace ($_SERVER["DOCUMENT_ROOT"], "", $folder); - -echo "
"; -echo "\n"; -echo ""; -echo "\n"; -echo "\n"; - -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "
"; - -echo ""; -echo ""; -echo "\n"; -echo "\n"; -echo ""; -echo "
Path:
File:
"; - -echo "
"; -echo " "; -echo ""; - -echo "
"; -echo ""; -echo " \n"; -echo " \n"; -echo " \n"; -echo " \n"; -echo " \n"; -echo " \n"; -echo " \n"; -echo "





"; -echo "
"; - -echo "
"; -echo "
"; - -require_once "footer.php"; -?> diff --git a/app/grammar_edit/fileoptionslist.php b/app/grammar_edit/fileoptionslist.php deleted file mode 100644 index 27a7420c65..0000000000 --- a/app/grammar_edit/fileoptionslist.php +++ /dev/null @@ -1,246 +0,0 @@ - - Portions created by the Initial Developer are Copyright (C) 2008-2012 - the Initial Developer. All Rights Reserved. - - Contributor(s): - Mark J Crane -*/ -include "root.php"; -require_once "includes/require.php"; -require_once "includes/checkauth.php"; -if (permission_exists('grammar_view')) { - //access granted -} -else { - echo "access denied"; - exit; -} -require_once "header.php"; - -function isfile($filename) { - if (@filesize($filename) > 0) { return true; } else { return false; } -} - -function space($count) { - $r=''; $i=0; - while($i < $count) { - $r .= ' '; - $i++; - } - return $r; -} - -function recur_dir($dir) { - clearstatcache(); - $htmldirlist = ''; - $htmlfilelist = ''; - $dirlist = opendir($dir); - while ($file = readdir ($dirlist)) { - if ($file != '.' && $file != '..') { - $newpath = $dir.'/'.$file; - $level = explode('/',$newpath); - - if (is_dir($newpath)) { - /*$mod_array[] = array( - 'level'=>count($level)-1, - 'path'=>$newpath, - 'name'=>end($level), - 'type'=>'dir', - 'mod_time'=>filemtime($newpath), - 'size'=>''); - $mod_array[] = recur_dir($newpath); - */ - $dirname = end($level); - $htmldirlist .= space(count($level))."
$dirname
\n"; - //$htmldirlist .= space(count($level))."
Tools
\n"; - //$htmldirlist .= space(count($level))."
New Folder
\n"; //parent.document.getElementById('file').value='".urlencode($newpath)."' - //$htmldirlist .= space(count($level))."
\n"; - //$htmldirlist .= space(count($level))."
New File
\n"; //parent.document.getElementById('file').value='".urlencode($newpath)."' - //$htmldirlist .= space(count($level))."
\n"; - //$htmldirlist .= space(count($level))."
\n"; - //$htmldirlist .= space(count($level))."
Options
\n"; //parent.document.getElementById('file').value='".urlencode($newpath)."' - //$htmldirlist .= space(count($level))."
\n"; - $htmldirlist .= recur_dir($newpath); - $htmldirlist .= space(count($level))."
\n"; - } - else { - /*$mod_array[] = array( - 'level'=>count($level)-1, - 'path'=>$newpath, - 'name'=>end($level), - 'type'=>'file', - 'mod_time'=>filemtime($newpath), - 'size'=>filesize($newpath)); - */ - $filename = end($level); - $filesize = round(filesize($newpath)/1024, 2); - $newpath = str_replace ($filename, "", $newpath); - $htmlfilelist .= space(count($level))."
$filename
\n"; - $htmlfilelist .= space(count($level))."
\n"; - } - } - } - - closedir($dirlist); - return $htmldirlist ."\n". $htmlfilelist; -} - -echo "\n"; - -echo "\n"; - -echo "
"; -echo "\n"; - -echo "\n"; -echo "
\n"; -echo "\n"; -echo " \n"; -echo "\n"; -echo "
Files
\n"; //display:none -//echo "
Files
\n"; //display:none - -//echo "
Tools
\n"; -//echo "
New Folder
\n"; //parent.document.getElementById('file').value='".urlencode($newpath)."' -//echo "
\n"; -//echo "
New File
\n"; //parent.document.getElementById('file').value='".urlencode($newpath)."' -//echo "
\n"; -//echo "
\n"; - -echo recur_dir($_SESSION['switch']['grammar']['dir']); - -echo "
\n"; - - -echo "
\n"; -echo ""; - -echo "

"; -require_once "footer.php"; - -unset ($result_count); -unset ($result); -unset ($key); -unset ($val); -unset ($c); - -echo ""; -echo ""; - -?> \ No newline at end of file diff --git a/app/grammar_edit/fileread.php b/app/grammar_edit/fileread.php deleted file mode 100644 index 273bda234c..0000000000 --- a/app/grammar_edit/fileread.php +++ /dev/null @@ -1,49 +0,0 @@ - - Portions created by the Initial Developer are Copyright (C) 2008-2012 - the Initial Developer. All Rights Reserved. - - Contributor(s): - Mark J Crane -*/ -include "root.php"; -require_once "includes/require.php"; -require_once "includes/checkauth.php"; -if (permission_exists('grammar_view')) { - //access granted -} -else { - echo "access denied"; - exit; -} - -$filename = $_POST["file"]; -$filename = str_replace ("\\", "/", $filename); - -$handle = fopen($filename, "r"); -if ($handle) { - while (!feof($handle)) { - $buffer = fgets($handle, 4096); - echo $buffer; - } - fclose($handle); -} - -?> diff --git a/app/grammar_edit/filerename.php b/app/grammar_edit/filerename.php deleted file mode 100644 index e65f7eb19a..0000000000 --- a/app/grammar_edit/filerename.php +++ /dev/null @@ -1,102 +0,0 @@ - - Portions created by the Initial Developer are Copyright (C) 2008-2012 - the Initial Developer. All Rights Reserved. - - Contributor(s): - Mark J Crane -*/ -include "root.php"; -require_once "includes/require.php"; -require_once "includes/checkauth.php"; -if (permission_exists('grammar_save')) { - //access granted -} -else { - echo "access denied"; - exit; -} - -$folder = $_GET["folder"]; -//$folder = str_replace ("\\", "/", $folder); -//if (substr($folder, -1) != "/") { $folder = $folder.'/'; } -$newfilename = $_GET["newfilename"]; -$filename = $_GET["filename"]; -//echo $folder.$file; - - -if (strlen($folder) > 0 && strlen($newfilename) > 0) { - //echo "new file: ".$newfilename."
"; - //echo "folder: ".$folder."
"; - //echo "orig filename: ".$filename."
";; - rename($folder.$filename, $folder.$newfilename); - header("Location: fileoptions.php"); -} -else { //display 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 "
Path:
".$folder.$filename."

Original file name:
".$filename."
"; - - echo "
"; - - echo ""; - echo " "; - echo " "; - echo " "; - - echo " "; - echo " "; - echo " "; - - echo " "; - echo " "; - echo " "; - echo "
Rename file to:
"; - echo " "; - echo " "; - echo " "; - echo "
"; - echo "
"; - echo "
"; - - require_once "footer.php"; - -} - -?> diff --git a/app/grammar_edit/filesave.php b/app/grammar_edit/filesave.php deleted file mode 100644 index f3ccabc8d3..0000000000 --- a/app/grammar_edit/filesave.php +++ /dev/null @@ -1,50 +0,0 @@ - - Portions created by the Initial Developer are Copyright (C) 2008-2012 - the Initial Developer. All Rights Reserved. - - Contributor(s): - Mark J Crane -*/ -include "root.php"; -require_once "includes/require.php"; -require_once "includes/checkauth.php"; -if (permission_exists('grammar_save')) { - //access granted -} -else { - echo "access denied"; - exit; -} - -$filename = $_POST["file"]; //filename with the path -$filename = str_replace ("\\", "/", $filename); -$content = $_POST["content"]; - -$handle = fopen($filename, 'wb') or die("Error!!"); -fwrite($handle, $content); -fclose($handle); - -//set the reload_xml value to true - $_SESSION["reload_xml"] = true; - -echo $content; - -?> diff --git a/app/grammar_edit/folderdelete.php b/app/grammar_edit/folderdelete.php deleted file mode 100644 index 763f22bd5d..0000000000 --- a/app/grammar_edit/folderdelete.php +++ /dev/null @@ -1,46 +0,0 @@ - - Portions created by the Initial Developer are Copyright (C) 2008-2012 - the Initial Developer. All Rights Reserved. - - Contributor(s): - Mark J Crane -*/ -include "root.php"; -require_once "includes/require.php"; -require_once "includes/checkauth.php"; -if (permission_exists('grammar_save')) { - //access granted -} -else { - echo "access denied"; - exit; -} - -$folder = $_GET["folder"]; -$folder = str_replace ("\\", "/", $folder); - -if (strlen($folder) > 0) { - //delete the folder - rmdir($folder); //, 0700 - header("Location: fileoptions.php"); -} - -?> \ No newline at end of file diff --git a/app/grammar_edit/foldernew.php b/app/grammar_edit/foldernew.php deleted file mode 100644 index 35f2aff035..0000000000 --- a/app/grammar_edit/foldernew.php +++ /dev/null @@ -1,83 +0,0 @@ - - Portions created by the Initial Developer are Copyright (C) 2008-2012 - the Initial Developer. All Rights Reserved. - - Contributor(s): - Mark J Crane -*/ -include "root.php"; -require_once "includes/require.php"; -require_once "includes/checkauth.php"; -if (permission_exists('grammar_save')) { - //access granted -} -else { - echo "access denied"; - exit; -} - -$folder = $_GET["folder"]; -$folder = str_replace ("\\", "/", $folder); -$foldername = $_GET["foldername"]; - -if (strlen($folder) > 0 && strlen($foldername) > 0) { - //create new folder - mkdir($folder.'/'.$foldername); //, 0700 - header("Location: fileoptions.php"); -} -else { //display form - require_once "header.php"; - echo "
"; - echo "
"; - echo "
"; - echo ""; - echo " "; - echo " "; - echo " "; - echo " "; - echo " "; - echo " "; - echo "
Path:
".$folder."
"; - - echo "
"; - - echo ""; - echo " "; - echo " "; - echo " "; - - echo " "; - echo " "; - echo " "; - - echo " "; - echo " "; - echo " "; - echo "
Folder Name:
"; - echo " "; - echo " "; - echo "
"; - echo "
"; - echo "
"; - - require_once "footer.php"; -} -?> diff --git a/app/grammar_edit/footer.php b/app/grammar_edit/footer.php deleted file mode 100644 index 3e7b9037ab..0000000000 --- a/app/grammar_edit/footer.php +++ /dev/null @@ -1,43 +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 ""; -echo "fusionpbx "; -echo "        "; -echo "http://fusionpbx.com"; -echo "        "; -echo "Author: Mark J. Crane "; - -echo ""; -*/ -echo "
"; -echo ""; -echo ""; - -?> diff --git a/app/grammar_edit/header.php b/app/grammar_edit/header.php deleted file mode 100644 index b07b45c390..0000000000 --- a/app/grammar_edit/header.php +++ /dev/null @@ -1,83 +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 ""; -//echo ""; -echo ""; - - -echo ""; -echo ""; -echo ""; -echo "
"; - -?> diff --git a/app/grammar_edit/images/Thumbs.db b/app/grammar_edit/images/Thumbs.db deleted file mode 100644 index 46593a8c2e..0000000000 Binary files a/app/grammar_edit/images/Thumbs.db and /dev/null differ diff --git a/app/grammar_edit/images/file.gif b/app/grammar_edit/images/file.gif deleted file mode 100644 index a6cf9845fc..0000000000 Binary files a/app/grammar_edit/images/file.gif and /dev/null differ diff --git a/app/grammar_edit/images/file.png b/app/grammar_edit/images/file.png deleted file mode 100644 index 33b5f5f374..0000000000 Binary files a/app/grammar_edit/images/file.png and /dev/null differ diff --git a/app/grammar_edit/images/folder.gif b/app/grammar_edit/images/folder.gif deleted file mode 100644 index 50ab253cc7..0000000000 Binary files a/app/grammar_edit/images/folder.gif and /dev/null differ diff --git a/app/grammar_edit/images/gear.png b/app/grammar_edit/images/gear.png deleted file mode 100644 index 1adf1e778f..0000000000 Binary files a/app/grammar_edit/images/gear.png and /dev/null differ diff --git a/app/grammar_edit/images/leaf.gif b/app/grammar_edit/images/leaf.gif deleted file mode 100644 index 50ab253cc7..0000000000 Binary files a/app/grammar_edit/images/leaf.gif and /dev/null differ diff --git a/app/grammar_edit/images/minus.gif b/app/grammar_edit/images/minus.gif deleted file mode 100644 index 1094ab912b..0000000000 Binary files a/app/grammar_edit/images/minus.gif and /dev/null differ diff --git a/app/grammar_edit/images/plus.gif b/app/grammar_edit/images/plus.gif deleted file mode 100644 index fdacf8efe5..0000000000 Binary files a/app/grammar_edit/images/plus.gif and /dev/null differ diff --git a/app/grammar_edit/images/program.gif b/app/grammar_edit/images/program.gif deleted file mode 100644 index dc3dfa1104..0000000000 Binary files a/app/grammar_edit/images/program.gif and /dev/null differ diff --git a/app/grammar_edit/images/thumbnails/Thumbs.db b/app/grammar_edit/images/thumbnails/Thumbs.db deleted file mode 100644 index c4e4684b24..0000000000 Binary files a/app/grammar_edit/images/thumbnails/Thumbs.db and /dev/null differ diff --git a/app/grammar_edit/images/thumbnails/cliplibrary.png b/app/grammar_edit/images/thumbnails/cliplibrary.png deleted file mode 100644 index bc70f332fd..0000000000 Binary files a/app/grammar_edit/images/thumbnails/cliplibrary.png and /dev/null differ diff --git a/app/grammar_edit/images/thumbnails/filemanagement.png b/app/grammar_edit/images/thumbnails/filemanagement.png deleted file mode 100644 index 88cb7661b1..0000000000 Binary files a/app/grammar_edit/images/thumbnails/filemanagement.png and /dev/null differ diff --git a/app/grammar_edit/images/thumbnails/phpeditor.png b/app/grammar_edit/images/thumbnails/phpeditor.png deleted file mode 100644 index c6f7f369bb..0000000000 Binary files a/app/grammar_edit/images/thumbnails/phpeditor.png and /dev/null differ diff --git a/app/grammar_edit/index.php b/app/grammar_edit/index.php deleted file mode 100644 index a440cc8a70..0000000000 --- a/app/grammar_edit/index.php +++ /dev/null @@ -1,200 +0,0 @@ - - Portions created by the Initial Developer are Copyright (C) 2008-2012 - the Initial Developer. All Rights Reserved. - - Contributor(s): - Mark J Crane -*/ -include "root.php"; -require_once "includes/require.php"; -require_once "includes/checkauth.php"; -if (permission_exists('grammar_view')) { - //access granted -} -else { - echo "access denied"; - exit; -} -echo "\n"; -echo "\n"; -echo " \n"; -echo " "; - - echo "\n"; - - echo ""; - ?> - - - - - - - - -
- - - - \n"; - echo "\n"; - } - else { - echo "\n"; - } - ?> - -
- - diff --git a/app/grammar_edit/list.php b/app/grammar_edit/list.php deleted file mode 100644 index aa5bb86c81..0000000000 --- a/app/grammar_edit/list.php +++ /dev/null @@ -1,107 +0,0 @@ - - Portions created by the Initial Developer are Copyright (C) 2008-2012 - the Initial Developer. All Rights Reserved. - - Contributor(s): - Mark J Crane -*/ -include "root.php"; -require_once "includes/checkauth.php"; -if (permission_exists('grammar_view')) { - //access granted -} -else { - echo "access denied"; - exit; -} -require_once "admin/edit/header.php"; -echo "
"; -echo "\n"; -echo "\n"; -echo " \n"; - echo "\n"; -} //end if results -echo "
\n"; -echo "
"; - -$sql = "select * from v_clips "; -$prep_statement = $db->prepare(check_sql($sql)); -$prep_statement->execute(); -$result = $prep_statement->fetchAll(PDO::FETCH_NAMED); -$result_count = count($result); - -$c = 0; -$row_style["0"] = "background-color: #F5F5DC;"; -$row_style["1"] = "background-color: #FFFFFF;"; - -echo "
\n"; -echo "\n"; -echo ""; - -if ($result_count == 0) { //no results - echo ""; -} -else { //received results - echo ""; - echo ""; - //echo ""; - //echo ""; - //echo ""; - //echo ""; - //echo ""; - echo ""; - echo "\n"; - - foreach($result as $row) { - echo "\n"; - //echo ""; - echo ""; - //echo ""; - //echo ""; - //echo ""; - //echo ""; - //echo ""; - echo ""; - - echo "\n"; - if ($c==0) { $c=1; } else { $c=0; } - } //end foreach unset($sql, $result, $row_count); - echo "
 
    clip name      clip_folder        clip_text_start        clip_text_end        clip_desc        clip_order   
".$row['clip_uuid']."".$row['clip_name']."".$row[clip_folder]."".$row[clip_text_start]."".$row[clip_text_end]."".$row[clip_desc]."".$row[clip_order]."
\n"; - echo "
\n"; - - echo "
\n"; - -echo "
\n"; -echo "   \n"; -echo "   \n"; -echo "
\n"; -echo ""; - -echo "

"; -require_once "admin/edit/footer.php"; - -unset ($result_count); -unset ($result); -unset ($key); -unset ($val); -unset ($c); - -?> diff --git a/app/grammar_edit/readme.txt b/app/grammar_edit/readme.txt deleted file mode 100644 index cafc4144ae..0000000000 --- a/app/grammar_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/grammar_edit/root.php b/app/grammar_edit/root.php deleted file mode 100644 index 7b882438ea..0000000000 --- a/app/grammar_edit/root.php +++ /dev/null @@ -1,50 +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 - if (!defined("PATH_SEPARATOR")) { - if ( strpos( $_ENV[ "OS" ], "Win" ) !== false ) { define("PATH_SEPARATOR", ";"); } else { define("PATH_SEPARATOR", ":"); } - } - -// make sure the document_root is set - $_SERVER["SCRIPT_FILENAME"] = str_replace("\\", "/", $_SERVER["SCRIPT_FILENAME"]); - $_SERVER["DOCUMENT_ROOT"] = str_replace($_SERVER["PHP_SELF"], "", $_SERVER["SCRIPT_FILENAME"]); - $_SERVER["DOCUMENT_ROOT"] = realpath($_SERVER["DOCUMENT_ROOT"]); - //echo "DOCUMENT_ROOT: ".$_SERVER["DOCUMENT_ROOT"]."
\n"; - //echo "PHP_SELF: ".$_SERVER["PHP_SELF"]."
\n"; - //echo "SCRIPT_FILENAME: ".$_SERVER["SCRIPT_FILENAME"]."
\n"; - -// if the project directory exists then add it to the include path otherwise add the document root to the include path - if (is_dir($_SERVER["DOCUMENT_ROOT"].'/fusionpbx')){ - if(!defined('PROJECT_PATH')) { define('PROJECT_PATH', '/fusionpbx'); } - set_include_path( get_include_path() . PATH_SEPARATOR . $_SERVER["DOCUMENT_ROOT"].'/fusionpbx' ); - } - else { - if(!defined('PROJECT_PATH')) { define('PROJECT_PATH', ''); } - set_include_path( get_include_path() . PATH_SEPARATOR . $_SERVER['DOCUMENT_ROOT'] ); - } - -?> \ No newline at end of file diff --git a/app/php_edit/app_config.php b/app/php_edit/app_config.php deleted file mode 100644 index f060eab6c7..0000000000 --- a/app/php_edit/app_config.php +++ /dev/null @@ -1,79 +0,0 @@ - \ No newline at end of file diff --git a/app/php_edit/app_defaults.php b/app/php_edit/app_defaults.php deleted file mode 100644 index 68b3729580..0000000000 --- a/app/php_edit/app_defaults.php +++ /dev/null @@ -1,68 +0,0 @@ - - Portions created by the Initial Developer are Copyright (C) 2008-2012 - the Initial Developer. All Rights Reserved. - - Contributor(s): - Mark J Crane -*/ - -//if the number of rows is 0 then add example clips - if ($domains_processed == 1) { - $sql = "select count(*) as num_rows from v_clips "; - $prep_statement = $db->prepare(check_sql($sql)); - if ($prep_statement) { - $prep_statement->execute(); - $row = $prep_statement->fetch(PDO::FETCH_ASSOC); - if ($row['num_rows'] == 0) { - $clip_name = "\$_POST"; - $clip_folder = "PHP"; - $clip_text_start = "\$zzz = \$_POST[\""; - $clip_text_end = "\"];"; - $clip_desc = "Set HTTP POST value as a PHP variable."; - $clip_order = 0; - - $sql = "insert into v_clips "; - $sql .= "("; - $sql .= "clip_uuid, "; - $sql .= "clip_name, "; - $sql .= "clip_folder, "; - $sql .= "clip_text_start, "; - $sql .= "clip_text_end, "; - $sql .= "clip_desc, "; - $sql .= "clip_order "; - $sql .= ")"; - $sql .= "values "; - $sql .= "("; - $sql .= "'".uuid()."', "; - $sql .= "'$clip_name', "; - $sql .= "'$clip_folder', "; - $sql .= "'$clip_text_start', "; - $sql .= "'$clip_text_end', "; - $sql .= "'$clip_desc', "; - $sql .= "'$clip_order' "; - $sql .= ")"; - $db->exec(check_sql($sql)); - unset($sql); - } - } - } - -?> \ No newline at end of file diff --git a/app/php_edit/clipadd.php b/app/php_edit/clipadd.php deleted file mode 100644 index f060f81805..0000000000 --- a/app/php_edit/clipadd.php +++ /dev/null @@ -1,126 +0,0 @@ - - Portions created by the Initial Developer are Copyright (C) 2008-2012 - the Initial Developer. All Rights Reserved. - - Contributor(s): - Mark J Crane -*/ -include "root.php"; -require_once "includes/require.php"; -require_once "includes/checkauth.php"; -if (permission_exists('php_editor_save')) { - //access granted -} -else { - echo "access denied"; - exit; -} - -if (count($_POST)>0) { - $clip_name = check_str($_POST["clip_name"]); - $clip_folder = check_str($_POST["clip_folder"]); - $clip_text_start = check_str($_POST["clip_text_start"]); - $clip_text_end = check_str($_POST["clip_text_end"]); - $clip_desc = check_str($_POST["clip_desc"]); - $clip_order = check_str($_POST["clip_order"]); - if (strlen($clip_order) == 0) { $clip_order = 0; } - - $sql = "insert into v_clips "; - $sql .= "("; - $sql .= "clip_uuid, "; - $sql .= "clip_name, "; - $sql .= "clip_folder, "; - $sql .= "clip_text_start, "; - $sql .= "clip_text_end, "; - $sql .= "clip_desc, "; - $sql .= "clip_order "; - $sql .= ")"; - $sql .= "values "; - $sql .= "("; - $sql .= "'".uuid()."', "; - $sql .= "'$clip_name', "; - $sql .= "'$clip_folder', "; - $sql .= "'$clip_text_start', "; - $sql .= "'$clip_text_end', "; - $sql .= "'$clip_desc', "; - $sql .= "'$clip_order' "; - $sql .= ")"; - $db->exec(check_sql($sql)); - unset($sql,$db); - - require_once "header.php"; - echo "\n"; - echo "Add Complete"; - require_once "footer.php"; - return; -} - -//show the content - require_once "header.php"; - echo "
"; - echo "
\n"; - echo "\n"; - echo " "; - echo " "; - echo "
\n"; - - //echo "Clip Library"; - //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 "
"; - - require_once "footer.php"; -?> \ No newline at end of file diff --git a/app/php_edit/clipdelete.php b/app/php_edit/clipdelete.php deleted file mode 100644 index 2cb82b9666..0000000000 --- a/app/php_edit/clipdelete.php +++ /dev/null @@ -1,56 +0,0 @@ - - Portions created by the Initial Developer are Copyright (C) 2008-2012 - the Initial Developer. All Rights Reserved. - - Contributor(s): - Mark J Crane -*/ -include "root.php"; -require_once "includes/require.php"; -require_once "includes/checkauth.php"; -if (permission_exists('php_editor_save')) { - //access granted -} -else { - echo "access denied"; - exit; -} - -//get the uuid from http values - $clip_uuid = check_str($_GET["id"]); - -//delete the clip - if (strlen($_GET["id"])>0) { - $sql = "delete from v_clips "; - $sql .= "where clip_uuid = '".$clip_uuid."' "; - $prep_statement = $db->prepare(check_sql($sql)); - $prep_statement->execute(); - unset($sql,$db); - } - -//redirect the browser - require_once "header.php"; - echo "\n"; - echo "Delete Complete"; - require_once "footer.php"; - return; - -?> \ No newline at end of file diff --git a/app/php_edit/cliplist.php b/app/php_edit/cliplist.php deleted file mode 100644 index 39db5bcf52..0000000000 --- a/app/php_edit/cliplist.php +++ /dev/null @@ -1,235 +0,0 @@ - - Portions created by the Initial Developer are Copyright (C) 2008-2012 - the Initial Developer. All Rights Reserved. - - Contributor(s): - Mark J Crane -*/ -include "root.php"; -require_once "includes/require.php"; -require_once "includes/checkauth.php"; -require_once "includes/checkauth.php"; -if (permission_exists('php_editor_view')) { - //access granted -} -else { - echo "access denied"; - exit; -} -//require_once "edit/header.php"; - -echo ""; -echo ""; -echo ""; - -function isfile($filename) { - if (@filesize($filename) > 0) { return true; } else { return false; } -} - -function space($count) { - $r=''; $i=0; - while($i < $count) { - $r .= ' '; - $i++; - } - return $r; -} - -echo ""; - -echo ""; - -echo ""; -echo ""; -echo "
"; -echo "\n"; -echo "\n"; -echo "
\n"; -echo "
Clip Library
\n"; //display:none - -$sql = "select * from v_clips "; -$sql .= "order by clip_folder "; -$prep_statement = $db->prepare(check_sql($sql)); -$prep_statement->execute(); -$result = $prep_statement->fetchAll(PDO::FETCH_NAMED); -$result_count = count($result); - -if ($result_count > 0) { //no results - $last_folder = ''; - $tag_open = ''; - $x = 0; - $current_depth = 0; - $previous_depth = 0; - foreach($result as $row) { - $current_depth = count(explode ("/", $row['clip_folder'])); - if ($current_depth < $previous_depth) { - $count = ($previous_depth - $current_depth); - $i=0; - while($i < $count){ - echo "
\n"; - $i++; - } - echo "
\n"; - } - - if ($last_folder != $row['clip_folder']) { - $clip_folder_name = str_replace ($previous_folder_name, "", $row['clip_folder']); - $clip_folder_name = str_replace ("/", "", $clip_folder_name); - echo "
 ".$clip_folder_name."  
\n\n"; - $tag_open = 1; - } - - $previous_depth = $current_depth; - $previous_folder_name = $row['clip_folder']; - - echo "\n"; - echo "\n"; - echo "\n"; - echo "
\n"; - echo "".$row['clip_name']."\n"; - echo "
\n"; - echo "\n\n"; - - $last_folder = $row['clip_folder']; - - if ($c==0) { $c=1; } else { $c=0; } - } //end foreach - unset($sql, $result, $row_count); - -} //end if results - -echo "\n"; -echo "
\n"; - -echo "
\n"; -echo "
"; - -echo "

"; -//require_once "includes/footer.php"; - -unset ($result_count); -unset ($result); -unset ($key); -unset ($val); -unset ($c); - -echo ""; -echo ""; - -?> \ No newline at end of file diff --git a/app/php_edit/clipoptions.php b/app/php_edit/clipoptions.php deleted file mode 100644 index b137b3b280..0000000000 --- a/app/php_edit/clipoptions.php +++ /dev/null @@ -1,71 +0,0 @@ - - Portions created by the Initial Developer are Copyright (C) 2008-2012 - the Initial Developer. All Rights Reserved. - - Contributor(s): - Mark J Crane -*/ -include "root.php"; -require_once "includes/require.php"; -require_once "includes/checkauth.php"; -if (permission_exists('php_editor_view')) { - //access granted -} -else { - echo "access denied"; - exit; -} -require_once "header.php"; - -echo "
"; -echo "\n"; -echo ""; -echo "\n"; -echo ""; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "
Selected Clip:
"; -echo " "; -echo ""; - -echo " "; -//echo " \n"; -//echo " \n"; -//echo " \n"; - -echo " \n"; -echo " \n"; -//echo " \n"; -echo " \n"; -echo " \n"; - -echo " \n"; -echo "
Options











"; - -echo "
"; -echo "
"; - -require_once "footer.php"; -?> \ No newline at end of file diff --git a/app/php_edit/clipoptionslist.php b/app/php_edit/clipoptionslist.php deleted file mode 100644 index ba406f8114..0000000000 --- a/app/php_edit/clipoptionslist.php +++ /dev/null @@ -1,228 +0,0 @@ - - Portions created by the Initial Developer are Copyright (C) 2008-2012 - the Initial Developer. All Rights Reserved. - - Contributor(s): - Mark J Crane -*/ -include "root.php"; -require_once "includes/require.php"; -require_once "includes/checkauth.php"; -if (permission_exists('php_editor_view')) { - //access granted -} -else { - echo "access denied"; - exit; -} - -echo ""; -echo ""; - -echo ""; - -function isfile($filename) { - if (@filesize($filename) > 0) { return true; } else { return false; } -} - -function space($count) { - $r=''; $i=0; - while($i < $count) { - $r .= ' '; - $i++; - } - return $r; -} - -//show the content - echo ""; - - echo ""; - -echo ""; -echo ""; - - echo "
"; - echo "\n"; - - echo "\n"; - echo "
\n"; - echo "
Clip Library
\n"; //display:none - - $sql = "select * from v_clips "; - $sql .= "order by clip_folder "; - $prep_statement = $db->prepare(check_sql($sql)); - $prep_statement->execute(); - $result = $prep_statement->fetchAll(PDO::FETCH_NAMED); - $result_count = count($result); - - if ($result_count > 0) { //no results - $last_folder = ''; - $tag_open = ''; - $x = 0; - $current_depth = 0; - $previous_depth = 0; - foreach($result as $row) { - $current_depth = count(explode("/", $row[clip_folder])); - if ($current_depth < $previous_depth) { - $count = ($previous_depth - $current_depth); - $i=0; - while($i < $count){ - echo "
\n"; - $i++; - } - echo "
\n"; - - } - - if ($last_folder != $row['clip_folder']) { - $clip_folder_name = str_replace ($previous_folder_name, "", $row['clip_folder']); - $clip_folder_name = str_replace ("/", "", $clip_folder_name); - echo "
 ".$clip_folder_name."  
\n\n"; - $tag_open = 1; - } - - $previous_depth = $current_depth; - $previous_folder_name = $row['clip_folder']; - - echo "\n"; - echo "\n"; - echo "\n"; - echo "
\n"; - echo "".$row['clip_name']."\n"; - - echo "
\n"; - echo "\n\n"; - - $last_folder = $row['clip_folder']; - if ($c==0) { $c=1; } else { $c=0; } - } //end foreach - unset($sql, $result, $row_count); - } //end if results - - echo "\n"; - echo "
\n"; - - echo "\n"; - echo "\n"; - echo "\n"; - echo "
"; - - echo "

"; - - unset ($result_count); - unset ($result); - unset ($key); - unset ($val); - unset ($c); - - echo ""; - echo ""; - -?> \ No newline at end of file diff --git a/app/php_edit/clipsearch.php b/app/php_edit/clipsearch.php deleted file mode 100644 index 5db024d25b..0000000000 --- a/app/php_edit/clipsearch.php +++ /dev/null @@ -1,180 +0,0 @@ - - Portions created by the Initial Developer are Copyright (C) 2008-2012 - the Initial Developer. All Rights Reserved. - - Contributor(s): - Mark J Crane -*/ -include "root.php"; -require_once "includes/checkauth.php"; -if (permission_exists('php_editor_view')) { - //access granted -} -else { - echo "access denied"; - exit; -} - -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"]; - - require_once "header.php"; - echo "
"; - echo "\n"; - echo "\n"; - echo " \n"; - echo "\n"; - - } //end if results - - echo "
\n"; - echo "
"; - - $sql .= "select * from v_clips "; - $sql .= "where "; - if (strlen($clip_uuid) > 0) { $sql .= "and id = '$clip_uuid' "; } - if (strlen($clip_name) > 0) { $sql .= "and clip_name like '%$clip_name%' "; } - if (strlen($clip_folder) > 0) { $sql .= "and clip_folder like '%$clip_folder%' "; } - if (strlen($clip_text_start) > 0) { $sql .= "and clip_text_start like '%$clip_text_start%' "; } - if (strlen($clip_text_end) > 0) { $sql .= "and clip_text_end like '%$clip_text_end%' "; } - if (strlen($clip_desc) > 0) { $sql .= "and clip_desc like '%$clip_desc%' "; } - if (strlen($clip_order) > 0) { $sql .= "and clip_order like '%$clip_order%' "; } - - $sql = trim($sql); - if (substr($sql, -5) == "where"){ $sql = substr($sql, 0, (strlen($sql)-5)); } - $sql = str_replace ("where and", "where", $sql); - $prep_statement = $db->prepare(check_sql($sql)); - $prep_statement->execute(); - $result = $prep_statement->fetchAll(PDO::FETCH_NAMED); - $result_count = count($result); - - $c = 0; - $row_style["0"] = "background-color: #F5F5DC;"; - $row_style["1"] = "background-color: #FFFFFF;"; - - echo "
\n"; - echo "\n"; - echo ""; - - if ($result_count == 0) { - //no results - echo ""; - } - else { //received results - echo ""; - //echo ""; - echo ""; - //echo ""; - //echo ""; - //echo ""; - //echo ""; - //echo ""; - echo ""; - echo "\n"; - - foreach($result as $row) { - //print_r( $row ); - echo "\n"; - //echo ""; - echo ""; - //echo ""; - //echo ""; - //echo ""; - //echo ""; - //echo ""; - echo ""; - - echo "\n"; - if ($c==0) { $c=1; } else { $c=0; } - } //end foreach unset($sql, $result, $row_count); - echo "
 
    Id        clip_name Search         clip_folder        clip_text_start        clip_text_end        clip_desc        clip_order   
".$row[id]."".$row[clip_name]."".$row[clip_folder]."".$row[clip_text_start]."".$row[clip_text_end]."".$row[clip_desc]."".$row[clip_order]."
\n"; - echo "
\n"; - - echo "

"; - echo "
\n"; - echo "
"; - echo "

"; - require_once "footer.php"; - - unset ($result_count); - unset ($result); - unset ($key); - unset ($val); - unset ($c); - -} -else { - - //show the content - require_once "header.php"; - echo "
"; - 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 " "; - //echo " "; - //echo " "; - //echo " "; - echo " "; - echo " "; - echo " "; - echo "
Name:
Folder:
Start:
End:
Desc:
clip_order:
"; - echo "
"; - - echo "
"; - echo "
"; - - require_once "footer.php"; - -} //end if not post -?> diff --git a/app/php_edit/clipupdate.php b/app/php_edit/clipupdate.php deleted file mode 100644 index a93c10bdfe..0000000000 --- a/app/php_edit/clipupdate.php +++ /dev/null @@ -1,138 +0,0 @@ - - Portions created by the Initial Developer are Copyright (C) 2008-2012 - the Initial Developer. All Rights Reserved. - - Contributor(s): - Mark J Crane -*/ -include "root.php"; -require_once "includes/require.php"; -require_once "includes/checkauth.php"; -if (permission_exists('php_editor_save')) { - //access granted -} -else { - echo "access denied"; - exit; -} - -if (count($_POST)>0) { - $clip_uuid = check_str($_POST["id"]); - $clip_name = check_str($_POST["clip_name"]); - $clip_folder = check_str($_POST["clip_folder"]); - $clip_text_start = check_str($_POST["clip_text_start"]); - $clip_text_end = check_str($_POST["clip_text_end"]); - $clip_desc = check_str($_POST["clip_desc"]); - $clip_order = check_str($_POST["clip_order"]); - - //sql update - $sql = "update v_clips set "; - $sql .= "clip_name = '$clip_name', "; - $sql .= "clip_folder = '$clip_folder', "; - $sql .= "clip_text_start = '$clip_text_start', "; - $sql .= "clip_text_end = '$clip_text_end', "; - $sql .= "clip_desc = '$clip_desc', "; - $sql .= "clip_order = '$clip_order' "; - $sql .= "where clip_uuid = '$clip_uuid' "; - $count = $db->exec(check_sql($sql)); - //echo "affected rows: ".$count; - - //redirect the browser - require_once "header.php"; - echo "\n"; - echo "Update Complete"; - require_once "footer.php"; - return; -} -else { - //get the uuid from http values - $clip_uuid = check_str($_GET["id"]); - - //get the clip - $sql = "select * from v_clips "; - $sql .= "where clip_uuid = '$clip_uuid' "; - $prep_statement = $db->prepare(check_sql($sql)); - $prep_statement->execute(); - $result = $prep_statement->fetchAll(PDO::FETCH_NAMED); - foreach ($result as &$row) { - $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"]; - break; //limit to 1 row - } -} - -//show the content - require_once "header.php"; - echo "
"; - 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 "
Name:
Folder:
Before Selection:
"; - echo " "; - echo "
After Selection:
"; - echo " "; - echo "
Notes:
"; - echo " "; - echo "
"; - echo " "; - echo " "; - echo "
"; - echo "
"; - - echo "
"; - echo "
"; - - require_once "footer.php"; -?> \ No newline at end of file diff --git a/app/php_edit/filedelete.php b/app/php_edit/filedelete.php deleted file mode 100644 index 3808663da2..0000000000 --- a/app/php_edit/filedelete.php +++ /dev/null @@ -1,84 +0,0 @@ - - Portions created by the Initial Developer are Copyright (C) 2008-2012 - the Initial Developer. All Rights Reserved. - - Contributor(s): - Mark J Crane -*/ -include "root.php"; -require_once "includes/require.php"; -require_once "includes/checkauth.php"; -if (permission_exists('php_editor_save')) { - //access granted -} -else { - echo "access denied"; - exit; -} - -$folder = $_GET["folder"]; -$folder = str_replace ("\\", "/", $folder); -if (substr($folder, -1) != "/") { $folder = $folder.'/'; } -$file = $_GET["file"]; - -if (strlen($folder) > 0 && strlen($file) > 0) { - unlink($folder.$file); - header("Location: fileoptions.php"); -} -else { - //display form - require_once "header.php"; - 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 "
File Name:
"; - echo " "; - echo " "; - echo "
"; - echo "
"; - echo "
"; - - require_once "footer.php"; -} -?> diff --git a/app/php_edit/filelist.php b/app/php_edit/filelist.php deleted file mode 100644 index cec466e2cb..0000000000 --- a/app/php_edit/filelist.php +++ /dev/null @@ -1,287 +0,0 @@ - - Portions created by the Initial Developer are Copyright (C) 2008-2012 - the Initial Developer. All Rights Reserved. - - Contributor(s): - Mark J Crane -*/ -include "root.php"; -require_once "includes/require.php"; -require_once "includes/checkauth.php"; -if (permission_exists('php_editor_view')) { - //access granted -} -else { - echo "access denied"; - exit; -} -require_once "header.php"; - -function isfile($filename) { - //if (@filesize($filename) > 0) { return true; } else { return false; } -} - -function space($count) { - $r=''; $i=0; - while($i < $count) { - $r .= ' '; - $i++; - } - return $r; -} - -function recur_dir($dir) { - clearstatcache(); - $htmldirlist = ''; - $htmlfilelist = ''; - $dirlist = opendir($dir); - $dir_array = array(); - while (false !== ($file = readdir($dirlist))) { - if ($file != "." AND $file != ".."){ - $newpath = $dir.'/'.$file; - $level = explode('/',$newpath); - if (substr($newpath, -4) == ".svn") { - //ignore .svn dir and subdir - } - elseif (substr($newpath, -3) == ".db") { - //ignore .db files - } - else { - $dir_array[] = $newpath; - } - if ($x > 1000) { break; }; - $x++; - } - } - - asort($dir_array); - foreach ($dir_array as $newpath){ - $level = explode('/',$newpath); - - if (is_dir($newpath)) { - /*$mod_array[] = array( - 'level'=>count($level)-1, - 'path'=>$newpath, - 'name'=>end($level), - 'type'=>'dir', - 'mod_time'=>filemtime($newpath), - 'size'=>''); - $mod_array[] = recur_dir($newpath); - */ - $dirname = end($level); - $htmldirlist .= space(count($level))."
$dirname
\n"; - //$htmldirlist .= space(count($level))."
Tools
\n"; - //$htmldirlist .= space(count($level))."
New Folder
\n"; //parent.document.getElementById('file').value='".urlencode($newpath)."' - //$htmldirlist .= space(count($level))."
\n"; - //$htmldirlist .= space(count($level))."
New File
\n"; //parent.document.getElementById('file').value='".urlencode($newpath)."' - //$htmldirlist .= space(count($level))."
\n"; - //$htmldirlist .= space(count($level))."
\n"; - //$htmldirlist .= space(count($level))."
Options
\n"; //parent.document.getElementById('file').value='".urlencode($newpath)."' - //$htmldirlist .= space(count($level))."
\n"; - $htmldirlist .= recur_dir($newpath); - $htmldirlist .= space(count($level))."
\n"; - } - else { - /*$mod_array[] = array( - 'level'=>count($level)-1, - 'path'=>$newpath, - 'name'=>end($level), - 'type'=>'file', - 'mod_time'=>filemtime($newpath), - 'size'=>filesize($newpath)); - */ - $filename = end($level); - $filesize = round(filesize($newpath)/1024, 2); - $htmlfilelist .= space(count($level))."
$filename
\n"; - $htmlfilelist .= space(count($level))."
\n"; - } - } - closedir($dirlist); - return $htmldirlist ."\n". $htmlfilelist; -} - -echo ""; - - -echo ""; - -echo "
"; -echo "\n"; -echo "\n"; -echo " \n"; - echo "\n"; - echo "
\n"; -//echo "
"; - -echo "\n"; -echo " \n"; -echo "\n"; -echo "
Files
\n"; //display:none -//echo "
Files
\n"; //display:none - -//echo "
Tools
\n"; -//echo "
New Folder
\n"; //parent.document.getElementById('file').value='".urlencode($newpath)."' -//echo "
\n"; -//echo "
New File
\n"; //parent.document.getElementById('file').value='".urlencode($newpath)."' -//echo "
\n"; -//echo "
\n"; - -echo recur_dir($_SERVER["DOCUMENT_ROOT"]); - -echo "
\n"; - -/* -echo "
Files
\n"; -echo "\n"; -echo "
Folder 1
\n"; -echo "\n"; -echo "
demo1.php
\n"; -echo "
\n"; -echo "\n"; -echo "
demo2.php
\n"; -echo "
\n"; -echo "\n"; -echo "
\n"; -echo "\n"; -echo "
Folder 2
\n"; -echo "\n"; -echo "
demo3.php
\n"; -echo "
\n"; -echo "\n"; -echo "
demo4.php
\n"; -echo "
\n"; -echo "\n"; -echo "
\n"; -echo "\n"; -echo "
\n"; -*/ - -echo "
\n"; -echo ""; - -echo "

"; -require_once "footer.php"; - -unset ($result_count); -unset ($result); -unset ($key); -unset ($val); -unset ($c); - -echo ""; -echo ""; - -?> diff --git a/app/php_edit/filenew.php b/app/php_edit/filenew.php deleted file mode 100644 index 1c17d5d164..0000000000 --- a/app/php_edit/filenew.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 -*/ -include "root.php"; -require_once "includes/require.php"; -require_once "includes/checkauth.php"; -if (permission_exists('php_editor_save')) { - //access granted -} -else { - echo "access denied"; - exit; -} - -$folder = $_GET["folder"]; -$folder = str_replace ("\\", "/", $folder); -if (substr($folder, -1) != "/") { $folder = $folder.'/'; } -$file = $_GET["file"]; - -if (strlen($folder) > 0 && strlen($file) > 0) { - //create new file - $handle = fopen($folder.$file, 'wb') or die("Error!!"); - $content = ""; - fwrite($handle, $content); - fclose($handle); - header("Location: fileoptions.php"); -} -else { - require_once "header.php"; - 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 "
File Name:
"; - echo " "; - echo " "; - echo "
"; - echo "
"; - echo "
"; - - require_once "footer.php"; -} - -?> diff --git a/app/php_edit/fileoptions.php b/app/php_edit/fileoptions.php deleted file mode 100644 index 1c3adc1459..0000000000 --- a/app/php_edit/fileoptions.php +++ /dev/null @@ -1,85 +0,0 @@ - - Portions created by the Initial Developer are Copyright (C) 2008-2012 - the Initial Developer. All Rights Reserved. - - Contributor(s): - Mark J Crane -*/ -include "root.php"; -require_once "includes/require.php"; -require_once "includes/checkauth.php"; -if (permission_exists('php_editor_view')) { - //access granted -} -else { - echo "access denied"; - exit; -} -require_once "header.php"; - -$file = $_GET["file"]; -$file = str_replace ("\\", "/", $file); -$folder = $_GET["folder"]; -$folder = str_replace ($file, "", $folder); -$urlpath = str_replace ($_SERVER["DOCUMENT_ROOT"], "", $folder); - -echo "
"; -echo "\n"; -echo ""; -echo "\n"; -echo "\n"; - -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "
"; - -echo ""; -echo ""; -echo "\n"; -echo "\n"; -echo ""; -echo "
Path:
File:
"; - -echo "
"; -echo " "; -echo ""; - -echo "
"; -echo ""; -echo " \n"; -echo " \n"; -echo " \n"; -echo " \n"; -echo " \n"; -echo " \n"; -echo " \n"; -echo "





"; -echo "
"; - -echo "
"; -echo "
"; - -require_once "footer.php"; -?> diff --git a/app/php_edit/fileoptionslist.php b/app/php_edit/fileoptionslist.php deleted file mode 100644 index 87197513ba..0000000000 --- a/app/php_edit/fileoptionslist.php +++ /dev/null @@ -1,270 +0,0 @@ - - Portions created by the Initial Developer are Copyright (C) 2008-2012 - the Initial Developer. All Rights Reserved. - - Contributor(s): - Mark J Crane -*/ -include "root.php"; -require_once "includes/require.php"; -require_once "includes/checkauth.php"; -if (permission_exists('php_editor_view')) { - //access granted -} -else { - echo "access denied"; - exit; -} -require_once "header.php"; - -function isfile($filename) { - if (@filesize($filename) > 0) { return true; } else { return false; } -} - -function space($count) { - $r=''; $i=0; - while($i < $count) { - $r .= ' '; - $i++; - } - return $r; -} - -function recur_dir($dir) { - clearstatcache(); - $htmldirlist = ''; - $htmlfilelist = ''; - $dirlist = opendir($dir); - while ($file = readdir ($dirlist)) { - if ($file != '.' && $file != '..') { - $newpath = $dir.'/'.$file; - $level = explode('/',$newpath); - - if (is_dir($newpath)) { - /*$mod_array[] = array( - 'level'=>count($level)-1, - 'path'=>$newpath, - 'name'=>end($level), - 'type'=>'dir', - 'mod_time'=>filemtime($newpath), - 'size'=>''); - $mod_array[] = recur_dir($newpath); - */ - $dirname = end($level); - $htmldirlist .= space(count($level))."
$dirname
\n"; - //$htmldirlist .= space(count($level))."
Tools
\n"; - //$htmldirlist .= space(count($level))."
New Folder
\n"; //parent.document.getElementById('file').value='".urlencode($newpath)."' - //$htmldirlist .= space(count($level))."
\n"; - //$htmldirlist .= space(count($level))."
New File
\n"; //parent.document.getElementById('file').value='".urlencode($newpath)."' - //$htmldirlist .= space(count($level))."
\n"; - //$htmldirlist .= space(count($level))."
\n"; - //$htmldirlist .= space(count($level))."
Options
\n"; //parent.document.getElementById('file').value='".urlencode($newpath)."' - //$htmldirlist .= space(count($level))."
\n"; - $htmldirlist .= recur_dir($newpath); - $htmldirlist .= space(count($level))."
\n"; - } - else { - /*$mod_array[] = array( - 'level'=>count($level)-1, - 'path'=>$newpath, - 'name'=>end($level), - 'type'=>'file', - 'mod_time'=>filemtime($newpath), - 'size'=>filesize($newpath)); - */ - $filename = end($level); - $filesize = round(filesize($newpath)/1024, 2); - $newpath = str_replace ($filename, "", $newpath); - $htmlfilelist .= space(count($level))."
$filename
\n"; - $htmlfilelist .= space(count($level))."
\n"; - } - } - } - - closedir($dirlist); - return $htmldirlist ."\n". $htmlfilelist; -} - -echo "\n"; - -echo "\n"; - -echo "
"; -echo "\n"; - -echo "\n"; -echo "
\n"; -echo "\n"; -echo " \n"; -echo "\n"; -echo "
Files
\n"; //display:none -//echo "
Files
\n"; //display:none - -//echo "
Tools
\n"; -//echo "
New Folder
\n"; //parent.document.getElementById('file').value='".urlencode($newpath)."' -//echo "
\n"; -//echo "
New File
\n"; //parent.document.getElementById('file').value='".urlencode($newpath)."' -//echo "
\n"; -//echo "
\n"; -echo recur_dir($_SERVER["DOCUMENT_ROOT"]); - -echo "
\n"; - -/* -echo "
Files
\n"; -echo "\n"; -echo "
Folder 1
\n"; -echo "\n"; -echo "
demo1.php
\n"; -echo "
\n"; -echo "\n"; -echo "
demo2.php
\n"; -echo "
\n"; -echo "\n"; -echo "
\n"; -echo "\n"; -echo "
Folder 2
\n"; -echo "\n"; -echo "
demo3.php
\n"; -echo "
\n"; -echo "\n"; -echo "
demo4.php
\n"; -echo "
\n"; -echo "\n"; -echo "
\n"; -echo "\n"; -echo "
\n"; -*/ - -echo "
\n"; -echo ""; - -echo "

"; -require_once "footer.php"; - -unset ($result_count); -unset ($result); -unset ($key); -unset ($val); -unset ($c); - -echo ""; -echo ""; - -?> \ No newline at end of file diff --git a/app/php_edit/fileread.php b/app/php_edit/fileread.php deleted file mode 100644 index 463f9d2dc1..0000000000 --- a/app/php_edit/fileread.php +++ /dev/null @@ -1,49 +0,0 @@ - - Portions created by the Initial Developer are Copyright (C) 2008-2012 - the Initial Developer. All Rights Reserved. - - Contributor(s): - Mark J Crane -*/ -include "root.php"; -require_once "includes/require.php"; -require_once "includes/checkauth.php"; -if (permission_exists('php_editor_view')) { - //access granted -} -else { - echo "access denied"; - exit; -} - -$filename = $_POST["file"]; -$filename = str_replace ("\\", "/", $filename); - -$handle = fopen($filename, "r"); -if ($handle) { - while (!feof($handle)) { - $buffer = fgets($handle, 4096); - echo $buffer; - } - fclose($handle); -} - -?> \ No newline at end of file diff --git a/app/php_edit/filerename.php b/app/php_edit/filerename.php deleted file mode 100644 index a27aa6e2b2..0000000000 --- a/app/php_edit/filerename.php +++ /dev/null @@ -1,102 +0,0 @@ - - Portions created by the Initial Developer are Copyright (C) 2008-2012 - the Initial Developer. All Rights Reserved. - - Contributor(s): - Mark J Crane -*/ -include "root.php"; -require_once "includes/require.php"; -require_once "includes/checkauth.php"; -if (permission_exists('php_editor_save')) { - //access granted -} -else { - echo "access denied"; - exit; -} - -$folder = $_GET["folder"]; -//$folder = str_replace ("\\", "/", $folder); -//if (substr($folder, -1) != "/") { $folder = $folder.'/'; } -$newfilename = $_GET["newfilename"]; -$filename = $_GET["filename"]; -//echo $folder.$file; - - -if (strlen($folder) > 0 && strlen($newfilename) > 0) { - //echo "new file: ".$newfilename."
"; - //echo "folder: ".$folder."
"; - //echo "orig filename: ".$filename."
";; - rename($folder.$filename, $folder.$newfilename); - header("Location: fileoptions.php"); -} -else { //display 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 "
Path:
".$folder.$filename."

Original file name:
".$filename."
"; - - echo "
"; - - echo ""; - echo " "; - echo " "; - echo " "; - - echo " "; - echo " "; - echo " "; - - echo " "; - echo " "; - echo " "; - echo "
Rename file to:
"; - echo " "; - echo " "; - echo " "; - echo "
"; - echo "
"; - echo "
"; - - require_once "footer.php"; - -} - -?> \ No newline at end of file diff --git a/app/php_edit/filesave.php b/app/php_edit/filesave.php deleted file mode 100644 index 51a650fb42..0000000000 --- a/app/php_edit/filesave.php +++ /dev/null @@ -1,50 +0,0 @@ - - Portions created by the Initial Developer are Copyright (C) 2008-2012 - the Initial Developer. All Rights Reserved. - - Contributor(s): - Mark J Crane -*/ -include "root.php"; -require_once "includes/require.php"; -require_once "includes/checkauth.php"; -if (permission_exists('php_editor_save')) { - //access granted -} -else { - echo "access denied"; - exit; -} - -$filename = $_POST["file"]; //filename with the path -$filename = str_replace ("\\", "/", $filename); -$content = $_POST["content"]; - -$handle = fopen($filename, 'wb') or die("Error!!"); -fwrite($handle, $content); -fclose($handle); - -//set the reload_xml value to true - $_SESSION["reload_xml"] = true; - -echo $content; - -?> diff --git a/app/php_edit/folderdelete.php b/app/php_edit/folderdelete.php deleted file mode 100644 index 67e1e7f1ec..0000000000 --- a/app/php_edit/folderdelete.php +++ /dev/null @@ -1,46 +0,0 @@ - - Portions created by the Initial Developer are Copyright (C) 2008-2012 - the Initial Developer. All Rights Reserved. - - Contributor(s): - Mark J Crane -*/ -include "root.php"; -require_once "includes/require.php"; -require_once "includes/checkauth.php"; -if (permission_exists('php_editor_save')) { - //access granted -} -else { - echo "access denied"; - exit; -} - -$folder = $_GET["folder"]; -$folder = str_replace ("\\", "/", $folder); - -if (strlen($folder) > 0) { - //delete the folder - rmdir($folder); //, 0700 - header("Location: fileoptions.php"); -} - -?> \ No newline at end of file diff --git a/app/php_edit/foldernew.php b/app/php_edit/foldernew.php deleted file mode 100644 index 5328bd23c6..0000000000 --- a/app/php_edit/foldernew.php +++ /dev/null @@ -1,83 +0,0 @@ - - Portions created by the Initial Developer are Copyright (C) 2008-2012 - the Initial Developer. All Rights Reserved. - - Contributor(s): - Mark J Crane -*/ -include "root.php"; -require_once "includes/require.php"; -require_once "includes/checkauth.php"; -if (permission_exists('php_editor_save')) { - //access granted -} -else { - echo "access denied"; - exit; -} - -$folder = $_GET["folder"]; -$folder = str_replace ("\\", "/", $folder); -$foldername = $_GET["foldername"]; - -if (strlen($folder) > 0 && strlen($foldername) > 0) { - //create new folder - mkdir($folder.'/'.$foldername); //, 0700 - header("Location: fileoptions.php"); -} -else { //display form - require_once "header.php"; - echo "
"; - echo "
"; - echo "
"; - echo ""; - echo " "; - echo " "; - echo " "; - echo " "; - echo " "; - echo " "; - echo "
Path:
".$folder."
"; - - echo "
"; - - echo ""; - echo " "; - echo " "; - echo " "; - - echo " "; - echo " "; - echo " "; - - echo " "; - echo " "; - echo " "; - echo "
Folder Name:
"; - echo " "; - echo " "; - echo "
"; - echo "
"; - echo "
"; - - require_once "footer.php"; -} -?> diff --git a/app/php_edit/footer.php b/app/php_edit/footer.php deleted file mode 100644 index 3e7b9037ab..0000000000 --- a/app/php_edit/footer.php +++ /dev/null @@ -1,43 +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 ""; -echo "fusionpbx "; -echo "        "; -echo "http://fusionpbx.com"; -echo "        "; -echo "Author: Mark J. Crane "; - -echo ""; -*/ -echo "
"; -echo ""; -echo ""; - -?> diff --git a/app/php_edit/header.php b/app/php_edit/header.php deleted file mode 100644 index b07b45c390..0000000000 --- a/app/php_edit/header.php +++ /dev/null @@ -1,83 +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 ""; -//echo ""; -echo ""; - - -echo ""; -echo ""; -echo ""; -echo "
"; - -?> diff --git a/app/php_edit/images/Thumbs.db b/app/php_edit/images/Thumbs.db deleted file mode 100644 index 46593a8c2e..0000000000 Binary files a/app/php_edit/images/Thumbs.db and /dev/null differ diff --git a/app/php_edit/images/file.gif b/app/php_edit/images/file.gif deleted file mode 100644 index a6cf9845fc..0000000000 Binary files a/app/php_edit/images/file.gif and /dev/null differ diff --git a/app/php_edit/images/file.png b/app/php_edit/images/file.png deleted file mode 100644 index 33b5f5f374..0000000000 Binary files a/app/php_edit/images/file.png and /dev/null differ diff --git a/app/php_edit/images/folder.gif b/app/php_edit/images/folder.gif deleted file mode 100644 index 50ab253cc7..0000000000 Binary files a/app/php_edit/images/folder.gif and /dev/null differ diff --git a/app/php_edit/images/gear.png b/app/php_edit/images/gear.png deleted file mode 100644 index 1adf1e778f..0000000000 Binary files a/app/php_edit/images/gear.png and /dev/null differ diff --git a/app/php_edit/images/leaf.gif b/app/php_edit/images/leaf.gif deleted file mode 100644 index 50ab253cc7..0000000000 Binary files a/app/php_edit/images/leaf.gif and /dev/null differ diff --git a/app/php_edit/images/minus.gif b/app/php_edit/images/minus.gif deleted file mode 100644 index 1094ab912b..0000000000 Binary files a/app/php_edit/images/minus.gif and /dev/null differ diff --git a/app/php_edit/images/plus.gif b/app/php_edit/images/plus.gif deleted file mode 100644 index fdacf8efe5..0000000000 Binary files a/app/php_edit/images/plus.gif and /dev/null differ diff --git a/app/php_edit/images/program.gif b/app/php_edit/images/program.gif deleted file mode 100644 index dc3dfa1104..0000000000 Binary files a/app/php_edit/images/program.gif and /dev/null differ diff --git a/app/php_edit/images/thumbnails/Thumbs.db b/app/php_edit/images/thumbnails/Thumbs.db deleted file mode 100644 index c4e4684b24..0000000000 Binary files a/app/php_edit/images/thumbnails/Thumbs.db and /dev/null differ diff --git a/app/php_edit/images/thumbnails/cliplibrary.png b/app/php_edit/images/thumbnails/cliplibrary.png deleted file mode 100644 index bc70f332fd..0000000000 Binary files a/app/php_edit/images/thumbnails/cliplibrary.png and /dev/null differ diff --git a/app/php_edit/images/thumbnails/filemanagement.png b/app/php_edit/images/thumbnails/filemanagement.png deleted file mode 100644 index 88cb7661b1..0000000000 Binary files a/app/php_edit/images/thumbnails/filemanagement.png and /dev/null differ diff --git a/app/php_edit/images/thumbnails/phpeditor.png b/app/php_edit/images/thumbnails/phpeditor.png deleted file mode 100644 index c6f7f369bb..0000000000 Binary files a/app/php_edit/images/thumbnails/phpeditor.png and /dev/null differ diff --git a/app/php_edit/index.php b/app/php_edit/index.php deleted file mode 100644 index e91149af65..0000000000 --- a/app/php_edit/index.php +++ /dev/null @@ -1,224 +0,0 @@ - - Portions created by the Initial Developer are Copyright (C) 2008-2012 - the Initial Developer. All Rights Reserved. - - Contributor(s): - Mark J Crane -*/ -include "root.php"; -require_once "includes/require.php"; -require_once "includes/checkauth.php"; -if (permission_exists('php_editor_view')) { - //access granted -} -else { - echo "access denied"; - exit; -} - -echo "\n"; -echo "\n"; -echo " \n"; -echo " "; - - echo "\n"; - - echo ""; - ?> - - - - - - - - -
- - - - \n"; - echo "\n"; - } - else { - echo "\n"; - } - ?> - -
- - \ No newline at end of file diff --git a/app/php_edit/list.php b/app/php_edit/list.php deleted file mode 100644 index c1d3843ebb..0000000000 --- a/app/php_edit/list.php +++ /dev/null @@ -1,107 +0,0 @@ - - Portions created by the Initial Developer are Copyright (C) 2008-2012 - the Initial Developer. All Rights Reserved. - - Contributor(s): - Mark J Crane -*/ -include "root.php"; -require_once "includes/checkauth.php"; -if (permission_exists('php_editor_view')) { - //access granted -} -else { - echo "access denied"; - exit; -} -require_once "admin/edit/header.php"; -echo "
"; -echo "\n"; -echo "\n"; -echo " \n"; - echo "\n"; -} //end if results -echo "
\n"; -echo "
"; - -$sql = "select * from v_clips "; -$prep_statement = $db->prepare(check_sql($sql)); -$prep_statement->execute(); -$result = $prep_statement->fetchAll(PDO::FETCH_NAMED); -$result_count = count($result); - -$c = 0; -$row_style["0"] = "background-color: #F5F5DC;"; -$row_style["1"] = "background-color: #FFFFFF;"; - -echo "
\n"; -echo "\n"; -echo ""; - -if ($result_count == 0) { //no results - echo ""; -} -else { //received results - echo ""; - echo ""; - //echo ""; - //echo ""; - //echo ""; - //echo ""; - //echo ""; - echo ""; - echo "\n"; - - foreach($result as $row) { - echo "\n"; - //echo ""; - echo ""; - //echo ""; - //echo ""; - //echo ""; - //echo ""; - //echo ""; - echo ""; - - echo "\n"; - if ($c==0) { $c=1; } else { $c=0; } - } //end foreach unset($sql, $result, $row_count); - echo "
 
    clip name      clip_folder        clip_text_start        clip_text_end        clip_desc        clip_order   
".$row['clip_uuid']."".$row['clip_name']."".$row[clip_folder]."".$row[clip_text_start]."".$row[clip_text_end]."".$row[clip_desc]."".$row[clip_order]."
\n"; - echo "
\n"; - - echo "
\n"; - -echo "
\n"; -echo "   \n"; -echo "   \n"; -echo "
\n"; -echo ""; - -echo "

"; -require_once "admin/edit/footer.php"; - -unset ($result_count); -unset ($result); -unset ($key); -unset ($val); -unset ($c); - -?> \ No newline at end of file diff --git a/app/php_edit/readme.txt b/app/php_edit/readme.txt deleted file mode 100644 index cafc4144ae..0000000000 --- a/app/php_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/php_edit/root.php b/app/php_edit/root.php deleted file mode 100644 index 7b882438ea..0000000000 --- a/app/php_edit/root.php +++ /dev/null @@ -1,50 +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 - if (!defined("PATH_SEPARATOR")) { - if ( strpos( $_ENV[ "OS" ], "Win" ) !== false ) { define("PATH_SEPARATOR", ";"); } else { define("PATH_SEPARATOR", ":"); } - } - -// make sure the document_root is set - $_SERVER["SCRIPT_FILENAME"] = str_replace("\\", "/", $_SERVER["SCRIPT_FILENAME"]); - $_SERVER["DOCUMENT_ROOT"] = str_replace($_SERVER["PHP_SELF"], "", $_SERVER["SCRIPT_FILENAME"]); - $_SERVER["DOCUMENT_ROOT"] = realpath($_SERVER["DOCUMENT_ROOT"]); - //echo "DOCUMENT_ROOT: ".$_SERVER["DOCUMENT_ROOT"]."
\n"; - //echo "PHP_SELF: ".$_SERVER["PHP_SELF"]."
\n"; - //echo "SCRIPT_FILENAME: ".$_SERVER["SCRIPT_FILENAME"]."
\n"; - -// if the project directory exists then add it to the include path otherwise add the document root to the include path - if (is_dir($_SERVER["DOCUMENT_ROOT"].'/fusionpbx')){ - if(!defined('PROJECT_PATH')) { define('PROJECT_PATH', '/fusionpbx'); } - set_include_path( get_include_path() . PATH_SEPARATOR . $_SERVER["DOCUMENT_ROOT"].'/fusionpbx' ); - } - else { - if(!defined('PROJECT_PATH')) { define('PROJECT_PATH', ''); } - set_include_path( get_include_path() . PATH_SEPARATOR . $_SERVER['DOCUMENT_ROOT'] ); - } - -?> \ No newline at end of file diff --git a/app/provision_editor/app_config.php b/app/provision_editor/app_config.php deleted file mode 100644 index 0efbe3e1c8..0000000000 --- a/app/provision_editor/app_config.php +++ /dev/null @@ -1,44 +0,0 @@ - \ No newline at end of file diff --git a/app/provision_editor/clip.db b/app/provision_editor/clip.db deleted file mode 100644 index 5f15c2fb9e..0000000000 Binary files a/app/provision_editor/clip.db and /dev/null differ diff --git a/app/provision_editor/clipadd.php b/app/provision_editor/clipadd.php deleted file mode 100644 index 7498d77045..0000000000 --- a/app/provision_editor/clipadd.php +++ /dev/null @@ -1,122 +0,0 @@ - - Portions created by the Initial Developer are Copyright (C) 2008-2012 - the Initial Developer. All Rights Reserved. - - Contributor(s): - Mark J Crane -*/ -include "root.php"; -require_once "includes/require.php"; -require_once "includes/checkauth.php"; -if (permission_exists('xml_editor_save')) { - //access granted -} -else { - echo "access denied"; - exit; -} -require_once "config.php"; - -if (count($_POST)>0) { - $clip_name = check_str($_POST["clip_name"]); - $clip_folder = check_str($_POST["clip_folder"]); - $clip_text_start = check_str($_POST["clip_text_start"]); - $clip_text_end = check_str($_POST["clip_text_end"]); - $clip_desc = check_str($_POST["clip_desc"]); - $clip_order = check_str($_POST["clip_order"]); - - $sql = "insert into v_clip_library "; - $sql .= "("; - $sql .= "clip_name, "; - $sql .= "clip_folder, "; - $sql .= "clip_text_start, "; - $sql .= "clip_text_end, "; - $sql .= "clip_desc, "; - $sql .= "clip_order "; - $sql .= ")"; - $sql .= "values "; - $sql .= "("; - $sql .= "'$clip_name', "; - $sql .= "'$clip_folder', "; - $sql .= "'$clip_text_start', "; - $sql .= "'$clip_text_end', "; - $sql .= "'$clip_desc', "; - $sql .= "'$clip_order' "; - $sql .= ")"; - $db->exec(check_sql($sql)); - unset($sql,$db); - - require_once "header.php"; - echo "\n"; - echo "Add Complete"; - require_once "footer.php"; - return; -} - - require_once "header.php"; - echo "
"; - 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 "
Name:
Folder:
Before Selection:
"; - echo " "; - echo "
After Selection:
"; - echo " "; - echo "
Notes:
"; - echo " "; - echo "
"; - echo "
"; - - echo "
"; - echo "
"; - -require_once "footer.php"; -?> \ No newline at end of file diff --git a/app/provision_editor/clipdelete.php b/app/provision_editor/clipdelete.php deleted file mode 100644 index bdc059d619..0000000000 --- a/app/provision_editor/clipdelete.php +++ /dev/null @@ -1,54 +0,0 @@ - - Portions created by the Initial Developer are Copyright (C) 2008-2012 - the Initial Developer. All Rights Reserved. - - Contributor(s): - Mark J Crane -*/ -include "root.php"; -require_once "includes/require.php"; -require_once "includes/checkauth.php"; -if (permission_exists('xml_editor_save')) { - //access granted -} -else { - echo "access denied"; - exit; -} -require_once "config.php"; - -$id = $_GET["id"]; -if (strlen($id)>0) { - $sql = ""; - $sql .= "delete from v_clip_library "; - $sql .= "where id = '$id' "; - $prep_statement = $db->prepare(check_sql($sql)); - $prep_statement->execute(); - unset($sql,$db); -} - -require_once "header.php"; -echo "\n"; -echo "Delete Complete"; -require_once "footer.php"; -return; - -?> diff --git a/app/provision_editor/cliplist.php b/app/provision_editor/cliplist.php deleted file mode 100644 index 7235d6289f..0000000000 --- a/app/provision_editor/cliplist.php +++ /dev/null @@ -1,221 +0,0 @@ - - Portions created by the Initial Developer are Copyright (C) 2008-2012 - the Initial Developer. All Rights Reserved. - - Contributor(s): - Mark J Crane -*/ -include "root.php"; -require_once "includes/require.php"; -require_once "includes/checkauth.php"; -if (permission_exists('xml_editor_view')) { - //access granted -} -else { - echo "access denied"; - exit; -} -require_once "config.php"; - -echo ""; -echo ""; -echo ""; - -function isfile($filename) { - if (@filesize($filename) > 0) { return true; } else { return false; } -} - -function space($count) { - $r=''; $i=0; - while($i < $count) { - $r .= ' '; - $i++; - } - return $r; -} - -//show the content - echo ""; - - echo ""; - -echo ""; -echo ""; - - echo "
"; - echo "\n"; - echo "\n"; - echo "
\n"; - echo "
Clip Library
\n"; //display:none - - $sql = ""; - $sql .= "select * from v_clip_library "; - $sql .= "order by clip_folder "; - $prep_statement = $db->prepare(check_sql($sql)); - $prep_statement->execute(); - $result = $prep_statement->fetchAll(PDO::FETCH_NAMED); - $result_count = count($result); - - if ($result_count > 0) { - $last_folder = ''; - $tag_open = ''; - $x = 0; - $current_depth = 0; - $previous_depth = 0; - foreach($result as $row) { - $current_depth = count(explode ("/", $row[clip_folder])); - if ($current_depth < $previous_depth) { - $count = ($previous_depth - $current_depth); - $i=0; - while($i < $count){ - echo "
\n"; - $i++; - } - echo "
\n"; - } - - if ($last_folder != $row[clip_folder]) { - $clip_folder_name = str_replace ($previous_folder_name, "", $row[clip_folder]); - $clip_folder_name = str_replace ("/", "", $clip_folder_name); - echo "
 ".$clip_folder_name."  
\n\n"; - $tag_open = 1; - } - - $previous_depth = $current_depth; - $previous_folder_name = $row[clip_folder]; - - echo "\n"; - echo "\n"; - echo "\n"; - echo "
\n"; - echo "".$row[clip_name]."\n"; - echo "
\n"; - echo "\n\n"; - - $last_folder = $row[clip_folder]; - - if ($c==0) { $c=1; } else { $c=0; } - } //end foreach - unset($sql, $result, $row_count); - } //end if results - - echo "\n"; - echo "
\n"; - - echo "
\n"; - echo "
"; - echo "

"; - - echo ""; - echo ""; - -?> \ No newline at end of file diff --git a/app/provision_editor/clipoptions.php b/app/provision_editor/clipoptions.php deleted file mode 100644 index fec1ac5e80..0000000000 --- a/app/provision_editor/clipoptions.php +++ /dev/null @@ -1,73 +0,0 @@ - - Portions created by the Initial Developer are Copyright (C) 2008-2012 - the Initial Developer. All Rights Reserved. - - Contributor(s): - Mark J Crane -*/ -include "root.php"; -require_once "includes/require.php"; -require_once "includes/checkauth.php"; -if (permission_exists('xml_editor_view')) { - //access granted -} -else { - echo "access denied"; - exit; -} -require_once "config.php"; -require_once "header.php"; - -echo "
"; -echo "\n"; -echo ""; -echo "\n"; -echo ""; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "
Selected Clip:
"; - -echo " "; - -echo ""; - -echo " "; -//echo " \n"; -//echo " \n"; -//echo " \n"; - -echo " \n"; -echo " \n"; -//echo " \n"; -echo " \n"; -echo " \n"; -echo " \n"; -echo "
Options











"; - -echo "
"; -echo "
"; - -require_once "footer.php"; -?> diff --git a/app/provision_editor/clipoptionslist.php b/app/provision_editor/clipoptionslist.php deleted file mode 100644 index e6c7ff579a..0000000000 --- a/app/provision_editor/clipoptionslist.php +++ /dev/null @@ -1,247 +0,0 @@ - - Portions created by the Initial Developer are Copyright (C) 2008-2012 - the Initial Developer. All Rights Reserved. - - Contributor(s): - Mark J Crane -*/ -include "root.php"; -require_once "includes/require.php"; -require_once "includes/checkauth.php"; -if (permission_exists('xml_editor_view')) { - //access granted -} -else { - echo "access denied"; - exit; -} -require_once "config.php"; - -echo ""; -echo ""; - -echo ""; - -function isfile($filename) { - if (@filesize($filename) > 0) { return true; } else { return false; } -} - -function space($count) { - $r=''; $i=0; - while($i < $count) { - $r .= ' '; - $i++; - } - return $r; -} - -//show the content - echo ""; - - echo ""; - -echo ""; -echo ""; - - echo "
"; - echo "\n"; - - echo "\n"; - echo "
\n"; - echo "
Clip Library
\n"; //display:none - - $sql = ""; - $sql .= "select * from v_clip_library "; - $sql .= "order by clip_folder "; - //$sql .= "and clip_name asc "; - - $prep_statement = $db->prepare(check_sql($sql)); - $prep_statement->execute(); - $result = $prep_statement->fetchAll(PDO::FETCH_NAMED); - $result_count = count($result); - - if ($result_count == 0) { - //no results - } - else { //received results - $last_folder = ''; - $tag_open = ''; - $x = 0; - $current_depth = 0; - $previous_depth = 0; - foreach($result as $row) { - $current_depth = count(explode("/", $row[clip_folder])); - if ($current_depth < $previous_depth) { - $count = ($previous_depth - $current_depth); - $i=0; - while($i < $count){ - echo "
\n"; - $i++; - } - echo "
\n"; - - } - - if ($last_folder != $row[clip_folder]) { - $clip_folder_name = str_replace ($previous_folder_name, "", $row[clip_folder]); - $clip_folder_name = str_replace ("/", "", $clip_folder_name); - echo "
 ".$clip_folder_name."  
\n\n"; - $tag_open = 1; - } - - $previous_depth = $current_depth; - $previous_folder_name = $row[clip_folder]; - - echo "\n"; - echo "\n"; - echo "\n"; - echo "
\n"; - echo "".$row[clip_name]."\n"; - echo "
\n"; - echo "\n\n"; - - $last_folder = $row[clip_folder]; - - if ($c==0) { $c=1; } else { $c=0; } - } //end foreach - unset($sql, $result, $row_count); - - } //end if results - - echo "\n"; - echo "
\n"; - - echo "\n"; - echo "\n"; - echo "\n"; - echo "
"; - - echo "

"; - echo ""; - echo ""; - -?> diff --git a/app/provision_editor/clipsearch.php b/app/provision_editor/clipsearch.php deleted file mode 100644 index c405fca466..0000000000 --- a/app/provision_editor/clipsearch.php +++ /dev/null @@ -1,187 +0,0 @@ - - Portions created by the Initial Developer are Copyright (C) 2008-2012 - the Initial Developer. All Rights Reserved. - - Contributor(s): - Mark J Crane -*/ -include "root.php"; -require_once "config.php"; -require_once "includes/checkauth.php"; -if (permission_exists('xml_editor_view')) { - //access granted -} -else { - echo "access denied"; - exit; -} - -if (count($_POST)>0) { - $id = $_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"]; - - require_once "header.php"; - echo "
"; - echo "\n"; - - echo "\n"; - echo " \n"; - echo "\n"; - - } //end if results - - echo "
\n"; - echo "
"; - - $sql = ""; - $sql .= "select * from v_clip_library "; - $sql .= "where "; - if (strlen($id) > 0) { $sql .= "and id like '%$id%' "; } - if (strlen($clip_name) > 0) { $sql .= "and clip_name like '%$clip_name%' "; } - if (strlen($clip_folder) > 0) { $sql .= "and clip_folder like '%$clip_folder%' "; } - if (strlen($clip_text_start) > 0) { $sql .= "and clip_text_start like '%$clip_text_start%' "; } - if (strlen($clip_text_end) > 0) { $sql .= "and clip_text_end like '%$clip_text_end%' "; } - if (strlen($clip_desc) > 0) { $sql .= "and clip_desc like '%$clip_desc%' "; } - if (strlen($clip_order) > 0) { $sql .= "and clip_order like '%$clip_order%' "; } - - - $sql = trim($sql); - if (substr($sql, -5) == "where"){ $sql = substr($sql, 0, (strlen($sql)-5)); } - $sql = str_replace ("where and", "where", $sql); - $prep_statement = $db->prepare(check_sql($sql)); - $prep_statement->execute(); - $result = $prep_statement->fetchAll(PDO::FETCH_NAMED); - $result_count = count($result); - - $c = 0; - $row_style["0"] = "background-color: #F5F5DC;"; - $row_style["1"] = "background-color: #FFFFFF;"; - - echo "
\n"; - echo "\n"; - echo ""; - - if ($result_count == 0) { //no results - echo ""; - } - else { //received results - - echo ""; - //echo ""; - echo ""; - //echo ""; - //echo ""; - //echo ""; - //echo ""; - //echo ""; - echo ""; - echo "\n"; - - foreach($result as $row) { - //print_r( $row ); - echo "\n"; - //echo ""; - echo ""; - //echo ""; - //echo ""; - //echo ""; - //echo ""; - //echo ""; - echo ""; - - echo "\n"; - if ($c==0) { $c=1; } else { $c=0; } - } //end foreach unset($sql, $result, $row_count); - - echo "
 
    Id        clip_name Search         clip_folder        clip_text_start        clip_text_end        clip_desc        clip_order   
".$row[id]."".$row[clip_name]."".$row[clip_folder]."".$row[clip_text_start]."".$row[clip_text_end]."".$row[clip_desc]."".$row[clip_order]."
\n"; - echo "
\n"; - - - echo "

"; - echo "
\n"; - echo "
"; - - echo "

"; - require_once "footer.php"; - - unset ($result_count); - unset ($result); - unset ($key); - unset ($val); - unset ($c); - -} -else { - - require_once "header.php"; - echo "
"; - 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 " "; - //echo " "; - //echo " "; - //echo " "; - echo " "; - echo " "; - echo " "; - echo "
Name:
Folder:
Start:
End:
Desc:
clip_order:
"; - echo "
"; - - echo "
"; - echo "
"; - - require_once "footer.php"; - -} //end if not post -?> diff --git a/app/provision_editor/clipupdate.php b/app/provision_editor/clipupdate.php deleted file mode 100644 index 674d4cc7d1..0000000000 --- a/app/provision_editor/clipupdate.php +++ /dev/null @@ -1,142 +0,0 @@ - - Portions created by the Initial Developer are Copyright (C) 2008-2012 - the Initial Developer. All Rights Reserved. - - Contributor(s): - Mark J Crane -*/ -include "root.php"; -require_once "includes/require.php"; -require_once "includes/checkauth.php"; -if (permission_exists('xml_editor_save')) { - //access granted -} -else { - echo "access denied"; - exit; -} -require_once "config.php"; - -if (count($_POST)>0) { - $id = check_str($_POST["id"]); - $clip_name = check_str($_POST["clip_name"]); - $clip_folder = check_str($_POST["clip_folder"]); - $clip_text_start = check_str($_POST["clip_text_start"]); - $clip_text_end = check_str($_POST["clip_text_end"]); - $clip_desc = check_str($_POST["clip_desc"]); - $clip_order = check_str($_POST["clip_order"]); - - //sql update - $sql = "update v_clip_library set "; - $sql .= "clip_name = '$clip_name', "; - $sql .= "clip_folder = '$clip_folder', "; - $sql .= "clip_text_start = '$clip_text_start', "; - $sql .= "clip_text_end = '$clip_text_end', "; - $sql .= "clip_desc = '$clip_desc', "; - $sql .= "clip_order = '$clip_order' "; - $sql .= "where id = '$id' "; - $count = $db->exec(check_sql($sql)); - //echo "Affected Rows: ".$count; - - - //edit: make sure the meta redirect url is correct - require_once "header.php"; - echo "\n"; - echo "Update Complete"; - require_once "footer.php"; - return; -} -else { - //get data from the db - $id = $_GET["id"]; - - $sql = ""; - $sql .= "select * from v_clip_library "; - $sql .= "where id = '$id' "; - $prep_statement = $db->prepare(check_sql($sql)); - $prep_statement->execute(); - - $result = $prep_statement->fetchAll(PDO::FETCH_NAMED); - foreach ($result as &$row) { - $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"]; - break; //limit to 1 row - } - echo ""; - echo "
";} - - require_once "header.php"; - echo "
"; - 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 "
Name:
Folder:
Before Selection:
"; - echo " "; - echo "
After Selection:
"; - echo " "; - echo "
Notes:
"; - echo " "; - echo "
"; - echo " "; - echo " "; - echo "
"; - echo "
"; - - echo "
"; - echo "
"; - - require_once "footer.php"; -?> diff --git a/app/provision_editor/config.php b/app/provision_editor/config.php deleted file mode 100644 index 9806b236e7..0000000000 --- a/app/provision_editor/config.php +++ /dev/null @@ -1,176 +0,0 @@ - - Portions created by the Initial Developer are Copyright (C) 2008-2012 - the Initial Developer. All Rights Reserved. - - Contributor(s): - Mark J Crane -*/ - -include "root.php"; - -error_reporting (E_ALL ^ E_NOTICE); - -$applicationname = 'Edit'; -$bodyoptions = ""; - -$dbfilename = "clip.db"; -$db_file_path = PROJECT_PATH."/xml_edit/"; - -//$temp = $_ENV["TEMP"]."\\"; -if (is_writable($db_file_path.$dbfilename)) { //is writable - //use database in current location - echo "yes"; -} -else { //not writable - /* - //running from a non writable location so copy to temp directory - if (file_exists($temp.$dbfilename)) { - $db_file_path = $temp; //file already exists use existing file - } - else { //file doese not exist - //copy the file to the temp dir - if (copy($db_file_path.$dbfilename, $temp.$dbfilename)) { - //echo "copy succeeded.\n"; - $db_file_path = $temp; - } - else { - echo "Copy Failed "; - exit; - } - } - */ -} - -function get_string_between($string, $start, $end){ - $string = " ".$string; - $ini = strpos($string,$start); - if ($ini == 0) return ""; - $ini += strlen($start); - $len = strpos($string,$end,$ini) - $ini; - return substr($string,$ini,$len); -} - -//$fullstring = "this is my [tag]dog[/tag]"; -//$parsed = get_string_between($fullstring, "[tag]", "[/tag]"); - -//database connection -try { - //$db = new PDO('sqlite2:example.db'); //sqlite 2 - //$db = new PDO('sqlite::memory:'); //sqlite 3 - if (!function_exists('phpmd5')) { - function phpmd5($string) { - return md5($string); - } - } - if (!function_exists('phpmd5')) { - function phpunix_timestamp($string) { - return strtotime($string); - } - } - if (!function_exists('phpnow')) { - function phpnow() { - return date('r'); - } - } - - if (!function_exists('phpleft')) { - function phpleft($string, $num) { - return substr($string, 0, $num); - } - } - - if (!function_exists('phpright')) { - function phpright($string, $num) { - return substr($string, (strlen($string)-$num), strlen($string)); - } - } - - if (!function_exists('phpsqlitedatatype')) { - function phpsqlitedatatype($string, $field) { - - //--- Begin: Get String Between start and end characters ----- - $start = '('; - $end = ')'; - $ini = stripos($string,$start); - if ($ini == 0) return ""; - $ini += strlen($start); - $len = stripos($string,$end,$ini) - $ini; - $string = substr($string,$ini,$len); - //--- End: Get String Between start and end characters ----- - - $strdatatype = ''; - $stringarray = split (',', $string); - foreach($stringarray as $lnvalue) { - - //$strdatatype .= "-- ".$lnvalue ." ".strlen($lnvalue)." delim ".strrchr($lnvalue, " ")."---
"; - //$delimpos = stripos($lnvalue, " "); - //$strdatatype .= substr($value,$delimpos,strlen($value))." --
"; - - $fieldlistarray = split (" ", $value); - //$strdatatype .= $value ."
"; - //$strdatatype .= $fieldlistarray[0] ."
"; - //echo $fieldarray[0]."
\n"; - if ($fieldarray[0] == $field) { - //$strdatatype = $fieldarray[1]." ".$fieldarray[2]." ".$fieldarray[3]." ".$fieldarray[4]; //strdatatype - } - unset($fieldarray, $string, $field); - } - - //$strdatatype = $string; - return $strdatatype; - } - } //end function - -/* - $db = new PDO('sqlite:'.$db_file_path.$dbfilename); //sqlite 3 - //bool PDO::sqliteCreateFunction ( string function_name, callback callback [, int num_args] ) - $db->sqliteCreateFunction('md5', 'phpmd5', 1); - //$db->sqliteCreateFunction('unix_timestamp', 'phpunix_timestamp', 1); - $db->sqliteCreateFunction('now', 'phpnow', 0); - $db->sqliteCreateFunction('sqlitedatatype', 'phpsqlitedatatype', 2); - $db->sqliteCreateFunction('strleft', 'phpleft', 2); - $db->sqliteCreateFunction('strright', 'phpright', 2); -*/ -} -catch (PDOException $error) { - print "error: " . $error->getMessage() . "
"; - die(); -} - -if(!function_exists('escapejs')){ - function escapejs($strtemp) { - $strtemp = str_replace ("\"", "\\\"", $strtemp); //escape the single quote - //$strtemp = str_replace ("'", "''", $strtemp); //escape the single quote - return $strtemp; - } -} - -if(!function_exists('check_str')){ - function check_str($strtemp) { - //$strtemp = str_replace ("\$", "\\\$", $strtemp); //escape the single quote - //$strtemp = str_replace ("\'", "''", $strtemp); //escape the single quote - $strtemp = str_replace ("'", "''", $strtemp); //escape the single quote - //echo "strtemp $strtemp"; - return $strtemp; - } -} - -?> diff --git a/app/provision_editor/filedelete.php b/app/provision_editor/filedelete.php deleted file mode 100644 index a45796b4d4..0000000000 --- a/app/provision_editor/filedelete.php +++ /dev/null @@ -1,87 +0,0 @@ - - Portions created by the Initial Developer are Copyright (C) 2008-2012 - the Initial Developer. All Rights Reserved. - - Contributor(s): - Mark J Crane -*/ -include "root.php"; -require_once "includes/require.php"; -require_once "includes/checkauth.php"; -if (permission_exists('xml_editor_save')) { - //access granted -} -else { - echo "access denied"; - exit; -} -require_once "config.php"; - -$folder = $_GET["folder"]; -$folder = str_replace ("\\", "/", $folder); -if (substr($folder, -1) != "/") { $folder = $folder.'/'; } -$file = $_GET["file"]; - -//echo $folder.$file; - -if (strlen($folder) > 0 && strlen($file) > 0) { - unlink($folder.$file); - header("Location: fileoptions.php"); -} -else { - //display form - require_once "header.php"; - 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 "
File Name:
"; - echo " "; - echo " "; - echo "
"; - echo "
"; - echo "
"; - - require_once "footer.php"; -} -?> diff --git a/app/provision_editor/filelist.php b/app/provision_editor/filelist.php deleted file mode 100644 index 613ec9524a..0000000000 --- a/app/provision_editor/filelist.php +++ /dev/null @@ -1,239 +0,0 @@ - - Portions created by the Initial Developer are Copyright (C) 2008-2012 - the Initial Developer. All Rights Reserved. - - Contributor(s): - Mark J Crane -*/ -include "root.php"; -require_once "includes/require.php"; -require_once "includes/checkauth.php"; -if (permission_exists('xml_editor_view')) { - //access granted -} -else { - echo "access denied"; - exit; -} -require_once "app/xml_edit/config.php"; -require_once "app/xml_edit/header.php"; - -function isfile($filename) { - //if (@filesize($filename) > 0) { return true; } else { return false; } -} - -function space($count) { - $r=''; $i=0; - while($i < $count) { - $r .= ' '; - $i++; - } - return $r; -} - -function recur_dir($dir) { - clearstatcache(); - $htmldirlist = ''; - $htmlfilelist = ''; - $dirlist = opendir($dir); - $dir_array = array(); - while (false !== ($file = readdir($dirlist))) { - if ($file != "." AND $file != ".."){ - $newpath = $dir.'/'.$file; - $level = explode('/',$newpath); - if (substr($newpath, -4) == ".svn") { - //ignore .svn dir and subdir - } - elseif (substr($newpath, -3) == ".db") { - //ignore .db files - } - else { - $dir_array[] = $newpath; - } - if ($x > 1000) { break; }; - $x++; - } - } - - asort($dir_array); - foreach ($dir_array as $newpath){ - $level = explode('/',$newpath); - - if (is_dir($newpath)) { - /*$mod_array[] = array( - 'level'=>count($level)-1, - 'path'=>$newpath, - 'name'=>end($level), - 'type'=>'dir', - 'mod_time'=>filemtime($newpath), - 'size'=>''); - $mod_array[] = recur_dir($newpath); - */ - $dirname = end($level); - $htmldirlist .= space(count($level))."
$dirname
\n"; - $htmldirlist .= recur_dir($newpath); - $htmldirlist .= space(count($level))."
\n"; - } - else { - /*$mod_array[] = array( - 'level'=>count($level)-1, - 'path'=>$newpath, - 'name'=>end($level), - 'type'=>'file', - 'mod_time'=>filemtime($newpath), - 'size'=>filesize($newpath)); - */ - $filename = end($level); - $filesize = round(filesize($newpath)/1024, 2); - $htmlfilelist .= space(count($level))."
$filename
\n"; - $htmlfilelist .= space(count($level))."
\n"; - } - } - closedir($dirlist); - return $htmldirlist ."\n". $htmlfilelist; -} - -//begin the content - echo ""; - - echo ""; - - echo "
"; - echo "\n"; - - echo "\n"; - echo " \n"; - echo "\n"; - echo "
\n"; - echo "\n"; - echo "
Files
\n"; //display:none - - echo recur_dir($_SERVER["DOCUMENT_ROOT"].PROJECT_PATH."/includes/templates/provision/"); - - echo "
\n"; - - echo "
\n"; - echo "
"; - - echo "

"; - require_once "footer.php"; - - echo ""; - echo ""; - -?> diff --git a/app/provision_editor/filenew.php b/app/provision_editor/filenew.php deleted file mode 100644 index c6d49568af..0000000000 --- a/app/provision_editor/filenew.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 -*/ -include "root.php"; -require_once "includes/require.php"; -require_once "includes/checkauth.php"; -if (permission_exists('xml_editor_save')) { - //access granted -} -else { - echo "access denied"; - exit; -} - -$folder = $_GET["folder"]; -$folder = str_replace ("\\", "/", $folder); -if (substr($folder, -1) != "/") { $folder = $folder.'/'; } -$file = $_GET["file"]; - -if (strlen($folder) > 0 && strlen($file) > 0) { - //create new file - $handle = fopen($folder.$file, 'wb') or die("Error!!"); - $content = ""; - fwrite($handle, $content); - fclose($handle); - - header("Location: fileoptions.php"); -} -else { - require_once "header.php"; - 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 "
File Name:
"; - echo " "; - echo " "; - echo "
"; - echo "
"; - echo "
"; - - require_once "footer.php"; - -} - -?> diff --git a/app/provision_editor/fileoptions.php b/app/provision_editor/fileoptions.php deleted file mode 100644 index 208cff3600..0000000000 --- a/app/provision_editor/fileoptions.php +++ /dev/null @@ -1,89 +0,0 @@ - - Portions created by the Initial Developer are Copyright (C) 2008-2012 - the Initial Developer. All Rights Reserved. - - Contributor(s): - Mark J Crane -*/ -include "root.php"; -require_once "includes/require.php"; -require_once "includes/checkauth.php"; -if (permission_exists('xml_editor_view')) { - //access granted -} -else { - echo "access denied"; - exit; -} -require_once "config.php"; -require_once "header.php"; - -$file = $_GET["file"]; -$file = str_replace ("\\", "/", $file); -$folder = $_GET["folder"]; -$folder = str_replace ($file, "", $folder); - -$urlpath = str_replace ($_SERVER["DOCUMENT_ROOT"], "", $folder); - -echo "
"; -echo "\n"; -echo ""; -echo "\n"; -echo "\n"; - -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "
"; - -echo ""; -echo ""; -echo "\n"; -echo "\n"; -echo ""; -echo "
Path:
File:
"; - -echo "
"; - -echo " "; - -echo ""; - -echo "
"; -echo ""; -echo " \n"; -echo " \n"; -echo " \n"; -echo " \n"; -echo " \n"; -echo " \n"; -echo " \n"; -echo "





"; -echo "
"; - -echo "
"; -echo "
"; - -require_once "footer.php"; -?> diff --git a/app/provision_editor/fileoptionslist.php b/app/provision_editor/fileoptionslist.php deleted file mode 100644 index 3d5d3e9e79..0000000000 --- a/app/provision_editor/fileoptionslist.php +++ /dev/null @@ -1,270 +0,0 @@ - - Portions created by the Initial Developer are Copyright (C) 2008-2012 - the Initial Developer. All Rights Reserved. - - Contributor(s): - Mark J Crane -*/ -include "root.php"; -require_once "includes/require.php"; -require_once "includes/checkauth.php"; -if (permission_exists('xml_editor_view')) { - //access granted -} -else { - echo "access denied"; - exit; -} -require_once "config.php"; -require_once "header.php"; - -function isfile($filename) { - if (@filesize($filename) > 0) { return true; } else { return false; } -} - -function space($count) { - $r=''; $i=0; - while($i < $count) { - $r .= ' '; - $i++; - } - return $r; -} - -function recur_dir($dir) { - clearstatcache(); - $htmldirlist = ''; - $htmlfilelist = ''; - $dirlist = opendir($dir); - while ($file = readdir ($dirlist)) { - if ($file != '.' && $file != '..') { - $newpath = $dir.'/'.$file; - $level = explode('/',$newpath); - - if (is_dir($newpath)) { - /*$mod_array[] = array( - 'level'=>count($level)-1, - 'path'=>$newpath, - 'name'=>end($level), - 'type'=>'dir', - 'mod_time'=>filemtime($newpath), - 'size'=>''); - $mod_array[] = recur_dir($newpath); - */ - $dirname = end($level); - $htmldirlist .= space(count($level))."
$dirname
\n"; - //$htmldirlist .= space(count($level))."
Tools
\n"; - //$htmldirlist .= space(count($level))."
New Folder
\n"; //parent.document.getElementById('file').value='".urlencode($newpath)."' - //$htmldirlist .= space(count($level))."
\n"; - //$htmldirlist .= space(count($level))."
New File
\n"; //parent.document.getElementById('file').value='".urlencode($newpath)."' - //$htmldirlist .= space(count($level))."
\n"; - //$htmldirlist .= space(count($level))."
\n"; - //$htmldirlist .= space(count($level))."
Options
\n"; //parent.document.getElementById('file').value='".urlencode($newpath)."' - //$htmldirlist .= space(count($level))."
\n"; - $htmldirlist .= recur_dir($newpath); - $htmldirlist .= space(count($level))."
\n"; - - } - else { - /*$mod_array[] = array( - 'level'=>count($level)-1, - 'path'=>$newpath, - 'name'=>end($level), - 'type'=>'file', - 'mod_time'=>filemtime($newpath), - 'size'=>filesize($newpath)); - */ - $filename = end($level); - $filesize = round(filesize($newpath)/1024, 2); - $newpath = str_replace ($filename, "", $newpath); - $htmlfilelist .= space(count($level))."
$filename
\n"; - $htmlfilelist .= space(count($level))."
\n"; - } - - - } - } - - closedir($dirlist); - return $htmldirlist ."\n". $htmlfilelist; -} - -//show the content - echo "\n"; - - echo "\n"; - - echo "
"; - echo "\n"; - echo "\n"; - echo "
\n"; - //echo "
"; - - echo "\n"; - echo " \n"; - echo "\n"; - echo "
Files
\n"; //display:none - //echo "
Files
\n"; //display:none - - //echo "
Tools
\n"; - //echo "
New Folder
\n"; //parent.document.getElementById('file').value='".urlencode($newpath)."' - //echo "
\n"; - //echo "
New File
\n"; //parent.document.getElementById('file').value='".urlencode($newpath)."' - //echo "
\n"; - //echo "
\n"; - echo recur_dir($_SERVER["DOCUMENT_ROOT"].PROJECT_PATH."/includes/templates/provision/"); - - echo "
\n"; - - /* - echo "
Files
\n"; - echo "\n"; - echo "
Folder 1
\n"; - echo "\n"; - echo "
demo1.php
\n"; - echo "
\n"; - echo "\n"; - echo "
demo2.php
\n"; - echo "
\n"; - echo "\n"; - echo "
\n"; - echo "\n"; - echo "
Folder 2
\n"; - echo "\n"; - echo "
demo3.php
\n"; - echo "
\n"; - echo "\n"; - echo "
demo4.php
\n"; - echo "
\n"; - echo "\n"; - echo "
\n"; - echo "\n"; - echo "
\n"; - */ - - echo "
\n"; - echo ""; - - echo "

"; - require_once "footer.php"; - - echo ""; - echo ""; - -?> diff --git a/app/provision_editor/fileread.php b/app/provision_editor/fileread.php deleted file mode 100644 index 46e74805a4..0000000000 --- a/app/provision_editor/fileread.php +++ /dev/null @@ -1,49 +0,0 @@ - - Portions created by the Initial Developer are Copyright (C) 2008-2012 - the Initial Developer. All Rights Reserved. - - Contributor(s): - Mark J Crane -*/ -include "root.php"; -require_once "includes/require.php"; -require_once "includes/checkauth.php"; -if (permission_exists('xml_editor_view')) { - //access granted -} -else { - echo "access denied"; - exit; -} - -$filename = check_str($_POST["file"]); -$filename = str_replace ("\\", "/", $filename); - -$handle = fopen($filename, "r"); -if ($handle) { - while (!feof($handle)) { - $buffer = fgets($handle, 4096); - echo $buffer; - } - fclose($handle); -} - -?> diff --git a/app/provision_editor/filerename.php b/app/provision_editor/filerename.php deleted file mode 100644 index 9df4307c57..0000000000 --- a/app/provision_editor/filerename.php +++ /dev/null @@ -1,102 +0,0 @@ - - Portions created by the Initial Developer are Copyright (C) 2008-2012 - the Initial Developer. All Rights Reserved. - - Contributor(s): - Mark J Crane -*/ -include "root.php"; -require_once "includes/require.php"; -require_once "includes/checkauth.php"; -if (permission_exists('xml_editor_save')) { - //access granted -} -else { - echo "access denied"; - exit; -} - -$folder = $_GET["folder"]; -//$folder = str_replace ("\\", "/", $folder); -//if (substr($folder, -1) != "/") { $folder = $folder.'/'; } -$newfilename = $_GET["newfilename"]; -$filename = $_GET["filename"]; -//echo $folder.$file; - - -if (strlen($folder) > 0 && strlen($newfilename) > 0) { - //echo "new file: ".$newfilename."
"; - //echo "folder: ".$folder."
"; - //echo "orig filename: ".$filename."
";; - rename($folder.$filename, $folder.$newfilename); - header("Location: fileoptions.php"); -} -else { //display 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 "
Path:
".$folder.$filename."

Original file name:
".$filename."
"; - - echo "
"; - - echo ""; - echo " "; - echo " "; - echo " "; - - echo " "; - echo " "; - echo " "; - - echo " "; - echo " "; - echo " "; - echo "
Rename file to:
"; - echo " "; - echo " "; - echo " "; - echo "
"; - echo "
"; - echo "
"; - - require_once "footer.php"; - -} - -?> diff --git a/app/provision_editor/filesave.php b/app/provision_editor/filesave.php deleted file mode 100644 index 0d19eaab53..0000000000 --- a/app/provision_editor/filesave.php +++ /dev/null @@ -1,50 +0,0 @@ - - Portions created by the Initial Developer are Copyright (C) 2008-2012 - the Initial Developer. All Rights Reserved. - - Contributor(s): - Mark J Crane -*/ -include "root.php"; -require_once "includes/require.php"; -require_once "includes/checkauth.php"; -if (permission_exists('xml_editor_save')) { - //access granted -} -else { - echo "access denied"; - exit; -} - -$filename = $_POST["file"]; //filename with the path -$filename = str_replace ("\\", "/", $filename); -$content = $_POST["content"]; - -$handle = fopen($filename, 'wb') or die("Error!!"); -fwrite($handle, $content); -fclose($handle); - -//set the reload_xml value to true - $_SESSION["reload_xml"] = true; - -echo $content; - -?> diff --git a/app/provision_editor/folderdelete.php b/app/provision_editor/folderdelete.php deleted file mode 100644 index 97c2592ea8..0000000000 --- a/app/provision_editor/folderdelete.php +++ /dev/null @@ -1,46 +0,0 @@ - - Portions created by the Initial Developer are Copyright (C) 2008-2012 - the Initial Developer. All Rights Reserved. - - Contributor(s): - Mark J Crane -*/ -include "root.php"; -require_once "includes/require.php"; -require_once "includes/checkauth.php"; -if (permission_exists('xml_editor_save')) { - //access granted -} -else { - echo "access denied"; - exit; -} - -$folder = $_GET["folder"]; -$folder = str_replace ("\\", "/", $folder); - -if (strlen($folder) > 0) { - //delete the folder - rmdir($folder); //, 0700 - header("Location: fileoptions.php"); -} - -?> \ No newline at end of file diff --git a/app/provision_editor/foldernew.php b/app/provision_editor/foldernew.php deleted file mode 100644 index 922d8eb5a2..0000000000 --- a/app/provision_editor/foldernew.php +++ /dev/null @@ -1,86 +0,0 @@ - - Portions created by the Initial Developer are Copyright (C) 2008-2012 - the Initial Developer. All Rights Reserved. - - Contributor(s): - Mark J Crane -*/ -include "root.php"; -require_once "includes/require.php"; -require_once "includes/checkauth.php"; -if (permission_exists('xml_editor_save')) { - //access granted -} -else { - echo "access denied"; - exit; -} -require_once "config.php"; - -$folder = $_GET["folder"]; -$folder = str_replace ("\\", "/", $folder); -$foldername = $_GET["foldername"]; - -if (strlen($folder) > 0 && strlen($foldername) > 0) { - //create new folder - mkdir($folder.'/'.$foldername); //, 0700 - header("Location: fileoptions.php"); -} -else { //display form - - require_once "header.php"; - echo "
"; - echo "
"; - echo "
"; - echo ""; - echo " "; - echo " "; - echo " "; - echo " "; - echo " "; - echo " "; - echo "
Path:
".$folder."
"; - - echo "
"; - - echo ""; - echo " "; - echo " "; - echo " "; - - echo " "; - echo " "; - echo " "; - - echo " "; - echo " "; - echo " "; - echo "
Folder Name:
"; - echo " "; - echo " "; - echo "
"; - echo "
"; - echo "
"; - - require_once "footer.php"; -} - -?> diff --git a/app/provision_editor/footer.php b/app/provision_editor/footer.php deleted file mode 100644 index b11f46e5d4..0000000000 --- a/app/provision_editor/footer.php +++ /dev/null @@ -1,43 +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 ""; -echo "fusionpbx "; -echo "        "; -echo "http://fusionpbx.com"; -echo "        "; -echo "Author: Mark J. Crane "; - -echo ""; -*/ -echo "
"; -echo ""; -echo ""; - -?> \ No newline at end of file diff --git a/app/provision_editor/header.php b/app/provision_editor/header.php deleted file mode 100644 index bd10f557d3..0000000000 --- a/app/provision_editor/header.php +++ /dev/null @@ -1,83 +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 ""; -//echo ""; -echo ""; - - -echo ""; -echo ""; -echo ""; -echo "
"; - -?> \ No newline at end of file diff --git a/app/provision_editor/images/file.gif b/app/provision_editor/images/file.gif deleted file mode 100644 index a6cf9845fc..0000000000 Binary files a/app/provision_editor/images/file.gif and /dev/null differ diff --git a/app/provision_editor/images/file.png b/app/provision_editor/images/file.png deleted file mode 100644 index 33b5f5f374..0000000000 Binary files a/app/provision_editor/images/file.png and /dev/null differ diff --git a/app/provision_editor/images/folder.gif b/app/provision_editor/images/folder.gif deleted file mode 100644 index 50ab253cc7..0000000000 Binary files a/app/provision_editor/images/folder.gif and /dev/null differ diff --git a/app/provision_editor/images/gear.png b/app/provision_editor/images/gear.png deleted file mode 100644 index 1adf1e778f..0000000000 Binary files a/app/provision_editor/images/gear.png and /dev/null differ diff --git a/app/provision_editor/images/leaf.gif b/app/provision_editor/images/leaf.gif deleted file mode 100644 index 50ab253cc7..0000000000 Binary files a/app/provision_editor/images/leaf.gif and /dev/null differ diff --git a/app/provision_editor/images/minus.gif b/app/provision_editor/images/minus.gif deleted file mode 100644 index 1094ab912b..0000000000 Binary files a/app/provision_editor/images/minus.gif and /dev/null differ diff --git a/app/provision_editor/images/plus.gif b/app/provision_editor/images/plus.gif deleted file mode 100644 index fdacf8efe5..0000000000 Binary files a/app/provision_editor/images/plus.gif and /dev/null differ diff --git a/app/provision_editor/images/program.gif b/app/provision_editor/images/program.gif deleted file mode 100644 index dc3dfa1104..0000000000 Binary files a/app/provision_editor/images/program.gif and /dev/null differ diff --git a/app/provision_editor/images/thumbnails/Thumbs.db b/app/provision_editor/images/thumbnails/Thumbs.db deleted file mode 100644 index c4e4684b24..0000000000 Binary files a/app/provision_editor/images/thumbnails/Thumbs.db and /dev/null differ diff --git a/app/provision_editor/images/thumbnails/cliplibrary.png b/app/provision_editor/images/thumbnails/cliplibrary.png deleted file mode 100644 index bc70f332fd..0000000000 Binary files a/app/provision_editor/images/thumbnails/cliplibrary.png and /dev/null differ diff --git a/app/provision_editor/images/thumbnails/filemanagement.png b/app/provision_editor/images/thumbnails/filemanagement.png deleted file mode 100644 index 88cb7661b1..0000000000 Binary files a/app/provision_editor/images/thumbnails/filemanagement.png and /dev/null differ diff --git a/app/provision_editor/images/thumbnails/phpeditor.png b/app/provision_editor/images/thumbnails/phpeditor.png deleted file mode 100644 index c6f7f369bb..0000000000 Binary files a/app/provision_editor/images/thumbnails/phpeditor.png and /dev/null differ diff --git a/app/provision_editor/index.php b/app/provision_editor/index.php deleted file mode 100644 index 93b207a173..0000000000 --- a/app/provision_editor/index.php +++ /dev/null @@ -1,207 +0,0 @@ - - Portions created by the Initial Developer are Copyright (C) 2008-2012 - the Initial Developer. All Rights Reserved. - - Contributor(s): - Mark J Crane -*/ -include "root.php"; -require_once "includes/require.php"; -require_once "includes/checkauth.php"; -if (permission_exists('xml_editor_view')) { - //access granted -} -else { - echo "access denied"; - exit; -} - -require_once "app/xml_edit/config.php"; -echo "\n"; -echo "\n"; -echo " \n"; -echo " "; - - echo "\n"; - - echo ""; - ?> - - - - - - - - - - -
- - - -\n"; - echo "\n"; - } - else { - echo "\n"; - } -?> - -
- - \ No newline at end of file diff --git a/app/provision_editor/list.php b/app/provision_editor/list.php deleted file mode 100644 index 87a80f3128..0000000000 --- a/app/provision_editor/list.php +++ /dev/null @@ -1,113 +0,0 @@ - - Portions created by the Initial Developer are Copyright (C) 2008-2012 - the Initial Developer. All Rights Reserved. - - Contributor(s): - Mark J Crane -*/ -include "root.php"; -require_once "includes/checkauth.php"; -if (permission_exists('xml_editor_view')) { - //access granted -} -else { - echo "access denied"; - exit; -} -require_once "header.php"; - -//show the content - echo "
"; - echo "\n"; - - echo "\n"; - echo " \n"; - echo "\n"; - - } //end if results - - echo "
\n"; - echo "
"; - - $sql = ""; - $sql .= "select * from v_clip_library "; - - $prep_statement = $db->prepare(check_sql($sql)); - $prep_statement->execute(); - $result = $prep_statement->fetchAll(PDO::FETCH_NAMED); - $result_count = count($result); - - $c = 0; - $row_style["0"] = "background-color: #F5F5DC;"; - $row_style["1"] = "background-color: #FFFFFF;"; - - echo "
\n"; - echo "\n"; - echo ""; - - if ($result_count == 0) { //no results - echo ""; - } - else { //received results - - echo ""; - //echo ""; - echo ""; - //echo ""; - //echo ""; - //echo ""; - //echo ""; - //echo ""; - echo ""; - echo "\n"; - - foreach($result as $row) { - //print_r( $row ); - echo "\n"; - //echo ""; - echo ""; - //echo ""; - //echo ""; - //echo ""; - //echo ""; - //echo ""; - echo ""; - - echo "\n"; - if ($c==0) { $c=1; } else { $c=0; } - } //end foreach - unset($sql, $result, $row_count); - - echo "
 
    Id      clip_name      clip_folder        clip_text_start        clip_text_end        clip_desc        clip_order   
".$row[id]."".$row[clip_name]."".$row[clip_folder]."".$row[clip_text_start]."".$row[clip_text_end]."".$row[clip_desc]."".$row[clip_order]."
\n"; - echo "
\n"; - - echo "
\n"; - - echo "
\n"; - echo "   \n"; - echo "   \n"; - echo "
\n"; - echo ""; - - echo "

"; - require_once "footer.php"; - -?> diff --git a/app/provision_editor/readme.txt b/app/provision_editor/readme.txt deleted file mode 100644 index cafc4144ae..0000000000 --- a/app/provision_editor/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/provision_editor/root.php b/app/provision_editor/root.php deleted file mode 100644 index 7b882438ea..0000000000 --- a/app/provision_editor/root.php +++ /dev/null @@ -1,50 +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 - if (!defined("PATH_SEPARATOR")) { - if ( strpos( $_ENV[ "OS" ], "Win" ) !== false ) { define("PATH_SEPARATOR", ";"); } else { define("PATH_SEPARATOR", ":"); } - } - -// make sure the document_root is set - $_SERVER["SCRIPT_FILENAME"] = str_replace("\\", "/", $_SERVER["SCRIPT_FILENAME"]); - $_SERVER["DOCUMENT_ROOT"] = str_replace($_SERVER["PHP_SELF"], "", $_SERVER["SCRIPT_FILENAME"]); - $_SERVER["DOCUMENT_ROOT"] = realpath($_SERVER["DOCUMENT_ROOT"]); - //echo "DOCUMENT_ROOT: ".$_SERVER["DOCUMENT_ROOT"]."
\n"; - //echo "PHP_SELF: ".$_SERVER["PHP_SELF"]."
\n"; - //echo "SCRIPT_FILENAME: ".$_SERVER["SCRIPT_FILENAME"]."
\n"; - -// if the project directory exists then add it to the include path otherwise add the document root to the include path - if (is_dir($_SERVER["DOCUMENT_ROOT"].'/fusionpbx')){ - if(!defined('PROJECT_PATH')) { define('PROJECT_PATH', '/fusionpbx'); } - set_include_path( get_include_path() . PATH_SEPARATOR . $_SERVER["DOCUMENT_ROOT"].'/fusionpbx' ); - } - else { - if(!defined('PROJECT_PATH')) { define('PROJECT_PATH', ''); } - set_include_path( get_include_path() . PATH_SEPARATOR . $_SERVER['DOCUMENT_ROOT'] ); - } - -?> \ No newline at end of file