-
Notifications
You must be signed in to change notification settings - Fork 15
/
11.bulletin.php
31 lines (29 loc) · 1.25 KB
/
11.bulletin.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
<?php
error_reporting(0);
session_start();
if (!$_SESSION["id"]) {
echo "請先登入";
echo "<meta http-equiv=REFRESH content='3, url=2.login.html'>";
}
else{
echo "歡迎, ".$_SESSION["id"]."[<a href=12.logout.php>登出</a>] [<a href=18.user.php>管理使用者</a>] [<a href=22.bulletin_add_form.php>新增佈告</a>]<br>";
$conn=mysqli_connect("db4free.net", "immust", "immustimmust", "immust");
$result=mysqli_query($conn, "select * from bulletin");
echo "<table border=2><tr><td></td><td>佈告編號</td><td>佈告類別</td><td>標題</td><td>佈告內容</td><td>發佈時間</td></tr>";
while ($row=mysqli_fetch_array($result)){
echo "<tr><td><a href=26.bulletin_edit_form.php?bid={$row["bid"]}>修改</a>
<a href=28.bulletin_delete.php?bid={$row["bid"]}>刪除</a></td><td>";
echo $row["bid"];
echo "</td><td>";
echo $row["type"];
echo "</td><td>";
echo $row["title"];
echo "</td><td>";
echo $row["content"];
echo "</td><td>";
echo $row["time"];
echo "</td></tr>";
}
echo "</table>";
}
?>