Skip to content

Commit

Permalink
Feature/mkwc (#36)
Browse files Browse the repository at this point in the history
* Start implementing mkwc 2023

* Add info about special teams

* Small translation fixes

* Fix nordics

* Add mkwii

* Add official message

* Small fix

* Last fixes

* Small design improvement
  • Loading branch information
tmalahie authored Jun 17, 2023
1 parent 97bece3 commit 40c81cf
Show file tree
Hide file tree
Showing 12 changed files with 202 additions and 90 deletions.
Binary file added images/mkwc/flags/aru.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/mkwc/flags/bnl.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/mkwc/flags/cal.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/mkwc/flags/ind.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/mkwc/flags/kor.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/mkwc/flags/mag.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified images/mkwc/flags/nrd.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/mkwc/flags/por.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/mkwc/flags/pri.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/mkwc/logo-mkwc-2023.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
53 changes: 29 additions & 24 deletions php/pages/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -313,31 +313,36 @@ function startsWith($haystack, $needle) {
<section id="right_section">
<?php
require_once('../includes/utils-date.php');
/*if ($id) {
?>
<div class="subsection">
<div id="official_message">
<?php
if ($language) {
?>
It's Christmas on MKPC!
Enjoy the <strong>advent calendar</strong> special event!<br />
<a href="advent-calendar.php">Click here</a> to discover it.<br />
To learn more, head to the <a href="topic.php?topic=10452">official topic</a>.
<?php
}
else {
?>
C'est Noël sur MKPC ! Profitez de l'événement spécial : <strong>calendrier de l'avent</strong> !<br />
<a href="advent-calendar.php">Cliquez ici</a> pour le découvrir.<br />
Pour en savoir plus, rendez-vous sur le <a href="topic.php?topic=10452">topic officiel</a>.
<?php
}
?>
if ($id) {
//$today = time();
//if (($today > 1607310000) && ($today < 1607914800)) {
$getMkwcVotes = mysql_fetch_array(mysql_query('SELECT COUNT(*) AS nb FROM mkwcbets WHERE player = ' . $id));
$alreadyVoted = ($getMkwcVotes['nb'] >= 2);
if (!$alreadyVoted) {
if ($language) {
?>
<div class="subsection">
<div id="official_message" style="font-size: 0.9em; text-align: left">
The <strong>2023 Mario Kart World Cup</strong> has begun!<br />
Come and <a href="mkwc.php">vote here</a> for your favorite team!<br />
For more information, read the related <a href="news.php?id=15109">news</a>.
</div>
</div>
</div>
<?php
}*/
<?php
}
else {
?>
<div class="subsection">
<div id="official_message" style="font-size: 0.9em; text-align: left">
La <strong>Coupe Du Monde 2023 de Mario Kart</strong> à débuté !<br />
Venez <a href="mkwc.php">voter ici</a> pour votre équipe préférée !<br />
Pour plus d'information, consultez la <a href="news.php?id=15109">news</a> associée.
</div>
</div>
<?php
}
}
}
function uc_strlen($str) {
return strlen(preg_replace("#(%u[0-9a-fA-F]{4})+#", ".", $str));
}
Expand Down
239 changes: 173 additions & 66 deletions php/pages/mkwc.php

Large diffs are not rendered by default.

0 comments on commit 40c81cf

Please sign in to comment.