⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 add_down.asp

📁 网络办公系统源码
💻 ASP
字号:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!--#include file="../../config.asp"-->
<!--#include file="../checklogin.asp"-->
<%
if  ChkAdmin("oa_adddown")=False then
   call message("您没有上传资料的权限","back")
   call endexit()
end if
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>无标题文档</title>
<link href="../img/css1.css" type=text/css rel=stylesheet>
<style type="text/css">
<!--
body {
	margin-left: 0px;
	margin-top: 0px;
	margin-right: 0px;
	margin-bottom: 0px;
}
.style1 {
	color: #FFFFFF;
	font-weight: bold;
}
-->
</style>
</head>
<%
act=request.QueryString("act")
uid=Session("AdminID")'发不者id
companyid=Session("companyid")'公司id
uname=trim(session("truename"))
addtime=date()
title=replace(trim(request.Form("title")),"'","")
filepath=replace(trim(request.Form("filepath")),"'","")
downid=replace(trim(request.Form("downid")),"'","")
insql="insert into oa_down(downid,uname,title,filepath,addtime,companyid) "& _
"values("&downid&",'"&uname&"','"&title&"','"&filepath&"','"&addtime&"',"&companyid&")"
	if act="add" then
		conn.execute(insql)
		call Message("发布成功","downlist.asp")
	end if
%>
<body>
<form name="myform" method="post" action="add_down.asp?act=add" onSubmit="return CheckForm();">
<table width="99%"  border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#F2F2F2" class="tabel1">
  <tr align="left" bgcolor="#CC0000">
    <td height="25" colspan="2"><span class="style1"> 下载 </span></td>
  </tr>
  <tr bgcolor="#F9F9F9">
    <td height="25" align="center">选择类别</td>
    <td height="25" align="left"><select name="downid" id="downid">
      <option value="">选择类别</option>
      <%
	  	sql="select id, classname from oa_downclass where companyid="&session("companyid")
		set rs=conn.execute(sql)
		do while not rs.eof
	  %>
      <option value="<%=rs("id")%>"><%=rs("classname")%></option>
      <%
	  rs.movenext
	  loop
	  rs.close
	  set rs=nothing
	  %>
    </select></td>
  </tr>
  <tr bgcolor="#F9F9F9">
    <td width="13%" height="25" align="center">资料上传人</td>
    <td width="87%" height="25" align="left"><input name="uname" type="text" class="tabel1" id="uname" value="<%=trim(session("truename"))%>" readonly="true"></td>
  </tr>
  <tr bgcolor="#F9F9F9">
    <td height="25" align="center">上传时间</td>
    <td height="25" align="left"><input name="addtime" type="text" class="tabel1" id="addtime" value="<%=date()%>" readonly="true"></td>
  </tr>
  <tr bgcolor="#F9F9F9">
    <td height="25" align="center"> 资料标题</td>
    <td height="25" align="left"><input name="title" type="text" class="tabel1" id="title" size="50">
      *</td>
    </tr>
  
  <tr bgcolor="#F9F9F9">
    <td height="25" align="center"> 选择文件</td>
    <td height="25" align="left"><span class="TableRow2">
      <input name="filepath" type="text" class="tabel1" id="filepath" size="40"  value="">
      <input class="tabel1" type="button" name="up_pick" value="上传文件" onclick="window.open('../Up_Pic.asp?formname=myform&editname=filepath&uppath=../UpLoad/oadown&filelx=all','','status=no,scrollbars=no,top=20,left=110,width=420,height=165')">
(图片,rar,doc,xls文件不操作1M )    </span></td>
    </tr>
  <tr bgcolor="#F9F9F9">
    <td height="25" align="center">&nbsp;</td>
    <td height="25" align="left"> 
 
   
  <input name="Submit2" type="submit" class="bon" value="提交">
 
  <input name="Submit3" type="reset" class="bon" value="重置">
 
<input name="Submit32" type="button" class="bon" value="返回" onClick="window.history.go(-1)"></td>
  </tr>
</table>
</form>
</body>
</html>
<%
	set conn=nothing
%>
<script language="javascript">
function CheckForm()
{
    var objFrm=document.myform;
	if(objFrm.downid.value=="")
	{
		alert("请选者分类!");
		objFrm.downid.focus();
		return false;
	}
	if(objFrm.title.value=="")
	{
		alert("请输入标题说明!");
		objFrm.title.focus();
		return false;
	}
	if(objFrm.filepath.value=="")
	{
		alert("请选择上传文件!");
		objFrm.filepath.focus();
		return false;
	}
	return true;

}
</script>

⌨️ 快捷键说明

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