Exemplo n.º 1
0
function rendercomment($comment)
{
    ob_start();
    ?>
	<li>
		<div class="commentmetadata">
			<?php 
    if (!is_null($comment["rating"])) {
        ?>
				<div class="stars right">
					<div class="on" style="width: <?php 
        echo $on = 100 * $comment["rating"] / 5;
        ?>
%;"></div>
					<div class="off" style="width: <?php 
        echo 100 - $on;
        ?>
%;"></div>
				</div>
			<?php 
    }
    ?>
			<p>Posted <?php 
    echo friendlydate_html($comment["posted"]);
    ?>
 by <?php 
    if ($comment["userdeleted"]) {
        ?>
deleted user <?php 
    }
    ?>
<strong><?php 
    echo htmlspecialchars($comment["user"]);
    ?>
</strong></p>
		</div>
		<p><?php 
    echo nl2br(htmlspecialchars($comment["comment"]));
    ?>
</p>
	</li>
	<?php 
    return ob_get_clean();
}
Exemplo n.º 2
0
    if ($user["deleted"]) {
        ?>
 deleted<?php 
    }
    if ($user["privileges"]) {
        ?>
 privileged<?php 
    }
    ?>
">
			<td><?php 
    echo htmlspecialchars($user["username"]);
    ?>
</td>
			<td><?php 
    echo friendlydate_html($user["registered"]);
    ?>
</td>
			<td><?php 
    echo $user["privileges"] ? "yes" : "no";
    ?>
</td>
			<td><?php 
    echo $user["deleted"] ? "yes" : "no";
    ?>
</td>
			<td><?php 
    echo $user["itemcount"];
    ?>
</td>
			<td><?php 
Exemplo n.º 3
0
		<?php 
    $types = item_actions();
    $i = 0;
    foreach ($items as $item) {
        $odd = $i++ % 2;
        ?>
			<tr class="row<?php 
        echo $odd;
        ?>
" id="item_<?php 
        echo $item->getQTIID();
        ?>
">
				<td><?php 
        if (!is_null($item->getModified())) {
            echo friendlydate_html($item->getModified());
        }
        ?>
</td>
				<td><?php 
        echo htmlspecialchars($item->itemTypePrint());
        ?>
</td>
				<td><?php 
        echo is_null($item->data("title")) ? "[untitled]" : htmlspecialchars($item->data("title"));
        ?>
</td>
				<td><?php 
        echo htmlspecialchars($item->data("description"));
        ?>
</td>
Exemplo n.º 4
0
function friendlydate($timestamp, $dayofweek = false)
{
    return friendlydate_html($timestamp, $dayofweek, false);
}