📄 miscell_preview.asp
字号:
<%@ Language=VBScript%>
<%
Response.Buffer=true
Response.Expires=0
%>
<!-- #include file="../dsn.asp" -->
<%
keyno=Request.QueryString("keyno")
set cn = Server.CreateObject("ADODB.Connection")
cn.Open(mycnstr)
set rs = Server.CreateObject("ADODB.Recordset")
set rs2 = Server.CreateObject("ADODB.Recordset")
if keyno="" then Response.End
sqltext="select * from miscell where state='1' and keyno="&keyno
rs.Open sqltext,cn,0,1,1
if not rs.EOF then
title=trim(rs("title"))
content=trim(rs("content"))
classcode=rs("classcode")
picflag=rs("picflag")
'picfile=rs("picfile")
picflag2=rs("picflag2")
'picfile2=rs("picfile2")
flag=rs("flag")
baseclass=rs("baseclass")
else
Response.End
end if
rs.Close
%>
<html>
<head>
<title>预览</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<style type="text/css">
<!--
body {font-size: 12px; color: #000000; font-family: 宋体}
td {font-size: 12px; color: #000000; font-family: 宋体;}
.t1 {font:12px 宋体;color=000000}
.t2 {font:12px 宋体;color:ffffff}
.bt1 {font:14px 宋体;color=000000}
.bt2 {font:14px 宋体;color:ffffff}
A:link {color: #000066}
A:visited {color: #000066}
A:hover {color: #ff0000}
A.r1:link {font-size:12px;text-decoration:underline;color:#000000;}
A.r1:visited {font-size:12px;text-decoration:underline;color:#000000;}
A.r1:hover {font-size:12px;text-decoration:underline;color:#ff6600;}
A.r2:link {font-size:12px;text-decoration:underline;color:#ffffff;}
A.r2:visited {font-size:12px;text-decoration:underline;color:#ffffff;}
A.r2:hover {font-size:12px;text-decoration:underline;color:#ff6600;}
-->
</style>
</head>
<body bgcolor="#ffffff" text="#000000" leftmargin="0" topmargin="0">
<table width="500" border="0" cellspacing="0" cellpadding="0" align="center">
<tr>
<td>
<table width="96%" border="0" cellspacing="0" cellpadding="0" align="center">
<tr><td height=10></td></tr>
<tr>
<td height="30" align="center" style="font-size:14px"><font color="#000000"><b><%=title%></b></font></td>
</tr>
<tr>
<td class="font1"> </td>
</tr>
<tr>
<td height=250 valign=top>
<%
if flag="2" then
sqltext="select * from miscell_pic where miscellno="&keyno&" order by sortnum"
rs2.Open sqltext,cn,1,1
do while not rs2.EOF
if rs2("picflag")="1" then
select case rs2("position")
case "0"
position="left"
case "2"
position="right"
case else
position="center"
end select
if position="center" then
%>
<div align=center>`
<%if rs2("picflag2")="1" then%>
<a href="pic_displaybig.asp?code=miscell_pic2&keyno=<%=rs2("keyno")%>" target=_blank><img src="pic_display.asp?code=miscell_pic&keyno=<%=rs2("keyno")%>" border="0"></a>
<%else%>
<img src="pic_display.asp?code=miscell_pic&keyno=<%=rs2("keyno")%>" border="0">
<%end if%>
</div>
<%if rs2("flag")="1" then%>
<div align=center><%=trim(rs2("title"))%></div>
<%end if
else
if rs2("picflag2")="1" then
%>
<a href="pic_displaybig.asp?code=miscell_pic2&keyno=<%=rs2("keyno")%>" target=_blank><img src="pic_display.asp?code=miscell_pic&keyno=<%=rs2("keyno")%>" border="0" align=<%=position%>></a>
<% else %>
<img src="pic_display.asp?code=miscell_pic&keyno=<%=rs2("keyno")%>" border="0" align=<%=position%>>
<%end if
end if
end if
Response.Write(checkstr(trim(rs2("content")),"1")&"<br>")
rs2.MoveNext
loop
rs2.Close
else
if picflag="1" then
if picflag2="1" then%>
<center><a href="pic_displaybig.asp?code=miscell2&keyno=<%=keyno%>" target=_blank><img src="pic_display.asp?code=miscell&keyno=<%=keyno%>" border="0"></a></center><br>
<%else%>
<center><img src="pic_display.asp?code=miscell&keyno=<%=keyno%>" border="0"></center><br>
<%end if
end if
end if%>
<%=checkstr(content,"1")%>
</td>
</tr>
</table>
</td></tr>
</table>
</body>
</html>
<!-- #include file="../func.inc.asp" -->
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -