content; include($settings['app_dir'].'/js/core_js.php'); echo << window.onload = initEditor
content; if(($input_method == 1) || ($input_method == 2)) { echo "\"".$lang[start_over]."\""; } echo <<$lang[cut]$lang[copy]$lang[paste]$lang[undo]$lang[redo]$lang[list_bullets]$lang[list_numbers]$lang[indent_decr]$lang[indent_incr]$lang[ruler] content; if($option[1]==1) { echo "\"".$lang['insert_edit_image']."\""; echo ""; } if($option[2]==1) { echo "\"".$lang['insert_edit_table']."\""; echo "\"".$lang['edit_table_cell']."\""; } if($option[4]==1) { echo "\"".$lang['color_picker']."\"".$lang['color_picker'].""; } if($settings['disable_html_view'] == 0) { echo "  "; } echo <<
content; if($option[7] != "") { echo " "; } if($option[5] == 1) { echo <<     content; if($settings['font_size_type'] == "pt") { echo ""; } else { echo ""; } } echo <<$lang[italic_text]$lang[underline_text]$lang[align_left]$lang[align_center]$lang[align_right]$lang[justify_full]$lang[add_link]$lang[remove_link] $lang[framing_on_off]

content; if(($input_method == 3) || ($input_method == 4)) { echo "
content; break; ############################################################################## # image editor case # ############################################################################## case "image_edit": $activedir = $HTTP_GET_VARS[activedir]; if(empty($activedir)) { $activedir = $settings[images_root]; } // generate clickable path $show_path = ""; $activepath = explode('/', $activedir); for($i=0; $i"; } // generate subfolders select box $subfolders = ""; @chdir($activedir); $handle=opendir('.'); while ($folder = readdir($handle)) { if(is_dir($folder)) { $dirlist[] = $folder; } } closedir($handle); asort($dirlist); while (list ($key, $folder) = each ($dirlist)) { if (($folder != "..") && ($folder != ".") && ($folder != "_vti_cnf")) { $subfolders .= ""; } } // generate files selectbox $z = 0; // checking if any files were found $subfiles = ""; $handle=opendir('.'); while ($file = readdir($handle)) { if(is_file($file)) { $filelist[] = $file; $z++; } } closedir($handle); if($z>0) { asort($filelist); while (list ($key, $file) = each($filelist)) { ereg(".gif | .jpg",$file); if ($file != "." && $file != ".." && (!is_dir($file))) { $subfiles .= ""; } } } if($HTTP_GET_VARS[w]=="edit") { $onload = " preData();"; $topflag = $lang[edit_image]; $buttons = "  "; } else { $onload = ""; $topflag = $lang[insert_image]; $buttons = "   "; } echo << Edit image
$topflag $lang[upload_new_image] $lang[close]
$lang[current_folder]: $show_path
$lang[locate_image]
$lang[subfolders]:
$lang[images]:
preview image
$lang[filename]
$lang[image_alt]
$lang[align]
$lang[border] px
$lang[vspace] / $lang[hspace] px / px
$lang[width] / $lang[height]
px / px
  $buttons
content; break; ############################################################################## # image uploader case # ############################################################################## case "image_upload": global $HTTP_POST_VARS, $HTTP_POST_FILES; $activedir = $settings[images_root]; if(!$HTTP_POST_VARS[submit]) { $showform = 1; } if($HTTP_POST_VARS[submit]) { if($HTTP_POST_VARS[subfolder] == "") { $newimg = "".$activedir."/".$HTTP_POST_FILES[img][name].""; } else { $newimg = "".$activedir."/".$HTTP_POST_VARS[subfolder]."/".$HTTP_POST_FILES[img][name].""; } //image selection check if ($HTTP_POST_FILES[img][name] == "") { $error = 1; $errormes .= "".$lang['error'].": ".$lang['alert_no_image']." "; } // image size check if ($HTTP_POST_FILES[img][size] > $settings[max_img_size]) { $error = 1; $errormes .= "".$lang['error'].": ".$lang['alert_file_oversize']." "; } // image file type check against image file type array from config file $z = "stop"; foreach($settings[img_file_types] as $filetype) { if($HTTP_POST_FILES[img][type] == $filetype) { $z = "go"; } } if ($z == "go") { //checks if file exists if (file_exists($newimg) != FALSE ) { $error = 1; $errormes .= "".$lang['error'].": ".$lang['alert_file_exists']." "; } if (!copy($HTTP_POST_FILES[img][tmp_name], $newimg) != FALSE ) { $error = 1; $errormes .= "".$lang['error'].": ".$lang['alert_no_dir']." "; } } else { $error = 1; $errormes .= "".$lang['error'].": ".$lang['alert_file_unaproved']." [?] "; } } if($HTTP_GET_VARS[show] == "newfolder") { $showform = 0; $error = 0; $folder = 1; } if(isset($HTTP_POST_VARS[addfolder])) { if($HTTP_POST_VARS[foldername] != "") { @chdir($activedir); $dirName = $HTTP_POST_VARS[foldername]; if(file_exists($dirName) == FALSE ) { mkdir($dirName, 0777); $status = "".$lang['folder']." ".$dirName." ".$lang['created_success'].".
"; $folder = 0; } else { $folder = 1; $status = "".$lang['error'].": ".$lang['alert_no_folder']."
"; } } else { $folder = 1; $status = "".$lang['error'].": ".$lang['no_folder']." ".$dirName." ".$lang['no_folder_desc'].".
"; } } echo << $lang[upload_new_image]
$lang[insert_edit_image] $lang[upload_new_image] $lang[close]
content; if(isset($HTTP_POST_VARS[submit])) { if($error == 1) { echo "
".$errormes; } else { echo "

".$lang['file']." ".$HTTP_POST_FILES[img][name]." ".$lang['upload_success'].".


"; } } if(($error == 1) || ($showform == 1)) { echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo "
".$lang['upload_to_folder']."
".$lang['image']."
    
"; } if(isset($HTTP_POST_VARS[addfolder])) { echo $status; } if($folder == 1) { echo ""; echo ""; echo ""; echo ""; echo "
".$lang['new_folder_name'].":
 "; echo "   "; echo " 
"; } echo <<
content; break; ############################################################################## # link select case # ############################################################################## case "link_select": echo << $lang[create_edit_link]
$lang[normal_link] $lang[link_to_file] $lang[upload_file] $lang[close]
$lang[link_url]
$lang[link_alt]
$lang[link_target]
content; break; ############################################################################## # link to file case # ############################################################################## case "link_file": global $HTTP_POST_VARS, $HTTP_POST_FILES; $activedir = $HTTP_GET_VARS[activedir]; if (!IsSet($activedir)) { $activedir_show = $activedir; $activedir = $settings[files_root]; } else { $activedir_show = $activedir; $activedir = $settings[files_root]."/".$activedir.""; } echo << $lang[create_edit_link]
$lang[normal_link] $lang[link_to_file] $lang[upload_file] $lang[close]
$lang[current_folder]: $settings[files_root]/$activedir_show
$lang[locate_file]
$lang[subfolders]
$lang[files]:
$lang[link_url]
$lang[link_alt]
$lang[link_target]
content; break; ############################################################################## # file upload case # ############################################################################## case "file_upload": global $HTTP_POST_VARS,$HTTP_POST_FILES; $factivedir = $settings[files_root]; if(!isset($HTTP_POST_VARS[submit])) { $showform = 1; } if(isset($HTTP_POST_VARS[submit])) { if($subfolder=="") { $newimg = "".$factivedir."/".$HTTP_POST_FILES[filename][name].""; } else { $newimg = "".$factivedir."/".$subfolder."/".$HTTP_POST_FILES[filename][name].""; } //file selection check if ($HTTP_POST_FILES[filename][name] == "") { $error = 1; $errormes .= "".$lang['error'].": ".$lang['alert_no_image']." "; } // file size check if ($HTTP_POST_FILES[filename][size] > $settings[max_file_size]) { $error = 1; $errormes .= "".$lang['error'].": ".$lang['alert_file_oversize']." "; } // image file type check against image file type array from config file $build_condition = "("; $filename2check = $HTTP_POST_FILES[filename][name]; $filename_ext = strrchr($filename2check,"."); $z = 0; $n = (count($settings[mime_file_ext])-1); foreach($settings[mime_file_ext] as $mimeext) { if($mimeext != $filename_ext) { $z++; } } if ($z == $n) { //checks if file exists if (file_exists("$newimg") != FALSE ) { $error = 1; $errormes .= "".$lang['error'].": ".$lang['alert_file_exists']." "; } if (!copy($HTTP_POST_FILES[filename][tmp_name], $newimg) != FALSE ) { $error = 1; $errormes .= "".$lang['error'].": ".$lang['alert_no_dir']." "; } } else { $error = 1; $errormes .= "".$lang['error'].": ".$lang['alert_file_unaproved']." [?] "; } } if($HTTP_GET_VARS[show] == "newfolder") { $showform = 0; $error = 0; $folder = 1; } if(isset($HTTP_POST_VARS[addfolder])) { if($HTTP_POST_VARS[foldername] != "") { @chdir($factivedir); $dirName = $HTTP_POST_VARS[foldername]; if(file_exists($dirName) == FALSE ) { mkdir($dirName, 0777); $status = "".$lang['folder']." ".$dirName." ".$lang['created_success'].".
"; $folder = 0; } else { $folder = 1; $status = "".$lang['error'].": ".$lang['alert_no_folder']."
"; } } else { $folder = 1; $status = "".$lang['error'].": ".$lang['no_folder']." ".$dirName." ".$lang['no_folder_desc'].".
"; } } echo << $lang[upload_file]
$lang[normal_link] $lang[link_to_file] $lang[upload_file] $lang[close]
content; if(isset($HTTP_POST_VARS[submit])) { if($error == 1) { echo $errormes; } else { echo "


".$lang['file']." ".$HTTP_POST_FILES[filename][name]." ".$lang['upload_success'].".


"; } } if(($error == 1) || ($showform == 1)) { echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo "
".$lang['upload_file'].""; if(isset($HTTP_POST_VARS[addfolder])) { echo " - ".$status; } echo"
".$lang['folder'].":   
".$lang['file'].": "; echo "
   "; echo ""; echo "
"; } if($folder == 1) { echo ""; echo ""; echo ""; echo ""; echo ""; echo "
".$lang['create_folder']."
".$lang['new_folder_name'].":
   "; echo " 
"; } echo <<
content; break; ############################################################################## # color picker case # ############################################################################## case "color_picker": if(!isset($which)) { $which = $HTTP_GET_VARS[$which]; } if($which=="fg") { $display = $lang['foreground_color']; $function = "ChangeCol('Forecolor')"; $order = "Forecolor"; } else { $display = $lang['background_color']; $function = "ChangeCol('Backcolor')"; $order = "Backcolor"; } echo <<
 $display:
#
 < $lang[fav_colors]
 
content; break; ############################################################################## # table edit - # ############################################################################## case "table_edit": echo << HTMLeditbox - Table Management "; $headflag = $lang[edit_table]; } else { echo " OnLoad=\"setHeight();\">"; $headflag = $lang[create_table]; } echo <<
$headflag $lang[edit_cell] $lang[rows_columns] $lang[close]
$lang[num_of_cols]: $lang[num_of_rows]: $lang[table_width]:
$lang[cellspacing]: $lang[px] $lang[cellpadding]: $lang[px] $lang[table_height]:
 
$lang[back_color]: $lang[color] pick&see >
$lang[borders_all]: $lang[color]   - $lang[width]: $lang[px]  - $lang[style]:
$lang[border] - $lang[top]: $lang[color]   - $lang[width]: $lang[px]  - $lang[style]:
$lang[border] - $lang[right]: $lang[color]   - $lang[width]: $lang[px]  - $lang[style]:
$lang[border] - $lang[bottom]: $lang[color]   - $lang[width]: $lang[px]  - $lang[style]:
$lang[border] - $lang[left]: $lang[color]   - $lang[width]: $lang[px]  - $lang[style]:
$lang[table_align]:
content; if($HTTP_GET_VARS[tab] == "preload") { echo ""; } else { echo ""; } echo <<
content; break; ###################################################################### # table - edit cell # ###################################################################### case "table_cell": echo << HTMLeditbox - Table Management
$lang[create_table] $lang[edit_cell] $lang[rows_columns] $lang[close]
$lang[cell_width]: $lang[cell_height]:
$lang[vertical_alignment]: $lang[horizontal_alignment]:
$lang[row_span]: $lang[col_span]:
 
$lang[back_color]: $lang[color] pick&see >
$lang[borders_all]: $lang[color]   - $lang[width]: $lang[px]  - $lang[style]:
$lang[border] - $lang[top]: $lang[color]   - $lang[width]: $lang[px]  - $lang[style]:
$lang[border] - $lang[right]: $lang[color]   - $lang[width]: $lang[px]  - $lang[style]:
$lang[border] - $lang[bottom]: $lang[color]   - $lang[width]: $lang[px]  - $lang[style]:
$lang[border] - $lang[left]: $lang[color]   - $lang[width]: $lang[px]  - $lang[style]:
$lang[no_wrap]
content; break; ###################################################################### # table - table functions # ###################################################################### case "table_func": echo << HTMLeditbox - Table Management
$lang[create_table] $lang[edit_cell] $lang[rows_columns] $lang[close]

content; break; case "save2db": $dbworks = "save"; include($settings['app_dir'].'/inc/db_bridge.php'); break; case "save2file": $fileworks = "save"; include($settings['app_dir'].'/inc/file_bridge.php'); break; } ?>