📄 qdset.asp
字号:
<%
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
''''版权:野马原创 ''''
''''联系:ctplr@163.com ''''
''''说明:需要新功能联系我 ''''
''''QQ:2643148 ''''
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
%>
<!--#include file="check.asp"-->
<!--#include file="conn.asp"-->
<link href=left.css rel=stylesheet>
<!--#include file="../webinfo.asp"-->
<%
act=request("way")
setid=request("setid")
sql="select worktime,setname from qdsetall where id="&setid
rsa.open sql,cn,1,1
qdsetworktime=rsa("worktime")
setname=rsa("setname")
rsa.close
'response.write"<script>alert('"&qdsetworktime&"');</script>"
if session("qx")>2 or session("qx")=0 then
response.write "<script>alert('你没有权限');location.href='main.asp';</script>"
else
if act="set" then
%>
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<center>
<table width="102%" border="0" align="center" cellpadding="2" cellspacing="3">
<tr>
<td height="57" colspan="2" align="center" valign="middle" background="../images/loginIn.gif">
<img src=images/qd.gif><br>[为设置组 <B><%=setname%></B> 选定员工]
<form action=?way=sigset method=post name=subptype>
<select name='ptype' class='abox' onchange='checkptype();'>
<option value=0>-按工作组查询-</option>
<%
sqltype="select type,typename from type"
rs2.open sqltype,cn,1,1
do while not rs2.eof
ptype=rs2("type")
pname=rs2("typename")
response.write "<option value="&ptype&">"&pname&"</option>"
rs2.movenext
loop
rs2.close
%>
</select>
<input type=hidden name=setid value=<%=setid%>>
<input type=hidden name=qdsetworktime value=<%=qdsetworktime%>>
<input type=submit value=请选择 disabled class=ibox name=ptypesub></form></td>
</tr>
</table>
<%
num=backgl
rs.PageSize=num
if Request.QueryString("page")<>"" then
curpage=cint(Request.QueryString("page"))
else
curpage=1
end if
sql="select * from ct_sql where noshenhe=1"
rs.open sql,cn,1,1
pagenum=rs.PageCount
if curpage>pagenum then
curpage=pagenum
end if
rs.AbsolutePage =curpage
if (rs.eof and rs.bof) then
response.write "<center><br><font size=7 color=yellow>没有人员纪录</font></center>"
else
response.write"<form name='qdsettable' action='?way=allset' method=post><table border=1 bordercolor=#0055aa width=90% >"
response.write "<tr><td class=tdwhtimg align=center><b><font color=green>登陆帐号</b></td><td class=tdwhtimg align=center><b><font color=green>真实姓名</b></td><td class=tdwhtimg align=center><b><font color=green>工 作 组</b></td><td class=tdwhtimg align=center><b><font color=green>原签到组</b></td><td class=tdwhtimg align=center ><b><font color=green>本月签到</b> </td><td class=tdwhtimg align=center > <b><font color=green>设定签到方式</b></td></tr>"
do while not rs.eof and num>0
pname=rs("username")
preal=rs("realname")
ptype=rs("type")
if ptype=0 then
tname="没有工作组"
typesetworktime=0
else
sql2="select typename from type where type="&ptype
rs1.open sql2,cn,1,1
tname=rs1("typename")
rs1.close
end if
monthqdnum=rs("monthqdnum")
ltype=rs("ltype")
id=rs("id")
autoqd=rs("auto")
if autoqd=0 then
autocn="自由签到"
else
sql="select setname from qdsetall where id="&autoqd
rsa.open sql,cn,1,1
autocn=rsa("setname")
rsa.close
end if
mustqdtime=rs("mustqdtime")
%>
<tr>
<td align=center class=td2><a href=viewmenber.asp?name=<%=pname%> title="点击察看详细资料" target=_blank><%=pname %></a></td>
<td align=center class=td1>
<%if ltype="组管理者" then%>
<b><%=preal %><b>
[<font color=#00ffcc><%=ltype%></font>]
<%else%>
<b><%=preal %></b>
<%end if%>
</td>
<td align=center class=td2><%=tname%> </font></td>
<td align=center class=td2> <font color=yellow><%=autocn%> </font></td>
<td align=center class=td1> <font color=#00ffcc><%=monthqdnum%></font> 次</td>
<td align=center class=td2>
<a href='?way=signset&id=<%=id%>&setid=<%=setid%>' onclick="{if(confirm('确定要将\n<%=setname%>\n的签到信息设定给该员工?')){return true;}return false;}">设定给该员工</a> <input type=checkbox value=<%=id%> name=chknum> <input type=hidden value=<%=setid%> name=setid></td>
</td>
</tr>
<% rs.movenext
num=num-1
loop
%>
<tr><td colspan=8 align=right class=td3>
<input type=button value="全选" onClick="checkAll()" class=bbox>
<input type=button value="全否" onClick="uncheckAll()" class=bbox>
<input type=button value="反选" onClick="switchAll()" class=bbox>
<input type=submit value="设定所选" name=chuliall class=ibox onclick="{if(confirm('确定要将\n<%=setname%>\n的签到信息设定给所选项目?')){return true;}return false;}">
<input type=submit value="全部自由" name=chuliall class=cbox onclick="{if(confirm('确定要将所选人员签到设定为“自由签到”?')){return true;}return false;}">
</td>
</tr></table>
</form>
<%
end if
rs.close
set rs=nothing
Response.Write "<center>一共有[<font color=#ff6600>"&pagenum&"</font>]页 "
Response.Write "[<a href=?page=1>首 页</a>] "
if curpage>1 then
Response.Write "[<b><a name=up href=?page=" & (curpage-1) & " >上一页</a></b> ] "
end if
if curpage<pagenum then
Response.Write "[<b><a name=down href=?page=" & (curpage+1) & " >下一页</a></b>] "
end if
Response.Write " [<a href=?page="&pagenum&">尾 页</a>]"
Response.Write " 当前是第[<font color=#ff6600>"&curpage&"</font>]页</center>"
rs.Close
set rs=nothing
cn.close
set cn=nothing
end if
if act="sigset" then
pptype=int(request.form("ptype"))
qdsetworktime=int(request.form("qdsetworktime"))
'response.write"<script>alert('"&pptype&"');</script>"
setid=request.form("setid")
sql="select worktime,setname from qdsetall where id="&setid
rsa.open sql,cn,1,1
qdsetworktime=rsa("worktime")
setname=rsa("setname")
rsa.close
%>
<center>
<table width="102%" border="0" align="center" cellpadding="2" cellspacing="3">
<tr>
<td height="57" colspan="2" align="center" valign="middle" background="../images/loginIn.gif">
<img src=images/qd.gif><br>[为设置组 <B><%=setname%></B> 选定员工]
<form action=?way=sigset method=post name=subptype>
<select name=ptype class=abox onchange='checkptype();'>
<option value=0>-按工作组查询-</option>
<%
sqltype="select type,typename from type"
rs2.open sqltype,cn,1,1
do while not rs2.eof
ptype=rs2("type")
pname=rs2("typename")
response.write "<option value="&ptype&">"&pname&"</option>"
rs2.movenext
loop
rs2.close
%>
</select>
<input type="hidden" name="setid" value="<%=setid%>">
<input type=hidden name=qdsetworktime value=<%=qdsetworktime%>>
<input type=submit value="请选择" disabled class="ibox" name="ptypesub"></form></td>
</tr>
</table>
<%
num=backgl
rs.PageSize=num
if Request.QueryString("page")<>"" then
curpage=cint(Request.QueryString("page"))
else
curpage=1
end if
sql="select * from ct_sql where noshenhe=1 and type="&pptype
rs.open sql,cn,1,1
pagenum=rs.PageCount
if curpage>pagenum then
curpage=pagenum
end if
rs.AbsolutePage =curpage
if (rs.eof and rs.bof) then
response.write "<center><br><font size=7 color=yellow>没有人员纪录</font></center>"
else
response.write"<form name='qdsettable' action='?way=allset' method=post><table border=1 bordercolor=#0055aa width=80% >"
response.write "<tr><td class=tdwhtimg align=center><b><font color=green>登陆帐号</b></td><td class=tdwhtimg align=center><b><font color=green>真实姓名</b></td><td class=tdwhtimg align=center><b><font color=green>工 作 组</b></td><td class=tdwhtimg align=center><b><font color=green>原签到组</b></td><td class=tdwhtimg align=center ><b><font color=green>本月签到</b> </td><td class=tdwhtimg align=center > <b><font color=green>设定签到方式</b></td></tr>"
do while not rs.eof and num>0
pname=rs("username")
preal=rs("realname")
ptype=rs("type")
if ptype=0 then
tname="没有工作组"
typesetworktime=0
else
sql2="select typename from type where type="&ptype
rs1.open sql2,cn,1,1
tname=rs1("typename")
rs1.close
end if
monthqdnum=rs("monthqdnum")
ltype=rs("ltype")
id=rs("id")
autoqd=rs("auto")
if autoqd=0 then
autocn="自由签到"
else
sql="select setname from qdsetall where id="&autoqd
rsa.open sql,cn,1,1
autocn=rsa("setname")
rsa.close
end if
mustqdtime=rs("mustqdtime")
%>
<tr>
<td align=center class=td2><a href=viewmenber.asp?name=<%=pname%> title="点击察看详细资料" target=_blank><%=pname %></a></td>
<td align=center class=td1>
<%if ltype="管理者" then%>
<a href=viewmenber.asp?name=<%=pname%> title="点击察看详细资料" target=_blank><font color=#ff6600><%=preal %></font>
<br><font color=#00ffcc><%=ltype%> </font>
<%else%>
<a href=viewmenber.asp?name=<%=pname%> title="点击察看详细资料" target=_blank><%=preal %></a>
<%end if%>
</td>
<td align=center class=td2> <%=tname%> </font></td>
<td align=center class=td2> <font color=yellow><%=autocn%> </font></td>
<td align=center class=td1> <font color=#00ffcc><%=monthqdnum%></font> 次</td>
<td align=center class=td2>
<a href='?way=signset&id=<%=id%>' onclick="{if(confirm('确定要将\n<%=setname%>\n的签到信息设定给该员工?')){return true;}return false;}">设定给该员工</a> <input type=checkbox value=<%=id%> name=chknum><input type=hidden value=<%=setid%> name=setid></td>
</td>
</tr>
<% rs.movenext
num=num-1
loop
%>
<tr><td colspan=8 align=right class=td3>
<input type=button value="全选" onClick="checkAll()" class=bbox>
<input type=button value="全否" onClick="uncheckAll()" class=bbox>
<input type=button value="反选" onClick="switchAll()" class=bbox>
<input type=submit value="设定所选" name=chuliall class=ibox onclick="{if(confirm('确定要将\n<%=setname%>\n的签到信息设定给所选项目?')){return true;}return false;}">
<input type=submit value="全部自由" name=chuliall class=cbox onclick="{if(confirm('确定要将所选人员签到设定为“自由签到”?')){return true;}return false;}">
</td>
</tr></table>
</form>
<%
end if
rs.close
set rs=nothing
Response.Write "<center>一共有[<font color=#ff6600>"&pagenum&"</font>]页 "
Response.Write "[<a href=?page=1>首 页</a>] "
if curpage>1 then
Response.Write "[<b><a name=up href=?page=" & (curpage-1) & " >上一页</a></b> ] "
end if
if curpage<pagenum then
Response.Write "[<b><a name=down href=?page=" & (curpage+1) & " >下一页</a></b>] "
end if
Response.Write " [<a href=?page="&pagenum&">尾 页</a>]"
Response.Write " 当前是第[<font color=#ff6600>"&curpage&"</font>]页</center>"
rs.Close
set rs=nothing
cn.close
set cn=nothing
end if
if act="allset" then
if request.form("chuliall")="设定所选" then
if request.form("chknum").count=0 then
response.write "<script>alert('没有选中任何人员!!');history.back();</script>"'
else
for i=1 to request.form("chknum").count
pxh=request.form("chknum")(i)
setid=request.form("setid")(i)
sql="select auto from ct_sql where id="&pxh
rsa.open sql,cn,1,3
rsa("auto")=setid
rsa.update
rsa.close
next
cn.close
end if
response.write "<script>location.href='qdset.asp?way=set&setid="&setid&"';</script>"
elseif request.form("chuliall")="全部自由" then
if request.form("chknum").count=0 then
response.write "<script>alert('没有选中任何人员!!');history.back();</script>"'
else
for i=1 to request.form("chknum").count
pxh=request.form("chknum")(i)
setid=request.form("setid")(i)
sql="select auto from ct_sql where id="&pxh
rsa.open sql,cn,1,3
rsa("auto")=0
rsa.update
rsa.close
next
cn.close
end if
response.write "<script>location.href='qdset.asp?way=set&setid="&setid&"';</script>"
end if
end if
if act="signset" then
aid=request("id")
setid=request("setid")
'response.write "<script>alert('"&aid&"');</script>"
'response.write "<script>alert('"&setid&"');</script>"
sql="select auto from ct_sql where id="&aid
rsa.open sql,cn,1,3
rsa("auto")=setid
rsa.update
rsa.close
response.write "<script>location.href='qdset.asp?way=set&setid="&setid&"';</script>"
end if
end if
%>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<script language=javascript>
<!--
function checkAll(){
for(i=0;i<document.qdsettable.chknum.length;i++){
document.qdsettable.chknum[i].checked=true;
}
}
function uncheckAll(){
for(i=0;i<document.qdsettable.chknum.length;i++){
document.qdsettable.chknum[i].checked=false;
}
}
function switchAll()
{
var num=document.qdsettable.chknum.length;
if(num>1)
{
for(var i=0;i<num;i++)
{
if(document.qdsettable.chknum[i].checked==false)
{
document.qdsettable.chknum[i].checked=true;
}
else
{
document.qdsettable.chknum[i].checked=false;
}
}
}
else
{
if(document.qdsettable.chknum.checked==false)
{
document.qdsettable.chknum.checked=true;
}
else
{
document.qdsettable.chknum.checked=false;
}
}
}
function checkptype(){
if (document.subptype.ptype.value==0){
document.subptype.ptypesub.value="请选择组别";
document.subptype.ptypesub.disabled=1;
}else{
document.subptype.ptypesub.value="查询";
document.subptype.ptypesub.disabled=0;
}
}
//-->
</script>
<br>
<br>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -