Revize 1226
Přidáno uživatelem Michal Kliment před asi 13 roky(ů)
freenetis/branches/testing/application/models/search.php | ||
---|---|---|
'model' => 'device'
|
||
),
|
||
array(
|
||
'method' => 'device_ssid',
|
||
'model' => 'device'
|
||
),
|
||
array(
|
||
'method' => 'subnet_name',
|
||
'model' => 'subnet'
|
||
),
|
||
... | ... | |
", array
|
||
(
|
||
__('Username') . ": ",
|
||
__('User') . " '",
|
||
__('User') . " ",
|
||
"%$keyword%"
|
||
));
|
||
}
|
||
... | ... | |
", array
|
||
(
|
||
__('Username') . ": ",
|
||
__('User') . " '",
|
||
__('User') . " ",
|
||
"%$keyword%"
|
||
));
|
||
}
|
||
... | ... | |
", array
|
||
(
|
||
__('ZIP code') . ": ",
|
||
__('Town') . " '",
|
||
__('Town') . " ",
|
||
"%$keyword%"
|
||
));
|
||
}
|
||
... | ... | |
", array
|
||
(
|
||
__('User') . ": ",
|
||
__('Device') . " '",
|
||
__('Device') . " ",
|
||
"%$keyword%"
|
||
));
|
||
}
|
||
... | ... | |
", array
|
||
(
|
||
__('MAC address') . ": ",
|
||
__('Device') . " '",
|
||
__('Device') . " ",
|
||
"%$keyword%"
|
||
));
|
||
}
|
||
... | ... | |
", array
|
||
(
|
||
__('IP address') . ": ",
|
||
__('Device') . " '",
|
||
__('Device') . " ",
|
||
"%$keyword%", "%$keyword%"
|
||
));
|
||
}
|
||
|
||
/**
|
||
* Searchs in devices by SSID
|
||
*
|
||
* @author Michal Kliment
|
||
* @param string $keyword
|
||
* @return MySQL Result object
|
||
*/
|
||
public function device_ssid($keyword)
|
||
{
|
||
return $this->db->query("
|
||
SELECT d.id, ws.ssid AS value,
|
||
CONCAT(?, ws.ssid) AS `desc`,
|
||
CONCAT(?, d.name) AS return_value,
|
||
'devices/show/' AS link
|
||
FROM devices d
|
||
JOIN ifaces i ON i.device_id = d.id
|
||
JOIN wireless_ifaces wi ON wi.iface_id = i.id
|
||
JOIN segments s ON i.segment_id = s.id
|
||
JOIN wireless_segments ws ON ws.segment_id = s.id
|
||
WHERE wi.wmode = ? AND s.medium_id = ? AND
|
||
ws.ssid LIKE ? COLLATE utf8_general_ci
|
||
", array
|
||
(
|
||
__('SSID') . ": ",
|
||
__('Device') . " ",
|
||
Wireless_iface_Model::MODE_AP,
|
||
Segment_Model::AIR,
|
||
"%$keyword%"
|
||
));
|
||
}
|
||
|
||
/**
|
||
* Searchs in subnets by name
|
||
... | ... | |
", array
|
||
(
|
||
__('Address') . ": ",
|
||
__('Subnet') . " '",
|
||
__('Subnet') . " ",
|
||
"%$keyword%"
|
||
));
|
||
}
|
||
... | ... | |
", array
|
||
(
|
||
__('Address') . ": ",
|
||
__('Subnet') . " '",
|
||
__('Subnet') . " ",
|
||
"%$keyword%"
|
||
));
|
||
}
|
Také k dispozici: Unified diff
Pridani podpory fulltextoveho vyhledavani podle SSID.