?? down_admin_add.asp
字號:
<%@language=vbscript codepage=936 %>
<!--#include file="Admin.asp"-->
<!--#include file="Conn.asp"-->
<html>
<head>
<title>下載增加</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="Admin_Style.css" rel="stylesheet" type="text/css">
</head>
<%
dim rs
dim sql
dim count
set rs=server.createobject("adodb.recordset")
sql = "select * from SmallClass_down order by SmallClassID asc"
rs.open sql,conn,1,1
%>
<script language = "JavaScript">
var onecount;
subcat = new Array();
<%
count = 0
do while not rs.eof
%>
subcat[<%=count%>] = new Array("<%= trim(rs("SmallClassName"))%>","<%= trim(rs("BigClassName"))%>","<%= trim(rs("SmallClassName"))%>");
<%
count = count + 1
rs.movenext
loop
rs.close
%>
onecount=<%=count%>;
function changelocation(locationid)
{
document.addNEWS.SmallClassName.length = 1;
var locationid=locationid;
var i;
for (i=0;i < onecount; i++)
{
if (subcat[i][1] == locationid)
{
document.addNEWS.SmallClassName.options[document.addNEWS.SmallClassName.length] = new Option(subcat[i][0], subcat[i][2]);
}
}
}
function CheckForm()
{
document.addNEWS.cnWords.value = document.frames.cnEditBox.getHTML(true);
document.addNEWS.imageNum.value = document.frames.cnEditBox.document.all("editImageNum").value;
document.addNEWS.editFirstImageName.value = document.frames.cnEditBox.document.all("editFirstImageName").value;
if (document.addNEWS.title.value.length == 0) {
alert("新聞標題沒有填寫.");
document.addNEWS.title.focus();
return false;
}
if (document.addNEWS.user.value.length == 0) {
alert("新聞發布人沒有填寫");
document.addNEWS.user.focus();
return false;
}
return true;
}
</script>
<table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td align="center" valign="top">
<div align="center">
<table width="90%" border="0" cellpadding="0" bgcolor="#E1F4EE">
<form name="addNEWS" method="post" action="Down_add_ok.asp" onSubmit="return CheckForm();">
<tr>
<td height="30" colspan="3" align="center" bgcolor="#E1F4EE">添加下載</td>
</tr>
<tr>
<td width="132" height="25" bgcolor="#E1F4EE"><font color="#FF0000">*</font>下載名稱:</td>
<td colspan="2" bgcolor="#E1F4EE"> <input name="title" type="text" class="input" size="30"></td>
</tr>
<tr>
<td height="25"><font color="#FF0000">*</font>下載類別:</td>
<td colspan="2"> <%
sql = "select * from BigClass_down"
rs.open sql,conn,1,1
if rs.eof and rs.bof then
response.write "請先添加欄目。"
else
%> <select name="BigClassName" onChange="changelocation(document.addNEWS.BigClassName.options[document.addNEWS.BigClassName.selectedIndex].value)" size="1">
<option selected value="<%=trim(rs("BigClassName"))%>"><%=trim(rs("BigClassName"))%></option>
<%
dim selclass
selclass=rs("BigClassName")
rs.movenext
do while not rs.eof
%>
<option value="<%=trim(rs("BigClassName"))%>"><%=trim(rs("BigClassName"))%></option>
<%
rs.movenext
loop
end if
rs.close
%>
</select> <select name="SmallClassName">
<option value="" selected>不指定小類</option>
<%
sql="select * from SmallClass_down where BigClassName='" & selclass & "'"
rs.open sql,conn,1,1
if not(rs.eof and rs.bof) then
%>
<option value="<%=rs("SmallClassName")%>"><%=rs("SmallClassName")%></option>
<% rs.movenext
do while not rs.eof%>
<option value="<%=rs("SmallClassName")%>"><%=rs("SmallClassName")%></option>
<%
rs.movenext
loop
end if
rs.close
%>
<%
ranNum=int(9*rnd)+10
iddata=month(now)&day(now)&hour(now)&minute(now)&second(now)&ranNum
%>
</select></td>
</tr>
<tr>
<td height="25" valign="top"><font color="#FF0000">*</font>下載說明:</td>
<td colspan="2" valign="top"> <IFRAME STYLE="border: none" NAME=cnEditBox src="EditBox1.asp" WIDTH=500 HEIGHT=400></IFRAME></td>
</tr>
<tr>
<td height="25"><font color="#FF0000">*</font>適用系統:</td>
<td colspan="2"><input name="System" type="text" class="input" id="System" value="WIN98, WIN2000, WIN XP" size="30"></td>
</tr>
<tr>
<td height="25"><font color="#FF0000">*</font>軟件類型:</td>
<td colspan="2"><input name="Softclass" type="text" class="input" id="Softclass" value="產品驅動" size="30"></td>
</tr>
<tr>
<td height="25">產品圖片:</td>
<td width="219"><input name="PhotoUrl" type="text" id="PhotoUrl" size="30" maxlength="200"></td>
<td width="213"><iframe style="top:2px" ID="UploadFiles" src="../upload_Photo.asp?PhotoUrlID=0" frameborder=0 scrolling=no width="320" height="25"></iframe></td>
</tr>
<tr>
<td height="25"><font color="#FF0000">*</font>下載地址:</td>
<td><input name="DownloadUrl" type="text" id="PhotoUrl2" size="30" maxlength="200"></td>
<td><iframe style="top:2px" ID="UploadFiles" src="../upload_Photo.asp?PhotoUrlID=1" frameborder=0 scrolling=no width="320" height="25"></iframe></td>
</tr>
<tr>
<td height="25"><font color="#FF0000">*</font>文件大小:</td>
<td colspan="2"><input name="FileSize" type="text" class="input" id="fileSize" size="30">
K </td>
</tr>
<tr>
<td height="30" colspan="3" align="center">演示不開放操作按鈕,請聯系QQ 412771253
<input type="reset" name="Submit2" value="重置" class="input">
<!--獲取EditBox的內容-->
<input name=cnWords type=hidden ID="cnWords" value=""> <input name=imageNum type=hidden ID="imageNum" value="<%=mImageNum%>">
<input name=editFirstImageName type=hidden ID="editFirstImageName" value="">
<!--獲取EditBox的內容-->
</td>
</tr>
</form>
<tr>
<td height="30" colspan="3" align="center"> </td>
</tr>
</table> </div>
</td>
</tr>
</table>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -