:::

15-3 上課範例:header.php

<?php
session_start();

require_once "function.php";

//error_reporting(0);
$link=@mysql_connect("localhost" , "tad0616" ,"12345");

if(!$link)  echo "資料庫連不上!";

//設定使用UTF8編碼
mysql_query("SET NAMES 'utf8'");

//選擇資料庫
mysql_select_db('tad0616');



$_SESSION['isLeader'] = isset($_SESSION['isLeader']) ? $_SESSION['isLeader'] : "";
$_SESSION['isAdmin'] = isset($_SESSION['isAdmin']) ? $_SESSION['isAdmin'] : "";

$admin_logout='';
if($_SESSION['isAdmin']){
  $admin_logout='<li><a href="class.php?op=logout">管理員登出</a></li>';
}

$toolbar='
<li class="current_page_item"><a href="index.php">首頁</a></li>
<li><a href="index.php?op=edit">新增文章</a></li>
<li><a href="index.php?op=admin">文章管理</a></li>
<li><a href="class.php">班級管理</a></li>
<li><a href="class.php?op=edit">新增班級</a></li>
'.$admin_logout
;
?>

:::

搜尋

QR Code 區塊

https%3A%2F%2Ftad0616.net%2Fmodules%2Ftad_book3%2Fpage.php%3Ftbdsn%3D575%26tbsn%3D20

書籍目錄

展開 | 闔起

線上使用者

21人線上 (9人在瀏覽線上書籍)

會員: 0

訪客: 21

更多…