Subversion Repositories ALCASAR

Rev

Rev 1484 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log

Rev 1484 Rev 2185
Line 1... Line 1...
1
<?php
1
<?php
-
 
2
# $Id: autoregistration.php 2185 2017-04-26 17:29:44Z tom.houdayer $
-
 
3
 
2
# Test présence de clé/modem
4
# Test présence de clé/modem
3
$exec_com=exec("lsusb | grep -i 067b | cut -d ' ' -f6 | cut -d ' ' -f1");
5
$exec_com=exec("lsusb | grep -i 067b | cut -d ' ' -f6 | cut -d ' ' -f1");
4
$exec_com2=exec("lsusb | grep -i 12d1 | cut -d ' ' -f6 | cut -d ' ' -f1");
6
$exec_com2=exec("lsusb | grep -i 12d1 | cut -d ' ' -f6 | cut -d ' ' -f1");
5
 
7
 
6
//$exec_com2=exec("lsusb | grep -i d-link | cut -d ' ' -f7");
8
//$exec_com2=exec("lsusb | grep -i d-link | cut -d ' ' -f7");
Line 728... Line 730...
728
		</form>";
730
		</form>";
729
 
731
 
730
	
732
	
731
	require('/etc/freeradius-web/config.php');
733
	require('/etc/freeradius-web/config.php');
732
 
734
 
733
	if (is_file("../../../pass/sql/drivers/$config[sql_type]/functions.php"))
735
	if (is_file("../lib/sql/drivers/$config[sql_type]/functions.php"))
734
		include_once("../../../pass/sql/drivers/$config[sql_type]/functions.php");
736
		include_once("../lib/sql/drivers/$config[sql_type]/functions.php");
735
	else{
737
	else{
736
		echo "<b>Could not include SQL library</b>\n";
738
		echo "<b>Could not include SQL library</b>\n";
737
		exit();
739
		exit();
738
	}	
740
	}
739
 
741
 
740
	$con = mysqli_connect("$config[sql_server]","$config[sql_username]","$config[sql_password]","gammu");
742
	$con = mysqli_connect("$config[sql_server]","$config[sql_username]","$config[sql_password]","gammu");
741
 
743
 
742
	if(mysqli_connect_errno())
744
	if(mysqli_connect_errno())
743
	{
745
	{