-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmessage_view.php
76 lines (69 loc) · 2.24 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
74
75
76
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title><?php
$mode = $_GET["mode"];
$num = $_GET["num"];
$con = mysqli_connect("localhost", "Steve", "Vrick2956!@", "Term");
$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"];
echo "쪽지 보기 > ".$subject." - Indie, GO!";
?></title>
<link rel="stylesheet" type="text/css" href="./css/common.css">
<link rel="stylesheet" type="text/css" href="./css/message.css">
</head>
<?php require('dark.php'); ?>
<body style="background-color: <?php echo $background;?>; color: <?php echo $color;?>">
<header>
<?php include "header.php";?>
</header>
<section>
<div id="main_img_bar">
<?php require('slide.php'); ?>
</div>
<div id="message_box">
<h3 class="title">
<?php
$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>
</section>
<footer>
<?php include "footer.php";?>
</footer>
</body>
</html>