|
| 管理员登陆 |
 |
<% dim i
'新闻类别
sql = "SELECT * FROM category"
rs.open sql, conn, 1, 1
if err.number <> 0 then
response.write "数据库出错"
else
if rs.bof and rs.eof then
rs.close
response.write "没有类别"
else
do while not rs.eof
if(cstr(rs("id"))="1") then
titlepic="bgl"
elseif(cstr(rs("id"))="2") then
titlepic="xsdt"
elseif(cstr(rs("id"))="3") then
titlepic="xshy"
else
titlepic=""
end if
response.write ""
response.write " + ".gif) | "
response.write "| "
'本类别新闻标题
sql1 = "SELECT id,title,addtime FROM news WHERE cateid=" + cstr(rs("id")) + " ORDER BY addtime DESC"
rs1.open sql1, conn, 1, 1
if err.number <> 0 then
response.write "数据库出错"
else
if rs1.bof and rs1.eof then
rs1.close
response.write "没有新闻"
else
' response.write ""
end if
end if
response.write " "
response.write "More... "
response.write " |
| "
rs.movenext
loop
rs.close
end if
end if
%>
|
|