ToDo уреди

  • во enter.php мета тагот да се попрај - да биди рефреширање во истата категорија
  • да се костумизира датата од базата шо се зема
  • да се проверат одговорите во базата

root уреди

kviz.php уреди

<?php 
	require("templates/header.php");
	if(isset($_COOKIE['dalieveligden'])){
		
	} else {
		setcookie("dalieveligden","da",time()+300,'','',false,true);
	}
?>
<div class="container">
sad
</div>
<?php require("templates/footer.php");?>

scale.php уреди

<?php
	if(isset($_POST['yes'])){
		if($_POST['yes'] == 1){		
			require("functions/mysql_connect.php");
			$query = "SELECT ID,userName,poeni FROM korisnici ORDER BY poeni DESC";
			$query = mysql_query($query) or die("грешка со базата");
			$num1 = mysql_num_rows($query);
			echo '<table>';
			echo '<tr><td id="f">Место</td><td id="s">Учесник</td><td id="p">Поени</td><td id="z">Прашања</td></tr>';
			for($i = 1; $i <= $num1; $i++){
				$res = mysql_fetch_array($query);
				$id = $res['ID'];
				$query_t = "SELECT entryID FROM statistika WHERE userID='$id'";
				$query_t = mysql_query($query_t) or die(mysql_error());
				$num = mysql_num_rows($query_t);
				echo '<tr id="place'.$i.'"><td id="f">'.$i.' </td><td id="s">'.$res['userName'].'</td><td id="p">'.$res['poeni'].'</td><td id="z">'.$num.'</td></tr>';
			}
			echo '</table>';
			mysql_close();
		} else {
			echo "no";
		}
	} else {
		echo "no post";
	}
?>

refresh.php уреди

<?php 
	if(isset($_POST['yes'])){
		if($_POST['yes'] == 1){
			require('functions/mysql_connect.php');
			$query = "SELECT userID,tocnost,time,dateAnswered FROM statistika ORDER BY dateAnswered DESC LIMIT 10";
			$query = mysql_query($query) or die("грешка со базата");
			$nums = mysql_num_rows($query);
			for($i = 1; $i <= $nums; $i++){
				if($i == $nums){
					$extra = "1";
				} else {
					$extra = "0";
				}
				$res = mysql_fetch_array($query);
				$uid = $res['userID'];
				$query_2 = "SELECT userName FROM korisnici WHERE ID='$uid' LIMIT 1";
				$query_2 = mysql_query($query_2) or die("грешка пак".mysql_error());
				$res2 = mysql_fetch_array($query_2);
				if($res['tocnost'] == 1){
					echo '<div id="userAns"><img src="style/images/correct.png" />Играчот <span style="font-weight:bold;">'.$res2['userName'].'</span> одговорил точно.<br/>';
				} else if ($res['tocnost'] == 0) {
					echo '<div id="userAns"><img src="style/images/wrong.png" />Играчот <span style="font-weight:bold;">'.$res2['userName'].'</span> одговорил погрешно.<br/>';
				}
				$time = $res['dateAnswered'];
				echo '<div id="ansDate">'.$time.'</div>';
				echo '</div>';
			}
			mysql_close();
		} else {
			echo "no";
		}
	} else {
		echo "no post";
	}
?>

index.php уреди

<?	require("templates/header.php");?> 
	<script>
	$('.container').ready(function(){
		setTimeout("_refresh()",500);
		setTimeout("_refreshScale()",500);
	});
	</script>
	<div class="container">
		<div class="containerLeft" > 
			<div class="containerTitle">Случувања</div> <hr/>
			<div id="refresh"> 
			<?php
				require("functions/refresher.php");
			?>
			</div>
		</div>    
				
		<div class="containerRight">
			<div class="containerTitle">Скалило</div> <hr/>
			<div id="scale">
			<?php
				require("functions/scaler.php");
			?>
			</div>
		</div>	
	 </div>
<?php require("templates/footer.php"); ?>

enter.php уреди

<?php
	if(isset($_COOKIE['user'])){
		if(isset($_POST['answer']) && isset($_POST['qid'])){
			//echo $_POST['answer'];
			require("functions/mysql_connect.php");
			$ans = mysql_real_escape_string(strip_tags($_POST['answer']));
			$qid = mysql_real_escape_string(strip_tags($_POST['qid']));
			$userID = mysql_real_escape_string(strip_tags($_COOKIE['user']));
			$user = mysql_real_escape_string(strip_tags($_COOKIE['userName']));
			$query = 'SELECT ID,poeni FROM korisnici WHERE ID='.$userID.' AND userName="'.$user.'" LIMIT 1';
			$query = mysql_query($query);
			$num = mysql_num_rows($query);
			if($num == 1){
				$check = mysql_fetch_array($query);
				$uid = $check['ID'];
				$points = $check['poeni'];
				$query = 'SELECT * FROM odgovori WHERE odgovor="'.$ans.'" LIMIT 1';
				$query = mysql_query($query);
				$num = mysql_num_rows($query);
				if($num == 1){
					$check = mysql_fetch_array($query);
					if($check['vistinitost'] == 1){
						echo '<div class="go">точен одговор</div>';
						echo '<meta http-equiv="refresh" content="1;question.php?question=0"/>';
						$now = time();
						$query = 'INSERT INTO statistika(questionID,answerID,userID,tocnost,time) VALUES('.$qid.','.$check['ID'].','.$uid.',1,'.$now.')';
						$query_point = 'SELECT poeni FROM prasanja WHERE ID="'.$check['referenca'].'" LIMIT 1';
						$query_point = mysql_query($query_point) or die("{".mysql_error());
						$query_point = mysql_fetch_array($query_point);
						$points = $points + $query_point['poeni'];
						$poeni = "UPDATE `korisnici` SET `poeni` = '$points' WHERE `ID` ='$userID';";
						$poeni = mysql_query($poeni) or die(mysql_error());
					} else {
						echo '<div class="nogo">грешен одговор</div>';
						echo '<meta http-equiv="refresh" content="1;question.php?question=0"/>';
						$now = time();
						$query = 'INSERT INTO statistika(questionID,answerID,userID,tocnost,time) VALUES('.$qid.','.$check['ID'].','.$uid.',0,'.$now.')';
					}
					$query = mysql_query($query) or die('<br/>не се запиша во статистика'.mysql_error());
					$hash = mysql_real_escape_string(strip_tags($_COOKIE['id']));
					$sesii = 'SELECT * FROM sesii WHERE `hash`="'.$hash.'" LIMIT 1 ';
					$sesii = mysql_query($sesii) or die('1'.mysql_error());
					$get = mysql_fetch_array($sesii);
					$upd = $get['answered'];
					$upd++;
					$update_query = 'UPDATE `sesii` SET `answered` = '.$upd.' WHERE `hash`="'.$hash.'"';
					$update_query = mysql_query($update_query) or die('2'.mysql_error());
				} else {
					echo "грешка";
				}
			} else {
				echo "не си играј со мене,касам";
			}
			@mysql_close();
		} else {
			echo "користи го квизот.";
			echo '<meta http-equiv="refresh" content="1;question.php?question=0"/>';
		}
	} else {
		echo 'најави се за да се користи услугата';
		echo '<meta http-equiv="refresh" content="1;login.php"/>';
	}
?>

question.php уреди

<?php require("/templates/header.php"); ?>

<div class="container" id="cQuest">

	<script language="javascript" type="text/javascript" src="scripts/send.js"></script>

	<?php
		if(isset($_COOKIE['user'])){
			if(isset($_GET['question'])){
				$oblast = mysql_real_escape_string(strip_tags($_GET['question']));
				$prasanje = randomize($oblast);
				if($prasanje == -1){
					die("нема прашања");
				} else {
					echo '
					<div class="questionTransitionArea">
						<div class="questionArea">Прашање од областа на <span class="questionAreaCategory">'.$prasanje['oblast'].'</span></div>
						<div class="question">'.$prasanje['prasanje'].'</div>
						<input type="button" value="'.$prasanje['odgovor1'].'" onclick="send(this.value,'.$prasanje['id'].')" class="odgovor" id="o1"/>
						<input type="button" value="'.$prasanje['odgovor2'].'" onclick="send(this.value,'.$prasanje['id'].')" class="odgovor" id="o2"/>
						<input type="button" value="'.$prasanje['odgovor3'].'" onclick="send(this.value,'.$prasanje['id'].')" class="odgovor" id="o3"/>
						<input type="button" value="'.$prasanje['odgovor4'].'" onclick="send(this.value,'.$prasanje['id'].')" class="odgovor" id="o4"/>
						<div id="ans"></div>
					</div>
					';
				}
			} else {
				echo 'error loading question';
			}
		} else {
			echo 'please login to continue';
		}
	?>
</div>
        </body>

</html>

login.php уреди

<!DOCTYPE html>
<html>
        <head>
<?php require("templates/header.php");?>
<br/><div class="container" id="landr">
<?php
	if(isset($_COOKIE['user'],$_COOKIE['id'],$_COOKIE['userName'])){
		header("Location:index.php");
	} else {                        
		if($_SERVER['REQUEST_METHOD'] == 'POST'){
			if (isset($_POST['user'],$_POST['password'])){
				$user = strip_tags(mysql_real_escape_string($_POST['user']));
				$pass = strip_tags(mysql_real_escape_string($_POST['password']));
	
				$pass = sha1($pass);
	
				require("functions/mysql_connect.php");
				
				$query = "SELECT  * FROM korisnici WHERE userName='$user' AND password='$pass'";
				$return = mysql_query($query) or die(mysql_error());
				
				$num = mysql_num_rows($return);
				
				if($num == 0)
				{
					echo '<div class="nogo">Корисничкото име или лозинката се погрешни!</div>';
					//echo '<meta http-equiv="refresh" content="3;login.php" />';
				} else {
					$row = mysql_fetch_array($return);
					$user = strip_tags(mysql_real_escape_string($row['ID']));
					$userName = strip_tags(mysql_real_escape_string($row['userName']));
					$id = md5(time());
					$query = 'INSERT INTO `sesii`(`userID`,`userName`,`hash`) VALUES("'.$user.'","'.$userName.'","'.$id.'")';
					mysql_query($query) or die('грешка со базата'.mysql_error());
					setcookie("user",$user,time()+3600,'','',false,true);
					setcookie("userName",$row["userName"],time()+3600,'','',false,true);
					setcookie("id",$id,time()+3600,'','',false,true);
					echo '<div class="go">Успешна најава!</div>';
					header("Location:.");
				}
			} else {
				echo '<div class="nogo">Сите полиња мора да се пополнети!</div>';
				echo '<meta http-equiv="refresh" content="3;login.php" />';
			}
		} else {
			echo '<div class="registracija">
			<center> 
				<form method="post" action="login.php">
					<table>
						<tr><td>Корисничко име:</td> <td><input type="text" name="user" /></td></tr><br/>
						<tr><td>Лозинка:</td> <td><input type="password" name="password" /></td></tr>
						<tr><td></td><td align="right"><button type="submit">Внеси</button></td></tr>
					</table>
				</form> 
			</center>
			</div>';
		}
	}

?>

</div>
<?php 
	require("templates/footer.php");
?>

register.php уреди

<!DOCTYPE html>
<html>
	<head>
<?php require("templates/header.php");?>
<br/><div class="container" id="landr">
<?php
        if($_SERVER['REQUEST_METHOD'] == 'POST'){
                        $user = strip_tags(mysql_real_escape_string($_POST['user']));
                        $pass1 = strip_tags(mysql_real_escape_string($_POST['password']));
                        $pass2 = strip_tags(mysql_real_escape_string($_POST['confirm']));
                        $mail = strip_tags(mysql_real_escape_string($_POST['mail']));
                if($user!="" && $pass1 != "" && $pass2 != "" && $mail != ""){
                        $user = mysql_real_escape_string($user);
                        $pass1 = mysql_real_escape_string($pass1);
                        $pass2 = mysql_real_escape_string($pass2);
                        if( $pass1 == $pass2){
                                $pass1 = sha1($pass1);
                        } else {
                                $error = '<div class="nogo">• Лозинките не се совпаѓаат</div>';
								echo '<meta http-equiv="refresh" content="3;register.php" />';
                        }
                        $mail = mysql_real_escape_string($mail);
                        $ip = $_SERVER['REMOTE_ADDR'];
                } else {
                        $error = '<div class="nogo">• Не се пополнети сите полиња</div>';
						echo '<meta http-equiv="refresh" content="3;register.php" />';
                }
                
                if(isset($error)){
                        echo '<div class="nogo">• Грешка! Обидете се повторно.</div><br/>'.$error;
                } else {
						require("functions/mysql_connect.php");
                        $query = 'INSERT INTO korisnici(userName,password,mail,ipAdress) VALUES(
                        "'.$user.'","'.$pass1.'","'.$mail.'","'.$ip.'"
                        );';
                        mysql_query($query) or $error = '<div class="nogo">• Проблеми со прашалникот</div><meta http-equiv="refresh" content="3;register.php" />';
						echo '<div class="go">• Успешна регистрација!</div><meta http-equiv="refresh" content="3;login.php" />';
                }
        } else {
                echo '<div class="registracija">
						<center> 
							<form method="post" action="register.php">
                                <table>
                                        <tr><td>Корисничко име:</td> <td><input type="text" name="user" /></td></tr><br/>
                                        <tr><td>Лозинка:</td> <td><input type="password" name="password" /></td></tr>
                                        <tr><td>Повтори лозинка: </td> <td><input type="password" name="confirm" /></td></tr><br/>
                                        <tr><td>Е-пошта:</td> <td><input type="email" name="mail" /></td></tr><br/>
                                        <tr><td></td><td align="right"><button type="submit">Внеси</button></td></tr>
                                <table>
                        	</form> 
						</center> 
					</div>';
        }

?>

</div>
<?php 
		require("templates/footer.php");
	?>

logout.php уреди

<?php
        if(isset($_COOKIE['user'],$_COOKIE['userName'],$_COOKIE['id'])){
		setcookie("user",$user,time()-3600);
		setcookie("userName",$row["userName"],time()-3600);
		setcookie("id",$id,time()-3600);
        } else {
             echo "no cookie set";
        }
        header("Location:.");
?>

insertQuestion.php уреди

<!DOCTYPE html>
<html>
    <head>
	<?php 
		require("templates/header.php");
	?>
	<div class="container" id="iq">
	
	<?php
		if($_SERVER['REQUEST_METHOD'] == 'POST'){
			if(isset($_COOKIE['user'])){
				$kat = strip_tags(mysql_real_escape_string(trim($_POST['kat'])));
				$oblast = strip_tags(mysql_real_escape_string(trim($_POST['oblast'])));
				$user = strip_tags(mysql_real_escape_string($_COOKIE['user']));
				switch($kat){
						case 1: echo "1";
							if( isset($_POST['question'],$_POST['ansT'],$_POST['ansF1'],$_POST['ansF2'],$_POST['ansF3'])){
									$prasanje = trim(strip_tags(mysql_real_escape_string(trim($_POST['question']))));
									$ansTrue = strip_tags(mysql_real_escape_string(trim($_POST['ansT'])));
									$ansF1 = strip_tags(mysql_real_escape_string(trim($_POST['ansF1'])));
									$ansF2 = strip_tags(mysql_real_escape_string(trim($_POST['ansF2'])));
									$ansF3 = strip_tags(mysql_real_escape_string(trim($_POST['ansF3'])));
									$ansT = array(
										trim($ansTrue)
									);
									$ansF = array(
											trim($ansF1),trim($ansF2),trim($ansF3)
									);
							} else {
									$error = "не се пополнети сите полиња";
							}
							if(isset($error)){
								echo 'Грешка,пробајте повторно.<br/>'.$error;
							} else {
								execute($kat,$user,5,$oblast,$prasanje,$ansT,$ansF);
							}
							break;
					case 2: echo "2";
							if( isset($_POST['question'],$_POST['ansT1'],$_POST['ansT2'],$_POST['ansF1'],$_POST['ansF2'])){
								$prasanje = trim(strip_tags(mysql_real_escape_string($_POST['question'])));
								$ansT1 = strip_tags(mysql_real_escape_string($_POST['ansT1']));
								$ansT2 = strip_tags(mysql_real_escape_string($_POST['ansT2']));
								$ansF1 = strip_tags(mysql_real_escape_string($_POST['ansF1']));
								$ansF2 = strip_tags(mysql_real_escape_string($_POST['ansF2']));
								$ansT = array(
										trim($ansT1),trim($ansT2)
								);
								$ansF = array(
										trim($ansF1),trim($ansF2)
								);
							} else {
								$error = "не се пополнети сите полиња";
							}
							if(isset($error)){
								echo 'Грешка,пробајте повторно.<br/>'.$error;
							} else {
								execute($kat,$user,10,$oblast,$prasanje,$ansT,$ansF);
							}
							break;
					case 3: echo "3<br/>";
							if( isset($_POST['question'],$_POST['ansT'])){
								$prasanje = trim(strip_tags(mysql_real_escape_string($_POST['question'])));
								$ansTrue = strip_tags(mysql_real_escape_string($_POST['ansT']));
								$ansT = array(
									trim($ansTrue)
								);
							} else {
								$error = "не се пополнети сите полиња";
							}
							if(isset($error)){
								echo 'Грешка,пробајте повторно.<br/>'.$error;
							} else {
								execute($kat,$user,15,$oblast,$prasanje,$ansT);
							}
							break;
					}
				} else {
					echo"најави се за да можиш да поставиш прашање";
				}
		} else {
				echo '
				<select id="selectable">
						<option>Одбери категорија</option>
						<option value="1">Категорија 1</option>
						<option value="2">Категорија 2</option>
						<option value="3">Категорија 3</option>
				</select>
				<form id="kat1" style="display:none;" method="post" action="insertQuestion.php">
						<input type="hidden" name="kat" value="1"/>
						<label>Прашање:<input type="text" name="question" /></label>
						<select id="oblast" name="oblast">
								<option>Одбери област</option>
								<option value="0">Рандом</option>
								<option value="1">Спорт</option>
								<option value="2">Филмови</option>
								<option value="3">Музика</option>
								<option value="4">Информатика</option>
								<option value="5">Историја</option>
								<option value="6">Литература</option>
						</select><br/>
						<label>Одговор 1:<input type="text" name="ansT" id="ansT" /></label>
						<label>Одговор 2:<input type="text" name="ansF1" id="ansF"/></label><br/>
						<label>Одговор 3:<input type="text" name="ansF2" id="ansF"/></label>
						<label>Одговор 4:<input type="text" name="ansF3" id="ansF"/></label>
						<br/><br/><button type="submit">Внеси</button>
				</form>
				<form id="kat2" style="display:none;" method="post" action="insertQuestion.php">
						<input type="hidden" name="kat" value="2"/>
						<label>Прашање:<input type="text" name="question" /></label>
						<select id="oblast" name="oblast">
								<option>Одбери област</option>
								<option value="1">Рандом</option>
								<option value="2">Спорт</option>
								<option value="3">Филмови</option>
								<option value="4">Музика</option>
								<option value="5">Информатика</option>
						</select><br/><br/>
						<label>Одговор (прва категорија)<input type="text" name="ansT1" id="ansT"/></label>
						<label>Одговор (прва категорија)<input type="text" name="ansT2" id="ansT"/></label><br/>
						<label>Одговор (втора категорија)<input type="text" name="ansF1" id="ansF"/></label>
						<label>Одговор (втора категорија)<input type="text" name="ansF2" id="ansF"/></label>
						<br/><br/><button type="submit">Внеси</button>
				</form>
				<form id="kat3" style="display:none;" method="post" action="insertQuestion.php">
						<input type="hidden" name="kat" value="3"/>
						<label>Прашање:<input type="text" name="question" /></label>
						<select id="oblast" name="oblast">
								<option>Одбери област</option>
								<option value="1">Рандом</option>
								<option value="2">Спорт</option>
								<option value="3">Филмови</option>
								<option value="4">Музика</option>
								<option value="5">Информатика</option>
						</select><br/><br/>
						<label>Одговор:<input type="text" name="ansT" /></label>
						<br/><br/><button type="submit">Внеси</button>
				</form>
				';
		}
	?>
	
	</div>
	
	<?php 
		require("templates/footer.php");
	?>
    </body>
</html>

templates уреди

header.php уреди


<?php /* Beginning of the header file */ 
        require("functions/lib.php");
?>
<!DOCTYPE html>
<html>
<head>
	<script src="//ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js" type="text/javascript"></script>
    <script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js"></script>
	<script type="text/javascript" type="text/javascript" src="scripts/refresh.js"></script>
	<script src="scripts/main.js" type="text/javascript"></script>
	<script src="scripts/refresh.js" type="text/javascript"></script>
	<link rel="stylesheet" href="style/main.css" />
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
</head>

<body>
	<div class="topForm">
		<?php /* This is the header */ ?>
        <div class="blue">
        <a href=".">Ова е квис</a>
        </div>
        
        <form action="kviz.php" method="post"><button class="whatdoesthisbuttondo">Старт на квизот</button></form>
        
        <div class="login">
            <div class="login-text">
            <?php
				$uid  = mysql_real_escape_string(strip_tags(@$_COOKIE['user']));
                $user = mysql_real_escape_string(strip_tags(@$_COOKIE['userName']));
				$id = mysql_real_escape_string(strip_tags(@$_COOKIE['id']));
                if(isset($_COOKIE['userName'],$_COOKIE['id'])){
					require("functions/mysql_connect.php");
					$query = 'SELECT hash FROM sesii WHERE userID="'.$uid.'" AND userName="'.$user.'" ORDER BY date DESC LIMIT 1';
					$query = mysql_query($query) or die('error'.mysql_error());
					$query = mysql_fetch_array($query);
					if($id == $query['hash']){
						echo 'Добредојде <span style="font-weight:bold;" id="userDrop">'.$user.' <span id="triagolnik">▼</span></span> 
						<a href="logout.php" id="najava" style="margin-left:30px;">Одјави се</a> <a href="insertQuestion.php"><div class="dropArea"> Напиши прашање! </div></a>';
						mysql_close();
					} else {
						header("Location:logout.php");
					}
                } else {
                    echo '<a href="#" id="najava" noanim="true">Најава</a> / <a href="#" id="registracija" noanim="true">Регистрација</a>';
                }
            ?>
            </div>
        </div>
        <br />
        
        <div class="categories">
        <?php
			if(isset($_COOKIE['userName'])){
				echo '
				<a href="question.php?question=0" class="category">Рандом</a>
				<a href="question.php?question=1" class="category">Спорт</a>
				<a href="question.php?question=2" class="category">Филм</a>
				<a href="question.php?question=3" class="category">Музика</a>
				<a href="question.php?question=4" class="category">Информатика</a>
				<a href="question.php?question=5" class="category">Историја</a>
				<a href="question.php?question=6" class="category">Литература</a>
				';
			} else {
				echo '
				<a href="login.php" class="category">Најава</a>
				<a href="register.php" class="category">Регистрирај се</a>
				';
			}
        ?>
		</div>
	</div> 
    <div class="popupBackground">
    </div>
    <div class="popupWindow" id="windowNajava">
    <div class="popupTitle"> Најава</div>
		<form method="post" action="login.php">
            <table>
                    <tr><td>Корисничко име:</td> <td><input type="text" name="user" id="logInput"/></td></tr>
                    <tr><td>Лозинка:</td> <td><input type="password" name="password" /></td></tr>
                    <tr><td></td><td align="right"><button type="submit">Внеси</button></td></tr>
            </table>
        </form> 
    </div>
    
    <div class="popupWindow" id="windowRegistracija">
    <div class="popupTitle"> Регистрација</div>
		<form method="post" action="register.php">
            <table>
                    <tr><td>Корисничко име:</td> <td><input type="text" name="user" id="regInput"/></td></tr>
                    <tr><td>Лозинка:</td> <td><input type="password" name="password" /></td></tr>
                    <tr><td>Повтори лозинка: </td> <td><input type="password" name="confirm" /></td></tr>
                    <tr><td>Е-пошта:</td> <td><input type="email" name="mail" /></td></tr><br/>
                    <tr><td></td><td align="right"><button type="submit">Внеси</button></td></tr>
            </table>
		</form> 
    </div>
			
<?php /* End of header file */ ?>

footer.php уреди

                      	<div class="bottomForm">
                                <div class="copyright">©Марко Прелевиќ и Мартин Петковски</div>
                        </div>
                                 
</body>
</html>

style уреди

main.css уреди

 /* global */
body {
	font-family:Tahoma, Geneva, sans-serif;
	color:#000;
	font-size:16px;
	background-image:url(images/questionmark.png);
	background-position:bottom left;
	background-repeat:no-repeat;
}

hr {
	border:none;
	border-bottom:solid thin #999;
	box-shadow:1px 1px 1px #CCC;
}

.whatdoesthisbuttondo {
	position:fixed;
	top:1px;
	left:170px;
	background-color:#F00;
	border-radius:10px;
	border-color:#F00;
	z-index:999;
	padding:8px;
}

.whatdoesthisbuttondo:active {
	background-color:#A00;
}

a:link, a:hover, a:visited {
	color:inherit;
	text-decoration:none;
}

button, input[type="button"]{
	border-radius:8px;
	border-top:none;
	border-bottom:outset 2px #009;
	border-left:none;
	border-right:outset 2px #009;
	background-color:#069;
	padding:10px;
	font-weight:bold;
	color:#FFF;
	min-width:100px;
	cursor:pointer;
}

select {
	width:100%;
	padding:10px;
	margin-bottom:20px;
}

button:active, input[type="button"]:active {
	border:inset;
	border-top:solid 2px #000;
	border-bottom:none;
	border-left:solid 2px #000;
	border-right:none;
	background-color:#059
}

/* header */
.container {
	margin:0 auto;
	width:1000px;
	padding-top:20px;
	margin-top:0px;
	box-shadow:0px 0px 10px 1px #CCC;
	min-height:400px;
	overflow:auto;
	background-color:#FFF;
	background-color:rgba(255,255,255,0.8);
}

.topForm {
	color:#FFF;
	margin:-30px auto auto -8px;
	padding:60px 8px 0px 8px;
	width:100%;
	background-image:url(images/blue-carpet.png);
	border-bottom:inset 2px #000;
}

.blue, .categories {
	margin:0 auto;
	width:1000px;
	padding:10px 0px 10px 0px;
	font-style:italic;
	font-size:32px;
}

.blue {
	font-family:Georgia, "Times New Roman", Times, serif;
	font-style:italic;
	font-size:32px;
	text-shadow:1px 1px 5px #000;
}

.categories {
	font-size:16px;
	font-style:normal;
	font-family:"Trebuchet MS", Arial, Helvetica, sans-serif;
}

.category {
	box-shadow:1px -1px 2px 0px #000;
	margin-left:10px;
	padding:10px;
	background-color:#3F6A9A;
	border-top-left-radius:6px;
	border-top-right-radius:6px;
}

.category:hover {
	background-color:#039;
}

.category:active {
	position:relative;
	box-shadow:none;
	padding-bottom:12px;
	bottom:2px;
	left:2px;
}

.login {
	position:fixed;
	left:0;
	top:0;
	width:100%;
	background-image:url(images/login-back.png);
	height:40px;
	box-shadow:0px 3px 10px #333;
}

.login-text {
	float:right;
	margin-top:10px;
	margin-right:40px;
}

#najava, #registracija {
	padding:6px;
}

.login-text #najava:hover, .login-text #registracija:hover{
	background-color:#06C;
	border-radius:4px;
}

/* random */
.containerLeft, .containerRight {
/*	background-image:url(images/area-back.png); */
	background-color:rgba(150,150,150,0.08);
	background-repeat:repeat-x;
	width:430px;
	padding:20px;
	margin:0px 20px 20px 10px;
	box-shadow:inset 1px 1px 4px #666;
	min-height:300px;
	border-radius:16px;
	border-top-right-radius:0px;
	border-bottom-right-radius:0px;
	overflow:scroll;
	overflow-y:auto;
	overflow-x:hidden;
	max-height:400px; 
}

.containerLeft {
	float:left;
}

.containerRight {
	float:right;
}

.containerRight td {
	padding:10px;
	padding-right:60px;
	border-bottom:thin solid #CCC;
	border-radius:5px;
	text-align:center;
}

.containerRight tr {
	background-color:#069;
	color:#FFF;
}

#place1 {
	background-color:#FFD700;
	color:#000;
}

#place2 {
	background-color:#848482;
}

#place3 {
	background-color: #8C7853;
}

#f, #p, #z {
	padding:8px;
}

#s {
	padding-right:110px;
	text-align:left;
}

.registracija td, .registracija tr, .registracija input {
	font-family:"Trebuchet MS", Arial, Helvetica, sans-serif;
	font-size:18px;
}

.registracija input {
	padding:3px;
}

#landr {
	padding:20px;
}

#iq form {
	margin-top:20px;
	font-family:"Trebuchet MS", Arial, Helvetica, sans-serif;
	font-size:16px;
	padding:20px;
}

#oblast {
	padding:2px;
	width:auto;
}

#ansT, #ansF {
	font-weight:bold;
}

#ansT {
	background-color:green;
	color:#FFF;
}

#ansF {
	background-color:darkred;
	color:#FFF;
}

#cQuest {
	padding:20px;
}

#userDrop:hover {
	cursor:pointer;
}

#userAns {
	margin:23px 0px 10px 15px;
	box-shadow:1px 1px 5px #666;
	padding:10px;
	background-color:#069;
	color:#FFF;
	border-radius:10px;
}

#userAns img {
	width:16px;
	height:16px;
	margin-right:10px;
}

.dropArea {
	position:fixed;
	min-width:100px;
	right:150px;
	top:40px;
	border-bottom-left-radius:5px;
	border-bottom-right-radius:5px;
	background-color:#000;
	padding:10px;
	box-shadow:1px 1px 8px #000;
	display:none;
}

.question {
	color:#069;
	font-weight:bold;
	font-size:42px;
	text-shadow:2px 2px 2px #CCC;
	margin-bottom:60px;
}

.questionArea {
	margin-top:0px;
	margin-bottom:30px;
	font-family:Georgia;
	font-style:italic;
}

.questionAreaCategory {
	color:#F00;
}

.questionTransitionArea {
	display:none;
}

.go {
	margin-top:30px;
	border:solid 4px darkgreen;
	background-color:green;
	color:white;
	padding:10px;
}

.nogo {
	margin-top:30px;
	border:solid 4px darkred;
	background-color:red;
	color:white;
	padding:10px;
}

#ansDate {
	font-size:small;
	text-align:right;
}

/* popups */

.popupBackground, .popupWindow {
	display:none;
	position:fixed;
}

.popupBackground {
	width:100%;
	height:100%;
	background-image:url(images/window-back.png);
	background-repeat:repeat;
	top:0px;
	left:0px;
}

.popupWindow {
	background-color:#FFF;
	padding:30px;
	border:1px solid #000;
	width:400px;
	box-shadow:1px 1px 10px #000;
}

.popupTitle {
	position:relative;
	background-color:#069;
	background-image:url(images/window-title-back.png);
	top:-30px;
	left:-30px;
	width:440px;
	padding:10px;
	font-weight:bold;
	color:#FFF;
}

/* footer */

.bottomForm {
	margin:0 auto;
	width:1000px;
}

.footerCategories {
	float:left;
}

.copyright {
	float:right;
}

functions уреди

scaler.php уреди

<?php
	require("functions/mysql_connect.php");
	$query = "SELECT ID,userName,poeni FROM korisnici ORDER BY poeni DESC";
	$query = mysql_query($query) or die("грешка со базата");
	$num1 = mysql_num_rows($query);
	echo '<table>';
	echo '<tr><td id="f">Место</td><td id="s">Учесник</td><td id="p">Поени</td><td id="z">Прашања</td></tr>';
	for($i = 1; $i <= $num1; $i++){
		$res = mysql_fetch_array($query);
		$id = $res['ID'];
		$query_t = "SELECT entryID FROM statistika WHERE userID='$id'";
		$query_t = mysql_query($query_t) or die(mysql_error());
		$num = mysql_num_rows($query_t);
		echo '<tr id="place'.$i.'"><td id="f">'.$i.' </td><td id="s">'.$res['userName'].'</td><td id="p">'.$res['poeni'].'</td><td id="z">'.$num.'</td></tr>';
	}
	echo '</table>';
	mysql_close();
?>

refresher.php уреди

<?php
	require("functions/mysql_connect.php");
	$query = "SELECT userID,tocnost,time,dateAnswered FROM statistika ORDER BY dateAnswered DESC LIMIT 10";
	$query = mysql_query($query) or die("грешка со базата");
	while($res = mysql_fetch_array($query)){
		$uid = $res['userID'];
		$query_2 = "SELECT userName FROM korisnici WHERE ID='$uid' LIMIT 1";
		$query_2 = mysql_query($query_2) or die("грешка пак".mysql_error());
		$res2 = mysql_fetch_array($query_2);
		if($res['tocnost'] == 1){
			echo '<div id="userAns"><img src="style/images/correct.png" />Играчот <span style="font-weight:bold;">'.$res2['userName'].'</span> одговорил точно.<br/>';
		} else if ($res['tocnost'] == 0) {
			echo '<div id="userAns"><img src="style/images/wrong.png" />Играчот <span style="font-weight:bold;">'.$res2['userName'].'</span> одговорил погрешно.<br/>';
		}
		$time = $res['dateAnswered'];
		echo '<div id="ansDate">'.$time.'</div>';
		echo '</div>';
	}
	mysql_close();
?>

mysql_connect.php уреди

<?php /* connect to mysql */
                //mysql_connect("192.168.1.18","root","") or die("no mysql");
        mysql_connect("localhost","root","") or die("no mysql");
        $db = mysql_select_db("kvis") or die("no database");
?>

randomizer.php уреди

<?php
/*
	 * randomize - funkcija za generiranje na random prasanja
	 * argumenti:
	 *	$oblast - oblast od koja da se vadi prasanjeto (sport,muzika,film,kompjuteri...)
	 */
	function randomize($oblast){
		$pack = array();
		require("mysql_connect.php");
		$uid = strip_tags(mysql_real_escape_string($_COOKIE['user']));
		$user = strip_tags(mysql_real_escape_string($_COOKIE['userName']));
		$query_u = 'SELECT * FROM korisnici WHERE ID='.$uid.' AND userName="'.$user.'" LIMIT 1';
		$query_u = mysql_query($query_u);
		$num = mysql_num_rows($query_u);
		if ($num == 1) {
			$query_stat = 'SELECT questionID,tocnost FROM statistika WHERE userID="'.$uid.'"';
			$query_stat = mysql_query($query_stat);
			$string = '';
			while($get = mysql_fetch_array($query_stat)){
				if($get['tocnost'] == 1){
					$string .= ' AND ID<>'.$get['questionID'];
				}
			}
			$query_q = 'SELECT * FROM prasanja WHERE userRef<>'.$uid.' AND kategorija=1 AND oblast='.$oblast.$string.' ORDER BY RAND() LIMIT 1';
			$check_q = mysql_query($query_q) or die("1. query error <br/>".mysql_error());
			$num = mysql_num_rows($check_q);
			if($num == 0){
				return -1;
			} else {
				$check_q = mysql_fetch_array($check_q);
				$pack['id'] = $check_q['ID'];
				$pack['prasanje'] = $check_q['prasanje'];
				$pack['oblast'] = $check_q['oblast'];
				$query_a = 'SELECT * FROM odgovori WHERE referenca='.$check_q['ID'].' ORDER BY RAND()';
				$check_a = mysql_query($query_a) or die("2. query error <br/>".mysql_error());
				$i = 1;
				while($check = mysql_fetch_array($check_a)){
					$pack['odgovor'.$i] = $check['odgovor'];
					$i++;
				}
			}
		} else {
			return "најави се за да продолжиш";
		}
		mysql_close();
		return $pack;
	}// end of randomizer()
?>

execute.php уреди

<?php
	/* 
	 * execute() e funkcija za zapisuvanje na prasanja vo bazata
	 * prima parametri:
	 * $kat - kategorija na prasanjata (1-3)
	 * $user - id na korisnikot
	 * $points - poeni za prasanjeto
	 * $oblast - oblast na prasanjeto "film,muzika,kompjuteri..."
	 * $answerTrue - niza od tochni odgovori
	 * $answerFalse (opcionalno) - niza od greshni odgovori
	 */
	function execute($kat,$user,$points,$oblast,$question,$answerTrue,$answerFalse = NULL){
		$errors = array();
		$query_question = 'INSERT INTO prasanja(prasanje,poeni,kategorija,oblast,userRef) VALUES(
			"'.$question.'",'.$points.',"'.$kat.'","'.$oblast.'","'.$user.'"
			);';
		require("/functions/mysql_connect.php");
		mysql_query($query_question) or $errors[] = "1. can't execute query <br/>".mysql_error();
		$query_select = 'SELECT ID FROM prasanja WHERE userRef = "'.$user.'" ORDER BY dateCreated DESC LIMIT 1';
		$check = mysql_query($query_select) or $errors[] = "2. can't execute query <br/>".mysql_error();;
		$num = mysql_num_rows($check);
		if($num == 0){
			$errors[] = "3. no rows affected <br/>";
		} else {
			$fetch = mysql_fetch_array($check);
			$id = $fetch['ID'];
		}
		if (empty($errors)){
			foreach($answerTrue as &$i){
				$query = 'INSERT INTO odgovori(odgovor,vistinitost,referenca) VALUES(
									"'.$i.'",1,'.$id.');';
				mysql_query($query) or $errors[] = "can't execute question query <br/>";
				if(empty($errors)){
					continue;
				} else {
					break;
				}
			}
		} else {
			foreach($errors as &$i){
				echo $i."<br/";
			}
		}
		if (empty($errors)){
			if(isset($answerFalse)){
				foreach($answerFalse as &$i){
					$query = 'INSERT INTO odgovori(odgovor,vistinitost,referenca) VALUES(
									"'.$i.'",0,'.$id.');';
					mysql_query($query) or $errors[] = "can't execute question query <br/>";
					if(empty($errors)){
						continue;
					} else {
						break;
					}
				}	
			}
		} else {
			foreach($errors as &$i){
				echo $i."<br/";
			}
		}
		foreach($errors as &$i){
			echo $i."<br/";
		} 
		mysql_close();
	}//end of functon
?>

lib.php уреди

<?php
	/*
	 * randomize - funkcija za generiranje na random prasanja
	 * argumenti:
	 *	$oblast - oblast od koja da se vadi prasanjeto (sport,muzika,film,kompjuteri...)
	 */
	function randomize($oblast){
		$pack = array();
		require("mysql_connect.php");
		$uid = strip_tags(mysql_real_escape_string($_COOKIE['user']));
		$user = strip_tags(mysql_real_escape_string($_COOKIE['userName']));
		$query_u = 'SELECT * FROM korisnici WHERE ID='.$uid.' AND userName="'.$user.'" LIMIT 1';
		$query_u = mysql_query($query_u);
		$num = mysql_num_rows($query_u);
		if ($num == 1) {
			$query_stat = 'SELECT questionID,tocnost FROM statistika WHERE userID='.$uid;
			$query_stat = mysql_query($query_stat) or die(mysql_error());
			$string = '';
			while($get = mysql_fetch_array($query_stat)){
				if($get['tocnost'] == 1){
					$string .= ' AND ID<>'.$get['questionID'];
				}
			}
			$query_q = 'SELECT * FROM prasanja WHERE userRef<>'.$uid.' AND kategorija=1 AND oblast='.$oblast.$string.' ORDER BY RAND() LIMIT 1';
			$check_q = mysql_query($query_q) or die("1. query error <br/>".mysql_error());
			$num = mysql_num_rows($check_q);
			if($num == 0){
				return -1;
			} else {
				$check_q = mysql_fetch_array($check_q);
				$pack['id'] = $check_q['ID'];
				$pack['prasanje'] = $check_q['prasanje'];
				$pack['oblast'] = $check_q['oblast'];
				$query_a = 'SELECT * FROM odgovori WHERE referenca='.$check_q['ID'].' ORDER BY RAND()';
				$check_a = mysql_query($query_a) or die("2. query error <br/>".mysql_error());
				$i = 1;
				while($check = mysql_fetch_array($check_a)){
					$pack['odgovor'.$i] = $check['odgovor'];
					$i++;
				}
			}
		} else {
			return "најави се за да продолжиш";
		}
		mysql_close();
		return $pack;
	}// end of randomizer()
	
	/* 
	 * execute() e funkcija za zapisuvanje na prasanja vo bazata
	 * prima parametri:
	 * $kat - kategorija na prasanjata (1-3)
	 * $user - id na korisnikot
	 * $points - poeni za prasanjeto
	 * $oblast - oblast na prasanjeto "film,muzika,kompjuteri..."
	 * $answerTrue - niza od tochni odgovori
	 * $answerFalse (opcionalno) - niza od greshni odgovori
	 */
	function execute($kat,$user,$points,$oblast,$question,$answerTrue,$answerFalse = NULL){
		$errors = array();
		$query_question = 'INSERT INTO prasanja(prasanje,poeni,kategorija,oblast,userRef) VALUES(
			"'.$question.'",'.$points.',"'.$kat.'","'.$oblast.'","'.$user.'"
			);';
		require("/functions/mysql_connect.php");
		mysql_query($query_question) or $errors[] = "1. can't execute query <br/>".mysql_error();
		$query_select = 'SELECT ID FROM prasanja WHERE userRef = "'.$user.'" ORDER BY dateCreated DESC LIMIT 1';
		$check = mysql_query($query_select) or $errors[] = "2. can't execute query <br/>".mysql_error();;
		$num = mysql_num_rows($check);
		if($num == 0){
			$errors[] = "3. no rows affected <br/>";
		} else {
			$fetch = mysql_fetch_array($check);
			$id = $fetch['ID'];
		}
		if (empty($errors)){
			foreach($answerTrue as &$i){
				$query = 'INSERT INTO odgovori(odgovor,vistinitost,referenca) VALUES(
									"'.$i.'",1,'.$id.');';
				mysql_query($query) or $errors[] = "can't execute question query <br/>";
				if(empty($errors)){
					continue;
				} else {
					break;
				}
			}
		} else {
			foreach($errors as &$i){
				echo $i."<br/";
			}
		}
		if (empty($errors)){
			if(isset($answerFalse)){
				foreach($answerFalse as &$i){
					$query = 'INSERT INTO odgovori(odgovor,vistinitost,referenca) VALUES(
									"'.$i.'",0,'.$id.');';
					mysql_query($query) or $errors[] = "can't execute question query <br/>";
					if(empty($errors)){
						continue;
					} else {
						break;
					}
				}	
			}
		} else {
			foreach($errors as &$i){
				echo $i."<br/";
			}
		}
		foreach($errors as &$i){
			echo $i."<br/";
		} 
		mysql_close();
	}//end of execute()
?>

scripts уреди

refresh.js уреди

function _refresh(){
	var ajaxRequest;  // The variable that makes Ajax possible!
	ans = "yes=1"
	try{
		// Opera 8.0+, Firefox, Safari
		ajaxRequest = new XMLHttpRequest();
	} catch (e){
		// Internet Explorer Browsers
		try{
			ajaxRequest = new ActiveXObject("Msxml2.XMLHTTP");
		} catch (e) {
			try{
				ajaxRequest = new ActiveXObject("Microsoft.XMLHTTP");
			} catch (e){
				// Something went wrong
				alert("Your browser broke!");
				return false;
			}
		}
	}
	ajaxRequest.open("POST", "refresh.php", true);
	ajaxRequest.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
	ajaxRequest.setRequestHeader("Content-length", ans.length);
	ajaxRequest.setRequestHeader("Connection", "close");
	// Create a function that will receive data sent from the server
	ajaxRequest.onreadystatechange = function(){
		if(ajaxRequest.readyState == 4){
			var ajaxDisplay = document.getElementById('refresh');
			var x = ajaxDisplay.innerHTML;
			if (x != ajaxRequest.responseText){
				ajaxDisplay.innerHTML = ajaxRequest.responseText;
			}
		}
	}
	ajaxRequest.send(ans);
	setTimeout("_refresh()",500);
}


function _refreshScale(){
	var ajaxRequest;  // The variable that makes Ajax possible!
	ans = "yes=1"
	try{
		// Opera 8.0+, Firefox, Safari
		ajaxRequest = new XMLHttpRequest();
	} catch (e){
		// Internet Explorer Browsers
		try{
			ajaxRequest = new ActiveXObject("Msxml2.XMLHTTP");
		} catch (e) {
			try{
				ajaxRequest = new ActiveXObject("Microsoft.XMLHTTP");
			} catch (e){
				// Something went wrong
				alert("Your browser broke!");
				return false;
			}
		}
	}
	ajaxRequest.open("POST", "scale.php", true);
	ajaxRequest.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
	ajaxRequest.setRequestHeader("Content-length", ans.length);
	ajaxRequest.setRequestHeader("Connection", "close");
	// Create a function that will receive data sent from the server
	ajaxRequest.onreadystatechange = function(){
		if(ajaxRequest.readyState == 4){
			var ajaxDisplay = document.getElementById('scale');
			var x = ajaxDisplay.innerHTML;
			if (x != ajaxRequest.responseText){
				ajaxDisplay.innerHTML = ajaxRequest.responseText;
			}
		}
	}
	ajaxRequest.send(ans);
	setTimeout("_refreshScale()",500);
}

main.js уреди

$(document).ready(function(){
	/* page transition begin */
	$('.container').css('display', 'none');
	$('.container').show('blind',200);
					
	/* windows */
	$('#najava').click(function(){
		$('.popupBackground').fadeToggle(200);
		$('#windowNajava').fadeToggle(200);
		
		$('.popupWindow').css('left',$(window).width()/2 - 200 +'px');
		$('.popupWindow').css('top',$(window).height()/2 - 200 +'px');
		$('#logInput').focus();
	});
	
	$('#registracija').click(function(){
		$('.popupBackground').fadeToggle(200);
		$('#windowRegistracija').fadeToggle(200);
		
		$('.popupWindow').css('left',$(window).width()/2 - 200 +'px');
		$('.popupWindow').css('top',$(window).height()/2 - 200 +'px');
		$('#regInput').focus();
	});
	
	$('.popupBackground').click(function(){
		$('.popupBackground').fadeOut(200);
		$('.popupWindow').fadeOut(200);
	});
	
	$('#userDrop').mouseover(function(){
		$('.dropArea').slideDown(300);
		document.getElementById("triagolnik").innerHTML = '^';
	});
	
	$('.dropArea').mouseout(function(){
		$('.dropArea').slideUp(300);
		document.getElementById("triagolnik").innerHTML = 'Ў';
	});
	
	$('body').click(function(){
		$('.dropArea').slideUp(300);
		document.getElementById("triagolnik").innerHTML = 'Ў';
	});
	
	$('.questionTransitionArea').ready(function(){
		$('.questionTransitionArea').show('slide',600);
	});
	
	$('.odgovor').click(function(){
		$('#o1').attr('disabled','disabled');
		$('#o2').attr('disabled','disabled');
		$('#o3').attr('disabled','disabled');
		$('#o4').attr('disabled','disabled');
	});
	
	$("#selectable").click(function(){
	if($("#selectable").val() == 1)
	{
		$("#kat1").slideDown(300);
		$("#kat2").slideUp(300);
		$("#kat3").slideUp(300);
	}
	else if($("#selectable").val() == 2)
	{
		$("#kat2").slideDown(300);
		$("#kat1").slideUp(300);
		$("#kat3").slideUp(300);
	}
	else if($("#selectable").val() == 3)
	{
		$("#kat3").slideDown(300);
		$("#kat2").slideUp(300);
		$("#kat1").slideUp(300);
	}
	else
	{
		$("#kat1").slideUp(300);
		$("#kat2").slideUp(300);
		$("#kat3").slideUp(300);
	}
});
	
});


//Browser Support Code
function send(ans){
	ans = "answer="+ans;
	var ajaxRequest;  // The variable that makes Ajax possible!
	
	try{
		// Opera 8.0+, Firefox, Safari
		ajaxRequest = new XMLHttpRequest();
	} catch (e){
		// Internet Explorer Browsers
		try{
			ajaxRequest = new ActiveXObject("Msxml2.XMLHTTP");
		} catch (e) {
			try{
				ajaxRequest = new ActiveXObject("Microsoft.XMLHTTP");
			} catch (e){
				// Something went wrong
				alert("Your browser broke!");
				return false;
			}
		}
	}
	ajaxRequest.open("POST", "enter.php", true);
	ajaxRequest.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
	ajaxRequest.setRequestHeader("Content-length", ans.length);
	ajaxRequest.setRequestHeader("Connection", "close");
	// Create a function that will receive data sent from the server
	ajaxRequest.onreadystatechange = function(){
		if(ajaxRequest.readyState == 4){
			var ajaxDisplay = document.getElementById('ans');
			ajaxDisplay.innerHTML = ajaxRequest.responseText;
		}
	}
	ajaxRequest.send(ans);   
}

timeout.js уреди

var c = 0;
var t;
var timer_is_on = 0;
function timedCount(){
	refresh();
	t = setTimeout("timedOut()",100);
}
function doTimer(){
	if(!timer_is_on){
		timer_is_on = 1;
		timedCount();
	}
}

send.js уреди


function send(ans,qid){
	ans = "answer="+ans+"&&qid="+qid;
	var ajaxRequest;  // The variable that makes Ajax possible!
	
	try{
		// Opera 8.0+, Firefox, Safari
		ajaxRequest = new XMLHttpRequest();
	} catch (e){
		// Internet Explorer Browsers
		try{
			ajaxRequest = new ActiveXObject("Msxml2.XMLHTTP");
		} catch (e) {
			try{
				ajaxRequest = new ActiveXObject("Microsoft.XMLHTTP");
			} catch (e){
				// Something went wrong
				alert("Your browser broke!");
				return false;
			}
		}
	}
	ajaxRequest.open("POST", "enter.php", true);
	ajaxRequest.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
	ajaxRequest.setRequestHeader("Content-length", ans.length);
	ajaxRequest.setRequestHeader("Connection", "close");
	// Create a function that will receive data sent from the server
	ajaxRequest.onreadystatechange = function(){
		if(ajaxRequest.readyState == 4){
			var ajaxDisplay = document.getElementById('ans');
			ajaxDisplay.innerHTML = ajaxRequest.responseText;
		}
	}
	ajaxRequest.send(ans);   
}

jquery.js уреди

Сметам дека нема потреба

SQL уреди

За малце ќе го забораев ова

-- phpMyAdmin SQL Dump
-- version 3.4.9
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Aug 27, 2012 at 02:05 PM
-- Server version: 5.5.20
-- PHP Version: 5.3.9

SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";


/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;

--
-- Database: `kvis`
--

-- --------------------------------------------------------

--
-- Table structure for table `korisnici`
--

CREATE TABLE IF NOT EXISTS `korisnici` (
  `ID` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `userName` varchar(40) NOT NULL,
  `password` varchar(256) NOT NULL,
  `mail` varchar(60) NOT NULL,
  `permisii` tinyint(4) NOT NULL DEFAULT '1',
  `poeni` int(10) unsigned NOT NULL DEFAULT '100',
  `ipAdress` varchar(60) NOT NULL,
  `dateCreated` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`ID`),
  UNIQUE KEY `userName` (`userName`,`mail`),
  KEY `password` (`password`(255),`ipAdress`)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 AUTO_INCREMENT=11 ;

--
-- Dumping data for table `korisnici`
--

INSERT INTO `korisnici` (`ID`, `userName`, `password`, `mail`, `permisii`, `poeni`, `ipAdress`, `dateCreated`) VALUES
(1, 'Mihajlo', 'ef64fc6bd01381cb20de570079a7bd19ced33402', 'asda@asda.com', 1, 100, '192.168.1.19', '2012-08-27 10:49:00'),
(2, 'ljupcho', 'f926188174b6a3ef15b6a81b40304b46ced761d7', 'kkkkkk@kkkk.com', 1, 100, '192.168.1.11', '2012-08-27 10:49:59'),
(3, 'СимонаТалеска', '621ef9a559a3055956312a673048d837826b6c56', 'simona_taleska@live.com', 1, 165, '192.168.1.13', '2012-08-27 10:50:23'),
(4, 'BlackAntoanette', 'f7c6396f19eed1c1095da776d0748b68bd2d189f', 'black.antoanette@gmail.com', 1, 110, '192.168.1.20', '2012-08-27 10:51:03'),
(5, 'Marko', 'a95413d225237417f132200c9772bd22583ab838', 'mas@masd.com', 1, 145, '127.0.0.1', '2012-08-27 10:54:35'),
(6, 'Igor43', '78b6854e22ab09d4ae3dac29b92052963103b33e', 'igor43pp@hotmail.com', 1, 160, '192.168.1.13', '2012-08-27 11:01:35'),
(7, 'Мартин', 'fc5c8887a490042444586ff8530603cfd37bef46', 'martinpetkovski@email.com', 1, 1301356, '192.168.1.14', '2012-08-27 11:01:59'),
(8, 'filip', '401a6b93ed68f078728b1fae318afb6a10f142d9', 'filip@ekv.com', 1, 160, '192.168.1.24', '2012-08-27 11:11:50'),
(9, 'David Dlaka', '08ab1d252e9a3452176ae6133f75e2051b9e962b', 'dafit4e_srcu6ka@madafaka.com', 1, 110, '192.168.1.25', '2012-08-27 11:16:10'),
(10, 'despina', 'fbeb19cfb42d28c004f192a4b5b65f4f506ec7f6', 'nema', 1, 120, '192.168.1.25', '2012-08-27 11:22:44');

-- --------------------------------------------------------

--
-- Table structure for table `odgovori`
--

CREATE TABLE IF NOT EXISTS `odgovori` (
  `ID` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `odgovor` text NOT NULL,
  `vistinitost` tinyint(1) DEFAULT NULL,
  `referenca` int(11) unsigned NOT NULL,
  PRIMARY KEY (`ID`),
  KEY `referenca` (`referenca`)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 AUTO_INCREMENT=81 ;

--
-- Dumping data for table `odgovori`
--

INSERT INTO `odgovori` (`ID`, `odgovor`, `vistinitost`, `referenca`) VALUES
(1, '1976', 1, 1),
(2, '2000', 0, 1),
(3, '1989', 0, 1),
(4, '1972', 0, 1),
(5, '1990', 1, 2),
(6, '1985', 0, 2),
(7, '2000', 0, 2),
(8, '1995', 0, 2),
(9, 'Per Yngve Ohlin', 1, 3),
(10, 'Stian Aarseth', 0, 3),
(11, 'Bruce Dickinson', 0, 3),
(12, 'Axl Rose', 0, 3),
(21, 'Карлос Руиз Зафон', 1, 6),
(22, 'Сидни Шелдон', 0, 6),
(23, 'Џерон Селинџер', 0, 6),
(24, 'Роберт Ладлам', 0, 6),
(25, 'Один', 1, 8),
(26, 'Зевс', 0, 8),
(27, 'Амон Ра', 0, 8),
(28, 'Вајверн', 0, 8),
(33, 'Сочи', 1, 11),
(34, 'Лилехамер', 0, 11),
(35, 'Ванкувер', 0, 11),
(36, 'Осло', 0, 11),
(37, 'Арсенал', 1, 12),
(38, 'Порто', 0, 12),
(39, '', 0, 12),
(40, '', 0, 12),
(41, '13 Декември 2001', 1, 14),
(42, '13 Декември 2010', 0, 14),
(43, '13 Декември 1999', 0, 14),
(44, '12 Ноември 1994', 0, 14),
(45, 'Оревоечка', 1, 16),
(46, 'Црна Река', 0, 16),
(47, 'Брегалница', 0, 16),
(48, 'Давид Длака', 0, 16),
(49, 'Роберт Ладлам', 1, 17),
(50, 'Џ.Гришам', 0, 17),
(51, 'Anny Arsethuon', 0, 17),
(52, 'Филип Илиески', 0, 17),
(53, 'Арсенал', 1, 18),
(54, 'Порто', 0, 18),
(55, 'Црвена Ѕвезда', 0, 18),
(56, 'Барселона', 0, 18),
(57, 'Леонардо ДиКаприо', 1, 19),
(58, 'Јане Џумеркоски', 0, 19),
(59, 'Даниел Ретклиф', 0, 19),
(60, 'Деспина Стефаноска', 0, 19),
(61, 'Хари Потер', 1, 20),
(62, 'Фродо', 0, 20),
(63, 'Бетмен', 0, 20),
(64, 'Лепа Брена', 0, 20),
(65, 'Линус Торвалдс', 1, 21),
(66, 'Симона Талеска', 0, 21),
(67, 'Бил Гејтс', 0, 21),
(68, 'Ивона Николоска', 0, 21),
(69, 'Да', 1, 22),
(70, 'Делумно', 0, 22),
(71, 'Не', 0, 22),
(72, 'Давид Длака', 0, 22),
(73, 'Антина е најјака!!!', 1, 23),
(74, 'Не', 0, 23),
(75, 'Можеби', 0, 23),
(76, 'Да', 0, 23),
(77, 'Деоксирибонуклеинска Киселина', 1, 24),
(78, 'Оцетна Киселина', 0, 24),
(79, 'Хлороводородна Киселина', 0, 24),
(80, 'Рибонуклеинска Киселина', 0, 24);

-- --------------------------------------------------------

--
-- Table structure for table `prasanja`
--

CREATE TABLE IF NOT EXISTS `prasanja` (
  `ID` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `prasanje` text NOT NULL,
  `poeni` tinyint(20) NOT NULL DEFAULT '5',
  `kategorija` tinyint(10) NOT NULL DEFAULT '5',
  `oblast` int(11) NOT NULL,
  `userRef` int(11) NOT NULL,
  `dateCreated` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`dateCreated`),
  KEY `ID` (`ID`)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 AUTO_INCREMENT=25 ;

--
-- Dumping data for table `prasanja`
--

INSERT INTO `prasanja` (`ID`, `prasanje`, `poeni`, `kategorija`, `oblast`, `userRef`, `dateCreated`) VALUES
(1, 'Кога е произведен Аpple I ?', 5, 1, 4, 1, '2012-08-27 10:50:47'),
(2, 'Кога е осована Микросам АД. ?', 5, 1, 5, 1, '2012-08-27 10:51:54'),
(3, 'Како е правилното име на Dead(Mayhem)?', 5, 1, 3, 4, '2012-08-27 10:54:46'),
(6, 'Авторот на „Сенка на Ветрот“ е', 5, 1, 6, 4, '2012-08-27 11:04:00'),
(8, 'Кој е врховен бог во германската митологија?', 5, 1, 0, 4, '2012-08-27 11:06:16'),
(14, 'Chuck - вокалот на Death почина на', 5, 1, 3, 4, '2012-08-27 11:11:27'),
(16, 'Која река тече низ Прилеп?', 5, 1, 0, 3, '2012-08-27 11:14:23'),
(17, 'Авторот на „Сигма Протокол“ е', 5, 1, 6, 4, '2012-08-27 11:14:45'),
(19, 'Главната улога во "Inception" ја има', 5, 1, 2, 4, '2012-08-27 11:20:05'),
(20, 'Давид Длака личи на', 5, 1, 0, 9, '2012-08-27 11:20:13'),
(21, 'Кој е основачот на Линукс?', 5, 1, 0, 4, '2012-08-27 11:23:15'),
(22, 'Дали гледаме во 3Д со едно око?!', 5, 1, 0, 3, '2012-08-27 11:24:31'),
(23, 'Дали Давид Длака е посилен од Чак Норис?!', 5, 1, 0, 3, '2012-08-27 11:25:53'),
(24, 'ДНА?', 5, 1, 5, 4, '2012-08-27 11:27:01');

-- --------------------------------------------------------

--
-- Table structure for table `sesii`
--

CREATE TABLE IF NOT EXISTS `sesii` (
  `ID` int(11) NOT NULL AUTO_INCREMENT,
  `userID` int(11) NOT NULL,
  `userName` varchar(40) NOT NULL,
  `hash` varchar(128) NOT NULL,
  `answered` int(11) NOT NULL DEFAULT '0',
  `date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`ID`),
  UNIQUE KEY `hash` (`hash`)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 AUTO_INCREMENT=50 ;

--
-- Dumping data for table `sesii`
--

INSERT INTO `sesii` (`ID`, `userID`, `userName`, `hash`, `answered`, `date`) VALUES
(1, 1, 'Marko', '1c190c9813fbe8bcab6843861dae0ee5', 0, '2012-08-23 17:18:53'),
(2, 1, 'Marko', '03acad1b9bc9062031592a98258e5aad', 0, '2012-08-24 11:14:48'),
(3, 1, 'Marko', 'fcdb4147cd4b92c20af6e749562f41bd', 0, '2012-08-24 11:25:29'),
(4, 1, 'Marko', '9c8551f9bbf52d65827cc770e4f73f75', 0, '2012-08-24 11:31:02'),
(5, 1, 'Marko', '2ce4d36c03c6444fbc45834fcd0bff07', 0, '2012-08-24 11:31:15'),
(6, 1, 'Marko', '97016be72b6208bf508864e7d1e27e9d', 0, '2012-08-24 11:31:29'),
(7, 1, 'Marko', 'c9790b3e14a55fa2ab6ea6828fa292d1', 13, '2012-08-24 12:05:57'),
(8, 3, 'JosipBroz', '0f98d9a136faaa51263ef2d271d3175a', 1, '2012-08-24 11:39:36'),
(9, 3, 'JosipBroz', 'd8f5d1e4726de3947eac0b51e2bfdc0a', 16, '2012-08-24 12:31:26'),
(10, 1, 'Marko', '8ee14b0336a31aba1b9fbed4aef8b021', 0, '2012-08-26 14:57:10'),
(11, 4, 'Jas', 'd89e96d713afbf67b405d5e9844f3e09', 26, '2012-08-26 15:38:44'),
(12, 5, 'Borg', '4cbb2c54faf5939f7ab761c0c3918d08', 9, '2012-08-26 15:07:55'),
(13, 5, 'Borg', '62d0681db8d7804b1ec31160834e8d60', 6, '2012-08-26 15:15:17'),
(14, 5, 'Borg', 'c5bee881cc09161854e9b80f82821a24', 14, '2012-08-26 16:04:05'),
(15, 5, 'Borg', '296e7c2fcfa432efa381068e0bc23732', 7, '2012-08-26 16:54:38'),
(16, 1, 'Marko', 'c5bb36a766fd5ceef148aa553b4cc8d8', 5, '2012-08-26 16:50:23'),
(17, 5, 'Borg', 'c4f938bf60829a4aba0739536def7e74', 28, '2012-08-26 18:03:01'),
(18, 1, 'Marko', 'ccc651df1bc3ad999d86f413465bcdc7', 0, '2012-08-26 17:24:56'),
(19, 5, 'Borg', '5d90562300956343ad59813146befc29', 0, '2012-08-26 18:18:40'),
(20, 5, 'Borg', '498590eb386ba01903e9fd14157912a9', 1, '2012-08-26 18:21:40'),
(21, 5, 'Borg', 'eab666e99580b18b960b05d96e6a3bb3', 6, '2012-08-26 19:24:10'),
(22, 1, 'Marko', 'ff330df8388ccee7b27d43c04a75ce69', 18, '2012-08-26 19:35:32'),
(23, 5, 'Borg', 'fc4f3a2c1ac66cf1202f0cb504a0b180', 3, '2012-08-26 19:53:16'),
(24, 1, 'Marko', '2503780b318ef0e9f10e93f4acfdd048', 1, '2012-08-26 20:07:31'),
(25, 4, 'Jas', '59e657954f2bedc7aaa23a33e6052948', 2, '2012-08-26 20:30:51'),
(26, 7, 'nomce', '714396f2c9cadfaf70531ff44d048f5f', 10, '2012-08-26 20:34:09'),
(27, 5, 'Borg', 'ab9207d9c4719b2c502aa80330a2dc72', 0, '2012-08-26 20:35:16'),
(28, 5, 'Borg', 'b0c30fd4224ab4051693c1be0f0dd80d', 0, '2012-08-26 20:54:04'),
(29, 1, 'Marko', '626e1ffebc4c8cb9c5286937a00e457c', 0, '2012-08-26 20:54:07'),
(30, 10, 'Jas', 'e6baac851e1dce49cc42c441dd8d0b7b', 6, '2012-08-26 20:57:49'),
(31, 5, 'Borg', '802f1eafca51dadb64c9b4f3ad9cfa9e', 0, '2012-08-27 10:39:35'),
(32, 1, 'Marko', '623ce8f0e60ed73f650af28aafd2fefa', 0, '2012-08-27 10:41:38'),
(33, 1, 'Marko', '516bfc6b395b565cc003e2cc131d011c', 0, '2012-08-27 10:43:00'),
(34, 13, 'Ova', 'c05157006abba2203dee5eb99078ea93', 2, '2012-08-27 10:44:08'),
(35, 14, 'Ice', 'fcc071a2a5a08859f4d34f60f4b430be', 0, '2012-08-27 10:47:08'),
(36, 1, 'Mihajlo', 'c6f27a5073ba073be7b7e985619bf2c9', 0, '2012-08-27 10:49:05'),
(37, 2, 'ljupcho', 'b15903e2d55d3319bf38b4d3938d90f6', 0, '2012-08-27 10:50:32'),
(38, 3, 'СимонаТалеска', '03cd547b471aae63bc7058937ef702bf', 0, '2012-08-27 10:50:49'),
(39, 4, 'BlackAntoanette', '4aa141c0419ed36b0474fbef2e565662', 3, '2012-08-27 10:58:20'),
(40, 5, 'Marko', 'f7c067f5642b0f6ba15a17839f8af260', 12, '2012-08-27 11:41:17'),
(41, 3, 'СимонаТалеска', '19134e1e385f400ea7af6ee32011ebf4', 33, '2012-08-27 11:23:28'),
(42, 4, 'BlackAntoanette', '09102bb987cc91d588261dbc02fc576e', 3, '2012-08-27 11:28:02'),
(43, 6, 'Igor43', '9d6dcf379eaf6d9f072b12f5940814af', 12, '2012-08-27 11:11:47'),
(44, 7, 'Мартин', '24623da3dfd261c575ed76fe26ca9c82', 13, '2012-08-27 11:11:45'),
(45, 8, 'filip', '137402ab25eb75fc1010df043576b9f6', 32, '2012-08-27 11:33:53'),
(46, 6, 'Igor43', 'a61c922137bbfc0149132c4dfbb5cdc2', 9, '2012-08-27 11:17:43'),
(47, 9, 'David Dlaka', '7d3213f5b6f70ec823cfa62b8287299c', 5, '2012-08-27 11:21:00'),
(48, 10, 'despina', 'a3986f6fb7f92bc074211edbf04b771a', 5, '2012-08-27 11:26:10'),
(49, 6, 'Igor43', 'a8fbe11242e84b09b1d48f5f337ae217', 5, '2012-08-27 11:33:46');

-- --------------------------------------------------------

--
-- Table structure for table `statistika`
--

CREATE TABLE IF NOT EXISTS `statistika` (
  `entryID` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `questionID` int(10) unsigned NOT NULL,
  `answerID` int(10) unsigned NOT NULL,
  `userID` int(10) unsigned NOT NULL,
  `tocnost` tinyint(1) NOT NULL,
  `time` int(11) NOT NULL,
  `dateAnswered` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`entryID`),
  KEY `questionID` (`questionID`,`answerID`,`userID`)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 AUTO_INCREMENT=113 ;

--
-- Dumping data for table `statistika`
--

INSERT INTO `statistika` (`entryID`, `questionID`, `answerID`, `userID`, `tocnost`, `time`, `dateAnswered`) VALUES
(1, 9, 32, 7, 0, 1346065774, '2012-08-27 11:09:34'),
(2, 8, 25, 7, 1, 1346065780, '2012-08-27 11:09:40'),
(3, 9, 32, 7, 0, 1346065786, '2012-08-27 11:09:46'),
(4, 2, 5, 7, 1, 1346065839, '2012-08-27 11:10:39'),
(5, 8, 26, 6, 0, 1346066353, '2012-08-27 11:11:20'),
(6, 8, 25, 6, 1, 1346066367, '2012-08-27 11:11:33'),
(7, 4, 15, 6, 0, 1346066373, '2012-08-27 11:11:39'),
(8, 9, 31, 7, 0, 1346065905, '2012-08-27 11:11:45'),
(9, 11, 36, 6, 0, 1346066381, '2012-08-27 11:11:47'),
(10, 5, 18, 8, 0, 1346066412, '2012-08-27 11:12:18'),
(11, 8, 25, 8, 1, 1346066417, '2012-08-27 11:12:24'),
(12, 9, 30, 8, 0, 1346066423, '2012-08-27 11:12:30'),
(13, 9, 30, 8, 0, 1346066433, '2012-08-27 11:12:40'),
(14, 9, 29, 8, 1, 1346066438, '2012-08-27 11:12:45'),
(15, 14, 41, 8, 1, 1346066445, '2012-08-27 11:12:52'),
(16, 3, 10, 8, 0, 1346066457, '2012-08-27 11:13:05'),
(17, 3, 9, 8, 1, 1346066462, '2012-08-27 11:13:10'),
(18, 1, 3, 8, 0, 1346066472, '2012-08-27 11:13:19'),
(19, 1, 4, 8, 0, 1346066476, '2012-08-27 11:13:24'),
(20, 2, 6, 8, 0, 1346066485, '2012-08-27 11:13:33'),
(21, 6, 21, 8, 1, 1346066492, '2012-08-27 11:13:40'),
(22, 11, 35, 8, 0, 1346066504, '2012-08-27 11:13:52'),
(23, 16, 48, 8, 0, 1346066565, '2012-08-27 11:14:55'),
(24, 2, 5, 3, 1, 1346066569, '2012-08-27 11:14:59'),
(25, 17, 51, 8, 0, 1346066584, '2012-08-27 11:15:15'),
(26, 8, 28, 3, 0, 1346066621, '2012-08-27 11:15:52'),
(27, 16, 46, 8, 0, 1346066623, '2012-08-27 11:15:54'),
(28, 16, 47, 8, 0, 1346066628, '2012-08-27 11:16:00'),
(29, 16, 46, 8, 0, 1346066634, '2012-08-27 11:16:05'),
(30, 16, 45, 8, 1, 1346066639, '2012-08-27 11:16:11'),
(31, 1, 1, 3, 1, 1346066661, '2012-08-27 11:16:34'),
(32, 11, 36, 6, 0, 1346066196, '2012-08-27 11:16:36'),
(33, 8, 25, 3, 1, 1346066666, '2012-08-27 11:16:39'),
(34, 16, 48, 6, 0, 1346066201, '2012-08-27 11:16:41'),
(35, 9, 31, 9, 0, 1346066670, '2012-08-27 11:16:43'),
(36, 9, 30, 3, 0, 1346066672, '2012-08-27 11:16:44'),
(37, 16, 45, 6, 1, 1346066206, '2012-08-27 11:16:46'),
(38, 11, 36, 6, 0, 1346066213, '2012-08-27 11:16:53'),
(39, 9, 30, 9, 0, 1346066684, '2012-08-27 11:16:56'),
(40, 9, 29, 3, 1, 1346066684, '2012-08-27 11:16:57'),
(41, 11, 36, 8, 0, 1346066688, '2012-08-27 11:17:00'),
(42, 16, 45, 9, 1, 1346066688, '2012-08-27 11:17:01'),
(43, 4, 15, 6, 0, 1346066222, '2012-08-27 11:17:02'),
(44, 8, 25, 9, 1, 1346066694, '2012-08-27 11:17:07'),
(45, 11, 33, 6, 1, 1346066244, '2012-08-27 11:17:24'),
(46, 12, 18, 3, 0, 1346066711, '2012-08-27 11:17:24'),
(47, 4, 14, 6, 0, 1346066249, '2012-08-27 11:17:29'),
(48, 4, 16, 6, 0, 1346066254, '2012-08-27 11:17:34'),
(49, 4, 13, 6, 1, 1346066263, '2012-08-27 11:17:43'),
(50, 12, 37, 3, 1, 1346066731, '2012-08-27 11:17:45'),
(51, 4, 13, 3, 1, 1346066744, '2012-08-27 11:17:57'),
(52, 3, 10, 3, 0, 1346066770, '2012-08-27 11:18:24'),
(53, 3, 12, 3, 0, 1346066784, '2012-08-27 11:18:39'),
(54, 3, 11, 3, 0, 1346066792, '2012-08-27 11:18:47'),
(55, 14, 44, 3, 0, 1346066800, '2012-08-27 11:18:55'),
(56, 3, 9, 3, 1, 1346066806, '2012-08-27 11:19:00'),
(57, 17, 50, 3, 0, 1346066828, '2012-08-27 11:19:23'),
(58, 17, 24, 3, 0, 1346066861, '2012-08-27 11:19:57'),
(59, 17, 50, 3, 0, 1346066867, '2012-08-27 11:20:03'),
(60, 6, 21, 3, 1, 1346066888, '2012-08-27 11:20:24'),
(61, 20, 62, 3, 0, 1346066901, '2012-08-27 11:20:37'),
(62, 20, 61, 3, 1, 1346066904, '2012-08-27 11:20:41'),
(63, 20, 61, 5, 1, 1346066442, '2012-08-27 11:20:42'),
(64, 17, 51, 3, 0, 1346066916, '2012-08-27 11:20:53'),
(65, 20, 61, 8, 1, 1346066920, '2012-08-27 11:20:56'),
(66, 17, 52, 3, 0, 1346066922, '2012-08-27 11:20:59'),
(67, 19, 60, 9, 0, 1346066924, '2012-08-27 11:21:00'),
(68, 17, 24, 3, 0, 1346066930, '2012-08-27 11:21:06'),
(69, 17, 50, 3, 0, 1346066935, '2012-08-27 11:21:11'),
(70, 19, 57, 8, 1, 1346066947, '2012-08-27 11:21:23'),
(71, 17, 24, 3, 0, 1346066947, '2012-08-27 11:21:24'),
(72, 16, 48, 4, 0, 1346066970, '2012-08-27 11:21:46'),
(73, 19, 57, 3, 1, 1346067000, '2012-08-27 11:22:16'),
(74, 14, 44, 3, 0, 1346067008, '2012-08-27 11:22:23'),
(75, 17, 50, 3, 0, 1346067028, '2012-08-27 11:22:44'),
(76, 8, 25, 10, 1, 1346067042, '2012-08-27 11:22:58'),
(77, 17, 51, 3, 0, 1346067042, '2012-08-27 11:22:58'),
(78, 20, 61, 10, 1, 1346067047, '2012-08-27 11:23:03'),
(79, 16, 45, 10, 1, 1346067050, '2012-08-27 11:23:07'),
(80, 17, 52, 3, 0, 1346067051, '2012-08-27 11:23:07'),
(81, 19, 57, 10, 1, 1346067057, '2012-08-27 11:23:13'),
(82, 21, 65, 3, 1, 1346067063, '2012-08-27 11:23:19'),
(83, 14, 41, 3, 1, 1346067072, '2012-08-27 11:23:28'),
(84, 23, 69, 8, 1, 1346067234, '2012-08-27 11:26:07'),
(85, 22, 48, 10, 0, 1346067237, '2012-08-27 11:26:10'),
(86, 22, 69, 8, 1, 1346067248, '2012-08-27 11:26:21'),
(87, 21, 65, 8, 1, 1346067255, '2012-08-27 11:26:28'),
(88, 17, 50, 8, 0, 1346067270, '2012-08-27 11:26:42'),
(89, 22, 71, 4, 0, 1346067325, '2012-08-27 11:27:38'),
(90, 23, 69, 4, 1, 1346067350, '2012-08-27 11:28:02'),
(91, 3, 12, 6, 0, 1346067419, '2012-08-27 11:29:12'),
(92, 19, 60, 5, 0, 1346067150, '2012-08-27 11:32:30'),
(93, 1, 1, 8, 1, 1346067655, '2012-08-27 11:33:08'),
(94, 17, 24, 8, 0, 1346067676, '2012-08-27 11:33:29'),
(95, 20, 61, 6, 1, 1346067679, '2012-08-27 11:33:31'),
(96, 23, 69, 6, 1, 1346067683, '2012-08-27 11:33:35'),
(97, 17, 50, 8, 0, 1346067685, '2012-08-27 11:33:38'),
(98, 21, 65, 6, 1, 1346067687, '2012-08-27 11:33:40'),
(99, 17, 24, 8, 0, 1346067691, '2012-08-27 11:33:44'),
(100, 22, 69, 6, 1, 1346067693, '2012-08-27 11:33:46'),
(101, 17, 52, 8, 0, 1346067696, '2012-08-27 11:33:49'),
(102, 17, 51, 8, 0, 1346067701, '2012-08-27 11:33:53'),
(103, 16, 45, 5, 1, 1346067605, '2012-08-27 11:40:06'),
(104, 21, 65, 5, 1, 1346067613, '2012-08-27 11:40:13'),
(105, 22, 71, 5, 0, 1346067619, '2012-08-27 11:40:19'),
(106, 23, 69, 5, 1, 1346067625, '2012-08-27 11:40:25'),
(107, 22, 69, 5, 1, 1346067629, '2012-08-27 11:40:30'),
(108, 8, 25, 5, 1, 1346067636, '2012-08-27 11:40:36'),
(109, 19, 57, 5, 1, 1346067646, '2012-08-27 11:40:46'),
(110, 1, 4, 5, 0, 1346067663, '2012-08-27 11:41:03'),
(111, 1, 1, 5, 1, 1346067668, '2012-08-27 11:41:08'),
(112, 24, 77, 5, 1, 1346067676, '2012-08-27 11:41:17');

/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;