checkRight(ADMIN)) { $tpl->setTPL('user_setup.tpl.html'); //{{{ create quickform elements $form->addElement('header','hdrTop','Bulk User Setup'); $form->addElement('text','txtLow','Start of Number Range: ',array('size'=>'4','maxlength'=>'4')); $form->addElement('text','txtHigh','End of Number Range: ',array('size'=>'4','maxlength'=>'4')); $form->addElement('advcheckbox','chkDID','Direct Inbound Dialling','',array(true,false)); $form->addElement('submit','btnSubmit','Generate Users'); //}}} //{{{ add rules $form->addRule('txtLow','*required','required'); $form->addRule('txtHigh','*required','required'); $form->addRule('txtLow','*numeric','numeric'); $form->addRule('txtHigh','*numeric','numeric'); //}}} if ($form->validate()) { $result = $form->process('process_data',true); $tpl->assign('txtResult',$result); } else { } $tpl->display($form); } else { $tpl->setTPL('access_denied.tpl.html'); } ?>