require_once("in/func.php"); require_once("in/au/authClass.php"); $auth = new Authenticate(); $userid = getUserID( $auth->userid ); $show_comment_form = 1; $URI = explode("/",$_SERVER['REQUEST_URI']); $ID = cleanVar($URI[3]); if($_SERVER['REQUEST_METHOD'] == 'POST') { extract($_POST); if($comment_comment) { $comment_comment = db_post($comment_comment); $DB->base_Query("INSERT INTO comments (user_id,article_id,comment,dttm) VALUES ('$userid','$ID','$comment_comment','" . time() . "')"); $show_comment_form=0; $comment_message = "Thanks! Your comment has been submitted. Once approved it will be posted with this article."; } } if($ID) { $q = validateQuery("SELECT * FROM article WHERE approved = '1' AND id = '$ID' LIMIT 1"); $DB->base_Query($q); $row = $DB->base_Fetch_Array(); extract($row); $art = "
| leftNav($auth->isLoggedIn()); ?> |
Fly Fishing Articlesif($ID) { ?> } ?>if($auth->isLoggedIn()) { ?> Submit your article to =COMP?>! } else { ?> Login or Create Account to write an article for =COMP?>. } ?> =$art?> if($ID) { ?>Comments } ?> $q = validateQuery("SELECT c.*, u.photo, u.disp_name FROM comments c, users u WHERE c.article_id = '$id' AND c.user_id = u.id AND c.approved = '1' ORDER BY c.dttm DESC"); $DB->base_Query($q); while($row = $DB->base_Fetch_Array()) { extract($row); $user_photo_msg = ($photo) ? "
=$comment_message?> } ?> } else { ?>Login or Create Account to post a comment for this article. } } ?>
|