Fix reinfo contest resubmit links
This commit is contained in:
@@ -53,6 +53,14 @@ $result = pdo_query($sql,$id);
|
|||||||
$row = $result[0];
|
$row = $result[0];
|
||||||
$lang = $row['language'];
|
$lang = $row['language'];
|
||||||
$contest_id = intval($row['contest_id']);
|
$contest_id = intval($row['contest_id']);
|
||||||
|
$problem_id = intval($row['problem_id']);
|
||||||
|
$problem_num = intval($row['num']);
|
||||||
|
$view_resubmit_url = "submitpage.php?id=".$problem_id."&sid=".intval($id);
|
||||||
|
$view_problem_url = "problem.php?id=".$problem_id;
|
||||||
|
if($contest_id > 0){
|
||||||
|
$view_resubmit_url = "submitpage.php?cid=".$contest_id."&pid=".$problem_num."&sid=".intval($id);
|
||||||
|
$view_problem_url = "problem.php?cid=".$contest_id."&pid=".$problem_num;
|
||||||
|
}
|
||||||
$isRE = $row['result']==10;
|
$isRE = $row['result']==10;
|
||||||
$isAC = $row['result']==4 ;
|
$isAC = $row['result']==4 ;
|
||||||
$mark=$row['pass_rate']*100;
|
$mark=$row['pass_rate']*100;
|
||||||
|
|||||||
@@ -358,13 +358,13 @@ i.icon.spinning {
|
|||||||
<?php echo isset($MSG_QUICK_ACTIONS) ? $MSG_QUICK_ACTIONS : '快捷操作'; ?>
|
<?php echo isset($MSG_QUICK_ACTIONS) ? $MSG_QUICK_ACTIONS : '快捷操作'; ?>
|
||||||
</div>
|
</div>
|
||||||
<div class="ui buttons">
|
<div class="ui buttons">
|
||||||
<a class="ui blue button" href="submitpage.php?id=<?php echo intval($row['problem_id']) ?>">
|
<a class="ui blue button" href="<?php echo htmlspecialchars($view_resubmit_url, ENT_QUOTES, 'UTF-8') ?>">
|
||||||
<i class="edit icon"></i> <?php echo isset($MSG_RESUBMIT) ? $MSG_RESUBMIT : '重新提交'; ?>
|
<i class="edit icon"></i> <?php echo isset($MSG_RESUBMIT) ? $MSG_RESUBMIT : '重新提交'; ?>
|
||||||
</a>
|
</a>
|
||||||
<a class="ui button" href="showsource.php?id=<?php echo intval($id) ?>">
|
<a class="ui button" href="showsource.php?id=<?php echo intval($id) ?>">
|
||||||
<i class="code icon"></i> <?php echo isset($MSG_VIEW_SOURCE) ? $MSG_VIEW_SOURCE : '查看我的代码'; ?>
|
<i class="code icon"></i> <?php echo isset($MSG_VIEW_SOURCE) ? $MSG_VIEW_SOURCE : '查看我的代码'; ?>
|
||||||
</a>
|
</a>
|
||||||
<a class="ui button" href="problem.php?id=<?php echo intval($row['problem_id']) ?>">
|
<a class="ui button" href="<?php echo htmlspecialchars($view_problem_url, ENT_QUOTES, 'UTF-8') ?>">
|
||||||
<i class="info circle icon"></i> <?php echo isset($MSG_VIEW_PROBLEM) ? $MSG_VIEW_PROBLEM : '查看题目'; ?>
|
<i class="info circle icon"></i> <?php echo isset($MSG_VIEW_PROBLEM) ? $MSG_VIEW_PROBLEM : '查看题目'; ?>
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user