Login   Register  
PHP Classes
elePHPant
Icontem

File: examples/checklist.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Michele Brodoloni  >  PHP Dialog  >  examples/checklist.php  >  Download  
File: examples/checklist.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: Added phpdoc-style comments to source code (most of)
Added a README file with installation instructions
Made some fixes into main class code
Made some changes to the example scripts and checked if they work

Date: 2 years ago
Size: 544 bytes
 

Contents

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

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

$dialog Dialog::factory('checklist', array(
    
'backtitle' => 'Checklists'
));

$options = array(
    array(
'one'"One"true), 
    array(
'two'"Two"true),
    array(
        
'id'       => 'five',
        
'caption'  => 'Five',
    )
);

$dialog->returnCaption(true)
       ->
setCaption('Testing Checklists')
       ->
addOptions($options)
       ->
addOption('six'"Six")
       ->
disableCancel(true);

$res $dialog->show();

system('clear');
echo 
"You selected:\n\n";
print_r($res);
echo 
"\n";

exit();