| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 2036 人关注过本帖
标题:[求助]时代商城后台数据库写入问题.请懂的朋友指教一二
只看楼主 加入收藏
qxjyphm
Rank: 1
等 级:新手上路
帖 子:6
专家分:0
注 册:2007-9-5
收藏
 问题点数:0 回复次数:5 
[求助]时代商城后台数据库写入问题.请懂的朋友指教一二
各位老大..帮帮忙啊,,我改了几天了,都没法解决这个问题..

我用的时代商城....

在后台里,我每次改价格,,都需要点开产品名字才能修改价格.如图1
图片附件: 游客没有浏览图片的权限,请 登录注册

修改会员价,,
而我99%的时候,都只是修改价格,不改其他参数,,所以我想把它改成这样.

图片附件: 游客没有浏览图片的权限,请 登录注册

不打开商品,直接在商品列表里填入数据,点修改.

这样一来.要省很多事..

我估计是我数据库写入哪个地方错了,可是改了几天,都没搞定....求大虾些,帮帮忙啊....
我的QQ19792901,可以联系我.谢谢了.
搜索更多相关主题的帖子: 数据库 商城 后台 时代 指教 
2007-09-05 16:12
qxjyphm
Rank: 1
等 级:新手上路
帖 子:6
专家分:0
注 册:2007-9-5
收藏
得分:0 

附上源代码...这是1图所对应的

<!--#include file="conn.asp"-->
<%
if session("admin")="" then
conn.close
set conn = nothing
response.Write "<script language='javascript'>alert('请先登录!');history.go(-1);</script>"
response.End
else
if request.cookies("timesshop")("admin")="" then
conn.close
set conn = nothing
response.Write "<script language='javascript'>alert('请先登录!');history.go(-1);</script>"
response.End
end if
end if

dim id
id=SafeRequest("id",1)
%>
<title>编辑商品属性</title>
<link href="../include/css.css" rel="stylesheet" type="text/css">
<%
dim count
set rs=server.createobject("adodb.recordset")
rs.open "select * from sorts order by sortsorder ",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("sorts"))%>","<%= rs("categoryid")%>","<%= rs("sortsid")%>");
<%
count = count + 1
rs.movenext
loop
rs.close
%>

onecount=<%=count%>;

function changelocation(locationid)
{
document.myform.sortsid.length = 0;

var locationid=locationid;
var i;
for (i=0;i < onecount; i++)
{
if (subcat[i][1] == locationid)
{
document.myform.sortsid.options[document.myform.sortsid.length] = new Option(subcat[i][0], subcat[i][2]);
}
}

}
</script>
<body>
<table width="98%" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#6B8FC8">
<tr>
<td bgcolor="#6B8FC8" align="center"><font color="#FFFFFF">编辑商品属性</font></td>
</tr>
<tr><form name="myform" method="post" action="saveaddpro.asp?action=edit&id=<%=id%>">
<td bgcolor="#FFFFFF">
<table width="98%" border="0" align="center" cellpadding="2" cellspacing="0">
<tr>
<td width="5%">选择分类:</td>
<td>
<%
rs.open "select * from category order by categoryorder",conn,1,1
if rs.eof and rs.bof then
response.write "请先添加栏目。"
response.end
else
%>
<%dim rs1
set rs1=server.CreateObject("adodb.recordset")
rs1.open "select * from product where id="&id,conn,1,1
%>
<select name="categoryid" size="1" id="categoryid" onChange="changelocation(document.myform.categoryid.options[document.myform.categoryid.selectedIndex].value)">
<option selected value="<%=rs("categoryid")%>"><%=trim(rs("category"))%></option>
<% dim selclass
selclass=rs1("categoryid")
rs.movenext
do while not rs.eof

response.write "<option value="&rs("categoryid")
if rs1("categoryid")=rs("categoryid") then response.write " selected "
response.write ">"&trim(rs("category"))&"</option>"
rs.movenext
loop
end if
rs.close
%>
</select>
小类:
<select name="sortsid">
<%rs.open "select * from sorts where categoryid="&selclass ,conn,1,1
if not(rs.eof and rs.bof) then
%>
<option selected value="<%=rs("sortsid")%>"><%=rs("sorts")%></option>
<% rs.movenext
do while not rs.eof
response.write "<option value="&rs("sortsid")
if rs1("sortsid")=rs("sortsid") then response.write " selected "
response.write ">"&trim(rs("sorts"))&"</option>"
rs.movenext
loop
end if
rs.close
set rs = nothing

%>
</select> <font color="#FF0000">&nbsp; </font></td>
</tr>
<tr>
<td> <input name="prename" type="text" id="prename" size="12" value="<%=trim(rs1("prename"))%>">
</td>
<td><input name="name" type="text" id="name" size="30" value="<%=trim(rs1("name"))%>"></td>
</tr>
<tr>
<td> <input name="company" type="text" id="company" size="12" value="<%=trim(rs1("company"))%>">
</td>
<td><input name="mark" type="text" id="mark" size="30" value="<%=trim(rs1("mark"))%>"></td>
</tr>
<tr>
<td><input name="intro" type="text" id="intro" size="12" value="<%=trim(rs1("intro"))%>">
</td>
<td><input name="introduce" type="text" id="introduce" size="30" value="<%=trim(rs1("introduce"))%>"></td>
</tr>
<tr>
<td> <input name="predate" type="text" id="predate" size="12" value="<%=trim(rs1("predate"))%>">
</td>
<td><select name="productdateyear" id="productdateyear">
<%dim i
for i=1980 to 2010
response.write "<option value="&i
if int(left(rs1("productdate"),4))=i then response.write " selected "
response.write ">"&i&"</option>"
next
%>
</select>

<select name="productdatemonth" id="productdatemonth">
<option value="01" <% if int(right(left(rs1("productdate"),7),2))=1 Then Response.write("Selected") %>>1</option>
<option value="02" <% if int(right(left(rs1("productdate"),7),2))=2 Then Response.write("Selected") %>>2</option>
<option value="03" <% if int(right(left(rs1("productdate"),7),2))=3 Then Response.write("Selected") %>>3</option>
<option value="04" <% if int(right(left(rs1("productdate"),7),2))=4 Then Response.write("Selected") %>>4</option>
<option value="05" <% if int(right(left(rs1("productdate"),7),2))=5 Then Response.write("Selected") %>>5</option>
<option value="06" <% if int(right(left(rs1("productdate"),7),2))=6 Then Response.write("Selected") %>>6</option>
<option value="07" <% if int(right(left(rs1("productdate"),7),2))=7 Then Response.write("Selected") %>>7</option>
<option value="08" <% if int(right(left(rs1("productdate"),7),2))=8 Then Response.write("Selected") %>>8</option>
<option value="09" <% if int(right(left(rs1("productdate"),7),2))=9 Then Response.write("Selected") %>>9</option>
<option value="10" <% if int(right(left(rs1("productdate"),7),2))=10 Then Response.write("Selected") %>>10</option>
<option value="11" <% if int(right(left(rs1("productdate"),7),2))=11 Then Response.write("Selected") %>>11</option>
<option value="12" <% if int(right(left(rs1("productdate"),7),2))=12 Then Response.write("Selected") %>>12</option>
</select>
月<select name="productdateday" id="productdateday">
<option value="01" <% if int(right(left(rs1("productdate"),10),2))=1 Then Response.write("Selected") %>>1</option>
<option value="02" <% if int(right(left(rs1("productdate"),10),2))=2 Then Response.write("Selected") %>>2</option>
<option value="03" <% if int(right(left(rs1("productdate"),10),2))=3 Then Response.write("Selected") %>>3</option>
<option value="04" <% if int(right(left(rs1("productdate"),10),2))=4 Then Response.write("Selected") %>>4</option>
<option value="05" <% if int(right(left(rs1("productdate"),10),2))=5 Then Response.write("Selected") %>>5</option>
<option value="06" <% if int(right(left(rs1("productdate"),10),2))=6 Then Response.write("Selected") %>>6</option>
<option value="07" <% if int(right(left(rs1("productdate"),10),2))=7 Then Response.write("Selected") %>>7</option>
<option value="08" <% if int(right(left(rs1("productdate"),10),2))=8 Then Response.write("Selected") %>>8</option>
<option value="09" <% if int(right(left(rs1("productdate"),10),2))=9 Then Response.write("Selected") %>>9</option>
<option value="10" <% if int(right(left(rs1("productdate"),10),2))=10 Then Response.write("Selected") %>>10</option>
<option value="11" <% if int(right(left(rs1("productdate"),10),2))=11 Then Response.write("Selected") %>>11</option>
<option value="12" <% if int(right(left(rs1("productdate"),10),2))=12 Then Response.write("Selected") %>>12</option>
<option value="13" <% if int(right(left(rs1("productdate"),10),2))=13 Then Response.write("Selected") %>>13</option>
<option value="14" <% if int(right(left(rs1("productdate"),10),2))=14 Then Response.write("Selected") %>>14</option>
<option value="15" <% if int(right(left(rs1("productdate"),10),2))=15 Then Response.write("Selected") %>>15</option>
<option value="16" <% if int(right(left(rs1("productdate"),10),2))=16 Then Response.write("Selected") %>>16</option>
<option value="17" <% if int(right(left(rs1("productdate"),10),2))=17 Then Response.write("Selected") %>>17</option>
<option value="18" <% if int(right(left(rs1("productdate"),10),2))=18 Then Response.write("Selected") %>>18</option>
<option value="19" <% if int(right(left(rs1("productdate"),10),2))=19 Then Response.write("Selected") %>>19</option>
<option value="20" <% if int(right(left(rs1("productdate"),10),2))=20 Then Response.write("Selected") %>>20</option>
<option value="21" <% if int(right(left(rs1("productdate"),10),2))=21 Then Response.write("Selected") %>>21</option>
<option value="22" <% if int(right(left(rs1("productdate"),10),2))=22 Then Response.write("Selected") %>>22</option>
<option value="23" <% if int(right(left(rs1("productdate"),10),2))=23 Then Response.write("Selected") %>>23</option>
<option value="24" <% if int(right(left(rs1("productdate"),10),2))=24 Then Response.write("Selected") %>>24</option>
<option value="25" <% if int(right(left(rs1("productdate"),10),2))=25 Then Response.write("Selected") %>>25</option>
<option value="26" <% if int(right(left(rs1("productdate"),10),2))=26 Then Response.write("Selected") %>>26</option>
<option value="27" <% if int(right(left(rs1("productdate"),10),2))=27 Then Response.write("Selected") %>>27</option>
<option value="28" <% if int(right(left(rs1("productdate"),10),2))=28 Then Response.write("Selected") %>>28</option>
<option value="29" <% if int(right(left(rs1("productdate"),10),2))=29 Then Response.write("Selected") %>>29</option>
<option value="30" <% if int(right(left(rs1("productdate"),10),2))=30 Then Response.write("Selected") %>>30</option>
<option value="31" <% if int(right(left(rs1("productdate"),10),2))=31 Then Response.write("Selected") %>>31</option>
</select>
日</td>
</tr>
<tr>
<td><input name="price" type="text" id="price" size="12" value="<%=trim(rs1("price"))%>"></td>
<td>市场价:
<input name="price1" type="text" id="price1" size="6" onkeypress = "return regInput(this, /^\d*\.?\d{0,2}$/, String.fromCharCode(event.keyCode))"
onpaste = "return regInput(this, /^\d*\.?\d{0,2}$/, window.clipboardData.getData('Text'))"
ondrop = "return regInput(this, /^\d*\.?\d{0,2}$/, event.dataTransfer.getData('Text'))" value="<%=rs1("price1")%>">
元,会员价:
<input name="price2" type="text" id="price2" size="6" onkeypress = "return regInput(this, /^\d*\.?\d{0,2}$/, String.fromCharCode(event.keyCode))"
onpaste = "return regInput(this, /^\d*\.?\d{0,2}$/, window.clipboardData.getData('Text'))"
ondrop = "return regInput(this, /^\d*\.?\d{0,2}$/, event.dataTransfer.getData('Text'))" value="<%=rs1("price2")%>">
元, VIP会员价:
<input name="vipprice" type="text" id="vipprice" size="6" onkeypress = "return regInput(this, /^\d*\.?\d{0,2}$/, String.fromCharCode(event.keyCode))"
onpaste = "return regInput(this, /^\d*\.?\d{0,2}$/, window.clipboardData.getData('Text'))"
ondrop = "return regInput(this, /^\d*\.?\d{0,2}$/, event.dataTransfer.getData('Text'))" value="<%=rs1("vipprice")%>">
元,赠送积分:

2007-09-05 16:28
qxjyphm
Rank: 1
等 级:新手上路
帖 子:6
专家分:0
注 册:2007-9-5
收藏
得分:0 

<INPUT NAME="score" VALUE="<%=trim(rs1("score"))%>" SIZE="4" TYPE="text" ONKEYPRESS = "return regInput(this, /^[0-9]*$/, String.fromCharCode(event.keyCode))"
ONPASTE = "return regInput(this, /^[0-9]*$/, window.clipboardData.getData('Text'))"
ONDROP = "return regInput(this, /^[0-9]*$/, event.dataTransfer.getData('Text'))">
分</td>
</tr>
<tr>
<td><input name="prestock" type="text" id="prestock" size="12" value="<%=trim(rs1("prestock"))%>"></td>
<td>共 上:
<input name="amount" type="text" id="amount" size="6" onkeypress = "return regInput(this, /^\d*\.?\d{0,2}$/, String.fromCharCode(event.keyCode))"
onpaste = "return regInput(this, /^\d*\.?\d{0,2}$/, window.clipboardData.getData('Text'))"
ondrop = "return regInput(this, /^\d*\.?\d{0,2}$/, event.dataTransfer.getData('Text'))" value="<%=trim(rs1("amount"))%>">
件,库 存:
<input name="stock" type="text" id="stock" size="6" onkeypress = "return regInput(this, /^\d*\.?\d{0,2}$/, String.fromCharCode(event.keyCode))"
onpaste = "return regInput(this, /^\d*\.?\d{0,2}$/, window.clipboardData.getData('Text'))"
ondrop = "return regInput(this, /^\d*\.?\d{0,2}$/, event.dataTransfer.getData('Text'))" value="<%=trim(rs1("stock"))%>">
件</td>
</tr>
<tr>
<td><input name="other" type="text" id="other" size="12" value="<%=trim(rs1("other"))%>"></td>
<td><input name="grade" type="text" id="grade" size="12" value="<%=trim(rs1("grade"))%>"></td>
</tr>
<tr>
<td><input name="pretype" type="text" id="pretype" size="12" value="<%=trim(rs1("pretype"))%>"></td>
<td><input name="type" type="text" id="type2" value="<%=trim(rs1("type"))%>" size="30">
</td>
</tr>
<tr>
<td><input name="graph" type="text" id="graph" size="12" value="<%=trim(rs1("graph"))%>">
</td>
<td><input name="pic" type="text" id="pic" size="30" value="<%=trim(rs1("pic"))%>">
<input type="button" name="Submit11" value="上传图片" onClick="window.open('upfile.asp?formname=myform&editname=pic&uppath=images/upfile&filelx=jpg','','status=no,scrollbars=no,top=20,left=110,width=420,height=165')"></td>
</tr>
<tr>
<td><input name="graph2" type="text" id="graph2" size="12" value="<%=trim(rs1("graph2"))%>">
</td>
<td><input name="photo" type="text" id="photo" size="30" value="<%=trim(rs1("photo"))%>">
<input type="button" name="Submit12" value="上传图片" onClick="window.open('upfile.asp?formname=myform&editname=photo&uppath=images/upfile&filelx=jpg','','status=no,scrollbars=no,top=20,left=110,width=420,height=165')"></td>
</tr>
<tr>
<td><input name="link" type="text" id="link" size="12" value="<%=trim(rs1("link"))%>"></td>
<td><input name="addlink" type="text" id="addlink" value="<%=trim(rs1("addlink"))%>" size="30"></td>
</tr>
<tr>
<td valign="top"> <input name="description" type="text" id="description2" size="12" value="<%=trim(rs1("description"))%>"><br>
</td>
<td>
<INPUT type="hidden" name="detail" value="<% = Server.HtmlEncode(rs1("detail")) %>">
<iframe ID="detail" src="htmledit/ewebeditor.asp?id=detail&style=standard" frameborder="0" scrolling="no" width="550" HEIGHT="350"></iframe>
</td></tr>
<tr>
<td valign="top"> <input name="remarks" type="text" id="remarks" size="12" value="<%=trim(rs1("remarks"))%>">
</td>
<td>
<INPUT type="hidden" name="content" value="<% = Server.HtmlEncode(rs1("content")) %>">
<iframe ID="content" src="htmledit/ewebeditor.asp?id=content&style=standard" frameborder="0" scrolling="no" width="550" HEIGHT="350"></iframe>
</td>
</tr>
<tr>
<td></td>
<td>
商品类别<select name="recommend" id="recommend">
<option value="0" <% if rs1("recommend")=0 Then Response.write("Selected") %>>普通商品</option>
<option value="1" <% if rs1("recommend")=1 Then Response.write("Selected") %>>推荐商品</option>
<option value="2" <% if rs1("recommend")=2 Then Response.write("Selected") %>>特价商品</option>
<option value="3" <% if rs1("recommend")=3 Then Response.write("Selected") %>>新品上架</option>
<option value="4" <% if rs1("recommend")=4 Then Response.write("Selected") %>>推荐特价</option>
<option value="5" <% if rs1("recommend")=5 Then Response.write("Selected") %>>推荐新品</option>
<option value="6" <% if rs1("recommend")=6 Then Response.write("Selected") %>>新品特价</option>
<option value="7" <% if rs1("recommend")=7 Then Response.write("Selected") %>>赠送礼品</option>
</select>
<input type="submit" name="Submit" value="修 改" onClick="return check();">
</td>
</tr>
</table>
</td></form>
</tr>
</table><%rs1.close
set rs1=nothing
conn.close
set conn=nothing%>
<!--#include file="footer.asp"-->
<SCRIPT LANGUAGE="JavaScript">
<!--
function check()
{
if(checkspace(document.myform.name.value)) {
document.myform.name.focus();
alert("请输入商品名称!");
return false;
}
if(checkspace(document.myform.price1.value)) {
document.myform.price1.focus();
alert("请输入市场价!");
return false;
}
if(checkspace(document.myform.price2.value)) {
document.myform.putongjia.focus();
alert("请输入普通会员价!");
return false;
}
if(checkspace(document.myform.vipprice.value)) {
document.myform.price2.focus();
alert("请输入VIP会员价!");
return false;
}

}
function checkspace(checkstr) {
var str = '';
for(i = 0; i < checkstr.length; i++) {
str = str + ' ';
}
return (str == checkstr);
}
//-->
</script>
<script>
function regInput(obj, reg, inputStr)
{
var docSel = document.selection.createRange()
if (docSel.parentElement().tagName != "INPUT") return false
oSel = docSel.duplicate()
oSel.text = ""
var srcRange = obj.createTextRange()
oSel.setEndPoint("StartToStart", srcRange)
var str = oSel.text + inputStr + srcRange.text.substr(oSel.text.length)
return reg.test(str)
}
</script>

[此贴子已经被作者于2007-9-5 16:29:37编辑过]

2007-09-05 16:28
qxjyphm
Rank: 1
等 级:新手上路
帖 子:6
专家分:0
注 册:2007-9-5
收藏
得分:0 

这是我准备修改后的

<!--#include file="conn.asp"-->
<%
if session("admin")="" then
conn.close
set conn = nothing
response.Write "<script language='javascript'>alert('请先登录!');history.go(-1);</script>"
response.End
else
if request.cookies("timesshop")("admin")="" then
conn.close
set conn = nothing
response.Write "<script language='javascript'>alert('请先登录!');history.go(-1);</script>"
response.End
end if
end if
%>
<title>管理商品</title>
<%
dim selectm,selectkey,selectid
selectkey=trim(request.form(trim("selectkey")))
selectm=trim(request.form("selectm"))
selectid=request.form("selectid")
if selectid<>"" then
if session("rank")>2 then
conn.close
set conn = nothing
response.Write "<script language='javascript'>alert('你无权管理商品!');history.go(-1);</script>"
response.End
end if
conn.execute "delete from product where id in ("&selectid&")"
response.Redirect "chkpro.asp"
response.End
end if
%>
<table width="98%" border="0" align="center" cellpadding="1" cellspacing="1" bgcolor="#6699cc">
<tr>
<td align="center"><font color="#FFFFFF">商品查询</font></td>
</tr>
<tr bgcolor="#FFFFFF">
<form name="form2" method="post" action="chkpro.asp">
<td>
<table width="80%" border="0" align="center" cellpadding="1" cellspacing="1" bgcolor="#CCCCCC">
<tr bgcolor="#FFFFFF" align="center">
<td width="35%"> <input name="selectkey" type="text" id="selectkey" onFocus="this.value=''" value="请输入关健字">
</td>
<td width="45%"> <select name="selectm" id="select">
<OPTION VALUE="name">按商品名称</OPTION>
<OPTION VALUE="zuozhe">按商品品牌</OPTION>
<OPTION VALUE="chubanshe">按商品简介</OPTION>
</select> </td>
<td width="20%"><input type="submit" name="Submit" value="查 询" onClick="return chkkey();"></td>
</tr>
</table></td>
</form>
</tr>
</table><br>

<table width="98%" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#6699cc">
<tr>
<td height="20" align="center"><font color="#FFFFFF">商品查看与修改</font></td>
</tr>
<tr>
<form name="form1" method="post" action="">
<td height="100" bgcolor="#FFFFFF">
<%
Const MaxPerPage=20
dim totalPut
dim CurrentPage
dim TotalPages
dim j
dim sql
if Not isempty(SafeRequest("page",1)) then
currentPage=Cint(SafeRequest("page",1))
else
currentPage=1
end if
set rs=server.CreateObject("adodb.recordset")
select case selectm
case ""
rs.open "select id,name,adddate,price2,type,mark,introduce from product order by name desc",conn,1,1
case "0"
response.write "<center>请返回选择您要查询的方式!<br><br><a href=javascript:history.go(-1)>点击返回上一页</a></center>"
response.End
case "name"
rs.open "select id,name,adddate,price2,type,mark,introduce from product where name like '%"&selectkey&"%' order by name desc",conn,1,1
case "zuozhe"
rs.open "select id,name,adddate,price2,type,mark,introduce from product where mark like '%"&selectkey&"%' order by name desc",conn,1,1
case "chubanshe"
rs.open "select id,name,adddate,price2,type,mark,introduce from product where introduce like '%"&selectkey&"%' order by name desc",conn,1,1
end select
if err.number<>0 then
response.write "数据库中暂时无数据"
end if

if rs.eof And rs.bof then
Response.Write "<p align='center' class='contents'> 数据库中暂时无数据!</p>"
else
totalPut=rs.recordcount

if currentpage<1 then
currentpage=1
end if

if (currentpage-1)*MaxPerPage>totalput then
if (totalPut mod MaxPerPage)=0 then
currentpage= totalPut \ MaxPerPage
else
currentpage= totalPut \ MaxPerPage + 1
end if
end if

if currentPage=1 then
showContent
showpage totalput,MaxPerPage,"chkpro.asp"
else
if (currentPage-1)*MaxPerPage<totalPut then
rs.move (currentPage-1)*MaxPerPage
dim bookmark
bookmark=rs.bookmark
showContent
showpage totalput,MaxPerPage,"chkpro.asp"
else
currentPage=1
showContent
showpage totalput,MaxPerPage,"chkpro.asp"
end if
end if
end if

sub showContent
dim i
i=0%>
<table width="95%" border="0" align="center" cellpadding="1" cellspacing="1" bgcolor="#CCCCCC">
<tr bgcolor="#FFFFFF" align="center" height="20">
<td width="25%">商品名称</td>
<td colspan="2">商品价格</td>
<td width="32%">配置</td>
<td width="13%">货源</td>
<td width="13%">加入时间</td>
<td width="5%">选 择</td>
</tr>











<%
do while not rs.eof%>
<tr bgcolor="#FFFFFF" align="center">
<td align="left">&nbsp;<a href=editpro.asp?id=<%=rs("id")%>>
<% if len(trim(rs("name")))>20 then
response.write left(trim(rs("name")),18)&"..."
else
response.write trim(rs("name"))
end if%>
</a></td>


















<td width="7%" align="left">



<input name="price2" type="text" id="price2" size="6" value="<%=trim(rs("price2"))%>"></td>
<td width="5%" align="left"><input type="submit" name="Submit2" value="修改"></td>
<td nowrap><% if len(trim(rs("type")))>20 then
response.write left(trim(rs("type")),18)&"..."
else
response.write trim(rs("type"))
end if%>&nbsp;</td>
<td nowrap><%=trim(rs("mark"))%>&nbsp;</td>
<td nowrap><%=rs("adddate")%></td>
<td align="center"><input name="selectid" type="checkbox" id="selectid" value="<%=rs("id")%>"></td>
</tr>
<%i=i+1
if i>=MaxPerPage then Exit Do
rs.movenext
loop
rs.close
set rs=nothing%>
<tr bgcolor="#FFFFFF">
<td height="30" colspan="7" align="right">全选 <input type="checkbox" name="checkbox2" value="Check All" onClick="mm()">&nbsp;<input type="submit" name="Submit" value="删 除" onClick="return test();">
&nbsp;&nbsp; </td>
</tr>
</table>
<%
End Sub

Function showpage(totalnumber,maxperpage,filename)
Dim n

If totalnumber Mod maxperpage=0 Then
n= totalnumber \ maxperpage
Else
n= totalnumber \ maxperpage+1
End If

Response.Write "<form method=Post action="&filename&"?selectm="&selectm&"&selectkey="&selectkey&" >"
Response.Write "<p align='center' class='contents'> "
If CurrentPage<2 Then
Response.Write "<font class='contents'>首 页 上一页</font> "
Else
Response.Write "<a href="&filename&"?page=1&selectm="&selectm&"&selectkey="&selectkey&" class='contents'>首 页</a> "
Response.Write "<a href="&filename&"?page="&CurrentPage-1&"&selectm="&selectm&"&selectkey="&selectkey&" class='contents'>上一页</a> "
End If

If n-currentpage<1 Then
Response.Write "<font class='contents'>下一页 末 页</font>"
Else
Response.Write "<a href="&filename&"?page="&(CurrentPage+1)&"&selectm="&selectm&"&selectkey="&selectkey&" class='contents'>"
Response.Write "下一页</a> <a href="&filename&"?page="&n&"&selectm="&selectm&"&selectkey="&selectkey&" class='contents'>末 页</a>"
End If
Response.Write "<font class='contents'> 页次:</font><font class='contents'>"&CurrentPage&"</font><font class='contents'>/"&n&"页</font> "
Response.Write "<font class='contents'> 共有"&totalnumber&"种商品 "
Response.Write "<font class='contents'>转到第:</font><input type='text' name='page' size=2 maxlength=10 class=smallInput value="&currentpage&">页"
Response.Write "&nbsp;<input type='submit' class='contents' value='跳转' name='cndok' ></form>"
End Function
%></td>
</form>
</tr>
</table>
<br>
<!--#include file="footer.asp"-->
<script language=javascript>
function test()
{
if(!confirm('确认删除吗?')) return false;
}

function chkkey()
{
if(checkspace(document.form2.selectkey.value.length=0)){
document.form2.selectkey.focus();
alert("请输入查询关键字")
return false;
}
}

function mm()
{
var a = document.getElementsByTagName("input");
if(a[0].checked==true){
for (var i=0; i<a.length; i++)
if (a[i].type == "checkbox") a[i].checked = false;
}
else
{
for (var i=0; i<a.length; i++)
if (a[i].type == "checkbox") a[i].checked = true;
}
}
</script>

2007-09-05 16:30
qxjyphm
Rank: 1
等 级:新手上路
帖 子:6
专家分:0
注 册:2007-9-5
收藏
得分:0 
2~4楼打包文件
ky6aXDsO.rar (6.55 KB) [求助]时代商城后台数据库写入问题.请懂的朋友指教一二




请各位朋友,一定帮帮忙啊..跪谢了.
2007-09-05 16:37
qxjyphm
Rank: 1
等 级:新手上路
帖 子:6
专家分:0
注 册:2007-9-5
收藏
得分:0 

人气差啊....自己顶一火

2007-09-07 13:17
快速回复:[求助]时代商城后台数据库写入问题.请懂的朋友指教一二
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.021265 second(s), 10 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved