$cmtx_box .= "<div class='cmtx_success_message_line_2'>"; $cmtx_box .= CMTX_SUCCESS_TEXT; $cmtx_box .= "</div>"; $cmtx_box .= "</div>"; $cmtx_box .= "<div style='clear: left;'></div>"; //add new subscriber if (cmtx_setting('enabled_notify') && isset($_POST['cmtx_notify']) && cmtx_setting('enabled_email') && !empty($cmtx_email) && !cmtx_subscriber_exists($cmtx_email, $cmtx_page_id) && !cmtx_subscriber_email_attempts($cmtx_email) && !cmtx_subscriber_ip_attempts() && !$cmtx_is_admin) { cmtx_add_subscriber($cmtx_name, $cmtx_email, $cmtx_page_id); } //notify subscribers of new comment if (cmtx_setting('enabled_notify')) { if ($cmtx_is_admin) { cmtx_notify_subscribers($cmtx_name, $cmtx_comment, $cmtx_page_id, $cmtx_comment_id, $cmtx_reply_to, $cmtx_is_admin); } else { if (!cmtx_setting('approve_notifications')) { cmtx_notify_subscribers($cmtx_name, $cmtx_comment, $cmtx_page_id, $cmtx_comment_id, $cmtx_reply_to, $cmtx_is_admin); } } } cmtx_notify_admin_new_comment_okay($cmtx_name, $cmtx_comment, $cmtx_comment_id); //notify admin of new comment if (isset($_POST['cmtx_remember']) || !cmtx_setting('enabled_remember') && cmtx_setting('form_cookie')) { cmtx_set_form_cookie($cmtx_name, $cmtx_email, $cmtx_website, $cmtx_town, $cmtx_country); //save form inputs $cmtx_default_name = cmtx_strip_slashes(cmtx_decode($cmtx_name)); $cmtx_default_email = cmtx_strip_slashes(cmtx_decode($cmtx_email)); $cmtx_default_website = cmtx_strip_slashes(cmtx_decode($cmtx_website)); $cmtx_default_town = cmtx_strip_slashes(cmtx_decode($cmtx_town)); $cmtx_default_country = cmtx_strip_slashes(cmtx_decode($cmtx_country)); } if (cmtx_session_set()) {
$website_san = cmtx_sanitize($website_san); $town_san = cmtx_sanitize($town); $country_san = cmtx_sanitize($country); $rating_san = cmtx_sanitize($rating); $comment_san = cmtx_sanitize($comment, false, true); $reply_san = cmtx_sanitize($reply, false, true); $page_id_san = cmtx_sanitize($page_id); $reply_to_san = cmtx_sanitize($reply_to); $is_approved_san = cmtx_sanitize($is_approved); $is_sticky_san = cmtx_sanitize($is_sticky); $is_locked_san = cmtx_sanitize($is_locked); if (!$is_approved) { cmtx_unapprove_replies($id); } if (isset($_POST['send']) && $_POST['send'] == "1") { cmtx_notify_subscribers($name, $comment, $id, $page_id); $is_approved_san = "1"; } if (isset($_POST['verify'])) { cmtx_db_query("UPDATE `" . $cmtx_mysql_table_prefix . "comments` SET `reports` = '0' WHERE `id` = '{$id_san}'"); cmtx_db_query("UPDATE `" . $cmtx_mysql_table_prefix . "comments` SET `is_verified` = '1' WHERE `id` = '{$id_san}'"); $is_approved_san = "1"; } cmtx_db_query("UPDATE `" . $cmtx_mysql_table_prefix . "comments` SET `name` = '{$name_san}' WHERE `id` = '{$id_san}'"); cmtx_db_query("UPDATE `" . $cmtx_mysql_table_prefix . "comments` SET `email` = '{$email_san}' WHERE `id` = '{$id_san}'"); cmtx_db_query("UPDATE `" . $cmtx_mysql_table_prefix . "comments` SET `website` = '{$website_san}' WHERE `id` = '{$id_san}'"); cmtx_db_query("UPDATE `" . $cmtx_mysql_table_prefix . "comments` SET `town` = '{$town_san}' WHERE `id` = '{$id_san}'"); cmtx_db_query("UPDATE `" . $cmtx_mysql_table_prefix . "comments` SET `country` = '{$country_san}' WHERE `id` = '{$id_san}'"); cmtx_db_query("UPDATE `" . $cmtx_mysql_table_prefix . "comments` SET `rating` = '{$rating_san}' WHERE `id` = '{$id_san}'"); cmtx_db_query("UPDATE `" . $cmtx_mysql_table_prefix . "comments` SET `comment` = '{$comment_san}' WHERE `id` = '{$id_san}'"); cmtx_db_query("UPDATE `" . $cmtx_mysql_table_prefix . "comments` SET `reply` = '{$reply_san}' WHERE `id` = '{$id_san}'");
$success = 0; $failure = 0; for ($i = 0; $i < $count; $i++) { $id = $items[$i]; $id = cmtx_sanitize($id); if (cmtx_is_sent($id)) { $failure++; } else { $comment_query = cmtx_db_query("SELECT * FROM `" . $cmtx_mysql_table_prefix . "comments` WHERE `id` = '{$id}'"); $comment_result = cmtx_db_fetch_assoc($comment_query); $name = $comment_result["name"]; $comment = $comment_result["comment"]; $page_id = $comment_result["page_id"]; $reply_to = $comment_result["reply_to"]; $is_admin = $comment_result["is_admin"]; cmtx_notify_subscribers($name, $comment, $page_id, $id, $reply_to, $is_admin); cmtx_db_query("UPDATE `" . $cmtx_mysql_table_prefix . "comments` SET `is_approved` = '1' WHERE `id` = '{$id}'"); $success++; } } if ($success == 1) { ?> <div class="success"><?php echo CMTX_MSG_COMMENT_BULK_SENT; ?> </div><?php } if ($success > 1) { ?> <div class="success"><?php printf(CMTX_MSG_COMMENTS_BULK_SENT, $success);