Пример #1
0
 public function wifissid($mode = NULL)
 {
     $template_data = array();
     $list_ssid = array();
     $body_page = NULL;
     $this->load->helper(array('form', 'url', 'zimapi'));
     $this->load->library(array('form_validation', 'parser'));
     $this->lang->load('connection/master', $this->config->item('language'));
     $this->lang->load('connection/wifissid', $this->config->item('language'));
     if ($this->form_validation->run() == FALSE) {
         foreach (ZimAPI_listSSIDAsArray() as $ssid) {
             $list_ssid[] = array('name' => htmlspecialchars($ssid), 'link' => htmlspecialchars(rawurlencode($ssid)));
         }
         // parse the main body
         $template_data = array('title' => t('WiFi network connected to the Internet'), 'back' => t('Back'), 'list_ssid' => $list_ssid, 'wizard' => 'mode=' . ($mode == 'wizard' ? 'wizard' : 'normal'), 'no_visable' => htmlspecialchars(t("Not visible...")));
         $body_page = $this->parser->parse('connection/wifissid', $template_data, TRUE);
         // parse all page
         $this->_generate_framePage($body_page);
     } else {
         // 			header("Location:/connection/wifipswd");
         $this->output->set_header('Location: /connection/wifipswd');
     }
     return;
 }
Пример #2
0
function ZimAPI_listSSID()
{
    return json_encode(ZimAPI_listSSIDAsArray());
}