initial-commit

This commit is contained in:
Thomas Mack 2019-05-27 12:49:15 +02:00
parent 0ddd3b3417
commit 02d5eb86db
48 changed files with 29785 additions and 1 deletions

View File

@ -1,2 +1,3 @@
# stattbuchung_php_open
# FE-StattBuchung
Frontend PHP-Anwendung zur Anbindung von Stattbuchung an eine eigene Webseite

136
ajax.php Normal file
View File

@ -0,0 +1,136 @@
<?php
/**
*
* Ein Client für die Darstellung von Kalenderterminen und die Online-Buchung dieser Termine
* im Kontext von community.stattbuchung.de
*
* Jede Darstellung liest dabei die Daten vom community.stattbuchung.de Server ein und gibt diese Entsprechend aus
* Zur Authentifizierung wird Benutzername, Kennwort und der API-Key benötigt.
* Sollte im produktiven Einsatz immer SSL-gesichert verwendet werden.
*
* Autor: Thomas Mack
*/
include('client.php');
include('template.php');
$ini = parse_ini_file('config.ini');
$debug=false;
/**
* Für jede Aktion wird ein Opcode an den Server geschickt.
* Dieser wird mit weiteren Daten im JSON-Format parametrisiert.
* Die jeweils notwendigen Paramater variieren.
* In jedem Fall sollte der API-Key unter dem Attribut 'de_stattbuchung_Kanal'
* enthalten sein
*/
define("opcObjectlistProdukt", 256160);
define("opcObjectlistEventNachZeitraum", 255100);
define("opcQueryProdukt",256167);
define("opcLoadProduktContainer",256168);
define("opcFetchTreffpunkt",256141);
define("opcCalendarByChannel",257000);
define("opcFetchTermindetail",257001);
define("opcAddAnmeldung",257002);
define("opcStichwortlistByKanal",257003);
define("opcPaymentStepOne",257007);
/**
* Ende OPCODE Definition
*/
function sendAnmeldung($id, $sessionInfo, $apikey, $oidang, $verkaufstelle, $zahlungsart, $postdata) {
date_default_timezone_set('Europe/Berlin');
$gebdate = new DateTime( $postdata['geburtsdatum']);
$params=array(
"oid" => $postdata['de_stattbuchung_event_Modul'],
"anrede"=>$postdata['anrede'],
"vorname"=>$postdata['vorname'],
"nachname"=>$postdata['nachname'],
"strasse"=>$postdata['strasse'],
"plz"=>$postdata['plz'],
"ort"=>$postdata['ort'],
"email"=>$postdata['email'],
"telefon"=>$postdata['telefon'],
"institution"=>$postdata['institution'],
"geburtsdatum"=>$gebdate->format(DateTime::ATOM),
"de_bidat_av_Profiltyp_geburtsort"=>$postdata['geburtsort'],
"kommentar"=>$postdata['kommentar'],
"de_stattbuchung_event_Modul"=>$postdata['de_stattbuchung_event_Modul'],
"de_stattbuchung_Kanal"=>$apikey,
"de_stattbuchung_Verkaufsstelle"=>$verkaufstelle,
"systems_sdw_fi_Zahlungsart"=>$zahlungsart,
"systems_sdw_hr_Angestellter"=>$oidang
);
foreach ($postdata as $key => $value) {
if(strpos($key, "de_stattbuchung_Teilnehmerart_") === 0) {
$params[$key] = $value;
}
}
$resp=post($sessionInfo, opcPaymentStepOne, $params, "{}", $debug) ;
return $resp;
}
/**
* Main.
*
*/
try {
$sessionInfo=login($ini['host'], $ini['user'], $ini['psw'], $debug);
date_default_timezone_set('Europe/Berlin');
//$resp=get($sessionInfo, opcObjectlistProdukt, $params, $debug) ;
$treffpunktid = $_GET['treffpunkt'];
$registerid = $_GET['register'];
$modulid = $_GET['modul'];
$modultermine = $_GET['modultermine'];
$formid = $_GET['form'];
$stichwortkey = $_GET['stichwort'];
$monat = $_GET['monat'];
$jahr = $_GET['jahr'];
$maxResult = $_GET['maxResultLength'];
$teaser = $_GET['teaser'];
$viewStyle = $_GET['style'];
$verkaufstelle = $ini['de_stattbuchung_Verkaufsstelle'];
$zahlungsart = $ini['systems_sdw_fi_Zahlungsart'];
if($registerid == 872) {
$resp = sendAnmeldung($registerid, $sessionInfo, $ini['apikey'], $ini['oid_ang'], $verkaufstelle, $zahlungsart, $_POST);
if($ini['paypal'] == true) {
header('Content-type: application/json');
echo json_encode($resp);
}
//renderAnmeldeformular($resp, $sessionInfo, $ini['paypal'], 2);
}
// Ausloggen nicht vergessen!
logoff($sessionInfo, $debug);
} catch (Exception $e) {
echo 'Exception: '.$e->getMessage()." code: ".$e->getCode()."<br/>";
}
?>

462
app.php Normal file
View File

@ -0,0 +1,462 @@
<!DOCTYPE html>
<html lang="de">
<head>
<meta charset="utf-8" />
<title>StattBuchung-PHP</title>
<!-- Required meta tags -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<!-- Bootstrap CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-alpha.6/css/bootstrap.min.css" integrity="sha384-rwoIResjU2yc3z8GV/NPeZWAv56rSmLldC3R/AZzGRnGxQQKnKkoFVhFQhNUwEyJ" crossorigin="anonymous">
<link rel="stylesheet" href="style/default.css">
<link rel="stylesheet" href="style/bidat.css">
<link rel="stylesheet" href="style/font-awesome.min.css">
<link href="https://www.verkehrsakademie-franken.com/index.php/termine?format=feed&amp;type=rss" rel="alternate" type="application/rss+xml" title="RSS 2.0">
<link href="https://www.verkehrsakademie-franken.com/index.php/termine?format=feed&amp;type=atom" rel="alternate" type="application/atom+xml" title="Atom 1.0">
<link href="https://www.verkehrsakademie-franken.com/media/com_eventbooking/assets/bootstrap/css/bootstrap.css" rel="stylesheet">
<link href="https://www.verkehrsakademie-franken.com/media/com_eventbooking/assets/css/font-awesome.min.css" rel="stylesheet">
<link href="https://www.verkehrsakademie-franken.com/media/com_eventbooking/assets/css/style.css" rel="stylesheet">
<link href="https://www.verkehrsakademie-franken.com/media/com_eventbooking/assets/css/themes/sky.css" rel="stylesheet">
<link href="https://www.verkehrsakademie-franken.com/media/com_eventbooking/assets/js/colorbox/colorbox.css" rel="stylesheet">
<link href="https://www.verkehrsakademie-franken.com/templates/yootheme/css/theme.12.css?v=1541452592" rel="stylesheet" id="theme-style-css">
<link href="https://www.verkehrsakademie-franken.com/media/widgetkit/wk-styles-e33f5522.css" rel="stylesheet" id="wk-styles-css">
</head>
<?php
include('client.php');
$ini = parse_ini_file('config.ini');
$navigation = file_get_contents('./nav.html', true);
?>
<body id='bidat'>
<?php echo $navigation; ?>
<?php
if ($ini['apikey']=='true') {
echo "<div class='container'><form action='index.php' method='GET'>";
echo "<input type='text' name='query'/> <input type='submit' value='Search'/>";
echo "</form></div>";
}
?>
<div id="tm-main" class="tm-main uk-section uk-section-default" uk-height-viewport="expand: true" style="min-height: 494px;">
<div class="uk-container">
<?php
$debug=false;
define("opcObjectlistProdukt", 256160);
define("opcObjectlistEventNachZeitraum", 255100);
define("opcQueryProdukt",256167);
define("opcLoadProduktContainer",256168);
define("opcFetchTreffpunkt",256141);
define("opcCalendarByChannel",257000);
define("opcFetchTermindetail",257001);
define("opcAddAnmeldung",257002);
define("lorem", "Donec id elit non mi porta gravida at eget metus. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. Etiam porta sem malesuada magna mollis euismod. Donec sed odio dui.");
function renderProduktliste($resp, $sessionInfo, $query) {
echo "<div class='container'>";
echo "<div class='result'><h3><span class='fa fa-search'></span>Die Suche nach <em>".$query."</em> ergab ".$resp["items"][0]["resultSetCount"]." Teffer</h3>";
$queryresult = $resp["items"];
foreach ($resp[items][0][items] as $produkt) {
echo "<div class='produktlistitem'><span class='fa fa-external-link'></span>";
echo "<a href='index.php?produkt=".$produkt["oid"]."'>";
echo $produkt["label"];
echo "</a>";
echo "</div>";
}
echo "</div>";
echo "</div>";
}
function renderAnmeldeformular($resp, $sessionInfo) {
echo "<article>";
echo "<form id='needs-validation' class='needs-validation' action='index.php?register=872' method='post'>";
echo "<input type='hidden' name='de_stattbuchung_event_Modul' value='".$resp['oid']."' required/>";
echo "<div class='formrow'><label>Anrede</label>";
echo "<input list='anrede' placeholder='Anrede auswählen' name='anrede' allowautofill='no' required/>";
echo "<datalist id='anrede'>";
echo "<option value='Herr'>";
echo "<option value='Frau'>";
echo "</datalist>" ;
echo "</div>";
$feldliste = array ("Vorname", "Nachname", "Strasse", "PLZ", "Ort", "Email");
foreach ($feldliste as $feld) {
echo "<div class='formrow'>";
echo "<label>".$feld."</label>";
echo "<input type='text' id='".strtolower($feld)."' name='".strtolower($feld)."' required/>";
echo "</div>";
}
echo " <div class='formrow'>";
echo " <label class='form-check-label' for='datenschutz'>Ich Stimme den Datenschutzbestimmungen zu</label>";
echo " <input type='checkbox' class='form-check-input' id='datenschutz' required/>";
#echo " </div><div><h3>Wollen Sie uns noch etwas mitteilen?</h3></div>";
echo " <div class='formrow'>";
echo " <label for='kommentar'>Bemerkung</label>";
echo " <textarea class='form-control bidat_textarea' id='kommentar' name='kommentar' rows='3'></textarea>";
echo " </div>";
echo "<div class='formrow'> <button type='submit' class='btn btn-primary'>Anmeldung abschicken</button></div>";
echo "</form>";
echo "</article>";
echo "<script>";
echo "// Example starter JavaScript for disabling form submissions if there are invalid fields";
echo "(function() {";
echo " 'use strict';";
echo " window.addEventListener('load', function() {";
echo " // Fetch all the forms we want to apply custom Bootstrap validation styles to";
echo " var forms = document.getElementsByClassName('needs-validation');";
echo " // Loop over them and prevent submission";
echo " var validation = Array.prototype.filter.call(forms, function(form) {";
echo " form.addEventListener('submit', function(event) {";
echo " if (form.checkValidity() === false) {";
echo " event.preventDefault();";
echo " event.stopPropagation();";
echo " }";
echo " form.classList.add('was-validated');";
echo " }, false);";
echo " });";
echo " }, false);";
echo "})();";
echo "</script>";
}
function renderTerminliste($resp, $sessionInfo, $query) {
echo "<table class='table table-striped table-bordered table-condensed eb-responsive-table'>";
echo "<thead><tr><th>Termin</th><th class='date_col'>Datum, Uhrzeit</th><th class='capacity_col'>max.&nbsp;Teilnehmer</th><th class='registered_col'>aktuelle&nbsp;Teilnehmer</th><th class='center available-place-col'>verfügbare Plätze</th><th class='center actions-col'>Anmelden</th></tr></thead>";
echo "<tbody>";
date_default_timezone_set('Europe/Berlin');
foreach ($resp[items][0][items] as $termin) {
$von = new DateTime($termin["von"]);
echo "<tr>";
echo "<td class='tdno0' data-content=''>";
echo"<a href='index.php?modul=".$termin["oid"]."'>".$termin["produkt_titel"]."</a>";
echo "</td>";
echo "<td class='tdno1' data-content='Datum, Uhrzeit'>";
//echo $termin["von"];
echo $von->format('j.m.Y \a\b H:i');
echo "</td>";
echo "<td class='tdno2' data-content='max. Teilnehmer'>";
echo $termin["maxtn"];
echo "</td>";
echo "<td class='tdno3' data-content='angemeldet'>";
echo $termin["tn"];
echo "</td>";
echo "<td class='tdno4' data-content='freie Plätze'>";
echo $termin["maxtn"] - $termin["tn"];
echo "</td>";
echo "<td class='tdno4' data-content='Anmeldung'>";
renderAnmeldeButton($termin["maxtn"], $termin["tn"], $termin["oid"]);
echo "</td>";
echo "</tr>";
}
echo "</tbody>";
echo "</table>";
}
function renderAnmeldeButton($maxtn, $tn, $oid) {
if($maxtn <= $tn) {
echo "Keine Anmeldung möglich";
} else {
echo "<div class='eb-taskbar'><ul><li>";
echo "<a class='btn ' href='index.php?form=".$oid."'>Anmeldung</a>";
echo "</li></ul></div>";
}
}
function fetchTermindetail($id, $sessionInfo, $apikey) {
$params=array(
"oid" => $id,
"de_stattbuchung_event_Modul"=>$id,
"de_stattbuchung_Kanal"=>$apikey
);
$resp=post($sessionInfo, opcFetchTermindetail, $params, "{}", $debug) ;
return $resp;
}
function sendAnmeldung($id, $sessionInfo, $apikey, $oidang, $postdata) {
$params=array(
"oid" => $postdata['de_stattbuchung_event_Modul'],
"anrede"=>$postdata['anrede'],
"vorname"=>$postdata['vorname'],
"nachname"=>$postdata['nachname'],
"strasse"=>$postdata['strasse'],
"plz"=>$postdata['plz'],
"ort"=>$postdata['ort'],
"email"=>$postdata['email'],
"kommentar"=>$postdata['kommentar'],
"de_stattbuchung_event_Modul"=>$postdata['de_stattbuchung_event_Modul'],
"de_stattbuchung_Kanal"=>$apikey,
"systems_sdw_hr_Angestellter"=>$oidang
);
$resp=post($sessionInfo, opcAddAnmeldung, $params, "{}", $debug) ;
# echo var_dump($resp);
if($resp['beschreibung'] == 'OK') {
echo "<h1>Herzlichen Dank für Ihre Anmeldung</h1>";
echo "<div>Sie sollten in Kürze eine Nachricht über die Adresse ".$postdata['email']." erhalten.</div>";
} else {
echo "<h1>Ups</h1>";
echo "<div>Bei der Anmeldung ist etwas schief gelaufen, bitte versuchen Sie es erneut </div>";
echo "<hr><small>".$resp['beschreibung']."</small>";
}
return $resp;
}
function fetchTreffpunkt($id, $sessionInfo) {
$params=array("oid" => $id);
$treffpunkt=post($sessionInfo, opcFetchTreffpunkt, $params, "{}", $debug) ;
return $treffpunkt;
}
function renderTerminDetail($resp, $sessionInfo, $showmap, $cssid) {
$ep = $resp;
date_default_timezone_set('Europe/Berlin');
$von = new DateTime($ep["von"]);
$bis = new DateTime($ep["bis"]);
echo "<div id='".$cssid."' class='clearfix eb-category-2 eb-event'>";
echo "<div class='eb-box-heading clearfix'>";
echo "<h1 class='eb-page-heading'>".$ep["produkt_titel"]."</h1>";
echo "</div>";
echo "<div id='eb-event-details' class='eb-description'>";
echo "<div class='eb-description-details clearfix' itemprop='description'>".$ep["produkt_beschreibung"]."</div>";
echo "<table class='table table-bordered table-striped'><tbody>";
echo "<tr><td>Beginn</td><td>".$von->format('j.m.Y - H:i')."</td></tr>";
echo "<tr><td>Ende</td><td>".$bis->format('j.m.Y - H:i')."</td></tr>";
echo "<tr><td>max. Teilnehmer</td><td>".$ep["maxtn"]."</td></tr>";
echo "<tr><td>aktuelle Teilnehmer</td><td>".$ep["tn"]."</td></tr>";
echo "<tr><td>verfügbare Plätze</td><td>".($ep["maxtn"]-$ep["tn"])."</td></tr>";
if ($ep["preis"] >0 )echo "<tr><td>Preis</td><td>".$ep["preis"]."</td></tr>";
echo "<tr><td>Ort</td><td>".$ep["treffpunkt_name"]."</td></tr>";
echo "</tbody></table>";
renderAnmeldeButton($ep["maxtn"], $ep["tn"], $ep["oid"]);
echo "</div>";
echo "</div>";
if($showmap) echo "<iframe src='".$ep["treffpunkt_link"]."' width = '100%' height = '400px' ></iframe>";
}
function renderTerminDetailListenansicht($resp, $sessioninfo) {
echo "<div id='eb-events'>";
foreach ($resp[items][0][items] as $termin) {
renderTerminDetail($termin, $sessionInfo, false, 'bidat_list');
}
echo "</div>";
}
function renderProduktDetail($resp, $sessionInfo) {
$pc = $resp[items][0];
echo "<div class='container'>";
echo "<div class='produkt'>";
echo "<h2>".$pc["name"]."</h2>";
echo "<h3>".$pc["untertitel"]."</h3>";
$beschreibung = trim($pc["beschreibung"]);
if(strlen($beschreibung)<3) $beschreibung = lorem;
echo "<div class='beschreibung'>".$beschreibung."</div>";
echo "<div class='row'>";
echo "<div class='col-md-4 sprachen'><h3>Verfügbare Sprachen</h3><ul>";
foreach($pc["_sprachen_"]["items"] as $sprache) {
echo "<li>".$sprache["label"]."</li>";
}
echo "</ul></div>";
echo "<div class='col-md-4 treffpunkt'><h3>Treffpunkt</h3>";
$treffpunkt = fetchTreffpunkt($pc["treffpunkt"]["oid"], $sessionInfo);
echo "<div class='treffpunktname'>".$treffpunkt["name"]."</div>";
echo "<div class='oepnv'><em>Hinweis zur Erreichbarkeit</em></div>";
echo "<div class='oepnv'>".$treffpunkt["oepnv"]."</div>";
echo "</div>";
echo "<div class='col-md-4 treffpunkt'><h3>Weitere Infos</h3>";
echo "<div class='row'>";
echo "<div class='col-md-6'>Dauer</div>";
echo "<div class='col-md-6'>".$pc["dauer"]." h</div>";
echo "</div>";
echo "<div class='row'>";
echo "<div class='col-md-6'>min TN</div>";
echo "<div class='col-md-6'>".$pc["minTN"]."</div>";
echo "</div>";
echo "<div class='row'>";
echo "<div class='col-md-6'>max TN</div>";
echo "<div class='col-md-6'>".$pc["maxTN"]."</div>";
echo "</div>";
echo "</div>";
echo "</div>";
echo "</div>";
echo "</div>";
}
/**
* Main.
*
*/
try {
$sessionInfo=login($ini['host'], 'nfbg', 'bobby', $debug);
//$resp=get($sessionInfo, opcObjectlistProdukt, $params, $debug) ;
$produktid = $_GET['produkt'];
$treffpunktid = $_GET['treffpunkt'];
$registerid = $_GET['register'];
$modulid = $_GET['modul'];
$formid = $_GET['form'];
$stichwortkey = $_GET['stichwort'];
if($produktid >100) {
$params=array(
"systems_sdw_org_Organisation"=>$ini["oid_org"],
"systems_sdw_hr_Angestellter"=>$ini['oid_ang'],
"de_stattbuchung_Produkt"=>$produktid,
"de_stattbuchung_Kanal"=>$ini["apikey"]
);
$resp=post($sessionInfo, opcLoadProduktContainer, $params, "{}", $debug) ;
renderProduktDetail($resp, $sessionInfo);
} else if($treffpunktid > 100) {
fetchTreffpunkt($treffpunktid, $sessionInfo);
} else if($registerid == 872) {
sendAnmeldung($registerid, $sessionInfo, $ini['apikey'], $ini['oid_ang'], $_POST);
} else if ($modulid > 100) {
renderTerminDetail(fetchTermindetail($modulid, $sessionInfo, $ini['apikey'], 'eb-event-page'), $sessionInfo);
} else if ($formid > 100) {
renderAnmeldeformular(fetchTermindetail($formid, $sessionInfo, $ini['apikey']), $sessionInfo);
} else if($treffpunktid > 100) {
renderAnmeldeformular($registerid, $sessionInfo);
} else {
$query =$_GET['query'];
$query=htmlspecialchars($query);
$params=array("oid" => "0",
"de_stattbuchung_Kanal"=>$ini["apikey"],
"maxResultLength"=>100 );
if($query !== '') {$params['muster']=$query;}
if($stichwortkey != 'NULL') {
$params['de_stattbuchung_Stichwort_key'] = $stichwortkey;
}
$jsonString ="{oid:0}";
$resp=post($sessionInfo, opcCalendarByChannel, $params, $jsonString, $debug) ;
if(is_null($stichwortkey)) renderTerminliste($resp, $sessionInfo, $query);
else renderTerminDetailListenansicht($resp, $sessioninfo);
}
// nicht vergessen!
logoff($sessionInfo, $debug);
} catch (Exception $e) {
echo 'Exception: '.$e->getMessage()." code: ".$e->getCode()."<br/>";
}
?></p>
</div>
</div>
</body>
</html>

304
client.php Normal file
View File

@ -0,0 +1,304 @@
<?php
/**
* Ein HTTP-Client in PHP unter Verwendung der curl-Bibliothek für den Zugriff auf die APIs
* im SDW-/BiDat-Ökosystem. Sollte im produktiven Einsatz immer SSL-gesichert verwendet werden.
*
* Autor: Benedikt Wismans
*/
define("opcLogon", 1003);
define("opcLogoff", 1002);
define("httpOK", 200);
define("httpMovedTemp", 302);
define("httpMovedTempNew", 303);
// Der Frontcontroller liegt im geschützten Bereich. Jeder Aufruf dieser URL mit egal was hinten dran verlangt
// AUthentifizierung oder eine authentifizierte Session
define("frontcontroller", "/SDW/resources/fc");
// Die Loginform liegt im public-Bereich. Aufurfe von URLs wie dem Frontcontroller werden bei nicht authtifizierten
// Session an diese URL weitergeleitet zur Authentifizierung
define("loginform", '/SDW/j_security_check');
/**
* Öffnet eine Verbindung zu einem Tomcatcontainer mit container based authentifiaction.
* Der Vorgag ist 2 stufig, als 3. Stufe wird dann noch das eigentliche Login gemacht.
*
* @param {String} $url Die URL fer Servers in der Form http(s)://fqdn:port
* @param {String} &user Der Nutzername des Accounts
* @param {String} &pass Das Kennwort des Accounts
* @param {Boolean} $debug Debug-Flag
* @returns {Object} Ein Assoc Array mit Metadtaen der geoffneten und authentifizierten Session. Muss in folgende requests reingesteckt werden.
*
*/
function login($url, $user, $pass, $debug) {
$sessionId = uniqid('', true);
$cookie='/tmp/'.$sessionId;
// stage 1: call protected ressource: Frontcontroller with Opcode Login
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_COOKIESESSION => 1,
CURLOPT_RETURNTRANSFER => 1,
CURLOPT_URL => $url.frontcontroller.'?opc='.opcLogon,
CURLOPT_USERAGENT => 'PHP Request '.$sessionId
));
// Save SdessionCookie JSESSIONID returned by server
curl_setopt($curl, CURLOPT_COOKIEJAR, $cookie);
curl_exec($curl);
if (curl_errno($curl)) {
throw new Exception(curl_error($curl), curl_errno($curl));
}
$http_code = curl_getinfo($curl, CURLINFO_HTTP_CODE);
if ($http_code!=httpOK) {
throw new Exception('HTTP-Response STATUS<>200', $http_code);
}
curl_close($curl);
// stage 2 : send credentials using sessioncookie
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_RETURNTRANSFER => 1,
CURLOPT_URL => $url.loginform,
CURLOPT_USERAGENT => 'PHP Request '.$sessionId,
CURLOPT_POST => 1,
CURLOPT_HTTPHEADER => array(
'Content-Type: application/x-www-form-urlencoded; charset=UTF-8',
'Connection: Keep-Alive'
)
));
// Put credentail into postbody invisible in logs
curl_setopt($curl, CURLOPT_POSTFIELDS,'j_username='.urlencode($user).'&j_password='.urlencode($pass));
// Send SdessionCookie JSESSIONID
curl_setopt($curl, CURLOPT_COOKIEFILE, $cookie);
curl_exec($curl);
if (curl_errno($curl)) {
throw new Exception(curl_error($curl), curl_errno($curl));
}
$http_code = curl_getinfo($curl, CURLINFO_HTTP_CODE);
if ($http_code!=httpMovedTemp && $http_code!=httpMovedTempNew) {
throw new Exception('HTTP-Response STATUS<>302 || 303', $http_code);
}
curl_close($curl);
// stage 3: call protected ressource again which is now accessible due to 302:moved temporarily
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_RETURNTRANSFER => 1,
CURLOPT_URL => $url.frontcontroller.'?opc='.opcLogon,
CURLOPT_USERAGENT => 'PHP Request '.$sessionId
));
// Send SdessionCookie JSESSIONID
curl_setopt($curl, CURLOPT_COOKIEFILE, $cookie);
// Session has changed after logon due to security issue so save new cookie
curl_setopt($curl, CURLOPT_COOKIEJAR, $cookie);
$longonInfo=curl_exec($curl);
if (curl_errno($curl)) {
throw new Exception(curl_error($curl), curl_errno($curl));
}
$http_code = curl_getinfo($curl, CURLINFO_HTTP_CODE);
if ($http_code!=httpOK) {
throw new Exception('HTTP-Response STATUS<>200', $http_code);
}
curl_close($curl);
// convert result from JSON to assoc array and add session infos
$sessionInfo=json_decode($longonInfo, true);
$sessionInfo ['sessionId'] = $sessionId;
$sessionInfo ['cookie'] = $cookie;
$sessionInfo ['url'] = $url;
$sessionInfo ['user'] = $user;
$sessionInfo ['pass'] = "";
if ($debug) showResponse($sessionInfo);
return $sessionInfo;
}
/**
* LogOff. Abmelden vom System und dadurch kill der Session.
* Ruft nur Get mit dem richtigen Opcode auf
* @param {Object} $sessionInfo Assoc Array, wird nach dem erfolgreichen Anmelden erzeugt, siehe login
* @param {Boolean} $debug Debug-Flag für Bildschirmausgaben
* @returns {Object} Das Ergebnis des requests, ein JOSN-Objekt das als Assoc Array zurückgegeben wird
*/
function logoff($sessionInfo, $debug) {
return get($sessionInfo, opcLogoff, null, $debug);
}
/**
* Get-Methode im Rahmen der geöffneten Session.
*
* Wirft Exceptions falls der request schiefläuft. Falls die Session nicht authentifiziert ist wird
* der Aufurf vom Tomcat stillschweigend an die Login-Seite verwiesen. Das sollte also nicht passieren.
*
* @param {Object} $sessionInfo Assoc Array, wird nach dem erfolgreichen Anmelden erzeugt, siehe login
* @paeam {OPCODE} $opcode Long. Der Opcode für den request
* @param {Object} $params Assoc Array mit Parametern fpr die URL analog zum get-Aufruf
* @param {String} $data JSON-Objekt als String, die Payload für den Postbody
* @param {Boolean} $debug Debug-Flag für Bildschirmausgaben
* @returns {Object} Das Ergebnis des requests, ein JOSN-Objekt das als Assoc Array zurückgegeben wird
*/
function get($sessionInfo, $opcode, $params, $debug) {
$url=$sessionInfo ['url'].frontcontroller.'?opc='.$opcode;
if ($params) {
foreach ($params as $name => $value) {
$url .= "&".urlencode($name)."=".urlencode($value);
}
}
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_RETURNTRANSFER => 1,
CURLOPT_URL => $url,
CURLOPT_USERAGENT => 'PHP Request '.$sessionInfo ['sessionId']
));
// Send SdessionCookie JSESSIONID
curl_setopt($curl, CURLOPT_COOKIEFILE, $sessionInfo ['cookie']);
// Session has changed et least after logon due to security issue so better save new cookie always
curl_setopt($curl, CURLOPT_COOKIEJAR, $cookie);
$jsonString=curl_exec($curl);
if (curl_errno($curl)) {
throw new Exception(curl_error($curl), curl_errno($curl));
}
$http_code = curl_getinfo($curl, CURLINFO_HTTP_CODE);
if ($http_code!=httpOK) {
throw new Exception('HTTP-Response STATUS<>200', $http_code);
}
curl_close($curl);
if ($debug) showResponse(json_decode($jsonString, true));
return json_decode($jsonString, true);
}
/**
* Post-Methode im Rahmen der geöffneten Session.
*
* Wirft Exceptions falls der request schiefläuft. Falls die Session nicht authentifiziert ist wird
* der Aufurf vom Tomcat stillschweigend an die Login-Seite verwiesen. Das sollte also nicht passieren.
*
* @param {Object} $sessionInfo Assoc Array, wird nach dem erfolgriechen Anmelden erzeugt, siehe login
* @paeam {OPCODE} $opcode Long. Der Opcode für den request
* @param {Object} $params Assoc Array mit Parametern fpr die URL analog zum get-Aufruf
* @param {String} $data JSON-Objekt als String, die Payload für den Postbody
* @param {Boolean} $debug Debug-Flag für Bildschirmausgaben
* @returns {Object} Das Ergebnis des requests, ein JOSN-Objekt das als Assoc Array zurückgegeben wird
*/
function post($sessionInfo, $opcode, $params, $data, $debug) {
$url=$sessionInfo ['url'].frontcontroller.'?opc='.$opcode;
if ($params) {
foreach ($params as $name => $value) {
$url .= "&".urlencode($name)."=".urlencode($value);
}
}
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_RETURNTRANSFER => 1,
CURLOPT_URL => $url,
CURLOPT_USERAGENT => 'PHP Request '.$sessionInfo ['sessionId'],
CURLOPT_POST => 1,
CURLOPT_HTTPHEADER => array(
'Content-Type: application/x-www-form-urlencoded; charset=UTF-8',
'Connection: Keep-Alive'
)
));
// Send SdessionCookie JSESSIONID
curl_setopt($curl, CURLOPT_COOKIEFILE, $sessionInfo ['cookie']);
// Session has changed et least after logon due to security issue so better save new cookie always
curl_setopt($curl, CURLOPT_COOKIEJAR, $cookie);
// Put credentail into postbody invisible in logs
curl_setopt($curl, CURLOPT_POSTFIELDS,'data='.urlencode($data));
// Send SdessionCookie JSESSIONID
$jsonString=curl_exec($curl);
if (curl_errno($curl)) {
throw new Exception(curl_error($curl), curl_errno($curl));
}
$http_code = curl_getinfo($curl, CURLINFO_HTTP_CODE);
if ($http_code!=httpOK) {
throw new Exception('HTTP-Response STATUS<>200', $http_code);
}
curl_close($curl);
if ($debug) showResponse(json_decode($jsonString, true));
return json_decode($jsonString, true);
}
/**
* Doemload-Methode im Rahmen der geöffneten Session um ein File herunterzuladen.
*
* Wirft Exceptions falls der request schiefläuft. Falls die Session nicht authentifiziert ist wird
* der Aufurf vom Tomcat stillschweigend an die Login-Seite verwiesen. Das sollte also nicht passieren.
*
* @param {Object} $sessionInfo Assoc Array, wird nach dem erfolgriechen Anmelden erzeugt, siehe login
* @paeam {OPCODE} $opcode Long. Der Opcode für den request
* @param {Object} $params Assoc Array mit Parametern fpr die URL analog zum get-Aufruf
* @param {File} $file Geöffneter und zum Schreiben bereiter Filhandle im lokalen Dateisystem
* @param {Boolean} $debug Debug-Flag für Bildschirmausgaben
* @returns {File} Den Filehandel
*/
function download($sessionInfo, $opcode, $params, $file, $debug) {
$url=$sessionInfo ['url'].frontcontroller.'?opc='.$opcode;
if ($params) {
foreach ($params as $name => $value) {
$url .= "&".urlencode($name)."=".urlencode($value);
}
}
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_FILE => $file,
CURLOPT_TIMEOUT => 20,
CURLOPT_URL => $url,
CURLOPT_USERAGENT => 'PHP Request '.$sessionInfo ['sessionId']
));
// Send SdessionCookie JSESSIONID
curl_setopt($curl, CURLOPT_COOKIEFILE, $sessionInfo ['cookie']);
// Session has changed et least after logon due to security issue so better save new cookie always
curl_setopt($curl, CURLOPT_COOKIEJAR, $cookie);
curl_exec($curl);
if (curl_errno($curl)) {
throw new Exception(curl_error($curl), curl_errno($curl));
}
$http_code = curl_getinfo($curl, CURLINFO_HTTP_CODE);
if ($http_code!=httpOK) {
throw new Exception('HTTP-Response STATUS<>200', $http_code);
}
curl_close($curl);
return $file;
}
/**
* Helper-Methode für Debugzwecke
*
*/
function showResponse($response) {
foreach ($response as $name => $value) {
echo "$name = $value"."</br>";
}
}
?>

13
config.ini.example.ini Normal file
View File

@ -0,0 +1,13 @@
[userdata]
host = https://ej.works/SDW
user = loginname
psw = somethingSecret
templatePath = templates
apikey = auslesen aus dem Frontend Stattbuchung
oid_org =
oid_ang =
de_stattbuchung_Verkaufsstelle = 00
systems_sdw_fi_Zahlungsart = 00
show_searchbox = false
show_stichwort_selector = true
seitentitel = Termine ...

BIN
fonts/FontAwesome.otf Normal file

Binary file not shown.

Binary file not shown.

File diff suppressed because it is too large Load Diff

After

Width:  |  Height:  |  Size: 434 KiB

Binary file not shown.

Binary file not shown.

Binary file not shown.

45
iframeTest.html Normal file
View File

@ -0,0 +1,45 @@
<!DOCTYPE html>
<html lang="de">
<head>
<meta charset="utf-8" />
<title><?=$this->title?></title>
<!-- Required meta tags -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<!-- Bootstrap CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-alpha.6/css/bootstrap.min.css" integrity="sha384-rwoIResjU2yc3z8GV/NPeZWAv56rSmLldC3R/AZzGRnGxQQKnKkoFVhFQhNUwEyJ" crossorigin="anonymous">
<!-- FONT -->
<link href="https://fonts.googleapis.com/css?family=Montserrat:400" rel="stylesheet">
<!-- User CSS -->
<link rel="stylesheet" href="style/default.css">
<link rel="stylesheet" href="style/nfbg_v2.css">
<link rel="stylesheet" href="style/font-awesome.min.css">
<script type='text/javascript'>
function updateIframe() {
var loc = window.location.search;
iframe = document.getElementById('stattbuchung');
iframe.src = iframe.src +loc;
}
</script>
</head>
<body id='bidat<?=$this->bodyid?>' onload="updateIframe()">
Text außerhalb des iFrames
<iframe id="stattbuchung" src="index.php" width="100%" height="800" scrolling="auto" frameborder="1" title="Termine Stattbuchung" class="wrapper" >
Keine IFrames</iframe>
</body>
</html>

473
index.php Normal file
View File

@ -0,0 +1,473 @@
<?php
/**
*
* Ein Client für die Darstellung von Kalenderterminen und die Online-Buchung dieser Termine
* im Kontext von community.stattbuchung.de
*
* Jede Darstellung liest dabei die Daten vom community.stattbuchung.de Server ein und gibt diese Entsprechend aus
* Zur Authentifizierung wird Benutzername, Kennwort und der API-Key benötigt.
* Sollte im produktiven Einsatz immer SSL-gesichert verwendet werden.
*
* Autor: Thomas Mack
*/
include('client.php');
include('template.php');
$ini = parse_ini_file('config.ini');
$debug=false;
/**
* Für jede Aktion wird ein Opcode an den Server geschickt.
* Dieser wird mit weiteren Daten im JSON-Format parametrisiert.
* Die jeweils notwendigen Paramater variieren.
* In jedem Fall sollte der API-Key unter dem Attribut 'de_stattbuchung_Kanal'
* enthalten sein
*/
define("opcObjectlistProdukt", 256160);
define("opcObjectlistEventNachZeitraum", 255100);
define("opcQueryProdukt",256167);
define("opcLoadProduktContainer",256168);
define("opcFetchTreffpunkt",256141);
define("opcCalendarByChannel",257000);
define("opcFetchTermindetail",257001);
define("opcAddAnmeldung",257002);
define("opcStichwortlistByKanal",257003);
define("opcPaymentStepOne",257007);
/**
* Ende OPCODE Definition
*/
define("templatePath",$ini['templatePath'].'/');
function renderProduktliste($resp, $sessionInfo, $query) {
echo "<div class='container'>";
echo "<div class='result'><h3><span class='fa fa-search'></span>Die Suche nach <em>".$query."</em> ergab ".$resp["items"][0]["resultSetCount"]." Teffer</h3>";
$queryresult = $resp["items"];
foreach ($resp[items][0][items] as $produkt) {
echo "<div class='produktlistitem'><span class='fa fa-external-link'></span>";
echo "<a href='index.php?produkt=".$produkt["oid"]."'>";
echo $produkt["label"];
echo "</a>";
echo "</div>";
}
echo "</div>";
echo "</div>";
}
/**
* Beispiel für eine Navigation, die Termine jeweils eines Monats anbietet.
* StattBuchung benötigt immer einen Zeitraum von, bis im ISO-FORMAT
* Mit dieser Methode wird eine Abstraktion auf Ebenen von Monaten erreicht.
*
* Die Methode nutzt das HTML-Template 'nav_liste.inc'
* Für die Darstellung des Dezember 2018 werden folgende Parameter übergeben:
* - "monat_name" => 'Dezember' (Abhähngig von der Server-Locale),
* - "monat_down" => 11,
* - "jahr_down" => 2018,
* - "monat_up" => 1,
* - "jahr_up" => 2019
*/
function renderMonatNavigation($start) {
date_default_timezone_set('Europe/Berlin');
$akt = $start->getTimestamp();
$start->sub(new DateInterval('P1M'));
$ts =$start->getTimestamp();
$start->add(new DateInterval('P2M'));
$tsUp =$start->getTimestamp();
$params=array(
"monat_name" => strftime('%B',$akt),
"monat_down" => strftime('%m',$ts),
"jahr_down" => strftime('%G',$ts),
"monat_up" => strftime('%m',$tsUp),
"jahr_up" => strftime('%G',$tsUp)
);
$viewRow = new Template($params, templatePath);
echo $viewRow->render('nav_liste.inc');
}
/**
* Darstellung einer einfach Suchbox im oberen Seitenbereich.
* Die Darstellung wird im Template searchbox.inc erzeugt.
* Die Parametrisierung erfolgt in der HTML-Datei.
* Im einfachsten Fall wird nur ein Query-String übergeben.
* Es können zudem die Optionen von, bis, schlagwort, eventtyp gesetzt werden.
*
*/
function renderSearchBox() {
$params=array();
date_default_timezone_set('Europe/Berlin');
$viewRow = new Template($params, templatePath);
echo $viewRow->render('searchbox.inc');
}
function renderSuccess() {
$params=array();
date_default_timezone_set('Europe/Berlin');
$viewRow = new Template($params, templatePath);
echo $viewRow->render('success.inc');
}
/**
* Darstellung des Anmeldeformulars für eine Veranstaltung.
* Die Validierung der Felder ist in der Template-Datei zu realisieren.
* Falls eine online-Zahlung angeboten werden soll muss diese selbst implementiert werden.
* Erst nach erfolgter Zahlung dürfen die Daten an StattBuchung übermittelt werden.
*
*/
function renderAnmeldeformular($resp, $sessionInfo, $paypal, $step) {
$ep = $resp;
date_default_timezone_set('Europe/Berlin');
$viewRow = new Template($ep, templatePath);
$viewRow->properties['freitn'] =$ep["maxtn"]-$ep["tn"];
$viewRow->properties['von'] = new DateTime($ep["von"]);
$viewRow->properties['bis'] = new DateTime($ep["bis"]);
$viewRow->properties['paypal'] = $paypal;
$viewRow->properties['step'] = $step;
echo $viewRow->render('anmeldeformular.inc');
}
function renderTerminliste($resp, $sessionInfo, $query, $templatePrefix, $swlist) {
date_default_timezone_set('Europe/Berlin');
$view = new Template($swlist, templatePath);
echo $view->render($templatePrefix.'_head.inc');
foreach ($resp[items][0][items] as $ep) {
if($odd == true) {
$ep['odd_even'] = 'odd';
$odd = false;
} else {
$ep['odd_even'] = 'even';
$odd = true;
}
$viewRow = new Template($ep, templatePath);
if(is_int($ep["maxtn"])) {
$viewRow->properties["freitn"]=$ep["maxtn"]-$ep["tn"];
} else {
$viewRow->properties["freitn"]=99-$ep["tn"];
$viewRow->properties["maxtn"]=99;
}
$viewRow->properties['von'] = new DateTime($ep["von"]);
$viewRow->properties['bis'] = new DateTime($ep["bis"]);
echo $viewRow->render($templatePrefix.'_row.inc');
}
echo $view->render($templatePrefix.'_foot.inc');
}
function sendAnmeldung($id, $sessionInfo, $apikey, $oidang, $verkaufstelle, $zahlungsart, $postdata) {
date_default_timezone_set('Europe/Berlin');
$gebdate = new DateTime( $postdata['geburtsdatum']);
$params=array(
"oid" => $postdata['de_stattbuchung_event_Modul'],
"anrede"=>$postdata['anrede'],
"vorname"=>$postdata['vorname'],
"nachname"=>$postdata['nachname'],
"strasse"=>$postdata['strasse'],
"plz"=>$postdata['plz'],
"ort"=>$postdata['ort'],
"email"=>$postdata['email'],
"telefon"=>$postdata['telefon'],
// "institution"=>$postdata['institution'],
"geburtsdatum"=>$gebdate->format(DateTime::ATOM),
"de_bidat_av_Profiltyp_geburtsort"=>$postdata['geburtsort'],
"kommentar"=>$postdata['kommentar'],
"de_stattbuchung_event_Modul"=>$postdata['de_stattbuchung_event_Modul'],
"de_stattbuchung_Kanal"=>$apikey,
"de_stattbuchung_Verkaufsstelle"=>$verkaufstelle,
"systems_sdw_fi_Zahlungsart"=>$zahlungsart,
"systems_sdw_hr_Angestellter"=>$oidang
);
foreach ($postdata as $key => $value) {
if(strpos($key, "de_stattbuchung_Teilnehmerart_") === 0) {
$params[$key] = $value;
}
}
$resp=post($sessionInfo, opcAddAnmeldung, $params, "{}", $debug) ;
if($resp['beschreibung'] == 'OK') {
echo "<h1>Herzlichen Dank für Ihre Anmeldung</h1>";
echo "<div>Sie sollten in Kürze eine Nachricht über die Adresse ".$postdata['email']." erhalten.</div>";
} else {
echo "<h1>Ups</h1>";
echo "<div>Bei der Anmeldung ist etwas schief gelaufen, bitte versuchen Sie es erneut </div>";
echo "<hr><small>".$resp['beschreibung']."</small>";
}
return $resp;
}
function renderTerminDetail($resp, $sessionInfo, $showmap, $cssid) {
$ep = $resp;
//var_dump($resp);
date_default_timezone_set('Europe/Berlin');
$view = new Template($ep, templatePath);
$view->properties['cssid'] = $cssid;
if(is_int($ep["maxtn"])) {
$view->properties['freitn'] =$ep["maxtn"]-$ep["tn"];
} else {
$view->properties['freitn'] =99-$ep["tn"];
$view->properties['maxtn'] =99;
}
$view->properties['von'] = new DateTime($ep["von"]);
$view->properties['bis'] = new DateTime($ep["bis"]);
$view->properties['validFrom'] = new DateTime($ep["validFrom"]);
$view->properties['showmap'] = $showmap;
echo $view->render('termindetail.inc');
}
function renderTerminDetailListenansicht($resp, $sessioninfo) {
echo "<div id='bidat-events'>";
if($resp[items][0][itemCount]==0) {
echo "<div class='error-message'>Ihre Anfrage hat keine Termine ergeben.</div>";
} else {
$odd = true;
foreach ($resp[items][0][items] as $termin) {
if($odd == true) {
$termin['odd_even'] = 'odd';
$odd = false;
} else {
$termin['odd_even'] = 'even';
$odd = true;
}
renderTerminDetail($termin, $sessionInfo, false, 'bidat_list');
}
}
echo "</div>";
}
function fetchTreffpunkt($id, $sessionInfo) {
$params=array("oid" => $id);
$treffpunkt=post($sessionInfo, opcFetchTreffpunkt, $params, "{}", $debug) ;
return $treffpunkt;
}
/**
* Lädt die Informationen zu einem Termin von StattBuchung
*
*/
function fetchTermindetail($id, $sessionInfo, $apikey, $verkaufstelle) {
$params=array(
"oid" => $id,
"de_stattbuchung_event_Modul"=>$id,
"de_stattbuchung_Verkaufsstelle"=>$verkaufstelle,
"de_stattbuchung_Kanal"=>$apikey
);
$resp=post($sessionInfo, opcFetchTermindetail, $params, "{}", $debug) ;
return $resp;
}
/**
* Main.
*
*/
try {
$sessionInfo=login($ini['host'], $ini['user'], $ini['psw'], $debug);
date_default_timezone_set('Europe/Berlin');
//$resp=get($sessionInfo, opcObjectlistProdukt, $params, $debug) ;
$treffpunktid = $_GET['treffpunkt'];
$registerid = $_GET['register'];
$modulid = $_GET['modul'];
$modultermine = $_GET['modultermine'];
$formid = $_GET['form'];
$stichwortkey = $_GET['stichwort'];
$monat = $_GET['monat'];
$jahr = $_GET['jahr'];
$maxResult = $_GET['maxResultLength'];
$teaser = $_GET['teaser'];
$viewStyle = $_GET['style'];
$verkaufstelle = $ini['de_stattbuchung_Verkaufsstelle'];
$zahlungsart = $ini['systems_sdw_fi_Zahlungsart'];
$view = new Template(array(), templatePath);
if($teaser > 0) {
$view->properties['bodyid']="_teaser";
}
$view->title=$ini["seitentitel"];
if(is_null($ini["css"])) $view->properties['css'] = 'bidat.css';
else $view->properties['css'] = $ini["css"];
echo $view->render('header.inc');
if ($ini['show_stichwort_selector'] == true) {
$params=array("oid" => "0",
"de_stattbuchung_Kanal"=>$ini["apikey"],
"de_stattbuchung_event_Typ"=>$ini["de_stattbuchung_event_Typ"]);
if($jsonString == NULL) $jsonString = "{}";
$swlist=post($sessionInfo, opcStichwortlistByKanal, $params, $jsonString, $debug) ;
} else {
$swlist = NULL;
}
if($treffpunktid > 100) {
fetchTreffpunkt($treffpunktid, $sessionInfo);
} else if( $_GET['success']==true) {
renderSuccess();
}
else if($registerid == 872) {
$resp = sendAnmeldung($registerid, $sessionInfo, $ini['apikey'], $ini['oid_ang'], $verkaufstelle, $zahlungsart, $_POST);
if($ini['paypal'] == true) {
header('Content-type: application/json');
echo json_encode($resp);
} else {
renderSuccess();
}
} else if ($modulid > 100) {
renderTerminDetail(fetchTermindetail($modulid, $sessionInfo, $ini['apikey'], $verkaufstelle), $sessionInfo, TRUE, 'eb-event-page');
} else if ($formid > 100) {
$paypal = false;
if($ini['paypal']== true) $paypal = true;
renderAnmeldeformular(fetchTermindetail($formid, $sessionInfo, $ini['apikey'], $verkaufstelle), $sessionInfo, $paypal, 1);
} else if($treffpunktid > 100) {
$paypal = false;
if($ini["paypal"]=='true') $paypal = true;
renderAnmeldeformular($registerid, $sessionInfo, $paypal);
} else if($teaser > 0) {
$params=array("oid" => "0",
"de_stattbuchung_Kanal"=>$ini["apikey"],
"de_stattbuchung_event_Typ"=>$ini["de_stattbuchung_event_Typ"],
"maxResultLength"=>$teaser);
$resp=post($sessionInfo, opcCalendarByChannel, $params, $jsonString, $debug) ;
renderTerminliste($resp, $sessionInfo, '','teaser', NULL);
} else {
if ($ini['show_searchbox']==true) {
renderSearchBox();
}
$query =$_GET['query'];
$query=htmlspecialchars($query);
$params=array("oid" => "0",
"de_stattbuchung_Kanal"=>$ini["apikey"],
"de_stattbuchung_event_Typ"=>$ini["de_stattbuchung_event_Typ"]);
if($query !== '') {$params['muster']=$query;}
if($modultermine >0) {$params['de_stattbuchung_Produkt']=$modultermine;}
if($maxResult > 0) {
$params['maxResultLength'] = $maxResult;
} else {
$params['maxResultLength'] = 100;
}
if($stichwortkey != 'NULL') {
$params['de_stattbuchung_Stichwort_key'] = $stichwortkey;
}
if(!is_null($monat)) {
if(is_null($jahr)) {
$jahr = date ('Y', time());
}
if ($monat >12) {
$jahr++;
$monat = $monat-12;
} else if ($monat ==0) {
$jahr--;
$monat = 12;
}
$start = new DateTime( '1.'.$monat.'.'.$jahr);
$ende = new DateTime( '1.'.$monat.'.'.$jahr);
$ende->add(new DateInterval('P1M'));
$ende->sub(new DateInterval('P1D'));
$params['von'] = $start->format(DateTime::ATOM);
$params['bis'] = $ende->format(DateTime::ATOM);
}
$jsonString ="{oid:0}";
$resp=post($sessionInfo, opcCalendarByChannel, $params, $jsonString, $debug) ;
if($monat > 0) renderMonatNavigation($start);
if(is_null($stichwortkey) || $viewStyle == 'table') renderTerminliste($resp, $sessionInfo, $query, 'table', $swlist);
else renderTerminDetailListenansicht($resp, $sessioninfo);
}
// Ausloggen nicht vergessen!
logoff($sessionInfo, $debug);
} catch (Exception $e) {
echo 'Exception: '.$e->getMessage()." code: ".$e->getCode()."<br/>";
}
echo $view->render('footer.inc');
?>

152
mockupAnmeldung.html Normal file
View File

@ -0,0 +1,152 @@
<!DOCTYPE html>
<html lang='de'>
<head>
<meta charset='UTF-8'>
<meta name='viewport' content='width=device-width, initial-scale=1, shrink-to-fit=no'>
<title>Anwesenheit - ##Mandant##</title>
<link rel="stylesheet" href="style/default.css">
<link rel="stylesheet" href="style/bidat.css">
<link rel="stylesheet" href="style/font-awesome.min.css">
<link rel="stylesheet" href="style/bootstrap.css">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-alpha.6/css/bootstrap.min.css" integrity="sha384-rwoIResjU2yc3z8GV/NPeZWAv56rSmLldC3R/AZzGRnGxQQKnKkoFVhFQhNUwEyJ" crossorigin="anonymous">
</head>
<body id="bidat">
<nav id='termin-selector'>
<div>Bitte wählen Sie eine der folgenden Veranstaltungen des Tages aus. </div>
<div class='container bidat_table'>
<div class='row align-items-center'>
<div class='col'>
<section class='inactive'>
<h3> Modulname</h3>
<p>9.30 - 11.00</p>
</section>
</div>
<div class='col'>
<section>
<h3> Modulname</h3>
<p>11.30 - 13.00</p>
</section>
</div>
<div class='col' >
<section class='inactive'>
<h3> Modulname</h3>
<p>14.30 - 16.00</p>
</section>
</div>
<div class='col' >
<section class='inactive'>
<h3> Modulname</h3>
<p>14.30 - 16.00</p>
</section>
</div>
</div>
</div>
</nav>
<main>
<section class='tn-table' >
<div class='container bidat_table'>
<div class='row align-items-left th'>
<div class='col-3'>
Teilnehmer*in
</div>
<div class='col'>
Aktion
</div>
</div>
<div class='row align-items-center th2'>
<div class='col-3'>
<h3> Aktion auf alle nicht bearbeiteten anwenden</h3>
</div>
<div class='col'>
<button class='btn '>Anwesend</button>
<button class='btn '>Absage</button>
<button class='btn'>Krank (mit Entschuldigung)</button>
<button class='btn '>Krank (ohne Entschuldigung)</button>
<button class='btn'>Abwesend (mit Entschuldidung)</button>
<button class='btn'>Abwesend (ohne Entschuldigung)</button>
</div>
</div>
<div class='row align-items-center tr'>
<div class='col-3'>
Max Mustermann
</div>
<div class='col'>
<button class='btn btn-primary'>Anwesend</button>
<button class='btn '>Absage</button>
<button class='btn'>Krank (mit Entschuldigung)</button>
<button class='btn '>Krank (ohne Entschuldigung)</button>
<button class='btn'>Abwesend (mit Entschuldidung)</button>
<button class='btn'>Abwesend (ohne Entschuldigung)</button>
</div>
</div>
<div class='row align-items-center tr'>
<div class='col-3'>
Max Mustermann
</div>
<div class='col'>
<button class='btn'>Anwesend</button>
<button class='btn'>Absage</button>
<button class='btn'>Krank (mit Entschuldigung)</button>
<button class='btn btn-primary'>Krank (ohne Entschuldigung)</button>
<button class='btn'>Abwesend (mit Entschuldidung)</button>
<button class='btn'>Abwesend (ohne Entschuldigung)</button>
</div>
</div>
<div class='row align-items-center tr'>
<div class='col-3'>
Max Mustermann
</div>
<div class='col'>
<button class='btn'>Anwesend</button>
<button class='btn'>Absage</button>
<button class='btn'>Krank (mit Entschuldigung)</button>
<button class='btn btn-primary'>Krank (ohne Entschuldigung)</button>
<button class='btn'>Abwesend (mit Entschuldidung)</button>
<button class='btn'>Abwesend (ohne Entschuldigung)</button>
</div>
</div>
<div class='row align-items-left tf'>
</div>
</div>
Warteliste
Krank (mit Entschuldigung)
Krank (ohne Entschuldigung)
Abwesend (mit Entschuldidung)
Abwesend (ohne Entschuldigung)
Anwesend
Einladung
</section>
</main>
<footer id='page_footer'>
<a href='#' id='nav_impressum'>Impressum</a>
</footer>
</body>
</html>

3
style/bidat.css Normal file

File diff suppressed because one or more lines are too long

230
style/bidat.less Normal file
View File

@ -0,0 +1,230 @@
/*
*
* Default CSS für Kalender-App
* bitte erstellen Sie selbst eine Kopie und binden Sie diese in Ihr templates/header.inc ein
* dann können Sie jederzeit auf eine korrekte Version zurückkeheren
*
*/
body#bidat {
margin: 0% 5%;
}
#bidat tbody tr:nth-child(odd) {
background-color: rgba(50, 92, 128, 0.2);
}
#monatname {
min-width: 200px;
display: inline;
}
nav.monatbar {
font-size: 2rem;
width: 100%;
text-align: center;
border-bottom: 2px dotted grey;
border-top: 2px dotted grey;
padding: 2px 0px;
}
nav.monatbar a {
padding: 10px;
margin: 15px;
color: white;
text-decoration: none;
}
nav.monatbar a:hover {
padding: 10px;
margin: 5 px;
color: blue;
}
#bidat article {
grid-area: content;
background-color: white;
border: 1px solid #d36f16;
border-image: linear-gradient(to top, #d36f16, rgba(211, 111, 22, 0)) 1 100%;
}
#bidat input {
line-height: 1.5rem;
padding: 4px 10px;
width: 300px;
}
#bidat input[type=checkbox] {
width: 8px;
margin-top: 0.5em;
}
#bidat .form-check-label {
padding-left: 2.5rem;
margin-bottom: 0;
cursor: pointer;
}
#bidat .was-validated input:valid {
border-color: green;
}
#bidat .was-validated input:invalid {
border-color: red;
}
#bidat form .formrow {
margin-bottom: 1em;
}
#bidat form label {
line-height: 1.5rem;
padding-top: 2px;
display: inline-block;
min-width: 200px;
text-align: right;
font-weight: bold;
margin-right: 2rem;
}
#bidat form .invalid-feedback {
display: none;
padding-left: 250px;
color: red;
font-size: 0.8em;
}
#bidat form input:invalid ~ .invalid-feedback {
display: block;
}
#bidat .form-control {
margin-top: 20px;
width: 300px;
display: inline-block;
}
h1,
h2,
h3,
h4,
h5,
h6 {
color: #325c80;
}
header {
background-color: #325c80;
color: white;
min-height: 3rem;
}
header h1,h2,h3,h4,h5,h6 {
color: white;
}
header nav div.active {
border-bottom: 2px solid white;
}
header nav div.inactive {
color: rgba(255, 255, 255, 0.2);
}
header nav div.col-md-auto {
padding-left: 1rem;
padding-right: 1rem;
}
select#sw_nav {
min-width: 200px;
line-height: 1.5rem;
height:2.5rem;
padding: 4px 10px;
}
body > footer {
position: fixed;
border-top: 1px solid #5a90be;
left: 0px;
bottom: 0px;
height: 3rem;
width: 100%;
background-color: #24425b;
color: white;
}
footer .container .row,
header .container .row {
height: 3rem;
}
.capitalize {
text-transform: uppercase;
}
main {
padding-top: 2em;
}
main #bidat_content {
border-right: 1px dotted gray;
}
.bidat_table .th {
background-color: #325c80;
color: white;
min-height: 3rem;
}
.bidat_table .tr {
min-height: 2.5em;
}
.bidat_table .tr:nth-child(odd) {
background-color: rgba(50, 92, 128, 0.7);
}
.var_hidden {
display: none;
}
@media (min-width: 576px) {}
@media (min-width: 768px) {
.var_hidden {
display: block;
}
}
@media (min-width: 1024px) {
.var_hidden {
display: block;
}
}
/* Add Animation */
@-webkit-keyframes animatetop {
from {
top: -300px;
opacity: 0;
}
to {
top: 0;
opacity: 1;
}
}
@keyframes animatetop {
from {
top: -300px;
opacity: 0;
}
to {
top: 0;
opacity: 1;
}
}
.bold {
font-weight: bold;
}

10
style/bidat.map Normal file

File diff suppressed because one or more lines are too long

530
style/bidat.scss Normal file
View File

@ -0,0 +1,530 @@
/*
*
* Default CSS für Kalender-App
* bitte erstellen Sie selbst eine Kopie und binden Sie diese in Ihr templates/header.inc ein
* dann können Sie jederzeit auf eine korrekte Version zurückkeheren
*
*/
$baseColor: #d36f16;
//$baseColor: #d36f16;
$fontColorTable: rgb(78, 85, 92 );
$fontColorTable: rgb(78, 85, 92 );
$fontColorLink: #325c80;
$fontColorAuszeichnung: #d36f16;
$buttonColorPrimary:rgb(207, 207, 207);
$backgroundColorHeader: #d36f16;
$borderColor: #d36f16;
body#bidat {
margin: 0% 5%;
}
#bidat tbody tr:nth-child(odd) {
background-color: fade-out($baseColor, 0.9);
}
#monatname {
min-width: 200px;
display: inline;
}
nav#bidat-monatbar {
font-size: 2rem;
width: 100%;
text-align: center;
padding: 2px 0px;
}
nav#bidat-monatbar a {
padding: 10px;
color: white;
text-decoration: none;
}
nav#bidat-monatbar a:hover {
padding: 10px;
margin: 5 px;
color: blue;
}
#bidat article {
grid-area: content;
background-color: white;
border: 1px solid $baseColor;
//border-image: linear-gradient(to top, #d36f16, rgba(211, 111, 22, 0)) 1 100%;
}
#bidat input {
line-height: 1.5rem;
padding: 4px 10px;
width: 300px;
}
#bidat input[type=checkbox] {
width: 8px;
margin-top: 0.5em;
}
#bidat .form-check-label {
padding-left: 2.5rem;
margin-bottom: 0;
cursor: pointer;
}
#bidat .was-validated input:valid {
border-color: green;
}
#bidat .was-validated input:invalid {
border-color: red;
}
#bidat form .formrow {
margin-bottom: 1em;
}
#bidat form label {
line-height: 1.5rem;
padding-top: 2px;
display: inline-block;
min-width: 200px;
text-align: right;
font-weight: bold;
margin-right: 2rem;
}
#bidat form .invalid-feedback {
display: none;
padding-left: 250px;
color: red;
font-size: 0.8em;
}
#bidat form input:invalid ~ .invalid-feedback {
display: block;
}
#bidat .form-control {
margin-top: 20px;
width: 300px;
display: inline-block;
}
h1,
h2,
h3,
h4,
h5,
h6 {
color: $baseColor;
}
article {
header {
text-align: center;
}
}
header {
background-color: $baseColor;
color: white;
min-height: 3rem;
}
header {
& h1,h2,h3,h4,h5,h6 {
color: white;
}
}
header nav div.active {
border-bottom: 2px solid white;
}
header nav div.inactive {
color: rgba(255, 255, 255, 0.2);
}
header nav div.col-md-auto {
padding-left: 1rem;
padding-right: 1rem;
}
select#sw_nav {
min-width: 200px;
line-height: 1.5rem;
height:2rem;
padding: 4px 10px;
}
body > footer {
position: fixed;
border-top: 1px solid #5a90be;
left: 0px;
bottom: 0px;
height: 3rem;
width: 100%;
background-color: $baseColor;
color: white;
}
footer .container .row,
header .container .row {
height: 3rem;
}
.capitalize {
text-transform: uppercase;
}
main {
padding-top: 2em;
}
main #bidat_content {
border-right: 1px dotted gray;
}
.bidat_table {
border-color: $baseColor;
font-size: 0.85rem;
.brd-bottom {
border-bottom: 1px solid $baseColor;
}
.brd-left {
border-left: 1px solid $baseColor;
}
.brd-right {
border-right: 1px solid $baseColor;
}
details {
display:none;
}
a {
color: $baseColor;
}
color: $fontColorTable;
}
.bidat_table .th {
background-color: $baseColor;
border-radius: 7px 7px 0 0;
color: white;
min-height: 3rem;
margin-top: 2rem;
}
.bidat_table .tf {
background-color: $baseColor;
border-radius: 0 0 7px 7px;
color: white;
min-height: 3rem;
margin-top: 0rem;
}
.bidat_table .tr {
min-height: 3.5em;
}
.bidat_table .tr:nth-child(odd) {
background-color: fade-out($baseColor, 0.9);
}
.var_hidden {
display: none;
}
.btn-primary {
background-color: $baseColor;
border-color:darken($baseColor, 0.1);
color: white !important;
}
.btn-primary:hover {
background-color: fade-out($baseColor, 0.2);
border-color:darken($baseColor, 0.1);
color: white !important;
}
#bidat-event-single {
display: grid;
grid-template-columns: 100%;
margin-top: 2rem;
border-radius: 7px;
header {
border-radius: 7px 7px 0 0;
padding-top:0.5rem;
grid-row: 1;
}
a {
color: $baseColor;
font-weight: bold;
}
footer {
grid-row: 4;
text-align: center;
border-top: 2px dotted $baseColor;
padding-top:0.5rem;
padding-bottom:0.5rem;
background-color: fade-out($baseColor, 0.9);
}
.underline {
margin-top:1rem;
color:$baseColor;
font-weight: bold;
border-bottom: 1px solid $baseColor;
}
.ch {
color:$baseColor;
font-weight: bold;
}
}
#bidat-event-description {
grid-row: 2;
padding:2rem;
}
#bidat-event-details {
grid-row: 3;
background-color: fade-out($baseColor, 0.7);
padding:2rem;
}
#bidat-event-registration {
border-radius: 7px 7px 7px 7px;
margin: 2rem 0;
.infoblock {
background-color: fade-out($baseColor, 0.7);
padding: 1rem 4rem;
margin:0px 0px 18px 0px;
}
.submitrow {
margin-left: 4rem;
}
}
#bidat-nav {
display: grid;
grid-template-columns: 50% 25% 25%;
}
#bidat-monatbar {
grid-column:1;
grid-row:1;
#th_name {
background-color: fade-out($baseColor, 0.8);
height:2rem;
padding-top: 0.3rem;
margin-left: -15px;
margin-right: -15px;
}
#th_back {
text-align: right;
margin-right: 0px;
}
#th_fwd {
text-align: left;
margin-left:0px;
}
}
#bidat-kategorie {
grid-column:2;
grid-row:1;
}
#bidat-suche {
grid-column:3;
grid-row:1;
}
#bidat-suche {
input {
border-radius: 7px 0px 0px 7px;
margin-right: 0px;
width: 150px;
padding:0px;
height:2rem;
}
button {
border-radius: 0px 7px 7px 0px;
margin-left: 0px;
height:2rem;
span {
display:none;
}
}
.form-control {
margin-top: 0px;
width: 150px;
display: inline-block;
}
}
#termin-selector {
margin-top:5px;
section {
&.inactive{
background-color: fade-out($baseColor, 0.7);
}
h3 {
font-size: 1.2rem;
font-weight: bold;
}
background-color: $baseColor;
min-height: 5rem;
border-radius: 7px;
padding: 5px;
}
}
.th2 {
h3 {
font-size: 1.0rem;
font-weight: bold;
}
background-color: fade-out($baseColor, 0.7);
padding:0px 5px;
margin-bottom: 5px;
}
.alertbox {
background-color: fade-out(red, 0.7);
margin-left:4rem;
padding:10px;
border-radius: 7px;
max-width: 600px;
}
input.inaktiv{
background-color: grey;
}
.warenkorb {
background-color: fade-out($baseColor, 0.7);
padding:20px;
.sumrow {
border-top: 1px solid $baseColor;
font-weight: bold;
}
.row {
min-height:2rem;
}
.headrow {
border-bottom: 1px solid $baseColor;
font-weight: bold;
}
}
@media (min-width: 576px) {}
@media (min-width: 768px) {
#bidat-event-single {
grid-template-columns: 60% 40%;
header {
grid-row: 1;
grid-column: 1 / span 2;
}
}
#bidat-event-description {
grid-column: 1;
}
#bidat-event-details {
grid-column: 2;
grid-row: 2 /span 2;
}
footer {
grid-column: 1 / span 2;
}
.var_hidden {
display: block;
}
#bidat-event-registration {
display:grid;
grid-template-columns: 50% 50%;
header {
grid-column: 1 / span 2;
}
.infoblock {
grid-column: 1 / span 2;
}
section {
grid-row:3;
grid-column:1;
}
aside {
grid-row:3;
grid-column:2;
align-self:end;
}
}
}
@media (min-width: 1024px) {
.var_hidden {
display: block;
}
}
/* Add Animation */
@-webkit-keyframes animatetop {
from {
top: -300px;
opacity: 0;
}
to {
top: 0;
opacity: 1;
}
}
@keyframes animatetop {
from {
top: -300px;
opacity: 0;
}
to {
top: 0;
opacity: 1;
}
}
.bold {
font-weight: bold;
}

2112
style/bootstrap.css vendored Normal file

File diff suppressed because it is too large Load Diff

25
style/default.css Normal file
View File

@ -0,0 +1,25 @@
.beschreibung {
min-height: 2rem;
background-color: gainsboro;
padding: 1rem;
margin: 1rem;
}
.produktlistitem {
margin-top: 0.5rem;
background-color: white;
transition: background-color 0.3s linear;
-o-transition: background-color 0.3s linear;
-webkit-transition: background-color 0.3s linear;
-moz-transition: background-color 0.3s linear;
}
.produktlistitem a {
padding-left: 5px;
text-decoration: none;
color: black;
}
.produktlistitem:hover {
background-color: gainsboro;
}

3044
style/font-awesome.min.css vendored Normal file

File diff suppressed because it is too large Load Diff

2
style/jquery-3.3.1.min.js vendored Normal file

File diff suppressed because one or more lines are too long

15733
style/nfbg.css Normal file

File diff suppressed because one or more lines are too long

3
style/nfbg_v2.css Normal file

File diff suppressed because one or more lines are too long

10
style/nfbg_v2.map Normal file

File diff suppressed because one or more lines are too long

464
style/nfbg_v2.scss Normal file
View File

@ -0,0 +1,464 @@
/*
*
* Default CSS für Kalender-App
* bitte erstellen Sie selbst eine Kopie und binden Sie diese in Ihr templates/header.inc ein
* dann können Sie jederzeit auf eine korrekte Version zurückkeheren
*
*/
//$baseColor: #325c80;
$baseColor: #4e555c;
$fontColorTable: rgb(78, 85, 92 );
$fontColorLink: #cd1719;
$fontColorAuszeichnung: #cd1719;
$buttonColorPrimary:rgb(207, 207, 207);
$backgroundColorHeader: #f2f2f2;
$borderColor: #DBDEE1;
body#bidat {
margin: 0% 5%;
font-family: 'Montserrat', sans-serif;
}
body#bidat_teaser {
margin: 0% 0%;
font-family: 'Montserrat', sans-serif;
background-color: #234667;
color:white;
.container {
width:100%;
}
.bidat_table .tr:nth-child(odd) {
background-color: rgba(192, 197, 234, 0.27);
}
.teaser_monat {
text-align: center;
background-color: rgba(192, 197, 234, 0.97);
padding: 0px 2px;
width: 30px;
}
.teaser_tag {
text-align: center;
background-color: white;
padding: 0px 5px;
width: 30px;
}
.col-1 {
margin-right: 15px;
}
.row {
min-height: 5rem;
}
a {
color: white;
}
a:hover {
color: $fontColorAuszeichnung;
}
}
#bidat tbody tr:nth-child(odd) {
background-color: fade-out($baseColor, 0.9);
}
#bidat .btn {
border-radius: 0px;
}
#monatname {
min-width: 200px;
display: inline;
}
nav.monatbar {
font-size: 2rem;
width: 100%;
text-align: center;
border-bottom: 2px dotted grey;
border-top: 2px dotted grey;
padding: 2px 0px;
}
nav.monatbar a {
padding: 10px;
margin: 15px;
color: white;
text-decoration: none;
}
nav.monatbar a:hover {
padding: 10px;
margin: 5 px;
color: blue;
}
#bidat article {
grid-area: content;
background-color: white;
border: 1px solid $borderColor;
//border-image: linear-gradient(to top, #d36f16, rgba(211, 111, 22, 0)) 1 100%;
}
#bidat input {
line-height: 1.5rem;
padding: 4px 10px;
width: 300px;
}
#bidat input[type=checkbox] {
width: 8px;
margin-top: 0.5em;
}
#bidat .form-check-label {
padding-left: 2.5rem;
margin-bottom: 0;
cursor: pointer;
}
#bidat .was-validated input:valid {
border-color: green;
}
#bidat .was-validated input:invalid {
border-color: red;
}
#bidat form .formrow {
margin-bottom: 1em;
}
#bidat form label {
line-height: 1.5rem;
padding-top: 2px;
display: inline-block;
min-width: 200px;
text-align: right;
font-weight: bold;
margin-right: 2rem;
}
#bidat form .invalid-feedback {
display: none;
padding-left: 250px;
color: red;
font-size: 0.8em;
}
#bidat form input:invalid ~ .invalid-feedback {
display: block;
}
#bidat .form-control {
margin-top: 20px;
width: 300px;
display: inline-block;
}
h1,
h2,
h3,
h4,
h5,
h6 {
color: $fontColorAuszeichnung;
}
h2 {
text-transform: uppercase;
}
article {
header {
text-align: center;
padding: 1rem;
}
}
header {
background-color: $backgroundColorHeader;
color: $fontColorAuszeichnung;
min-height: 3rem;
border-bottom: 1px solid $borderColor;
}
header {
& h1,h2,h3,h4,h5,h6 {
color: $fontColorAuszeichnung;
}
}
header nav div.active {
border-bottom: 2px solid white;
}
header nav div.inactive {
color: rgba(255, 255, 255, 0.2);
}
header nav div.col-md-auto {
padding-left: 1rem;
padding-right: 1rem;
}
select#sw_nav {
min-width: 200px;
line-height: 1.5rem;
height:2.5rem;
padding: 4px 10px;
}
body > footer {
position: fixed;
border-top: 1px solid #5a90be;
left: 0px;
bottom: 0px;
height: 3rem;
width: 100%;
background-color: $baseColor;
color: white;
}
footer .container .row,
header .container .row {
height: 3rem;
}
.capitalize {
text-transform: uppercase;
}
main {
padding-top: 2em;
}
main #bidat_content {
border-right: 1px dotted gray;
}
.bidat_table {
border-color: $baseColor;
font-size: 0.85rem;
.brd-bottom {
border-bottom: 1px solid $baseColor;
}
.brd-left {
border-left: 1px solid $baseColor;
}
.brd-right {
border-right: 1px solid $baseColor;
}
details {
display:block;
h3 {
display:none;
}
}
a {
color: $fontColorLink;
}
color: $fontColorTable;
}
.bidat_table .th {
background-color: white;
border-radius: 7px 7px 0 0;
border-bottom: 3px solid $borderColor;
color: $fontColorAuszeichnung;
min-height: 3rem;
margin-top: 2rem;
font-weight: bold;
color: $fontColorTable
}
.bidat_table .tf {
background-color: white;
border-radius: 0 0 7px 7px;
color: $fontColorAuszeichnung;
min-height: 3rem;
margin-top: 0rem;
}
.bidat_table .tr {
min-height: 3.5em;
}
.bidat_table .tr:nth-child(odd) {
background-color: fade-out($baseColor, 0.9);
}
.var_hidden {
display: none;
}
.btn-primary {
background-color: $buttonColorPrimary;
border-color:darken($buttonColorPrimary, 0.1);
color: white !important;
}
.btn-primary:hover {
background-color: fade-out($buttonColorPrimary, 0.2);
border-color:darken($buttonColorPrimary, 0.1);
color: white !important;
}
#bidat_cat_table {
a {
margin-right: 5px;
}
}
#bidat-event-single {
display: grid;
grid-template-columns: 100%;
margin-top: 2rem;
border-radius: 7px;
header {
border-radius: 7px 7px 0 0;
padding-top:0.5rem;
grid-row: 1;
}
a {
color: $baseColor;
font-weight: bold;
}
footer {
grid-row: 4;
text-align: center;
border-top: 2px dotted $borderColor;
padding-top:0.5rem;
padding-bottom:0.5rem;
background-color: fade-out($baseColor, 0.9);
}
.underline {
margin-top:1rem;
color:$baseColor;
font-weight: bold;
border-bottom: 1px solid $baseColor;
}
.ch {
color:$baseColor;
font-weight: bold;
}
}
#bidat-event-description {
grid-row: 2;
padding:2rem;
}
#bidat-event-details {
grid-row: 3;
background-color: fade-out($baseColor, 0.7);
padding:2rem;
}
#bidat-event-registration {
border-radius: 7px 7px 7px 7px;
margin: 2rem 0;
.infoblock {
background-color: fade-out($baseColor, 0.7);
padding: 1rem 4rem;
margin:0px 0px 18px 0px;
}
.submitrow {
margin-left: 4rem;
}
i {
color:$fontColorAuszeichnung;
font-size: smaller;
position: relative;
top:-10px;
}
}
.description {
h1,
h2,
h3,
h4,
h5,
h6 {
font-size: 1em;
}
}
@media (min-width: 576px) {}
@media (min-width: 768px) {
#bidat-event-single {
grid-template-columns: 60% 40%;
header {
grid-row: 1;
grid-column: 1 / span 2;
}
}
#bidat-event-description {
grid-column: 1;
}
#bidat-event-details {
grid-column: 2;
grid-row: 2 /span 2;
}
footer {
grid-column: 1 / span 2;
}
.var_hidden {
display: block;
}
}
@media (min-width: 1024px) {
.var_hidden {
display: block;
}
}
/* Add Animation */
@-webkit-keyframes animatetop {
from {
top: -300px;
opacity: 0;
}
to {
top: 0;
opacity: 1;
}
}
@keyframes animatetop {
from {
top: -300px;
opacity: 0;
}
to {
top: 0;
opacity: 1;
}
}
.bold {
font-weight: bold;
}

1164
style/srhb.css Normal file

File diff suppressed because it is too large Load Diff

108
style/srhb2.css Normal file
View File

@ -0,0 +1,108 @@
/* default styles for extension "tx_felogin_pi1" */
.tx-felogin-pi1 label {
display: block;
}
/* default styles for extension "tx_cssstyledcontent" */
/* Headers */
.csc-header-alignment-center { text-align: center; }
.csc-header-alignment-right { text-align: right; }
.csc-header-alignment-left { text-align: left; }
div.csc-textpic-responsive, div.csc-textpic-responsive * { -moz-box-sizing: border-box; -webkit-box-sizing: border-box; box-sizing: border-box; }
/* Clear floats after csc-textpic and after csc-textpic-imagerow */
div.csc-textpic, div.csc-textpic div.csc-textpic-imagerow, ul.csc-uploads li { overflow: hidden; }
/* Set padding for tables */
div.csc-textpic .csc-textpic-imagewrap table { border-collapse: collapse; border-spacing: 0; }
div.csc-textpic .csc-textpic-imagewrap table tr td { padding: 0; vertical-align: top; }
/* Settings for figure and figcaption (HTML5) */
div.csc-textpic .csc-textpic-imagewrap figure, div.csc-textpic figure.csc-textpic-imagewrap { margin: 0; display: table; }
/* Captions */
figcaption.csc-textpic-caption { display: table-caption; }
.csc-textpic-caption { text-align: left; caption-side: bottom; }
div.csc-textpic-caption-c .csc-textpic-caption, .csc-textpic-imagewrap .csc-textpic-caption-c { text-align: center; }
div.csc-textpic-caption-r .csc-textpic-caption, .csc-textpic-imagewrap .csc-textpic-caption-r { text-align: right; }
div.csc-textpic-caption-l .csc-textpic-caption, .csc-textpic-imagewrap .csc-textpic-caption-l { text-align: left; }
/* Float the columns */
div.csc-textpic div.csc-textpic-imagecolumn { float: left; }
/* Border just around the image */
div.csc-textpic-border div.csc-textpic-imagewrap img {
border: 2px solid black;
padding: 0px 0px;
}
div.csc-textpic .csc-textpic-imagewrap img { border: none; display: block; }
/* Space below each image (also in-between rows) */
div.csc-textpic .csc-textpic-imagewrap .csc-textpic-image { margin-bottom: 10px; }
div.csc-textpic .csc-textpic-imagewrap .csc-textpic-imagerow-last .csc-textpic-image { margin-bottom: 0; }
/* colSpace around image columns, except for last column */
div.csc-textpic-imagecolumn, td.csc-textpic-imagecolumn .csc-textpic-image { margin-right: 10px; }
div.csc-textpic-imagecolumn.csc-textpic-lastcol, td.csc-textpic-imagecolumn.csc-textpic-lastcol .csc-textpic-image { margin-right: 0; }
/* Add margin from image-block to text (in case of "Text & Images") */
div.csc-textpic-intext-left .csc-textpic-imagewrap,
div.csc-textpic-intext-left-nowrap .csc-textpic-imagewrap {
margin-right: 10px;
}
div.csc-textpic-intext-right .csc-textpic-imagewrap,
div.csc-textpic-intext-right-nowrap .csc-textpic-imagewrap {
margin-left: 10px;
}
/* Positioning of images: */
/* Center (above or below) */
div.csc-textpic-center .csc-textpic-imagewrap, div.csc-textpic-center figure.csc-textpic-imagewrap { overflow: hidden; }
div.csc-textpic-center .csc-textpic-center-outer { position: relative; float: right; right: 50%; }
div.csc-textpic-center .csc-textpic-center-inner { position: relative; float: right; right: -50%; }
/* Right (above or below) */
div.csc-textpic-right .csc-textpic-imagewrap { float: right; }
div.csc-textpic-right div.csc-textpic-text { clear: right; }
/* Left (above or below) */
div.csc-textpic-left .csc-textpic-imagewrap { float: left; }
div.csc-textpic-left div.csc-textpic-text { clear: left; }
/* Left (in text) */
div.csc-textpic-intext-left .csc-textpic-imagewrap { float: left; }
/* Right (in text) */
div.csc-textpic-intext-right .csc-textpic-imagewrap { float: right; }
/* Right (in text, no wrap around) */
div.csc-textpic-intext-right-nowrap .csc-textpic-imagewrap { float: right; }
/* Left (in text, no wrap around) */
div.csc-textpic-intext-left-nowrap .csc-textpic-imagewrap { float: left; }
div.csc-textpic div.csc-textpic-imagerow-last, div.csc-textpic div.csc-textpic-imagerow-none div.csc-textpic-last { margin-bottom: 0; }
/* Browser fixes: */
/* Fix for unordered and ordered list with image "In text, left" */
.csc-textpic-intext-left ol, .csc-textpic-intext-left ul { padding-left: 40px; overflow: auto; }
/* File Links */
ul.csc-uploads { padding: 0; }
ul.csc-uploads li { list-style: none outside none; margin: 1em 0; }
ul.csc-uploads img { float: left; margin-right: 1em; vertical-align: top; }
ul.csc-uploads span { display: block; }
ul.csc-uploads span.csc-uploads-fileName { text-decoration: underline; }
/* Table background colors: */
table.contenttable-color-1 { background-color: #EDEBF1; }
table.contenttable-color-2 { background-color: #F5FFAA; }
table.contenttable-color-240 { background-color: black; }
table.contenttable-color-241 { background-color: white; }
table.contenttable-color-242 { background-color: #333333; }
table.contenttable-color-243 { background-color: gray; }
table.contenttable-color-244 { background-color: silver; }

608
style/srhb3.css Normal file
View File

@ -0,0 +1,608 @@
/*
To change this license header, choose License Headers in Project Properties.
To change this template file, choose Tools | Templates
and open the template in the editor.
*/
/*
Created on : 12.10.2015, 22:38:49
Author : Blazer
*/
/*
general
*/
.clear{
clear: both;
margin: 0;
padding: 0;
}
/*
Cal-List-View
*/
#Cal_left{
float: left;
width: 30%;
}
#Cal_right{
float: left;
width: 70%;
}
/*
Left Calendar-block
*/
#Cat_Header {
position: relative;
margin-bottom: 3em;
background-color: #e5e5e5;
}
#Cat_Header h2 {
position: absolute;
left: 3%;
bottom: 18%;
background-color: rgba(229,0,131,0.8);
color: #fff;
font-size: 2.25em;
text-transform: uppercase;
font-weight: 500;
line-height: 1;
padding: 0.5em;
z-index: 2;
letter-spacing: 0.12em;
margin: 0;
cursor: default;
}
#Cal_left_Header{
background-color: #e40083;
width: 90%;
padding: 10px 0 10px 10px;
margin-top: 20px;
color:#ffffff;
font-weight: bold;
margin-bottom: 20px;
}
/*
Right Cal-block
*/
#Cal_right_Header{
background-color: #e40083;
width: 90%;
padding: 10px 0 10px 10px;
margin-top: 20px;
color:#ffffff;
font-weight: bold;
margin-bottom: 20px;
}
.Cat_left_infobox {
padding: 0 1em 1em;
}
#id-15 .Cat_left_infobox {
padding: 0 0 1em;
}
/*
Calendar Table
*/
#Cat_left table {
width: 100%;
margin-bottom: 2em;
border: none;
border-spacing: 0;
border-collapse: collapse;
}
#Cat_left table td {
border: medium none;
padding: 0 0.5em;
text-align: center;
}
#Cat_left table td .badge {
color: #e40083;
font-weight: 600;
}
#Cat_left table tr td:nth-child(1), #Cat_left table tr td:nth-child(2), #Cat_left table tr td:nth-child(3), #Cat_left table tr td:nth-child(4), #Cat_left table tr td:nth-child(5) {
background-color: #d9d9d9;
}
/* right table */
.Cal_right_table {
border-collapse: collapse;
font-size: 1.125em;
width: 100%;
}
.Cal_right_table h3 {
margin-bottom: 0;
color: #e40083;
cursor: pointer;
}
.Cal_right_table h3::after {
content: " +";
color: #000;
}
.Cal_right_table .active h3::after {
content: " -";
}
.Cal_right_table h3 {
padding: 0.15em 0.5em;
font-weight: 600;
}
.Cal_right_table a {
color: #000;
text-transform: uppercase;
}
.Cal_right_table .topic-item a {
color: #000;
text-transform: uppercase;
font-weight: 500;
padding: 0.25em 0.5em;
}
.Cal_right_table .cal_table_tourtitle a {
display: inline;
padding: 0;
}
.topic-item .content {
display: none;
}
#Cat_left_Menu li {
padding: 0.35em 1em;
line-height: 1.15;
}
.odd{
background-color: #e5e5e5;
}
.even{
}
.cal_table_tourdate{
padding-left: 0.5em;
}
.cal_table_tourtime{
}
.cal_table_maxpart{
font-weight: 600;
}
.cal_table_tourtitle{
font-weight: 600;
}
.cal_table_tourbook{
}
.Cal_right_table th {
text-align: left;
}
.cal_table_tourbook a {
height: 36px;
overflow: hidden;
text-indent: 9999px;
width: 36px;
background-position: -305px 8px;
color: rgba(0, 0, 0, 0);
}
.cal_table_tourbook.no-ticket a {
background-position: -205px 8px;
cursor: default;
}
.Cal_right_table th span {
display: inline-block;
width: 26px;
height: 26px;
overflow: hidden;
text-indent: 9999px;
}
.cal_table_tourdate span {
background-position: -308px -48px;
}
.cal_table_tourtime span {
background-position: -208px -48px;
}
.cal_table_maxpart span {
background-position: -208px -98px;
}
.cal_table_tourtitle span {
background-position: -308px -98px;
}
/*
Cat-List-View
*/
#Cat_left{
float: left;
width: 28%;
}
#Cat_left ul {
list-style: none;
margin: 0;
padding: 0;
font-size: 0.875em;
text-transform: uppercase;
}
#Cat_right{
float: right;
width: 70%;
}
#Cat_right_Col1, #Cat_right_Col2 {
width: 48.5%;
float: left;
}
#Cat_right_Col1 .item-image {
margin-bottom: 1em;
}
#Cat_right_Col2{
float: right;
}
#Cat_right ul {
font-size: 1.125em;
margin: 0 0 1.35em;
padding-left: 1em;
}
/*
Left Category-block
*/
#Cat_left_Header, #Cat_right_Header{
background-color: #e40083;
height: 3.5em;
position: relative;
margin-bottom: 1.75em;
}
#Cat_left_Header h3 {
color:#fff;
font-weight: 400;
font-size: 1.125em;
text-transform: uppercase;
margin: 0;
position: absolute;
bottom: 0.6em;
left: 1em;
}
#Cat_left_Menu .no a{
color: #000000;
}
#Cat_left_Menu .act a{
color: #e40083;
}
.ext-info-box {
padding: 1em 1.25em;
background-color: #e5e5e5;
margin-top: 2em;
}
.input-bumper {
font-weight: 600;
}
.price-info {
font-weight: 500;
}
#info_cost .price-info {
font-weight: 400;
}
.price-label {
float: left;
text-transform: uppercase;
}
.price-tag {
float: right;
}
/*
Right Category-block
*/
#Cat_right_Header h1 {
color:#fff;
font-weight: 400;
font-size: 1.75em;
text-transform: uppercase;
margin: 0;
position: absolute;
bottom: 0.3em;
left: 2em;
}
#Cat_right_Header h1.nomarker {
left: 0.65em;
}
#Cat_right_Header h1.cal_header {
left: .65em;
right: .65em;
}
.date-me {
float: right;
}
#Cat_right_Header span {
position: absolute;
font-size: 1.6875em;
color: #fff;
font-weight: 500;
width: 56px;
height: 77px;
background-position: 0 -98px;
text-align: center;
line-height: 2;
left: -0.4em;
top: -1em;
}
/*
Infoblock
*/
#Cat_right_info{
background-color: #e5e5e5;
font-size: 0.875em;
padding: 1.25em 1.75em;
}
#Cat_right_info h4 {
margin: 0.5em 0;
}
.right_info_row {
padding: 0 0 .75em 2.5em;
position: relative;
}
.info_icon{
position: absolute;
width: 27px;
height: 27px;
top: -0.2em;
left: 0;
}
.info_time > .info_icon{
background-position: -769px 0;
}
.info_time > .info_text{
float: left;
}
#info_location > .info_icon{
background-position: -769px -49px;
}
#info_cost > .info_icon{
background-position: -769px -99px;
}
#info_group > .info_icon{
background-position: -769px -149px;
}
.info_group_wrapper {
border-top: 1px solid #fff;
margin-top: 0.75em;
padding-top: 1.5em;
}
#info_application > .info_icon{
background-position: -769px -199px;
}
#info_travel > .info_icon{
background-position: -769px -249px;
}
.info_cal > .info_icon{
background-position: -769px -299px;
}
.info_text a, .info_text span {
display: inline-block;
}
#Cat_right_booking{
background-color: #e40083;
padding: 0.5em 0;
font-size: 1.125em;
text-align: center;
font-weight: 500;
color: #fff;
text-transform: uppercase;
}
#Cat_right_booking select{
background-color: transparent;
padding: 0.5em 0;
font-size: 1.125em;
text-align: center;
font-weight: 500;
color: #fff;
text-transform: uppercase;
}
#more_date > option {
background-color: #fff;
color: #000;
text-align: left;
}
#Cat_right_booking a {
color: #fff;
}
.Cat_right_booking_info {
font-size: 0.75em;
line-height: 1.25;
margin-top: 1.5em;
display: none;
}
#Cat_right_info h3, #Cat_right_info h4 {
margin-left: 2.5em;
}
/*#Cat_right_info h4 {
display: none;
}*/
#Cat_right_info h3 {
color: #e40083;
}
@media screen and (max-width: 1180px) {
#Cat_right_Header span {
line-height: 2.35;
top: -1.25em;
}
}
/*
*TIPS
*/
.TipEntry{
margin-bottom: 10px;
}
/*
Booking Form
*/
.bform_fieldwrap {
margin: 0.5em 0 0.5em 0;
clear: both;
min-height: 30px;
}
.bordermaker{
border: 1px solid #ccc;
-webkit-box-shadow: 3px 3px 5px #eee;
-moz-box-shadow: 3px 3px 5px #eee;
box-shadow: 3px 3px 5px #eee;
-webkit-border-radius: 2px;
-moz-border-radius: 2px;
-khtml-border-radius: 2px;
border-radius: 2px;
min-height: 18px;
}
@media screen and (max-width: 750px) {
/* Ext - Tour Detail */
#Cat_right_Col1, #Cat_right_Col2 {
float: none;
margin-bottom: 2em;
width: auto;
}
#Cat_right_Col1 p, #Cat_right_Col2 p {
padding: 0 1.25em;
}
.Cat_right_booking_info {
margin-left: 1.25em;
margin-right: 1.25em;
}
}
@media screen and (max-width: 540px) {
#Cat_left {
margin-bottom: 4em;
}
#Cat_right_Header span {
left: -0.25em;
}
#Cat_left_Header, #Cat_right_Header {
height: auto;
}
#Cat_right_Header h1 {
padding: 0.25em 0.5em 0.25em 2em;
position: static;
}
#Cat_left_Header h3 {
padding: 0.75em;
position: static;
}
/* Tour Detail */
.nav-header h3::after {
content: " +";
}
.nav-header.close h3::after {
content: " -";
}
#Cat_left ul {
display: none;
}
}

3
style/srmuc.css Normal file

File diff suppressed because one or more lines are too long

10
style/srmuc.map Normal file

File diff suppressed because one or more lines are too long

529
style/srmuc.scss Normal file
View File

@ -0,0 +1,529 @@
/*
*
* Default CSS für Kalender-App
* bitte erstellen Sie selbst eine Kopie und binden Sie diese in Ihr templates/header.inc ein
* dann können Sie jederzeit auf eine korrekte Version zurückkeheren
*
*/
$baseColor: #e2003b;
//$baseColor: #d36f16;
$fontColorTable: #e2003b;
$fontColorLink: #e2003b;
$fontColorAuszeichnung: #e2003b;
$buttonColorPrimary:#e2003b;
$backgroundColorHeader: #d36f16;
$borderColor: #e2003b;
body#bidat {
margin: 0% 5%;
}
#bidat tbody tr:nth-child(odd) {
background-color: fade-out($baseColor, 0.9);
}
#monatname {
min-width: 200px;
display: inline;
}
nav#bidat-monatbar {
font-size: 2rem;
width: 100%;
text-align: center;
padding: 2px 0px;
}
nav#bidat-monatbar a {
padding: 10px;
color: white;
text-decoration: none;
}
nav#bidat-monatbar a:hover {
padding: 10px;
margin: 5 px;
color: blue;
}
#bidat article {
grid-area: content;
background-color: white;
border: 1px solid $baseColor;
//border-image: linear-gradient(to top, #d36f16, rgba(211, 111, 22, 0)) 1 100%;
}
#bidat input {
line-height: 1.5rem;
padding: 4px 10px;
width: 300px;
}
#bidat input[type=checkbox] {
width: 8px;
margin-top: 0.5em;
}
#bidat .form-check-label {
padding-left: 2.5rem;
margin-bottom: 0;
cursor: pointer;
}
#bidat .was-validated input:valid {
border-color: green;
}
#bidat .was-validated input:invalid {
border-color: red;
}
#bidat form .formrow {
margin-bottom: 1em;
}
#bidat form label {
line-height: 1.5rem;
padding-top: 2px;
display: inline-block;
min-width: 200px;
text-align: right;
font-weight: bold;
margin-right: 2rem;
}
#bidat form .invalid-feedback {
display: none;
padding-left: 250px;
color: red;
font-size: 0.8em;
}
#bidat form input:invalid ~ .invalid-feedback {
display: block;
}
#bidat .form-control {
margin-top: 20px;
width: 300px;
display: inline-block;
}
h1,
h2,
h3,
h4,
h5,
h6 {
color: $baseColor;
}
article {
header {
text-align: center;
}
}
header {
background-color: $baseColor;
color: white;
min-height: 3rem;
}
header {
& h1,h2,h3,h4,h5,h6 {
color: white;
}
}
header nav div.active {
border-bottom: 2px solid white;
}
header nav div.inactive {
color: rgba(255, 255, 255, 0.2);
}
header nav div.col-md-auto {
padding-left: 1rem;
padding-right: 1rem;
}
select#sw_nav {
min-width: 200px;
line-height: 1.5rem;
height:2rem;
padding: 4px 10px;
}
body > footer {
position: fixed;
border-top: 1px solid #5a90be;
left: 0px;
bottom: 0px;
height: 3rem;
width: 100%;
background-color: $baseColor;
color: white;
}
footer .container .row,
header .container .row {
height: 3rem;
}
.capitalize {
text-transform: uppercase;
}
main {
padding-top: 2em;
}
main #bidat_content {
border-right: 1px dotted gray;
}
.bidat_table {
border-color: $baseColor;
font-size: 0.85rem;
.brd-bottom {
border-bottom: 1px solid $baseColor;
}
.brd-left {
border-left: 1px solid $baseColor;
}
.brd-right {
border-right: 1px solid $baseColor;
}
details {
display:none;
}
a {
color: $baseColor;
}
color: $fontColorTable;
}
.bidat_table .th {
background-color: $baseColor;
border-radius: 0px 0px 0 0;
color: white;
min-height: 3rem;
margin-top: 2rem;
}
.bidat_table .tf {
background-color: $baseColor;
border-radius: 0 0 0px 0px;
color: white;
min-height: 3rem;
margin-top: 0rem;
}
.bidat_table .tr {
min-height: 3.5em;
}
.bidat_table .tr:nth-child(odd) {
background-color: fade-out($baseColor, 0.9);
}
.var_hidden {
display: none;
}
.btn-primary {
background-color: $baseColor;
border-color:darken($baseColor, 0.1);
color: white !important;
}
.btn-primary:hover {
background-color: fade-out($baseColor, 0.2);
border-color:darken($baseColor, 0.1);
color: white !important;
}
#bidat-event-single {
display: grid;
grid-template-columns: 100%;
margin-top: 2rem;
border-radius: 0px;
header {
border-radius: 0px 0px 0 0;
padding-top:0.5rem;
grid-row: 1;
}
a {
color: $baseColor;
font-weight: bold;
}
footer {
grid-row: 4;
text-align: center;
border-top: 2px dotted $baseColor;
padding-top:0.5rem;
padding-bottom:0.5rem;
background-color: fade-out($baseColor, 0.9);
}
.underline {
margin-top:1rem;
color:$baseColor;
font-weight: bold;
border-bottom: 1px solid $baseColor;
}
.ch {
color:$baseColor;
font-weight: bold;
}
}
#bidat-event-description {
grid-row: 2;
padding:2rem;
}
#bidat-event-details {
grid-row: 3;
background-color: fade-out($baseColor, 0.7);
padding:2rem;
}
#bidat-event-registration {
border-radius: 0px;
margin: 2rem 0;
.infoblock {
background-color: fade-out($baseColor, 0.7);
padding: 1rem 4rem;
margin:0px 0px 18px 0px;
}
.submitrow {
margin-left: 4rem;
}
}
#bidat-nav {
display: grid;
grid-template-columns: 50% 25% 25%;
}
#bidat-monatbar {
grid-column:1;
grid-row:1;
#th_name {
background-color: fade-out($baseColor, 0.8);
height:2rem;
padding-top: 0.3rem;
margin-left: -15px;
margin-right: -15px;
}
#th_back {
text-align: right;
margin-right: 0px;
}
#th_fwd {
text-align: left;
margin-left:0px;
}
}
#bidat-kategorie {
grid-column:2;
grid-row:1;
}
#bidat-suche {
grid-column:3;
grid-row:1;
}
#bidat-suche {
input {
border-radius: 0px;
margin-right: 0px;
width: 150px;
padding:0px;
height:2rem;
}
button {
border-radius: 0px;
margin-left: 0px;
height:2rem;
span {
display:none;
}
}
.form-control {
margin-top: 0px;
width: 150px;
display: inline-block;
}
}
#termin-selector {
margin-top:5px;
section {
&.inactive{
background-color: fade-out($baseColor, 0.7);
}
h3 {
font-size: 1.2rem;
font-weight: bold;
}
background-color: $baseColor;
min-height: 5rem;
border-radius: 7px;
padding: 5px;
}
}
.th2 {
h3 {
font-size: 1.0rem;
font-weight: bold;
}
background-color: fade-out($baseColor, 0.7);
padding:0px 5px;
margin-bottom: 5px;
}
.alertbox {
background-color: fade-out(red, 0.7);
margin-left:4rem;
padding:10px;
border-radius: 7px;
max-width: 600px;
}
input.inaktiv{
background-color: grey;
}
.warenkorb {
background-color: fade-out($baseColor, 0.7);
padding:20px;
.sumrow {
border-top: 1px solid $baseColor;
font-weight: bold;
}
.row {
min-height:2rem;
}
.headrow {
border-bottom: 1px solid $baseColor;
font-weight: bold;
}
}
@media (min-width: 576px) {}
@media (min-width: 768px) {
#bidat-event-single {
grid-template-columns: 60% 40%;
header {
grid-row: 1;
grid-column: 1 / span 2;
}
}
#bidat-event-description {
grid-column: 1;
}
#bidat-event-details {
grid-column: 2;
grid-row: 2 /span 2;
}
footer {
grid-column: 1 / span 2;
}
.var_hidden {
display: block;
}
#bidat-event-registration {
display:grid;
grid-template-columns: 50% 50%;
header {
grid-column: 1 / span 2;
}
.infoblock {
grid-column: 1 / span 2;
}
section {
grid-row:3;
grid-column:1;
}
aside {
grid-row:3;
grid-column:2;
align-self:end;
}
}
}
@media (min-width: 1024px) {
.var_hidden {
display: block;
}
}
/* Add Animation */
@-webkit-keyframes animatetop {
from {
top: -300px;
opacity: 0;
}
to {
top: 0;
opacity: 1;
}
}
@keyframes animatetop {
from {
top: -300px;
opacity: 0;
}
to {
top: 0;
opacity: 1;
}
}
.bold {
font-weight: bold;
}

36
template.php Normal file
View File

@ -0,0 +1,36 @@
<?php
class Template {
private $_scriptPath='templates/';//comes from config.php
public $properties;
public function setScriptPath($scriptPath){
$this->_scriptPath=$scriptPath;
}
public function __construct($resp, $templatePath){
if (is_null($resp) ) $this->properties = array();
else $this->properties = $resp;
if (is_null($templatePath)) {;}
else $this->_scriptPath=$templatePath;
setlocale (LC_ALL, 'de_DE');
}
public function render($filename){
ob_start();
if(file_exists($this->_scriptPath.$filename)){
include($this->_scriptPath.$filename);
} else throw new TemplateNotFoundException();
return ob_get_clean();
}
public function __set($k, $v){
$this->properties[$k] = $v;
}
public function __get($k){
return $this->properties[$k];
}
}
?>

View File

@ -0,0 +1,324 @@
</nav>
<article id='bidat-event-registration'>
<header>
<h2>Anmeldung für: <?=$this->produkt_titel?></h2>
</header>
<div class='infoblock'>
<div class="table">
<div class="row">
<div class="col-3 ch">
Beginn
</div>
<div class="col-9">
<time itemprop='startDate' dateTime='<?=$this->von->format(DateTime::ATOM)?>'><?=strftime('%e. %B %G - %R',$this->von->getTimestamp())?></time>
</div>
</div>
<div class="row">
<div class="col-3 ch">
Ende
</div>
<div class="col-9">
<time itemprop='startDate' dateTime='<?=$this->bis->format(DateTime::ATOM)?>'><?=strftime('%e. %B %G - %R',$this->bis->getTimestamp())?></time>
</div>
</div>
<div class="row">
<div class="col-3 ch">Max. TN</div>
<div class="col-9"><?=$this->maxtn?></div>
</div>
<div class="row">
<div class="col-3 ch">aktuell TN</div>
<div class="col-9"><?=$this->tn?></div>
</div>
<div class="row">
<div class="col-3 ch">Freie Plätze</div>
<div class="col-9"><?=$this->freitn?></div>
</div>
</div>
<details>
<?=$this->produkt_beschreibung?>
</details>
</div>
<!--action="ajax.php?register=872"-->
<section class='form'>
<form id="event-registration" class="needs-validation" method="post">
<input type="hidden" name="de_stattbuchung_event_Modul" value="<?=$this->oid?>" required="">
<input type="hidden" name="tnvoll" value="1" required="">
<div class="formrow">
<label>Anrede </label>
<input list="anrede" placeholder="Anrede ausw&auml;hlen" name="anrede" allowautofill="no" required="">
<datalist id="anrede">
<option value="Herr"> </option>
<option value="Frau"> </option>
</datalist>
</div>
<div class="formrow">
<label>Vorname </label>
<input type="text" id="vorname" name="vorname" required="">
</div>
<div class="formrow">
<label>Nachname </label>
<input type="text" id="nachname" name="nachname" required="">
</div>
<div class="formrow">
<label>Strasse </label>
<input type="text" id="strasse" name="strasse" required="">
</div>
<div class="formrow">
<label>PLZ </label>
<input type="text" id="plz" name="plz" required="">
</div>
<div class="formrow">
<label>Ort </label>
<input type="text" id="ort" name="ort" required="">
</div>
<div class="formrow">
<label>Email </label>
<input type="text" id="email" name="email" required="">
</div>
<div class="formrow">
<label class="form-check-label" for="datenschutz">Ich Stimme den Datenschutzbestimmungen zu </label>
<input type="checkbox" class="form-check-input" id="datenschutz" required="">
</div>
<div class="formrow">
<label for="kommentar">Bemerkung </label> <textarea class="form-control bidat_textarea" id="kommentar" name="kommentar" rows="3">
</textarea>
</div>
<div class='tnartliste' freitn='<?=$this->freitn?>'>
<?php
$warenkorbZeilen = array();
setlocale(LC_MONETARY, 'de_DE');
if (!is_null($this->de_stattbuchung_Preismodell)) {
foreach ($this->de_stattbuchung_Preismodell as $preismodell) {
echo "<div class='formrow'><label>".$preismodell[de_stattbuchung_Teilnehmerart][label]." (".round($preismodell[items][0][preis_brutto], 2)
." &euro;)</label> ";
echo "<input type='text' class='tnart' autocomplete='off' id='".$preismodell[items][0][key_klasse]."' beschriftung='Ticket ".$preismodell[de_stattbuchung_Teilnehmerart][label]."' price='".str_replace(',','.',round($preismodell[items][0][preis_brutto], 2))."' name='".$preismodell[items][0][key_klasse]."'>";
echo "<div class='alertbox' style='display:none'></div>";
echo "</div>";
$warenkorbZeilen[] = $preismodell[items][0][key_klasse];
}
}
?>
</div>
<?php
if($this->paypal == false) {
echo "<div class='formrow submitrow'>";
echo " <button type='submit' id='step1-btn' class='btn btn-primary'>Anmeldung abschicken </button> ";
echo " <button type='button' class='btn btn-secondary' name='btnBack' value='Zurück' onclick='window.history.go(-1);'>Zurück</button>";
echo " </div>";
} else {
echo "<div class='formrow submitrow'>";
echo " <button id='step1-btn' type='button' class='btn btn-primary'>Weiter zur Zahlungsart </button> ";
echo " <button type='button' class='btn btn-secondary' name='btnBack' value='Zurück' onclick='window.history.go(-1);'>Zurück</button>";
echo " </div>";
}
?>
</div>
</form>
</section>
<aside>
<div class='warenkorb' style='display:none'>
<h1>Ticket-Auswahl</h1>
<div class='table table-striped'>
<div class="tnart row headrow">
<div class="tnart ntart1 titel col-4 th"> Ticket
</div>
<div class="tnart ntart1 anzahl col th text-center" >Anzahl
</div>
<div class="tnart ntart1 sum col th text-right" >Preis
</div>
</div>
<?php
foreach ($warenkorbZeilen as $zeile) {
echo " <div class='tnart ".$zeile." row' style='display:none'>";
echo " <div class='tnart ntart1 titel col-4' id='".$zeile."_label'>";
echo " </div>";
echo " <div class='tnart ntart1 anzahl col text-center' id='".$zeile."_amount'>";
echo " </div>";
echo " <div class='tnart ntart1 sum col text-right' id='".$zeile."_sum'>";
echo " </div>";
echo " </div>";
}
?>
<div class='sumrow row'>
<div class='col'>Gesamt</div>
<div class='col text-center' id='amount'></div>
<div class='col text-right' id='summe'></div>
</div>
</div>
</div>
<div id='ppplus'>
</div>
</aside>
</article>
<script>
// Example starter JavaScript for disabling form submissions if there are invalid fields
(function() {
'use strict';
window.addEventListener('load', function() {
// Fetch all the forms we want to apply custom Bootstrap validation styles to
var forms = document.getElementsByClassName('needs-validation');
// Loop over them and prevent submission
var validation = Array.prototype.filter.call(forms, function(form) {
form.addEventListener('submit', function(event) {
if (form.checkValidity() === false) {
event.preventDefault();
event.stopPropagation();
}
form.classList.add('was-validated');
}, false);
});
}, false);
})();
</script>
<script src="https://www.paypalobjects.com/webstatic/ppplus/ppplus.min.js" type="text/javascript">
</script>
<script src="style/jquery-3.3.1.min.js"></script>
<script>
function loadPaywall(link) {
console.log("-->load Paywall"+link);
PAYPAL.apps.PPP({
"approvalUrl": link,
"placeholder": 'ppplus',
"mode": "sandbox",
"country": "DE"});
}
function formatCurrency(total) {
var neg = false;
if(total < 0) {
neg = true;
total = Math.abs(total);
}
return (neg ? "- " : '') + parseFloat(total, 10).toFixed(2).replace(/(\d)(?=(\d{3})+\.)/g, "$1,").toString().replace('.',',')+' €';
}
function update(event) {
console.log("-->Funktion Update");
let sum = 0.0;
let sumAmount = 0.0;
$('input.tnart').each(
function () {
console.log("-->AddItem");
console.error($(this));
let rowamount = $(this).val();
let rowsum = (rowamount*$(this).attr('price'));
sum += rowsum;
sumAmount += Number(rowamount);
console.log('Class'+$(this).attr('id'));
$('#'+$(this).attr('id')+'_label').html($(this).attr('beschriftung'));
$('#'+$(this).attr('id')+'_amount').html(rowamount);
$('#'+$(this).attr('id')+'_sum').html(formatCurrency(rowsum));
if(rowamount >0 ) $('div.'+$(this).attr('id')).slideDown("slow");
else $('div.'+$(this).attr('id')).slideUp("fast");
});
console.log('SumAmount: '+Number(sumAmount));
console.log('Freitn: '+(Number($('.tnartliste').attr('freitn')))<15);
if(Number(sumAmount) > Number($('.tnartliste').attr('freitn'))) {
console.log("Error too big");
let correctBy =sumAmount-$('.tnartliste').attr('freitn');
let newAmount =$(event.currentTarget).val()-correctBy;
$(event.currentTarget).val(newAmount);
sumAmount -= correctBy;
sum -= correctBy*$(event.currentTarget).attr('price');
//$(this).setVal($(this).val()- $('.tnartliste').attr('freitn')-sumAmount);
console.log("Alertbox");
console.error($('.alertbox'));
$(event.currentTarget).next('.alertbox').html('Die maximal verfügbare Anzahl von Karten liegt derzeit bei '+$('.tnartliste').attr('freitn')+"<br>Ihre Eingabe wurde entsprechend korrigiert.").slideDown("slow");
update();
}
console.error(sum);
if(sum > 0) {
$('#summe').html(formatCurrency(sum));
$('#amount').html(sumAmount);
$('.warenkorb').slideDown("slow");
$('#step1-btn').show();
}
console.log("<--Funktion Update");
}
$(document).ready(function(){
$('#step1-btn').hide();
$("#step1-btn").on('click', event =>{
console.log("--> Click submit Botton");
$("input").prop("readonly", true);
$("input").addClass("inaktiv", true);
$(event.currentTarget).html("... wird bearbeitet").addClass('icon-spinner icon-spin icon-large');
$.ajax({
url: 'ajax.php?register=872',
type: 'post',
dataType: 'json',
data: $('form#event-registration').serialize(),
success: function(data) {
console.log("--> Response recieved");
console.error(data);
var link = data.links[1].href;
console.error(link);
loadPaywall(link);
$(event.currentTarget).hide();
}
});
});
$('input.tnart').each(function () {
$(this).on('keyup',event => {
$(event.currentTarget).next('.alertbox').hide();
update(event)});
});
});
</script>

10
templates/footer.inc Normal file
View File

@ -0,0 +1,10 @@
<div>&nbsp;<br>&nbsp;<br>&nbsp;<br></div>
<footer>
Abschließende Informationen
</footer>
</body>
</html>

20
templates/header.inc Normal file
View File

@ -0,0 +1,20 @@
<!DOCTYPE html>
<html lang="de">
<head>
<meta charset="utf-8" />
<title><?=$this->title?></title>
<!-- Required meta tags -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<!-- Bootstrap CSS -->
<link rel="stylesheet" href="https://community.stattbuchung.de/cdnbootstrap/css/bootstrap.min.css" integrity="sha384-MCw98/SFnGE8fJT3GXwEOngsV7Zt27NXFoaoApmYm81iuXoPkFOJwJ8ERdknLPMO" crossorigin="anonymous">
<!-- User CSS -->
<link rel="stylesheet" href="style/default.css">
<link rel="stylesheet" href="style/<?=$this->css?>">
<link rel="stylesheet" href="style/font-awesome.min.css">
</head>
<body id='bidat<?=$this->bodyid?>'>
<nav id='bidat-nav'>

31
templates/nav_liste.inc Normal file
View File

@ -0,0 +1,31 @@
<?php
setlocale (LC_ALL, 'de_DE@euro', 'de_DE', 'deu_deu','ge');
$swString = '';
if (!is_null($_GET['stichwort']) ) {
$swString = '&stichwort='.$_GET['stichwort'];
}
if (!is_null($_GET['style']) ) {
$swString = $swString.'&style='.$_GET['style'];
}
?>
<nav id='bidat-monatbar'>
<div class='container bidat_table' id='nav_table'>
<div class='row align-items-center '>
<div class='col' id='th_back'><a style="display: inline; " class= 'btn btn-primary' title="voriger Monat" href="index.php?monat=<?=$this->monat_down?>&jahr=<?=$this->jahr_down?><?=$swString?>">&lt;</a>
</div>
<div class='col' id="th_name"><?=$this->monat_name?></div>
<div class='col' id="th_fwd"><a style="display: inline; " class= 'btn btn-primary' title="nächster Monat" href="index.php?monat=<?=$this->monat_up?>&jahr=<?=$this->jahr_up?><?=$swString?>">&gt;</a>
</div>
</div>
</nav>

11
templates/searchbox.inc Normal file
View File

@ -0,0 +1,11 @@
<nav id='bidat-suche'>
<form action='index.php' method='GET'>
<div class='form-row'>
<div class='col-auto'>
<input type='text' class='form-control' name='query'/>
<button type='submit' class='btn btn-primary' id='btn-search' value='Suchen'><i class='fa fa-search'></i><span>Suchen</span></button>
</div>
</div>
</form>
</nav>

6
templates/success.inc Normal file
View File

@ -0,0 +1,6 @@
</nav>
<article class='success'>
<h1>Herzlichen Dank für Ihre Bestellung</h1>
<div>Sie sollten in den nächsten Minuten eine E-Mail-Nachricht mit den Tickets und der Rechnung erhalten.</div>
<div>Falls Probleme auftreten kontaktieren Sie uns bitte</div>
</article>

4
templates/table_foot.inc Normal file
View File

@ -0,0 +1,4 @@
<div class='row align-items-center tf'>
<div class='col-12' id='th_event'></div>
</div>
</div>

47
templates/table_head.inc Normal file
View File

@ -0,0 +1,47 @@
<?php
if(!is_null($this->properties)) {
$properties = $this->properties;
if( count($properties[items][0][items]) >0) {
$monat = -2;
$jahr = -2;
if(!is_null($_GET['monat'])) $monat =$_GET['monat'];
if(!is_null($_GET['jahr'])) $jahr =$_GET['jahr'];
echo "<nav id='bidat-kategorie'><div class='container bidat_table' id='bidat_content_table'> Filter ";
echo "<select class ='btn btn-primary' id='sw_nav' onChange=reloadPage(this.value,".$monat.",".$jahr.")>";
echo "<option value='0'>Alle Kategorien</option>";
$i = '';
foreach($properties[items][0][items] as $sw) {
if ($_GET['stichwort'] == $sw[schluessel] ) $i = 'selected';
echo "<option ".$i." value='".$sw[schluessel]."'>".$sw[name]."</option>";
$i= '';
}
echo "</select>";
echo "</div></nav>";
}
}
?>
</nav>
<script>
function reloadPage(val, monat, jahr) {
var params = 'index.php?stichwort='+val+"&style=table";
if(monat>-1) params += '&monat='+monat;
if(jahr>0) params += '&jahr='+jahr;
top.location.href=params;
}
</script>
<div class='container bidat_table' id='bidat_content_table'>
<div class='row align-items-center th'>
<div class='col-5' id='th_event'>Event</div>
<div class='col' id="th_datum">Datum</div>
<div class='col' id="th_uhrzeit">Uhrzeit</div>
<div class='col var_hidden' id="th_maxTN">MaxTN</div>
<div class='col var_hidden' id="th_aktTN">aktuelle TN</div>
<div class='col var_hidden' id="th_verfuegbar">Verfügbar</div>
<div class='col-2' id="th_anmeldung">Anmeldung</div>
</div>

20
templates/table_row.inc Normal file
View File

@ -0,0 +1,20 @@
<div class="row align-items-center tr brd-bottom" itemscope itemtype="http://schema.org/Event">
<div class="col-5 brd-right">
<a href='index.php?modul=<?=$this->oid?>'><?=$this->produkt_titel?></a>
<details itemprop='desciption'> <?=$this->produkt_beschreibung?></details>
</div>
<div class="col " ><time itemprop='startDate' dateTime='<?=$this->von->format(DateTime::ATOM)?>'><?=$this->von->format('j.m.y')?></time></div>
<div class="col "><?=$this->von->format('H:i')?></div>
<div class="col var_hidden"><?=$this->maxtn?></div>
<div class="col var_hidden"><?=$this->tn?></div>
<div class="col var_hidden"><?=$this->freitn?></div>
<div class="col-2 ">
<?php
if($this->freitn>0) {
echo "<a class='btn btn-primary' href='index.php?form=".$this->oid."'>Anmeldung</a>";
} else {
echo "Ausgebucht";
}
?>
</div>
</div>

View File

@ -0,0 +1,2 @@
</div>

View File

@ -0,0 +1,3 @@
<div class='container bidat_table' id='bidat_content_table'>

19
templates/teaser_row.inc Normal file
View File

@ -0,0 +1,19 @@
<div class="row align-items-center tr">
<div class="col">
<div class="teaser_monat">
<?=strftime('%b',$this->bis->getTimestamp())?>
</div>
<div class="teaser_tag">
<?=strftime('%e',$this->bis->getTimestamp())?>
</div>
</div>
<div class="col">
<div class="teaser_title">
<a href='index.php?modul=<?=$this->oid?>'><?=$this->produkt_titel?></a>
</div>
<div class="teaser_ort">
<a href='<?=$this->treffpunkt_link?>'><?=$this->treffpunkt_name?></a>
</div>
</div>
</div>

View File

@ -0,0 +1,89 @@
<?php
setlocale (LC_ALL, 'de_DE@euro', 'de_DE', 'deu_deu','ge');
?>
</nav>
<article id='bidat-event-single' class='<?=$this->produkt_css?>' itemscope itemtype="http://schema.org/Event">
<header>
<h2 itemprop='name'><?=$this->produkt_titel?></h2>
</header>
<div class='produkt_image'></div>
<div class='description' id ='bidat-event-description' itemprop='description'>
<?=$this->produkt_beschreibung?>
</div>
<div id='bidat-event-details'>
<div class="table">
<div class="row">
<div class="col-3 ch">
Beginn
</div>
<div class="col-9">
<time itemprop='startDate' dateTime='<?=$this->von->format(DateTime::ATOM)?>'><?=strftime('%e. %B %G - %R',$this->von->getTimestamp())?></time>
</div>
</div>
<div class="row">
<div class="col-3 ch">
Ende
</div>
<div class="col-9">
<time itemprop='startDate' dateTime='<?=$this->bis->format(DateTime::ATOM)?>'><?=strftime('%e. %B %G - %R',$this->bis->getTimestamp())?></time>
</div>
</div>
<div class="row">
<div class="col-3 ch">Max. TN</div>
<div class="col-9"><?=$this->maxtn?></div>
</div>
<div class="row">
<div class="col-3 ch">aktuell TN</div>
<div class="col-9"><?=$this->tn?></div>
</div>
<div class="row">
<div class="col-3 ch">Freie Plätze</div>
<div class="col-9"><?=$this->freitn?></div>
</div>
<?php
setlocale(LC_MONETARY, 'de_DE');
if (!is_null($this->de_stattbuchung_Preismodell)) {
echo "<div class='row' itemscope itemprop='offers' itemtype='http://schema.org/Offer'><div class='col underline'>Preisinformationen</div></div>";
foreach ($this->de_stattbuchung_Preismodell as $preismodell) {
echo "<meta itemprop='priceCurrency' content='EUR'>
<meta itemprop='availability' content='InStock'>
<meta itemprop='url' content='http://".$_SERVER['HTTP_HOST']."/index.php?form=".$this->oid."'>
<meta itemprop='price' content='".$preismodell[items][0][preis]."'>";
echo "<div class='row'><div class='col-3 ch'>".$preismodell[de_stattbuchung_Teilnehmerart][label]."</div><div class='col-9'>".
round($preismodell[items][0][preis_brutto], 2)
." &euro;</div></div>";
}
echo "<meta itemprop='validFrom' content='".$this->validFrom->format(DateTime::ATOM)."'>";
echo "</div>";
}
?>
<div itemscope itemprop='location' itemtype='http://schema.org/Place'><a href='<?=$this->treffpunkt_link?>'>
<meta itemprop='name' content='<?=$this->treffpunkt_name?>'>
<i class="fa fa-flag"></i>
<span itemprop="address" itemscope itemtype="http://schema.org/PostalAddress" >
<meta itemprop='name' content='<?=$this->treffpunkt_name?>'>
<meta itemprop="streetAddress" content='<?=$this->treffpunkt_adr['address']['road']?>'>
<meta itemprop="postalCode" content='<?=$this->treffpunkt_adr['address']['postcode']?>'>
<meta itemprop="addressRegion" content=''>
<meta itemprop="addressLocality" content='<?=$this->treffpunkt_adr['address']['city']?>'>
<?=$this->treffpunkt_name?></span></a></div>
<a class='btn btn-primary' href='index.php?modultermine=<?=$this->de_stattbuchung_Produkt?>'>weitere Termine</a>
</div>
</div>
<footer>
<?php
if($this->freitn>0) {
echo "<a class='btn btn-primary' href='index.php?form=".$this->oid."'>Anmeldung</a>";
} else {
echo "Ausgebucht";
}
?>
</footer>
</article>

306
testwarenkorb.html Normal file
View File

@ -0,0 +1,306 @@
<!DOCTYPE html>
<html lang="de"><head>
<meta charset="utf-8">
<title>Termine Verkehrsakadmie Franken</title>
<!-- Required meta tags -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<!-- Bootstrap CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-alpha.6/css/bootstrap.min.css" integrity="sha384-rwoIResjU2yc3z8GV/NPeZWAv56rSmLldC3R/AZzGRnGxQQKnKkoFVhFQhNUwEyJ" crossorigin="anonymous">
<!-- FONT -->
<link href="https://fonts.googleapis.com/css?family=Montserrat:400" rel="stylesheet">
<!-- User CSS -->
<link rel="stylesheet" href="style/default.css">
<link rel="stylesheet" href="style/bidat.css">
<link rel="stylesheet" href="style/font-awesome.min.css">
<style>@media print {#ghostery-purple-box {display:none !important}}</style></head>
<body id="bidat">
<article id="bidat-event-registration">
<header>
<h2>Anmeldung für: Modul 1 Wirtschaftliches Fahren Kombimodul KOM/LKW</h2>
</header>
<div class="infoblock">
<div class="table">
<div class="row">
<div class="col-3 ch">
Beginn
</div>
<div class="col-9">
<time itemprop="startDate" datetime="2019-02-18T09:00:00+01:00">18. Februar 2019 - 09:00</time>
</div>
</div>
<div class="row">
<div class="col-3 ch">
Ende
</div>
<div class="col-9">
<time itemprop="startDate" datetime="2019-02-18T17:00:00+01:00">18. Februar 2019 - 17:00</time>
</div>
</div>
<div class="row">
<div class="col-3 ch">Max. TN</div>
<div class="col-9">16</div>
</div>
<div class="row">
<div class="col-3 ch">aktuell TN</div>
<div class="col-9">1</div>
</div>
<div class="row">
<div class="col-3 ch">Freie Plätze</div>
<div class="col-9">15</div>
</div>
</div>
<details>
<h3>Eco-Fahren, Das Perfektionstraining</h3><br><ul class="sdw_liste"><li>Das Modul 1 ist ein Kombinationsmodul, das Inhalte für beide Führerscheinklassen vermittelt.</li><li>Die Kennziffern für dieses Modul sind: 1.1, 1.2, 1.3</li></ul> </details>
</div>
<section class='form'>
<form id="needs-validation" class="needs-validation" action="index.php?register=872" method="post">
<input type="hidden" name="de_stattbuchung_event_Modul" value="5132134" required="">
<input type="hidden" name="tnvoll" value="1" required="">
<div class="formrow">
<label>Anrede <i class="fa fa-star"></i></label>
<input list="anrede" placeholder="Anrede auswählen" name="anrede" allowautofill="no" required="">
<datalist id="anrede">
<option value="Herr"> </option>
<option value="Frau"> </option>
</datalist>
</div>
<div class="formrow">
<label>Vorname <i class="fa fa-star"></i></label>
<input type="text" id="vorname" name="vorname" required="">
</div>
<div class="formrow">
<label>Nachname <i class="fa fa-star"></i></label>
<input type="text" id="nachname" name="nachname" required="">
</div>
<div class="formrow">
<label>Geburtsdatum <i class="fa fa-star"></i></label>
<input type="text" name="geburtsdatum" id="geb_datum" value="" class="input-large validate[required]" placeholder="TT.MM.JJJJ" pattern="^[0-3]{1}[0-9]{1}\.[0-3]{1}[0-9]{1}\.[1-2]{1}[0-9]{1}[0-9]{2}$" message="Bitte geben Sie ein korrektes Datum ein" required="true">
</div>
<div class="formrow">
<label> Geburtsort <i class="fa fa-star"></i></label>
<input type="text" name="geburtsort" id="geb_ort" value="" class="input-large validate[required]" required="true">
</div>
<div class="formrow">
<label>Email <i class="fa fa-star"></i></label>
<input type="text" id="email" name="email" required="">
</div>
<div class="formrow">
<label>Telefon <i class="fa fa-star"></i></label>
<input type="text" name="telefon" id="telefon" value="" class="input-large validate[required]" required="true"> </div>
<div class="formrow">
<label>Firma / Organisation </label>
<input type="text" name="organization" id="organization" value="" class="input-large">
</div>
<div class="formrow">
<label>Strasse <i class="fa fa-star"></i></label>
<input type="text" id="strasse" name="strasse" required="">
</div>
<div class="formrow">
<label>PLZ <i class="fa fa-star"></i></label>
<input type="text" id="plz" name="plz" required="">
</div>
<div class="formrow">
<label>Ort <i class="fa fa-star"></i></label>
<input type="text" id="ort" name="ort" required="">
</div>
<div class="formrow">
<label class="form-check-label" for="datenschutz">Ich stimme den Datenschutzbestimmungen zu </label>
<input type="checkbox" class="form-check-input" id="datenschutz" required="">
</div>
<div class="formrow">
<label for="kommentar">Bemerkung </label> <textarea class="form-control bidat_textarea" id="kommentar" name="kommentar" rows="3"> </textarea>
</div>
<div class='tnartliste' freitn='15'>
<div>Bitte geben Sie die gewünschte Anzahl von Tickets ein</div>
<div class="formrow">
<label>Vollpreise (12,00 €) <i class="fa fa-star"></i></label>
<input type="text" class='tnart' price='12.00' beschriftung='Ticket Vollpreis' id="tnart1" name="ort" required="">
<div class='alertbox' style='display:none'></div>
</div>
<div class="formrow">
<label>Ermäßigt (10,00 €) <i class="fa fa-star"></i></label>
<input type="text" class='tnart' price='10.00' beschriftung ='Ticket Ermäßigt' id="tnart2" name="ort" required="">
<div class='alertbox' style='display:none'></div>
</div>
</div>
<div class="formrow submitrow">
<button type="submit" class="btn btn-primary">Anmeldung abschicken </button>
<button type="button" class="btn btn-secondary" name="btnBack" value="Zurück" onclick="window.history.go(-1);">Zurück</button>
</div>
</form>
</section>
<aside>
<div class='warenkorb' style='display:none'>
<h1>Warenkorb</h1>
<div class='table table-striped'>
<div class="tnart row headrow">
<div class="tnart ntart1 titel col-4 th"> Ticket
</div>
<div class="tnart ntart1 anzahl col th text-center" >Anzahl
</div>
<div class="tnart ntart1 sum col th text-right" >Preis
</div>
</div>
<div class="tnart tnart1 row" style='display:none'>
<div class="tnart ntart1 titel col-4" id='tnart1_label'>
</div>
<div class="tnart ntart1 anzahl col text-center" id='tnart1_amount'>
</div>
<div class="tnart ntart1 sum col text-right" id='tnart1_sum'>
</div>
</div>
<div class="tnart tnart2 row" style='display:none'>
<div class="tnart titel col-4" id='tnart2_label'>
</div>
<div class="tnart tnart2 anzahl col text-center" id='tnart2_amount'>
</div>
<div class="tnart tnart2 sum col text-right" id='tnart2_sum'>
</div>
</div>
<div class='sumrow row'>
<div class='col'>Gesamt</div>
<div class='col text-center' id='amount'></div>
<div class='col text-right' id='summe'></div>
</div>
</div>
</div>
</aside>
</article>
<script>
// Example starter JavaScript for disabling form submissions if there are invalid fields
(function() {
'use strict';
window.addEventListener('load', function() {
// Fetch all the forms we want to apply custom Bootstrap validation styles to
var forms = document.getElementsByClassName('needs-validation');
// Loop over them and prevent submission
var validation = Array.prototype.filter.call(forms, function(form) {
form.addEventListener('submit', function(event) {
if (form.checkValidity() === false) {
event.preventDefault();
event.stopPropagation();
}
form.classList.add('was-validated');
}, false);
});
}, false);
})();
</script>
<script src="style/jquery-3.3.1.min.js"></script>
<script>
function formatCurrency(total) {
var neg = false;
if(total < 0) {
neg = true;
total = Math.abs(total);
}
return (neg ? "- " : '') + parseFloat(total, 10).toFixed(2).replace(/(\d)(?=(\d{3})+\.)/g, "$1,").toString().replace('.',',')+' €';
}
function update(event) {
console.log("-->Funktion Update");
let sum = 0.0;
let sumAmount = 0.0;
$('input.tnart').each(
function () {
console.log("-->AddItem");
console.error($(this));
let rowamount = $(this).val();
let rowsum = (rowamount*$(this).attr('price'));
sum += rowsum;
sumAmount += Number(rowamount);
console.log('Class'+$(this).attr('id'));
$('#'+$(this).attr('id')+'_label').html($(this).attr('beschriftung'));
$('#'+$(this).attr('id')+'_amount').html(rowamount);
$('#'+$(this).attr('id')+'_sum').html(formatCurrency(rowsum));
if(rowamount >0 ) $('div.'+$(this).attr('id')).slideDown("slow");
else $('div.'+$(this).attr('id')).slideUp("fast");
});
console.log('SumAmount: '+Number(sumAmount));
console.log('Freitn: '+(Number($('.tnartliste').attr('freitn')))<15);
if(Number(sumAmount) > Number($('.tnartliste').attr('freitn'))) {
console.log("Error too big");
let correctBy =sumAmount-$('.tnartliste').attr('freitn');
let newAmount =$(event.currentTarget).val()-correctBy;
$(event.currentTarget).val(newAmount);
sumAmount -= correctBy;
sum -= correctBy*$(event.currentTarget).attr('price');
//$(this).setVal($(this).val()- $('.tnartliste').attr('freitn')-sumAmount);
console.log("Alertbox");
console.error($('.alertbox'));
$(event.currentTarget).next('.alertbox').html('Die maximal verfügbare Anzahl von Karten liegt derzeit bei '+$('.tnartliste').attr('freitn')+"<br>Ihre Eingabe wurde entsprechend korrigiert.").slideDown("slow");
update();
}
console.error(sum);
if(sum > 0) {
$('#summe').html(formatCurrency(sum));
$('#amount').html(sumAmount);
$('.warenkorb').slideDown("slow");
}
console.log("<--Funktion Update");
}
$(document).ready(function(){
$('input.tnart').each(function () {
$(this).on('keyup',event => {
$(event.currentTarget).next('.alertbox').hide();
update(event)});
});
});
</script>
<div>&nbsp;<br>&nbsp;<br>&nbsp;<br></div>
</body></html>

11
util.php Normal file
View File

@ -0,0 +1,11 @@
<?php
function createParam($paramName, $value) {
$param = array("param" => $paramName, "value"=>$value, "type"=>"string");
return $param;
}
?>