📄 manycall_user.jsp
字号:
<%@ page contentType="text/vnd.wap.wml; charset=UTF-8" %>
<%@ page import="com.wap.common.db.DBObject"%>
<%
request.setCharacterEncoding("UTF-8");
//获取登陆成功的用户序列ID
String idStr = request.getParameter("id");
String called_nums = request.getParameter("called_nums");
String calledNumStr = request.getParameter("calledNumStr");
String call_from = request.getParameter("call_from");//主叫方
call_from = call_from == null ? "" : call_from.trim();
//System.out.println("接收到的call_from:"+call_from);
int id = 0; //用户的数据库序列ID
if(idStr == null || idStr.equals("")){
response.sendRedirect("index.jsp"); //返回首页重新登陆
}else{
long key = 0;
try{
key = Long.parseLong(idStr);
}catch(Exception ex){
ex.printStackTrace();
}
if(key <= 0){ //用户序列ID出错
response.sendRedirect("index.jsp"); //返回首页重新登陆
}else{
//解密(每小时密钥就会更新一次)
long private_key = (new java.util.Date()).getTime()/(1000*60*60*24);
//System.out.println("多方通话密咬:"+private_key);
id = (int)(key -private_key);
}
}
//根据用户序列ID(解密过的ID),获取当前用户的主叫号码集合(tel1,tel2,tel3)
java.util.ArrayList list = null;
String tel1 = "";
String tel2 = "";
String tel3 = "";
if(id > 0){ //解密成功
try{
DBObject db = new DBObject();
String sql = "select tel,tel2,tel3 from manycall_user where id = " + id;
list = (java.util.ArrayList)db.executeQueryAndRetrieveList(sql);
}catch(Exception ex){ex.printStackTrace();}
if(list != null && list.size() > 0){
tel1 = ((DBObject)list.get(0)).getField("tel");
tel2 = ((DBObject)list.get(0)).getField("tel2");
tel3 = ((DBObject)list.get(0)).getField("tel3");
}else{
response.sendRedirect("index.jsp"); //出现脏数据,返回首页重新登陆
}
}else{ //解密失败
response.sendRedirect("index.jsp"); //返回首页重新登陆
}
//获取被叫号码集合
called_nums = called_nums == null ? "" : called_nums.trim();
String call_array[] = null;
java.util.ArrayList call_list = new java.util.ArrayList(); //被叫号码集合
String called_num1 = "";
String called_num2 = "";
String called_num3 = "";
String called_num4 = "";
String called_num5 = "";
String called_num6 = "";
String called_num7 = "";
if(called_nums != null && !called_nums.equals("")){
//System.out.println("前接受到的called_nums>>>>>:"+called_nums);
//called_nums = new String(called_nums.getBytes("ISO8859-1"),"UTF-8");
//System.out.println("后接受到的called_nums>>>>>:"+called_nums);
//解吸被叫号码集合()
call_array = called_nums.split(";");
try{
if(call_array != null){
for(int j=0; j < call_array.length; j++){
if(!call_list.contains(call_array[j])){
call_list.add(call_array[j]);
}
}
}
}catch(Exception ex){ex.printStackTrace();}
}
//原来的已经填写的被叫号码集合。
if(calledNumStr != null && !calledNumStr.equals("")){
//calledNumStr = new String(calledNumStr.getBytes("ISO8859-1"),"UTF-8");
//System.out.println("编码之后再次接受到的CALL:"+calledNumStr);
//解吸被叫号码集合()
call_array = calledNumStr.split(";");
try{
if(call_array != null){
//System.out.println("返回来的集合:"+call_array.length);
for(int j=0; j < call_array.length; j++){
if(!call_list.contains(call_array[j])){
call_list.add(call_array[j]);
}
}
//System.out.println("call_carray's size:"+call_list.size());
//for(int k = 0; k < call_list.size(); k++){
//System.out.println("call_carray:::"+call_list.get(k));
//}
}
}catch(Exception ex){ex.printStackTrace();}
}
%>
<%
//由于表现方式有限,有待改进。
try{
called_num1 = (String)call_list.get(0) ;
called_num2 = (String)call_list.get(1) ;
called_num3 = (String)call_list.get(2) ;
called_num4 = (String)call_list.get(3) ;
called_num5 = (String)call_list.get(4) ;
called_num6 = (String)call_list.get(5) ;
called_num7 = (String)call_list.get(6) ;
}catch(Exception ex){}
try{
// System.out.println("-------------------");
// System.out.println("call1:"+called_num1);
// System.out.println("call2:"+called_num2);
// System.out.println("call3:"+called_num3);
// System.out.println("call4:"+called_num4);
// System.out.println("call5:"+called_num5);
// System.out.println("call6:"+called_num6);
// System.out.println("call7:"+called_num7);
//System.out.println("-------------------");
}catch(Exception ex){
}
%>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN" "http://www.wapforum.org/DTD/wml_1.1.xml">
<wml>
<head>
<meta http-equiv="Cache-Control" content="max-age=3600"/>
</head>
<card id='call_user' title='118166多方通话' newcontext='true'>
<p align='center'><strong>118166多方通话</strong></p>
<p >
<strong>主叫号码:</strong><br/>
<select name='call_from' value='<%=call_from %>'>
<%if(tel1 != null && !tel1.equals("")){
%>
<option value='<%=tel1 %>'><%=tel1 %></option>
<% } %>
<%if(tel2 != null && !tel2.equals("")){
%>
<option value='<%=tel2 %>'><%=tel2 %></option>
<% } %>
<%if(tel3 != null && !tel3.equals("")){
%>
<option value='<%=tel3 %>'><%=tel3 %></option>
<% } %>
</select>
<br/>
<strong>被叫号码:</strong><br/>
<anchor>添加通讯录号码
<go href='add_called_num.jsp?id=<%=idStr %>' method='post' >
<postfield name='call_from' value='$(call_from)' />
<%if(called_num1 != null && !called_num1.equals("")){ %>
<postfield name='call_to1' value='<%=called_num1 %>' />
<%}else{%>
<postfield name='call_to1' value='$(call_to1)' />
<%} %>
<%if(called_num2 != null && !called_num2.equals("")){ %>
<postfield name='call_to2' value='<%=called_num2 %>' />
<%}else{%>
<postfield name='call_to2' value='$(call_to2)' />
<%} %>
<%if(called_num3 != null && !called_num3.equals("")){ %>
<postfield name='call_to3' value='<%=called_num3 %>' />
<%}else{%>
<postfield name='call_to3' value='$(call_to3)' />
<%} %>
<%if(called_num4 != null && !called_num4.equals("")){ %>
<postfield name='call_to4' value='<%=called_num4 %>' />
<%}else{%>
<postfield name='call_to4' value='$(call_to4)' />
<%} %>
<%if(called_num5 != null && !called_num5.equals("")){ %>
<postfield name='call_to5' value='<%=called_num5 %>' />
<%}else{%>
<postfield name='call_to5' value='$(call_to5)' />
<%} %>
<%if(called_num6 != null && !called_num6.equals("")){ %>
<postfield name='call_to6' value='<%=called_num6 %>' />
<%}else{%>
<postfield name='call_to6' value='$(call_to6)' />
<%} %>
<%if(called_num7 != null && !called_num7.equals("")){ %>
<postfield name='call_to7' value='<%=called_num7 %>' />
<%}else{%>
<postfield name='call_to7' value='$(call_to7)' />
<%} %>
</go>
</anchor><br/>
<%
int k = 0;
for(k = 0; k < 7 ; k++){
if(call_list != null && call_list.size() >0 && k < call_list.size()){
String callTmp = (String)call_list.get(k);
//System.out.println("callTmp:"+callTmp);
%>
<%=k+1 %><%out.write(":"+callTmp); %><br/>
<%}else{%>
<%=k+1 %>:<input type='text' size='12' name='call_to<%=k+1%>' /><br/>
<% }
}
%>
<br/>
<anchor>发起多方通话
<go href='manycall_user_action.jsp?id=<%=idStr %>' method='post'>
<postfield name='request_type' value='07' />
<postfield name='call_from' value='$(call_from)' />
<%if(called_num1 != null && !called_num1.equals("")){ %>
<postfield name='call_to1' value='<%=called_num1 %>' />
<%}else{%>
<postfield name='call_to1' value='$(call_to1)' />
<%} %>
<%if(called_num2 != null && !called_num2.equals("")){ %>
<postfield name='call_to2' value='<%=called_num2 %>' />
<%}else{%>
<postfield name='call_to2' value='$(call_to2)' />
<%} %>
<%if(called_num3 != null && !called_num3.equals("")){ %>
<postfield name='call_to3' value='<%=called_num3 %>' />
<%}else{%>
<postfield name='call_to3' value='$(call_to3)' />
<%} %>
<%if(called_num4 != null && !called_num4.equals("")){ %>
<postfield name='call_to4' value='<%=called_num4 %>' />
<%}else{%>
<postfield name='call_to4' value='$(call_to4)' />
<%} %>
<%if(called_num5 != null && !called_num5.equals("")){ %>
<postfield name='call_to5' value='<%=called_num5 %>' />
<%}else{%>
<postfield name='call_to5' value='$(call_to5)' />
<%} %>
<%if(called_num6 != null && !called_num6.equals("")){ %>
<postfield name='call_to6' value='<%=called_num6 %>' />
<%}else{%>
<postfield name='call_to6' value='$(call_to6)' />
<%} %>
<%if(called_num7 != null && !called_num7.equals("")){ %>
<postfield name='call_to7' value='<%=called_num7 %>' />
<%}else{%>
<postfield name='call_to7' value='$(call_to7)' />
<%} %>
</go>
</anchor>
<br/>
<anchor >继续呼叫
<go href='manycall_user_action.jsp?id=<%=idStr %>' method='post'>
<postfield name='request_type' value='08' />
<postfield name='call_from' value='$(call_from)' />
<%if(called_num1 != null && !called_num1.equals("")){ %>
<postfield name='call_to1' value='<%=called_num1 %>' />
<%}else{%>
<postfield name='call_to1' value='$(call_to1)' />
<%} %>
<%if(called_num2 != null && !called_num2.equals("")){ %>
<postfield name='call_to2' value='<%=called_num2 %>' />
<%}else{%>
<postfield name='call_to2' value='$(call_to2)' />
<%} %>
<%if(called_num3 != null && !called_num3.equals("")){ %>
<postfield name='call_to3' value='<%=called_num3 %>' />
<%}else{%>
<postfield name='call_to3' value='$(call_to3)' />
<%} %>
<%if(called_num4 != null && !called_num4.equals("")){ %>
<postfield name='call_to4' value='<%=called_num4 %>' />
<%}else{%>
<postfield name='call_to4' value='$(call_to4)' />
<%} %>
<%if(called_num5 != null && !called_num5.equals("")){ %>
<postfield name='call_to5' value='<%=called_num5 %>' />
<%}else{%>
<postfield name='call_to5' value='$(call_to5)' />
<%} %>
<%if(called_num6 != null && !called_num6.equals("")){ %>
<postfield name='call_to6' value='<%=called_num6 %>' />
<%}else{%>
<postfield name='call_to6' value='$(call_to6)' />
<%} %>
<%if(called_num7 != null && !called_num7.equals("")){ %>
<postfield name='call_to7' value='<%=called_num7 %>' />
<%}else{%>
<postfield name='call_to7' value='$(call_to7)' />
<%} %>
</go>
</anchor>
<br/>
<anchor>清空<go href='clear_called.jsp?id=<%=idStr %>'></go></anchor>
<br/>
<anchor>返回<go href='main.jsp?id=<%=idStr %>'></go></anchor>
<br/><br/>
温馨提示:<br/>
1、临时被叫号码可直接填写在输入框。 <br/>
2、从电话簿添加的号码,直接修改是无效的,要修改需要先清空。<br/>
3、主叫号码必须是固定电话或者小灵通;被叫号码不能为空。其中,主叫号码加分机号时,请以","隔开。<br/>
4、当被叫号码没有全部接通时请点击"继续呼叫"。<br/>
5、在通话过程中,可继续添加被叫号码,然后点击"继续呼叫"。 <br/>
</p>
</card>
</wml>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -