Пример #1
0
		</table>
		</td>
	</tr>
	<?php 
}
?>
	</form>
	<?php 
$editurl = $page['is_admin'] ? "ticket-edit.php?id=" . $_GET["id"] : false;
echo drawThreadTop($r["title"], $r["description"], $r["created_user"], $r["first"] . " " . $r["last"], $r["created_date"], $editurl);
$result = db_query("SELECT\r\n\t\t\t\t\tu.id,\r\n\t\t\t\t\tf.message,\r\n\t\t\t\t\tISNULL(u.nickname, u.firstname) first,\r\n\t\t\t\t\tu.lastname last,\r\n\t\t\t\t\tf.created_date,\r\n\t\t\t\t\tf.is_admin\r\n\t\t\t\tFROM helpdesk_tickets_followups\tf\r\n\t\t\t\tJOIN users\t\t\tu ON f.created_user\t= u.id\r\n\t\t\t\tWHERE f.ticketID = " . $_GET['id'] . "\r\n\t\t\t\tORDER BY f.created_date");
while ($r = db_fetch($result)) {
    if ($r['is_admin'] && !$page['is_admin']) {
        continue;
    }
    echo drawThreadComment($r["message"], $r["id"], $r["first"] . " " . $r["last"], $r["created_date"], $r["is_admin"]);
}
echo drawThreadCommentForm(true);
echo '</table>';
?>
<table class="left" cellspacing="1">
	<?php 
echo drawHeaderRow("Attach Document", 2);
?>
	<form enctype="multipart/form-data" action="<?php 
echo $request["path_query"];
?>
" method="post" onsubmit="javascript:return validateAttachment(this);">
	<tr>
		<td class="left">Document Name</td>
		<td><?php 
Пример #2
0
		return true;
	}

	//-->
</script>

<table class="left" cellspacing="1">
	<?php 
if ($isAdmin || $isPoster) {
    echo drawHeaderRow($r["title"], 2, "edit", "edit.php?id=" . $_GET["id"], "delete", "javascript:checkDelete();");
} else {
    if ($r["isAdmin"]) {
        echo drawHeaderRow($r["title"], 2);
    } else {
        echo drawHeaderRow($r["title"], 2, "add a followup", "#bottom");
    }
}
echo drawThreadTop($r["title"], $r["description"], $r["userID"], $r["firstname"] . " " . $r["lastname"], $r["createdOn"]);
//get replies
//$direction = ($_GET["id"] == 7966) ? "DESC" : "ASC";
if (!$r["isAdmin"]) {
    $followups = db_query("SELECT\n\t\t\t\t\tf.id,\n\t\t\t\t\tf.description,\n\t\t\t\t\tu.userID,\n\t\t\t\t\tISNULL(u.nickname, u.firstname) firstname,\n\t\t\t\t\tu.lastname,\n\t\t\t\t\tf.createdOn as postedDate,\n\t\t\t\t\tf.createdBy as userID\n\t\t\t\tFROM bulletin_board_followups f\n\t\t\t\tJOIN intranet_users u ON u.userID = f.createdBy\n\t\t\t\tWHERE f.isActive = 1 AND f.topicID = {$_GET["id"]}\n\t\t\t\tORDER BY f.createdOn");
    while ($f = db_fetch($followups)) {
        echo drawThreadComment($f["description"], $f["userID"], $f["firstname"] . " " . $f["lastname"], $f["postedDate"]);
    }
}
if (!$r["isAdmin"]) {
    echo drawThreadCommentForm(false);
}
echo '</table>';
drawBottom();