detail.php
2.07 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
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
<?php
require "function.php";
$url_img = "http://localhost/study-project/trunk/Message/attachment/";
$url = "http://localhost.vchangyi.org/E92B06237F00000150F5A2266E14186D/Message/Apicp/Message/Detail";
$message_id = $_GET['message_id'];
$postData = [
'message_id'=>$message_id,
];
$message = curlPost($url,$postData);
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>留言列表</title>
<style type="text/css">
table{
width: 500px;
margin: 50px auto;
border-spacing: 0px;
border-collapse: 0px;
border: solid #fff 1px
}
table tr td{
border: solid #000 1px
}
</style>
</head>
<body>
<h4 align="center">留言详情</h4>
<table>
<tbody>
<thead>
<tr> <td>ID</td> <td>标题</td><td>内容</td> <td>留言者</td><td>接收人</td> </tr>
</thead>
<?php
echo "<tr> <td>{$message['message_id']}</td> <td>{$message['title']}</td> <td>{$message['message']}</td><td>{$message['from']}</td><td>{$message['to']}</td></tr>";
?>
</tbody>
</table>
<!-- <h4 align="center">留言附件信息</h4> -->
<table>
<thead>
<tr> <td>留言附件</td> </tr>
</thead>
<tbody>
<?php
if (isset($message['attachment']) && $message['attachment']) {
foreach ($message['attachment'] as $key => $img) {
echo "<tr> <td><img src=\"" . $url_img . $img['path'] . "\"/></td></tr>";
}
}
?>
</tbody>
</table>
<!-- <h4 align="center">留言评论信息</h4> -->
<table>
<tbody>
<thead>
<tr> <td>评论内容</td><td>评论用户</td> <td>时 间</td></tr>
</thead>
<?php
if (isset($message['comment']) && $message['comment']) {
foreach ($message['comment'] as $key => $comment) {
$create_time = $comment['created']/1000;
$create_time_str = date("Y-m-d H:i:s");
echo "<td>{$comment['comment']}</td><td>{$comment['commenter']}</td><td>{$create_time_str}</td></tr>";
}
}
?>
</tbody>
</table>
</body>
</html>