PHP Classes

File: CreateFolder.php

Recommend this page to a friend!
  Packages of Michael J. Fuhrman   People   CreateFolder.php   Download  
File: CreateFolder.php
Role: Example script
Content type: text/plain
Description: Creates and initializes the folders needed to contain the People created and the Contact Types
Class: People
Manage user contacts
Author: By
Last change:
Date: 16 years ago
Size: 1,259 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/_app.inc");

Function php_Main ()
{
   $aryRoots = gblLadder()->getRoots();
   $fldrRoot= gblLadder()->getItem ($aryRoots [1]);

   $clsCommon_People = gblLadder()->getClass ("Common_People")->ID();
    $clsCommon_ContactTypes = gblLadder()->getClass ("Common_ContactTypes")->ID();
    $clsCommon_ContactTypes_Ref = gblLadder()->getClass ("Common_ContactTypes_Ref")->ID();

   $fldrContactTypes = $fldrRoot->Create_Folder ("Contact Types", "Contact Types are stored here", $clsCommon_ContactTypes);
   $fldrContactTypes->Store();

   $fldrPeople = $fldrRoot->Create_Folder ("People", "People are stored here", $clsCommon_People);
   $fldrPeople->Store();

    $refContactTypes = $fldrPeople->Create_Reference ("ContactTypes", "Reference tot he folder that contains the Task Types", $clsCommon_ContactTypes_Ref, $fldrContactTypes);
    $refContactTypes->Store();

   print ("The People Folder ID is " . $fldrPeople->ID() . "<BR>");
}
?>