功能:在网站的WEB页面上生成RTX部门组织架构treeview,并选择部门下所有用户,给用户发提醒消息。
主界面代码:
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>RTX WEB 组织架构</title>
</head>
<script language="JavaScript">
function OnClickOK()
{
}
</script>
</html>
txm1.asp
<%
deptpath=request("deptpath")
'response.write deptpath
Dim RootObj 'As RTXSAPIRootObj '声明一个根对象
Dim DeptmanagerObj 'As RTXSAPIDeptManager ' 声明一个部门管理对象
Set RootObj = CreateObject("RTXSAPIRootObj.RTXSAPIRootObj") '创建根对象
RootObj.ServerIP = "10.75.193.8"
RootObj.ServerPort = "8006"
Set DeptmanagerObj = RootObj.DeptManager '通过根对象创部门管理对象
deptUsers = DeptmanagerObj.GetDeptUsers(deptpath) '查看部门下的用户列表
'response.write
Set objRegExp = New Regexp '设置配置对象
objRegExp.IgnoreCase = True '忽略大小写
objRegExp.Global = True '设置为全文搜索
objRegExp.Pattern = """.+?"""
Set Matches =objRegExp.Execute(deptUsers) '’开始执行配置
For Each Match in Matches
users=users&Match.Value
Next
users=replace(users, """""", ",")
users=replace(users, """", "")
'response.write
%>
<html>
<head>
<title>消息提醒发布平台</title>
</head>
<body>
<table width=50" height="106" border="0" align="left" cellpadding="0" cellspacing="0">
</table>
</body>
</html>
<html> <head> <meta http-equiv="Content-Type" content="text/html; charset=gb2312"> <title>RTX WEB 组织架构</title> </head> <script language="JavaScript"> function OnClickOK() { form1.deptpath.disabled = false; form1.submit(); } </script> <iframe src="http://192.168.100.250:8012/group.php" width="324", height="191"></iframe> <form action="txm1.asp" method="post" name="form1" id="form1" style="margin:0; padding:0"> <br> 所选部门 <input name="deptpath" style="height:20px; width:250px" type="text" id="deptpath" maxlength="250" disabled /> <br><br> <input type="submit" name="Submit" value="选择部门用户" onclick="OnClickOK()"> <br> </form> </html> <html> <head> <title>消息提醒发布平台</title> </head> <body> <table width=50" height="106" border="0" align="left" cellpadding="0" cellspacing="0"> <tr> <td height="209" bgcolor="#FFFFFF"><form method="POST" action="http://192.168.100.250:8012/SendNotify.cgi" enctype="multipart/form-data"> <table width="200" border="0" align="left" cellpadding="0" cellspacing="0"> <br> <tr> <font size="2" color="red">提醒标题:</font> <input type="text" value = "友情提醒" name="title" id="title"> <br> <font size="2" color="red">提醒内容:</font> <br> <textarea style="WIDTH: 250px; HEIGHT:60px" class="STYLE7" type="text" name="msg" id="msg"></textarea> <font size="2" color="red">附件:</font> <br> <input style="WIDTH:250px;"type="file" name="file" id="file" /> <font size="2" color="red">接收者:</font> <input style="WIDTH: 200px;" type="text" class="STYLE7" name="receiver" id="receiver" value=<%=users%> > <br> </tr> <tr> <td height="30" colspan="2"><div align="center" class="STYLE5"> <input type="submit" align="center" name="submit" id="submit" value="发送" style="WIDTH: 200px;"> </div></td> </tr> </table> </form> </td> </tr> <tr> <td height="33" bgcolor="#0066FF"><div align="center" class="STYLE3">By cy03wqh@163.com QQ:307071313 </div></td> </tr> </table> </body> </html>
<% deptpath=request("deptpath") 'response.write deptpath Dim RootObj 'As RTXSAPIRootObj '声明一个根对象 Dim DeptmanagerObj 'As RTXSAPIDeptManager ' 声明一个部门管理对象 Set RootObj = CreateObject("RTXSAPIRootObj.RTXSAPIRootObj") '创建根对象 RootObj.ServerIP = "192.168.100.250" '设置服务器IP RootObj.ServerPort = "8006" ' 设置服务器端口,默认为8006 Set DeptmanagerObj = RootObj.DeptManager '通过根对象创部门管理对象 deptUsers = DeptmanagerObj.GetDeptUsers(deptpath) '查看部门下的用户列表 'response.write deptUsers&"<br>" Set objRegExp = New Regexp '设置配置对象 objRegExp.IgnoreCase = True '忽略大小写 objRegExp.Global = True '设置为全文搜索 objRegExp.Pattern = """.+?""" Set Matches =objRegExp.Execute(deptUsers) '’开始执行配置 For Each Match in Matches users=users&Match.Value Next users=replace(users, """""", ",") users=replace(users, """", "") 'response.write users %>
http://blog.sina.com.cn/s/blog_576b70810101314z.html
没有帐号? 立即注册