?? bs_article_add.asp
字號(hào):
<%@language=vbscript codepage=936 %>
<!--#include file="conn.asp"-->
<!--#include file="Inc/Function.asp"-->
<%
dim rs2
dim sql
dim count
set rs2=server.createobject("adodb.recordset")
sql = "select * from Bs_PrSmallClass order by SmallClassID asc"
rs2.open sql,conn,1,1
%>
<script language = "JavaScript">
var onecount;
subcat = new Array();
<%
count = 0
do while not rs2.eof
%>
subcat[<%=count%>] = new Array("<%= trim(rs2("SmallClassName"))%>","<%= trim(rs2("BigClassName"))%>","<%= trim(rs2("SmallClassName"))%>");
<%
count = count + 1
rs2.movenext
loop
rs2.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 AddItem(strFileName){
document.myform.IncludePic.checked=true;
document.myform.DefaultPicUrl.value=strFileName;
document.myform.DefaultPicList.options[document.myform.DefaultPicList.length]=new Option(strFileName,strFileName);
document.myform.DefaultPicList.selectedIndex+=1;
if(document.myform.UploadFiles.value==''){
document.myform.UploadFiles.value=strFileName;
}
else{
document.myform.UploadFiles.value=document.myform.UploadFiles.value+"|"+strFileName;
}
}
function CheckForm()
{
if (editor.EditMode.checked==true)
document.myform.bs_Content.value=editor.HtmlEdit.document.body.innerText;
else
document.myform.bs_Content.value=editor.HtmlEdit.document.body.innerHTML;
if (document.myform.Title.value=="")
{
alert("產(chǎn)品名稱不能為空!");
document.myform.Title.focus();
return false;
}
if (document.myform.Product_Id.value=="")
{
alert("產(chǎn)品編號(hào)不能為空!");
document.myform.Key.focus();
return false;
}
if (document.myform.bs_Content.value=="")
{
alert("產(chǎn)品內(nèi)容不能為空!");
editor.HtmlEdit.focus();
return false;
}
return true;
}
</script>
<!-- #include file="Inc/Head.asp" -->
<table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="862" align="center" valign="top"> <b><br>
</b>
<form method="POST" name="myform" onSubmit="return CheckForm();" action="ProductSave.asp?action=add" target="_self">
<table width="620" border="0" align="center" cellpadding="0" cellspacing="0" class="border">
<tr align="center">
<td class="tdbg"> <table width="100%" border="0" cellpadding="2" cellspacing="1" class="table_southidc">
<tr>
<td class="back_southidc" height="22" colspan="2" align="right" bgcolor="#A4B6D7"><div align="center"><b>添
加 產(chǎn) 品</b> </div></td>
</tr>
<tr>
<td width="150" height="22" align="right" bgcolor="#A4B6D7">所屬類別:</td>
<td bgcolor="#E3E3E3"> <strong>
<%
sql = "select * from Bs_PrBigClass"
rs2.open sql,conn,1,1
if rs2.eof and rs2.bof then
response.write "請(qǐng)先添加欄目。"
else
%>
<select name="BigClassName" onChange="changelocation(document.myform.BigClassName.options[document.myform.BigClassName.selectedIndex].value)" size="1">
<option selected value="<%=trim(rs2("BigClassName"))%>"><%=trim(rs2("BigClassName"))%></option>
<%
dim selclass
selclass=rs2("BigClassName")
rs2.movenext
do while not rs2.eof
%>
<option value="<%=trim(rs2("BigClassName"))%>"><%=trim(rs2("BigClassName"))%></option>
<%
rs2.movenext
loop
end if
rs2.close
%>
</select>
<select name="SmallClassName">
<option value="" selected>不指定小類</option>
<%
sql="select * from Bs_PrSmallClass where BigClassName='" & selclass & "'"
rs2.open sql,conn,1,1
if not(rs2.eof and rs2.bof) then
%>
<option value="<%=rs2("SmallClassName")%>"><%=rs2("SmallClassName")%></option>
<% rs2.movenext
do while not rs2.eof%>
<option value="<%=rs2("SmallClassName")%>"><%=rs2("SmallClassName")%></option>
<%
rs2.movenext
loop
end if
rs2.close
%>
<%
ranNum=int(9*rnd)+10
iddata=month(now)&day(now)&hour(now)&minute(now)&second(now)&ranNum
%>
</select>
</strong></td>
</tr>
<tr>
<td width="150" height="22" align="right" bgcolor="#A4B6D7">我方編號(hào):</td>
<td bgcolor="#E3E3E3"> <strong>
<input name="Product_Id" type="text"
id="Product_Id2" value="<%=iddata%>" size="10" maxlength="10">
<font color="#FF0000">*產(chǎn)品編號(hào)不可以相同,如你不能確定會(huì)重復(fù),請(qǐng)勿改動(dòng)他!</font></strong></td>
</tr>
<tr>
<td width="150" height="21" align="right" bgcolor="#A4B6D7">廠方名稱:</td>
<td bgcolor="#E3E3E3"> <strong>
<input name="Title" type="text"
id="Title2" size="50" maxlength="80">
<font color="#FF0000">*</font></strong></td>
</tr>
<tr>
<td height="22" align="right" bgcolor="#A4B6D7">參考價(jià)格:</td>
<td bgcolor="#E3E3E3"><strong>
<input name="Buy_price" type="text"
id="Buy_price" value="0.00" size="10" maxlength="80">
</strong></td>
</tr>
<tr>
<td height="22" align="right" bgcolor="#A4B6D7">常用規(guī)格:</td>
<td bgcolor="#E3E3E3"><input name="Spec" type="text"
id="Title" size="20" maxlength="80"></td>
</tr>
<tr>
<td height="22" align="right" bgcolor="#A4B6D7">單位:</td>
<td bgcolor="#E3E3E3"><input name="Unit" type="text"
id="spec" value="片" size="20" maxlength="80"></td>
</tr>
<tr>
<td height="22" align="right" bgcolor="#A4B6D7">備注:</td>
<td bgcolor="#E3E3E3"><input name="Memo" type="text"
id="unit" size="50" maxlength="80"></td>
</tr>
<tr>
<td width="150" height="22" align="right" valign="middle" bgcolor="#A4B6D7">產(chǎn)品說(shuō)明:</td>
<td bgcolor="#E3E3E3"> </td>
</tr>
<tr bgcolor="#E3E3E3">
<td colspan="2" align="right" valign="middle"> <div align="left">
<textarea name="bs_Content" style="display:none"></textarea>
<iframe ID="editor" src="editor.asp" frameborder=1 scrolling=no width="620" height="405"></iframe>
</div></td>
</tr>
<tr>
<td align="right" bgcolor="#A4B6D7">首頁(yè)圖片:
<input name="IncludePic" type="hidden" id="IncludePic" value="yes"></td>
<td height="96" bgcolor="#E3E3E3"> <input name="DefaultPicUrl" type="text" id="DefaultPicUrl" value="img/nopic.gif" size="40" maxlength="120">
<br>
首頁(yè)的圖片,直接從上傳圖片中選擇:
<select name="DefaultPicList" id="select" onChange="DefaultPicUrl.value=this.value;">
<option selected>不指定首頁(yè)圖片</option>
</select> <input name="UploadFiles" type="hidden" id="UploadFiles2"> </td>
</tr>
<tr>
<td width="150" height="22" align="right" bgcolor="#A4B6D7">已通過(guò)審核:</td>
<td bgcolor="#E3E3E3"> <input name="Passed" type="checkbox" id="Passed2" value="yes" checked>
是<font color="#0000FF">(如果選中的話將直接發(fā)布)</font></td>
</tr>
<tr>
<td width="150" height="22" align="right" bgcolor="#A4B6D7">錄入時(shí)間:</td>
<td bgcolor="#E3E3E3"> <input name="UpdateTime" type="text" id="UpdateTime2" value="<%=now()%>" maxlength="50">
當(dāng)前時(shí)間為:<%=now()%> 注意不要改變格式。</td>
</tr>
</table></td>
</tr>
</table>
<div align="center">
<p>
<input
name="Add" type="submit" id="Add" value=" 添 加 " onClick="document.myform.action='ProductSave.asp?action=add';document.myform.target='_self';">
</p>
</div>
</form></td>
</tr>
</table>
?? 快捷鍵說(shuō)明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -