Location: PHPKode > projects > BugIn and Ticketing System > bugin-0.65/inc/changelog.inc.php
<?php
// Prints a single entry
function listEntryPrint($lines) {
	static $line;
	$colspan = 1;

	if ($line == 0) {
		$line = 1;
		$bgColor = "#eeeeee";
	}
	else {
		$line = 0;
		$bgColor = "#ffffff";
	}

	while (list($key, $lineItems) = each($lines)) {
		echo <<<EOT
	<tr bgcolor="$bgColor">

EOT;
		//printVar($lineItems);
		while (list($key, $value) = each($lineItems)) {
			if (is_string($key)) {
				$colspan = $value;
			}
			else {
				echo <<<EOT
		<td colspan="$colspan">$value</td>

EOT;
				$colspan = 1;
			}
		}
	echo <<<EOT

	</tr>

EOT;
	}
}
if (isset($clrows)) {
	$rows = $clrows;
}
else {
	$rows = $changeLogRows;
}

$tickets = $bugDatabase->getTicketList("(UNIX_TIMESTAMP(NOW()) - UNIX_TIMESTAMP(date_modified)) > '{$options[errorTicketAge]}' AND !(status IN ({$options[closedNum]}))");
if (is_array($tickets)) {
	$numOld = count($tickets);
	$s = (($numOld > 1) ? "s" : "");
	echo <<<EOT
<img src="gfx/error.gif" width="15" height="15" border="0" /> <b>{$numOld} OLD ticket{$s} in the queue! <br>

EOT;
}

$tickets = $bugDatabase->getTicketList("(owner = '0') AND !(status IN ({$options[closedNum]}))");
if (is_array($tickets)) {
	$numUnowned = count($tickets);
	$s = (($numUnowned > 1) ? "s" : "");
	echo <<<EOT
<img src="gfx/error.gif" width="15" height="15" border="0" /> <b>{$numUnowned} UNOWNED ticket{$s} in the queue! <br>

EOT;
}


echo <<<EOT
<font size="-1">
<table cellpadding="0" cellspacing="0" width="100%">

EOT;

// Get the last few modifications...
$mods = $bugDatabase->getModList($rows);
while (list($key, $value) = each($mods)) {
	$ticket = $bugDatabase->getTicket($value[ticket_id]);
	$text = htmlentities(&$value[text]);
	$image = eregImageMatch($text);
	$short_desc = htmlentities($ticket[short_desc]);
	if (isset($numberRows)) {
		$i+= 1;
		$image = "$i: $image";
	}
	
	$textArray[colspan] = "4";
	$textArray[0] = $text;
	listEntryPrint(array(array($image, $value[date], "<b><a href=\"{$options[baseURL]}/?area=view&num={$value[ticket_id]}\">{$short_desc}</a></b>", "<i><nobr>(By: <a href=\"{$bugDatabase->lists[user][$value[uid]][email]}\">{$bugDatabase->lists[user][$value[uid]][name]}</a>)</nobr></i>"), $textArray));
	
}

if (isset($clrows)) {
	$num = count($mods);
	echo <<<EOT
	<hr>
	Mods: {$num}<br>

EOT;

}
?>
</table>
</font>
Return current item: BugIn and Ticketing System