CSDN首页 空间 新闻 论坛 Blog 下载 读书 网摘 搜索 .NET Java 视频 接项目 求职 在线学习 买书 程序员 通知
可用分押宝游戏火热进行中... 专题改版:Java Web 专题
CSDN社区
搜索 收藏 打印 关闭
CSDN社区 >  Web 开发 >  ASP

急

楼主leon8071(小葛)2004-05-03 02:22:56 在 Web 开发 / ASP 提问

本人做的一个网站,其中一个页面调用另外的asp文件里的函数正常,但在主页面调用该函数则提示该函数为定义,请各位帮忙啊~~~~~~~~  
  函数定义代码如下  
  sub   video_new_hot(n_jt,nnhead,nmore,nsql,nt,n_num,n_m,c_num,et,tt,tupian)  
      dim   di,temp1,tim,counter,nhead:nhead=nnhead  
      if   n_jt<>""   then   n_jt="<img   src=""images/PIC/JT0.GIF""   width=""8""   height=""8""   border=0>"  
      temp1=vbcrlf&"<table   border=0   width='100%'   cellspacing=0   cellpadding=2   class=tf>"  
      sql="select   top   "&n_num+n_m&"   id,type,title,username,tim,counter,pic,lang,power,remark,hot,emoney   from   video   where   hidden=1"&nsql  
      select   case   nt  
      case   "hot"  
          sql=sql&"   order   by   counter   desc,id   desc"  
          if   nhead=""   then   nhead="观看排行"  
      case   "good"  
          sql=sql&"   and   hot=5   order   by   id   desc"  
          if   nhead=""   then   nhead="影片推荐"  
      case   else  
          sql=sql&"   order   by   id   desc"  
          if   nhead=""   then   nhead="影片更新"  
      end   select  
      set   rs=conn.execute(sql)  
      for   di=1   to   n_m  
   
          if   rs.eof   or   rs.bof   then   exit   for  
          rs.movenext  
      next  
      'if   n_m>0   then   rs.move(n_m)  
  '是否为图片排行  
      if   tupian="tu"   then  
      do   while   not   rs.eof  
          name=rs("title"):tim=rs("tim"):counter=rs("counter"):movie=rs("type"):emoney=rs("emoney"):power=rs("power")  
  dim   emoney,power  
  '网上图片判断  
   
   
  call   video_movie(movie)  
          temp1=temp1&vbcrlf&"<tr><td   class=bw   width=140><TABLE   border=0><TR><TD><img   src='"&rs("pic")&"'   border=0   width=100   height=80></TD></TR><TR><TD   align=middle   height=25><a   href='video_view.asp?id="&rs("id")&"'"&atb&"><img   src=images/video/small_play.gif   border=0><img   src=images/video/small_view.gif   border=0></a>   </TD></TR></TABLE></td><td   >"  
          temp1=temp1&"<TABLE   border=0   cellPadding=2   cellSpacing=0   ><TR><TD>片名:<a   href='video_view.asp?id="&rs("id")&"'"&atb&">"&rs("title")&"</A></TD></TR><TR><TD   valign=bottom>语种:"&rs("lang")&"&nbsp;&nbsp;&nbsp;"&movie&"&nbsp;&nbsp;&nbsp;</TD></TR><TR><TD>星级:<img   src='images/down/star_"&rs("hot")&".gif'   border=0>&nbsp;&nbsp;人气:<FONT   class=red_3>"&rs("counter")&"</FONT></TD></TR><TR><TD><FONT   class=red_3>"&power_pic(emoney,power,1)&"</FONT></TD></TR><TR><TD>介绍:"&code_html(rs("remark"),2,40)&"</TD></TR></TABLE><tr><td   colspan=2><TABLE   border=0   cellPadding=2   cellSpacing=0   width='96%'><TBODY><TR><TD   background=images/bg_dian.gif   height=1   border=0></TD></TR></TBODY></TABLE>"  
  temp1=temp1&"</td></tr>"  
          rs.movenext  
      loop  
      else  
      do   while   not   rs.eof  
          name=rs("title"):tim=rs("tim"):counter=rs("counter")  
   
          temp1=temp1&vbcrlf&"<tr><td   width='30%'>&nbsp;<img   src='"&rs("pic")&"'   border=0   width=50   height=40></td><td     class=bw   width='70%'>"&n_jt&"<a   href='video_view.asp?id="&rs("id")&"'"&atb&"   title='名称:"&code_html(name,1,0)&"<br>发   布   人:"&rs("username")&"<br>观看人次:"&counter&"<br>整理时间:"&time_type(tim,88)&"'>"&code_html(name,1,c_num)&"</a>"  
          if   tt>0   then   temp1=temp1&format_end(et,time_type(tim,tt)&",<font   class=blue>"&counter&"</font>")  
          temp1=temp1&"</td></tr>"  
          rs.movenext  
      loop  
      end   if  
      rs.close  
      temp1=temp1&vbcrlf&"</table>"  
   
      response.write   kong&temp1  
  end   sub  
  调用时候  
  <TR>  
                                                                                                              <TD   colSpan=3   height=100   vAlign=top><table   width="100%"     border="0">  
                                                                                                                  <tr>  
                                                                                                                      <td><%call   main_video()%></td>  
                                                                                                                  </tr>  
                                                                                                              </table></TD>  
                                                                                                          </TR>  
  问题点数:0、回复次数:8Top

1 楼TrueAndFalse(彩旗飘飘)回复于 2004-05-03 02:24:10 得分 0

main_video   函数在哪里?Top

2 楼leon8071(小葛)回复于 2004-05-03 02:27:57 得分 0

sub   main_video()  
  dim   w_h:w_h="   width=120   height=90"  
  %>  
  <table   border=0   width='98%'   cellspacing=0   cellpadding=0><tr><td   height=5></td></tr><tr   valign=top><%  
      sql="select   top   4   id,title,pic   from   video   where   hidden=1   order   by   tim   desc,id   desc"  
      set   rs=conn.execute(sql)  
      do   while   not   rs.eof  
          response.write   vbcrlf&"<td   width='33%'   align=center><a   href=""video_view.asp?id="&rs("id")&"""><img   src="""&rs("pic")&"""   border=0"&w_h&"><br>"&rs("title")&"</a></td>"  
          rs.movenext  
      loop  
      rs.close  
  %></tr></table>  
  <%  
  end   sub  
  大哥帮忙啊.小弟等~~~~~Top

3 楼leon8071(小葛)回复于 2004-05-03 02:31:46 得分 0

我调用video_new_hot就显示变量未定义Top

4 楼TrueAndFalse(彩旗飘飘)回复于 2004-05-03 02:36:58 得分 0

你在调用这些   SUB   的页面中要把他们包含进来Top

5 楼leon8071(小葛)回复于 2004-05-03 02:49:34 得分 0

video_new_hot这个函数是在lib_bideo.asp里定义的,如果说我想在main.asp里调用video_new_hot这个函数,那在文件头就应该加<!--   #include   file="inc/lib_video.asp"   -->  
  这个语句,把lib_video.asp包含进来,是这样的吧.  
  Top

6 楼TrueAndFalse(彩旗飘飘)回复于 2004-05-03 04:14:10 得分 0

对Top

7 楼Drowning(悠長假期~~)回复于 2004-05-03 05:06:06 得分 0

nodTop

8 楼liuyangxuan(阿轩)回复于 2004-05-03 09:30:17 得分 0

过程!Top

相关问题

  • 急!!!!
  • 急!!!!!!!!!
  • 急~~~
  • 急........................................
  • 急!!!!!!!!!!!!!!!!!!!!!!!!
  • 急!!!
  • ==========急============
  • 急
  • 急!!!
  • 急

关键词

  • 函数
  • video
  • sql
  • nhead
  • emoney
  • rs
  • temp1
  • tim
  • counter
  • hot

得分解答快速导航

  • 帖主:leon8071

相关链接

  • Web开发类图书

广告也精彩

反馈

请通过下述方式给我们反馈
反馈
提问
网站简介|广告服务|VIP资费标准|银行汇款帐号|网站地图|帮助|联系方式|诚聘英才|English|问题报告
世纪乐知(北京)网络技术有限公司 版权所有, 京 ICP 证 020026 号
北京创新乐知广告有限公司 提供技术支持
Copyright © 2000-2007, CSDN.NET, All Rights Reserved
GongshangLogo