<?PHP require('cforms.inc'); $form =new crt_forms();
function getselected($arr_vars, $arr_selected){ if ($arr_selected) { foreach ($arr_selected as $val){ $arr_vars[$val]['selected'] = 1; } } return $arr_vars; }
$cst_levels = array( 1 =>array('label'=>'level 1'), 2 =>array('label'=>'level 2'), 3 =>array('label'=>'level 3'), 4 =>array('label'=>'level 4'), 5 =>array('label'=>'level 5'), 6 =>array('label'=>'level 6'), 7 =>array('label'=>'level 7'), 8 =>array('label'=>'level 8'), );
$obj_lev = ($HTTP_POST_VARS['obj_lev']);
echo $form->begin_form('','post','','',''); echo $form->create_select('obj_lev[]', getselected($cst_levels, $obj_lev), 5, 1, 'Countries', 'class=cselect'); echo $form->create_button('submit', 'act_new', 'Save', 'class=cbutton'); echo $form->end_form();
?>
|