Commit 282cb4b8 authored by José Luis  Gutiérrez's avatar José Luis Gutiérrez Committed by Alessandro Rubini

www: fix newline format to Unix

File newlines were a mixture of Windows/Unix.
All php files are now in Unix-like format
Signed-off-by: Alessandro Rubini's avatarAlessandro Rubini <rubini@gnudd.com>
parent e78838e8
<?php include 'functions.php'; include 'head.php'; ?>
<body id="advance">
<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 Management <a href='help.php?help_id=management' onClick='showPopup(this.href);return(false);'><img align=right src="./img/question.png"></a></h1>
<?php session_is_started() ?>
<?php
$_SESSION['advance']="yes";
header('Location: index.php');
?>
</div>
</div>
</div>
<div class="footer">
<?php include 'footer.php' ?>
</div>
</div>
</div>
</body>
</html>
<?php include 'functions.php'; include 'head.php'; ?>
<body id="advance">
<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 Management <a href='help.php?help_id=management' onClick='showPopup(this.href);return(false);'><img align=right src="./img/question.png"></a></h1>
<?php session_is_started() ?>
<?php
$_SESSION['advance']="yes";
header('Location: index.php');
?>
</div>
</div>
</div>
<div class="footer">
<?php include 'footer.php' ?>
</div>
</div>
</div>
</body>
</html>
<?php include 'functions.php'; include 'head.php'; ?>
<body id="ptp">
<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">User Administration <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['advance']=""; ?>
<table border="0" align="left">
<form method="post">
<tr><th>Username: </th><th><INPUT type="text" name="user" value="admin" readonly></th></tr>
<tr><th>Old Password: </th><th><INPUT type="password" name="oldpasswd" > </th></tr>
<tr><th>New Password: </th><th> <INPUT type="password" name="newpasswd" > </th></tr>
<tr><th>Confirm Password: </th><th><INPUT type="password" name="confirmpasswd" > </th></tr>
<tr><th></th><th align="center"><input type="submit" value="Change Password" class="btn"></th></tr>
</form>
</table>
<?php
//Change user password
$success=false;
if( empty($_POST['user'])){
echo '<br><br><br><p align=center>Please fill fields.<br></p>';
}else{
$saved_hash = shell_exec("cat ".$GLOBALS['phpusersfile']." | grep ".$_POST["user"]." | awk '{print $2}'");
$saved_hash = str_replace("\n","",$saved_hash);
$username = $_POST["user"];
$oldpassword = $_POST["oldpasswd"];
$newpasswd = $_POST["newpasswd"];
$confirmpasswd = $_POST["confirmpasswd"];
//First confirm old password
$salt="wrs4.0salt";
$pass = $oldpassword;
$hash = md5($pass); // md5 hash #1
$hash_md5 = md5($salt.$pass); // md5 hash with salt #2
$hash_md5_double = md5(sha1($salt.$pass)); // md5 hash with salt & sha1 #3
if (!strcmp($hash_md5_double, $saved_hash) && !strcmp($newpasswd, $confirmpasswd) && !strcmp($_POST["user"],$_SESSION['myusername'])){ //old password is correct && new and confirm are the same
//set the new one
$pass = $confirmpasswd;
$hash = md5($pass); // md5 hash #1
$hash_md5 = md5($salt.$pass); // md5 hash with salt #2
$hash_md5_double = md5(sha1($salt.$pass)); // md5 hash with salt & sha1 #3
//Save in file
//We save the changes in a temporarely file in /tmp
$old_value=$username." ".$saved_hash;
$new_value=$username." ".$hash_md5_double;
$output = shell_exec('cat '.$GLOBALS['phpusersfile'].' | sed -i "s/'.$old_value.'/'.$new_value.'/g" '.$GLOBALS['phpusersfile']); //replace password for the user
//$file = fopen("/etc/phpusers","w+");
//fwrite($file,$output);
//fclose($file);
$success=true;
echo '<br><br><br><p align=center>Password changed.<br></p>';
}else{
$success=false;
echo '<br><br><br><p align=center>Error changing password.<br></p>';
}
}
if($success) header('Location: logout.php');
?>
</div>
</div>
</div>
<div class="footer">
<?php include 'footer.php' ?>
</div>
</div>
</div>
</body>
</html>
<?php include 'functions.php'; include 'head.php'; ?>
<body id="ptp">
<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">User Administration <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['advance']=""; ?>
<table border="0" align="left">
<form method="post">
<tr><th>Username: </th><th><INPUT type="text" name="user" value="admin" readonly></th></tr>
<tr><th>Old Password: </th><th><INPUT type="password" name="oldpasswd" > </th></tr>
<tr><th>New Password: </th><th> <INPUT type="password" name="newpasswd" > </th></tr>
<tr><th>Confirm Password: </th><th><INPUT type="password" name="confirmpasswd" > </th></tr>
<tr><th></th><th align="center"><input type="submit" value="Change Password" class="btn"></th></tr>
</form>
</table>
<?php
//Change user password
$success=false;
if( empty($_POST['user'])){
echo '<br><br><br><p align=center>Please fill fields.<br></p>';
}else{
$saved_hash = shell_exec("cat ".$GLOBALS['phpusersfile']." | grep ".$_POST["user"]." | awk '{print $2}'");
$saved_hash = str_replace("\n","",$saved_hash);
$username = $_POST["user"];
$oldpassword = $_POST["oldpasswd"];
$newpasswd = $_POST["newpasswd"];
$confirmpasswd = $_POST["confirmpasswd"];
//First confirm old password
$salt="wrs4.0salt";
$pass = $oldpassword;
$hash = md5($pass); // md5 hash #1
$hash_md5 = md5($salt.$pass); // md5 hash with salt #2
$hash_md5_double = md5(sha1($salt.$pass)); // md5 hash with salt & sha1 #3
if (!strcmp($hash_md5_double, $saved_hash) && !strcmp($newpasswd, $confirmpasswd) && !strcmp($_POST["user"],$_SESSION['myusername'])){ //old password is correct && new and confirm are the same
//set the new one
$pass = $confirmpasswd;
$hash = md5($pass); // md5 hash #1
$hash_md5 = md5($salt.$pass); // md5 hash with salt #2
$hash_md5_double = md5(sha1($salt.$pass)); // md5 hash with salt & sha1 #3
//Save in file
//We save the changes in a temporarely file in /tmp
$old_value=$username." ".$saved_hash;
$new_value=$username." ".$hash_md5_double;
$output = shell_exec('cat '.$GLOBALS['phpusersfile'].' | sed -i "s/'.$old_value.'/'.$new_value.'/g" '.$GLOBALS['phpusersfile']); //replace password for the user
//$file = fopen("/etc/phpusers","w+");
//fwrite($file,$output);
//fclose($file);
$success=true;
echo '<br><br><br><p align=center>Password changed.<br></p>';
}else{
$success=false;
echo '<br><br><br><p align=center>Error changing password.<br></p>';
}
}
if($success) header('Location: logout.php');
?>
</div>
</div>
</div>
<div class="footer">
<?php include 'footer.php' ?>
</div>
</div>
</div>
</body>
</html>
<?php include 'functions.php'; include 'head.php'; ?>
<body id="contact">
<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">About</h1>
<?php $_SESSION['advance']=""; ?>
<?php include 'functions.php'; include 'head.php'; ?>
<body id="contact">
<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">About</h1>
<?php $_SESSION['advance']=""; ?>
<div>
<?php
......@@ -36,8 +36,8 @@
?>
</div>
<br>
<br>
<div>
<center><p align=right><strong>Open Hardware Repository <a href="http://www.ohwr.org/projects/white-rabbit/wiki">http://www.ohwr.org/projects/white-rabbit/wiki</a> </strong></p></strong></p><p>&nbsp;</p>
<p align=right><strong>White-Rabbit Mailing List <a href="mailto:white-rabbit-dev@ohwr.org?subject=[White-Rabbit Switch Local Management Tool]">(white-rabbit-dev@ohwr.org)</a> </strong></p></center>
......@@ -52,18 +52,18 @@
<IMG SRC="img/ugr.gif" WIDTH=140 ALT="University of Granada">
</center>
</div>
<div>
<p align=right><strong>Developers: </strong>Alessandro Rubini, Tomasz Wlostowski, Benoit Rat, Federico Vega, Grzegorz Daniluk, Maciej Lipinski, Jose Luis Gutierrez</p>
</div>
</div>
</div>
</div>
<div class="footer">
<?php include 'footer.php' ?>
</div>
</div>
</div>
</body>
</html>
</div>
</div>
</div>
<div class="footer">
<?php include 'footer.php' ?>
</div>
</div>
</div>
</body>
</html>
<?php include 'functions.php'; include 'head.php'; ?>
<body id="management">
<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">VLAN Management <a href='help.php?help_id=firmware' onClick='showPopup(this.href);return(false);'><img align=right src="./img/question.png"></a></h1>
<?php session_is_started() ?>
<?php $_SESSION['advance']=""; ?>
<?php
if(!strcmp($_GET['vlan'],"all")){ // Delete all vlans and free ports
shell_exec("/wr/bin/wrs_vlans --clear");
}else{
shell_exec("/wr/bin/wrs_vlans --rvid ".$_GET['vlan']." --del");
}
header('Location: vlan.php');
?>
</div>
</div>
</div>
<div class="footer">
<?php include 'footer.php' ?>
</div>
</div>
</div>
</body>
</html>
<?php include 'functions.php'; include 'head.php'; ?>
<body id="management">
<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">VLAN Management <a href='help.php?help_id=firmware' onClick='showPopup(this.href);return(false);'><img align=right src="./img/question.png"></a></h1>
<?php session_is_started() ?>
<?php $_SESSION['advance']=""; ?>
<?php
if(!strcmp($_GET['vlan'],"all")){ // Delete all vlans and free ports
shell_exec("/wr/bin/wrs_vlans --clear");
}else{
shell_exec("/wr/bin/wrs_vlans --rvid ".$_GET['vlan']." --del");
}
header('Location: vlan.php');
?>
</div>
</div>
</div>
<div class="footer">
<?php include 'footer.php' ?>
</div>
</div>
</div>
</body>
</html>
<?php include 'functions.php'; include 'head.php'; ?>
<body id="endpoint">
<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">Endpoint Tool <a href='help.php?help_id=endpoint' onClick='showPopup(this.href);return(false);'><img align=right src="./img/question.png"></a></h1>
<?php session_is_started() ?>
<?php
echo '<form method=POST>
Select an Endpoint: <select name="endpoint" class="sec">';
for($op = 0; $op < 18; $op++){
echo '<option value="wr'.$op.'">wr'.$op.'</option>';
}
echo '</select>';
echo '<select name="option1" class="sec">';
echo '<option value="txcal1">Enable Calibration Transmission</option>';
echo '<option value="txcal0">Disable Calibration Transmission</option>';
echo '<option value="dump">See Registers</option>';
echo '<option value="wr">Modify Registers</option>';
//echo '<option value="rt">Show Flags</option>';
echo '<option value="lock">Lock Endpoint</option>';
//echo '<option value="master">Make Master</option>';
//echo '<option value="gm">Make GrandMaster</option>';
echo '</select>
<input type="submit" value="Go!" class="btn">
</form>';
//Second option levels:
$option1=htmlspecialchars($_POST['option1']);
$endpoint=htmlspecialchars($_POST['endpoint']);
//Calling phytool.
if(!empty($option1)){
wr_endpoint_phytool($option1, $endpoint);
}
echo '<br><hr><br>';
wr_show_endpoint_rt_show();
echo '<br><hr><br>';
?>
</div>
</div>
</div>
<div class="footer">
<?php include 'footer.php' ?>
</div>
</div>
</div>
</body>
</html>
<?php include 'functions.php'; include 'head.php'; ?>
<body id="endpoint">
<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">Endpoint Tool <a href='help.php?help_id=endpoint' onClick='showPopup(this.href);return(false);'><img align=right src="./img/question.png"></a></h1>
<?php session_is_started() ?>
<?php
echo '<form method=POST>
Select an Endpoint: <select name="endpoint" class="sec">';
for($op = 0; $op < 18; $op++){
echo '<option value="wr'.$op.'">wr'.$op.'</option>';
}
echo '</select>';
echo '<select name="option1" class="sec">';
echo '<option value="txcal1">Enable Calibration Transmission</option>';
echo '<option value="txcal0">Disable Calibration Transmission</option>';
echo '<option value="dump">See Registers</option>';
echo '<option value="wr">Modify Registers</option>';
//echo '<option value="rt">Show Flags</option>';
echo '<option value="lock">Lock Endpoint</option>';
//echo '<option value="master">Make Master</option>';
//echo '<option value="gm">Make GrandMaster</option>';
echo '</select>
<input type="submit" value="Go!" class="btn">
</form>';
//Second option levels:
$option1=htmlspecialchars($_POST['option1']);
$endpoint=htmlspecialchars($_POST['endpoint']);
//Calling phytool.
if(!empty($option1)){
wr_endpoint_phytool($option1, $endpoint);
}
echo '<br><hr><br>';
wr_show_endpoint_rt_show();
echo '<br><hr><br>';
?>
</div>
</div>
</div>
<div class="footer">
<?php include 'footer.php' ?>
</div>
</div>
</div>
</body>
</html>
<?php include 'functions.php'; include 'head.php'; ?>
<body id="epmode">
<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">Endpoint Mode Configuration<a href='help.php?help_id=endpointmode' onClick='showPopup(this.href);return(false);'><img align=right src="./img/question.png"></a></h1>
<?php session_is_started() ?>
<?php $_SESSION['advance']=""; ?>
<?php
//Load all
//$modes = parse_wrsw_hal_file();
$modes = parse_ppsi_conf_file();
<?php include 'functions.php'; include 'head.php'; ?>
<body id="epmode">
<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">Endpoint Mode Configuration<a href='help.php?help_id=endpointmode' onClick='showPopup(this.href);return(false);'><img align=right src="./img/question.png"></a></h1>
<?php session_is_started() ?>
<?php $_SESSION['advance']=""; ?>
<?php
//Load all
//$modes = parse_wrsw_hal_file();
$modes = parse_ppsi_conf_file();
echo '<table class="altrowstable" id="alternatecolor" style="width:100%;text-align:center">';
//echo '<tr><th><center>Endpoint</center></th><th><center>Mode</center></th></tr>';
for($i = 0; $i < 9; $i++){
echo '<tr>';
//echo '<tr><th><center>Endpoint</center></th><th><center>Mode</center></th></tr>';
for($i = 0; $i < 9; $i++){
echo '<tr>';
echo '<th>wr'.($i+1).'</td>';
echo '<td><a href="modifymode.php?wr='.($i+1).'&mode='.$modes[$i+1].'">'.$modes[$i+1].'</a></th>';
echo '<th>wr'.($i+1+9).'</th>';
echo '<td><a href="modifymode.php?wr='.($i+1+9).'&mode='.$modes[$i+1+9].'">'.$modes[$i+1+9].'</a></td>';
echo '</tr>';
}
//echo '</tr>';
echo '</table>';
echo '<br>';
//wrs_check_writeable();
?>
echo '</tr>';
}
//echo '</tr>';
echo '</table>';
echo '<br>';
//wrs_check_writeable();
?>
<div>
<hr>
<FORM align="right" method="post">
......@@ -55,30 +55,30 @@
<INPUT type="submit" value="Restart PPSi" class="btn">
</FORM>
</div>
<?php
if (!empty($_POST["hal"])){
//We must relaunch ptpd too. (by default)
shell_exec("killall ppsi");
$ptp_command = "/wr/bin/ppsi > /dev/null 2>&1 &";
$output = shell_exec($ptp_command);
//Relaunching wrsw_hal to commit endpoint changes
//shell_exec("killall wrsw_hal");
//shell_exec("/wr/bin/wrsw_hal -c ".$GLOBALS['etcdir']."wrsw_hal.conf > /dev/null 2>&1 &");
}
?>
</div>
</div>
</div>
<div class="footer">
<?php include 'footer.php' ?>
</div>
</div>
</div>
</body>
</html>
<?php
if (!empty($_POST["hal"])){
//We must relaunch ptpd too. (by default)
shell_exec("killall ppsi");
$ptp_command = "/wr/bin/ppsi > /dev/null 2>&1 &";
$output = shell_exec($ptp_command);
//Relaunching wrsw_hal to commit endpoint changes
//shell_exec("killall wrsw_hal");
//shell_exec("/wr/bin/wrsw_hal -c ".$GLOBALS['etcdir']."wrsw_hal.conf > /dev/null 2>&1 &");
}
?>
</div>
</div>
</div>
<div class="footer">
<?php include 'footer.php' ?>
</div>
</div>
</div>
</body>
</html>
<?php include 'functions.php'; include 'head.php'; ?>
<body id="management">
<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">Firmware Management <a href='help.php?help_id=firmware' onClick='showPopup(this.href);return(false);'><img align=right src="./img/question.png"></a></h1>
<?php session_is_started() ?>
<table border="0" align="center">
<tr>
<FORM method="POST" ENCTYPE="multipart/form-data" onsubmit="return confirm('Are you sure you want to upload and flash a new firmware?');">
<th ><INPUT type=file name="file" ></th>
<th><INPUT type=submit value="Flash Firmware" class="btn" ><INPUT type=hidden name=MAX_FILE_SIZE VALUE=<?php echo wrs_php_filesize();?>000></th>
</FORM>
</tr>
<!--
<tr></tr><tr></tr><tr>
<FORM method="POST" ENCTYPE="multipart/form-data" >
<th align=center>Download a backup of the entire Switch</th>
<th><INPUT type=submit value="Backup Firmware" class="btn"><input type="hidden" name="cmd" value="backup-wrs"></th>
</FORM>
</tr>
-->
<?php
//Include downloading and flashing from OHWR if file wr-switch-sw-v4.0-rc1-20140710_binaries.tar is available
//$ohwrlink="http://www.ohwr.org/attachments/download/3095/wr-switch-sw-v4.0-rc1-20140710_binaries.tar";
//echo '<tr></tr><tr></tr><tr><tr></tr><tr></tr><tr><tr></tr><tr></tr><tr>';
//echo ' <tr>
//<th >Download binaries from OHWR <FORM method="POST" onsubmit="return confirm("Are you sure you want to upload and flash a new firmware?");"></th>
//<th ><INPUT type=hidden name="cmd" value="remoteflash" >
//<INPUT type=submit value="Download&Flash Firmware from OHWR" class="btn" ></th>
//</FORM>
//</tr>';
?>
</table>
<?php include 'functions.php'; include 'head.php'; ?>
<body id="management">
<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">Firmware Management <a href='help.php?help_id=firmware' onClick='showPopup(this.href);return(false);'><img align=right src="./img/question.png"></a></h1>
<?php session_is_started() ?>
<table border="0" align="center">
<tr>
<FORM method="POST" ENCTYPE="multipart/form-data" onsubmit="return confirm('Are you sure you want to upload and flash a new firmware?');">
<th ><INPUT type=file name="file" ></th>
<th><INPUT type=submit value="Flash Firmware" class="btn" ><INPUT type=hidden name=MAX_FILE_SIZE VALUE=<?php echo wrs_php_filesize();?>000></th>
</FORM>
</tr>
<!--
<tr></tr><tr></tr><tr>
<FORM method="POST" ENCTYPE="multipart/form-data" >
<th align=center>Download a backup of the entire Switch</th>
<th><INPUT type=submit value="Backup Firmware" class="btn"><input type="hidden" name="cmd" value="backup-wrs"></th>
</FORM>
</tr>
-->
<?php
//Include downloading and flashing from OHWR if file wr-switch-sw-v4.0-rc1-20140710_binaries.tar is available
//$ohwrlink="http://www.ohwr.org/attachments/download/3095/wr-switch-sw-v4.0-rc1-20140710_binaries.tar";
//echo '<tr></tr><tr></tr><tr><tr></tr><tr></tr><tr><tr></tr><tr></tr><tr>';
//echo ' <tr>
//<th >Download binaries from OHWR <FORM method="POST" onsubmit="return confirm("Are you sure you want to upload and flash a new firmware?");"></th>
//<th ><INPUT type=hidden name="cmd" value="remoteflash" >
//<INPUT type=submit value="Download&Flash Firmware from OHWR" class="btn" ></th>
//</FORM>
//</tr>';
?>
</table>
<div id="bottommsg">
<hr>
<p align=center ><font color="red">NOTE: Flashing the switch with a wrong binary file might damage your device. <br>Please visit the
......@@ -56,19 +56,19 @@
</p>
<hr>
</div>
<?php
wrs_management();
?>
</div>
</div>
</div>
<div class="footer">
<?php include 'footer.php' ?>
</div>
</div>
</div>
</body>
</html>
<?php
wrs_management();
?>
</div>
</div>
</div>
<div class="footer">
<?php include 'footer.php' ?>
</div>
</div>
</div>
</body>
</html>
<?php include 'functions.php' ?>
<html id="help">
<head>
<title>Help Menu</title>
<link href="css/help.css" rel="stylesheet" type="text/css">
</head>
<?php include 'functions.php' ?>
<html id="help">
<head>
<title>Help Menu</title>
<link href="css/help.css" rel="stylesheet" type="text/css">
</head>
<body bgcolor="#FFD100">
<h1><center>Help</center></h1>
<hr>
<?php
wrs_display_help($_GET['help_id'],"");
?>
</body>
</html>
<h1><center>Help</center></h1>
<hr>
<?php
wrs_display_help($_GET['help_id'],"");
?>
</body>
</html>
<?php include 'functions.php'; include 'head.php'; ?>
<body id="dashboard">
<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">Dashboard <a href='help.php?help_id=dashboard' onClick='showPopup(this.href);return(false);'><img align=right src="./img/question.png"></a></h1>
<?php
wrs_main_info();
echo '<br><br>';
?>
</div>
</div>
</div>
<div class="footer">
<?php include 'footer.php'; ?>
</div>
</div>
</div>
</body>
</html>
<?php include 'functions.php'; include 'head.php'; ?>
<body id="dashboard">
<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">Dashboard <a href='help.php?help_id=dashboard' onClick='showPopup(this.href);return(false);'><img align=right src="./img/question.png"></a></h1>
<?php
wrs_main_info();
echo '<br><br>';
?>
</div>
</div>
</div>
<div class="footer">
<?php include 'footer.php'; ?>
</div>
</div>
</div>
</body>
</html>
<?php include 'functions.php'; include 'head.php'; ?>
<body id="load">
<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">Load LM32 & FPGA Files <a href='help.php?help_id=load' onClick='showPopup(this.href);return(false);'><img align=right src="./img/question.png"></a></h1>
<?php session_is_started() ?>
<table border="0" align="center">
<tr>
<th><FORM method="POST" ENCTYPE="multipart/form-data" onsubmit="return confirm('Are you sure you want to upload a new FPGA binary file? \nThis could result in the malfunction of the switch.');">
<INPUT type=file name="fpgafile" >
<INPUT type=submit Value="Load FPGA bin" class="btn" >
<INPUT type=hidden name=MAX_FILE_SIZE VALUE=<?php wrs_php_filesize();?>000>
</FORM></th>
</tr>
<tr>
<th ><FORM method="POST" ENCTYPE="multipart/form-data" onsubmit="return confirm('Are you sure you want to upload a new lm32 binary file? \nThis could result in the malfunction of the switch.');">
<INPUT type=file name="lm32file" >
<INPUT type=submit value="Load lm32 bin" class="btn">
<INPUT type=hidden name=MAX_FILE_SIZE VALUE=<?php wrs_php_filesize();?>000>
</FORM></th>
</tr>
</table>
<!--
<br><br><br><center>Max. filesize is now <?php //echo shell_exec("cat /etc/php.ini | grep upload_max_filesize | awk '{print $3}'");
?></center>
<table border="0" align="center">
<tr>
<form align="center" method="post">
<th>New PHP Filesize: </th><th><INPUT type="text" name="size" > </th>
<th><input type="submit" value="Change" class="btn"></th>
</tr>
</form>
</table>
-->
<?php include 'functions.php'; include 'head.php'; ?>
<body id="load">
<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">Load LM32 & FPGA Files <a href='help.php?help_id=load' onClick='showPopup(this.href);return(false);'><img align=right src="./img/question.png"></a></h1>
<?php session_is_started() ?>
<table border="0" align="center">
<tr>
<th><FORM method="POST" ENCTYPE="multipart/form-data" onsubmit="return confirm('Are you sure you want to upload a new FPGA binary file? \nThis could result in the malfunction of the switch.');">
<INPUT type=file name="fpgafile" >
<INPUT type=submit Value="Load FPGA bin" class="btn" >
<INPUT type=hidden name=MAX_FILE_SIZE VALUE=<?php wrs_php_filesize();?>000>
</FORM></th>
</tr>
<tr>
<th ><FORM method="POST" ENCTYPE="multipart/form-data" onsubmit="return confirm('Are you sure you want to upload a new lm32 binary file? \nThis could result in the malfunction of the switch.');">
<INPUT type=file name="lm32file" >
<INPUT type=submit value="Load lm32 bin" class="btn">
<INPUT type=hidden name=MAX_FILE_SIZE VALUE=<?php wrs_php_filesize();?>000>
</FORM></th>
</tr>
</table>
<!--
<br><br><br><center>Max. filesize is now <?php //echo shell_exec("cat /etc/php.ini | grep upload_max_filesize | awk '{print $3}'");
?></center>
<table border="0" align="center">
<tr>
<form align="center" method="post">
<th>New PHP Filesize: </th><th><INPUT type="text" name="size" > </th>
<th><input type="submit" value="Change" class="btn"></th>
</tr>
</form>
</table>
-->
<div id="bottommsg">
<center>
*NOTE: After loading a FPGA or lm32 binary the switch will reboot.
</center>
</div>
<?
wrs_load_files();
?>
</div>
</div>
</div>
<div class="footer">
<?php include 'footer.php' ?>
</div>
</div>
</div>
</body>
</html>
<?
wrs_load_files();
?>
</div>
</div>
</div>
<div class="footer">
<?php include 'footer.php' ?>
</div>
</div>
</div>
</body>
</html>
<?php include 'functions.php'; include 'head.php'; ?>
<body id="login">
<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">Login <a href='help.php?help_id=login' onClick='showPopup(this.href);return(false);'><img align=right src="./img/question.png"></a></h1>
<?php
ob_start();
$message="";
if(count($_POST)>0) {
//If /etc/phpusers does not exist we create the file and "admin" "" user&pass
if (!file_exists($GLOBALS['phpusersfile'])) {
$username = "admin";
$password = "";
$salt="wrs4.0salt";
$pass = $password;
$hash = md5($pass); // md5 hash #1
$hash_md5 = md5($salt.$pass); // md5 hash with salt #2
$hash_md5_double = md5(sha1($salt.$pass)); // md5 hash with salt & sha1 #3
$output= $username." ".$hash_md5_double."\n";
$file = fopen($GLOBALS['phpusersfile'],"w+");
fwrite($file,$output);
fclose($file);
}
$username = $_POST["login"];
$password = $_POST["password"];
$saved_hash = shell_exec("cat ".$GLOBALS['phpusersfile']." | grep ".$username." | awk '{print $2}'");
$saved_hash = str_replace("\n","",$saved_hash);
$user_exists = shell_exec("cat ".$GLOBALS['phpusersfile']." | grep -c ".$username);
$salt="wrs4.0salt";
$pass = $password;
$hash = md5($pass); // md5 hash #1
$hash_md5 = md5($salt.$pass); // md5 hash with salt #2
$hash_md5_double = md5(sha1($salt.$pass)); // md5 hash with salt & sha1 #3
if (!strcmp($hash_md5_double,$saved_hash) && $user_exists>0){
session_start();
$_SESSION["myusername"] = $username;
echo 'Logged in as '.$_SESSION["myusername"];
header('Location: index.php');
}else{
echo 'Invalid Username or Password';
}
}
?>
</div>
</div>
</div>
<div class="footer">
<?php include 'footer.php' ?>
</div>
</div>
</div>
</body>
</html>
<?php include 'functions.php'; include 'head.php'; ?>
<body id="login">
<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">Login <a href='help.php?help_id=login' onClick='showPopup(this.href);return(false);'><img align=right src="./img/question.png"></a></h1>
<?php
ob_start();
$message="";
if(count($_POST)>0) {
//If /etc/phpusers does not exist we create the file and "admin" "" user&pass
if (!file_exists($GLOBALS['phpusersfile'])) {
$username = "admin";
$password = "";
$salt="wrs4.0salt";
$pass = $password;
$hash = md5($pass); // md5 hash #1
$hash_md5 = md5($salt.$pass); // md5 hash with salt #2
$hash_md5_double = md5(sha1($salt.$pass)); // md5 hash with salt & sha1 #3
$output= $username." ".$hash_md5_double."\n";
$file = fopen($GLOBALS['phpusersfile'],"w+");
fwrite($file,$output);
fclose($file);
}
$username = $_POST["login"];
$password = $_POST["password"];
$saved_hash = shell_exec("cat ".$GLOBALS['phpusersfile']." | grep ".$username." | awk '{print $2}'");
$saved_hash = str_replace("\n","",$saved_hash);
$user_exists = shell_exec("cat ".$GLOBALS['phpusersfile']." | grep -c ".$username);
$salt="wrs4.0salt";
$pass = $password;
$hash = md5($pass); // md5 hash #1
$hash_md5 = md5($salt.$pass); // md5 hash with salt #2
$hash_md5_double = md5(sha1($salt.$pass)); // md5 hash with salt & sha1 #3
if (!strcmp($hash_md5_double,$saved_hash) && $user_exists>0){
session_start();
$_SESSION["myusername"] = $username;
echo 'Logged in as '.$_SESSION["myusername"];
header('Location: index.php');
}else{
echo 'Invalid Username or Password';
}
}
?>
</div>
</div>
</div>
<div class="footer">
<?php include 'footer.php' ?>
</div>
</div>
</div>
</body>
</html>
<?php include 'functions.php'; include 'head.php'; ?>
<body>
<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">Dashboard <a href='help.php?help_id=logout' onClick='showPopup(this.href);return(false);'><img align=right src="./img/question.png"></a></h1>
<?php $_SESSION['advance']=""; ?>
<?php
//ob_start();
unset($_SESSION["myusername"]);
unset($_SESSION["mypassword"]);
echo '<br><br><center><h3>Logged out</h3></center>';
header('Location: index.php');
?>
</div>
</div>
</div>
<div class="footer">
<?php include 'footer.php' ?>
</div>
</div>
</div>
</body>
</html>
<?php include 'functions.php'; include 'head.php'; ?>
<body>
<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">Dashboard <a href='help.php?help_id=logout' onClick='showPopup(this.href);return(false);'><img align=right src="./img/question.png"></a></h1>
<?php $_SESSION['advance']=""; ?>
<?php
//ob_start();
unset($_SESSION["myusername"]);
unset($_SESSION["mypassword"]);
echo '<br><br><center><h3>Logged out</h3></center>';
header('Location: index.php');
?>
</div>
</div>
</div>
<div class="footer">
<?php include 'footer.php' ?>
</div>
</div>
</div>
</body>
</html>
<?php include 'functions.php'; include 'head.php'; ?>
<body id="management">
<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 Management <a href='help.php?help_id=management' onClick='showPopup(this.href);return(false);'><img align=right src="./img/question.png"></a></h1>
<?php session_is_started() ?>
<?php $_SESSION['advance']=""; ?>
<table border="0" align="center">
<tr>
<center>
<form method="post">
<th>Switch Mode: (<?php $str = check_switch_mode(); echo $str; ?>)</th>
<input type="hidden" name="cmd" value="change">
<th><input type="submit" value="Change Mode" class="btn"></th>
</form>
</tr>
<tr>
<form method="post">
<th>Reboot system: </th>
<input type="hidden" name="cmd" value="reboot">
<th><input type="submit" value="Reboot switch" class="btn"> </th>
</form>
</center>
</tr>
<tr>
<form method="post">
<th align=left>Net-SNMP Server: </th>
<input type="hidden" name="cmd" value="snmp">
<th><INPUT type="submit" STYLE="text-align:center;" value="<?php echo (check_snmp_status()) ? 'Disable SNMP' : 'Enable SNMP'; ?>" class="btn"></th>
</form>
</tr>
</table>
<table border="0" align="center">
<tr>
<form method="post">
<th><center>NTP Server:</center></th><th><INPUT type="text" STYLE="text-align:center;" name="ntpip" value="<?php $str = check_ntp_server(); echo $str; ?>"> </th>
<th><input type="hidden" name="cmd" value="ntp">
<select name="utc" >
<?php
$selected_utc=$_SESSION['utc'];
$selected_utc=str_replace("UTC","",$selected_utc);
$selected_utc=trim($selected_utc);
for($op = -12; $op < 0; $op++){
if($selected_utc==$op && !empty($selected_utc)){
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 && !empty($selected_utc)){
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>
<?php include 'functions.php'; include 'head.php'; ?>
<body id="management">
<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 Management <a href='help.php?help_id=management' onClick='showPopup(this.href);return(false);'><img align=right src="./img/question.png"></a></h1>
<?php session_is_started() ?>
<?php $_SESSION['advance']=""; ?>
<table border="0" align="center">
<tr>
<center>
<form method="post">
<th>Switch Mode: (<?php $str = check_switch_mode(); echo $str; ?>)</th>
<input type="hidden" name="cmd" value="change">
<th><input type="submit" value="Change Mode" class="btn"></th>
</form>
</tr>
<tr>
<form method="post">
<th>Reboot system: </th>
<input type="hidden" name="cmd" value="reboot">
<th><input type="submit" value="Reboot switch" class="btn"> </th>
</form>
</center>
</tr>
<tr>
<form method="post">
<th align=left>Net-SNMP Server: </th>
<input type="hidden" name="cmd" value="snmp">
<th><INPUT type="submit" STYLE="text-align:center;" value="<?php echo (check_snmp_status()) ? 'Disable SNMP' : 'Enable SNMP'; ?>" class="btn"></th>
</form>
</tr>
</table>
<table border="0" align="center">
<tr>
<form method="post">
<th><center>NTP Server:</center></th><th><INPUT type="text" STYLE="text-align:center;" name="ntpip" value="<?php $str = check_ntp_server(); echo $str; ?>"> </th>
<th><input type="hidden" name="cmd" value="ntp">
<select name="utc" >
<?php
$selected_utc=$_SESSION['utc'];
$selected_utc=str_replace("UTC","",$selected_utc);
$selected_utc=trim($selected_utc);
for($op = -12; $op < 0; $op++){
if($selected_utc==$op && !empty($selected_utc)){
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 && !empty($selected_utc)){
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 class='altrowstable' id='alternatecolor' width="100%">
<tr>
<FORM method="POST" ENCTYPE="multipart/form-data">
<tr>
<FORM method="POST" ENCTYPE="multipart/form-data">
<td class="first">PPSi Config </td>
<td ><INPUT type=file name="ppsi_conf" ></td>
<td><INPUT type=submit value="Load" class="btn" ><INPUT type=hidden name=MAX_FILE_SIZE VALUE= <?php wrs_php_filesize();?>000></td>
</form>
</tr>
<tr>
<FORM method="POST" ENCTYPE="multipart/form-data">
</form>
</tr>
<tr>
<FORM method="POST" ENCTYPE="multipart/form-data">
<td class="first">SFP Config </td>
<td ><INPUT type=file name="sfp_conf" ></td>
<td><INPUT type=submit value="Load" class="btn" ><INPUT type=hidden name=MAX_FILE_SIZE VALUE= <?php wrs_php_filesize();?>000></td>
</form>
</tr>
<tr>
<FORM method="POST" ENCTYPE="multipart/form-data">
</form>
</tr>
<tr>
<FORM method="POST" ENCTYPE="multipart/form-data">
<td class="first">SNMP Config</td>
<td ><INPUT type=file name="snmp_conf" ></td>
<td><INPUT type=submit value="Load" class="btn" ><INPUT type=hidden name=MAX_FILE_SIZE VALUE= <?php wrs_php_filesize();?>000></td>
</form>
</tr>
<tr>
<FORM method="POST" ENCTYPE="multipart/form-data">
</form>
</tr>
<tr>
<FORM method="POST" ENCTYPE="multipart/form-data">
<td class="first">HAL Config </td>
<td ><INPUT type=file name="hal_conf" ></td>
<td><INPUT type=submit value="Load" class="btn" ><INPUT type=hidden name=MAX_FILE_SIZE VALUE= <?php wrs_php_filesize();?>000></td>
</form>
</tr>
<tr>
<FORM method="POST" ENCTYPE="multipart/form-data">
</form>
</tr>
<tr>
<FORM method="POST" ENCTYPE="multipart/form-data">
<td class="first">Restore from backup</td>
<td ><INPUT type=file name="restore_conf" ></td>
<td><INPUT type=submit value="Load" class="btn" ><INPUT type=hidden name=MAX_FILE_SIZE VALUE= <?php wrs_php_filesize();?>000></td>
</form>
</tr>
</table>
<br><br><br><br>
<center>
<FORM align="center" 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>
</center>
<?php
wrs_management();
?>
</div>
</div>
</div>
<div class="footer">
<?php include 'footer.php' ?>
</div>
</div>
</div>
</body>
</html>
</form>
</tr>
</table>
<br><br><br><br>
<center>
<FORM align="center" 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>
</center>
<?php
wrs_management();
?>
</div>
</div>
</div>
<div class="footer">
<?php include 'footer.php' ?>
</div>
</div>
</div>
</body>
</html>
<?php include 'functions.php'; include 'head.php'; ?>
<body id="modifymode">
<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"> Endpoint Mode Configuration <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() ?>
<?php
$endpoint = $_GET["wr"];
$mode = $_GET["mode"];
wrs_modify_endpoint_mode($endpoint, $mode);
header('Location: endpointmode.php');
exit;
?>
<hr>
<FORM align="right" action="endpointmode.php" method="post">
<INPUT type="submit" value="Back" class="btn">
</FORM>
</div>
</div>
</div>
<div class="footer">
<?php include 'footer.php' ?>
</div>
</div>
</div>
</body>
</html>
<?php include 'functions.php'; include 'head.php'; ?>
<body id="modifymode">
<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"> Endpoint Mode Configuration <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() ?>
<?php
$endpoint = $_GET["wr"];
$mode = $_GET["mode"];
wrs_modify_endpoint_mode($endpoint, $mode);
header('Location: endpointmode.php');
exit;
?>
<hr>
<FORM align="right" action="endpointmode.php" method="post">
<INPUT type="submit" value="Back" class="btn">
</FORM>
</div>
</div>
</div>
<div class="footer">
<?php include 'footer.php' ?>
</div>
</div>
</div>
</body>
</html>
<?php include 'functions.php'; include 'head.php'; ?>
<?php include 'functions.php'; include 'head.php'; ?>
<body id="network">
<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">Network Management <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['advance']=""; ?>
<FORM method="POST">
<table id="daemon" border="0" align="center">
<tr>
<th align=left>eth0 Setup: </th>
<th><input type="radio" name="networkgroup" value="DHCP" <?php if(!strcmp(wrs_interface_setup(), "dhcp")) echo "checked" ?> > DHCP <br>
<input type="radio" name="networkgroup" value="Static" <?php if(!strcmp(wrs_interface_setup(), "static")) echo "checked" ?> > Static <br>
<th><INPUT type="submit" value="Change" class="btn"></th>
</tr>
</table>
</FORM>
<?php
if((empty($_POST["networkgroup"]))){
echo '
<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">Network Management <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['advance']=""; ?>
<FORM method="POST">
<table id="daemon" border="0" align="center">
<tr>
<th align=left>eth0 Setup: </th>
<th><input type="radio" name="networkgroup" value="DHCP" <?php if(!strcmp(wrs_interface_setup(), "dhcp")) echo "checked" ?> > DHCP <br>
<input type="radio" name="networkgroup" value="Static" <?php if(!strcmp(wrs_interface_setup(), "static")) echo "checked" ?> > Static <br>
<th><INPUT type="submit" value="Change" class="btn"></th>
</tr>
</table>
</FORM>
<?php
if((empty($_POST["networkgroup"]))){
echo '
<table class="altrowstable firstcol" id="alternatecolor">
<tr>
<tr>
<th>Current eth0</th>
</tr>
<tr>
<tr>
<td>IP Address: </td>
<td ><INPUT type="text" value="'.shell_exec("ifconfig eth0 | grep 'inet addr:' | cut -d: -f2 | awk '{ print $1}'").'" readonly name="ip" ></td>
</tr>
<tr>
</tr>
<tr>
<td>Netmask: </td>
<td><INPUT type="text" value="'.shell_exec("ifconfig eth0 | grep 'inet addr:' | cut -d: -f4 | awk '{ print $1}'").'" readonly name="netmask" ></td>
</tr>
<tr>
</tr>
<tr>
<td>Broadcast: </td>
<td><INPUT type="text" value="'.shell_exec("ifconfig eth0 | grep 'inet addr:' | cut -d: -f3 | awk '{ print $1}'").'" readonly name="broadcast" ></td>
</tr>
</table>';
}
if ((!empty($_POST["networkgroup"])) && (!strcmp(htmlspecialchars($_POST["networkgroup"]),"DHCP"))){
$interface_file = $GLOBALS['interfacesfile'];
$tmpfile="/tmp/interfaces";
shell_exec('rm '.$interface_file);
$output="# Configure Loopback\nauto lo\niface lo inet loopback\n\n#Force eth0 to be configured by DHCP\nauto eth0\niface eth0 inet dhcp\n\n# Uncomment this example for static configuration\n";
$output.="#iface eth0 inet static\n";
$output.="#\taddress 192.168.1.10";
$output.="\n#\tnetmask 255.255.255.0";
$output.="\n#\tnetwork 192.168.1.0";
$output.="\n#\tbroadcast 192.168.1.255";
$output.="\n#\tgateway 192.168.1.1\n";
$file = fopen($tmpfile,"w+");
fwrite($file,$output);
fclose($file);
//We move the file to /usr/etc/network
copy($tmpfile, $interface_file);
echo '<center>DHCP is now set for eth0<br>Rebooting switch</center>';
//Let's reboot
shell_exec('reboot');
}
if ((!empty($_POST["networkgroup"])) && (!strcmp(htmlspecialchars($_POST["networkgroup"]),"Static"))){
echo '<FORM method="POST">
<table border="0" align="center" class="altrowstable" id="alternatecolor">
<tr>
</tr>
</table>';
}
if ((!empty($_POST["networkgroup"])) && (!strcmp(htmlspecialchars($_POST["networkgroup"]),"DHCP"))){
$interface_file = $GLOBALS['interfacesfile'];
$tmpfile="/tmp/interfaces";
shell_exec('rm '.$interface_file);
$output="# Configure Loopback\nauto lo\niface lo inet loopback\n\n#Force eth0 to be configured by DHCP\nauto eth0\niface eth0 inet dhcp\n\n# Uncomment this example for static configuration\n";
$output.="#iface eth0 inet static\n";
$output.="#\taddress 192.168.1.10";
$output.="\n#\tnetmask 255.255.255.0";
$output.="\n#\tnetwork 192.168.1.0";
$output.="\n#\tbroadcast 192.168.1.255";
$output.="\n#\tgateway 192.168.1.1\n";
$file = fopen($tmpfile,"w+");
fwrite($file,$output);
fclose($file);
//We move the file to /usr/etc/network
copy($tmpfile, $interface_file);
echo '<center>DHCP is now set for eth0<br>Rebooting switch</center>';
//Let's reboot
shell_exec('reboot');
}
if ((!empty($_POST["networkgroup"])) && (!strcmp(htmlspecialchars($_POST["networkgroup"]),"Static"))){
echo '<FORM method="POST">
<table border="0" align="center" class="altrowstable" id="alternatecolor">
<tr>
<td>IP Address: </td>
<td><INPUT type="text" value="192.168.1.10" name="ip" ></td>
</tr>
<tr>
</tr>
<tr>
<td>Netmask: </td>
<td><INPUT type="text" value="255.255.255.0" name="netmask" ></td>
</tr>
<tr>
</tr>
<tr>
<td>Network: </td>
<td><INPUT type="text" value="192.168.1.0" name="network" ></td>
</tr>
<tr>
</tr>
<tr>
<td>Broadcast: </td>
<td><INPUT type="text" value="192.168.1.255" name="broadcast" ></td>
</tr>
<tr>
</tr>
<tr>
<td>Gateway: </td>
<td><INPUT type="text" value="192.168.1.1" name="gateway" ></td>
</tr>
</table>
<INPUT type="submit" value="Save New Configuration" class="btn last">
</FORM>';
}
if ((!empty($_POST["ip"])) && (!empty($_POST["netmask"])) && (!empty($_POST["network"])) && (!empty($_POST["broadcast"])) && (!empty($_POST["gateway"]))){
$interface_file = $GLOBALS['interfacesfile'];
$tmpfile="/tmp/interfaces";
shell_exec('rm '.$interface_file);
$output="# Configure Loopback\nauto lo\niface lo inet loopback\n\n#Force eth0 to be configured by DHCP\n#auto eth0\n#iface eth0 inet dhcp\n\n# Uncomment this example for static configuration\n";
$output.="iface eth0 inet static\n";
$output.="\taddress ".$_POST["ip"];
$output.="\n\tnetmask ".$_POST["netmask"];
$output.="\n\tnetwork ".$_POST["network"];
$output.="\n\tbroadcast ".$_POST["broadcast"];
$output.="\n\tgateway ".$_POST["gateway"]."\n";
$file = fopen($tmpfile,"w+");
fwrite($file,$output);
fclose($file);
//We move the file to /usr/etc/network
copy($tmpfile, $interface_file);
echo '<center>New static configuration saved for eth0<br>Changes will take place after reboot.</center>';
//Let's reboot
shell_exec('reboot');
}
?>
</div>
</div>
</div>
<div class="footer">
<?php include 'footer.php' ?>
</div>
</div>
</div>
</body>
</html>
</tr>
</table>
<INPUT type="submit" value="Save New Configuration" class="btn last">
</FORM>';
}
if ((!empty($_POST["ip"])) && (!empty($_POST["netmask"])) && (!empty($_POST["network"])) && (!empty($_POST["broadcast"])) && (!empty($_POST["gateway"]))){
$interface_file = $GLOBALS['interfacesfile'];
$tmpfile="/tmp/interfaces";
shell_exec('rm '.$interface_file);
$output="# Configure Loopback\nauto lo\niface lo inet loopback\n\n#Force eth0 to be configured by DHCP\n#auto eth0\n#iface eth0 inet dhcp\n\n# Uncomment this example for static configuration\n";
$output.="iface eth0 inet static\n";
$output.="\taddress ".$_POST["ip"];
$output.="\n\tnetmask ".$_POST["netmask"];
$output.="\n\tnetwork ".$_POST["network"];
$output.="\n\tbroadcast ".$_POST["broadcast"];
$output.="\n\tgateway ".$_POST["gateway"]."\n";
$file = fopen($tmpfile,"w+");
fwrite($file,$output);
fclose($file);
//We move the file to /usr/etc/network
copy($tmpfile, $interface_file);
echo '<center>New static configuration saved for eth0<br>Changes will take place after reboot.</center>';
//Let's reboot
shell_exec('reboot');
}
?>
</div>
</div>
</div>
<div class="footer">
<?php include 'footer.php' ?>
</div>
</div>
</div>
</body>
</html>
<?php include 'functions.php'; include 'head.php'; ?>
<body id="management">
<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">VLAN Management <a href='help.php?help_id=vlan' onClick='showPopup(this.href);return(false);'><img align=right src="./img/question.png"></a></h1>
<?php session_is_started() ?>
<?php $_SESSION['advance']=""; ?>
<?php
$vlan_cmd = "/wr/bin/wrs_vlans ";
if(!empty($_POST['vid'])){ $vlan_cmd .= " --rvid ".$_POST['vid'];}
if(!empty($_POST['fid'])){$vlan_cmd .= " --rfid ".$_POST['fid'];}
if(!empty($_POST['mask'])){$vlan_cmd .= " --rmask ".$_POST['mask'];}
if(!empty($_POST['drop'])){$vlan_cmd .= " --rdrop ".$_POST['drop'];}
if(!empty($_POST['prio'])){$vlan_cmd .= " --rprio ".$_POST['prio'];}
shell_exec($vlan_cmd);
header('Location: vlan.php');
?>
</div>
</div>
</div>
<div class="footer">
<?php include 'footer.php' ?>
</div>
</div>
</div>
</body>
</html>
<?php include 'functions.php'; include 'head.php'; ?>
<body id="management">
<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">VLAN Management <a href='help.php?help_id=vlan' onClick='showPopup(this.href);return(false);'><img align=right src="./img/question.png"></a></h1>
<?php session_is_started() ?>
<?php $_SESSION['advance']=""; ?>
<?php
$vlan_cmd = "/wr/bin/wrs_vlans ";
if(!empty($_POST['vid'])){ $vlan_cmd .= " --rvid ".$_POST['vid'];}
if(!empty($_POST['fid'])){$vlan_cmd .= " --rfid ".$_POST['fid'];}
if(!empty($_POST['mask'])){$vlan_cmd .= " --rmask ".$_POST['mask'];}
if(!empty($_POST['drop'])){$vlan_cmd .= " --rdrop ".$_POST['drop'];}
if(!empty($_POST['prio'])){$vlan_cmd .= " --rprio ".$_POST['prio'];}
shell_exec($vlan_cmd);
header('Location: vlan.php');
?>
</div>
</div>
</div>
<div class="footer">
<?php include 'footer.php' ?>
</div>
</div>
</div>
</body>
</html>
<?php include 'functions.php'; include 'head.php'; ?>
<body id="ptp">
<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">PPSi Configuration <a href='help.php?help_id=ptp' onClick='showPopup(this.href);return(false);'><img align=right src="./img/question.png"></a></h1>
<?php session_is_started() ?>
<?php $_SESSION['advance']=""; ?>
<FORM method="POST">
<table id="daemon" border="0" align="center">
<tr>
<th align=center>PPSi Daemon: </th>
<input type="hidden" name="cmd" value="ppsiupdate">
<th><INPUT type="submit" value="<?php echo (wrs_check_ptp_status()) ? 'Disable PPSi' : 'Enable PPSi'; ?>" class="btn"></th>
</tr>
</table>
</FORM>
<FORM method="POST">
<table border="0" align="center">
<tr>
<th align=left>Clock Class: </th>
<th><INPUT type="text" STYLE="text-align:center;" size="10" name="clkclass" value="<?php echo shell_exec("cat ".$GLOBALS['etcdir'].$GLOBALS['ppsiconf']." | grep class | awk '{print $2}'");?>" ></th>
</tr>
<tr>
<th align=left>Clock Accuracy: </th>
<th><INPUT type="text" STYLE="text-align:center;" size="10" name="clkacc" value="<?php echo shell_exec("cat ".$GLOBALS['etcdir'].$GLOBALS['ppsiconf']." | grep accuracy | awk '{print $2}'");?>"></th>
</tr>
<!--
<tr>
<th align=left>Network Interface Binding: </th>
<th><INPUT type="text" name="b" ></th>
</tr>
<tr>
<th align=left>Unicast to Address: </th>
<th><INPUT type="text" name="u" ></th>
</tr>
<tr>
<th align=left>PTP Domain Number: </th>
<th><INPUT type="text" name="i" ></th>
</tr>
<tr>
<th align=left>Announce Interval: </th>
<th><INPUT type="text" name="n" ></th>
</tr>
<tr>
<th align=left>Sync Interval: </th>
<th><INPUT type="text" name="y" ></th>
</tr>
<tr>
<th align=left>Clock Accuracy: </th>
<th><INPUT type="text" name="r" ></th>
</tr>
<tr>
<th align=left >Clock Class: </th>
<th><INPUT type="text" name="v" ></th>
</tr>
<tr>
<th align=left>Priority: </th>
<th><INPUT type="text" name="p" ></th>
</tr>
-->
</table>
<?php include 'functions.php'; include 'head.php'; ?>
<body id="ptp">
<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">PPSi Configuration <a href='help.php?help_id=ptp' onClick='showPopup(this.href);return(false);'><img align=right src="./img/question.png"></a></h1>
<?php session_is_started() ?>
<?php $_SESSION['advance']=""; ?>
<FORM method="POST">
<table id="daemon" border="0" align="center">
<tr>
<th align=center>PPSi Daemon: </th>
<input type="hidden" name="cmd" value="ppsiupdate">
<th><INPUT type="submit" value="<?php echo (wrs_check_ptp_status()) ? 'Disable PPSi' : 'Enable PPSi'; ?>" class="btn"></th>
</tr>
</table>
</FORM>
<FORM method="POST">
<table border="0" align="center">
<tr>
<th align=left>Clock Class: </th>
<th><INPUT type="text" STYLE="text-align:center;" size="10" name="clkclass" value="<?php echo shell_exec("cat ".$GLOBALS['etcdir'].$GLOBALS['ppsiconf']." | grep class | awk '{print $2}'");?>" ></th>
</tr>
<tr>
<th align=left>Clock Accuracy: </th>
<th><INPUT type="text" STYLE="text-align:center;" size="10" name="clkacc" value="<?php echo shell_exec("cat ".$GLOBALS['etcdir'].$GLOBALS['ppsiconf']." | grep accuracy | awk '{print $2}'");?>"></th>
</tr>
<!--
<tr>
<th align=left>Network Interface Binding: </th>
<th><INPUT type="text" name="b" ></th>
</tr>
<tr>
<th align=left>Unicast to Address: </th>
<th><INPUT type="text" name="u" ></th>
</tr>
<tr>
<th align=left>PTP Domain Number: </th>
<th><INPUT type="text" name="i" ></th>
</tr>
<tr>
<th align=left>Announce Interval: </th>
<th><INPUT type="text" name="n" ></th>
</tr>
<tr>
<th align=left>Sync Interval: </th>
<th><INPUT type="text" name="y" ></th>
</tr>
<tr>
<th align=left>Clock Accuracy: </th>
<th><INPUT type="text" name="r" ></th>
</tr>
<tr>
<th align=left >Clock Class: </th>
<th><INPUT type="text" name="v" ></th>
</tr>
<tr>
<th align=left>Priority: </th>
<th><INPUT type="text" name="p" ></th>
</tr>
-->
</table>
<hr>
<p align=right><INPUT align="right" type="submit" value="Update & Relaunch" class="btn last"></p>
</FORM>
</FORM>
<div id="bottommsg">
<hr>
<p align="right">Click <A HREF="endpointmode.php">here</A> to modify endpoint mode configuration</p>
<hr>
<p align="right">Click <A HREF="endpointmode.php">here</A> to modify endpoint mode configuration</p>
</div>
<?php
wrs_ptp_configuration();
?>
</div>
</div>
</div>
<div class="footer">
<?php include 'footer.php' ?>
</div>
</div>
</div>
</body>
</html>
<?php
wrs_ptp_configuration();
?>
</div>
</div>
</div>
<div class="footer">
<?php include 'footer.php' ?>
</div>
</div>
</div>
</body>
</html>
<?php include 'functions.php'; include 'head.php'; ?>
<body id="sfpcalib">
<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">SFP Database <a href='http://www.ohwr.org/projects/white-rabbit/wiki/Calibration' target='_blank'><img align=right src="./img/question.png"></a></h1>
<?php session_is_started() ?>
<br>
<?php
$file_init = '-- The VENDOR_SERIAL field can be set to an empty string to provide class-level'."\n";
$file_init .= '-- information as opposed to device-level information.'."\n\n";
$file_init .= 'sfpdb = {'."\n";
$file_end = '}'."\n";;
if (empty($_POST['number'])){
echo '<div><form method="post">
Number of new SPFs to be added: <INPUT type="text" value="2" name="number" >
<input type="submit" value="Add" class="btn">
</form></div>';
<?php include 'functions.php'; include 'head.php'; ?>
<body id="sfpcalib">
<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">SFP Database <a href='http://www.ohwr.org/projects/white-rabbit/wiki/Calibration' target='_blank'><img align=right src="./img/question.png"></a></h1>
<?php session_is_started() ?>
<br>
<?php
$file_init = '-- The VENDOR_SERIAL field can be set to an empty string to provide class-level'."\n";
$file_init .= '-- information as opposed to device-level information.'."\n\n";
$file_init .= 'sfpdb = {'."\n";
$file_end = '}'."\n";;
if (empty($_POST['number'])){
echo '<div><form method="post">
Number of new SPFs to be added: <INPUT type="text" value="2" name="number" >
<input type="submit" value="Add" class="btn">
</form></div>';
echo "<div id='bottommsg'>
<hr>
NOTE: This action will delete the previous sfp_database.conf file. <a href='showfile.php?help_id=file&name=sfp_database.conf'
onClick='showPopup(this.href);return(false);'> (see current configuration) </a>
<center>**If you do not know how to calibrate SFPs please click on <a href='http://www.ohwr.org/projects/white-rabbit/wiki/Calibration' target='_blank'> here </a>**</center>
</div>";
}else{
echo '*all fields are mandatory<br><br>';
echo '<form method="post">';
NOTE: This action will delete the previous sfp_database.conf file. <a href='showfile.php?help_id=file&name=sfp_database.conf'
onClick='showPopup(this.href);return(false);'> (see current configuration) </a>
<center>**If you do not know how to calibrate SFPs please click on <a href='http://www.ohwr.org/projects/white-rabbit/wiki/Calibration' target='_blank'> here </a>**</center>
</div>";
}else{
echo '*all fields are mandatory<br><br>';
echo '<form method="post">';
echo "<div><table class='altrowstable firstcol' id='alternatecolor'>";
//echo '<tr><td> <b><center> </center></b></td></tr>';
if (($_POST['number']!=2)){
for($i=0; $i<$_POST['number']; $i++){
echo '<tr><th>SFP '.($i+1).'</th></tr>';
if (($_POST['number']!=2)){
for($i=0; $i<$_POST['number']; $i++){
echo '<tr><th>SFP '.($i+1).'</th></tr>';
echo '<tr><td>Part Number</td><td><INPUT type="text" name="sfpnumber'.$i.'" > </td></tr>';
echo '<tr><td>Alpha</td><td><INPUT type="text" name="alpha'.$i.'" > </td></tr>';
echo '<tr><td>Delta Tx</td><td><INPUT type="text" name="tx'.$i.'" > </td></tr>';
echo '<tr><td>Delta Rx</td><td><INPUT type="text" name="rx'.$i.'" > </td></tr>';
}
}else{
for($i=0; $i<$_POST['number']; $i++){
echo '<tr><th>SFP '.($i+1).'</th></tr>';
if($i==0){
}
}else{
for($i=0; $i<$_POST['number']; $i++){
echo '<tr><th>SFP '.($i+1).'</th></tr>';
if($i==0){
echo '<tr><td>Part Number</td><td><INPUT type="text" value = "AXGE-1254-0531" name="sfpnumber'.$i.'" > </td></tr>';
echo '<tr><td>Alpha</td><td><INPUT type="text" value="2.67871791665542e-04" name="alpha'.$i.'" > </td></tr>';
echo '<tr><td>Delta Tx</td><td><INPUT type="text" value="10" name="tx'.$i.'" > </td></tr>';
echo '<tr><td>Delta Rx</td><td><INPUT type="text" value="10" name="rx'.$i.'" > </td></tr>';
}else{
}else{
echo '<tr><td>Part Number</td><td><INPUT type="text" value = "AXGE-3454-0531" name="sfpnumber'.$i.'" > </td></tr>';
echo '<tr><td>Alpha</td><td><INPUT type="text" value="-2.67800055584799e-04" name="alpha'.$i.'" > </td></tr>';
echo '<tr><td>Delta Tx</td><td><INPUT type="text" value="10" name="tx'.$i.'" > </td></tr>';
echo '<tr><td>Delta Rx</td><td><INPUT type="text" value="10" name="rx'.$i.'" > </td></tr>';
}
}
}
}
}
}
echo '</table>';
echo '<input type="hidden" name="newconf" value="newconf">';
echo '<input type="hidden" name="newnumber" value="'.$_POST['number'].'">';
echo '<input type="hidden" name="newconf" value="newconf">';
echo '<input type="hidden" name="newnumber" value="'.$_POST['number'].'">';
echo '<input type="submit" value="Create new file & Reboot" class="btn last">';
echo '</form>';
echo '</div>';
}
if (!empty($_POST['newconf'])){
$outputfile = $file_init;
$error = false;
for($i=0; $i<$_POST['newnumber'] && (!$error); $i++){
if(empty($_POST['sfpnumber'.$i]) || empty($_POST['alpha'.$i]) || empty($_POST['tx'.$i]) || empty($_POST['rx'.$i])){
$error = true;
}
$outputfile .= " {"."\n";
$outputfile .= "\t".'part_num = "'.$_POST['sfpnumber'.$i].'",'."\n";
$outputfile .= "\t"."alpha = ".$_POST['alpha'.$i].','."\n";
$outputfile .= "\t"."delta_tx = ".$_POST['tx'.$i].','."\n";
$outputfile .= "\t"."delta_rx = ".$_POST['rx'.$i]."\n";
$outputfile .= " },"."\n\n";
}
$outputfile .= $file_end;
}
if(!empty($_POST['newconf']) && !$error){
//We save the changes in a temporarely file in /tmp
$file = fopen("/tmp/sfp_database.conf","w+");
fwrite($file,$outputfile);
fclose($file);
//We move the file to /wr/etc/
copy('/tmp/sfp_database.conf',$GLOBALS['etcdir'].'sfp_database.conf');
echo '<center><font color="green">File successfully created. Rebooting switch. </font></center>';
shell_exec("reboot");
}else if(!empty($_POST['newconf']) && $error){
echo '<center><font color="red">WARNING: Conf. file not created. Please fill in all fields</font></center>';
}
?>
</div>
</div>
</div>
<div class="footer">
<?php include 'footer.php' ?>
</div>
</div>
</div>
</body>
</html>
echo '</form>';
echo '</div>';
}
if (!empty($_POST['newconf'])){
$outputfile = $file_init;
$error = false;
for($i=0; $i<$_POST['newnumber'] && (!$error); $i++){
if(empty($_POST['sfpnumber'.$i]) || empty($_POST['alpha'.$i]) || empty($_POST['tx'.$i]) || empty($_POST['rx'.$i])){
$error = true;
}
$outputfile .= " {"."\n";
$outputfile .= "\t".'part_num = "'.$_POST['sfpnumber'.$i].'",'."\n";
$outputfile .= "\t"."alpha = ".$_POST['alpha'.$i].','."\n";
$outputfile .= "\t"."delta_tx = ".$_POST['tx'.$i].','."\n";
$outputfile .= "\t"."delta_rx = ".$_POST['rx'.$i]."\n";
$outputfile .= " },"."\n\n";
}
$outputfile .= $file_end;
}
if(!empty($_POST['newconf']) && !$error){
//We save the changes in a temporarely file in /tmp
$file = fopen("/tmp/sfp_database.conf","w+");
fwrite($file,$outputfile);
fclose($file);
//We move the file to /wr/etc/
copy('/tmp/sfp_database.conf',$GLOBALS['etcdir'].'sfp_database.conf');
echo '<center><font color="green">File successfully created. Rebooting switch. </font></center>';
shell_exec("reboot");
}else if(!empty($_POST['newconf']) && $error){
echo '<center><font color="red">WARNING: Conf. file not created. Please fill in all fields</font></center>';
}
?>
</div>
</div>
</div>
<div class="footer">
<?php include 'footer.php' ?>
</div>
</div>
</div>
</body>
</html>
<?php include 'functions.php' ?>
<html>
<head>
<title></title>
</head>
<body >
<h1><center><?php echo $_GET['name'];?></center></h1>
<hr>
<?php
wrs_display_help($_GET['help_id'], $_GET['name']);
?>
</body>
</html>
<?php include 'functions.php' ?>
<html>
<head>
<title></title>
</head>
<body >
<h1><center><?php echo $_GET['name'];?></center></h1>
<hr>
<?php
wrs_display_help($_GET['help_id'], $_GET['name']);
?>
</body>
</html>
<?php include 'functions.php'; include 'head.php'; ?>
<body id="terminal">
<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">White-Rabbit Switch Console <a href='help.php?help_id=console' onClick='showPopup(this.href);return(false);'><img align=right src="./img/question.png"></a></h1>
<?php session_is_started();
$hostname = $_SESSION['hostname'];
$ip = $_SESSION['ip'];
if(empty($hostname) || empty($ip)){
$_SESSION['hostname'] = trim(shell_exec("hostname"));
$_SESSION['ip'] = trim(shell_exec("ifconfig eth0 | grep 'inet addr:' | cut -d: -f2 | awk '{ print $1}'"));
$hostname = $_SESSION['hostname'];
$ip = $_SESSION['ip'];
}
echo '<FORM action="terminal.php" method="POST" accept-charset="UTF-8">
'.$hostname.'@'.$_SESSION["ip"].'$: <input type="text" name="cmd" autofocus="autofocus" autocomplete="off">
<input type="submit" value="Enter" class="btn">
</FORM>';
/*$path = shell_exec("echo $PATH");
if(substr_count($path , "/wr/bin")==0){
//$new_path = shell_exec("export PATH=/wr/bin:$PATH");
$path = htmlspecialchars(shell_exec("echo $PATH"));
echo "PATH=".$path;
}*/
// If pwd is empty, we go to the root directory
if(empty($_SESSION["pwd"])){$_SESSION["pwd"]="/";}
shell_exec("cd ".$_SESSION["pwd"]);
$cmd = htmlspecialchars($_POST["cmd"]);
// user is moving to another directory
$cmd_aux = $cmd;
if(substr_count($cmd_aux , "cd")>0){
//$cmd = " ls ";
// moving backwards
if(substr_count($cmd_aux , "cd ..")>0){
$back = explode("/", $_SESSION["pwd"]);
$size = count($back);
$_SESSION["pwd"] = str_replace("/".$back[$size-1],"",$_SESSION["pwd"]);
// moving forwards
}else{
$cmd_aux = explode(" ", $cmd_aux);
if(!strstr($cmd_aux[1][0],"/")){
if(file_exists($_SESSION["pwd"]."/".$cmd_aux[1])){
if (!strcmp($_SESSION["pwd"], "/")){
$_SESSION["pwd"].= $cmd_aux[1];
}else{
$_SESSION["pwd"].= "/".$cmd_aux[1];
}
}else{
$output = "folder not found";
}
}else{
if(file_exists($cmd_aux[1])){
$_SESSION["pwd"] = $cmd_aux[1];
}else{
$output = "folder not found";
}
}
}
}else{
}
$path = "PATH=/sbin:/usr/sbin:/bin:/usr/bin:/wr/bin";
if(strstr($output,"folder not found")){
$output = 'folder "'.$cmd_aux[1].'" not found';
$cmd = "";
}else{
$output = shell_exec( $path." ; cd ".$_SESSION["pwd"]." ; ".$cmd);
}
//Format output
$output=str_replace("\n","<br>",$output);
echo '<div align="center"> <div id="preview" style= "BORDER-RIGHT: #000 1px solid; PADDING-RIGHT: 0px;
BORDER-TOP: #000 1px solid; PADDING-LEFT: 2px; PADDING-BOTTOM: 2px; WORD-SPACING: 1px; OVERFLOW: scroll;
BORDER-LEFT: #000 1px solid; WIDTH: 100%; PADDING-TOP: 1px;
BORDER-BOTTOM: #000 2px solid; HEIGHT: 350px; TEXT-ALIGN: left">
<p>'.$hostname.'@'.$ip.':'.$_SESSION["pwd"].'$ '.$cmd.'<br>'.$output.'</p> </div></div>';
?>
</div>
</div>
</div>
<div class="footer">
<?php include 'footer.php' ?>
</div>
</div>
</div>
</body>
</html>
<?php include 'functions.php'; include 'head.php'; ?>
<body id="terminal">
<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">White-Rabbit Switch Console <a href='help.php?help_id=console' onClick='showPopup(this.href);return(false);'><img align=right src="./img/question.png"></a></h1>
<?php session_is_started();
$hostname = $_SESSION['hostname'];
$ip = $_SESSION['ip'];
if(empty($hostname) || empty($ip)){
$_SESSION['hostname'] = trim(shell_exec("hostname"));
$_SESSION['ip'] = trim(shell_exec("ifconfig eth0 | grep 'inet addr:' | cut -d: -f2 | awk '{ print $1}'"));
$hostname = $_SESSION['hostname'];
$ip = $_SESSION['ip'];
}
echo '<FORM action="terminal.php" method="POST" accept-charset="UTF-8">
'.$hostname.'@'.$_SESSION["ip"].'$: <input type="text" name="cmd" autofocus="autofocus" autocomplete="off">
<input type="submit" value="Enter" class="btn">
</FORM>';
/*$path = shell_exec("echo $PATH");
if(substr_count($path , "/wr/bin")==0){
//$new_path = shell_exec("export PATH=/wr/bin:$PATH");
$path = htmlspecialchars(shell_exec("echo $PATH"));
echo "PATH=".$path;
}*/
// If pwd is empty, we go to the root directory
if(empty($_SESSION["pwd"])){$_SESSION["pwd"]="/";}
shell_exec("cd ".$_SESSION["pwd"]);
$cmd = htmlspecialchars($_POST["cmd"]);
// user is moving to another directory
$cmd_aux = $cmd;
if(substr_count($cmd_aux , "cd")>0){
//$cmd = " ls ";
// moving backwards
if(substr_count($cmd_aux , "cd ..")>0){
$back = explode("/", $_SESSION["pwd"]);
$size = count($back);
$_SESSION["pwd"] = str_replace("/".$back[$size-1],"",$_SESSION["pwd"]);
// moving forwards
}else{
$cmd_aux = explode(" ", $cmd_aux);
if(!strstr($cmd_aux[1][0],"/")){
if(file_exists($_SESSION["pwd"]."/".$cmd_aux[1])){
if (!strcmp($_SESSION["pwd"], "/")){
$_SESSION["pwd"].= $cmd_aux[1];
}else{
$_SESSION["pwd"].= "/".$cmd_aux[1];
}
}else{
$output = "folder not found";
}
}else{
if(file_exists($cmd_aux[1])){
$_SESSION["pwd"] = $cmd_aux[1];
}else{
$output = "folder not found";
}
}
}
}else{
}
$path = "PATH=/sbin:/usr/sbin:/bin:/usr/bin:/wr/bin";
if(strstr($output,"folder not found")){
$output = 'folder "'.$cmd_aux[1].'" not found';
$cmd = "";
}else{
$output = shell_exec( $path." ; cd ".$_SESSION["pwd"]." ; ".$cmd);
}
//Format output
$output=str_replace("\n","<br>",$output);
echo '<div align="center"> <div id="preview" style= "BORDER-RIGHT: #000 1px solid; PADDING-RIGHT: 0px;
BORDER-TOP: #000 1px solid; PADDING-LEFT: 2px; PADDING-BOTTOM: 2px; WORD-SPACING: 1px; OVERFLOW: scroll;
BORDER-LEFT: #000 1px solid; WIDTH: 100%; PADDING-TOP: 1px;
BORDER-BOTTOM: #000 2px solid; HEIGHT: 350px; TEXT-ALIGN: left">
<p>'.$hostname.'@'.$ip.':'.$_SESSION["pwd"].'$ '.$cmd.'<br>'.$output.'</p> </div></div>';
?>
</div>
</div>
</div>
<div class="footer">
<?php include 'footer.php' ?>
</div>
</div>
</div>
</body>
</html>
<?php include 'functions.php'; include 'head.php'; ?>
<body id="vlan">
<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">VLAN Configuration <a href='help.php?help_id=vlan' onClick='showPopup(this.href);return(false);'><img align=right src="./img/question.png"></a></h1>
<?php session_is_started() ?>
<?php $_SESSION['advance']=""; ?>
<?php
echo '<center><strong>Existing VLANs</strong></center><hr>';
$tmp_vlan_file="/tmp/vlans.conf";
$vlans = shell_exec("/wr/bin/wrs_vlans --list >".$tmp_vlan_file);
$vlans = shell_exec("cat ".$tmp_vlan_file." | sed -n '/ /s/ \+/ /gp'");
$vlans = explode("\n", $vlans);
<?php include 'functions.php'; include 'head.php'; ?>
<body id="vlan">
<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">VLAN Configuration <a href='help.php?help_id=vlan' onClick='showPopup(this.href);return(false);'><img align=right src="./img/question.png"></a></h1>
<?php session_is_started() ?>
<?php $_SESSION['advance']=""; ?>
<?php
echo '<center><strong>Existing VLANs</strong></center><hr>';
$tmp_vlan_file="/tmp/vlans.conf";
$vlans = shell_exec("/wr/bin/wrs_vlans --list >".$tmp_vlan_file);
$vlans = shell_exec("cat ".$tmp_vlan_file." | sed -n '/ /s/ \+/ /gp'");
$vlans = explode("\n", $vlans);
echo '<table class="altrowstable firstcol" id="alternatecolor" width="100%">';
echo '<tr class="sub" align=center><th>Vlan ID</th><th>FID</th><th>Ports</th><th>Drop?</th><th>Priority</th><th>Action</th></tr>';
$counter = 0;
foreach($vlans as $line){
$counter++;
if($counter>=2 && !empty($line)){
$line = explode(" ", $line);
if(strcmp($line[3],"0x")){
$counter = 0;
foreach($vlans as $line){
$counter++;
if($counter>=2 && !empty($line)){
$line = explode(" ", $line);
if(strcmp($line[3],"0x")){
echo '<tr align=center><td bgcolor="'.$vlancolor[$line[1]].'">VLAN '.$line[1].'</td><td>'.$line[2].'</td><td>'.parse_mask2ports($line[3]).'</td><td>'.$line[4].'</td><td>'.$line[5].'</td><td><A HREF="delvlan.php?vlan='.$line[1].'.">Delete</A></td></tr>';
}else{
}else{
echo '<tr align=center><td>'.$line[1].'</td><td>'.$line[2].'</td><td>'.parse_mask2ports($line[3].$line[4]).'</td><td>'.$line[5].'</td><td>'.$line[6].'</td><td><A HREF="delvlan.php?vlan='.$line[1].'.">Delete</A></td></tr>';
}
}
}
//Form for a new one:
echo '<tr align=center>
<FORM method="POST" action="newvlan.php" "ENCTYPE="multipart/form-data">
}
}
}
//Form for a new one:
echo '<tr align=center>
<FORM method="POST" action="newvlan.php" "ENCTYPE="multipart/form-data">
<td align=center><INPUT type="text" size="3" name="vid" ></td>
<td align=center><INPUT type="text" size="3"name="fid" ></td>
<td align=center><INPUT type="text" size="5" name="mask" ></td>
<td align=center>
<select name="drop">
<option value="1">YES</option>
<option selected="selected" value="0">NO</option>
</select>
<select name="drop">
<option value="1">YES</option>
<option selected="selected" value="0">NO</option>
</select>
</td>
<td align=center>
<select name="prio">
<option selected="selected"value=""></option>
<option value="0">0</option>
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
<option value="6">6</option>
<option value="7">7</option>
</select>
<select name="prio">
<option selected="selected"value=""></option>
<option value="0">0</option>
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
<option value="6">6</option>
<option value="7">7</option>
</select>
</td>
<td align=center><INPUT type=submit value="Add VLAN" class="btn"></td>
</form>
</tr>';
echo '</table>';
?>
<br><p align="right"><A HREF="delvlan.php?vlan=all" onclick="return confirm('You are deleting all VLANs, are you sure?')">Delete All VLANs</A></p>
<?php
//Display Port2Vlan assignment
echo '<br><br>';
echo '<center><strong>Port2Vlan assignments</strong></center><hr>';
</form>
</tr>';
echo '</table>';
?>
<br><p align="right"><A HREF="delvlan.php?vlan=all" onclick="return confirm('You are deleting all VLANs, are you sure?')">Delete All VLANs</A></p>
<?php
//Display Port2Vlan assignment
echo '<br><br>';
echo '<center><strong>Port2Vlan assignments</strong></center><hr>';
echo '<table class="altrowstable firstcol" id="alternatecolor1" width="100%">';
echo '<tr><th>Port</strong></th><th>QMode</th><th>Priority</th><th>VLAN ID</th><th>MAC Address</th></tr>';
$tmp_vlan_file="/tmp/port2vlan.conf";
$vlans = shell_exec("/wr/bin/wrs_vlans --elist >".$tmp_vlan_file);
$vlans = shell_exec("cat ".$tmp_vlan_file." | sed -n '/ /s/ \+/ /gp'");
$vlans = explode("\n", $vlans);
$counter = 0;
foreach($vlans as $line){
$counter++;
if($counter>=2 && !empty($line)){
$line = explode(" ", $line);
$tmp_vlan_file="/tmp/port2vlan.conf";
$vlans = shell_exec("/wr/bin/wrs_vlans --elist >".$tmp_vlan_file);
$vlans = shell_exec("cat ".$tmp_vlan_file." | sed -n '/ /s/ \+/ /gp'");
$vlans = explode("\n", $vlans);
$counter = 0;
foreach($vlans as $line){
$counter++;
if($counter>=2 && !empty($line)){
$line = explode(" ", $line);
echo '<tr align=center><td>WR'.($line[1]+1).'</td><td>'.$line[2]." (".$line[3].')</td><td>'.($line[5]).'</td><td bgcolor="'.$vlancolor[$line[6]].'">VLAN '.$line[6].'</td><td>'.$line[7].'</td></td></tr>';
}
}
}
}
echo '<tr><td></td><td></td><td></td><td></td><td align=center><FORM method="POST" action="port2vlan.php"><INPUT type=submit align=center value="Edit Table" class="btn"></form></td></tr>';
echo '</table>';
?>
echo '</table>';
?>
<div id="bottommsg"><hr><p align="right"><A HREF="port2vlan.php">Assign Ports to VLANs</A></p></div>
</div>
</div>
</div>
<div class="footer">
<?php include 'footer.php' ?>
</div>
</div>
</div>
</body>
</html>
</div>
</div>
</div>
<div class="footer">
<?php include 'footer.php' ?>
</div>
</div>
</div>
</body>
</html>
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