<table width="195" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="195" height="129" valign="top">
<table width="195" border="0" cellspacing="0" cellpadding="0" >
<tr>
<td height="26" align="left" class="menu_bar" style="padding-left:20px;">学生登录</td>
</tr>
<tr>
<td><script language=javascript>
function checkform()
{
if (document.form1.name.value==""){
alert("请输入学号?")
document.form1.name.focus();
return false
}
if (document.form1.pass.value==""){
alert("请输入密码?");
document.form1.pass.focus();
return false
}
return true
}
</script>
<?php
if ($_SESSION[login_type]!="student")
{
?>
<form name="form1" method="post" action="login.php" onSubmit="return checkform()">
<table width="98%" border="0" align="center" cellpadding="0" cellspacing="2">
<tr>
<td align="center" >学 号:</td>
<td align="center"><input name="name" type="text" size="15" maxlength="12"></td>
</tr>
<tr>
<td align="right">密 码:</td>
<td align="center"><input name="pass" type="password" size="15" maxlength="20"></td>
</tr>
<tr>
<td colspan="2" align="center"><input type="Submit" name="Submit" value="学生登录"></td>
</tr>
</table>
</form><?php}
//就这里出现问题47行
else
{
?><table width="98%" border="0" align="center" cellpadding="0" cellspacing="2">
<tr>
<td align="center" >欢迎你:</td>
<td align="center">
<?php echo $_SESSION[stu_name]?></td>
</tr>
<tr>
<td colspan="2" align="center">所在班级:<?php echo $_SESSION[banji]?></td>
</tr>
<tr>
<td align="right"><a href='pwd.php'>修改密码</a></td>
<td align="center"><a href='logout.php'>退出网站</a></td>
</tr>
</table>
<?php
}
?>
</td>
</tr>
</table></td>
</tr>
<tr>
<td height="3" valign="top"></td>
</tr>
<tr>
<td valign="top" ><table width="185" border="1" align="center" cellpadding="1" cellspacing="0" bordercolor="#00CCCB">
<tr>
<td height="26" align="left" class="menu_bar" style="padding-left:20px;">网站公告</td>
</tr>
<tr class="font">
<td align="left" valign="top">
<marquee direction="up" behavior=scroll scrolldelay=180 >
<?php
$sql="select * from notice order by id DESc";
$result=mysql_query($sql);
while($row=mysql_fetch_array($result))
{
?>
·<a href="shownotice.php?id=<?php echo $row[id]; ?>&table=notice"> <?php echo $row[title]?></a><br />
<?php
}
?></marquee>
</td>
</tr>
小雨_0024