📄 onworksearch.asp
字号:
<!-- #include file="conn/logors.asp" -->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name=description content="<%=site_title%>" >
<meta name=keyword content="<%=site_title%>">
<title><%=site_title%></title>
</head>
<%=styletext%>
<DIV class=menuskin id=popmenu
onmouseover="clearhidemenu();highlightmenu(event,'on')" style="Z-INDEX: 100"
onmouseout="highlightmenu(event,'off');dynamichide(event)"></DIV><!--顶部表格-->
<SCRIPT language=JavaScript src="style/main.js"></SCRIPT>
<SCRIPT LANGUAGE="JavaScript">
<!--
function DoSubmit(value)
{
document.regform.submit();
}
function select()
{
var values;
with(document.creator.types)
{
values = options[selectedIndex].value;
}
for(i = 0;i < itemarray.length;i ++)
{
if (itemarray[i].value== values)
{
loca3 = (itemarray[i].lsitems).split("#");
for(j = 0;j < loca3.length;j++)
{
with(document.creator.userid)
{
length = loca3.length;
temparraya=loca3[j].split("@");
options[j].text = temparraya[0];
options[j].value =temparraya[1];
}
}
break;
}
}
}
function init()
{
with(document.creator.types)
{
length = itemarray.length;
for(k=0;k<itemarray.length;k++)
{
options[k].text =itemarray[k].text;
options[k].value =itemarray[k].value;
}
selectedIndex=0;
}
with(document.creator.userid)
{
loca3 = (itemarray[0].lsitems).split("#");
length = loca3.length;
for(l=0;l<length;l++)
{
temparrayb=(loca3[0]).split("@");
options[l].text = temparrayb[0];
options[l].value = temparrayb[1];
}
selectedIndex=0;
}
}
function comefrom(text,value,lsitems)
{
this.text = text;
this.value= value;
this.lsitems = lsitems;
}
function OnSubmitCheck()
{
if(document.creator.userid.selectedIndex==0)
{
alert("请选择员工!");
return false;
}
if(!dochange(document.creator.amerce))
return false;
return true;
}
//-->
</SCRIPT>
<%
set rs = Server.CreateObject("ADODB.Recordset")
set rsitem = Server.CreateObject("ADODB.Recordset")
sql="select * from cci_dept"
rs.open sql,connObj,1,1
sumcount=rs.recordcount
i=0
if sumcount>0 then
response.Write "<script language=javascript>" & chr(13) & "var itemarray = new Array(" & rs.recordcount+1 & ");"& chr(13)
response.Write "itemarray[0]=new comefrom(""请选择部门"",0,""请选择员工@0""); "& chr(13)
i=1
else
response.Write "<script language=javascript>" & chr(13) & "var itemarray = new Array(2);"& chr(13)
response.Write "itemarray[0]=new comefrom(""请选择部门"",""0"",""请选择员工@0""); "& chr(13)
i=1
end if
do while not rs.eof
response.Write "itemarray[" & i & "]=new comefrom(""" & rs("deptname") & """," & rs("id") & ",""请选择员工@0"
sql="select id,name from cci_user where deptid=" & rs("id")
rsitem.open sql,connObj,1,1
do while not rsitem.eof
response.Write "#" & rsitem("name") & "@" & rsitem("id")
rsitem.movenext
loop
i=i+1
response.Write """);"& chr(13)
rsitem.close
rs.movenext
loop
rs.close
response.Write "</script>"
%>
<body onload="init()">
<table width="750" height="200" align="center">
<tr>
<td height="97" align="center" class=TableTitle2>
<!-- #include file="sitehead.asp" -->
</td>
</tr>
<tr>
<td align="center" colspan="2" class="tablebody1">
<% navigation_flag=6 %>
<!-- #include file="func_navigationbar.asp" -->
<table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="20%" height="66" valign="top"> <!-- #include file="func_menulist.asp" --></td>
<td valign="top">
<!-- #include file="func_verify.asp" -->
<table width="100%" align="center" cellpadding="1" cellspacing="1" class=tableborder1>
<form name="creator" method="post" action="onworklist.asp" onSubmit="return OnSubmitCheck()">
<tr >
<th height="25" colspan="2" align="center" class=TopLighNav><%=site_title%>考勤查询</th>
</tr>
<tr>
<td width="150" align="center" class=tablebody1><b>部门</b></td>
<td class=tablebody1><select name=types onChange = "select()"></select></td>
</tr>
<tr>
<td align="center" class=tablebody1><b>姓名</b></td>
<td class=tablebody1><select name="userid"></select></td>
</tr>
<tr>
<td align="center" class=tablebody1><b>时间</b></td>
<td class=tablebody1><!-- #include file="func_currtime13.asp" --></td>
</tr>
<tr>
<td align="center" class=tablebody1></td>
<td class=tablebody1><input type="submit" name="Submit" value=" 查 询 "></td>
</tr>
<input type=hidden name=saveflag value="1">
</form>
</table>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td class="tablebody1">
<!-- #include file="sitefloor.asp" --> </td>
</tr>
</table>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -