Esempio n. 1
0
$quList = $pdo->query($sql)->fetchAll(PDO::FETCH_ASSOC);
foreach ($quList as $val) {
    $sql = "SELECT * FROM Answer WHERE `userId` = '{$user['id']}' AND `quId` = '{$val['id']}' AND `old` = 0";
    $status = $pdo->query($sql)->fetch(PDO::FETCH_ASSOC);
    ?>
		<tr>
			<th class="text-right no"><?php 
    echo $val['no'];
    ?>
</th>
			<td class="hidden-xs qu"><?php 
    echo $val['sentence'];
    ?>
</td>
			<td class="text-center st <?php 
    echo CFstsStatusClass($status['status']);
    ?>
"><?php 
    echo CFstsStatusText($status['status']);
    ?>
</td>
			<td class="text-center an"><?php 
    echo CFstsAnswerButton($status['status'], $val['id']);
    ?>
</td>
		</tr>
<?php 
}
?>
	</tbody>
</table>
Esempio n. 2
0
<div class="col-xs-12">
<div class="page-header"><h1 class="h3">回答詳細 <small><?php 
echo "問題No.{$question['no']}";
?>
</small></h1></div>
</div>
</div>
</div>

<div class="container">
<div class="row">
<div class="col-xs-12 col-sm-12 col-md-offset-1 col-md-10 col-lg-offset-2 col-lg-8">

<h2 class="h4">問題</h2>
<p class="<?php 
echo CFstsStatusClass($answer['status']);
?>
"><?php 
echo CFstsStatusText($answer['status']);
?>
</p>
<p><?php 
echo str_replace(array("\r\n", "\r", "\n"), '<br>', $question['sentence']);
?>
</p>
<p><strong>期限:</strong> <?php 
echo datetime($question['timeLimit']);
?>
</p>
<p><strong>提出:</strong> <?php 
echo datetime($answer['timestamp']);