📄 hover_article_add.asp
字号:
<!--#include file="toptable.asp"-->
<%
'=================================
' 良精科技企业管理系统
' QQ在线客服:65961930 82993936
' 咨询定购Tel:010-81991660
' asp3721@hotmail.com
' www.liangjing.net
' copyright(c)2001-2008 HoverCms 2007特别版
'=================================
%>
<%
dim rs
dim sql
dim count
set rs=server.createobject("adodb.recordset")
sql = "select * from Hover_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.myform.SmallClassName.length = 1;
var locationid=locationid;
var i;
for (i=0;i < onecount; i++)
{
if (subcat[i][1] == locationid)
{
document.myform.SmallClassName.options[document.myform.SmallClassName.length] = new Option(subcat[i][0], subcat[i][2]);
}
}
}
function CheckForm()
{
if (editor.EditMode.checked==true)
document.myform.Content.value=editor.HtmlEdit.document.body.innerText;
else
document.myform.Content.value=editor.HtmlEdit.document.body.innerHTML;
if (document.myform.Title.value=="")
{
alert("文章标题不能为空!");
document.myform.Title.focus();
return false;
}
if (document.myform.Product_Id.value=="")
{
alert("产品编号不能为空!");
document.myform.Key.focus();
return false;
}
if (document.myform.Key.value=="")
{
alert("关键字不能为空!");
document.myform.Key.focus();
return false;
}
if (document.myform.Spec.value=="")
{
alert("产品规格不能为空!");
document.myform.spec.focus();
return false;
}
if (document.myform.Content.value=="")
{
alert("文章内容不能为空!");
editor.HtmlEdit.focus();
return false;
}
return true;
}
function loadForm()
{
editor.HtmlEdit.document.body.innerHTML=document.myform.Content.value;
return true
}
</script>
<!-- #include file="Inc/Head.asp" -->
<body onLoad="javascipt:setTimeout('loadForm()',1000);">
<BR>
<table width="97%" border="0" align="center" cellpadding="3" cellspacing="1" class="tableBorder">
<form method="POST" name="myform" onSubmit="return CheckForm();" action="Hover_Article_Save.asp?action=add" target="_self">
<tr>
<td class="title" height="25" colspan="2" align="center"><strong>添 加 产 品</strong></td>
</tr>
<tr>
<td class="title2" height="25" colspan="2">选择您需要更改的产品信息。 </td>
</tr>
<tr>
<td width="183" height="22" align="right" bgcolor="#C0C0C0" class="table">所属类别:</td>
<td width="771" bgcolor="#E3E3E3" class="table">
<%
sql = "select * from Hover_BigClass"
rs.open sql,conn,1,1
if rs.eof and rs.bof then
response.write "请先添加栏目。"
else
%>
<select name="BigClassName" onChange="changelocation(document.myform.BigClassName.options[document.myform.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 Hover_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="22" align="right" bgcolor="#C0C0C0" class="table">产品编号:</td>
<td bgcolor="#E3E3E3" class="table"> <input name="Product_Id" type="text" id="Product_Id2" value="<%=iddata%>" size="15" maxlength="15">
<font color="#FF0000">*产品编号不可以相同,如你不能确定会重复,请勿改动他!</font></td>
</tr>
<tr>
<td height="22" align="right" bgcolor="#C0C0C0" class="table">产品名称:</td>
<td bgcolor="#E3E3E3" class="table"> <input name="Title" type="text" id="Title2" size="50" maxlength="80">
<font color="#FF0000">*</font></td>
</tr>
<tr>
<td height="22" align="right" bgcolor="#C0C0C0" class="table">产品规格:</td>
<td bgcolor="#E3E3E3" class="table"> <input name="Spec" type="text" id="Spec2" size="50" maxlength="80">
<font color="#FF0000">*</font></td>
</tr>
<tr>
<td height="22" align="right" bgcolor="#C0C0C0" class="table">关键字:</td>
<td bgcolor="#E3E3E3" class="table"> <input name="Key" type="text" id="Key2" size="50" maxlength="80">
<font color="#FF0000">*</font> 多个关键字,中间用空格分开。不能出现""'*?,.()等字符。</td>
</tr>
<tr>
<td height="22" align="right" valign="middle" bgcolor="#C0C0C0" class="table">产品说明:</td>
<td bgcolor="#E3E3E3" class="table"> <textarea name="Content" style="display:none"></textarea><iframe id="editor" src="../editor.asp" frameborder=1 scrolling=no width="600" height="405"></iframe></td>
</tr>
<tr>
<td width="183" align="right" bgcolor="#C0C0C0" class="table">首页图片:
<input name="IncludePic" type="hidden" id="IncludePic" value="yes"></td>
<td width="771" height="50" bgcolor="#E3E3E3" class="table">
<input name="DefaultPicUrl" type="text" id="DefaultPicUrl" value="Skins/Default/cnimg/nopic.jpg" size="40" maxlength="120">
<br>首页的图片,直接从上传图片中选择:
<select name="DefaultPicList" id="select" onChange="DefaultPicUrl.value=this.value;">
<option selected>不指定首页图片</option>
</select> <input name="UploadFiles" type="hidden" id="UploadFiles2"> </td>
</tr>
<tr>
<td height="22" align="right" bgcolor="#C0C0C0" class="table">已通过审核:</td>
<td bgcolor="#E3E3E3" class="table"> <input name="Passed" type="checkbox" id="Passed2" value="yes" checked>
是<font color="#0000FF">(如果选中的话将直接发布)</font></td>
</tr>
<tr>
<td height="22" align="right" bgcolor="#C0C0C0" class="table">首页显示:</td>
<td bgcolor="#E3E3E3" class="table"><input name="Elite" type="checkbox" id="Passed" value="yes">
是<font color="#0000FF">(如果选中的话将在首页做为新产品显示)</font></td>
</tr>
<tr>
<td height="10" align="right" bgcolor="#C0C0C0" class="table">录入时间:</td>
<td bgcolor="#E3E3E3" class="table">
<input name="UpdateTime" type="text" id="UpdateTime2" value="<%=now()%>" maxlength="50">当前时间为:<%=now()%> 注意不要改变格式。</td>
</tr>
<tr>
<td height="35" colspan="2" align="center" bgcolor="#C0C0C0" class="table"><input name="Add" type="submit" class="btn" id="Add"
onClick="document.myform.action='Hover_Article_Save.asp?action=add';document.myform.target='_self';" value=" 添 加 "></td>
</tr>
</form> </table>
<BR>
<%htmlend%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -