Aufräumarbeiten im Zweig redesign2018
Auf Branch redesign2018 zum Commit vorgemerkte Änderungen: neue Datei: backup/ampPages-backup-2018-06-11-06-49/.htaccess neue Datei: backup/ampPages-backup-2018-06-11-06-49/config.inc.php neue Datei: backup/ampPages-backup-2018-06-11-06-49/css/cwsvJudoAmp.css neue Datei: backup/ampPages-backup-2018-06-11-06-49/cwsvJudo.ampTemplate.inc.php neue Datei: backup/ampPages-backup-2018-06-11-06-49/expCounter/counter.php neue Datei: backup/ampPages-backup-2018-06-11-06-49/galerien.php neue Datei: backup/ampPages-backup-2018-06-11-06-49/googlef3ad27a876479282.html neue Datei: backup/ampPages-backup-2018-06-11-06-49/index.php neue Datei: backup/ampPages-backup-2018-06-11-06-49/kontakt.php neue Datei: backup/ampPages-backup-2018-06-11-06-49/news.php neue Datei: backup/ampPages-backup-2018-06-11-06-49/newsDev.php neue Datei: backup/ampPages-backup-2018-06-11-06-49/pages/desktop/verein.galerien.php neue Datei: backup/ampPages-backup-2018-06-11-06-49/phpLib/ampify.php neue Datei: backup/ampPages-backup-2018-06-11-06-49/phpLib/cwsvJudoAmpLib.php neue Datei: backup/ampPages-backup-2018-06-11-06-49/robots.txt neue Datei: backup/ampPages-backup-2018-06-11-06-49/sitemap.xml neue Datei: backup/ampPages-backup-2018-06-11-06-49/trainingszeiten.php neue Datei: backup/ampPages-backup-2018-06-11-06-49/urllist.txt neue Datei: backup/ampPages-backup-2018-06-11-06-49/verein.training.php neue Datei: backup/config.inc.php neue Datei: graphiken/icons/cwsv.ico neue Datei: impressumsVorlagen/impressum-recht-de.html neue Datei: impressumsVorlagen/impressum-recht.de neue Datei: impressumsVorlagen/muster_impressum_vorlage_von_www_jurarat_de.txt neue Datei: impressumsVorlagen/sqr-law.de gelöscht: phpLib/imgGallery.square7/indexDev.php.tmpl.orig neue Datei: sitemap.xml geändert: src/Makefiles/Makefile.vp9 neue Datei: src/tools/config.inc.php neue Datei: src/tools/index.php neue Datei: src/tools/indexHier.php neue Datei: src/tools/indexInArbeit.php neue Datei: src/tools/mkGalGen/Makefile.mkGalGen neue Datei: src/tools/mkGalGen/ReadMe.md neue Datei: src/tools/mkGalGen/createImageList.py neue Datei: src/tools/mkGalGen/jpgListCreator.py neue Datei: src/tools/mkGalGen/jpgListLoader.py neue Datei: src/tools/mkGalGen/jpgSelector.py neue Datei: src/tools/mkGalGen/jsonAlbumTest-Template.sh neue Datei: src/tools/mkGalGen/jsonJpgList2IndexPhp.py neue Datei: src/tools/mkGalGen/jsonJpgList2Makefile.py neue Datei: src/tools/mkGalGen/jsonJpgList2ViewPhp.py neue Datei: src/tools/mkGalGen/sortierer.py neue Datei: src/tools/mkGalGen/testingArea/Makefile
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
RewriteEngine on
|
||||
RewriteRule ^photoalben/(.*) http://cwsvjudo\.bplaced\.net/photoalben/$1
|
||||
RewriteRule ^ressourcen/(.*)$ http://cwsvjudo\.bplaced\.net/ressourcen/$1
|
||||
RewriteRule ^/ressourcen/(.*)$ http://cwsvjudo\.bplaced\.net/ressourcen/$1
|
||||
|
||||
RewriteCond %{HTTP_HOST} cwsvjudo.bplaced.net
|
||||
RewriteRule ^news$ news\.php [L]
|
||||
RewriteCond %{HTTP_HOST} cwsvjudo.bplaced.net
|
||||
RewriteRule ^news/([0-9]+)$ news\.php?newsId=$1
|
||||
|
||||
RewriteCond %{HTTP_HOST} amp.cwsvjudo.bplaced.net
|
||||
RewriteRule ^news$ news\.php [L]
|
||||
RewriteCond %{HTTP_HOST} amp.cwsvjudo.bplaced.net
|
||||
RewriteRule ^news/([0-9]+)$ news\.php?newsId=$1 [L]
|
||||
@@ -0,0 +1,20 @@
|
||||
<?php
|
||||
/// Die Basisdomain, unter der die Hauptseite zu erreichen ist
|
||||
$baseDomain = "cwsvjudo.bplaced.net";
|
||||
/// Subdomain, unter dem dieses Verzeichnis zu finden ist (falls der Fall gegeben ist)
|
||||
$subDomain = "amp";
|
||||
/// Basis(/Root)-Verzeichnis auf dem Server (für Dateizugriffe, insbesondere phpIncludes)
|
||||
$basePath = "/users/cwsvjudo/www";
|
||||
|
||||
/// Url zum Zugriff auf "shared Data" unter der Hauptadresse
|
||||
$baseUrl = "http://".$baseDomain;
|
||||
/// Die kanonische Url dieses Verzeichnisses (unter welcher
|
||||
/// Domainadresse die Seiten dieses Verzeichnisses bevorzugt zu
|
||||
/// erreichen seien sollen, also entweder eine SubdomainUrl, oder die
|
||||
/// baseUrl mit dem Verzeichnis angehängt)
|
||||
/// Achtung: Gedacht für eine einheitliche Bezeichnung bei internem
|
||||
/// Verlinken. Der canonicalLink im Header ist bei ampSeiten nicht die
|
||||
/// eigene Adresse, sondern die (kanonische) Adresse der "normalen"
|
||||
/// Version der Seite.
|
||||
$canonicalBaseUrl = "http://".$subDomain.".".$baseDomain;
|
||||
?>
|
||||
@@ -0,0 +1,233 @@
|
||||
/*
|
||||
@font-face {
|
||||
font-family: Orbitron-Medium;
|
||||
src: url(/ressourcen/fonts/Orbitron-Medium.otf);
|
||||
}
|
||||
*/
|
||||
html{
|
||||
background: #FFAE00;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
*, ::before, ::after {
|
||||
box-sizing: inherit;
|
||||
}
|
||||
|
||||
body{
|
||||
font-size: 4.5vmin;
|
||||
font-family: arial, helvetica, sans-serif;
|
||||
background: #FFAE00;
|
||||
}
|
||||
|
||||
|
||||
.newsTable{
|
||||
border: solid 1px #000000;
|
||||
width:100%;
|
||||
padding: 1%;
|
||||
}
|
||||
|
||||
.newsTableHeader{
|
||||
background: #FF8100;
|
||||
}
|
||||
.newsTableFooter{
|
||||
clear: both;
|
||||
background: #FF8100;
|
||||
}
|
||||
|
||||
.bigPicture{
|
||||
width: 100%;
|
||||
height: auto;
|
||||
}
|
||||
|
||||
.centeredText{
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.orbitronFont{
|
||||
font-family: "Orbitron-Medium", Impact, Charcoal, sans-serif;
|
||||
padding-top: .16em;
|
||||
}
|
||||
|
||||
.Inhaltsverzeichnis{
|
||||
padding: 1%;
|
||||
width: 100%;
|
||||
background-color:
|
||||
#FF8100;
|
||||
font-variant:
|
||||
small-caps;
|
||||
font-size:
|
||||
larger;
|
||||
font-weight:
|
||||
bolder;
|
||||
}
|
||||
.Inhaltsverzeichnis a{
|
||||
color: inherit;
|
||||
}
|
||||
.Inhaltsverzeichnis div a:hover{
|
||||
text-decoration:
|
||||
none;
|
||||
color:
|
||||
#993300;
|
||||
}
|
||||
|
||||
.navButton{
|
||||
border-color: white;
|
||||
border-style: outset;
|
||||
border-radius: 1em;
|
||||
text-align: center;
|
||||
text-decoration: none;
|
||||
cursor: pointer;
|
||||
display: inline-block;
|
||||
padding-left: .5em;
|
||||
padding-right: .5em;
|
||||
}
|
||||
|
||||
.messageBox{
|
||||
width: 100%;
|
||||
border:solid 1px #000000;
|
||||
background-color:#FF8100;
|
||||
font-size:smaller;
|
||||
}
|
||||
|
||||
.fullWidth{
|
||||
width:100%;
|
||||
}
|
||||
|
||||
.noMargin{
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.rightFloat{
|
||||
float:right;
|
||||
}
|
||||
|
||||
.leftFloat{
|
||||
float:left;
|
||||
}
|
||||
|
||||
.clearBoth{
|
||||
clear: both;
|
||||
}
|
||||
|
||||
/*---
|
||||
* Formatierung der News in Amp
|
||||
*/
|
||||
.ampNewsBox{
|
||||
clear: both;
|
||||
border: solid 1px #000000;
|
||||
width:100%;
|
||||
padding: 1%;
|
||||
}
|
||||
.ampNewsBoxHeader{
|
||||
background: #FF8100;
|
||||
}
|
||||
.ampNewsBoxFooter{
|
||||
clear: both;
|
||||
background: #FF8100;
|
||||
}
|
||||
/*---
|
||||
* Formatierung der subNav in Amp
|
||||
*/
|
||||
.ampSubNav{
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
/*---
|
||||
* touchable Links
|
||||
*/
|
||||
.touchLink{
|
||||
display: inline-block;
|
||||
padding: 0.25em 0 0.25em 0;
|
||||
margin: 0.25em 0 0.25em 0;
|
||||
background-color: #FF8100;
|
||||
border-radius: .5em;
|
||||
box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
|
||||
}
|
||||
|
||||
/*---
|
||||
* Eine kleine NachrichtenBox
|
||||
*/
|
||||
.messageBox{
|
||||
width: 100%;
|
||||
border:solid 1px #000000;
|
||||
background-color:#FF8100;
|
||||
font-size:smaller;
|
||||
}
|
||||
|
||||
/*
|
||||
* Unterauswahl-Navigationsleiste
|
||||
*/
|
||||
|
||||
/* der SubNavContainer*/
|
||||
.subNav{
|
||||
display: flex;
|
||||
/* flex-direction: column;*/
|
||||
align-items: stretch;
|
||||
justify-content: space-between;
|
||||
}
|
||||
.subNav a{
|
||||
color: inherit;
|
||||
}
|
||||
.subNavElement{
|
||||
/*width: 100%;*/
|
||||
background: #FF8100;
|
||||
padding-top:.125em;
|
||||
padding-left:.125em;
|
||||
padding-right:.125em;
|
||||
border-style: outset;
|
||||
border-radius: 1em;
|
||||
font-size: 1.125em;
|
||||
text-decoration: none;
|
||||
flex-basis: 20%;
|
||||
border-style: outset;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
text-align: center;
|
||||
}
|
||||
.subNavElementIcon{
|
||||
text-align: center;
|
||||
max-width: 2.5em;
|
||||
height: auto;
|
||||
padding: .125em;
|
||||
}
|
||||
.subNavElementCaption{
|
||||
display: none;
|
||||
}
|
||||
|
||||
.activeNav {
|
||||
border-color: #A80101;
|
||||
border-style: inset;
|
||||
}
|
||||
.pngAddress{
|
||||
width: 20em;
|
||||
height: auto;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Tabelle mit den GalerieLinks
|
||||
*/
|
||||
.galTable{
|
||||
width: 100%;
|
||||
}
|
||||
.galTable tr, th, td {
|
||||
width: auto;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.galTable tr:nth-child(odd){
|
||||
background-color: #FF8100;
|
||||
}
|
||||
|
||||
.galTable tr td img{
|
||||
display: inline;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.galTable tr td a img{
|
||||
display: inline;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,107 @@
|
||||
<?php
|
||||
/// Einbinden der Konfiguration, insbesondere Basisvariablen
|
||||
/// relative Pfadangabe, jedes Verzeichnis soll seine eigene haben
|
||||
require_once("./config.inc.php");
|
||||
/// Daten für den Datenbankzugriff
|
||||
require_once( $basePath."/bonus/db.inc");
|
||||
|
||||
/// Bibliothek mit verschienden Hilfsfunktionen
|
||||
require_once( $basePath."/ressourcen/phpLib/miscAssis.php");
|
||||
/// Bibliothek für die Arbeit mit der Newsdatenbank
|
||||
// require_once( $basePath."/ressourcen/phpLib/newsLib.php");
|
||||
|
||||
?>
|
||||
|
||||
<!doctype html>
|
||||
<html amp lang="de">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<script async src="https://cdn.ampproject.org/v0.js"></script>
|
||||
<meta name="viewport" content="width=device-width,minimum-scale=1">
|
||||
<style amp-boilerplate>body{-webkit-animation:-amp-start 8s steps(1,end) 0s 1 normal both;-moz-animation:-amp-start 8s steps(1,end) 0s 1 normal both;-ms-animation:-amp-start 8s steps(1,end) 0s 1 normal both;animation:-amp-start 8s steps(1,end) 0s 1 normal both}@-webkit-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-moz-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-ms-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-o-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}</style><noscript><style amp-boilerplate>body{-webkit-animation:none;-moz-animation:none;-ms-animation:none;animation:none}</style></noscript>
|
||||
|
||||
<style amp-custom>
|
||||
<?php require_once("./css/cwsvJudoAmp.css");?>
|
||||
<?php echo( "@font-face {font-family: Orbitron-Medium;src: url(".$baseUrl."/ressourcen/fonts/Orbitron-Medium.otf);}\n" );?>
|
||||
</style>
|
||||
|
||||
<!-- favIcon und Co nach der Empfehlung von https://github.com/audreyr/favicon-cheat-sheet -->
|
||||
<?php require_once($basePath."/pages/shared/faviconAmp.inc.html");?>
|
||||
|
||||
<link rel="canonical" href="<?php echo ( empty($siteData['canonicalLink']) ? getCurPagesUrl() : $siteData['canonicalLink'] );?>" />
|
||||
|
||||
<?php echo( empty($siteData['jsonDataHeader'])?"":$siteData['jsonDataHeader'] );?>
|
||||
|
||||
<title><?php echo( !empty($siteData['title']) ? $siteData['title'] : "Judo im Chemnitzer WSV" );?></title>
|
||||
</head>
|
||||
<body>
|
||||
<div class="messageBox">
|
||||
Dies ist die "mobile" Version für Smartphones etc.<br/>
|
||||
<a href="<?php echo( empty($siteData['canonicalLink']) ? $baseUrl : $siteData['canonicalLink'] );?>">Hier gibt es die Desktop-Variante</a>
|
||||
</div>
|
||||
<?php echo(empty($messages['error']) ? "" : "<div class=\"\">".$messages['error']."</div>");?>
|
||||
<header>
|
||||
<h1 class="noMargin centeredText orbitronFont">
|
||||
<?php echo( empty($siteData['headline']) ? "Judo im CWSV" : $siteData['headline']); ?>
|
||||
</h1>
|
||||
</header>
|
||||
|
||||
<hr />
|
||||
|
||||
<main>
|
||||
<?php echo( empty($siteData['subNav']) ? "" : $siteData['subNav'] );?>
|
||||
<?php
|
||||
if(!empty($siteData['content'])) foreach($siteData['content'] as $section){
|
||||
foreach($section as $article){
|
||||
echo $article;
|
||||
}
|
||||
}
|
||||
?>
|
||||
</main>
|
||||
|
||||
<hr />
|
||||
|
||||
<div class="orbitronFont" id="Inhaltsverzeichnis">
|
||||
<div class="Inhaltsverzeichnis">
|
||||
<a
|
||||
title="Bekanntmachungen der Sektion Judo des Chemnitzer Freizeit- und Wohngebietssportvereines"
|
||||
href="<?php echo($canonicalBaseUrl."/");?>news.php"
|
||||
>
|
||||
<div class="navButton fullWidth">Bekanntmachungen</div>
|
||||
</a>
|
||||
<a
|
||||
title="Trainingszeiten und -stätten der Sektion Judo des Chemnitzer Freizeit- und Wohngebietssportvereines"
|
||||
href="<?php echo($canonicalBaseUrl."/");?>trainingszeiten.php"
|
||||
>
|
||||
<div class="navButton fullWidth">Trainingszeiten</div>
|
||||
</a>
|
||||
<!-- Restlichen Buttons sind noch nicht eingeplegt-->
|
||||
<a
|
||||
title="Termine, Ausschreibungen und Wegbeschreibungen der Wettkämpfe der Sektion Judo des Chemnitzer Freizeit- und Wohngebietssportvereines"
|
||||
href="http://cwsvjudo.bplaced.net/pages/mobile/verein.wettkampfkalender.php"
|
||||
>
|
||||
<div class="navButton fullWidth">Wettkampfkalender</div>
|
||||
</a>
|
||||
<a
|
||||
title="Wettkampfplaner der Sektion Judo des Chemnitzer Freizeit- und Wohngebietssportvereines"
|
||||
href="http://cwsvjudo.bplaced.net/pages/desktop/wkParticipo"
|
||||
>
|
||||
<div class="navButton fullWidth">Wettkampfplaner</div>
|
||||
</a>
|
||||
<a
|
||||
title="Alben mit Bildern und Videos der Wettkämpfe der Sektion Judo des Chemnitzer Freizeit- und Wohngebietssportvereines"
|
||||
href="http://cwsvjudo.bplaced.net/pages/mobile/verein.wettkampfgalerien.php"
|
||||
>
|
||||
<div class="navButton fullWidth">Wettkampfgalerien</div>
|
||||
</a>
|
||||
<a
|
||||
title="eMail-Adressen, Telephonnummern und Adressen um mit dem Chemnitzer Freizeit- und Wohngebietssportverein Verbindung aufzunehmen"
|
||||
href="<?php echo($canonicalBaseUrl."/");?>kontakt.php"
|
||||
>
|
||||
<div class="navButton fullWidth">Kontaktdaten</div>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<?php include($basePath."/pages/shared/sponsorList.amp.inc");?>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,3 @@
|
||||
<?php
|
||||
require_once( "/users/cwsvjudo/www/expCounter/counter.php" );
|
||||
?>
|
||||
@@ -0,0 +1,202 @@
|
||||
<?php
|
||||
/// Einbinden der Konfiguration, insbesondere Basisvariablen
|
||||
/// relative Pfadangabe, jedes Verzeichnis soll seine eigene haben
|
||||
require_once("./config.inc.php");
|
||||
/// Daten für den Datenbankzugriff
|
||||
require_once( $basePath."/bonus/db.inc");
|
||||
/// Bibliothek für die Arbeit mit der Newsdatenbank
|
||||
//require_once( $basePath."/ressourcen/phpLib/newsLib.php");
|
||||
/// Bibliothek mit verschienden Hilfsfunktionen
|
||||
require_once( $basePath."/ressourcen/phpLib/miscAssis.php");
|
||||
|
||||
//require_once(__DIR__.'/phpLib/ampify.php');
|
||||
require_once("./phpLib/cwsvJudoAmpLib.php");
|
||||
|
||||
$siteData['canonicalLink'] = $baseUrl."/pages/desktop/verein.galerien.php";
|
||||
$siteData['headline'] = "Galerien";
|
||||
|
||||
$messages['error'] = "";
|
||||
|
||||
// Datenbankverbindung bereitstellen
|
||||
$mysqlConn = @new mysqli($db_server, $db_user, $db_password, $db_name);
|
||||
if($mysqlConn->connect_error){
|
||||
$messages['error'] += "Datenbankverbindung fehlgeschlagen: " . $mysqlConn->connect_error . "<br />";
|
||||
}
|
||||
else{
|
||||
// mögliche Werte für das Jahr herausfinden
|
||||
$galJahresListe = array();
|
||||
|
||||
$queryJahresListe = "
|
||||
SELECT DISTINCT DATE_FORMAT( datum, '%Y')
|
||||
AS jahr
|
||||
FROM cwsvjudo.wkGalerien
|
||||
WHERE 1
|
||||
ORDER BY DATE_FORMAT( datum, '%Y' ) DESC;
|
||||
";
|
||||
|
||||
$mysqlResults = $mysqlConn->query($queryJahresListe);
|
||||
if( !$mysqlResults ){
|
||||
$messages['error'] += "Fehler bei Datenbankabfrage '".$queryJahresListe."'<br />";
|
||||
}
|
||||
else{
|
||||
while( $mysqlResult = $mysqlResults->fetch_assoc() ){
|
||||
array_push( $galJahresListe, $mysqlResult['jahr']);
|
||||
}
|
||||
}
|
||||
|
||||
// standardmäßig frage die letzten 12 Galerien ab
|
||||
$queryGals = "
|
||||
SELECT id,datum,name,url,typ,teaserBildUrl
|
||||
FROM cwsvjudo.wkGalerien
|
||||
WHERE 1
|
||||
ORDER BY datum DESC LIMIT 12
|
||||
";
|
||||
// Falls ein Konkretes Jahr angegebe wurde, fragen wir dies ab
|
||||
if($galJahr != ""){
|
||||
$minDate = $galJahr."-01-01";
|
||||
$maxDate = $galJahr."-12-31";
|
||||
$queryGals = sprintf("
|
||||
SELECT id,datum,name,url,typ,teaserBildUrl
|
||||
FROM cwsvjudo.wkGalerien
|
||||
WHERE datum >= '%s' AND datum <= '%s' ORDER BY datum ASC;",
|
||||
$mysqlConn->real_escape_string($minDate),
|
||||
$mysqlConn->real_escape_string($maxDate)
|
||||
);
|
||||
}
|
||||
|
||||
$galListe = array();
|
||||
$mysqlResults = $mysqlConn->query($queryGals);
|
||||
if( !$mysqlResults ){
|
||||
$messages['error'] += "Fehler bei Datenbankabfrage '".$queryGals."'<br />";
|
||||
}
|
||||
else{
|
||||
while( $mysqlResult = $mysqlResults->fetch_assoc() ){
|
||||
array_push( $galListe, $mysqlResult);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//$siteData['jsonDataHeader'] = "<script type=\"application/ld+json\">" . news2json( $news ) . "</script>";
|
||||
|
||||
// Modellierung:
|
||||
// - der Content ist eine Menge von Sections
|
||||
// - eine Section ist eine Folge von Articles
|
||||
$siteData['content'] = array();
|
||||
|
||||
// $newsSection = array();
|
||||
|
||||
$siteData['title'] = "Galerien mit Bildern der Judoka des Chemnitzer WSV";
|
||||
|
||||
$siteData['ampSubNav'] = array(
|
||||
array(
|
||||
'caption' => "Trainings­zeiten",
|
||||
'icon' => $baseUrl."/ressourcen/graphiken/icons/clockIconFriendly.svg",
|
||||
'title' => "Trainingszeiten und -orte der Judoka des Chemnitzer WSV",
|
||||
'href' => $canonicalBaseUrl."/trainingszeiten.php"
|
||||
),
|
||||
array(
|
||||
'caption' => "Termine",
|
||||
'icon' => $baseUrl."/ressourcen/graphiken/icons/calendarIcon.svg",
|
||||
'title' => "Kalender mit Terminen für Wettkämpfe",
|
||||
'href' => $baseUrl."/pages/desktop/verein.wettkampfkalender.php"
|
||||
),
|
||||
array(
|
||||
'isActive' => 'true',
|
||||
'caption' => "Galerien",
|
||||
'icon' => $baseUrl."/ressourcen/graphiken/icons/gallery.svg",
|
||||
'title' => "Bilder und Videos von unseren Wettkämpfen und sonstigen Veranstaltungen",
|
||||
'href' => $canonicalBaseUrl."/galerien.php"
|
||||
),
|
||||
array(
|
||||
'caption' => "JudoWiki",
|
||||
'icon' => $baseUrl."/ressourcen/graphiken/icons/wikipediaW.svg",
|
||||
'title' => "Ein kleines Nachschlagewerk über Judo",
|
||||
'href' => $baseUrl."/JudoWiki"
|
||||
),
|
||||
array(
|
||||
'caption' => "Kontakt",
|
||||
'icon' => $baseUrl."/ressourcen/graphiken/icons/contact4Ways.svg",
|
||||
'title' => "Möglichkeiten mit dem Chemnitzer Freizeit- und Wohngebietssportverein in Kontakt zu treten",
|
||||
'href' => $canonicalBaseUrl."/kontakt.php"
|
||||
),
|
||||
);
|
||||
|
||||
$siteData['subNav'] = "<nav class=\"subNav\">". getAmpSubNav($siteData['ampSubNav']) ."</nav>";
|
||||
|
||||
$siteData['content'] = array();
|
||||
|
||||
// $jahresSelector = "";
|
||||
// $jahresSelector .=
|
||||
// "<nav>Jahresauswahl:<form class=\"yearSelector\" action=\"".$canonicalBaseUrl."/galerien.php"."\">".
|
||||
// "<select name=\"jahr\" onchange=\"javascript: this.form.submit();\" >".
|
||||
// "<optgroup label=\"Jahresauswahl\">".
|
||||
// "<option value=\"".( $galJahr!="" ? "" : " selected" )."\">Neueste</option>";
|
||||
// foreach($galJahresListe as $jahr){
|
||||
// $jahresSelector .=
|
||||
// "<option value=\"".$jahr."\"".( $galJahr==$jahr ? " selected" : "" ).">".$jahr."</option>";
|
||||
// }
|
||||
// $jahresSelector .=
|
||||
// "</optgroup>".
|
||||
// "</select>".
|
||||
// "<noscript><button type=\"submit\">Submit</button></noscript>".
|
||||
// "</form></nav>";
|
||||
|
||||
// array_push(
|
||||
// $siteData['content'],
|
||||
// array(
|
||||
// $jahresSelector
|
||||
// )
|
||||
// );
|
||||
|
||||
$galTable = "";
|
||||
$galTable .=
|
||||
"<table class=\"galTable\">".
|
||||
"<thead><tr><th>Datum</th><th>Link zur Galerie</th></tr></thead>".
|
||||
"<tbody>";
|
||||
// Jede Galerie ausgeben
|
||||
foreach($galListe as $gal){
|
||||
$galTable .=
|
||||
"<tr>".
|
||||
"<td class=\"noWrap\">".
|
||||
"<time datetime=\"".mb_convert_encoding($gal['datum'], 'UTF-8', 'ISO-8859-1')."\">".str_replace("-", "‑", mb_convert_encoding($gal['datum'], 'UTF-8', 'ISO-8859-1') )."</time>".
|
||||
"</td>".
|
||||
"<td class=\"floatClearBoth\">".
|
||||
"<a href=\"http://".$baseDomain."?galId=".$gal['id']."\">";
|
||||
if( $gal['teaserBildUrl'] != "" ){
|
||||
$galTable .=
|
||||
"<div>".
|
||||
"<amp-img".
|
||||
" layout=\"fixed\"".
|
||||
" 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=\"http://".$baseDomain."/".mb_convert_encoding($gal['teaserBildUrl'], 'UTF-8', 'ISO-8859-1')."\"".
|
||||
" ".(@getimagesize($basePath."/".$gal['teaserBildUrl'])[3]?getimagesize($basePath."/".$gal['teaserBildUrl'])[3]:"width=\"200\" height=\"133\"").
|
||||
">".
|
||||
"</amp-img>".
|
||||
"</div>";
|
||||
}
|
||||
$galTable .=
|
||||
"<div>".mb_convert_encoding($gal['name'], 'UTF-8', 'ISO-8859-1')." (".mb_convert_encoding($gal['typ'], 'UTF-8', 'ISO-8859-1').")</div>".
|
||||
"</a>".
|
||||
"</td>".
|
||||
"</tr>";
|
||||
}
|
||||
$galTable .=
|
||||
"</tbody>".
|
||||
"</table>";
|
||||
array_push(
|
||||
$siteData['content'],
|
||||
array(
|
||||
$galTable
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
require_once('./cwsvJudo.ampTemplate.inc.php');
|
||||
|
||||
$chCounter_page_title = "Galerien (ampVersion)";
|
||||
$chCounter_visible=0;
|
||||
$chCounter_mode='noscript';
|
||||
include($basePath."/expCounter/counter.php");
|
||||
// require_once( "/users/cwsvjudo/www/expCounter/counter.php" );
|
||||
?>
|
||||
@@ -0,0 +1 @@
|
||||
google-site-verification: googlef3ad27a876479282.html
|
||||
@@ -0,0 +1,127 @@
|
||||
<?php
|
||||
/// Einbinden der Konfiguration, insbesondere Basisvariablen
|
||||
/// relative Pfadangabe, jedes Verzeichnis soll seine eigene haben
|
||||
require_once("./config.inc.php");
|
||||
/// Daten für den Datenbankzugriff
|
||||
require_once( $basePath."/bonus/db.inc");
|
||||
/// Bibliothek für die Arbeit mit der Newsdatenbank
|
||||
require_once( $basePath."/ressourcen/phpLib/newsLib.php");
|
||||
|
||||
/// Bibliothek mit verschienden Hilfsfunktionen
|
||||
require_once( $basePath."/ressourcen/phpLib/miscAssis.php");
|
||||
|
||||
require_once(__DIR__.'/phpLib/ampify.php');
|
||||
require_once("./phpLib/cwsvJudoAmpLib.php");
|
||||
|
||||
//$newsId = isset($_GET["newsId"]) ? $_GET["newsId"] : "";
|
||||
//$newsById = array();
|
||||
//$prevNewsId = "";
|
||||
//$postNewsId = "";
|
||||
|
||||
|
||||
// @ToDo: Bad Hack entfernen! $_GET sollte nicht gesetzt werden. Lieber eine Hilfsvariable einführen, die der Reihe nach mit alternativen aufgefüllt werden kann (wenn $_GET nicht gesetzt, dann $_POST usw.)
|
||||
if( empty($_GET['galId']) && !empty($_GET['galld']) ) $_GET['galId'] = $_GET['galld'];
|
||||
// die( "galID: ".$_GET['galId']." galld: ".$_GET['galld']."\n" );
|
||||
|
||||
if(isset($_GET['galId'])){
|
||||
$redirectLink = $baseDomain."/pages/desktop/verein.galerien.php";
|
||||
|
||||
try{
|
||||
$db_connection = new PDO('mysql:host='.$db_server.';dbname='.$db_name, $db_user, $db_password);
|
||||
|
||||
if(is_positive_integer($_GET['galId'])){
|
||||
// mögliche Werte für das jahr herausfinden
|
||||
$query="SELECT url FROM wkGalerien WHERE id = \"".$_GET['galId']."\" ORDER BY Datum ASC LIMIT 1;";
|
||||
$ergebnis = $db_connection->query($query);
|
||||
$galleryLink = $ergebnis->fetchAll();
|
||||
header("Location: http://".$baseDomain.$galleryLink[0]['url']);
|
||||
//die("Location(".$_GET['galId']."): ".$galleryLink[0]['url']);
|
||||
}
|
||||
$db_connection = NULL;
|
||||
}
|
||||
catch(PDOException $db_error){
|
||||
print "Error!: " . $db_error->getMessage() . "<br/>";
|
||||
die();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
$siteData['canonicalLink'] = $baseUrl;
|
||||
$siteData['headline'] = "Judo im CWSV";
|
||||
|
||||
$messages['error'] = "";
|
||||
|
||||
// Datenbankverbindung bereitstellen
|
||||
$mysqlConn = @new mysqli($db_server, $db_user, $db_password, $db_name);
|
||||
if($mysqlConn->connect_error){
|
||||
$messages['error'] += "Datenbankverbindung fehlgeschlagen: " . $mysqlConn->connect_error . "<br />";
|
||||
}
|
||||
else{
|
||||
$newsList = getNewsListById($mysqlConn, $newsId, ["limit" => 6]);
|
||||
// print_r($newsList);
|
||||
$prevNewsId = getPrevNewsId($mysqlConn, $newsList[0]);
|
||||
$nextNewsId = getNextNewsId($mysqlConn, end(array_values($newsList)));
|
||||
}
|
||||
|
||||
$siteData['jsonDataHeader'] = "<script type=\"application/ld+json\">" . news2json( $newsList[0] ) . "</script>";
|
||||
|
||||
// Modellierung:
|
||||
// - der Content ist eine Menge von Sections
|
||||
// - eine Section ist eine Folge von Articles
|
||||
$siteData['content'] = array();
|
||||
|
||||
$newsSection = array();
|
||||
|
||||
$siteData['title'] = "Judo im Chemnitzer WSV - Kinder- und Erwachsenentraining";
|
||||
|
||||
$siteData['ampSubNav'] = array(
|
||||
array(
|
||||
'caption' => "Trainings­zeiten",
|
||||
'icon' => $baseUrl."/ressourcen/graphiken/icons/clockIconFriendly.svg",
|
||||
'title' => "Trainingszeiten und -orte der Judoka des Chemnitzer WSV",
|
||||
'href' => $canonicalBaseUrl."/trainingszeiten.php"
|
||||
),
|
||||
array(
|
||||
'caption' => "Termine",
|
||||
'icon' => $baseUrl."/ressourcen/graphiken/icons/calendarIcon.svg",
|
||||
'title' => "Kalender mit Terminen für Wettkämpfe",
|
||||
'href' => $baseUrl."/pages/desktop/verein.wettkampfkalender.php"
|
||||
),
|
||||
array(
|
||||
'caption' => "Gallerien",
|
||||
'icon' => $baseUrl."/ressourcen/graphiken/icons/gallery.svg",
|
||||
'title' => "Bilder und Videos von unseren Wettkämpfen und sonstigen Veranstaltungen",
|
||||
'href' => $baseUrl."/pages/desktop/verein.galerien.php"
|
||||
),
|
||||
array(
|
||||
'caption' => "JudoWiki",
|
||||
'icon' => $baseUrl."/ressourcen/graphiken/icons/wikipediaW.svg",
|
||||
'title' => "Ein kleines Nachschlagewerk über Judo",
|
||||
'href' => $baseUrl."/JudoWiki"
|
||||
),
|
||||
array(
|
||||
'caption' => "Kontakt",
|
||||
'icon' => $baseUrl."/ressourcen/graphiken/icons/contact4Ways.svg",
|
||||
'title' => "Möglichkeiten mit dem Chemnitzer Freizeit- und Wohngebietssportverein in Kontakt zu treten",
|
||||
'href' => $canonicalBaseUrl."/kontakt.php"
|
||||
),
|
||||
);
|
||||
|
||||
$siteData['subNav'] = "<nav class=\"subNav\">". getAmpSubNav($siteData['ampSubNav']) ."</nav>";
|
||||
|
||||
foreach( $newsList as $news)
|
||||
array_push( $newsSection, "<article>".getAmpNews($news)."</article><hr />" );
|
||||
|
||||
array_push($siteData['content'], $newsSection);
|
||||
array_push( $siteData['content'], array (empty($prevNewsId) ? "" : "<a class=\"touchLink\" title=\"weitere News\" href=\"news.php?newsId=".$prevNewsId."\">weitere Neuigkeiten</span></a>") );
|
||||
|
||||
require_once('./cwsvJudo.ampTemplate.inc.php');
|
||||
|
||||
$chCounter_page_title = "Startseite (ampVersion)";
|
||||
$chCounter_visible=0;
|
||||
$chCounter_mode='noscript';
|
||||
include($basePath."/expCounter/counter.php");
|
||||
// require_once( "/users/cwsvjudo/www/expCounter/counter.php" );
|
||||
?>
|
||||
@@ -0,0 +1,150 @@
|
||||
<?php
|
||||
/// Einbinden der Konfiguration, insbesondere Basisvariablen
|
||||
/// relative Pfadangabe, jedes Verzeichnis soll seine eigene haben
|
||||
require_once("./config.inc.php");
|
||||
/// Daten für den Datenbankzugriff
|
||||
require_once( $basePath."/bonus/db.inc");
|
||||
/// Bibliothek für die Arbeit mit der Newsdatenbank
|
||||
require_once( $basePath."/ressourcen/phpLib/newsLib.php");
|
||||
/// Bibliothek mit verschienden Hilfsfunktionen
|
||||
require_once( $basePath."/ressourcen/phpLib/miscAssis.php");
|
||||
|
||||
require_once(__DIR__.'/phpLib/ampify.php');
|
||||
require_once("./phpLib/cwsvJudoAmpLib.php");
|
||||
|
||||
$siteData['canonicalLink'] = $baseUrl."/pages/desktop/kontakt.php";
|
||||
$siteData['headline'] = "Kontaktdaten";
|
||||
|
||||
$messages['error'] = "";
|
||||
|
||||
$cwsvJsonLd = file_get_contents( $basePath."/ressourcen/structuredData/json/cwsv.json" );
|
||||
|
||||
// Datenbankverbindung bereitstellen
|
||||
/* $mysqlConn = @new mysqli($db_server, $db_user, $db_password, $db_name);
|
||||
if($mysqlConn->connect_error){
|
||||
$messages['error'] += "Datenbankverbindung fehlgeschlagen: " . $mysqlConn->connect_error . "<br />";
|
||||
}
|
||||
else{
|
||||
$news = getNewsById($mysqlConn, $newsId);
|
||||
$prevNewsId = getPrevNewsId($mysqlConn, $news);
|
||||
$nextNewsId = getNextNewsId($mysqlConn, $news);
|
||||
}
|
||||
*/
|
||||
|
||||
// Modellierung:
|
||||
// - der Content ist eine Menge von Sections
|
||||
// - eine Section ist eine Folge von Articles
|
||||
$siteData['content'] = array();
|
||||
|
||||
$newsSection = array();
|
||||
|
||||
$siteData['title'] = "Kontaktmöglichkeiten mit dem Chemnitzer WSV und seiner Abteilung Judo";
|
||||
|
||||
$siteData['ampSubNav'] = array(
|
||||
array(
|
||||
'caption' => "Trainings­zeiten",
|
||||
'icon' => $baseUrl."/ressourcen/graphiken/icons/clockIconFriendly.svg",
|
||||
'title' => "Trainingszeiten und -orte der Judoka des Chemnitzer WSV",
|
||||
'href' => $canonicalBaseUrl."/trainingszeiten.php"
|
||||
),
|
||||
array(
|
||||
'caption' => "Termine",
|
||||
'icon' => $baseUrl."/ressourcen/graphiken/icons/calendarIcon.svg",
|
||||
'title' => "Kalender mit Terminen für Wettkämpfe",
|
||||
'href' => $baseUrl."/pages/desktop/verein.wettkampfkalender.php"
|
||||
),
|
||||
array(
|
||||
'caption' => "Galerien",
|
||||
'icon' => $baseUrl."/ressourcen/graphiken/icons/gallery.svg",
|
||||
'title' => "Bilder und Videos von unseren Wettkämpfen und sonstigen Veranstaltungen",
|
||||
// 'href' => $baseUrl."/pages/desktop/verein.galerien.php"
|
||||
'href' => $canonicalBaseUrl."/galerien.php"
|
||||
),
|
||||
array(
|
||||
'caption' => "JudoWiki",
|
||||
'icon' => $baseUrl."/ressourcen/graphiken/icons/wikipediaW.svg",
|
||||
'title' => "Ein kleines Nachschlagewerk über Judo",
|
||||
'href' => $baseUrl."/JudoWiki"
|
||||
),
|
||||
array(
|
||||
'caption' => "Kontakt",
|
||||
'icon' => $baseUrl."/ressourcen/graphiken/icons/contact4Ways.svg",
|
||||
'title' => "Möglichkeiten mit dem Chemnitzer Freizeit- und Wohngebietssportverein in Kontakt zu treten",
|
||||
'href' => $canonicalBaseUrl."/kontakt.php",
|
||||
'isActive' => 'true',
|
||||
),
|
||||
);
|
||||
|
||||
$siteData['subNav'] = "<nav class=\"subNav\">". getAmpSubNav($siteData['ampSubNav']) ."</nav>";
|
||||
|
||||
$siteData['main'] = "";
|
||||
|
||||
$siteData['main'] .=
|
||||
"<h2>E-Mail</h2>".
|
||||
"<script type=\"application/ld+json\">".$cwsvJsonLd."</script>".
|
||||
"<ul>".
|
||||
"<li>".
|
||||
"<a href=\"mailto:cwsv.sb@web.de\">eMail an den Chemnitzer Freizeit- und Wohngebietssportverein e. V.(cwsv.sb@web.de)</a>".
|
||||
"</li>".
|
||||
"<li>".
|
||||
"Link zum <a href=\"http://www.cwsv-sport.de/Kontakt.htm\">".
|
||||
"Kontaktformular".
|
||||
"</a>".
|
||||
"auf der Homepage des Chemnitzer Freizeit- und Wohngebietssportvereines".
|
||||
"</li>".
|
||||
"<li>".
|
||||
"<amp-img layout=\"responsive\" class=\"pngAddress\" alt=\"eMail\" width=\"420\" height=\"60\" src=\"/ressourcen/graphiken/misc/abc123.png\">".
|
||||
"</li>".
|
||||
"</ul>";
|
||||
|
||||
$siteData['main'] .=
|
||||
"<h2>Adressen</h2>".
|
||||
|
||||
"<ul>".
|
||||
"<li>CWSV - Verwaltung".
|
||||
"<a href=\"http://www.openstreetmap.org/?mlat=50.807643&mlon=12.882060#map=17/50.807643/12.882060\" title=\"Karte der Verwaltung des Chemnitzer WSV\">".
|
||||
"<div itemscope itemtype=\"https://schema.org/SportsActivityLocation\">".
|
||||
"<meta itemprop=\"name\" content=\"Verwaltung des Chemnitzer WSV\" />".
|
||||
"<meta itemprop=\"image\" content=\"http://img.webme.com/pic/c/cwsv-sport/dsc_1425.jpg\" />".
|
||||
"<meta itemprop=\"address\" content=\"Strasse Usti nad Labem 42, 09119 Chemnitz\" />".
|
||||
"<meta itemprop=\"telephone\" content=\"+49 371 2823370\" />".
|
||||
"<meta itemprop=\"openingHours\" content=\"[ 'Mo 8:00-16:30', 'Di 10:00-17:00', 'Mi 8:00-17:00', 'Do 10:00-17:00']\" />".
|
||||
"<meta itemprop=\"sameAs\" content=\"https://www.facebook.com/CWSV-eV-149983928431116/\" />".
|
||||
"<ul>".
|
||||
"<li>Strasse Usti nad Labem 42</li>".
|
||||
"<li>09119 Chemnitz</li>".
|
||||
"<li>Mo 8:00-16:30, Di 10:00-17:00, Mi 8:00-17:00, Do 10:00-17:00</li>".
|
||||
"</ul>".
|
||||
"</div>".
|
||||
"</a>".
|
||||
"</li>".
|
||||
"</ul>";
|
||||
|
||||
$siteData['main'] .=
|
||||
"<h2>Telephon</h2>".
|
||||
"".
|
||||
"<ul>".
|
||||
"<li>CWSV - Verwaltung<script type=\"application/ld+json\">".$cwsvJsonLd."</script>".
|
||||
"<ul>".
|
||||
"<li>Tel.: <a title=\"Telefonnummer der Verwaltung des Chemnitzer WSV\" href=\"tel:+493712823370\">0371 / 28 23 370</a></li>".
|
||||
"<li>Fax.: 0371/ 22 91 79</li>".
|
||||
"<li>Mo 8:00-16:30, Di 10:00-17:00, Mi 8:00-17:00, Do 10:00-17:00</li>".
|
||||
"</ul>".
|
||||
"</li>".
|
||||
"</ul>";
|
||||
|
||||
array_push( $newsSection, $siteData['main'] );
|
||||
array_push($siteData['content'], $newsSection);
|
||||
/* array_push(
|
||||
$siteData['content'],
|
||||
array ( "<a class=\"touchLink fullWidth centeredText\" title=\"weitere News\" href=\"news.php".( empty($prevNewsId) ? "" : "?newsId=".$prevNewsId."\">weitere Neuigkeiten</a>") )
|
||||
);
|
||||
*/
|
||||
require_once('./cwsvJudo.ampTemplate.inc.php');
|
||||
|
||||
$chCounter_page_title = "Kontaktseite (ampVersion)";
|
||||
$chCounter_visible=0;
|
||||
$chCounter_mode='noscript';
|
||||
include($basePath."/expCounter/counter.php");
|
||||
// require_once( "/users/cwsvjudo/www/expCounter/counter.php" );
|
||||
?>
|
||||
@@ -0,0 +1,60 @@
|
||||
<?php
|
||||
require_once( "./config.inc.php");
|
||||
require_once( "/users/cwsvjudo/www/bonus/db.inc");
|
||||
require_once( $basePath."/ressourcen/phpLib/newsLib.php");
|
||||
require_once( $basePath."/ressourcen/phpLib/miscAssis.php");
|
||||
|
||||
require_once(__DIR__.'/phpLib/ampify.php');
|
||||
|
||||
$newsId = isset($_GET["newsId"]) ? $_GET["newsId"] : "";
|
||||
//$newsById = array();
|
||||
$prevNewsId = "";
|
||||
$postNewsId = "";
|
||||
|
||||
$canonicalLinkBase = $baseUrl."/pages/desktop/news.php";
|
||||
|
||||
$siteData['canonicalLink'] = $canonicalLinkBase.(is_positive_integer($newsId)?"?newsId=".$newsId:"");
|
||||
$siteData['headline'] = "Be­kannt­ma­chung­en der Abteilung Judo des CWSV";
|
||||
|
||||
$message['error'] = "";
|
||||
|
||||
$mysqlConn = @new mysqli($db_server, $db_user, $db_password, $db_name);
|
||||
if($mysqlConn->connect_error){
|
||||
$messages['error'] += "Datenbankverbindung fehlgeschlagen: " . $mysqlConn->connect_error . "<br />";
|
||||
}
|
||||
else{
|
||||
$news = getNewsById($mysqlConn, $newsId);
|
||||
$prevNewsId = getPrevNewsId($mysqlConn, $news);
|
||||
$nextNewsId = getNextNewsId($mysqlConn, $news);
|
||||
}
|
||||
|
||||
// Modellierung:
|
||||
// - der Content ist eine Menge von Sections
|
||||
// - eine Section ist eine Folge von Articles
|
||||
$siteData['content'] = array();
|
||||
|
||||
$newsSection = array();
|
||||
|
||||
$siteData['title'] = empty($news['betreff'])?"Neuigkeiten der Abteilung Judo des Chemnnitzer WSV":($news['betreff']." - Judo im CWSV");
|
||||
$siteData['jsonDataHeader'] = "<script type=\"application/ld+json\">" . news2json( $news ) . "</script>";
|
||||
|
||||
// echo( "News: "); print_r($news);
|
||||
$siteData['subNav'] = "";
|
||||
$siteData['subNav'] .= "<nav class=\"ampSubNav\">";
|
||||
$siteData['subNav'] .= "<div>";
|
||||
$siteData['subNav'] .= empty($prevNewsId) ? "" : "<a class=\"touchLink\" title=\"vorherige News\" href=\"news.php?newsId=".$prevNewsId."\">eine News vorher</span></a>";
|
||||
$siteData['subNav'] .= "</div>";
|
||||
$siteData['subNav'] .= "<div>";
|
||||
$siteData['subNav'] .= empty($nextNewsId) ? "" : "<a class=\"touchLink\" title=\"nächste News\" href=\"news.php?newsId=".$nextNewsId."\">eine News später</span></a>";
|
||||
$siteData['subNav'] .= "</div>";
|
||||
$siteData['subNav'] .= "</nav>";
|
||||
|
||||
array_push( $newsSection, "<article>".getAmpNews($news)."</article>" );
|
||||
array_push($siteData['content'], $newsSection);
|
||||
|
||||
require_once('./cwsvJudo.ampTemplate.inc.php');
|
||||
// $chCounter_page_title = "News".( $newsId != "" ? " Id ".$newsId : "" )." (ampVersion)";
|
||||
// $chCounter_visible=0;
|
||||
//include($_SERVER['DOCUMENT_ROOT']."/expCounter/counter.php");
|
||||
// require_once( "/users/cwsvjudo/www/expCounter/counter.php" );
|
||||
?>
|
||||
@@ -0,0 +1,65 @@
|
||||
<?php
|
||||
require_once( "./config.inc.php");
|
||||
require_once( "/users/cwsvjudo/www/bonus/db.inc");
|
||||
require_once( $basePath."/ressourcen/phpLib/newsLibDev.php");
|
||||
require_once( $basePath."/ressourcen/phpLib/miscAssis.php");
|
||||
|
||||
require_once(__DIR__.'/phpLib/ampify.php');
|
||||
|
||||
$newsId = is_positive_integer($_GET["newsId"]) ? $_GET["newsId"] : "";
|
||||
$prevNewsId = "";
|
||||
$postNewsId = "";
|
||||
|
||||
$canonicalLinkBase = $baseUrl."/pages/desktop/news.php";
|
||||
|
||||
$siteData['canonicalLink'] = $canonicalLinkBase.(is_positive_integer($newsId)?"?newsId=".$newsId:"");
|
||||
$siteData['headline'] = "Be­kannt­ma­chung­en der Abteilung Judo des CWSV";
|
||||
|
||||
$message['error'] = "";
|
||||
|
||||
try{
|
||||
$mysqlConn = new PDO('mysql:host='.$db_server.';dbname='.$db_name, $db_user, $db_password);
|
||||
}
|
||||
catch (PDOException $e){
|
||||
$messages['error'] += "Datenbankverbindung fehlgeschlagen: " . $e->getMessage() . "<br />";
|
||||
$mysqlConn = NULL;
|
||||
}
|
||||
|
||||
// echo("newsId: ".$newsId); die();
|
||||
$news = getNewsById($mysqlConn, $newsId);
|
||||
// echo("News: "); print_r($news); die();
|
||||
$prevNewsId = getPrevNewsId($mysqlConn, $newsId);
|
||||
$nextNewsId = getNextNewsId($mysqlConn, $newsId);
|
||||
|
||||
// Modellierung:
|
||||
// - der Content ist eine Menge von Sections
|
||||
// - eine Section ist eine Folge von Articles
|
||||
$siteData['content'] = array();
|
||||
|
||||
$newsSection = array();
|
||||
|
||||
$siteData['title'] = empty($news['betreff'])?"Neuigkeiten der Abteilung Judo des Chemnnitzer WSV":($news['betreff']." - Judo im CWSV");
|
||||
$siteData['jsonDataHeader'] = "<script type=\"application/ld+json\">" . news2json( $news ) . "</script>";
|
||||
|
||||
// echo( "News: "); print_r($news);
|
||||
$siteData['subNav'] = "";
|
||||
$siteData['subNav'] .= "<nav class=\"ampSubNav\">";
|
||||
$siteData['subNav'] .= "<div>";
|
||||
$siteData['subNav'] .= empty($prevNewsId) ? "" : "<a class=\"touchLink\" title=\"vorherige News\" href=\"news.php?newsId=".$prevNewsId."\">eine News vorher</span></a>";
|
||||
$siteData['subNav'] .= "</div>";
|
||||
$siteData['subNav'] .= "<div>";
|
||||
$siteData['subNav'] .= empty($nextNewsId) ? "" : "<a class=\"touchLink\" title=\"nächste News\" href=\"news.php?newsId=".$nextNewsId."\">eine News später</span></a>";
|
||||
$siteData['subNav'] .= "</div>";
|
||||
$siteData['subNav'] .= "</nav>";
|
||||
|
||||
// echo(getAmpNews($news)); die();
|
||||
foreach( $news as $newsEntry)
|
||||
array_push( $newsSection, "<article>".getAmpNews($newsEntry)."</article>" );
|
||||
array_push($siteData['content'], $newsSection);
|
||||
|
||||
require_once('./cwsvJudo.ampTemplateDev.inc.php');
|
||||
$chCounter_page_title = "News".( $newsId != "" ? " Id ".$newsId : "" )." (ampVersion)";
|
||||
$chCounter_visible=0;
|
||||
// include($_SERVER['DOCUMENT_ROOT']."/expCounter/counter.php");
|
||||
require_once( "/users/cwsvjudo/www/expCounter/counter.php" );
|
||||
?>
|
||||
@@ -0,0 +1,4 @@
|
||||
<?php
|
||||
header("Location: http://cwsvjudo.bplaced.net/pages/mobile/verein.wettkampfgalerien.php");
|
||||
exit();
|
||||
?>
|
||||
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
|
||||
function addImgSize($html=''){
|
||||
$dom = new DOMDocument();
|
||||
$dom->loadHTML($html, LIBXML_HTML_NOIMPLIED | LIBXML_HTML_NODEFDTD);
|
||||
foreach ($dom->getElementsByTagName('img') as $img) {
|
||||
// list($width, $height) = getimagesize( $_SERVER['DOCUMENT_ROOT'].urldecode($img->getAttribute('src')));
|
||||
list($width, $height) = getimagesize( "/users/cwsvjudo/www/".urldecode($img->getAttribute('src')));
|
||||
$img->setAttribute('width', $width);
|
||||
$img->setAttribute('height', $height);
|
||||
}
|
||||
return $dom->saveXML();
|
||||
}
|
||||
|
||||
# Licensed under a CC0 1.0 Universal (CC0 1.0) Public Domain Dedication
|
||||
# http://creativecommons.org/publicdomain/zero/1.0/
|
||||
function ampify($html='') {
|
||||
// $html = addImgSize($html);
|
||||
# Replace img, audio, and video elements with amp custom elements
|
||||
$html = str_ireplace(
|
||||
['<img','<video','/video>','<audio','/audio>'],
|
||||
['<amp-img layout="responsive" ','<amp-video','/amp-video>','<amp-audio','/amp-audio>'],
|
||||
$html
|
||||
);
|
||||
# Add closing tags to amp-img custom element
|
||||
$html = preg_replace('/<amp-img(.*?)>/', '<amp-img$1></amp-img>',$html);
|
||||
# Whitelist of HTML tags allowed by AMP
|
||||
$html = strip_tags($html,'<h1><h2><h3><h4><h5><h6><a><p><ul><ol><li><blockquote><q><cite><ins><del><strong><em><code><pre><svg><table><thead><tbody><tfoot><th><tr><td><dl><dt><dd><article><section><header><footer><aside><figure><time><abbr><div><span><hr><small><br><amp-img><amp-audio><amp-video><amp-ad><amp-anim><amp-carousel><amp-fit-rext><amp-image-lightbox><amp-instagram><amp-lightbox><amp-twitter><amp-youtube>');
|
||||
return $html;
|
||||
}
|
||||
?>
|
||||
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
/// Den htmlCode für die Unterauswahl-Navigationsleiste bereitstellen
|
||||
function getAmpSubNav($someNavElements, $someOptions = array()){
|
||||
$retHtml = "";
|
||||
foreach($someNavElements as $navElement){
|
||||
$retHtml .= "<a class=\"subNavElement";
|
||||
if( !empty($navElement['isActive']) ){
|
||||
if($navElement['isActive'] == "true"){
|
||||
$retHtml .= " activeNav\" title=\"Zurück zur Hauptseite\" href=\"/\" >";
|
||||
}
|
||||
}
|
||||
else{
|
||||
$retHtml .= "\" title=\"".( !empty($navElement['title'])?$navElement['title']:"" )."\"";
|
||||
$retHtml .= " href=\"".( !empty($navElement['href'])?$navElement['href']:"" )."\"";
|
||||
$retHtml .= ">";
|
||||
}
|
||||
$retHtml .= !empty($navElement['icon']) ? "<amp-img layout=\"fixed\" width=\"50\" height=\"50\" class=\"subNavElementIcon\" src=\"".$navElement['icon']."\" alt=\"".(!empty($navElement['caption'])?$navElement['caption']:"Icon")."\" ".(!empty($navElement['title'])?"title=\"".$navElement['title']."\"":"").">" : "";
|
||||
$retHtml .= "<span class=\"subNavElementCaption\">".(!empty($navElement['caption']) ? $navElement['caption'] : "")."</span>";
|
||||
$retHtml .= "</a>";
|
||||
}
|
||||
return $retHtml;
|
||||
}
|
||||
?>
|
||||
@@ -0,0 +1,16 @@
|
||||
User-agent:*
|
||||
|
||||
Disallow: /geheim/
|
||||
|
||||
Disallow: /expCounter/
|
||||
Disallow: /expCounter/administration
|
||||
|
||||
Disallow: /JudoWiki/*/main/allrecentchanges$
|
||||
Disallow: /JudoWiki/*/pmwiki*
|
||||
Disallow: /JudoWiki/*/search*
|
||||
Disallow: /JudoWiki/*recentchanges*
|
||||
Disallow: /JudoWiki/*action=*
|
||||
|
||||
Sitemap: http://cwsvjudo.bplaced.net/sitemap.xml
|
||||
|
||||
|
||||
@@ -0,0 +1,37 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<urlset
|
||||
xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9
|
||||
http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd"
|
||||
>
|
||||
<!-- Desktop Section-->
|
||||
<url>
|
||||
<loc>http://cwsvjudo.bplaced.net/</loc>
|
||||
</url>
|
||||
<url>
|
||||
<loc>http://cwsvjudo.bplaced.net/JudoWiki</loc>
|
||||
</url>
|
||||
<url>
|
||||
<loc>http://cwsvjudo.bplaced.net/galerien</loc>
|
||||
</url>
|
||||
<url>
|
||||
<loc>http://cwsvjudo.bplaced.net/wkKalender</loc>
|
||||
</url>
|
||||
<url>
|
||||
<loc>http://cwsvjudo.bplaced.net/trainingszeiten</loc>
|
||||
</url>
|
||||
<url>
|
||||
<loc>http://cwsvjudo.bplaced.net/kontakt</loc>
|
||||
</url>
|
||||
<!-- Mobile/Amp Section-->
|
||||
<url>
|
||||
<loc>http://amp.cwsvjudo.bplaced.net/</loc>
|
||||
</url>
|
||||
<url>
|
||||
<loc>http://amp.cwsvjudo.bplaced.net/trainingszeiten.php</loc>
|
||||
</url>
|
||||
<url>
|
||||
<loc>http://amp.cwsvjudo.bplaced.net/kontakt.php</loc>
|
||||
</url>
|
||||
</urlset>
|
||||
@@ -0,0 +1,102 @@
|
||||
<?php
|
||||
/// Einbinden der Konfiguration, insbesondere Basisvariablen
|
||||
/// relative Pfadangabe, jedes Verzeichnis soll seine eigene haben
|
||||
require_once("./config.inc.php");
|
||||
/// Daten für den Datenbankzugriff
|
||||
require_once( $basePath."/bonus/db.inc");
|
||||
/// Bibliothek für die Arbeit mit der Newsdatenbank
|
||||
require_once( $basePath."/ressourcen/phpLib/newsLib.php");
|
||||
/// Bibliothek mit verschienden Hilfsfunktionen
|
||||
require_once( $basePath."/ressourcen/phpLib/miscAssis.php");
|
||||
|
||||
require_once(__DIR__.'/phpLib/ampify.php');
|
||||
require_once("./phpLib/cwsvJudoAmpLib.php");
|
||||
|
||||
$chCounter_page_title = "Trainingszeiten (ampVersion)";
|
||||
$chCounter_visible=0;
|
||||
include($_SERVER['DOCUMENT_ROOT']."/expCounter/counter.php");
|
||||
|
||||
$siteData['canonicalLink'] = $baseUrl."/pages/desktop/verein.training.php";
|
||||
$siteData['headline'] = "Trainingszeiten";
|
||||
$siteData['title'] = "Trainingszeiten der Judoka des Chemnnitzer WSV";
|
||||
|
||||
$siteData['ampSubNav'] = array(
|
||||
array(
|
||||
'caption' => "Trainings­zeiten",
|
||||
'icon' => $baseUrl."/ressourcen/graphiken/icons/clockIconFriendly.svg",
|
||||
'title' => "Trainingszeiten und -orte der Judoka des Chemnitzer WSV",
|
||||
'href' => $canonicalBaseUrl."/trainingszeiten.php",
|
||||
'isActive' => 'true',
|
||||
),
|
||||
array(
|
||||
'caption' => "Termine",
|
||||
'icon' => $baseUrl."/ressourcen/graphiken/icons/calendarIcon.svg",
|
||||
'title' => "Kalender mit Terminen für Wettkämpfe",
|
||||
'href' => $baseUrl."/pages/desktop/verein.wettkampfkalender.php"
|
||||
),
|
||||
array(
|
||||
'caption' => "Galerien",
|
||||
'icon' => $baseUrl."/ressourcen/graphiken/icons/gallery.svg",
|
||||
'title' => "Bilder und Videos von unseren Wettkämpfen und sonstigen Veranstaltungen",
|
||||
// 'href' => $baseUrl."/pages/desktop/verein.galerien.php"
|
||||
'href' => $canonicalBaseUrl."/galerien.php"
|
||||
),
|
||||
array(
|
||||
'caption' => "JudoWiki",
|
||||
'icon' => $baseUrl."/ressourcen/graphiken/icons/wikipediaW.svg",
|
||||
'title' => "Ein kleines Nachschlagewerk über Judo",
|
||||
'href' => $baseUrl."/JudoWiki"
|
||||
),
|
||||
array(
|
||||
'caption' => "Kontakt",
|
||||
'icon' => $baseUrl."/ressourcen/graphiken/icons/contact4Ways.svg",
|
||||
'title' => "Möglichkeiten mit dem Chemnitzer Freizeit- und Wohngebietssportverein in Kontakt zu treten",
|
||||
'href' => $canonicalBaseUrl."/kontakt.php"
|
||||
),
|
||||
);
|
||||
|
||||
$siteData['subNav'] = "<nav class=\"subNav\">". getAmpSubNav($siteData['ampSubNav']) ."</nav>";
|
||||
|
||||
|
||||
// Modellierung:
|
||||
// - der Content ist eine Menge von Sections
|
||||
// - eine Section ist eine Folge von Articles
|
||||
$siteData['content'] = array();
|
||||
|
||||
$trainingSection = array();
|
||||
|
||||
$trainingArticle = "";
|
||||
$trainingLocationLink = "";
|
||||
$trainingLocationLink = "<a href=\"http://www.openstreetmap.org/?mlat=50.807643&mlon=12.882060#map=17/50.807643/12.882060\" title=\"Karte des Dojo des CWSV\"><span itemscope itemtype=\"https://schema.org/SportsActivityLocation\"><meta itemprop=\"name\" content=\"Dojo des Chemnitzer WSV\" /><meta itemprop=\"image\" content=\"http://img.webme.com/pic/c/cwsv-sport/dsc_1410.jpg\"/><span itemprop=\"address\">Dojo Sportplatz Str. Usti nad Labem 42, 09120 Chemnitz</span></span></a>";
|
||||
|
||||
$trainingArticle .= "<section>";
|
||||
$trainingArticle .= "<h2>Trainingseinheiten</h2>";
|
||||
$trainingArticle .= "<article>";
|
||||
$trainingArticle .= "<h3>Mittwoch (alle AK)</h3>";
|
||||
$trainingArticle .= "<ul>";
|
||||
$trainingArticle .= "<li>16:00-17:45</li>";
|
||||
$trainingArticle .= "<li>".$trainingLocationLink."</li>";
|
||||
$trainingArticle .= "</ul>";
|
||||
$trainingArticle .= "<h3>Freitag (Kinder)</h3>";
|
||||
$trainingArticle .= "<ul>";
|
||||
$trainingArticle .= "<li>16:00-17:45</li>";
|
||||
$trainingArticle .= "<li>".$trainingLocationLink."</li>";
|
||||
$trainingArticle .= "</ul>";
|
||||
$trainingArticle .= "<h3>Freitag (Jugend/EW)</h3>";
|
||||
$trainingArticle .= "<ul>";
|
||||
$trainingArticle .= "<li>17:15-19:00</li>";
|
||||
$trainingArticle .= "<li>".$trainingLocationLink."</li>";
|
||||
$trainingArticle .= "</ul>";
|
||||
$trainingArticle .= "</article>";
|
||||
$trainingArticle .= "<article>";
|
||||
$trainingArticle .= "<h2>Karten</h2>";
|
||||
$trainingArticle .= "<ul><li>".$trainingLocationLink."</li></ul>";
|
||||
$trainingArticle .= "</article>";
|
||||
$trainingArticle .= "</section>";
|
||||
|
||||
array_push($trainingSection, $trainingArticle);
|
||||
|
||||
array_push($siteData['content'], $trainingSection);
|
||||
|
||||
require_once('cwsvJudo.ampTemplate.inc.php');
|
||||
?>
|
||||
@@ -0,0 +1,9 @@
|
||||
http://cwsvjudo.bplaced.net/
|
||||
http://cwsvjudo.bplaced.net/JudoWiki
|
||||
http://cwsvjudo.bplaced.net/galerien
|
||||
http://cwsvjudo.bplaced.net/wkKalender
|
||||
http://cwsvjudo.bplaced.net/trainingszeiten
|
||||
http://cwsvjudo.bplaced.net/kontakt
|
||||
http://amp.cwsvjudo.bplaced.net/
|
||||
http://amp.cwsvjudo.bplaced.net/trainingszeiten.php
|
||||
http://amp.cwsvjudo.bplaced.net/kontakt.php
|
||||
@@ -0,0 +1,16 @@
|
||||
<?php
|
||||
/// Umleitung eingeführt am 2017-09-14
|
||||
|
||||
/// Einbinden der Konfiguration, insbesondere Basisvariablen
|
||||
/// relative Pfadangabe, jedes Verzeichnis soll seine eigene haben
|
||||
require_once("./config.inc.php");
|
||||
|
||||
// Redirect zur neuen Seite
|
||||
include($basePath."/ressourcen/phpLib/redirect.php");
|
||||
redirect($canonicalBaseUrl."/trainingszeiten.php", 301);
|
||||
// Damit es einen Anhaltspunkt gibt, ob die alte Seite noch besucht wird, stoßen wir den Counter an
|
||||
// $chCounter_page_title = "Startseite (alt)";
|
||||
// $chCounter_visible=0;
|
||||
// include($_SERVER['DOCUMENT_ROOT']."/expCounter/counter.php");
|
||||
exit();
|
||||
?>
|
||||
@@ -0,0 +1,20 @@
|
||||
<?php
|
||||
/// Die Basisdomain, unter der die Hauptseite zu erreichen ist
|
||||
$baseDomain = "cwsvjudo.bplaced.net";
|
||||
/// Subdomain, unter dem dieses Verzeichnis zu finden ist (falls der Fall gegeben ist)
|
||||
$subDomain = "amp";
|
||||
/// Basis(/Root)-Verzeichnis auf dem Server (für Dateizugriffe, insbesondere phpIncludes)
|
||||
$basePath = "/users/cwsvjudo/www";
|
||||
|
||||
/// Url zum Zugriff auf "shared Data" unter der Hauptadresse
|
||||
$baseUrl = "http://".$baseDomain;
|
||||
/// Die kanonische Url dieses Verzeichnisses (unter welcher
|
||||
/// Domainadresse die Seiten dieses Verzeichnisses bevorzugt zu
|
||||
/// erreichen seien sollen, also entweder eine SubdomainUrl, oder die
|
||||
/// baseUrl mit dem Verzeichnis angehängt)
|
||||
/// Achtung: Gedacht für eine einheitliche Bezeichnung bei internem
|
||||
/// Verlinken. Der canonicalLink im Header ist bei ampSeiten nicht die
|
||||
/// eigene Adresse, sondern die (kanonische) Adresse der "normalen"
|
||||
/// Version der Seite.
|
||||
$canonicalBaseUrl = "http://".$subDomain.".".$baseDomain;
|
||||
?>
|
||||
Reference in New Issue
Block a user