in Jahrgangsintervalle - Spielwiese new file: admin/ak2jg.php - Zwei Funktionen hinzugefügt (ak2..) modified: phpLib/cwsvJudo/wkKalender.php - Bonus: die Jahrgangsintervalle als Tooltip im Kalender modified: src/css/cwsvJudo-2018-wkKalender.css
59 lines
1.6 KiB
PHP
59 lines
1.6 KiB
PHP
<?php
|
|
include_once("config.inc.php");
|
|
|
|
$basePath = "/users/cwsvjudo/www";
|
|
|
|
require_once($basePath."/config/cwsvJudo.config.php");
|
|
|
|
require_once($basePath."/config/phpcount.config.php");
|
|
require_once($basePath."/ressourcen/phpLib/phpcount/phpcount.php");
|
|
|
|
require_once($basePath."/ressourcen/phpLib/cwsvJudo/miscAssis.php");
|
|
|
|
$cwsvJudoDbConnection = getCwsvJudoDbConn();
|
|
$cwsvJudoDbConnection->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
|
|
|
|
$akQuery =
|
|
$cwsvJudoDbConnection->prepare(
|
|
"SELECT lfdeNr, Datum, Veranstaltung, Altersklassen FROM cwsvjudo.`wettkampfkalender` WHERE DATUM > CURRENT_DATE() ORDER BY Datum ASC, lfdeNr ASC LIMIT 24;"
|
|
);
|
|
|
|
$akQuery->execute();
|
|
$wkList = $akQuery->fetchAll(PDO::FETCH_ASSOC);
|
|
|
|
// Zeichensatzkonvertierung
|
|
$someOptions = array();
|
|
if( empty($someOptions['dbCharset']) )
|
|
$someOptions['dbCharset'] = "ISO-8859-1";
|
|
if( empty($someOptions['outCharset']) )
|
|
$someOptions['outCharset'] = "UTF-8";
|
|
|
|
foreach($wkList as &$entry){
|
|
array_walk(
|
|
$entry,
|
|
function (&$value, $key, $someOptions) {
|
|
$value = iconv($someOptions['dbCharset'], $someOptions['outCharset'], $value);
|
|
},
|
|
$someOptions
|
|
);
|
|
}
|
|
|
|
?>
|
|
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
</head>
|
|
<body>
|
|
<table>
|
|
<?php
|
|
foreach($wkList as $wk){
|
|
$jg=array();
|
|
$jg=akListString2jgArray($wk['Altersklassen'], date('Y', strtotime($wk['Datum'])) );
|
|
echo("<tr><td>".$wk['lfdeNr']."</td><td>".$wk['Datum']."</td><td>".$wk['Veranstaltung']."</td><td>".$wk['Altersklassen']."</td><td>".json_encode($jg)."</td></tr>");
|
|
}
|
|
?>
|
|
</table>
|
|
</body>
|
|
</html>
|