function display_comment($id) { global $dbcon; $R = $dbcon->CacheExecute("SELECT * FROM comments WHERE publish=1 and articleid = {$id} order by date desc") or die($dbcon->ErrorMsg()); echo '<br><p><a href="comment.php?cid=' . $id . '">add a comment</a></p>'; while (!$R->EOF) { echo "<hr><p><b>" . $R->Fields("title") . "</b><br>"; echo '<i>by '; if ($R->Fields("email")) { echo '<a href="mailto: ' . $R->Fields("email") . '">'; } echo $R->Fields("author"); echo '</a>, ' . DoDateTime($R->Fields("date"), "l, M j, Y g:iA") . '</i></p>'; echo '<p>' . converttext($R->Fields("comment")) . '</p>'; $R->MoveNext(); } }
function _HTML_date($date) { if (!$date) { return false; } return $this->_HTML_italics(DoDateTime($date, " M jS, Y g:ia")); }
</tr> <tr> <td rowspan="2" class ="doc_info" width="120">Document<br>Info</td> <td valign="top" class="name">ID #<?php echo $r->Fields("id"); ?> </td> </tr> <tr> <td valign="top" class="name"> <table width="100%" border="0" cellpadding="0" cellspacing="0" class="name"> <tr> <td width="25%">Date Created</td> <td width="25%"><div align="left"><?php echo DoDateTime($r->Fields("datecreated"), "n/j/y"); ?> </div></td> <td width="25%">Date Modified</td> <td width="25%"> <div align="left"> <?php if ($updated_time = $r->Fields("updated")) { echo $updated_time; } ?> </div></td> <!--<td width="25%"> <div align="left"> <?php if ($updated_time = $r->Fields("updated")) { echo DoTimeStamp(strtotime($updated_time), "n/j/y"); } ?> </div></td>-->