query_user_id未生效
This commit is contained in:
@@ -73,7 +73,7 @@ if (isset($_SESSION[$OJ_NAME . '_' . 'user_id'])) {
|
||||
$user_id = $_GET[$OJ_NAME . '_' . 'query_user_id'];
|
||||
}
|
||||
$sql = "SELECT problem_id, MIN(result) AS result FROM solution WHERE user_id=? and result>=4 GROUP BY problem_id ";
|
||||
$result = pdo_query($sql, $_SESSION[$OJ_NAME . '_' . 'user_id']);
|
||||
$result = pdo_query($sql, $user_id);
|
||||
foreach ($result as $row) {
|
||||
$sub_arr[$row['problem_id']] = true;
|
||||
if ($row['result'] == 4)
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<div class="row" style="white-space: nowrap; ">
|
||||
<div class="seven wide column">
|
||||
<form action="" method="get">
|
||||
<div class="ui search" style="width: 280px; height: 28px; margin-top: -5.3px;float:left ">
|
||||
<div class="ui search" style="width: 160px; height: 28px; margin-top: -5.3px;float:left ">
|
||||
<div class="ui left icon input" style="width: 100%; ">
|
||||
<input class="prompt" style="width: 100%; " type="text" placeholder=" <?php echo $MSG_TITLE; ?> …"
|
||||
name="search" value="<?php if (isset($_GET['search']))
|
||||
@@ -30,11 +30,10 @@
|
||||
<!-- 管理员用来显示指定用户的对错情况 -->
|
||||
<?php if (isset($_SESSION[$OJ_NAME . '_' . 'administrator'])): ?>
|
||||
<form action="" method="get">
|
||||
<div class="ui search" style="width: 280px; height: 28px; margin-top: -5.3px;">
|
||||
<div class="ui search" style="width: 160px; height: 28px; margin-top: -5.3px;">
|
||||
<div class="ui icon input" style="width: 100%; ">
|
||||
<input class="prompt" style="width: 100%; " type="text" placeholder="用户ID" name="query_user_id" value="<?php if (isset($_GET['query_user_id']))
|
||||
echo htmlentities($_GET['query_user_id'], ENT_QUOTES, 'UTF-8') ?>">
|
||||
|
||||
<i class="search icon"></i>
|
||||
</div>
|
||||
<div class="results" style="width: 100%; "></div>
|
||||
|
||||
Reference in New Issue
Block a user