Changeset 154 for trunk/includes/pages/ranges/ranges_search.php
- Timestamp:
- 03/09/2006 08:07:26 AM (6 years ago)
- File:
-
- 1 edited
-
trunk/includes/pages/ranges/ranges_search.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/includes/pages/ranges/ranges_search.php
r71 r154 42 42 $where = $form_search_ranges->db_data_where(array('ip' => 'exclude')); 43 43 $table_ip_ranges = new table(array('TABLE_NAME' => 'table_ip_ranges', 'FORM_NAME' => 'table_ip_ranges')); 44 $s_ip = correct_ip($form_search_ranges->data[0]['value']); 45 $where = ($where !=''?"(".$where.") AND ":""). 46 ($s_ip !=''?"ip_ranges.ip_start <= ".ip2long($s_ip)." AND ip_ranges.ip_end >= ".ip2long($s_ip)." AND ":""); 44 $s_ip = $form_search_ranges->data[0]['value']; 45 $where = ($where !=''?"(".$where.") AND ":""); 46 if ($s_ip !='') $where .= '(ip_ranges.ip_start >= '.ip2long(correct_ip_min($s_ip, TRUE, 1)).' AND ip_ranges.ip_start <= '.ip2long(correct_ip_max($s_ip, TRUE, 1)).") OR ". 47 '(ip_ranges.ip_start >= '.ip2long(correct_ip_min($s_ip, TRUE, 2)).' AND ip_ranges.ip_start <= '.ip2long(correct_ip_max($s_ip, TRUE, 2)).") OR ". 48 '(ip_ranges.ip_start >= '.ip2long(correct_ip_min($s_ip, TRUE, 3)).' AND ip_ranges.ip_start <= '.ip2long(correct_ip_max($s_ip, TRUE, 3)).") AND "; 49 //$where = 50 // ($s_ip !=''?"ip_ranges.ip_start <= ".ip2long($s_ip)." AND ip_ranges.ip_end >= ".ip2long($s_ip)." AND ":""); 47 51 if ($where!='') $where = substr($where, 0, -5); 48 52 $table_ip_ranges->db_data( … … 74 78 $this->tpl['link_ranges_allocation'] = makelink(array("page" => "ranges", "subpage" => "allocation")); 75 79 $form_search_ranges = $this->form_search_ranges(); 76 if ($form_search_ranges->data[0]['value'] != '') $form_search_ranges->data[0]['value'] = correct_ip($form_search_ranges->data[0]['value']);80 //if ($form_search_ranges->data[0]['value'] != '') $form_search_ranges->data[0]['value'] = correct_ip($form_search_ranges->data[0]['value']); 77 81 $this->tpl['form_search_ranges'] = $construct->form($form_search_ranges, __FILE__); 78 82 $this->tpl['table_ranges'] = $construct->table($this->table_ip_ranges(), __FILE__);
Note: See TracChangeset
for help on using the changeset viewer.
