fetch_data(); } protected function fetch_data(){ $this->scan_request_priorities = array(); $rqt = "select * from scan_request_priorities order by scan_request_priority_weight, scan_request_priority_label asc"; $res = pmb_mysql_query($rqt); if(pmb_mysql_num_rows($res)){ while($row = pmb_mysql_fetch_object($res)){ $this->scan_request_priorities[] =array( 'id' => $row->id_scan_request_priority, 'label' => $row->scan_request_priority_label, 'weight' => $row->scan_request_priority_weight ); } } } public function get_scan_request_priorities(){ return $this->scan_request_priorities; } public function get_selector_options($selected=0){ global $charset; global $deflt_scan_request_priorities; if(!$selected){ $selected=$deflt_scan_request_priorities; } $options = ""; for($i=0 ; $iscan_request_priorities) ; $i++){ $options.= " "; } return $options; } public static function get_options($selected=0){ global $charset; $options = ''; $query = "select * from scan_request_priorities order by scan_request_priority_weight, scan_request_priority_label asc"; $result = pmb_mysql_query($query); if(pmb_mysql_num_rows($result)){ while($row = pmb_mysql_fetch_object($result)){ $options.= " "; } } return $options; } }