Location: PHPKode > projects > phpMyPrepaid > phpmyprepaid/www/include/ap/addAP_form.php
<?php
/* This file presents the add locations form.
 * C. Carl H Peterson 2005-2006
 * C. Port Networks LLC 2005-2006
 */  
				
if (isset($reg_error)) { 
	echo('There was an error: $reg_error, please try again.');
}
?>
		
<form action="phpmyprepaid.php "method="post">
<input type="hidden" name="buttonID" value="addAP">
<input type="hidden" name="formsubmit" value="true">
<table border="0">
<tr>
	<td colspan="3" align="left"> <big style="font-family: Aircut"><span style="font-weight: bold; text-decoration: italic;"><b>Add NAS to location <?php echo($_SESSION['LocName']); ?><br><br>Nas Information : </span></big></b></td>

<br></tr>
<tr>
	<td>
	<b>Short Name:</b></td><td> <input type="text" size="20" maxlength="40" name="dnsname">
	</td>
<tr>
	<td >
	<b>IP Address:</b></td><td> <input type="text" size="20" maxlength="16" name="ipaddress">
	</td>
	<td>
	
	</td>
</tr>
<tr>
 <td  align="left">
        <b>Nas type:    </b></td><td> 
<?
echo '<select name="nastype">';
$tab2=split(';',$nas_type_list);
foreach ($tab2 as $val)
	if (isset($tab['nastype']) and $tab['nastype']==$val)
		echo "<option  selected=\"selected\" value=\"$val\">$val";
	else
		echo "<option value=\"$val\">$val";
echo '</select></td></tr>';
echo '<tr>
	<td >
	<b>Port :  </b> </td><td><input size="5"  type="text" name="port">
	</td>

</tr>';
echo '<tr>
	<td >
	<b>Secret :  </b> </td><td><input type="text"  size="20" name="secret">
	</td>

</tr>'; 
echo '<tr>
	<td>
	<b>Description :  </b>  </td><td> <input type="text"  size="40"  name="description">
	</td>

</tr>'; 
echo '<tr>
	<td>
	<b>Mac address :  </b>  </td><td> <input type="text"  size="40"  name="macaddress">
	</td>

</tr>'; 
echo "<tr><td colspan=\"3\" ><br><big  style=\"font-family: Aircut\"><span style=\"font-weight: bold; text-decoration: italic;\">NAS information : </span></big></b></td></tr>";

echo '<tr>
	<td >
	<b>Latitude:</b></td><td> <input type="text" size="30" maxlength="100" name="latitude">
	</td>
	</tr>';
echo '<tr>
	<td >
	<b>Longitude :</b></td><td> <input type="text" size="30" maxlength="100" name="longitude">
	</td>
	</tr>';

if (isset($ap['disp_snmp']) and  $ap['disp_snmp']==1){

		                echo('
<tr>
	<td >
	<b>Comunity:</b></td><td> <input type="text" size="30" maxlength="100" name="comunity">
	</td>
	<td>
	eg. public
	</td>
</tr>
<tr>
        <td >
	<b>Version:</b></b></td><td>  <input type="text" size="30" maxlength="5" name="version">
	</td>
	<td>
	eg. 2c
	</td>
</tr>

<tr>
        <td >
	<b>Enter MIB:</b> </b></td><td> <input type="text" size="30" maxlength="100" name="mib">
	</td>
	<td>
	eg. enterprises.99.7.101	
	</td>
</tr>
<tr>
	<td>
	<b>or select MIB:</b></b></td><td> 
	<select name="mib2">
');
	foreach($ap_mib as $name=>$mib){
		echo("<option value=\"$mib\">$name</option>");
	} // EO foreach ap_mib
	print('</select></td></tr>');

}
				    
if(isset($ap['disp_userpass']) and $ap['disp_userpass']==1){ 
		echo('
<tr>
	<td >
	<b>User Name:</b> </b></td><td> <input type="text" size="30" maxlength="30" name="user">
	</td>
	<td>
	</td>
</tr>
<tr>
	<td>
	<b>Password:</b> </b></td><td> <input type="text" size="30" maxlength="30" name="pass">
	</td>
	<td>
	</td>
</tr>');
}

if ($oreon->user->get_status()=="3" or $oreon->user->get_status()=="2")
{
?>
<tr>
	<td colspan="2" align="left">
	</td>
	<td>
	<input type="submit" class="smallButton" name="submit" value="Add NAS">
	</td>
</tr>
			
</table>
</form>
<?
}
?>
Return current item: phpMyPrepaid