Subversion Repositories ALCASAR

Rev

Rev 2265 | Rev 2276 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log

Rev 2265 Rev 2274
Line 11... Line 11...
11
<?
11
<?
12
/********************
12
/********************
13
* READ CONF FILES   *
13
* READ CONF FILES   *
14
*********************/
14
*********************/
15
define ("CONF_FILE", "/usr/local/etc/alcasar.conf");
15
define ("CONF_FILE", "/usr/local/etc/alcasar.conf");
16
define ("ETHERS_FILE", "/usr/local/etc/alcasar-ethers");
16
define ("ETHERS_INFO_FILE", "/usr/local/etc/alcasar-ethers-info");
17
$conf_files=array(CONF_FILE,ETHERS_FILE);
17
$conf_files=array(CONF_FILE,ETHERS_INFO_FILE);
18
foreach ($conf_files as $file){
18
foreach ($conf_files as $file){
19
if (!file_exists($file)){
19
if (!file_exists($file)){
20
	exit("Requested file ".$file." isn't present");}
20
	exit("Requested file ".$file." isn't present");}
21
if (!is_readable($file)){
21
if (!is_readable($file)){
22
	exit("Can't read the file ".$file);}
22
	exit("Can't read the file ".$file);}
Line 127... Line 127...
127
			}
127
			}
128
			else
128
			else
129
			{
129
			{
130
				echo "<td>$detail[0]";
130
				echo "<td>$detail[0]";
131
			}
131
			}
132
			exec ("grep $detail[0] /usr/local/etc/alcasar-ethers |cut -d' ' -f3", $mac_in_ether_file);
132
			exec ("grep $detail[0] /usr/local/etc/alcasar-ethers-info |cut -d' ' -f3", $mac_in_ether_file);
133
			if (!empty($mac_in_ether_file[0]))
133
			if (!empty($mac_in_ether_file[0]))
134
			{
134
			{
135
				echo " - <b>" . ltrim($mac_in_ether_file[0],'#') . "</b>";
135
				echo " - <b>" . ltrim($mac_in_ether_file[0],'#') . "</b>";
136
			}
136
			}
137
			echo "</td><td>";
137
			echo "</td><td>";