Location: PHPKode > projects > Todo Manager > todo/task_edit.php
<?php
require_once "config.inc.php";
require_once "controllers/task_edit.class.php";

$c = new TaskEdit();
$current_user = $c->getCurrentUser();
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title><?=TITLE?></title>
<link rel="stylesheet" type="text/css" href="common.css" />
<link rel="stylesheet" type="text/css" href="style.css" />
<script type="text/javascript" src="javascript.js"></script>
<style type="text/css">
<!--
table#table1 td {
	padding-right: 25px;
}
-->
</style>
</head>

<body onload="javascript: setFocus('title'); ">
	<div class="divContainer">
		<div class="divHeader">
			<ul class="ulHeaderMenu">
				<li><a class="ulHeaderMenu_current" href="task.php"><?=$c->getMessage("tasks")?></a></li>
				<?php
				if ($current_user->get("admin") == "yes") {
					echo "<li><a href='project.php'>".$c->getMessage("projects")."</a></li>\n";
					echo "<li><a href='user.php'>".$c->getMessage("users")."</a></li>\n";
				}
				?>
				<li><a href="profile.php"><?=$c->getMessage("profile")?></a></li>
			</ul>
			<p class="pLogin"><strong><?=$c->getMessage("welcome")?>, <?=htmlentities($current_user->get("username"))?></strong><br /><a class="warning" href="logout.php"><?=$c->getMessage("exit")?></a></p>
		</div>
		<div class="divBody">
			<form id="form1" action="<?=htmlentities($c->getCurrentPage())?>" method="post" enctype="multipart/form-data">
				<table class="tableGroup" style="margin: 0 auto; " border="0" cellpadding="0" cellspacing="0">
					<tr>
						<td>
				<h2><?=htmlentities($c->getTitle())?></h2>
				
				<?=$c->getErrorLn("error", "error")?>
				<table class="tableText" border="0" cellpadding="0" cellspacing="0">
					<tr><td><strong><?=$c->getMessage("title")?></strong></td></tr>
					<tr><td><input class="inputText" style="width: 600px; " type="text" name="title" id="title" value="<?=htmlentities($c->getParam("title"))?>" /></td></tr>
					<tr><td><?=$c->getMessage("file")?></td></tr>
					<tr>
						<td>
							<input class="inputText" size="80" type="file" name="file" />
							<?php
							if (!util_empty($c->getAttachedFile())) {
								echo "<a href='download.php?filename=".urlencode($c->getAttachedFile())."'>".$c->getMessage("download")."</a>\n";
								echo "<a class='warning' href='#' onclick='javascript: return confirmAction(\"form1\", \"".$c->getMessage("are_you_sure")."\", \"delete_attached_file\"); '>".$c->getMessage("delete")."</a>\n";
							}
							?>
						</td>
					</tr>
				</table>
				
				<table class="tableText" id="table1" border="0" cellpadding="0" cellspacing="0">
					<tr>
						<td><strong><?=$c->getMessage("project")?></strong></td>
						<td><strong><?=$c->getMessage("assigned_to")?></strong></td>
						<td><strong><?=$c->getMessage("priority")?></strong></td>
						<td><strong><?=$c->getMessage("status")?></strong></td>
					</tr>
					<tr>
						<td>
							<select name="project_id">
								<option value="">&nbsp;</option>
								<?php
								$projects = $c->getProjects();
								foreach($projects as $project) {
									$selected = $c->getParam("project_id") == $project["id"]? " selected='selected'": NULL;
									echo "<option value='".htmlentities($project["id"])."'".$selected.">".htmlentities($project["title"])."</option>\n";
								}
								?>
							</select>
						</td>
						<td>
							<select name="assigned_to_user_id">
								<option value="">&nbsp;</option>
								<?php
								$users = $c->getUsers();
								foreach($users as $user) {
									$selected = $c->getParam("assigned_to_user_id") == $user["id"]? " selected='selected'": NULL;
									echo "<option value='".htmlentities($user["id"])."'".$selected.">".htmlentities($user["username"])."</option>\n";
								}
								?>
							</select>
						</td>
						<td>
							<select name="priority">
								<option value="">&nbsp;</option>
								<option value="normal"<?=$c->getParam("priority") == "normal"? " selected='selected'": NULL?>><?=$c->getMessage("normal")?></option>
								<option value="high"<?=$c->getParam("priority") == "high"? " selected='selected'": NULL?>><?=$c->getMessage("high")?></option>
								<option value="low"<?=$c->getParam("priority") == "low"? " selected='selected'": NULL?>><?=$c->getMessage("low")?></option>
							</select>
						</td>
						<td>
							<select name="status">
								<option value="">&nbsp;</option>
								<option value="pending"<?=$c->getParam("status") == "pending"? " selected='selected'": NULL?>><?=$c->getMessage("pending")?></option>
								<option value="done"<?=$c->getParam("status") == "done"? " selected='selected'": NULL?>><?=$c->getMessage("done")?></option>
								<option value="discard"<?=$c->getParam("status") == "discard"? " selected='selected'": NULL?>><?=$c->getMessage("discard")?></option>
							</select>
						</td>
					</tr>
				</table>
				
				<table class="tableText" border="0" cellpadding="0" cellspacing="0">
					<tr><td><strong><?=$c->getMessage("description")?></strong></td></tr>
					<tr>
						<td colspan="3"><textarea name="description" style="width: 600px; height: 300px; "><?=htmlentities($c->getParam("description"))?></textarea></td>
					</tr>
				</table>
				
				<p>
					<input class="inputButton" style="width: 8em; " type="submit" value="<?=$c->getMessage("accept")?>" />
					<input class="inputButton" style="width: 8em; " type="button" value="<?=$c->getMessage("cancel")?>" onclick="javascript: previousPage('form1'); " />
				</p>
						</td>
					</tr>
				</table>
			</form>
		</div>
	</div>
</body>
</html>
Return current item: Todo Manager