<%@ Page CodeBehind="code.aspx.cs" Language="c#" AutoEventWireup="True" Inherits="Webdisk.code" %>
<!DOCTYPE HTML  >
<HTML style="overflow:hidden">
	<HEAD>
		<% @ Import Namespace="Webdisk" %>
		<link href="<%=xml.GetStyle()%>" rel="stylesheet" type="text/css">
		<link href="css/webdialog.css" type=text/css rel="stylesheet">
        <script src="js/jquery-1.7.1.min.js" type="text/javascript"></script>
        <script src="js/Common.js" type="text/javascript"></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 parseDate(dateStr) {
			        if (dateStr.indexOf("-") > 0) {
			            var strArray = dateStr.split("-");
			            if (strArray.length == 3 && strArray.length > 0) {
			                return new Date(strArray[0], strArray[1]-1, strArray[2]);
			            } else {
			                return new Date();
			            }
			        } else {
			            return new Date();
                    }
			    } 
				function closeWindow(flag){
					if(window.top.closeWindow ){
						if(flag){
							window.top.closeWindow("转发文件成功！");
						}else{
							window.top.closeWindow();
						}
					}else{
						history.go(-1)
					}
				}
				$(function(){
					$.datepick.setDefaults({prevText:"上月",todayText :"今天",clearText:"清除",nextText:"下月",closeText:"关闭",dateFormat :"yyyy-mm-dd",dayNamesMin :["日","一","二","三","四","五","六"],
					monthNames:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"]});
					$('#PickTime').datepick({minDate:new Date()});
					$("#copy").zclip({
						path: "js/ZeroClipboard.swf",
						copy: function(){
							return $.trim($("#txtLink").val());
				　　　 　　},
							afterCopy:function(){
								$("#copyTip").html("复制链接地址成功").animate({width:"100%"},3000,function(){$(this).html("");});
							}
						});
					$("#pickcode").focus();/**/
				});
			</script>
            <title>设置文件提取码</title>
		
	</HEAD>
	<body style="overflow:hidden">
		<form runat="server" id="form">
			<table class="wfrom-table" runat="server" id="step1">
				<tbody>
					<tr>
						<td colspan="2">
						<span class="input-label">以下是您选中的文件：</span>
							<asp:listbox id="ListBox1" runat="server" class="input-select multiple" width="100%" height="120px"></asp:listbox>
						</td>
					</tr>
					<tr>
						<td class="label" style="width:80px;">设置提取码：</td>
						<td>
							<input id="pickcode" class="input-text" type="text" size="21" name="pickcode" runat="server">（可以是中文、字母、数字、符号）
							<asp:requiredfieldvalidator id="RequiredFieldValidator4" runat="server" errormessage="请输入提取码" enableviewstate="False" controltovalidate="pickcode" display="None"></asp:requiredfieldvalidator>
						</td>
					</tr>
					<tr>
						<td class="label" style="width:80px;">失效时间：</td>
						<td>
							<input name="PickTime" class="input-text" readonly type="text" id="PickTime" size="21" runat="server"><span class="wtc-f00"></span>
						</td>
					</tr>
					<tr style="display:none;" id="link" runat="server">
						<td class="label" style="width:80px;">提取链接：</td>
						<td>
							<textarea class="input-text" id="uploadlink" name="uploadlink" rows="3" readonly="" cols="33" runat="server"></textarea>(除输提取密码外也可以直接发送此链接提取)</td>
					</tr>
					<tr>
						<td colspan="2">
							<div class="wtips">
							<img src="pics/tip.gif" align="absMiddle"> 此处可以将选定的文件设置提取密码，可在提取页面处输入提取码或直接发送提取链接给对方。
							</div></td>
					</tr>
					<tr>
						<td  colspan="2">
							<input class="wbtn-1" id="Submit2" style="width:80px;" type="button" value="下一步" name="submit2" runat="server" onClick="if($.trim($('#PickTime').val()) == ''){$('#PickTime').next().html('失效时间不能为空').animate({opacity:'1'},2000,function(){$(this).html('');});return false;}" onserverclick="Submit2_ServerClick">
							<input class="wbtn-1" id="butcopy" onclick="javascript:std_playUrl(document.all.uploadlink.value);" type="button" value="复制地址" name="butcopy" runat="server">
							<input class="wbtn-1" id="butsend" style="width:80px;" type="button" value="发送通知" name="butsend" runat="server" onclick="javascript:window.location='sendcode.aspx?type=1&code='+document.all.pickcode.value">
							<input class="wbtn-2" id="Submit3" style="width:80px;" type="button" value="取消" name="submit3" onclick="closeWindow();">
							<span class="wtc-f00" id="Errors"></span>
						</td>
					</tr>
				</tbody>
			</table>
			<table class="wfrom-table"  runat="server" id="step2" visible="false">
				<tbody>
					<tr>
						<td class="label">提取链接 ：</td>
						<td style="position:relative;">
							<input type="text" id="txtLink" runat="server" name="" class="input-text" style="width:400px;" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
							<a class="wbtn-1" id="copy" style="width:">复制</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
							<a class="wbtn-2" href="javascript:closeWindow()">返回</a>
							<br>
							<span id="copyTip" style="height:30px;display:block;margin-top:10px;color:#1DA7DD;"></span>
						</td>
					</tr>
					<tr>
						<td colspan="2">
							<div style="margin:30px 150px;">
								<img src="images/wimg-3.png" style="float: left;margin-right: 30px;"/>
								<div class="wff-yahei wtc-333" style="line-height: 30px;padding-top: 10px;">
									<a style="color:#333;text-decoration:none;cursor:pointer;"  onclick="javascript:window.location.href='sendcode.aspx?type=1&code='+$('#pickcode').val()"><b class="" style="font-size:24px;">发送通知</b></a><br>
									<span class="">给班级、科室、用户发送系统消息通知</span>
								</div>
							</div>
						</td>
					</tr>
				</tbody>
			</table>
		</form>
	</body>
</HTML>
