-
Notifications
You must be signed in to change notification settings - Fork 0
/
show_news.php
123 lines (115 loc) · 4.16 KB
/
show_news.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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
<?php
session_start();
require_once 'php/db.php';
require_once 'php/function.php';
$news = getnews($_GET['p']);
?>
<!DOCTYPE html>
<html lang="zh-TW">
<head>
<meta charset="utf-8">
<title>日月潭釣友網</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="">
<meta name="author" content="">
<!-- Le styles -->
<!-- TODO: make sure bootstrap.min.css points to BootTheme generated file
-->
<link href="css/bootstrap.min.css" rel="stylesheet" type="text/css" />
<style type="text/css">
body {
background-image: url("img/lake.jpg");
background-size: 1500px 1500px;
padding-top: 60px;
padding-bottom: 40px;
}
.sidebar-nav {
padding: 9px 0;
}
img {
border: 2px solid white;
border-color: white #666 #666 white;
background-color: ivory;
padding: 10px;
margin: 5px 10px;
}
</style>
<!-- TODO: make sure bootstrap-responsive.min.css points to BootTheme
generated file -->
<link href="//netdna.bootstrapcdn.com/twitter-bootstrap/2.3.1/css/bootstrap-responsive.min.css" rel="stylesheet">
<!-- HTML5 shim, for IE6-8 support of HTML5 elements -->
<!--[if lt IE 9]>
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<!-- Fav and touch icons -->
<link rel="shortcut icon" href="../assets/ico/favicon.ico">
<link rel="apple-touch-icon-precomposed" sizes="144x144" href="../assets/ico/apple-touch-icon-144-precomposed.png">
<link rel="apple-touch-icon-precomposed" sizes="114x114" href="../assets/ico/apple-touch-icon-114-precomposed.png">
<link rel="apple-touch-icon-precomposed" sizes="72x72" href="../assets/ico/apple-touch-icon-72-precomposed.png">
<link rel="apple-touch-icon-precomposed" href="../assets/ico/apple-touch-icon-57-precomposed.png">
</head>
<body>
<!-- 首頁 -->
<div class="navbar navbar-fixed-top">
<div class="navbar-inner">
<div class="container-fluid">
<a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse"> <span class="icon-bar"></span> <span class="icon-bar"></span> <span class="icon-bar"></span> </a>
<a class="brand" href="index.php"><font face='微軟正黑體'>日月潭釣友網</font></a>
<div class="nav-collapse collapse">
<?php if(isset($_SESSION['is_login']) && $_SESSION['is_login'] == true):?>
<p class="navbar-text pull-right">會員
<a href="php/logout.php" class="navbar-link">登出</a>
</p>
<?php else:?>
<p class="navbar-text pull-right">會員
<a href="php/memberlogin.php" class="navbar-link">登錄</a>
</p>
<?php endif;?>
<ul class="nav">
<li>
<a href="index.php">首頁</a>
</li>
<li>
<a href="intro.php">關於釣魚</a>
</li>
<li class="active">
<a href="news.php">日月潭最新消息</a>
</li>
<li>
<a href="weather.php">一周天氣</a>
</li>
<li>
<a href="communication.php">討論區</a>
</li>
</ul>
</div>
<!--/.nav-collapse -->
</div>
</div>
</div>
<div class="container-fluid">
<div class="row-fluid">
<div class="span10 offset1">
<div class="hero-unit">
<?php if($news):?>
<h2><font face="微軟正黑體"><?php echo $news['title'];?></font></h2>
<hr>
<pre><font face="微軟正黑體"><b>分類:</b></font><?php echo $news['category'];?><font face="微軟正黑體"> <b>發布時間:</b></font><?php echo $news['publishdate'];?></pre>
</br>
<pre><?php echo $news['content'];?></pre>
<?php else:?>
<h1>沒資料</h1>
<?php endif;?>
<br>
<!-- 標準按鈕 -->
</div>
<a class="btn btn-primary btn" href="news.php">上一頁</a>
</div>
</div>
</div>
<hr>
<footer>
<p>© 2015 xie xing yu</p>
</footer>
</body>
</html>