<?PHP
require_once 'lib/FLEA/FLEA.php';
FLEA::init();
$ui=FLEA::initWebControls();
$ctl=$ui->control("textbox",'mytextbox',array('size'=>'4','value'=>100),true);
echo $ctl;
dump($ctl);
$script= <<<EOT
<SCRIPT>
function mydropdownlist_onclick(obj)
{
alert (obj.value);
}
</SCRIPT>
EOT;
echo $script;
echo"select 单选<br>";
$ctl=$ui->control("dropdownlist",'mydropdownlist',
array('onchange'=>'mydropdownlist_onclick(this)',
'items'=>array(''=>'','item 1'=>'1','item 2'=>'2')
),true);
echo $ctl;
dump($script);
dump($ctl);
echo"select 复选<br>";
$ctl=$ui->control("listbox",'mylistbox',
array('size'=>'5',
'multiple'=>true,
'items'=>array('item 1'=>'1','item 2'=>'2')
),true);
echo $ctl;
dump($ctl);
echo"textarea:<br>";
$ctl=$ui->control("memo",'mymemo',array(),true);
echo $ctl;
dump($ctl);
$ctl=$ui->control("checkbox",'mycheckbox',array('checked'=>true,),true);
echo $ctl;
dump($ctl);
$ctl=$ui->control("radio",'myradio',array('checked'=>true,),true);
echo $ctl;
dump($ctl);
$ctl=$ui->control("button",'mybutton',array('value'=>'button',),true);
echo $ctl;
dump($ctl);
$ctl=$ui->control("submit",'mysbumit',array('value'=>'submit',),true);
echo $ctl;
dump($ctl);
$ctl=$ui->control("reset",'myrest',array('value'=>'reset',),true);
echo $ctl;
dump($ctl);
$ctl=$ui->control("reset",'myrest',array('value'=>'reset',),true);
echo $ctl;
dump($ctl);
$ctl=$ui->control("label",'label',array('for'=>'mytextbox','caption'=>'mylabel'),true);
echo $ctl;
dump($ctl);
echo"div层:<br>";
$ctl=$ui->control("static",'mydiv',array('value'=>'my div content'),true);
echo $ctl;
dump($ctl);
$ctl=$ui->control("radiogroup",'myradiogroup',array('items'=>array("caption1"=>'value1','caption2'=>'value2')),true);
echo $ctl;
dump($ctl);
?>