Revize 1033
Přidáno uživatelem Michal Kliment před více než 13 roky(ů)
freenetis/branches/testing/application/models/iface.php | ||
---|---|---|
public function get_all_ifaces_of_device ($device_id)
|
||
{
|
||
return $this->db->query("
|
||
SELECT i.id, i.id AS iface_id, i.segment_id, sg.name AS segment_name, i.mac, i.name, i.comment, ip.subnet_id, sb.name as subnet_name, ip.id AS ip_address_id, ip.ip_address, 32-log2((~inet_aton(sb.netmask) & 0xffffffff) + 1) AS subnet_range
|
||
SELECT i.id, i.id AS iface_id, i.segment_id, sg.name AS segment_name, i.mac, i.name, i.comment, ip.subnet_id, sb.name as subnet_name, ip.id AS ip_address_id, ip.ip_address, 32-log2((~INET_ATON(sb.netmask) & 0xffffffff) + 1) AS subnet_range
|
||
FROM ifaces i
|
||
LEFT JOIN ip_addresses ip ON ip.iface_id = i.id
|
||
LEFT JOIN segments sg ON i.segment_id = sg.id
|
||
LEFT JOIN subnets sb ON ip.subnet_id = sb.id
|
||
WHERE i.device_id = ?
|
||
ORDER BY inet_aton (ip.ip_address)
|
||
ORDER BY INET_ATON(ip.ip_address)
|
||
", array($device_id));
|
||
}
|
||
|
freenetis/branches/testing/application/models/vlan_iface.php | ||
---|---|---|
i.name AS iface_name,
|
||
ip.id AS ip_address_id,
|
||
ip.ip_address,
|
||
32-log2((~inet_aton(s.netmask) & 0xffffffff) + 1) AS subnet_range
|
||
32-log2((~INET_ATON(s.netmask) & 0xffffffff) + 1) AS subnet_range
|
||
FROM vlan_ifaces vi
|
||
LEFT JOIN vlans v ON vi.vlan_id = v.id
|
||
LEFT JOIN ifaces i ON vi.iface_id = i.id
|
||
LEFT JOIN ip_addresses ip ON vi.id = ip.vlan_iface_id
|
||
LEFT JOIN subnets s ON ip.subnet_id = s.id
|
||
WHERE i.device_id = ?
|
||
ORDER BY inet_aton (ip.ip_address)
|
||
ORDER BY INET_ATON(ip.ip_address)
|
||
", array ($device_id));
|
||
}
|
||
}
|
freenetis/branches/testing/application/controllers/members.php | ||
---|---|---|
$filter_form->add('id')->type('number');
|
||
$filter_form->add('name')->callback('json/member_name');
|
||
|
||
$filter_form->add('type')->type('combo')->values($enum_type_model->get_values(Enum_type_Model::$member_type_id))->
|
||
default($filter_form::OPER_IS_NOT, $enum_type_model->get_value(Member_Model::TYPE_FORMER))->
|
||
default($filter_form::OPER_IS_NOT, $enum_type_model->get_value(Member_Model::TYPE_NON))->
|
||
default($filter_form::OPER_IS_NOT, $enum_type_model->get_value(Member_Model::TYPE_HONORARY))->
|
||
default($filter_form::OPER_IS_NOT, $enum_type_model->get_value(Member_Model::TYPE_SYMPATHIZING))->
|
||
default($filter_form::OPER_IS_NOT, $enum_type_model->get_value(Member_Model::TYPE_APPLICANT));
|
||
$filter_form->add('type')->type('combo')->values($enum_type_model->get_values(Enum_type_Model::$member_type_id))
|
||
->default(Filter_form::OPER_IS_NOT, $enum_type_model->get_value(Member_Model::TYPE_FORMER))
|
||
->default(Filter_form::OPER_IS_NOT, $enum_type_model->get_value(Member_Model::TYPE_NON))
|
||
->default(Filter_form::OPER_IS_NOT, $enum_type_model->get_value(Member_Model::TYPE_HONORARY))
|
||
->default(Filter_form::OPER_IS_NOT, $enum_type_model->get_value(Member_Model::TYPE_SYMPATHIZING))
|
||
->default(Filter_form::OPER_IS_NOT, $enum_type_model->get_value(Member_Model::TYPE_APPLICANT));
|
||
|
||
$filter_form->add('membership_interrupt')->type('combo')->values(array(url_lang::lang('texts.Yes'), url_lang::lang('texts.No')));
|
||
$filter_form->add('balance')->table('a')->type('number');
|
||
... | ... | |
}
|
||
|
||
}
|
||
?>
|
||
?>
|
Také k dispozici: Unified diff
Dalsi optimalizace pro Debian Lenny - odstraneny chyby zpusobene starsi verzi PHP (u zobrazeni zarizeni uzivatele, atd.)...