Location: PHPKode > projects > BugIn and Ticketing System > bugin-0.65/inc/view.inc.php
<?php
if (!isset($_SESSION['loggedin'])) {
	include_once($options['buginIncBase']."/login.inc.php");
}

if (!isset($noView) || ($noView === 0)) {
	echo <<<EOT
<script language="JavaScript">
<!--

EOT;

	if (isset($_SESSION['userinfo']) && ($_SESSION['userinfo']['options'] & OPTION_FRAMES)) {
		$_SESSION['viewRedirect'] = $num;
		echo <<<EOT
if (top.location == location) top.location.href = '{$options['baseURL']}?area=frames';

EOT;
	}

	echo <<<EOT
function projInfo() {
	myWinLoc="{$options['baseURL']}?area=proj_info&id=" + document.list['mod[project]'].options[document.list['mod[project]'].selectedIndex].value;
	window.open(myWinLoc,'ProjectInfo','width=$infoWindowWidth,height=$infoWindowHeight,directories=no,location=no,menubar=no,scrollbars=yes,status=no,toolbar=no,resizable=yes');
}

function userInfo(id) {
	myWinLoc="{$options['baseURL']}?area=user_info&id=" + id;
	window.open(myWinLoc,'UserInfo','width=$infoWindowWidth,height=$infoWindowHeight,directories=no,location=no,menubar=no,scrollbars=yes,status=no,toolbar=no,resizable=yes');
}

//-->
</script>
<form action="{$options['baseURL']}{$options['formSubmitTo']}" method="post" name="list">
	<input type="hidden" name="area" value="modify" />

EOT;
	/* }}} */

	/* The area that spews the HTML at the user {{{ */
	echo <<<EOT
<input type="hidden" name="mod[num]" value="{$num}" />
<table class="view" width="500" cellpadding="0" cellspacing="0">
	<tr bgcolor="{$options['colorTableHeaderBg']}" valign=top>
		<td colspan=4>
			<center><font color="{$options['colorTableHeaderText']}">{$verbage['viewing']}<b>#{$num}</b></font></center>
		</td>
	</tr>
	<tr bgcolor="{$options['colorTableBgAlt2']}" valign=top>
		<td><b>{$verbage['project']}</b></td>
		<td bgcolor="{$options['colorBg']}">
			<nobr>
			<select name="mod[project]">
				$projects
			</select>
			<input type="button" onClick="projInfo()" name="Info" value="info">
			</nobr>
		</td>
		<td><b>{$verbage['short_description']}</b></td>
	</tr>
	<tr bgcolor="{$options['colorTableBgAlt2']}" valign=top>
		<td><b>{$verbage['category']}</b></td>
		<td bgcolor="{$options['colorBg']}">
			<select name=mod[category]>
				$categories
			</select>
		</td>
		<td rowspan="2" bgcolor="{$options['colorBg']}">
			<textarea wrap="virtual" name="mod[short_desc]" rows="2" cols="80">{$short_desc}</textarea>
		</td>
	</tr>
	<tr bgcolor="{$options['colorTableBgAlt2']}" valign=top>
		<td><b>{$verbage['status']}</b></td>
		<td bgcolor="{$options['colorBg']}">
			<select name=mod[status]>
				$status
			</select>
		</td>
	</tr>
	<tr bgcolor="{$options['colorTableBgAlt2']}" valign=top>
		<td><b>{$verbage['creator']}</b></td>
		<td bgcolor="{$options['colorBg']}">
			<u><a onClick="userInfo({$ticket['creator']})">{$creator}</a></u>&nbsp;
		</td>
		<td><b>{$verbage['long_description']}</b></td>
	</tr>
	<tr bgcolor="{$options['colorTableBgAlt2']}" valign=top>
		<td><b>{$verbage['owner']}</b></td>
		<td bgcolor="{$options['colorBg']}">
			<select name=mod[owner]>
				$owners
			</select>
		</td>
		<td rowspan="{$long_desc_rowspan}" bgcolor="{$options['colorBg']}">
			<textarea wrap="virtual" name="mod[long_desc]" rows="$long_desc_rows" cols="80">{$long_desc}</textarea>
		</td>
	</tr>
	<tr bgcolor="{$options['colorTableBgAlt2']}" valign=top>
		<td><b>{$verbage['priority']}</b></td>
		<td bgcolor="{$options['colorBg']}">
			<select name=mod[priority]>
				$priority
			</select>
		</td>
	</tr>
	<tr bgcolor="{$options['colorTableBgAlt2']}" valign=top>
		<td><b>{$verbage['date']} {$verbage['added']}</b></td>
		<td bgcolor="{$options['colorBg']}">{$ticket['added']}</td>
	</tr>
	<tr bgcolor="{$options['colorTableBgAlt2']}" valign=top>
		<td><b>{$verbage['last_modified']}</b></td>
		<td bgcolor="{$options['colorBg']}">{$ticket['modified']}</td>
  </tr>
	$addRows
	<tr bgcolor="{$options['colorTableBgAlt2']}" valign=top>
		<td colspan="3"><b>{$verbage['modifications']}</b></td>
	</tr>
	<tr valign=top>
		<td colspan="3">$mods&nbsp;</td>
	</tr>
	<tr bgcolor="{$options['colorTableBgAlt2']}" valign=top>
		<td colspan="4"><b>{$verbage['new_modifications']}</b></td>
	</tr>
	<tr valign=top>
		<td colspan="4">
			<textarea name="mod[modification]" rows="8" wrap="virtual" cols="90"></textarea><br>
			{$verbage['also_notify']}: <input type="text" size="80" name="alsoNotify" /><br>
			{$verbage['silent_update']}: <input type="checkbox" name="noEmail"> (<small>$notifyList</small>)<br>
EOT;

if ($validOwner && $writable) {
		echo <<<EOT
				<input type="submit" name="save" value="{$verbage['save_ticket']}" />
EOT;
	if ($ticket['owner'] != $userinfo['uid'])
		echo "<input type=\"submit\" name=\"take\" value=\"{$verbage['take_ownership']}\" />\n";
}

	echo <<<EOT
		</td>
	</tr>

</table>


</form>

EOT;
	if ($options['bassEnabled'] && $_SESSION['loggedin']) {
		echo <<<EOT

<form name="fun" method="{$options['formMethod']}" action="{$options['bassBaseURL']}">
	<input type="hidden" name="area" value="add" />
	<input type="hidden" name="copyFromTicket" value="{$num}" />
	<input type="submit" value="{$verbage['submit']} to BASS &gt;&gt;" />
</form>

EOT;
	}

	/* }}} */
}

?>
Return current item: BugIn and Ticketing System