📄 4.html
字号:
}
_$('table_one').style.display="";
for(i=0; i< _$('devices').length; i++){
if(_$('devices').options[i].text != "New Entry")
addrow_totable(_$('devices').options[i].text, _$('devices').options[i].value);
}
}
function addrow_totable(sp_text, sp_value){
var sno = _$('serviceproviderstable').rows.length + 1;
var newRow = _$('serviceproviderstable').insertRow(-1);
newRow.id = "row" + sp_value;
var newCell0 = newRow.insertCell(0);
newCell0 .innerHTML = sno ;
newCell0 .style.width = 40;
var newCell1 = newRow.insertCell(1);
newCell1 .innerHTML = sp_text ;
newCell1 .style.width = 200;
var newCell2 = newRow.insertCell(2);
switch ( _$('devices').stored_config.catbyname[sp_value].fieldbyname['trunkstyle'] ){
case "customvoip":
newCell2 .innerHTML = "Custom Voip";
break;
case "analog":
newCell2 .innerHTML = "Analog";
break;
case "voip":
newCell2 .innerHTML = "Voip";
break;
default :
newCell2 .innerHTML = "?";
}
var newCell3 = newRow.insertCell(3);
newCell3 .innerHTML = "<A href=\"#\" onclick=\"editSP('"+ sp_value +"');\" class=\"field_text9\">Edit</A> <A href=\"#\" onclick=\"deleteSP('"+ sp_value +"');\" class=\"field_text9\">Delete</A>" ;
newCell3 .style.width = 120;
newCell3 .align = "center";
}
function editSP(sp_value){
isnewtrunk = 0;
_$('userscontent_title').innerHTML = "Edit Service Provider";
for(var i=0; i< _$('devices').length; i++){
if(sp_value == _$('devices').options[i].value ){
_$('devices').selectitem(i);
showSPdetails();
break;
}
}
}
function saveSPdetails(){
hideSPdetails();
loadServiceProvidersintotable();
}
function hideSPdetails(){
_$('userscontent').style.display = "none";
_$('bg_transparent').style.display = "none";
}
function showSPdetails(){
_$('cancel').disabled = false;
_$('userscontent').style.display = "";
_$('bg_transparent').style.display = "";
if ( isnewtrunk == 0){
_$('trunkstyleanalog').disabled = true;
_$('trunkstylevoip').disabled = true;
_$('trunkstylecustomvoip').disabled = true;
_$('provider').disabled = true;
}
}
function deleteSP(trunk){
for(var i=0; i< _$('devices').length; i++){
if( _$('devices').options[i].value == trunk){
_$('devices').selectitem(i) ;
_$('delete').disabled = 0;
if( !_$('delete').click() ){
return;
}
break;
}
}
}
function deletesp_fromui(trunk){
var delete_id = "row" + trunk;
for( var i=0; i < _$('serviceproviderstable'). rows.length; i++){
if ( _$('serviceproviderstable'). rows[i].id == delete_id ){
_$('serviceproviderstable').deleteRow(i);
loadServiceProvidersintotable();
break;
}
}
}
function flip_register(){
_$('cancel').disabled= false;
_$('save').disabled= false;
if( _$('customvoip_register').checked && _$('customvoip_protocol').value == "iax"){
_$('registeriax').value = 'yes';
_$('registersip').value = 'no';
}
if( _$('customvoip_register').checked && _$('customvoip_protocol').value == "sip"){
_$('registeriax').value = 'no';
_$('registersip').value = 'yes';
}
if( !_$('customvoip_register').checked ){
_$('registeriax').value = 'no';
_$('registersip').value = 'no';
}
}
</SCRIPT>
<BODY bgcolor="#FFFFFF" onload="localinit()" topmargin=0 leftmargin=0>
<table width="100%" height="100%" border=0 cellpadding=0 cellspacing=0>
<tr>
<td width="170" valign=top align=left>
<div id="menu">
<table cellpadding=3 cellspacing=2 border=0 id="sidelist">
<tr><td width=3></td><td>Start</td></tr>
<tr><td></td><td>Verify Analog Ports</td></tr>
<!-- <tr><td></td><td>Date & Time</td></tr> -->
<tr><td></td><td>Local Extension Settings</td></tr>
<tr><td></td><td class="slselected">Service Providers</td></tr>
<tr><td></td><td>Calling Rules</td></tr>
<tr><td></td><td>VoiceMail Settings</td></tr>
<tr><td></td><td>User Extensions</td></tr>
<tr><td></td><td>Incoming Calls</td></tr>
<!-- <tr><td></td><td>VoiceMenus</td></tr> -->
<tr><td></td><td>Finish</td></tr>
</table>
</div>
</td>
<td valign=top align=center>
<!-- this page -->
<select disabled size="1" id="devices" style="display:none"></select>
<input type='button' id='delete' value='Delete' style="display:none">
<center>
<div class="heading">Step 3 of <script>document.write(parent.numberofsteps);</script> - Service Providers</div>
<table class="table_black" cellpadding=2 cellspacing=2 border=0 align=center width=500 id="table_one">
<tr> <td width=40>S.No</td>
<td width="200">Service Provider</td>
<td>Type</td>
<td width="120" align="center">Options</td>
</tr>
</table>
<div style="width:500;height:225; overflow :auto;">
<table id="serviceproviderstable" cellpadding=2 cellspacing=1 border=0 align=center width=500></table>
</div>
<input type='button' id='new' value='Add Service Provider'>
</center>
<div id="userscontent" STYLE="display:none; position: absolute; left: 230; top: 5; width:500; height:375; background-color:#F4EFE5; border-width: 1px; border-color: #7E5538; border-style: solid;z-index:5">
<table width="100%" cellpadding=0 cellspacing=0>
<TR bgcolor="#7E5538" >
<TD onmousedown="startDrag(event , 'userscontent');" id="userscontent_title" style="cursor: move;color:#FFFFFF; font-size: 12px; font-weight:bold;" align="center"></TD>
<TD Height="20" width=15 align="center" style="color:#FFFFFF; font-size: 12px; font-weight:bold;" onclick="$('cancel').click();">X</TD>
</TR>
</table>
<table align="center" width=450>
<tr>
<td class="field_text" width=130 valign="top" align="left">
<!-- Provider type -->
<font class="subheading">
<div id='cabinet' style='height:0;width:0;overflow:hidden'>
<select id='hiddenglobals'></select>
</div> Provider Type:<BR>
<LABEL FOR="trunkstyleanalog">
<input name='trunkstyle' type='radio' id='trunkstyleanalog' onclick='activateanalogvoip()' value='analog'>Analog
</LABEL><BR>
<LABEL FOR="trunkstylevoip">
<input name='trunkstyle' type='radio' id='trunkstylevoip' onclick='activateanalogvoip()' value='voip'>VoIP
</LABEL><BR>
<LABEL FOR="trunkstylecustomvoip">
<input name='trunkstyle' type='radio' id='trunkstylecustomvoip' onclick='activateanalogvoip()' value='customvoip'>Custom VoIP
</LABEL>
<div id="div_providername" style="display:none">
<BR><BR><B>Provider Name:</B><BR>
<input id="name" size=10 class='input8'>
</div>
</font>
<!-- Provider type -->
</td>
<td> <!-- Provider options -->
<div id='analogvoipcontainer' style='height:320;overflow:hidden' align="center">
<div id='analog' style='display:none' align="center">
<table align="center" class="font85">
<tr> <td style='width:80px' valign='top' class="field_text">Lines:</td>
<td> <select size="12" multiple='true' id='zapchan' style='width:200px' class="input9"></select>
<div id="zapchan_analoglines" style='height:110px; width: 200px; overflow :auto; display:none'></div>
</td>
</tr>
<tr> <td colspan='2' style='width:80px' valign='top' align='center'></td></tr>
</table>
</div>
<div id='voip' style='display:none' align="center">
<table align="center" class="font85">
<tr> <td style='width:80px' valign='top' class="field_text">Provider:</td>
<td> <select size='4' id='provider' style='width:200px' altonchange='selectprovider()' class="input9"></select> </td>
</tr>
<tr> <td colspan='2' align='center' id='providerlogo_image'></td> </tr>
<tr> <td colspan='2' align='center'> <div id='providerdesc' align='left' style='width:230px;height:100px; font-size:10px'></div></td>
</tr>
<tr> <td class="field_text">Username:</td>
<td><input size='20' id='username' class="input9"></td>
</tr>
<tr> <td class="field_text">Password:</td>
<td><input size='20' type="password" id='secret' class="input9"></td>
</tr>
</table>
</div>
<div id='customvoip' align="center" style='display:none' align="center">
<table align="center" cellpadding=2 cellspacing=1 class="font85">
<input id="name" type="hidden"> <input id="trunkname" type="hidden">
<input id="hasiax" type="hidden"> <input id="hassip" type="hidden">
<input id="hasexten" type="hidden"> <input id="callerid" type="hidden">
<input id="registeriax" type="hidden"> <input id="registersip" type="hidden">
<input id="host" type="hidden"> <input id="dialformat" type="hidden">
<input id="context" type="hidden"> <input id="group" type="hidden">
<input id="insecure" type="hidden"> <input id="port" type="hidden">
<input id="fromuser" type="hidden"> <input id="fromdomain" type="hidden">
<input id="providerlogo" type="hidden">
<tr> <td height=10></td>
<td></td>
</tr>
<tr> <td colspan=2>Please enter your Service Provider information:</td> </tr>
<tr> <td class="field_text">Comment:</td>
<td><input type="text" id="customvoip_name" size=14 onkeyup=" $('cancel').disabled= false;$('save').disabled= false;" class="input9"></td>
</tr>
<tr> <td class="field_text">Protocol:</td>
<td> <select id="customvoip_protocol" onchange=" $('cancel').disabled= false;$('save').disabled= false;" class="input9">
<option value="iax">IAX</option>
<option value="sip">SIP</option>
</select>
</td>
</tr>
<tr> <td class="field_text">Register:</td>
<td><input type="checkbox" id="customvoip_register" onchange="flip_register();" class="input8"></td>
</tr>
<tr> <td class="field_text">Host:</td>
<td><input type="text" id="customvoip_host" size=14 onkeyup=" $('cancel').disabled= false;$('save').disabled= false;" class="input9"></td>
</tr>
<tr> <td class="field_text">Username:</td>
<td><input type="text" id="customvoip_username" size=14 onkeyup=" $('cancel').disabled= false;$('save').disabled= false;" class="input9"></td>
</tr>
<tr> <td class="field_text">Password:</td>
<td><input type="password" id="customvoip_secret" size=14 onkeyup=" $('cancel').disabled= false;$('save').disabled= false;" class="input9"></td>
</tr>
</table>
</div>
</div>
<!-- Provider options -->
</td>
</tr>
<tr> <td></td>
<td align="center">
<input type='button' id='save' value='Save' class="buttonbold">
<input type='button' id='cancel' value='Cancel' class="buttonbold">
</td>
</tr>
</table>
</div>
<!-- this page -->
</td>
</tr>
</table>
<div id="bg_transparent" STYLE="display:none; position: absolute; left: 0; top: 0; width:100%; height:100%; background-color:#FFFFFF; filter:alpha(opacity=50); -moz-opacity:.50;opacity:.50; border-width: 0px; z-index:4">
</div>
</BODY>
</HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -