Login   Register  
PHP Classes
elePHPant
Icontem

File: new.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Michael J. Fuhrman  >  Contact Types  >  new.php  >  Download  
File: new.php
Role: Example script
Content type: text/plain
Description: Presents a blank Contact Type to add to the list
Class: Contact Types
Manage a list of types of people contacts
Author: By
Last change:
Date: 2010-07-09 15:39
Size: 2,534 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_ContactTypes.cls");
Include_Once (
"Panel_ContactType.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_ContactTypes gblLadder()->getClass ("Common_ContactType")->ID();

    
// ==========================================
    // Get ContactTypes Folder

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

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

    
$pnlContactTypes = new ENetArch_Panels_Common_ContactTypes();

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

    
$pnlContactTypes->setPanelName ("ENetArch.ContactTypes");

?>
    <style>    @import url("styles.css");    </style>
    <script src="jquery_lite.js"></script>
    <script src="trgrs_ContactTypes.js"></script>
    <script>
        ENetArch.ContactTypes.nFolderID = <?= $nFolderID ?>;
    </script>
<?
?>
    <div ID="ENetArch_Navigation">
    <a href="javascript:void(0);" onClick="ENetArch.ContactTypes.List ();">List</a> |
    <a href="javascript:void(0);" onClick="ENetArch.ContactTypes.New ();">New</a> |
    <a href="javascript:void(0);" onClick="ENetArch.ContactTypes.View ();">View</a> |
    <a href="javascript:void(0);" onClick="ENetArch.ContactTypes.Edit ();">Edit</a> |
    <a href="javascript:void(0);" onClick="ENetArch.ContactTypes.Delete ();">Delete</a>
    </div>
<?
    
print ("<form name=\"ENetArch_ContactTypes_Form\" onSubmit =\"ENetArch.ContactTypes.AddNew(this)\" >");
    print (
"<table ID=\"" $pnlContactTypes->getPanelID() . "\">\n");
    
$pnlContactTypes->drawHeader();
    
$pnlContactTypes->drawPanel_Edit();
    print (
"</table>");
    print (
'<input type="submit" name="submit" value="submit">');
    print (
"</form>");
?>
    <script>ENetArch_Calendar
        $("ENetArch_Navigation").style.width = $("ENetArch_ContactTypes").offsetWidth - 6;
        $("ENetArch_Calendar").style.width = $("ENetArch_ContactTypes").offsetWidth;
    </script>
<?
}
?>