<%@ Page Language="C#" AutoEventWireup="true" Codebehind="PhotoView.aspx.cs" Inherits="JuSNS.Web.home.Album.PhotoView" %>
<%@ Import Namespace="System.Data" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
<title><%=AbInf.Title%></title>
<link href="../../template/<% =JuSNS.Config.UiConfig.SkinStyle %>/css/base.css" id="skinpath" type="text/css" rel="stylesheet" />
<script language="javascript" type="text/javascript" src="../../js/ajax.js"></script>
<script language="javascript" type="text/javascript" src="../../js/public.js"></script>
<script src="../../js/EventLoad.js" type="text/javascript" language="javascript"></script>
<script src="../../js/albumoperator.js" type="text/javascript"></script>
<script src="../../js/friend.js" charset="gb2312" type="text/javascript" language="javascript"></script>
<script type="text/javascript" language="javascript">
 OperatorObject="Album.Photo";
</script>
</head>
<body>
 <!--头部-->
<%=this.GetHtmlShort()%> 
<div id="divhead">
    <%=this.GetHtmlHead()%>
</div>

<div id="divbody">
    <div id="body_first">
        <div class="body_menu"> 
        <%=this.GetHtmlLeft()%>
        </div>
    </div>
    <div id="body_sec">
            <div id="body_mid"> 
                <div class="body_frame"> 
                    <div class="body_frame_otherinfo nl">
	                        <div class="title nl">
                                <div class="nl">
                                        <div id="imghead" class="imgb nl" runat="server"></div>
                                        <div class="nl padding10">
                                            <div id="h2title" runat="server"> </div>
                                            <div class="actions" id="returnaction" runat="server"></div>
                                            
                                       </div> 
                                </div>
                                <div class="nr">
                                    <a href="javascript:window.history.back();" title="返回上一页">返回上一页</a>
                                </div>
                            </div>
            		       
                            <div class="nav-menu">
                                <ul>
                                 <li><a href="../album/?r[0]=<%=UserID %>">我的相册</a></li>
                                 <li class="current"><a href="javascript:;">浏览照片</a></li>
                                 <li><a href="../album/?a=all">好友最新相册</a></li>
                                 <li><a href="../album/quan.aspx?a=all">最近被圈好友</a></li>
                                 <li><a href="../album/?a=userall" title="所有人的相册">随便看看</a></li>
                                 <li><a href="../album/albumadd.aspx" title="上传照片"><span class="lanbai">上传照片</span></a></li>
                                 </ul>
                            </div>      
                           
                           <div class="body_sec_all">
                                       <% if (!string.IsNullOrEmpty(sucMSG))
                                       { %>
                                        <div class="msg-succ">
                                            <%=sucMSG %>
                                        </div>
                                     <%} %>
                                        <div class="spline"></div>
                                       <div id="toc" runat="server" class="content nl s100">
                                            <span class="nl s70">
                                                <%=AbInf.ImagesCount%>张照片中的第<%=photoTheNumber %> 张<span class="pipe">|</span>
                                                <a href="<%=LinkUrl %>?r[0]=<%=WhosUserInfo.UserID%>&r[1]=<%=AbInf.AlbumID%>">返回相册</a><span class="pipe">|</span>
                                                <a href="<%=orgPhotoPath%>" target="_blank">查看原始图像</a>
                                            </span>
                                            <span class="padding10 nr s20">
                                                <input name="prephoto" value="上一张" class="f-reset" type="button" onclick="javascript:window.location.href='photoview.aspx?r[0]=<%=prePhotoID %>&r[1]=<%=AbInf.AlbumID %>';" />
                                                <input name="nextphoto" value="下一张" class="f-reset" type="button" onclick="javascript:window.location.href='photoview.aspx?r[0]=<%=nextPhotoID %>&r[1]=<%=AbInf.AlbumID %>';" />
                                            </span>
                                     </div>
                                       <div class="line-none"></div> 
                                     <div id="awrap" runat="server" class="content"></div>
                                     <div id="wrap" runat="server" class="content">
                                        <div class="photo-view">
                                            <span><a href="photoview.aspx?r[0]=<%=nextPhotoID %>&r[1]=<%=AbInf.AlbumID %>"><img id="photo-holder" rev="quanquanviewphoto" rel="rel" value="<%=photoQuanvalue%>"  src="<%=photoPath%>" alt="<%=PhotoTitle %>" title="<%=PhotoTitle %>" /></a>
                                            </span>
                                        </div>
                                      <div class="spline"></div> 
                                    <div class="line1"></div> 
                                        <div class="nl s100">
                                            <div id="quanview" runat="server" class="c"></div>
                                            <div class="cpstr nl s70">
                                                <div class="cpstr">
                                                    <%=Phi.Description%>
                                                </div>
                                                <div class="time c">上传于
                                                    <%=Phi.PostTime%>
                                                </div>
                                                <div class="cpstr">
                                                    来自 <a href="../../user/<%Response.Write(JuSNS.Common.Public.URLWrite("","r",WhosUserInfo.UserID.ToString())); %>">
                                                        <%=WhosUserInfo.Username%>
                                                    </a>的相册：<a href="<%=LinkUrl %>?r[0]=<%=WhosUserInfo.UserID %>&r[1]=<%=AbInf.AlbumID %>"><%=AbInf.Title %></a><%if (AbInf.GroupID != 0)
                                                     { %>&nbsp;&nbsp;上传者：<a href="../../user/<%Response.Write(JuSNS.Common.Public.URLWrite("","r",Phi.UploadUser.ToString())); %>"><%=getUser((object)Phi.UploadUser).Username%></a><%} %>
                                                </div>
                                                <div class="cpstr">
                                                    <%=Phi.Views%> 次浏览<span class="pipe">|</span><%if (Phi.Comments == 0) { %>没有<%} else { %><%=Phi.Comments %>条<%} %>评论
                                                </div>
                                            </div>
                                           
                                            <div class="nr  s20 alignright">
                                                    <div class="share"><a href="javascript:void(0)" rel="/share?a=newobj&r[0]=Photo&r[1]=<%=Phi.PhotoID %>"
                                                    rev="Share" value="2,<%=Phi.PhotoID%>,'照片：','<%=Phi.Description%>','<%=Phi.Description%>',<%=this.UserID%>">分享</a></div>
                                            </div>
                                        </div>
                                        <div class="line1"></div> 
                                    </div> 
                                     <!--评论开始-->
                                    <div  id="photoabout" runat="server" class="s98 c">
                                        <div class="nl s75_1">
                                            <div class="c-comment" id="photo-cmtlist">
                                            <asp:Repeater ID="RptData" runat="server">
                                                <HeaderTemplate>
                                                    <ol>
                                                </HeaderTemplate>
                                                <ItemTemplate>
                                                    <li id="comment-<%# DataBinder.Eval(Container.DataItem, "ID") %>" class="paddings_h5_1 c">
                                                    <div class="body-m-left image nl">
                                                        <a href="../../user/<%# JuSNS.Common.Public.URLWrite("","r",""+((DataRowView)Container.DataItem)["UserID"])+""%>"><img src="<%# this.GetHeadImage((int)DataBinder.Eval(Container.DataItem, "UserID")) %>" style="width:48px;height:48px;" title="<%# getUser(DataBinder.Eval(Container.DataItem, "UserID")).Username%>" /></a>
                                                    </div>
                                                    <div class="body-m-right nl">
                                                        <div class="hdtitle s100  nl">
                                                            <span class="nl">
                                                            <a href="../../user/<%# JuSNS.Common.Public.URLWrite("","r",""+((DataRowView)Container.DataItem)["UserID"]+"")%>"><%# getUser(DataBinder.Eval(Container.DataItem, "UserID")).Username%></a> (<span class="time"><%# JuSNS.Common.Public.getTimeSpan(Convert.ToDateTime(DataBinder.Eval(Container.DataItem, "PostTime")))%></span>)
                                                             <a href="javascript:void(0)" rev="ReComment" rel="../../inc/ajax/album/PhotoOperator.aspx?action=recomment&commentid=<%# DataBinder.Eval(Container.DataItem, "ID") %>">回复</a></span>
                                                            </span>  <span <%# DataBinder.Eval(Container.DataItem, "availdel") %>>
                                                             <a  href="javascript:void(0)" rev="DelComment" rel="../../inc/ajax/album/PhotoOperator.aspx?action=DelComment&commentid=<%# DataBinder.Eval(Container.DataItem, "ID") %>">删除</a></span>
                                                            
                                                         </div>
                                                         <div class="content" id="divcontent">
                                                            <%# JuSNS.Common.Public.CheckSma(DataBinder.Eval(Container.DataItem, "Content").ToString())%>
                                                            <script src="../../inc/ajax/album/photooperator.aspx?action=commentlist&commentid=<%# DataBinder.Eval(Container.DataItem, "ID") %>" type="text/javascript"></script>
                                                        </div>                                                   
                                                    
                                                   </div> 
                                                         

                                                    </li>
                                                </ItemTemplate>
                                                <FooterTemplate>
                                                    </ol></FooterTemplate>
                                            </asp:Repeater>
                                            <div class="pagination" runat="server" id="DivPage">
                                            </div>
                                            <div class="comment-post c">
                                                <div id="addcomment-<%=Phi.PhotoID %>" class="bold font14">
                                                    发表评论</div>
                                                <form action="" method="post">
                                                    <textarea name="body1" id="body1" class="f-text s99" rows="6" maxlength="500"></textarea>
                                                    <div class="pstr">
                                                        <a href="javascript:void(0);"  id="face" onclick="showface(this.id,'body1',0);"><img src="../../template/images/face/c.gif" title="选择表情"  align="absmiddle" /></a>  
                                                        <input type="hidden" value="<%=Phi.PhotoID %>" name="photoid" />
                                                        <input type="submit" class="f-button" rel="../../inc/ajax/album/PhotoOperator.aspx?action=CommentAdd&r[0]=<%=Phi.PhotoID %>"
                                                            rev="CommentAdd" value="发表评论" />
                                                    </div>
                                                </form>
                                            </div>
                                        </div>
                                       </div> 
                                       <div class="nr s20 alignright">
                                            <div>
                                            <ul class="acbg">
                                                <li><a href="javascript:void(0)" rev="Quanren" rel="../../inc/ajax/album/PhotoOperator.aspx?action=quan&u=<%=WhosUserInfo.UserID %>&r=<%=Phi.PhotoID %>"
                                                    id="photo-starttag">开始圈人</a></li>
                                                <%if (WhosUserInfo.UserID == this.UserID || this.IsAdmin())
                                              { %>
                                                <li><a href="sPhotoEdit.aspx?r=<%=Phi.PhotoID %>">编辑照片</a></li>
                                                <li><a href="javascript:void(0)" rev="Delete" rel="../../inc/ajax/album/PhotoOperator.aspx?action=del&r=<%=Phi.PhotoID %>"
                                                    redirect="<%=LinkUrl %>?r[0]=<%=Phi.UploadUser %>&r[1]=<%=Phi.AlbumID %>" id="del-photo">
                                                    删除照片</a></li>
                                                <%} %>
                                                <%if (Phi.PhotoType == 0 && Phi.UploadUser == this.UserID)
                                              {%>
                                                <li><a href="sPhotoEdit.aspx?action=sethead&r=<%=Phi.PhotoID %>">设为头像</a></li>
                                                <% }%>
                                            </ul>
                                        </div>
                                       </div> 
                                    </div>
                                    
                           </div>   
                     </div>
                     </div>
                   <!--底部-->
                 <div class="divbottom">
                  <%=this.GetHtmlFoot()%>
                  </div>                        
             </div>
      </div>
</div>
</body>
</html>
