PHP Classes

File: new.php

Recommend this page to a friend!
  Classes of Michael J. Fuhrman   Task Types   new.php   Download  
File: new.php
Role: Example script
Content type: text/plain
Description: Draws the panel for a new Task Type
Class: Task Types
Manage a list of types of tasks of a to do list
Author: By
Last change:
Date: 14 years ago
Size: 2,451 bytes
 

Contents

Class file image Download
<?
/* =======================================
    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 (
"Common_TaskType.cls");
Include_Once (
"TaskType_Edit.cls");
Include_Once (
dirPath() . "Shared/_app.inc");

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

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

   
if ($nFolderID == 0) return;

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

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

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

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

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

   
$pnlTaskType = new ENetArch_Panels_Common_TaskType();

   
// ==========================================
    // View

   
$pnlTaskType->setPanelName ("ENetArch.TaskTypes");

?>
<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 ();">List</a> |
    <a href="javascript:void(0);" onClick="ENetArch.TaskTypes.New ();">New</a> |
    <a href="javascript:void(0);" onClick="ENetArch.TaskTypes.View ();">View</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 name=\"ENetArch_TaskTypes_Form\" onSubmit =\"ENetArch.TaskTypes.AddNew(this)\" >");
    print (
"<table ID=\"" . $pnlTaskType->getPanelID() . "\">\n");
   
$pnlTaskType->drawHeader();
   
$pnlTaskType->drawPanel();
    print (
"</table>");
    print (
'<input type="submit" name="submit" value="submit">');
    print (
"</form>");
?>
<script>ENetArch_Calendar
        $("ENetArch_Navigation").style.width = $("ENetArch_TaskTypes").offsetWidth - 6;
        $("ENetArch_Calendar").style.width = $("ENetArch_TaskTypes").offsetWidth;
    </script>
<?
}
?>