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

📄 setlist.asp

📁 自动化网络办公系统全部源码officeanywheresystem
💻 ASP
📖 第 1 页 / 共 2 页
字号:
<%'--------------------------------------------------------------------------
'      Project: COLLAMBER网络办公系统
'      Module : 职员资料维护表
'      By: badoon
'      Discription: 显示职员资料并维护
'--------------------------------------------------------------------------%>
<%

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>职员资料维护</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" href="<%=session("css")%>person.css" type="text/css">
<%

	'-------------------------------------------------------------------------
	'	产生不同过滤类型的HTML语句
	'	Author:imafar
	'	inputtype控件类型:1、文本,2、选择框,3、时间文本
	'	filtertype过滤器类型:
	'	filtertypeID表fn_table_filter_type的id字段
	'-------------------------------------------------------------------------
	function fnFilterSwitch(inputtype,filtertype,filtertypeID,filter_data)
	
		fnFilterSwitch = "case " & filtertypeID & ":" & vbCrLf & "{" & vbCrLf & "return """ & fnFilterInputString(inputtype,filtertype,filter_data) & """;" & vbCrLf & "break;" & vbCrLf & "}" & vbCrLf

	end function

	function fnFilterInputString(inputtype,filtertype,filter_data)
		dim m_oRS
		set m_oRS=server.createobject("adodb.recordset")
		select case inputtype 
		case 1
			fnFilterInputString	= "<INPUT TYPE='text' NAME='key""+ iParam +""' style='width:100'>"
		case 2
			fnFilterInputString	= "<select  NAME='key""+ iParam +""' style='width:100'>"
			if filtertype=1 then
				'response.write "|"&filter_data&"|"
				m_oRS.open filter_data,oCon
				'm_oRS.open "select name,name from [group] where type=1 and disable=0",oCon
				fnFilterInputString	= fnFilterInputString & "<option Value=''>全部</option>"
				while not m_oRS.eof
					fnFilterInputString	= fnFilterInputString & "<option Value='" & m_oRS(0) & "'>" & m_oRS(1) & "</option>"
					m_oRS.movenext
				wend
				m_oRS.close
			elseif  filtertype=2 then
				fnFilterInputString	= fnFilterInputString & filter_data
			end if
			fnFilterInputString	= fnFilterInputString & "</select>"
		case 3
			fnFilterInputString	= "<INPUT TYPE='text' NAME='key""+ iParam +""' style='width:100' onClick='javascript:fPopCalendar(key""+ iParam +"",key""+ iParam +""); return false;'>"
		end select
	end function

	function fnSearchInput(inputtype,filtertype,filter_data,index)
		dim m_oRS
		set m_oRS=server.createobject("adodb.recordset")
		select case inputtype 
		case 1
			response.write "<INPUT TYPE=""hidden""  name=""operator" & index & """ value=""like""><INPUT TYPE='text' NAME='key"& index &"' style='width:120'>"
			fnSearchInput=1
		case 2
			response.write "<INPUT TYPE=""hidden""  name=""operator" & index & """ value=""=""><select  NAME='key"& index &"' style='width:120'>"
			if filtertype=1 then
				'response.write "|"&filter_data&"|"
				m_oRS.open filter_data,oCon
				'm_oRS.open "select name,name from [group] where type=1 and disable=0",oCon
				response.write "<option Value=''>全部</option>"
				while not m_oRS.eof
					response.write "<option Value='" & m_oRS(0) & "'>" & m_oRS(1) & "</option>"
					m_oRS.movenext
				wend
				m_oRS.close
			elseif  filtertype=2 then
				response.write filter_data
			end if
			response.write "</select>"
			fnSearchInput=1
		case 3
			if filtertype=1 then
				response.write "<INPUT TYPE=""hidden""  name=""operator" & index & """ value=""like""><INPUT TYPE='text' NAME='key"& index &"' style='width:120' onClick='javascript:fPopCalendar(key"& index &",key"& index &"); return false;'>"
				fnSearchInput=1
			elseif  filtertype=2 then
				response.write "从<INPUT TYPE=""hidden""  name=""operator" & index & """ value="">=""><INPUT TYPE='text' NAME='key"& index &"' style='width:110' onClick='javascript:fPopCalendar(key"& index &",key"& index &"); return false;'>到<INPUT TYPE=""hidden"" name=""logic" & index+1 & """ value=""and""><INPUT TYPE=""hidden"" name=""Field" & index+1 & """ style=""width:110"" value="""  & oRS("field_type") & "|" & oRS("field_str") & """><INPUT TYPE=""hidden""  name=""operator" & index+1 & """ value=""<=""><INPUT TYPE='text' NAME='key"& index+1 &"' style='width:110' onClick='javascript:fPopCalendar(key"& index+1 &",key"& index+1 &"); return false;'>"
				fnSearchInput=2
			end if

		end select
	end function

	table_id=request.querystring("table_id")
	if table_id="" then table_id=2
	'---------------------------- 读取列的权限 ------------------------------
	oRS.open "select * from fn_table_accredit where table_id="&table_id & " and user_id="&session("userid"),oCon
	if not oRS.eof then
		col_id="," & oRS("Col_ID_list") & ","
	end if
	oRS.close
	'---------------------------- ---------- ------------------------------

	filterType=""			'----- 却省的类型
	sAddFilterInput=""		'----- 生成js函数fnAddFilterInput 用的,typeid对应的switch
	filterSelect=""			'----- 选择字段的
	bUserDate=false			'----- 是否要包含日历js
	sfiltertypeID=""		'----- 生成js函数fnAddFilterInput 用的,需要那些typeid
	oRS.open "select fn_table_col.*,input_type,filter_type,filter_data from fn_table_col,fn_table_filter_type where fn_table_col.filter_type_id=fn_table_filter_type.id and table_id="&table_id,oCon
	response.write "<SCRIPT LANGUAGE='JavaScript'>"&chr(13)
	response.write "<!--"&chr(13)
	response.write "var ColID = new Array()"&chr(13)
	response.write "var ColType = new Array()"&chr(13)
	count=0
	while not oRS.eof
		if instr(sfiltertypeID,","& oRS("Filter_type_id") &",")<=0 then
			if FilterInput = "" then FilterInput = fnFilterInputString(oRS("input_type"),oRS("Filter_type"),oRS("filter_data").value) 
			sAddFilterInput = sAddFilterInput & fnFilterSwitch(oRS("input_type"),oRS("Filter_type"),oRS("Filter_type_id"),oRS("filter_data").value)
			sfiltertypeID = sfiltertypeID & "," & oRS("Filter_type_id") & ","
			if oRS("input_type")=3 then bUserDate=true
		end if
		if instr(col_id,","& oRS("id") &",")>0 or session("userid")=1 then
			if filtertype="" then filtertype=oRS("filter_type_id")
			response.write "ColID["& count &"] ='" & oRS("field_type") & "|" & oRS("field_str")&"';" & chr(13)
			response.write "ColType["& count &"] =" & oRS("filter_type_id") & chr(13)
			if oRS("SEARCH_COL")=1 then filterSelect = filterSelect & "<option value="""& oRS("field_type") & "|" & oRS("field_str") & """>"& oRS("FIELD_NAME") &"</option>"
			count=count+1
		end if
		oRS.movenext
	wend
	if filterType="" then filterType=100
	oRS.close
	response.write "//-->"&chr(13)
	response.write "</SCRIPT>"&chr(13)

	FilterInput = replace (FilterInput,"""+ iParam +""","0")
	
	if bUserDate then response.write "<SCRIPT LANGUAGE=""JavaScript"" src=""/js/calendar_sel.js""></SCRIPT>" & vbCrLf

%>
<SCRIPT LANGUAGE="JavaScript" src="/js/popwin.js">
</SCRIPT>
<SCRIPT LANGUAGE="JavaScript" src="/js/Validate.js">
</SCRIPT>
<SCRIPT LANGUAGE="JavaScript">
<!--
function subit()
{
	//alert(document.sendForm.submit)
	document.sendForm.submit();
}
	sFilterInput0="<%=FilterInput%>";
	iFilter=0
function addFilterTable(obj){
    iFilter++;
	alert(iFilter)
 	//alert (obj)
   obj.insertAdjacentHTML('BeforeEnd','<table width=100% cellspacing=0><tr><td bgcolor="#F5F5F5"><select name="logic' + iFilter + '"><option value="and">并 且<option value="or">或 者</select></td></tr><tr><td bgcolor="#F5F5F5"><table width="100%" border="0" cellspacing="0" cellpadding="0" bgcolor="#E8E8E8"><tr > <td >字段:</td><td ><select name="Field' + iFilter + '" style="width:100" onchange="fnChangeFilterInput(FilterInput' + iFilter + ',this.value,' + iFilter + ')"><%=filterSelect%></select></td>				</tr><tr ><td ></td><td ><select name="operator' + iFilter + '"><option value="like">包含</option><option value="=">=</option><option value=">">&gt;</option><option value="<">&lt;</option><option value=">=">&gt;=</option><option value="<=">&lt;=</option><option value="<>">不等于</option></select></td></tr><tr ><td ></td><td > <div id="FilterInput' + iFilter + '">' +   fnAddFilterInput(<%=filtertype%>,iFilter) + '   </div> </td>				  </tr>				</table>			</td>         </tr></table>');
   document.sendForm.FilterCount.value++;
	//obj.insertAdjacentHTML('BeforeEnd','<tr><td bgcolor="#F5F5F5"><select name="logic0"><option value="and">和<option value="or">或</select></td></tr>');
  return false
}
function ClsFilterTables(obj)
{
	iFilter=initFilter;
	document.sendForm.FilterCount.value=0;
	obj.innerHTML="";
	document.all["FilterInput0"].innerHTML=sFilterInput0;
}
function fnChangeFilterInput(obj,id,iParam)
{
	for(i=0;i<ColID.length;i++)
	{
		if (ColID[i]==id)
		{
			obj.innerHTML=fnAddFilterInput(ColType[i],iParam);
			return true;
		}
	}
}
function fnAddFilterInput(filtertype,iParam)
{
	switch(filtertype)
	{
	<%=sAddFilterInput%>
		default :
		{
			return "<INPUT TYPE='text' NAME='key"+ iParam +"' style='width:100'>";
			break;
		}
	}
}
var lastopen=1;
function ShowMenu(tblNo)
{ 
	eval("document.all[\"MenuTR" + lastopen + "\"].style.display=\"none\"");
	eval("document.all[\"MenuTR" + tblNo + "\"].style.display=\"\"");
	lastopen=tblNo;
}
//-->
</SCRIPT>
</head>

<body bgcolor="#E8E8E8" leftmargin="0" topmargin="0">
<FORM METHOD=Get ACTION="setlist_table.ASP" target="main" name="sendForm" >
<table width="100%" border="0" cellspacing="0" cellpadding="0" height="100%">
  <tr> 
    <td  width="125" valign=top>
		<!-- Left -->

	<table width="100%" border="0" cellspacing="0" cellpadding="0" align="left" >
        <tr>
          <td width="100%" valign="top" align="center"> 
            <table width="100%" border="0" cellspacing="0" cellpadding="0">
              <tr>
                <td></td>
              </tr>
            </table>
			<!-- SEARCH -->
            <table width="100%" border="1" cellspacing="0" cellpadding="1" class="leftTable" bordercolorlight="#CCCCCC" bordercolordark="#FFFFFF" height="100%" id="MenuTR1">
              <tr bgcolor="#E8E8E8"> 
                <td align="center">&nbsp;</td>
              </tr>
              <tr bgcolor="#E8E8E8"> 
                <td align="center">
				<table width="100%" border="1" cellspacing="0" cellpadding="0" bordercolorlight="#666666" bordercolordark="#FFFFFF" background="../../images/calendar/images/image--banyuan--cccccc--2.gif">
				<tr bgcolor="#F2F1F1" align="center"> 
				  <td height="16" > 
					<table width="100%" border="0" cellspacing="0" cellpadding="0" bgcolor=#D7D6CE>
					  <tr align="center"> 
					  <td align=center> 查  找 </td>
					  </tr>
					</table>
				  </td>
				  <td height="16" > 
					<table width="100%" border="0" cellspacing="0" cellpadding="0" style="cursor:hand" onclick="ShowMenu(2)">
					  <tr align="center"> 
					   <td align=center> 筛  选 </td>
					  </tr>
					</table>
				  </td>
				</tr>
			  </table>
                </td>
              </tr>
			<tr> 
                          
                <td bgcolor="#F5F5F5" align="center" height="0">
 <%
		oRS.open "select fn_table_col.*,input_type,filter_type,filter_data from fn_table_col,fn_table_filter_type where fn_table_col.filter_type_id=fn_table_filter_type.id and table_id="&table_id,oCon
		iCount=0
		jump=1
		while not oRS.eof
		if oRS("SEARCH_COL")=1 then
 %>
		<table width=100% cellspacing=0>
	          <tr>
                <td bgcolor="#F5F5F5">
					<table width="100%" border="0" cellspacing="0" cellpadding="0" bgcolor="#E8E8E8">
					  <tr > 
						<td align=center>

⌨️ 快捷键说明

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