detail.php
7.35 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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
<?php
/**
* Created by PhpStorm.
* User: Dell
* Date: 2018/9/5
* Time: 15:34
*/
error_reporting(0);
$mid = (isset($_GET['mid'])) ? $_GET['mid'] : null;
$mess_detail = [];
if ($mid !== null) {
$mess_res = file_get_contents("http://lys.com/wx5019b9c455ea9c81/Message/Apicp/Message/MessDetail/getDetail/?mid={$mid}");
if ($mess_res) {
$mess_detail = json_decode($mess_res,true)['result'];
}
}
$scenario = isset($_GET['scenario']) ? $_GET['scenario'] : 'detail';
$cap = '留言详细内容';
if ($scenario == 'detail') {
$title = '留言详细';
}else if ($scenario == 'audit') {
$title = '留言审核';
}
?>
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title><?php echo $title; ?></title>
<link href="../apidocassets/css/mess_front.css" type="text/css" rel="stylesheet" >
<script type="text/javascript" src="../apidocassets/javascript/jquery.min.js"></script>
<script type="text/javascript" src="../apidocassets/javascript/mess_admin.js"></script>
<style type="text/css">
.con table {
font-size: 14px;
}
.con table td{
vertical-align: top;
}
label,input{
font-size: 10px;;
}
button{
padding: 5px 10px;
margin-left: 50px;
}
</style>
</head>
<body>
<!-- 无数据提示 -->
<?php if($mess_detail == null) { ?>
<script type="text/javascript"> alert("暂无数据。"); window.location.href="./list.php";</script>
<?php } ?>
<div class="con">
<table>
<caption><h4><?php echo $cap; ?></h4></caption>
<tr></tr>
<tr>
<td><h5>用户信息</h5></td>
</tr>
<tr>
<td>
<label>用户昵称:</label>
<label><strong><?php echo $mess_detail['u_name']; ?></strong></label>
</td>
</tr>
<tr>
<td>
<label>性别:</label>
<label>
<input type="radio" value="1" disabled <?php if ($mess_detail['u_sex'] == 1) echo "checked"; ?> > 男
<input type="radio" value="2" disabled <?php if ($mess_detail['u_sex'] == 2) echo "checked"; ?> > 女
</label>
</td>
</tr>
<?php
if ($mess_detail['u_mail'] != null) {
?>
<tr>
<td>
<label>邮箱:</label>
<label><strong><?php echo $mess_detail['u_mail']; ?></strong></label>
</td>
</tr>
<?php } ?>
<?php
if ($mess_detail['u_tel'] !=null) {
?>
<tr>
<td>
<label>电话:</label>
<label><strong><?php echo $mess_detail['u_tel']; ?></strong></label>
</td>
</tr>
<?php } ?>
<tr>
<td><h5>留言信息</h5></td>
</tr>
<tr>
<td>
<label>标题:</label>
<label>
<input type="text" readonly value="<?php echo $mess_detail['m_title']; ?>" >
</label>
</td>
</tr>
<tr>
<td>
<label>内容:</label>
<label>
<textarea readonly cols="40" style="resize: none;"><?php echo $mess_detail['m_content'];?></textarea>
</label>
</td>
</tr>
<?php if ($mess_detail['m_imgs'] !='') { ?>
<tr>
<td>
<label>图片:</label>
<label>
<img src="<?php echo $mess_detail['m_imgs']; ?>" height="200px" >
</label>
</td>
</tr>
<?php } ?>
<tr>
<td>
<label>用户IP:</label>
<label><strong><?php echo $mess_detail['m_ip']; ?></strong></label>
</td>
</tr>
<tr>
<td>
<label>留言状态:</label>
<label><strong>
<?php
if ($mess_detail['m_status'] == 1) {
echo "未审核";
} else if ($mess_detail['m_status'] == 2) {
echo "审核未通过";
} else if ($mess_detail['m_status'] == 3) {
echo "审核通过";
} else if ($mess_detail['m_status'] == 4) {
echo "已删除";
}
?>
</strong></label>
</td>
</tr>
<?php
if ($mess_detail['m_status'] == 2) {
?>
<tr>
<td>
<label>未通过原因:</label>
<label><strong><?php echo $mess_detail['m_reason']; ?></strong></label>
</td>
</tr>
<?php } ?>
<tr>
<td>
<label>留言时间:</label>
<label><strong><?php echo $mess_detail['ins_date']; ?></strong></label>
</td>
</tr>
<tr></tr>
<?php
if ($scenario == 'audit' && $mess_detail['m_status'] == 1) {
?>
<tr>
<td>
<h4>
<label>开始审核:</label>
<input type="radio" name="audit" value="3" id="audit_3" onclick="javascript:$('#tr_rea').css('display','none');"> 通过
<input type="radio" name="audit" value="2" id="audit_2" onclick="javascript:$('#tr_rea').css('display','inherit');"> 不通过
</h4>
</td>
</tr>
<tr id="tr_rea" style="display: none;" >
<td>
<h4>
<label>驳回原因:</label>
<textarea name="reason" style="resize: none;" cols="40" id="reason" ><?php echo $mess_detail['m_reason']; ?></textarea>
</h4>
</td>
</tr>
<?php } ?>
<tr></tr>
<tr>
<td>
<button value="返回" onclick="javascript:history.back();">返回</button>
<?php if ($scenario == 'detail') { ?>
<button value="删除" onclick="javascript:jumpDel(<?php echo $mess_detail['m_id']; ?>);">删除</button>
<?php } ?>
<?php if ($scenario == 'audit') {?>
<button value="提交" onclick="javascript:jumdAudit(<?php echo $mess_detail['m_id']; ?>);">提交审核</button>
<?php } ?>
</td>
</tr>
</table>
</div>
</body>
</html>