📄 up.aspx
字号:
<%@ page language="C#" autoeventwireup="true" inherits="up, App_Web_1boswiye" %>
<html xmlns="http://www.w3.org/1999/xhtml" >
<head id="Head1" runat="server">
<title></title>
<!----------------------------以下为脚本区,请务改动----------------->
<script type="text/javascript" language="javascript">
function makeRequest(url,src)
{
kuangjia=1;
var http_request = false;
if (window.XMLHttpRequest)
{ // Mozilla, Safari,
http_request = new XMLHttpRequest();
if (http_request.overrideMimeType) {http_request.overrideMimeType('text/xml');}
}
else if(window.ActiveXObject)
{ // IE
try
{
http_request = new ActiveXObject("Msxml2.XMLHTTP");
}
catch (e)
{
try
{
http_request = new ActiveXObject("Microsoft.XMLHTTP");
}
catch (e)
{
}
}
}
if (!http_request)
{
alert('无法建立连接');
return false;
}
http_request.onreadystatechange = function(){ alertContents(http_request,src) }
http_request.open('GET', url, true);
http_request.send(null);
}
function alertContents(http_request,src)
{
if (http_request.readyState == 4)
{
if (http_request.status == 200) {src.innerHTML= http_request.responseText;}
else {src.innerHTML='服务器忙,无法回应';}
kuangjia=0;
}
}
var kuangjia=0;
var made=0;
var ExtenName=<% Response.Write("'"+ class1.ExtenName+"'"); %>
function window.onbeforeunload()
{
made=made+1;
if(made==3){ return '离开页面将使文件上传终止'; }
}
function ToggleVisibility(id, type)
{
td1.style.border ='';
div1.style.display ='none';
td2.style.border ='';
div2.style.display ='none';
if(document.getElementById('AttachFile').value=='')
{
td1.style.border ='#ff0000 thin solid';
div1.style.display ='block';
div1.innerHTML='您没选择文件';
return false;
}
var s=document.getElementById('AttachFile').value;
var s=s.toString();
var i=s.length;
while(s.substring(i,i+1)!='.' && i>0)
{
i=i-1;
}
if(i==0)
{
td1.style.border ='#ff0000 thin solid';
div1.style.display ='block';
div1.innerHTML='文件名格式不对,请重新选择';
return false;
}
if(ExtenName.indexOf(s.substring(i,s.length).toLowerCase())!=-1)
{
td1.style.border ='#ff0000 thin solid';
div1.style.display ='block';
div1.innerHTML='无法支持'+s.substring(i,s.length)+'格式文件';
return false;
}
s=document.getElementById('AttachFile').value.toString();
if(s.indexOf("'")!=-1 || s.indexOf(" ")!=-1 || s.indexOf("<")!=-1 || s.indexOf(">")!=-1 || s.indexOf(";")!=-1)
{
td1.style.border ='#ff0000 thin solid';
div1.style.display ='block';
div1.innerHTML='无法支持带引号,空格,尖括号,分号的文件名';
return false;
}
s=document.getElementById('TextBox3').value;
if(s.indexOf("'")!=-1 || s.indexOf(" ")!=-1 || s.indexOf("<")!=-1 || s.indexOf(">")!=-1 || s.indexOf(";")!=-1)
{
td2.style.border ='#ff0000 thin solid';
div2.style.display ='block';
div1.innerHTML='无法支持带引号,空格,尖括号,分号的密码';
return false;
}
if(document.getElementById('TextBox3').value!=document.getElementById('TextBox4').value)
{
td2.style.border ='#ff0000 thin solid';
div2.style.display ='block';
return false;
}
el = document.getElementById(id);
if(type == 'on')
{
el.style.display = 'block';
file.style.display ='none';
window.setInterval(getp,1000);
made=made+1;
}
else
{
el.style.display = 'none';
file.style.display ='block';
}
}
function c_click()
{
if(document.getElementById('Checkbox1').checked==true)
{
tr1.style .display ='block';
tr2.style .display ='block';
tr3.style .display ='block';
tr4.style .display ='block';
}
else
{
tr1.style .display ='none';
tr2.style .display ='none';
tr3.style .display ='none';
tr4.style .display ='none';
document.getElementById('TextBox3').value='';
document.getElementById('TextBox4').value='';
}
div3.style.left =parseInt((document.body.clientWidth-div3.offsetWidth)/2);
div3.style.top =parseInt((document.body.clientHeight-div3.offsetHeight)/2);
div4.style.left=div3.style.left;
div4.style.width =div3.offsetWidth;
div4.style.top =div3.style.top;
div4.style.height=div3.offsetHeight;
}
function jixu_click()
{
tishi.style.display ='none';
file.style.display ='block';
}
function duiqi()
{
document.getElementById("div3").style.left =parseInt((document.body.clientWidth-div3.offsetWidth)/2);
document.getElementById("div3").style.top =parseInt((document.body.clientHeight-div3.offsetHeight)/2);
document.getElementById("div4").style.left=div3.style.left;
document.getElementById("div4").style.width =div3.offsetWidth;
document.getElementById("div4").style.top =div3.style.top;
document.getElementById("div4").style.height=div3.offsetHeight;
}
function getp()
{
if(kuangjia==1)return;
var url='<% Response.Write(class1.up); %>p.aspx?UploadID1=<% Response.Write(UploadID.Value.Trim()); %>&mode=1';
makeRequest(url,p);
}
</script>
<!----------------------------以上为脚本区,请务改动----------------->
</head>
<body style =" text-align : center ; vertical-align : middle ; margin : 0px ; color : #ffffff ; font-size : 16px" link="#000000" vlink="#000000">
<script type="text/javascript" >
var app=navigator.appName;
var verStr=navigator.appVersion;
if (app.indexOf('Microsoft') == -1 || verStr.indexOf("MSIE 3.0")!=-1 || verStr.indexOf("MSIE 4.0") != -1 || verStr.indexOf("MSIE 5.0") != -1 || verStr.indexOf("MSIE 5.1") != -1){alert("您的使用的浏览器可能无法完全支持该网页\n建议使用微软的ie6或以上浏览器");}
</script>
<!----------------------------以下为注册用户进入接口----------------->
<div style="position:absolute; left:expression(document.body.clientWidth-125); top:0px; width:125px;height:20px;z-index:1 ; text-align : right"><a href ='vip-login.aspx' style =" color : #ffffff ; text-decoration : none">登陆</a><a href ='vip-login.aspx'><img src ="images/user.png" alt="" style =" border : 0px ; vertical-align : middle"/></a></div>
<!----------------------------以上为注册用户进入接口----------------->
<div id="div3" style="position:absolute;z-index:1 ; border-right: #75b8af thin solid; border-top: #75b8af thin solid; border-left: #75b8af thin solid; border-bottom: #75b8af thin solid; margin : 0px ; width : 420px">
<!----------------------------以下为主程序区,请勿改动----------------->
<form id="form1" runat="server" onsubmit ="return ToggleVisibility('p','on');" style =" margin : 0px" action ="up.aspx?UploadID=<% Response.Write(UploadID.Value); %>">
<div id="tishi">
<table border ="0" cellpadding ="0" cellspacing ="0" runat="server" id="t1" visible ="false">
<tr><td>您的文件已成功上传,它储存在</td></tr>
<tr><td><a id="h1" runat ="server" target ="_blank"></a></td></tr>
<tr><td>复制已下地址,可发布文件</td></tr>
<tr><td><asp:TextBox ID="TextBox1" runat="server" Width="480px"></asp:TextBox></td></tr>
<tr>
<td>
<input type ="text" value="在此输入邮箱地址,发送邮件提醒好友" id="Address" style="width: 256px" onmousedown="document.getElementById('Address').value='';"/><input type ="button" value="发送" onclick="email_huifu.innerHTML='正在发送邮件...';makeRequest('<% Response.Write(class1.up); %>user/send_mail.aspx?Address='+escape(document.getElementById('Address').value)+'&file=<% Response.Write(id); %>',email_huifu);"/>
<div id="email_huifu"></div>
</td>
</tr>
<tr><td>要继续上传文件,请点<input id="Button1" type="button" value="继续" onclick ="jixu_click()" style="border-right: #4a95c9 thin solid; border-top: #4a95c9 thin solid; border-left: #4a95c9 thin solid; width: 58px; color: #ffffff; border-bottom: #4a95c9 thin solid; background-color: transparent"/></td></tr>
</table>
</div>
<div id="file" runat ="server">
<input id="UploadID" type="hidden" runat ="server"/>
最大可上传<asp:Label ID="maxl" runat="server" Text="Label"></asp:Label>的文件,并受<a href ="http://www.797net.com/n-save/shuoming.htm" target ="_blank" >系统设定和服务条款</a>制约。<br />
<table border ="0" cellpadding ="0" cellspacing ="0">
<tr><td>选择文件</td><td id="td1"><asp:FileUpload ID="AttachFile" runat="server" /><div style =" color :#ff0000 ; display : none" id="div1">您还没选择文件</div></td></tr>
<tr><td></td><td><input id="Checkbox1" type="checkbox" onclick ="c_click();"/>为文件设置下载密码</td></tr>
<tr id="tr1" style ="display : none;">
<td>输入密码</td>
<td><asp:TextBox ID="TextBox3" runat="server" TextMode="Password" Width="200px" MaxLength="16"></asp:TextBox>16位</td>
</tr>
<tr id="tr2" style ="display : none;"><td></td><td>输入16位密码,如果不输将完全开放</td></tr>
<tr id="tr3" style ="display : none;">
<td style="height: 25px">确认密码</td>
<td id="td2" style="height: 25px"><asp:TextBox ID="TextBox4" runat="server" TextMode="Password" Width="200px" MaxLength="16"></asp:TextBox>16位<div id="div2" style =" color :#ff0000 ; display : none;">两次密码必须相同</div></td>
</tr>
<tr id="tr4" style ="display : none;"><td></td><td >确认一次密码</td></tr>
</table>
<table border="0" cellpadding ="0" cellspacing ="0" style="width : 100%">
<tr>
<td><asp:Button ID="Upload" runat="server" Text="上传" OnClick="Upload_Click" style=" margin-left : 180px ; border-right: #4a95c9 thin solid; border-top: #4a95c9 thin solid; border-left: #4a95c9 thin solid; width: 58px; color: #ffffff; border-bottom: #4a95c9 thin solid; background-color: transparent"/></td>
<td style="width : 80px ; text-align : right ; vertical-align : bottom"><a href="http://www.797net.com/n-save/mini.aspx" target ="_blank" style="color : #000099 ; font-size : 14px">引用此功能</a></td>
</tr>
</table>
</div>
</form>
<div id="p" style=" width : 450px ; height : 22px ; text-align : left ; display : none"></div>
<!----------------------------以上为主程序区,请勿改动----------------->
</div>
<div id="div4" style="position:absolute; background-color : #0075a3 ;filter: Alpha(Opacity=40, Style=0);"></div><script type="text/javascript" >window.setInterval(duiqi,50);</script>
<!----------------------------以下是版权信息,请务更改----------------->
<div style="position:absolute; left:0px;top:expression(document.body.clientHeight-20); width:100%;height:20;z-index:1 ; text-align : right ;">
<table border ="0" cellpadding ="0" cellspacing ="0" width ="100%">
<tr>
<td style =" text-align : left ; color : #666666"><a href="http://www.797net.com" target ="_blank" style ="color : #666666 ; text-decoration:none">制造商:797net</a></td>
<td style =" text-align : right"><asp:Label ID="banbeng" runat="server" Text="Label"></asp:Label></td>
</tr>
</table>
</div>
<!----------------------------以上是版权信息,请务更改----------------->
<!----------------------------以下是背景----------------->
<div style=" height : 100% ; width : 100% ; margin : 0px ; border :0px ; filter:progid:dximagetransform.microsoft.alphaimageloader(src='images/vista.jpg',sizingmethod='scale') ; text-align : left ; "><img src="images/logo.gif" alt="" style="filter: Alpha(Opacity=20, Style=0);"/></div>
<!----------------------------以上是背景----------------->
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -