Subversion Repositories ALCASAR

Rev

Rev 841 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log

Rev Author Line No. Line
841 richard 1
<tr><td colspan=2 align="center">
2
<?
3
echo "$l_static_dhcp_title</td></tr>";
4
echo "<tr><td align='center' valign='middle'>";
5
echo "<FORM action='network.php' method='POST'>";
6
echo "<table cellspacing=2 cellpadding=3 border=1>";
7
echo "<tr><th>$l_mac_address<th>$l_ip_address<th>$l_mac_del</tr>";
8
// Read the "ether" file
9
$line_exist=False;
10
$tab=file(ETHERS_FILE);
11
if ($tab)  # le fichier n'est pas vide
12
	{
13
	$line_exist=True;
14
	foreach ($tab as $line)
15
		{
16
		$field=explode(" ", $line);
17
		$mac_addr=$field[0];
18
		$ip_addr=$field[1];
19
		echo "<tr><td>$mac_addr";
20
		echo "<td>$ip_addr";
21
		echo "<td><input type='checkbox' name='$mac_addr'>";
22
		echo "</tr>";
23
		}
24
	}
25
echo "</table>";
26
if ($line_exist)
27
	{
28
	echo "<input type='hidden' name='choix' value='del_mac'>";
861 richard 29
	echo "<input type='submit' value='$l_apply'>";
841 richard 30
	}	
31
echo "</form></td><td valign='middle' align='center'>";
32
echo "<FORM action='network.php' method='POST'>";
33
echo "<table cellspacing=2 cellpadding=3 border=1>";
34
echo "<tr><th>$l_mac_address<th>$l_ip_address";
35
?>
36
<td></td></tr>
37
<tr><td>exemple : 12-2f-36-a4-df-43</td><td>exemple : 192.168.182.10</td><td></td></tr>
38
<tr><td><input type='text' name='add_mac' size='17'></td>
39
<td><input type='text' name='add_ip' size='10'></td>
40
<input type='hidden' name='choix' value='new_mac'>
41
<td><input type='submit' value='<?echo"$l_add_to_list";?>'></td>
42
</tr></table>
43
</form>
44
</td></tr>
45
</table>