📄 admin_job.asp
字号:
<html>
<head>
<title>招聘管理页面</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="../css/admin.css" rel="stylesheet" type="text/css">
<script language="JavaScript">
<!--
function CheckAll(form)
{
for (var i=0;i<form.elements.length;i++) {
var e = form.elements[i];
if (e.name != 'chkall')
e.checked = form.chkall.checked;
}
}
//-->
</script>
</head><body>
<!--#include file="conn.asp"-->
<!--#include file="admin.asp"-->
<%
set rs=server.CreateObject("adodb.recordset")
if request("action")="edit" then
call edit()
elseif request("action")="saveedit" then
call saveedit()
elseif request("action")="add" then
call addnew()
elseif request("action")="saveadd" then
call saveadd()
elseif request("action")="del" then
call del()
elseif request("action")="lockid" then
call lockid()
elseif request("action")="nolockid" then
call nolockid()
else
call consted()
end if
set rs=nothing
conn.close
set conn=nothing
%>
</body></html>
<%
sub del()
lid=replace(request.Form("lid"),"'","")
conn.execute("delete from job where id in ("&lid&")")
response.write "删除成功。"
end sub
sub lockid()
conn.execute("update job set lock=1 where id ="&request("id"))
response.write "锁定招聘成功。"
call consted()
end sub
sub nolockid()
conn.execute("update job set lock=0 where id ="&request("id"))
response.write "取消锁定成功。"
call consted()
end sub
sub consted()
sql="select * from job order by uptime desc"
rs.open sql,conn,1,1
if rs.eof and rs.bof then
response.write "<p align='center'><br><br>还没有任何招聘信息。<br><br>"
response.write "<a href=admin_job.asp?action=add>增加招聘信息</a></p>"
else
PageUrl="admin_job.asp"
totalPut=rs.recordcount
%>
<table width="90%" border="0" cellspacing="1" cellpadding="3" align=center class="tableBorder">
<form action="admin_job.asp?action=del" method="post" name="form" id="form">
<tr>
<th width="529" height=22>招聘信息列表(点招聘信息的标题,修改资料)</th>
<th width="57" height=22 align="right"><input type=checkbox name=chkall value=on onClick="CheckAll(this.form)">全选</th>
<th width="78"><input type=submit value="删除" name=submit></th>
</tr>
<%while not rs.eof%>
<tr>
<td height=25 class=forumrow width="529"> <%=rs(0)%> <a href=admin_job.asp?action=edit&id=<%=rs(0)%>><font color="#003399"><%=rs("title")%></font></a></td>
<td height=25 align="center" class=forumrow><%if rs("lock")=0 then%>
<a href=admin_job.asp?action=lockid&id=<%=rs(0)%>>锁定</a>
<%else%>
<a href=admin_job.asp?action=nolockid&id=<%=rs(0)%>>取消锁定</a>
<%end if%></td>
<td height=25 align="center" class=forumrow><input type='checkbox' name='lid' value='<%=rs("ID")%>'></td>
</tr>
<%
rs.movenext
wend
rs.close
%>
</form>
</table>
<%
end if
end sub%>
<%sub addnew()%>
<table width="90%" border="0" cellspacing="1" cellpadding="3" align=center class="tableBorder">
<form method="POST" action="admin_job.asp?action=saveadd" name="myform"><tr>
<th colspan=2 height=25 style="background-color: #6595D6">招聘信息增加(以下<font color="#FF0000">*</font>为必填项目
,所有资料建议详细填写)</th></tr>
<tr>
<td width="20%" class=Forumrow align="right"> 招聘职位: </td>
<td width="80%" class=Forumrow><input class=smallInput type="text" name="title" size="60">
<font color="#FF0000">*</font></td>
</tr>
<tr>
<td class=Forumrow align="right">所属部门:</td>
<td class=Forumrow><input name="bumen" type="text" id="bumen" size="60"></td>
</tr>
<tr>
<td width="20%" class=Forumrow align="right"> 发布时间:</td>
<td width="80%" class=Forumrow>
<input class=smallInput type="text" name="uptime" size="23" value=<%=date()%>>
有效时间:<input class=smallInput type="text" name="endtime" size="21"><font color="#FF0000">*</font>输入数字,按天计算</td>
</tr>
<tr>
<td width="20%" class=Forumrow align="right">招聘人数: </td>
<td width="80%" class=Forumrow><input name="person" type="text" class=smallInput size="23">
<font color="#FF0000">*</font> 工作经验:
<input name="age" type="text" value="不限" size=21></td>
</tr>
<tr>
<td width="20%" class=Forumrow align="right"> 性别要求:</td>
<td width="80%" class=Forumrow><input type="radio" value="1" name="sex">男
<input type="radio" value="2" name="sex">女
<input type="radio" value="0" name="sex" checked>
男女不限</td>
</tr>
<tr>
<td width="20%" class=Forumrow align="right"> 学历要求:</td>
<td width="80%" class=Forumrow>
<input name="calender" type="text" value="不限" size=60></td>
</tr>
<tr>
<td width="20%" class=Forumrow align="right"> 专业要求:</td>
<td width="80%" class=Forumrow><input name="opn" type="text" id="opn" value="不限" size=60></td>
</tr>
<tr>
<td width="20%" class=Forumrow align="right"> 薪资待遇:</td>
<td width="80%" class=Forumrow>
<input name="rmb" type="text" id="rmb" value="面议" size=60></td>
</tr>
<tr>
<td class=Forumrow align="right" valign="top">工作地点:</td>
<td class=Forumrow><input name="didian" type="text" id="didian" size="60"></td>
</tr>
<tr>
<td class=Forumrow align="right" valign="top">联系人:</td>
<td class=Forumrow><input name="man" type="text" id="man" size="60"></td>
</tr>
<tr>
<td class=Forumrow align="right" valign="top">联系电话:</td>
<td class=Forumrow><input name="tel" type="text" id="tel" size="60"></td>
</tr>
<tr>
<td class=Forumrow align="right" valign="top">电子邮件:</td>
<td class=Forumrow><input name="email" type="text" id="email" size="60"></td>
</tr>
<tr>
<td width="20%" class=Forumrow align="right" valign="top">具体要求:</td>
<td width="80%" class=Forumrow>
<textarea rows="7" name="content" cols="81"></textarea>
<FONT color="#FF0000">*</FONT></td>
</tr>
<tr align="center">
<td height="40" colspan="2" class=Forumrow><input type="submit" name="Submit" value="添 加"></td>
</tr></form>
</table>
<%
end sub
sub saveadd()
if request("content")="" then
response.write "<script>alert('请输入招聘信息内容。');history.back()</script>"
response.end
end if
if request("title")="" then
response.write "<script>alert('请输入招聘信息标题。');history.back()</script>"
response.end
end if
if request("endtime")="" then
response.write "<script>alert('请输入该招聘信息的有效天数。');history.back()</script>"
response.end
else
if not isnumeric(request("endtime")) then
response.write "<script>alert('天数只能是数字。');history.back()</script>"
response.end
end if
end if
if request("person")="" then
response.write "<script>alert('请输入招聘人数。');history.back()</script>"
response.end
else
if not isnumeric(request("person")) then
response.write "<script>alert('招聘人数只能是数字。');history.back()</script>"
response.end
end if
end if
if request("email")<>"" then
if trim(request("email"))=false then
response.write "<script>alert('您输入的Email有错误。');history.back()</script>"
response.end
end if
end if
content=request("content")
if content<>"" then
content=replace(content,chr(13),"<BR>",1,-1,1)
content=replace(content," "," ",1,-1,1)
end if
sql="select * from job"
rs.open sql,conn,3,3
rs.addnew
rs("content")=content
rs("title")=request("title")
rs("endtime")=date()+request("endtime")
rs("sex")=request("sex")
rs("age")=request("age")
rs("bumen")=request("bumen")
rs("man")=request("man")
rs("tel")=request("tel")
rs("email")=request("email")
rs("person")=request("person")
rs("didian")=request("didian")
rs("calender")=request("calender")
rs("opn")=request("opn")
rs("rmb")=request("rmb")
rs("uptime")=request("uptime")
rs.update
rs.close
response.write "添加成功。"
end sub
sub edit()
dim job,content
sql="select * from job where id="&request("id")
rs.open sql,conn,1,1
%>
<table width="90%" border="0" cellspacing="1" cellpadding="3" align=center class="tableBorder">
<form method="POST" action="admin_job.asp?action=saveedit&id=<%=request("id")%>" name="myform"><tr>
<th colspan=10 height=25 style="background-color: #6595D6">招聘信息修改(以下<font color="#FF0000">*</font>为必填项目)</th></tr><tr>
<td width="20%" class=Forumrow align="right"> 招聘职位:</td>
<td width="80%" class=Forumrow><input class=smallInput type="text" name="title" size="60" value="<%=rs("title")%>">
<font color="#FF0000">*</font></td>
</tr>
<tr>
<td class=Forumrow align="right">所属部门:</td>
<td class=Forumrow><input name="bumen" type="text" id="bumen" value="<%=rs("bumen")%>" size="60"></td>
</tr>
<tr>
<td width="20%" class=Forumrow align="right"> 发布时间:</td>
<td width="80%" class=Forumrow>
<input class=smallInput type="text" name="uptime" size="23" value=<%=date()%>>
有效时间:<input class=smallInput type="text" name="endtime" size="21" value="<%=((DateDiff("d",rs("uptime"),rs("endtime"))))%>"><font color="#FF0000">*</font>输入数字,按天计算</td>
</tr>
<tr>
<td width="20%" class=Forumrow align="right">招聘人数: </td>
<td width="80%" class=Forumrow>
<input class=smallInput type="text" name="person" size="23" value="<%=rs("person")%>"><font color="#FF0000">*</font> 年龄要求:<input type="text" name="age" size=21 value="<%=rs("age")%>"></td>
</tr>
<tr>
<td width="20%" class=Forumrow align="right"> 性别要求:</td>
<td width="80%" class=Forumrow><input type="radio" value="1" name="sex" <%if rs("sex")=1 then%>checked<%end if%>>男
<input type="radio" value="2" name="sex" <%if rs("sex")=2 then%>checked<%end if%>>女
<input type="radio" value="0" name="sex" <%if rs("sex")=0 then%>checked<%end if%>>
男女不限</td>
</tr>
<tr>
<td width="20%" class=Forumrow align="right"> 学历要求:</td>
<td width="80%" class=Forumrow>
<input type="text" name="calender" size=60 value="<%=rs("calender")%>"></td>
</tr>
<tr>
<td width="20%" class=Forumrow align="right">专业要求: </td>
<td width="80%" class=Forumrow><input name="opn" type="text" id="opn" value="<%=rs("opn")%>" size=60></td>
</tr>
<tr>
<td width="20%" class=Forumrow align="right"> 薪资待遇:</td>
<td width="80%" class=Forumrow>
<input name="rmb" type="text" id="rmb" value="<%=rs("rmb")%>" size=60></td>
</tr>
<tr>
<td class=Forumrow align="right" valign="top">工作地点:</td>
<td class=Forumrow><input name="didian" type="text" id="didian" value="<%=rs("didian")%>" size="60"></td>
</tr>
<tr>
<td class=Forumrow align="right" valign="top">联系人:</td>
<td class=Forumrow><input name="man" type="text" id="man" value="<%=rs("man")%>" size="60"></td>
</tr>
<tr>
<td class=Forumrow align="right" valign="top">联系电话:</td>
<td class=Forumrow><input name="tel" type="text" id="tel" value="<%=rs("tel")%>" size="60"></td>
</tr>
<tr>
<td class=Forumrow align="right" valign="top">电子邮件:</td>
<td class=Forumrow><input name="email" type="text" id="email" value="<%=rs("email")%>" size="60"></td>
</tr>
<tr>
<td width="20%" class=Forumrow align="right" valign="top"> 具体要求:</td>
<%content=rs("content")
if content<>"" then
content=replace(content,"<BR>",chr(13),1,-1,1)
content=replace(content," "," ",1,-1,1)
end if%>
<td width="80%" class=Forumrow><textarea rows="7" name="content" cols="81"><%=content%></textarea><FONT color="#FF0000">*</FONT></td>
</tr>
<tr align="center">
<td height="40" colspan="10" class=Forumrow><input type="submit" name="Submit" value="修 改"></td>
</tr></form>
</table>
<%rs.close
end sub
sub saveedit()
if request("content")="" then
response.write "<script>alert('请输入招聘信息内容。');history.back()</script>"
response.end
end if
if request("title")="" then
response.write "<script>alert('请输入招聘信息标题。');history.back()</script>"
response.end
end if
if request("endtime")="" then
response.write "<script>alert('请输入该招聘信息的有效天数。');history.back()</script>"
response.end
else
if not isnumeric(request("endtime")) then
response.write "<script>alert('天数只能是数字。');history.back()</script>"
response.end
end if
end if
if request("person")="" then
response.write "<script>alert('请输入招聘人数。');history.back()</script>"
response.end
else
if not isnumeric(request("person")) then
response.write "<script>alert('招聘人数只能是数字。');history.back()</script>"
response.end
end if
end if
content=request("content")
if content<>"" then
content=replace(content,chr(13),"<BR>",1,-1,1)
content=replace(content," "," ",1,-1,1)
end if
sql="select * from job where id="&request("id")
rs.open sql,conn,3,3
rs("content")=content
rs("title")=request("title")
rs("endtime")=date()+request("endtime")
rs("sex")=request("sex")
rs("age")=request("age")
rs("bumen")=request("bumen")
rs("man")=request("man")
rs("tel")=request("tel")
rs("email")=request("email")
rs("person")=request("person")
rs("didian")=request("didian")
rs("calender")=request("calender")
rs("opn")=request("opn")
rs("rmb")=request("rmb")
rs("uptime")=request("uptime")
rs.update
response.write "修改成功。"
end sub
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -