Пример #1
0
<?php

session_start();
require_once "require/constants.php";
require_once "require/functions.php";
require_once "require/begun_or_not_scheme.php";
begun_or_not(1);
// define any other scheme in begun_or_not_scheme.php
$done = 0;
if (isset($_COOKIE["username"]) && isset($_SESSION['username']) && $_COOKIE["username"] == $_SESSION['username']) {
    $username = $_SESSION['username'];
    $password = $_SESSION['password'];
    $connection = createConn();
    $temp_usr = mysql_real_escape_string($username);
    $temp_pass = mysql_real_escape_string($password);
    $sql_query = "select completed from googlockusers where username='******' and password='******'";
    //lock
    put_lock($connection, "googlockusers", "read");
    $temp = mysql_query($sql_query, $connection) or die("ERROR QUERY");
    remove_lock($connection);
    //unlock
    $result = mysql_fetch_array($temp);
    $result['completed'] = $result['completed'] + 1;
    $no = $result['completed'];
    if ($result['completed'] > $no_of_questions) {
        //finished all the questions
        $done = 1;
    }
    $sql_query = "select question from googlockquestions where no='{$result['completed']}'";
    $temp = mysql_query($sql_query, $connection) or die("Error in query");
    $question = mysql_fetch_array($temp);
Пример #2
0
</h4>
			</div>
			<div id="right1" >
			<ul id="menu1">
			<li><a href="logout.php" class="current">Logout</a></li>
		
		</ul>
			</div>
			</div>
		    <p>&nbsp;</p>
			 <p>&nbsp;</p>
		    <p class="style9">Thank you for registering for the event and it's sure that you find lots of fun and excitement in this online entertainment extravaganza. Event details are present in the <a href="About.php">Rules</a> page. Please go through them before you start playing.</p>
		    <!--<p class="style9"> Phase-1 will start on 21st february 2011 at 9pm.</p>-->
			<p>&nbsp;</p>
			<?php 
echo "<strong> <span class='style5'>" . begun_or_not(0) . "</strong></span>" . "<br/>";
?>
			
		  <tr>
                <td><input type="button" onclick="location.href='play.php'"  id="startgame" value="Start Game"/></td>
          </tr>
			</p>
			<p>&nbsp;</p>
			<p>&nbsp;</p>
			
			<p class="date"  style="font-size: 13px;"><a href="http://ieee.daiict.ac.in/ifest">Back to I.Fest</a></p>
		</div>
        
<div id="footer">
			
				<p align="center" class="style12">Dhirubhai Ambani Institute of Information and Communication Technology</p>