<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title><?=$newsinfo['title']?> - <?=$ecms->settings['sitetitle']?></title>
<? include ("themes/$ecms->theme/headerinclude.php"); ?>
</head>
<body>
<? include("themes/$ecms->theme/header.php"); ?>
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="table">
<tr>
<td class="thead"><?=$newsinfo['title']?></td>
</tr>
<tr>
<td class="tcontents"><table width="100%" border="0" cellspacing="3" cellpadding="0">
<tr>
<td>
<? if(!$newsinfo['catinfo']['picture'] == "") { ?>
<img src="<?=$ecms->rooturl?><?=$newsinfo['catinfo']['picture']?>" alt="<?=$newsinfo['catinfo']['title']?>" title="<?=$newsinfo['catinfo']['title']?>" style="float: right;">
<? } ?>
<?=nl2br(stripslashes($newsinfo['message']))?>
</td>
</tr>
</table></td>
</tr>
<tr>
<td class="tfoot"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>Posted by <a href="<? compileurl("community", array("profile",$newsinfo['posterinfo']['uid'])); ?>">
<?=$newsinfo['posterinfo']['username']?></a> on <?=date($ecms->settings['dateformatbig'],$newsinfo['timestamp'])?> at <?=date($ecms->settings['timeformat'],$newsinfo['timestamp'])?> in <?=$newsinfo['catinfo']['title']?></td>
<td><div align="right">
<?=$newsinfo['comments']?>
Comments</div></td>
</tr>
</table></td>
</tr>
</table>
<? for($i = 1; $i<$comments['rowcount']; $i++) { ?>
<br />
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="table">
<tr>
<td class="thead">Posted by <a href="<? compileurl("community", array("profile",$comments[$i]['posterinfo']['uid'])); ?>"><?=$comments[$i]['posterinfo']['username']?></a> on <?=date($ecms->settings['dateformatbig'],$comments[$i]['timestamp'])?> at <?=date($ecms->settings['timeformat'],$comments[$i]['timestamp'])?></td>
</tr>
<tr>
<td class="tcontents"><table width="100%" border="0" cellspacing="3" cellpadding="0">
<tr>
<td>
<? if($ecms->modulesettings['news']['avatarsoncomments']) { ?>
<? if(!$comments[$i]['posterinfo']['avatar'] == "") { ?>
<img src="<img src="<?=$ecms->rooturl?>/images/customavatars/<?=$comments[$i]['posterinfo']['avatar']?>" style="float: right;">
<? } ?>
<? } ?>
<?=nl2br(stripslashes($comments[$i]['message']))?>
</td>
</tr>
</table></td>
</tr>
</table>
<? } ?>
<? if($ecms->permissions("news","post_comments") && $ecms->modulesettings['news']['enablecomments'] && $newsinfo['allowcomments']) { ?>
<br />
<form name="form1" method="post" action="<? compileurl("news", array("postcomment")); ?>">
<input name="newsid" type="hidden" value="<?=$newsinfo['id']?>">
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="table">
<tr>
<td class="thead">Post Comment</td>
</tr>
<tr>
<td class="tcontents"><table width="100%" border="0" cellspacing="3" cellpadding="0">
<tr>
<td><div align="center">
<textarea name="comment" cols="50" rows="5"></textarea>
</div></td>
</tr>
<tr>
<td><div align="center"><button type="submit">Submit</button></div></td>
</tr>
</table></td>
</tr>
</table>
</form>
<? } ?>
<? include("themes/$ecms->theme/footer.php"); ?>
</body>
</html>