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

43 lines
1.1 KiB
PHP
Raw Normal View History

2023-10-26 17:42:33 +02:00
<?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)
2023-10-26 17:42:33 +02:00
{
$this->addSubmenuItem('divider');
foreach($_SESSION['user']->data['tournaments'] as $tid)
2023-10-26 17:42:33 +02:00
{
$t = new Tournament();
$t->load($tid);
$this->addSubmenuItem($t->data['name'],'/dogs/overview/'.$tid,'fas fa-dog');
2023-10-26 17:42:33 +02:00
}
}
}
function add()
2023-10-26 17:42:33 +02:00
{
$this->set('template','edit_tournament.html');
}
function index() {
2023-10-26 17:42:33 +02:00
}
function maySeeThisPage() {
if($_SESSION['user']) //wenn eingeloggt, kein problem
return true;
else return false;
}
}