-
Notifications
You must be signed in to change notification settings - Fork 0
/
message_view.php
73 lines (67 loc) ยท 2.09 KB
/
message_view.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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>๋ฉ๋๋กฑ๋ํ</title>
<link rel="stylesheet" type="text/css" href="./css/common.css">
<link rel="stylesheet" type="text/css" href="./css/message.css">
<link rel="stylesheet" href="css/main1.css">
</head>
<body>
<header>
<?php include "header.php";?>
</header>
<section>
<div id="main_img_bar">
<img src="./img/main_img.png">
</div>
<div id="message_box">
<h3 class="title">
<?php
$mode = $_GET["mode"];
$num = $_GET["num"];
$con = mysqli_connect("localhost", "user1", "12345", "sample");
$sql = "select * from message where num=$num";
$result = mysqli_query($con, $sql);
$row = mysqli_fetch_array($result);
$send_id = $row["send_id"];
$rv_id = $row["rv_id"];
$regist_day = $row["regist_day"];
$subject = $row["subject"];
$content = $row["content"];
$content = str_replace(" ", " ", $content);
$content = str_replace("\n", "<br>", $content);
if ($mode=="send")
$result2 = mysqli_query($con, "select name from members where id='$rv_id'");
else
$result2 = mysqli_query($con, "select name from members where id='$send_id'");
$record = mysqli_fetch_array($result2);
$msg_name = $record["name"];
if ($mode=="send")
echo "์ก์ ์ชฝ์งํจ > ๋ด์ฉ๋ณด๊ธฐ";
else
echo "์์ ์ชฝ์งํจ > ๋ด์ฉ๋ณด๊ธฐ";
?>
</h3>
<ul id="view_content">
<li>
<span class="col1"><b>์ ๋ชฉ :</b> <?=$subject?></span>
<span class="col2"><?=$msg_name?> | <?=$regist_day?></span>
</li>
<li>
<?=$content?>
</li>
</ul>
<ul class="buttons">
<li><button onclick="location.href='message_box.php?mode=rv'">์์ ์ชฝ์งํจ</button></li>
<li><button onclick="location.href='message_box.php?mode=send'">์ก์ ์ชฝ์งํจ</button></li>
<li><button onclick="location.href='message_response_form.php?num=<?=$num?>'">๋ต๋ณ ์ชฝ์ง</button></li>
<li><button onclick="location.href='message_delete.php?num=<?=$num?>&mode=<?=$mode?>'">์ญ์ </button></li>
</ul>
</div> <!-- message_box -->
</section>
<footer>
<?php include "footer.php";?>
</footer>
</body>
</html>