Changeset 1184 in ExiteCMS for trunk/includes/comments_include.php
- Timestamp:
- 12/31/07 13:01:02 (4 years ago)
- File:
-
- 1 edited
-
trunk/includes/comments_include.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/includes/comments_include.php
r1071 r1184 25 25 26 26 $variables = array(); 27 27 28 28 if ((iMEMBER || $settings['guestposts'] == "1") && isset($_POST['post_comment'])) { 29 30 $result = dbquery("DELETE FROM ".$db_prefix."captcha WHERE captcha_datestamp<'".(time()-900)."'"); 31 29 32 $flood = false; 30 33 if (dbrows(dbquery("SELECT $ccol FROM ".$db_prefix."$cdb WHERE $ccol='$comment_id'"))==0) { … … 38 41 if (isNum($comment_name)) $comment_name=""; 39 42 } 43 44 // captcha check for guest posts 45 $cic = (iGUEST && !check_captcha($_POST['captcha_encode'], $_POST['captcha_code'])) ? "&cic=1" : ""; 46 40 47 $comment_message = trim(stripinput(censorwords($_POST['comment_message']))); 41 48 $comment_smileys = isset($_POST['disable_smileys']) ? "0" : "1"; 42 if ($comment_name != "" && $comment_message != "" ) {49 if ($comment_name != "" && $comment_message != "" && $cic == "") { 43 50 $result = dbquery("SELECT MAX(comment_datestamp) AS last_comment FROM ".$db_prefix."comments WHERE comment_ip='".USER_IP."'"); 44 51 if (!iSUPERADMIN || dbrows($result) > 0) { … … 54 61 if (!$flood) $result = dbquery("INSERT INTO ".$db_prefix."comments (comment_item_id, comment_type, comment_name, comment_message, comment_smileys, comment_datestamp, comment_ip) VALUES ('$comment_id', '$comment_type', '$comment_name', '$comment_message', '$comment_smileys', '".time()."', '".USER_IP."')"); 55 62 } 56 redirect($clink);63 if ($cic != "") redirect($clink.$cic); 57 64 } 58 65 … … 77 84 $variables['comment_id'] = $comment_id; 78 85 $variables['post_link'] = $clink; 86 $variables['cic'] = (isset($_GET['cic']) && !empty($_GET['cic'])) ? $_GET['cic'] : ""; 79 87 80 88 // define the body panel variables
Note: See TracChangeset
for help on using the changeset viewer.
