PHP Classes

File: example

Recommend this page to a friend!
  Classes of Ammo   Base Calendar 2   example   Download  
File: example
Role: Example script
Content type: text/plain
Description: this is an example file
Class: Base Calendar 2
Dispaly two month and can insert appointment
Author: By
Last change: new version
Date: 19 years ago
Size: 1,386 bytes
 

Contents

Class file image Download
<html>
<head>
<title>Exapmle of Calendar Base 2.0</title>
</head>
<body>
<?php
session_start
();
include_once(
"calendar_class.php");
include_once(
"db_class.php");
if (isset(
$_REQUEST['month'])){$month=$_REQUEST['month'];}else{$month=date("M");}
if (isset(
$_REQUEST['y'])){$year=$_REQUEST['y'];}else{$year=date("Y");}
$cal = new BaseCalendar($year,$month);
?>
<table width="600">
<tr><td colpsan="2"><a href="<?php echo $_SERVER['PHP_SELF'];?>?act=agenda&amp;vis=day">dayly</a> - <a href="<?php echo $_SERVER['PHP_SELF'];?>?act=agenda&amp;vis=week">weekly</a></td></tr>
<tr>
<td valign="top">
<?php
if(isset($_REQUEST['vis'])){
$_SESSION['vis']=$_REQUEST['vis'];}elseif(!isset($_SESSION['vis'])){$_SESSION['vis']='week';}

if (isset(
$_REQUEST['delapp']) and isset($_REQUEST['delapp2'])){
   
$cal->del_event($_REQUEST['id']);
}
if(isset(
$_REQUEST['sub_app']) and $_REQUEST['sub_app']=='Insert'){
   
$cal->add_event();
}elseif(isset(
$_REQUEST['sub_app']) and $_REQUEST['sub_app']=='Modify'){
   
$cal->upd_event();
}
if(isset(
$_REQUEST['day'])){$day=$_REQUEST['day'];}else{$day=date("j");}
if (
$_SESSION['vis']=='day'){$cal->displayday($day);}else{$cal->week($day);}
?>
</td>
<td>
<?php
if(isset($_REQUEST['id'])){$id=$_REQUEST['id'];}else{$id='';}
$cal->display_cal();
$cal->event_form($day,$month,$year,$id);
?>
</td>
</tr>
</table>

</body>
</html>