function get_tag($value = null, $title = null) { $value = $this->get_control_value($value); $text = $this->get_control_text($value); $title = $this->get_control_title($title); $class = $this->get_control_class(); $id = $this->get_id_tag(); $field = new OrFieldHidden($this->OP_[id]->get(), $this->OP_[name]->get()); $span_id = 'id="label_' . $this->OP_[id]->get() . '"'; $ajax_tooltip = $this->get_ajax_tooltip('label_' . $this->OP_[id]->get()); return "<SPAN {$span_id} {$title} {$class}>" . $text . "</SPAN>" . $ajax_tooltip . $field->get_tag($value) . $this->get_properties_tag(); }
function get_tag($value = null, $title = null) { $value = $this->get_control_value($value); $this->clip_value($value); debug_mode(__FILE__, __LINE__, $value, 'ค่า value'); $text = $this->get_control_text($value); $title = $this->get_control_title($title); $class = $this->get_control_class(); $id = $this->get_id_tag(); $field = new OrFieldHidden($this->OP_[id]->get(), $this->OP_[name]->get()); $span_id = 'id="label_' . $this->OP_[id]->get() . '"'; return "<SPAN {$span_id} {$title} {$class}>" . $text . "</SPAN>" . $field->get_tag($value) . $this->get_properties_tag(); }
function __construct($id, $db, $skin = null) { parent::__construct($id, $db, $skin); $val_ = new OrSysvalue(); $this->filter_value = $val_->filter; $this->property('form_return', 'string', 'my_form'); //กำหนด ชื่อฟอร์ม ที่คืนค่ากลับในหน้าเดิม $this->property('control_return', 'string', $val_->message[control_id]); //กำหนด ชื่อ Control ที่คืนค่ากลับในหน้าเดิม //กำหนดแสดงหน้าจอแสดงข้อมูลเป็นค่าเริ่มต้น $this->OP_[default_mode]->set('list'); $msg_control_id = new OrFieldHidden('val_msg[control_id]'); $this->set_body($msg_control_id->get_tag($val_->message[control_id])); }
function get_navigator_tag($skin_file = 'Or!Lib/db/list_navigator.html') { /*รับค่า Skin ของชุดปุ่่ม*/ $my_value = new OrSkin($skin_file); $go_page = new OrTextbox('evt_form_db[go_page]'); $go_page->set_size(3, 5); $go_page->OP_[value]->set($this->OP_[go_page]->get()); $chg_row = new OrTextbox('evt_form_db[chg_row]'); $chg_row->set_size(3); $chg_row->OP_[default_value]->set($this->OP_[row_per_page]->get()); $cur_page = new OrFieldHidden('evt_form_db[cur_page]'); $cur_page->OP_[value]->set($this->OP_[go_page]->get()); $total_page = new OrFieldHidden("evt_form_db[total_page]"); $total_page->OP_[value]->set($this->OP_[total_page]->get()); $row_page = new OrFieldHidden("evt_form_db[row_page]"); $row_page->OP_[default_value]->set($this->OP_[row_per_page]->get()); $total_row = new OrFieldHidden("evt_form_db[total_row]"); $total_row->OP_[value]->set($this->OP_[total_row]->get()); $hidden_tag = $cur_page->get_tag() . $total_page->get_tag() . $total_row->get_tag() . $row_page->get_tag(); $my_value->set_skin_tag('go_page', $go_page->get_tag()); //$my_value->set_skin_tag('chg_row' , $chg_row->get_tag() . ' รายการ จาก ' . $total_row->get_tag() . ' รายการ'); $my_value->set_skin_tag('chg_row', ' Of ' . $this->OP_[total_page]->get() . ' Pages Show ' . $chg_row->get_tag() . ' Rows '); $my_value->set_skin_tag('description', 'Total ' . $this->OP_[total_row]->get() . ' Rows'); //$my_value->set_skin_tag('description' , $total_page->get_tag() . " หน้า " ); /* $txt_cmd_filter=new field_hidden("txt_cmd_filter","evt_list_navigator[cmd_filter]"); $txt_cmd_order=new field_hidden("txt_cmd_order","evt_list_navigator[cmd_order]"); $txt_cmd_msg=new field_hidden("txt_cmd_msg","evt_list_navigator[cmd_msg]"); */ $my_value->set_skin_tag('field_hidden', $hidden_tag); return $my_value->get_tag(); }
function get_navigator_tag($skin_file = 'Or!Lib/db/form_navigator.html') { /* รับค่า Skin ของชุดปุ่่ม */ $my_value = new OrSkin($skin_file); $cur_rec = new OrFieldHidden('evt_form_db[cur_rec]'); $cur_rec->OP_[value]->set($this->OP_[cur_rec]->get()); $total_rec = new OrFieldHidden("evt_form_db[total_rec]"); $total_rec->OP_[value]->set($this->OP_[total_rec]->get()); $btn_record = new OrButton("btn_record", "evt_form_db[navigator]"); if ($this->OP_[cur_rec]->get() == 0) { $btn_record->OP_[value]->set('Add'); } else { $btn_record->OP_[value]->set('Save'); } $my_value->set_skin_tag('btn_record', $btn_record->get_tag()); $my_value->set_skin_tag('cur_rec', $cur_rec->get_tag()); $my_value->set_skin_tag('total_rec', $total_rec->get_tag()); $my_value->set_skin_tag('description', $this->OP_[cur_rec]->get() . ' of ' . $this->OP_[total_rec]->get()); return $my_value->get_tag(); }
function get_form_filter() { $val_ = new OrSysvalue(); if (!is_null($var_)) { foreach ($val_->filter as $id => $value) { //echo '$id [ ' . $id . ' ] = [ ' . $value . ' ] <br>' ; if ($id != 'filter_by') { if (!$this->filter_use[$id]) { $my_filter = new OrFieldHidden($id, 'val_filter[' . $id . ']'); $my_filter->OP_[auto_post]->set(true); $my_filter_tag .= $my_filter->get_tag(); if ($val_->compare[$id] == 'BETWEEN' or $val_->message[$id . '_II'] != '') { $my_filter = new OrFieldHidden($id . '_II', 'val_msg[' . $id . '_II]'); $my_filter->OP_[auto_post]->set(true); $my_filter_tag .= $my_filter->get_tag(); } } $my_compare = new OrFieldHidden('val_compare_' . $id . '_', 'val_compare[' . $id . ']'); $my_compare->OP_[auto_post]->set(true); $my_filter_tag .= $my_compare->get_tag(); } } } /* $my_table = new OrTable('table_query'); $my_table->OP_[align_table]->set('center'); $my_table->OP_[class_name]->set('tbl_body'); $my_table->set_col(' ค้นหา ' . $this->get_control_filter() . ' เรียง ' . $this->get_control_order() . ' ' . $this->get_button_filter() . $my_filter_tag ); $my_table->set_row(); */ $my_table = ' ค้นหา ' . $this->get_control_filter() . ' เรียง ' . $this->get_control_order() . ' ' . $this->get_button_filter() . $my_filter_tag; return $my_table; }