示例#1
0
        echo $qObj->get_qname();
        ?>
 </p>
	<p style="font-size: 70%; color: red">Hint: <?php 
        echo $qObj->get_hint();
        ?>
 </p>

	<?php 
        $u = new user_session();
        if (!$u->get_user_session()) {
            header('Location: /index.php');
        } else {
            include_once "includes/game.php";
            $g = new game();
            if (!$g->solved_already($u->get_uid(), $qid)) {
                ?>
		<form id="challenge" action="<?php 
                echo $_SERVER['PHP_SELF'];
                ?>
" method="post">
    	      <div class="form_settings">
        	    <p><font color="red"><?php 
                echo $err_msg;
                ?>
</font></p>
            	<p><span> Got the Answer!!! </span><input class="contact" type="text" name="answer" value="" /> 
                	<input type="hidden" name="q" value="<?php 
                echo $qid;
                ?>
" /></p>
示例#2
0
文件: game.php 项目: shsirk/htf
<?php

include "/var/www/includes/game.php";
$g = new game();
if ($g->solved_already(2, 2)) {
    echo "you have sovled this question before";
} else {
    echo "points updated successfully";
}
$score = $g->get_user_score(5);
echo $score;
echo "<br/>";
$points = $g->get_points_of_flag(4, 3, 'malwarex');
echo $points;