-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnews_single.php
79 lines (52 loc) · 1.78 KB
/
news_single.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
<!doctype HTML5>
<html>
<head><link rel="icon" href="./img/logo-icon.png" />
<meta charset="utf-8">
<script src="./js/jquery-3.4.1.min.js"></script><script src="./js/navbar.js"></script><link rel="stylesheet" href="./main.css">
<script type="text/javascript" src="slidemenu.js"></script>
<title>明道中學校友會</title>
<style></style>
</head>
<body><div w3-include-html="./layout/navbar.php"></div>
<div align="center" class="banner">
<a id="top"></a>
<div><h3 class="title">最 新 消 息</h3></div>
<div><p class="subtitle">最新消息 > 會務訊息</p></div>
</div>
<div class="content">
<?php
include('./connect.php');
$sql = 'SELECT * FROM `news` WHERE `id` = '.$_GET['id'].'';
$run = mysqli_query($con,$sql);
while($row = mysqli_fetch_assoc($run)){
echo '
<div class="alumni_content" ">
<div style="width:60vw;">
<p><span style=" margin-right:30px;font-size:xx-large;"><strong>'.$row['title'].'</strong></span></p>
<hr>
</div>
<div class="store_photo" style="margin:50px;">
<img src="https://drive.google.com/uc?id='.$row['img'].'" class="news">
</div>
<div class="news">
<p style="word-break:break-all;">'.$row['content'].' </p>
<H2 style="" align="center"><a href="'.$row['link'].'" target="_blank">查看連結</a></H2>
</div>
</div>
';
}
?>
<div>
<button
onclick=location.href="news.php"
style=" border:none; background-image:url(./img/back.png); background-size:100% 100% ; width:25vw; min-width:350px;min-height:100px;">
</button>
</div>
</div>
<div w3-include-html="./layout/footer.html"></div>
</body>
</html>
<script src="./js/w3.js"></script>
<script>
w3.includeHTML();
</script>