Reenabled width and heigth in gallery table

This commit is contained in:
marko
2021-05-23 12:57:17 +02:00
parent 812394665c
commit ce6e9420bd
9 changed files with 126 additions and 82 deletions

View File

@@ -1,8 +1,8 @@
<?php <?php
/// Einbinden der Konfiguration, insbesondere Basisvariablen, /// Einbinden der Konfiguration, insbesondere Basisvariablen,
/// relative Pfadangabe /// relative Pfadangabe
/// - jedes Verzeichnis sollte seine eigene haben /// - jedes Verzeichnis sollte seine eigene haben
/// - theoretisch sollte es bereits von der aufrufenden Datei /// - theoretisch sollte es bereits von der aufrufenden Datei
/// eingebunden sein /// eingebunden sein
require_once("./config.inc.php"); require_once("./config.inc.php");
// include_once("./config.inc.php"); // include_once("./config.inc.php");
@@ -15,9 +15,9 @@
require_once($$basePath."/ressourcen/phpLib/cwsvJudo/newsTableHtml.php"); require_once($$basePath."/ressourcen/phpLib/cwsvJudo/newsTableHtml.php");
require_once($$basePath."/ressourcen/phpLib/cwsvJudo/galleryRedirector.php"); require_once($$basePath."/ressourcen/phpLib/cwsvJudo/galleryRedirector.php");
require_once($$basePath."/ressourcen/phpLib/phpcount/phpcount.php"); require_once($$basePath."/ressourcen/phpLib/phpcount/phpcount.php");
galleryRedirector(); galleryRedirector();
$if(phpTitleString)$ $if(phpTitleString)$
PHPCount::AddHit($phpTitleString$." (Amp)");?> PHPCount::AddHit($phpTitleString$." (Amp)");?>
$else$ $else$
@@ -87,7 +87,7 @@ $endfor$
.hamburger { .hamburger {
padding-left: .5em; padding-left: .5em;
padding-right: .5em; padding-right: .5em;
} }
#mainNav > a > span{ #mainNav > a > span{
width: 2em; width: 2em;
} }
@@ -112,7 +112,7 @@ $for(header-includes)$
$endfor$ $endfor$
<script async src="https://cdn.ampproject.org/v0.js"></script> <script async src="https://cdn.ampproject.org/v0.js"></script>
<script async custom-element="amp-sidebar" src="https://cdn.ampproject.org/v0/amp-sidebar-0.1.js"></script> <script async custom-element="amp-sidebar" src="https://cdn.ampproject.org/v0/amp-sidebar-0.1.js"></script>
<script type='application/ld+json'> <script type='application/ld+json'>
{ {
"@context": "http://www.schema.org", "@context": "http://www.schema.org",
"@type": "WebSite", "@type": "WebSite",
@@ -147,37 +147,37 @@ $endif$
<!-- Kopfzeile mit Titel, Promobildern und Breadcrumbs --> <!-- Kopfzeile mit Titel, Promobildern und Breadcrumbs -->
<header class="cwsvHeader"> <header class="cwsvHeader">
<div role="button" on="tap:sidebar1.toggle" tabindex="0" class="hamburger">☰</div> <div role="button" on="tap:sidebar1.toggle" tabindex="0" class="hamburger">☰</div>
<amp-img layout="responsive" <amp-img layout="responsive"
width="200" height="140" width="200" height="140"
title="Judo im Chemnitzer WSV" title="Judo im Chemnitzer WSV"
alt="Judo im Chemnitzer WSV - Promo" alt="Judo im Chemnitzer WSV - Promo"
src="http://cwsvjudo.bplaced.net/ressourcen/graphiken/banner/bannerlogo.1.jpg" src="http://cwsvjudo.bplaced.net/ressourcen/graphiken/banner/bannerlogo.1.jpg"
></amp-img> ></amp-img>
<span> <span>
<span>Judo</span> <span>Judo</span>
<span><?php $$zitat = getRandomCite( getCwsvJudoDbConn() ); echo($$zitat['zitat']);?></span> <span><?php $$zitat = getRandomCite( getCwsvJudoDbConn() ); echo($$zitat['zitat']);?></span>
</span> </span>
<amp-img layout="responsive" <amp-img layout="responsive"
width="64" height="52" width="128" height="104"
title="Judo im Chemnitzer WSV" title="Judo im Chemnitzer WSV"
alt="Judo im Chemnitzer WSV - Logo" alt="Judo im Chemnitzer WSV - Logo"
src="http://cwsvjudo.bplaced.net/ressourcen/graphiken/logos/cwsvJudoLogoWappen.64w.png" src="http://cwsvjudo.bplaced.net/ressourcen/graphiken/logos/cwsvJudoLogoWappen.128w.png"
srcset="http://cwsvjudo.bplaced.net/ressourcen/graphiken/logos/cwsvJudoLogoWappen.128w.png 2x, http://cwsvjudo.bplaced.net/ressourcen/graphiken/logos/cwsvJudoLogoWappen.x256.png 4x" srcset=http://cwsvjudo.bplaced.net/ressourcen/graphiken/logos/cwsvJudoLogoWappen.x256.png 2x"
></amp-img> ></amp-img>
</header> </header>
$if(mainNav)$ $if(mainNav)$
<nav id="mainNav"> <nav id="mainNav">
$for(mainNav)$ $for(mainNav)$
<a href="$mainNav.url$" <a href="$mainNav.url$"
$if(mainNav.caption)$title="$mainNav.caption$" $endif$ $if(mainNav.caption)$title="$mainNav.caption$" $endif$
$if(mainNav.active)$class="activeNav" $endif$ $if(mainNav.active)$class="activeNav" $endif$
> >
$if(mainNav.icon)$ $if(mainNav.icon)$
<span><amp-img layout="responsive" <span><amp-img layout="responsive"
src="$if(mainNav.icon.src)$$mainNav.icon.src$$else$$mainNav.icon$$endif$" src="$if(mainNav.icon.src)$$mainNav.icon.src$$else$$mainNav.icon$$endif$"
$if(mainNav.caption)$ $if(mainNav.caption)$
alt="$mainNav.caption$" alt="$mainNav.caption$"
$else$ $else$
$if(mainNav.icon.alt)$ $if(mainNav.icon.alt)$
alt="$mainNav.icon.alt$" alt="$mainNav.icon.alt$"
@@ -238,7 +238,7 @@ $body$
<a class="touchLink" title="Möglichkeiten mit dem Chemnitzer Freizeit- und Wohngebietssportverein in Kontakt zu treten" href="/kontakt" >Kontakt</a> <a class="touchLink" title="Möglichkeiten mit dem Chemnitzer Freizeit- und Wohngebietssportverein in Kontakt zu treten" href="/kontakt" >Kontakt</a>
<a class="touchLink" title="Impressum" href="/impressum" >Impressum</a> <a class="touchLink" title="Impressum" href="/impressum" >Impressum</a>
<a class="touchLink" title="Datenschutz" href="/datenschutz" >Datenschutz</a> <a class="touchLink" title="Datenschutz" href="/datenschutz" >Datenschutz</a>
<a class="touchLink" <a class="touchLink"
title="News-Feed Abonnieren" title="News-Feed Abonnieren"
href="http://cwsvjudo.bplaced.net/rss" href="http://cwsvjudo.bplaced.net/rss"
>Newsfeed >Newsfeed

View File

@@ -1,8 +1,8 @@
<?php <?php
/// Einbinden der Konfiguration, insbesondere Basisvariablen, /// Einbinden der Konfiguration, insbesondere Basisvariablen,
/// relative Pfadangabe /// relative Pfadangabe
/// - jedes Verzeichnis sollte seine eigene haben /// - jedes Verzeichnis sollte seine eigene haben
/// - theoretisch sollte es bereits von der aufrufenden Datei /// - theoretisch sollte es bereits von der aufrufenden Datei
/// eingebunden sein /// eingebunden sein
require_once("./config.inc.php"); require_once("./config.inc.php");
require_once($$basePath."/config/phpcount.config.php"); require_once($$basePath."/config/phpcount.config.php");
@@ -15,9 +15,9 @@
require_once($$basePath."/ressourcen/phpLib/cwsvJudo/newsLib.php"); require_once($$basePath."/ressourcen/phpLib/cwsvJudo/newsLib.php");
require_once($$basePath."/ressourcen/phpLib/cwsvJudo/galleryRedirector.php"); require_once($$basePath."/ressourcen/phpLib/cwsvJudo/galleryRedirector.php");
require_once($$basePath."/ressourcen/phpLib/phpcount/phpcount.php"); require_once($$basePath."/ressourcen/phpLib/phpcount/phpcount.php");
galleryRedirector(); galleryRedirector();
$if(phpTitleString)$ $if(phpTitleString)$
PHPCount::AddHit($phpTitleString$);?> PHPCount::AddHit($phpTitleString$);?>
$else$ $else$
@@ -78,7 +78,7 @@ $endfor$
$if(math)$ $if(math)$
$math$ $math$
$endif$ $endif$
<script type='application/ld+json'> <script type='application/ld+json'>
{ {
"@context": "http://www.schema.org", "@context": "http://www.schema.org",
"@type": "WebSite", "@type": "WebSite",
@@ -117,36 +117,36 @@ $endfor$
<body> <body>
<!-- Kopfzeile mit Titel, Promobildern und Breadcrumbs --> <!-- Kopfzeile mit Titel, Promobildern und Breadcrumbs -->
<header class="cwsvHeader"> <header class="cwsvHeader">
<img <img
width="200" height="140" width="200" height="140"
title="Judo im Chemnitzer WSV" alt="Judo im Chemnitzer WSV - Promo" title="Judo im Chemnitzer WSV" alt="Judo im Chemnitzer WSV - Promo"
src="http://cwsvjudo.bplaced.net/ressourcen/graphiken/banner/bannerlogo.1.jpg" src="http://cwsvjudo.bplaced.net/ressourcen/graphiken/banner/bannerlogo.1.jpg"
/> />
<span> <span>
<span>Judo</span> <span>Judo</span>
<span><?php $$zitat = getRandomCite( getCwsvJudoDbConn() ); echo($$zitat['zitat']);?></span> <span><?php $$zitat = getRandomCite( getCwsvJudoDbConn() ); echo($$zitat['zitat']);?></span>
</span> </span>
<img <img
width="64" height="52" width="128" height="104"
title="Judo im Chemnitzer WSV" title="Judo im Chemnitzer WSV"
alt="Judo im Chemnitzer WSV - Logo" alt="Judo im Chemnitzer WSV - Logo"
src="http://cwsvjudo.bplaced.net/ressourcen/graphiken/logos/cwsvJudoLogoWappen.64w.png" src="http://cwsvjudo.bplaced.net/ressourcen/graphiken/logos/cwsvJudoLogoWappen.128w.png"
srcset="http://cwsvjudo.bplaced.net/ressourcen/graphiken/logos/cwsvJudoLogoWappen.128w.png 2x, http://cwsvjudo.bplaced.net/ressourcen/graphiken/logos/cwsvJudoLogoWappen.x256.png 4x" srcset=http://cwsvjudo.bplaced.net/ressourcen/graphiken/logos/cwsvJudoLogoWappen.x256.png 2x"
/> />
</header> </header>
$if(mainNav)$ $if(mainNav)$
<nav id="mainNav"> <nav id="mainNav">
$for(mainNav)$ $for(mainNav)$
<a href="$mainNav.url$" <a href="$mainNav.url$"
$if(mainNav.caption)$title="$mainNav.caption$" $endif$ $if(mainNav.caption)$title="$mainNav.caption$" $endif$
$if(mainNav.active)$class="activeNav" $endif$ $if(mainNav.active)$class="activeNav" $endif$
> >
$if(mainNav.icon)$ $if(mainNav.icon)$
<span><img <span><img
src="$if(mainNav.icon.src)$$mainNav.icon.src$$else$$mainNav.icon$$endif$" src="$if(mainNav.icon.src)$$mainNav.icon.src$$else$$mainNav.icon$$endif$"
$if(mainNav.caption)$ $if(mainNav.caption)$
alt="$mainNav.caption$" alt="$mainNav.caption$"
$else$ $else$
$if(mainNav.icon.alt)$ $if(mainNav.icon.alt)$
alt="$mainNav.icon.alt$" alt="$mainNav.icon.alt$"
@@ -176,15 +176,15 @@ $endif$
$if(subNav)$ $if(subNav)$
<nav class="subNav"> <nav class="subNav">
$for(subNav)$ $for(subNav)$
<a href="$subNav.url$" <a href="$subNav.url$"
$if(subNav.caption)$title="$subNav.caption$" $endif$ $if(subNav.caption)$title="$subNav.caption$" $endif$
$if(subNav.active)$class="activeNav" $endif$ $if(subNav.active)$class="activeNav" $endif$
> >
$if(subNav.icon)$ $if(subNav.icon)$
<img <img
src="$if(subNav.icon.src)$$subNav.icon.src$$else$$subNav.icon$$endif$" src="$if(subNav.icon.src)$$subNav.icon.src$$else$$subNav.icon$$endif$"
$if(subNav.caption)$ $if(subNav.caption)$
alt="$subNav.caption$" alt="$subNav.caption$"
$else$ $else$
$if(subNav.icon.alt)$ $if(subNav.icon.alt)$
alt="$subNav.icon.alt$" alt="$subNav.icon.alt$"
@@ -207,7 +207,7 @@ $if(subNav)$
$if(subNav.caption)$<span>$subNav.caption$</span>$endif$ $if(subNav.caption)$<span>$subNav.caption$</span>$endif$
</a> </a>
$endfor$ $endfor$
<a href="#mainNav" <a href="#mainNav"
title="Hauptnavigation" title="Hauptnavigation"
> >
<img src="http://cwsvjudo.bplaced.net/ressourcen/graphiken/icons/arrowRightDown.svg" alt="Menü" /> <img src="http://cwsvjudo.bplaced.net/ressourcen/graphiken/icons/arrowRightDown.svg" alt="Menü" />
@@ -232,11 +232,11 @@ $body$
<aside class="sideNotes"><?php include_once( $$basePath."/pages/shared/sponsorlist.inc.html" );?></aside> <aside class="sideNotes"><?php include_once( $$basePath."/pages/shared/sponsorlist.inc.html" );?></aside>
<footer class="footerBar"> <footer class="footerBar">
<a class="touchLink" <a class="touchLink"
title="Seite auf HTML 5 Konformität prüfen" title="Seite auf HTML 5 Konformität prüfen"
href="http://validator.w3.org/check?uri=<?php echo(urlencode(getCurPagesUrl()));?>" href="http://validator.w3.org/check?uri=<?php echo(urlencode(getCurPagesUrl()));?>"
rel="nofollow" rel="nofollow"
>Valid <img >Valid <img
src="/ressourcen/graphiken/icons/HTML5_1Color_Black.svg" src="/ressourcen/graphiken/icons/HTML5_1Color_Black.svg"
alt="HTML 5" alt="HTML 5"
title="HTML 5 Logo" title="HTML 5 Logo"
@@ -245,10 +245,10 @@ $body$
<a class="touchLink" title="Möglichkeiten mit dem Chemnitzer Freizeit- und Wohngebietssportverein in Kontakt zu treten" href="/kontakt" >Kontakt</a> <a class="touchLink" title="Möglichkeiten mit dem Chemnitzer Freizeit- und Wohngebietssportverein in Kontakt zu treten" href="/kontakt" >Kontakt</a>
<a class="touchLink" title="Impressum" href="<?php echo($$baseUrl);?>/impressum" >Impressum</a> <a class="touchLink" title="Impressum" href="<?php echo($$baseUrl);?>/impressum" >Impressum</a>
<a class="touchLink" title="Datenschutz" href="<?php echo($$baseUrl);?>/datenschutz" >Datenschutz</a> <a class="touchLink" title="Datenschutz" href="<?php echo($$baseUrl);?>/datenschutz" >Datenschutz</a>
<a class="touchLink" <a class="touchLink"
title="News-Feed Abonnieren" title="News-Feed Abonnieren"
href="http://cwsvjudo.bplaced.net/rss" href="http://cwsvjudo.bplaced.net/rss"
><img ><img
src="/ressourcen/graphiken/icons/newsFeedIcon.svg" src="/ressourcen/graphiken/icons/newsFeedIcon.svg"
alt="Newsfeed" alt="Newsfeed"
title="News Feed Icon" title="News Feed Icon"

View File

@@ -8,7 +8,7 @@ global $cwsvJudoConfig;
$messages=array(); $messages=array();
//include_once($_SERVER['DOCUMENT_ROOT']."/config/db.inc"); //include_once($_SERVER['DOCUMENT_ROOT']."/config/db.inc");
// Datenbankverbindung herstellen // Datenbankverbindung herstellen
// $mysqlConn = @new mysqli($db_server, $db_user, $db_password, $db_name); // $mysqlConn = @new mysqli($db_server, $db_user, $db_password, $db_name);
$mysqlConn = @new mysqli( $mysqlConn = @new mysqli(
@@ -23,7 +23,7 @@ $messages=array();
else{ else{
// mögliche Werte für das Jahr herausfinden // mögliche Werte für das Jahr herausfinden
$galJahresListe = array(); $galJahresListe = array();
$queryJahresListe = " $queryJahresListe = "
SELECT DISTINCT DATE_FORMAT( datum, '%Y') SELECT DISTINCT DATE_FORMAT( datum, '%Y')
AS jahr AS jahr
@@ -31,7 +31,7 @@ $messages=array();
WHERE 1 WHERE 1
ORDER BY DATE_FORMAT( datum, '%Y' ) DESC; ORDER BY DATE_FORMAT( datum, '%Y' ) DESC;
"; ";
$mysqlResults = $mysqlConn->query($queryJahresListe); $mysqlResults = $mysqlConn->query($queryJahresListe);
if( !$mysqlResults ){ if( !$mysqlResults ){
$messages['error'][] = "Fehler bei Datenbankabfrage '".$queryJahresListe."'<br />"; $messages['error'][] = "Fehler bei Datenbankabfrage '".$queryJahresListe."'<br />";
@@ -41,10 +41,10 @@ $messages=array();
array_push( $galJahresListe, $mysqlResult['jahr']); array_push( $galJahresListe, $mysqlResult['jahr']);
} }
} }
// standardmäßig frage die letzten 12 Galerien ab // standardmäßig frage die letzten 12 Galerien ab
$queryGals = " $queryGals = "
SELECT id,datum,name,url,typ,teaserBildUrl SELECT id,datum,name,url,typ,teaserBildUrl,promoImgWidth,promoImgHeight
FROM cwsvjudo.wkGalerien FROM cwsvjudo.wkGalerien
WHERE 1 WHERE 1
ORDER BY datum DESC LIMIT 12 ORDER BY datum DESC LIMIT 12
@@ -55,29 +55,29 @@ $messages=array();
$minDate = $galJahr."-01-01"; $minDate = $galJahr."-01-01";
$maxDate = $galJahr."-12-31"; $maxDate = $galJahr."-12-31";
$queryGals = sprintf(" $queryGals = sprintf("
SELECT id,datum,name,url,typ,teaserBildUrl SELECT id,datum,name,url,typ,teaserBildUrl,promoImgWidth,promoImgHeight
FROM cwsvjudo.wkGalerien FROM cwsvjudo.wkGalerien
WHERE datum >= '%s' AND datum <= '%s' ORDER BY datum ASC;", WHERE datum >= '%s' AND datum <= '%s' ORDER BY datum ASC;",
$mysqlConn->real_escape_string($minDate), $mysqlConn->real_escape_string($minDate),
$mysqlConn->real_escape_string($maxDate) $mysqlConn->real_escape_string($maxDate)
); );
} }
if($_GET['veranstaltungsArt']=="Feier"){ if($_GET['veranstaltungsArt']=="Feier"){
$queryGals = $queryGals =
"SELECT id,datum,name,url,typ,teaserBildUrl ". "SELECT id,datum,name,url,typ,teaserBildUrl,promoImgWidth,promoImgHeight ".
"FROM cwsvjudo.wkGalerien ". "FROM cwsvjudo.wkGalerien ".
"WHERE veranstaltungsArt = 'Feier' ORDER BY datum DESC;"; "WHERE veranstaltungsArt = 'Feier' ORDER BY datum DESC;";
} }
if($_GET['veranstaltungsArt']=="Zelten"){ if($_GET['veranstaltungsArt']=="Zelten"){
$queryGals = $queryGals =
"SELECT id,datum,name,url,typ,teaserBildUrl ". "SELECT id,datum,name,url,typ,teaserBildUrl,promoImgWidth,promoImgHeight ".
"FROM cwsvjudo.wkGalerien ". "FROM cwsvjudo.wkGalerien ".
"WHERE veranstaltungsArt = 'Zelten' ORDER BY datum DESC;"; "WHERE veranstaltungsArt = 'Zelten' ORDER BY datum DESC;";
} }
$galListe = array(); $galListe = array();
$mysqlResults = $mysqlConn->query($queryGals); $mysqlResults = $mysqlConn->query($queryGals);
if( !$mysqlResults ){ if( !$mysqlResults ){
@@ -89,7 +89,7 @@ $messages=array();
} }
} }
} }
// Für den Fall einer ampSeite darf ich kein form ohne https verwenden // Für den Fall einer ampSeite darf ich kein form ohne https verwenden
if( strpos( $_SERVER['ORIG_PATH_TRANSLATED'], "pages/amp" ) !== false ){ if( strpos( $_SERVER['ORIG_PATH_TRANSLATED'], "pages/amp" ) !== false ){
if( !is_array($galJahresListe) ) if( !is_array($galJahresListe) )
@@ -112,7 +112,7 @@ $messages=array();
"<optgroup label=\"Jahresauswahl\">". "<optgroup label=\"Jahresauswahl\">".
"<option value=\"\"".($galJahr!="" ? "" : " selected")." >Neueste</option>" "<option value=\"\"".($galJahr!="" ? "" : " selected")." >Neueste</option>"
); );
if( !is_array($galJahresListe) ) if( !is_array($galJahresListe) )
$messages['error'][] = "<div>Fehler bei der Jahreszahlenabfrage!</div>"; $messages['error'][] = "<div>Fehler bei der Jahreszahlenabfrage!</div>";
else{ else{
@@ -130,15 +130,15 @@ $messages=array();
"</noscript>". "</noscript>".
"</form>" "</form>"
); );
}// Ende responsiver Jahresselector }// Ende responsiver Jahresselector
echo( echo(
"<table class=\"galTable\">". "<table class=\"galTable\">".
"<thead><tr><th>Datum</th><th>Link zur Galerie</th></tr></thead>". "<thead><tr><th>Datum</th><th>Link zur Galerie</th></tr></thead>".
"<tbody>" "<tbody>"
); );
if( !is_array($galListe) ) if( !is_array($galListe) )
$messages['error'][] = "<div>Fehler bei der Galerienabfrage!</div>"; $messages['error'][] = "<div>Fehler bei der Galerienabfrage!</div>";
else{ else{
@@ -161,10 +161,20 @@ $messages=array();
"<td >". "<td >".
"<a href=\"".mb_convert_encoding($gal['url'], 'UTF-8', 'ISO-8859-1')."?galId=".$gal['id']."\">" "<a href=\"".mb_convert_encoding($gal['url'], 'UTF-8', 'ISO-8859-1')."?galId=".$gal['id']."\">"
); );
$tempString = ($gal['teaserBildUrl'] != "" ? "<div><img title=\"".mb_convert_encoding($gal['name'], 'UTF-8', 'ISO-8859-1')." - Bilder der Judoka des Chemnitzer WSV\" alt=\"Teaserbild ".mb_convert_encoding($gal['name'], 'UTF-8', 'ISO-8859-1')."\" src=\"".mb_convert_encoding($gal['teaserBildUrl'], 'UTF-8', 'ISO-8859-1')."\"/></div>" : "");
// width and height of the promoImg
$width_height_string = "width=\"200\" height=\"133\"";
if(
is_positive_integer($gal['promoImgWidth'])
&& is_positive_integer($gal['promoImgHeight'])
){
$width_height_string = "width=\"".strval($gal['promoImgWidth'])."\" height=\"".strval($gal['promoImgHeight'])."\"";
}
$tempString = ($gal['teaserBildUrl'] != "" ? "<div><img title=\"".mb_convert_encoding($gal['name'], 'UTF-8', 'ISO-8859-1')." - Bilder der Judoka des Chemnitzer WSV\" alt=\"Teaserbild ".mb_convert_encoding($gal['name'], 'UTF-8', 'ISO-8859-1')."\" src=\"".mb_convert_encoding($gal['teaserBildUrl'], 'UTF-8', 'ISO-8859-1')."\" ".$width_height_string."/></div>" : "");
//echo($_SERVER['ORIG_PATH_TRANSLATED']); //echo($_SERVER['ORIG_PATH_TRANSLATED']);
if( strpos( $_SERVER['ORIG_PATH_TRANSLATED'], "pages/amp" ) !== false ){ if( strpos( $_SERVER['ORIG_PATH_TRANSLATED'], "pages/amp" ) !== false ){
$tempString = str_replace("<img", "<amp-img layout=\"responsive\" width=\"200\" height=\"133\"", $tempString); $tempString = str_replace("<img", "<amp-img layout=\"responsive\" ", $tempString);
$tempString = str_replace("/>", "></amp-img>", $tempString); $tempString = str_replace("/>", "></amp-img>", $tempString);
} }
echo( $tempString ); echo( $tempString );
@@ -191,7 +201,7 @@ if( is_positive_integer($aGalleryId) ){
$query="SELECT url FROM wkGalerien WHERE id = \"".$_aGalleryId."\" ORDER BY Datum ASC LIMIT 1;"; $query="SELECT url FROM wkGalerien WHERE id = \"".$_aGalleryId."\" ORDER BY Datum ASC LIMIT 1;";
$ergebnis = $db_connection->query( $query ); $ergebnis = $db_connection->query( $query );
$galleryLink = $ergebnis->fetchAll(); $galleryLink = $ergebnis->fetchAll();
return $galleryLink[0]['url']; return $galleryLink[0]['url'];
$db_connection = NULL; $db_connection = NULL;
} }

View File

@@ -10,6 +10,8 @@ $message = array();
$limit = is_positive_integer($someOptions['limit'])?$someOptions['limit']:1; $limit = is_positive_integer($someOptions['limit'])?$someOptions['limit']:1;
$headerRootLevel = is_positive_integer($someOptions['$headerRootLevel'])?$someOptions['$headerRootLevel']:1;
/// Eine Datenbankverbindung (über pdo) erstellen /// Eine Datenbankverbindung (über pdo) erstellen
try{ try{
$db_connection = new PDO( $db_connection = new PDO(
@@ -22,24 +24,24 @@ $limit = is_positive_integer($someOptions['limit'])?$someOptions['limit']:1;
catch(PDOException $db_error){ catch(PDOException $db_error){
$messages['errors'][] = "Error: " . $db_error->getMessage(); $messages['errors'][] = "Error: " . $db_error->getMessage();
} }
// News abfragen // News abfragen
// @todo: woher das limit nehmen? // @todo: woher das limit nehmen?
// $newsList = getNews($db_connection, array('limit'=>$limit)); // $newsList = getNews($db_connection, array('limit'=>$limit));
$newsList = getNews($db_connection, $someOptions); $newsList = getNews($db_connection, $someOptions);
$newsHeading = "Aktuelle Meldungen"; $newsHeading = "Aktuelle Meldungen";
//var_dump($options); //var_dump($options);
if($someOptions['newsId']) $newsHeading=$newsList[0]['betreff']; if($someOptions['newsId']) $newsHeading=$newsList[0]['betreff'];
if($someOptions['jahr']) $newsHeading="Nachrichten des Jahres ".$someOptions['jahr']; if($someOptions['jahr']) $newsHeading="Nachrichten des Jahres ".$someOptions['jahr'];
echo("<h1>".$newsHeading."</h1>"); echo("<h".strval($headerRootLevel).">".$newsHeading."</h".$headerRootLevel.">");
if( is_array( $newsList ) || is_object( $newsList ) ) if( is_array( $newsList ) || is_object( $newsList ) )
foreach($newsList as $news) foreach($newsList as $news)
echo( getHtmlNews($news, "headingLevel=2")."<hr />" ); echo( getHtmlNews($news, "headingLevel=".strval($headerRootLevel+1))."<hr />" );
else else
$messages['errors'][] = "Fehler: Keine Neuigkeiten gefunden!"; $messages['errors'][] = "Fehler: Keine Neuigkeiten gefunden!";
// @todo: besser machen! // @todo: besser machen!
if(!empty($messages)) if(!empty($messages))
var_dump($messages); var_dump($messages);

View File

@@ -31,6 +31,8 @@
/* float: right;*/ /* float: right;*/
display: inline; display: inline;
vertical-align: middle; vertical-align: middle;
width: 100%;
height:auto;
} }
.galTable time{ .galTable time{

View File

@@ -0,0 +1,27 @@
.wkInfoBox nav>ul{
padding:0%;
}
.wkInfoBox nav{
padding:1%;
}
.wkInfoBox nav>ul>li{
padding:.25em;
margin:.25em;
box-shadow:.1em .1em .05em grey;
background-color:#ff8100;
border-radius:.5em;
list-style-type:none;
}
.wkInfoBox{
box-shadow:0 1px 3px #0000001f,0 1px 2px;
}
.wkInfoBox h1{
background:#ff8100;
font-size:1.2em;margin:0;
}
.wkInfoBox h2{
background:#ff8100;
font-size:1.1em;
margin:0;
}

View File

@@ -12,16 +12,16 @@ jsonSdFiles:
- cwsvJudo.json - cwsvJudo.json
... ...
# Willkommen # Herzlich willkommen
auf der Website des Judo-Teams des [Chem&shy;nitzer Frei&shy;zeit- und Wohng&shy;ebiets&shy;sport&shy;vereines e.&nbsp;V.][cwsvHomepage] auf der Website des Judo-Teams des [Chem&shy;nitzer Frei&shy;zeit- und Wohng&shy;ebiets&shy;sport&shy;vereines e.&nbsp;V.][cwsvHomepage]
Hier findet ihr Informationen zu unseren [Trainingszeiten][cwsvJudoTraining] Hier findet ihr Informationen zu unseren [Trainingszeiten][cwsvJudoTraining]
und [Wettkampfterminen][cwsvJudoWettkampfKalender]. und [Wettkampfterminen][cwsvJudoWettkampfKalender].
Ein kleines Wiki bietet [Wissenswertes über Judo][cwsvJudoWiki], wie Ein kleines Wiki bietet [Wissenswertes über Judo][cwsvJudoWiki], wie
zum Beispiel das [Programm für die Gürtelprüfungen][cwsvJudoWikiKyu]. zum Beispiel das [Programm für die Gürtelprüfungen][cwsvJudoWikiKyu].
<?php $options['limit']=6; echoNewsTableHtml( $options );?> <?php $options=array(); $options['limit']=6; $options['headerRootLevel']=1; echoNewsTableHtml( $options ); ?>
[cwsvHomepage]: http://www.cwsv-sport.de "Homepage des Chemnitzer Freizeit- und Wohngebietssportvereines" [cwsvHomepage]: http://www.cwsv-sport.de "Homepage des Chemnitzer Freizeit- und Wohngebietssportvereines"
[cwsvJudoTraining]: http://cwsvjudo.bplaced.net/trainingszeiten "Trainingszeiten der Judoka des Chemnitzer Freizeit- und Wohngebietssportvereines" [cwsvJudoTraining]: http://cwsvjudo.bplaced.net/trainingszeiten "Trainingszeiten der Judoka des Chemnitzer Freizeit- und Wohngebietssportvereines"

View File

@@ -1,31 +1,32 @@
--- ---
lang: de lang: de
title: Kontaktformationen des Chemnitzer Freizeit- und Wohngebiets&shy;sportvereines e.&#x202f;V. title: Kontaktformationen des Chemnitzer WSV e.&#x202f;V.
author: marko author: marko
keywords: keywords:
- Judo - Kontakt
- Chemnitz
- Chemnitzer Freizeit- und Wohngebietssportverein - Chemnitzer Freizeit- und Wohngebietssportverein
- Chemnitz
- Judo
description: "Verschiedene Möglichkeiten Kontakt mit dem Chemnitzer Freizeit- und Wohngebietssportverein e.&#x202f;V. aufzunehmen" description: "Verschiedene Möglichkeiten Kontakt mit dem Chemnitzer Freizeit- und Wohngebietssportverein e.&#x202f;V. aufzunehmen"
canonicalLink: "http://cwsvjudo.bplaced.net/kontakt" canonicalLink: "http://cwsvjudo.bplaced.net/kontakt"
ampVersionLink: "http://amp.cwsvjudo.bplaced.net/kontakt" ampVersionLink: "http://amp.cwsvjudo.bplaced.net/kontakt"
... ...
# Kontakt # &#9993; Kontaktformationen
Hier findet Ihr [eMail-Adressen](#email), [Telephonnummern](#telephon) Hier findet Ihr [eMail-Adressen](#email), [Telephonnummern](#telephon)
und [Adressen](#adressen), um mit uns in Kontakt zu treten. und [Adressen](#adressen), um mit uns in Kontakt zu treten.
## E-Mail ## E-Mail
- [eMail an den Chemnitzer Freizeit- und Wohngebietssportverein e.&#x202f;V.(cwsv.sb@web.de)](mailto:cwsv.sb@web.de) - [eMail an den Chemnitzer Freizeit- und Wohngebietssportverein e.&#x202f;V.(cwsv.sb@web.de)](mailto:cwsv.sb@web.de)
- Link zum [Kontaktformular][cwsvKontaktFormular] auf der Homepage - Link zum [Kontaktformular][cwsvKontaktFormular] auf der Homepage
des Chemnitzer Freizeit- und Wohngebietssportvereines des Chemnitzer Freizeit- und Wohngebietssportvereines
- ![eMail](http://cwsvjudo.bplaced.net/ressourcen/graphiken/misc/abc123.png){.pngAddress width="420" height="60"} - ![eMail](http://cwsvjudo.bplaced.net/ressourcen/graphiken/misc/abc123.png){.pngAddress width="420" height="60"}
## Adressen ## Adressen
- CWSV - Verwaltung ([Karte][cwsvVerwaltungKarte]) - CWSV - Verwaltung ([Karte][cwsvVerwaltungKarte])
- Strasse Usti nad Labem 42 - Straße Usti nad Labem 42
- 09119 Chemnitz - 09119 Chemnitz
- Mo 8:00-16:30, Di 10:00-17:00, Mi 8:00-17:00, Do 10:00-17:00 - Mo 8:00-16:30, Di 10:00-17:00, Mi 8:00-17:00, Do 10:00-17:00
@@ -38,4 +39,3 @@ des Chemnitzer Freizeit- und Wohngebietssportvereines
[cwsvKontaktFormular]: http://www.cwsv-sport.de/Kontakt.htm "Karte der Verwaltung des Chemnitzer WSV" [cwsvKontaktFormular]: http://www.cwsv-sport.de/Kontakt.htm "Karte der Verwaltung des Chemnitzer WSV"
[cwsvVerwaltungKarte]: http://www.openstreetmap.org/?mlat=50.807643&mlon=12.882060#map=17/50.807643/12.882060 [cwsvVerwaltungKarte]: http://www.openstreetmap.org/?mlat=50.807643&mlon=12.882060#map=17/50.807643/12.882060

View File

@@ -0,0 +1,3 @@
<?php
?>