summaryrefslogtreecommitdiff
path: root/cleopatre/application/spidgoahead/web/br0.asp
diff options
context:
space:
mode:
Diffstat (limited to 'cleopatre/application/spidgoahead/web/br0.asp')
-rw-r--r--cleopatre/application/spidgoahead/web/br0.asp264
1 files changed, 264 insertions, 0 deletions
diff --git a/cleopatre/application/spidgoahead/web/br0.asp b/cleopatre/application/spidgoahead/web/br0.asp
new file mode 100644
index 0000000000..3fdf176b5a
--- /dev/null
+++ b/cleopatre/application/spidgoahead/web/br0.asp
@@ -0,0 +1,264 @@
+<html>
+
+<head>
+ <title>SPC 300 - SPiDCOM</title>
+
+<link rel="stylesheet" href="style/normal_ws.css" type="text/css">
+
+<style type = 'text/css'>
+div.margina,table.margina{
+ margin-left:5%;
+ width:500px;
+ background-color:#F5F5F5;
+}
+td{
+ padding-left:5px;
+}
+
+input[type='text']{
+ margin-left:auto;
+ margin-right:auto;
+ text-align:center;
+}
+input[disabled='disabled'] {
+ background-color:BBBBBB;
+ color:white;
+ cursor:default;
+}
+body{
+ background-image: url("/spidcom.gif");
+ background-repeat: no-repeat;
+ background-attachment: fixed;
+ background-position: center center;
+}
+
+</style>
+
+<script type='text/javascript'>
+
+var mac = <% spidcomAspGetMac('br0'); %>
+var ip_data = <% spidcomAspGetIpData('br0'); %>
+
+
+//var online_station = '< % spidcomAspEocGetTopo(); % >';
+//var station_array = online_station.split('-');
+
+
+var ip_data_array = ip_data.split(':');
+
+var ip_array;
+var nm_array;
+var gw_array;
+
+if(ip_data_array[1].length == 0)
+ ip_array = new Array("0","0","0","0")
+else
+ ip_array = ip_data_array[1].split('.');
+
+if(ip_data_array[2].length == 0)
+ nm_array = new Array("0","0","0","0")
+else
+ nm_array = ip_data_array[2].split('.');
+
+if(ip_data_array[4].length == 0)
+ gw_array = new Array("0","0","0","0")
+else
+ gw_array = ip_data_array[4].split('.');
+
+
+
+var dhcp = ip_data_array[0];
+var mac_array = mac.split(':');
+
+
+
+function validate()
+{
+ parent.footer2.document.getElementById('error_console').innerHTML = "";
+
+ if(ip_data.indexOf("error") >= 0) // error
+ parent.footer2.document.getElementById('error_console').innerHTML += "<small style='margin-left:3px'>IP data : error condition: " + ip_data.toString() + "</small><br>";
+ else
+ parent.footer2.document.getElementById('error_console').innerHTML += "<small style='margin-left:3px'>IP data : OK</small><br>";
+
+ if(mac.indexOf("error") >= 0) // error
+ parent.footer2.document.getElementById('error_console').innerHTML += "<small style='margin-left:3px'>MAC : error condition: " + mac.toString() + "</small><br>";
+ else
+ parent.footer2.document.getElementById('error_console').innerHTML += "<small style='margin-left:3px'>MAC : OK</small><br>";
+
+ /*
+ if(online_station.indexOf("error") >= 0) // error
+ parent.footer2.document.getElementById('error_console').innerHTML += "<code>Online station : error condition: " + mac.toString(); + "</code><br>";
+ else
+ parent.footer2.document.getElementById('error_console').innerHTML += "<code>Online station : OK</code><br>";
+ */
+}
+
+
+function showTip(){
+document.getElementById('tooltip').innerHTML = "You must restart modem for the changes to take effect";
+}
+
+function clearTip(){
+document.getElementById('tooltip').innerHTML = "";
+}
+
+function reboot_flag()
+{
+ document.getElementById('reboot').value = 'yes';
+}
+
+function refresh(){
+parent.content.location.reload();
+}
+
+
+function joinadd(){
+document.getElementById('ip').value = document.getElementById('ipe1').value + '.' + document.getElementById('ipe2').value + '.' + document.getElementById('ipe3').value + '.' + document.getElementById('ipe4').value;
+document.getElementById('nm').value = document.getElementById('nete1').value + '.' + document.getElementById('nete2').value + '.' + document.getElementById('nete3').value + '.' + document.getElementById('nete4').value;
+document.getElementById('gw').value = document.getElementById('gwe1').value + '.' + document.getElementById('gwe2').value + '.' + document.getElementById('gwe3').value + '.' + document.getElementById('gwe4').value;
+}
+
+function set_refresh(){
+
+if (document.getElementById('refresh_or_not').checked)
+ document.getElementById("stat_iframe").contentWindow.RestartRefresh();
+else
+ document.getElementById('stat_iframe').contentWindow.StopRefresh();
+}
+
+function checkMainForm(){
+ return true;
+}
+
+function fill_ip_data()
+{
+
+var idip = 'ipe';
+var idnet = 'nete';
+var idgw = 'gwe';
+var idmac = 'mace'
+
+for (var i=1;i<=4;i++)
+{
+document.getElementById(idip+i).value = ip_array[i-1];
+document.getElementById(idnet+i).value = nm_array[i-1];
+document.getElementById(idgw+i).value = gw_array[i-1];
+document.getElementById(idmac+i).value = mac_array[i-1];
+}
+document.getElementById(idmac+5).value = mac_array[4];
+document.getElementById(idmac+6).value = mac_array[5];
+
+
+if (dhcp == 'DHCP')
+ document.mainForm.dhcp[0].checked = 'checked';
+
+
+ joinadd();
+}
+</script>
+</head>
+
+
+<body onload='javascript:validate();fill_ip_data();'>
+<!-- Settings name -->
+<div class='margina' > <h2>Bridge configuration</h2></div>
+
+<!-- Main form -->
+
+<form name='mainForm' action='/goform/formAction' target='_self' method='GET' onSubmit='return checkMainForm();'>
+
+<input type='hidden' name='reboot' id='reboot' value='no'/> <!-- This will be passed by form -->
+<input type='hidden' name='inter' id='inter' value='br0'/> <!-- This will be passed by form -->
+
+
+<table name = 'ipData' class='margina' style='background-color:#FFFFFF' border='0'>
+<tr>
+<td><h3>Network configuration</h3></td>
+</tr>
+<tr>
+<td>Current IP address</td>
+<td></td><td></td>
+<td><input id='ipe1' type='text' size=3 maxlength=3 value='0'/> </td>
+<td><input id='ipe2' type='text' size=3 maxlength=3 value='0'/> </td>
+<td><input id='ipe3' type='text' size=3 maxlength=3 value='0'/> </td>
+<td><input id='ipe4' type='text' size=3 maxlength=3 value='0'/> </td>
+<td><input type='hidden' name='ip' id='ip' value='0'/> </td> <!-- This will be passed by form -->
+</tr>
+
+<tr>
+<td>Current netmask</td>
+<td></td><td></td>
+<td><input id='nete1' type='text' size=3 maxlength=3 value='0'/> </td>
+<td><input id='nete2' type='text' size=3 maxlength=3 value='0'/> </td>
+<td><input id='nete3' type='text' size=3 maxlength=3 value='0'/> </td>
+<td><input id='nete4' type='text' size=3 maxlength=3 value='0'/> </td>
+<td><input type='hidden' name='nm' id='nm' value='0'/> </td> <!-- This will be passed by form -->
+</tr>
+<tr>
+<td>Current gateway address</td>
+<td></td><td></td>
+<td><input id='gwe1' type='text' size=3 maxlength=3 value='0'/> </td>
+<td><input id='gwe2' type='text' size=3 maxlength=3 value='0'/> </td>
+<td><input id='gwe3' type='text' size=3 maxlength=3 value='0'/> </td>
+<td><input id='gwe4' type='text' size=3 maxlength=3 value='0'/> </td>
+<td><input type='hidden' id='gw' name='gw' value='0'/> </td> <!-- This will be passed by form -->
+</tr>
+<tr align='center'>
+<td align='left'>MAC address</td>
+
+<td><input disabled='disabled' id='mace1' type='text' size=2 maxlength=2 value='0'/> </td>
+<td><input disabled='disabled' id='mace2' type='text' size=2 maxlength=2 value='0'/> </td>
+<td><input disabled='disabled' id='mace3' type='text' size=2 maxlength=2 value='0'/> </td>
+<td><input disabled='disabled' id='mace4' type='text' size=2 maxlength=2 value='0'/> </td>
+<td><input disabled='disabled' id='mace5' type='text' size=2 maxlength=2 value='0'/> </td>
+<td><input disabled='disabled' id='mace6' type='text' size=2 maxlength=2 value='0'/> </td>
+</tr>
+<tr>
+<td>DHCP Mode</td>
+<td></td><td></td><td></td><td></td>
+<td><input type='radio' name='dhcp' value='dhcp'/>ON</td>
+<td><input type='radio' name='dhcp' value='static' checked='checked'/>OFF</td>
+</tr>
+
+</table>
+
+<div class='margina'><h2>Activity statistics</h2></div>
+<table id='background-image' class='d25' style='margin-left:5%;width:500px' border='0'> <tr align='center'><td colspan='2'>RX:</td><td colspan='2'>TX:</td></tr>
+<tr><td class='d25' >Bytes</td><td class='d25' id='rb' bgcolor='lavender' align='center'></td><td>Bytes</td> <td class='d25' id = 'tb' bgcolor='lavender' align='center'></td></tr>
+<tr><td class='d25' >Packets</td><td class='d25' id='rp' bgcolor='lavender' align='center'></td><td>Packets</td> <td class='d25' id = 'tp' bgcolor='lavender' align='center'></td></tr>
+<tr><td class='d25' >Errors</td><td class='d25' id='re' bgcolor='lavender' align='center'></td><td>Errors</td> <td class='d25' id = 'te' bgcolor='lavender' align='center'></td></tr>
+<tr><td class='d25' >Drops</td><td class='d25' id='rd' bgcolor='lavender' align='center'></td><td>Drops</td> <td class='d25' id = 'td' bgcolor='lavender' align='center'></td></tr>
+<tr><td class='d25' >Fifo</td><td class='d25' id='rf' bgcolor='lavender' align='center'></td><td>Fifo</td> <td class='d25' id = 'tf' bgcolor='lavender' align='center'></td></tr>
+<tr><td class='d25' >Frame</td><td class='d25' id='rfr' bgcolor='lavender' align='center'></td><td>Colls</td> <td class='d25' id = 'tc' bgcolor='lavender' align='center'></td></tr>
+<tr><td class='d25' >Compressed</td><td class='d25' id='rc' bgcolor='lavender' align='center'></td><td>Carrier</td> <td class='d25' id = 'tcar' bgcolor='lavender' align='center'></td></tr>
+<tr><td class='d25' >Multicast</td><td class='d25' id='rm' bgcolor='lavender' align='center'></td><td>Compressed</td> <td class='d25' id = 'tcom' bgcolor='lavender' align='center'></td></tr>
+
+
+</table>
+<div class='margina' align='right'>
+Auto refresh<input type='checkbox' name='refresh_or_not' id='refresh_or_not' onchange='set_refresh();' checked='checked' >
+</div>
+
+<div class='margina' style='margin-top:5px' align='right'>
+<pre ></pre>
+<input type='button' value='Refresh' onclick='javascript:refresh();'>
+<input type='submit' onclick='javascript:joinadd();' value='Save configuration' onmouseover='javascript:showTip();' onmouseout='javascript:clearTip();'/>
+<input type='submit' value='Restart the modem' onclick='javascript:reboot_flag();'/>
+<pre id ='tooltip'></pre>
+</div>
+
+
+</form>
+
+
+
+
+
+
+
+<iframe id='stat_iframe' name='stat_iframe' src ="stat.asp?interface=br0" frameborder='0' height='5'>
+ <p>Your browser does not support iframes.</p>
+</iframe>
+</body>
+</html> \ No newline at end of file