PHP4中session的应用--欢迎页面

发表于:2007-07-14来源:作者:点击数: 标签:
?php //这个页面首先判断用户是否正确登录,如未登录,就转到登录页面。 session_start(); if((!$user_id)or(!$user_array[ticket_day])or(!$user_array[ticket_num])){ Header(Location: login.php3); } ? !DOCTYPE HTML PUBLIC -//W3C//D TD HTML 4.0 Tran
<?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="../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="reserve_ticket.php3">网上订票</a> <a href="test1.php3">订单查询</a> <a href="test2.php3">口令修改</a> 订票帮助 <a href="login.php3?logout=1">退出登录</a> </div>
          </td>
        </tr>
      </table>
      <br>
    </td>
  </tr>
</table>
<p> </p>
<?php
include("../footer.php3");
?>
</body>
</html>

原文转自:http://www.ltesting.net