Commit 36d25ba9 authored by José Luis  Gutiérrez's avatar José Luis Gutiérrez Committed by Alessandro Rubini

www: minor changes

Minor changes:
	- deleting unused file administration.php
	- adding mount RW and RO in case it is neccesary to load,
network and ptp
parent 8c9b02d9
<?php include 'functions.php'; include 'head.php'; ?>
<body id="admin">
<div class="main">
<div class="page">
<div class="header" >
<!--<h1>White-Rabbit Switch Tool</h1>-->
<div class="header-ports" ><?php wrs_header_ports(); ?></div>
<div class="topmenu">
<?php include 'topmenu.php' ?>
</div>
</div>
<div class="content">
<div class="leftpanel">
<h2>Main Menu</h2>
<?php include 'menu.php' ?>
</div>
<div class="rightpanel">
<div class="rightbody">
<h1 class="title">Switch Administration <a href='help.php?help_id=dashboard' onClick='showPopup(this.href);return(false);'><img align=right src="./img/question.png"></a></h1>
<?php session_is_started() ?>
<FORM align="center" method="post">
<b>Download configuration files to PC: </b><INPUT type="submit" value="Download" class="btn">
<input type="hidden" name="download" value="hal">
</FORM>
<br>
<FORM align="center" action="endpointmode.php" method="post">
<b>Upload configuration files to PC: </b><INPUT type="submit" value="Upload" class="btn">
<input type="hidden" name="upload" value="hal">
</FORM>
<?php
if (!empty($_POST["download"])){
$filename = "configuration.tar";
$filepath = "/tmp/";
// http headers for zip downloads
header("Pragma: public");
header("Expires: 0");
header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
header("Cache-Control: public");
header("Content-Description: File Transfer");
header("Content-type: application/octet-stream");
header("Content-Disposition: attachment; filename=\"".$filename."\"");
header("Content-Transfer-Encoding: binary");
header("Content-Length: ".filesize($filepath.$filename));
ob_end_flush();
@readfile($filepath.$filename);
}
if (!empty($_POST["upload"])){
}
?>
</div>
</div>
</div>
<div class="footer">
<?php include 'footer.php' ?>
</div>
</div>
</div>
</body>
</html>
...@@ -54,9 +54,6 @@ ...@@ -54,9 +54,6 @@
wrs_load_files(); wrs_load_files();
wrs_change_wrfs("ro"); wrs_change_wrfs("ro");
//echo '<center>';
//wrs_check_writeable();
//echo '</center>';
?> ?>
......
...@@ -29,7 +29,6 @@ echo '<div class="login"> ...@@ -29,7 +29,6 @@ echo '<div class="login">
echo '<li><a href="vlan.php"> VLAN Setup </a></li>'; echo '<li><a href="vlan.php"> VLAN Setup </a></li>';
echo '<li><a href="management.php"> Switch Management </a></li>'; echo '<li><a href="management.php"> Switch Management </a></li>';
echo '<li><a href="advance.php"> Advanced Mode </a></li>'; echo '<li><a href="advance.php"> Advanced Mode </a></li>';
//echo '<li><a href="administration.php"> Switch Administration </a></li>';
if(!empty($_SESSION['advance'])){ if(!empty($_SESSION['advance'])){
echo '<ul class="advance">'; echo '<ul class="advance">';
echo '<li><a href="sfpcalibration.php">SFP Calibration</a></li>'; echo '<li><a href="sfpcalibration.php">SFP Calibration</a></li>';
...@@ -42,7 +41,7 @@ echo '<div class="login"> ...@@ -42,7 +41,7 @@ echo '<div class="login">
} }
echo '</ul><br><hr>'; echo '</ul><br><hr>';
echo '<b>User: <font color="blue">'.$_SESSION["myusername"].' </font></b>'; echo '<b>User: <font color="blue"><a href="change_passwd.php">'.$_SESSION["myusername"].'</a> </font></b>';
echo '<a href="./logout.php">(logout)</a>'; echo '<a href="./logout.php">(logout)</a>';
} }
?> ?>
......
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
</div> </div>
<div class="rightpanel"> <div class="rightpanel">
<div class="rightbody"> <div class="rightbody">
<h1 class="title">Network Interface Setup <a href='help.php?help_id=ptp' onClick='showPopup(this.href);return(false);'><img align=right src="./img/question.png"></a></h1> <h1 class="title">Network Interface Setup <a href='help.php?help_id=network' onClick='showPopup(this.href);return(false);'><img align=right src="./img/question.png"></a></h1>
<?php session_is_started() ?> <?php session_is_started() ?>
<?php $_SESSION['advance']=""; ?> <?php $_SESSION['advance']=""; ?>
...@@ -35,6 +35,7 @@ ...@@ -35,6 +35,7 @@
<?php <?php
wrs_change_wrfs("rw");
if((empty($_POST["networkgroup"]))){ if((empty($_POST["networkgroup"]))){
...@@ -139,6 +140,7 @@ ...@@ -139,6 +140,7 @@
} }
wrs_change_wrfs("ro");
?> ?>
......
...@@ -88,15 +88,12 @@ ...@@ -88,15 +88,12 @@
<hr> <hr>
<p align="right">Click <A HREF="endpointmode.php">here</A> to modify endpoint mode configuration</p> <p align="right">Click <A HREF="endpointmode.php">here</A> to modify endpoint mode configuration</p>
<?php <?php
// Generating the form wrs_change_wrfs("rw");
?>
<?php
wrs_ptp_configuration(); wrs_ptp_configuration();
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