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

📄 adminsave.asp

📁 网佳网络办公系统(以下简称OA)是一套基于B/S模式的无纸化办公系统。[显著特点:无须安装客户端] 主要功能模块:管理 公文 车辆 通知 档案 值班 人事 审批 仓库 主界面 软件下载 个
💻 ASP
字号:
<%
  	if session("admin")="" then
  		response.redirect "admin.asp"
  	end if
%>
<!--#include file="conn.asp"-->
<!--#include file="../inc/char.asp"-->
<!--#include file="../inc/const.asp"-->
<%
	dim filename,filename1,filename2
	dim showname
	dim classid
	dim Nclassid
	dim note
	dim sql
	dim rs
	dim hot
	dim system
	dim fromurl
	dim size
        dim images
	dim order
	dim hots
	dim hide
	dim founderr
	founerr=false
	if trim(request.form("txtfilename"))="" then
  		founderr=true
  		errmsg="<li>下载的软件地址不能为空</li>"
	end if
	if trim(request.form("txtshowname"))="" then
  		founderr=true
  		errmsg=errmsg+"<li>显示名称不能为空</li>"
	end if
	if trim(request.form("txtnote"))="" then
  		founderr=true
  		errmsg=errmsg+"<li>软件简介不能为空</li>"
	end if

	if founderr=false then
		filename=request("txtfilename")
		filename1=request("txtfilename1")
		filename2=request("txtfilename2")
		showname=htmlencode2(request("txtshowname"))
		classid=request("classid")
		Nclassid=request("Nclassid")
		note=htmlencode2(request("txtnote"))
		hot=htmlencode2(request("hot"))
		system=htmlencode2(request("system"))
		size=htmlencode2(request("size"))
                images=request("images")
		fromurl=htmlencode2(request("fromurl"))
		order=htmlencode2(request("order"))
		if request.form("hots")="on" then
			hots=1
		else
			hots=0
		end if
		if request.form("hide")="on" then
			hide=1
		else
			hide=0
		end if

	set rs=server.createobject("adodb.recordset")
	if request("action")="add" then
		call newsoft()
	elseif request("action")="edit" then
		call editsoft()
	end if
sub newsoft()
	sql="select * from download where (id is null)" 
	rs.open sql,conn,1,3
	rs.addnew
	rs("filename")=filename
	if filename1<>"" then
	rs("filename1")=filename1
	else
	rs("filename1")="无"
	end if
	if filename2<>"" then
	rs("filename2")=filename2
	else
	rs("filename2")="无"
	end if
	rs("showname")=showname
	rs("classid")=classid
	rs("Nclassid")=Nclassid
	rs("fromurl")=fromurl
	rs("note")=note
	rs("system")=system
	rs("hot")=hot
	rs("hots")=hots
	rs("stop")=hide
	rs("size")=size
        rs("images")=images
	rs("orders")=order
	rs("lasthits")=date()
	rs("dateandtime")=date()
	rs("dayhits")=0
	rs("weekhits")=0
	rs("hits")=0
	rs.update
end sub
sub editsoft()
	sql="select * from download where id="&request("id")
	rs.open sql,conn,1,3
	rs("filename")=filename
	if filename1<>"" then
	rs("filename1")=filename1
	else
	rs("filename1")="无"
	end if
	if filename2<>"" then
	rs("filename2")=filename2
	else
	rs("filename2")="无"
	end if
	rs("showname")=showname
	rs("classid")=classid
	rs("Nclassid")=Nclassid
	rs("fromurl")=fromurl
	rs("note")=note
	rs("system")=system
	rs("hot")=hot
	rs("hots")=hots
	rs("stop")=hide
	rs("size")=size
        rs("images")=images
	rs("orders")=order
	rs("lasthits")=date()
	rs.update
end sub

	if makejs=1 then
		UpdateJs(news)
	end if
	set rs=nothing
	conn.close
	set conn=nothing
%>
<html>

<head>
<title></title>
<link rel="stylesheet" type="text/css" href="style.css">

</head>

<body bgcolor="#468ea3" style="background-color: #FFFFFF">
<br><br>
  
<table width="50%" border="0" cellpadding="3" cellspacing="1" align="center">
  <tr>
    
<td width="100%" height="20" bgcolor="#6699FF">
<p align="center"><font color="#FFFFFF">
 <%if request("action")=add then%>
 添加
 <%else%>
 修改
 <%end if%>
 程序成功</font>
</td>
  </tr>
  <tr>
    
<td width="100%" bgcolor="#FFFFFF">
<p align="left"><br>
    下载地址1为:<%=filename%><br>
    下载地址2为:<%=filename1%><br>
    下载地址3为:<%=filename2%><br>
    显示名称为:<%=showname%></p>
    您可以进行其他操作
    </td>
  </tr>
</table>
<%
else
 response.write "由于以下的原因不能保存数据:"
 response.write errmsg
end if
%>

</body>
</html>

⌨️ 快捷键说明

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