grthtrhthjhtyjytjytkergtrhtrjytjerhrfh4:24 29/09/2026. -------------------------------------------------------------------------- */ /** @file * @brief */ if (!defined('GLPI_ROOT')) { die("Sorry. You can't access this file directly"); } /// Class WifiNetwork /// since version 0.84 class WifiNetwork extends CommonDropdown { public $dohistory = true; static $rightname = 'internet'; public $can_be_translated = false; static function getTypeName($nb=0) { return _n('Wifi network', 'Wifi networks', $nb); } static function getWifiCardVersion() { return array('' => '', 'a' => 'a', 'a/b' => 'a/b', 'a/b/g' => 'a/b/g', 'a/b/g/n' => 'a/b/g/n', 'a/b/g/n/y' => 'a/b/g/n/y'); } static function getWifiCardModes() { return array('' => Dropdown::EMPTY_VALUE, 'ad-hoc' => __('Ad-hoc'), 'managed' => __('Managed'), 'master' => __('Master'), 'repeater' => __('Repeater'), 'secondary' => __('Secondary'), 'monitor' => __('Monitor'), 'auto' => __('Automatic')); } static function getWifiNetworkModes() { return array('' => Dropdown::EMPTY_VALUE, 'infrastructure' => __('Infrastructure (with access point)'), 'ad-hoc' => __('Ad-hoc (without access point)')); } function defineTabs($options=array()) { $ong = array(); $this->addDefaultFormTab($ong); $this->addStandardTab('NetworkPort',$ong, $options); return $ong; } function getAdditionalFields() { return array(array('name' => 'essid', 'label' => __('ESSID'), 'type' => 'text', 'list' => true), array('name' => 'mode', 'label' => __('Wifi network type'), 'type' => 'wifi_mode', 'list' => true)); } function displaySpecificTypeField($ID, $field=array()) { if ($field['type'] == 'wifi_mode') { Dropdown::showFromArray($field['name'], self::getWifiNetworkModes(), array('value' => $this->fields[$field['name']])); } } function getSearchOptions() { $tab = parent::getSearchOptions(); $tab[10]['table'] = $this->getTable(); $tab[10]['field'] = 'essid'; $tab[10]['name'] = __('ESSID'); $tab[10]['datatype'] = 'string'; return $tab; } }