• Home
  • History
  • Annotate
  • Line#
  • Navigate
  • Raw
  • Download
  • only in /asuswrt-rt-n18u-9.0.0.4.380.2695/release/src-rt/router/www/sysdep/DSL-N55U/www/qis/
1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2<html xmlns="http://www.w3.org/1999/xhtml">
3<head>
4<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
5<meta HTTP-EQUIV="Pragma" CONTENT="no-cache">
6<meta HTTP-EQUIV="Expires" CONTENT="-1">
7<link rel="stylesheet" type="text/css" href="../form_style.css">
8<link rel="stylesheet" type="text/css" href="qis_style.css">
9<script type="text/JavaScript" src="/state.js"></script>
10<script type="text/JavaScript" src="/general.js"></script>
11<style>
12span{
13	border:0px solid #FFFFFF;
14	color:#FFFFFF;
15	font-size:14px;
16	font-family:Arial, Helvetica, sans-serif;
17	/*width:27px;*/
18	text-align:right;
19	margin:0px auto;
20	ime-mode:disabled;
21}
22.stb_msg{
23	font-size:12px;
24	font-weight:bolder;
25	color:#FFCC00;
26}
27</style>
28<script type="text/JavaScript" src="/js/jquery.js"></script>
29<script type="text/javascript">
30
31var ISP_List;
32var ISP_List_IPTV;
33var RAW_ISP_List = [<% get_isp_list("/www/ISP_List.txt"); %>];
34var RAW_ISP_List_IPTV = [<% get_isp_list("/www/ISP_List_IPTV.txt"); %>];
35var RAW_ISP_PTM_List = [<% get_isp_list("/www/ISP_PTM_List.txt"); %>];
36var RAW_ISP_PTM_List_IPTV = [<% get_isp_list("/www/ISP_PTM_List_IPTV.txt"); %>];
37
38var vpi_val = "<% nvram_get("dsltmp_autodet_vpi"); %>";
39var vci_val = "<% nvram_get("dsltmp_autodet_vci"); %>";
40var prctl_val = "2";
41var encap_val = "<% nvram_get("dsltmp_autodet_encap"); %>";
42var vlanid_val = "";	//tmp
43var wan_type = "<%nvram_get("dsltmp_autodet_wan_type");%>";
44var w_Setting = "<% nvram_get("w_Setting"); %>";
45var encap_str = "LLC";
46if (encap_val == "1") encap_str = "VC-Mux";
47
48function QKfinish_load_body(){
49	parent.document.title = "<#Web_Title#> - <#QKSet_all_title#>";
50	parent.set_step("t2");
51
52	if (vpi_val == "0" && vci_val == "40" && encap_val == "1")
53	{
54		//UK ISP SKY Broadband, MER requires some tweak.
55		//PPP Username and Password needs to be added into DHCP option 61.
56		document.getElementById("ppp_username1").style.display = "";
57		document.getElementById("ppp_username2").style.display = "";
58		document.getElementById("ppp_password1").style.display = "";
59		document.getElementById("ppp_password2").style.display = "";
60	}
61
62	if(wan_type == "ATM")
63	{
64		document.form.dsltmp_transmode.value = "atm";
65		document.form.prev_page.value = "/qis/QIS_manual_setting.htm";
66		ISP_List = RAW_ISP_List;
67		ISP_List_IPTV = RAW_ISP_List_IPTV;
68	}
69	else //PTM
70	{
71		document.form.dsltmp_transmode.value = "ptm";
72		document.form.prev_page.value = "/qis/QIS_PTM_manual_setting.htm";
73		ISP_List = RAW_ISP_PTM_List;
74		ISP_List_IPTV = RAW_ISP_PTM_List_IPTV;
75	}
76
77	showHideIPTVList(false);
78	if(haveIPTVService()) {
79		showhide("iptv_manual_setting", 1);
80	}
81	else {
82		showhide("iptv_manual_setting", 0);
83	}
84	showhide("STBPortMsg", 0);
85}
86
87function submitForm(){
88	if (vpi_val == "0" && vci_val == "40" && encap_val == "1")
89	{
90		//Only for UK ISP SKY Broadband
91		if(document.form.ppp_username.value != "")
92			document.form.dslx_dhcp_clientid.value = document.form.ppp_username.value + "|" + document.form.ppp_password.value;
93
94		document.form.ppp_username.disabled = true;
95		document.form.ppp_password.disabled = true;
96	}
97	document.form.next_page.value = "/qis/QIS_wireless.htm";
98	if(document.form.dsltmp_cfg_iptv_enable.value == "1"){
99		if(valid_ISP())
100			setIptvNumPvc();
101		else{
102			document.form.ISP.focus();
103			return false;
104		}
105	}
106	document.form.submit();
107}
108
109
110function haveIPTVService() {
111	//compare detection result with isp list
112	for(var i = 0; i < ISP_List.length; i++){
113		if(wan_type == "ATM") {
114			if(vpi_val == ISP_List[i][6]	//vpi
115				&& vci_val == ISP_List[i][7]	//vci
116				&& prctl_val == ISP_List[i][8]	//proto
117				&& encap_val == ISP_List[i][9]	//encap
118				&& (ISP_List[i][12] != "" || ISP_List[i][13] != "")	//mr, iptv idx
119			) {
120				return true;
121			}
122		}
123		else {	//PTM
124			if(prctl_val == ISP_List[i][8]	//proto
125				&& vlanid_val == ISP_List[i][10]	//vlan id
126				&& (ISP_List[i][12] != "" || ISP_List[i][13] != "")	//mr, iptv idx
127			) {
128				return true;
129			}
130		}
131	}
132
133	return false;
134}
135
136function showHideIPTVList(iptv_enable) {
137	if(iptv_enable.checked) {
138		document.form.dsltmp_cfg_iptv_enable.value = "1";
139		document.getElementById("special_ISP_img").style.display = "";
140		document.getElementById("ISP_table").style.visibility = "visible";
141		showCountryList();
142		showISPList("");
143	}
144	else {
145		document.form.dsltmp_cfg_iptv_enable.value = "0";
146		document.getElementById("special_ISP_img").style.display = "none";
147		document.getElementById("ISP_table").style.visibility = "hidden";
148		showhide("STBPortMsg", 0);
149	}
150}
151
152function showCountryList(){
153	var code = "";
154	var showed_country = "";
155
156	code +="<select name='country' onchange='showISPList(this.value);' class='input_option'>";
157	code +="<option value='default'><#Select_menu_default#></option>";
158	for(var i = 0; i < ISP_List.length; i++){
159		if(ISP_List[i][5] == "")
160			continue;
161
162		if(prctl_val == ISP_List[i][8])  {	//proto
163			if(wan_type == "ATM") {
164				if(vpi_val == ISP_List[i][6]	//vpi
165					&& vci_val == ISP_List[i][7]	//vci
166					&& encap_val == ISP_List[i][9]	//encap
167				) {
168					if(showed_country != ISP_List[i][1]){
169						code +="<option value='"+ISP_List[i][1];
170						code +="'>"+ISP_List[i][2]+"</option>";
171						showed_country = ISP_List[i][1];
172					}
173				}
174			}
175			else {	//PTM
176				if(vlanid_val == ISP_List[i][10]) {	//vlan id
177					if(showed_country != ISP_List[i][1]){
178						code +="<option value='"+ISP_List[i][1];
179						code +="'>"+ISP_List[i][2]+"</option>";
180						showed_country = ISP_List[i][1];
181					}
182				}
183			}
184		}
185	}
186	code +="</select>";
187	document.getElementById("CountryList").innerHTML = code;
188}
189
190function showISPList(country){
191	var code = "";
192	var showed_isp = "";
193	var first_element = 0;
194	var sel_idx = 0;
195
196	code +="<select id='ISP' name='ISP' class='input_option'>";
197	code +="<option value='default'><#Select_menu_default#></option>";
198	for(var i = 0; i < ISP_List.length; i++){
199		if(country == ISP_List[i][1]){
200			if(ISP_List[i][5] == "")
201				continue;
202			if(ISP_List[i][12] == "" && ISP_List[i][13] == "")	//no iptv service
203				continue;			
204
205			if(prctl_val == ISP_List[i][8])  {	//proto
206				if(wan_type == "ATM") {
207					if(vpi_val == ISP_List[i][6]	//vpi
208						&& vci_val == ISP_List[i][7]	//vci
209						&& encap_val == ISP_List[i][9]	//encap
210					) {
211						if (first_element==0) {
212							first_element=1;
213							sel_idx = i;
214							code +="<option value='"+ISP_List[i][0]+"' selected='selected'>"+ISP_List[i][4]+", "+ISP_List[i][5]+"</option>";
215						}
216						else {
217							code +="<option value='"+ISP_List[i][0]+"'>"+ISP_List[i][4]+", "+ISP_List[i][5]+"</option>";
218						}
219					}
220				}
221				else {	//PTM
222					if(vlanid_val == ISP_List[i][10]) {	//vlan id
223						if (first_element==0) {
224							first_element=1;
225							code +="<option value='"+ISP_List[i][0]+"' selected='selected'>"+ISP_List[i][4]+", "+ISP_List[i][5]+"</option>";
226						}
227						else {
228							code +="<option value='"+ISP_List[i][0]+"'>"+ISP_List[i][4]+", "+ISP_List[i][5]+"</option>";
229						}
230					}
231				}
232			}
233			
234		}
235	}
236
237	code +="</select>";
238	document.getElementById("ISPnServiceList").innerHTML = code;
239	ChgSVC(sel_idx);
240}
241
242function ChgSVC(idx) {
243	if(ISP_List[idx][13] != "") {	//iptv idx
244		if(wan_type == "ATM" && ISP_List[idx][5] == "ADSL+MOD")
245			document.getElementById("STBPortMsg").innerHTML = "Please connect the MOD(STB) to LAN Port 1";
246		else if(wan_type == "PTM" && ISP_List[idx][5] == "VDSL+MOD")
247			document.getElementById("STBPortMsg").innerHTML = "Please connect the MOD(STB) to LAN Port 1";
248		
249		showhide("STBPortMsg", 1);
250	}
251	else {
252		showhide("STBPortMsg", 0);
253	}
254}
255
256function valid_ISP(){
257	if(document.getElementById("ISP").value == "default")
258		return false;
259	else
260		return true;
261}
262
263function setIptvNumPvc() {
264	var pvc_cnt = 0;
265	var isp_idx = document.getElementById("ISP").value
266	var iptv_idx = ISP_List[isp_idx][13];
267	var dsltmp_cfg_iptv_pvclist_value = "";
268
269	if (iptv_idx != "") {
270		for(var i = 0; i < ISP_List_IPTV.length; i++){
271			if (ISP_List_IPTV[i][0] == iptv_idx) {
272				pvc_cnt++;
273				dsltmp_cfg_iptv_pvclist_value +=
274					"<" + ISP_List_IPTV[i][1]
275					+ ">" + ISP_List_IPTV[i][2]
276					+ ">" + ISP_List_IPTV[i][3]
277					+ ">" + ISP_List_IPTV[i][4]
278					+ ">" + ISP_List_IPTV[i][5]
279			}
280		}
281	}
282	document.form.dsltmp_cfg_iptv_num_pvc.value = pvc_cnt.toString();
283	document.form.dsltmp_cfg_iptv_rmvlan.value = ISP_List[isp_idx][11];
284	document.form.dsltmp_cfg_iptv_mr.value = ISP_List[isp_idx][12];
285	document.form.dsltmp_cfg_iptv_pvclist.value = dsltmp_cfg_iptv_pvclist_value;
286}
287
288function gotoHome() {
289	if (w_Setting == "0") {
290		alert("<#QIS_recommand_encryption#>");
291		location.href = '/qis/QIS_wireless.htm';
292	}
293	else {
294		parent.location.href = '/index.asp';
295	}
296}
297
298</script>
299</head>
300
301<body onLoad="QKfinish_load_body();" >
302<form method="post" name="form" action="/start_apply.htm" target="">
303<input type="hidden" name="prev_page" value="/qis/QIS_manual_setting.htm">
304<input type="hidden" name="current_page" value="/qis/QIS_mer_cfg.htm">
305<input type="hidden" name="next_page" value="">
306<input type="hidden" name="action_mode" value="apply">
307<input type="hidden" name="action_script" value="">
308<input type="hidden" name="action_wait" value="">
309<input type="hidden" name="dsltmp_cfg_iptv_rmvlan" value="">
310<input type="hidden" name="dsltmp_cfg_iptv_mr" value="">
311<input type="hidden" name="dsltmp_cfg_iptv_num_pvc" value="">
312<input type="hidden" name="dsltmp_cfg_iptv_pvclist" value="">
313<input type="hidden" name="dsltmp_cfg_iptv_enable" value="0">
314<input type="hidden" name="dsltmp_qis_vpi" value="<% nvram_get("dsltmp_autodet_vpi"); %>">
315<input type="hidden" name="dsltmp_qis_vci" value="<% nvram_get("dsltmp_autodet_vci"); %>">
316<input type="hidden" name="dsltmp_qis_proto" value="mer">
317<input type="hidden" name="dsltmp_qis_encap" value="<% nvram_get("dsltmp_autodet_encap"); %>">
318<!--<input type="hidden" name="dsltmp_qis_pppoe_username" value="">
319<input type="hidden" name="dsltmp_qis_pppoe_passwd" value="">
320<input type="hidden" name="dsltmp_qis_pppoe_dial_on_demand" value="0">
321<input type="hidden" name="dsltmp_qis_pppoe_idletime" value="0">
322<input type="hidden" name="dsltmp_qis_pppoe_mtu" value="1492">
323<input type="hidden" name="dsltmp_qis_pppoe_mru" value="1492">
324<input type="hidden" name="dsltmp_qis_pppoe_service" value="">
325<input type="hidden" name="dsltmp_qis_pppoe_options" value="">-->
326<input type="hidden" name="dsltmp_qis_DHCPClient" value="1">
327<input type="hidden" name="dsltmp_qis_ipaddr" value="0.0.0.0">
328<input type="hidden" name="dsltmp_qis_netmask" value="0.0.0.0">
329<input type="hidden" name="dsltmp_qis_gateway" value="0.0.0.0">
330<input type="hidden" name="dsltmp_qis_dnsenable" value="1">
331<input type="hidden" name="dsltmp_qis_dns1" value="">
332<input type="hidden" name="dsltmp_qis_dns2" value="">
333<input type="hidden" name="dsltmp_qis_svc_cat" value="0">
334<input type="hidden" name="dsltmp_qis_pcr" value="0">
335<input type="hidden" name="dsltmp_qis_scr" value="0">
336<input type="hidden" name="dsltmp_qis_mbs" value="0">
337<input type="hidden" name="dsltmp_qis_dsl_pvc_set" value="1">
338<input type="hidden" name="dslx_dhcp_clientid" value="">
339<input type="hidden" name="dsltmp_qis_pppoe_relay" value="0">
340<input type="hidden" name="dsltmp_transmode" value="">
341<div class="QISmain">
342	<table width="730px">
343		<tr>
344			<td align="left">
345				<span class="description_down">MER</span>
346			</td>
347		</tr>
348	</table>
349	<div style="margin-left:5px;margin-top:10px;margin-bottom:10px"><img style="width: 700px; height: 2px;" src="/images/New_ui/export/line_export.png"></div>
350	<br/>
351
352<table id="tblsetting_1" class="QISform" width="400" border=0 align="center" cellpadding="5" cellspacing="0">
353  <tr>
354  	<td class="test_css">		
355     <#Layer3Forwarding_x_ConnectionType_itemname#>: <span class="cfg_val">MER Dynamic IP</span>, VPI/VCI: <span class="cfg_val"><% nvram_get("dsltmp_autodet_vpi"); %>/<% nvram_get("dsltmp_autodet_vci"); %>, <script>document.write(encap_str);</script></span>
356     <br><br>
357    </td> 
358  </tr>
359</table>
360
361<table style="margin-left:50px;">
362  <tr>
363	<th width="120" class="test_css"><span id="ppp_username1" style="display:none;">SKY <#HSDPAConfig_Username_itemname#>:</span></th>
364	<td>
365	  <span id="ppp_username2" style="display:none;">
366	  <input type="text" name="ppp_username" class="input_25_table" value="" maxlength="32" autocorrect="off" autocapitalize="off">
367	  </span>
368	</td>
369  </tr>
370  <tr>
371	<th width="120" class="test_css"><span id="ppp_password1" style="display:none;">SKY <#HSDPAConfig_Password_itemname#>:</span></th>
372	<td>
373	  <span id="ppp_password2" style="display:none;">
374	  <input type="text" name="ppp_password" class="input_25_table" value="" maxlength="32" autocorrect="off" autocapitalize="off">
375	  </span>
376	</td>
377  </tr>
378</table>
379
380	<div>
381	<table id="iptv_manual_setting" width="92%" border="0" align="left" cellpadding="3" cellspacing="0" style="margin-left:8%;">
382			<tr id="specialISP_tr">
383				<td>
384					<input type="checkbox" id="specialisp" name="specialisp" onclick="showHideIPTVList(this);">
385					<label for="specialisp">
386						<span class="QISGeneralFont" style="margin-left:0px;font-style:normal;color:#66CCFF;font-size:12px;font-weight:bolder;"><#PPPConnection_x_HostNameForISP_sectionname#> ( IPTV Service )</span>
387					</label>
388					<span class="stb_msg" id="STBPortMsg"> Please connect the IPTV STB to LAN Port 1</span>	<!-- untranslated -->
389				</td>
390			</tr>
391	</table>
392	</div>
393
394	<div id="special_ISP_img_div"><img id="special_ISP_img" width="505px" height="105px" style="margin-top:0px;margin-left:73px;display:none;" src="/images/qis/border.png"></div>
395
396	<div style="margin-left:-80px;margin-top:-90px;">
397	<table id="ISP_table" class="FormTable" width="475px" border="0" align="center" cellpadding="3" cellspacing="0">
398		<tbody>
399			<tr id="Country_tr">
400				<th width="40%"><#Manual_Setting_contry#></th>
401				<td>
402					<div id="CountryList"></div>
403				</td>
404			</tr>
405			<!--tr id="City_tr">
406				<th width="40%"><#Manual_Setting_city#></th>
407				<td>
408					<div id="CityList"></div>
409				</td>
410			</tr-->
411			<tr id="ISP_tr">
412				<th width="40%"><#HSDPAConfig_ISP_itemname#> & <#qis_service#></th>
413				<td>
414					<div id="ISPnServiceList"></div>
415				</td>
416			</tr>
417			<!--tr id="Service_tr">
418				<th width="40%"><#qis_service#></th>
419				<td>
420					<div id="Service"></div>
421				</td>
422			</tr-->
423		</tbody>
424	</table>
425	</div>
426
427	<div class="apply_gen" style="margin-top:30px">
428		<input type="button" id="prevButton" value="<#Manual_Setting_btn#>" onclick="gotoprev(document.form);" class="button_gen" >
429<!--
430		<input type="button" id="nextButton" value="Ethernet WAN" onclick="redirect_page('internet_type');" class="button_gen" >
431-->
432		<input type="button" id="nextButton" value="<#CTL_next#>" onclick="submitForm();" class="button_gen">
433	</div>
434
435</div>
436</form>
437</body>
438</html>
439