Commit 17eb0770 authored by José Luis  Gutiérrez's avatar José Luis Gutiérrez Committed by Alessandro Rubini

www: Switch Management Update

Switch Management Update:
	- NTP Server Added + UTC
	- Possibility of loading .config files (ppsi, sfp, snmp, hal)
	- Restore all config files from backup.
	- Backup all config files.

Added folder downloads/, used for backup downloads.
parent 6ddc9360
download folder for system backups
......@@ -21,6 +21,10 @@
<?php session_is_started() ?>
<?php $_SESSION['advance']=""; ?>
<table border="0" align="center">
</table>
<table border="0" align="center">
<tr>
<form method="post">
......@@ -28,56 +32,109 @@
<th><input type="submit" value="Change Mode" class="btn"></th>
</form>
</tr>
<!--<tr>
<form method="post">
<th><center>Halt system: </center><input type="hidden" name="cmd" value="halt"></th>
<th><input type="submit" value="Halt switch" class="btn"></th>
</form>
</tr> -->
<tr>
<form method="post">
<th><center>Reboot system: </center><input type="hidden" name="cmd" value="reboot"></th>
<th><input type="submit" value="Reboot switch" class="btn"></th>
</form>
</tr>
</tr><th> </th><th> </th><tr></tr><th> </th><th> </th><tr>
</tr><th> </th><th> </th><tr></tr><th> </th><th> </th><tr>
<hr>
<tr>
<form method="post">
<th>NTP Server: <INPUT type="text" name="ntpip" value="<?php $str = check_ntp_server(); echo $str; ?>"> </th>
<input type="hidden" name="cmd" value="ntp">
<th><select name="utc" >
<?php
$selected_utc=$_SESSION['utc'];
$selected_utc=str_replace("UTC","",$selected_utc);
for($op = -12; $op < 0; $op++){
if($selected_utc==$op){
echo '<option selected="UTC'.$op.'" class="btn" value="UTC'.($op).'"><center>UTC'.($op).'</center></option>';
}else{
echo '<option class="btn" value="UTC'.($op).'"><center>UTC'.($op).'</center></option>';
}
}
if(!strcmp($selected_utc,"")){
echo '<option selected="UTC" class="btn" value="UTC"><center>UTC</center></option>';
}else{
echo '<option class="btn" value="UTC"><center>UTC</center></option>';
}
for($op = 1; $op < 15; $op++){
if($selected_utc==$op){
echo '<option elected="UTC'.$op.'" class="btn" value="UTC+'.($op).'"><center>UTC+'.($op).'</center></option>';
}else{
echo '<option class="btn" value="UTC+'.($op).'"><center>UTC+'.($op).'</center></option>';
}
}
?>
</th>
<th><input type="submit" value="Add NTP Server" class="btn"></th>
</form>
</tr>
</table>
<hr>
<br><br>
<center><p><strong>Load configuration files</strong></p></center>
<table border="1" align="center" class='altrowstable' id='alternatecolor'>
<tr>
<FORM method="POST" ENCTYPE="multipart/form-data">
<th ><INPUT type=file name="file" ></th>
<th><INPUT type=submit value="Load firmware" class="btn" ><INPUT type=hidden name=MAX_FILE_SIZE VALUE= <?php wrs_php_filesize();?>000></th>
</FORM>
<th>PPSi Config </th>
<th ><INPUT type=file name="ppsi_conf" ></th>
<th><INPUT type=submit value="Load" class="btn" ><INPUT type=hidden name=MAX_FILE_SIZE VALUE= <?php wrs_php_filesize();?>000></th>
</form>
</tr>
</tr><th> </th><th> </th><tr></tr><th> </th><th> </th><tr>
<!--<tr>
</form>
<form method="post">
<th><center>Mount partition as writable: </center><input type="hidden" name="cmd" value="rw"></th>
<th><input type="submit" value="Remount" class="btn"></th>
</form>
<tr>
<FORM method="POST" ENCTYPE="multipart/form-data">
<th>SFP Config </th>
<th ><INPUT type=file name="sfp_conf" ></th>
<th><INPUT type=submit value="Load" class="btn" ><INPUT type=hidden name=MAX_FILE_SIZE VALUE= <?php wrs_php_filesize();?>000></th>
</form>
</tr>
<tr>
</form>
<form method="post">
<th><center>Mount partition as read-only: </center><input type="hidden" name="cmd" value="ro"></th>
<th><input type="submit" value="Remount" class="btn"></th>
</form>
</tr>-->
</tr><th> </th><th> </th><tr></tr><th> </th><th> </th><tr>
<FORM method="POST" ENCTYPE="multipart/form-data">
<th>SNMP Config</th>
<th ><INPUT type=file name="snmp_conf" ></th>
<th><INPUT type=submit value="Load" class="btn" ><INPUT type=hidden name=MAX_FILE_SIZE VALUE= <?php wrs_php_filesize();?>000></th>
</form>
</tr>
<tr>
<form method="post">
<th>Change PHP File Size Upload: <INPUT type="text" name="size" > </th>
<input type="hidden" name="cmd" value="size">
<th><input type="submit" value="Change" class="btn"></th>
</form>
<FORM method="POST" ENCTYPE="multipart/form-data">
<th>HAL Config </th>
<th ><INPUT type=file name="hal_conf" ></th>
<th><INPUT type=submit value="Load" class="btn" ><INPUT type=hidden name=MAX_FILE_SIZE VALUE= <?php wrs_php_filesize();?>000></th>
</form>
</tr>
<tr>
<th></th>
<th></th>
<th></th>
</tr>
<tr>
<FORM method="POST" ENCTYPE="multipart/form-data">
<th>Restore from backup</th>
<th ><INPUT type=file name="restore_conf" ></th>
<th><INPUT type=submit value="Load" class="btn" ><INPUT type=hidden name=MAX_FILE_SIZE VALUE= <?php wrs_php_filesize();?>000></th>
</form>
</tr>
</table>
<br><br><br><br>
<FORM align="right" method="POST" ENCTYPE="multipart/form-data">
<th>Backup Configuration files to your computer </th>
<input type="hidden" name="cmd" value="Backup">
<th><INPUT type=submit value="Backup" class="btn" ></th>
</form>
<?php
wrs_change_wrfs("rw");
wrs_management();
//wrs_check_writeable();
wrs_change_wrfs("ro");
?>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment