11 Commits

Author SHA1 Message Date
c6358b5ea6 fixed the warning 2025-07-07 09:13:05 +02:00
cc4bc791c9 added showTickets.phtml and added the TicketsController. 2025-07-07 09:08:39 +02:00
586322a189 fixed the <html> and <body> tags in all views 2025-07-07 08:42:26 +02:00
1416fd7fa0 Refactor all 2025-07-03 15:51:04 +02:00
16a91cc028 dingdagabum 2025-06-30 14:57:32 +02:00
Viktor Sergeev
3be7e1ecfd Dies und das 2025-06-27 11:09:14 +02:00
Viktor Sergeev
0cff38b71f real 2025-06-16 15:11:49 +02:00
d435ad36b4 added database credentials 2025-06-12 16:13:27 +02:00
034ee28187 important change 2025-06-12 16:09:53 +02:00
Viktor Sergeev
7b8abb3eab Initilazie 3.0 2025-06-12 16:04:47 +02:00
Viktor Sergeev
9eaf948a9f Initilazie 2.0 2025-06-12 16:04:19 +02:00
34 changed files with 1302 additions and 1 deletions

10
.idea/.gitignore generated vendored Normal file
View File

@@ -0,0 +1,10 @@
# Default ignored files
/shelf/
/workspace.xml
# Editor-based HTTP Client requests
/httpRequests/
# Environment-dependent path to Maven home directory
/mavenHomeManager.xml
# Datasource local storage ignored files
/dataSources/
/dataSources.local.xml

9
.idea/EIA.iml generated Normal file
View File

@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$" />
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>

6
.idea/misc.xml generated Normal file
View File

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectRootManager" version="2" languageLevel="JDK_21" default="true" project-jdk-name="temurin-21" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/out" />
</component>
</project>

8
.idea/modules.xml generated Normal file
View File

@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/.idea/EIA.iml" filepath="$PROJECT_DIR$/.idea/EIA.iml" />
</modules>
</component>
</project>

6
.idea/sqldialects.xml generated Normal file
View File

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="SqlDialectMappings">
<file url="file://$PROJECT_DIR$/contact.sql" dialect="GenericSQL" />
</component>
</project>

6
.idea/vcs.xml generated Normal file
View File

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="" vcs="Git" />
</component>
</project>

377
CSS/style.css Normal file
View File

@@ -0,0 +1,377 @@
body {
background-color: #DFF0F2;
color: black;
font-size: 15px;
margin: 0;
padding: 0;
min-height: 100vh;
display: flex;
flex-direction: column;
width: 100vw;
max-width: 100vw;
overflow-x: hidden;
}
#wrapper {
flex: 1 0 auto;
min-height: 0;
display: flex;
flex-direction: column;
justify-content: flex-start;
margin-bottom: 20px;
width: 100vw;
max-width: 100vw;
}
a {
color: black;
text-decoration: none;
}
#navigation {
display: flex;
justify-content: center;
position: sticky;
top: 0;
z-index: 1000;
background: #BAC8D4;
width: 100vw;
}
.link-container {
display: grid;
width: 80%;
grid-template-columns: 20% 20% 56% 4%;
background-color: #BAC8D4;
border-bottom-right-radius: 10px;
border-bottom-left-radius: 10px;
}
.links {
display: flex;
align-items: center;
font-size: 25px;
}
#logo {
height: 60px;
width: 170px;
background-image: url("../images/bibArts.png");
background-position: center;
background-size: contain;
}
#footer {
position: relative;
bottom: 0;
left: 0;
width: 100vw;
height: 180px;
background-color: #BAC8D4;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
flex-shrink: 0;
z-index: 999;
padding: 10px 0;
}
.container-zahlungsmittel {
grid-column: 5;
justify-content: right;
}
.header-zahlungsarten {
padding-right: 15px;
text-align: right;
}
.inhalt {
flex: 1 1 auto;
display: flex;
justify-content: center;
align-items: center;
width: 100vw;
min-height: 0;
min-width: 0;
margin: 0;
padding: 0 2vw;
box-sizing: border-box;
}
.zahlungsmittel-img {
height: 41px;
width: 284px;
background-image: url("../images/Zahlungsmittel.png");
background-position: center;
background-size: contain;
justify-self: right;
}
.line {
width: 97%;
height: 1px;
background-color: grey;
justify-self: center;
grid-column-start: 1;
grid-column-end: 6;
}
.container-rest {
grid-column-start: 1;
grid-column-end: 6;
padding-left: 50px;
}
.link-impressum {
padding-left: 30px;
}
.text-bib {
grid-column: 5;
justify-self: right;
padding-right: 30px;
}
.container-welcome-inhalt {
display: grid;
grid-template-columns: 1fr 1fr;
width: 100%;
max-width: 900px;
min-height: 200px;
border-radius: 10px;
background: white;
box-shadow: 0 2px 16px rgba(0,0,0,0.08);
justify-items: center;
align-items: center;
box-sizing: border-box;
padding: 10px 0;
}
.beispiel-austellung1-img, .beispiel-austellung2-img {
height: 200px;
width: 90vw;
max-width: 320px;
background-position: center;
background-size: contain;
border-radius: 10px;
}
.login-container {
position: absolute;
top: 200px;
background-color: #BAC8D4;
width: 900px;
height: 450px;
border-radius: 10px;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
box-sizing: border-box;
}
.tickets-container {
position: absolute;
top: 200px;
background-color: #BAC8D4;
width: 900px;
height: 450px;
border-radius: 10px;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
box-sizing: border-box;
}
@media (max-width: 600px) {
body {
font-size: 14px;
width: 100vw;
max-width: 100vw;
overflow-x: hidden;
}
#wrapper {
width: 100vw;
max-width: 100vw;
}
#navigation {
width: 100vw;
min-width: 0;
padding: 0;
display: flex;
justify-content: center;
align-items: center;
}
.link-container {
width: 100vw;
min-width: 0;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
row-gap: 8px;
border-radius: 0;
padding: 0 4px;
}
.links {
font-size: 18px;
justify-content: center;
align-items: center;
padding: 6px 0;
text-align: center;
width: 100%;
}
#logo {
width: 120px;
height: 40px;
margin: 0 auto 8px auto;
display: flex;
justify-content: center;
align-items: center;
}
.container-welcome-inhalt {
grid-template-columns: 1fr;
width: 100vw;
max-width: 100vw;
min-height: 0;
padding: 8px 0;
}
.beispiel-austellung1-img, .beispiel-austellung2-img {
width: 90vw;
max-width: 98vw;
height: 120px;
margin-bottom: 10px;
}
.inhalt {
width: 100vw;
min-width: 0;
max-width: 100vw;
padding: 0 2vw;
box-sizing: border-box;
flex-direction: column;
align-items: stretch;
}
#footer {
width: 100vw;
height: auto;
min-height: 120px;
padding: 10px 0 10px 0;
font-size: 13px;
}
.container-zahlungsmittel {
width: 100vw;
text-align: center;
padding: 0;
}
.header-zahlungsarten {
font-size: 1.1em;
padding-right: 0;
text-align: center;
}
.zahlungsmittel-img {
width: 90vw;
max-width: 200px;
height: 30px;
margin: 0 auto;
}
.line {
width: 95vw;
}
.link-impressum, .link-datenschutz, .link-nutzungsbedingungen {
display: block;
padding: 2px 0;
text-align: center;
}
.text-bib {
display: block;
text-align: center;
padding: 0;
}
.desktop-only {
display: none !important;
}
.mobile-only {
display: block !important;
}
.login-container {
position: static;
width: 95vw;
max-width: 400px;
height: auto;
margin: 24px auto;
padding: 16px 8px;
box-sizing: border-box;
}
.tickets-container {
position: static;
width: 95vw;
max-width: 400px;
height: auto;
margin: 24px auto;
padding: 16px 8px;
box-sizing: border-box;
}
.login-container h1 {
font-size: 1.5em;
text-align: center;
}
.tickets-container h1 {
font-size: 1.5em;
text-align: center;
}
.login-container form,
.login-container label,
.login-container input {
width: 100%;
max-width: 100%;
box-sizing: border-box;
}
.login-container button,
.login-container a {
width: 100%;
max-width: 100%;
margin-top: 8px;
text-align: center;
box-sizing: border-box;
}
#nav-toggle-btn {
display: block;
background: none;
border: none;
font-size: 2em;
cursor: pointer;
margin: 0 auto 8px auto;
transition: transform 0.2s;
}
.nav-links {
display: none;
flex-direction: column;
align-items: center;
width: 100%;
transition: max-height 0.3s ease;
overflow: hidden;
}
.nav-links.open {
display: flex;
}
#nav-toggle-btn.open {
transform: rotate(180deg);
}
}
@media (min-width: 601px) {
.mobile-only {
display: none !important;
}
.desktop-only {
display: block !important;
}
#nav-toggle-btn {
display: none;
}
.nav-links {
display: flex !important;
flex-direction: row;
align-items: center;
width: auto;
gap: 32px;
}
.nav-links .links {
margin: 0 12px;
}
}

300
CSS/style_.css Normal file
View File

@@ -0,0 +1,300 @@
/*
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 : 01.04.2016, 15:39:10
Author : reich
*/
*, *:before, *:after {
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
box-sizing: border-box;
}
#wrapper {
max-width: 600px;
margin: 0 auto;
background-color: #4d4d4d;
padding: 10px;
color: white;
}
h2 {
margin-top: 30px;
}
h1 {
margin: 10px;
color: #4d4d4d;
font-size: 30px;
}
h1 span {
/*color: #09add0;*/
color: orange;
font-size: 40px;
}
a {
text-decoration: none;
color: orange;
}
a:hover {
text-decoration: none;
color: white;
}
nav ul {
list-style-type: none;
padding: 0;
display: inline-block;
}
nav li {
float: left;
text-align: center;
}
nav li a {
display: block;
width: 100px;
height: 30px;
border: 1px solid #4d4d4d;
background-color: #4d4d4d;
color: white;
text-decoration: none;
margin: 5px;
text-align: center;
vertical-align: middle;
line-height: 30px;
}
nav li a:hover {
background-color: lightskyblue;
}
nav {
position: fixed;
background: white;
top: 0px;
margin-left: -10px;
width: 600px;
text-align: center;
padding: 10px;
}
main {
margin-top: 145px;
}
.nav_back {
float: right;
margin-right: 10px;
}
.articleImg {
width: 200px;
float: left;
border: 2px solid lightskyblue;
padding: 5px;
margin: 5px 10px 5px 5px;
}
.articleInfo {
font-weight: bold;
}
label {
width: 80px;
display: inline-block;
margin: 5px;
vertical-align: top;
}
label.errorMsg {
width: 380px;
display: inline-block;
margin: 5px;
vertical-align: top;
text-align: right;
color: orange;
}
input {
width: 300px;
}
input[type="submit"] {
width: 100px;
margin-right: 6px;
}
#entry {
width: 300px;
height: 150px;
margin-bottom: 10px;
}
form {
width: 400px;
}
#metanavi {
color: #4d4d4d;
font-weight: bold;
margin-bottom: 5px;
}
#metanavi a {
background: #09add0;
border: none;
width: 100px;
margin: 0 5px 0 5px;
float: right;
padding: 2px;
border-radius: 5px;
color:#fff;
cursor:pointer;
font-size: 12px;
text-decoration: none;
text-align: center;
}
#metanavi a:hover {
background: orange;
}
#signup form {
padding: 20px 0 60px;
}
#signup p {
margin: 0 0 5px 0;
}
#signup {
margin: auto;
width: 450px;
}
#signup ol {
list-style-type: none;
padding: 0;
margin: 0;
}
#signup li {
margin: 0 0 20px;
position: relative;
}
#signup label {
width: 150px;
display: inline-block;
vertical-align: top;
text-align: right;
padding-right: 15px;
font-weight: 500;
line-height: 24px;
}
#signup span {
margin-top: 10px;
width: 400px;
color: orange;
text-align: right;
display: inline-block;
}
#signup input {
display: inline-block;
width: 250px;
border: 1px solid #aaa;
padding: 6px 10px 6px 6px;
-webkit-border-radius: 5px;
-moz-border-radius: 5px;
border-radius: 5px;
font-size: 12px;
}
#signup input[type="submit"]{
background: #09add0;
border:none;
width:180px;
margin-left: 230px;
padding:5px;
border-radius:5px;
color:#fff;
font-weight:bold;
cursor:pointer;
font-size: 16px;
}
#signup input[type="submit"]:hover {
background: orange;
}
#signup label.errorMsg {
width: 400px;
padding:5px 5px 5px 0;
color: orange;
}
.autherIcons i {
margin: 0 5px 0 5px;
color: orange;
}
.autherIcons i:hover {
color: white;
}
/*** Formulare ***/
form {
width: 440px;
margin: auto;
}
label {
width: 120px;
display: inline-block;
margin: 5px 15px 10px 0;
vertical-align: top;
text-align: right;
}
label.errorMsg {
width: 420px;
display: inline-block;
margin: 0 5px 15px 0;
vertical-align: top;
text-align: right;
color: orange;
}
input {
width: 300px;
}
input[type="submit"] {
width: 100px;
margin-left: 330px;
}
form textarea {
width: 300px;
height: 150px;
margin-bottom: 10px;
}
form select {
width: 300px;
}

66
CSS/style_columns.css Normal file
View File

@@ -0,0 +1,66 @@
/*
Created on : 04.01.2018, 04:54:54
Author : reich
*/
/*** 12 spaltiges Grid mit Flexboxen ***/
/*** Container ***/
.row {
display: flex;
flex-flow: row;
flex-wrap: wrap;
}
/*** Spaltendefinitionen Smartphone Ansicht ***/
@media (max-width: 529px) {
.col-s-12 {
flex: 0 0 100%;
}
/*** Loesung Workshop-Seite ***/
.textContent {
padding: 15px 0 0 0;
}
}
/*** Spaltendefinitionen Tablet Ansicht ***/
@media (min-width: 530px) {
.col-m-1 {
flex: 0 0 100%;
}
.col-m-4 {
flex: 0 0 33.3333333%;
}
.col-m-6 {
flex: 0 0 50%;
}
.col-m-12 {
flex: 0 0 100%;
}
}
/*** Spaltendefinitionen Desktop Ansicht ***/
@media (min-width: 800px) {
.col-1 {
flex: 0 0 8.3333333%;
}
.col-3 {
flex: 0 0 25%;
}
.col-4 {
flex: 0 0 33.3333333%;
}
.col-5 {
flex: 0 0 41.6666667%;
}
.col-6 {
flex: 0 0 50%;
}
.col-8 {
flex: 0 0 66.66666667%;
}
.col-12 {
flex: 0 0 100%;
}
}

View File

@@ -0,0 +1,56 @@
<?php
namespace Blog\Controller;
use Blog\Model\ContactModel;
class ContactController
{
protected $view;
private $db;
private $validData = array();
private $errors = array();
private $labels = array("name" => "Name", "email" => "E-Mail-Adresse", "content" => "Nachricht");
public function __construct($view)
{
$this->db = new ContactModel();
$this->view = $view;
}
public function showContactForm()
{
$this->view->setVars([
'labels' => $this->labels,
'validData' => $this->validData,
'errors' => $this->errors
]);
}
public function showConfirmation()
{
}
public function validateForm(){
foreach ($this->labels as $index => $value) {
if (!isset($_POST[$index]) || empty($_POST[$index])) {
$this->errors[$index] = "Bitte " . $value . " angeben";
} else {
$this->validData[$index] = $_POST[$index];
}
}
if (count($this->errors) > 0) {
$this->view->setDoMethodName("showContactForm");
$this->showContactForm();
} else {
if ($this->db->writeContactData($this->validData)) {
$this->view->setDoMethodName("showConfirmation");
$this->showConfirmation();
}
}
}
}
?>

View File

@@ -0,0 +1,12 @@
<?php
namespace Blog\Controller;
class LoginController {
function showLoginPage(){
}
function showPasswortVergessen(){
}
}

View File

@@ -0,0 +1,10 @@
<?php
namespace Blog\Controller;
class ProfileController {
function showProfile()
{
}
}

View File

@@ -0,0 +1,10 @@
<?php
namespace Blog\Controller;
class RegisterController {
function showRegisterPage()
{
}
}

View File

@@ -0,0 +1,10 @@
<?php
namespace Blog\Controller;
class TicketsController {
function showTickets()
{
}
}

View File

@@ -0,0 +1,18 @@
<?php
namespace Blog\Controller;
class WelcomeController
{
function showWelcome() {
}
function showProjects() {
}
function showTutorials() {
}
}

25
Library/ErrorMsg.php Normal file
View File

@@ -0,0 +1,25 @@
<?php
namespace Blog\Library;
use Blog\Library\View;
class ErrorMsg
{
protected $view;
public function __construct($msg = 'Ihre Anfrage konnte nicht verarbeitet werden', $ex = '')
{
$this->view = new View(dirname(__DIR__).DIRECTORY_SEPARATOR.'Views'
, 'Error', 'showErrMsg');
$this->view->setVars([
'error' => $msg,
'debug' => $ex
]);
$this->view->render();
}
}

58
Library/View.php Normal file
View File

@@ -0,0 +1,58 @@
<?php
namespace Blog\Library;
class View
{
protected $path, $controller, $do, $vars = [];
/**
* @param string $path Basepath of the views.
* @param string $controllerName Current controller.
* @param string $doMethodName Current action.
*/
public function __construct($path, $controllerName, $doMethodName)
{
$this->path = $path;
$this->controller = $controllerName;
$this->do = $doMethodName;
}
/**
* Set view vars. The keys will be added, to existing keys.
*
* @param array $vars
*/
public function setVars(array $vars)
{
foreach ($vars as $key => $val) {
$this->vars[$key] = $val;
}
}
public function setDoMethodName($doMethodName)
{
$this->do = $doMethodName;
}
/**
* Render the view.
*
* @throws NotFoundException
*/
public function render()
{
$fileName = $this->path.DIRECTORY_SEPARATOR.$this->controller.DIRECTORY_SEPARATOR.$this->do.'.phtml';
if (!file_exists($fileName)) {
echo "Fehler: Datei " . $fileName . " existiert nicht";
exit();
}
// spare the view the bloat of using "$this->vars[]" for every variable
foreach ($this->vars as $key => $val) {
$$key = $val; //Variable Variablen siehe http://php.net/manual/de/language.variables.variable.php
}
include $fileName;
}
}

31
Model/ContactModel.php Normal file
View File

@@ -0,0 +1,31 @@
<?php
namespace Blog\Model;
use PDOException;
class ContactModel extends Database
{
public function writeContactData($values)
{
$guid = $this->createUUID();
$sql = "INSERT INTO contact (`id`, `name`, `email`, `content`) VALUES (
:guid, :name, :email, :content);";
$pdo = $this->linkDB();
try {
$sth = $pdo->prepare($sql);
$sth->execute(array(":guid" => $guid,
":name" => $values["name"],
":email" => $values["email"],
":content" => $values["content"]));
} catch (PDOException $e) {
new \Blog\Library\ErrorMsg("Fehler beim Schreiben der Daten.", $e);
die;
}
return true;
}
}

49
Model/Database.php Normal file
View File

@@ -0,0 +1,49 @@
<?php
namespace Blog\Model;
use PDO;
use PDOException;
abstract class Database {
/**
* Zugangsdaten für die Datenbank
*/
private $dbName = "pbbfa23csc_bibarts"; //Datenbankname
private $linkName = "localhost"; //Datenbank-Server
private $user = "pbbfa23csc"; //Benutzername
private $pw = "gfDVACEQ9BZr"; //Passwort
/**
* Stellt eine Verbindung zur Datenbank her
*
* @return PDO Gibt eine Datenbankverbindung zurueck
*/
public function linkDB() {
try {
$pdo = new PDO("mysql:dbname=$this->dbName;host=$this->linkName"
, $this->user
, $this->pw
, array(PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION));
return $pdo;
} catch (PDOException $e) {
new \Blog\Library\ErrorMsg("Verbindung konnte nicht aufgebaut werden.", $e);
die;
}
}
/**
* Zum serverseitigen generieren einer UUID
*
* @return string Liefert eine UUID
*/
public function createUUID()
{
$data = openssl_random_pseudo_bytes(16);
$data[6] = chr(ord($data[6]) & 0x0f | 0x40);
$data[8] = chr(ord($data[8]) & 0x3f | 0x80);
return vsprintf('%s%s-%s-%s-%s-%s%s%s', str_split(bin2hex($data), 4));
}
}

View File

@@ -1,3 +1,5 @@
# Bib-Arts
EIA Projekt
EIA Projekt
Viktor stink

View File

@@ -0,0 +1,11 @@
<?php
include dirname(__DIR__).'/header.phtml';
?>
<h2><?=$error?></h2>
<p><?=$debug?></p>
<?php include dirname(__DIR__).'/footer.phtml'; ?>

View File

@@ -0,0 +1,20 @@
<div class="inhalt">
<div class="login-container">
<h1>Anmelden</h1>
<form class="form-horizontal" action="#" method="post">
<label>
<input class="input-email" type="text" placeholder="E-Mail">
</label>
</form>
<form class="form-horizontal" action="#" method="post">
<label>
<input class="input-passwort" type="text" placeholder="Passwort">
</label>
</form>
<button class="button-loggin">Login</button>
<a class="link-passwort-vergessen" href="?controller=Login&do=showPasswortVergessen">Passwort vergessen?</a>
<a class="link-konto-erstellen" href="?controller=Register&do=showRegisterPage">Konto erstellen</a>
</div>
</div>

View File

View File

View File

@@ -0,0 +1,64 @@
<div class="inhalt">
<div class="login-container">
<h1>Registrieren</h1>
<form class="form-horizontal" action="#" method="post">
<label>
<input class="input-vorname" type="text" placeholder="Vorname">
</label>
</form>
<form class="form-horizontal" action="#" method="post">
<label>
<input class="input-nachname" type="text" placeholder="Nachname">
</label>
</form>
<form class="form-horizontal" action="#" method="post">
<label>
<input class="input-email" type="text" placeholder="E-Mail">
</label>
</form>
<form class="form-horizontal" action="#" method="post">
<label>
<input class="input-passwort" type="text" placeholder="Passwort">
</label>
</form>
<form class="form-horizontal" action="#" method="post">
<label>
<input class="input-passwort-repeat" type="text" placeholder="Passwort wiederholen">
</label>
</form>
<form class="form-horizontal" action="#" method="post">
<label>
<input class="input-strasse" type="text" placeholder="Straße">
</label>
</form>
<form class="form-horizontal" action="#" method="post">
<label>
<input class="input-hausnr" type="text" placeholder="Hausnr.">
</label>
</form>
<form class="form-horizontal" action="#" method="post">
<label>
<input class="input-postleitzahl" type="text" placeholder="Postleitzahl">
</label>
</form>
<form class="form-horizontal" action="#" method="post">
<label>
<input class="input-ort" type="text" placeholder="Ort">
</label>
</form>
<form class="form-horizontal" action="#" method="post">
<label>
<input class="input-land" type="text" placeholder="Land">
</label>
</form>
<form class="form-horizontal" action="#" method="post">
<label>
<input class="input-tel" type="text" placeholder="Telefonnr.">
</label>
</form>
<button class="button-register">Registrieren</button>
<a class="link-konto-erstellen" href="?controller=Login&do=showLoginPage">Login</a>
</div>
</div>

View File

@@ -0,0 +1,8 @@
<div class="inhalt">
<div class="tickets-container">
<h1>Tickets</h1>
<div class="tickets-container-inhalt">
</div>
</div>
</div>

13
Views/footer.phtml Normal file
View File

@@ -0,0 +1,13 @@
<div id="footer">
<div class="container-zahlungsmittel">
<h2 class="header-zahlungsarten">Mögliche Zahlungsarten</h2>
<div class="zahlungsmittel-img"></div>
</div>
<div class="line"></div>
<a class="link-impressum">Impressum</a>
<a class="link-datenschutz">Datenschutz</a>
<a class="link-nutzungsbedingungen">Nutzungsbedingungen</a>
<span class="text-bib">© bib arts GmbH</span>
</div>
</body>
</html>

36
Views/header.phtml Normal file
View File

@@ -0,0 +1,36 @@
<!DOCTYPE html>
<html lang="HTML-5">
<head>
<title>VR Contact</title>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link href="CSS/style.css" rel="stylesheet" type="text/css" />
</head>
<body>
<nav id="navigation">
<div class="link-container">
<div id="logo" ><a class="link-logo" href="#"></a></div>
<button id="nav-toggle-btn" aria-label="Menü ein-/ausklappen">&#9660;</button>
<div class="nav-links">
<a id="link-tickets" class="links" href="?controller=Tickets&do=showTickets">Tickets</a>
<a id="link-infos" class="links" href="?controller=Welcome&do=showWelcome">Infos</a>
<a id="link-profil" class="links" href="?controller=Profile&do=showProfile">Profil</a>
<a id="link-login" class="links" href="?controller=Login&do=showLoginPage">Login</a>
<a id="link-register" class="links" href="?controller=Register&do=showRegisterPage">Register</a>
<div id="profile-picture"></div>
</div>
</div>
</nav>
<script>
document.addEventListener('DOMContentLoaded', function() {
var btn = document.getElementById('nav-toggle-btn');
var links = document.querySelector('.nav-links');
if (btn && links) {
btn.addEventListener('click', function() {
links.classList.toggle('open');
btn.classList.toggle('open');
btn.innerHTML = links.classList.contains('open') ? '&#9650;' : '&#9660;';
});
}
});
</script>

30
contact.sql Normal file
View File

@@ -0,0 +1,30 @@
-- phpMyAdmin SQL Dump
-- version 4.5.1
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Erstellungszeit: 24. Nov 2017 um 17:01
-- Server-Version: 10.1.16-MariaDB
-- PHP-Version: 7.0.9
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
--
-- Datenbank: `blog`
--
-- --------------------------------------------------------
CREATE TABLE `contact` (
`id` varchar(36) NOT NULL,
`topicCode` tinyint(2) NULL,
`name` varchar(200) NOT NULL,
`email` varchar(300) NOT NULL,
`phone` varchar(16) NULL,
`content` varchar(500) NOT NULL,
`created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
ALTER TABLE `contact`
ADD PRIMARY KEY (`id`)

BIN
images/Zahlungsmittel.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 855 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 MiB

BIN
images/bibArts.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

50
index.php Normal file
View File

@@ -0,0 +1,50 @@
<?php
session_start();
include 'Views/header.phtml';
?>
<div id="wrapper">
<?php
spl_autoload_register(function ($className) {
if (substr($className, 0, 5) !== 'Blog\\') {
// not our business
return;
}
$fileName = __DIR__.'/'.str_replace('\\', DIRECTORY_SEPARATOR, substr($className, 5)).'.php';
if (file_exists($fileName)) {
include $fileName;
}
});
$controllerName = "";
$doMethodName = "";
if ($_SERVER["REQUEST_METHOD"] == "POST") {
$controllerName = isset($_POST['controller']) && $_POST['controller'] ? $_POST['controller'] : "Welcome";
$doMethodName = isset($_POST['do']) && $_POST['do'] ? $_POST['do'] : "showWelcome";
} else {
$controllerName = isset($_GET['controller']) && $_GET['controller'] ? $_GET['controller'] : "Welcome";
$doMethodName = isset($_GET['do']) && $_GET['do'] ? $_GET['do'] : "showWelcome";
}
$controllerClassName = 'Blog\\Controller\\'.ucfirst($controllerName).'Controller';
if (method_exists($controllerClassName, $doMethodName)) {
$view = new \Blog\Library\View(__DIR__.DIRECTORY_SEPARATOR.'Views'
, ucfirst($controllerName), $doMethodName);
$controller = new $controllerClassName($view);
$controller->$doMethodName();
$view->render();
} else {
new \Blog\Library\ErrorMsg('Page not found: '.$controllerClassName.'::'.$doMethodName);
}
?>
</div>
<?php
include 'Views/footer.phtml';
?>