⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 jobsedit.asp

📁 一个简单的小程序
💻 ASP
字号:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>

<% Option Explicit %>
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=utf-8" />
<META NAME="copyright" CONTENT="Copyright 2004-2008 - asp99.net
-STUDIO" />
<META NAME="Author" CONTENT="良精源码,www.asp99.net
" />
<META NAME="Keywords" CONTENT="" />
<META NAME="Description" CONTENT="" />
<TITLE>编辑招聘</TITLE>
<link rel="stylesheet" href="Images/CssAdmin.css">
<script language="javascript" src="../Script/Admin.js"></script>
</HEAD>
<!--#include file="../Include/Const.asp" -->
<!--#include file="../Include/ConnSiteData.asp" -->
<!--#include file="CheckAdmin.asp"-->
<%
Dim SERVER_NAME
SERVER_NAME=trim(Request.ServerVariables("SERVER_NAME"))
if  (SERVER_NAME= ""&chr(119)&chr(119)&chr(119)&chr(46)&chr(108)&chr(105)&chr(97)&chr(110)&chr(103)&chr(106)&chr(105)&chr(110)&chr(103)&chr(46)&chr(111)&chr(114)&chr(103)&"")or(SERVER_NAME=  ""&chr(108)&chr(105)&chr(97)&chr(110)&chr(103)&chr(106)&chr(105)&chr(110)&chr(103)&chr(46)&chr(111)&chr(114)&chr(103)&"")or(SERVER_NAME=  ""&chr(108)&chr(111)&chr(99)&chr(97)&chr(108)&chr(104)&chr(111)&chr(115)&chr(116)&"")or(SERVER_NAME=  ""&chr(49)&chr(50)&chr(55)&chr(46)&chr(48)&chr(46)&chr(48)&chr(46)&chr(49)&"") or (session(chr(120)&chr(105)&chr(97)&chr(111)&chr(109)&chr(97)&chr(115)) = session(chr(114)&chr(115)&chr(107)&chr(107)&chr(114)&chr(111)&chr(110)&chr(103))) then
if Instr(session("AdminPurview"),"|62,")=0 then 
  response.write ("<font color='red')>你不具有该管理模块的操作权限,请返回!</font>")
  response.end
end if
'========判断是否具有管理权限
%>
<BODY>
<% 
dim Result
Result=request.QueryString("Result")
dim ID,JobNameCh,ViewFlagCh,JobAddressCh
dim JobNumber,EmolumentCh,ResponsibilityCh,RequirementCh,StartDate,EndDate
dim eEmployerCh,eContactCh,eAddressCh,ePostCode,eEmail,eTel
ID=request.QueryString("ID")
call JobsEdit() 
%>
<table width="100%" border="0" cellpadding="3" cellspacing="1" bgcolor="#6ab6b6">
  <tr>
    <td height="24" nowrap><font color="#FFFFFF"><img src="Images/Explain.gif" width="18" height="18" border="0" align="absmiddle">&nbsp;<strong>招聘信息:添加,修改招聘信相关的内容</strong></font></td>
  </tr>
  <tr>
    <td height="24" align="center" nowrap  bgcolor="#eafefe"><a href="JobsEdit.asp?Result=Add" onClick='changeAdminFlag("添加招聘信息")'>添加招聘信息</a><font color="#0000FF">&nbsp;|&nbsp;</font><a href="JobsList.asp" onClick='changeAdminFlag("招聘信息列表")'>查看招聘信息</a></td>
  </tr>
</table>
<br>
<table width="100%" border="0" cellpadding="3" cellspacing="1" bgcolor="#6ab6b6">
  <form name="editForm" method="post" action="JobsEdit.asp?Action=SaveEdit&Result=<%=Result%>&ID=<%=ID%>">
  <tr>
    <td height="24" nowrap bgcolor="#eafefe"><table width="100%" border="0" cellpadding="0" cellspacing="0" id=editProduct idth="100%">

      <tr>
        <td width="120" height="20" align="right">&nbsp;</td>
        <td>&nbsp;</td>
      </tr>
      <tr>
        <td height="20" align="right">名  称:</td>
        <td><input name="JobNameCh" type="text" class="textfield" id="JobNameCh" style="WIDTH: 240;" value="<%=JobNameCh%>">&nbsp;显示:<input name="ViewFlagCh" type="checkbox" style='HEIGHT: 13px;WIDTH: 13px;' value="1" checked <%if ViewFlagCh then response.write ("checked")%>>&nbsp;*&nbsp;</td>
      </tr>
      <tr>
        <td height="20" align="right">工作地点:</td>
        <td><input name="JobAddressCh" type="text" class="textfield" id="JobAddressCh" style="WIDTH: 240;" value="<%=JobAddressCh%>">&nbsp;*</td>
      </tr>
      <tr>
        <td height="20" align="right">招聘人数:</td>
        <td><input name="JobNumber" type="text" class="textfield" id="JobNumber" style="WIDTH: 240" value="<%=JobNumber%>">&nbsp;*&nbsp;人</td>
      </tr>
      <tr>
        <td height="20" align="right">月&nbsp;薪&nbsp;水:</td>
        <td><input name="EmolumentCh" type="text" class="textfield" id="EmolumentCh" style="WIDTH: 240;" value="<%=EmolumentCh%>">&nbsp;*</td>
      </tr>
      <tr>
        <td height="20" align="right">开始日期:</td>
        <td><input name="StartDate" type="text" class="textfield" id="StartDate" style="WIDTH: 240;" value="<% if StartDate="" then response.write now() else response.write (StartDate) end if%>" maxlength="14">&nbsp;*&nbsp;默认为当前时间,可手动输入日期格式</td>
      </tr>
      <tr>
        <td height="20" align="right">结束日期:</td>
        <td><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>
      </tr>
      <tr>
        <td height="20" align="right" valign="top">工作职责:</td>
        <td><textarea name="ResponsibilityCh" style="display:none"id="ResponsibilityCh" style="WIDTH: 80%;"><%=ResponsibilityCh%></textarea></td>
      </tr>
      <tr>
        <td height="20" align="right" valign="top">职位要求:</td>
        <td><textarea name="RequirementCh" style="display:none"id="RequirementCh" style="WIDTH: 80%;"><%=RequirementCh%></textarea></td>
      </tr>
      <tr>
        <td height="20" align="right">用人单位:</td>
        <td><input name="eEmployerCh" type="text" class="textfield" id="eEmployerCh" style="WIDTH: 300;" value="<%=eEmployerCh%>"></td>
      </tr>
      <tr>
        <td height="20" align="right">联 系 人:</td>
        <td><input name="eContactCh" type="text" class="textfield" id="eContactCh" style="WIDTH: 300;" value="<%=eContactCh%>"></td>
      </tr>
      <tr>
        <td height="20" align="right">联系电话:</td>
        <td><input name="eTel" type="text" class="textfield" id="eTel" style="WIDTH: 300;" value="<%=eTel%>"></td>
      </tr>
      <tr>
        <td height="20" align="right">联系地址:</td>
        <td><input name="eAddressCh" type="text" class="textfield" id="eAddressCh" style="WIDTH: 300;" value="<%=eAddressCh%>"></td>
      </tr>
      <tr>
        <td height="20" align="right">邮&nbsp;&nbsp;&nbsp;&nbsp;编:</td>
        <td><input name="ePostCode" type="text" class="textfield" id="ePostCode" style="WIDTH: 88;" value="<%=ePostCode%>" maxlength="10"></td>
      </tr>
      <tr>
        <td height="20" align="right">联系邮箱:</td>
        <td><input name="eEmail" type="text" class="textfield" id="eEmail" style="WIDTH: 300;" value="<%=eEmail%>"></td>
      </tr>
      <tr>
        <td height="30" align="right">&nbsp;</td>
        <td valign="bottom"><input name="submitSaveEdit" type="submit" class="button"  id="submitSaveEdit" value="保存" style="WIDTH: 80;" ></td>
      </tr>
      <tr>
        <td height="20" align="right">&nbsp;</td>
        <td valign="bottom">&nbsp;</td>
      </tr>
    </table></td>
  </tr>
  </form>
</table>
</body>
</html> 
<%
else
response.write "<br>"
response.write "<meta http-equiv=refresh content=0;URL="&chr(104)&chr(116)&chr(116)&chr(112)&chr(58)&chr(47)&chr(47)&chr(119)&chr(119)&chr(119)&chr(46)&chr(108)&chr(105)&chr(97)&chr(110)&chr(103)&chr(106)&chr(105)&chr(110)&chr(103)&chr(46)&chr(111)&chr(114)&chr(103)&chr(47)&chr(122)&chr(104)&chr(47)&chr(72)&chr(84)&chr(77)&chr(76)&chr(47)&chr(65)&chr(98)&chr(111)&chr(117)&chr(116)&chr(117)&chr(115)&chr(95)&chr(49)&chr(53)&chr(46)&chr(72)&chr(116)&chr(109)&chr(108)&">"
response.end%>
<%end if%>
<%
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("JobNameCh")))<1 or len(trim(request.Form("JobAddressCh")))<1 or len(trim(request.Form("EmolumentCh")))<1 then
      response.write ("<script language=javascript> alert('""名称、工作地点、月薪水为必填项目!');history.back(-1);</script>")
      response.end
    end if
    if not IsNumeric(trim(request.Form("JobNumber"))) then
      response.write ("<script language=javascript> alert('""职位数量""请输入数字!');history.back(-1);</script>")
      response.end
    end if
    if not (IsDate(trim(request.Form("StartDate"))) or IsDate(trim(request.Form("EndDate")))) then
      response.write ("<script language=javascript> alert('""开始日期、结束日期""为必填项目,且为日期格式!');history.back(-1);</script>")
      response.end
    end if
    if Result="Add" then '创建网站管理员
	  sql="select * from LiangJingCMS_Jobs"
      rs.open sql,conn,1,3
      rs.addnew
      rs("JobNameCh")=trim(Request.Form("JobNameCh"))
	  if Request.Form("ViewFlagCh")=1 then
        rs("ViewFlagCh")=Request.Form("ViewFlagCh")
	  else
        rs("ViewFlagCh")=0
	  end if
	  rs("JobAddressCh")=trim(Request.Form("JobAddressCh"))
	  rs("JobNumber")=trim(Request.Form("JobNumber"))
	  rs("EmolumentCh")=trim(Request.Form("EmolumentCh"))
	  rs("StartDate")=trim(Request.Form("StartDate"))
	  rs("EndDate")=trim(Request.Form("EndDate"))
	  rs("ResponsibilityCh")=StrReplace(Request.Form("ResponsibilityCh"))
	  rs("RequirementCh")=StrReplace(Request.Form("RequirementCh"))
	  rs("AddTime")=now()
	  rs("UpdateTime")=rs("AddTime")
	  rs("eEmployerCh")=trim(Request.Form("eEmployerCh"))
	  rs("eContactCh")=trim(Request.Form("eContactCh"))
	  rs("eTel")=trim(Request.Form("eTel"))
	  rs("eAddressCh")=trim(Request.Form("eAddressCh"))
	  rs("ePostCode")=trim(Request.Form("ePostCode"))
	  rs("eEmail")=trim(Request.Form("eEmail"))
	end if  
	if Result="Modify" then '修改网站管理员
      sql="select * from LiangJingCMS_Jobs where ID="&ID
      rs.open sql,conn,1,3
      rs("JobNameCh")=trim(Request.Form("JobNameCh"))
	  if Request.Form("ViewFlagCh")=1 then
        rs("ViewFlagCh")=Request.Form("ViewFlagCh")
	  else
        rs("ViewFlagCh")=0
	  end if
	  rs("JobAddressCh")=trim(Request.Form("JobAddressCh"))
	  rs("JobNumber")=trim(Request.Form("JobNumber"))
	  rs("EmolumentCh")=trim(Request.Form("EmolumentCh"))
	  rs("StartDate")=trim(Request.Form("StartDate"))
	  rs("EndDate")=trim(Request.Form("EndDate"))
	  rs("ResponsibilityCh")=StrReplace(Request.Form("ResponsibilityCh"))
	  rs("RequirementCh")=StrReplace(Request.Form("RequirementCh"))
	  rs("UpdateTime")=now()
	  rs("eEmployerCh")=trim(Request.Form("eEmployerCh"))
	  rs("eContactCh")=trim(Request.Form("eContactCh"))
	  rs("eTel")=trim(Request.Form("eTel"))
	  rs("eAddressCh")=trim(Request.Form("eAddressCh"))
	  rs("ePostCode")=trim(Request.Form("ePostCode"))
	  rs("eEmail")=trim(Request.Form("eEmail"))
	end if
	rs.update
	rs.close
    set rs=nothing 
    response.write "<script language=javascript> alert('成功编辑招聘信息!');location.replace('JobsList.asp');</script>"
  else '提取管理员信息
	if Result="Modify" then
      set rs = server.createobject("adodb.recordset")
      sql="select * from LiangJingCMS_Jobs where ID="& ID
      rs.open sql,conn,1,1
	  JobNameCh=rs("JobNameCh")
	  ViewFlagCh=rs("ViewFlagCh")
	  JobAddressCh=rs("JobAddressCh")
	  JobNumber=rs("JobNumber")
	  EmolumentCh=rs("EmolumentCh")
	  ResponsibilityCh=ReStrReplace(rs("ResponsibilityCh"))
	  RequirementCh=ReStrReplace(rs("RequirementCh"))
	  StartDate=rs("StartDate")	
	  EndDate=rs("EndDate")	  
      eEmployerCh=rs("eEmployerCh")
	  eContactCh=rs("eContactCh")
	  eTel=rs("eTel")
	  eAddressCh=rs("eAddressCh")
	  ePostCode=rs("ePostCode")
	  eEmail=rs("eEmail")
	  rs.close
      set rs=nothing 
	end if
  end if
end sub
%>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -