📄 addsoft.asp
字号:
<!--#include file="../inc/conn.asp"-->
<!--#include file="../inc/function.asp"-->
<%
dim action
action=request.QueryString("action")
select case action
case ""
%>
<html><head><title>教务管理系统</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="../css.css" rel="stylesheet" type="text/css">
</head>
<body style="background-color: #799AE1">
<table class="tableBorder" width="90%" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#FFFFFF">
<tr>
<td colspan="2" align="center" background="images/admin_bg_1.gif" height="25"><b><font color="#ffffff">教务管理—添加软件</font></b></td>
</tr>
<form name="softinfo" method="post" action="addsoft.asp?action=save">
<tr>
<td width="20%" bgcolor="#E8F1FF" align="center">软件名称:</td>
<td width="80%" bgcolor="#E8F1FF">
<input class="wenbenkuang" name="softname" type="text" id="Topic" size="50">
</td>
</tr>
<tr>
<td width="20%" bgcolor="#E8F1FF" align="center">图片地址:</td>
<td width="80%" bgcolor="#E8F1FF">
<input class="wenbenkuang" name="Img" type="text" id="Topic" size="50" value="img/wu.gif">
</td>
</tr>
<tr>
<td width="20%" bgcolor="#E8F1FF" align="center">添 加 人:</td>
<td width="80%" bgcolor="#E8F1FF"><input class="wenbenkuang" name="addname" type="text" id="Topic" value="<% =request.Cookies("jiaowu")("adminname")%>">
</td>
<tr>
<td width="20%" bgcolor="#E8F1FF" align="center">添加时间:</td>
<td width="80%" bgcolor="#E8F1FF"><input class="wenbenkuang" name="adddate" type="text" id="Topic" value="<% =now()%>">
</td>
</tr>
<tr>
<td width="20%" bgcolor="#E8F1FF" align="center">下载地址1:</td>
<td width="80%" bgcolor="#E8F1FF">
<input class="wenbenkuang" name="downlink1" type="text" id="Topic"" size="50" value="soft/"></td>
</tr>
<tr>
<td width="20%" bgcolor="#E8F1FF" align="center">下载地址2:</td>
<td width="80%" bgcolor="#E8F1FF">
<input class="wenbenkuang" name="downlink2" type="text" id="Topic" size="50" value="soft/"></td>
</tr>
<tr>
<td width="20%" bgcolor="#E8F1FF" align="center">软件分类:</td>
<td width="80%" bgcolor="#E8F1FF">
<select size="1" name="fl">
<option value="教学相关">教学相关</option>
<option value="系统工具">系统工具</option>
<option value="网络程序">网络程序</option>
<option value="编程开发">编程开发</option>
<option value="图形处理">图形处理</option>
<option value="程序源码">程序源码</option>
<option value="媒体播放">媒体播放</option>
<option selected value="其它软件">其它软件</option>
</select>
</td>
</tr>
<tr>
<td width="20%" bgcolor="#E8F1FF" align="center">软件类型:</td>
<td width="80%" bgcolor="#E8F1FF">
<select size="1" name="lx">
<option value="正版软件">正版软件</option>
<option value="共享软件">共享软件</option>
<option value="免费软件">免费软件</option>
</select>
</td>
</tr>
<tr>
<td width="20%" bgcolor="#E8F1FF" align="center">适用环境:</td>
<td width="80%" bgcolor="#E8F1FF">
<select size="1" name="sy">
<option value="Windows系列平台">Windows系列平台</option>
<option value="Linux系列平台">Linux系列平台</option>
</select>
</td>
</tr>
<tr>
<td width="20%" bgcolor="#E8F1FF" align="center">下载限制:</td>
<td width="80%" bgcolor="#E8F1FF">
<select size="1" name="xz">
<option selected value="所有人">所有人</option>
<option value="教师">教师</option>
<option value="学生">学生</option>
</select>
</td>
</tr>
<tr>
<td width="20%" bgcolor="#E8F1FF" align="center">软件介绍:</td>
<td width="80%" bgcolor="#E8F1FF">
<textarea class="wenbenkuang" name="softmore" cols="80" rows="20" id="Body">
</textarea>
</td>
</tr>
<tr>
<td bgcolor="#E8F1FF"></td>
<td bgcolor="#E8F1FF">
<input class="go-wenbenkuang" name="submit" value=提交软件 type=submit onClick="return checkup();">
</td>
</tr>
</form>
</table>
<%
case "edit"
downid=request.QueryString("downid")
session("downid")=request.QueryString("downid")
set rs=server.CreateObject("adodb.recordset")
rs.open "select * from Jw_down where downid="&downid,conn,1,3
%>
<html><head><title>教务管理系统</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="/css.css" rel="stylesheet" type="text/css">
</head>
<body style="background-color: #799AE1">
<table class="tableBorder" width="90%" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#FFFFFF">
<tr>
<td colspan="2" align="center" background="images/admin_bg_1.gif" height="25"><b><font color="#ffffff">教务管理—添加软件</font></b></td>
</tr>
<form name="softinfo" method="post" action="addsoft.asp?action=editsave&downid=<% =rs("downid")%>">
<tr>
<td width="20%" bgcolor="#E8F1FF" align="center">软件名称:</td>
<td width="80%" bgcolor="#E8F1FF">
<input class="wenbenkuang" name="softname" type="text" id="Topic" size="50" value="<% =rs("softname")%>">
</td>
</tr>
<tr>
<td width="20%" bgcolor="#E8F1FF" align="center">图片地址:</td>
<td width="80%" bgcolor="#E8F1FF">
<input class="wenbenkuang" name="Img" type="text" id="Topic" size="50" value="/">
</td>
</tr>
<tr>
<td width="20%" bgcolor="#E8F1FF" align="center">添 加 人:</td>
<td width="80%" bgcolor="#E8F1FF"><input class="wenbenkuang" name="addname" type="text" id="Topic" value="<% =request.Cookies("jiaowu")("adminname")%>">
</td>
<tr>
<td width="20%" bgcolor="#E8F1FF" align="center">添加时间:</td>
<td width="80%" bgcolor="#E8F1FF"><input class="wenbenkuang" name="adddate" type="text" id="Topic" value="<% =now()%>">
</td>
</tr>
<tr>
<td width="20%" bgcolor="#E8F1FF" align="center">下载地址1:</td>
<td width="80%" bgcolor="#E8F1FF">
<input class="wenbenkuang" name="downlink1" type="text" id="Topic"" size="50" value="<% =rs("downlink1")%>">
</td>
</tr>
<tr>
<td width="20%" bgcolor="#E8F1FF" align="center">下载地址2:</td>
<td width="80%" bgcolor="#E8F1FF">
<input class="wenbenkuang" name="downlink2" type="text" id="Topic" size="50" value="<% =rs("downlink2")%>">
</td>
</tr>
<tr>
<td width="20%" bgcolor="#E8F1FF" align="center">软件分类:</td>
<td width="80%" bgcolor="#E8F1FF">
<select size="1" name="fl">
<option <% If rs("fl") = "教学相关" Then response.write "selected"%> value="教学相关">教学相关</option>
<option <% If rs("fl") = "系统工具" Then response.write "selected"%> value="系统工具">系统工具</option>
<option <% If rs("fl") = "网络程序" Then response.write "selected"%> value="网络程序">网络程序</option>
<option <% If rs("fl") = "编程开发" Then response.write "selected"%> value="编程开发">编程开发</option>
<option <% If rs("fl") = "图形处理" Then response.write "selected"%> value="图形处理">图形处理</option>
<option <% If rs("fl") = "程序源码" Then response.write "selected"%> value="程序源码">程序源码</option>
<option <% If rs("fl") = "媒体播放" Then response.write "selected"%> value="媒体播放">媒体播放</option>
<option <% If rs("fl") = "其它软件" Then response.write "selected"%> value="其它软件">其它软件</option>
</select>
</td>
</tr>
<tr>
<td width="20%" bgcolor="#E8F1FF" align="center">软件类型:</td>
<td width="80%" bgcolor="#E8F1FF">
<select size="1" name="lx">
<option <% If rs("lx") = "正版软件" Then response.write "selected"%> value="正版软件">正版软件</option>
<option <% If rs("lx") = "共享软件" Then response.write "selected"%> value="共享软件">共享软件</option>
<option <% If rs("lx") = "免费软件" Then response.write "selected"%> value="免费软件">免费软件</option>
</select>
</td>
</tr>
<tr>
<td width="20%" bgcolor="#E8F1FF" align="center">适用环境:</td>
<td width="80%" bgcolor="#E8F1FF">
<select size="1" name="sy">
<option <% If rs("sy") = "Windows系列平台" Then response.write "selected"%> value="Windows系列平台">Windows系列平台</option>
<option <% If rs("sy") = "Linux系列平台" Then response.write "selected"%> value="Linux系列平台">Linux系列平台</option>
</select>
</td>
</tr>
<tr>
<td width="20%" bgcolor="#E8F1FF" align="center">下载限制:</td>
<td width="80%" bgcolor="#E8F1FF">
<select size="1" name="xz">
<option <% If rs("xz") = "所有人" Then response.write "selected"%> value="所有人">所有人</option>
<option <% If rs("xz") = "教师" Then response.write "selected"%> value="教师">教师</option>
<option <% If rs("xz") = "学生" Then response.write "selected"%> value="学生">学生</option>
</select>
</td>
</tr>
<tr>
<td width="20%" bgcolor="#E8F1FF" align="center">软件介绍:</td>
<td width="80%" bgcolor="#E8F1FF">
<script language="javascript">
document.write ('<iframe src="textbox.asp?action=addsoft" id="message" width="500" height="300"></iframe>')
frames.message.document.designMode = "On";
</script>
</td>
</tr>
<tr>
<td bgcolor="#E8F1FF"></td>
<td bgcolor="#E8F1FF">
<input class="wenbenkuang" name="softmore" type="hidden" value="">
<input class="go-wenbenkuang" name="submit" value=确认修改 type=submit OnClick="document.softinfo.softmore.value = frames.message.document.body.innerHTML;">
</td>
</tr>
</form>
</table>
<%
rs.close
set rs=nothing
case "save"
set rs=server.CreateObject("adodb.recordset")
rs.open "select * from Jw_down",conn,1,3
rs.addnew
rs("softname")=trim(request("softname"))
rs("img")=request("img")
rs("softmore")=htmlencode(trim(request("softmore")))
rs("addname")=trim(request("addname"))
rs("downlink1")=trim(request("downlink1"))
rs("downlink2")=trim(request("downlink2"))
rs("xz")=trim(request("xz"))
rs("fl")=trim(request("fl"))
rs("sy")=trim(request("sy"))
rs("lx")=trim(request("lx"))
rs("adddate")=now()
rs.update
rs.close
set rs=nothing
conn.close
set conn=nothing
response.redirect "ok.asp?ok=添加软件"
case "editsave"
downid=request("downid")
set rs=server.CreateObject("adodb.recordset")
rs.open "select * from Jw_down where downid="&downid,conn,1,3
rs("softname")=trim(request("softname"))
rs("img")=request("img")
rs("softmore")=htmlencode(trim(request("softmore")))
rs("addname")=trim(request("addname"))
rs("downlink1")=trim(request("downlink1"))
rs("downlink2")=trim(request("downlink2"))
rs("xz")=trim(request("xz"))
rs("fl")=trim(request("fl"))
rs("sy")=trim(request("sy"))
rs("lx")=trim(request("lx"))
rs("adddate")=now()
rs.update
rs.close
set rs=nothing
conn.close
set conn=nothing
response.redirect "ok.asp?ok=修改软件"
case "lock"
downid=request("downid")
set rs=server.CreateObject("adodb.recordset")
rs.open "select * from Jw_down where downid="&downid,conn,1,3
rs("lock")=1
rs.update
rs.close
set rs=nothing
conn.close
set conn=nothing
response.redirect "ok.asp?ok=隐藏软件"
case "unlock"
downid=request("downid")
set rs=server.CreateObject("adodb.recordset")
rs.open "select * from Jw_down where downid="&downid,conn,1,3
rs("lock")=0
rs.update
rs.close
set rs=nothing
conn.close
set conn=nothing
response.redirect "ok.asp?ok=显示隐藏软件"
case "del"
downid=request("downid")
conn.execute "delete from Jw_down where downid="&downid
conn.close
set conn=nothing
response.redirect "ok.asp?ok=删除软件"
end select
%>
<SCRIPT LANGUAGE="JavaScript">
function checkspace(checkstr) {
var str = '';
for(i = 0; i < checkstr.length; i++) {
str = str + ' ';
}
return (str == checkstr);
}
function checkup()
{
if(checkspace(document.newsinfo.newsname.value)) {
document.newsinfo.newsname.focus();
alert("新闻标题不能为空!");
return false;
}
if(checkspace(document.newsinfo.newscontent.value)) {
document.newsinfo.newscontent.focus();
alert("新闻内容不能为空!");
return false;
}
}
function MM_goToURL() { //v3.0
var i, args=MM_goToURL.arguments; document.MM_returnValue = false;
for (i=0; i<(args.length-1); i+=2) eval(args[i]+".location='"+args[i+1]+"'");
}
function MM_openBrWindow(theURL,winName,features) { //v2.0
window.open(theURL,winName,features);
}
//-->
</script>
<script language="JavaScript">
<!-- Hide from older browsers...
//Function to format text in the text box
function FormatText(command, option){
frames.message.document.execCommand(command, true, option);
frames.message.focus();
}
//Function to add image
function AddImage(){
imagePath = prompt('请输入图片地址', 'http://');
if ((imagePath != null) && (imagePath != "")){
frames.message.document.execCommand('InsertImage', false, imagePath);
frames.message.focus();
}
frames.message.focus();
}
//Function to clear form
function ResetForm(){
if (window.confirm('确认要清空对话框内容?')){
frames.message.document.body.innerHTML = '';
return true;
}
return false;
}
//Function to open pop up window
function openWin(theURL,winName,features) {
window.open(theURL,winName,features);
}
function setMode(newMode)
{
bTextMode = newMode;
var cont;
if (bTextMode) {
cleanHtml();
cleanHtml();
cont=message.document.body.innerHTML;
message.document.body.innerText=cont;
} else {
cont=message.document.body.innerText;
message.document.body.innerHTML=cont;
}
message.focus();
}
function cleanHtml()
{
var fonts = message.document.body.all.tags("FONT");
var curr;
for (var i = fonts.length - 1; i >= 0; i--) {
curr = fonts[i];
if (curr.style.backgroundColor == "#ffffff") curr.outerHTML = curr.innerHTML;
}
}
// -->
</script>
<script language="JavaScript">
function help()
{
var helpmess;
helpmess="---------------填写帮助---------------\r\n\r\n"+
"1.请不要发表有危险性的脚本。\r\n\r\n"+
"2.如果要书写源代码,请选中\r\n\r\n"+
" 查看HTML源代码书写.\r\n\r\n"+
"3.需要你自己运行,才能看效果.\r\n\r\n"+
"4.如果书写js,尽量不要在这儿书写.\r\n\r\n";
alert(helpmess);
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -