"; echo "
\n"; $cm_authornames = fcm_user_names ($user_kurz); echo "{$cm_text["author"]}: " . fcm_htmlentity ($cm_authornames[1] . " " . $cm_authornames[2]) . "  {$cm_text["creation"]}: $cm_pub_date
{$cm_text["owner"]}:"; if (!$cm_uowner) { $cm_uowner = $user_kurz; } echo " "; echo "{$cm_text["visibleto"]}:"; //$cm_defgroup = fcm_default_group (); $cm_defgroup = fcm_get_viewergroup ($cm_path); if (!$cm_gviewer) { $cm_gviewer = $cm_defgroup[0]; } echo "
"; echo " {$cm_text["enablerating"]} "; echo " {$cm_text["enablecomments"]} "; if ($cm_enable_htmledit) { echo " {$cm_text["enablehtml"]}"; } else { echo ""; } echo "
 {$cm_text["enablecontentless"]} "; echo " {$cm_text["enablepriority"]} "; echo "
{$cm_text["shorttitle"]}: "; echo "
\n"; echo "
{$cm_text["title"]}:

{$cm_text["directory"]}:
$cm_path"; if ($cm_path <> "/") { echo "/"; } echo "
"; echo "{$cm_text["logoimage"]}:

"; echo "
{$cm_text["keywords"]}:

{$cm_text["summary"]}:

{$cm_text["content"]}:
{$cm_text["dontusehtml"]} {$cm_text["awmvariant"]}.\n"; fcm_call_htmleditor ("create.php", ($cm_enable_htmledit && $cm_enable_visedit), false); echo"

\n "; } //$cm_directory = utf8_decode ($cm_directory); $cm_directory = fcm_remove_accents ($cm_directory); $cm_directory = str_replace (" ", "_", $cm_directory); $cm_directory = ereg_replace("[^[:alnum:]_]", "", $cm_directory); $cm_directory = strtolower ($cm_directory); $cm_fullpath = $cm_path . "/" . $cm_directory; $cm_fullpath = str_replace ("//", "/", $cm_fullpath); $cm_fullpath = strtolower ($cm_fullpath); $cm_fullpath = substr ($cm_fullpath, 0, 255); $cm_directory = substr ($cm_fullpath, (strrpos ($cm_fullpath, "/") + 1), strlen ($cm_fullpath)); if ((strlen ($cm_fullpath) > 1) && (substr ($cm_fullpath, -1) == "/")) { $cm_fp = substr ($cm_fullpath, 0, -1); } else { $cm_fp = $cm_fullpath; } $result1 = db_query("select cmdb_title, cmdb_directory, cmdb_content, cmdb_type from " . CM_DB_PREFIX . "content3 where cmdb_directory like '$cm_fp' and cmdb_type like '%" . CM_HITTYPE_PAGE . "%'") or db_die(); $row1 = db_fetch_row($result1); if ((($cm_fullpath == "/") || ($row1[1] <> "")) && (($cm_create) || ($cm_preview))) { if (fcm_check_constraints (CM_SEC_CREATE, $user_kurz, $cm_path)) { $cm_validops = fcm_check_validops ($user_kurz, $cm_path); fcm_title_nav2 ($cm_path, false, false, false, $cm_validops[CM_SEC_DISPLA], false, false, fcm_user_is_superuser($user_kurz), false); fcm_message ($cm_text["direxist_tryagain"], CM_MSGSTYLE_ERROR); // if (get_magic_quotes_gpc ()) { $cm_short_title = stripslashes ($cm_short_title); $cm_title = stripslashes ($cm_title); $cm_keywords = stripslashes ($cm_keywords); $cm_abstract = stripslashes ($cm_abstract); $cm_content = stripslashes ($cm_content); $cm_logo = stripslashes ($cm_logo); // } $cm_logo = ereg_replace("[^[:alnum:]_\.-]", "", $cm_logo); cm_createdform (); fcm_add_logentry ("", $user_kurz, CM_APPLOG_ERROR, "Error when creating page. Dir already exist."); } else { fcm_title_nav2 ("", false, false, false, false, false, false, false); fcm_message ($cm_text["needaccess2create"], CM_MSGSTYLE_WARNING); fcm_add_logentry ("", $user_kurz, CM_APPLOG_ERROR, "Error when creating page. Not enough permissions."); } } else { if (fcm_check_constraints (CM_SEC_CREATE, $user_kurz, $cm_path)) { if (!$cm_create) { $cm_validops = fcm_check_validops ($user_kurz, $cm_path); fcm_title_nav2 ($cm_path, false, false, false, $cm_validops[CM_SEC_DISPLA], false, false, fcm_user_is_superuser($user_kurz), false); // if (get_magic_quotes_gpc ()) { $cm_short_title = stripslashes ($cm_short_title); $cm_title = stripslashes ($cm_title); $cm_keywords = stripslashes ($cm_keywords); $cm_abstract = stripslashes ($cm_abstract); $cm_content = stripslashes ($cm_content); $cm_logo = stripslashes ($cm_logo); // } $cm_logo = ereg_replace("[^[:alnum:]_\.-]", "", $cm_logo); cm_createdform (); $cm_enable_html = abs ($cm_enable_html); echo "

 

"; if (abs ($cm_enable_contentless) != 1) { if ($cm_enable_html) { if ($cm_enable_htmledit) { echo fcm_process_markup (fcm_secure_html (fcm_decode_htmlfull ($cm_content)), $cm_fullpath, true); } else { echo fcm_process_markup (fcm_htmlentity (fcm_decode_html ($cm_content)), $cm_path, false); } } else { echo fcm_process_markup (fcm_htmlentity ($cm_content), $cm_fullpath, false); } } echo "
"; } else { if (@mkdir ($cm_mainroot . $cm_fullpath, 0777)) { $cm_pppos = strrpos ($cm_fullpath, "/"); if ($cm_pppos == 0) { $cm_parentpath = "/"; } else { $cm_parentpath = substr ($cm_fullpath, 0, $cm_pppos); } $cm_enable_rating = abs ($cm_enable_rating); $cm_enable_comments = abs ($cm_enable_comments); $cm_enable_html = abs ($cm_enable_html); if (abs ($cm_enable_contentless) == 1) { $cm_enable_contentless = CM_HITTYPE_CONTENTLESS; } else { $cm_enable_contentless = ""; }; if (abs ($cm_enable_priority) == 1) { $cm_enable_priority = CM_HITTYPE_ANNOUNCE; } else { $cm_enable_priority = ""; }; $cm_logo = ereg_replace("[^[:alnum:]_\.-]", "", $cm_logo); if ($cm_short_title) { $cm_short_title = fcm_truncate_string (fcm_htmlentity ($cm_short_title), 20); } if ($cm_title) { $cm_title = fcm_truncate_string (fcm_htmlentity ($cm_title), 255); } else { $cm_title = fcm_truncate_string (fcm_unspecialchars ($cm_text["untitled"]), 255); } $cm_keywords = fcm_htmlentity ($cm_keywords); $cm_abstract = fcm_htmlentity ($cm_abstract); if ($cm_content) { if (($cm_enable_html) && ($cm_enable_htmledit)) { $cm_content = fcm_recode_URIs ($cm_content, $cm_path, " href=\\\""); $cm_content = fcm_recode_URIs ($cm_content, $cm_path, " src=\\\""); $cm_content = fcm_htmlentity (fcm_recode_html ($cm_content)); } else { $cm_content = fcm_htmlentity ($cm_content); } } else { $cm_content = fcm_htmlentity (CM_DEFAULT_MARKUP); } $cm_pub_date = fcm_curdate_string (); $result2 = db_query("insert into " . CM_DB_PREFIX . "content3 values($dbIDnull,'" . CM_HITTYPE_PAGE . $cm_enable_contentless . $cm_enable_priority . "','$cm_fullpath','$cm_parentpath','$cm_title','$user_kurz',null,'$cm_uowner',null,null,'$cm_gviewer',null,null,'$cm_pub_date','$cm_pub_date','$cm_keywords','$cm_abstract','$cm_content',$cm_enable_rating,$cm_enable_comments,'$cm_short_title','$cm_logo',1,'', $cm_enable_html)") or db_die(); $cm_validops = fcm_check_validops ($user_kurz, $cm_fullpath); fcm_title_nav2 ($cm_fullpath, $cm_validops[CM_SEC_CREATE], $cm_validops[CM_SEC_DELETE], $cm_validops[CM_SEC_CHANGE], $cm_validops[CM_SEC_DISPLA], false, false, fcm_user_is_superuser($user_kurz), false); fcm_message ("{$cm_text["doccreatedin"]} $cm_fullpath.", CM_MSGSTYLE_INFORMATION); fcm_add_logentry ("", $user_kurz, CM_APPLOG_ADD_PAGE, "Creating page $cm_fullpath."); } else { $cm_validops = fcm_check_validops ($user_kurz, $cm_path); fcm_title_nav2 ($cm_path, $cm_validops[CM_SEC_CREATE], $cm_validops[CM_SEC_DELETE], $cm_validops[CM_SEC_CHANGE], $cm_validops[CM_SEC_DISPLA], false, false, fcm_user_is_superuser($user_kurz), false); fcm_message ($cm_text["errorcreatingdir"], CM_MSGSTYLE_ERROR); cm_createdform (); fcm_add_logentry ("", $user_kurz, CM_APPLOG_ERROR, "Error when creating page. Error creating dir."); } } } else { fcm_title_nav2 ("", false, false, false, false, false, false, false); fcm_message ($cm_text["needaccess2create"], CM_MSGSTYLE_WARNING); fcm_add_logentry ("", $user_kurz, CM_APPLOG_ERROR, "Error when creating page. Not enough permissions."); } } echo $cm_html_footer; ?>