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

📄 admin_classify.asp

📁 小游戏网站演示www.4399.io 拥有4万条游戏数据
💻 ASP
📖 第 1 页 / 共 5 页
字号:
		<td class="TableRow2"><strong><%=sModuleName%>分类注释:</strong></td>
		<td class="TableRow1">
		<input type="text" name="Readme" size="60"> </td>
	</tr>
	<tr>
		<td class="TableRow2"><strong>所属分类:</strong></td>
		<td class="TableRow1">
<%
	Response.Write " <select name=""class"">"
	Response.Write "<option value=""0"">做为一级分类</option>"
	SQL = "SELECT classid,depth,ClassName FROM NC_Classify WHERE ChannelID = "& ChannelID &" ORDER BY rootid,orders"
	Set Rs = Newasp.Execute(SQL)
	Do While Not Rs.EOF
		Response.Write "<option value=""" & Rs("classid") & """ "
		If Request("editid") <> "" And CLng(Request("editid")) = Rs("classid") Then Response.Write "selected"
		Response.Write ">"
		If Rs("depth") = 1 Then Response.Write "&nbsp;&nbsp;├ "
		If Rs("depth") > 1 Then
			For i = 2 To Rs("depth")
				Response.Write "&nbsp;&nbsp;│"
			Next
			Response.Write "&nbsp;&nbsp;├ "
		End If
		Response.Write Rs("ClassName") & "</option>" & vbCrLf
		Rs.movenext
	Loop
	Rs.Close
	Response.Write "</select>"
	Set Rs = Nothing
%>
		</td>
	</tr>
	<tr>
		<td class="TableRow2"><strong>连接目标:</strong></td>
		<td class="TableRow1">
		<input type="radio" value="0" checked name="LinkTarget"> 本窗口打开&nbsp;&nbsp; 
		<input type="radio" name="LinkTarget" value="1"> 新窗口打开</td>
	</tr>
	<tr>
		<td class="TableRow2"><strong>是否转向连接:</strong></td>
		<td class="TableRow1">
		<input type="radio" name="TurnLink" value="0" checked  onClick="ClassSetting(1)"> 否&nbsp;&nbsp; 
		<input type="radio" name="TurnLink" value="1"  onClick="ClassSetting(2)"> 是</td>
	</tr>
	<tr>
		<td class="TableRow2"><strong>分类目录:</strong></td>
		<td class="TableRow1"><input type="text" name="ClassDir" size="15" value="sort0<%=NewClassID%>"> <br><font color=blue>一级分类相对于此频道目录,N级分类相对于上级分类目录,可以是多级目录,如:html/asp请认真填写。</font></td>
	</tr>
	<tr id=ClassSetting1 style="display:none">
		<td class="TableRow2"><strong>转向连接URL:</strong></td>
		<td class="TableRow1"><input type="text" name="TurnLinkUrl" size="45" value="<%=Newasp.SiteUrl%>"></td>
	</tr>
	<tr id=ClassSetting2 style="display:">
		<td class="TableRow2"><strong>用户组:</strong></td>
		<td class="TableRow1"><select size="1" name="UserGroup">
<%
	Set Rs = Newasp.Execute("SELECT GroupName,Grades FROM NC_UserGroup ORDER BY Groupid")
	Do While Not Rs.EOF
		Response.Write Chr(9) & Chr(9) & "<option value=""" & Rs("Grades") & """"
		If Rs("Grades") = 0 Then Response.Write " selected"
		Response.Write ">"
		Response.Write Rs("GroupName")
		Response.Write "</option>" & vbCrLf
		Rs.movenext
	Loop
	Set Rs = Nothing
%>		</select></td>
	</tr>
	<tr id=ClassSetting3 style="display:">
		<td class="TableRow2"><strong>使用模板:</strong></td>
		<td class="TableRow1"><select size="1" name="skinid">
<%
	Response.Write "		<option value=""0"" selected>使用默认模板</option>" & vbCrLf
	SQL = "SELECT skinid,page_name,isDefault FROM NC_Template WHERE pageid = 0 ORDER BY TemplateID"
	Set Rs = Newasp.Execute(SQL)
	If Rs.bof And Rs.EOF Then
		Response.Write "		<option value=""0"">您还没有添加任何模板文件</option>" & vbCrLf
	Else
		Do While Not Rs.EOF
			Response.Write "		<option value=""" & Rs("skinid") & """"
			'If Rs("isDefault") = 1 Then Response.Write " selected"
			Response.Write ">"
			Response.Write Rs("page_name")
			Response.Write "</option>" & vbCrLf
			Rs.movenext
		Loop
	End IF
	Set Rs = Nothing
%>		</select></td>
	</tr>
	<tr>
		<td class="TableRow2"> </td>
		<td class="TableRow1">
		<p align="center"><input type="button" onclick="javascript:history.go(-1)" value="返回上一页" name="B1" class=Button>&nbsp;&nbsp;
		<input type="submit" value="保存设置" name="B2" class=Button></td>
	</tr>
	</form>
</table>
<%
End Sub

Sub ClassEdit()
	Set Rs = Newasp.Execute("SELECT * FROM NC_Classify WHERE ChannelID = " & ChannelID & " And ClassID = " & Request("editid"))
	If Rs.bof And Rs.EOF Then
		FoundErr = True
		ErrMsg = "数据库出现错误,没有此站点栏目!"
		Rs.Close
		Set Rs = Nothing
		Exit Sub
	End If
%>
<table border="0" align="center" cellpadding="3" cellspacing="1" class="TableBorder">
	<tr>
		<th colspan="2">添加<%=sModuleName%>分类</th>
	</tr>
	<form name=myform method="POST" action="?action=savedit">
	<input type="hidden" name="editid" value="<%=Request("editid")%>">
	<input type="hidden" name="ChannelID" value="<%=ChannelID%>">
	<tr>
		<td width="20%" class="TableRow2"><strong><%=sModuleName%>分类名称:</strong></td>
		<td width="80%" class="TableRow1">
		<input type="text" name="ClassName" id="ClassName" size="35" value="<%=Rs("ClassName")%>">
		</td>
	</tr>
	<tr>
		<td class="TableRow2"><strong><%=sModuleName%>分类标题模式:</strong></td>
		<td class="TableRow1">颜色:
		<select size="1" name="ColorModes">
		<option value="0"<%If Rs("ColorModes") = 0 Then Response.Write (" selected")%>>请选择颜色</option>
<%
	TitleColor = "," & Newasp.InitTitleColor
	TitleColor = Split(TitleColor, ",")
	For i = 1 To UBound(TitleColor)
		Response.Write ("<option style=""background-color:"& TitleColor(i) &";color: "& TitleColor(i) &""" value='"& i &"'")
		If Rs("ColorModes") = i Then Response.Write (" selected")
		Response.Write (">"& TitleColor(i) &"</option>")
	Next
%>
		</select> 字体:
		<select size="1" name="FontModes">
		<option value="0"<%If Rs("FontModes") = 0 Then Response.Write (" selected")%>>请选择字体</option>
		<option value="1"<%If Rs("FontModes") = 1 Then Response.Write (" selected")%>>粗体</option>
		<option value="2"<%If Rs("FontModes") = 2 Then Response.Write (" selected")%>>斜体</option>
		<option value="3"<%If Rs("FontModes") = 3 Then Response.Write (" selected")%>>下划线</option>
		<option value="4"<%If Rs("FontModes") = 4 Then Response.Write (" selected")%>>粗体+斜体</option>
		<option value="5"<%If Rs("FontModes") = 5 Then Response.Write (" selected")%>>粗体+下划线</option>
		<option value="6"<%If Rs("FontModes") = 6 Then Response.Write (" selected")%>>斜体+下划线</option>
		
		</select></td>
	</tr>
	<tr>
		<td class="TableRow2"><strong><%=sModuleName%>分类注释:</strong></td>
		<td class="TableRow1">
		<input type="text" name="Readme" size="60" value="<%=Rs("Readme")%>"> </td>
	</tr>
	<tr>
		<td class="TableRow2"><strong>所属分类:</strong></td>
		<td class="TableRow1">
<%
	Response.Write " <select name=""class"">"
	Response.Write "<option value=""0"">做为一级分类</option>"
	SQL = "SELECT classid,depth,ClassName FROM NC_Classify WHERE ChannelID = "& ChannelID &" ORDER BY rootid,orders"
	Set RsObj = Newasp.Execute(SQL)
	Do While Not RsObj.EOF
		Response.Write "<option value=""" & RsObj("classid") & """ "
		If CLng(Rs("parentid")) = RsObj("classid") Then Response.Write "selected"
		Response.Write ">"
		If RsObj("depth") = 1 Then Response.Write "&nbsp;&nbsp;├ "
		If RsObj("depth") > 1 Then
			For i = 2 To RsObj("depth")
				Response.Write "&nbsp;&nbsp;│"
			Next
			Response.Write "&nbsp;&nbsp;├ "
		End If
		Response.Write RsObj("ClassName") & "</option>" & vbCrLf
		RsObj.movenext
	Loop
	RsObj.Close
	Response.Write "</select>"
	Set RsObj = Nothing
%>
		</td>
	</tr>
	<tr>
		<td class="TableRow2"><strong>连接目标:</strong></td>
		<td class="TableRow1">
		<input type="radio" value="0" name="LinkTarget"<%If Rs("LinkTarget") = 0 Then Response.Write " checked"%>> 本窗口打开&nbsp;&nbsp; 
		<input type="radio" name="LinkTarget" value="1"<%If Rs("LinkTarget") = 1 Then Response.Write " checked"%>> 新窗口打开</td>
	</tr>
	<tr>
		<td class="TableRow2"><strong>是否转向连接:</strong></td>
		<td class="TableRow1">
		<input type="radio" name="TurnLink" value="0" onClick="ClassSetting(1)"<%If Rs("TurnLink") = 0 Then Response.Write " checked"%>> 否&nbsp;&nbsp; 
		<input type="radio" name="TurnLink" value="1" onClick="ClassSetting(2)"<%If Rs("TurnLink") = 1 Then Response.Write " checked"%>> 是</td>
	</tr>
	<tr>
		<td class="TableRow2"><strong>分类目录:</strong></td>
		<td class="TableRow1"><input type="text" name="ClassDir" size="15" value="<%=Rs("ClassDir")%>"> <font color=red>相对于此频道目录,请不要随意修改,一但修改需要生成所有的HTML文件;谨用!</font></td>
	</tr>
	<tr id=ClassSetting1<%If Rs("TurnLink") = 0 Then Response.Write " style=""display:none"""%>>
		<td class="TableRow2"><strong>转向连接URL:</strong></td>
		<td class="TableRow1"><input type="text" name="TurnLinkUrl" size="45" value="<%=Rs("TurnLinkUrl")%>"></td>
	</tr>
	<tr id=ClassSetting2<%If Rs("TurnLink") <> 0 Then Response.Write " style=""display:none"""%>>
		<td class="TableRow2"><strong>用户组:</strong></td>
		<td class="TableRow1"><select size="1" name="UserGroup">
<%
	Set RsObj = Newasp.Execute("SELECT GroupName,Grades FROm NC_UserGroup ORDER BY Groupid")
	Do While Not RsObj.EOF
		Response.Write Chr(9) & Chr(9) & "<option value=""" & RsObj("Grades") & """"
		If Rs("UserGroup") = RsObj("Grades") Then Response.Write " selected"
		Response.Write ">"
		Response.Write RsObj("GroupName")
		Response.Write "</option>" & vbCrLf
		RsObj.movenext
	Loop
	Set RsObj = Nothing
%>		</select></td>
	</tr>
	<tr id=ClassSetting3<%If Rs("TurnLink") <> 0 Then Response.Write " style=""display:none"""%>>
		<td class="TableRow2"><strong>使用模板:</strong></td>
		<td class="TableRow1"><select size="1" name="skinid">
<%
	Response.Write "		<option value=""0"""
	If Rs("skinid") = 0 Then Response.Write " selected"
	Response.Write ">使用默认模板</option>" & vbCrLf
	SQL = "SELECT skinid,page_name,isDefault FROM NC_Template WHERE pageid = 0 ORDER BY TemplateID"
	Set RsObj = Newasp.Execute(SQL)
	If RsObj.bof And RsObj.EOF Then
		Response.Write "		<option value=""0"">您还没有添加任何模板文件</option>" & vbCrLf
	Else
		Do While Not RsObj.EOF
			Response.Write "		<option value=""" & RsObj("skinid") & """"
			If Rs("skinid") = RsObj("skinid") Then Response.Write " selected"
			Response.Write ">"
			Response.Write RsObj("page_name")
			Response.Write "</option>" & vbCrLf
			RsObj.movenext
		Loop
	End IF
	Set RsObj = Nothing
%>		</select></td>
	</tr>
	<tr>
		<td class="TableRow2"> </td>
		<td class="TableRow1">
		<p align="center"><input type="button" onclick="javascript:history.go(-1)" value="返回上一页" name="B1" class=Button>&nbsp;&nbsp;
		<input type="submit" value="保存设置" name="B2" class=Button></td>
	</tr>
	</form>
</table>
<%
Set Rs = Nothing
End Sub

Sub CheckSave()
	If Trim(Request("classname")) = "" Then
		ErrMsg = ErrMsg + "<li>请输入分类名称。</li>"
		Founderr = True
	End If
	If Not IsNumeric(Request("class")) Then
		ErrMsg = ErrMsg + "<li>请选择所属分类。</li>"
		Founderr = True
	End If
	If Trim(Request("Readme")) = "" Then
		ErrMsg = ErrMsg + "<li>请输入分类说明。</li>"
		Founderr = True
	End If
	If Trim(Request.Form("TurnLink")) = "" Then
		ErrMsg = ErrMsg + "<li>转向连接的URL不能为空。</li>"
		Founderr = True
	End If
	If Trim(Request.Form("LinkTarget")) = "" Then
		ErrMsg = ErrMsg + "<li>请选择连接目标。</li>"
		Founderr = True
	End If
	If Trim(Request.Form("ColorModes")) = "" Then
		ErrMsg = ErrMsg + "<li>请选择标题颜色。</li>"
		Founderr = True
	End If
	If Trim(Request.Form("FontModes")) = "" Then
		ErrMsg = ErrMsg + "<li>请选择标题字体。</li>"
		Founderr = True
	End If
	If CInt(Request.Form("TurnLink")) = 1 Then
		If Request("TurnLinkUrl") = "" Then
			ErrMsg = ErrMsg + "<li>转向连接的URL不能为空。</li>"
			Founderr = True
		End If
	Else
		If Request("UserGroup") = "" Then
			ErrMsg = ErrMsg + "<li>请选择用户组。</li>"
			Founderr = True
		End If
		If Request("skinid") = "" Then

⌨️ 快捷键说明

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