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

📄 admin_sysprofession.asp

📁 嘉缘人才6.0精简 ,很好用的人才系统
💻 ASP
字号:
<!--#include file="../../conn/conn.asp" -->
<!--#include file="../../Inc/Commoncode.asp" -->
<!--#include file="../checkvalid.asp" -->
<%
If Not FRAdminLevel(104) Then
	Call ErrorMsg()
End If
%>
<%
fid=request("fid")
if request("step")="add" then
profession_name=request("profession_name")
profession_enname=request("profession_enname")
if profession_name="" then
	response.write "<script>alert('对不起,中文专业分类不能为空!');location.href='javascript:history.back()';</script>"
	Response.End 
end if
if profession_enname="" then
	response.write "<script>alert('对不起,英文专业分类不能为空!');location.href='javascript:history.back()';</script>"
	Response.End 
end if
sql="select * from JOB_profession"
set rs=Server.CreateObject("ADODB.Recordset")                                                    
rs.open sql,conn,1,3
rs.addnew
rs("profession_name")=profession_name
rs("profession_enname")=profession_enname
rs("profession_fid")=fid
rs.Update
rs.Close
set rs=nothing
Response.Redirect "Admin_Sysprofession.asp?fid="&fid&"&ceng="&request("ceng")
end if

if request("step")="del" then
conn.execute("delete from JOB_profession where profession_fid="&request("id"))
conn.execute("delete from JOB_profession where profession_id="&request("id"))
Response.Redirect "Admin_Sysprofession.asp?fid="&fid&"&ceng="&request("ceng")
end if

if request("step")="order" then
set rs=server.CreateObject("adodb.recordset")
sql="select date from JOB_profession where profession_id="&request("id")
rs.open sql,conn,1,3
rs("date")=now()
rs.update
rs.close
set rs=nothing
Response.Redirect "Admin_Sysprofession.asp?fid="&fid&"&ceng="&request("ceng")
end if

if request("step")="modi" then
profession_name=request("profession_name")
profession_enname=request("profession_enname")
if profession_name="" then
	response.write "<script>alert('对不起,中文专业分类不能为空!');location.href='javascript:history.back()';</script>"
	Response.End 
end if
if profession_enname="" then
	response.write "<script>alert('对不起,英文专业分类不能为空!');location.href='javascript:history.back()';</script>"
	Response.End 
end if
conn.execute("update JOB_profession set profession_name='"&profession_name&"',profession_enname='"&profession_enname&"' where profession_id="&request("id"))
Response.Redirect "Admin_Sysprofession.asp?fid="&fid&"&ceng="&request("ceng")
end if
%>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>系统专业分类信息设置</title>
<LINK href=../css/style.css rel=stylesheet type="text/css">
</head>
<body>
<table width="98%" border="0" cellspacing="1" cellpadding="2" align=center class="tableBorder">
  <tr>
    <th height=25 colspan="2" class="tableHeaderText">系统专业分类信息管理 </th>
  </tr>
  <tr>
    <td colspan="2"><p><B>注意</B>:<BR>
      ①专业分类直接与会员及会员发布的信息相关联,删除上级分类同时将删除该类别下的所有小分类以及所有相关的信息。<BR>
    </td>
  </tr>
   <%
  	ceng=request("ceng")
	if request("fid")="" then 
	fid=0 
	else
	fid=request("fid")
	end if
	if fid=0 then
    ceng=1	
	end if%>
  <tr>
    <td width="10%" height=25><B>操作选项</B></td>
    <td><a href="Admin_Sysprofession.asp?fid=0">返回一级分类 </a>|[<a href="javascript:location.reload()">刷新页面</a>] </td>
  </tr>
</table>
<table width="98%" border="0" align="center" cellpadding="2" cellspacing="1" class="tableBorder">
	<%if fid<>0 then%>  
 	<tr>
    <th class="tableHeaderText" colspan=4 height=25><%
	select case ceng
	case 2
	response.Write "二级分类"
	end select
	%>列表</th>
  </tr>
  <%else%>
   <tr>
    <th class="tableHeaderText" colspan=4 height=25>一级分类列表</th>
  </tr>
  <%end if%>
  <tr align="center">
    <%
	sql="select * from JOB_profession where profession_fid="&fid&" order by date desc"
set rs=Server.CreateObject("ADODB.Recordset")                                                    
rs.open sql,conn,1,1 
	if (rs.eof and rs.bof) then
	response.write "<td height=20>暂无内容</td>"
else                                                 
n=0                                                   
do while not rs.eof
n=n+1%>
    <td height="25" align="left"><%=rs("profession_name")%> (<%=left(rs("profession_enname"),7)%>) </td><td><input name="Submit" type="button" class="inputs" onClick="window.location='Admin_Sysprofession.asp?fid=<%=fid%>&id=<%=rs("profession_id")%>&step=order&ceng=<%=ceng%>'" value="排序"> 
	 
	<%if ceng<2 then%><input name="Submit1" type="button" class="inputs" id="Submit1" onClick="window.location='Admin_Sysprofession.asp?fid=<%=rs("profession_id")%>&ceng=<%=ceng+1%>'" value="子类"> 
	<%end if%>
      <input name="Submit2" type="button" class="inputs" id="Submit2" onClick="window.location='Admin_Sysprofession.asp?fid=<%=fid%>&id=<%=rs("profession_id")%>&step=mod&ceng=<%=ceng%>'" value="修改">
        <input name="Submit3" type="button" class="inputs" id="Submit3" onClick="window.location='Admin_Sysprofession.asp?fid=<%=fid%>&id=<%=rs("profession_id")%>&step=del&ceng=<%=ceng%>'" value="删除">
          </td>
    <%if n mod 2=0 then response.write"</tr><tr align=center>"
rs.movenext                                             
loop   
end if                                   
rs.close                                             
set rs=nothing%>
  </tr>
</table>
<%if request("step")<>"mod" then%>
<table width="98%" border="0" align="center" cellpadding="2" cellspacing="1" class="tableBorder">
  <tr>
    <th class="tableHeaderText" colspan=5 height=25>新增分类</th>
  </tr>
  <form name="addpc" action="Admin_Sysprofession.asp?step=add&fid=<%=fid%>&ceng=<%=ceng%>" method="post">
    <tr>
      <td width="15%"><div align="right">中文名称:</div></td>
      <td width="20%"><input type="text" name="profession_name"></td>
      <td width="15%"><div align="right">英文名称:</div></td>
      <td width="20%"><input name="profession_enname" type="text"></td>
      <td width="15%"><input name="Submit4" type="submit" class="inputs" value="提交"></td>
    </tr>
  </form>
</table>
<%else%>
<table width="98%" border="0" align="center" cellpadding="2" cellspacing="1" class="tableBorder">
  <tr>
    <th colspan=5 height=25>修改分类</th>
  </tr>
  <%id=request("id")%>
  <form name="addpc" action="Admin_Sysprofession.asp?step=modi&fid=<%=fid%>&id=<%=id%>&ceng=<%=ceng%>" method="post">
    <% set rsw=conn.execute("select * from JOB_profession where profession_id="&id)%>
	<tr>
      <td width="15%"><div align="right">中文名称:</div></td>
      <td width="20%"><input type="text" name="profession_name"  value="<%=rsw("profession_name")%>"></td>
      <td width="15%"><div align="right">英文名称:</div></td>
      <td width="20%"><input name="profession_enname" type="text" value="<%=rsw("profession_enname")%>"></td>
      <td width="15%"><input name="Submit4" type="submit" class="inputs" value="提交"></td>
    </tr>
		<%rsw.close
	set rsw=nothing
	%>
  </form>
</table>
<%end if%>
<!--#include file="../inc/copy.asp" -->
</body>
</html>

⌨️ 快捷键说明

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