📄 info.asp
字号:
<%
if session("aleave")="" then
response.redirect "adminlogin.asp"
response.end
end if
%>
<!--#include file="adminconn.asp"-->
<%
dim rs
dim sql
dim count
set rs=server.createobject("adodb.recordset")
sql = "select * from SmallClass 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>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>无标题文档</title>
<link href="../images/yxwancss.css" rel="stylesheet" type="text/css">
<style>
.red{
background-color: #FF0000;
border: 1px solid #FF0000;
}
.black{
background-color: #000000;
border: 1px solid #000000;
}
.blue{
background-color: #0000ff;
border: 1px solid #0000ff;
}
.green{
background-color: #00ff00;
border: 1px solid #00ff00;
}
.yello{
background-color: #ffff00;
border: 1px solid #ffff00;
}
.hese{
background-color: #660000;
border: 1px solid #660000;
}
.fenhon{
background-color: #ff00ff;
border: 1px solid #ff00ff;
}
.hui{
background-color: #666666;
border: 1px solid #666666;
}
.luse{
background-color: #006600;
border: 1px solid #006600;
}
.lanse{
background-color: #3366ff;
border: 1px solid #3366ff;
}
.zise{
background-color: #cc00cc;
border: 1px solid #cc00cc;
}
</style>
</head>
<body style="margin:0">
<form name="addNEWS" method="post" action="savenews.asp" style="margin:0">
<input type=hidden name=d_originalfilename>
<% '取保存的方件名,如果不要带路径的填充下拉框,可以在下面的表单项加入onchange事件 %>
<input type=hidden name=d_savefilename>
<% '取保存的文件名(带路径),使用带路径的填充下拉框 %>
<input type=hidden name=d_savepathfilename >
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="5"></td>
</tr>
</table>
<div align="center">
<table width="580" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="580" colspan="2"><table width="550" border="0" cellspacing="0" cellpadding="0">
<tr>
<th height="20">发布新闻</th>
</tr>
</table></td>
</tr>
<tr>
<td width="580" colspan="2"><hr size="1" color="#FF0000"></td>
</tr>
<tr>
<td height="30" class="px12" width="369"> 标题:
<input name="d_title" type="text" size="40">
</td>
<td height="30" class="px12" width="211">发布人:<input name="d_user" type="text" size="15" value="<%=session("admin_aoyi")%>" ></td>
</tr>
<tr>
<td height="30" class="px12" width="580" colspan="2"> 标题颜色:
<input name="titlecolor" type="radio" class="black" value="000000" checked >
<input type="radio" name="titlecolor" value="ff0000" class="red">
<input type="radio" name="titlecolor" value="0000ff" class="blue">
<input type="radio" name="titlecolor" value="00ff00" class="green">
<input type="radio" name="titlecolor" value="ffff00" class="yello">
<input type="radio" name="titlecolor" value="660000" class="hese">
<input type="radio" name="titlecolor" value="ff00ff" class="fenhon">
<input type="radio" name="titlecolor" value="666666" class="hui">
<input type="radio" name="titlecolor" value="006600" class="luse">
<input type="radio" name="titlecolor" value="3366ff" class="lanse">
<input type="radio" name="titlecolor" value="cc00cc" class="zise">
</td>
</tr>
<tr>
<td height="30" class="px12" width="580" colspan="2"> 新闻类别: <%
sql = "select * from BigClass"
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 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="300" valign="top" width="580" colspan="2"><textarea name="d_content" style="display:none"></textarea>
<iframe ID="eWebEditor1" src="ewebeditor.asp?id=d_content&style=s_green&originalfilename=d_originalfilename&savefilename=d_savefilename&savepathfilename=d_savepathfilename" frameborder="0" scrolling="no" width="100%" HEIGHT="350"></iframe></td>
</tr>
<tr>
<td width="580" colspan="2"><hr size="1" color="#FF0000"></td>
</tr>
<tr>
<td style="font-size:12px" height="20" width="580" colspan="2"><input type="submit" name="Submit" value="提交">
<input type="reset" name="Submit2" value="重置">
<input type="button" name="Submit3" value="放弃" onClick="javascript:window.location.href='info.asp'"> </td>
</tr>
</table>
</div>
</form>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -