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

求助 有关我的毕业 哪位帮下

liuaimei1314 发布于 2008-05-26 21:35, 1022 次点击
我做了个后台管理  出现下面的问题
Script error detected at line 2.
Source line: if session("admin") = "" then
13 回复
#2
liuaimei13142008-05-26 21:36
<%@language=vbscript codepage=936 %>
<%
if session("admin") = "" then
    response.Redirect "Admin_Login.asp"
end if   
dim purview
purview=clng(session("purview"))
%>
<html>
<head>
<title>在线教育网--管理页面</title>
#3
multiple19022008-05-26 21:50
(看了代码没什么问题于是就问一下)你学什么的?
#4
liuaimei13142008-05-27 08:09
我学的是计算机  ASP以前也没有接触过 这 是我做的毕业设计  后台进不去  不知道是怎么回事的
我的毕业设计题目是  基于B/S模式的网上学习系统
#5
dhdhzzw2008-05-27 09:06
后台怎么个进步去,是抱错还是传递值为空,程序是你做的么?想进去看看的话,,去掉<%
if session("admin") = "" then
    response.Redirect "Admin_Login.asp"
end if   
dim purview
purview=clng(session("purview"))
%>
#6
liuaimei13142008-05-27 09:21
这个不是我做的 是我老师做的  输入管理用户名 和密码后 就出现
Script error detected at line 2.
Source line: if session("admin") = "" then
#7
SkyGull2008-05-27 09:27
Script 错误,,,还是个英文版的
#8
liuaimei13142008-05-27 09:28
按照你说的方法还是不行哦
#9
liuaimei13142008-05-27 09:30
怎么办哦  我做了好多天了都没有做好 不知道怎么办了 快要交了 我郁闷了
#10
dhdhzzw2008-05-27 09:58
[bo][un]liuaimei1314[/un] 在 2008-5-27 09:21 的发言:[/bo]

这个不是我做的 是我老师做的  输入管理用户名 和密码后 就出现
Script error detected at line 2.
Source line: if session("admin") = "" then

检测到第2行有错误,,错误语句为 if session("admin") = "" then ,,,,你把它删了我不信还会这里报错//!我说的是登录传递页面删掉这句,试试,,一般都为后台的defalut.asp或其他的。。。看看login.asp的传递方向。。。如果可以的话就可以先进去看看功能。。。。   
不明白,你们老师做的,为什么连后台都无法进入。。。故意让你们改错么?还是其他什么的///?!
#11
liuaimei13142008-05-27 10:15
还是不行哦  要不 我把这个发上 去 你看看
#12
liuaimei13142008-05-27 10:29
这是登陆界面的代码
<%@language=vbscript codepage=936 %>
<%
option explicit
'强制浏览器重新访问服务器下载页面,而不是从缓存读取页面
Response.Buffer = True
Response.Expires = -1
Response.ExpiresAbsolute = Now() - 1
Response.Expires = 0
Response.CacheControl = "no-cache"
%>
<html>
<head>
<title>管理员登录</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" href="Admin_Style.css">
<script language=javascript>
function SetFocus()
{
if (document.Login.UserName.value=="")
    document.Login.UserName.focus();
else
    document.Login.UserName.select();
}
function CheckForm()
{
    if(document.Login.UserName.value=="")
    {
        alert("请输入用户名!");
        document.Login.UserName.focus();
        return false;
    }
    if(document.Login.Password.value == "")
    {
        alert("请输入密码!");
        document.Login.Password.focus();
        return false;
    }    
}
</script>
</head>
<body onLoad="SetFocus();">
<p>&nbsp;</p>
<form name="Login" action="Admin_ChkLogin.asp" method="post" target="_parent" onSubmit="return CheckForm();">
    <table width="300" border="0" align="center" cellpadding="5" cellspacing="0" class="border" >
      <tr class="title">
        <td colspan="2" align="center"> <strong>管理员登录</strong></td>
      </tr>
    <tr>
      <td height="120" colspan="2" class="tdbg">
<table width="250" border="0" cellspacing="8" cellpadding="0" align="center">
          <tr>
            <td align="right">用户名称:</td>
            <td><input name="UserName"  type="text"  id="UserName2" size="23" maxlength="20"></td>
          </tr>
          <tr>
            <td align="right">用户密码:</td>
            <td><input name="Password"  type="password"  size="23" maxlength="20"></td>
          </tr>         
          <tr>
            <td colspan="2"> <div align="center">
                <input   type="submit" name="Submit" value=" 确认 ">
                &nbsp;
                <input name="reset" type="reset"  id="reset" value=" 清除 ">
                <br>
              </div></td>
          </tr>
        </table>
        </td>
      </tr>
    </table>
  <p align="center">后台管理页面需要屏幕分辨率为 <font color="#FF0000"><strong>1024*768</strong></font>
    或以上才能达到最佳浏览效果!<br>
    需要浏览器为<strong><font color="#FF0000"> </font></strong><font color="#FF0000"><strong>IE5.5</strong></font>
    或以上版本才能正常运行!!!</p>
</form>
</body>
</html>
#13
liuaimei13142008-05-27 10:31
这是转向页面的代码
<%@language=vbscript codepage=936 %>
<%
     if session("admin") = "" then
    response.Redirect "Admin_Login.asp"
end if   
dim purview
purview=clng(session("purview"))
%>
<html>
<head>
<title>在线教育网--管理页面</title>
<style type=text/css>
body  { background:#FBFDFF; margin:0px; font:9pt 宋体; }
table  { border:0px; }
td  { font:normal 12px 宋体; }
img  { vertical-align:bottom; border:0px; }
a  { font:normal 12px 宋体; color:#000000; text-decoration:none; }
a:hover  { color:#428EFF;text-decoration:underline; }
.sec_menu  { border-left:1px solid white; border-right:1px solid white; border-bottom:1px solid white; overflow:hidden; background:#f2f2f2; }
.menu_title  { }
.menu_title span  { position:relative; top:0px; left:3px; color:#ffffff; font-weight:bold; }
.menu_title2  { }
.menu_title2 span  { position:relative; top:2px; left:8px; color:#cc0000; font-weight:bold; }
</style>
<STYLE>
BODY
{scrollbar-face-color:E6E6D9; scrollbar-shadow-color:ffffff;
scrollbar-highlight-color:bfbf9f; scrollbar-3dlight-color:ffffff;
scrollbar-darkshadow-color:E6E6D9; scrollbar-track-color:f2f2f2;
scrollbar-arrow-color:ffffff;}
</STYLE>
<SCRIPT language=javascript1.2>
function showsubmenu(sid)
{
whichEl = eval("submenu" + sid);
if (whichEl.style.display == "none")
{
eval("submenu" + sid + ".style.display=\"\";");
}
else
{
eval("submenu" + sid + ".style.display=\"none\";");
}
}
</SCRIPT>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312"></head>
<BODY leftmargin="0" topmargin="0" marginheight="0" marginwidth="0">
<table width=100% cellpadding=0 cellspacing=0 border=0 align=left>
    <tr><td valign=top>
<table width=158 border="0" align=center cellpadding=0 cellspacing=0>
  <tr>
        <td height=42 valign=bottom><table width="100%" border="0" cellspacing="0" cellpadding="0">
            <tr>
              <td height="30" bgcolor="#999999">
                <div align="center"><font color="#000000"><strong><font color="#FFFFFF">在线教育网 | 后台管理</font>&nbsp;&nbsp;</strong></font></div></td>
            </tr>
          </table>
          <table width="100%" border="0" cellspacing="0" cellpadding="0">
            <tr>
              <td>&nbsp;</td>
            </tr>
          </table> </td>
  </tr>
</table>
<table cellpadding=0 cellspacing=0 width=158 align=center>
  <tr>
        <td height=25 bgcolor="999999" class=menu_title id=menuTitle0 onmouseover=this.className='menu_title2'; onmouseout=this.className='menu_title';>
          <span><a href="Admin_Index_Main.asp" target=main><b><font color="#FFFFFF">管理首页</font></b></a><font color="#FFFFFF">
          | <a href=Admin_logout.asp target=_top><b>退出</b></a></font></span> </td>
  </tr>
  <tr>
    <td style="display:" id='submenu0'>
<div class=sec_menu style="width:158">
<table cellpadding=0 cellspacing=0 align=center width=130>
<tr><td height=20>用户名:<%=session("Admin")%></td></tr>
<tr><td height=20>权&nbsp;&nbsp;限:<%
          select case session("purview")
              case 1
                response.write "超级用户"
            case 2
                response.write "高级管理员"
            case 3
                response.write "文章总编"
            case 4
                response.write "栏目编辑"
            case 5
                response.write "文章录入员"
          end select
          %></td></tr>
</table>
</div>
<div  style="width:158">
<table cellpadding=0 cellspacing=0 align=center width=130>
<tr><td height=20></td></tr>
</table>
</div>
    </td>
  </tr>
</table>
#14
liuaimei13142008-05-27 12:37
怎么没有人帮下啊!
1