add.asp

来自「房地产管理系统 vb写的,很不错!!!!!!!!!!!」· ASP 代码 · 共 181 行

ASP
181
字号
<!--#include file="Config.asp" -->
<%
Dim NowPath
NowPath=Request("NowPath")
%>
<html>
<head>
<title>操作</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="images/style.css" rel="stylesheet" type="text/css">
<script language="JavaScript" type="text/JavaScript">
<!--
function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);
//-->
</script>
</head>
<SCRIPT LANGUAGE="JavaScript">
<!--
function CheckFolderForm()
{
	if(form2.Floder.value=="")
	{
		alert("请输入目录名");
		return false;
	}else{
		return true;
	}	
}

function CheckFileForm()
{
	if(form1.Title.value=="")
	{
		alert("[标题]不能为空");
		return false;
	}
	if(form1.file.value=="")	
	{
		alert("请您选择[文件]");
		return false;
	}else{
		Layer1.style.visibility='hidden';	
		UploadingLayer.style.visibility='visible';		
		LoadingStart=true;
		return true;
	}
}
var LoadingStart=false;
//-->
</SCRIPT>
<body bgcolor="#CCCCCC" text="#000000">
<div id="Layer1" style="position:absolute; left:10px; top:195px; width:285px; height:86px; z-index:1">
<form action="AddFile.asp" method="post" enctype="multipart/form-data" name="form1" onsubmit="return CheckFileForm();">
  <table width="100%" border="0" cellpadding="0" cellspacing="0">
    <tr>
      <td height="127" align="center" valign="top"><table width="100%" height="149" border="0" cellpadding="5" cellspacing="0">
            <tr> 
              <td height="10"> 资源: 
                <input name="file" type="file"  class="box1" size="18"> </td>
            </tr>
            <tr> 
              <td height="5">标题: 
                <input name="Title" type="text" id="Title2" size="30" class="box1">
                <input name="NowPath" type="hidden" id="NowPath3" value="<%=NowPath%>">
              </td>
            </tr>
            <tr>
              <td height="6" align="center"><input type="submit" name="Submit2" value=" 确 定" class="box1">
                &nbsp; 
                <input name="Submit32" type="button" class="box1" id="Submit35" value="取 消" onClick="window.close()">
                <strong></strong></td>
            </tr>
            <tr> 
              <td height="58">当前操作:上传资源<br>
                限制文件大小&nbsp;:&lt;=&nbsp;<b><%=File_MaxSize%></b>(Byte)<br>
                限制文件类型: 
                <%
				fType=Split(TypeOfFile_Enable,"#",-1,1)
				For I=0 To Ubound(fType)
					Response.Write(fType(I)&"&nbsp;")
				Next
				%>
              </td>
            </tr>
          </table></td>
    </tr>
  </table>
</form>  
</div>
<div id="Layer2" style="position:absolute; left:11px; top:63px; width:283px; height:107px; z-index:2"> 
<form action="AddFolder.asp" method="post" name="form2" id="form2" onsubmit="return CheckFolderForm();">
    <table width="100%" height="79" border="0" align="center" cellpadding="5" cellspacing="0">
      <tr> 
        <td align="center"> 目录名: 
          <input name="Floder" type="text" class="box1" id="Floder2" size="28">
        </td>
      </tr>
      <tr>
        <td align="center"><input name="Submit" type="submit" class="box1" id="Submit3" value="确 定">
          &nbsp; 
          <input name="Submit3" type="button" class="box1" id="Submit33" value="取 消" onClick="window.close()"> 
          <input name="NowPath" type="hidden" id="NowPath" value="<%=NowPath%>">
        </td>
      </tr>
      <tr> 
        <td>当前操作:增加目录<br>
          目录规定:不允许同名</td>
      </tr>
    </table>
</form>  
</div>
<div id="UploadingLayer" style="position:absolute; left:12px; top:371px; width:282px; height:249px; z-index:3; background-color: #CCCCCC; layer-background-color: #CCCCCC; border: 1px none #000000;cursor:wait" onMouseOver="if(LoadingStart){LoadingStart=false;LoadingBar.src='images/LoadingBar.gif';}">
  <div align="center"> 
    <p><strong><font color="#3300FF"><br>
      </font></strong></p>
    <table width="75%" border="0" cellpadding="5" cellspacing="0">
      <tr> 
        <td height="24" align="center"><strong><font color="#3300FF"> 数据上传中,请耐心等侍...<br>
          文件越大,上传的时间就越长</font></strong></td>
      </tr>
      <tr>
        <td height="20" align="center"><strong><font color="#3300FF"><img src="images/LoadingBar.gif" width="94" height="20" id="LoadingBar"></font></strong></td>
      </tr>
    </table>
    <p><strong><font color="#3300FF"> </font></strong></p>
    <p>
      <input type="button" name="Submit4" value="取 消" onClick="window.close()">
    </p>
  </div>
</div>
<table width="99%" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr> 
    <td align="center"><INPUT name="button1" id="AddFolderBut" TYPE="button" class="box1" onclick="AddType(2)" value="新建目录"> 
      &nbsp;&nbsp; <INPUT name="button2" id="AddFileBut" TYPE="button" class="box1" onclick="AddType(1)" value="添加文件"></td>
  </tr>
</table>
<SCRIPT LANGUAGE="JavaScript">
<!--
var type;
Layer1.style.visibility='hidden';
Layer2.style.visibility='hidden';
UploadingLayer.style.visibility='hidden';
Layer1.style.top=40;
Layer2.style.top=40;
UploadingLayer.style.top=1;
function AddType(n)
{
	type=n
	if(n==1)
	{
		Layer1.style.visibility='visible';
		Layer2.style.visibility='hidden';
		AddFolderBut.className="box1";
		AddFileBut.className="box2";		
	}

	if(n==2)
	{
		AddFolderBut.className="box2";
		AddFileBut.className="box1";
		Layer1.style.visibility='hidden';
		Layer2.style.visibility='visible';			
	}
}
<%
Select Case Request("Work")
	Case "File"
		Response.Write("AddType(1);")
	Case "Folder"
		Response.Write("AddType(2);")	
End Select
%>
//-->
</SCRIPT>
</body>
</html>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?