2020-09-23 22:12:24 +00:00
< ? php
$arrHostapdConf = parse_ini_file ( RASPI_CONFIG . '/hostapd.ini' );
if ( $arrHostapdConf [ 'WifiAPEnable' ] == 1 ) {
$client_interface = 'uap0' ;
} else {
$client_interface = $_SESSION [ 'wifi_client_interface' ];
}
exec ( 'ip a show ' . $client_interface , $stdoutIp );
$stdoutIpAllLinesGlued = implode ( " " , $stdoutIp );
$stdoutIpWRepeatedSpaces = preg_replace ( '/\s\s+/' , ' ' , $stdoutIpAllLinesGlued );
preg_match ( '/state (UP|DOWN)/i' , $stdoutIpWRepeatedSpaces , $matchesState ) || $matchesState [ 1 ] = 'unknown' ;
$ifaceStatus = strtolower ( $matchesState [ 1 ]) ? " up " : " down " ;
?>
2019-08-18 22:48:37 +00:00
< div class = " row " >
< div class = " col-lg-12 " >
2019-10-12 22:04:27 +00:00
< div class = " card " >
2019-11-01 09:08:49 +00:00
< div class = " card-header " >
< div class = " row " >
< div class = " col " >
2020-02-29 17:07:24 +00:00
< i class = " fas fa-wifi mr-2 " ></ i >< ? php echo _ ( " WiFi client " ); ?>
2019-11-01 09:08:49 +00:00
</ div >
2020-09-23 22:12:24 +00:00
< div class = " col " >
< button class = " btn btn-light btn-icon-split btn-sm service-status float-right " >
< span class = " icon " >< i class = " fas fa-circle service-status-<?php echo $ifaceStatus ?> " ></ i ></ span >
< span class = " text service-status " >< ? php echo strtolower ( $client_interface ) . ' ' . _ ( $ifaceStatus ) ?> </span>
</ button >
</ div >
2019-11-01 09:08:49 +00:00
</ div ><!-- /. row -->
</ div ><!-- /. card - header -->
2019-10-12 22:04:27 +00:00
< div class = " card-body " >
2019-08-19 00:08:46 +00:00
< ? php $status -> showMessages (); ?>
2019-10-15 12:45:35 +00:00
< div class = " row " >
< div class = " col " >
< h4 class = " mb-2 " >< ? php echo _ ( " Client settings " ); ?> </h4>
</ div >
2019-10-15 20:07:44 +00:00
< div class = " col-xs mr-3 mb-3 " >
2019-10-15 12:45:35 +00:00
< button type = " button " class = " btn btn-info btn-block float-right js-reload-wifi-stations " >< ? php echo _ ( " Rescan " ); ?> </button>
</ div >
2019-08-18 22:48:37 +00:00
</ div >
< form method = " POST " action = " ?page=wpa_conf " name = " wpa_conf_form " class = " row " >
2019-09-07 15:42:31 +00:00
< ? php echo CSRFTokenFieldTag () ?>
2019-08-18 22:48:37 +00:00
< input type = " hidden " name = " client_settings " ?>
2020-09-23 18:45:21 +00:00
< div class = " row js-wifi-stations w-100 loading-spinner " ></ div >
2019-08-18 22:48:37 +00:00
</ form >
2019-10-12 22:04:27 +00:00
</ div ><!-- ./ card - body -->
< div class = " card-footer " >< ? php echo _ ( " <strong>Note:</strong> WEP access points appear as 'Open'. RaspAP does not currently support connecting to WEP " ); ?> </div>
</ div ><!-- /. card -->
2019-08-18 22:48:37 +00:00
</ div ><!-- /. col - lg - 12 -->
</ div ><!-- /. row -->