Login   Register  
PHP Classes
elePHPant
Icontem

File: list.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  >  People  >  list.php  >  Download  
File: list.php
Role: Example script
Content type: text/plain
Description: Draws the table of listing the peple in the People Folder
Class: People
Manage user contacts
Author: By
Last change:
Date: 2010-07-09 16:55
Size: 2,924 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 (
"Panel_Panel.cls");
Include_Once (
"Panel_List6.cls");
Include_Once (
"Panel_People.cls");
Include_Once (
"Panel_Person.cls");
Include_Once (
"Common_People.cls");
Include_Once (
"Common_Person.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_People gblLadder()->getClass ("Common_People")->ID();
    
$clsCommon_Person gblLadder()->getClass ("Common_Person")->ID();

    
// ==========================================
    // Get Persons Folder

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

    
// =======================================
    // Set People Folder

    
$fldrPeople = New ENetArch_Common_People();
    
$fldrPeople->setState ($fldrTarget);

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

    
$pnlList = new ENetArch_Panels_Common_List ();
    
$pnlPeople = new ENetArch_Panels_Common_People ();

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

    
$pnlList->setPanelName ("ENetArch.People");
    
$pnlList->nPerPage 10;
    
$pnlList->nCurrentPage 1;
    
$pnlList->setRowPanel ($pnlPeople);
    
$pnlList->setFolder ($fldrPeople);

    
$pnlList->getSession ();
    
$pnlList->getPOST ();
    
$pnlList->setSession ();

?>
    <style>    @import url("styles.css");    </style>
    <script src="jquery_lite.js"></script>
    <script src="trgrs_People.js"></script>
    <script>ENetArch.People.nFolderID = <?= $nFolderID ?>;</script>
<?
?>
    <div ID="ENetArch_Navigation">
    <a href="javascript:void(0);" onClick="ENetArch.People.List ();">Refresh</a> |
    <a href="javascript:void(0);" onClick="ENetArch.People.View ();">View</a> |
    <a href="javascript:void(0);" onClick="ENetArch.People.Edit ();">Edit</a> |
    <a href="javascript:void(0);" onClick="ENetArch.People.New ();">New</a> |
    <a href="javascript:void(0);" onClick="ENetArch.People.Delete ();">Delete</a>
    </div>
<?
    
print ("<form name=\"ENetArch_People_Form\" ID=\"ENetArch_People_Form\"
        Method=\"POST\" onSubmit =\"ENetArch.People.List()\">\n"
);
    
$pnlList->drawPanel();
    
$pnlList->drawNavigation();
    
$pnlList->drawPerPage();
    print (
"<input type=\"submit\" name=\"submit_form\" value=\"GO ->\" onClick=\"ENetArch.People.List()\">\n");
    print (
"</form>");
?>
    <script>
        $("ENetArch_Navigation").style.width = $("ENetArch_People").offsetWidth - 6;
    </script>
<?
}
?>