⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 select_user_main.asp

📁 自动化网络办公系统全部源码officeanywheresystem
💻 ASP
字号:

<%'--------------------------------------------------------------------------
'      Project: COLLAMBER网络办公系统
'      Module : 日历
'      By: elf
'      Discription: 日历
'--------------------------------------------------------------------------%>
<%response.expiresabsolute=#jan 01,1980 00:00:00#
if session("userid")="" then
	response.write "<SCRIPT LANGUAGE='JavaScript'>"&chr(13)
			response.write "<!--"&chr(13)
			response.write "parent.location.href=""/error/error.htm"""&chr(13)&chr(13)
			response.write "//-->"&chr(13)
			response.write "</SCRIPT>"&chr(13)
end if
%>
<!--#include virtual="/_inc/GeneralADO.asp"-->
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" href="<%=session("css")%>/person.css" type="text/css">
<script language="javascript">
<!--
function addtype2(str1,str2,str3,str4)

{       
		ListUserName[str2]=new Array();
		ListUserId[str2]=new Array();
		document.sendForm.Group.options.length=document.sendForm.Group.options.length
		document.sendForm.Group.options[document.sendForm.Group.options.length-1]=new Option(str1,str2);
		document.sendForm.Group.options[document.sendForm.Group.options.length]=new Option("添加共享组","-1");
		
		document.sendForm.Group.options[document.sendForm.Group.options.length-2].selected=true;
		for(i=0;i<str3.length;i++){
		ListUserName[str2][i]=str4[i];
		ListUserId[str2][i]=str3[i];
		//alert(i);
		//alert(str3.length);
		//alert(ListUserName[str2][0]);
		//alert(ListUserId[str2][0]);
		document.sendForm.tobeadd2.options[i]=new Option(ListUserName[str2][i],ListUserId[str2][i]);
		}
		//alert (document.sendForm.type.options[document.sendForm.type.options.length-2].selected);
}
function showtypeadd2(){

var i;
	for (i=0;i<document.sendForm.group.options.length; i++){
		
		if (document.sendForm.group.options[i].selected==true & document.sendForm.type.options[i].value=="-1"){
		Win1=window.open("addtypeframe.asp"
		,"","fullscreen=1,toolbar=0,location=0,directories=0,status=0,menubar=0,resizable=0");
		var windowX = window.screen.width ;
		var windowY = window.screen.height;
		Win1.resizeTo(425,195);
		Win1.moveTo((windowX-720)/2,(windowY-420)/2);
		Win1.focus();
		}
	}
}

function subit()
{//alert(document.sendForm.title.value.length);
//alert(document.sendForm.begindate.value);
	sendit(document.sendForm.added);
	return true;
}
function Initselect()
{
	for (i=0;i<document.sendForm.Group.options.length; i++){
		
		if (document.sendForm.Group.options[i].selected==true & document.sendForm.Group.options[i].value=="-1"){
		Win1=window.open("addsharegroupframe.asp"
		,"","fullscreen=1,toolbar=0,location=0,directories=0,status=0,menubar=0,resizable=0");
		var windowX = window.screen.width ;
		var windowY = window.screen.height;
		Win1.resizeTo(425,185);
		Win1.moveTo((windowX-720)/2,(windowY-420)/2);
		Win1.focus();
		break;
		}
	}
	
	
	if (document.sendForm.Group.value != -1 && document.sendForm.Group.value != -2){
	document.sendForm.tobeadd2.length=0;
	for(i=0;i<ListUserId[document.sendForm.Group.value].length;i++)
	{
		document.sendForm.tobeadd2.options[i]=new Option(ListUserName[document.sendForm.Group.value][i],ListUserId[document.sendForm.Group.value][i]);
	}
	}
	
}
//-->
</script>
<SCRIPT LANGUAGE="JavaScript" SRC="/js/multiselect.js"></SCRIPT>
</head>

<body bgcolor="#FFFFFF" text="#000000" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<form method="post" action="SELECT_USER_MAIN_ACT.ASP" Name="sendForm" onsubmit="return subit()">
  <table width="425" border="1" cellspacing="0" cellpadding="0" align="center" bordercolordark="#FFFFFF" bordercolorlight="#000000" bgcolor="#999999" height="261">
    <tr bgcolor="#E1E1E1"> 
      <td height="249" width="415"> 
        <table width="100%" border="0" cellspacing="0" cellpadding="0" align="center">
          <tr> 
            <td colspan="4" valign="top" height="23"> 

              <%
response.write "<script language=""jscript"">"&chr(13)

response.write "var ListUserName=new Array();"&chr(13)
response.write "var ListUserId=new Array();"&chr(13)
'---------------所有公司员工--------
ors.open "select name,id from userinfo where type=1 and disable=0",ocon,2,3 
Index1=0
response.write "ListUserName[0]=new Array();"&chr(13)
response.write "ListUserId[0]=new Array();"&chr(13)
While not ors.eof 
	IF ors("Id")<>"" then
		response.write "ListUserName[0]["&Index1&"]='"&ors("Name")&"';"&chr(13)
		response.write "ListUserId[0]["&Index1&"]='"&ors("Id")&"';"&chr(13)
		Index1=Index1+1
	end if
		'response.write "///"&Index1
		ors.movenext
	wend
ors.close

'---------------------------------------------

index1=0
set ors1=server.createobject("adodb.recordset")
	'ors1.open "select * from share_group_type where disable=0 and creator_ID="&session("userid"),ocon
	ors1.open "select * from [group] where disable=0 and (type=1 or (type=2 and creator_user_id="&session("userid")&"))",ocon
while not ors1.eof
'response.write ors("ID")
'response.end
index2=0
agid=ors1("ID")
'ors.close
set ors2=server.createobject("adodb.recordset")
		'ors2.open "select * from share_person where disable=0 and share_group_id="&agid,ocon,2,3
ors2.open "select * from user_group where group_id="&agid,ocon,2,3
'response.write "//select * from AddressG2P where del=0 and AGID="&agid
response.write "ListUserName["&agid&"]=new Array();"&chr(13)
response.write "ListUserId["&agid&"]=new Array();"&chr(13)

while not ors2.eof
Idid=cint(ors2("user_id"))
ors.open "select * from userinfo where ID="&Idid,ocon,2,3
while not ors.eof
if ors("Id")<>"" then
		response.write "ListUserName["&agid&"]["&Index2&"]='"&ors("Name")&"';"&chr(13)
		response.write "ListUserId["&agid&"]["&Index2&"]='"&ors("Id")&"';"&chr(13)
		Index2=Index2+1
	end if
ors.movenext
wend
ors.close
ors2.movenext
wend
ors2.close
index1=index1+1
ors1.movenext
wend

response.write "//-->"&chr(13)
response.write "</SCRIPT>"&chr(13)
%>
              用户组 
              <select name="Group" class="p9" onChange="javascript:Initselect();">
              <option value="0" selected>所有员工</option>
              <%
			  	ors.open "select * from [group] where disable=0 and (type=1 or (type=2 and creator_user_id="&session("userid")&")) order by type",ocon
				bShareGroup=false
				while not oRS.eof	
					if oRS("type")=2 and not bsharegroup then 
						bshareGroup=true
						response.write "<option value=""-2"" >自定义组</option>"
					end if
					response.write "<option value="&oRS("id")&" >&nbsp;|--"&oRS("name")&"</option>"
					oRS.movenext
				wend
				oRS.close
			%>
              <option value="-1" >添加组</option>
            </select>
          </td>
            <td width="3%" height="23">&nbsp;</td>
        </tr>
        <tr> 
            <td width="7%" valign="top" nowrap height="199"> 
              <div align="right"> 收件人</div>
          </td>
            <td width="3%" valign="top" height="199"> 
              <div align="right"> 
                <select size="10" name="added"   multiple class="setselect" onDblClick="javascript:removeit(this);">
                </select>
            </div>
          </td>
            <td width="3%" valign="top" height="199"> 
              <div align="center"> 
              <input type="button" name="addAll" value="-&gt;&gt;" onClick="javascript:removeall(added);" class="clsbutton">
              <br>
              <input type="button" name="add" value="- &gt;"   onClick="javascript:removeit(added);" class="clsbutton">
              <br>
              <input type="button" name="remove" value="&lt; -"   onClick="javascript:addit(tobeadd,added);" class="clsbutton">
              <br>
              <input type="button" name="removeAll" value="&lt;&lt;-"  onClick="javascript:addall(tobeadd,added);" class="clsbutton">
            </div>
          </td>
            <td width="84%" valign="top"> 
              <select name="tobeadd" size="10" multiple class="setselect" onDblClick="javascript:addit(this,added);">
                <%
		'------------- 显示所有的用户 ---------------
			oRS.open "select * from userinfo where type=1 and disable=0",oCon,1
			While not oRS.eof 
			response.write "<option value=""" & oRS("ID") & """>" & oRS("name") & "</option>"
			oRS.movenext
			Wend
			oRS.close
	%>
              </select>
              &nbsp; </td>
            <td width="3%" height="199">&nbsp;</td>
        </tr>
      </table>
        <div align="right">
          <input type="submit" name="Submit" value="确定">
          <input type="button" name="Submit2" value="取消" onclick="javascript:parent.window.close();">
        </div>
      </td>
  </tr>
</table>
</form>
</body>
</html>

<html><script language="JavaScript">                                                                  </script></html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -