当前位置:Linux教程 - Php - PHP4中session的应用(2)--欢迎页面(welcome_reserve.php3)

PHP4中session的应用(2)--欢迎页面(welcome_reserve.php3)

<?php
//这个页面首先判断用户是否正确登录,如未登录,就转到登录页面。
session_start();
if((!$user_id)or(!$user_array[ticket_day])or(!$user_array[ticket_num])){
    Header("Location: login.php3");
}
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

<html>
<head>
    <title>欢迎使用南京站订票系统</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" type="text/css" href=http://www.sheup.com/?"../include/njz_common.css">
</head>

<body>
<p> </p>
<table width="500" border="1" cellspacing="0" cellpadding="0" align="center" bordercolor="#CCCCCC">
  <tr>
    <td>
      <table width="100%" border="0" cellspacing="0" cellpadding="0" align="center">
        <tr bgcolor="#999999">
          <td>
            <div align="center"><font size="4" color="#FFFFFF">欢迎您 <?php echo $user_name; ?></font></div>
          </td>
        </tr>
      </table>
      <br>
      <table width="400" border="0" cellspacing="0" cellpadding="0" align="center">
        <tr>
          <td><font color="#3333CC">公告栏:</font></td>
        </tr>
        <tr>
          <td>  今日无公告</td>
        </tr>
      </table>
      <br>
      <br>
      <table width="400" border="0" cellspacing="0" cellpadding="0" align="center">
        <tr>
          <td>
            <div align="center"><a href=http://www.sheup.com/?"reserve_ticket.php3">网上订票</a> <a href=http://www.sheup.com/?"test1.php3">订单查询</a> <a href=http://www.sheup.com/?"test2.php3">口令修改</a> 订票帮助 <a href=http://www.sheup.com/?"login.php3?logout=1">退出登录</a> </div>
          </td>
        </tr>
      </table>
      <br>
    </td>
  </tr>
</table>
<p> </p>
<?php
include("../footer.php3&quo