Location: PHPKode > projects > Projector > projector/project/main.php
<input type="button" value="Add New Project" onclick="curtain.ajax('<?= CLIENTROOT ?>/ajax/project/add-project/')">
<br /><br />
<h1>Search Projects</h1>
<form id="project_search_form" name="project_search_form" action="<?=CLIENTROOT?>/project/main" method="get">
	<input type="hidden" name="sort_field" id="sort_field" value="<?= $_GET['sort_field'] ?>" />
	<input type="hidden" name="sort_desc" id="sort_desc" value="<?= $_GET['sort_desc'] ?>"/>
	<input type="hidden" name="search" id="search" value="1"/>
	<label for="">Status:</label>
	<? htmlSel(array('New', 'In Progress','Pending', 'Priority', 'Complete', 'Billed', 'Revision'), 'id="status" name="status"',$_GET['status'] , false, 'Select Status...'); ?><br />
	<label for="">Start Date Min:</label><input type="text" name="start_min" id="start_min" value="<?= $_GET['start_min'] ?>" /><a href="javascript:sel('<?= CLIENTROOT ?>/ajax/calendar/?fieldid=start_min')" class="customTitle" title="Calendar"><img src="<?= CLIENTROOT ?>/images/icons/24-columns.png" alt="Calendar" /></a><br />
	<label for="">Start Date Max:</label><input type="text" name="start_max" id="start_max" value="<?= $_GET['start_max'] ?>" /><a href="javascript:sel('<?= CLIENTROOT ?>/ajax/calendar/?fieldid=start_max')" class="customTitle" title="Calendar"><img src="<?= CLIENTROOT ?>/images/icons/24-columns.png" alt="Calendar" /></a><br />
	<label for="">End Date Min:</label><input type="text" name="end_min" id="end_min" value="<?= $_GET['end_min'] ?>" /><a href="javascript:sel('<?= CLIENTROOT ?>/ajax/calendar/?fieldid=end_min')" class="customTitle" title="Calendar"><img src="<?= CLIENTROOT ?>/images/icons/24-columns.png" alt="Calendar" /></a><br />
	<label for="">End Date Max:</label><input type="text" name="end_max" id="end_max" value="<?= $_GET['end_max'] ?>" /><a href="javascript:sel('<?= CLIENTROOT ?>/ajax/calendar/?fieldid=end_max')" class="customTitle" title="Calendar"><img src="<?= CLIENTROOT ?>/images/icons/24-columns.png" alt="Calendar" /></a><br />
	<label>&nbsp;</label>
	<input type="submit" value="Search" />
</form>
<br /><br />
	
<?
if($_projects){
	$_pl->show();
	?>
	<form id="project_del_form" action="<?= CLIENTROOT ?>/action/project/delete-project/" method="post">
	
	<table class="listing">
	<?
	$_headerClasses = array();
	$_sortFields = array('','','','project.client', 'project.title','project.start', 'project.end','project.status');
	$_sortTitles = array('','','#','Client','Title', 'Start',  'End', 'Status');
	
	$_sortForm = 'project_search_form';
	require 'parts/sort_header.php';
	$rowCount = 1;
	foreach($_projects as $_project){
	?>
		<tr <? if ($rowCount % 2 == 0) { ?> class="bg"<? } ?>>
			<td><input type="checkbox" id="checkBox_<?= $_project['projectid'] ?>" value="<?= $_project['projectid'] ?>" name="checked_project[]" /></td>
			<td><a onclick="confirm2(event, 'Delete Project?', '$(\'checkBox_<?= $_project['projectid']  ?>\').checked = true; $(\'project_del_form\').submit()')" class="customTitle" title="Delete"><img src="<?= CLIENTROOT ?>/images/icons/24-em-cross.png" alt="Delete" /></a><a href="<?=CLIENTROOT?>/project/details?projectid=<?= $_project['projectid'] ?>" class="customTitle" title="Edit Project"><img src="<?= CLIENTROOT ?>/images/icons/24-pencil.png" alt="Edit Project" /></a></td>
			<td><?=$_pl->offset + $rowCount?></td>
			<td><?=$_project['client']?></td>
			<td><?=$_project['title'] ?></td>
			<td><?=changeDateFormat($_project['start'])?></td>
			<td><?=changeDateFormat($_project['end'])?></td>
			<td><?=$_project['status']?></td>
		</tr><?
		$rowCount++;
	}
	?></table>
	<input type="checkbox" id="checkAllBtn" onclick="checkAll('checked_project[]', this.checked);" />&nbsp;Check All
<br />
<a onclick="confirm2(event, 'Delete all checked projects?', '$(\'project_del_form\').submit()')" class="customTitle" title="Delete Checked"><img src="<?= CLIENTROOT ?>/images/icons/24-em-cross.png" alt="Delete Checked" /></a>
</form>
<br /><?
}
else{?>
No Projects Found
<? }
?>
	
		
Return current item: Projector