This repository has been archived on 2023-12-29. You can view files and clone it, but cannot push or open issues or pull requests.
dogstats/web/pages/tournaments/controller.php
Chris 135958c9f0
All checks were successful
Build and push / Pulling repo on server (push) Successful in 3s
404 seiten auf unterseiten gehen jetzt, icons werden jetzt korrekt bei menüs angezeigt, die submenüs haben
2023-10-26 20:26:28 +02:00

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;
}
}