Location: PHPKode > projects > phpMyPrepaid > phpmyprepaid/www/include/configuration/ApConfiguration.php
<?php

if ($buttonID=="saveconfigap") {
 
  //GENERAL
   $opt->req_userpass=$_POST['req_userpass'];
   $opt->req_snmp=$_POST['req_snmp'];
   $opt->disp_userpass=$_POST['disp_userpass'];
   $opt->disp_snmp=$_POST['disp_snmp'];
   $opt->conf_maclist=$_POST['conf_maclist'];
   $opt->maclist_tmp_file   =$_POST['maclist_tmp_file'];
   $opt->maclist_location  =$_POST['maclist_location'];
   $opt->wget_cmd  =$_POST['wget_cmd'];
   $opt->wget_options  =$_POST['wget_options'];
   $opt->conf_maclist_age  =$_POST['conf_maclist_age'];
   $opt->location_id  =$_SESSION['locID'];
  
   $oreon->database->saveapconfiguration($opt);
  echo "Configuration have been saved";
}
if (isset($_POST['load_default']))
{
	        $lid=-1;
		        unset($_POST['load_default']);
}

else
	        $lid=$_SESSION['locID'];


$opt=$oreon->database->getapconfiguration($lid);

echo "
<form action=\"phpmyprepaid.php\" method=\"post\">
<br>
<hr>
<big><big  style=\"font-family: Aircut\"><span style=\"font-weight: bold;\"><b>NAS general configuration</span></b></big></big><br>
<hr><table>
<tr>
<td>Require user password : </td>";

if ($opt['req_userpass'])
     echo "<td><INPUT type=\"checkbox\" checked name=\"req_userpass\"  value=\"1\" alt=\"Require user passowrd\"></td>";
     else
     echo "<td><INPUT type=\"checkbox\" name=\"req_userpass\"   value=\"1\" alt=\"Require user password\"></td>";

echo "</tr><tr>
<td>Require snmp : </td>";

if ($opt['req_snmp'])
     echo "<td><INPUT type=\"checkbox\" checked name=\"req_snmp\"  value=\"1\" alt=\"Require snmp\"></td>";
     else
     echo "<td><INPUT type=\"checkbox\" name=\"req_snmp\"   value=\"1\" alt=\"Require snmp\"></td>";

echo "</tr><tr>
<td>Display user password : </td>";

if ($opt['disp_userpass'])
     echo "<td><INPUT type=\"checkbox\" checked name=\"disp_userpass\"  value=\"1\" alt=\"Display user password\"></td>";
     else
     echo "<td><INPUT type=\"checkbox\" name=\"disp_userpass\"   value=\"1\" alt=\"Display user password\"></td>";


echo "</tr><tr>
<td>Display snmp : </td>";

if ($opt['disp_snmp'])
     echo "<td><INPUT type=\"checkbox\" checked name=\"disp_snmp\"  value=\"1\" alt=\"Display snmp\"></td>";
     else
     echo "<td><INPUT type=\"checkbox\" name=\"disp_snmp\"   value=\"1\" alt=\"Display snmp\"></td>";

echo "</tr></table><hr><table><tr>
<tr>
<td>Configure mac list : </td>
<td><input name=\"conf_mac_list\" value=\"".$opt['conf_mac_list']."\"></td>
</tr><tr>
<td>Mac list tmp file : </td>
<td><input name=\"maclist_tmp_file\" value=\"".$opt['maclist_tmp_file']."\"></td>
</tr><tr>
<td>Mac list location : </td>
<td><input name=\"maclist_location\" value=\"".$opt['maclist_location']."\"></td>
</tr><tr>
<td>Mac list age : </td>
<td><input name=\"conf_maclist_age\" value=\"".$opt['conf_maclist_age']."\"></td>
</tr><tr>
<td>Wget command : </td>
<td><input name=\"wget_cmd\" value=\"".$opt['wget_cmd']."\"></td>
</tr><tr>
<td>Wget otpions : </td>
<td><input name=\"wget_options\" value=\"".$opt['wget_options']."\"></td>
<hr>

</tr>
</table>

<hr>
<table>
<tr>
<td>
<input type=\"hidden\" name=\"buttonID\" value=\"saveconfigap\">
<input type=\"submit\" name=\"submit\" class=\"smallButton\" class=\"button\" value=\"Save Configuration\" >
</form>
</td><td>
<form action=\"phpmyprepaid.php\" method=\"post\">
<input type=\"hidden\" name=\"buttonID\" value=\"ap_config\">
<input type=\"hidden\" name=\"load_default\" value=\"ap_config\">
<input name=\"submit\" type=\"submit\" class=\"smallButton\" value=\"Get default configuration\" >
</form>
</td></tr>
</table>

";
Return current item: phpMyPrepaid