<!--#include file="../pub/checkuser.asp"-->
<!--#include file="../pub/conn.asp"-->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="../css/default.css" rel="stylesheet" type="text/css">
</head>
<body>
<%
set rs=server.CreateObject("ADODB.recordset")
rs.Open "select * from webdiy_mb ",conn,1,3
if rs.bof and rs.eof then
response.Write("没有模板")
else
'放表格的行头
%>
<table width="100%" border="0" cellspacing="2" cellpadding="0">
<%
For j = 1 to 4
if rs.EOF then Exit For
response.write("<tr>")
%>
<%For i=1 to 2
if rs.EOF then
Exit For
end if
%>
<td align="center"> <%=rs("mb_title")%> <a href="mblist.asp?id=<%=rs("id")%>"> </td>
<%
rs.movenext
Next
%>
<%
next
end if
%>
</tr>
</table>
</body>
</html>
<!--#include file="../pub/conn.asp"-->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="../css/default.css" rel="stylesheet" type="text/css">
</head>
<body>
<%
set rs=server.CreateObject("ADODB.recordset")
rs.Open "select * from webdiy_mb ",conn,1,3
if rs.bof and rs.eof then
response.Write("没有模板")
else
'放表格的行头
%>
<table width="100%" border="0" cellspacing="2" cellpadding="0">
<%
For j = 1 to 4
if rs.EOF then Exit For
response.write("<tr>")
%>
<%For i=1 to 2
if rs.EOF then
Exit For
end if
%>
<td align="center"> <%=rs("mb_title")%> <a href="mblist.asp?id=<%=rs("id")%>"> </td>
<%
rs.movenext
Next
%>
<%
next
end if
%>
</tr>
</table>
</body>
</html>
该博客展示了一个HTML页面代码,包含文件引用和表格展示。引用了ASP文件进行用户检查和连接数据库,通过CSS样式表设置页面样式,使用表格展示数据库中模板信息,若数据库无模板则提示‘没有模板’。

被折叠的 条评论
为什么被折叠?



