<%@ Page Language="C#" AutoEventWireup="true" Codebehind="photoAdd.aspx.cs" Inherits="JuSNS.Web.user.Album.photoAdd" %>
<!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 id="ptitle" runat="server">上传照片</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 language="javascript" type="text/javascript">
function lessInput()
{
   var event=getEvent();
   var obj=event.srcElement||event.target;
   var o=obj.parentNode;
   o.parentNode.removeChild(o);
}
function addInput()
{
   var event=getEvent();
   var obj=event.srcElement||event.target;
   var o=obj.parentNode;
   o=o.nextSibling;
   var innerhtml="<input type=\"file\" class=\"f-text\" name=\"picture\" />&nbsp;<a href=\"javascript:void(0);\" onclick=\"javascript:addInput()\">+</a>&nbsp;<a href=\"javascript:void(0);\" onclick=\"javascript:lessInput()\">-</a>";
   var div=document.createElement("div");
   div.innerHTML=innerhtml;
   var form=document.getElementById("puform");
   form.insertBefore(div,o);
}
</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">
	                        <div class="title">
                                <div class="l"><img src="../../template/<%Response.Write(JuSNS.Config.UiConfig.SkinStyle); %>/images/site/album.gif" align="absmiddle" /> <span class="shenlan bold font14 ocolor">上传照片</span></div>
                                <div class="r"><a href="javascript:window.history.back();" title="返回上一页">返回上一页</a></div>
                                <div class="c"></div>
                            </div>
            		       
                            <div class="nav-menu">
                                <ul>
                                  <li><a href="../album/photos.aspx">好友最新照片</a></li>
                                  <li><a href="../album/?a=all">好友最新相册</a></li>
                                  <li><a href="../album/?r[0]=<%=UserID %>">我的相册</a></li>
                                  <li ><a href="../album/quan.aspx?a=all">最近被圈好友</a></li>
                                  <li><a href="../album/?a=userall" title="所有人的相册">随便看看</a></li>
                                  <li class="current"><a href="../album/albumadd.aspx" title="上传照片">上传照片</a></li>
                                </ul>
                            </div>        
                     </div>
                       
                    <div class="body_sec_all">
                        <% if(!string.IsNullOrEmpty(Convert.ToString(Session["ErrMSG"]))){ %>
                            <div class="msg-error" id="ERRMSG">
                                <% =Session["ErrMSG"] %>
                            </div>
                            <% } %>
                           
                           <!--正文-->
                           <div id="photo-pu">
                                <div id="pu-tip" class="content" style="display: none">
                                    <div class="bold pstr font14">摄像头拍照</div>
                                    <div class="pstr">
                                        <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" id="Photo" width="388"
                                            height="222" codebase="http://fpdownload.macromedia.com/get/flashplayer/current/swflash.cab">
                                            <param name="movie" value="Photo.swf" />
                                            <param name="quality" value="high" />
                                            <param name="bgcolor" value="#869ca7" />
                                            <param name="allowScriptAccess" value="sameDomain" />
                                            <embed src="Photo.swf" quality="high" bgcolor="#869ca7" width="388" height="222"
                                                name="Photo" align="middle" play="true" loop="false" allowscriptaccess="sameDomain"
                                                type="application/x-shockwave-flash" pluginspage="http://www.adobe.com/go/getflashplayer">
			                                </embed>
                                        </object>
                                    </div>
                                </div>
                                <div id="photo-upload" class="content">
                                    <div class="content-reshow">支持 JPG、GIF 和 PNG 格式的照片，每张最大 5M。</div>
                                    <form action="PhotoAdd.aspx?r=<%=R%>&u=<%=this.UserID%>" method="post" id="puform"
                                            enctype="multipart/form-data" runat="server">
                                        <div class="item cpstr">
                                            <input type="file" class="f-text" name="picture" />&nbsp;<a href="javascript:void(0);" onclick="javascript:addInput()">+</a>
                                            </div>
                                        <div class="item cpstr">
                                            <input type="file" class="f-text" name="picture" />&nbsp;<a href="javascript:void(0);" onclick="javascript:addInput()">+</a>&nbsp;<a href="javascript:void(0);" onclick="javascript:lessInput()">-</a>
                                            </div>
                                        <div class="item cpstr">
                                            <input type="file" class="f-text" name="picture" />&nbsp;<a href="javascript:void(0);"  onclick="javascript:addInput()">+</a>&nbsp;<a href="javascript:void(0);" onclick="javascript:lessInput()">-</a>
                                        </div>
                                        <div class="item pstr">
                                            <input type="submit" class="f-button" value="上传照片" onclick="javascript:document.getElementById('showU').style.display='block';" />
                                            <input type="button" class="f-reset" value="返回" onclick="javascript:history.back();" />
                                         </div>
                                         <div  class="msg-warn  pstr" id="showU" style="display:none;">正在上传.....请等待</div>
                                    </form>
                                </div>
                                <div class="reshow">上传色情、反动等照片将导致你的账号被删除。</div>
                                <div class="spline"></div>
                            </div>                           
                           <!--正文结束--> 
                    </div>    
                        
                     </div>
                   <!--底部-->
                 <div class="divbottom">
                  <%=this.GetHtmlFoot()%>
                  </div>                           
         </div>
     </div>
</div>   
</body>
</html>
<script language="javascript" type="text/javascript">
function hide(obj)
{
    if(obj==1)
    {
        document.getElementById("pu-tip").style.display="none";
        document.getElementById("photo-upload").style.display="";
    }
    else
    {
        document.getElementById("pu-tip").style.display="";
        document.getElementById("photo-upload").style.display="none";
    }
}
</script>