Router Reconnect

0

Witam wszystkich, mój problem polega na tym, że niedawno kupiłem sobie router żeby podzielić sieć na dwa kompy.
Wszytko fajnie gra dopóki nie potrzebuje nowego adresu IP. W tym momencie muszę wejść na stronę routera(http://192.168.1.1/) używając przeglądarki, zalogować się, wejść w opcje, kliknąć przycisk [Disconnect] następnie [Connect]. Jest to trochę uciążliwe, dlatego chciałbym żebyście mi pomogli jak napisać taki program żeby za mnie wykonał te funkcje automatycznie. Napisałem taki program w AutoIT ale jest trochę nieporęczny bo aby wejść w ustawienia musi użyć kursora myszy i przeglądarki, a mi chodzi o to żeby program zrobił nie używając kursora myszy i przeglądarki (korzystając z poziomu Delphi ). Cała procedura powinna wyglądać tak:

łączenie z adresem http://192.168.1.1/> pobieranie źródła strony > wpisanie loginu, hasła > uruchomienie następnej podstronki (tzw. jak ja to robie klikam przycisk Log In) > wejście w następną podstronę ( przycisk SETUP) > uruchomieniu przycisku [Disconnect] , [Connect].

Problem pojawia się na kroku 3,4,5,6,7 :) ponieważ nie wiem jak to wszytko dalej zrobić z poziomu delphi

Także prosiłbym o pomoc z waszej strony.
Z góry dzięki.: )

0

Kiedys tez o czyms takim myslam ale w koncu zabraklo mi zapalu aby taki projekt wykonac.
Wiec tak ja bym to zrobil tak:
Uzyl komponentu WebBrowser.

Po kliknieciu buttona 'nowe ip'.
-Raczej zrob tu watek bo musisz poczekac zawsze az cala strona Ci sie zaladuje. Mozesz to pominac ale tak program bedzie bardziej profesjonalny.
-Jak dobrze zrozumialem to masz na tej pierwszej stronie zwykly formularz wiec musisz wpisac w niego login i haslo i zasymulowac kliklniecie buttona submit(ktory w Twoim przypadku moze sie wyswietlac jako link log in)
Oczywiscie ladujesz strone:

webbrowser1.navigate('http://192.168.1.1/');
form1.webbrowser1.OleObject.document.forms.item(0).elements.item(0).value:='login';
form1.webbrowser1.OleObject.document.forms.item(0).elements.item(1).value:='haslo';

moj router na swoje stronie uzywa ramek wtedy musisz uzyc czegos takiego:

form1.webbrowser1.OleObject.Document.frames.Item(numer ramki).document.forms.item(0).elements.item(0).value:='login';
form1.webbrowser1.OleObject.Document.frames.Item(numer ramki).document.forms.item(0).elements.item(2).value:='haslo';

a submit to masz cos takiego
form1.webbrowser1.OleObject.document.forms.item(0).Submit; (tego nie jestem pewien) Pokombinuj.

Aha robilem kiedys cos podobnego i juz nie pamietam czemu uzylem bardziej skomplikowanej procedury. Pokombinuj!!

var klik:IHTMLElement;
  doc:IHTMLdocument2;
begin
  doc:= WebBrowser1.Document as IHTMLDocument2;
  klik:=Doc.all.item('Submit',0) as IHTMLElement;
  klik.click;

i Teraz w zaleznosci od tego jak te przyciski sie przedstwiaja, czy to jest link do skryptu czy do strony, jak do strony to w zasadzie latwiej bo uzywasz webbrowser.navigate a jak nie to tu Ci sie przyda ta procedura wymieniona wyzej i zamiast nazwy obiektu 'Submit' wpisujesz nazwe tego przycisku, moze to byc np 'mnuSetup' albo cos podobnego.
Analogicznie postepujesz z reszta. Pamietaj ze musisz odczekac az strona sie zaladuje zanim np. wpsiujesz login i haslo.
Na poczatek proponuje zrobic sobie na kazdy z tych krokow buttona i obserwowac jak to dziala. Tzn. Button: Zaladuj, Wpisz login i haslo, kliknij LogIn, kliknij Setup itd.
Pozniej oczywiscie mozesz ukryc webbrowsera i zrobic to jednym buttonem.
Do sprawdzania czy sie zaladowala strona uzywaj WebBrowser1DocumentComplete. Uwazaj bo z tego co pamietam to w przypadku ramek zakonczenie ladowania kazdej ramki z osobna spowoduje wywolanie procedury.

Pisz to moge pomoc, ale nie napisze toego za ciebie!

0

Wielkie dzięki stary!!!!!! ;-) [browar] [browar]
Mam teraz przynajmniej podstawę jak to zacząć robić w ogóle :)

Problem polega teraz na tym że w moim Delphi nie ma komponentu WebBrowser ani grupy/działu Internet :(
Dlatego jakby ktoś mógł napisać albo dać linka gdzie go znaleŹć to byłbym bardzo wdzięczny : )

0

-Raczej zrob tu watek bo musisz poczekac zawsze az cala strona Ci sie zaladuje.

Mógłbyś mi dokładniej wytłumaczyć o co ci tu chodziło? Bo nie mam tego komponentu jeszcze więc mało wiem na razie o tym. W AutoIT było coś takiego ale używało się do tego WinWaitActive a w Delphi chyba czegoś takiego nie ma.

0

Sorry nie zauważyłem u ciebie tego :d

Do sprawdzania czy sie zaladowala strona uzywaj WebBrowser1DocumentComplete. Uwazaj bo z tego co pamietam to w przypadku ramek zakonczenie ladowania kazdej ramki z osobna spowoduje wywolanie procedury.

Powyższy Post Nieaktualny.

0

Poczytaj w artykułach o watkach. Wbrew pozorom stosuje sie je bardzo latwo. Tak jest ladniej ale nie musisz tego stosowac.
W innym wypadku uzywaj sobie petli ktora bedzie sprawdzac czy strona sie zaladowala wiec czy mozna kontynowac i czy juz nie minela np 15sekund co rodzilo by podejrzenie ze strona sie juz nie zaladuje. i timera(zeby sie nie zapetlilo na wypadek bledu polaczenia). Roznica wtedy bedzie taka, ze program nie bedzie na nic reagowal podczas wykonywania calej procedury, nie bedzie rowniez postepu pokazywal np. w memo i kilka innych.
Chyba indy ma jakis odpowiednik ale nie jestem pewien. To juz poszperaj.

0

W takim razie ponizszy post nie aktualny. Zostawiam ewentualnie dla innych.

daroch napisał(a)

Poczytaj w artykułach o watkach. Wbrew pozorom stosuje sie je bardzo latwo. Tak jest ladniej ale nie musisz tego stosowac.
W innym wypadku uzywaj sobie petli ktora bedzie sprawdzac czy strona sie zaladowala wiec czy mozna kontynowac i czy juz nie minela np 15sekund co rodzilo by podejrzenie ze strona sie juz nie zaladuje. i timera(zeby sie nie zapetlilo na wypadek bledu polaczenia). Roznica wtedy bedzie taka, ze program nie bedzie na nic reagowal podczas wykonywania calej procedury, nie bedzie rowniez postepu pokazywal np. w memo i kilka innych.
Chyba indy ma jakis odpowiednik ale nie jestem pewien. To juz poszperaj.

0

A wiesz może czy istnieje sposób sprawdzenia która rama ma jaki numer? Bardzo by to pomogło ;-) .

0

Sprawdz w zrodle strony. To sa numery kolejne.
Sprawdz metoda prob i bledow!

0

Jak pisałeś

var klik:IHTMLElement;
doc:IHTMLdocument2;


to co miałeś wpisane w <b>`Uses` </b>pamiętasz może?
0

no wlasnie zapomnialem o tym.
chyba IdHTTP powinno wsytarczyc.

0

Niestety to nie jest IdHTTP (albo nie tylko). Może istnieje jakiś inny kod do "wciskania" tych "buttonów"?
Bo już tylko to by wystarczyło mi do ukończenia programu : ) bo jeśli chodzi o form1.webbrowser1.OleObject.document.forms.item(1).elements.item(0).value:='login';
form1.webbrowser1.OleObject.document.forms.item(1).elements.item(1).value:='pass';

To działa bez zarzutu : ).
0

sproboj to: MSHTML
dawno juz nie pisalem w delphi, idhttp to co innego z tego co pamietam.

0

Poduczyłem się trochę w Delphi i napisałem kod dla Buttona3 który ma symulować kliknięcie przyciku [Log In] Tylko jest mały problem :/

Tu macie fragment kodu :

procedure TForm1.Button3Click(Sender: TObject);
VAR
Submit : IHTMLInputElement;
dokumentwww : IHTMLDocument3;
begin
dokumentwww := WebBrowser1.Document as IHTMLDocument3;
if assigned(dokumentwww) then


Submit := (dokumentwww.getElementsByname('uiPostForm').item(0,'') as  IHTMLInputElement);

if assigned(Submit ) then begin //sprawdza czy istneje taki button

Submit.form.submit; //symuluje klikniecie


end else

Memo1.Text := 'Nie istnieje';


end;

I nie wiem co jest ale zawsze gdy odpalam Buttona 3 to zawsze się mi wyświetla komunikat z błędem ("Interface not Suported") :-( ,a jestem na 100% pewien że Id/Name tego cholernego przycisku jest uiPostForm próbowałem też robić tak:
Submit := (dokumentwww.getElementById('uiPostForm') as IHTMLInputElement);
Ale tak samo wyświetlał mi się Error ("Interface not Suported").

Próbowałem też twoim sposobem

procedure TForm1.Button4Click(Sender: TObject);
var klik:IHTMLElement;
  doc:IHTMLdocument2;
begin
  doc:= WebBrowser1.Document as IHTMLDocument2;
  klik:=Doc.all.item(0,'uiPostForm') as IHTMLElement;

  if assigned(klik) then begin
 klik.click;
 Memo1.Text := 'Istnieje';


end else

Memo1.Text := 'Nie istnieje';


end;

end.

W tym przypadku nie wyskakuje błąd, do memo1 wyświetla tekst 'istnieje', lecz nic po za tymi dwoma rzeczami się nie dzieje tzn. nie klika tego przycisku [Log In] :/

Nie wiem czego to może być winna.
Mója wersja Delphi:
Delphi7 Architekt Trial

Plzzzz pomóżcie sam już niewiem co mam robić [???] [???]

0

sproboj cos takiego
WebBrowser1.OleObject.document.forms.item(3).submit;
a jak nie to zamiesc tu zrodlo strony logowania do reoutera.

0

WebBrowser1.OleObject.document.forms.item(3).submit;
Próbowałem tego i niby wszystko jest OK (słychać kliknięcie tego buttona, ale wyskakuje komunikat "Bad Username/Password") a login i hasło jest wpisane poprawnie :/

Tutaj masz daroch źródło strony

<html>
<head>
<title>&gt;Log In</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css">
body {
	margin: 0px 0px;
	font-family: Verdana, Geneva, Arial, Helvetica, sans-serif;
	font-size: 9pt;
	font-weight: normal;
	text-decoration: none;
	color: #2A2A2A;
}
p, td {
}
.header
{
  font-family: Verdana, Geneva, Arial, Helvetica, sans-serif;
  font-size: 8pt;
  font-weight: bold;
}
.inputButton
{
	border-color: #505050;
	border-width: 1px;
	background-color: #9595C7;
	font-family: Verdana, Arial, Helvetica, sans-serif;
	font-weight: Bold;
	font-size: 11px;
	color: #FFFFFF;
	width: 61px;
	height: 18px;
	vertical-align: middle;
	margin: 4px;
}

</style>
<script language="JavaScript">
function uiDoOnLoad()
{
  document.getElementById("uiViewUserName").value=document.getElementById("uiPostUserName").value;
  document.getElementById("uiViewUserName").focus()
  //top.resizeTo(1024,780);
  if(document.getElementById("uiPostErrorState").value=="1")
   document.getElementById("uiViewErrorMessage").style.color="#CC3366";
}
function uiDoSave()
{
  document.getElementById("uiPostUserName").value=document.getElementById("uiViewUserName").value;
  document.getElementById("uiPostPassword").value=document.getElementById("uiViewPassword").value;
  document.getElementById("uiPostForm").submit();
}
</script>
</head>
<body onload="uiDoOnLoad()" bgcolor="#FFFFFF" leftmargin=0 topmargin=0 marginwidth=0 marginheight=0>
<form method="POST" action="../cgi-bin/webcm" target="_self" id="uiPostForm" >
<input type="hidden" name="var:main" value="menu" id="uiPostMenuMain">
<input type="hidden" name="var:style" value="style5" id="uiPostMenuStyle">
<input type="hidden" name="getpage"   value="../html/defs/style5/menus/menu.html" id="uiPostGetPage">
<input type="hidden" name="errorpage" value="../html/index.html" id="uiPostErrPage">
<input type="hidden" name="var:pagename" value="home" id="uiPostPageName">
<input type="hidden" name="var:errorpagename" value="home" id="uiPostErrorPageName">
<input type="hidden" name="var:menu" value="home" id="uiPostMenu">
<input type="hidden" name="var:menutitle" value="Home" id="uiPostMenuTitle">
<input type="hidden" name="var:pagetitle" value="Home" id="uiPostPageTitle">
<input type="hidden" name="var:pagemaster" value="home" id="uiPostPageMaster">
<input type="hidden" name="" value="<? error found ?>" id="uiPostErrorState" disabled>
<input type="hidden" name="login:command/username" value="" id="uiPostUserName"> 
<input type="hidden" name="login:command/password" value="" id="uiPostPassword">
</form>

<!-- Outer Table-->
<table width=761 cellpadding=0 cellspacing=0 align=center border=0>
 <tr><td width=761 height=36 nowrap></td></tr>
 <tr>
    <td width=761 align=left valign=top>
	
	<!-- Main Page -->
	<form onsubmit="return false;">
	
	<table cellspacing=1 border=0 cellpadding=4 align=center id="uiViewBodyTable" bgcolor="#000000" width="760" height="390">
	<tr>
		<td bgcolor="#000000" height=22 class="header"><font size=1 color="#FFFFFF">Please Log In to continue.</font></td>
	</tr>
	<tr>
		<td bgcolor="#ECECEC">
	
	  <table cellspacing=0 border=0 cellpadding=0 align=center id="uiViewBodyTable" width=300>
	   <tr><td colspan=2 align=center class="header">Log In</td></tr>
	   <tr><td colspan=2 height=8></td></tr>
	   <tr><td colspan=2 height=1 bgcolor="#505050"></td></tr>
	   <tr><td colspan=2 height=10></td></tr>
	   <tr>
		<td nowrap align=right><font size=2 class="header"><b>Username: </b></font></td>
		<td align=left><input type="text" value="" size="16" maxlength="64" name="uiViewUserName" id="uiViewUserName"></td>
	   </tr>
	   <tr>
		<td nowrap align=right ><font size=2 class="header"><b>Password: </b></font></td>
		<td align=left><input type="password" value="" size="16" maxlength="64" name="uiViewPassword" id="uiViewPassword""></td>	
	   </tr>
	   <tr><td colspan=2 height=10></td></tr>
	   <tr><td colspan=2 height=1 bgcolor="#505050"></td></tr>
	  </table>
	  
		</td>
	</tr>
	<tr>
          <td colspan=4 align=left bgcolor="#ECECEC" height=28>
             <table border=0 cellpadding=0 cellspacing=0 width="100%">
			  <tr>
			   <td align=center id="uiViewErrorMessage" style="color:#ECECEC;"><b>Error:&nbsp;<? error message ?>&nbsp;</b></td>
			   <td align=right><input type="submit" value="Log In" onclick="uiDoSave()" class="inputButton"></td>
			  </tr>
			 </table>
		</td>
	</tr>
	</table>
	
	</form>

	<!-- END main Page -->
	
	</td>
 </tr>
</table>
<!-- END Outer Table -->


</body>
</html>
0

No dobra zrobiłem już program : ). Tylko w dość (prymitywny) dziwny sposób :| a mianowicie program najpierw używa, tabulatora żeby zaznaczyć dany przycisk tzn.

Procedure PressTab(Ile : integer);
VAR
s : integer;
Begin
for s:=1 to ile do
begin
 keybd_event(VK_tab, 0, 0, 0);
keybd_event(VK_tab, 0, KEYEVENTF_KEYUP, 0);
end;
end;

Następnie gdy przycisk jest już zaznaczony używa

Procedure Clicko(Webbrowser1 :TWebBrowser);
VAR
klik:IHTMLElement;
  doc:IHTMLdocument2;
  ss : IHTMLselectElement;
Begin
 doc:= Webbrowser1.Document as IHTMLDocument2;
  klik:=Doc.activeElement as IHTMLElement;
  klik.click;
end;

bo tylko działa mi procedura kliknięcia aktywnego (wybranego) elementu :(.
Mam takie pytanie:
Jak można ominąć nieporęczne użycie procedury PressTab :/

1.Czy na przykład da się w jakiś inny sposób zaznaczyć te buttony?
Chodzi mi o takie coś

WebBrowser1.OleObject.document.forms.item(1).select  //zamiast .submit .select

Tylko to oczywiście nie działa, ale chodziło mi tu o przykład na jakiej zasadzie może to zaznacznie wyglądać.

  1. Czy może da się używać (PressTaba)
 keybd_event(VK_tab, 0, 0, 0);
keybd_event(VK_tab, 0, KEYEVENTF_KEYUP, 0);

Tylko w programie! Żeby jak zminimalizuje program nie zaznaczało ikon na pulpicie.

Czy istnieją takie sposoby???

P.S
Piszcie wszyscy nie tylko daroch który jako jedyny mi pomaga.

// kto chce odpowiadac ten chce odpowiadac i nie twoja rzecz kto ci nie odpowiada [mf]

0

Sproboj moze tak:
Poniewaz ty nie klikasz tego buttona. Ten button z tego co widze nie ma nazwy. A to co wpisalels z tego co mi sie wydaje (nie jestem ekspertem, znam html tylko tyle zeby go czytac na potrzeby miedzy innymi takich projektów) to nazwa ukrytego buttona, ktory wysyla z ukrytych wartosci login i haslo.
Natomiast przycisk Login wywoluje skrypt ktory przepisuje z editow login i haslo do wyzej wspomnianych ukrytych warosci.

według mnie sa dwa sposoby.
Albo wywolac ten skrypt. Mam gdzies zapisane jak to zrobic ale w domu wiece ewentualnie zjamimy sie tym wieczorem.

A drugi sposob to wpisac haslo i login bezposrednio do ukrytych warosci.
Wiec jak wypelniasz ten formularz to zmien nazwy na:

form1.webbrowser1.OleObject.document.forms.item(1).elements.item('uiPostUserName').value:='login';
form1.webbrowser1.OleObject.document.forms.item(1).elements.item('uiPostPassword').value:='haslo';
0

STARY BIG BROWAR DLA CIEBIE WSZYSTKO ZAJeBIŚCIE DZIAŁA [browar] [browar] [browar] [browar] [browar] [browar]
No To tak Pierw użyłem

form1.webbrowser1.OleObject.document.forms.item().elements.item('uiPostUserName').value:='login';
form1.webbrowser1.OleObject.document.forms.item().elements.item('uiPostPassword').value:='pass';

A następnie potwierdziłem to wszystko

WebBrowser1.OleObject.document.forms.item().submit;

"Setup Stronka" się załadowała i wszystko jest OK!

Jeszcze raz Dzięki stary jako jedyny mi pomogłeś na tym forum [browar]
Tylko szkoda że rzadko się pojawiasz : )

0

Tylko teraz mam następny problem : /. Na tej stronce czyli już (http://192.168.1.1/cgi-bin/webcm)
Jest już sporo buttonów do kliknięć a ja muszę wkliknąć [Setup] Próbowałem tak:

WebBrowser1.OleObject.document.forms.item().submit;

Ale tylko odświeża strone
później próbowałem dawać między nawiasy liczby(że niby jako te buttony)

WebBrowser1.OleObject.document.forms.item(123456789).submit;
<code/>
Ale wywalało tylko błąd :/
Następnie podałem nazwę tego buttona 

form1.webbrowser1.OleObject.document.forms.item(,'uiViewMenuTopSetupBtn').submit;

Ale nic tylko stronka się odświeżyła :(.
Masz może jakieś jeszcze pomysły?

P.S
Jak pisałeś

> Albo wywolac ten skrypt. Mam gdzies zapisane jak to zrobic ale w domu wiece ewentualnie zjamimy sie tym wieczorem.

To spróbuj to znaleść to może coś wymyślimy.

Tutaj masz fragment źródła strony
<script language="JavaScript"> var uiMenu = new Array(); uiMenu["top"]= new Array(); uiMenu["top"]["btn_on"]=null; uiMenu["top"]["btn_off"]=null; uiMenu["top"]["btn_cur"]=null; uiMenu["top"]["id"]=null; uiMenu["top"]["next"]="home"; uiMenu["home"]= new Array(); uiMenu["home"]["btn_on"]="../html/defs/style5/images/ti_menu_home_hilite.gif"; uiMenu["home"]["btn_off"]="../html/defs/style5/images/ti_menu_home.gif"; uiMenu["home"]["btn_cur"]=""; uiMenu["home"]["id"]="uiViewMenuTopHomeBtn"; uiMenu["home"]["next"]="setup"; uiMenu["setup"]= new Array(); uiMenu["setup"]["btn_on"]="../html/defs/style5/images/ti_menu_setup_hilite.gif"; uiMenu["setup"]["btn_off"]="../html/defs/style5/images/ti_menu_setup.gif"; uiMenu["setup"]["btn_cur"]=""; uiMenu["setup"]["id"]="uiViewMenuTopSetupBtn"; uiMenu["setup"]["next"]="adv"; uiMenu["adv"]= new Array(); uiMenu["adv"]["btn_on"]="../html/defs/style5/images/ti_menu_advanced_hilite.gif"; uiMenu["adv"]["btn_off"]="../html/defs/style5/images/ti_menu_advanced.gif"; uiMenu["adv"]["btn_cur"]=""; uiMenu["adv"]["id"]="uiViewMenuTopAdvBtn"; uiMenu["adv"]["next"]="tools"; uiMenu["tools"]= new Array(); uiMenu["tools"]["btn_on"]="../html/defs/style5/images/ti_menu_tools_hilite.gif"; uiMenu["tools"]["btn_off"]="../html/defs/style5/images/ti_menu_tools.gif"; uiMenu["tools"]["btn_cur"]=""; uiMenu["tools"]["id"]="uiViewMenuTopToolsBtn"; uiMenu["tools"]["next"]="status"; uiMenu["status"]= new Array(); uiMenu["status"]["btn_on"]="../html/defs/style5/images/ti_menu_status_hilite.gif"; uiMenu["status"]["btn_off"]="../html/defs/style5/images/ti_menu_status.gif"; uiMenu["status"]["btn_cur"]=""; uiMenu["status"]["id"]="uiViewMenuTopStatusBtn"; uiMenu["status"]["next"]="help"; uiMenu["help"]= new Array(); uiMenu["help"]["btn_on"]="../html/defs/style5/images/ti_menu_help_hilite.gif"; uiMenu["help"]["btn_off"]="../html/defs/style5/images/ti_menu_help.gif"; uiMenu["help"]["btn_cur"]=""; uiMenu["help"]["id"]="uiViewMenuTopHelpBtn"; uiMenu["help"]["next"]=null; uiMenu["left"]= new Array(); uiMenu["left"]["btn_on"]=null; uiMenu["left"]["btn_off"]=null; uiMenu["left"]["btn_cur"]=null; uiMenu["left"]["id"]=null; uiMenu["left"]["next"]=null; ``` ```
0

Tutaj proboj tak:

var klik:IHTMLElement;
  doc:IHTMLdocument2;
begin
  doc:= WebBrowser1.Document as IHTMLDocument2;
  klik:=Doc.all.item(0,'uiViewMenuTopSetupBtn') as IHTMLElement;

  if assigned(klik) then begin
 klik.click;
 Memo1.Text := 'Istnieje';
end else
Memo1.Text := 'Nie istnieje';
end;

jesli to nie zadziala to pokaz caly kod tej strony.

0

Próbowałem, i tak: Do Memo wpisuje że "Istnieje" a poza tym nic nie klika
Próbowałem też tak:

procedure TForm1.Button5Click(Sender: TObject);
var
  doc:IHTMLdocument2;
  clickes:IHTMLinputElement;
begin
  doc:= WebBrowser1.Document as IHTMLDocument2;
  clickes := doc.all.item(0,'uiViewMenuTopSetupBtn') as IHTMLInputElement;
  if assigned(clickes) then Begin
 Memo1.Text := 'Istnieje';
 clickes.form.submit;

end else
Memo1.Text := 'Nie istnieje';
end;


end.

Ale w tym przypadku wywala mi błąd "interface not suported"

Tutaj masz źródło:


<head>
<title>&gt;Home&gt;Home</title>
<meta http-equiv=content-type content="text/html; charset=iso-8859-1">
<style type="text/css">body {

	background-color: #FFFFFF;

	margin: 0px 0px;
	font-family: Verdana, Geneva, Arial, Helvetica, sans-serif;
	font-size: 9pt;
}


input:disabled {

  background-color: #DFDFDF; 

}



a { 

  text-decoration: none;
}


a:hover { 

  text-decoration: underline;
}


a.pageLink {	

	color: #000066;
	text-decoration: underline;
}


a.pageLink:hover {

	color: #000066;
	text-decoration: none;
}




b { 

  font-weight:      bold !important;  

}



ul {

  list-style-type: none;

}



p, td {

	font-family: Verdana, Geneva, Arial, Helvetica, sans-serif;
	font-size: 9pt;
	font-weight: normal;
	text-decoration: none;
	color: #2A2A2A;

}



form {

	margin: 0px;

	padding: 0px;

}



textarea {

	background-color: #FFFFFF;
	margin: 0px 0px;
	font-family: Verdana, Geneva, Arial, Helvetica, sans-serif;
	font-size: 8pt;
	font-weight: normal;
	text-decoration: none;
}




.header

{
	font-family: Verdana, Geneva, Arial, Helvetica, sans-serif;
	font-size: 8pt;
	font-weight: bold;
}


.uiErrorCell

{
  width:  20px;

  height: 16px;

  align:  left;

  text-decoration:  none;
  white-space: nowrap;

}


.uiErrorHint

{
  border-style: none;

  color: #CC3366;
}


.homeHeader

{
	font-family: Verdana, Geneva, Arial, Helvetica, sans-serif;
	font-size: 8pt;
	font-weight: bold;
	padding: 3px 0px 10px 0px;

	text-align: center;
}




.errorMessage {

	font-family: Verdana, Geneva, Arial, Helvetica, sans-serif;
	font-size: 8pt;
	font-weight: bold;
	color: #CC3366;
	text-align: center;
}




.statusSubHeader {

	font-family: Verdana, Geneva, Arial, Helvetica, sans-serif;
	font-size: 9pt;
	font-weight: normal;
}


.uiNoBorder

{
  border-bottom: 0px;
  border-top:    0px;
  border-right:  0px;
  border-left:   0px;
  text-align:    center;
}


.uiSSID

{
  font-family: Verdana, Geneva, Arial, Helvetica, sans-serif;
  border-bottom: 0px;
  border-top:    0px;
  border-right:  0px;
  border-left:   0px;
}


a.leftMenu

{
	font-size: 11px;
	color: #FFFFFF;
	font-family: Verdana, Arial, Helvetica, sans-serif;
	text-decoration: none;
	font-weight: Bold;
}


a.leftMenu:hover { 

	text-decoration: underline;
}


.leftMenu

{
	font-size: 11px;
	color: #FFFFFF;
	font-family: Verdana, Arial, Helvetica, sans-serif;
	text-decoration: none;
	font-weight: Bold;
}


.leftMenuHeader

{
	font-size: 11px;
	color: #FFFFFF;
	font-family: Verdana, Arial, Helvetica, sans-serif;
	text-decoration: none;
	font-weight: Bold;
	text-align: center;
	padding: 3px;

}


.inputButton

{
	border-color: #505050;
	border-width: 1px;
	background-color: #9595C7;
	font-family: Verdana, Arial, Helvetica, sans-serif;
	font-weight: Bold;
	font-size: 11px;
	color: #FFFFFF;
	width: 61px;

	height: 18px;
	vertical-align: middle;
	margin: 4px;
}


.inputSmallButton

{
	border-color: #505050;
	border-width: 1px;
	background-color: #9595C7;
	font-family: Verdana, Arial, Helvetica, sans-serif;
	font-weight: Bold;
	font-size: 9px;

	color: #FFFFFF;
	width: 58px;

	height: 18px;
	vertical-align: middle;
	margin: 4px;
}


.inputButtonWide

{
	border-color: #505050;
	border-width: 1px;
	background-color: #9595C7;
	font-family: Verdana, Arial, Helvetica, sans-serif;
	font-weight: Bold;
	font-size: 11px;
	color: #FFFFFF;
	width: 75px;

	height: 18px;
	vertical-align: middle;
	margin: 4px;
}


.inputButtonCommands

{
	border-color: #505050;
	border-width: 1px;
	background-color: #9595C7;
	font-family: Verdana, Arial, Helvetica, sans-serif;
	font-weight: Bold;
	font-size: 11px;
	color: #FFFFFF;
	width: 135px;

	height: 19px;

	vertical-align: middle;
	text-align: center;
}


.inputButtonWireless

{
	border-color: #505050;
	border-width: 1px 0px 1px 1px;
	background-color: #9595C7;
	font-family: Verdana, Arial, Helvetica, sans-serif;
	font-weight: Bold;
	font-size: 11px;
	color: #FFFFFF;
	width: 152px;
	height: 21px;
	vertical-align: middle;
	text-align: center;
}


.inputButtonWirelessRight

{
	border-color: #505050;
	border-width: 1px;
	background-color: #9595C7;
	font-family: Verdana, Arial, Helvetica, sans-serif;
	font-weight: Bold;
	font-size: 11px;
	color: #FFFFFF;
	width: 152px;
	height: 21px;
	vertical-align: middle;
	text-align: center;
}


.inputButtonWirelessHilite

{
	border-color: #505050;
	border-width: 1px 0px 1px 1px;
	background-color: #FFFFFF;
	font-family: Verdana, Arial, Helvetica, sans-serif;
	font-weight: Bold;
	font-size: 11px;
	color: #CC3366;
	width: 152px;
	height: 21px;
	vertical-align: middle;
	text-align: center;
}


.inputButtonWirelessRightHilite

{
	border-color: #505050;
	border-width: 1px;
	background-color: #FFFFFF;
	font-family: Verdana, Arial, Helvetica, sans-serif;
	font-weight: Bold;
	font-size: 11px;
	color: #CC3366;
	width: 152px;
	height: 21px;
	vertical-align: middle;
	text-align: center;
}


.homeMenuHeader

{
	font-family: Verdana, Geneva, Arial, Helvetica, sans-serif;
	font-size: 9pt;
	font-weight: normal;
	color: black;

	padding: 5px 0px 5px 56px;

	text-align: left;

}


</style>




<script language="JavaScript">
var uiMenu = new Array();


uiMenu["top"]= new Array();
uiMenu["top"]["btn_on"]=null;
uiMenu["top"]["btn_off"]=null;
uiMenu["top"]["btn_cur"]=null;
uiMenu["top"]["id"]=null;
uiMenu["top"]["next"]="home";

uiMenu["home"]= new Array();
uiMenu["home"]["btn_on"]="../html/defs/style5/images/ti_menu_home_hilite.gif";
uiMenu["home"]["btn_off"]="../html/defs/style5/images/ti_menu_home.gif";
uiMenu["home"]["btn_cur"]="";
uiMenu["home"]["id"]="uiViewMenuTopHomeBtn";
uiMenu["home"]["next"]="setup";

uiMenu["setup"]= new Array();
uiMenu["setup"]["btn_on"]="../html/defs/style5/images/ti_menu_setup_hilite.gif";
uiMenu["setup"]["btn_off"]="../html/defs/style5/images/ti_menu_setup.gif";
uiMenu["setup"]["btn_cur"]="";
uiMenu["setup"]["id"]="uiViewMenuTopSetupBtn";
uiMenu["setup"]["next"]="adv";

uiMenu["adv"]= new Array();
uiMenu["adv"]["btn_on"]="../html/defs/style5/images/ti_menu_advanced_hilite.gif";
uiMenu["adv"]["btn_off"]="../html/defs/style5/images/ti_menu_advanced.gif";
uiMenu["adv"]["btn_cur"]="";
uiMenu["adv"]["id"]="uiViewMenuTopAdvBtn";
uiMenu["adv"]["next"]="tools";

uiMenu["tools"]= new Array();
uiMenu["tools"]["btn_on"]="../html/defs/style5/images/ti_menu_tools_hilite.gif";
uiMenu["tools"]["btn_off"]="../html/defs/style5/images/ti_menu_tools.gif";
uiMenu["tools"]["btn_cur"]="";
uiMenu["tools"]["id"]="uiViewMenuTopToolsBtn";
uiMenu["tools"]["next"]="status";

uiMenu["status"]= new Array();
uiMenu["status"]["btn_on"]="../html/defs/style5/images/ti_menu_status_hilite.gif";
uiMenu["status"]["btn_off"]="../html/defs/style5/images/ti_menu_status.gif";
uiMenu["status"]["btn_cur"]="";
uiMenu["status"]["id"]="uiViewMenuTopStatusBtn";
uiMenu["status"]["next"]="help";

uiMenu["help"]= new Array();
uiMenu["help"]["btn_on"]="../html/defs/style5/images/ti_menu_help_hilite.gif";
uiMenu["help"]["btn_off"]="../html/defs/style5/images/ti_menu_help.gif";
uiMenu["help"]["btn_cur"]="";
uiMenu["help"]["id"]="uiViewMenuTopHelpBtn";
uiMenu["help"]["next"]=null;






uiMenu["left"]= new Array();
uiMenu["left"]["btn_on"]=null;
uiMenu["left"]["btn_off"]=null;
uiMenu["left"]["btn_cur"]=null;
uiMenu["left"]["id"]=null;
uiMenu["left"]["next"]=null;



function jslDoMenuRollOver(menu,item_id)
{
  var node,id;
  for(node=uiMenu[menu];node!=null;node=uiMenu[node["next"]])
  {
    id=node["id"];
    if(id==null) continue;
    node["btn_cur"]=document.getElementById(id).src;
    if(id==item_id) document.getElementById(id).src=node["btn_on"];
     else document.getElementById(id).src=node["btn_off"];
  }
}

function jslDoMenuRollOut(menu)
{
  var node,id;
  for(node=uiMenu[menu];node!=null;node=uiMenu[node["next"]])
  {
    id=node["id"];
    if(id==null) continue;
    document.getElementById(id).src=node["btn_cur"];
  }
}
</script>




<script language="JavaScript">


function jslDoToggleCheckBox(id)
{
  var checkbox,i;
  var num = jslDoToggleCheckBox.arguments.length;

  if(num==0) return;
  if(num==1)
  {
    // Toggle only one checkbox
    checkbox = document.getElementById(id);
	if(checkbox == null) return;

    if(checkbox.value=="on")
    {
      checkbox.value="off";
      checkbox.src="../html/defs/style5/images/ti_check_off.gif";
    }
    else
    {
      checkbox.value="on";
      checkbox.src="../html/defs/style5/images/ti_check_on.gif";
    }
  }
  else
  {
    checkbox = document.getElementById(id);
	if(checkbox == null) return;

    // Set the first one to "checked" and the rest to "unchecked"
    checkbox.value="on";
    checkbox.src="../html/defs/style5/images/ti_check_on.gif";

    for(i=1;i < num; i++)
	{
      checkbox = document.getElementById(jslDoToggleCheckBox.arguments[i]);
      if(checkbox == null) return;

      checkbox.value="off";
      checkbox.src="../html/defs/style5/images/ti_check_off.gif";
	}
  }
  return false;
}

function jslDoToggleViews(id)
{
  var view,i;
  var num = jslDoToggleViews.arguments.length;

  if(num==0) return;
  if(num==1)
  {
    // Toggle only one view
    view = document.getElementById(id);
	if(view == null) return;

    if(view.style.display=="block")
      view.style.display="none";
	else
      view.style.display="";
  }
  else
  {
    for(i=1;i < num; i++)
	{
      view = document.getElementById(jslDoToggleViews.arguments[i]);
      if(view == null) return;

      view.style.display="none";
	}

    view = document.getElementById(id);
	if(view == null) return;

    // Set the first view to "block"
    view.style.display="";
  }
  return false;
}
function doLoadPage(id,page)
{
  var handle = document.getElementById(id);
  if(handle!=null) handle.src=page;
}
function jslDoClearHighlight(id)
{
  var element;
  element = document.getElementById(id);
  if(element != null)
  {
	element.style.background = "white";
    //element.style.border="none";
  }
  element.blur();  
  return false;
}

function jslDoSetHighlight(id,color)
{
  var element;
  element = document.getElementById(id);
  if(element != null)
  {
	//element.style.borderStyle="solid";
	//element.style.borderColor="black";
	//element.style.borderBottomWidth="1";
	//element.style.borderTopWidth="1";
	//element.style.borderLeftWidth="1";
	//element.style.borderRightWidth="1";
	element.style.background = color;
  }
  element.select();
  element.focus();
  return false;
}

function jslIsString(id)
{
  if(document.getElementById(id).value.match("[a-zA-Z0-9_]+")!=null) return true;
  return false;
}

function jslSetValue(variable,value)
{
  document.getElementById(variable).value=document.getElementById(value).value;
}

function jslDisable(id)
{
  var i;
  var num=jslDisable.arguments.length;

  if(num==0) return;
  for(i=0;i < num; i++)
	  document.getElementById(arguments[i]).disabled=true;
}

function jslEnable(id)
{
  var i;
  var num=jslEnable.arguments.length;

  if(num==0) return;
  for(i=0;i < num; i++)
	  document.getElementById(arguments[i]).disabled=false;
}

function jslDoToggleRadio(id,index,maxId)
{
  var radiobox,i;
  var ids;

  if(maxId==1)
  {
    // Toggle only one radio
    radiobox = document.getElementById(id+index);
	if(radiobox == null) return;

    if(radiobox.value=="on")
    {
      radiobox.value="off";
      radiobox.src="../html/defs/style5/images/ti_radio_off.gif";
    }
    else
    {
      radiobox.value="on";
      radiobox.src="../html/defs/style5/images/ti_radio_on.gif";
    }
  }
  else
  {
    radiobox = document.getElementById(id+index);
	if(radiobox == null) return;

    // Set the current one to "checked" and the rest to "unchecked"
    radiobox.value="on";
    radiobox.src="../html/defs/style5/images/ti_radio_on.gif";
      for(i=0;i<maxId; i++)
	{
		if(i==index) continue;
      		radiobox = document.getElementById(id+i);
      		if(radiobox == null) return;

      		radiobox.value="off";
      		radiobox.src="../html/defs/style5/images/ti_radio_off.gif";
	}
  }
  return false;
}

function jslDoToggleDisabled(preText,currentId,maxId)
{
  var Element,i;
  var ids;

  if(maxId==1)
  {
    Element = document.getElementById(preText+currentId);
	if(Element == null) return;
    if(Element.disabled==true)
     Element.disabled=false;
    else Element.disabled=true;
  }
  else
  {
    Element = document.getElementById(preText+currentId);
	if(Element == null) return;

    // Set the current one to "true" and the rest to "false"
    Element.disabled=false;
   for(i=0;i<maxId; i++)
   {
     if(i==currentId) continue;
     Element = document.getElementById(preText+i);
     if(Element == null) return;
     Element.disabled=true;
   }
  }
  return false;
}

function jslPostToViewCheckBox(ViewId,PostId)
{
  if(document.getElementById(PostId).value=="1")
  {
  	document.getElementById(ViewId).value="on";
  	document.getElementById(ViewId).src="../html/defs/style5/images/ti_check_on.gif";
  }
  else
  {
  	document.getElementById(ViewId).value="off";
  	document.getElementById(ViewId).src="../html/defs/style5/images/ti_check_off.gif";
  }
}
function jslViewToPostCheckBox(PostId,ViewId)
{
  if(document.getElementById(ViewId).value=="on")
   document.getElementById(PostId).value="1";
  else document.getElementById(PostId).value="0";
}
function jslFormSetPost(id)
{
  document.getElementById(id).method="POST";
}
function jslFormSetGet(id)
{
  document.getElementById(id).method="GET";
}
function jslFormSubmit(id)
{
  document.getElementById(id).submit();
}
function jslPageErrorMsg(msg)
{
  var hint;
  if(msg!="")
  {
    hint=document.getElementById("uiViewErrorHint");
    hint.style.color = "#CC3366";
	alert("Check "+msg+" errors.");
	return false;
  }
  return true;
}

function jslGoTo(Menu,Page)
{
  // Menu: { null, "home", "setup", "adv", "tools", "status", "help" }
  // Page: { null, pagename (from left menu once you switch to a category) }

  if((Menu!=null) && (Menu!="")) document.getElementById("uiPostMenu").value=Menu;
  if((Page!=null) && (Page!="")) document.getElementById("uiPostPageName").value=Page;
  jslFormSetGet("uiPostForm");
  jslFormSubmit("uiPostForm");
}

function jslDebugLoadOrPost(name)
{
  var handle;
  var postform;
  var i;

  handle = window.open("",name,"height=1,width=1",true);
  handle.close();
  handle = window.open("",name,"height=400,width=600,status,scrollbars,resizable",true);
  if(handle==null) { alert("can't open debug window"); return; }
  
  postform=document.getElementById("uiPostForm");
  if(postform==null) { alert("can't populate debug window"); return; }

  handle.document.write('<html><head></head><body>');

  handle.document.write('<table border=1 align="center" bgcolor="#D3D9DF">');
  handle.document.write('<tr><td colspan=20 align="center"><b>Page Variables</b></td></tr>');
  handle.document.write('<tr><td colspan=20 align="center"><b>Page Title: Home</b></td></tr>');
  handle.document.write('<tr>');
  handle.document.write('<td align="center">&nbsp;</td>');
  handle.document.write('<td align="center"><b>Name</b></td>');
  handle.document.write('<td align="center"><b>Value</b></td>');
  handle.document.write('<td align="center"><b>Post</b></td>');
  handle.document.write('</tr>');
  
  for(i=0; i < postform.length; i++ )
  {
    handle.document.write('<tr>');
    handle.document.write('<td align="center"><b>'+i+'</b></td>');
    handle.document.write('<td>'+postform.elements[i].name+'</td>');
	if(postform.elements[i].value!="")
	    handle.document.write('<td>'+postform.elements[i].value+'</td>');
	else
	    handle.document.write('<td>&nbsp;</td>');
	if(postform.elements[i].disabled==true)
	    handle.document.write('<td style="color:red;"><b>disabled</b></td>');
	else
	    handle.document.write('<td style="color:green;"><b>enabled</b></td>');
    handle.document.write('</tr>');
  }
  handle.document.write('</table>');

  handle.document.write('</body></html>');
}

function jslDoOnLoad()
{
  if("1"=="")
   jslDebugLoadOrPost("uiOnLoadDebug");
  uiDoOnLoad();
}

function jslDoOnSubmit()
{
  if("1"=="")
   jslDebugLoadOrPost("uiOnPostDebug");
}

function jslDoShowComboBox(viewid,postid)
{
  var i;
  var selector = document.getElementById(viewid);
  var value=document.getElementById(postid).value;
  
  if(selector==null) return;

  for(i=0; i < selector.length; i++)
  {
    if(selector.options[i].value == value)
	{
         selector.selectedIndex = i;
         break;
	}
  }
}



var erlPageErrors = new Array();
var erlPageErrorCount=0;
var erlPageErrorSize=0;

var erlStateIdx = 0;
var erlTagIdx = 1;
var erlKeyIdx = 2;
var erlValueIdx = 3;
var erlValueMsg = 4;

function erlDoAddError(state,tag,key,value,msg)
{
  var row;

  if(erlPageErrorCount == erlPageErrorSize)
  {
    erlPageErrors[erlPageErrorCount++] = new Array(state,tag,key,value,msg);
	erlPageErrorSize=erlPageErrorCount;
  }
  else
  {
    row = erlPageErrors[erlPageErrorCount];
    row[erlStateIdx]=state;
	row[erlTagIdx]=state;
    row[erlKeyIdx]=state;
    row[erlValueIdx]=state;
    row[erlValueMsg]=state;
    erlPageErrorCount++;
  }

}
function erlDoResetErrors()
{
  erlPageErrorCount=0;
}
function erlDoShowPageErrors()
{
  var i;
  var handle,mark;
  for(i=0; i < erlPageErrorCount; i++)
  {
    if(erlPageErrors[i][erlStateIdx]=='good') continue;
    handle = document.getElementById(erlPageErrors[i][erlTagIdx]);
	if(handle!=null)
	{
	  handle.value=erlPageErrors[i][erlValueIdx];
	  mark = document.getElementById(handle.name);
	  if(mark!=null)
	  {
        mark.src="../html/defs/style5/images/ti_error.gif";
	    mark.title=erlPageErrors[i][erlValueMsg];
	  }
	}
  }  
}

function encrypt(str)
{
	var result = "";
	var	escaped;

	escaped = escape(str);
	for(i = 0; i < escaped.length; i++)
		result += escaped.charCodeAt(i) - 23;
	return result;
}

function decrypt(str)
{
	var result = "";
	var num;
	for(i = 0; i < str.length; i += 2)
	{
		num = parseInt(str.substr(i,[2])) + 23;
		num = unescape('%' + num.toString(16));
		result += num;
	}
	return unescape(result);
}





function uiDoOnLoad()
{
   
  return true;
}
function uiDoCancel()
{
  jslGoTo(null,"home");
}
function uiDoRefresh()
{
  document.getElementById("uiPostForm").method="GET";
  document.getElementById("uiPostForm").submit();
}

function uiDoLogout()
{
  document.location.href="../cgi-bin/webcm?getpage=..%2Fhtml%2Fdefs%2Fstyle5%2Fmenus%2Fmenu.html&var:style=style5&var:main=menu&var:pagename=logout&var:pagetitle=Log%20Out&var:menu=home&var:menutitle=Home";
}
</script>






</head>

<body onload="jslDoOnLoad()" bgcolor="#ECECEC" leftmargin=0 topmargin=0 marginwidth=0 marginheight=0>
<table width=761 cellpadding=0 cellspacing=0 align=center border=0>
 <tr><td width=761 height=4 colspan=2 nowrap></td></tr>
 <tr><td colspan=2 width=761>

<!-- Top Menu -->
<table width=760 cellpadding=0 cellspacing=0 border=0>
 <tr><td width=760 height=5 colspan=17 nowrap></td></tr>
 <tr><td width=760 height=2 colspan=17 nowrap bgcolor="#000000"></td></tr>
 <tr>
  <td width=2 height=39 rowspan=3 nowrap bgcolor="#000000"></td> <!--    SPAN    -->
  <td width=152>
  	<img src="../html/defs/style5/images/ti_menu_logo.gif" width=152 height=25 border=0 alt="SURECOM"></td>
  <td width=1 height=33 rowspan=2 nowrap bgcolor="#000000"></td> <!--    SPAN    -->
  <td width=57><a href="../cgi-bin/webcm?getpage=..%2Fhtml%2Fdefs%2Fstyle5/menus%2Fmenu.html&var:style=style5&var:main=menu&var:pagename=home&var:pagetitle=Home&var:menu=home&var:menutitle=Home" >
   	<img id="uiViewMenuTopHomeBtn" src="../html/defs/style5/images/ti_menu_home_hilite.gif" width=57 height=25 border=0 alt="Home"></a></td>
  <td width=1 height=25 nowrap bgcolor="#000000"></td>

  <td width=59><a href="../cgi-bin/webcm?getpage=..%2Fhtml%2Fdefs%2Fstyle5/menus%2Fmenu.html&var:style=style5&var:main=menu&var:pagename=home&var:pagetitle=Home&var:menu=setup&var:menutitle=Setup" >
   	<img id="uiViewMenuTopSetupBtn" src="../html/defs/style5/images/ti_menu_setup.gif" width=59 height=25 border=0 alt="Setup"></a></td>
  <td width=1 height=25 nowrap bgcolor="#000000"></td>

  <td width=81><a href="../cgi-bin/webcm?getpage=..%2Fhtml%2Fdefs%2Fstyle5/menus%2Fmenu.html&var:style=style5&var:main=menu&var:pagename=home&var:pagetitle=Home&var:menu=adv&var:menutitle=Advanced" >
   	<img id="uiViewMenuTopAdvBtn" src="../html/defs/style5/images/ti_menu_advanced.gif" width=81 height=25 border=0 alt="Advanced"></a></td>
  <td width=1 height=25 nowrap bgcolor="#000000"></td>

   

  <td width=58><a href="../cgi-bin/webcm?getpage=..%2Fhtml%2Fdefs%2Fstyle5/menus%2Fmenu.html&var:style=style5&var:main=menu&var:pagename=home&var:pagetitle=Home&var:menu=tools&var:menutitle=Tools" >
   <img id="uiViewMenuTopToolsBtn"  src="../html/defs/style5/images/ti_menu_tools.gif" width=58 height=25 border=0 alt="Tools"></a></td>
  <td width=1 height=25 nowrap bgcolor="#000000"></td>

  <td width=66><a href="../cgi-bin/webcm?getpage=..%2Fhtml%2Fdefs%2Fstyle5/menus%2Fmenu.html&var:style=style5&var:main=menu&var:pagename=home&var:pagetitle=Home&var:menu=status&var:menutitle=Status" >
   <img id="uiViewMenuTopStatusBtn"  src="../html/defs/style5/images/ti_menu_status.gif" width=66 height=25 border=0 alt="Status"></a></td>
  <td width=1 height=25 nowrap bgcolor="#000000"></td>

  <td width=51><a href="../cgi-bin/webcm?getpage=..%2Fhtml%2Fdefs%2Fstyle5/menus%2Fmenu.html&var:style=style5&var:main=menu&var:pagename=home&var:pagetitle=Home&var:menu=help&var:menutitle=Help" >
   <img id="uiViewMenuTopHelpBtn" src="../html/defs/style5/images/ti_menu_help.gif" width=51 height=25 border=0 alt="Help"></a></td>
  <td width=1 height=25 nowrap bgcolor="#000000"></td>
  <td width=225 height=25 nowrap bgcolor="#9595C7"></td>
  <td width=2 height=39 rowspan=3 nowrap bgcolor="#000000"></td>    <!--   SPAN    -->
 </tr>
 <tr>
  <td width=152 height=8 nowrap bgcolor="#000000"></td>
  <td width=603 height=8 colspan=13 nowrap bgcolor="#000000"></td>
 </tr>
 <tr>
  <td width=152 height=6 nowrap bgcolor="#FFFFFF"></td>
  <td width=1 height=6 nowrap bgcolor="#FFFFFF"</td>
  <td width=603 height=6 colspan=13 nowrap bgcolor="#FFFFFF"></td>
 </tr>
 <tr><td width=760 height=1 colspan=17 nowrap bgcolor="#000000"></td></tr>
</table>
<!-- END Top Menu -->
</td></tr>
 <tr>
  <td width=761 align=left valign=top>
    <table cellpadding=0 cellspacing=0 border=0>
	 <tr><td width=761><!-- Main Home -->
<table cellspacing=1 border=0 cellpadding=4 align=center id="uiViewBodyTable" bgcolor="#000000" width="604" height="390">
<tr>
	<td bgcolor="#000000" height=21 class="header"><font size=1 color="#FFFFFF">Welcome to the Surecom DSL Modem</font></td>
</tr>
<tr>
	<td bgcolor="#ECECEC" colspan=2>
	
	
<!-- Page Description -->
<table cellspacing=4 border=0 cellpadding=0 align=center id="uiViewBodyTable">
 <tr>
  <td valign=top bgcolor="#ECECEC" width=136>
   <font size=1>				
   <b>Setup</b></font>
   <br>
  <font size=1>The Setup section allows you to create new connections, edit existing connections, and configure other basic settings.</font></td>
  
  <td width=1 nowrap bgcolor="#505050"></td>

  <td valign=top bgcolor="#ECECEC" width=136>
   <font size=1>
   <b>Advanced</b></font>
  <br>
   <font size=1>The Advanced section lets you configure advanced features like RIP, Firewall, NAT,  UPnP, IGMP, Bridge Filters, and LAN clients.</font>
  </td>

 
  <td width=1 nowrap bgcolor="#505050"></td>

  <td valign=top bgcolor="#ECECEC" width=136>
   <font size=1>
   <b>Tools</b></font>
  <br>
  <font size=1>The Tools section lets you carry out system commands and perform simple system tests.</font></td>

  <td width=1 nowrap bgcolor="#505050"></td>

  <td valign=top bgcolor="#ECECEC" width=136>
   <font size=1>
   <b>Status</b></font>
  <br>
   <font size=1>The Status section displays status, log and statistical information for all connections and interfaces.</font>
  </td>

  <td width=1 nowrap bgcolor="#505050"></td>

  <td valign=top bgcolor="#ECECEC" width=136>
   <font size=1>
   <b>Help</b></font>
  <br>
   <font size=1>The Help section provides information on configuration and settings for each section.</font>
  </td>
 </tr>
 <tr>
  <td colspan=11 height=1 bgcolor="#505050"></td>
 </tr> 
</table>
<!-- END Page Description -->

	
	<table cellspacing=0 border=0 cellpadding=0 align=center>
	<tr><td align=center colspan=3 class="homeHeader" height=25><font size=1><b>Status Information</b></font></td></tr>
	</table>

	
	<table cellspacing=1 border=0 cellpadding=0 align=center bgcolor="#505050" width=475>
<tr>
	<td colspan=2>
	<table border=0 width="100%" cellspacing=0 cellpadding=0>
	<tr><td height=1 bgcolor="#505050"></td></tr>
	<tr><td height=8 bgcolor="#333366"></td></tr>
	<tr><td height=3 bgcolor="#999999"></td></tr>
	</table>
	</td>
</tr>
<tr>
	<td valign=middle bgcolor="#E6E6FF" align=center height=95 width="50%">

	<!-- System Uptime, DSL, LAN IP -->
	<table cellspacing=2 border=0 cellpadding=1 bgcolor="#E6E6FF">
	 <tr>
	  <td nowrap align=left><font size=1>System Uptime: </font></td>
	  <td align=left  nowrap><font size=1>34 hours 45 minutes</font></td>
	 </tr>
	 
	  
	  
       
	<tr>
	  <td nowrap align=left ><font size=1>DSL Status:</font></td>
	  <td align=left ><font size=1>Connected</font></td>	
	 </tr>
	 <tr>
	  <td nowrap align=left ><font size=1>DSL Speed:</font></td>
	  <td align=left ><font size=1>320/1024kbps</font></td>
	 </tr>
	
     
	</table>
	<!-- END System Uptime, DSL, LAN IP -->

	</td>
	

	<td valign=middle bgcolor="#E6E6FF" align=center width="50%">

	<!-- Ethernet, USB, DHCP Server, SW Version -->
	<table cellspacing=2 border=0 cellpadding=1 bgcolor="#E6E6FF">
	 <tr>
	  <td nowrap align=left><font size=1>Ethernet:</font></td>
          <td align=left><font size=1>Connected</font></td>
	  
	 </tr>
       
	 <tr>
	  <td nowrap align=left><font size=1>Software Version:</font></td>
	  <td align=left><font size=1>3.6.0C</font></td>
	 </tr>
     
	</table>
	<!-- END Ethernet, USB, DHCP Server, SW Version -->

	</td>
</tr>
<tr>
	<td colspan=2>
	<table border=0 width="100%" cellspacing=0 cellpadding=0>
	<tr><td height=3 bgcolor="#999999"></td></tr>
	<tr><td height=8 bgcolor="#333366"></td></tr>
	<tr><td height=1 bgcolor="#505050"></td></tr>
	</table>
	</td>
</tr>
</table>

	
	<div style="height: 8px;"></div>
	</td>	
</tr>
<tr>
	<td bgcolor="#ECECEC" align=center colspan=2 height=20>
		<!-- Logout and Refresh Controls -->
		<table border=0 width="750" cellspacing=0 cellpadding=0>
		<tr>
			<td width="50%" align=left height=20><input type=submit name="" value="Log Out" class="inputButton" onclick="uiDoLogout()" alt="Logout" align="left"</td>
			<td width="50%" align=right><input type=submit name="" value="Refresh" class="inputButton" onclick="uiDoRefresh()" alt="Refresh" align="right"></td>
		</tr>
		</table>
		<!-- END Logout and Refresh Controls -->
	</td>
</tr>
</table>
<!-- END Main Home -->
</td></tr>
    </table>
   </td>
  
 </tr>
</table>

<!-- Post Form -->
<form method="POST" action="webcm" target="_self" id="uiPostForm" onsubmit="jslDoOnSubmit()">

<!-- Refresh Form -->
<input type="hidden" name="var:main" value="menu" id="uiPostMenuMain">
<input type="hidden" name="var:style" value="style5" id="uiPostMenuStyle">
<input type="hidden" name="getpage" value="../html/defs/style5/menus/menu.html" id="uiPostGetPage">
<input type="hidden" name="errorpage" value="../html/defs/style5/menus/menu.html" id="uiPostErrPage">
<input type="hidden" name="var:pagename" value="home" id="uiPostPageName">
<input type="hidden" name="var:errorpagename" value="home" id="uiPostErrorPageName">
<input type="hidden" name="var:menu" value="home" id="uiPostMenu">
<input type="hidden" name="var:menutitle" value="Home" id="uiPostMenuTitle">
<input type="hidden" name="var:pagetitle" value="Home" id="uiPostPageTitle">
<input type="hidden" name="var:pagemaster" value="home" id="uiPostPageMaster">
<!-- END Refresh Form -->

<input type="hidden" name="ap:settings/ssid" value="" id="uiPostSSID" disabled>

</form>
<!-- END Post Form -->

</body>
</html>
0

A probowales:
Webbrowser1.navigate('../cgi-bin/webcm?getpage=..%2Fhtml%2Fdefs%2Fstyle5/menus%2Fmenu.html&var:style=style5&var:main=menu&var:pagename=home&var:pagetitle=Home&var:menu=setup&var:menutitle=Setup')
Jak to nie zadziala to bedziemy dalej kombinowac.

0

Ok działa! : ) Ale teraz doSZEDŁem już do stronki gdzie trzeba kliknąć [Disconnect] a następnie [Connect] a tymi przyciskami to już chyba skrypt steruje bo jak klikam na nie to adres strony się nie zmienia : /.

Źródło:


function uiDoConnect()
{
       if(document.getElementById("uiViewOnDemand").value=="on") {
          alert("In 'On Demand' mode connection gets established on accessing the WAN side.");
          return false;
	}
       jslEnable("uiPostPppConnect");
	jslDisable("uiPostPppUsername","uiPostPppPassword",
		          "uiPostPppIdleTimeout","uiPostPppMRU",
		          "uiPostPppDebug","uiPostPppMode",
		          "uiPostPppKeepAlive","uiPostPppDefRoute",
		          "uiPostPppAuthType","uiPostPppUnNum","uiPostPppUnLan");
	jslDisable("uiPostPvcVpi","uiPostPvcVci","uiPostPvcQoS","uiPostPvcPcr",
		          "uiPostPvcScr","uiPostPvcCdvt","uiPostPvcMbs");
		
			
	jslEnable( "uiPostConDesc","uiPostNatControl","uiPostFirewallControl","uiPostFwanNATState");
       jslFormSubmit("uiPostForm");
}

function uiDoDisconnect()	
{
       if(document.getElementById("uiViewOnDemand").value=="on") {
          alert("In 'On Demand' mode disconnect is based on idle timeout.");
          return false;
	}
	jslEnable("uiPostPppDisconnect");
	jslDisable("uiPostPppUsername","uiPostPppPassword",
		          "uiPostPppIdleTimeout","uiPostPppMRU",
		          "uiPostPppDebug","uiPostPppMode",
		          "uiPostPppKeepAlive","uiPostPppDefRoute",
		          "uiPostPppAuthType","uiPostPppUnNum","uiPostPppUnLan");
	 jslDisable("uiPostPvcVpi","uiPostPvcVci","uiPostPvcQoS","uiPostPvcPcr",
		          "uiPostPvcScr","uiPostPvcCdvt","uiPostPvcMbs");
		
	jslDisable("uiPostConDesc","uiPostNatControl","uiPostFirewallControl","uiPostFwanNATState");
	jslFormSubmit("uiPostForm");
}

Wkleiłem tylko tą część źródła bo wydaje mi się że te dwie funkcje odpowiadają za przyciski [Disconnect] i [Connect] jak będzie potrzeba to wkleje całość.

0

Wklej to na sama gore albo zadeklaruj.

procedure ExecuteScript(doc:IHTMLDocument2;script:string;language:string);
var
win: IHTMLWindow2;
Olelanguage: Olevariant;
begin
if doc <> nil then
begin
try
win := doc.parentWindow;
if win <> nil then
begin
try
Olelanguage := language;
win.execScript(script, Olelanguage);
finally
win := nil;
end;
end;
finally
doc := nil;
end;
end;
end;

i wywołaj:
ExecuteScript(WebBrowser1.Document as HTMLDocument2 ;'uiDoConnect()';'JavaScript');

A jak tak nie to sproboj tak (pousuwaj wszystkie entery!)
ExecuteScript(WebBrowser1.Document as HTMLDocument2 ;'uiDoConnect()
{
if(document.getElementById("uiViewOnDemand").value=="on") {
alert("In 'On Demand' mode connection gets established on accessing the WAN side.");
return false;
}
jslEnable("uiPostPppConnect");
jslDisable("uiPostPppUsername","uiPostPppPassword",
"uiPostPppIdleTimeout","uiPostPppMRU",
"uiPostPppDebug","uiPostPppMode",
"uiPostPppKeepAlive","uiPostPppDefRoute",
"uiPostPppAuthType","uiPostPppUnNum","uiPostPppUnLan");
jslDisable("uiPostPvcVpi","uiPostPvcVci","uiPostPvcQoS","uiPostPvcPcr",
"uiPostPvcScr","uiPostPvcCdvt","uiPostPvcMbs");

    jslEnable( "uiPostConDesc","uiPostNatControl","uiPostFirewallControl","uiPostFwanNATState");
   jslFormSubmit("uiPostForm");

}';'JavaScript');

I analogicznie dla disconnecta.

A jak nic z tego nie zadziala to pokaz kod calej strony.

0

OK! Program skończony [!!!]
Użyłem tak jak pisałeś za pierwszym razem czyli:

ExecuteScript(WebBrowser1.document  as IHTMLDocument2 ,'uiDoDisconnect()','JavaScript');

a potem

ExecuteScript(WebBrowser1.document  as IHTMLDocument2 ,'uiDoCconnect()','JavaScript');

I wszystko elegancko działa.

Daroch nie wiem jak ci dziękować : ) : ) : ) : ) Dla mnie stary jesteś naprawdę dobry
Należy ci się naprawdę BIG BROWAR OD WSZYSTKICH!!!
Bo sądzę że w tym czym mi pomogłeś jeszcze nie jednemu się przyda ;]

                                                       [!!!]  [!!!]  [!!!]  [!!!]  [!!!]  [!!!]  [!!!]  [!!!]  [!!!]  
                                                   [browar]  [browar]  [browar]                              
                                                   [browar]  [browar]  [browar]                              
                                                    [browar]  [browar]  [browar]                                
                                                    [browar]  [browar]  [browar] [browar]                 
                                                    [browar]  [browar]  [browar]        [browar]            
                                                    [browar]  [browar]  [browar]        [browar]             
                                                    [browar]  [browar]  [browar]        [browar]               
                                                    [browar]  [browar]  [browar]        [browar]            
                                                    [browar]  [browar]  [browar] [browar]                   
                                                    [browar]  [browar]  [browar] 
                                                    [browar]  [browar]  [browar]
0

Pierwsza sprawa to jest coś takiego jak edycja postow a nie sposob pisania jednego pod drugim!! a druga to czy nie prosciej sciagnac program "httplook" odpalic proces snifowania wykonac przez przegladarke taki restart i zobaczyc "co odpowiada za restart" dla mojego routera belkina (nie chce mi sie sprawdzac modelu) sa to tylko dwie linijki (zalogowanie sie i sam restart)

http://[host]/processlogin.cgi?loginPassword=[haslo]
http://[host]/rebootinfo.cgi

Potem wyslanie ich np. przez idhttp i po problemie a nie jakies webbrowsery skoro zalezy nam tylko na restarcie a nie na restarcie+ladowanie niepotrzebnie stron co automatycznie rowniez niepotrzebnie obciaza nasza aplikacje a w efekcie koncowym system...

0

Pls post the full source in pas....thx

0

Witam, mam podobny problem, tylko w moim przypadku zmienne login/pass są wysyłane w jakis inny sposób, mianowicie - pokazuje sie przegladarkowe okienko logowania - strefa zabezpieczona - jak sie zle poda hasło to pisze - 401 Unauthorized.

1 użytkowników online, w tym zalogowanych: 0, gości: 1