ASP的登陆问题

来源:百度知道 编辑:UC知道 时间:2024/07/04 04:25:10
我有一个网站.程序是要求前台用户登陆后才能浏览页面.我觉得很麻烦.请问怎样修改以下代码.修改成不要登陆就可以浏览.谢谢!

<%
if request.cookies("buyok")("username")="" then
response.cookies("url")="showproduct.asp?id="&request("id")
response.write "<script language='javascript'>" & chr(13)
response.write "alert('sorry,please login first');" & Chr(13)
response.write "window.document.location.href='login.asp';"&Chr(13)
response.write "</script>" & Chr(13)
response.End
ELSE
%>
<script type="text/javascript" >
function showPic(whichpic)
{
var source = whichpic.getAttribute("href");
var placeholder = document.getElementById("placeholder");
placeholder.setAttribute("src",source);
}
</script>

<script type="text/javascript" >
function showPic(whichpic)
{
var source = whichpic.getAttribute("href");
var placeholder = document.getElementById("placeholder");
placeholder.setAttribute("src",source);
}
</script>

<%
if request.cookies("buyok")("username")="" then
response.cookies("url")="showproduct.asp?id="&request("id")
response.write "<script language='javascript'>" & chr(13)
response.write "alert('sorry,please login first');" & Chr(13)
response.write "window.document.location.href='login.asp';"&Chr(13)
response.write "</script>" & Chr(13)
response.End
ELSE
%>
把这个删除就可以了