"; if ($cm_canupload) { echo "{$cm_text["edit_uploadlimit"]} " . round ($cm_limitsize/1024) . " k"; echo "
"; echo ""; echo ""; echo ""; echo "
"; echo ""; echo ""; echo "
"; } else { echo "{$cm_text["disabledupload"]}
"; } echo ""; } function fcm_check_ulimage ($cm_currentpath, $cm_logoimage) { global $cm_mainroot; $cm_logoimage = $cm_mainroot . $cm_currentpath . "/" . $cm_logoimage; if (file_exists ($cm_logoimage)) { return (getimagesize ($cm_logoimage)); } else { return (array (0, 0)); } } if ($cm_enable_visedit) { $cm_html_header = "\n{$cm_text["contentmanagement"]}\n \n$lang_cfg\n\n \n"; echo $cm_html_header; $cm_http_base = "http://$cm_server_name/" . substr ($cm_php_self, 1, strrpos ($cm_php_self, "/")); $cm_https_base = "https://$cm_server_name/" . substr ($cm_php_self, 1, strrpos ($cm_php_self, "/")); ?> "; } } else { @unlink ($cm_indexpath . $_FILES["cm_userfile"]["name"]); fcm_message ($cm_text["edit_errorupfile"] . " (" . $_FILES["cm_userfile"]["name"] . ")", CM_MSGSTYLE_ERROR); fcm_add_logentry ("", $user_kurz, CM_APPLOG_FILE, "Error when uploading file " . $_FILES["cm_userfile"]["name"]); echo "
"; } } else { fcm_message ($cm_text["edit_errorupfile"] . " (" . $_FILES["cm_userfile"]["name"] . ")", CM_MSGSTYLE_ERROR); fcm_add_logentry ("", $user_kurz, CM_APPLOG_FILE, "Error when uploading file " . $_FILES["cm_userfile"]["name"]); echo "
"; } } else { fcm_display_edituploader ($cm_path); } } else { fcm_display_edituploader ($cm_path); if ($cm_remoteroot) { $cm_indexpath = $cm_mainroot . $cm_path . "/"; } else { $cm_indexpath = str_replace (basename (__FILE__), "", __FILE__) . $cm_mainroot . $cm_path . "/"; } echo ""; $cm_dirhandle = opendir($cm_indexpath); while (($file = readdir($cm_dirhandle)) !== false) $cm_sorteddir[count($cm_sorteddir)] = $file; closedir($cm_dirhandle); natcasesort($cm_sorteddir); $cm_curcolor = "filelistcolor1"; foreach ($cm_sorteddir as $file) { if (($file != ".") && ($file != "..")) { if (!is_dir ($cm_indexpath . $file)) { $cm_fileext = (string) substr (strrchr (strtolower ($file), "."), 1); if (($cm_fileext == "jpg") || ($cm_fileext == "jpeg") || ($cm_fileext == "gif") || ($cm_fileext == "png")) { $cm_img_dims = fcm_check_ulimage ($cm_path, $file); if (($cm_img_dims[0] != 0) && ($cm_img_dims[1] != 0)) { echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; $cm_curcolor = fcm_swap_rowcolor ($cm_curcolor, "filelistcolor1", "filelistcolor2"); } } } } } echo "
" . $file . "" . $cm_img_dims[0] . "x" . $cm_img_dims[1] . "" . ceil (filesize ($cm_indexpath . $file) / 1024) . " k    {$cm_text["edit_insertimg"]}
"; } } // if %cm_enable_visedit else { echo $cm_html_header; } echo $cm_html_footer; ?>