<%@ Page Language="C#" MasterPageFile="../BloggerAdmin.master" AutoEventWireup="true" CodeBehind="Shoot.aspx.cs" Inherits="Ruiao.WebSite.Blogger.Admin.Album.Shoot" Title="Untitled Page" %>
<asp:Content ID="Content3" ContentPlaceHolderID="phHead" runat="server" EnableViewState="false">
<link href="<%=AppUrl %>/Blogger/Admin/Album/Images/Style/Album.css" rel="stylesheet" type="text/css" />
</asp:Content>

<asp:Content ID="Content4" ContentPlaceHolderID="cphMainAdmin" runat="server" EnableViewState="true">
<div id="ContentTitle"><%=MyTitle %></div>
<div id="ContentBody">

<asp:Panel ID="plAlbumSelect" runat="server" EnableViewState="true">
    <!--导航!-->
    <div id="AlbumAllPage_Nav" class="BrokenLineBox">
    <div class="LeftFloatBox"><a href="AlbumManage.aspx">我的相册</a> \ 选择要拍摄相片的相册</div>
    </div>
    
    <!--已有相册选择!-->
    <ul id="AlbumList">
    <asp:Repeater ID="rpAlbum" runat="server" OnItemCreated="rpAlbum_ItemCreated" EnableViewState="true">
    <ItemTemplate>
    <li class="AlbumItem">
    <div class="AlbumItem_Top"><asp:Label ID="lbAlbumID" runat="server" Text='<%# DataBinder.Eval(Container, "DataItem.ID")%>' Visible="false"></asp:Label></div>
    <div class="AlbumItem_Body">
    <div class="AlbumItem_Title"><%# DataBinder.Eval(Container, "DataItem.Title")%></div>
    <h2 class="AlbumItem_Channel">频道：<%#ChannelName%></h2>
    <div class="AlbumItem_Cover"><table><tr><td><a href="Shoot.aspx?AlbumID=<%# DataBinder.Eval(Container, "DataItem.ID")%>"><img alt="<%# DataBinder.Eval(Container, "DataItem.Title")%>" src="<%# CoverPhoto %>" /></a></td></tr></table></div>
    <div class="AlbumItem_Description"><%# DataBinder.Eval(Container, "DataItem.Description")%></div>
    <div class="AlbumItem_OtherInfo">
    <span class="AlbumItem_PhotoNum"><%#PhotoNum %>张</span>
    <span class="AlbumItem_ViewStatus"><%#ViewStatusIcon %></span>
    </div>
    </div>
    <div class="AlbumItem_Bottom"></div>
    </li>
    </ItemTemplate>
    <SeparatorTemplate><li class="AlbumItem_Separator"></li></SeparatorTemplate>
    </asp:Repeater>
    </ul>
    
    <!--建立新相册!-->
    <table id="AlbumAdd" class="MainContentTable" cellpadding="3" cellspacing="1">
        <tr class="MainContentList_ItemTR">
	        <td style="width:26%;text-align:right;">相册名称：</td>
	        <td style="width:74%"><asp:TextBox ID="tbTitle" runat="server" MaxLength="20" EnableViewState="true"></asp:TextBox><span class="NotesText"></span></td>
        </tr>
        <tr class="MainContentList_ItemTR">
	        <td style="text-align:right">频道分类：</td>
	        <td><asp:DropDownList ID="ddlChannel" runat="server" EnableViewState="true"></asp:DropDownList><span class="NotesText"></span></td>
        </tr>
        <tr class="MainContentList_ItemTR">
	        <td style="text-align:right">相册说明：</td>
	        <td><asp:TextBox ID="tbDescription" runat="server" Height="80px" TextMode="MultiLine" Width="294px"  MaxLength="2000" EnableViewState="true"></asp:TextBox><span class="NotesText"></span></td>
        </tr>
        <tr class="MainContentList_ItemTR">
	        <td style="text-align:right">访问权限：</td>
	        <td>
	        <asp:RadioButtonList ID="rblViewStatus" runat="server" RepeatColumns="5" EnableViewState="true"></asp:RadioButtonList>
	        <span id="spanPassword" style="display:none;">访问密码:<asp:TextBox ID="tbPassword" runat="server" TextMode="Password" EnableViewState="true"></asp:TextBox></span>
	        </td>
        </tr>
        <tr class="MainContentList_ItemTR">
	        <td colspan="2"  style="text-align:center"><asp:Button ID="btnAlbumCreate" runat="server" OnClick="btnAlbumCreate_Click" Text="创建新相册" CssClass="SubmitButton"  EnableViewState="false" /></td>
        </tr>
    </table>
    <script type="text/javascript">
    function ShowViewStatus()
    {
        var ViewStatusSelect = document.getElementById("<%=rblViewStatus.ClientID%>");
        var spanPassword = document.getElementById("spanPassword");
        
        for(i=0;i<ViewStatusSelect.getElementsByTagName("INPUT").length;i++)   
        {
            if(ViewStatusSelect.getElementsByTagName("INPUT")[i].type=="radio")   
            {   
                if(ViewStatusSelect.getElementsByTagName("INPUT")[i].checked)
                {
                    if(ViewStatusSelect.getElementsByTagName("INPUT")[i].value == "1")
                    {
                        spanPassword.style.display = "";
                    }
                    else
                    {
                        spanPassword.style.display = "none";
                    }
                }
            }   
        }
    }
    ShowViewStatus();
    </script>
</asp:Panel>

<asp:Panel ID="plShoot" runat="server">
<!--拍照主程序(flash)-->
<div id="ShootMain">
    <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="300" height="275" id="main_flash" >
    <param name="movie" value="/Common/Plugins/paila/main.swf" />
    <param name="quality" value="high" />
    <param name="FlashVars" value="sender=./ShootReceiveData.aspx?AlbumID=<%=AlbumData.ID%>&uploader=./ShootReceiveData.aspx?AlbumID=<%=AlbumData.ID%>" />
    <embed src="/Common/Plugins/paila/main.swf" allowScriptAccess="sameDomain" FlashVars="sender=./ShootReceiveData.aspx?AlbumID=<%=AlbumData.ID%>&uploader=./ShootReceiveData.aspx?AlbumID=<%=AlbumData.ID%>" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="300" height="275"></embed>
    </object>
</div>

<!--相框选择-->
<div id="ShootFrameSelect" class="ContentBox_Normal">
    <div class="BoxTitle">
        <div class="BoxTitle_Left"><a><span>选择您喜爱的相框进行拍摄吧：</span></a></div>
        <div class="BoxTitle_Right"></div>
    </div>
    <div class="BoxBody">
        <asp:Repeater ID="rpShootFrame" runat="server">
        <ItemTemplate>
        <img class="ShootFramePic" alt="双击选择该图片作为拍摄相框" src="/Common/Plugins/Paila/ShootFrame/<%# DataBinder.Eval(Container, "DataItem.Value")%>" onclick="loadFrontImg(this)" />
        </ItemTemplate>
        </asp:Repeater>
        <script type="text/javascript">
        function loadFrontImg(str){
	        $("main_flash").changeFrontImg(str.src);
        }
        </script>
    </div>
</div>

<div id="ShootGoBack">
<input type="button" onclick="location='AlbumManage<%=ExtensionName %>'" value="返回相册管理首页" class="LinkButton" />
</div>

</asp:Panel>
    
</div>
</asp:Content>