cvs: pecl /newt/examples 02.php
| From: | Michael Spector | Date: | Mon, 23 Aug 2004 12:28:25 +0000 |
| Subject: | cvs: pecl /newt/examples 02.php | ||
| Groups: | php.pecl.cvs | ||
| Request: | Send a blank email to pecl-cvs+get-1704@lists.php.net to get a copy of this message | ||
michael Mon Aug 23 08:28:25 2004 EDT
Added files:
/pecl/newt/examples 02.php
Log:
added example of usage: newt_win_menu
http://cvs.php.net/co.php/pecl/newt/examples/02.php?r=1.1&p=1
Index: pecl/newt/examples/02.php
+++ pecl/newt/examples/02.php
<?
newt_init ();
newt_cls ();
$options = array("eth0", "eth1", "lo");
$rc = newt_win_menu("Network configuration tool", "Which interface to
configure?", 30, 0, 20, 6, $options, &$option, "Ok", "Back");
newt_finished ();
if($rc == 1) {
echo "You have choosed to configure interface: ".$options[$option]."\n";
} else if($rc == 2) {
echo "You have pressed Back, but there's no screen to display :(\n";
}
?>