📄 admin_template.asp
字号:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!--#include file="../../conn/conn.asp" -->
<!--#include file="../checkvalid.asp"-->
<!--#include file="../../inc/commoncode.asp"-->
<%If Not FRAdminLevel(402) Then
Call ErrorMsg()
End If
Const strFileName="Admin_Template.asp"
const MaxPerpage=10
page=Trim(Request("page"))
If page<>"" And IsNumeric(page) Then
If page<1 Or Len(page)>10 Then
page=1
Else
page=CLng(page)
End If
Else
page=1
End If
'#########################################################
'
' Software name: Finereason HRCMS 6.0
' 软件名称:嘉缘人才网站内容管理系统 V6.0
' Email: service@finereason.com . QQ:109530926
' Web: http://www.finereason.com http://www.yjys.net
' Copyright (C) FineSincere Network All Rights Reserved.
' 版权所有 嘉挚科技 未经嘉挚公司授权不得用于任何商业用途
'
'#########################################################
id=request.QueryString("id")
tid=request.QueryString("tid")
show=request.QueryString("show")
idt=request.QueryString("idt")
cid=request.QueryString("cid")
did=request.QueryString("did")
action=request.QueryString("action")
if action="copy" and cid<>"" then
sql="select * from JOB_Template where TemplateID="&cid
set rsc=conn.execute(sql)
if not rsc.eof then
set rsf=server.CreateObject("adodb.recordset")
sql="select * from JOB_Template"
rsf.open sql,conn,1,3
rsf.addnew
rsf("ChannelID")=rsc("ChannelID")
rsf("TemplateName")=rsc("TemplateName")&"副本"
rsf("TemplateContent")=rsc("TemplateContent")
rsf("IsDefault")=False
rsf("ProjectName")=rsc("ProjectName")
rsf("IsDefaultInProject")=rsc("IsDefaultInProject")
rsf("Deleted")=rsc("Deleted")
rsf("typeid")=rsc("typeid")
rsf.update
rsf.close
set rsf=nothing
end if
rsc.close
set rsc=nothing
end if
if action="del" and did<>"" then
conn.execute("delete from JOB_Template where TemplateID="&did)
end if
'*************************模板设为默认部分*******************************
if action<>"" and action="yes" and idt<>"" then
sql="select * from JOB_Template where TemplateID="&idt
set rst=conn.execute(sql)
ChannelID_t=rst("ChannelID")
ProjectName_t=rst("ProjectName")
typeid=rst("typeid")
rst.close
set rst=nothing
conn.execute("update JOB_Template set IsDefault="&FR_HR_False&" where ChannelID="&ChannelID_t&" and ProjectName='"&ProjectName_t&"' and typeid="&typeid)
conn.execute("update JOB_Template set IsDefault="&FR_HR_True&" where TemplateID="&idt)
end if
'********************************************************
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<link href="../css/style.css" rel=stylesheet type=text/css />
<title>网站模板管理</title>
</head>
<body>
<table width="100%" border="0" align="center" cellpadding="2" cellspacing="1" class="tableBorder">
<tr class="title">
<th height="22" colspan="8" align="center" >模板管理</th>
</tr>
<tr class="amrow">
<td height="20" colspan="6"><span class="bodytitle"><font color="ff6600"><b class="style1"> 管理选项</b></font>:</span><a href="Admin_AddTemp.asp">添加模板</a> | <a href="Admin_Template.asp?show=all">模板管理</a> [<a href="javascript:location.reload()">刷新页面</a>]</td>
</tr>
<tr class="amrow">
<td height="20" colspan="6"> <a href="Admin_Template.asp?tid=0&show=all&id=<%=id%>">首页模板</a>
<%
set rs=conn.execute("select * from JOB_Channel where Disabled="&FR_HR_False&" and ChannelType<>2")
if not rs.eof then
do while not rs.eof
if show="all" then
response.write "<a href=Admin_Template.asp?tid="&rs("ChannelID")&"&show=all&id="&id&">"&rs("ChannelName")&"</a> "
else
response.write "<a href=Admin_Template.asp?tid="&rs("ChannelID")&"&show=all>"&rs("ChannelName")&"</a> "
end if
rs.movenext
loop
end if
rs.close
set rs=nothing
%><a href="Admin_Template.asp?tid=9999&show=all&id=<%=id%>">通用页面</a> </td>
</tr>
</table>
<%
if show<>"all" then
%>
<table width="100%" border="0" align="center" cellpadding="2" cellspacing="1" class="tableBorder mt10">
<tr class="title">
<th height="22" colspan="12" align="center" >
<%
set rs=conn.execute("select * from JOB_TemplateProject where TemplateProjectID="&id)
if not rs.eof then
session("TemplateProjectName")=rs("TemplateProjectName")
end if
rs.close
set rs=nothing
response.write session("TemplateProjectName")
%> </th>
</tr>
<tr class="tdbg">
<td width="46" height="20" align="center"><font color="ff6600"><b class="style1">模板ID</b></font></td>
<td width="115" align="center"><font color="ff6600"><b class="style1">模板名称</b></font></td>
<td width="86" align="center"><font color="ff6600"><b class="style1">所属频道</b></font></td>
<td width="166" align="center"><font color="ff6600"><b class="style1">所属方案</b></font></td>
<td width="67" align="center"><font color="ff6600"><b class="style1">是否默认</b></font></td>
<td width="66" align="center"><font color="ff6600"><b class="style1">默认方案</b></font></td>
<td width="123" align="center"><font color="ff6600"><b class="style1">模板类型</b></font></td>
<td width="28" align="center"><font color="ff6600"><b class="style1">修改</b></font></td>
<td width="30" align="center"><font color="ff6600"><b class="style1">删除</b></font></td>
<td width="30" align="center"><font color="ff6600"><b class="style1">复制</b></font></td>
</tr>
<%
set rs=server.CreateObject("adodb.recordset")
if tid="" then
sql="select * from JOB_Template where ProjectName='"&session("TemplateProjectName")&"' order by ProjectName,ChannelID,typeid"
else
sql="select * from JOB_Template where ChannelID="&tid&" and ProjectName='"&session( "TemplateProjectName")&"' order by ProjectName,ChannelID,typeid"
end if
rs.open sql,conn,1,1
if not rs.eof then
totalPut=rs.recordcount
if (page-1)*MaxPerpage>totalput then
if (totalPut mod MaxPerpage)=0 then
page= totalPut \ MaxPerpage
else
page= totalPut \ MaxPerpage + 1
end if
end if
if (page-1)*MaxPerpage<totalPut then
rs.move (page-1)*MaxPerpage
else
page=1
end if
do while not rs.eof
%>
<tr class="tdbg" onMouseOut="this.style.backgroundColor=''" onMouseOver="this.style.backgroundColor='#BFDFFF'">
<td width="46" height="20" align="center"><%=rs("TemplateID")%></td>
<td width="115" align="center"><%=rs("TemplateName")%></td>
<td width="86" align="center"><%if rs("ChannelID")=0 then
response.write "网站首页"
elseif rs("ChannelID")=9999 then
response.write "通用频道"
else
set rsc=conn.execute("select * from JOB_Channel where ChannelID="&rs("ChannelID"))
if not rsc.eof then
response.write rsc("ChannelName")
end if
rsc.close
end if
%></td>
<td width="166" align="center"><%=rs("ProjectName")%></td>
<td width="67" align="center">
<%
if rs("IsDefault") then
response.write "<font color=green><a href="&strFileName&"?action=no&idt="&rs("TemplateID")&"&tid="&tid&">√</a></font>"
else
response.write "<font color=red><font color=green><a href="&strFileName&"?action=yes&idt="&rs("TemplateID")&"&tid="&tid&">×</a></font>"
end if
%> </td>
<td width="66" align="center">
<%
if rs("IsDefaultInProject") then
response.write "<font color=green>√</font>"
else
response.write "<font color=red>×</font>"
end if
%> </td>
<td width="123" align="center">
<%=myarray(rs("typeid"))%> </td>
<td width="28" align="center"><a href="Admin_AddTemp.asp?action=edit&id=<%=rs("TemplateID")%>">修改</a></td>
<td width="30" align="center"><a href="<%=strFileName%>?action=del&did=<%=rs("TemplateID")%>&id=<%=id%>&tid=<%=tid%>">删除</a></td>
<td width="30" align="center"><a href="<%=strFileName%>?action=copy&cid=<%=rs("TemplateID")%>&id=<%=id%>&tid=<%=tid%>">复制</a></td>
</tr>
<%
i=i+1
if i>=MaxPerPage then exit do
rs.movenext
loop
else
%>
<tr>
<td height="22" colspan="12" align="center" >暂无模板 </td>
</tr>
<%
end if
rs.close
%>
<tr>
<td height="22" colspan="12" align="center" >
<%
If totalput>0 Then
Call Showpage(strFileName&"?id="&id&"&tid="&tid,totalput,MaxPerPage,false,true,"套模板")
End If
%></td>
</tr>
</table>
<% else %>
<table width="100%" border="0" align="center" cellpadding="2" cellspacing="1" class="tableBorder mt10">
<tr class="title">
<th height="22" colspan="12" align="center" >
<%
if tid="" then
response.write "全部模板管理"
else
set rsc=conn.execute("select * from JOB_Channel where ChannelID="&tid)
if not rsc.eof then
response.write rsc("ChannelName")
end if
rsc.close
set rsc=nothing
end if
%> </th>
</tr>
<tr class="tdbg">
<td width="47" height="20" align="center"><font color="ff6600"><b class="style1">模板ID</b></font></td>
<td width="116" align="center"><font color="ff6600"><b class="style1">模板名称</b></font></td>
<td width="84" align="center"><font color="ff6600"><b class="style1">所属频道</b></font></td>
<td width="168" align="center"><font color="ff6600"><b class="style1">所属方案</b></font></td>
<td width="65" align="center"><font color="ff6600"><b class="style1">是否默认</b></font></td>
<td width="64" align="center"><font color="ff6600"><b class="style1">默认方案</b></font></td>
<td width="124" align="center"><font color="ff6600"><b class="style1">模板类型</b></font></td>
<td width="27" align="center"><font color="ff6600"><b class="style1">修改</b></font></td>
<td width="33" align="center"><font color="ff6600"><b class="style1">删除</b></font></td>
<td width="33" align="center"><font color="ff6600"><b class="style1">复制</b></font></td>
</tr>
<%
set rs=server.CreateObject("adodb.recordset")
if tid="" then
sql="select * from JOB_Template order by ProjectName,ChannelID,typeid"
else
sql="select * from JOB_Template where ChannelID="&tid&" order by ProjectName,ChannelID,typeid"
end if
rs.open sql,conn,1,1
if not rs.eof then
totalPut=rs.recordcount
if (page-1)*MaxPerpage>totalput then
if (totalPut mod MaxPerpage)=0 then
page= totalPut \ MaxPerpage
else
page= totalPut \ MaxPerpage + 1
end if
end if
if (page-1)*MaxPerpage<totalPut then
rs.move (page-1)*MaxPerpage
else
page=1
end if
do while not rs.eof
%>
<tr class="tdbg" onMouseOut="this.style.backgroundColor=''" onMouseOver="this.style.backgroundColor='#BFDFFF'">
<td width="47" height="20" align="center"><%=rs("TemplateID")%></td>
<td width="116" align="center"><%=rs("TemplateName")%></td>
<td width="84" align="center"><%if rs("ChannelID")=0 then
response.write "网站首页"
elseif rs("ChannelID")=9999 then
response.write "通用频道"
else
set rsc=conn.execute("select * from JOB_Channel where ChannelID="&rs("ChannelID"))
if not rsc.eof then
response.write rsc("ChannelName")
end if
rsc.close
set rsc=nothing
end if
%></td>
<td width="168" align="center"><%=rs("ProjectName")%></td>
<td width="65" align="center">
<%
if rs("IsDefault") then
response.write "<font color=green><a href="&strFileName&"?action=no&show=all&idt="&rs("TemplateID")&"&tid="&tid&">√</a></font>"
else
response.write "<font color=red><font color=green><a href="&strFileName&"?action=yes&show=all&idt="&rs("TemplateID")&"&tid="&tid&">×</a></font>"
end if
%> </td>
<td width="64" align="center">
<%
if rs("IsDefaultInProject") then
response.write "<font color=green>√</font>"
else
response.write "<font color=red>×</font>"
end if
%> </td>
<td width="124" align="center"><%=myarray(rs("typeid"))%></td>
<td width="27" align="center"><a href="Admin_AddTemp.asp?action=edit&id=<%=rs("TemplateID")%>">修改</a></td>
<td width="33" align="center"><a href="<%=strFileName%>?action=del&did=<%=rs("TemplateID")%>&show=all&tid=<%=tid%>">删除</a></td>
<td width="33" align="center"><a href="<%=strFileName%>?action=copy&cid=<%=rs("TemplateID")%>&show=all&tid=<%=tid%>">复制</a></td>
</tr>
<%
i=i+1
if i>=MaxPerPage then exit do
rs.movenext
loop
else
%>
<tr>
<td height="22" colspan="12" align="center" >暂无模板 </td>
</tr>
<%
end if
rs.close
set rs=nothing
%>
<tr>
<td height="22" colspan="12" align="center" >
<%
If totalput>0 Then
Call Showpage(strFileName&"?show=all&tid="&tid,totalput,MaxPerPage,false,true,"套模板")
End If
%></td>
</tr>
</table>
<% end if %>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -