
<!--#include file="../Include/Conn.jsp" -->
<!--#include file="../Include/Char.jsp" -->
<!--#include file="../Include/const.jsp" -->
<%
dim rs,mSql
dim mAlbumID
mAlbumID = checkStr(Request.QueryString("ID"))
 if trim(mAlbumID) = "" OR (not isnumeric(mAlbumID)) then
   call msgbox("请不要误操作!",1)
   response.end
 end if

if request("id")=391 then response.redirect "http://www.yclife.cn "
 
mSql = "Select * From Photo_ViewAlbumSearch Where F_ID=" & mAlbumID
Set rs = conn.Execute(mSql)
if rs.Eof then
  Response.write "对不起，该页无法显示！"
  Response.End()
end if

m_AlbumContent = rs("F_AlbumContent")
m_UserID = rs("F_UserID")
m_UserName = rs("F_UserName")
m_CategoryName = rs("F_CategoryName")
mAlbumName = rs("F_AlbumName")
m_AlbumID = rs("F_ID")
'read image size
m_Sql = "Select sum(F_ImageSize) from Photo_AlbumList where F_AlbumID="&m_AlbumID
set rs = conn.Execute(m_Sql)
if not rs.Eof then 
  m_ImageSize = rs(0)
  if m_ImageSize <> "" then
    m_ImageSize = round((m_ImageSize / 1024 / 1024),3)
	if m_ImageSize<1 then m_ImageSize="0"+cstr(m_ImageSize)
	else
	m_ImageSize = 0
  end if
end if

if Request.Querystring("action") = "Delete" then
  m_Sql = "Delete From Photo_AlbumList Where F_ID=" & checkStr(Request("DeleteID"))
  conn.Execute(m_Sql)
  'DELTE FILENAME
    m_DeleteFileName = Server.Mappath("upfile/BigImages/"&m_UserID&"/"&Request("FileName"))
	set TestFileObject=Server.Createobject("Scripting.FileSystemObject")
    if TestFileObject.FileExists(m_DeleteFileName) then
      set NewFile=TestFileObject.getfile(m_DeleteFileName)
      Newfile.delete
    end if
    m_DeleteFileName = Server.Mappath("upfile/SmallImages/"&m_UserID&"/"&Request("FileName"))
	set TestFileObject=Server.Createobject("Scripting.FileSystemObject")
    if TestFileObject.FileExists(m_DeleteFileName) then
      set NewFile=TestFileObject.getfile(m_DeleteFileName)
      Newfile.delete
    end if

  Response.write "<script>location.replace('photo_Album.jsp?ID="&m_AlbumID&"&pageno="&Request.Querystring("pageno")&"')</script>"
end if

%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3c.org/TR/1999/REC-html401-19991224/loose.dtd">
<HTML xmlns="http://www.w3.org/1999/xhtml"><HEAD><TITLE><%=mAlbumName%>-<%=m_UserName%>的相册</TITLE>
<META http-equiv=Content-Type content="text/html; charset=gb2312"><LINK 
href="css/index_photo.css" type=text/css rel=stylesheet>
<SCRIPT src="Jimage.js"></SCRIPT>
<SCRIPT language=javascript>
function checkForm(){
  if (document.form1.username.value == ""){
    alert("对不起，用户名不能为空!请输入..");
	document.form1.username.focus();
	return false;
  }
  if (document.form1.password.value == ""){
    alert("对不起，密码不能为空!请输入..");
	document.form1.password.focus();
	return false;
  }

}
</SCRIPT>
<SCRIPT language=JavaScript>
function jDelete(url)
{
  if((confirm(" 警告:请确定是否删除,删除后不能恢复! "))==true) 
	self.location=url+'&action=Delete';
}
</SCRIPT>
<META content="MSHTML 6.00.2800.1555" name=GENERATOR></HEAD>
<BODY>
<%if Request.Cookies("aspxnet")("CurUserName") = "" then%>
<DIV id=leftlist>
<H3>网络相册</H3>
<FORM name=form1 action=ChkLogin.jsp?return=photo method=post onSubmit="return checkForm()">
<H4>登陆进入您的相册</H4><LABEL for=username><SPAN>用户名:</SPAN><INPUT size=9 
name=username></LABEL> <LABEL for=password><SPAN>密码:</SPAN><INPUT 
type=password size=8 name=password></LABEL> 
<P><BUTTON class=login type=submit><SPAN>登陆</SPAN></BUTTON><BUTTON class=reg 
type=reset><SPAN>注册</SPAN></BUTTON> </P></FORM></DIV>
<%else%>
<DIV id=leftlist>
<H3>网络相册</H3>
<FORM>
<H4><%m_TempUserName = Request.Cookies("aspxnet")("CurUserName")
				  if m_TempUserName = "" then Response.write "游客" else Response.write m_TempUserName
				  %>的相册</H4>
<P style="PADDING-RIGHT: 9px; LINE-HEIGHT: 180%; TEXT-ALIGN: right">[ <A 
href="Logout.jsp">退出</A> ]<BR><A 
href="Photo_Upload.jsp?AlbumID=<%=m_AlbumID%>">上传照片</A><BR><A 
href="photo_my.jsp">我的相册</A><BR><A 
href="Photo_AddNew.jsp">新增相册</A> </P></FORM>
</DIV>
<%end if%>
<DIV id=logo><A title=网络相册-首页 
href="photo_default.jsp"><SPAN>网络相册-首页</SPAN></A> </DIV>
	<DIV id=nav><A href="../">首页</A> | <A 
href="QQ_default.jsp">运城地带</A> | <A 
href="QQ_index.jsp">小圈子</A> | <A 
href="../blog/">运城博客</A> | <A 
href="photo_default.jsp">网络相册</A> | <A 
href="QQ_ployall.jsp">精彩活动</A> | <A 
href="friend_index.jsp">交友频道</A> | <A 
href="../bbs/" target=_blank>运城社区</A> </DIV>
<DIV id=main>
<DIV id=menu><IMG src="img/photo/photo_left.gif" name="limg" id=limg> 
<UL>
  <LI><A title=相册首页 href="photo_default.jsp"><IMG 
  src="img/photo/home.gif"></A> </LI>
  <LI><A title=我的相册 href="photo_my.jsp"><IMG 
  src="img/photo/my_album.gif"></A> </LI>
  <LI><A title=分类相册 href="photo_list.jsp"><IMG 
  src="img/photo/sort.gif"></A> </LI>
  <LI><A title=最新照片 href="photo_new.jsp"><IMG 
  src="img/photo/newPhoto.gif"></A> </LI>
  <LI><A title=相册排行 href="photo_sort.jsp"><IMG 
  src="img/photo/rank.gif"></A> </LI>
  <LI id=menuend><A title=在线大头贴 href="photo_dtt.jsp"><IMG 
  src="img/photo/dtt.gif"></A> </LI></UL></DIV>  

<DIV id=contian><!--Create start-->
<DIV id=piclist>
<H6><IMG src="img/photo/user_img.jpg"><A class=blue 
href="#"><%=m_UserName%>的相册</A> <A class=sky 
href="club_member.jsp?UserName=<%=m_UserName%>" 
target=_blank>去该用户的个人空间查看更多信息</A> <select style="width:90;"  name=select  onChange="if (this.options[this.selectedIndex].value!='') location.href(this.options[this.selectedIndex].value)"   size=1  >
                               <%m_AlbumCount = 0
								m_Sql = "Select * From Photo_Album Where F_UserID="&m_UserID
								Set rst = conn.Execute(m_Sql)
								Do While Not rst.Eof
								  m_AlbumCount = m_AlbumCount + 1
								  if cstr(m_AlbumID) = cstr(rst("F_ID")) then
     				                response.write "<option value=?ID=" + cstr(rst("F_ID"))
           			                response.write " selected"
       				                response.write ">" + rst("F_AlbumName")
                                  else
                                    response.write "<option value='?ID=" & rst("F_ID") &"'>"& rst("F_AlbumName") &"</option>"
                                  end if
								  rst.MoveNext
								loop
								rst.Close
								%>
            </select></H6>
<H5><%=mAlbumName%></H5>
<DL><!--<dt> </dt>-->
  <TABLE cellSpacing=0 cellPadding=0 width="99%" border=0>
    <TBODY>
    <TR>
      <TD width="125%" height=2><IMG height=1 src="" width=1 border=0></TD></TR>
    <TR>
      <TD vAlign=top width="125%" height=10></TD></TR>
    <TR align=middle>
      <TD width="125%">              <%	
	Set rs = Server.createobject("Adodb.RecordSet")
    pageno = request.querystring("pageno")
    pmcount = 20
    mSql = "Select * From Photo_AlbumList Where F_AlbumID="& mAlbumID &" Order by F_ID DESC"
    rs.open mSql,conn,1,1
    m_PhotoCount = rs.Recordcount
	if rs.eof then
	   response.write "<br><p align=center><font color=blue><B>很抱歉，该相册还没有相片上传!</B></font></p>"
	Else
      rs.pagesize=pmcount
      mpage=rs.pagecount

      if isempty(pageno) or cint(pageno)<1 or cint(pageno)>mpage then
         pageno=1
      end if
      rs.absolutepage=pageno
	        Dim rc,re
      rc=rs.pagesize
      re=1
%>
        <TABLE cellSpacing=0 cellPadding=0 width="98%" align=center 
        bgColor=#ffffff border=0>
          <TBODY>
          <TR>
            <TD width="64%" height=22>共有照片<font color=red><strong> 
                    <% = rs.recordcount%>
                    </strong></font> 幅 ⊙ 这是<font color=#008000><strong> 
                    <% = Trim(pageno)%>
                    </strong></font>/<font color=#008000><strong> 
                    <% = Trim(mpage)%>
                    </strong></font>页 <font class=wordgreen><font 
            color=red> 
                    <%
   if pageno>1 then
      response.write "<a href='photo_Album.jsp?pageno="&pageno-1&"&ID="&Request("ID")&"'>[上一页]</a>"
   else
      response.write "[上一页]"
   end if
   Response.write "&nbsp;"
   if int(pageno) < int(rs.pagecount) then
     response.write "<a href='photo_Album.jsp?pageno="&pageno+1&"&ID="&Request("ID")&"'>[下一页]</a>"
   else 
     response.write "[下一页]"
   end if
  %>
                    </font></font></TD>
            <TD align=right width="36%"><FONT class=wordgreen><FONT 
              color=red>&nbsp; 鼠标停留图标上可查看详细资料</FONT></FONT> </TD></TR></TBODY></TABLE>
        <TABLE cellSpacing=0 cellPadding=0 width="100%" bgColor=#eeeeee 
border=0>
          <TBODY>
          <TR align=middle>
            <TD align=middle><FONT color=#cc0000>
             <%
  	  mImageSize = round(rs("F_ImageSize")/1024,2)
	  if mImageSize < 1  then mImageSize = "0"+cstr(mImageSize)+"K" else mImageSize = cstr(mImageSize)+"K"
	  Response.write "<table cellSpacing=1 cellPadding=4 width='100%' border=0>"
      Response.write "<tr>"
      do while not rs.eof and rc>0
        Response.write "<td width=20% align='center' valign=top bgColor=#ffffff>"
	    Response.write "<a target='_blank' title="&rs("F_Title")&" href='ShowPhoto.jsp?ID="&rs("F_ID")&"'>"
	    Response.Write "<img hspace=4 vspace=4 alt='编    号: "&rs("F_ID")&" 　　　&#13;&#10;拥有者: "&rs("F_UserName")&"　　&#13;&#10;文件名: "&rs("F_Image")&"　　&#13;&#10;文件(Size): "&mImageSize&"　　&#13;&#10;时    间: "&rs("F_Addtime")&"&#9;　　&#13;&#10;点击数: "&rs("F_Hits")&"&#13;&#10;介    绍:"&rs("F_Content")&" 　　&#13;&#10;&#13;&#10;  点 击 查 看 原 图'"
		Response.write "onmouseout=nereidFade(this,90,7,5) onmouseover=nereidFade(this,100,5,7) style='border:0 solid #666666;FILTER: alpha(opacity=95)' border=0 src='upfile/Smallimages/"&rs("F_UserID")&"/"&rs("F_Image")&"'  width=120 ><br>"
	    Response.write "</a>"
				%>
                    <TABLE cellSpacing=1 cellPadding=0 width=120 border=0>
                      <TBODY>
                      <TR>
                        <TD align=middle><a target='_blank' title=<%=rs("F_Title")%> href='ShowPhoto.jsp?ID=<%=rs("F_ID")%>'><strong>[<%=rs("F_Title")%>]</strong></A></TD></TR>
                      <TR>
                        <TD align=middle>点击:<FONT color=red>(<%=rs("F_Hits")%>)</FONT> 
                          <% mSql ="Select count(*) from Photo_Review where F_AlbumID="&rs("F_ID")
                               Set rst = conn.execute(mSql)
                                response.write "评论:<font color=red>("&rst(0)&")<font>":rst.close%></TD></TR></TBODY></TABLE>
          <%
	    Response.write "</td>"
	
        If re mod 4 = 0 then
          Response.write "</tr>"
        End if
        rs.movenext
        re=re+1
        rc=rc-1
      loop	
      Response.write "</table>"
        

	  %>  </FONT></TD></TR></TBODY></TABLE>
        <TABLE cellSpacing=0 cellPadding=0 width="98%" align=center 
        bgColor=#ffffff border=0>
          <TBODY>
          <TR>
            <TD width="56%" height=22>共有照片<font color=red><strong> 
                    <% = rs.recordcount%>
                    </strong></font>幅 ⊙ 当前第<font color=red><strong> 
                    <% = Trim(pageno)%>
                    </strong></font>页/共<font color=red><strong> 
                    <% = Trim(mpage)%>
                    </strong></font>页 </TD>
            <TD align=right width="44%">     <%
   if pageno>1 then
      response.write " <a href='?ID="&Request("ID")&"'>首页</a> "
   else
      response.write " 首页 "
   end if
   if pageno>1 then
      response.write " <a href='?pageno="&pageno-1&"&ID="&Request("ID")&"'>上一页</a> "
   else
      response.write " 上一页 "
   end if
   add=5'数字分页个数+1
   if pageno-int(add/2)<=1 then m=1 else m=pageno-int(add/2)
   if m+add>mpage then 
      n=mpage
      if mpage-add<=1 then m=1 else m=mpage-add
   else
      n=m+add
   end if

   for pno=m to n
     if pno=cint(pageno) then
        response.write "&nbsp;<font color=red>"&pno&"</font>"
     else
        response.write "<b>&nbsp;<a href='?pageno="&pno&"&ID="&Request("ID")&"'>"&pno&"</a></b>"
     end if
   next
   response.write "&nbsp"

   if int(pageno) < int(rs.pagecount) then
     response.write " <a href='?pageno="&pageno+1&"&ID="&Request("ID")&"'>下一页</a> "
   else 
     response.write " 下一页 "
   end if

   if int(pageno) < int(rs.pagecount) then
      response.write " <a href='?pageno="&mpage&"&ID="&Request("ID")&"'>末页</a> "
   else
      response.write " 末页 "
   end if
   Response.write "&nbsp;&nbsp;"
   rs.close
%>

 </TD></TR></TBODY></TABLE> <%end if%></TD></TR>
    <TR>
      <TD width="125%" height=10></TD></TR></TBODY></TABLE></DL>
</DIV></DIV><!--Create end-->
<DIV id=foot><A class=list href="../about/?Para=Intro" target=_blank>关于我们</A> ┊ <A class=list href="../about/?Para=Contact" target=_blank>联系方式</A> ┊ <A class=list href="../about/?Para=Job" target=_blank>招贤纳士</A> ┊ <A class=list href="../about/?Para=AdService" target=_blank>广告服务</A> ┊ <A class=list href="../about/?Para=Cooperate" target=_blank>合作伙伴</A> ┊ <A class=list href="../so/Suggestion.jsp" target=_blank> 留言/投诉</A> ┊ <A class=list href="../about/?Para=Job" target=_blank></A><BR><%=Site_info(5)%> </DIV>
</BODY></HTML>
