Example #1
0
<?php

require_once './controller/QuestionCtrl.php';
QuestionCtrl::init();
$b = true;
if (isset($_POST['s']) && $_POST['s'] != '') {
    $b = false;
    $s = $_POST['s'];
    $q = $_POST['q'];
    if (QuestionCtrl::check($q, $s)) {
        echo 'okkkk::' . QuestionCtrl::get($q)->getExplain() . '::';
    } else {
        echo 'wrong::' . QuestionCtrl::get($q)->getExplain() . '::' . QuestionCtrl::get($q)->getRs() . '::';
    }
} else {
    $q = isset($_GET['q']) ? $_GET['q'] : 1;
    $cont = QuestionCtrl::get($q);
}
if ($b) {
    ?>
<div class="clear-top"></div>
<div class="container">
    <h4>
        <span class="label label-warning pull-left">
            Question <?php 
    echo $q;
    ?>
 of <?php 
    echo QuestionCtrl::size();
    ?>
: