Chris
135958c9f0
All checks were successful
Build and push / Pulling repo on server (push) Successful in 3s
43 lines
1.1 KiB
PHP
43 lines
1.1 KiB
PHP
<?php
|
|
|
|
class Tournaments extends Page {
|
|
|
|
function setMenu()
|
|
{
|
|
$this->menu_text = 'Turniere';
|
|
$this->menu_image = 'far fa-medal';
|
|
$this->menu_priority = 1;
|
|
}
|
|
|
|
function setSubmenu()
|
|
{
|
|
$this->addSubmenuItem('Übersicht','/tournaments','far fa-list-alt');
|
|
$this->addSubmenuItem('Turnier anlegen','/tournaments/add','fas fa-calendar-plus');
|
|
if($_SESSION['user']->data['dogs'] && count($_SESSION['user']->data['tournaments']) > 0)
|
|
{
|
|
$this->addSubmenuItem('divider');
|
|
foreach($_SESSION['user']->data['tournaments'] as $tid)
|
|
{
|
|
$t = new Tournament();
|
|
$t->load($tid);
|
|
$this->addSubmenuItem($t->data['name'],'/dogs/overview/'.$tid,'fas fa-dog');
|
|
}
|
|
}
|
|
}
|
|
|
|
function add()
|
|
{
|
|
$this->set('template','edit_tournament.html');
|
|
}
|
|
|
|
function index() {
|
|
|
|
}
|
|
|
|
function maySeeThisPage() {
|
|
if($_SESSION['user']) //wenn eingeloggt, kein problem
|
|
return true;
|
|
else return false;
|
|
}
|
|
|
|
} |