Ejemplo n.º 1
0
 function toHtml()
 {
     $this->_initTemplate();
     $formcontroller = new FormController();
     for ($i = 0; $i < count($this->_arr_form); $i++) {
         $formcontroller->form =& $this->_arr_form[$i];
         $arr_form = $formcontroller->toTemplate();
         $name = $this->_arr_form[$i]->getAttribute('name');
         $this->smarty->assign($name, $arr_form);
     }
     $controller = new ComponentController($this->_container);
     $arr_component = $controller->toTemplate();
     $this->smarty->assign("component", $arr_component);
     foreach ($this->_arr_output as $key => $value) {
         $this->smarty->assign($key, $value);
     }
     $this->smarty->display($this->template);
 }
Ejemplo n.º 2
0
for ($i = 0; $i < count($arr_field); $i++) {
    $arr_checkbox[$arr_field[$i]['name']] = '';
}
$checkbox2 =& $form->addElement('checkbox');
$checkbox2->setAttribute('id', 'is_list');
$checkbox2->setAttribute('checkboxes', $arr_checkbox);
$checkbox2->return_type = 'array';
$button1 =& $form->addElement('reset');
$button1->setAttribute('id', 'resetbutton');
$button1->setAttribute('value', 'Reset');
$button2 =& $form->addElement('submit');
$button2->setAttribute('id', 'submitbutton');
$button2->setAttribute('value', 'Submit');
$button3 =& $form->addElement('backbutton');
$form_op =& $form->addElement('hidden');
$form_op->setAttribute('id', 'op');
$form_op->setAttribute('value', 'gen_generate');
$hidden2 =& $form->addElement('hidden');
$hidden2->setAttribute('id', 'table_name');
$hidden2->setAttribute('value', $arr_table[$current_table]['name']);
$formcontroller = new FormController($form);
$arr_form = $formcontroller->toTemplate();
$smarty->assign("data", $arr_field);
$smarty->assign("form", $arr_form);
$smarty->assign('table_name', $arr_table[$current_table]['name']);
$smarty->assign('INPUT_TITLE', INPUT_TITLE);
$smarty->assign('TABLE', TABLE);
$smarty->assign('FIELD', FIELD);
$smarty->assign('maincontent', 'gen_input.html');
$smarty->display($view);
//print_r($arr_field);