<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="GroupAlbumNew.aspx.cs" Inherits="JuSNS.Web.home.Album.GroupAlbumNew" %>

<!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/<% Response.Write(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 chkform2(form)
    {
        form.submit.disabled=true;
        var err="";
        if(form.title.value=="")
        {
            err+="<li>相册的名称不能为空"
        }
        if(err=="")
        {
            return true;
        }
        else
        {
            err="<ul>"+err+"</ul>";
            var node=document.getElementById("ERRMSG");
            if(node)
            {
                node.parentNode.removeChild(node);
            }
            var pos=document.getElementById("photo-upload-page");
            var div=document.createElement("div");
            div.setAttribute("id","ERRMSG");
            div.className="msg-error";
            div.innerHTML=err;
            pos.insertAdjacentElement("beforeBegin",div);
            form.submit.disabled=false;
            return false;
        }
    }
    
    function chkphotoadd(obj)
    {
        var form=obj;
        form.submit.disabled=true;
        var err="";
        if(form.r.value=="")
        {
            err+="<li>你还没有建立任何相册，请先建立相册"
        }
        if(err=="")
        {
            return true;
        }
        else
        {
            err="<ul>"+err+"</ul>";
            var node=document.getElementById("ERRMSG");
            if(node)
            {
                node.parentNode.removeChild(node);
            }
            var pos=document.getElementById("photo-upload-page");
            var div=document.createElement("div");
            div.setAttribute("id","ERRMSG");
            div.className="msg-error";
            div.innerHTML=err;
            pos.insertAdjacentElement("beforeBegin",div);
            form.submit.disabled=false;
            return false;
        }
    }
    </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="../group/group.aspx?GroupID=<%=Request.QueryString["GroupID"] %>" title="返回群组">返回群组</a></div>
                                <div class="c"></div>
                            </div>
            		       
                            <div class="nav-menu">
                                <ul>
                                  <li><a href="../album/?r[0]=<%=UserID %>">我的相册</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 class="current"><a href="javascript:;" 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 class="cpstr"  id="photo-upload-page">
                                <div class="cpstr" sect:link="选择相册">
                                    <div class="bold font14 pstr">创建相册</div>
                                    <form id="Form1" name="form2" method="post" runat="server" onsubmit="return chkform2(this)">
                                   <div id="addtip" runat="server"></div> 
                                    <div id="addform" runat="server">
                                        <div class="content">
                                                    <label class="f-label">
                                                        相册名</label>
                                                    <input type="text" class="f-text" name="title" size="50" maxlength="30" />
                                         </div>
                                        <div class="content">
                                                    <label class="f-label">
                                                        描述</label>
                                                    <textarea name="desc" rows="5" cols="80" maxlength="500" class="f-text"></textarea>
                                         </div>
                                        <div class="content"  style="display: none;">
                                                    <label class="f-label">
                                                        可见度</label>
                                                    <select name="attr">
                                                        <option value="0" selected="selected">全站用户可见</option>
                                                        <option value="1">相同网络用户及好友可见</option>
                                                        <option value="2">仅好友可见</option>
                                                        <option value="3">仅自己可见</option>
                                                    </select>
                                         </div>
                                         
                                        <div class="content">
                                                    <label class="f-label">群组名称</label>
                                                    <asp:DropDownList ID="GroupID" runat="server">
                                                    </asp:DropDownList>
                                        </div>
                                        
                                         
                                         <div class="content pstr">
                                                    <label class="f-label">&nbsp;</label>
                                                    <input type="submit" name="submit" class="f-button" value="创建相册" />
                                                    <input type="button" class="f-reset" value="取消，返回群组" onclick="window.location='../group/group.aspx?GroupID=<%=Request.QueryString["groupid"] %>'" />
                                    </div>
                                    </div>
                                    </form>
                            </div>
                             <div class="spline"></div> 
                            </div>
                           <div class="spline"></div> 
                     </div>
                     </div>
                   <!--底部-->
                 <div class="divbottom">
                  <%=this.GetHtmlFoot()%>
                  </div>                           
                </div>
         </div>
</div>
                     
</body>
</html>
