注册 登录
编程论坛 ASP技术论坛

求大家解决一个网站的的小问题,请进来看详细说明。

manbu 发布于 2010-08-12 15:10, 595 次点击
http://www.
这个网页上的视频,但是得会员注册了 才能看视频。
我想改成游客点击可以查看网站上的视频。
哪位朋友愿意帮个忙。。

下面是代码一:
<!--#include file="Conn.asp" -->

<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<%   if request.Cookies("hksm")("username")="" then
      response.write"<script language=Javascript>alert('您还没有登录,无法访问,请登录后再来试试吧!!!');window.location.href='index.asp'</script>"
else      
 
d_id=request("d_id")
set rs=server.CreateObject("adodb.recordset")
str="select * from download where d_id="&d_id&""
rs.open str,conn,1,1
if not rs.eof then
d_url=rs("d_url")
end if
rs.close
set rs=nothing
response.Redirect"images/"&d_url&""
  end if
%>
————————————————————————————————————————
代码二;
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.
<html xmlns="http://www.
<!--#include file="Conn.asp" -->
<!--#include file="sub.asp" -->
<!--#include file="isuser.asp" -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title><%=c_incname%></title>
<META NAME="Description" CONTENT="<%=c_keywords%>" />
<link href="css.css" rel="stylesheet" type="text/css" />
<script  type="text/javascript">
var _bdhm_top = 0;
var _bdhmProtocol = (("https:" == document.location.protocol) ? " https://" : " http://");
var _bdhm_tim = new Image(1,1);
_bdhm_tim.id = "bdhmPerimg";
_bdhm_tim.src = _bdhmProtocol + "hm.baidu.com/_tt.gif?si=f02a8fde79ddf5b978cd9ae9d408b7c1&rnd=" + Math.round(Math.random()*2147483647);
_bdhm_tim.onload=function(){_bdhm_top = 1;}
</script></head>

<body>
<!--#include file="top.asp" -->
<table width="978" border="0" align="center" cellpadding="0" cellspacing="0" style="margin-top:8px;">
  <tr>
    <td width="286" valign="top"><!--#include file="left_user.asp" --></td>
    <td width="692" valign="top">
   
<%
d_id=request("d_id")
if d_id="" then
response.Redirect"index.asp"
else
set rs=server.CreateObject("adodb.recordset")
str="select * from download where d_id="&d_id&""
rs.open str,conn,1,1
if not rs.eof then
d_title=rs("d_title")
d_url=rs("d_url")
cid=rs("cid")
end if
rs.close
set rs=nothing      
end if
swf_width=500
swf_height=400
%>      
   
    <table width="692" border="0" cellpadding="0" cellspacing="0">
      <tr>
        <td height="42" class="sec01">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<%call cname("nclass",cid)%></td>
      </tr>
      <tr>
        <td height="1200" valign="top" background="images/cor_01.jpg">
<table width="95%" border="0" align="center" cellpadding="0" cellspacing="0" style="margin-top:8px;">
          <tr>
            <td align="center">         
<%=d_url%>            
               
               
               
                <hr><%=d_title%>
             </td>
            </tr>
        </table>


               
        </td>
      </tr>
      <tr>
        <td height="11"><img src="images/cor_02.jpg" width="692" height="11" /></td>
      </tr>
    </table>
        </td>
  </tr>
</table>
<!--#include file="bottom.asp" -->
</body>
</html>
4 回复
#2
gupiao1752010-08-12 15:35
代码一里的这种判断取消了,看看行不行:
<%   if request.Cookies("hksm")("username")="" then
      response.write
"<script language=Javascript>alert('您还没有登录,无法访问,请登录后再来试试吧!!!');window.location.href='index.asp'</script>"
else      
#3
hams2010-08-12 16:13
if request.Cookies("hksm")("username")="" then response.Cookies("hksm")("username")="user"

然后把对应的
else  
end if

都去掉


[ 本帖最后由 hams 于 2010-8-12 16:15 编辑 ]
#4
manbu2010-08-12 19:54
恩。我试试。。

马上回来报告结果。

#5
manbu2010-08-12 20:06
2楼和3楼的方法,我都试了。

都可以用。

再一次感谢。祝福贵论坛越办越好。
1