Leave a message:
"; //else //echo "Add Feedback
"; if(!$notice_id){ $notice_id = strip_tags(trim($_GET[id])); $notice_id = mysql_real_escape_string($notice_id); $notice_id = intval($notice_id); $id = $notice_id; } $create_date = time(); $post_description = $_POST[description]; $user_email = $_POST[user_email]; $ip = $_SERVER['REMOTE_ADDR']; $countr_iso_code = getCountryCode($ip); if($countr_iso_code[countr_code]) $countr_code = $countr_iso_code[countr_code]; else $countr_code = 'US'; $required = array ("user_email" => "your e-mail", "captcha" => "Security Code"); //you can enter more field as required foreach($required as $field => $label) { if (!$_POST[$field]) { $warnings[$field]= " * Required"; } } if (empty($_POST["user_email"]) ) {$warnings["user_email"]= "* a valid email to get feedback ";} $raw_captcha = $_POST[captcha]; if(!ctype_alnum($raw_captcha) or ($_SESSION["captcha"] != $_POST["captcha"])) $warnings["captcha"]= "* type yellow letters you see"; if($_POST["user_email"] && !ereg("^[^@]+@([a-z0-9\-]+\.)+[a-z]{2,4}$", $_POST["user_email"])) {$warnings["user_email"]= "* enter valid email";} //if (getRow("users", "user_email", "$user_email")) //{$warnings["user_email"]= " * email in use. returning user";} if (count($warnings) > 0) $post_successfull = false; else{ $post_successfull = 'y'; //put the code to insert comment if (!session_is_registered($post_description)){ $comment_id = insertComment($create_date, $post_description, $user_email, $ip, $notice_id); include( "cms_comments".DIRECTORY_SEPARATOR."add_to_watchlist.php"); session_register($post_description); } //lastly advert send email include( "cms_comments".DIRECTORY_SEPARATOR."send_email.php"); } if($post_successfull){ $_SESSION[watch_this_page] = $notice_id; echo '
';
echo '
- ';
echo '
- Congratulations.
your feedback has been sent. ';
//echo ' - A password has also been emailed to you to use on this website. '; echo '
- You can request a log in to follow up your feedback. '; echo '
'; echo ''; //start of add user to administrators $email = mysql_real_escape_string(strip_tags(trim($_POST[user_email]))); $date = time(); $password = date("My",$date); $salt = rand(11,99); $encrypted_passwd = crypt($password, $salt); $login_password = substr($encrypted_passwd, 0, 8); $user_password = $login_password; $user_group_id = 1; $emailRow = getRow("admin_auth", "user_email", $email); if(!$emailRow[user_email]) $id = addNewUser($email, $user_password, $user_group_id) ; //end of add user to administrators writeComments($notice_id); //start of email messsage $notice_id = intval($_GET[id]); $post_description = trim(strip_tags($_POST[description])); $length = strlen($post_description); if( ($length > 2) and $_SESSION[LP]){ $website = $_SESSION[website]; //$subject = "Comment at ".$website." on page id : ".$notice_id; $subject = "Daily update about messages left at the ".$website." website"; $message = $post_description; $from = $_SESSION[emails_from]; //mail( "mbuso@campus.ie", "$subject", "$message", "$from"); //mail( "mbuso.kulube@gmail.com", "$subject", "$message", "$email"); //start of extra email if(!$from) $from = "From: ZimDirectory
The last email to you was on ".date("j F Y", $adminRow[last_emailed_date])."
"; //echo "call mail(...) function to send email
"; //epdate the administrator's mail( "wwizalamu@gmail.com", "$subject", "$message_1", "$from"); mail( "mbuso.kulube@gmail.com", "$subject", "$message_1", "$from"); updateEmailedTime(2); } //end of get time when administrator was last notified //$email = "From: WebsiteEnquiry<".$email.">"; $email = "From: ".$email."<".$email.">"; $subject = "A new message"; mail( "zimcommunitydirectory@gmail.com", "$subject", "$message", "$email"); mail( "zim.directory@gmail.com", "$subject", "$message", "$email"); //mail( "mbuso.kulube@gmail.com", "$subject", "$message", "$email"); //end of extra email //mail( "mbuso@campus.ie", "$subject", "$message", "From: LeaderPage"; $append = "For ".stripslashes($PageRow[post_title])."
"; }else $append = ''; echo "
".$append."
"; //echo "".$append."You need to enter the security code shown in order to prevent spam posts.
"; //echo ''; include( "cms_comments".DIRECTORY_SEPARATOR."add_comment_form_capcha.php"); } ?>