PHP Classes

File: examples/calendar.php

Recommend this page to a friend!
  Classes of Michele Brodoloni   PHP Dialog   examples/calendar.php   Download  
File: examples/calendar.php
Role: Example script
Content type: text/plain
Description: Example script
Class: PHP Dialog
Create console based UIs with the dialog program
Author: By
Last change: Edited README.txt
Date: 11 years ago
Size: 390 bytes
 

Contents

Class file image Download
#!/usr/bin/php
<?php

require_once '../include/class.dialog.php';

$options = array(
   
'backtitle' => "Example: Calendar Dialog",
   
'title' => 'Calendar Example'
);

$dialog = Dialog::factory('calendar', $options);

$dialog->setCaption('Select your birthday:');
$date = $dialog->show();

system('clear');
if (!
$date) {
    die(
"You pressed the ESC key...\n");
}
die(
"You was born on $date\n");