JobsEdit.asp
上传用户:dbstep
上传日期:2022-08-06
资源大小:2803k
文件大小:7k
- <HTML>
- <HEAD>
- <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=utf-8" />
- <TITLE>编辑招聘</TITLE>
- <link rel="stylesheet" href="Images/CssAdmin.css">
- <script language="javascript" src="../skweb/JS/Admin.js"></script>
- </HEAD>
- <!--#include file="../skweb/Const.asp" -->
- <!--#include file="../skweb/ConnSiteData.asp" -->
- <!-- #include file="../fckeditor/fckeditor.asp" -->
- <!--#include file="CheckAdmin.asp"-->
- <%
- if Instr(session("AdminPurview"),"|98,")=0 then
- response.write ("<font color='red')>你不具有该管理模块的操作权限,请返回!</font>")
- response.end
- end if
- '========判断是否具有管理权限
- %>
- <BODY>
- <%
- dim Result
- Result=request.QueryString("Result")
- dim ID,JobName,ViewFlag,JobAddress,JobNumber,Emolument,EndDate,Content
- ID=request.QueryString("ID")
- call JobsEdit()
- %>
- <table width="100%" border="0" cellpadding="3" >
- <form name="editForm" method="post" action="JobsEdit.asp?Action=SaveEdit&Result=<%=Result%>&ID=<%=ID%>">
- <tr>
- <td height="24" nowrap bgcolor="#EBF2F9"><table width="100%" border="0" cellpadding="5" cellspacing="1" bgcolor="#CCCCCC" id=editProduct idth="100%">
- <tr>
- <td height="29" colspan="2" background="Images/menutitle.gif" bgcolor="#FFFFFF"><table width="470" border="0" cellspacing="0" cellpadding="0">
- <tr>
- <td width="121"><strong><font color="#000000" size="2">招聘管理</font></strong></td>
- <td width="87"><a href="JobsEdit.asp?Result=Add"><img src="Images/x1.gif" width="52" height="17" border="0"></a></td>
- <td width="87"><a href="JobsList.asp"><img src="Images/xlm.gif" width="52" height="17" border="0"></a></td>
- <td width="87"><a href="TalentsList.asp"><img src="Images/xxjl.gif" width="52" height="17" border="0"></a></td>
- <td width="88"> </td>
- </tr>
- </table></td>
- </tr>
- <tr>
- <td height="20" align="right" bgcolor="#FFFFFF">职位名称:</td>
- <td bgcolor="#FFFFFF"><input name="JobName" type="text" class="textfield" id="JobName" style="WIDTH: 240;" value="<%=JobName%>"> 发布:<input name="ViewFlag" type="checkbox" style='HEIGHT: 13px;WIDTH: 13px;' value="1" <%if ViewFlag then response.write ("checked")%>> * 不少于3个字符</td>
- </tr>
- <tr>
- <td height="20" align="right" bgcolor="#FFFFFF">工作地点:</td>
- <td bgcolor="#FFFFFF"><input name="JobAddress" type="text" class="textfield" id="JobAddress" style="WIDTH: 240;" value="<%=JobAddress%>"> *</td>
- </tr>
- <tr>
- <td height="20" align="right" bgcolor="#FFFFFF">招聘人数:</td>
- <td bgcolor="#FFFFFF"><input name="JobNumber" type="text" class="textfield" id="JobNumber" style="WIDTH: 240" value="<%=JobNumber%>"> * 6人</td>
- </tr>
- <tr>
- <td height="20" align="right" bgcolor="#FFFFFF">月 薪 水:</td>
- <td bgcolor="#FFFFFF"><input name="Emolument" type="text" class="textfield" id="Emolument" style="WIDTH: 240;" value="<%=Emolument%>"> * 3000元/月</td>
- </tr>
- <tr>
- <td height="20" align="right" bgcolor="#FFFFFF">结束日期:</td>
- <td bgcolor="#FFFFFF"><input name="EndDate" type="text" class="textfield" id="EndDate" style="WIDTH: 240;" value="<% if EndDate="" then response.write (DateAdd("m",3,now())) else response.write (EndDate) end if%>" maxlength="14"> * 默认为3个月,可手动输入日期格式</td>
- </tr> <tr>
- <td height="20" align="right" valign="top" bgcolor="#FFFFFF">信息内容:<br>
- <td bgcolor="#FFFFFF"><%
- Dim oFCKeditor
- Set oFCKeditor = New FCKeditor
- oFCKeditor.BasePath = "../fckeditor/"
- oFCKeditor.ToolbarSet = "Default"
- oFCKeditor.Width = "100%"
- oFCKeditor.Height = "400"
- oFCKeditor.Value = content
- oFCKeditor.Create "Content"
- %></td>
- </tr>
- <tr>
- <td height="30" align="right" bgcolor="#FFFFFF"> </td>
- <td valign="bottom" bgcolor="#FFFFFF"><input name="submitSaveEdit" type="submit" class="button" id="submitSaveEdit" value="保存" style="WIDTH: 80;" ></td>
- </tr>
- </table></td>
- </tr>
- </form>
- </table>
- </BODY>
- </HTML>
- <%
- sub JobsEdit()
- dim Action,rsCheckAdd,rs,sql
- Action=request.QueryString("Action")
- if Action="SaveEdit" then '保存编辑管理员信息
- set rs = server.createobject("adodb.recordset")
- if len(trim(request.Form("JobName")))<3 then
- response.write ("<script language=javascript> alert('职位名称为必填项目!');history.back(-1);</script>")
- response.end
- end if
- if len(trim(request.Form("JobAddress")))="" or len(trim(request.Form("JobNumber")))="" or len(trim(request.Form("Emolument")))="" then
- response.write ("<script language=javascript> alert('""工作地点、职位数量、月薪水""名称为必填项目,且不少于2个字符!');history.back(-1);</script>")
- response.end
- end if
- if len(trim(request.Form("EndDate")))<4 then
- response.write ("<script language=javascript> alert('""结束日期""名称为必填项目!');history.back(-1);</script>")
- response.end
- end if
- if Result="Add" then '创建网站管理员
- sql="select * from sk_Jobs"
- rs.open sql,conn,1,3
- rs.addnew
- rs("JobName")=trim(Request.Form("JobName"))
- if Request.Form("ViewFlag")=1 then
- rs("ViewFlag")=Request.Form("ViewFlag")
- else
- rs("ViewFlag")=0
- end if
- rs("JobAddress")=trim(Request.Form("JobAddress"))
- rs("JobNumber")=trim(Request.Form("JobNumber"))
- rs("Emolument")=trim(Request.Form("Emolument"))
- rs("EndDate")=trim(Request.Form("EndDate"))
- rs("Content")=Request.Form("Content")
- rs("AddTime")=now()
- end if
- if Result="Modify" then '修改网站管理员
- sql="select * from sk_Jobs where ID="&ID
- rs.open sql,conn,1,3
- rs("JobName")=trim(Request.Form("JobName"))
- if Request.Form("ViewFlag")=1 then
- rs("ViewFlag")=Request.Form("ViewFlag")
- else
- rs("ViewFlag")=0
- end if
- rs("JobAddress")=trim(Request.Form("JobAddress"))
- rs("JobNumber")=trim(Request.Form("JobNumber"))
- rs("Emolument")=trim(Request.Form("Emolument"))
- rs("EndDate")=trim(Request.Form("EndDate"))
- rs("Content")=Request.Form("Content")
- end if
- rs.update
- rs.close
- set rs=nothing
- Response.Redirect("Tips/jobs.asp")
- else '提取管理员信息
- if Result="Modify" then
- set rs = server.createobject("adodb.recordset")
- sql="select * from sk_Jobs where ID="& ID
- rs.open sql,conn,1,1
- JobName=rs("JobName")
- ViewFlag=rs("ViewFlag")
- JobAddress=rs("JobAddress")
- JobNumber=rs("JobNumber")
- Emolument=rs("Emolument")
- EndDate=rs("EndDate")
- Content=rs("Content")
- rs.close
- set rs=nothing
- end if
- end if
- end sub
- %>