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

📄 user_photoshow.asp

📁 该软件是帮助大学生更好的生活
💻 ASP
字号:
<!--#include file="inc/conn.asp"-->
<!--#include file="inc/Conn_User.asp"-->
<!--#include file="inc/config.asp"-->
<!--#include file="inc/func.asp"-->
<!--#include file="inc/ubbcode.asp"-->
<%
if CheckUserLogined()=False then
	response.Redirect "User_Login.asp"
end if

dim PhotoID,sql,rs,FoundErr,ErrMsg,PurviewChecked
dim ClassID,tClass,ClassName,RootID,ParentID,ParentPath,Depth,ClassMaster
PhotoID=trim(request("PhotoID"))
FoundErr=False
PurviewChecked=False

call main()
if FoundErr=True then
	WriteErrMsg()
end if
call CloseConn()

sub main()
if PhotoId="" then
	FoundErr=True
	ErrMsg=ErrMsg & "<br><li>参数不足</li>"
	exit sub
else
	PhotoID=Clng(PhotoID)
end if
sql="select * from Photo where Deleted=False and PhotoID=" & PhotoID & ""
Set rs= Server.CreateObject("ADODB.Recordset")
rs.open sql,conn,1,1
if rs.bof and rs.eof then
	FoundErr=True
	ErrMsg=ErrMsg & "<br><li>找不到文章</li>"
else
	ClassID=rs("ClassID")
	set tClass=conn.execute("select ClassName,RootID,ParentID,Depth,ParentPath,ClassMaster From PhotoClass where ClassID=" & ClassID)
	if tClass.bof and tClass.eof then
		founderr=True
		ErrMsg=ErrMsg & "<br><li>找不到指定的栏目</li>"
	else
		ClassName=tClass(0)
		RootID=tClass(1)
		ParentID=tClass(2)
		Depth=tClass(3)
		ParentPath=tClass(4)
		ClassMaster=tClass(5)
	end if
	set tClass=nothing
end if
if FoundErr=True then
	rs.close
	set rs=nothing
	exit sub
end if
if rs("Editor")=UserName and rs("Passed")=False then
	PurviewChecked=True
else
	PurviewChecked=False
end if
%>
<html>
<head>
<title><%=rs("PhotoName")%></title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="ad_Style.css" rel="stylesheet" type="text/css">
</head>

<body leftmargin="2" topmargin="0" marginwidth="0" marginheight="0">
<table width="100%" border="0" cellpadding="3" cellspacing="1" class="border">
  <tr>
          <td align="center" valign="top" bgcolor="#FFFFFF"><TABLE 
width="100%" border=0 align=center cellPadding=2 cellSpacing=0 class="border">
        <TBODY>
                <TR> 
                  <TD align=middle><div align="center">
                <p class="title"><strong><%= dvhtmlencode(rs("PhotoName")) %></strong></p>
              </div></TD>
                </TR>
              </TBODY>
            </TABLE>
            <table width="100%" height="5" border="0" cellpadding="0" cellspacing="0">
              <tr> 
                <td></td>
              </tr>
            </table>
            
      <table width="100%" border="0" cellpadding="2" cellspacing="1" bgcolor="#FFFFFF" class="border">
        <tr class="tdbg"> 
          <td width="70">图片大小:</td>
                
          <td width="249"><%= rs("PhotoSize") & " K" %></td>
                
          <td width="240" rowspan="7" align="center" valign="middle"> 
            <table border="0" cellspacing="0" cellpadding="0" align="center">
                    <tr> 
                      <td width="150"><%
					  if FoundErr<>True then
						  response.write "<a href='Photo_Viewer.asp?UrlID=1&PhotoID=" & rs("PhotoID") & "'><img src='" & rs("PhotoUrl_Thumb") & "' border=0 width=150 height=113></a>"
					  else
						  response.write "<img src='" & rs("PhotoUrl_Thumb") & "' border=0 width=150 height=113>"
					  end if%></td>
                      <td valign="bottom"><img src="images/yy1_02.gif" width="6" height="113"></td>
                    </tr>
                    <tr> 
                      <td colspan="2"><img src="images/yy1_03.gif" width="156" height="8"></td>
                    </tr>
                  </table>
                  <%response.write "<a href='Photo_Viewer.asp?UrlID=1&PhotoID=" & rs("PhotoID") & "'>" & dvhtmlencode(rs("PhotoName")) & "</a>"%> </td>
              </tr>
              
        <tr class="tdbg"> 
          <td width="70">图片作者:</td>
                
          <td> 
            <%
		if rs("Author")="" then
			response.write "佚名"
		else
			response.write dvhtmlencode(rs("Author")) 
		end if%></td>
              </tr>
              
        <tr class="tdbg"> 
          <td width="70">更新时间:</td>
                
          <td><%= rs("UpdateTime") %></td>
              </tr>
              
        <tr class="tdbg"> 
          <td width="70">推荐等级:</td>
                
          <td><%= string(rs("Stars"),"★") %></td>
              </tr>
              
        <tr class="tdbg"> 
          <td width="70">查看次数:</td>
                
          <td>本日:<%=rs("DayHits")%>&nbsp;&nbsp;本周:<%=rs("WeekHits")%>&nbsp;&nbsp;本月:<%=rs("MonthHits")%>&nbsp;&nbsp;总计:<%=rs("Hits")%></td>
              </tr>
              
        <tr class="tdbg"> 
          <td width="70">图片添加:</td>
                
          <td><%= rs("Editor") %></td>
              </tr>
              
              
        <tr class="tdbg"> 
          <td>图片简介:</td>
                
          <td colspan="2"><%= dvhtmlencode(rs("PhotoIntro")) %></td>
              </tr>
              
        <tr class="tdbg"> 
          <td>查看图片:</td>
                
          <td colspan="2"> 
            <%
				if FoundErr=True then
					response.write ErrMsg
				else
					response.write "<a href='Photo_Viewer.asp?UrlID=1&PhotoID=" & rs("PhotoID") & "'>图片地址一" & "</a>"
					if rs("PhotoUrl2")<>"" then response.write "&nbsp;&nbsp;&nbsp;&nbsp;<a href='Photo_Viewer.asp?UrlID=2&PhotoID=" & rs("PhotoID") & "'>图片地址二" & "</a>"
					if rs("PhotoUrl3")<>"" then response.write "&nbsp;&nbsp;&nbsp;&nbsp;<a href='Photo_Viewer.asp?UrlID=3&PhotoID=" & rs("PhotoID") & "'>图片地址三" & "</a>"
					if rs("PhotoUrl4")<>"" then response.write "&nbsp;&nbsp;&nbsp;&nbsp;<a href='Photo_Viewer.asp?UrlID=4&PhotoID=" & rs("PhotoID") & "'>图片地址四" & "</a>"
		  		end if
				%></td>
              </tr>
        <tr class="tdbg"> 
          <td width="70"><font color=blue>可用操作:</font></td>
                
          <td colspan="2">
			<%
			 if PurviewChecked=True then
				response.write "<a href='User_PhotoModify.asp?PhotoID=" & rs("PhotoID") & "'>修改</a>&nbsp;&nbsp;"
				response.write "<a href='User_PhotoDel.asp?Action=Del&PhotoID=" & rs("PhotoID") & "'>删除</a>&nbsp;&nbsp;" 
			end if
			%>
			</td>
              </tr>
            </table></td>
        </tr>
      </table>
</body>
</html>
<%
end sub
%>

⌨️ 快捷键说明

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