|
![]() | 作者: fcxk [fcxk]
![]() |
登录 |
总是提示<必填不能为空> 代码如下: <% end if if action = "addsoft" then name = request.form("name") classname = request.form("class") score = request.form("score") size = request.form("size") image = request.form("image") url = request.form("url") from = request.form("from") content = icode2html(request.form("content"), true, true) if name = "" or classname = "" or score = "" or url = "" or content = "" then %> <script>alert('必填选项为空');history.back();</script> <% else classsql = "select * from class where id=" & classname set classrs = server.createobject("adodb.recordset") classrs.open classsql,conn,1,1 if not classrs.eof or classrs.bof then categoryname = classrs("category") end if classrs.close set classrs = nothing sql = "select * from flash" set rs = server.createobject("adodb.recordset") rs.open sql,conn,3,3 rs.addnew rs("name") = name rs("class") = classname rs("score") = score rs("size") = size rs("image") = image rs("url") = url rs("from") = from rs("content") = content rs("category") = categoryname rs("date") = date rs.update rs.close set rs = nothing %> <script>alert('添加成功 请刷新页面');history.back();</script> <% end if end if if action = "softmodify" then softid = request.form("softid") name = request.form("name") classname = request.form("class") score = request.form("score") size = request.form("size") image = request.form("image") url = request.form("url") from = request.form("from") content = icode2html(request.form("content"), true, true) if name = "" or classname = "" or score = "" or url = "" or content = "" or softid = "" then %> <script>alert('必填选项为空');history.back();</script> <% else classsql = "select * from class where id=" & classname set classrs = server.createobject("adodb.recordset") classrs.open classsql,conn,1,1 if not classrs.eof or classrs.bof then categoryname = classrs("category") end if classrs.close set classrs = nothing sql = "select * from flash where id=" & softid set rs = server.createobject("adodb.recordset") rs.open sql,conn,3,3 if rs.eof or rs.bof then %> <script>alert('找不到改软件');history.back();</script> <% else rs("name") = name rs("class") = classname rs("score") = score rs("size") = size rs("image") = image rs("url") = url rs("from") = from rs("content") = content rs("category") = categoryname rs.update rs.close set rs = nothing %> <script>alert('修改成功 请刷新页面');history.go(-2);</script> <% end if end if end if if action = "delsoft" then softid = request.querystring("softid") sql = "select * from flash where id=" & softid set rs = server.createobject("adodb.recordset") rs.open sql,conn,3,3 if rs.eof or rs.bof then %> <script>alert('找不到改软件');history.back();</script> <% else rs.delete rs.close set rs = nothing %> <script>alert('删除成功 请刷新页面');history.back();</script> <% end if end if %> </td> </tr> </table> </td> </tr> </table> </center> </div> </td> <td width=30 background=../images/bgofright.gif> </td> </tr> </table> </div> </center> </div> </body> </html> <% end if conn.close set conn = nothing %> |
地主 发表时间: 06-08-21 23:36 |
![]() | 回复: NetFog [q70213526] ![]() |
登录 |
if name = "" or classname = "" or score = "" or url = "" or content = "" then 在这行代码之前,逐个输出变量看看是否有值..也就是在上面代码上一行 输入类似 Response.Write "输出变量name的值为:" & name Response.End PS:代码写得比较*&$^#(&^@ ![]() |
B1层 发表时间: 06-08-22 07:22 |
![]() | 回复: NetFog [q70213526] ![]() |
登录 |
![]() |
B2层 发表时间: 06-08-22 08:18 |
![]() | 回复: fcxk [fcxk] ![]() |
登录 |
版主帮我下啊..要怎么改啊..在线急等 |
B3层 发表时间: 06-08-22 08:35 |
![]() | 回复: NetFog [q70213526] ![]() |
登录 |
在if name = "" or classname = "" or score = "" or url = "" or content = "" then这句前写上如下代码输出变量,为空值则检查一下..request语句以及变量赋值是否有误以及是否有拼写错误.这是在查错时常用的方法..代码: |
B4层 发表时间: 06-08-22 10:13 |
![]() | 回复: fcxk [fcxk] ![]() |
登录 |
<!--#include file="inc/conn.asp"--> <!--#include file="inc/set.asp"--> <!--#include file="inc/dll.asp"--> <!--#include file="inc/inc.asp"--> <!--#include file="inc/indexvar.asp"--> <% title="本站首页" call pass() call top() '第一大表格开始 YCMS("<table border='0' cellspacing='0' cellpadding='0' align='center' class='bgcolor'><tr><td class='left'></td><td class='width' valign='top'>") YCMS("<table width='100%' border='0' cellspacing='0' cellpadding='0'><tr><td valign='top'>") call br() '会员登陆口开始 YCMS("<table border='0' cellspacing='0' cellpadding='0'><td class=lefttopcenter> ※ 会员登陆</td><td class=lefttopright></td></tr></table>") YCMS("<table border='0' cellspacing='0' cellpadding='0'><tr><td valign='top' class='leftcentercenter' height=170>") call login() YCMS("</td><td class=leftcenterright></td></tr></table>") YCMS("<table border='0' cellspacing='0' cellpadding='0'><tr><td class='leftfootcenter'></td><td class='leftfootright'></td></tr></table>") call br() YCMS("</td><td width='5'></td><td valign='top' align=right>") call br() '新闻、公告开始 YCMS("<table border='0' cellspacing='0' cellpadding='0'><tr><td class=righttopleft></td><td class=righttopcenter> ※ 新闻动态<span style='width=400px'></span><a href=news.asp title='更多新闻……'>更多……</a></td></tr></table>") YCMS("<table border='0' cellspacing='0' cellpadding='0'><tr><td class=rightcenterleft></td><td class=rightcentercenter valign='top' height=170>") call YC_news() YCMS("</TD></TR></table>") YCMS("<table border='0' cellspacing='0' cellpadding='0'><tr><td class=rightfootleft ></td><td class=rightfootcenter></td></tr></table>") call br() YCMS("</td></tr></table></td><td class=right></td></tr></table>") '第一大表格结束 '第二大表格开始 YCMS("<table border='0' cellspacing='0' cellpadding='0' align='center' class='bgcolor'><tr><td class='left'></td><td class='width'>") YCMS("<table width='100%' border='0' cellspacing='0' cellpadding='0'><tr><td valign='top'>") '统计信息开始 YCMS("<table border='0' cellspacing='0' cellpadding='0'><td class='lefttopcenter'> ※ 统计信息</td><td class='lefttopright'></td></tr></table>") YCMS("<table border='0' cellspacing='0' cellpadding='0'><tr><td class='leftcentercenter' height=200>") YCMS("<table border='0' cellspacing='0' cellpadding='0' align='center' rules=rows frame=void width='100%' bordercolor="&border&"><tr><td height=19> <img src=img/title2.gif border='0'> 新进会员:<font color=red>") sql="select top 1 * from [YC_user] where pass=true order by id desc" set rs=server.createobject("adodb.recordset") rs.open sql,conn,1,1 YCMS(YC_Kill_Word(rs("user_name"),15)) rs.close set rs=nothing YCMS("</font></td></tr>") YCMS("<tr><td height=19> <img src=img/title2.gif border='0' width=10 height=10> 会员注册:") call mytable("YC_user") YCMS(" 人</td></tr>") YCMS("<tr><td height=19> <img src=img/title2.gif border='0' width=10 height=10> 新闻动态:") call mytable("YC_news") YCMS(" 条</td></tr>") YCMS("<tr><td height=19> <img src=img/title2.gif border='0' width=10 height=10> 文章作品:") call mytable("YC_art") YCMS(" 篇</td></tr>") YCMS("<tr><td height=19> <img src=img/title2.gif border='0' width=10 height=10> 精品图片:") call mytable("YC_pic") YCMS(" 张</td></tr>") YCMS("<tr><td height=19> <img src=img/title2.gif border='0' width=10 height=10> 娱乐欣赏:") call mytable("YC_dj") YCMS(" 个</td></tr>") YCMS("<tr><td height=19> <img src=img/title2.gif border='0' width=10 height=10> 软件下载:") call mytable("YC_down") YCMS(" 个</td></tr>") YCMS("<tr><td height=19> <img src=img/title2.gif border='0' width=10 height=10> 本站频道:") call mytable("YC_other") YCMS(" 个</td></tr>") YCMS("<tr><td height=19> <img src=img/title2.gif border='0' width=10 height=10> 友情连接:") call mytable("YC_link") YCMS(" 个</td></tr>") YCMS("<tr><td height=19> <img src=img/title2.gif border='0' width=10 height=10> 访客留言:") call mytable("YC_book") YCMS(" 条</td></tr></table>") YCMS("</td><td class=leftcenterright></td></tr></table>") YCMS("<table border='0' cellspacing='0' cellpadding='0'><tr><td class='leftfootcenter'></td><td class='leftfootright'></td></tr></table>") call br() '会员排行开始 YCMS("<table border='0' cellspacing='0' cellpadding='0'><td class='lefttopcenter'> ※ 会员排行</td><td class='lefttopright'></td></tr></table>") YCMS("<table border='0' cellspacing='0' cellpadding='0'><tr><td valign='top' class='leftcentercenter' height=115 align='center'>") call br() call YC_user() call br() YCMS("</td><td class=leftcenterright></td></tr></table>") YCMS("<table border='0' cellspacing='0' cellpadding='0'><tr><td class='leftfootcenter'></td><td class='leftfootright'></td></tr></table>") call br() YCMS("</td><td width='5'></td><td valign='top' align=right>") '图片开始 YCMS("<table border='0' cellspacing='0' cellpadding='0'><tr><td class=righttopleft></td><td class=righttopcenter> ※ 图片作品<span style='width=400px'></span><a href=pic.asp'>更多……</a></td></tr></table>") YCMS("<table border='0' cellspacing='0' cellpadding='0'><tr><td class=rightcenterleft></td><td class=rightcentercenter valign='top'>") call YC_pic() YCMS("</TD></TR></table>") YCMS("<table border='0' cellspacing='0' cellpadding='0'><tr><td class=rightfootleft></td><td class=rightfootcenter></td></tr></table>") call br() '娱乐开始 YCMS("<table border='0' cellspacing='0' cellpadding='0'><tr><td class=righttopleft></td><td class=righttopcenter> ※ 影音娱乐<span style='width=400px'></span><a href=dj.asp title='更多影音娱乐……'>更多……</a></td></tr></table>") YCMS("<table border='0' cellspacing='0' cellpadding='0'><tr><td class=rightcenterleft></td><td class=rightcentercenter valign='top' height=170>") call YC_dj() YCMS("</TD></TR></table>") YCMS("<table border='0' cellspacing='0' cellpadding='0'><tr><td class=rightfootleft></td><td class=rightfootcenter></td></tr></table>") call br() YCMS("</td></tr></table></td><td class=right></td></tr></table>") '交流开始 YCMS("<table border='0' cellspacing='0' cellpadding='0' align='center' class='bgcolor'><tr><td class='left'></td><td class='width'>") YCMS("<table width='100%' border='0' cellspacing='0' cellpadding='0'><tr><td valign='top'>") %><table border='0' cellspacing='0' cellpadding='0'><td class='lefttopcenter'> ※ 在线交流</td><td class='lefttopright'></td></tr></table><%<table width="91%" border="0" cellspacing="0" cellpadding="6" id="table390"> <tr> <td align=center><div align=center><center> <table height=1 cellSpacing=0 cellPadding=0 width=164 border=0 valign=top bgcolor=#F0F7FF id="table391"><tr><form name=loginmail onsubmit="return chkinput2(this);" action=http://www.hao123.com/sendmail.php method=post target="_blank"> <td align=center width=164 height=1 bgcolor="#FFFFFF"> <p align="left"> <span style="font-size: 9pt"> <select tabIndex=2 size=1 name=site style="border: 1px solid #000000"><option value selected> 请选择信箱</option><option value=126.com>@126.com网易</option><option value=163.net> @163.net</option><option value=tom.com>@tom.com</option><option value=163.com> @163.com</option><option value=vip.163.com>@vip.163.com</option><option value=sohu.com> @sohu.com搜狐邮箱</option><option value=263.net>@263.net</option><option value=sina.com> @sina.com新浪</option><option value=vip.sina.com>@vip.sina.com新浪VIP</option><option value=mail.china.com> @mail.china.com</option><option value=china.com>@china.com</option><option value=netease.com> @netease.com</option><option value=yeah.net>@yeah.net</option><option value=etang.com> @etang.com亿唐</option><option value=21cn.com>@21cn.com</option> <option value="cn.yahoo.com">@yahoo.com.cn雅虎</option> <option value="xinhuanet.com">@xinhuanet.com新华网</option> <option value=eyou.com>@eyou.com亿邮</option><option value=email.com.cn> @email.com.cn</option><option value=ynmail.com>@ynmail.com云南</option><option value=citiz.net> @citiz.net上海热线</option> <option value="hotmail.com">@hotmail.com</option> <option value="56.com">@56.com</option> <option value="gmail.com">@gmail.com</option> </select></span><p><font style="font-size: 9pt">帐号:</font><span style="font-size: 9pt"> </span> <input style="border:1px solid #000000; FONT-SIZE:12px" tabIndex=1 size=14 name=user><font style="font-size: 9pt"><br> 密码</font><span style="font-size: 9pt">:</span> <input style="border:1px solid #000000; FONT-SIZE:12px" tabIndex=3 type=password size=14 name=pass> <br> <input style="FONT-SIZE:12px; color:#000000" tabIndex=4 type=submit value=登录 name=Submit2 onclick=setTimeout('clearpass()',1000)></td> </form></tr></table></center></div></td> </tr> </table> YCMS("<table border='0' cellspacing='0' cellpadding='0'><tr><td valign='top' class='leftcentercenter' height=118 align='center'>") call br response.write qq_online call br YCMS("</td><td class=leftcenterright></td></tr></table>") '第二大表格结束 '第三大表格开始 YCMS("<table border='0' cellspacing='0' cellpadding='0'><tr><td class='leftfootcenter'></td><td class='leftfootright'></td></tr></table>") call br '连接开始 YCMS("<table border='0' cellspacing='0' cellpadding='0'><td class='lefttopcenter'> ※ 友情连接<span style='width=50px'></span><a href=link.asp?action=join title='加入我们'>加入我们</a></td><td class='lefttopright'></td></tr></table>") YCMS("<table border='0' cellspacing='0' cellpadding='0'><tr><td valign='top' class='leftcentercenter' height=222 align='center'>") YCMS("<br><DIV id=oRollV style='MARGIN:0px;OVERFLOW:hidden; HEIGHT: 195px'><DIV id=oRollV1>") call YC_link() YCMS("</DIV><DIV id=oRollV2></DIV></DIV>") call YC_link2() call br() YCMS("</td><td class=leftcenterright></td></tr></table>") YCMS("<table border='0' cellspacing='0' cellpadding='0'><tr><td class='leftfootcenter'></td><td class='leftfootright'></td></tr></table>") call br() YCMS("<td width='5'></td><td valign='top' align=right>") '文章开始 YCMS("<table border='0' cellspacing='0' cellpadding='0'><tr><td class=righttopleft></td><td class=righttopcenter> ※ 文章作品<span style='width=400px'></span><a href=art.asp title='更多文章……'>更多……</a></td></tr></table><table border='0' cellspacing='0' cellpadding='0'><tr><td class=rightcenterleft></td><td class=rightcentercenter valign='top' height=170>") call YC_art() YCMS("</TD></TR></table>") YCMS("<table border='0' cellspacing='0' cellpadding='0'><tr><td class=rightfootleft></td><td class=rightfootcenter></td></tr></table>") call br() '下载开始 YCMS("<table border='0' cellspacing='0' cellpadding='0'><tr><td class=righttopleft></td><td class=righttopcenter> ※ 下载中心<span style='width=400px'></span><a href=down.asp title='更多软件下载……'>更多……</a></td></tr></table>") YCMS("<table border='0' cellspacing='0' cellpadding='0'><tr><td class=rightcenterleft></td><td class=rightcentercenter valign='top' height=170>") call YC_down() YCMS("</TD></TR></table>") YCMS("<table border='0' cellspacing='0' cellpadding='0'><tr><td class=rightfootleft></td><td class=rightfootcenter></td></tr></table>") call br() YCMS("</td></tr></table></td><td class=right></td></tr></table>") '第三大表格结束 YCMS("<SCRIPT>StartRollV();StartRollH();</SCRIPT>") call foot()%> 还是不行啊..版主??? 技术信息(用于支持人员) 错误类型: Microsoft VBScript 编译器错误 (0x800A0400) 缺少语句 /index.asp, line 104 <table width="91%" border="0" cellspacing="0" cellpadding="6" id="table390"> |
B5层 发表时间: 06-09-03 08:52 |
![]() | 回复: NetFog [q70213526] ![]() |
登录 |
告诉你如何渔,你偏不去练习下.你偏要鱼.. 下次贴代码.记得把系统提示出错的相关行贴出来,比如提示出错行为104行.则贴出104行及左右几行就行了.. |
B6层 发表时间: 06-09-03 16:14 |
|
20CN网络安全小组版权所有
Copyright © 2000-2010 20CN Security Group. All Rights Reserved.
论坛程序编写:NetDemon
粤ICP备05087286号