Changeset 160
- Timestamp:
- 06/04/03 18:50:21 (6 years ago)
- Files:
-
- trunk/b2comments.php (modified) (2 diffs)
- trunk/b2trackback.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/b2comments.php
r156 r160 10 10 $comments = $wpdb->get_results("SELECT * FROM $tablecomments WHERE comment_post_ID = $id ORDER BY comment_date"); 11 11 $commentstatus = $wpdb->get_var("SELECT comment_status FROM $tableposts WHERE ID = $id"); 12 $pingstatus = $wpdb->get_var("SELECT ping_status FROM $tableposts WHERE ID = $id"); 12 13 ?> 13 14 … … 15 16 16 17 <h2>Comments</h2> 18 19 <?php if ('open' == $pingstatus) { ?> 17 20 <p>The URL to TrackBack this entry is:</p> 18 21 <p><em><?php trackback_url() ?></em></p> 22 <?php } ?> 19 23 20 24 <ol id="comments"> trunk/b2trackback.php
r96 r160 66 66 trackback_response(1, 'Sorry, this weblog does not allow you to trackback its posts.'); 67 67 } 68 $pingstatus = $wpdb->get_var("SELECT ping_status FROM $tableposts WHERE ID = $tb_id"); 68 69 69 dbconnect(); 70 if ('closed' == $pingstatus) 71 die('Sorry, trackbacks are closed for this item.'); 70 72 71 73 $url = addslashes($url); … … 78 80 79 81 $comment = '<trackback />'; 80 $comment .= "< b>$title</b><br />$excerpt";82 $comment .= "<strong>$title</strong><br />$excerpt"; 81 83 82 84 $author = addslashes($blog_name); … … 101 103 102 104 $query = "INSERT INTO $tablecomments VALUES ('0','$comment_post_ID','$author','$email','$url','$user_ip','$now','$comment','0')"; 103 $result = mysql_query($query);105 $result = $wpdb->query($query); 104 106 if (!$result) { 105 die ("There is an error with the database, it can't store your comment...<br >Contact the <a href=\"mailto:$admin_email\">webmaster</a>");107 die ("There is an error with the database, it can't store your comment...<br />Contact the <a href=\"mailto:$admin_email\">webmaster</a>"); 106 108 } else { 107 109 … … 120 122 $subject = "trackback on post #$comment_post_ID \"".$postdata["Title"]."\""; 121 123 122 @mail($recipient, $subject, $notify_message, "From: b2@".$HTTP_SERVER_VARS['SERVER_NAME']."\r\n"."X-Mailer: b2$b2_version - PHP/" . phpversion());124 @mail($recipient, $subject, $notify_message, "From: wordpress@".$HTTP_SERVER_VARS['SERVER_NAME']."\r\n"."X-Mailer: WordPress $b2_version - PHP/" . phpversion()); 123 125 124 126 }
