📄 sell.asp
字号:
<!--#include file="conn.asp" -->
<!-- #include file="inc/info.asp" -->
<!-- #include file="webtop.asp" -->
<html>
<head>
<TITLE><%=webname%>--首页</TITLE>
<META http-equiv=Content-Type content="text/html; charset="<%=charset%>">
<META name="keywords" content="<%=keywords%>">
<META name="description" content="<%=description%>">
<link href="images/yq_style.css" rel="stylesheet" type="text/css">
</HEAD>
<BODY bgColor=#ffffff leftMargin=0 onmouseover=exitpop=false text=#000000 topMargin=0 marginheight="0" marginwidth="0">
<CENTER>
<%
response.buffer=true
if session("user")="" then
response.redirect "login.asp"
else
sqlget = "select regValidated from users where regValidated='Y' and regusername='" &session("user")&"'"
set rsget =conn.execute(sqlget)
if rsget.eof then
response.redirect "User_info_change.asp"
else
dim rs
dim sql
dim count
dim catid,catsid
catid=rst("catid")
catsid=rst("catsid")
set rs=server.createobject("adodb.recordset")
sql = "select * from catson order by catsonid asc"
rs.open sql,conn,1,1
%>
<script language = "JavaScript">
var onecount;
onecount=0;
subcat = new Array();
<%
count = 0
do while not rs.eof
%>
subcat[<%=count%>] = new Array("<%= trim(rs("catsonname"))%>","<%= trim(rs("catid"))%>","<%= trim(rs("catsonid"))%>");
<%
count = count + 1
rs.movenext
loop
rs.close
%>
onecount=<%=count%>;
function changelocation(locationid)
{
document.myform.catsonid.length = 0;
var locationid=locationid;
var i;
for (i=0;i < onecount; i++)
{
if (subcat[i][1] == locationid)
{
document.myform.catsonid.options[document.myform.catsonid.length] = new Option(subcat[i][0], subcat[i][2]);
}
}
}
</script>
<table border="0" cellspacing="0" width="100%" cellpadding="4">
<tr>
<td width="100%">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td width="100%"><font face="Arial" size="2"><CENTER>
<TABLE WIDTH="700" BORDER="0" CELLSPACING="0" CELLPADDING="0">
<TR>
<TD COLSPAN="2" ALIGN="LEFT">
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" WIDTH="100%">
<TR>
<TD bgcolor="#99CC33">
<CENTER>
<FONT FACE="宋体" SIZE="2px" color="#ffffff"><B>添加商品信息</B></FONT>
</CENTER>
</TD>
<TD bgcolor="#FFFFFF" WIDTH="65%" ALIGN="RIGHT"> </TD>
</TR>
<TR>
<TD COLSPAN="2" bgcolor="#FFCC00" HEIGHT="2"><IMG BORDER="0" SRC="QAImages/pix.gif" WIDTH="1" HEIGHT="1"></TD>
</TR>
</TABLE>
</TD>
</TR>
<TR>
<TD COLSPAN="2"><FONT FACE="宋体">
<script language="javascript">
function check(tform)
<!--
{
var str=tform.Title.value;
var SPECIAL_STR = "~!@%^&*();'\"?><[]{}\\|,:/=+—“”‘";
for(i=0;i<str.length;i++)
if (SPECIAL_STR.indexOf(str.charAt(i)) !=-1)
{
alert("商品名称不能含有非法字符("+str.charAt(i)+")!");
tform.Title.focus();
return false;
}
{
}
return true;
-->
}
</SCRIPT>
<FORM METHOD="post" ACTION="addtopre.asp" name="myform" onsubmit="return check(this)">
<TABLE BORDER="0" CELLPADDING="3" CELLSPACING="0" WIDTH="100%" class="a1">
<tr>
<td colSpan="2"><FONT FACE="宋体" SIZE="2"><FONT color="#FF0000">***</FONT>
为必填项</FONT> </TD>
</TR>
<TR>
<TD COLSPAN="2">
<HR>
</TD>
</TR>
<TR>
<TD COLSPAN="2"><FONT FACE="宋体" SIZE="3" COLOR="#A0A0A0"><B><font color="#0066FF">以下是要填写的商品信息</font></B></FONT></TD>
</TR>
<TR>
<TD width="20%" class="a1"><FONT FACE="宋体" SIZE="2"><B>名称 </B></FONT></TD>
<TD width="67%">
<INPUT TYPE="TEXT" NAME="Title" SIZE="40" value="" MAXLENGTH="60">
<font face="宋体" size="2"><b><font color="#FF0000">***</font></b></font>
</TD>
</TR>
<TR>
<TD width="20%" class="a1"><b>商品数量</b></TD>
<TD width="67%">
<input type="text" name="num" value="1" size="3" maxlength="2">
<font face="宋体" size="2"><b><font color="#FF0000">***</font></b></font>
</TD>
</TR>
<TR>
<TD width="20%" class="a1"><FONT FACE="宋体" SIZE="2"><B>商品分类 </B></FONT></TD>
<TD width="67%">
<%
sql = "select * from cat"
rs.open sql,conn,1,1
if rs.eof and rs.bof then
response.write "请先添加栏目。"
response.end
else
%>
<select name="catid" onChange="changelocation(document.myform.catid.options[document.myform.catid.selectedIndex].value)" size="1">
<option selected value="<%=trim(rs("catid"))%>"><%=trim(rs("catname"))%></option>
<% dim selclass
selclass=rs("catid")
rs.movenext
do while not rs.eof
%>
<option value="<%=trim(rs("catid"))%>"><%=trim(rs("catname"))%></option>
<%
rs.movenext
loop
end if
rs.close
%>
</select>
<select name="catsonid">
<%sql="select * from catson where catid="&selclass
rs.open sql,conn,1,1
if not(rs.eof and rs.bof) then
%>
<option selected value="<%=rs("catsonID")%>"><%=rs("catsonname")%></option>
<% rs.movenext
do while not rs.eof%>
<option value="<%=rs("catsonID")%>"><%=rs("catsonname")%></option>
<% rs.movenext
loop
end if
rs.close
set rs = nothing
conn.Close
set conn = nothing
%>
</select>
<font face="宋体" size="2"><b><font color="#FF0000">***</font></b></font></TD>
</TR>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -