Brauche Hilfe bei Connect/Disconnect Code
-
- Beiträge: 1
- Registriert: 20.09.2006, 16:29
hallo ich bräuchte ich auch mal hilfe beim connect/disconnect code
router ist der medion 40900 baugleich connect2air AP-600Rp baugleich zcom wg2000 baugleich sitecom 122
hier ist der html code:
[html]<<html>
<head>
<script>
<!--
helplocation = \"/configuration/summary\";
function bodyLoad() {
// This function is intentionally left blank
}
function writeOptTblBegin(nrLevels, arrCellWidth) {
document.write(\'<table>\');
document.write(\'<tr>\');
for (i=0; i<nrLevels; i++) {
document.write(\'<td><img><br></td>\');
}
document.write(\'</tr>\');
optTableCurrentLvl = 0;
return true;
}
function writeOptTblEnd(nrLevels) {
document.write(\'</table>\');
return true;
}
function writeTitle(strText) {
document.write(\'<tr>\');
document.write(\'<td>\');
document.write(strText);
document.write(\'</td>\');
document.write(\'</tr>\');
return true;
}
function writeSpace() {
document.write(\'<tr>\');
document.write(\'<td>\');
document.write(\' \');
document.write(\'</td>\');
document.write(\'</tr>\');
return true;
}
function writeFeature(strText,level,tooltip) {
optTableCurrentLvl = 0;
if (!tooltip) tooltip = \'\';
document.write(\'<tr>\');
for (j=0; j<(level - optTableCurrentLvl); j++) {
document.write(\'<td> </td>\');
}
document.write(\'<td>\');
document.write(strText);
document.write(\'</td>\');
optTableCurrentLvl++;
return true;
}
function writeSetting(strText,level) {
for (j=0; j</td>
</script>
<meta>
<link>
<title>Settings Summary</title>
<script>
</accessPointLocked>
</script>
</head>
<body>
<script>
top.writeHeader(\'Settings Summary\');
</script>
<script>
</i>
</script>
<br>
<script>
</script>
<script>
<!--
var FirmwareVersion = \"N/A\";
var BootcodeVersion = \"N/A\";
var FilesetVersion = \"N/A\";
var CC_FirmwareVersion = \"\";
var TEST = [
\"1.3.6.1.4.1.937.1.27.7\", \"NB_2.0.1.0\",
\"1.3.6.1.4.1.937.1.27.6\", \"0.5.2.0\",
\"1.3.6.1.4.1.937.1.27.9\", \"1.0.3.0\",
\"1.3.6.1.4.1.937.1.26.2.3\", \"No version info\",
null ];
for (var i=0; i <8>
</script>
<form>
<input>
</form>
<table>
<tr>
<td>
<script>
function clickbtn(){
location.href = parent.location.href;
}
function changepppoe() {
if(1==1) {
//alert(1);
MM_findObj(\'setobject_pppoestatus\').value = \"i1_3_6_1_4_1_937_2_1_3_16_0=\" + 2;
// alert(MM_findObj(\'setobject_pppoestatus\').value);
}
else {
//alert(1);
MM_findObj(\'setobject_pppoestatus\').value = \"i1_3_6_1_4_1_937_2_1_3_16_0=\" + 1;
// alert(MM_findObj(\'setobject_pppoestatus\').value);
}
document.pppoe.submit();
}
var wssOptions = \"\";
if (true) {
var securityWep = \"WEP\"
var securityDot1x = \"\"
var securityWpa = \"\"
wssOptions += securityWep;
if (securityWep != \"\" && (securityDot1x != \"\" || securityWpa != \"\"))
wssOptions += \", \";
wssOptions += securityDot1x;
if (wssOptions!=\"\" && securityDot1x != \"\" && securityWpa != \"\")
wssOptions += \", \";
wssOptions += securityWpa;
}
if (wssOptions == \"\")
wssOptions += \"None\";
optTableNrCols = 2;
optTableCellWidth = new Array(180,200);
writeOptTblBegin(optTableNrCols, optTableCellWidth);
writeTitle(\'Access Point Properties\');
writeFeature(\'SSID (internal radio):\', 0, \'Service Set ID\');
writeSetting(\'MEDION\', 2);
//writeFeature(\'SSID (expansion card radio) :\', 0, \'Service Set ID\');
/*if (false)
writeSetting(\'MEDION\', 2);
else
writeSetting(\'not present\', 2);*/
writeSpace();
var wanConnectionTypes = new Array(\'Disabled\',\'Static IP\',\'Dynamic IP\',\'PPPoE\',\'PPTP\');
writeTitle(\'Wide Area Network (WAN)\');
writeFeature(\'Connection Type:\', 0, \'\');
var wanConnection = 4;
writeSetting(wanConnectionTypes[wanConnection - 1], 2);
/*if (wanConnection != 1) {
//writeFeature(\'IP Address:\', 0);
//writeSetting(\'85.178.173.117<br>192.168.2.1<br>\', 2);
writeFeature(\'IP Address:\', 0);
var ip_pppoe=\'85.178.173.117\';
*/
if (wanConnection == 2) {
writeFeature(\'IP Address:\', 0);
writeSetting(\'192.168.2.1<br>\', 2);
}
if (wanConnection == 3) {
writeFeature(\'IP Address:\', 0);
writeSetting(\'85.178.173.117<br>192.168.2.1<br>\', 2);
}
if(wanConnection == 4) {
writeFeature(\'IP Address:\', 0);
var ip_pppoe=\'85.178.173.117\';
if(ip_pppoe==\"10.64.64.64\"||ip_pppoe==\"10.0.0.150\")
writeSetting(\"\",2);
else
writeSetting(\'85.178.173.117<br>\', 2);
if(2){
if(2 == 2) {
writeFeature(\'PPPOE Status:\', 0, \'\');
writeSetting(\'Connected\');
writeFeature(\'Change PPPOE Status:\', 0, \'\');
writeSetting(\"<input> \" );
} else {
//MM_findObj(\'pppoetype\').options[0].selected = true;
}
if(2 == 1) {
writeFeature(\'PPPOE Status:\', 0, \'\');
writeSetting(\'Connected\');
}
}}
if (wanConnection == 5 || wanConnection == 6) {
writeFeature(\'IP Address:\', 0);
var ip_pptp=\'85.178.173.117\';
if(ip_pptp==\"10.64.64.64\"||ip_pptp==\"10.0.0.150\")
writeSetting(\"\",2);
else
writeSetting(\'85.178.173.117<br>\', 2);
}
writeSpace();
writeTitle(\'Local Area Network (LAN)\');
writeFeature(\'IP Address:\', 0, \'\');
//1=ip
//2=interfaceIndex = 6
//autoLan en Lan
writeSetting(\'192.168.0.100<br>\', 2);
writeFeature(\'DHCP Server:\', 0);
writeSetting(\'Enabled\', 2);
writeFeature(\'Firewall:\', 0);
writeSetting(\'Disabled\', 2);
writeSpace();
writeTitle(\'Wireless Settings\');
writeFeature(\'Wireless Security:\', 0);
writeSetting(wssOptions, 2);
writeFeature(\'Access Control:\', 0);
writeSetting(\'Any client\', 2);
writeOptTblEnd();
</script>
<input>
</td>
</tr>
<tr><td><input><br></td></tr>
</table>
</td>
</tr>
<tr>
<td>
<br>
<table>
<tr><td><img><br></td></tr>
<tr><td><img><br></td></tr>
</table>
<br>
</body>
</html>
>[/html]
wäre nett wenn mir jemand helfen kann da ich schon vieles ausprobiert habe und es nicht wirklich funktioniert ... liegt vielleicht daran, dass ich mit mit html und java nich so auskenne
router ist der medion 40900 baugleich connect2air AP-600Rp baugleich zcom wg2000 baugleich sitecom 122
hier ist der html code:
[html]<<html>
<head>
<script>
<!--
helplocation = \"/configuration/summary\";
function bodyLoad() {
// This function is intentionally left blank
}
function writeOptTblBegin(nrLevels, arrCellWidth) {
document.write(\'<table>\');
document.write(\'<tr>\');
for (i=0; i<nrLevels; i++) {
document.write(\'<td><img><br></td>\');
}
document.write(\'</tr>\');
optTableCurrentLvl = 0;
return true;
}
function writeOptTblEnd(nrLevels) {
document.write(\'</table>\');
return true;
}
function writeTitle(strText) {
document.write(\'<tr>\');
document.write(\'<td>\');
document.write(strText);
document.write(\'</td>\');
document.write(\'</tr>\');
return true;
}
function writeSpace() {
document.write(\'<tr>\');
document.write(\'<td>\');
document.write(\' \');
document.write(\'</td>\');
document.write(\'</tr>\');
return true;
}
function writeFeature(strText,level,tooltip) {
optTableCurrentLvl = 0;
if (!tooltip) tooltip = \'\';
document.write(\'<tr>\');
for (j=0; j<(level - optTableCurrentLvl); j++) {
document.write(\'<td> </td>\');
}
document.write(\'<td>\');
document.write(strText);
document.write(\'</td>\');
optTableCurrentLvl++;
return true;
}
function writeSetting(strText,level) {
for (j=0; j</td>
</script>
<meta>
<link>
<title>Settings Summary</title>
<script>
</accessPointLocked>
</script>
</head>
<body>
<script>
top.writeHeader(\'Settings Summary\');
</script>
<script>
</i>
</script>
<br>
<script>
</script>
<script>
<!--
var FirmwareVersion = \"N/A\";
var BootcodeVersion = \"N/A\";
var FilesetVersion = \"N/A\";
var CC_FirmwareVersion = \"\";
var TEST = [
\"1.3.6.1.4.1.937.1.27.7\", \"NB_2.0.1.0\",
\"1.3.6.1.4.1.937.1.27.6\", \"0.5.2.0\",
\"1.3.6.1.4.1.937.1.27.9\", \"1.0.3.0\",
\"1.3.6.1.4.1.937.1.26.2.3\", \"No version info\",
null ];
for (var i=0; i <8>
</script>
<form>
<input>
</form>
<table>
<tr>
<td>
<script>
function clickbtn(){
location.href = parent.location.href;
}
function changepppoe() {
if(1==1) {
//alert(1);
MM_findObj(\'setobject_pppoestatus\').value = \"i1_3_6_1_4_1_937_2_1_3_16_0=\" + 2;
// alert(MM_findObj(\'setobject_pppoestatus\').value);
}
else {
//alert(1);
MM_findObj(\'setobject_pppoestatus\').value = \"i1_3_6_1_4_1_937_2_1_3_16_0=\" + 1;
// alert(MM_findObj(\'setobject_pppoestatus\').value);
}
document.pppoe.submit();
}
var wssOptions = \"\";
if (true) {
var securityWep = \"WEP\"
var securityDot1x = \"\"
var securityWpa = \"\"
wssOptions += securityWep;
if (securityWep != \"\" && (securityDot1x != \"\" || securityWpa != \"\"))
wssOptions += \", \";
wssOptions += securityDot1x;
if (wssOptions!=\"\" && securityDot1x != \"\" && securityWpa != \"\")
wssOptions += \", \";
wssOptions += securityWpa;
}
if (wssOptions == \"\")
wssOptions += \"None\";
optTableNrCols = 2;
optTableCellWidth = new Array(180,200);
writeOptTblBegin(optTableNrCols, optTableCellWidth);
writeTitle(\'Access Point Properties\');
writeFeature(\'SSID (internal radio):\', 0, \'Service Set ID\');
writeSetting(\'MEDION\', 2);
//writeFeature(\'SSID (expansion card radio) :\', 0, \'Service Set ID\');
/*if (false)
writeSetting(\'MEDION\', 2);
else
writeSetting(\'not present\', 2);*/
writeSpace();
var wanConnectionTypes = new Array(\'Disabled\',\'Static IP\',\'Dynamic IP\',\'PPPoE\',\'PPTP\');
writeTitle(\'Wide Area Network (WAN)\');
writeFeature(\'Connection Type:\', 0, \'\');
var wanConnection = 4;
writeSetting(wanConnectionTypes[wanConnection - 1], 2);
/*if (wanConnection != 1) {
//writeFeature(\'IP Address:\', 0);
//writeSetting(\'85.178.173.117<br>192.168.2.1<br>\', 2);
writeFeature(\'IP Address:\', 0);
var ip_pppoe=\'85.178.173.117\';
*/
if (wanConnection == 2) {
writeFeature(\'IP Address:\', 0);
writeSetting(\'192.168.2.1<br>\', 2);
}
if (wanConnection == 3) {
writeFeature(\'IP Address:\', 0);
writeSetting(\'85.178.173.117<br>192.168.2.1<br>\', 2);
}
if(wanConnection == 4) {
writeFeature(\'IP Address:\', 0);
var ip_pppoe=\'85.178.173.117\';
if(ip_pppoe==\"10.64.64.64\"||ip_pppoe==\"10.0.0.150\")
writeSetting(\"\",2);
else
writeSetting(\'85.178.173.117<br>\', 2);
if(2){
if(2 == 2) {
writeFeature(\'PPPOE Status:\', 0, \'\');
writeSetting(\'Connected\');
writeFeature(\'Change PPPOE Status:\', 0, \'\');
writeSetting(\"<input> \" );
} else {
//MM_findObj(\'pppoetype\').options[0].selected = true;
}
if(2 == 1) {
writeFeature(\'PPPOE Status:\', 0, \'\');
writeSetting(\'Connected\');
}
}}
if (wanConnection == 5 || wanConnection == 6) {
writeFeature(\'IP Address:\', 0);
var ip_pptp=\'85.178.173.117\';
if(ip_pptp==\"10.64.64.64\"||ip_pptp==\"10.0.0.150\")
writeSetting(\"\",2);
else
writeSetting(\'85.178.173.117<br>\', 2);
}
writeSpace();
writeTitle(\'Local Area Network (LAN)\');
writeFeature(\'IP Address:\', 0, \'\');
//1=ip
//2=interfaceIndex = 6
//autoLan en Lan
writeSetting(\'192.168.0.100<br>\', 2);
writeFeature(\'DHCP Server:\', 0);
writeSetting(\'Enabled\', 2);
writeFeature(\'Firewall:\', 0);
writeSetting(\'Disabled\', 2);
writeSpace();
writeTitle(\'Wireless Settings\');
writeFeature(\'Wireless Security:\', 0);
writeSetting(wssOptions, 2);
writeFeature(\'Access Control:\', 0);
writeSetting(\'Any client\', 2);
writeOptTblEnd();
</script>
<input>
</td>
</tr>
<tr><td><input><br></td></tr>
</table>
</td>
</tr>
<tr>
<td>
<br>
<table>
<tr><td><img><br></td></tr>
<tr><td><img><br></td></tr>
</table>
<br>
</body>
</html>
>[/html]
wäre nett wenn mir jemand helfen kann da ich schon vieles ausprobiert habe und es nicht wirklich funktioniert ... liegt vielleicht daran, dass ich mit mit html und java nich so auskenne
Ich würde sagen:
Connect:
Disconnect
Connect:
Code: Alles auswählen
/doc/ppp.htm?WINDWEB_URL=/doc/ppp.htm&PPP_connection_number=1&New_PPP_Action=0
Code: Alles auswählen
/doc/ppp.htm?WINDWEB_URL=/doc/ppp.htm&PPP_connection_number=1&New_PPP_Action=1
Hallo,
ich bin nun schon stundelang am Rumprobieren.
Ich habe einen Longshine LCS-883R-ADSL-UB Router.
dieser ist noch nicht erfasst.
Habe es nun hinbekommen, den status, die IP etc. zu erfassen über RouterControl, ich bekomme aber die Trennung und Verbindung nicht hin.
Kann mir evtl. jemand dabei helfen ?
Würde mich riesig freuen.
Vielen Dank schon mal,
ASDF
Hier der Quelltext der Seite:
---------
ich bin nun schon stundelang am Rumprobieren.
Ich habe einen Longshine LCS-883R-ADSL-UB Router.
dieser ist noch nicht erfasst.
Habe es nun hinbekommen, den status, die IP etc. zu erfassen über RouterControl, ich bekomme aber die Trennung und Verbindung nicht hin.
Kann mir evtl. jemand dabei helfen ?
Würde mich riesig freuen.
Vielen Dank schon mal,
ASDF
Hier der Quelltext der Seite:
---------
Code: Alles auswählen
<html>
<head>
<META HTTP-EQUIV="Pragma" CONTENT="no-cache">
<META HTTP-EQUIV="Refresh" CONTENT="8;URL=/doc/ppp.htm">
<script language=\'javascript\'>
var WanType = "1"
var st_ppp_connection_name = new Array(32);
var st_ppp_connection_if = new Array(32);
var st_ppp_connection_encap = new Array(32);
var st_ppp_connection_svc_name = new Array(32);
var st_ppp_connection_acct = new Array(32);
var st_ppp_connection_authentication = new Array(32);
var st_ppp_connection_auto_reconnect = new Array(32);
var st_ppp_connection_disconnect_timer = new Array(32);
var st_ppp_connection_mru = new Array(32);
var st_ppp_connection_mtu = new Array(32);
var st_ppp_connection_mss = new Array(32);
var st_ppp_connection_lcp_echo_interval = new Array(32);
var st_ppp_connection_lcp_echo_consec_fail_max = new Array(32);
var st_ppp_connection_status = new Array(32);
var st_ppp_connection_pkts_sent = new Array(32);
var st_ppp_connection_pkts_rcvd = new Array(32);
var st_ppp_connection_bytes_sent = new Array(32);
var st_ppp_connection_bytes_rcvd = new Array(32);
var st_ppp_connection_state = new Array(32);
st_ppp_connection_pkts_sent[0] = "20";
st_ppp_connection_pkts_rcvd[0] = "22";
st_ppp_connection_bytes_sent[0] = "827";
st_ppp_connection_bytes_rcvd[0] = "761";
st_ppp_connection_state[0] = "0";
st_ppp_connection_name[0] = "PPPoPvc 0";
st_ppp_connection_if[0] = "Pvc 0";
st_ppp_connection_encap[0] = "PPPoE";
st_ppp_connection_svc_name[0] = "AOL";
st_ppp_connection_acct[0] = "simple ppp account Pvc 0";
st_ppp_connection_authentication[0] = "Auto";
st_ppp_connection_auto_reconnect[0] = "Enabled";
st_ppp_connection_disconnect_timer[0] = "0";
st_ppp_connection_mru[0] = "1492";
st_ppp_connection_mtu[0] = "1454";
st_ppp_connection_mss[0] = "1432";
st_ppp_connection_lcp_echo_interval[0] = "10";
st_ppp_connection_lcp_echo_consec_fail_max[0] = "6";
st_ppp_connection_status[0] = "Connected";
var st_num_of_ppp_connections = "1"
var is_E2_Supported = "0"
var st_ppp_status = "9"
var st_ppp_con_no = "1"
var st_ppp_action = "0"
var has_dialup = "0"
</script>
</head>
<BODY BGCOLOR=WHITE>
<FORM method=get><INPUT TYPE=HIDDEN NAME=WINDWEB_URL VALUE=/doc/ppp.htm>
<CENTER>
<FONT SIZE=+1 COLOR=BLUE>PPP</FONT><P>
<TABLE BORDER=1 CELLPADDING=10>
<TR><TH>#</TH><TH>Connection Name</TH><TH>Interface</TH><TH>Mode</TH><TH>Status</TH><TH>Pkts Sent</TH><TH>Pkts Rcvd</TH><TH>Bytes Sent</TH><TH>Bytes Rcvd</TH></TR>
<script language=\'javascript\'>
for (var i = 0; i < st_num_of_ppp_connections; i++)
{
document.write ("<TR align=center><TD>"+(i+1)+"</TD>");
document.write ("<TD>"+st_ppp_connection_name[i]+"</TD>");
document.write ("<TD>"+st_ppp_connection_if[i]+"</TD>");
document.write ("<TD>"+st_ppp_connection_encap[i]+"</TD>");
document.write ("<TD id=ConnectionStatus_Value-"+(i+1)+">"+st_ppp_connection_status[i]+"</TD>");
document.write ("<TD>"+st_ppp_connection_pkts_sent[i]+"</TD>");
document.write ("<TD>"+st_ppp_connection_pkts_rcvd[i]+"</TD>");
document.write ("<TD>"+st_ppp_connection_bytes_sent[i]+"</TD>");
document.write ("<TD>"+st_ppp_connection_bytes_rcvd[i]+"</TD>");
}
document.write ("</TR></TABLE>\\n<P>");
if (WanType == 1)
{
document.write ("If a * appears under Mode column, you need to ");
document.write("<A HREF=wan_adv.htm>check the WAN configuration</A> to make sure the VC has the correct encapsulation.<P>\\n");
}
</script>
<B>Connection #</B>
<INPUT TYPE=text NAME=PPP_connection_number VALUE="1" SIZE=5 >
<P>
<SELECT NAME=New_PPP_Action >
<OPTION VALUE=0 SELECTED> Connect </OPTION>
<OPTION VALUE=1 > Disconnect </OPTION>
</SELECT>
<INPUT type=submit value="Execute">
<br>
<script language=\'javascript\'>
if (st_ppp_status != 9)
{
document.write("PPP "+st_ppp_con_no+": ");
if (st_ppp_status == 4)
{
if (st_ppp_action == 0)
document.write("Connected OK");
else
document.write("Disconnected OK");
}
else if (st_ppp_status == 5)
{
if (st_ppp_action == 0)
document.write("Connect ERROR");
else
document.write("Disconnect ERROR");
}
else if (st_ppp_status == 2)
{
if (st_ppp_action == 0)
document.write("Connecting...");
else
document.write("Disconnecting...");
}
else if (st_ppp_status == 7)
document.write("is currently connected!");
else if (st_ppp_status == 8)
document.write("is currently not connected!");
else if (has_dialup == 1)
{
if (st_ppp_status == 11)
{
if (st_ppp_action == 0)
document.write("Dialing...");
else
document.write("Dropping...");
}
else if(st_ppp_status == 12)
document.write("does not exist!");
}
else if (st_ppp_status == 11)
document.write("does not exist!");
document.write("\\n");
}
</script>
</CENTER>
</FORM>
</BODY>
</HTML>
Zuletzt geändert von ASDF am 02.06.2006, 10:31, insgesamt 1-mal geändert.