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

📄 admin_js.asp

📁 淘客网上商店网站程序 淘客网上商店网站程序 淘客网上商店网站程序
💻 ASP
📖 第 1 页 / 共 3 页
字号:
<!--#include file="Inc/Const.asp"-->
<!--#include file="../Inc/Cl_Function_Article.asp"-->
<!--#include file="../Inc/Cl_Function_Soft.asp"-->
<!--#include file="../Inc/Cl_Function_Photo.asp"-->
<!--#include file="../Inc/Cl_Function_Movie.asp"-->
<!--#include file="../Inc/Cl_Function_Product.asp"-->
<!--#include file="../Inc/Cl_GetJsContent.asp"-->
<%
If Not Cl.TrueOtherPurview("Js") Then
	Cl.ShowErr("<br /><li>您无此操作权限!</li>")
End If
Const PageSize=20
Dim Action,ClassID,SpecialID
Dim CurrentPath,TempData,rsInfo
Action = Trim(request("Action"))
CurrentPage = Cl.GetClng(request("page"))

Header
%>
<table width="100%" border="0" align="center" cellpadding="2" cellspacing="1" class="border">
  <tr class="title"> 
	<td height="22" colspan="2" align="center"><strong>JS 调 用 管 理</strong></td>
  </tr>
  <tr class="tdbg"> 
	<td width="70" height="30"><strong>管理导航:</strong></td>
	<td height="30"><a href="Admin_Js.asp">管理首页</a> 
	  | <a href="Admin_Js.asp?Action=AddJs&JsType=0">添加JS[<font color="#0000ff">代码</font>]</a> 
	  | <a href="Admin_Js.asp?Action=AddJs&JsType=1">添加JS[<font color="#ff0033">配置</font>]</a>
	  | <a href="Admin_Js.asp?Action=AddJsSort">添加JS分类</a>
	  | <a href="Admin_Js.asp?Action=JsSort">JS分类管理</a>
	  </td>
  </tr>
  <tr class="tdbg"> 
	<td width="70" height="30"><strong>分类导航:</strong></td>
	<td height="30"><a href="Admin_Js.asp?SortID=-1">未分类</a><%
	Set Rs = Cl.Execute("Select SortID,SortName From Cl_JsSort order by SortID desc")
	Do While Not Rs.Eof
		Response.write(" | <a href=""Admin_Js.asp?SortID="&Rs("SortID")&""">"&Rs("SortName")&"</a>")
		Rs.MoveNext
	Loop
	Rs.Close : Set Rs = Nothing
	%></td>
  </tr>
</table>
<br />
<%
Select Case Action
Case "AddJs","ModifyJs"
	Call EditJS()
Case "SaveAddJs","SaveModifyJs"
	Call SaveJs()
Case "Del"
	Call DelJs()
Case "AddJsSort","ModifyJsSort"
	Call EditJsSort()
Case "SaveAddJsSort","SaveModifyJsSort"
	Call SaveJsSort()
Case "JsSort"
	Call JsSortMain()
Case "DelJsSort"
	Call DelJsSort()
Case "Refresh"
	Call Refresh()
Case Else
	Call JsMain()
End Select
Footer

Sub ShowStyleCode()
%>
	<div id="ShowType_0" style="display:none">
		&lt;td width=&quot;*&quot;&gt;{$PropertyImg} &lt;span style=&quot;color:blue;&quot;&gt;{$Prefixion}&lt;/span&gt; &lt;a href=&quot;{$LinkUrl}&quot; target=&quot;_blank&quot;&gt;{$Title(20)}&lt;/a&gt;&lt;/td&gt;<br>
		&lt;td&gt;&amp;nbsp;&lt;/td&gt;
	</div>
	<div id="ShowType_1" style="display:none">
		&lt;td width=&quot;*&quot;&gt; &lt;a href=&quot;{$LinkUrl}&quot; target=&quot;_blank&quot;&gt;{$Title(30)}&lt;br /&gt;{$Intro(200)}……&lt;/a&gt;&lt;/td&gt;
</div>
	<div id="ShowType_2" style="display:none">
		&lt;td width=&quot;*&quot;&gt; &lt;a href=&quot;{$LinkUrl}&quot; target=&quot;_blank&quot;&gt;{$ShowPic(120,120)}&lt;/a&gt;&lt;/td&gt;<br>
		&lt;td&gt;&amp;nbsp;&lt;/td&gt;
</div>
	<div id="ShowType_3" Style="display:none">
		&lt;td width=&quot;*&quot;&gt; &lt;a href=&quot;{$LinkUrl}&quot; target=&quot;_blank&quot;&gt;{$ShowPic(120,120)}&lt;br /&gt;{$Title(30)}&lt;/a&gt;&lt;td&gt;
	</div>
	<div id="ShowType_4" Style="display:none">
		&lt;td width=&quot;*&quot;&gt; &lt;a href=&quot;{$LinkUrl}&quot; target=&quot;_blank&quot;&gt;{$ShowPic(120,120)}&lt;br /&gt;{$Title(30)}&lt;/a&gt;&lt;td&gt;<br>
		&lt;td&gt;{$Intro(200)}……&lt;/td&gt;
	</div>
<script type="text/javascript">
function ShowTypeSel(Val)
{
	var obj=document.getElementById("ShowType_" + Val);
	if (obj)document.getElementById("Style2").value = obj.innerText;
}
</script>
<%
End Sub

Sub EditJs()
	Dim JsID,JsName,JsReadme,JsType,JsFileName,Config,SortID,IsDynamic,RefreshTimes

	Dim ClassID,IncludeChild,SpecialID,TopNum,ShowType,ColsNum
	Dim IsHot,IsElite,DateNum,OrderType
	Dim Style1,Style2,Style3,Style4

	If Action="ModifyJs" Then
		JsID = Cl.GetClng(Request("JsID"))
		If JsID<=0 Then Cl.ShowErr("请指定要修改的分类ID")
		Dim Rs
		Set Rs = Cl.Execute("Select * From Cl_Js Where ID="&JsID)
		If Rs.Eof Then Cl.ShowErr("请指定要修改的分类ID")
		ChannelID	= Rs("ChannelID")
		JsName		= Rs("JsName")
		JsReadme	= Rs("JsReadme")
		JsType		= Rs("JsType")
		JsFileName	= Rs("JsFileName")
		Config		= Rs("Config")
		SortID		= Rs("SortID")
		ModuleID	= Rs("ModuleID")
		IsDynamic	= Rs("IsDynamic")
		RefreshTimes= Rs("RefreshTimes")
		Rs.Close : Set Rs = Nothing
	Else
		JsType		= Cl.GetClng(Request("JsType"))
		SortID		= 0
		IsDynamic	= 1
		RefreshTimes= 3600
		If JsType=1 Then 
		Config		= "0||0||0||10||1||1||1||False||False||100||1@@&lt;table width=&quot;100%&quot; align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot;&gt;&lt;tr&gt;||&lt;td width=&quot;*&quot;&gt;{$PropertyImg} &lt;span style=&quot;color:blue;&quot;&gt;{$Prefixion}&lt;/span&gt; &lt;a href=&quot;{$LinkUrl}&quot; target=&quot;_blank&quot;&gt;{$Title(20)}&lt;/a&gt;&lt;/td&gt;"&VbCrlf&"&lt;td&gt;&amp;nbsp;&lt;/td&gt;||&lt;/tr&gt;&lt;tr align=&quot;left&quot;&gt;||&lt;/tr&gt;&lt;/table&gt;"
		'ChannelID & "||" & ClassID & "||" & SpecialID & "||" & TopNum
		'"||" & IncludeChild & "||" & ShowType & "||" & ColsNum
		'"||" & IsHot & "||" & IsElite & "||" & DateNum & "||" & OrderType
		'"@@" & Style1 & "||" & Style2 & "||" & Style3 & "||" & Style4
		End if
	End If
if JsType<>0 Then Call ShowStyleCode()
%>
<script type="text/javascript">
function CheckJs()
{
	if (document.myform.JsName.value=="")
	{
		alert("请输入JS名称!");
		document.myform.JsName.focus();
		return false;
	}
	if (document.myform.IsDynamic.checked==true)
	{
		if (document.myform.RefreshTimes.value=="")
		{
		alert("请输入JS刷新间隔时间!");
		document.myform.RefreshTimes.focus();
		return false;
		}
	}
	else
	{
		if (document.myform.JsFileName.value=="")
		{
		alert("请输入要生成的JS文件名!");
		document.myform.JsFileName.focus();
		return false;
		}
	}
	if (JsType==1)
	{
		if (document.myform.ModuleID.value=="0")
		{
		alert("请选择模块!");
		document.myform.ModuleID.focus();
		return false;
		}
	}
}
</script>
<table width="100%" border="0" align="center" cellpadding="2" cellspacing="1" class="border">
	<form action="Admin_Js.asp?Action=Save<%=Action%>" method="post" name="myform" id="myform" onsubmit="return CheckJs()">
	<tr class="title"> 
		<td height="22" colspan="2" align="center"><strong>JS属性编辑窗口</strong></td>
	</tr>
	<tr class="tdbg">
		<td height="25" align="right" width="15%"><strong>JS分类:</strong></td>
		<td height="25" width="85%"><select name="SortID" id="SortID">
		<option value="0">不指定分类</option>
		<%
		Dim RsSort
		Set RsSort = Cl.Execute("Select SortID,SortName From Cl_JsSort order by SortID desc")
		Do While Not RsSort.Eof
		Response.write("<option value="""&RsSort(0)&""">"&RsSort(1)&"</option>")
		RsSort.MoveNext
		Loop
		RsSort.Close : Set RsSort = Nothing
		%>
		</select></td>
	</tr>
	<tr class="tdbg">
		<td height="25" align="right"><strong>JS名称:</strong></td>
		<td height="25"><input name="JsName" type="text" id="JsName" size="49" maxlength="50" value="<%=JsName%>" />
		<font color="#FF0000">*</font></td>
	</tr>
	<tr class="tdbg">
		<td height="25" align="right"><strong>JS说明:</strong></td>
		<td height="25"><textarea name="JsReadme" cols="49" rows="3" id="JsReadme"><%=JsReadme%></textarea></td>
	</tr>
	<tr class="tdbg">
		<td height="25" align="right"><strong>动态JS:</strong></td>
		<td height="25"><input name="IsDynamic" type="checkbox" value="1" onclick="CheckDynamic();" checked="checked" /> 
		&nbsp;&nbsp;
		<span id="RefreshTimes" style="position:absolute;visibility:hidden;"><strong>刷新时间:</strong><input name="RefreshTimes" type="text" value="<%=RefreshTimes%>" size="10" maxlength="8" /> 秒<font color="#FF0000">*</font></span>
		<span id="JsFileName" style="position:absolute;visibility:hidden;"><strong>生成文件名:</strong><input name="JsFileName" type="text" value="<%=JsFileName%>" size="25" maxlength="50" /> <font color="#FF0000">*</font>(<font color="#0000ff">不用扩展名</font>)</span>
		</td>
	</tr>
	<tr class="title"> 
		<td height="22" colspan="2" align="center"><strong>参数配置</strong></td>
	</tr>
	<% If JsType=1 Then
		On Error Resume Next 
		Config		= Split(Config,"@@")
		Config(0)	= Split(Config(0),"||")
		Config(1)	= Split(Config(1),"||")
		ClassID		= Config(0)(1)
		SpecialID	= Config(0)(2)
		TopNum		= Config(0)(3)
		IncludeChild= Config(0)(4)
		ShowType	= Config(0)(5)
		ColsNum		= Config(0)(6)
		IsHot		= Config(0)(7)
		IsElite		= Config(0)(8)
		DateNum		= Config(0)(9)
		OrderType	= Config(0)(10)
		Style1		= Config(1)(0)
		Style2		= Config(1)(1)
		Style3		= Config(1)(2)
		Style4		= Config(1)(3)
		Config		= null
	%>
	<tr class="tdbg"> 
		<td height="25" align="right">所属模块:</td>
		<td height="25"><select name="ModuleID" id="ModuleID" onChange="ChangeModuleSelect(this.options[this.selectedIndex].value);">
		<option value="0">请选择模块</option>
		<option value="1">文章模块</option>
		<option value="2">软件模块</option>
		<option value="3">图片模块</option>
		<option value="4">影视模块</option>
		<option value="5">商城模块</option>
		<option value="6">供求模块</option>
		</select> <font color="#FF0000">*</font></td>
	</tr>
	<script type="text/javascript" src="inc/AjaxModule.js"></script>
	<tr class="tdbg"> 
		<td height="25" align="right">所属频道:</td>
		<td height="25"><select name="ChannelID" id="ChannelID" onChange="ChangeChannelSelect(this.options[this.selectedIndex].value);"><option value="0">不指定频道</option></select></td>
	</tr>
	<tr class="tdbg"> 
		<td height="25" align="right">所属栏目:</td>
		<td height="25"><span id="ClassSelect"><select name="ClassID" id="ClassID">
			<option value="0">不指定栏目</option>
			</select></span> <input name="IncludeChild" type="checkbox" id="IncludeChild" value="True" <%If IncludeChild="True" Then %>checked="checked"<%End if%> /> 包含子栏目</td>
	</tr>
	<tr class="tdbg">
		<td height="25" align="right">所属专题:</td>
		<td height="25"><span id="SpecialSelect"><select name="SpecialID" id="SpecialID">
		<option value="0">不指定专题</option>
		</select></span>
		</td>
	</tr>
	<tr class="tdbg"> 
		<td height="25" align="right">显示数目:</td>
		<td height="25"><input name="TopNum" type="text" value="10" size="5" maxlength="3" value="<%=TopNum%>" /> 
		&nbsp;&nbsp;&nbsp;&nbsp;<font color="#FF0000">请输入要显示的记录数</font></td>
	</tr>
	<tr class="tdbg"> 
		<td height="25" align="right">显示类型:</td>
		<td height="25"><select name="ShowType" id="ShowType"  onchange="ShowTypeSel(this.selectedIndex)">
			<option value="0" selected="selected">标题</option>
			<option value="1">标题+内容</option>
			<option value="2">图片</option>
			<option value="3">图片+标题</option>
			<option value="4">图片+标题+内容</option>
			</select> &nbsp;&nbsp;&nbsp;&nbsp;分栏: 

⌨️ 快捷键说明

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