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  >  Appointment Calendar  >  new.php  >  Download  
File: new.php
Role: Application script
Content type: text/plain
Description: Presents a blank appointment to complete
Class: Appointment Calendar
Manage scheduled appointments
Author: By
Last change:
Date: 2010-03-08 06:11
Size: 2,979 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 (
"Time_Length.cls");
Include_Once (
"Time_Start.cls");
Include_Once (
"Calendar_Week.cls");
Include_Once (
"Common_Appointment.cls");
Include_Once (
"Appointment_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_Appointment gblLadder()->getClass ("Common_Appointment")->ID();

    
// ==========================================
    // Get Appointments Folder

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

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

    
$pnlApt = new ENetArch_Panels_Common_Appointment();

    
$pnlTime_Start = new ENetArch_Panels_Common_Time_Start();
    
$pnlTime_Lengths = new ENetArch_Panels_Common_Time_Lengths();

    
$pnlCalendar = new ENetArch_Panels_Common_Calendar_Week();

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

    
$pnlCalendar->setPanelName ("ENetArch.Calendar");
    
$pnlCalendar->getSession ();

    
$pnlApt->setPanelName ("ENetArch.Appointments");
    
$pnlApt->setPanelTimes ($pnlTime_Start);
    
$pnlApt->setPanelLengths ($pnlTime_Lengths);

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