| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 1457 人关注过本帖
标题:缺少 'End'
只看楼主 加入收藏
ssechina
Rank: 1
等 级:新手上路
帖 子:2
专家分:0
注 册:2006-2-10
收藏
 问题点数:0 回复次数:5 
缺少 'End'

错误类型:
Microsoft VBScript 编译器错误 (0x800A03F6)
缺少 'End'
/shop2/ssechina/prod1.asp, 第 521 行

代码如下


<TR><TD width=100 align=center>
<input name="Prodidtext" type="text" value="<%=prodid%>" size=7>
</td><td>
<input name="ProdId" type="text" value="<%=autoidtxt%>" size="20" maxlength="7"> &nbsp;<img src=../images/admin/memo.gif alt='商品编号不能修改'></TD></TR>

<TR><TD width=100 align=center>
<input name="Prodnametext" type="text" value="<%=prodname%>" size=7>
</td><td>
<input name="ProdName" type="text" value="" size="20" maxlength="50"> &nbsp;<img src=../images/admin/memo.gif alt='必填,不能为空'></TD></TR>

<TR><TD width=100 align=center>
<input name="Modeltext" type="text" value="<%=Modeltext%>" size=7>
</td><td>
<input name="Model" type="text" value=""> &nbsp;<img src=../images/admin/memo.gif alt='选填,填写商品的其它属性<br>如:“商品型号”、“品牌”、“产地”等'></TD></TR>

<TR><TD width=100 align=center>
<input name="Prodtext1" type="text" value="<%=prodtext1%>" size=7>
</td><td>
<input name="prod1" type="text" value=""> </TD></TR>

<TR><TD width=100 align=center><input name="Prodtext2" type="text" value="<%=prodtext2%>" size=7></td><td>
<input name="prod2" type="text" value=""> </TD></TR>

<TR><TD width=100 align=center>
<input name="PriceOrigintext" type="text" value="<%=shichang%>" size=7>
</td><td>
<input name="PriceOrigin" type="text" value="0" size="6" maxlength="10"> 元</TD></TR>

<TR><TD width=100 align=center>
<input name="PriceListtext" type="text" value="<%=remai%>" size=7>
</td><td>
<input name="PriceList" type="text" value="0" size="6" maxlength="10"> 元&nbsp;<img src=../images/admin/memo.gif alt="价格为0时,显示“价格请咨询”等提示语<br>可在“综合设置”下的“商品参数设置”中设置此提示语"></TD></TR>

<TR><TD width=100 align=center>备货状态</td><td>
<input type="radio" name="Quantity" value="1" checked>有货&nbsp;<input type="radio" name="Quantity" value="0">缺货&nbsp;<img src="../images/admin/memo.gif" alt="缺货时,显示“货品备货中”等提示语<br>可在“综合设置”下的“商品参数设置”中设置此提示语"></TD></TR>

<TR><TD width=100 align=center>商品略图</td><td>
<input name="ImgPrev" type="text" value="pic/none.gif" size="40" maxlength="100">&nbsp;<INPUT alt="请单击“浏览”上传图片<br>或填写图片的网址,如<font color=blue>http://www.aspde.com/pic/mp3.jpg</font><br>或填写站内的图片路径、文件名,如<font color=blue>pic/more/001.jpg</font>" TYPE="button" value="浏览" onclick="javascript:uppic('','ImgPrev');">&nbsp;&nbsp; <img src=../images/admin/memo.gif alt='<font color=red>何谓“略图”:</font><br>略图也就是商品的小图片,建议制作为200象素宽<br>略图显示在首页、分类页、搜索页、商品介绍页<br><font color=red>大图显示在什么位置?</font><br>点击商品页的“查看大图”按钮可查看所有大图'></TD></TR>

<TR><TD width=100 align=center>商品大图</td><td>




521行<input name="PriceListtext" type="text" value="<%=remai%>" size=7>

搜索更多相关主题的帖子: End Microsoft name 
2006-02-10 23:58
ssechina
Rank: 1
等 级:新手上路
帖 子:2
专家分:0
注 册:2006-2-10
收藏
得分:0 

哪位高手帮帮忙,非常感谢@

2006-02-10 23:59
阳光白雪
Rank: 7Rank: 7Rank: 7
等 级:贵宾
威 望:39
帖 子:2220
专家分:0
注 册:2005-11-18
收藏
得分:0 

仔细检查一下你的代码就能找到了,

缺少end if 或者end function 等语句


专注于WEB前端交互平台开发:[url=http://blog./]blog.[/url](富客户端技术(RIA)交流平台)
2006-02-11 08:39
witer
Rank: 1
等 级:新手上路
帖 子:165
专家分:0
注 册:2006-2-7
收藏
得分:0 
这里我想应该是代码的一部吧,如果要找的话你就把那张网页的全部代码放出来吧不然找不到
2006-02-11 11:13
钦钦
Rank: 1
等 级:新手上路
帖 子:1
专家分:0
注 册:2006-10-20
收藏
得分:0 
是不是这段源码

<!--#include file="../include/buyok_shop_30_conn.asp"-->
<!--#include file="checkadmin.asp"-->
<script language=javascript src=../include/mouse_on_title.js></script>
<%call checkmanage("03")%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" href="manage.css" type="text/css">
<script language="JavaScript" type="text/JavaScript">
function JM_wu(ob){
ob.style.display="none";
}
function JM_you(ob){
ob.style.display="";
}
function uppic(model,frmname) {
id=document.prodtable.ProdId.value;
if (id=='') {
alert("请先填写商品编号!");
document.prodtable.ProdId.focus();
return false;}
window.open("upload.asp?fuptype=pic&fupname="+id+model+"&frmname="+frmname,"blank_","scrollbars=yes,resizable=no,width=650,height=450")
}

function CheckAll(form) {
for (var i=0;i<form.elements.length;i++) {
var e = form.elements[i];
if (e.name != 'chkall') e.checked = form.chkall.checked;
}
}
</script>
</head>

<BODY background="../images/admin/back.gif">

<%
if request("action")="add" or request("show")="yes" then
response.cookies("buyok")("sql")=""
end if

url="prod1.asp"

action = request("action")
if action="" then
%>

<table width="750" border="1" style="border-collapse: collapse; border-style: dotted; border-width: 0px" bordercolor="#333333" cellspacing="0" cellpadding="2">
<form name=Prodlist action=prod1.asp method=post>
<tr><td colspan=9 class=td height=18>商品管理</td></tr>
<tr>
<td width=15 align=center>选</td>
<td width=50 align=center>编号</td>
<td width=200 align=center>名称 [点击名称预览该商品]</td>
<td width=85 align=center>添加/提升日期</td>
<td width=265 align=center colspan=3>编辑</td>
<td width=30 align=center>状态</td>
<td width=40 align=center>点击数</td>
</tr>

<%
'显示商品列表
Set setup = conn.Execute("select * from shopsetup")
per_page_num=setup("per_page_num")'读取每页商品数
if per_page_num="" or per_page_num<=1 then per_page_num=20
paixu=setup("paixu")'读取排序方式
set setup=nothing

pages = per_page_num
set rs = server.createobject("adodb.recordset")
if request.cookies("buyok")("sql")="" then'无搜索选项,即显示全部商品
if paixu="1" then orderby=" order by adddate desc"
if paixu="2" then orderby=" order by adddate"
if paixu="3" then orderby=" order by prodid desc"
if paixu="4" then orderby=" order by adddate"
if paixu="5" then orderby=" order by prodname"
if paixu="6" then orderby=" order by ClickTimes desc"
sql = "select * from buyok_produc where ProdId is not null " + orderby
else'有搜索选项,显示搜索结果
sql=request.cookies("buyok")("sql")
end if

rs.open sql,conn,1,3

if rs.eof and rs.bof then
response.write "<tr><td colspan=9 align=center height=50>没有找到相关商品</td></tr>"
end if

if not (rs.eof and rs.bof) then
totalrec = RS.RecordCount

rs.pageSize = pages
allPages = rs.pageCount
page = Request("page")
If not isNumeric(page) then page=1
if isEmpty(page) or int(page) <= 1 then
page = 1
elseif int(page) >= allPages then
page = allPages
end if
rs.AbsolutePage = page

do while not rs.eof and pages>0
%>
<tr><td colspan=9 height=5 onMouseOver="bgColor='#FF8899'" onMouseOut="bgColor='E7E7E7'"></td></tr>
<%
adddate=split(rs("adddate")," ")
response.write "<tr><td><input type='checkbox' value='"&rs("ProdNum")&"' name=id></td>"
response.write "<td>"&rs("ProdId")&"</a></td><td><a target='_blank' href='../gotourl.asp?list.asp?ProdId="&rs("ProdId")&"' alt='查看<font color=red> "&rs("ProdName")&" </font>的前台页面'>"&lleft(rs("ProdName"),32)&"</a></td>"
response.write "<td><span title="&replace(rs("adddate")," ",",")&">"&adddate(0)&"</span></td>"
if rs("remark")="0" then
tjian="../images/admin/prodgif1.gif"
else
tjian="../images/admin/prodgif3.gif"
end if
if rs("tejia")="0" then
tjia="../images/admin/prodgif2.gif"
else
tjia="../images/admin/prodgif4.gif"
end if
response.write "<td align=center><input type=button onClick='javascript:location.href=""prod1.asp?page="&currentpage&"&action=detail&id="&rs("ProdId")&""";' value='编辑'><input alt='执行此操作,将实现:<br>前台:此商品将成为首页第一个商品<br>后台:出现在列表顶端' type=button onClick='javascript:location.href=""prod1.asp?action=tisheng&id="&rs("ProdId")&""";' value='提升'></td><td align=center><img border=0 src="&tjian&" onClick='javascript:location.href=""prod1.asp?action=tuijian&id="&rs("ProdId")&""";'></td><td align=center><img border=0 src="&tjia&" onClick='javascript:location.href=""prod1.asp?action=tejia&id="&rs("ProdId")&""";'></td>"
response.write "<td align=center>"
if rs("online")=true then
response.write "显示</td>"
else
response.write "<font color=red>关闭</font></td>"
end if
response.write "<td align=right>"&rs("ClickTimes")&"</td></tr>"

pages=pages-1
rs.movenext
loop
end if

rs.close
conn.close
set rs=nothing
set coon=nothing
%>

<tr><td colspan=9>
<input type='checkbox' name=chkall onclick='CheckAll(this.form)'>全选
<input type="submit" name="action" value="删除" onClick="{if(confirm('商品删除后将无法恢复,您确定要删除选定的商品吗?')){this.document.Prodlist.submit();return true;}return false;}">
<input type="submit" name="action" value="关闭">
<input type="submit" name="action" value="打开">
<input type="button" name="action" onClick="javascript:location.href='prod1.asp?action=add';" value="添加商品">
</td></tr>
</form>
</table>

<%
call listpage()
end if

if action="detail" then
id=request("id")
call proddetail()
end if

if action="tisheng" then
id=request("id")
call tisheng()
end if

if action="tuijian" then
id=request("id")
call tuijian()
end if

if action="tejia" then
id=request("id")
call tejia()
end if

if action="删除" then
delid=replace(request("id"),"'","")
call proddel()
end if

if action="关闭" then
ProdNum=replace(request("id")," ","")
call prodclose()
end if

if action="打开" then
ProdNum=replace(request("id")," ","")
call prodopen()
end if

if action="add" then
call prodadd()
end if

if action="delother" then
call delother()
end if


sub listpage()

if allpages <= 1 then exit sub
if page = 1 then
response.write "<br><font color=#878787>首页 上页</font>"
else
response.write "<br> <a href='"&request.ServerVariables("script_name")&"?page=1'>首页</a> "
response.write " <a href='"&request.ServerVariables("script_name")&"?page="&page-1&"'>上页</a> "
end if
if page = allpages then
response.write "<font color=#878787>下页 末页</font>"
else
response.write " <a href='"&request.ServerVariables("script_name")&"?page="&page+1&"'>下页</a> "
response.write " <a href='"&request.ServerVariables("script_name")&"?page="&allpages&"'>末页</a> "
end if

response.write " &nbsp;&nbsp;&nbsp;第"&page&"页 共"&allpages&"页 &nbsp;&nbsp;&nbsp; 商品总数:"&totalrec& "&nbsp;&nbsp; 每页商品数:"& per_page_num

end sub

sub prodclose()
if ProdNum="" or isnull(ProdNum) then
response.write "<script language='javascript'>"
response.write "alert('您什么也没有选择,单击“确定”返回上一页!');"
response.write "location.href='javascript:history.go(-1)';"
response.write "</script>"
response.end
else
Set rs=Server.CreateObject("ADODB.Recordset")
sql="select * from buyok_produc where ProdNum in ("&ProdNum&")"
rs.open sql,conn,1,3
if rs.eof and rs.bof then
response.write "<script language='javascript'>"
response.write "alert('该商品并不存在,单击“确定”返回上一页!');"
response.write "location.href='javascript:history.go(-1)';"
response.write "</script>"
response.end
else
Do while not rs.eof
rs("online")=false
rs.update
rs.movenext
loop
end if
response.write "<script language='javascript'>"
response.write "alert('所选商品已经被关闭!');"
response.write "location.href='"&url&"';"
response.write "</script>"

rs.close
conn.close
set rs=nothing
set conn=nothing
end if
end sub

sub prodopen()
if ProdNum="" or isnull(ProdNum) then
response.write "<script language='javascript'>"
response.write "alert('您什么也没有选择,单击“确定”返回上一页!');"
response.write "location.href='javascript:history.go(-1)';"
response.write "</script>"
response.end
else
Set rs=Server.CreateObject("ADODB.Recordset")
sql="select * from buyok_produc where ProdNum in ("&ProdNum&")"
rs.open sql,conn,1,3
if rs.eof and rs.bof then
response.write "<script language='javascript'>"
response.write "alert('该商品并不存在,单击“确定”返回上一页!');"
response.write "location.href='javascript:history.go(-1)';"
response.write "</script>"
response.end
else
Do while not rs.eof
rs("online")=true
rs.update
rs.movenext
loop
end if
response.write "<script language='javascript'>"
response.write "alert('所选商品已经被打开!');"
response.write "location.href='"&url&"';"
response.write "</script>"

rs.close
conn.close
set rs=nothing
set conn=nothing
end if
end sub

sub delother()
'删除多图
conn.execute("delete from more_pic where ProdId='"&request("id")&"' and FilePath='"&request("FilePath")&"'")
response.redirect "prod1.asp?action=detail&id="&request("id")
end sub

sub prodadd()
if request("add") ="ok" then

Set rs=Server.CreateObject("ADODB.Recordset")
sql="select * from buyok_produc Where ProdId='"&request("ProdId")&"'"
rs.open sql,conn,3,3
if not rs.eof then

response.write "<script language='javascript'>"
response.write "alert('出错了,商品编号重复,请检查!');"
response.write "location.href='javascript:history.go(-1)';"
response.write "</script>"
response.end
rs.close
set rs=nothing
response.end
end if

if request("midcode")="" then
response.write "<script language='javascript'>"
response.write "alert('出错了,您没有选择有效的商品分类!');"
response.write "location.href='javascript:history.go(-1)';"
response.write "</script>"
response.end
end if

if request("ProdId")="" or request("ProdIdtext")="" or request("Prodname")="" or request("Prodnametext")="" or request("PriceList")="" or request("PriceListtext")="" or request("PriceOrigin")="" or request("PriceOrigintext")="" or request.form("ProdDisctext")="" or request.form("MemoSpectext")="" then
response.write "<script language='javascript'>"
response.write "alert('出错了,商品资料填写不完整!');"
response.write "location.href='javascript:history.go(-1)';"
response.write "</script>"
response.end
'response.end
end if

if len(request("ProdDisc"))>200 then
response.write "<script language='javascript'>"
response.write "alert('出错了,您填写的简介内容太长了!');"
response.write "location.href='javascript:history.go(-1)';"
response.write "</script>"
response.end
'response.end
end if


Set rs=Server.CreateObject("ADODB.Recordset")
sql="select * from buyok_produc Where ProdId='"&request("ProdId")&"'"
rs.open sql,conn,3,3
Set rsfile=Server.CreateObject("ADODB.Recordset")
rsfile.open "more_pic" ,conn,3,3

if not rs.eof then
response.write "<script language='javascript'>"
response.write "alert('出错了,商品编号重复,请检查!');"
response.write "location.href='javascript:history.go(-1)';"
response.write "</script>"
response.end
end if

rs.Addnew
rs("ProdIdtext")=request.form("ProdIdtext") '编号名称
rs("ProdId")=request.form("ProdId") '编号
rs("ProdNametext")=request.form("ProdNametext") '品名名称
rs("ProdName")=request.form("ProdName") '商品名称
rs("Modeltext")=request.form("Modeltext") '型号名称
rs("Model")=request.form("Model") '型号
rs("prodtext1")=request.form("prodtext1") '自定义一名称
rs("prod1")=request.form("prod1") '自定义一
rs("prodtext2")=request.form("prodtext2") '自定义二名称
rs("prod2")=request.form("prod2") '自定义二
rs("PriceOrigintext")=request.form("PriceOrigintext") '原价名称
rs("PriceOrigin")=request.form("PriceOrigin") '原价
rs("PriceListtext")=request.form("PriceListtext") '现价名称
rs("PriceList")=request.form("PriceList") '现价
code=split(request.form("Midcode"),"^")
rs("LarCode")=code(0) '大类
rs("MidCode")=code(1) '中类
rs("ProdDisctext")=request.form("ProdDisctext") '简介名称
rs("ProdDisc")=request.form("ProdDisc") '简介
rs("ImgPrev")=request.form("ImgPrev") '商品图片
rs("more_pic")=request.form("more_pic") '商品大图\多图
rs("Quantity")=request.form("Quantity") '备货状态
rs("MemoSpectext")=request.form("MemoSpectext") '商品介绍名称
rs("MemoSpec")=request.form("MemoSpec") '商品介绍
rs("Remark")=request.form("Remark") '是否推荐
rs("tejia")=request.form("tejia") '是否特价
rs("online")=true '是否在线
rs.update
rs.close
set rs=nothing

'如果有大图时,将大图写入另一个表
if request("more_pic")="1" then
For m=1 to request.form("more")
rsfile.addnew
rsfile("FilePath")=request.form("more"&m)
rsfile("ProdId")=request.form("ProdId")
rsfile.update
Next
end if

rsfile.close
set rsfile=nothing
conn.close
set conn=nothing

response.write "<script language='javascript'>"
response.write "alert('商品添加成功,单击“确定”返回商品列表。');"
response.write "location.href='prod1.asp';"
response.write "</script>"

else
LarCode=request("LarCode")
%>

<table width="750" border="1" style="border-collapse: collapse; border-style: dotted; border-width: 0px" bordercolor="#333333" cellspacing="0" cellpadding="2">
<tr><td colspan=2 class=td height=18>添加商品</td></tr>

<form name=prodtable method="post" action="">
<%
Dim a,b,c
set rsmid=server.createobject("adodb.recordset")
sqlmid="select distinct LarCode,LarSeq,MidCode,midSeq from buyok_class order by LarSeq,MIdSeq"
rsmid.Open sqlmid,conn,1,1

response.write "<TR><TD width=100 align=center>商品分类</td><td>"
response.write "<select name='MidCode'>"
response.write"<option value='未归类^未归类' selected>---选择商品所属分类---</option>"

'response.Write
if rsmid.bof and rsmid.eof then
response.write "<option selected value='未归类^未归类'>-暂无商品分类-</option>"
else
Do While Not rsmid.eof
a = rsmid("larcode")
response.write "<option value='"&rsmid("larCode")&"^"&rsmid("MidCode")&"'>"&rsmid("LarSeq")&"-"&rsmid("LarCode")&" >> "&rsmid("MidSeq")&"-"&rsmid("MidCode")&"</option>"
rsmid.movenext
if rsmid.eof then exit do
if rsmid("larcode")<>a then response.write "<option value=''>--------------------------</option>"
loop
end if
rsmid.close
set rsmid=nothing

response.write "</TD></TR>"

'确定商品编号
set rs = server.createobject("adodb.recordset")
sql = "select * from buyok_produc where ProdId is not null"
rs.cursorlocation = 3
rs.open sql,conn,1,1
if rs.bof and rs.eof then
autoid=1
else
totalid=rs.RecordCount'根据数据库中商品总数确定下一个商品的编号
autoid=totalid+1
end if
rs.close
set rs=nothing

autoidtxt=cstr(autoid)
if len(autoidtxt)=1 then
autoidtxt="000"&autoidtxt
elseif len(autoidtxt)=2 then
autoidtxt="00"&autoidtxt
elseif len(autoidtxt)=3 then
autoidtxt="0"&autoidtxt
end if

for i=1 to totalid
'检查自动生成的编号是否有重复,若有重复则自动加1

set rs=conn.execute("select prodid from buyok_produc where prodid='"&autoidtxt&"'")
if not (rs.eof and rs.bof) then
autoid=autoid+1
autoidtxt=cstr(autoid)
if len(autoidtxt)=1 then
autoidtxt="000"&autoidtxt
elseif len(autoidtxt)=2 then
autoidtxt="00"&autoidtxt
elseif len(autoidtxt)=3 then
autoidtxt="0"&autoidtxt
end if
end if
set rs=nothing
next

Set rstxt = conn.Execute("select * from shopsetup")
ProdName=rstxt("ProdName")
Prodid=rstxt("Prodid")
shichang=rstxt("shichang")
remai=rstxt("remai")
Proddisc=rstxt("Proddisc")
MemoSpec=rstxt("MemoSpec")
Modeltext=rstxt("Modeltext")
prodtext1=rstxt("prodtext1")
prodtext2=rstxt("prodtext2")
set rstxt=nothing
%>

<TR><TD width=100 align=center>
<input name="Prodidtext" type="text" value="<%=prodid%>" size=7>
</td><td>
<input name="ProdId" type="text" value="<%=autoidtxt%>" size="20" maxlength="7"> &nbsp;<img src=../images/admin/memo.gif alt='商品编号不能修改'></TD></TR>

<TR><TD width=100 align=center>
<input name="Prodnametext" type="text" value="<%=prodname%>" size=7>
</td><td>
<input name="ProdName" type="text" value="" size="20" maxlength="50"> &nbsp;<img src=../images/admin/memo.gif alt='必填,不能为空'></TD></TR>

<TR><TD width=100 align=center>
<input name="Modeltext" type="text" value="<%=Modeltext%>" size=7>
</td><td>
<input name="Model" type="text" value=""> &nbsp;<img src=../images/admin/memo.gif alt='选填,填写商品的其它属性<br>如:“商品型号”、“品牌”、“产地”等'></TD></TR>

<TR><TD width=100 align=center>
<input name="Prodtext1" type="text" value="<%=prodtext1%>" size=7>
</td><td>
<input name="prod1" type="text" value=""> </TD></TR>

<TR><TD width=100 align=center><input name="Prodtext2" type="text" value="<%=prodtext2%>" size=7></td><td>
<input name="prod2" type="text" value=""> </TD></TR>

<TR><TD width=100 align=center>
<input name="PriceOrigintext" type="text" value="<%=shichang%>" size=7>
</td><td>
<input name="PriceOrigin" type="text" value="0" size="6" maxlength="10"> 元</TD></TR>

<TR><TD width=100 align=center>
<input name="PriceListtext" type="text" value="<%=remai%>" size=7>
</td><td>
<input name="PriceList" type="text" value="0" size="6" maxlength="10"> 元&nbsp;<img src=../images/admin/memo.gif alt="价格为0时,显示“价格请咨询”等提示语<br>可在“综合设置”下的“商品参数设置”中设置此提示语"></TD></TR>

<TR><TD width=100 align=center>备货状态</td><td>
<input type="radio" name="Quantity" value="1" checked>有货&nbsp;<input type="radio" name="Quantity" value="0">缺货&nbsp;<img src="../images/admin/memo.gif" alt="缺货时,显示“货品备货中”等提示语<br>可在“综合设置”下的“商品参数设置”中设置此提示语"></TD></TR>

<TR><TD width=100 align=center>商品略图</td><td>
<input name="ImgPrev" type="text" value="pic/none.gif" size="40" maxlength="100">&nbsp;<INPUT alt="请单击“浏览”上传图片<br>或填写图片的网址,如<font color=blue> www.tyxing.com/pic/mp3.jpg</font><br>或填写站内的图片路径、文件名,如<font color=blue>pic/more/001.jpg</font>" TYPE="button" value="浏览" onClick="javascript:uppic('','ImgPrev');">&nbsp;&nbsp; <img src=../images/admin/memo.gif alt='<font color=red>何谓“略图”:</font><br>略图也就是商品的小图片,建议制作为130象素宽<br>略图显示在首页、分类页、搜索页、商品介绍页<br><font color=red>大图显示在什么位置?</font><br>点击商品页的“查看大图”按钮可查看所有大图'></TD></TR>

<TR><TD width=100 align=center>商品大图</td><td>
<SCRIPT LANGUAGE="JavaScript">
function createForm(textN,number) {
data = "";
inter = "'";
if (number < 11 && number > -1) {
for (i=1; i <= number; i++) {
if (i < 10) spaces=" ";
else spaces=" ";
data =data + "&nbsp;&nbsp;<input name="+textN+i+" type=text value='' size='30' maxlength='100'><INPUT TYPE='button' value='上传"+i+"' onclick=javascript:uppic('_more"+i+"','more"+i+"')><br>";
}
if (document.layers) {
document.layers.cust.document.write(data);
document.layers.cust.document.close();
}
else {
if (document.all) {
cust.innerHTML = data;
}
}
}
else {
window.alert("请不要超过10张图片.");
}
}
// End -->
</script>
<INPUT TYPE="radio" NAME="more_pic" checked value=0 onclick=JM_wu(s1)>无
<INPUT TYPE="radio" NAME="more_pic" value=1 onclick=JM_you(s1)>有&nbsp;<span id=s1 style="display:none"><input name="more" type=text value='1' size='5' maxlength='1'> <input type=button value="张大图" onClick="createForm('more',document.prodtable.more.value);"><br>
<span id=cust style="position:relative;"></span></span>

</TD></TR>

<TR><TD width=100 align=center valign="top">
<input name="ProdDisctext" type="text" value="<%=ProdDisc%>" size=7>
<br>(200字内)</td><td><textarea name="ProdDisc" cols="85" rows="4"></textarea></TD></TR>

<TR><TD width=100 align=center valign="top">
<input name="MemoSpectext" type="text" value="<%=MemoSpec%>" size=7>
</td><td>
<textarea name="MemoSpec" style="display:none"></textarea>
<iframe ID="edit3" src="../webedit/ewebeditor.asp?id=MemoSpec&style=putong" frameborder="0" scrolling="no" width="620" HEIGHT="500"></iframe>
</TD></TR>

<TR><TD width=100 align=center>是否推荐</td><td>
<input type="radio" name="Remark" value="0" checked>否&nbsp;<input type="radio" name="Remark" value="1">是
&nbsp;<img src=../images/admin/memo.gif alt='选择“是”将设为推荐商品'></TD></TR>

<TR><TD width=100 align=center>是否特价</td><td>
<input type="radio" name="tejia" value="0" checked>否&nbsp;<input type="radio" name="tejia" value="1">是
&nbsp;<img src=../images/admin/memo.gif alt='特价商品将出现在主页“特价商品”栏目中'></TD></TR>

<TR><TD colspan=2><INPUT TYPE="hidden" name=add value=ok><input type="submit" name="action" value="添加完成"></TD></TR>

</form>
</TABLE>
<%
end if
end sub

sub proddel()
if delid="" or isnull(delid) then
response.write "<script language='javascript'>"
response.write "alert('您什么也没有选择,单击“确定”返回上一页!');"
response.write "location.href='javascript:history.go(-1)';"
response.write "</script>"
response.end
else

'conn.execute("delete from buyok_produc where ProdNum in ("&delid&")")

set rs = server.createobject("adodb.recordset")
sql="select * from buyok_produc where ProdNum in ("&delid&")"
rs.open sql,conn,1,3
do while not rs.eof
conn.execute("delete from more_pic where Prodid = '"&rs("prodid")&"'")
rs.delete
rs.update
rs.movenext
if rs.eof then exit do
loop
rs.close
set rs=nothing

response.write "<script language='javascript'>"
response.write "alert('操作成功,所选商品已被删除!');"
response.write "location.href='"&url&"';"
response.write "</script>"
response.end
conn.close
set conn=nothing
end if
end sub

sub proddel()
if delid="" or isnull(delid) then
response.write "<script language='javascript'>"
response.write "alert('您什么也没有选择,单击“确定”返回上一页!');"
response.write "location.href='javascript:history.go(-1)';"
response.write "</script>"
response.end
else

'conn.execute("delete from buyok_produc where ProdNum in ("&delid&")")

set rs = server.createobject("adodb.recordset")
sql="select * from buyok_produc where ProdNum in ("&delid&")"
rs.open sql,conn,1,3
do while not rs.eof
conn.execute("delete from more_pic where Prodid = '"&rs("prodid")&"'")
rs.delete
rs.update
rs.movenext
if rs.eof then exit do
loop
rs.close
set rs=nothing

response.write "<script language='javascript'>"
response.write "alert('操作成功,所选商品已被删除!');"
response.write "location.href='"&url&"';"
response.write "</script>"
response.end
conn.close
set conn=nothing
end if
end sub

sub proddetail()
if id="" then
response.write "<script language='javascript'>"
response.write "alert('提交的商品编号不存在,请检查!');"
response.write "location.href='javascript:history.go(-1)';"
response.write "</script>"
response.end
else
'修改商品资料
if request("modify")="ok" then
if request("midcode")="" then
response.write "<script language='javascript'>"
response.write "alert('您没有选择有效的商品分类,单击“确定”返回上一页!');"
response.write "location.href='javascript:history.go(-1)';"
response.write "</script>"
response.end
end if

if request("ProdId")="" or request("ProdIdtext")="" or request("Prodname")="" or request("Prodnametext")="" or request("PriceList")="" or request("PriceListtext")="" or request("PriceOrigin")="" or request("PriceOrigintext")="" or request.form("ProdDisctext")="" or request.form("MemoSpectext")="" then
response.write "<script language='javascript'>"
response.write "alert('商品资料填写不完整,单击“确定”返回上一页!');"
response.write "location.href='javascript:history.go(-1)';"
response.write "</script>"
response.end
response.end
end if

if len(request("ProdDisc"))>200 then
response.write "<script language='javascript'>"
response.write "alert('您填写的商品简介内容太长了,单击“确定”返回上一页!');"
response.write "location.href='javascript:history.go(-1)';"
response.write "</script>"
response.end
end if

set rs=server.createobject("adodb.recordset")
sql = "select * from buyok_produc where ProdId='"&id&"'"
rs.open sql,conn,1,3
if not (rs.eof and rs.bof) then
rs("ProdId")=rs("ProdId")
rs("ProdIdtext")=request.form("ProdIdtext")'编号名称
rs("ProdNametext")=request.form("ProdNametext")'品名名称
rs("ProdName")=request.form("ProdName")'商品名称
rs("Modeltext")=request.form("Modeltext")'型号名称
rs("Model")=request.form("Model")'型号
rs("prodtext1")=request.form("prodtext1")'自定义一名称
rs("prod1")=request.form("prod1")'自定义一
rs("prodtext2")=request.form("prodtext2")'自定义二名称
rs("prod2")=request.form("prod2")'自定义二
rs("PriceOrigintext")=request.form("PriceOrigintext")'原价名称
rs("PriceOrigin")=request.form("PriceOrigin")'原价
rs("PriceListtext")=request.form("PriceListtext")'现价名称
rs("PriceList")=request.form("PriceList")'现价
code=split(request.form("Midcode"),"^")
rs("LarCode")=code(0)'大类
rs("MidCode")=code(1)'中类
rs("ProdDisctext")=request.form("ProdDisctext")'简介名称
rs("ProdDisc")=request.form("ProdDisc")'简介
rs("ImgPrev")=request.form("ImgPrev")'商品图片
rs("more_pic")=request.form("more_pic")'商品大图\多图
rs("Quantity")=request.form("Quantity")'备货状态
rs("MemoSpectext")=request.form("MemoSpectext")'商品介绍名称
rs("MemoSpec")=request.form("MemoSpec")'商品介绍
rs("ClickTimes")=request.form("ClickTimes")'点击次数
rs("Remark")=request.form("Remark")'是否推荐
rs("tejia")=request.form("tejia")'是否特价
if request.form("up")="1" then rs("AddDate")=now()'是否提升
rs.update
rs.close
set rs=nothing
end if


'写入大图到其它表
if request.form("more_pic")="1" then
set rsfile=Server.Createobject("ADODB.recordset")
sql="select * from more_pic where ProdId='"&request.form("ProdId")&"'"
rsfile.open sql,conn,3,3
if not rsfile.eof then '如果已经有图片表明是修改,则先删除旧的,再添加
conn.execute("delete from more_pic where ProdId='"&request.form("ProdId")&"'")
end if
rsfile.close
set rsfile=nothing

Set rs=Server.CreateObject("ADODB.Recordset")
rs.open "more_pic" ,conn,3,3
For m=1 to request("m")
rs.addnew
rs("FilePath")=request.form("more"&m)
rs("ProdId")=request.form("ProdId")
rs.update
next
rs.close
set rs=nothing
end if

page=request("page") '修改商品后返回当前页
response.write "<script language='javascript'>"
response.write "alert('您已成功修改了一件商品!');"
response.write "location.href='"&url&"?page="&page&"';"
response.write "</script>"

response.end
end if

set rs = server.createobject("adodb.recordset")
sql = "select * from buyok_produc where ProdId='"&id&"'"
rs.open sql,conn,1,1

if rs.eof and rs.bof then
response.write "<script language='javascript'>"
response.write "alert('没有此商品序号,请检查!');"
response.write "location.href='javascript:history.go(-1)';"
response.write "</script>"
response.end
end if

if not (rs.eof and rs.bof) then
%>
<%
end if
rs.close
set rs=nothing
end if
end sub

'提升
sub tisheng()
set rs=server.createobject("adodb.recordset")
sql = "select * from buyok_produc where ProdId='"&id&"'"
rs.open sql,conn,1,3
if not (rs.eof and rs.bof) then
rs("AddDate")=now()
rs.update
rs.close
end if
response.write "<script language='javascript'>"
response.write "alert('所选商品已被提升到列表顶端,单击“确定”返回商品列表。');"
response.write "location.href='"&url&"';"
response.write "</script>"
end sub


'推荐或取消推荐
sub tuijian()
set rs=server.createobject("adodb.recordset")
sql = "select * from buyok_produc where ProdId='"&id&"'"
rs.open sql,conn,1,3
if not (rs.eof and rs.bof) then
if rs("remark")="1" then
rs("remark")="0"
rs("tjdate")=rs("adddate")
tjian="所选商品已取消推荐,单击“确定”返回商品列表。"
else
rs("remark")="1"
rs("tjdate")=now()
tjian="所选商品已列为推荐商品,单击“确定”返回商品列表。"
end if
rs.update
rs.close
end if
response.write "<script language='javascript'>"
response.write "alert('"&tjian&"');"
'response.write "location.href='javascript:history.go(-1)';"
response.write "location.href='"&url&"';"
response.write "</script>"
end sub


'设置或取消特价
sub tejia()
set rs=server.createobject("adodb.recordset")
sql = "select * from buyok_produc where ProdId='"&id&"'"
rs.open sql,conn,1,3
if not (rs.eof and rs.bof) then
if rs("tejia")="1" then
rs("tejia")="0"
tjia="所选商品已列为非特价商品,单击“确定”返回商品列表。"
else
rs("tejia")="1"
tjia="所选商品已列为特价商品,单击“确定”返回商品列表。"
end if
rs.update
rs.close
end if
response.write "<script language='javascript'>"
response.write "alert('"&tjia&"');"
response.write "location.href='"&url&"';"
response.write "</script>"
end sub
%>
</body>
</html>

2006-10-20 09:46
tang688
Rank: 5Rank: 5
等 级:贵宾
威 望:16
帖 子:1219
专家分:35
注 册:2004-12-25
收藏
得分:0 
提示在这一行的原因是:
这一行中含有所有程序里的最后一句asp程序,就是<% %>中的程序.
而实际你缺少的应该在这之前.
注意:
一、它可能是在包含文件中就已经缺少了。
二、不光光是可能缺少END,也有可能少的是next、loop等等关门语句。

2006-10-20 13:12
快速回复:缺少 'End'
数据加载中...
 
   



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

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