Location: PHPKode > projects > Somery > somery/upload/comments.php
<?php 
// Somery, a weblogging script by Robin de Graaf, copyright 2001-2006
// Somery is distributed under the Artistic License (see LICENSE.txt)
//
// COMMENTS.PHP > 08-03-2006

$c_query = "SELECT * FROM ".$prefix."articles WHERE aid = '$row->aid'"; 
$c_result = mysql_query($c_query); 
while($c_row = mysql_fetch_object($c_result)) { 
	$settings_comments = $c_row->show_comments; 
} 
if ($settings[comments] == 1 && $settings_comments == 1) { 
 
	if ($c == 1) { 
	include("admin/cookies.php"); 
	$author = read_cookie("mobscommenter"); 
	$email = read_cookie("mobscommentemail"); 
	$url = read_cookie("mobscommenturl"); 
	$c_query = "SELECT * FROM ".$prefix."comments WHERE parentid = '$row->aid' ORDER BY coid"; 
	$c_result = mysql_query($c_query); 
	echo "<a name='comments'></a>"; 
		while($c_row = mysql_fetch_object($c_result)) { 
?> 
 
 
<br /><br />
<strong><?php getcomment("author");?> (<a href="mailto:<?php getcomment("email");?>">mail</a>/<a href="<?php getcomment("url");?>">url</a>)</strong> @ <?php getcomment("date");?> - <?php getcomment("time");?><br />
<?php comment();?>
 
<?php	 
		} 
?> 
 
<br /><br /><form method="post" action="<?php echo $PHP_SELF;?>"> 
<input type="hidden" name="comments" value="post"> 
<input type="hidden" name="p" value="<?php echo $p;?>"> 
<table>
<tr><td width="85">name</td><td><input type="text" value="<?php echo $author; ?>" name="author"></td></tr>
<tr><td width="85">email</td><td><input type="text" value="<?php echo $email; ?>" name="email"></td></tr>
<tr><td width="85">website</td><td><input type="text" value="<?php echo $url; ?>" name="url"></td></tr>
<tr><td colspan="2"><textarea name="comment" cols=35 rows=8></textarea></td></tr>
<tr><td colspan="2" align="right"><input type="submit" value="post comment"></td></tr></table>
</form> 
<a href="<?php echo $PHP_SELF;?>">back</a> 
<?php 
	} 
} 
?> 
 
Return current item: Somery