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

📄 ad_photoshow.asp

📁 该软件是帮助大学生更好的生活
💻 ASP
字号:
<%@language=vbscript codepage=936 %>
<%
option explicit
response.buffer=true	
Const PurviewLevel=2
Const CheckChannelID=4
Const PurviewLevel_Photo=3
%>
<!--#include file="inc/conn.asp"-->
<!--#include file="inc/config.asp"-->
<!--#include file="ad_ChkPurview.asp"-->
<!--#include file="inc/func.asp"-->
<!--#include file="inc/ubbcode.asp"-->
<!--#include file="inc/ad_code_Photo.asp"-->
<%
dim PhotoID,sql,rs,FoundErr,ErrMsg,PurviewChecked,PurviewChecked2
dim ClassID,tClass,ClassName,RootID,ParentID,ParentPath,Depth,ClassMaster,ClassChecker
PhotoID=trim(request("PhotoID"))
FoundErr=False
PurviewChecked=False
PurviewChecked2=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,ClassChecker 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)
		ClassChecker=tClass(6)
	end if
	set tClass=nothing
end if
if FoundErr=True then
	rs.close
	set rs=nothing
	exit sub
end if
if AdminPurview=1 or AdminPurview_Photo<=2 then
	PurviewChecked=True
else
	PurviewChecked=CheckClassMaster(ClassMaster,AdminName)
	if PurviewChecked=False and ParentID>0 then
		set tClass=conn.execute("select ClassMaster from PhotoClass where ClassID in (" & ParentPath & ")")
		do while not tClass.eof
			PurviewChecked=CheckClassMaster(tClass(0),AdminName)
			if PurviewChecked=True then exit do
			tClass.movenext
		loop
	end if
	PurviewChecked2=CheckClassMaster(ClassChecker,AdminName)
	if PurviewChecked2=False and ParentID>0 then
		set tClass=conn.execute("select ClassMaster from PhotoClass where ClassID in (" & ParentPath & ")")
		do while not tClass.eof
			PurviewChecked2=CheckClassMaster(tClass(0),AdminName)
			if PurviewChecked2=True then exit do
			tClass.movenext
		loop
	end if
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 class="title"> 
                  <TD align=left>
<%
response.write "您现在的位置:&nbsp;<a href='ad_PhotoManage.asp'>图片管理</a>&nbsp;&gt;&gt;&nbsp;"
if ParentID>0 then
	dim sqlPath,rsPath
	sqlPath="select ClassID,ClassName From PhotoClass where ClassID in (" & ParentPath & ") order by Depth"
	set rsPath=server.createobject("adodb.recordset")
	rsPath.open sqlPath,conn,1,1
	do while not rsPath.eof
		response.Write "<a href='ad_PhotoManage.asp?ClassID=" & rsPath(0) & "'>" & rsPath(1) & "</a>&nbsp;&gt;&gt;&nbsp;"
		rsPath.movenext
	loop
	rsPath.close
	set rsPath=nothing
end if
response.write "<a href='ad_PhotoManage.asp?ClassID=" & ClassID & "'>" & ClassName & "</a>&nbsp;&gt;&gt;&nbsp;"
response.write "<a href='ad_PhotoShow.asp?PhotoID=" & rs("PhotoID") & "'>" & dvhtmlencode(rs("PhotoName")) & "</a>"
%>
				</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"><%= ubbcode(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">相关评论:</td>
                
          <td colspan="2"><a href='ad_photocomment.asp?showphotoid=<%=rs("photoID")%>'> 管理此图片的点评</a></td>
              </tr>
        <tr class="tdbg">
          <td>可用操作:</td>
          <td colspan="2">
<%
if (rs("Editor")=AdminName and rs("Passed")=False) or PurviewChecked=True then
	response.write "<a href='ad_PhotoModify.asp?PhotoID=" & rs("PhotoID") & "'>修改</a>&nbsp;&nbsp;"
    response.write "<a href='ad_PhotoDel.asp?Action=Del&PhotoID=" & rs("PhotoID") & "'>删除</a>&nbsp;&nbsp;" 
end if
if AdminPurview=1 or AdminPurview_Photo<=2 then
	response.write "<a href='ad_PhotoMove.asp?PhotoID=" & rs("PhotoID") & "'>移动</a>&nbsp;&nbsp;"
end if
if PurviewChecked2=True then
	if rs("Passed")=false then
		response.write "<a href='ad_PhotoProperty.asp?Action=SetPassed&PhotoID=" & rs("PhotoID") & "'>通过审核</a>&nbsp;&nbsp;"
	Else
  		response.write "<a href='ad_PhotoProperty.asp?Action=CancelPassed&PhotoID=" & rs("PhotoID") & "'>取消审核</a>&nbsp;&nbsp;"
  	end if
end if
if PurviewChecked=True then
  	if rs("OnTop")=false then
   		response.write "<a href='ad_PhotoProperty.asp?Action=SetOnTop&PhotoID=" & rs("PhotoID") & "'>固顶</a>&nbsp;&nbsp;"
   	else
		response.write "<a href='ad_PhotoProperty.asp?Action=CancelOnTop&PhotoID=" & rs("PhotoID") & "'>解固</a>&nbsp;&nbsp;" 
   	end if
  	if rs("Elite")=false then
   		response.write "<a href='ad_PhotoProperty.asp?Action=SetElite&PhotoID=" & rs("PhotoID") & "'>设为推荐</a>"
   	else
		response.write "<a href='ad_PhotoProperty.asp?Action=CancelElite&PhotoID=" & rs("PhotoID") & "'>取消推荐</a>"
    end if
end if
%>
		  </td>
        </tr>
            </table>
        </tr>
      </table>
</body>
</html>
<%
end sub
%>

⌨️ 快捷键说明

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