PHP Classes

File: Example_2.php

Recommend this page to a friend!
  Classes of Ruben Crespo   Easy Weekly Calendar   Example_2.php   Download  
File: Example_2.php
Role: Example script
Content type: text/plain
Description: Example file 2
Class: Easy Weekly Calendar
Show calendar of a given week
Author: By
Last change: Change the submit post variable name ("send")
Date: 15 years ago
Size: 859 bytes
 

Contents

Class file image Download
<html>
<head>
<title>Example of a weekly schedule</title>

<?php

//ENVIAMOS A LA BASE
if ($_POST["send"]) {

$fecha = $_POST["programDay"];
list (
$hora, $dia, $mes, $ano) = split('&', $fecha);

echo
"<p>Selected on ".$dia."/".$mes."/".$ano." at ".$hora.":00</p>";

}


if (
$_GET["dia"] && $_GET["mes"] && $_GET["ano"]) {

$dia = $_GET["dia"];
$mes = $_GET["mes"];
$ano = $_GET["ano"];
} else {
$dia = date ("d");
$mes = date ("n");
$ano = date ("Y");
}


//include the WeeklyCalClass and create the object !!
include ("EasyWeeklyCalClass.php");
$calendar = new EasyWeeklyCalClass ($dia, $mes, $ano);

echo
"<form method='post'>
<p><input type='submit' name='send' value='send' /></p>"
;
echo
$calendar->showCalendar ();
echo
"<p><input type='submit' name='send' value='send' /></p>
</form>"
;



?>

</body>
</html>