<%@ Import Namespace="Spaces" %>
<%@ Control Language="C#"  %>
<%@ Register TagPrefix="skm" Namespace="Xiaoxiao.WebUI" Assembly="Xiaoxiao.WebUI" %>
<%@ Register Assembly="Controls" Namespace="Spaces.Controls" TagPrefix="cc1" %>
<script language=javascript>
var player;
var keyStr = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" + //all caps
"abcdefghijklmnopqrstuvwxyz" + //all lowercase
"0123456789+/="; // all numbers plus +/=
function bfor_PlayMusic(src)
{
player=document.getElementById("mplayer");
player.Filename = decode64(src);
stopped=false;
	player.Play();
}

function decode64(inp){
	var out = ""; //This is the output
	var chr1, chr2, chr3 = ""; //These are the 3 decoded bytes
	var enc1, enc2, enc3, enc4 = ""; //These are the 4 bytes to be decoded
	var i = 0; //Position counter

	// remove all characters that are not A-Z, a-z, 0-9, +, /, or =
	var base64test = /[^A-Za-z0-9\+\/\=]/g;

	if (base64test.exec(inp)) { //Do some error checking
	alert("There were invalid base64 characters in the input text.\n" +
	"Valid base64 characters are A-Z, a-z, 0-9, ?+?, ?/?, and ?=?\n" +
	"Expect errors in decoding.");
	}
	inp = inp.replace(/[^A-Za-z0-9\+\/\=]/g, "");

	do { //Here the decode loop.

	//Grab 4 bytes of encoded content.
	enc1 = keyStr.indexOf(inp.charAt(i++));
	enc2 = keyStr.indexOf(inp.charAt(i++));
	enc3 = keyStr.indexOf(inp.charAt(i++));
	enc4 = keyStr.indexOf(inp.charAt(i++));

	//Heres the decode part. There閿熸枻鎷穝 really only one way to do it.
	chr1 = (enc1 << 2) | (enc2 >> 4);
	chr2 = ((enc2 & 15) << 4) | (enc3 >> 2);
	chr3 = ((enc3 & 3) << 6) | enc4;

	//Start to output decoded content
	out = out + String.fromCharCode(chr1);

	if (enc3 != 64) {
		out = out + String.fromCharCode(chr2);
	}
	if (enc4 != 64) {
		out = out + String.fromCharCode(chr3);
	}

	//now clean out the variables used
	chr1 = chr2 = chr3 = "";
	enc1 = enc2 = enc3 = enc4 = "";

	} while (i < inp.length); //finish off the loop

	//Now return the decoded values.
	return out;
}
</script>


<skm:Form id="uploadForm" name="uploadForm" method="post" runat="server" enctype="multipart/form-data">
    <table width="779" height="600" cellspacing="0" id="toppage">
        <tr>
            <td width="100%" valign="top">
                <div name="SpaceTemplateRegion">
                    <table cellspacing="2" cellpadding="0" width="778" id="dlayoutManager" class="ClassicTwoCol">
                        <tr>
                            <td id="ctl00_MainFocus" valign="top" istarget="true" width="558" class="ZigZagSpanFirst">
                                <xiaoxiao:part id="FolderTools" multiinstance="False" class="FullRegionWidth" placement="Anywhere"
                                    movable="True">
           <div id="Div1" class="blog_dragDiv">
    <table cellspacing="0" class="pheader" border="0" style="width: 100%" height="22">
        <tr>
            <td class="mod_tlc" width="6" nowrap>&nbsp;
                </td>
            <td width="100%" class="modhead">
                <table cellspacing="0" width="100%" class="fixedTable partheader" style="width: 100%">
                    <tr>
                        <td id="Td1" class="bold ellipse partDetail" nowrap>
                            <div class='ellipse'>
                               <%=Globals.Text["MusicFolder_Music"]%></div>
                        </td>
                        <td class="partBuffer" align="right" nowrap>
                        </td>
                    </tr>
                </table>
            </td>
            <td class="mod_trc" width="6" nowrap>&nbsp;
                </td>
        </tr>
    </table>
</div>

        <table cellspacing="8" border="0" class="partsmb fixedTable">
                <tr>
                    <td class="ellipse" nowrap>
                        <asp:DataList ID="MusicList" runat="server" Width="100%">
                                                        <HeaderTemplate>
                                                            <table class="black333333_red_noline" cellspacing="0" cellpadding="2" width="100%"
                                                                border="0">
                                                                <tbody>
                                                                    <tr class='secondarysel'>
                                                                        <td width="24"  >
                                                                        </td>
                                                                        <td   align=left>
                                                                           <%=Globals.Text["MusicFolder_FileName"]%></td>
                                                                        <td nowrap width="45"  >
                                                                            <%=Globals.Text["MusicFolder_FileType"]%> </td>
                                                                        <td nowrap width="97"  >
                                                                            <%=Globals.Text["MusicFolder_Songer"]%> </td>
                                                                        <td nowrap width="104" >
                                                                             <%=Globals.Text["MusicFolder_AddTime"]%> </td>
                                                                        <td nowrap width="30"  >
                                                                             <%=Globals.Text["MusicFolder_Play"]%> </td>
                                                                        <td nowrap width="30"  >
                                                                             <%=Globals.Text["MusicFolder_Download"]%> </td>
                                                                    </tr>
                                                        </HeaderTemplate>
                                                        <ItemTemplate>
                                                            <tr >
                                                                <td align="center" bgcolor="#f7f7f7">
                                                                    <asp:Image runat="server" ID="icon" /></td>
                                                                <td align="left">
                                                                    <asp:HyperLink runat="server" ID="singName" CssClass="black333333_red_noline" /></td>
                                                                <td>
                                                                    <asp:Literal runat="server" ID="musicType" /></td>
                                                                <td>
                                                                    <asp:Literal runat="server" ID="singer" /></td>
                                                                <td>
                                                                    <asp:Literal runat="server" ID="created" /></td>
                                                                <td>
                                                                    <asp:HyperLink runat="server" ID="playMusic" /></td>
                                                                <td>
                                                                    <asp:HyperLink runat="server" ID="download" /></td>
                                                            </tr>
                                                        </ItemTemplate>
                                                        <FooterTemplate>
                                                            </table>
                                                        </FooterTemplate>
                                                    </asp:DataList>
                    </td>
                </tr>
            </table>

   </xiaoxiao:part>
                            </td>
                            
                              <td id="ctl00_SupplementalE" valign="top" istarget="true" width="220" orientationpref="NarrowPart"
                                nowrap="nowrap" class="TopToBottom">
                                <xiaoxiao:part id="playMusic" multiinstance="False" class="FullRegionWidth" placement="Anywhere"
                                    movable="True">
           <div id="Div2" class="blog_dragDiv">
    <table cellspacing="0" class="pheader" border="0" style="width: 100%" height="22">
        <tr>
            <td class="mod_tlc" width="6" nowrap>&nbsp;
                </td>
            <td width="100%" class="modhead">
                <table cellspacing="0" width="100%" class="fixedTable partheader" style="width: 100%">
                    <tr>
                        <td id="Td2" class="bold ellipse partDetail" nowrap>
                            <div class='ellipse'>
                               <%=Globals.Text["MusicFolder_PlayMusic"]%></div>
                        </td>
                        <td class="partBuffer" align="right" nowrap>
                        </td>
                    </tr>
                </table>
            </td>
            <td class="mod_trc" width="6" nowrap>&nbsp;
                </td>
        </tr>
    </table>
</div>

          <table cellspacing="8" border="0" class="partsmb fixedTable">
                <tr>
                    <td class="ellipse" nowrap>
                         <table border="0" cellpadding="0" cellspacing="2" bgcolor="#B4C2E2">
                    
                    <tr>
                        <td align="center">
                            <object id="mplayer"   classid="CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95" width="180"
                                codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,4,5,715"
                                align="baseline" border="0" standby="Loading Microsoft Windows Media Player components..."
                                type="application/x-oleobject" width=204>
                                <param name="FileName" id="FileName" runat="server" />
                                <param name="ShowControls" value="1">
                                <param name="ShowPositionControls" value="0">
                                <param name="ShowAudioControls" value="1">
                                <param name="ShowTracker" value="0">
                                <param name="ShowDisplay" value="0">
                                <param name="ShowStatusBar" value="1">
                                <param name="AutoSize" value="1">
                                <param name="DisplaySize" value="0">
                                <param name="ShowGotoBar" value="0">
                                <param name="ShowCaptioning" value="0">
                                <param name="AutoStart" value="1">
                                <param name="PlayCount" value="0">
                                <param name="AnimationAtStart" value="0">
                                <param name="TransparentAtStart" value="0">
                                <param name="AllowScan" value="0">
                                <param name="EnableContextMenu" value="1">
                                <param name="ClickToPlay" value="0">
                                <param name="InvokeURLs" value="1">
                                <param name="DefaultFrame" value="datawindow">
                                <embed id="Embed"  align="baseline" border="0"
                                    type="application/x-mplayer2" pluginspage="http://www.microsoft.com/isapi/redir.dll?prd=windows&amp;sbp=mediaplayer&amp;ar=media&amp;sba=plugin&amp;"
                                    name="MediaPlayer"
                                    >
            </embed>
                            </object>
                        </td>
                    </tr>
                </table>
                    </td>
                </tr>
            </table>

   </xiaoxiao:part>
                             
   
       <xiaoxiao:part  MultiInstance="False" class="Normal" Placement="Anywhere" Movable="True">
          <div id="tbMusicLink"  runat="server">
           <div id="Div5" class="blog_dragDiv">
    <table cellspacing="0" class="pheader" border="0" style="width: 100%" height="22">
        <tr>
            <td class="mod_tlc" width="6" nowrap>&nbsp;
                </td>
            <td width="100%" class="modhead">
                <table cellspacing="0" width="100%" class="fixedTable partheader" style="width: 100%">
                    <tr>
                        <td id="Td5" class="bold ellipse partDetail" nowrap>
                            <div class='ellipse'>
                               <%=Globals.Text["MusicFolder_MusicLink"]%></div>
                        </td>
                        <td class="partBuffer" align="right" nowrap>
                        </td>
                    </tr>
                </table>
            </td>
            <td class="mod_trc" width="6" nowrap>&nbsp;
                </td>
        </tr>
    </table>
</div>

          <table cellspacing="8" border="0" class="partsmb fixedTable">
                <tr>
                    <td class="ellipse" nowrap>
                        <table width="100%" >
                                            <tbody>
                                                <tr>
                                                    <td >
                                                        <%=Globals.Text["MusicFolder_MusicName"]%></td>
                                                    <td>
                                                        <asp:TextBox ID="txtLinkMusicName" runat="server"  MaxLength="800" Width="120px"></asp:TextBox></td>
                                                </tr>
                                                <tr>
                                                    <td>
                                                        <%=Globals.Text["MusicFolder_MusicAddress"]%></td>
                                                    <td align="left">
                                                        <asp:TextBox ID="txtLinkMusicAddress" runat="server" Width="120px"></asp:TextBox></td>
                                                </tr>
                                                <tr>
                                                    <td>
                                                        <%=Globals.Text["MusicFolder_Songer"]%></td>
                                                    <td>
                                                        <asp:TextBox ID="txtLinkSinger" runat="server"  MaxLength="100" Width="120px"></asp:TextBox>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td>
                                                    </td>
                                                    <td>
                                                        <cc1:XButton ResourceName="btn_Finish" ID="btnAddLink"      runat="server"   OnClientClick="return chkMusicLink();"/>
                                                        <script type="text/javascript">
                                                         function chkMusicLink()
                                                         {
                                                          var name =$('<%=txtLinkMusicName.ClientID %>');
                                                          var address=$('<%=txtLinkMusicAddress.ClientID %>');
                                                          if(name.value.trim()=='')
                                                          {
                                                          _error_msg_show('您忘了输入音乐名称了！');
                                                          return false;
                                                           }
                                                            if(address.value.trim()=='')
                                                          {
                                                          _error_msg_show('您忘了输入音乐地址了！');
                                                          return false;
                                                           }
                                                        
                                                         
                                                         }
                                                        </script>
                                                    </td>
                                                </tr>
                                            </tbody>
                                        </table>
                    </td>
                </tr>
            </table>
</div>
   </xiaoxiao:part>
   
      <xiaoxiao:part   multiinstance="True" class="FullRegionWidth" placement="Anywhere"  movable="True">
          <div  id="tbUpload" runat="Server">
           <div id="Div4" class="blog_dragDiv">
    <table cellspacing="0" class="pheader" border="0" style="width: 100%" height="22">
        <tr>
            <td class="mod_tlc" width="6" nowrap>&nbsp;
                </td>
            <td width="100%" class="modhead">
                <table cellspacing="0" width="100%" class="fixedTable partheader" 

style="width: 100%">
                    <tr>
                        <td id="Td4" class="bold ellipse partDetail" nowrap>
                            <div class='ellipse'>
                               <%=Globals.Text["MusicFolder_UploadMusic"]%></div>
                        </td>
                        <td class="partBuffer" align="right" nowrap>
                        </td>
                    </tr>
                </table>
            </td>
            <td class="mod_trc" width="6" nowrap>&nbsp;
                </td>
        </tr>
    </table>
</div>

          <table cellspacing="8" border="0" class="partsmb fixedTable">
                <tr>
                    <td class="ellipse" nowrap>
                         <table  >
                                                                    <tbody>
                                                                    <tr>
                                                    <td>
                                                       <%=Globals.Text["MusicFolder_MusicName"]%></td>
                                                    <td>
                                                        <asp:TextBox ID="txtUpMusicName" runat="server" MaxLength="100" Width="120px"></asp:TextBox></td>
                                                </tr>                  <tr>
                                                    <td>
                                                       标签:</td>
                                                    <td>
                                                         <asp:TextBox runat="server" ID="txtTags" style="width: 90px" />&nbsp;<a href="###"  onclick="openWindow('<%=Globals.ApplicationPath %>/include/TagSelector.aspx?TagEditor=SelectTags','210','350','选择标签', '选择标签');"  >选..</a>
                                                           &nbsp;
                                                            <cc1:SelectAllTags ID="hidTags" runat="server"  TagType="File" MaxTagNums="50"  ClearCache="true"/>
                                                             <script language="JavaScript" type="text/javascript" src="<%=Globals.ApplicationPath %>/Include/TagEditor.js"></script>
                                                            <script language="javascript">var SelectTags= new TagEditor('SelectTags', '<%=hidTags.ClientID %>', '<%=txtTags.ClientID %>');
                                                            
                                                            </script></td>
                                                </tr>
                                                              
                                                                        <tr>
                                                                        
                                                                            <td>
                                                                                <%=Globals.Text["MusicFolder_ChoiceMusic"]%></td>
                                                                            <td>
                                                                                <input style="width: 120px" class="tx1" type="file" name="file1" /></td>
                                                                        </tr>
                                                                        <tr>
                                                                            <td align="left">
                                                                               <%=Globals.Text["MusicFolder_Share"]%></td>
                                                                            <td align="left">
                                                                                <asp:DropDownList ID="upFileVisit" runat="server" onchange="showupFileVisititem()" Width="120px">
                                                                                    <asp:ListItem Value="0" Selected="True">无偿共享</asp:ListItem>
                                                                                    <asp:ListItem Value="1">有偿共享</asp:ListItem>
                                                                                </asp:DropDownList>

                                                                                <script>
                                   
                                                                                 function showupFileVisititem()
                                                                                 {
                                                                                 if($('<%=upFileVisit.ClientID %>').value =="1" ){ $('<%=upVisitItem.ClientID %>').style.display = "block";} else{ $('<%=upVisitItem.ClientID %>').style.display = "none";} 
                                                                                 }
                                                                                </script>

                                                                            </td>
                                                                        </tr>
                                                                        <tr style="display: none" id="upVisitItem" runat="server" name="upVisitItem">
                                                                            <td align="left">
                                                                               <%=Globals.Text["MusicFolder_Fees"]%>
                                                                            </td>
                                                                            <td align="left">
                                                                                <asp:TextBox ID="txtUpFilePrice" runat="server" Width="120px" Text="0"></asp:TextBox>
                                                                                <asp:DropDownList ID="dropPriceType" runat="server" Width="120px">
                                                                                    <asp:ListItem Value="1" Selected="true">银豆</asp:ListItem>
                                                                                    <asp:ListItem Value="2">金豆</asp:ListItem>
                                                                                    <asp:ListItem Value="3">金砖</asp:ListItem>
                                                                                </asp:DropDownList>
                                                                            </td>
                                                                        </tr>
                                                                        <tr>
                                                                            <td align="left" valign="top">
                                                                               <%=Globals.Text["MusicFolder_Songer"]%></td>
                                                                            <td align="left">
                                                                                <asp:TextBox ID="txtUpSinger" runat="server" MaxLength="100"  Width="120px"></asp:TextBox>
                                                                            </td>
                                                                        </tr>
                                                                        <tr>
                                                                            <td>
                                                                            </td>
                                                                            <td align="left">
                                                                                <cc1:XButton ResourceName="btn_Finish"  ID="btnUpload" runat="server"   OnClientClick="return chkUpload()" />
                                                                                 <script type="text/javascript">function chkUpload(){var fname=$('file1');if(!fname||fname.value.trim()==''){_error_msg_show('您忘了选择上传的文件了！');return false;} try{openProgress();}catch(err){}}</script>
                                                                            </td>
                                                                        </tr>
                                                                    </tbody>
                                                                </table>
                    </td>
                </tr>
            </table>
           </div>
             </xiaoxiao:part>
                            </td>
                        </tr>
                    </table>
                </div>
            </td>
        </tr>
    </table>
</skm:Form>