| 1 |
<?php
|
| 2 |
require_once "../lib/db_open.inc.php";
|
| 3 |
require_once "../bbs/session_init.inc.php";
|
| 4 |
|
| 5 |
force_login();
|
| 6 |
|
| 7 |
$result_set = array(
|
| 8 |
"return" => array(
|
| 9 |
"code" => 0,
|
| 10 |
"message" => "",
|
| 11 |
"errorFields" => array(),
|
| 12 |
),
|
| 13 |
"data" => array(
|
| 14 |
"user_photos" => array(),
|
| 15 |
),
|
| 16 |
);
|
| 17 |
|
| 18 |
if (!$_SESSION["BBS_priv"]->checklevel(P_ADMIN_M | P_ADMIN_S))
|
| 19 |
{
|
| 20 |
$result_set["return"]["code"] = -1;
|
| 21 |
$result_set["return"]["message"] = "没有权限";
|
| 22 |
|
| 23 |
mysqli_close($db_conn);
|
| 24 |
exit(json_encode($result_set));
|
| 25 |
}
|
| 26 |
|
| 27 |
$sql = "SELECT user_pubinfo.UID, username, photo_ext FROM user_pubinfo
|
| 28 |
INNER JOIN user_list ON user_pubinfo.UID = user_list.UID
|
| 29 |
WHERE photo = 999 AND photo_enable = 0 AND photo_ext <> ''";
|
| 30 |
|
| 31 |
$rs = mysqli_query($db_conn, $sql);
|
| 32 |
if ($rs == false)
|
| 33 |
{
|
| 34 |
$result_set["return"]["code"] = -2;
|
| 35 |
$result_set["return"]["message"] = "Query data error: " . mysqli_error($db_conn);
|
| 36 |
|
| 37 |
mysqli_close($db_conn);
|
| 38 |
exit(json_encode($result_set));
|
| 39 |
}
|
| 40 |
|
| 41 |
while ($row = mysqli_fetch_array($rs))
|
| 42 |
{
|
| 43 |
array_push($result_set["data"]["user_photos"], array(
|
| 44 |
"uid" => $row["UID"],
|
| 45 |
"username" => $row["username"],
|
| 46 |
"photo_ext" => $row["photo_ext"],
|
| 47 |
));
|
| 48 |
}
|
| 49 |
mysqli_free_result($rs);
|
| 50 |
|
| 51 |
mysqli_close($db_conn);
|
| 52 |
?>
|
| 53 |
<html>
|
| 54 |
<head>
|
| 55 |
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
| 56 |
<title>BBS头像审核</title>
|
| 57 |
<link rel="stylesheet" href="css/default.css" type="text/css">
|
| 58 |
</head>
|
| 59 |
<body>
|
| 60 |
<center>
|
| 61 |
<p style="FONT-WEIGHT: bold; FONT-SIZE: 16px; COLOR: red; FONT-FAMILY: 楷体">
|
| 62 |
BBS头像审核
|
| 63 |
</p>
|
| 64 |
<table cols=4 border="1" width="95%">
|
| 65 |
<tr style="font-weight:bold;" height=20>
|
| 66 |
<td width="15%" align="center">
|
| 67 |
用户
|
| 68 |
</td>
|
| 69 |
<td width="40%" align="middle">
|
| 70 |
头像
|
| 71 |
</td>
|
| 72 |
<td width="10%" align="center">
|
| 73 |
处理
|
| 74 |
</td>
|
| 75 |
</tr>
|
| 76 |
<?php
|
| 77 |
foreach ($result_set["data"]["user_photos"] as $user_photo)
|
| 78 |
{
|
| 79 |
?>
|
| 80 |
<tr height=20>
|
| 81 |
<td align="middle">
|
| 82 |
<?= $user_photo["username"]; ?>
|
| 83 |
</td>
|
| 84 |
<td align="middle">
|
| 85 |
<img src="../bbs/images/face/upload_photo/face_<?= $user_photo["uid"] . "." . $user_photo["photo_ext"]; ?>">
|
| 86 |
</td>
|
| 87 |
<td align="middle">
|
| 88 |
<a href="photo_process.php?enable=1&p_id=<?= $user_photo["uid"]; ?>">通过</a><br>
|
| 89 |
<a href="photo_process.php?enable=0&p_id=<?= $user_photo["uid"]; ?>" onclick="return window.confirm('真的要拒绝吗?');">拒绝</a>
|
| 90 |
</td>
|
| 91 |
</tr>
|
| 92 |
<?php
|
| 93 |
}
|
| 94 |
?>
|
| 95 |
</table>
|
| 96 |
</center>
|
| 97 |
</body>
|
| 98 |
</html>
|