File: commentbox.inc

package info (click to toggle)
gallery 1.5.4-3
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 26,712 kB
  • ctags: 6,567
  • sloc: php: 33,824; sh: 446; xml: 96; makefile: 88; perl: 61
file content (23 lines) | stat: -rw-r--r-- 957 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
<?php /* $Id: commentbox.inc 11822 2005-10-17 17:46:13Z jenst $ */ ?>
<?php 
	global $gallery, $comment, $index, $j;

	$fromString = wordwrap($comment->getName(), 50, " ", 1) .'&nbsp;&nbsp;'. $comment->getDatePosted();
	if ($gallery->user->isAdmin() || $gallery->user->isOwnerOfAlbum($gallery->album)) {
	    $fromString .= ' (@'. strip_tags($comment->getIPNumber()) .')';
	}
?>
		<table width="100%" border="0" cellspacing="0" cellpadding="0" class="albumdesc">
		<tr>
		  <td width="75%" class="admin"><?php echo sprintf(_("From: %s"), $fromString); ?></td>
		  <td><?php
if ($gallery->user->canWriteToAlbum($gallery->album)) {
	echo '<span class="admin">'. _("Delete") .'<input type="checkbox" name="comment_index['. $j .']"></span>';
}
	?></td>
		</tr>
		<tr>
		  <td style="border-top:1px solid black" width="75%" height="20" valign="top" class="albumdesc"><?php echo wordwrap($comment->getCommentText(), 100, " ", 1) ?></td>
		</tr>
		</table>
		<br>