JobsEdit.asp
上传用户:dbstep
上传日期:2022-08-06
资源大小:2803k
文件大小:7k
源码类别:

WEB源码(ASP,PHP,...)

开发平台:

ASP/ASPX

  1. <HTML>
  2. <HEAD>
  3. <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=utf-8" />
  4. <TITLE>编辑招聘</TITLE>
  5. <link rel="stylesheet" href="Images/CssAdmin.css">
  6. <script language="javascript" src="../skweb/JS/Admin.js"></script>
  7. </HEAD>
  8. <!--#include file="../skweb/Const.asp" -->
  9. <!--#include file="../skweb/ConnSiteData.asp" -->
  10. <!-- #include file="../fckeditor/fckeditor.asp" -->
  11. <!--#include file="CheckAdmin.asp"-->
  12. <%
  13. if Instr(session("AdminPurview"),"|98,")=0 then 
  14.   response.write ("<font color='red')>你不具有该管理模块的操作权限,请返回!</font>")
  15.   response.end
  16. end if
  17. '========判断是否具有管理权限
  18. %>
  19. <BODY>
  20. <% 
  21. dim Result
  22. Result=request.QueryString("Result")
  23. dim ID,JobName,ViewFlag,JobAddress,JobNumber,Emolument,EndDate,Content
  24. ID=request.QueryString("ID")
  25. call JobsEdit() 
  26. %>
  27. <table width="100%" border="0" cellpadding="3" >
  28.   <form name="editForm" method="post" action="JobsEdit.asp?Action=SaveEdit&Result=<%=Result%>&ID=<%=ID%>">
  29.   <tr>
  30.     <td height="24" nowrap bgcolor="#EBF2F9"><table width="100%" border="0" cellpadding="5" cellspacing="1" bgcolor="#CCCCCC" id=editProduct idth="100%">
  31.    <tr>
  32.         <td height="29" colspan="2" background="Images/menutitle.gif" bgcolor="#FFFFFF"><table width="470" border="0" cellspacing="0" cellpadding="0">
  33.           <tr>
  34.             <td width="121"><strong><font color="#000000" size="2">招聘管理</font></strong></td>
  35.             <td width="87"><a href="JobsEdit.asp?Result=Add"><img src="Images/x1.gif" width="52" height="17" border="0"></a></td>
  36.             <td width="87"><a href="JobsList.asp"><img src="Images/xlm.gif" width="52" height="17" border="0"></a></td>
  37.             <td width="87"><a href="TalentsList.asp"><img src="Images/xxjl.gif" width="52" height="17" border="0"></a></td>
  38.             <td width="88">&nbsp;</td>
  39.           </tr>
  40.         </table></td>
  41.       </tr>
  42.       <tr>
  43.         <td height="20" align="right" bgcolor="#FFFFFF">职位名称:</td>
  44.         <td bgcolor="#FFFFFF"><input name="JobName" type="text" class="textfield" id="JobName" style="WIDTH: 240;" value="<%=JobName%>">&nbsp;发布:<input name="ViewFlag" type="checkbox" style='HEIGHT: 13px;WIDTH: 13px;' value="1" <%if ViewFlag then response.write ("checked")%>>&nbsp;*&nbsp;不少于3个字符</td>
  45.       </tr>
  46.       <tr>
  47.         <td height="20" align="right" bgcolor="#FFFFFF">工作地点:</td>
  48.         <td bgcolor="#FFFFFF"><input name="JobAddress" type="text" class="textfield" id="JobAddress" style="WIDTH: 240;" value="<%=JobAddress%>">&nbsp;*</td>
  49.       </tr>
  50.       <tr>
  51.         <td height="20" align="right" bgcolor="#FFFFFF">招聘人数:</td>
  52.         <td bgcolor="#FFFFFF"><input name="JobNumber" type="text" class="textfield" id="JobNumber" style="WIDTH: 240" value="<%=JobNumber%>">&nbsp;*&nbsp;6人</td>
  53.       </tr>
  54.       <tr>
  55.         <td height="20" align="right" bgcolor="#FFFFFF">月&nbsp;薪&nbsp;水:</td>
  56.         <td bgcolor="#FFFFFF"><input name="Emolument" type="text" class="textfield" id="Emolument" style="WIDTH: 240;" value="<%=Emolument%>">&nbsp;*&nbsp;3000元/月</td>
  57.       </tr>
  58.       <tr>
  59.         <td height="20" align="right" bgcolor="#FFFFFF">结束日期:</td>
  60.         <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">&nbsp;*&nbsp;默认为3个月,可手动输入日期格式</td>
  61.       </tr>      <tr>
  62.         <td height="20" align="right" valign="top" bgcolor="#FFFFFF">信息内容:<br>
  63.         <td bgcolor="#FFFFFF"><%
  64. Dim oFCKeditor
  65. Set oFCKeditor = New FCKeditor
  66. oFCKeditor.BasePath = "../fckeditor/" 
  67. oFCKeditor.ToolbarSet = "Default" 
  68. oFCKeditor.Width = "100%" 
  69. oFCKeditor.Height = "400" 
  70. oFCKeditor.Value = content
  71. oFCKeditor.Create "Content" 
  72. %></td>
  73.       </tr>
  74.       <tr>
  75.         <td height="30" align="right" bgcolor="#FFFFFF">&nbsp;</td>
  76.         <td valign="bottom" bgcolor="#FFFFFF"><input name="submitSaveEdit" type="submit" class="button"  id="submitSaveEdit" value="保存" style="WIDTH: 80;" ></td>
  77.       </tr>
  78.     </table></td>
  79.   </tr>
  80.   </form>
  81. </table>
  82. </BODY>
  83. </HTML>
  84. <%
  85. sub JobsEdit()
  86.   dim Action,rsCheckAdd,rs,sql
  87.   Action=request.QueryString("Action")
  88.   if Action="SaveEdit" then '保存编辑管理员信息
  89.     set rs = server.createobject("adodb.recordset")
  90.     if len(trim(request.Form("JobName")))<3 then
  91.       response.write ("<script language=javascript> alert('职位名称为必填项目!');history.back(-1);</script>")
  92.       response.end
  93.     end if
  94.     if len(trim(request.Form("JobAddress")))="" or len(trim(request.Form("JobNumber")))="" or len(trim(request.Form("Emolument")))="" then
  95.       response.write ("<script language=javascript> alert('""工作地点、职位数量、月薪水""名称为必填项目,且不少于2个字符!');history.back(-1);</script>")
  96.       response.end
  97.     end if
  98.     if len(trim(request.Form("EndDate")))<4 then
  99.       response.write ("<script language=javascript> alert('""结束日期""名称为必填项目!');history.back(-1);</script>")
  100.       response.end
  101.     end if
  102.     if Result="Add" then '创建网站管理员
  103.   sql="select * from sk_Jobs"
  104.       rs.open sql,conn,1,3
  105.       rs.addnew
  106.       rs("JobName")=trim(Request.Form("JobName"))
  107.   if Request.Form("ViewFlag")=1 then
  108.         rs("ViewFlag")=Request.Form("ViewFlag")
  109.   else
  110.         rs("ViewFlag")=0
  111.   end if
  112.   rs("JobAddress")=trim(Request.Form("JobAddress"))
  113.   rs("JobNumber")=trim(Request.Form("JobNumber"))
  114.   rs("Emolument")=trim(Request.Form("Emolument"))
  115.   rs("EndDate")=trim(Request.Form("EndDate"))
  116.   rs("Content")=Request.Form("Content")
  117.   rs("AddTime")=now()
  118. end if  
  119. if Result="Modify" then '修改网站管理员
  120.       sql="select * from sk_Jobs where ID="&ID
  121.       rs.open sql,conn,1,3
  122.       rs("JobName")=trim(Request.Form("JobName"))
  123.   if Request.Form("ViewFlag")=1 then
  124.         rs("ViewFlag")=Request.Form("ViewFlag")
  125.   else
  126.         rs("ViewFlag")=0
  127.   end if
  128.   rs("JobAddress")=trim(Request.Form("JobAddress"))
  129.   rs("JobNumber")=trim(Request.Form("JobNumber"))
  130.   rs("Emolument")=trim(Request.Form("Emolument"))
  131.   rs("EndDate")=trim(Request.Form("EndDate"))
  132.   rs("Content")=Request.Form("Content")
  133. end if
  134. rs.update
  135. rs.close
  136.     set rs=nothing 
  137.          Response.Redirect("Tips/jobs.asp")
  138.   else '提取管理员信息
  139. if Result="Modify" then
  140.       set rs = server.createobject("adodb.recordset")
  141.       sql="select * from sk_Jobs where ID="& ID
  142.       rs.open sql,conn,1,1
  143.   JobName=rs("JobName")
  144.   ViewFlag=rs("ViewFlag")
  145.   JobAddress=rs("JobAddress")
  146.   JobNumber=rs("JobNumber")
  147.   Emolument=rs("Emolument")
  148.   EndDate=rs("EndDate")   
  149.       Content=rs("Content")
  150.   rs.close
  151.       set rs=nothing 
  152. end if
  153.   end if
  154. end sub
  155. %>