-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
new icon delete_24x24px, polOdmiana returns only word, added in game …
…loging, changed #log_reg_head to #log_head and #reg_head changes how wynik is displayed, added for test question of the day(plain text), changes in wszechwiedzacy.js
- Loading branch information
Showing
14 changed files
with
599 additions
and
462 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,73 +1,74 @@ | ||
<?php | ||
require_once("../includes/initialize.php"); | ||
// zeroes stats | ||
$session->clear_stats(); | ||
// starting the game at difficulty round 1 | ||
$_SESSION['current_round'] = 1; | ||
?> | ||
<?php | ||
//$results = User::find_top_scores(); // selects the lowest score needed for getting into ranking (top 30 default) | ||
//$btm = end($results); // lowest score in the ranking table | ||
//echo $btm; | ||
//print_r($results); | ||
//echo $key = array_search($btm, $results); | ||
?> | ||
<?php require_once(LIB_PATH.DS."header.php"); ?> | ||
<div id="mainContent"> | ||
|
||
<div id="startWrap" class="oknoGry"> | ||
<h2 id="menu" class="resultsBlock roundCorners menu boxShadow">Menu:</h2> | ||
<button id="wprowadzenie" type="button" name="zasadyGry" class="ui-button ui-state-default, ui-widget-content ui-state-default ui-corner-all boxShadow menu">wprowadzenie</button> | ||
<button id="start" type="button" name="startGame" rel="zaczynamy" class="ui-button ui-state-default, ui-widget-content ui-state-default ui-corner-all boxShadow menu">rozpocznij grę</button> | ||
</div><!--end of #startWrap --> | ||
|
||
<div id="loaderContainer" style="display: none"> | ||
<div id="outer"> | ||
<div id="inner"> | ||
<p>Trwa ładowanie strony ...</p> | ||
<div class="ajaxLoader"></div> | ||
</div> | ||
</div> | ||
</div><!-- ajaxLoader in special container div to be shown when ajax loads pages with vertical hack see css --> | ||
|
||
<div id="tutorialWrap" class="oknoGry"> | ||
|
||
<div class="slideContainer"> | ||
|
||
<div class="pics"> | ||
<div class="item"> | ||
<h2>Wprowadzenie</h2> | ||
<h4 class="text">3 rundy</h4> | ||
<h4 class="text">pierwsza runda 5 łatwych pytań</h4> | ||
<h4 class="text">druga runda 10 trudniejszych pytań</h4> | ||
<h4 class="text">trzecia runda odpowiadasz do końca (Twojego lub pytań)</h4> | ||
<h4 class="text">ilość zdobywanych punktów zależna od czasu udzielenia odpowiedzi</h4> | ||
<h4 class="text">na odpowiedź masz 10 sekund</h4> | ||
<h3 class="center">dalej »</h3> </div> | ||
<div class="item"> | ||
<h4 class="text">rozpoczynasz grę z trzema szansami</h4> | ||
<h4 class="text">udzielenie złej odpowiedzi lub nie zaznaczenie odpowiedzi skutkuje utratą jednej szansy</h4> | ||
<h4 class="text">utrata trzeciej szansy kończy grę</h4> | ||
<h3 class="center">dalej »</h3> | ||
</div> | ||
<div class="item"> | ||
<h4 class="text">aby dostać się do tabeli wszechwiedzących, musisz zdobyć więcej punktów niż osoba zajmująca ostatnie miejsce</h4> | ||
<h4 class="text">jeśli nie jesteś zarejestrowany, możesz wpisać swój nick, jeśli masz już konto wynik zostanie zapisany automatycznie</h4> | ||
<h4 class="text">masz możliwość analizy błędnych odpowiedzi oraz oglądnięcia swoich statystyk</h4> | ||
<button id="tut_start" class="ui-button ui-state-default, ui-widget-content ui-state-default ui-corner-all boxShadow menu">wszystko wiem, grajmy!</button> | ||
</div> | ||
|
||
</div> | ||
|
||
</div> | ||
<div class="navi"></div> | ||
<button id="back" title="powrót do menu" type="button" name="back"></button> | ||
|
||
</div><!-- end of #tutorialWrap --> | ||
|
||
<div id="quit_dialog"> | ||
<p>Czy chcesz przerwać grę?</p> | ||
</div><!-- end of div quit --> | ||
|
||
</div><!-- end of mainContent--> | ||
<?php | ||
require_once("../includes/initialize.php"); | ||
// zeroes stats | ||
$session->clear_stats(); | ||
// starting the game at difficulty round 1 | ||
$_SESSION['current_round'] = 1; | ||
?> | ||
<?php | ||
//$results = User::find_top_scores(); // selects the lowest score needed for getting into ranking (top 30 default) | ||
//$btm = end($results); // lowest score in the ranking table | ||
//echo $btm; | ||
//print_r($results); | ||
//echo $key = array_search($btm, $results); | ||
?> | ||
<?php require_once(LIB_PATH.DS."header.php"); ?> | ||
<div id="mainContent"> | ||
|
||
<div id="startWrap" class="oknoGry"> | ||
<h2 id="menu" class="resultsBlock roundCorners menu boxShadow">Menu:</h2> | ||
<button id="show_tut" type="button" class="ui-button ui-state-default, ui-widget-content ui-state-default ui-corner-all boxShadow menu">wprowadzenie</button> | ||
<button id="start" type="button" name="startWrap" class="ui-button ui-state-default, ui-widget-content ui-state-default ui-corner-all boxShadow menu">rozpocznij grę</button> | ||
</div><!--end of #startWrap --> | ||
|
||
<div id="loaderContainer" style="display: none"> | ||
<div id="outer"> | ||
<div id="inner"> | ||
<p>Trwa ładowanie strony ...</p> | ||
<div class="ajaxLoader"></div> | ||
</div> | ||
</div> | ||
</div><!-- ajaxLoader in special container div to be shown when ajax loads pages with vertical hack see css --> | ||
|
||
<div id="tutorialWrap" class="oknoGry"> | ||
|
||
<div class="slideContainer"> | ||
|
||
<div class="pics"> | ||
<div class="item"> | ||
<h2>Wprowadzenie</h2> | ||
<h4 class="text">3 rundy</h4> | ||
<h4 class="text">pierwsza runda 5 łatwych pytań</h4> | ||
<h4 class="text">druga runda 10 trudniejszych pytań</h4> | ||
<h4 class="text">trzecia runda odpowiadasz do końca (Twojego lub pytań)</h4> | ||
<h4 class="text">ilość zdobywanych punktów zależna od czasu udzielenia odpowiedzi</h4> | ||
<h4 class="text">na odpowiedź masz 10 sekund</h4> | ||
<h3 class="center">dalej »</h3> | ||
</div> | ||
<div class="item"> | ||
<h4 class="text">rozpoczynasz grę z trzema szansami</h4> | ||
<h4 class="text">udzielenie złej odpowiedzi lub nie zaznaczenie odpowiedzi skutkuje utratą jednej szansy</h4> | ||
<h4 class="text">utrata trzeciej szansy kończy grę</h4> | ||
<h3 class="center">dalej »</h3> | ||
</div> | ||
<div class="item"> | ||
<h4 class="text">aby dostać się do tabeli wszechwiedzących, musisz zdobyć więcej punktów niż osoba zajmująca ostatnie miejsce</h4> | ||
<h4 class="text">jeśli nie jesteś zarejestrowany, możesz wpisać swój nick, jeśli masz już konto wynik zostanie zapisany automatycznie</h4> | ||
<h4 class="text">masz możliwość analizy błędnych odpowiedzi oraz oglądnięcia swoich statystyk</h4> | ||
<button id="tut_end" class="ui-button ui-state-default, ui-widget-content ui-state-default ui-corner-all boxShadow menu">wszystko wiem, grajmy!</button> | ||
</div> | ||
|
||
</div> | ||
|
||
</div> | ||
<div class="navi"></div> | ||
<button id="back" title="powrót do menu" type="button" name="back"></button> | ||
|
||
</div><!-- end of #tutorialWrap --> | ||
|
||
<div id="quit_dialog"> | ||
<p>Czy chcesz przerwać grę?</p> | ||
</div><!-- end of div quit --> | ||
|
||
</div><!-- end of mainContent--> | ||
<?php require_once(LIB_PATH.DS."footer.php"); ?> |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
<?php | ||
require_once("initialize.php"); | ||
|
||
$perc = round(($_SESSION['odp_poprawne'] * 100) / $_SESSION['ilosc_odp']); // percentage of correct answers | ||
$score = $_SESSION['zdobyte_punkty']; | ||
$time = $_SESSION['question_start_time'] - $_SESSION['game_start_time']; | ||
|
||
if(isset($_SESSION['username'])) { | ||
|
||
$username = $_SESSION['username']; | ||
|
||
if($score != 0 && $score >= $btm) { | ||
|
||
$id = User::insert_new_score($score, $username, $time, $perc, $_SESSION['odp_poprawne'], $_SESSION['hashed_email']); | ||
User::update_user_stats($username); | ||
|
||
} | ||
|
||
} | ||
|
||
// selects top 50 scores | ||
$r = User::find_top_scores(50); | ||
// finds the position based on the points player scored | ||
$key = array_search($score, $r) + 1; | ||
?> | ||
<div class="badge"> | ||
<h1>Gratulacje <?php echo $username; ?>!</h1> | ||
<h1 class="punkty"><?php echo $score; ?> | ||
<span><?php echo polOdmiana('punkt', $score); ?></span> | ||
</h1> | ||
</div> | ||
<button id="save" title="menu główne" name="save" type="button" class="ui-button ui-state-default, ui-widget-content ui-state-default ui-corner-all menu boxShadow">powrót do menu</button> | ||
<script> | ||
$(function(){ | ||
$("#position").text("Miejsce: <?php echo $key;?>"); | ||
}); | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<?php require_once("initialize.php");?> | ||
<p id="reg_head" class="fltrt"> | ||
<span class="login_flt">Witaj,</span> | ||
<a href="<?php echo SITE_URL; ?>gracze" target="_self" class="login_flt"><?php echo $session->username; ?></a> | ||
<?php if($_SESSION['admin_rights'] == 1) : ?> | ||
<span class="login_flt">|</span> | ||
<a class="login_flt" href="<?php echo SITE_URL; ?>admin" target="_self">admin panel</a> | ||
<?php endif; ?> | ||
<span class="login_flt">|</span> | ||
<a href="<?php echo SITE_URL; ?>gracze" target="_self" class="login_flt">moje konto</a> | ||
<span class="login_flt">|</span> | ||
<a id="logout" class="login_flt" href="#">wyloguj się</a> | ||
</p> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.