📄 all_label_style.asp
字号:
<% Option Explicit %>
<!--#include file="../../FS_Inc/Const.asp" -->
<!--#include file="../../FS_Inc/Function.asp"-->
<!--#include file="../../FS_Inc/md5.asp" -->
<!--#include file="../../FS_InterFace/MF_Function.asp" -->
<!--#include file="../../FS_InterFace/NS_Function.asp" -->
<!--#include file="../../FS_InterFace/HS_Function.asp" -->
<!--#include file="../../FS_InterFace/AP_Function.asp" -->
<!--#include file="Func_page.asp" -->
<!--#include file="../../FS_Inc/Cls_SysConfig.asp"-->
<%
Response.Buffer = True
Response.Expires = -1
Response.ExpiresAbsolute = Now() - 1
Response.Expires = 0
Response.CacheControl = "no-cache"
Dim Conn,obj_Label_Rs,SQL,strShowErr,str_CurrPath,sRootDir
MF_Default_Conn
'session判断
MF_Session_TF
'----2007-02-12 By Ken
Dim GetSysConfigObj,GetStyleMaxNum
Set GetSysConfigObj = New Cls_SysConfig
GetSysConfigObj.getSysParam()
GetStyleMaxNum = Clng(GetSysConfigObj.Style_MaxNum)
Set GetSysConfigObj = Nothing
'-------------
Dim str_StyleName,txt_Content,Labelclass_SQL,obj_Labelclass_rs,obj_Count_rs
Dim Label_Sub
Dim int_RPP,int_Start,int_showNumberLink_,str_nonLinkColor_,toF_,toP10_,toP1_,toN1_,toN10_,toL_,showMorePageGo_Type_
Dim Page,cPageNo,tmp_LableClassID,LableClassID
int_RPP=50 '设置每页显示数目
int_showNumberLink_=8 '数字导航显示数目
showMorePageGo_Type_ = 1 '是下拉菜单还是输入值跳转,当多次调用时只能选1
str_nonLinkColor_="#999999" '非热链接颜色
toF_="<font face=webdings title=""首页"">9</font>" '首页
toP10_=" <font face=webdings title=""上十页"">7</font>" '上十
toP1_=" <font face=webdings title=""上一页"">3</font>" '上一
toN1_=" <font face=webdings title=""下一页"">4</font>" '下一
toN10_=" <font face=webdings title=""下十页"">8</font>" '下十
toL_="<font face=webdings title=""最后一页"">:</font>" '尾页
if G_VIRTUAL_ROOT_DIR<>"" then sRootDir="/"+G_VIRTUAL_ROOT_DIR else sRootDir=""
If Session("Admin_Is_Super") = 1 then
str_CurrPath = sRootDir &"/"&G_UP_FILES_DIR
Else
If Session("Admin_FilesTF") = 0 Then
str_CurrPath = Replace(sRootDir &"/"&G_UP_FILES_DIR&"/adminfiles/"&UCase(md5(Session("Admin_Name"),16)),"//","/")
Else
str_CurrPath = sRootDir &"/"&G_UP_FILES_DIR
End If
End if
Label_Sub = NoSqlHack(Request.QueryString("Label_Sub"))
str_StyleName = Trim(Request.Form("StyleName"))
txt_Content = Trim(Request.Form("TxtFileds"))
'txt_Content = replace(txt_Content,"{DS_","{DS:")
if Request.Form("Action") = "Add_save" then
if str_StyleName ="" or txt_Content ="" then
strShowErr = "<li>请填写完整</li>"
Response.Redirect("../Error.asp?ErrCodes="&Server.URLEncode(strShowErr)&"&ErrorUrl=")
Response.end
end if
set obj_Count_rs = server.CreateObject(G_FS_RS)
obj_Count_rs.Open "Select StyleName,Content,AddDate,LableClassID from FS_MF_Labestyle Order by id desc",Conn,1,3
if Not obj_Count_rs.eof then
if obj_Count_rs.recordcount>GetStyleMaxNum then
strShowErr = "<li>您建立的样式已经超过" & GetStyleMaxNum & "个。你将不能再增加\n如果需要增加,请删除部分样式</li>"
Response.Redirect("../Error.asp?ErrCodes="&Server.URLEncode(strShowErr)&"&ErrorUrl=Label/All_Label_style.asp?Action=Add&Label_Sub="&Request.Form("Label_Sub")&"")
Response.end
end if
end if
Labelclass_SQL = "Select StyleName,Content,AddDate,StyleType,LableClassID from FS_MF_Labestyle where StyleName ='"& str_StyleName &"'"
Set obj_Labelclass_rs = server.CreateObject(G_FS_RS)
obj_Labelclass_rs.Open Labelclass_SQL,Conn,1,3
if obj_Labelclass_rs.eof then
obj_Labelclass_rs.addnew
obj_Labelclass_rs("StyleName") = str_StyleName
obj_Labelclass_rs("content") = txt_Content
obj_Labelclass_rs("AddDate") =now
obj_Labelclass_rs("StyleType") =Request.Form("Label_Sub")
obj_Labelclass_rs("LableClassID") =Request.Form("LableClassID")'---写入数据库-------2/1 by chen---------
'tmp_LableClassID=obj_Labelclass_rs("LableClassID")
obj_Labelclass_rs.update
else
strShowErr = "<li>此样式名称重复,请重新输入</li>"
Response.Redirect("../Error.asp?ErrCodes="&Server.URLEncode(strShowErr)&"&ErrorUrl=")
Response.end
end if
obj_Labelclass_rs.close:set obj_Labelclass_rs =nothing
strShowErr = "<li>添加成功</li>"
Response.Redirect("../Success.asp?ErrCodes="&Server.URLEncode(strShowErr)&"&ErrorUrl=Label/All_Label_style.asp?Label_Sub="& Request.Form("Label_Sub")&"")
Response.end
elseif Request.Form("Action") = "Add_edit" then
Labelclass_SQL = "Select StyleName,Content,AddDate,LableClassID from FS_MF_Labestyle where id ="& NosqlHack(Request.Form("ID"))
Set obj_Labelclass_rs = server.CreateObject(G_FS_RS)
obj_Labelclass_rs.Open Labelclass_SQL,Conn,1,3
if not obj_Labelclass_rs.eof then
obj_Labelclass_rs("StyleName") = str_StyleName
obj_Labelclass_rs("content") = txt_Content
'obj_Labelclass_rs("AddDate") =now
obj_Labelclass_rs("LableClassID")=Request.Form("LableClassID")'--------写入数据库----2/1 by chen--------------------
'tmp_LableClassID=obj_Labelclass_rs("LableClassID")
obj_Labelclass_rs.update
End if
obj_Labelclass_rs.close:set obj_Labelclass_rs =nothing
strShowErr = "<li>修改成功</li>"
Response.Redirect("../Success.asp?ErrCodes="&Server.URLEncode(strShowErr)&"&ErrorUrl=Label/All_Label_style.asp?Label_Sub="& Request.Form("Label_Sub")&"")
Response.end
end if
if Request.QueryString("DelTF")="1" then
Conn.execute("Delete From FS_MF_Labestyle where StyleType='"& Request.QueryString("Label_Sub")&"' and id="&NoSqlHack(Request.QueryString("id")))
strShowErr = "<li>删除成功</li>"
Response.Redirect("../Success.asp?ErrCodes="&Server.URLEncode(strShowErr)&"&ErrorUrl=Label/All_Label_style.asp?Label_Sub="& Request.Form("Label_Sub")&"")
Response.end
end if
%>
<html>
<head>
<title>标签管理</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="../images/skin/Css_<%=Session("Admin_Style_Num")%>/<%=Session("Admin_Style_Num")%>.css" rel="stylesheet" type="text/css">
</head>
<script language="JavaScript" src="../../FS_Inc/PublicJS.js" type="text/JavaScript"></script>
<script language="JavaScript" src="../../FS_Inc/Prototype.js"></script>
<script language="JavaScript" type="text/javascript" src="../../FS_Inc/Get_Domain.asp"></script>
<script language="JavaScript" type="text/javascript" src="../../Editor/FS_scripts/editor.js"></script>
<body>
<table width="98%" height="81" border="0" align="center" cellpadding="4" cellspacing="1" class="table">
<tr class="hback" >
<td width="100%" height="20" align="Left" class="xingmu">引用样式管理</td>
</tr>
<tr class="hback" >
<td class="hback" align="center"><div align="left"><a href="../Templets_List.asp">模板管理</a>
<%
if Request.QueryString("TF") = "NS" then
Response.Write("┆<a href=News_Label.asp target=_self>返回标签管理</a>")
elseif Request.QueryString("TF") = "DS" then
Response.Write("┆<a href=Down_Label.asp target=_self>返回标签管理</a>")
elseif Request.QueryString("TF") = "SD" then
Response.Write("┆<a href=supply_Label.asp target=_self>返回标签管理</a>")
elseif Request.QueryString("TF") = "HS" then
Response.Write("┆<a href=House_Label.asp target=_self>返回标签管理</a>")
elseif Request.QueryString("TF") = "AP" then
Response.Write("┆<a href=job_Label.asp target=_self>返回标签管理</a>")
elseif Request.QueryString("TF") = "MS" then
Response.Write("┆<a href=Mall_Label.asp target=_self>返回</a>")
else
Response.Write("")
end if
%>
┆<a href="All_Label_Style.asp" target="_self">所有样式</a>┆<a href="Label_Style_Class.asp" target="_self">创建样式分类</a> <a href="../../help?Label=MF_Label_Creat" target="_blank" style="cursor:help;"><img src="../Images/_help.gif" width="50" height="17" border="0"></a>┆<a href="javascript:history.back();">后退</a></div></td>
</tr>
<tr class="hback" >
<td valign="top" class="hback"><strong>分类:</strong> <a href="All_Label_style.asp?Label_Sub=NS" title="浏览 新闻系统 标签引用样式" target="_self">新闻系统</a><a href="All_Label_Style.asp?Action=Add&Label_Sub=NS&ClassID=<%= Request.QueryString("ClassId") %>" title="创建 新闻系统 标签引用样式" target="_self"><img src="../Images/addstyle.gif" border="0"></a> <a href="All_Label_style.asp?Label_Sub=DS" title="浏览 下载系统 标签引用样式" target="_self">下载系统</a><a href="All_Label_Style.asp?Action=Add&Label_Sub=DS&ClassID=<%= Request.QueryString("ClassId") %>" title="创建 下载系统 标签引用样式" target="_self"><img src="../Images/addstyle.gif" border="0"></a>
<%if Request.Cookies("FoosunSUBCookie")("FoosunSUBSD")=1 then%>
<a href="All_Label_style.asp?Label_Sub=SD" title="浏览 供求系统 标签引用样式" target="_self">供求系统</a><a href="All_Label_Style.asp?Action=Add&Label_Sub=SD&ClassID=<%= Request.QueryString("ClassId") %>" title="创建 供求系统 标签引用样式" target="_self"><img src="../Images/addstyle.gif" border="0"></a>
<%end if%>
<%if Request.Cookies("FoosunSUBCookie")("FoosunSUBHS")=1 then%>
<a href="All_Label_style.asp?Label_Sub=HS" title="浏览 房产楼盘 标签引用样式" target="_self">房产楼盘</a><a href="All_Label_Style.asp?Action=Add&Label_Sub=HS&ClassID=<%= Request.QueryString("ClassId") %>" title="创建 房产楼盘 标签引用样式" target="_self"><img src="../Images/addstyle.gif" border="0"></a>
<%end if%>
<%if Request.Cookies("FoosunSUBCookie")("FoosunSUBAP")=1 then%>
<a href="All_Label_style.asp?Label_Sub=AP" title="浏览 招聘求职 标签引用样式" target="_self">招聘求职</a><a href="All_Label_Style.asp?Action=Add&Label_Sub=AP&ClassID=<%= Request.QueryString("ClassId") %>" title="创建 招聘求职 标签引用样式" target="_self"><img src="../Images/addstyle.gif" border="0"></a>
<%End if%>
<%if Request.Cookies("FoosunSUBCookie")("FoosunSUBMS")=1 then%>
<a href="All_Label_style.asp?Label_Sub=MS" title="浏览 商城B2C 标签引用样式" target="_self">商城B2C</a><a href="All_Label_Style.asp?Action=Add&Label_Sub=MS&ClassID=<%= Request.QueryString("ClassId") %>" title="创建 商城B2C 标签引用样式" target="_self"><img src="../Images/addstyle.gif" border="0"></a>
<%end if%>
<a href="All_Label_style.asp?Label_Sub=ME" title="浏览 会员系统 标签引用样式" target="_self">会员系统</a><a href="All_Label_Style.asp?Action=Add&Label_Sub=ME&ClassID=<%= Request.QueryString("ClassId") %>" title="创建 会员系统 标签引用样式" target="_self"><img src="../Images/addstyle.gif" border="0"></a>
<a href="All_Label_style.asp?Label_Sub=Login" title="浏览 会员登陆 标签引用样式" target="_self">会员登陆</a><a href="All_Label_Style.asp?Action=Add&Label_Sub=Login&ClassID=<%= Request.QueryString("ClassId") %>" title="创建 会员登陆 标签引用样式" target="_self"><img src="../Images/addstyle.gif" border="0"></a>
</td>
</tr>
</table>
<!------2/1 by chen 控制所建立的样式的分类文件夹 并读取建立的样式------------------------------------>
<table width="98%" border="0" align="center" cellpadding="3" cellspacing="1" class="table">
<tr>
<td width="8%" class="xingmu"><div align="center">样式ID号</div></td>
<td width="32%" class="xingmu"><div align="center">样式名称</div></td>
<td width="25%" class="xingmu"><div align="center">引用查看</div></td>
<td width="14%" class="xingmu"><div align="center">所属系统</div></td>
<td width="21%" class="xingmu"><div align="center">描述/操作</div></td>
</tr>
<%
dim rs_class,str_ParentID
if trim(Request.QueryString("ClassID"))<>"" then
str_ParentID = " and ParentID="&Request.QueryString("ClassID")&""
elseif not isnumeric(trim(Request.QueryString("ClassID"))) then
str_ParentID = " and ParentID=0"
else
str_ParentID = " and ParentID=0"
end if
set rs_class=Conn.execute("select id,ClassName,ClassContent,ParentID From FS_MF_StyleClass where 1=1"&str_ParentID&" order by id desc")
do while not rs_class.eof
%>
<tr class="hback">
<td valign="top"><div align="center"><img src="../Images/Folder/folder.gif" alt="文件夹" width="20" height="16"></div></td>
<td><a href="All_Label_Style.asp?ClassId=<% = rs_class("id")%>&ParentID=<%=rs_class("id")%>">
<% = rs_class("ClassName")%>
</a></td>
<td><% = rs_class("ClassContent")%></td>
<td></td>
<td></td>
</tr>
<%
rs_class.movenext
loop
rs_class.close:set rs_class = nothing
%>
<tr class="hback_1">
<td colspan="7" height="2"></td>
</tr>
<%
dim rs_stock,ClassId,LableClassID1
if Request.QueryString("ClassId")<>"" then
LableClassID1 = NoSqlHack(Request.QueryString("ClassID"))
Else
LableClassID1=0
End if
ClassId = " and LableClassID="&LableClassID1&""
set rs_stock= Server.CreateObject(G_FS_RS)
rs_stock.open "select ID,StyleName,Content,LableClassID From FS_MF_Labestyle Where ID > 0" & ClassId &" order by ID desc",Conn,1,1
if rs_stock.eof then
rs_stock.close
set rs_stock=nothing
Response.Write"<TR class=""hback""><TD colspan=""7"" class=""hback"" height=""40"">没有记录。</TD></TR>"
end if
%>
<!---------2/2 by chen------------------------------------------------------------------------------------------>
<%
Select Case Request.QueryString("Action")
Case "Add"
Call Add()
Case "Add_Save"
Call Add_Save()
Case else
Call Main()
End Select
Sub Main()
%>
<%
dim tmp_Label_Sub,LableClassID
Set obj_Label_Rs = server.CreateObject(G_FS_RS)
if trim(Label_Sub) <>"" then:tmp_Label_Sub = "and StyleType='"& Label_Sub &"'":else:tmp_Label_Sub = "":end if
if Request.QueryString("ClassId")<>"" then
LableClassID = " and LableClassID = " & NoSqlHack(Request.QueryString("ClassID"))
Else
LableClassID= " and (LableClassID < 1 Or LableClassID is Null)"
End if
SQL = "Select ID,StyleName,LoopContent,Content,AddDate,StyleType,LableClassID from FS_MF_Labestyle where id>0 "& tmp_Label_Sub & LableClassID & " Order by id desc"
obj_Label_Rs.Open SQL,Conn,1,3
If not obj_Label_Rs.Eof Then
obj_Label_Rs.PageSize=int_RPP
cPageNo=NoSqlHack(Request.QueryString("page"))
If cPageNo="" Then cPageNo = 1
If not isnumeric(cPageNo) Then cPageNo = 1
cPageNo = Clng(cPageNo)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -