*'; return $html; } public function input_text($config,$validation,$options = "",$disable = false) { $value = $config['value']; $id = $config['id']; $display_name = $config['name']; $rule = $config['rule']; $input_name = $validation['input_name']; $error = $validation['error']; $err = $validation['err']; $hint = $validation['hint']; $options_attr = $options['attr']; $class = $options['class']; $style = $options['style']; $options_string = ""; if(is_array($options_attr)) foreach($options_attr AS $key => $option_value) $options_string .= $key.'="'.$option_value.'" '; if(!empty($hint)) $hint = (count($hint) == 1) ? implode("",$hint) : ""; $style_error = ($error == "false") ? 'border: solid 1px #FFBCBC;' : "border: solid 1px #86CC7A;"; $title = ($error == "false") ? strip_tags($hint) : ""; if(empty($error)) { $style_error = ""; $title = ""; } if($disable) { $html = ' '; } else { $html = ' '; } $html .= self::check_required($rule); return $html; } public function input_hidden($config,$validation,$options = array()) { $value = $config['value']; $id = $config['id']; $display_name = $config['name']; $rule = $config['rule']; $input_name = $validation['input_name']; $error = $validation['error']; $err = $validation['err']; $hint = $validation['hint']; $options_attr = $options['attr']; $class = $options['class']; $options_string = ""; if(is_array($options_attr)) foreach($options_attr AS $key => $option_value) $options_string .= $key.'="'.$option_value.'" '; $html = ''; // $html .= self::check_required($rule); return $html; } public function input_text_area($config,$validation,$options = "") { $value = $config['value']; $id = $config['id']; $display_name = $config['name']; $rule = $config['rule']; $input_name = $validation['input_name']; $error = $validation['error']; $err = $validation['err']; $hint = $validation['hint']; $options_attr = $options['attr']; $class = $options['class']; $style = $options['style']; $options_string = ""; if(is_array($options_attr)) foreach($options_attr AS $key => $option_value) $options_string .= $key.'="'.$option_value.'" '; if(!empty($hint)) $hint = implode("",$hint); $style_error = ($error == "false") ? 'border: solid 1px #FFBCBC;' : "border: solid 1px #86CC7A;"; $title = ($error == "false") ? strip_tags($hint) : ""; if(empty($error)) { $style_error = ""; $title = ""; } $html = ' '; $html .= self::check_required($rule); return $html; } public function input_select($config,$validation,$results_list,$options="",$select_default = true) { $value = $config['value']; $id = $config['id']; $display_name = $config['name']; $rule = $config['rule']; $input_name = $validation['input_name']; $error = $validation['error']; $err = $validation['err']; $hint = $validation['hint']; $results = $results_list['results']; $chosen_result = $results_list['chosen']; $options_attr = $options['attr']; $class = $options['class']; $style = $options['style']; $options_string = ""; if(is_array($options_attr)) foreach($options_attr AS $key => $option_value) $options_string .= $key.'="'.$option_value.'" '; if(!empty($hint)) $hint = (count($hint) == 1) ? implode("",$hint) : ""; $style_error = ($error == "false") ? 'border: solid 1px #FFBCBC;' : "border: solid 1px #86CC7A;"; $title = ($error == "false") ? strip_tags($hint) : ""; if(empty($error)) { $style_error = ""; $title = ""; } $html = ' '; $html .= self::check_required($rule); return $html; } public function input_select_multi($config,$validation,$results_list) { $value = $config['value']; $id = $config['id']; $display_name = $config['name']; $rule = $config['rule']; $input_name = $validation['input_name']; $error = $validation['error']; $err = $validation['err']; $hint = $validation['hint']; $results = $results_list['results']; $chosen_result = $results_list['chosen']; $html = ' '.$err.' '.$hint.'  '; $html .= self::check_required($rule); return $html; } public function input_radio($config,$validation,$results_list,$options="",$select_default = "no") { $value = $config['value']; $id = $config['id']; $display_name = $config['name']; $rule = $config['rule']; $input_name = $validation['input_name']; $error = $validation['error']; $err = $validation['err']; $hint = $validation['hint']; $results = $results_list['results']; $chosen_result = $results_list['chosen']; $options_attr = $options['attr']; $class = $options['class']; $style = $options['style']; $options_string = ""; if(is_array($options_attr)) foreach($options_attr AS $key => $option_value) $options_string .= $key.'="'.$option_value.'" '; if(!empty($hint)) $hint = (count($hint) == 1) ? implode("",$hint) : ""; $style_error = ($error == "false") ? 'border: solid 1px #FFBCBC;' : "border: solid 1px #86CC7A;"; $title = ($error == "false") ? strip_tags($hint) : ""; if(empty($error)) { $style_error = ""; $title = ""; } $html = ''; foreach($results AS $result) { $id = $result['id']; $name = $result['name']; if($id == $chosen_result ) $html .= ''.$name; else $html .= ''.$name; } $html .= self::check_required($rule); return $html; } public function input_checkbox($config,$validation,$item,$options="",$checked = false) { $value = $config['value']; $id = $config['id']; $display_name = $config['name']; $rule = $config['rule']; $input_name = $validation['input_name']; $error = $validation['error']; $err = $validation['err']; $hint = $validation['hint']; $options_attr = $options['attr']; $class = $options['class']; $style = $options['style']; $options_string = ""; if(is_array($options_attr)) foreach($options_attr AS $key => $option_value) $options_string .= $key.'="'.$option_value.'" '; if(!empty($hint)) $hint = (count($hint) == 1) ? implode("",$hint) : ""; $style_error = ($error == "false") ? 'border: solid 1px #FFBCBC;' : "border: solid 1px #86CC7A;"; $title = ($error == "false") ? strip_tags($hint) : ""; if(empty($error)) { $style_error = ""; $title = ""; } $html = ''; if($checked) $html .= ''.$item.''; else $html .= ''.$item.''; $html .= ''; $html .= self::check_required($rule); return $html; } public function input_checkbox_multi($config,$validation,$results_list,$options="",$checked = false) { $value = $config['value']; $id = $config['id']; $display_name = $config['name']; $rule = $config['rule']; $input_name = $validation['input_name']; $error = $validation['error']; $err = $validation['err']; $hint = $validation['hint']; $options_attr = $options['attr']; $class = $options['class']; $style = $options['style']; $options_string = ""; if(is_array($options_attr)) foreach($options_attr AS $key => $option_value) $options_string .= $key.'="'.$option_value.'" '; if(!empty($hint)) $hint = (count($hint) == 1) ? implode("",$hint) : ""; $style_error = ($error == "false") ? 'border: solid 1px #FFBCBC;' : "border: solid 1px #86CC7A;"; $title = ($error == "false") ? strip_tags($hint) : ""; if(empty($error)) { $style_error = ""; $title = ""; } $html = ''; if($checked) $html .= ''.$item.''; else $html .= ''.$item.''; $html .= ''; $html .= self::check_required($rule); return $html; } } ?>