-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathviewpost.html
More file actions
65 lines (62 loc) ยท 2.13 KB
/
viewpost.html
File metadata and controls
65 lines (62 loc) ยท 2.13 KB
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
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="../css/default.css">
<link rel="stylesheet" href="../css/style.css?ver=18">
<title>๋ถ์ค๋ฌผ ๊ฒ์ํ</title>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<script>
$(document).ready(function(){
$.get("http://15.164.210.143/give2.php", function(data, status){
// 'data' contains the output of board.php
$("#result").html(data);
})
.fail(function(jqXHR, textStatus, errorThrown) {
console.error('AJAX request failed: ' + textStatus + ', ' + errorThrown);
});
});
</script>
</head>
<body>
<header>
<nav id="navBar">
<div class="navBarCon">
<div class="navBarleft">
<h1>๋ถ์ค๋ฌผ ๊ฒ์ํ</h1>
</div>
</div>
</nav>
</header>
<section>
<div class="mainCon">
<div id="viewTitle"></div>
<div id="viewInfo"></div>
<div id="viewStory"></div>
<div class="viewBtn">
<a href="http://15.164.210.143/board.html">๋ชฉ๋ก์ผ๋ก</a>
</div>
</div>
</section>
<footer></footer>
<script>
$(document).ready(function(){
var urlParams = new URLSearchParams(window.location.search);
var no = urlParams.get('no');
$.get("http://15.164.210.143/viewpost2.php?no=" + no, function(data){
if (data.error) {
alert(data.error);
return;
}
$('#viewTitle').text(data.title);
$('#viewInfo').text(data.redate);
$('#viewStory').html(data.story + (data.image ? "<br><img src='http://15.164.210.143/image/" + data.image + "'></img>" : ""));
})
.fail(function(jqXHR, textStatus, errorThrown) {
console.error('AJAX request failed: ' + textStatus + ', ' + errorThrown);
});
});
</script>
</body>
</html>