2001-03-10 11:07:52 +00:00
< ? php
2000-11-03 08:11:19 +00:00
2001-01-20 12:20:31 +00:00
// Security check:
if ( strstr ( $id , " " ) || strstr ( $pid , " " ) || strstr ( $lid , " " ) || strstr ( $mode , " " ) || strstr ( $order , " " ) || strstr ( $threshold , " " )) {
2001-01-20 12:58:47 +00:00
watchdog ( " error " , " comment: attempt to provide malicious input through URI " );
2001-01-20 12:20:31 +00:00
exit ();
}
$cmodes = array ( 1 => " List - min " , 2 => " List - max " , 3 => " Threaded - min " , 4 => " Threaded - max " );
2001-01-21 09:26:06 +00:00
$corder = array ( 1 => " Date - new " , 2 => " Date - old " , 3 => " Rate - high " , 4 => " Rate - low " );
2001-01-20 12:20:31 +00:00
2000-11-03 08:11:19 +00:00
class Comment {
2001-01-25 15:29:45 +00:00
function Comment ( $userid , $subject , $comment , $timestamp , $url , $fake_email , $score , $votes , $cid , $lid ) {
2000-11-03 08:11:19 +00:00
$this -> userid = $userid ;
$this -> subject = $subject ;
$this -> comment = $comment ;
$this -> timestamp = $timestamp ;
$this -> url = $url ;
$this -> fake_email = $fake_email ;
$this -> score = $score ;
$this -> votes = $votes ;
$this -> cid = $cid ;
2001-01-25 15:29:45 +00:00
$this -> lid = $lid ;
2000-11-03 08:11:19 +00:00
}
}
2001-01-20 12:20:31 +00:00
function comment_moderate ( $moderate ) {
global $user , $comment_votes ;
if ( $user -> id && $moderate ) {
$none = $comment_votes [ key ( $comment_votes )];
foreach ( $moderate as $id => $vote ) {
2001-05-16 20:54:37 +00:00
if ( $vote != $comment_votes [ $none ]) {
$id = check_input ( $id ); $vote = check_input ( $vote );
$comment = db_fetch_object ( db_query ( " SELECT * FROM comments WHERE cid = ' $id ' " ));
2001-05-17 20:50:15 +00:00
if ( $comment && ! field_get ( $comment -> users , $user -> userid )) {
2001-05-17 19:14:50 +00:00
$result = db_query ( " UPDATE comments SET score = score $vote , votes = votes + 1, users = ' " . field_set ( $comment -> users , $user -> userid , $vote ) . " ' WHERE cid = ' $id ' " );
2001-05-16 20:54:37 +00:00
}
2001-01-20 12:20:31 +00:00
}
}
}
}
function comment_settings ( $mode , $order , $threshold ) {
global $user ;
2001-02-18 15:14:56 +00:00
if ( $user -> id ) $user = user_save ( $user , array ( " mode " => $mode , " sort " => $order , " threshold " => $threshold ));
2001-01-20 12:20:31 +00:00
}
function comment_reply ( $pid , $id ) {
2001-03-24 16:46:11 +00:00
global $allowed_html , $REQUEST_URI , $theme , $user ;
2001-01-20 12:20:31 +00:00
if ( $pid ) {
2001-03-07 21:29:40 +00:00
$item = db_fetch_object ( db_query ( " SELECT comments.*, users.userid FROM comments LEFT JOIN users ON comments.author = users.id WHERE comments.cid = ' $pid ' " ));
2001-03-01 21:34:09 +00:00
comment_view ( new Comment ( $item -> userid , $item -> subject , $item -> comment , $item -> timestamp , $item -> url , $item -> fake_email , comment_score ( $comment ), $comment -> votes , $item -> cid , $item -> lid ), t ( " reply to this comment " ));
2001-01-20 12:20:31 +00:00
}
2001-03-24 16:46:11 +00:00
else $pid = 0 ;
2001-01-20 12:20:31 +00:00
// Build reply form:
2001-02-04 22:09:38 +00:00
$output .= " <FORM ACTION= \" $REQUEST_URI\ " METHOD = \ " post \" > \n " ;
2001-01-20 12:20:31 +00:00
// Name field:
2001-02-17 12:59:24 +00:00
$output .= " <B> " . t ( " Your name " ) . " :</B><BR> \n " ;
$output .= format_username ( $user -> userid ) . " <P> \n " ;
2001-01-20 12:20:31 +00:00
// Subject field:
2001-02-17 12:59:24 +00:00
$output .= " <B> " . t ( " Subject " ) . " :</B><BR> \n " ;
$output .= " <INPUT TYPE= \" text \" NAME= \" subject \" SIZE= \" 50 \" MAXLENGTH= \" 60 \" ><P> \n " ;
2001-01-20 12:20:31 +00:00
// Comment field:
2001-02-17 12:59:24 +00:00
$output .= " <B> " . t ( " Comment " ) . " :</B><BR> \n " ;
$output .= " <TEXTAREA WRAP= \" virtual \" COLS= \" 50 \" ROWS= \" 10 \" NAME= \" comment \" > " . check_textarea ( $user -> signature ) . " </TEXTAREA><BR> \n " ;
$output .= " <SMALL><I> " . t ( " Allowed HTML tags " ) . " : " . htmlspecialchars ( $allowed_html ) . " .</I></SMALL><P> \n " ;
2001-01-20 12:20:31 +00:00
2001-01-25 15:29:45 +00:00
// Preview button:
2001-02-17 12:59:24 +00:00
$output .= " <SMALL><I> " . t ( " You must preview at least once before you can submit " ) . " :</I></SMALL><BR> \n " ;
$output .= " <INPUT TYPE= \" hidden \" NAME= \" pid \" VALUE= \" $pid\ " > \n " ;
$output .= " <INPUT TYPE= \" hidden \" NAME= \" id \" VALUE= \" $id\ " > \n " ;
$output .= " <INPUT TYPE= \" submit \" NAME= \" op \" VALUE= \" " . t ( " Preview comment " ) . " \" ><BR> \n " ;
2001-01-20 12:20:31 +00:00
$output .= " </FORM> \n " ;
2001-03-01 21:34:09 +00:00
$theme -> box ( t ( " Reply " ), $output );
2001-01-20 12:20:31 +00:00
}
function comment_preview ( $pid , $id , $subject , $comment ) {
2001-03-24 16:46:11 +00:00
global $allowed_html , $REQUEST_URI , $theme , $user ;
2001-01-20 12:20:31 +00:00
// Preview comment:
2001-03-01 21:34:09 +00:00
comment_view ( new Comment ( $user -> userid , $subject , $comment , time (), $user -> url , $user -> fake_email , 0 , 0 , 0 , 0 ), t ( " reply to this comment " ));
2001-01-20 12:20:31 +00:00
// Build reply form:
2001-02-04 22:09:38 +00:00
$output .= " <FORM ACTION= \" $REQUEST_URI\ " METHOD = \ " post \" > \n " ;
2001-01-20 12:20:31 +00:00
// Name field:
2001-02-17 12:59:24 +00:00
$output .= " <B> " . t ( " Your name " ) . " :</B><BR> \n " ;
$output .= format_username ( $user -> userid ) . " <P> \n " ;
2001-01-20 12:20:31 +00:00
// Subject field:
2001-02-17 12:59:24 +00:00
$output .= " <B> " . t ( " Subject " ) . " :</B><BR> \n " ;
$output .= " <INPUT TYPE= \" text \" NAME= \" subject \" SIZE= \" 50 \" MAXLENGTH= \" 60 \" VALUE= \" " . check_textfield ( $subject ) . " \" ><P> \n " ;
2001-01-20 12:20:31 +00:00
// Comment field:
2001-02-17 12:59:24 +00:00
$output .= " <B> " . t ( " Comment " ) . " :</B><BR> \n " ;
$output .= " <TEXTAREA WRAP= \" virtual \" COLS= \" 50 \" ROWS= \" 10 \" NAME= \" comment \" > " . check_textarea ( $comment ) . " </TEXTAREA><BR> \n " ;
$output .= " <SMALL><I> " . t ( " Allowed HTML tags " ) . " : " . htmlspecialchars ( $allowed_html ) . " .</I></SMALL><P> \n " ;
2001-01-25 15:29:45 +00:00
2001-01-20 12:20:31 +00:00
// Hidden fields:
$output .= " <INPUT TYPE= \" hidden \" NAME= \" pid \" VALUE= \" $pid\ " > \n " ;
$output .= " <INPUT TYPE= \" hidden \" NAME= \" id \" VALUE= \" $id\ " > \n " ;
if ( empty ( $subject )) {
2001-02-17 12:59:24 +00:00
$output .= " <FONT COLOR= \" red \" > " . t ( " Warning: you did not supply a subject. " ) . " </FONT><P> \n " ;
2001-01-20 12:20:31 +00:00
}
// Preview and submit button:
2001-02-17 12:59:24 +00:00
$output .= " <INPUT TYPE= \" submit \" NAME= \" op \" VALUE= \" " . t ( " Preview comment " ) . " \" > \n " ;
$output .= " <INPUT TYPE= \" submit \" NAME= \" op \" VALUE= \" " . t ( " Post comment " ) . " \" > \n " ;
$output .= " </FORM> \n " ;
2001-01-20 12:20:31 +00:00
2001-02-17 12:59:24 +00:00
$theme -> box ( t ( " Reply " ), $output );
2001-01-20 12:20:31 +00:00
}
function comment_post ( $pid , $id , $subject , $comment ) {
2001-03-24 16:46:11 +00:00
global $theme , $user ;
2001-01-20 12:20:31 +00:00
2001-04-16 18:21:22 +00:00
// check comment submission rate:
2001-04-06 14:14:16 +00:00
throttle ( " post comment " , variable_get ( max_comment_rate , 60 ));
2001-04-16 18:21:22 +00:00
// check for duplicate comments:
2001-03-24 16:46:11 +00:00
$duplicate = db_result ( db_query ( " SELECT COUNT(cid) FROM comments WHERE pid = ' $pid ' AND lid = ' $id ' AND subject = ' $subject ' AND comment = ' $comment ' " ), 0 );
2001-01-20 12:20:31 +00:00
if ( $duplicate != 0 ) {
2001-03-29 19:50:31 +00:00
watchdog ( " warning " , " comment: duplicate ' $subject ' " );
2001-01-20 12:20:31 +00:00
}
2001-01-25 15:29:45 +00:00
else {
2001-04-16 18:21:22 +00:00
// validate subject:
2001-01-20 12:20:31 +00:00
$subject = ( $subject ) ? $subject : substr ( $comment , 0 , 29 );
2001-04-16 18:21:22 +00:00
// add watchdog entry:
2001-04-06 14:14:16 +00:00
watchdog ( " special " , " comment: added ' $subject ' " );
2001-01-20 12:20:31 +00:00
2001-04-16 18:21:22 +00:00
// add comment to database:
2001-03-24 16:46:11 +00:00
db_query ( " INSERT INTO comments (lid, pid, author, subject, comment, hostname, timestamp, score) VALUES (' $id ', ' $pid ', ' $user->id ', ' $subject ', ' $comment ', ' " . getenv ( " REMOTE_ADDR " ) . " ', ' " . time () . " ', ' " . ( $user -> userid ? 1 : 0 ) . " ') " );
2001-01-20 12:20:31 +00:00
}
}
function comment_score ( $comment ) {
$value = ( $comment -> votes ) ? ( $comment -> score / $comment -> votes ) : (( $comment -> score ) ? $comment -> score : 0 );
return (( strpos ( $value , " . " )) ? substr ( $value . " 00 " , 0 , 4 ) : $value . " .00 " );
}
function comment_num_replies ( $id , $count = 0 ) {
2001-03-07 21:29:40 +00:00
$result = db_query ( " SELECT COUNT(cid) FROM comments WHERE pid = ' $id ' " );
2001-01-20 12:20:31 +00:00
return ( $result ) ? db_result ( $result , 0 ) : 0 ;
}
2001-01-25 15:29:45 +00:00
2001-01-20 12:20:31 +00:00
function comment_moderation ( $comment ) {
global $comment_votes , $op , $user ;
if ( $op == " reply " ) {
2001-03-01 21:34:09 +00:00
// preview comment:
2001-01-20 12:20:31 +00:00
$output .= " " ;
}
2001-05-17 20:50:15 +00:00
else if ( $user -> id && $user -> userid != $comment -> userid && ! field_get ( $comment -> users , $user -> userid )) {
2001-03-01 21:34:09 +00:00
// comment hasn't been moderated yet:
foreach ( $comment_votes as $key => $value ) $options .= " <OPTION VALUE= \" $value\ " > $key </ OPTION > \n " ;
$output .= " <SELECT NAME= \" moderate[ $comment->cid ] \" > $options </SELECT> \n " ;
2001-01-20 12:20:31 +00:00
}
else {
2001-03-01 21:34:09 +00:00
// comment has already been moderated:
2001-03-07 21:29:40 +00:00
$output .= " <TABLE BORDER= \" 0 \" CELLSPACING= \" 1 \" CELLPADDING= \" 1 \" ><TR><TD ALIGN= \" right \" > " . t ( " score " ) . " :</TD><TD> " . check_output ( $comment -> score ) . " </TD></TR><TR><TD ALIGN= \" right \" > " . t ( " votes " ) . " :</TD><TD> " . check_output ( $comment -> votes ) . " </TR></TABLE> \n " ;
2001-01-20 12:20:31 +00:00
}
return $output ;
}
2001-01-21 09:26:06 +00:00
function comment_controls ( $threshold = 1 , $mode = 3 , $order = 1 ) {
global $REQUEST_URI , $user ;
2001-04-21 17:35:29 +00:00
$output .= " <DIV ALIGN= \" CENTER \" > \n " ;
2001-01-20 12:20:31 +00:00
$output .= " <FORM METHOD= \" post \" ACTION= \" $REQUEST_URI\ " > \n " ;
2001-01-21 09:26:06 +00:00
$output .= comment_mode (( $user -> id ? $user -> mode : $mode ));
$output .= comment_order (( $user -> id ? $user -> sort : $order ));
$output .= comment_threshold (( $user -> id ? $user -> threshold : $threshold ));
2001-02-17 12:59:24 +00:00
$output .= " <INPUT TYPE= \" submit \" NAME= \" op \" VALUE= \" " . t ( " Update settings " ) . " \" > \n " ;
2001-04-16 18:21:22 +00:00
$output .= " <INPUT TYPE= \" submit \" NAME= \" op \" VALUE= \" " . t ( " Add comment " ) . " \" > \n " ;
2001-01-20 12:20:31 +00:00
$output .= " </FORM> \n " ;
2001-04-21 17:35:29 +00:00
$output .= " </DIV> \n " ;
2001-01-20 12:20:31 +00:00
return $output ;
}
function comment_threshold ( $threshold ) {
2001-03-01 21:34:09 +00:00
for ( $i = - 1 ; $i < 6 ; $i ++ ) $options .= " <OPTION VALUE= \" $i\ " " . ( $threshold == $i ? " SELECTED " : " " ) . " > " . t( " Filter " ) . " - $i </ OPTION > " ;
return " <SELECT NAME= \" threshold \" > $options </SELECT> \n " ;
2001-01-20 12:20:31 +00:00
}
function comment_mode ( $mode ) {
global $cmodes ;
2001-03-01 21:34:09 +00:00
foreach ( $cmodes as $key => $value ) $options .= " <OPTION VALUE= \" $key\ " " . ( $mode == $key ? " SELECTED " : " " ) . " > $value </ OPTION > \n " ;
return " <SELECT NAME= \" mode \" > $options </SELECT> \n " ;
2001-01-20 12:20:31 +00:00
}
function comment_order ( $order ) {
global $corder ;
2001-03-01 21:34:09 +00:00
foreach ( $corder as $key => $value ) $options .= " <OPTION VALUE= \" $key\ " " . ( $order == $key ? " SELECTED " : " " ) . " > $value </ OPTION > \n " ;
return " <SELECT NAME= \" order \" > $options </SELECT> \n " ;
2001-01-20 12:20:31 +00:00
}
2001-03-24 16:46:11 +00:00
function comment_query ( $lid , $order , $pid = - 1 ) {
$query .= " SELECT c.*, u.* FROM comments c LEFT JOIN users u ON c.author = u.id WHERE c.lid = ' $lid ' " ;
2001-03-07 21:29:40 +00:00
if ( $pid >= 0 ) $query .= " AND pid = ' $pid ' " ;
2001-01-20 12:20:31 +00:00
if ( $order == 1 ) $query .= " ORDER BY c.timestamp DESC " ;
2001-01-21 09:26:06 +00:00
else if ( $order == 2 ) $query .= " ORDER BY c.timestamp " ;
else if ( $order == 3 ) $query .= " ORDER BY c.score DESC " ;
else if ( $order == 4 ) $query .= " ORDER BY c.score " ;
2001-01-20 12:20:31 +00:00
return db_query ( $query );
}
function comment_visible ( $comment , $threshold = 0 ) {
if ( $comment -> votes == 0 && $comment -> score >= $threshold ) return 1 ;
else if ( $comment -> votes > 0 && $comment -> score / $comment -> votes >= $threshold ) return 1 ;
else return 0 ;
}
function comment_uri ( $args = 0 ) {
2001-03-24 16:46:11 +00:00
global $mod ;
if ( $args ) return ( $mod ) ? " module.php?mod= $mod ; $args " : " node.php? $args " ;
else return ( $mod ) ? " module.php?mod= $mod " : " node.php " ;
2001-01-20 12:20:31 +00:00
}
function comment_link ( $comment , $return = 1 ) {
2001-03-24 16:46:11 +00:00
global $theme ;
if ( $return ) return " <A HREF= \" " . comment_uri ( " id= $comment->lid # $comment->cid " ) . " \" ><FONT COLOR= \" $theme->type\ " > " . t( " return " ) . " </ FONT ></ A > | < A HREF = \ " " . comment_uri ( " op=reply&id= $comment->lid &pid= $comment->cid " ) . " \" ><FONT COLOR= \" $theme->type\ " > " . t( " reply to this comment " ) . " </ FONT ></ A > " ;
else return " <A HREF= \" " . comment_uri ( " op=reply&id= $comment->lid &pid= $comment->cid " ) . " \" ><FONT COLOR= \" $theme->type\ " > " . t( " reply to this comment " ) . " </ FONT ></ A > " ;
2001-01-20 12:20:31 +00:00
}
2001-03-01 21:34:09 +00:00
function comment_view ( $comment , $folded = 0 ) {
2001-03-24 16:46:11 +00:00
global $theme ;
2001-03-01 21:34:09 +00:00
// calculate comment's score:
$comment -> score = comment_score ( $comment );
// display comment:
2001-01-20 12:20:31 +00:00
if ( $folded ) $theme -> comment ( $comment , $folded );
2001-03-01 21:34:09 +00:00
else print " <A HREF= \" " . comment_uri ( " id= $comment->lid &cid= $comment->cid # $comment->cid " ) . " \" > " . check_output ( $comment -> subject ) . " </A> by " . format_username ( $comment -> userid ) . " <SMALL>( $comment->score )</SMALL><P> " ;
2001-01-20 12:20:31 +00:00
}
function comment_thread_min ( $cid , $threshold ) {
2001-03-01 21:34:09 +00:00
global $user ;
2001-01-20 12:20:31 +00:00
2001-03-07 21:29:40 +00:00
$result = db_query ( " SELECT c.*, u.* FROM comments c LEFT JOIN users u ON c.author = u.id WHERE c.pid = ' $cid ' ORDER BY c.timestamp, c.cid " );
2001-01-20 12:20:31 +00:00
print " <UL> " ;
while ( $comment = db_fetch_object ( $result )) {
2001-03-01 21:34:09 +00:00
comment_view ( $comment );
2001-01-20 12:20:31 +00:00
comment_thread_min ( $comment -> cid , $threshold );
}
print " </UL> " ;
}
function comment_thread_max ( $cid , $mode , $threshold , $level = 0 , $dummy = 0 ) {
2001-03-24 16:46:11 +00:00
global $user ;
2001-01-20 12:20:31 +00:00
2001-03-24 16:46:11 +00:00
$result = db_query ( " SELECT c.*, u.* FROM comments c LEFT JOIN users u ON c.author = u.id WHERE c.pid = ' $cid ' ORDER BY c.timestamp, c.cid " );
2001-01-20 12:20:31 +00:00
print " <UL> " ;
while ( $comment = db_fetch_object ( $result )) {
2001-03-01 21:34:09 +00:00
comment_view ( $comment , ( comment_visible ( $comment , $threshold ) ? comment_link ( $comment , 0 ) : 0 ));
2001-01-20 12:20:31 +00:00
comment_thread_max ( $comment -> cid , $mode , $threshold , $level + 1 , $dummy + 1 );
}
print " </UL> " ;
}
function comment_render ( $lid , $cid ) {
2001-03-24 16:46:11 +00:00
global $theme , $REQUEST_URI , $user ;
2001-01-20 12:20:31 +00:00
// Pre-process variables:
2001-01-20 12:53:54 +00:00
$lid = empty ( $lid ) ? 0 : $lid ;
2001-01-20 12:20:31 +00:00
$cid = empty ( $cid ) ? 0 : $cid ;
2001-04-06 14:14:16 +00:00
$mode = ( $user -> id ) ? $user -> mode : variable_get ( default_comment_mode , 4 );
$order = ( $user -> id ) ? $user -> sort : variable_get ( default_comment_order , 1 );
$threshold = ( $user -> id ) ? $user -> threshold : variable_get ( default_comment_threshold , 3 );
2001-01-20 12:20:31 +00:00
if ( $user -> id ) {
2001-01-21 09:26:06 +00:00
// Comment control:
2001-04-15 17:01:32 +00:00
$theme -> box ( t ( " Comment control " ), comment_controls ( $threshold , $mode , $order ));
2001-01-21 09:26:06 +00:00
2001-01-20 12:20:31 +00:00
// Print moderation form:
print " <FORM METHOD= \" post \" ACTION= \" $REQUEST_URI\ " > \n " ;
}
if ( $cid > 0 ) {
2001-03-07 21:29:40 +00:00
$result = db_query ( " SELECT c.*, u.* FROM comments c LEFT JOIN users u ON c.author = u.id WHERE cid = ' $cid ' " );
2001-01-20 12:20:31 +00:00
if ( $comment = db_fetch_object ( $result )) {
2001-03-01 21:34:09 +00:00
comment_view ( $comment , comment_link ( $comment ));
2001-01-20 12:20:31 +00:00
}
}
else {
if ( $mode == 1 ) {
2001-03-24 16:46:11 +00:00
$result = comment_query ( $lid , $order );
2001-01-20 12:20:31 +00:00
print " <TABLE BORDER= \" 0 \" CELLPADDING= \" 2 \" CELLSPACING= \" 2 \" > \n " ;
print " <TR><TH>Subject</TH><TH>Author</TH><TH>Date</TH><TH>Score</TH></TR> \n " ;
while ( $comment = db_fetch_object ( $result )) {
if ( comment_visible ( $comment , $threshold )) {
2001-04-09 14:16:33 +00:00
print " <TR><TD><A HREF= \" " . comment_uri ( " id= $comment->lid &cid= $comment->cid # $comment->cid " ) . " \" > " . check_output ( $comment -> subject ) . " </A></TD><TD> " . format_username ( $comment -> userid ) . " </TD><TD> " . format_date ( $comment -> timestamp , " small " ) . " </TD><TD> " . comment_score ( $comment ) . " </TD></TR> \n " ;
2001-01-20 12:20:31 +00:00
}
}
print " </TABLE> \n " ;
}
else if ( $mode == 2 ) {
2001-03-24 16:46:11 +00:00
$result = comment_query ( $lid , $order );
2001-01-20 12:20:31 +00:00
while ( $comment = db_fetch_object ( $result )) {
2001-03-01 21:34:09 +00:00
comment_view ( $comment , ( comment_visible ( $comment , $threshold ) ? comment_link ( $comment , 0 ) : 0 ));
2001-01-20 12:20:31 +00:00
}
}
else if ( $mode == 3 ) {
2001-03-24 16:46:11 +00:00
$result = comment_query ( $lid , $order , 0 );
2001-01-20 12:20:31 +00:00
while ( $comment = db_fetch_object ( $result )) {
2001-03-01 21:34:09 +00:00
comment_view ( $comment );
2001-01-20 12:20:31 +00:00
comment_thread_min ( $comment -> cid , $threshold );
}
}
else {
2001-03-24 16:46:11 +00:00
$result = comment_query ( $lid , $order , 0 );
2001-01-20 12:20:31 +00:00
while ( $comment = db_fetch_object ( $result )) {
2001-03-01 21:34:09 +00:00
comment_view ( $comment , ( comment_visible ( $comment , $threshold ) ? comment_link ( $comment , 0 ) : 0 ));
2001-01-20 12:20:31 +00:00
comment_thread_max ( $comment -> cid , $mode , $threshold , $level + 1 );
}
}
}
2001-01-25 15:29:45 +00:00
2001-01-20 12:20:31 +00:00
if ( $user -> id ) {
// Print moderation form:
2001-03-01 21:34:09 +00:00
print " <INPUT TYPE= \" hidden \" NAME= \" id \" VALUE= \" $lid\ " > \n " ;
print " <INPUT TYPE= \" submit \" NAME= \" op \" VALUE= \" " . t ( " Moderate comments " ) . " \" > \n " ;
2001-01-20 12:20:31 +00:00
print " </FORM> \n " ;
}
}
2001-05-17 19:14:50 +00:00
?>