<%@ Page language="c#" Codebehind="uploadcode.aspx.cs" AutoEventWireup="True" Inherits="Webdisk.lUploadCode" %>
<!DOCTYPE HTML >
<HTML>
	<HEAD>
		<title>设置上传码</title>
		<% @ Import Namespace="Webdisk" %>
		<link href="<%=xml.GetStyle()%>" type="text/css" rel="stylesheet"/>
	    <link rel="stylesheet" type="text/css" href="themes/icon.css"/>
		<link href="css/webdialog.css" type="text/css" rel="Stylesheet">
	    <script type="text/javascript" src="js/jquery-1.7.1.min.js"></script>
		<link href="css/jquery.datepick.css" type="text/css" rel="stylesheet">
	    <script src="js/jquery.plugin.min.js" type="text/javascript"></script>
	    <script src="js/jquery.datepick.min.js" type="text/javascript"></script>
		<script src="js/jquery.zclip.min.js" type="text/javascript"></script>
		<script language="javascript" type="text/javascript"> 
			
	    function closeWindow(flag) {
	        if (window.top.closeWindow) {
	            if (flag) {
	                window.top.closeWindow(flag);
	            } else {
	                window.top.closeWindow();
	            }
	        } else {
	            window.close();
	        }
	    }
		$(function(){
			$.datepick.setDefaults({prevText:"上月",todayText :"今天",clearText:"清除",nextText:"下月",closeText:"关闭",dateFormat :"yyyy-mm-dd",dayNamesMin :["日","一","二","三","四","五","六"],
			monthNames:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"]});
			$('#UploadCodeTime').datepick({minDate:new Date()});
			$("#butcopy").zclip({
				path: "js/ZeroClipboard.swf",
				copy: function(){
					return $.trim($("#uploadlink").val());
		　　　 　　},
					afterCopy:function(){
						$("#copyTip").html("复制上传链接成功").animate({opacity:"1"},3000,function(){$(this).html("");});
					}
				});
		});
			</script>
	</HEAD>
	<body>
	<form runat="server">
			<TABLE class="wfrom-table">
				<tbody>
				
				<TR >
					<TD  class="label" style="  width: 90px;">
						文件夹名称：
						
					</TD>
					<TD >
						<%=dirname%>
					</TD>
				</TR>
				<TR >
					<TD class="label">
						失效时间：
					</TD>
					<TD>
						
						<input type="text" size="15" style="width:150px;" id="UploadCodeTime" runat="server" class="input-text" readOnly/>
						<span class="wtc-f00"></span>
					   <!-- <%--<INPUT class="input-text" id="UploadCodeTime" type="text" name="UploadCodeTime" runat="server"
									onfocus="CalendarWebControl.show(this,this.value);">&nbsp; 
								<asp:RequiredFieldValidator id="RequiredFieldValidator1" runat="server" ErrorMessage="请输入失效时间" ControlToValidate="UploadCodeTime"
									Display="Dynamic"></asp:RequiredFieldValidator>--%>-->
					
					</TD>
				</TR>
				<TR >
					<TD class="label">
						上传密码：
					</TD>
					<TD >
						<INPUT class="input-text" id="code" type="text" size="21" name="code" runat="server">
								(上传码上传时需要输的密码)
								<asp:RequiredFieldValidator id="RequiredFieldValidator2" runat="server" ErrorMessage="请输入密码" ControlToValidate="code"
									Display="Dynamic"></asp:RequiredFieldValidator>
						</div>
					</TD>
				</TR>
				<TR  id="link" runat="server">
					<TD  class="label">
						上传链接：
					</TD>
					<TD ><TEXTAREA class="input-textarea" id="uploadlink" name="uploadlink" rows="3" readOnly cols="33" runat="server">				</TEXTAREA>&nbsp;<br>
							(除输上传密码外也可以直接发送此链接上传) 
					</TD>
				</TR>
				<TR >
					<TD  colspan="2"><div class="wtips"><img src="pics/tip.gif" align="absMiddle">&nbsp;可以将某个目录设置指定的上传密码，在首页上传页面输入密码进行直接上传，也可以直接发送上传链接给对方。</div>
					</TD>
				</TR>
				<TR >
					<TD  class="label">
						<LABEL class="fieldlabel" attrib="fieldlabel" datafield="exp_time"></LABEL>
					</TD>
					<TD style="position:relative;"><label class="fieldlabel" attrib="fieldlabel" datafield="exp_time"></label>
					  <input class="wbtn-1" id="butnext" type="button" value="下一步" name="butnext" onClick="if($.trim($('#UploadCodeTime').val())==''){$('#UploadCodeTime').next().html('失效时间不能为空');return false;}" runat="server" onserverclick="butnext_ServerClick">
					  <input class="wbtn-1" id="butcopy" type="button" value="复制地址" name="butcopy" runat="server">
					  &nbsp;
					  <input class="wbtn-1" id="butsend" type="button" value="发送通知" name="butsend" onClick="javascript:window.location='sendcode.aspx?type=2&amp;code='+document.all.code.value" runat="server">&nbsp;
					  <asp:Button ID="butcancel" runat="server" Text="取消设置" CssClass="wbtn-2" onclick="butcancel_Click"></asp:Button>&nbsp;
						<input class="wbtn-2" onClick="closeWindow();" type="button" value=" 关 闭 ">
					<span id="copyTip" style="height:30px;color:#1DA7DD;"></span>
				  </TD>
				</TR>
						
				</tbody>
			</TABLE>
					
		</form>                                                          
	</body>
</HTML>
