Location: PHPKode > scripts > Task Types > task-types/List.php
<?
/*	=======================================
	Copyright 1998 - 2010 - E Net Arch
	This program is distributed under the terms of the GNU
	General Public License (or the Lesser GPL).
	======================================= */

function dirPath() { return ("../../"); }

Include_Once (dirPath() . "Shared/Classes/Ladder/Ladder_Ladder.cls");
Include_Once ("Common_Panel.cls");
Include_Once ("TaskType_View.cls");
Include_Once ("Common_TaskTypes.cls");
Include_Once ("Common_List5.cls");
Include_Once (dirPath() . "Shared/_app.inc");

Function php_Main ()
{
	$nFolderID = 0;
	if (isset ($_REQUEST ['nFolderID']))
		$nFolderID = $_REQUEST ['nFolderID'];

	$dTarget = "";
	if (isset ($_REQUEST ['dTarget']))
		$dTarget = $_REQUEST ['dTarget'];

	// ==========================================
	// Validations

	if ($nFolderID == 0) return;

	// =======================================
	// Classes

	$clsCommon_TaskType = gblLadder()->getClass ("Common_TaskType")->ID();

	// ==========================================
	// Get TaskTypes Folder

	$fldrTarget = gblLadder()->getItem ($nFolderID);

	// =======================================
	// Set TaskTypes Folder

	$fldrTaskTypes = New ENetArch_Common_TaskTypes();
	$fldrTaskTypes->setState ($fldrTarget);

	// ==========================================
	// Panels

	$pnlList = new ENetArch_Panels_Common_List();
	$pnlTaskType = new ENetArch_Panels_Common_TaskType();

	// ==========================================
	// Lists

	$pnlList->setPanelName ("ENetArch.TaskTypes");
	$pnlList->nPerPage = 10;
	$pnlList->nCurrentPage = 1;
	$pnlList->setRowPanel ($pnlTaskType);
	$pnlList->fldrTarget = $fldrTaskTypes;
	$pnlList->clsList = Array (1=>$clsCommon_TaskType);

?>
	<style>	@import url("styles.css");	</style>
	<script src="jquery_lite.js"></script>
	<script src="trgrs_TaskTypes.js"></script>
	<script>ENetArch.TaskTypes.nFolderID = <?= $nFolderID ?>;</script>
<?
?>
	<div ID="ENetArch_Navigation">
	<a href="javascript:void(0);" onClick="ENetArch.TaskTypes.List ();">Refresh</a> |
	<a href="javascript:void(0);" onClick="ENetArch.TaskTypes.Edit ();">Edit</a> |
	<a href="javascript:void(0);" onClick="ENetArch.TaskTypes.Delete ();">Delete</a>
	</div>
<?
	print ("<form ID=\"ENetArch_TaskTypes_Form\" onSubmit =\"ENetArch.TaskTypes.AddNew(this)\">\n");
	$pnlList->drawPanel();
	print ("</form>");
?>
	<script>
		$("ENetArch_Navigation").style.width = $("ENetArch_TaskTypes").offsetWidth - 6;
	</script>
<?
}
?>
Return current item: Task Types