";
}
}
$article = $_REQUEST['article'];
$art_title = fetch($post_art_table_name, 'headline', "art_id = '$article'");
if (!$article){
echo ' ';
}
// check for required fields
if ($_REQUEST['post-comment'] && $loggedin) {
$comment_char_cnt = strlen($_REQUEST['comment']);
if ($comment_char_cnt < "4") {
echo "You Must Enter a Comment (of at least 4 characters) ";
echo " ";
$try_again = "y";
}
}
// Save or try again
if (!$try_again && $comment_char_cnt > "4" && $loggedin) {
echo "Saving Comment. ";
$comment = addslashes($_REQUEST['comment']);
$ip = $_SERVER['REMOTE_ADDR'];
$now = time();
$cite1 = $_REQUEST['cite1'];
$cite2 = $_REQUEST['cite2'];
$cite3 = $_REQUEST['cite3'];
$cite4 = $_REQUEST['cite4'];
$image = $_REQUEST['image'];
$video = $_REQUEST['video'];
$submit = "insert into $post_com_table_name set body = '$comment', usr_id = '$usr_id', datestamp = '$now', ip = '$ip', author = '$screen_name', art_id = '" . $article . "'";
if($_REQUEST['cite1'] != '') {
$submit .= ", cite1 = '$cite1'";
}
if($_REQUEST['cite2'] != '') {
$submit .= ", cite2 = '$cite2'";
}
if($_REQUEST['cite3'] != '') {
$submit .= ", cite3 = '$cite3'";
}
if($_REQUEST['cite4'] != '') {
$submit .= ", cite4 = '$cite4'";
}
if($_REQUEST['image'] != '') {
$submit .= ", image = '$image'";
}
if($_REQUEST['video'] != '') {
$submit .= ", youTube = '$video'";
}
/* echo "$submit"; exit(); */
$result = mysql_query($submit);
$submit2 = "UPDATE $post_art_table_name SET `comments` = `comments` + 1, `latest` = '$now' where art_id = '$article'";
$result2 = mysql_query($submit2);
echo ' ';
}
elseif(!$loggedin){
echo '
Login to rate
';
echo 'Login to your member account to rate this article. This feature is for members only.
Click here to log-in. However, as a non-member, you can express your opinion by clicking the "Submit An Anonymous Comment" button below the article. Even better, become a member and share your thoughts and opinions in the SelectSmart.com Post.
';
}else{
?>
The SelectSmart.com Post rater
Welcome, , click the "RATE IT!" button below. Your rating will appear anonymously.