![]() |
|
首页│注册│帮助 | |||
相关问题
| • | [求助] 熟悉数据结构的看一下帮个忙啦,急!!!!! |
| • | [求助]窗体间的传参问题 |
| • | 用户留言时间间隔问题 |
| • | 给大家提供一个下载视频的好地方www.k167.com |
| • | [求助]设计课题的理解 |
| • | hibernate中setId()的问题? |
| • | [求助]关于在线人数的统计 |
| • | 上海华资软件主营承接各种软件外包项目 |
待解决
[求助]上传图片代码
<BR><BR>我这个代码是一个图片页,我现增加了一个上传图片的功能,但发现当留言内容为空时上传图片按钮就点击失效,没法上传图片,初步发现是代码<FONT color=red><%end sub%> </FONT>在作怪,当放置以下红色位置时,留言框和上传框都不可见了,但放到 蓝色代码位置时,留言为空时就失效,希望这里的高手能不能指点一二,谢了<BR><BR><BR><%<BR>set rs=server.createobject("adodb.recordset")<BR>sql="select * from photo where id="&request("id")<BR>rs.open sql,conn,1,1<BR>yearDate=trim(rs("yearDate"))<BR>WeekDate=trim(rs("WeekDate"))<BR>MonthDate=trim(rs("MonthDate")) <BR><BR>sql="update photo set allHits=allHits+1,yearHits=yearHits+1,WeekHits=WeekHits+1,MonthHits=Monthhits+1 where id=" & request("id")<BR>conn.execute sql<BR>if datediff("yyyy",yearDate,date)>=1 then<BR>sql="update photo set yeardate=Now(),yearHits=1 where id=" &request("id")<BR>conn.execute sql<BR>end if<BR><BR>if datediff("Ww",WeekDate,date)>=1 then<BR>sql="update photo set WeekDate=Now(),WeekHits=1 where id=" &request("id")<BR>conn.execute sql<BR>end if<BR>if datediff("M",MonthDate,date)>=1 then<BR>sql="update photo set MonthDate=Now(),MonthHits=1 where id=" &request("id")<BR>conn.execute sql<BR>end if <BR><BR>%><BR><BR><script language="JavaScript" type="text/JavaScript"><BR><!--<BR><BR><BR><BR>function MM_preloadImages() { //v3.0<BR>var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();<BR>var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)<BR>if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}<BR>}<BR>//--><BR></script><BR><html><BR><head><BR><title>天电摄影俱乐部</title><BR><meta http-equiv="Content-Type" content="text/html; charset=gb2312"><BR><script language="JavaScript" type="text/JavaScript"><BR><!--<BR><BR><BR><BR>function MM_preloadImages() { //v3.0<BR>var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();<BR>var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)<BR>if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}<BR>}<BR>//--><BR></script><BR><script> <BR>var flag=false; <BR>function DrawImage(ImgD){ <BR>var image=new Image(); <BR>image.src=ImgD.src; <BR>if(image.width>0 && image.height>0){ <BR>flag=true; <BR>if(image.width/image.height>= 700/700){ <BR>if(image.width>700){ <BR>ImgD.width=700; <BR>ImgD.height=(image.height*700)/image.width; <BR>}else{ <BR>ImgD.width=image.width; <BR>ImgD.height=image.height; <BR>} <BR>} <BR>else{ <BR>if(image.height>700){ <BR>ImgD.height=700; <BR>ImgD.width=(image.width*700)/image.height; <BR>}else{ <BR>ImgD.width=image.width; <BR>ImgD.height=image.height; <BR>} <BR>} <BR>} <BR>} <BR></script><BR><link href="css.css" rel="stylesheet" type="text/css"><BR><STYLE> <BR>body <BR>{background-image:url(../index2/bg-solid.gif); background-position:center } <BR>.style2 {color: #666666}<BR></STYLE><BR></head><BR><BR><body topmargin="0"><!--#include file="top1.asp"--><BR><BR><table width="778" border="0" cellspacing="0" cellpadding="0" align="center"><BR><tr><BR><td width="130" bgcolor="#2F557F"> </td><BR><td width="652" height="30" bgcolor="#2F557F"> </td><BR></tr><BR></table><BR><table width="778" border="0" cellspacing="0" cellpadding="0" align="center"><BR><tr><BR><td height="73" align="center" valign="top" bgcolor="#FFFFFF"><table width="100%" border="0" cellspacing="0" cellpadding="0" style="border-top:1px #CFD1CC solid;border-bottom:1px #CFD1CC solid;border-left:1px #CFD1CC solid;border-right:1px #CFD1CC solid;"><BR><tr> <BR><td height="28" align="center" valign="bottom"><font color="#0066CC"><%=rs("title")%></font></td><BR></tr><BR><tr><BR><td height="25" align="center"><a href="showuser.asp?username=<%=rs("username")%>" target="_blank"><%=rs("username")%></a>&nbsp;发表于&nbsp;<%=rs("addtime")%>&nbsp;&nbsp;&nbsp;拍摄地点:<%=rs("address")%>&nbsp;&nbsp;&nbsp;使用相机:<%=rs("qc")%>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;拍摄闪光:<%=rs("sg")%>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;人气:&nbsp;<%=rs("allhits")%>&nbsp;</td><BR></tr><BR><tr> <BR><td align="center"><table width="100%" border="0" cellspacing="0" cellpadding="0"><BR><tr><BR><td bgcolor="#333333" height="1"></td><BR></tr><BR></table></td><BR></tr><BR><tr> <BR><td height="1082" align="center" valign="top"><br><BR><%=rs("content")%><br><BR><%if rs("pic")<>"" then%><BR><TABLE cellSpacing=0 cellPadding=0 width=117 <BR>border=0><BR><TBODY><BR><TR> <BR><TD><table width="100%" border="0" cellspacing="0" cellpadding="0"><BR><tr> <BR><td width="6" height="3" align="left"><img src="images/photo_top1.gif" width="6" height="3"></td><BR><td width="100%" background="images/photo_top_bg.gif" height="3"></td><BR><td width="12" align="right" height="3"><strong><img src="images/photo_top2.gif" width="12" height="3"></strong></td><BR></tr><BR></table></TD><BR></TR><BR><TR> <BR><TD> <TABLE cellSpacing=0 cellPadding=0 width=117 <BR>border=0><BR><TBODY><BR><TR> <BR><TD width="3" background="images/angle_03.gif"> </TD><BR><TD width="101" align="center"> <a href="<%=rs("pic")%>" target="_blank"><IMG src="<%=rs("pic")%>" border=0 onload="javascript:DrawImage(this);" ></a> <BR></TD><BR><TD width="9" valign="bottom" background="images/photo_left_bg.gif"><table width="90%" border="0" cellspacing="0" cellpadding="0"><BR><tr> <BR><td valign="top" width="10"></td><BR></tr><BR><tr> <BR><td><img src="images/angle_04.gif" width="9" height="70"></td><BR></tr><BR></table></TD><BR></TR><BR></TBODY><BR></TABLE></TD><BR></TR><BR><TR> <BR><TD align="right" height="11"><table width="100%" border="0" cellspacing="0" cellpadding="0"><BR><tr> <BR><td width="12" height="11" align="left"><img src="images/photo_bottom1.gif" width="12" height="11"></td><BR><td height="11" background="images/photo_bottom_bg.gif" width="100%"></td><BR><td width="90" height="11" align="right"><img src="images/angle_02.gif" width="90" height="11"></td><BR></tr><BR></table></TD><BR></TR><BR></TBODY><BR></TABLE><BR><%end if%><BR><BR><br><%if rs("pic2")<>"" then%><BR><TABLE cellSpacing=0 cellPadding=0 width=117 <BR>border=0><BR><TBODY><BR><TR> <BR><TD><table width="100%" border="0" cellspacing="0" cellpadding="0"><BR><tr> <BR><td width="6" height="3" align="left"><img src="images/photo_top1.gif" width="6" height="3"></td><BR><td width="100%" background="images/photo_top_bg.gif" height="3"></td><BR><td width="12" align="right" height="3"><strong><img src="images/photo_top2.gif" width="12" height="3"></strong></td><BR></tr><BR></table></TD><BR></TR><BR><TR> <BR><TD> <TABLE cellSpacing=0 cellPadding=0 width=117 <BR>border=0><BR><TBODY><BR><BR><BR><BR>提问者:潍猊 2006-01-02 21:45:00
答复
[em01]
回答者:chong800 -
2006-04-03 21:14:00
<P>恩,解决了就好,一点十分没白熬!!哈哈~~~~~~~~~</P>
回答者:阳光白雪 -
2006-01-03 11:44:00
谢谢兄弟,我用了那个简化的,再把那个参数去掉就ok了,呵呵,真是感谢你啊,兄弟哪里人,有没有机会请你吃饭<BR>[em22][em22][em22][em17][em17][em22][em22][em22]
回答者:潍猊 -
2006-01-03 09:46:00
他存在的问题是当新的图片上传后还没有留言时,我猜测页数循环语句判断有问题导致留言框不能提交留言,而上传图片框如果蓝色<FONT color=#0000ff><%end sub%><FONT color=#000000>放置其后,就会不显示上传图片框。</FONT> </FONT>
回答者:潍猊 -
2006-01-03 09:32:00
<P>那你把我给你加的那个参数去掉,就是在分页行数那的!!</P>
回答者:阳光白雪 -
2006-01-03 09:28:00
早上好兄弟:<BR><BR>我把sub showpages(totalPage)中的参数去掉后,可以运行程序,但是上传图片的按钮失效了,点击还是无效???<BR>[em22][em22]<BR>
回答者:潍猊 -
2006-01-03 09:23:00
[attach]4600[/attach]<BR><BR><BR>稍微改了一点,运行后看可对!!
回答者:阳光白雪 -
2006-01-03 08:42:00
谢谢兄弟关心,这里现谢了 应该是sub的问题,但不知怎样改?我给个全点的代码,兄弟帮看下<br>完整代码如下:<br>[attach]4597[/attach]<br>
[align=right][color=#000066][此贴子已经被作者于2006-1-2 22:35:33编辑过][/color][/align]
[align=right][color=#000066][此贴子已经被作者于2006-1-2 22:35:33编辑过][/color][/align]
回答者:潍猊 -
2006-01-02 22:28:00
<P>看的头晕,兄弟,以后写程序注意点缩进好不好!!<br><br>拷下了,慢慢个你找,得先把代码整齐!!</P>
[align=right][color=#000066][此贴子已经被作者于2006-1-2 22:00:39编辑过][/color][/align]
[align=right][color=#000066][此贴子已经被作者于2006-1-2 22:00:39编辑过][/color][/align]
回答者:阳光白雪 -
2006-01-02 21:57:00

