📄 addsmsuser.asp
字号:
<%response.expires=0%>
<!--#include file="asp/opendb.asp"-->
<%
oabusyname=request.cookies("oabusyname")
oabusyuserid=request.cookies("oabusyuserid")
oabusyusername=request.cookies("oabusyusername")
oabusyuserdept=request.cookies("oabusyuserdept")
oabusyuserlevel=request.cookies("oabusyuserlevel")
if oabusyusername="" or oabusyuserid="" then
response.write("<script language=""javascript"">")
response.write("alert(""您已经过期,请重新登录!"");")
response.write("window.close();")
response.write("</script>")
response.end
end if
if request("yesbutton")="确定" then
dim namestr,numberstr
on error resume next
namestr=""
numberstr=""
for i=1 to request.form("addnumber").count
if request.form("addnumber")(i)<>"" then
numberstr=numberstr&request.form("addnumber")(i)&","
end if
next
response.write("<script language=""javascript"">")
response.write("opener.form1.code.value=opener.form1.code.value+"&chr(34)&numberstr&chr(34)&";")
response.write("window.close();")
response.write("</script>")
response.end
end if
set conn=opendb("oabusy","conn","accessdsn")
%>
<html>
<head>
<meta http-equiv="Content-Language" content="zh-cn">
<meta http-equiv="expires" content="no-cache">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" href="css/css.css">
<title>增加手机号码</title>
</head>
<body>
<p align="center"><b><font size="+1">增加手机号码</font></b></p>
<div align="center">
<center>
<form method="post" name="form1" action="addsmsuser.asp">
<%
set rs=server.createobject("adodb.recordset")
sql="select userinf.name,userinf.userdept,userinf.userlevel,stafaddressinf.handset from userinf,stafaddressinf where stafaddressinf.username=userinf.username and stafaddressinf.handset<>''"
rs.open sql,conn,1
if not rs.eof and not rs.bof then
%>
<div align="center">
<center>
<table border="1" width="90%" cellspacing="0" cellpadding="5" bordercolorlight="#808080" bordercolordark="#D4D0C8" height="0">
<tr><td colspan="4" align="center" height="25"><font color="#0000ff">内部通讯录</font></td></tr>
<tr height="25">
<td width="100" bgcolor="#C0C0C0" align="center">姓名</td>
<td width="128" bgcolor="#C0C0C0" align="center">部门</td>
<td width="129" bgcolor="#C0C0C0" align="center">职务</td>
<td width="99" bgcolor="#c0c0c0" align="center">手机号码</td>
</tr>
<%
i=1
do while not rs.eof
'if cstr(rs("id"))<>oabusyuserid then
%>
<tr bgcolor="#ffffff">
<td width="100">
<input type="checkbox" name="addnumber" value="<%=rs("handset")%>">
<%=server.htmlencode(rs("name"))%>
</td>
<td width="128"><%=server.htmlencode(rs("userdept"))%></td>
<td width="129"><%=server.htmlencode(rs("userlevel"))%></td>
<td widht="99"><%=rs("handset")%></td>
</tr>
<%
'end if
rs.movenext
loop
set rs=nothing
%>
</table>
</center>
</div>
<%
end if
set rs=server.createobject("adodb.recordset")
sql="select name,company,position,handset from clientinf where handset<>''"
rs.open sql,conn,1
if not rs.eof and not rs.bof then
%>
<table border="1" width="90%" cellspacing="0" cellpadding="5" bordercolorlight="#808080" bordercolordark="#D4D0C8">
<tr><td colspan="4" align="center" height="25"><font color="#0000ff">外部通讯录</font></td></tr>
<tr height="25">
<td width="100" bgcolor="#C0C0C0" align="center">姓名</td>
<td width="128" bgcolor="#C0C0C0" align="center">单位</td>
<td width="129" bgcolor="#C0C0C0" align="center">职位</td>
<td width="99" bgcolor="#c0c0c0" align="center">手机号码</td>
</tr>
<%
i=1
do while not rs.eof
%>
<tr bgcolor="#ffffff">
<td width="100">
<input type="checkbox" name="addnumber" value="<%=rs("handset")%>">
<%=server.htmlencode(rs("name"))%>
</td>
<td width="128"><%=server.htmlencode(rs("company"))%></td>
<td width="129"><%=server.htmlencode(rs("position"))%></td>
<td widht="99"><%=rs("handset")%></td>
</tr>
<%
rs.movenext
loop
set rs=nothing
%>
</table>
<%
end if
set rs=server.createobject("adodb.recordset")
sql="select xm,company,userzw,handset from personrecord where thisinfousername='"&oabusyusername&"' and handset<>''"
rs.open sql,conn,1
if not rs.eof and not rs.bof then
%>
<table border="1" width="90%" cellspacing="0" cellpadding="5" bordercolorlight="#808080" bordercolordark="#D4D0C8">
<tr><td colspan="4" align="center" height="25"><font color="#0000ff">外部通讯录</font></td></tr>
<tr height="25">
<td width="100" bgcolor="#C0C0C0" align="center">姓名</td>
<td width="128" bgcolor="#C0C0C0" align="center">单位</td>
<td width="129" bgcolor="#C0C0C0" align="center">职位</td>
<td width="99" bgcolor="#c0c0c0" align="center">手机号码</td>
</tr>
<%
i=1
do while not rs.eof
%>
<tr bgcolor="#ffffff">
<td width="100">
<input type="checkbox" name="addnumber" value="<%=rs("handset")%>">
<%=server.htmlencode(rs("xm"))%>
</td>
<td width="128"><%=server.htmlencode(rs("company"))%></td>
<td width="129"><%=server.htmlencode(rs("userzw"))%></td>
<td widht="99"><%=rs("handset")%></td>
</tr>
<%
rs.movenext
loop
set rs=nothing
%>
</table>
<%
end if
conn.close
set conn=nothing
%>
<br>
<input type="submit" value="确定" name="yesbutton">
<input type="button" value="关闭" name="closebutton" onclick="window.close();">
</form>
</center>
</div>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -