$edit_comment1
$edit_comment2 $edit_comment3."; $icon = "./images/key.gif"; } elseif($weblog_info[show_comments] == "2" & $is_logged_in == "no" & $is_admin_logged_in != "yes") { $is_error = "yes"; $error = "$edit_comment1
$edit_comment4 $edit_comment3."; $icon = "./images/key.gif"; } elseif($entry_info[comments] == "0") { $is_error = "yes"; $error = "$edit_comment5
$edit_comment6"; $icon = "./images/error.gif"; } elseif($owner_group_info[allow_comments] == "0" | $weblog_info[show_comments] == "0") { $is_error = "yes"; $error = "$edit_comment5
$edit_comment7"; $icon = "./images/error.gif"; } elseif(($weblog_info[manage_comments] == "0" | $weblog_info[manage_comments] == "2") & ($user_status != "owner" & $user_status != "admin" & $user_status != "member" & $user_status != "site_owner") & $is_admin_logged_in != "yes") { $is_error = "yes"; $error = "$edit_comment8
$edit_comment9"; $icon = "./images/error.gif"; } elseif($is_logged_in != "yes" & $is_admin_logged_in != "yes") { $is_error = "yes"; $error = "$edit_comment1
$edit_comment4 $edit_comment3."; $icon = "./images/key.gif"; } elseif(($user_info[username] != $comment_info[username] | $user_info[u_id] != $comment_info[author_u_id]) & ($user_status != "owner" & $user_status != "admin" & $user_status != "member" & $user_status != "site_owner") & $is_admin_logged_in != "yes") { $is_error = "yes"; $error = "$edit_comment1
$edit_comment10 $edit_comment3"; $icon = "./images/key.gif"; } if($is_error == "yes") { echo $head; echo "
$error
"; echo $foot; exit(); } if($task == "cancel") { $url = url("entry", "$weblog_info[weblog]", "", "$e_id", "", "", "#c$c_id"); header("Location: $url"); exit(); } //SET ERROR VARIABLES $is_error = "no"; $error = ""; $title = $comment_info[title]; $contents = str_replace("
", "\n", $comment_info[contents]); $contents = str_replace("".between("", "", $contents)."", "", $contents); if($task == "doedit") { if($is_admin_logged_in != "yes") { if($is_logged_in == "yes") { $username = "$user_info[username]"; } else { $username = $user_info[username]; } } else { $username = "Administrator"; } $title = str_replace("&", "&", htmlspecialchars($_POST['title'], ENT_QUOTES)); $contents = str_replace("&", "&", str_replace("\n", "
", htmlspecialchars($_POST['contents'], ENT_QUOTES))); $nickname = str_replace("&", "&", htmlspecialchars($_POST['nickname'], ENT_QUOTES)); if(str_replace(" ", "", $title) == "") { $title = "$edit_comment11"; } if(str_replace(" ", "", $contents) == "") { $is_error = "yes"; $error = "$edit_comment12"; } if($is_error != "yes") { // CENSOR BAD WORDS $bad_words = explode(",", trim($admin_info[banned_badwords])); $bad_words_replace = explode(",", trim($admin_info[banned_badwords_replace])); $contents = str_replace($bad_words, $bad_words_replace, $contents); $title = str_replace($bad_words, $bad_words_replace, $title); $contents .= "

$edit_comment20 $username $edit_comment21 ".cdate("$weblog_info[format_date]", time())." $edit_comment22 ".cdate("$weblog_info[format_time]", time()).""; mysql_query("UPDATE bhost_comments SET username='$nickname', title='$title', contents='$contents' WHERE w_id='$weblog_info[w_id]' AND e_id='$e_id' AND c_id='$c_id'"); $url = url("entry", "$weblog_info[weblog]", "", "$e_id", "", "", "#c$c_id"); header("Location: $url"); exit(); }} echo $head; echo "

$edit_comment13

"; show_error($error); echo "
$edit_comment14
"; if($comment_info[author_u_id] == "0") { echo ""; } else { echo "Registered User: $comment_info[username]"; } echo "
$edit_comment15
$edit_comment16

 
 
"; echo $foot; ?>