Files
cwsvJudo/homepage/participo/pmelo.php
2024-01-20 12:40:00 +01:00

99 lines
2.8 KiB
PHP

<?php require_once("pmelo.inc.php");?>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<!-- shared imports (common css, MaterializeCss) -->
<?php readfile('shared/imports.php'); ?>
<!-- inits for the materializeCss -->
<script src="index.js"></script>
<title>participo</title>
<meta name="description" content="pmelo">
<link rel="icon" href="<?echo($config['ressourceUrl']);?>/graphiken/icons/cwsv.ico" />
<link rel="apple-touch-icon" href="<?echo($config['baseUrl']);?>/apple-touch-icon.png">
</head>
<body>
<header>
<nav class="indigo darken-4">
<h1 style="display:inline;">cwsvJudo Apps</h1>
<a class="right top-nav sidenav-trigger waves-effect waves-light hide-on-large-only" href="#" data-target="nav-mobile">
<i class="material-icons">menu</i>
</a>
</nav>
<ul class="sidenav sidenav-fixed sidenav-close" id="nav-mobile">
<li class="logo">
<a style="height:auto;" class="brand-logo" id="logo-container" href="/participo/">
<img alt="cwsvJudoApps" style="max-width:100%;height:12vh;" class="responsive-img" src="http://cwsvjudo.bplaced.net/ressourcen/graphiken/logos/cwsvJudoLogoWappen.x256.png" />
</a>
</li>
<?php require_once 'sidenav/loginStatus.php'; ?><!-- brings its own li -->
</ul>
</header>
<main>
<h2><a href="pmelo">pmElo</a></h2>
<form id="pmelo-form-fighters" action="pmelo.php" method="post">
<div class="input-field col s12">
<select name ="pmelo[fighterIds][]" id="pmelo-form-fighters-select" multiple>
<option value="" disabled selected>Kämpfer auswählen</option>
<?php
foreach($pmelo->trainees as $trainee){
echo("<option value=\"".$trainee->getId()."\">".$trainee->getFirstname()." ".$trainee->getName()."</option>".PHP_EOL);
}
?>
</select>
<label for="form-select-2">Kämpfer auswählen</label>
<input type="submit" value="Liste erstellen">
</div>
</form>
<table>
<thead>
<tr><th>Platz</th><th>Name</th><th>Aufstieg</th></tr>
</thead>
<tbody>
<?php if(!empty($pmelo->fighters)) foreach($pmelo->fighters as $fighter){
echo("<tr><td>#</td><td>".$fighter->getFirstname()." ".$fighter->getName()."</td><td>^</td></tr>".PHP_EOL);
}
?>
</tbody>
</table>
<ul class="collection with-header">
<li class="collection-header"><h3>Logs</h3></li>
<?php
foreach($pmelo->log as $logLevel=>$messages){
if(!empty($messages)){
?>
<li class="collection-item">
<ul class="collection with-header">
<li class="collection-header"><?php echo($logLevel);?></li>
<?php
foreach($messages as $message){
?>
<li>
<?php echo($message); ?>
</li>
<?php
}
?>
</ul>
</li>
<?php
}
?>
<?php
}
?>
</ul>
</main>
</body>
</html>