我这边没办法测试,不过从你程序看,你的release.asp页面中的image文本框的名字要改成hasimage才行的,这样改的同时你的上传页面中的代码也要改。
我能看出的问题就是这个了,如果再不行,我看也没办法,
因为你的edit.asp页面中的文本框的name是hasimage,所以edit2.asp中用
if strLength(request.form("hasimage"))>50 then
errmsg=errmsg+"<br>"+"<li>图片路径过长(长度不能大于50)!"
founderr=true
else
hasimage=trim(checkStr((request.form("hasimage"))))
if hasimage="" then hasimage="0"
end if
着段代码可以通过,而且可以得到正确结果,但是你的release.asp与edit.asp不同,所以肯定不能通过的。你试着改一下吧
select case ident
case "20" bclass="锁定会员"
case "21" bclass="游客"
case "22" bclass="正式会员"
case "23" bclass="高级会员"
case "24" bclass="VIP会员"
case "25" bclass="管理员"
case "26" bclass="版主"
end select
select case potence
case "22" bclass2="正式会员"
case "23" bclass2="高级会员"
case "24" bclass2="VIP会员"
case "25" bclass2="管理员"
case "26" bclass2="版主"
end select
'--------chkwriter
if ident < potence then
errmsg=errmsg+"<br>"+"<li>您还没有权限发布供求信息,请联系管理员调整级别后发表!<BR><li>您现在的等级:<font color=red>"&bclass&"</font> 发布信息需要的等级:<font color=red>"&bclass2&"</font>"
call error()
Response.End
end if
state="免费信息发布"
navstate=navstate&"信息发布"
call top
if isnumeric(""&(request("supplytypeid"))&"") and request("supplytypeid")<> "" then
call release
else
call selectsort
end if
<%
end sub
'-----------------------
sub selectsort
%>
<BR>
<table class=tatd1px width=758 cellspacing="0" cellpadding="1" align="center">
<tr>
<td class=TD1pxblue>
<table width="100%" cellSpacing=0 cellPadding=0>
<tr>
<td width=15><IMG SRC="../sys/image/nav1.gif" WIDTH="8" HEIGHT="8"></td>
<td id=whiteword>第一步:选择信息行业分类</td>
</tr>
</table>
</td>
</tr>
<tr>
<td>
<table width="100%" cellspacing="2" cellpadding="0">
<tr>
<%
call conned
sql="select supplytype,supplytypeid from supplytype order by supplytypeid"
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,1
total=rs.RecordCount
i=0
do while not rs.eof and i < total
Response.Write "<td id=forum2 width=180>·<a href=release.asp?supplytypeid="&rs("supplytypeid")&"&supplytype="&rs("supplytype")&">"&rs("supplytype")&"</a></td>"
if ((i+1) mod 4)=0 then
Response.Write "</tr><tr>"
end if
rs.movenext
i=i+1
loop
rs.close
set rs=nothing
conn.close
set conn=nothing
Response.Write "</tr></tbody></table></td></tr></table>"
end sub
%>
<br>
<table cellspacing=0 cellpadding=0 align=center width=758>
<tr><td ></td>
<td align=right>
<%
'absp
dim showright
showright=cint(right(Second(time),1))
if showright > 7 then
Response.Write "电子商务,信息供求,网站制作!"
elseif showright < 3 then
Response.Write "电子商务,信息供求,网站制作找跳蚤吧!"
end if
%>
>> <a href=javascript:history.back()>返回上一页</a>
</td></tr></table>
<!-- #Include File="../sys.asp" -->
<!-- #Include File="../sys/inc/char.asp" -->
<!-- #Include File="syssupply.asp" -->
<!-- #Include File="../sys/inc/email.asp" -->
<!-- #Include File="nav.asp" -->
<!-- #Include File="../sys/inc/prompt.inc" -->
<%
dim supplytypeid,supplytype,supplyitem,releasecompany,companyarea,itempro,hasimage,describe,supsort,avialable,company,contact
dim errmsg,mailbody,sendmsg,useremail
dim rs,sql,viewclass
dim supsortid,supsortname,supsortvalue,content
founderr=false
call chkinput ()
if founderr=true then
call error()
else
call saveuserinfo()
if founderr=true then
call error()
else
topic="信息发布成功确认"
call sendmail()
dim successmess
if tempadd="y" then
successmess="信息发布成功,但需经(版主/管理员)审核后才可以查看。"
else
successmess="信息发布成功!"
end if
const backurl="index.asp"
backmsg="正在等待管理员审核,审核通过后才可以查看。<br>"&sendmsg
call success()
end if
end if
'-------------------------------------------------
sub chkinput()
'-------------------------------------------regtime
if not isnull(session("regtime")) or cint(regtime)>0 then
if DateDiff("s",session("regtime"),Now())<cint(RegTime) then
ErrMsg=ErrMsg+"<Br>"+"<li>限制每次发布距离时间为"®time&"秒,请稍后发布!"
FoundErr=True
end if
end if
'--------------------------------------------supplytypeid
if not isnumeric(request.form("supplytypeid")) or len(request("supplytypeid"))>3 then
errmsg=errmsg+"非法提交!"
founderr=true
else
supplytypeid=request.form("supplytypeid")
end if
'--------------------------------------------supplytype
if request.form("supplytype")="" or len(request("supplytype"))>40 then
errmsg=errmsg+"提交类型错误!"
founderr=true
else
supplytype=checkStr(request.form("supplytype"))
end if
'---------------------------------------------supplyitem
if request.form("supplyitem")="" or strLength(request.form("supplyitem"))>50 then
errmsg=errmsg+"<br>"+"<li>请输入项目名称,不能多于50字!"
founderr=true
else
supplyitem=checkStr(request.form("supplyitem"))
end if
'--------------------------------------releasecompany
if request.form("releasecompany")="" or strLength(request.form("releasecompany"))>50 then
errmsg=errmsg+"<br>"+"<li>请输入发布单位名称,不能多于50字!"
founderr=true
else
releasecompany=checkStr(Request.Form("releasecompany"))
end if
'-------------------------------------------companyarea
if request.form("companyarea")="" or strLength(request.form("companyarea"))>20 then
errmsg=errmsg+"<br>"+"<li>请输入地区名称,不能多于20个字!"
founderr=true
else
companyarea=checkStr(request.form("companyarea"))
end if
'----------------------------------itempro
if request.form("itempro")="" or strLength(request.form("itempro"))>50 then
errmsg=errmsg+"<br>"+"<li>请输入项目简介(长度不能大于50)!"
founderr=true
else
itempro=checkStr((request.form("itempro")))
end if
'-----------------------------------------hasimage
if strLength(request.form("hasimage"))>50 then
errmsg=errmsg+"<br>"+"<li>图片路径过长(长度不能大于50)!"
founderr=true
else
hasimage=trim(checkStr((request.form("hasimage"))))
if hasimage="" then hasimage="0"
end if
'-----------------------------------------------describe
if request.form("content")="" or strLength(request.form("content"))>9000 then
errmsg=errmsg+"<br>"+"<li>请输入详细介绍(长度不能大于9000)!"
founderr=true
else
content=checkStr((request.form("content")))
end if
'-----------------------------------------------supsort
if request.form("supsort")="" or strLength(request.form("supsort"))>10 then
errmsg=errmsg+"<br>"+"<li>请输入项目分类!"
founderr=true
else
supsort=checkStr((request.form("supsort")))
end if
if not isnumeric(left(""&supsort&"",1)) then
errmsg=errmsg+"<br>"+"<li>非法提交!"
founderr=true
else
supsortid=cint(left(""&supsort&"",1))
end if
select case supsortid
case 1
supsortname="supply"
supsortvalue="供应信息"
case else
errmsg=errmsg+"<br>"+"<li>非法提交!"
founderr=true
end select
'--------------------------------------------avialable
if not isnumeric(request.form("avialable")) or len(request("avialable"))>3 then
errmsg=errmsg+"<br>"+"<li>请填写有效期或有效期过长!"
founderr=true
else
avialable=request.form("avialable")
end if
'--------------------------------------------
if request.form("contact")="" or strLength(request.form("contact"))>50 then
errmsg=errmsg+"<br>"+"<li>请输入联系方式,字数小余50!"
founderr=true
else
contact=trim(checkStr((request.form("contact"))))
end if
end sub
sub saveuserinfo()
'--------------------------------是否需要审核.
if tempadd ="y" then
viewclass=1 '1 需要,
else
viewclass=0 '0 不需要
end if
'------------------------------------END
dim usersql
call conned()
set rs=server.createobject("adodb.recordset")
rs.open "supply",conn,1,3
rs.addnew
Rs("viewclass")=viewclass
rs("busername")=Session("memberusername")
rs("supplytypeid")=supplytypeid
rs("supplytype")=supplytype
rs("supplyitem")=supplyitem
rs("releasecompany")=releasecompany
rs("companyarea")=companyarea
rs("itempro")=itempro
Rs("hasimage")=hasimage
Rs("content")=content
rs("avialable")=avialable
rs("contact")=contact
Rs("addtime")=now
rs.update
rs.close
set rs=nothing
set rs = server.CreateObject("ADODB.Recordset")
usersql="select bmail from userinfo where busername='"&Session("memberusername")&"'"
rs.open usersql,conn,1,1
useremail=rs("bmail")
rs.close
set rs=nothing
sql="update supplytype set typecount=typecount+1 where supplytypeid="&supplytypeid
set rs=conn.execute(sql)
select case EmailFlag
case 0
sendmsg="系统未开启邮件功能,请记住您的注册信息。"
case 1
call sendour(useremail)
sendmsg="您的注册信息已经发往您的邮箱,请注意查收。"
case 2
call Cdonts(useremail)
sendmsg="您的注册信息已经发往您的邮箱,请注意查收。"
case else
sendmsg="系统未开启邮件功能,请记住您的注册信息"
end select