PHP Classes

File: examples/infobox.php

Recommend this page to a friend!
  Classes of Michele Brodoloni   PHP Dialog   examples/infobox.php   Download  
File: examples/infobox.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:
Date: 12 years ago
Size: 387 bytes
 

Contents

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

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

$dialog = Dialog::factory('infobox', array(
   
'backtitle' => 'Info Box'
));

$seconds = 5;

$dialog->setHeight(3)
       ->
setWidth(30);

while(
$seconds > 0) {

   
$dialog->setCaption("Please wait $seconds seconds...")
            ->
show();

   
sleep(1);
   
   
$seconds--;

}

$dialog->setCaption('Hello World')
       ->
show();

sleep(2);