📄 geworkadd.asp
字号:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!--#include file=DataBase/conn.asp-->
<%
if request("post")<>"" then
if request("title")="" then
response.Write("<script language=javascript>alert('任务名称必须填写');location='javascript:history.go(-1)'</script>")
end if
if request("content")="" then
response.Write("<script language=javascript>alert('任务内容必须填写');location='javascript:history.go(-1)'</script>")
end if
if request("wanchengtime")="" then
response.Write("<script language=javascript>alert('任务期限必须填写');location='javascript:history.go(-1)'</script>")
end if
'取完成者的名称
select case request("wancheng")
case "部门"
wanchengzhe=request("bumen")
case "个人"
wanchengzhe=request("geren")
end select
'布置任务
set rsa=server.CreateObject("adodb.recordset")
sqla="select * from tb_Work"
rsa.open sqla,conn,1,3
rsa.addnew
rsa("buzhizhe")=session("admin_name")
rsa("title")=request("title")
rsa("content")=request("content")
rsa("buzhitime")=now()
rsa("wanchengzhe")=wanchengzhe
rsa("wanchengtime")=request("wanchengtime")
rsa("wanchenglei")=request("wancheng")
rsa("wanchengdu")="未完成"
rsa.update
rsa.close
response.Write("<script language=javascript>alert('布置成功');location='workadd.asp'</script>")
end if
'读取个人信息
set rsg=server.CreateObject("adodb.recordset")
sqlg="SELECT dbo.tb_User.username, dbo.tb_Employee.suoshu FROM dbo.tb_User INNER JOIN dbo.tb_Employee ON dbo.tb_User.name = dbo.tb_Employee.id WHERE dbo.tb_User.username = '"&session("admin_name")&"'"
rsg.open sqlg,conn,1,1
bu=rsg("suoshu")
'部门
set rs=server.CreateObject("adodb.recordset")
sql="Select * from tb_dept where shangji="&bu&" order by up"
rs.Open sql,conn,1,3
'人员
set rsr=server.CreateObject("adodb.recordset")
sqlr="SELECT dbo.tb_Employee.name, dbo.tb_Dept.title,dbo.tb_Employee.id FROM dbo.tb_Dept INNER JOIN dbo.tb_Employee ON dbo.tb_Dept.id = dbo.tb_Employee.suoshu WHERE dbo.tb_Dept.shangji = "&bu&" ORDER BY dbo.tb_Dept.up DESC"
rsr.open sqlr,conn,1,1
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>无标题文档</title>
<style type="text/css">
<!--
.style1 {color: #FF0000}
body,td,th {
font-size: 12px;
}
-->
</style>
<link href="CSS/css.css" rel="stylesheet" type="text/css">
<style type="text/css">
<!--
.style2 {color: #0000FF}
-->
</style>
</head>
<body topmargin="0">
<table width="550" border="0" align="center">
<tr>
<td width="55%" height="30"> - <span class="style1">个人管理</span>→<span class="style2">工作管理</span>→<span class="style1">布置工作任务</span></td>
</tr>
</table>
<table width="550" border="0" align="center" cellspacing="1" bgcolor="#000000">
<tr>
<td bgcolor="#FFFFFF"><table width="550" height="254" border="0" align="center" cellspacing="0" bgcolor="#CCCCCC" >
<form name="form2" method="post" action="">
<tr>
<td width="158" background="images/index_24.gif"><div align="right">任务名称:</div></td>
<td width="579" background="images/index_24.gif">
<input name="title" type="text" id="title">
<input name="post" type="hidden" id="post" value="true"></td>
</tr>
<tr bgcolor="#FFFFFF">
<td><div align="right">任务内容:</div></td>
<td>
<textarea name="content" cols="50" rows="5" id="content"></textarea></td>
</tr>
<tr bgcolor="#FFFFFF">
<td><div align="right">完 成 者:</div></td>
<td><table width="100%" border="0" cellspacing="1">
<tr>
<td width="5%"><input name="wancheng" type="radio" value="部门" checked>
</td>
<td width="6%">部门 </td>
<td width="89%"><select name="bumen" id="select3">
<%
do while not rs.EOF
xian=""
for i=1 to rs("level")-1
xian= xian&""
next
xian = xian&"〖"&trim(rs("title"))&"〗"
%>
<option value="<%=rs("id")%>"><%=xian%></option>
<%
rs.movenext
loop
%>
</select></td>
</tr>
<tr>
<td><input type="radio" name="wancheng" value="个人">
</td>
<td>个人 </td>
<td><select name="geren" id="select4">
<%
do while not rsr.EOF
%>
<option value="<%=rsr("id")%>">〖<%=rsr("title")%>〗<%=rsr("name")%></option>
<%
rsr.movenext
loop
%>
</select></td>
</tr>
</table></td>
</tr>
<tr bgcolor="#FFFFFF">
<td><div align="right">任务期限:</div></td>
<td>
<input name="wanchengtime" type="text" id="wanchengtime2"></td>
</tr>
<tr bgcolor="#FFFFFF">
<td height="35" colspan="2"><div align="center">
<input name="Submit" type="submit" class="botton" value=" 递 交 ">
<input name="Submit2" type="button" class="botton" onClick="location='javascript:history.go(-1)'" value=" 返 回 ">
</div></td>
</tr>
</form>
</table></td>
</tr>
</table>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -