- einige Dateien ignorieren

neue Datei:     ../.gitignore
- Erzeugen der Graphiken hinzugefügt
	geändert:       Makefile
- Umbruch in der Datumsspalte
	geändert:       css/cwsvJudo-2018-galTable.css
- Originale der Graphiken
	neue Datei:     graphiken/cwsvJudoLogoWappen.x256.png
	neue Datei:     graphiken/cwsvLogoWappen.x250.png
- Template für die Erzeugung von ampSeiten
	neue Datei:     pandocTemplate/amp-template.html
	geändert:       pandocTemplate/cwsvJudo.html5.pandocTemplate
- kleinere Korrekturen
	geändert:       phpLib/cwsvJudo/wkKalender.php
- Verwenden von srcSet in einigen img Elementen
	neue Datei:     yaml/images.yaml
	geändert:       yaml/navTargets.yaml
	geändert:       yaml/wkKalender.subNav.yaml
This commit is contained in:
marko
2018-05-19 17:17:39 +02:00
parent ca7119804c
commit 67892f2e72
11 changed files with 535 additions and 361 deletions

2
homepage/redesign2018/.gitignore vendored Normal file
View File

@@ -0,0 +1,2 @@
markdownExperiment/build/*

View File

@@ -23,8 +23,8 @@ echo:
build/css/cwsvJudo.css: $(cssFiles)
mkdir -p build/css
cat $(cssFiles) > $@
# cat $(cssFiles) | cleancss -o $@
# cat $(cssFiles) > $@
cat $(cssFiles) | cleancss -o $@
build/%.php: md/%.md build/yaml/%.yaml pandocTemplate/cwsvJudo.html5.pandocTemplate
mkdir -p build
@@ -35,7 +35,7 @@ build/%.php: md/%.md build/yaml/%.yaml pandocTemplate/cwsvJudo.html5.pandocTempl
--output=$@ \
$< $(word 2,$^)
build/yaml/%.yaml: yaml/navTargets.yaml yaml/mainNav.yaml yaml/%.subNav.yaml
build/yaml/%.yaml: yaml/images.yaml yaml/navTargets.yaml yaml/mainNav.yaml yaml/%.subNav.yaml
mkdir -p build/yaml
python tools/yamlMerge.py $^ > $@
@@ -98,3 +98,15 @@ build/.uploadMarker/config/%: config/%
ftp://cwsvjudo.bplaced.net/$(patsubst build/%,%,$^) \
--ftp-create-dirs
touch $@
.PHONY: graphiken
graphiken:
convert -resize 128x graphiken/cwsvLogoWappen.x250.png build/graphiken/cwsvLogoWappen.128w.png
pngnq -Qf -s9 -e.png -f build/graphiken/cwsvLogoWappen.128w.png
convert -resize 64x graphiken/cwsvLogoWappen.x250.png build/graphiken/cwsvLogoWappen.64w.png
pngnq -Qf -s9 -e.png -f build/graphiken/cwsvLogoWappen.64w.png
convert -resize 128x graphiken/cwsvJudoLogoWappen.x256.png build/graphiken/cwsvJudoLogoWappen.128w.png
pngnq -Qf -s9 -e.png -f build/graphiken/cwsvJudoLogoWappen.128w.png
convert -resize 64x graphiken/cwsvJudoLogoWappen.x256.png build/graphiken/cwsvJudoLogoWappen.64w.png
pngnq -Qf -s9 -e.png -f build/graphiken/cwsvJudoLogoWappen.64w.png

View File

@@ -28,7 +28,7 @@
}
.galTable time{
/*white-space: nowrap;*/
white-space: nowrap;
}
/* Die erste Zelle in jeder Zeile ist das Datum*/

Binary file not shown.

After

Width:  |  Height:  |  Size: 53 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 43 KiB

View File

@@ -0,0 +1,27 @@
<!doctype html>
<html amp lang="<%= @var lang %>">
<head>
<meta charset="utf-8">
<title><%= @var pages_title -escape xml %></title>
<link rel="canonical" href="<%= @var url %>" />
<meta name="viewport" content="width=device-width,minimum-scale=1,initial-scale=1">
<script type="application/ld+json">
{
"@context": "http://schema.org",
"@type": "Article",
"headline": "<%= @var pages_title -escape xml %>",
"datePublished": "<%= @var pages_lastmodified %>",
"image": [

View File

@@ -1,149 +1,211 @@
<!DOCTYPE html>
<!---
<?php
/// Einbinden der Konfiguration, insbesondere Basisvariablen,
/// relative Pfadangabe
/// - jedes Verzeichnis sollte seine eigene haben
/// - theoretisch sollte es bereits von der aufrufenden Datei
/// eingebunden sein
require_once("./config.inc.php");
// include_once("./config.inc.php");
require_once($$basePath."/config/phpcount.config.php");
require_once($$basePath."/config/cwsvJudo.config.php");
require_once($$basePath."/ressourcen/phpLib/cwsvJudo/miscAssis.php");
require_once($$basePath."/ressourcen/phpLib/cwsvJudo/newsLib.php");
require_once($$basePath."/ressourcen/phpLib/cwsvJudo/wkKalender.php");
require_once($$basePath."/ressourcen/phpLib/cwsvJudo/galTable.php");
require_once($$basePath."/ressourcen/phpLib/cwsvJudo/newsTableHtml.php");
require_once($$basePath."/ressourcen/phpLib/cwsvJudo/newsTableHtml.php");
require_once($$basePath."/ressourcen/phpLib/phpcount/phpcount.php");
PHPCount::AddHit("$title$");
?>
-->
<html$if(lang)$ lang="$lang$"$endif$$if(dir)$ dir="$dir$"$endif$>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">
$for(author-meta)$
<meta name="author" content="$author-meta$">
$endfor$
$if(date-meta)$
<meta name="dcterms.date" content="$date-meta$">
$endif$
$if(keywords)$
<meta name="keywords" content="$for(keywords)$$keywords$$sep$, $endfor$">
$endif$
$if(description)$
<meta name="description" content="$description$" />
$endif$
<title>$if(title-prefix)$$title-prefix$ $endif$$pagetitle$</title>
<style type="text/css">code{white-space: pre;}</style>
$if(quotes)$
<style type="text/css">q { quotes: "“" "”" "" ""; }</style>
$endif$
$if(highlighting-css)$
<style type="text/css">
$highlighting-css$
</style>
$endif$
$for(css)$
<link rel="stylesheet" href="$css$">
$endfor$
$if(math)$
$math$
$endif$
$for(header-includes)$
$header-includes$
$endfor$
</head>
<body>
<!-- Kopfzeile mit Titel, Promobildern und Breadcrumbs -->
<header class="cwsvHeader">
<img width="200" height="140" title="Judo im Chemnitzer WSV" alt="Judo im Chemnitzer WSV - Promo" src="http://cwsvjudo.bplaced.net/ressourcen/graphiken/banner/bannerlogo.1.jpg" />
<span>Judo</span>
<span class="breadcrumbs"></span>
<img width="250" height="200" title="Judo im Chemnitzer WSV" alt="Judo im Chemnitzer WSV - Logo" src="http://cwsvjudo.bplaced.net/ressourcen/graphiken/banner/cwsv-judo-logo.png" />
</header>
$if(mainNav)$
<nav id="mainNav">
$for(mainNav)$
<a href="$mainNav.url$"
$if(mainNav.caption)$title="$mainNav.caption$" $endif$
$if(mainNav.active)$class="activeNav" $endif$
>
$if(mainNav.icon)$<span><img src="$mainNav.icon$" $if(mainNav.caption)$alt="$mainNav.caption$" $endif$/></span>$endif$
$if(mainNav.caption)$<span>$mainNav.caption$</span>$endif$
</a>
$endfor$
</nav>
$endif$
$if(subNav)$
<nav class="subNav">
$for(subNav)$
<a href="$subNav.url$"
$if(subNav.caption)$title="$subNav.caption$" $endif$
$if(subNav.active)$class="activeNav" $endif$
>
$if(subNav.icon)$<img src="$subNav.icon$" $if(subNav.caption)$alt="$subNav.caption$" $endif$/>$endif$
$if(subNav.caption)$<span>$subNav.caption$</span>$endif$
</a>
$endfor$
<a href="#mainNav"
title="Hauptnavigation"
>
<img src="http://cwsvjudo.bplaced.net/ressourcen/graphiken/icons/arrowRightDown.svg" alt="Menü" />
<span>zur Hauptnavigation</span>
</a>
</nav>
$endif$
$for(include-before)$
$include-before$
$endfor$
$if(toc)$
<nav id="$idprefix$TOC">
$toc$
</nav>
$endif$
<main id="content">
$body$
</main>
<aside class="sideNotes">
Die Judoka des CWSV bedanken sich bei ihren Förderern:
<ul class="sponsorList">
<li>
Familie Mögel für den unermüdlichen Einsatz als Fans, Fahrer, Fotograf und Vertretung
</li>
<li>
Druck + Werbestudio Eckart &amp; Partner
<div><a title="Druck + Werbestudio Eckart &amp; Partner" href="http://www.dws-eckart.de">
<img width="300" height="107" src="http://cwsvjudo.bplaced.net/ressourcen/graphiken/sponsoren/EckartUndPartner.png" title="Druck + Werbestudio Eckart &amp; Partner GmbH" alt="Druck + Werbestudio Eckart &amp; Partner Logo">
</a>
</div>
</li>
<li>
Der CWSV ist anerkannter Stützpunktverein des Bundesprogrammes „Integration durch Sport”
<div>
<a href="http://www.integration-durch-sport.de" title="Integration durch Sport">
<img src="http://cwsvjudo.bplaced.net/ressourcen/graphiken/logos/IntegrationDurchSport2018.250x.png" title="Integration durch Sport - Anerkannter Stützpunktverein" alt="Integration durch Sport - Anerkannter Stützpunktverein" width="250" height="416">
</a>
</div>
</li>
</ul>
</aside>
<footer class="footerBar">
<a class="touchLink" title="Seite auf HTML 5 Konformität prüfen" href="http://validator.w3.org/check?uri=<?php echo(urlencode(getCurPagesUrl()));?>" rel="nofollow">Valid <img src="http://www.w3.org/html/logo/downloads/HTML5_1Color_Black.svg" alt="HTML 5" title="HTML 5 Logo" class="charImg"></a>
<a class="touchLink" title="Möglichkeiten mit dem Chemnitzer Freizeit- und Wohngebietssportverein in Kontakt zu treten" href="<?php echo($$baseUrl);?>/pages/desktop/kontakt.php" >Kontakt</a>
</footer>
$for(include-after)$
$include-after$
$endfor$
</body>
</html>
<!DOCTYPE html>
<!---
<?php
/// Einbinden der Konfiguration, insbesondere Basisvariablen,
/// relative Pfadangabe
/// - jedes Verzeichnis sollte seine eigene haben
/// - theoretisch sollte es bereits von der aufrufenden Datei
/// eingebunden sein
require_once("./config.inc.php");
// include_once("./config.inc.php");
require_once($$basePath."/config/phpcount.config.php");
require_once($$basePath."/config/cwsvJudo.config.php");
require_once($$basePath."/ressourcen/phpLib/cwsvJudo/miscAssis.php");
require_once($$basePath."/ressourcen/phpLib/cwsvJudo/newsLib.php");
require_once($$basePath."/ressourcen/phpLib/cwsvJudo/wkKalender.php");
require_once($$basePath."/ressourcen/phpLib/cwsvJudo/galTable.php");
require_once($$basePath."/ressourcen/phpLib/cwsvJudo/newsTableHtml.php");
require_once($$basePath."/ressourcen/phpLib/cwsvJudo/newsTableHtml.php");
require_once($$basePath."/ressourcen/phpLib/phpcount/phpcount.php");
PHPCount::AddHit("$title$");
?>
-->
<html$if(lang)$ lang="$lang$"$endif$$if(dir)$ dir="$dir$"$endif$>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">
$for(author-meta)$
<meta name="author" content="$author-meta$">
$endfor$
$if(date-meta)$
<meta name="dcterms.date" content="$date-meta$">
$endif$
$if(keywords)$
<meta name="keywords" content="$for(keywords)$$keywords$$sep$, $endfor$">
$endif$
$if(description)$
<meta name="description" content="$description$" />
$endif$
<title>$if(title-prefix)$$title-prefix$ $endif$$pagetitle$</title>
<style type="text/css">code{white-space: pre;}</style>
$if(quotes)$
<style type="text/css">q { quotes: "“" "”" "" ""; }</style>
$endif$
$if(highlighting-css)$
<style type="text/css">
$highlighting-css$
</style>
$endif$
$for(css)$
<link rel="stylesheet" href="$css$">
$endfor$
$if(math)$
$math$
$endif$
$for(header-includes)$
$header-includes$
$endfor$
</head>
<body>
<!-- Kopfzeile mit Titel, Promobildern und Breadcrumbs -->
<header class="cwsvHeader">
<img width="200" height="140" title="Judo im Chemnitzer WSV" alt="Judo im Chemnitzer WSV - Promo" src="http://cwsvjudo.bplaced.net/ressourcen/graphiken/banner/bannerlogo.1.jpg" />
<span>Judo</span>
<span class="breadcrumbs"></span>
<img
width="64" height="52"
title="Judo im Chemnitzer WSV"
alt="Judo im Chemnitzer WSV - Logo"
src="http://cwsvjudo.bplaced.net/ressourcen/graphiken/logos/cwsvJudoLogoWappen.64w.png"
srcset="http://cwsvjudo.bplaced.net/ressourcen/graphiken/logos/cwsvJudoLogoWappen.128w.png 2x, http://cwsvjudo.bplaced.net/ressourcen/graphiken/logos/cwsvJudoLogoWappen.x256.png 4x"
/>
</header>
$if(mainNav)$
<nav id="mainNav">
$for(mainNav)$
<a href="$mainNav.url$"
$if(mainNav.caption)$title="$mainNav.caption$" $endif$
$if(mainNav.active)$class="activeNav" $endif$
>
$if(mainNav.icon)$
<span><img
src="$if(mainNav.icon.src)$$mainNav.icon.src$$else$$mainNav.icon$$endif$"
$if(mainNav.caption)$
alt="$mainNav.caption$"
$else$
$if(mainNav.icon.alt)$
alt="$mainNav.icon.alt$"
$endif$
$endif$
$if(mainNav.icon.width)$
width="$mainNav.icon.width$"
$endif$
$if(mainNav.icon.height)$
height="$mainNav.icon.height$"
$endif$
$if(mainNav.icon.title)$
title="$mainNav.icon.title$"
$endif$
$if(mainNav.icon.srcset)$
srcset="$mainNav.icon.srcset$"
$endif$
/>
</span>
$endif$
$if(mainNav.caption)$<span>$mainNav.caption$</span>$endif$
</a>
$endfor$
</nav>
$endif$
$if(subNav)$
<nav class="subNav">
$for(subNav)$
<a href="$subNav.url$"
$if(subNav.caption)$title="$subNav.caption$" $endif$
$if(subNav.active)$class="activeNav" $endif$
>
$if(subNav.icon)$
<img
src="$if(subNav.icon.src)$$subNav.icon.src$$else$$subNav.icon$$endif$"
$if(subNav.caption)$
alt="$subNav.caption$"
$else$
$if(subNav.icon.alt)$
alt="$subNav.icon.alt$"
$endif$
$endif$
$if(subNav.icon.width)$
width="$subNav.icon.width$"
$endif$
$if(subNav.icon.height)$
height="$subNav.icon.height$"
$endif$
$if(subNav.icon.title)$
title="$subNav.icon.title$"
$endif$
$if(subNav.icon.srcset)$
srcset="$subNav.icon.srcset$"
$endif$
/>
$endif$
$if(subNav.caption)$<span>$subNav.caption$</span>$endif$
</a>
$endfor$
<a href="#mainNav"
title="Hauptnavigation"
>
<img src="http://cwsvjudo.bplaced.net/ressourcen/graphiken/icons/arrowRightDown.svg" alt="Menü" />
<span>zur Hauptnavigation</span>
</a>
</nav>
$endif$
$for(include-before)$
$include-before$
$endfor$
$if(toc)$
<nav id="$idprefix$TOC">
$toc$
</nav>
$endif$
<main id="content">
$body$
</main>
<aside class="sideNotes">
Die Judoka des CWSV bedanken sich bei ihren Förderern:
<ul class="sponsorList">
<li>
Familie Mögel für den unermüdlichen Einsatz als Fans, Fahrer, Fotograf und Vertretung
</li>
<li>
Druck + Werbestudio Eckart &amp; Partner
<div><a title="Druck + Werbestudio Eckart &amp; Partner" href="http://www.dws-eckart.de">
<img width="300" height="107" src="http://cwsvjudo.bplaced.net/ressourcen/graphiken/sponsoren/EckartUndPartner.png" title="Druck + Werbestudio Eckart &amp; Partner GmbH" alt="Druck + Werbestudio Eckart &amp; Partner Logo">
</a>
</div>
</li>
<li>
Der CWSV ist anerkannter Stützpunktverein des Bundesprogrammes „Integration durch Sport”
<div>
<a href="http://www.integration-durch-sport.de" title="Integration durch Sport">
<img src="http://cwsvjudo.bplaced.net/ressourcen/graphiken/logos/IntegrationDurchSport2018.250x.png" title="Integration durch Sport - Anerkannter Stützpunktverein" alt="Integration durch Sport - Anerkannter Stützpunktverein" width="250" height="416">
</a>
</div>
</li>
</ul>
</aside>
<footer class="footerBar">
<a class="touchLink"
title="Seite auf HTML 5 Konformität prüfen"
href="http://validator.w3.org/check?uri=<?php echo(urlencode(getCurPagesUrl()));?>"
rel="nofollow"
>Valid <img
src="/ressourcen/graphiken/icons/HTML5_1Color_Black.svg"
alt="HTML 5"
title="HTML 5 Logo"
class="charImg">
</a>
<a class="touchLink" title="Möglichkeiten mit dem Chemnitzer Freizeit- und Wohngebietssportverein in Kontakt zu treten" href="<?php echo($$baseUrl);?>/pages/desktop/kontakt.php" >Kontakt</a>
</footer>
$for(include-after)$
$include-after$
$endfor$
</body>
</html>

View File

@@ -1,84 +1,263 @@
<?php
/// Abfrage der Daten eines Wettkampfes via ID
/// Da über den primary key abgefragt wird, erfolgt keine Kontrolle, ob nur ein Ergebnis geliefert wurde
function getWkData($anMysqlConn, $anWkId){
$query = sprintf(
"SELECT * FROM wettkampfkalender WHERE lfdeNr='%s';",
$anMysqlConn->real_escape_string($anWkId)
);
$results = $anMysqlConn->query($query);
if( !$results ) die("ERR: Fehler bei Datenbankabfrage (".$query.")!\n");
$ret = $results->fetch_assoc();
/// Wettkämpfe per ID abfragen
///
/// Der Rückgabewert sollte vor Verwendung (und zur Fehlerbehandlung)
/// auf NULL und/oder leeres Array getestet werden.
/// Der Zeichensatz wird von "ISO-8859-1" auf "UTF-8" gesetzt
/// @optionsArray
/// dbCharset - Zeichensatz der Datenbank
/// outCharset - Ausgabezeichensatz in den konvertiert werden soll
/// @return Array von Wettkampfdaten im Erfolsfalle (evtl. aber leer, wenn in der Datenbank keine entsprechenden Nachrichten gefunden wurden), sonst NULL
/// ohne
function getWk($aMysqlConn, $optionsArray = array("dbCharset" => "ISO-8859-1", "outCharset" => "UTF-8", "limit" => "1", "wkId" => "0")){
if(!$aMysqlConn) return NULL;
if( empty($optionsArray['dbCharset']) ) $optionsArray['dbCharset'] = "ISO-8859-1";
if( empty($optionsArray['outCharset']) ) $optionsArray['outCharset'] = "UTF-8";
if( !is_positive_integer($optionsArray['limit']) ) $optionsArray['limit'] = "1";
$ret = array();
// Falls eine (valide) wkId übergeben wurde, dann sollen die Wettkämpfe ab da abgefragt werden.
if( is_positive_integer($optionsArray['wkId']) ){
// datenbank.tabelle könnte noch variabel gestaltet werden
$pdoStatementForQuerryingWkById = $aMysqlConn->prepare(
"SELECT * FROM cwsvjudo.wettkampfkalender WHERE wettkampfkalender.lfdeNr = :wkId UNION SELECT * FROM cwsvjudo.wettkampfkalender WHERE ( wettkampfkalender.Datum <= (SELECT wettkampfkalender.Datum FROM wettkampfkalender WHERE wettkampfkalender.lfdeNr = :wkId ) ) AND ( wettkampfkalender.lfdeNr != :wkId ) ORDER BY Datum DESC LIMIT :limit OFFSET 0;"
);
$pdoStatementForQuerryingWkById->bindParam(':limit', intval($optionsArray['limit']), PDO::PARAM_INT);
$pdoStatementForQuerryingWkById->bindParam(':wkId', intval($optionsArray['wkId']), PDO::PARAM_INT);
$pdoStatementForQuerryingWkById->execute();
$ret = $pdoStatementForQuerryingWkById->fetchAll(PDO::FETCH_ASSOC);
}
else{
$pdoStatementForQuerryingWkById = $aMysqlConn->prepare(
"SELECT * FROM wettkampfkalender ORDER BY Datum DESC, lfdeNr DESC LIMIT :limit;"
);
$pdoStatementForQuerryingWkById->bindParam(':limit', intval($optionsArray['limit']), PDO::PARAM_INT);
$pdoStatementForQuerryingWkById->execute();
$ret = $pdoStatementForQuerryingWkById->fetchAll(PDO::FETCH_ASSOC);
}
// Zeichensatzkonvertierung
foreach($ret as &$entry){
array_walk(
$entry,
function (&$value, $key, $optionsArray) {
$value = iconv($optionsArray['dbCharset'], $optionsArray['outCharset'], $value);
},
$optionsArray
);
}
return $ret;
}
// Ausgabe der Wettkampftabelle
// @todo: elaborieren
function wkTableHtml(){
global $cwsvJudoConfig;
// Vermutung ist, dass $__GET sowieso (?super?)global
// global $__GET
global $basePath;
//require_once($basePath."/bonus/db.inc");
include_once($basePath."/bonus/db.inc");
/// Einen Gallerie per ID abfragen
///
/// Der Rückgabewert sollte vor Verwendung (und zur Fehlerbehandlung)
/// auf NULL und/oder leeres Array getestet werden.
/// Der Zeichensatz wird von "ISO-8859-1" auf "UTF-8" gesetzt
/// @optionsArray
/// dbCharset - Zeichensatz der Datenbank
/// outCharset - Ausgabezeichensatz in den konvertiert werden soll
/// @return Array von Galleriedaten im Erfolsfalle (evtl. aber leer, wenn in der Datenbank keine entsprechenden Nachrichten gefunden wurden), sonst NULL
function getGal($aMysqlConn, $optionsArray = array("dbCharset" => "ISO-8859-1", "outCharset" => "UTF-8", "limit" => "1", "galId" => "0", "wkId"=>"0")){
if(!$aMysqlConn) return NULL;
// Deutsches Datumsformat
setlocale(LC_ALL, 'de_DE');
$message = array();
if(is_positive_integer($_GET['wkId'])){
// $sqlConn = @new mysqli($db_server, $db_user, $db_password, $db_name);
$sqlConn = @new mysqli(
$cwsvJudoConfig["db"]["host"],
$cwsvJudoConfig["db"]["user"],
$cwsvJudoConfig["db"]["password"],
$cwsvJudoConfig["db"]["name"]
if( empty($optionsArray['dbCharset']) ) $optionsArray['dbCharset'] = "ISO-8859-1";
if( empty($optionsArray['outCharset']) ) $optionsArray['outCharset'] = "UTF-8";
if( !is_positive_integer($optionsArray['limit']) ) $optionsArray['limit'] = "1";
$ret = array();
if( is_positive_integer($optionsArray['wkId']) ){
// datenbank.tabelle könnte noch vaiabel gestaltet werden
$pdoStatementForQuerryingGalById = $aMysqlConn->prepare(
"SELECT * FROM cwsvjudo.wkGalerien WHERE wkGalerien.datum <= (SELECT wkGalerien.datum FROM wkGalerien WHERE wkGalerien.wkId = :wkId ) ORDER BY wkGalerien.datum DESC LIMIT :limit OFFSET 0;"
);
if ($sqlConn->connect_error) {
$message['error'] .= "Datenbankverbindung fehlgeschlagen: " . $sqlConn->connect_error . "<br />";
}
else{
$wkData = getWkData($sqlConn, $_GET["wkId"]);
if( empty($wkData) ) $message['error'] .= "Fehler: WettkampfId ".$_GET['wkId']." nicht gefunden!<br />";
}
$pdoStatementForQuerryingGalById->bindParam(':limit', intval($optionsArray['limit']), PDO::PARAM_INT);
$pdoStatementForQuerryingGalById->bindParam(':wkId', intval($optionsArray['wkId']), PDO::PARAM_INT);
$pdoStatementForQuerryingGalById->execute();
$ret = $pdoStatementForQuerryingGalById->fetchAll(PDO::FETCH_ASSOC);
}
// else $message['error'] .= "Fehler: wkId ist kein pos. Int (".$_GET['wkId'].")<br />";
/*
$breadcrumbs = array();
array_push($breadcrumbs,
array("linkTarget" => "http://cwsvjudo.bplaced.net/pages/desktop/", "linkTitle" => "Startseite der Homepage der Sektion Judo des Chemnitzer Freizeit- und Wohngebietssportvereines", "caption" => "<img class=\"charImg\" src=\"/ressourcen/graphiken/banner/cwsv-judo-logo.png\" alt=\"Judo im Chemnitzer WSV - Logo\" title=\"Judo im Chemnitzer WSV\" />")
);
array_push($breadcrumbs,
array("linkTarget" => "http://cwsvjudo.bplaced.net/pages/desktop/verein.wettkampfkalender.php", "linkTitle" => "Wettkampfkalender der Sektion Judo des Chemnitzer Freizeit- und Wohngebietssportvereines in Kontakt zu treten", "caption" => "Wettkampkalender")
);
if(is_positive_integer($_GET['wkId'])){
array_push($breadcrumbs,
array("linkTarget" => "http://cwsvjudo.bplaced.net/pages/desktop/verein.wettkampf.php?wkId=".$_GET['wkId'], "linkTitle" => "Wettkampf Nr. ".$GET['wkID'], "caption" => $_GET['wkId'])
else{
$pdoStatementForQuerryingGalById = $aMysqlConn->prepare(
"SELECT * FROM wkGalerien ORDER BY datum DESC, id DESC LIMIT :limit;"
);
$pdoStatementForQuerryingGalById->bindParam(':limit', intval($optionsArray['limit']), PDO::PARAM_INT);
$pdoStatementForQuerryingGalById->execute();
$ret = $pdoStatementForQuerryingGalById->fetchAll(PDO::FETCH_ASSOC);
}
// Zeichensatzkonvertierung
foreach($ret as &$entry){
array_walk(
$entry,
function (&$value, $key, $optionsArray) {
$value = iconv($optionsArray['dbCharset'], $optionsArray['outCharset'], $value);
},
$optionsArray
);
}
*/
if(!empty($message['error']))
echo( "<div class=\"messageBox\">".$message['error']."</div>" );
if( !empty($wkData) ){
echo( "<h1>Wettkampfdaten ".mb_convert_encoding($wkData['Veranstaltung'], 'UTF-8', 'ISO-8859-1')."</h1>" );
return $ret;
}
/// Aus einer Liste von Wettkämpfen den htmlCode der Wettkampftabelle bereit stellen
function wkList2htmlWkTable( $aWkList, $someOptions = [] ){
if( empty($aWkList) )
return "";
$htmlWkTableString = "";
$htmlWkTableString .=
"<table class=\"wkKalender\">".
"<thead>".
"<tr>".
"<th>Datum</th>".
"<th>Veranstaltung</th>".
"<th>Ort</th>".
"<th>Altersklasse(n)</th>".
"<th>iCal</th>".
"</tr>".
"</thead>".
"<tbody>";
$lastMonthName = "";
foreach($aWkList as $wk){
// Zeichensatzkonvertierung
array_walk(
$wk,
function (&$value, $key){
$value = iconv("ISO-8859-1", "UTF-8", $value);
}
);
echo( "<ul>" );
echo( "<li>Datum: ".$wkData['Datum']."</li>" );
echo( "<li>AK: ".mb_convert_encoding($wkData['Altersklassen'], 'UTF-8', 'ISO-8859-1')."</li>" );
echo( "<li>Ort: ".mb_convert_encoding($wkData['Ort'], 'UTF-8', 'ISO-8859-1')."</li>" );
echo( "<li><a href=\"".$wkData['Ausschreibung']."\">Ausschreibung</a></li>" );
echo( "<li><a href=\"".$wkData['Routenplaner']."\">Routenplaner</a></li>" );
echo( "<li>Galerie: ".$wkData['galleryLink']."</li>" );
echo( "<li>PromoPic: ".$wkData['promoPic']."</li>" );
echo( "</ul>" );
if($lastMonthName != strftime("%B %Y", strtotime($wk['Datum']) )){
$lastMonthName = strftime("%B %Y", strtotime($wk['Datum']) );
$htmlWkTableString .= "<tr><th colspan=\"5\" >".$lastMonthName."</th></tr><tr style=\"display:none;\" ><th colspan=\"5\"></th></tr>";
}
$htmlWkTableString .=
"<tr>".
"<script type=\"application/ld+json\">".wkArray2jsonSdEvent($wk)."</script>".
"<td data-title=\"Datum\" class=\"noWrap\">".
"<time datetime=\"".$wk['Datum']."\">".strftime("%Y-%m-%d (%a)", strtotime($wk['Datum']) )."</time>".
"</td>".
"<td data-title=\"Ausschreibung\" class=\"hyphenate\">".
"<a title=\"Ausschreibung ".$wk['Veranstaltung']."\" href=\"".$wk['Ausschreibung']."\"><span property=\"name\">".$wk['Veranstaltung']."</span></a>".
"</td>".
"<td data-title=\"Wegbeschreibung\">".
"<a title=\"Wegbeschreibung ".$wk['Veranstaltung']."\" href=\"".$wk['Routenplaner']."\"><span>".$wk['Ort']."</span></a>".
"</td>".
"<td data-title=\"Altersklassen\">".
$wk['Altersklassen'].
"</td>".
"<td data-title=\"iCal\">".
"<a title=\"Termin für ".$wk['Veranstaltung']." in Kalender übernehmen\" href=\"/ressourcen/phpLib/calendar.php?wkID=".$wk['lfdeNr']."\">iCal</a>".
"</td>".
"</tr>\n";
}
$htmlWkTableString .=
"</tbody>".
"<tfoot>".
"<tr>".
"<th>Datum</th>".
"<th>Veranstaltung</th>".
"<th>Ort</th>".
"<th>Altersklasse(n)</th>".
"<th>iCal</th>".
"</tr>".
"</tfoot>".
"</table>";
return $htmlWkTableString;
}
/// Wettkampfdaten als json-formatierte strukturierte Event-Daten
function wkArray2jsonSdEvent($wk){
return
"{".
"\"@context\": \"http://schema.org\",".
"\"@type\": \"Event\",".
"\"name\": \"".$wk['Veranstaltung']."\",".
"\"startDate\": \"".$wk['Datum']."\",".
"\"endDate\": \"".$wk['Datum']."\",".
"\"url\": \"http://cwsvjudo.bplaced.net/pages/desktop/verein.wettkampfkalender.php?wkId=".$wk['lfdeNr']."\",".
"\"description\": \"Judo-Wettkampf der Altersklasse(n) ".$wk['Altersklassen']."\",".
"\"location\": {".
"\"@type\": \"Place\",".
"\"name\": \"".$wk['Ort']."\",".
"\"address\": {".
"\"@type\": \"PostalAddress\",".
"\"addressLocality\": \"".$wk['Ort']."\"".
"}".
"}".
"}";
}
function wkTableHtml(){
global $cwsvJudoConfig;
// Datenbankverbindung bereit stellen
try{
$db_connection = new PDO(
'mysql:host='.$cwsvJudoConfig["db"]["host"].';dbname='.$cwsvJudoConfig["db"]["name"],
$cwsvJudoConfig["db"]["user"],
$cwsvJudoConfig["db"]["password"]
);
}
catch(PDOException $db_error){
$siteData['errors'][] = "Error!: " . $db_error->getMessage();
}
// Abfrage der Wettkampfdaten der Einzelansicht
if(!empty($_GET['wkId'])){
$wkInfo=getWk ($db_connection, array('wkId'=>$_GET['wkId']) );
$wkGals=getGal($db_connection, array('wkId'=>$_GET['wkId']) );
// var_dump($wkInfo);
}
// var_dump($wkInfo);
// Eine Einzelansicht, falls ein wkInfo ausgefüllt wurde
if( !empty($wkInfo) ){
foreach($wkInfo as $wk){
$siteData['mainContent'] .=
"<h2>".$wk['Veranstaltung']."</h2>".
"<ul>".
"<li>Datum: <time datetime=".$wk['Datum'].">".strftime("%a, %d. %B %Y", strtotime($wk['Datum']))."</time></li>".
"<li>Altersklassen: ".$wk['Altersklassen']."</li>".
"<li>Ort: <a href=\"".$wk['Routenplaner']."\">".$wk['Ort']."</a></li>".
"</ul>".
"<nav>".
"<ul>".
"<li><a href =\"".$wk['Ausschreibung']."\"><div>Link zur Ausschreibung</div></a></li>".
"<li><a href =\"".$wk['Routenplaner'] ."\"><div>Link zum Routenplaner</div></a></li>".
"<li><a href =\"/ressourcen/phpLib/calendar.php?wkID=".$wk['lfdeNr']."\"><div>Termin in Kalender übernehmen</div></a></li>";
if( !empty($wkGals) ){
foreach($wkGals as $wkGal){
$siteData['mainContent'] .= "<li><a href=\"".$wkGal['url']."\">".$wkGal['typ']."galerie</a></li>";
}
}
$siteData['mainContent'] .=
"</ul>".
"</nav>".
"<hr />";
}
}
else{
$siteData['mainContent'] .= $message['error'];
}
try{
$db_connection = new PDO('mysql:host='.$db_server.';dbname='.$db_name, $db_user, $db_password);
$db_connection = new PDO(
'mysql:host='.$cwsvJudoConfig["db"]["host"].';dbname='.$cwsvJudoConfig["db"]["name"],
$cwsvJudoConfig["db"]["user"],
$cwsvJudoConfig["db"]["password"]
);
// mögliche Werte für das jahr herausfinden
$jahre = array();
@@ -93,19 +272,19 @@ include_once($basePath."/bonus/db.inc");
if(in_array($jahr, $jahre)){
$minDate = $jahr."-01-01";
$maxDate = $jahr."-12-31";
echo( "<h1>Wettkampfkalender ".$jahr."</h1>" );
$siteData['mainContent'] .=
"<h2>Wettkampfkalender ".$jahr."</h2>";
}
else{
echo "Keine Wettkämpfe für das Jahr".$jahr." gefunden!";
// die();
$siteData['mainContent'] .=
"Keine Wettkämpfe für das Jahr".$jahr." gefunden!";
}
}
else{
$minDate = date("Y-m-d", time());
$maxDate = "";
echo( "<h1>Kommende Wettkämpfe</h1>" );
$siteData['mainContent'] .=
"<h1>Kommende Wettkämpfe</h1>";
}
$query="SELECT Datum,Veranstaltung,Ausschreibung,Ort,Routenplaner,Altersklassen,lfdeNr FROM wettkampfkalender WHERE Datum >= \"".$minDate."\" ORDER BY Datum ASC";
@@ -114,67 +293,12 @@ include_once($basePath."/bonus/db.inc");
}
$ergebnis = $db_connection->query($query);
echo( "<table class=\"wkKalender\">");
echo( "<thead><tr><th>Datum</th><th>Veranstaltung</th><th>Ort</th><th>Altersklasse(n)</th><th>iCal</th></tr></thead>" );
echo( "<tbody>" );
$siteData['mainContent'] .= wkList2htmlWkTable($ergebnis);
$ergebnis = $db_connection->query($query);
// echo( "Debug: " . gettype($ergebnis) . " " . count($ergebnis) . "\n" );
foreach($ergebnis as $wk){
echo( "<tr><script type=\"application/ld+json\">".
"{".
"\"@context\": \"http://schema.org\",".
"\"@type\": \"Event\",".
"\"name\": \"".mb_convert_encoding($wk['Veranstaltung'], 'UTF-8', 'ISO-8859-1')."\",".
"\"startDate\": \"".mb_convert_encoding($wk['Datum'], 'UTF-8', 'ISO-8859-1')."\",".
"\"endDate\": \"".mb_convert_encoding($wk['Datum'], 'UTF-8', 'ISO-8859-1')."\",".
"\"url\": \"http://cwsvjudo.bplaced.net".mb_convert_encoding($wk['Ausschreibung'], 'UTF-8', 'ISO-8859-1')."\",".
"\"description\": \"Judo-Wettkampf der Altersklasse(n) ".mb_convert_encoding($wk['Altersklassen'], 'UTF-8', 'ISO-8859-1')."\",".
"\"location\": {".
"\"@type\": \"Place\",".
"\"name\": \"".mb_convert_encoding($wk['Ort'], 'UTF-8', 'ISO-8859-1')."\",".
"\"address\": {".
"\"@type\": \"PostalAddress\",".
"\"addressLocality\": \"".mb_convert_encoding($wk['Ort'], 'UTF-8', 'ISO-8859-1')."\"".
"}".
"}".
"}".
"</script>"
);
// schlechter Hack solange die Browser nicht von selbst ordentlich trennen
$wk['Veranstaltung'] =
str_replace("meisterschaft", "&shy;meisterschaft", $wk['Veranstaltung']);
$wk['Veranstaltung'] =
str_replace("turnier", "&shy;turnier", $wk['Veranstaltung']);
$wk['Veranstaltung'] =
str_replace("randori", "&shy;randori", $wk['Veranstaltung']);
echo(
"<td class=\"noWrap\">".
"<time datetime=".mb_convert_encoding($wk['Datum'], 'UTF-8', 'ISO-8859-1')."\">".strftime("<nobr>%Y-%m-%d</nobr> (%a)", strtotime($wk['Datum']) )."</time>".
"</td>".
"<td class=\"hyphenate\">".
"<a title=\"Ausschreibung ".mb_convert_encoding($wk['Veranstaltung'], 'UTF-8', 'ISO-8859-1')."\" href=\"".mb_convert_encoding($wk['Ausschreibung'], 'UTF-8', 'ISO-8859-1')."\"><span property=\"name\">".mb_convert_encoding($wk['Veranstaltung'], 'UTF-8', 'ISO-8859-1')."</span></a>".
"</td>".
"<td>".
"<a title=\"Wegbeschreibung ".mb_convert_encoding($wk['Veranstaltung'], 'UTF-8', 'ISO-8859-1')."\" href=\"".$wk['Routenplaner']."\"><span>".mb_convert_encoding($wk['Ort'], 'UTF-8', 'ISO-8859-1')."</span></a>".
"</td>".
"<td>".mb_convert_encoding($wk['Altersklassen'], 'UTF-8', 'ISO-8859-1')."</td>".
"<td>".
"<a title=\"Termin für ".mb_convert_encoding($wk['Veranstaltung'], 'UTF-8', 'ISO-8859-1')." in Kalender übernehmen\" href=\"/ressourcen/phpLib/calendar.php?wkID=".$wk['lfdeNr']."\">iCal</a>".
"</td>".
"</tr>" );
}
echo(
"</tbody>".
"<tfoot><tr><th>Datum</th><th>Veranstaltung</th><th>Ort</th><th>Altersklasse(n)</th><th>iCal</th></tr></tfoot>".
"</table>".
"<div style=\"font-size:xx-small\">Alle Angaben ohne Gewähr! Fehler und Ergänzungen dürfen gerne gemeldet werden.</div>".
"<a href=\"/downloads/Ausschreibungen/\">Link zum Archiv mit allen Ausschreibungen</a>." );
/*
<!--Ende dynamische Wettkampfliste-->
$siteData['mainContent'] .=
"<div style=\"font-size:xx-small\">Alle Angaben ohne Gewähr! Fehler und Ergänzungen dürfen gerne gemeldet werden.</div>".
"<a href=\"/downloads/Ausschreibungen/\">Link zum Archiv mit allen Ausschreibungen</a>.";
/* @todo: Wettkampfselektor wieder ergänzen
<hr />
<div class="wkSelektor">
Im folgendem kann man sich mehrere Wettkampftermine in einer <a href="https://de.wikipedia.org/wiki/ICalendar">ICalendar</a>-Datei zusammenstellen. Zum An-/Abwählen bei gedrückter Strg-Taste mit der linken Maustaste die jeweiligen Wettkämpfe anklicken.
@@ -204,81 +328,11 @@ include_once($basePath."/bonus/db.inc");
}
catch(PDOException $db_error){
print "Error!: " . $db_error->getMessage() . "<br/>";
// die();
// die();
}
/*
?>
</div>
</div> <!-- Ende div id content; des eigentlichen Inhaltes-->
<!-- Vertikale Navigationsleiste an der Seite-->
<div id="navVerti">
<nav><ul>
<?php
if(!$_GET["jahr"]){
echo "<li class=\"activeNav\">kommende Wett&shy;k&auml;mpfe</li>";
}
else{
echo "<li><a href=\"/pages/desktop/verein.wettkampfkalender.php\">komm&shy;ende Wett&shy;k&auml;mpfe</a></li>";
}
foreach($jahre as $runner){
if($_GET["jahr"] == $runner){
echo "<li class=\"activeNav\"> Wett&shy;k&auml;mpfe ".$runner."</li>";
}
else{
echo "<li><a href=\"/pages/desktop/verein.wettkampfkalender.php?jahr=".$runner."\">Wett&shy;k&auml;mpfe ".$runner."</a></li>";
}
}
?>
</ul></nav>
<hr />
<!--Anfang der Einbindung des Counters; die Zeile 'TEMPLATE;' DARF NICHT EINGERÜCKT SEIN-->
<div>
<?php
$chCounter_template = <<<TEMPLATE
<span class="bold">Besucher</span><br/>
Online: {V_VISITORS_CURRENTLY_ONLINE}<br/>
Heute: {V_VISITORS_TODAY}<br/>
Gestern: {V_VISITORS_YESTERDAY}<br/>
Tagesrekord: {V_MAX_VISITORS_PER_DAY}<br/>
Insgesamt: {V_TOTAL_VISITORS}<br/>
<span class="bold">Seitenaufrufe</span><br/>
Diese Seite: {V_PAGE_VIEWS_THIS_PAGE}<br/>
Insgesamt: {V_TOTAL_PAGE_VIEWS}<br/>
TEMPLATE;
$chCounter_page_title = "Wettkampfkalender";
if($_GET["jahr"]){
$chCounter_page_title = "Wettkampfkalender ".$_GET["jahr"];
}
$chCounter_visible=1;
include($_SERVER['DOCUMENT_ROOT']."/expCounter/counter.php");
?>
<!--Ende der Einbindung des Counters-->
</div>
</div>
<?php include($_SERVER['DOCUMENT_ROOT']."/pages/shared/sponsorList.html.inc");?>
<footer>
<p>
<?php
if($_GET["jahr"]){
?>
<a href="http://validator.w3.org/check?uri=http%3A%2F%2Fcwsvjudo.bplaced.net%2Fpages%2Fdesktop%2Fverein.wettkampfkalender.php?jahr=<?php echo $_GET["jahr"]?>">Valid <img src="http://www.w3.org/html/logo/downloads/HTML5_1Color_Black.svg" alt="HTML 5" style="height:1em"></a>
<?php
}
else{
?>
<a href="http://validator.w3.org/check?uri=http%3A%2F%2Fcwsvjudo.bplaced.net%2Fpages%2Fdesktop%2Fverein.wettkampfkalender.php">Valid <img src="http://www.w3.org/html/logo/downloads/HTML5_1Color_Black.svg" alt="HTML 5" style="height:1em"></a>
<?php
}
?>
</p>
</footer>
<link rel="stylesheet" media="screen and (min-width: 641px)" href="/ressourcen/css/cwsvJudo.css" />
<link rel="stylesheet" media="screen and (max-width: 640px)" href="/ressourcen/css/cwsvJudoMobile.css" />
</body>
</html>
*/
//var_dump( $siteData['errors'] );
echo( $siteData['mainContent'] );
return;
}
?>

View File

@@ -0,0 +1,16 @@
---
cwsvJudoLogoWappen: &cwsvJudoLogoWappen
width: "64"
height: "52"
alt: "cwsvJudo"
title: "Judo im Chemnitzer WSV - Logo"
src: "http://cwsvjudo.bplaced.net/ressourcen/graphiken/logos/cwsvJudoLogoWappen.64w.png"
srcset: "http://cwsvjudo.bplaced.net/ressourcen/graphiken/logos/cwsvJudoLogoWappen.128w.png 2x, http://cwsvjudo.bplaced.net/ressourcen/graphiken/logos/cwsvJudoLogoWappen.x256.png 4x"
cwsvLogoWappen: &cwsvLogoWappen
width: "64"
height: "77"
alt: "CWSV"
title: "Chemnitzer WSV - Logo"
src: "http://cwsvjudo.bplaced.net/ressourcen/graphiken/logos/cwsvLogoWappen.64w.png"
srcset: "http://cwsvjudo.bplaced.net/ressourcen/graphiken/logos/cwsvLogoWappen.128w.png 2x, http://cwsvjudo.bplaced.net/ressourcen/graphiken/logos/cwsvLogoWappen.x250.png 4x"
...

View File

@@ -2,7 +2,7 @@
home: &home
caption: "Home"
url: "/"
icon: "http://cwsvjudo.bplaced.net/ressourcen/graphiken/logos/cwsvJudoLogoWappen.x256.png"
icon: *cwsvJudoLogoWappen
training: &training
caption: "Trainings&#173;zeiten"
icon: "http://cwsvjudo.bplaced.net/ressourcen/graphiken/icons/clockIconFriendly.svg"
@@ -11,7 +11,7 @@ training: &training
verein: &verein
caption: "Verein"
url: "/verein"
icon: "http://cwsvjudo.bplaced.net/ressourcen/graphiken/logos/cwsvLogoWappen.x250.png"
icon: *cwsvLogoWappen
wkKalender: &wkKalender
caption: "Wettkampf&shy;kalender"
icon: "http://cwsvjudo.bplaced.net/ressourcen/graphiken/icons/calendarIcon.svg"

View File

@@ -1,5 +1,6 @@
---
subNav:
- {caption: "Wettkampf&shy;kalender <?php echo(date('Y'));?>", icon: "http://cwsvjudo.bplaced.net/ressourcen/graphiken/icons/calendarIcon.svg", url: "/wkKalender?jahr=<?php echo(date('Y'));?>"}
- *home
- *galerien
- *training