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

📄 category.asp

📁 一个ASP网站博克程序
💻 ASP
字号:
<%

	Class Category
	
		'分类下拉菜单
		Public Sub CategorySelect(intCategory)
			Dim objDBMS
			Set objDBMS = New LarrixDBMS
			%><select name="category" size="1"><%
			If intCategory = 0 Then
				%><option value="0" selected>分类列表</option><%
			Else
				%><option value="0">分类列表</option><%
			End If
			objDBMS.Open "SELECT * FROM [Categories] ORDER BY [CategoryLAB]" , 1
			If Not (objDBMS.objRSET.BOF And objDBMS.objRSET.EOF) Then
				While Not objDBMS.objRSET.EOF
					If objDBMS.objRSET("CategoryID") = intCategory Then
						%><option value="<% = objDBMS.objRSET("CategoryID") %>" selected><% = objDBMS.objRSET("CategoryLAB") %></option><%
					Else
						%><option value="<% = objDBMS.objRSET("CategoryID") %>"><% = objDBMS.objRSET("CategoryLAB") %></option><%
					End If
					objDBMS.objRSET.MoveNext
				Wend
			End If
			objDBMS.Close
			%></select><%
			Set objDBMS = Nothing
		End Sub
		
		'分类管理菜单
		Public Sub CategoryExplor()
			Dim objDBMS
			Set objDBMS = New LarrixDBMS
			%><table width="580" cellpadding="0" cellspacing="0" border="0"><%
			%><form name="category" action="CategoryInsert.asp" method="post"><%
			%><tr align="left" valign="middle"><%
			%><td width="100%" class="ground">分类名称&nbsp; <input type="text" name="label" size="15" maxlength="50">&nbsp; 分类说明&nbsp; <input type="text" name="value" size="15" maxlength="50">&nbsp; <input type="submit" value="新增分类" class="button"></td><%
			%></tr><%
			%></form><%
			%></table><%
			objDBMS.Open "SELECT * FROM [Categories] ORDER BY [CategoryLAB]", 1
			If Not (objDBMS.objRSET.BOF And objDBMS.objRSET.EOF) Then
				While Not objDBMS.objRSET.EOF
					%><table width="580" cellpadding="0" cellspacing="0" border="0"><%
					%><form name="category" action="CategoryModify.asp" method="post"><%
					%><input type="hidden" name="id" value="<% = objDBMS.objRSET("CategoryID") %>"><%
					%><tr align="left" valign="middle"><%
					%><td width="100%" class="ground">分类名称&nbsp; <input type="text" name="label" size="15" maxlength="50" value="<% = objDBMS.objRSET("CategoryLAB") %>">&nbsp; 分类说明&nbsp; <input type="text" name="value" size="15" maxlength="50" value="<% = objDBMS.objRSET("CategoryVAL") %>">&nbsp; <input type="submit" value="编辑分类" class="button">&nbsp; <input type="button" value="删除分类" class="button" onclick="location.assign('CategoryDelete.asp?id=<% = objDBMS.objRSET("CategoryID") %>');"></td><%
					%></tr><%
					%></form><%
					%></table><%
					objDBMS.objRSET.MoveNext
				Wend
			End If
			objDBMS.Close
			Set objDBMS = Nothing
		End Sub

	End Class

%>

⌨️ 快捷键说明

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