3 Commits

26 changed files with 115 additions and 162 deletions

6
.idea/sqldialects.xml generated
View File

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

View File

@@ -23,8 +23,8 @@ class GutscheinController {
$data = [
'code' => $_POST['code'] ?? null,
'rabatt' => $_POST['rabatt'] ?? null,
'eventid' => $_POST['eventid'] ?? null,
'gültigkeit' => $_POST['gültigkeit'] ?? null
'ausstellungid' => $_POST['ausstellungid'] ?? null,
'gueltigkeit' => $_POST['gueltigkeit'] ?? null
];
$erg = $this->model->createGutschein($data);
$this->view->setVars(['gutschein' => $erg]);
@@ -44,8 +44,8 @@ class GutscheinController {
$data = [
'code' => $_POST['code'] ?? null,
'rabatt' => $_POST['rabatt'] ?? null,
'eventid' => $_POST['eventid'] ?? null,
'gültigkeit' => $_POST['gültigkeit'] ?? null
'ausstellungid' => $_POST['ausstellungid'] ?? null,
'gueltigkeit' => $_POST['gueltigkeit'] ?? null
];
$this->model->updateGutschein($id, $data);
}

View File

@@ -21,9 +21,9 @@ class StandortController {
public function createStandort() {
$data = [
'straße' => $_POST['straße'],
'strasse' => $_POST['strasse'],
'hausnr' => $_POST['hausnr'],
'postleitzahl' => $_POST['postleitzahl'],
'plz' => $_POST['plz'],
'ort' => $_POST['ort'],
'land' => $_POST['land'],
'tel' => $_POST['tel'],
@@ -40,17 +40,17 @@ class StandortController {
}
public function updateStandort() {
$id = $_POST['standortid'];
$data = [
'straße' => $_POST['straße'],
'strasse' => $_POST['strasse'],
'hausnr' => $_POST['hausnr'],
'postleitzahl' => $_POST['postleitzahl'],
'plz' => $_POST['plz'],
'ort' => $_POST['ort'],
'land' => $_POST['land'],
'tel' => $_POST['tel'],
'email' => $_POST['email']
];
$erg = $this->model->updateStandort($id, $data);
$standortid = $_POST['standortid'];
$erg = $this->model->updateStandort($standortid, $data);
$this->view->setVars(['standort' => $erg]);
}

View File

@@ -22,9 +22,9 @@ class TicketController {
public function buyTicket() {
$data = [
'userid' => $_POST['userid'],
'eventid' => $_POST['eventid'],
'ausstellungid' => $_POST['ausstellungid'],
'kaufdatum' => date('Y-m-d'),
'gültigkeitsdatum' => $_POST['gültigkeitsdatum']
'gueltigkeit' => $_POST['gueltigkeit']
];
$erg = $this->ticketModel->buyTicket($data);
$this->view->setVars(['ticket' => $erg]);

View File

@@ -8,7 +8,7 @@ class GutscheinModel extends Database {
public function getGutscheine() {
$pdo = $this->linkDB();
$sql = "SELECT * FROM gutschein ORDER BY gültigkeit DESC;";
$sql = "SELECT * FROM gutschein ORDER BY gueltigkeit DESC;";
try {
$sth = $pdo->prepare($sql);
$sth->execute();
@@ -35,12 +35,12 @@ class GutscheinModel extends Database {
public function createGutschein($data) {
$pdo = $this->linkDB();
$sql = "INSERT INTO gutschein (code, rabatt, eventid, gültigkeit) VALUES (:code, :rabatt, :eventid, :gültigkeit);";
$sql = "INSERT INTO gutschein (code, rabatt, ausstellungid, gueltigkeit) VALUES (:code, :rabatt, :ausstellungid, :gueltigkeit);";
$params = [
":code" => $data['code'],
":rabatt" => $data['rabatt'],
":eventid" => $data['eventid'],
":gültigkeit" => $data['gültigkeit']
":ausstellungid" => $data['ausstellungid'],
":gueltigkeit" => $data['gueltigkeit']
];
try {
$sth = $pdo->prepare($sql);
@@ -54,12 +54,12 @@ class GutscheinModel extends Database {
public function updateGutschein($id, $data) {
$pdo = $this->linkDB();
$sql = "UPDATE gutschein SET code = :code, rabatt = :rabatt, eventid = :eventid, gültigkeit = :gültigkeit WHERE gutscheinid = :id;";
$sql = "UPDATE gutschein SET code = :code, rabatt = :rabatt, ausstellungid = :ausstellungid, gueltigkeit = :gueltigkeit WHERE gutscheinid = :id;";
$params = [
":code" => $data['code'],
":rabatt" => $data['rabatt'],
":eventid" => $data['eventid'],
":gültigkeit" => $data['gültigkeit'],
":ausstellungid" => $data['ausstellungid'],
":gueltigkeit" => $data['gueltigkeit'],
":id" => $id
];
try {

View File

@@ -35,12 +35,12 @@ class StandortModel extends Database {
public function createStandort($data) {
$pdo = $this->linkDB();
$sql = "INSERT INTO Standort (straße, hausnr, postleitzahl, ort, land, tel, email)
VALUES (:straße, :hausnr, :postleitzahl, :ort, :land, :tel, :email);";
$sql = "INSERT INTO Standort (strasse, hausnr, plz, ort, land, tel, email)
VALUES (:strasse, :hausnr, :plz, :ort, :land, :tel, :email);";
$params = [
":straße" => $data['straße'],
":strasse" => $data['strasse'],
":hausnr" => $data['hausnr'],
":postleitzahl" => $data['postleitzahl'],
":plz" => $data['plz'],
":ort" => $data['ort'],
":land" => $data['land'],
":tel" => $data['tel'],
@@ -59,18 +59,18 @@ class StandortModel extends Database {
public function updateStandort($standortid, $data) {
$pdo = $this->linkDB();
$sql = "UPDATE Standort SET
straße = :straße,
strasse = :strasse,
hausnr = :hausnr,
postleitzahl = :postleitzahl,
plz = :plz,
ort = :ort,
land = :land,
tel = :tel,
email = :email
WHERE standortid = :standortid;";
$params = [
":straße" => $data['straße'],
":strasse" => $data['strasse'],
":hausnr" => $data['hausnr'],
":postleitzahl" => $data['postleitzahl'],
":plz" => $data['plz'],
":ort" => $data['ort'],
":land" => $data['land'],
":tel" => $data['tel'],

View File

@@ -21,13 +21,13 @@ class TicketModel extends Database {
public function buyTicket($data) {
$pdo = $this->linkDB();
$sql = "INSERT INTO Ticket (userid, eventid, kaufdatum, gültigkeitsdatum)
VALUES (:userid, :eventid, :kaufdatum, :gültigkeitsdatum);";
$sql = "INSERT INTO Ticket (userid, ausstellungid, kaufdatum, gueltigkeit)
VALUES (:userid, :ausstellungid, :kaufdatum, :gueltigkeit);";
$params = [
":userid" => $data['userid'],
":eventid" => $data['eventid'],
":ausstellungid" => $data['ausstellungid'],
":kaufdatum" => $data['kaufdatum'],
":gültigkeitsdatum" => $data['gültigkeitsdatum']
":gueltigkeit" => $data['gueltigkeit']
];
try {
$sth = $pdo->prepare($sql);
@@ -39,12 +39,12 @@ class TicketModel extends Database {
}
}
public function hasTicket($userid, $eventid) {
public function hasTicket($userid, $ausstellungid) {
$pdo = $this->linkDB();
$sql = "SELECT COUNT(*) as count FROM Ticket WHERE userid = :userid AND eventid = :eventid;";
$sql = "SELECT COUNT(*) as count FROM Ticket WHERE userid = :userid AND ausstellungid = :ausstellungid;";
$params = [
":userid" => $userid,
":eventid" => $eventid
":ausstellungid" => $ausstellungid
];
try {
$sth = $pdo->prepare($sql);

View File

@@ -1,12 +1,10 @@
<?php
include dirname(__DIR__).'/header.phtml';
?>
<div class="msg">
<p>Ihre Anfrage wurde erfolgreich versendet.</p>
<a href="?controller=Welcome&do=showWelcome">Weiter</a>
</div>
<?php include dirname(__DIR__).'/footer.phtml'; ?>
<?php
include dirname(__DIR__).'/footer.phtml';
?>

View File

@@ -2,8 +2,6 @@
include dirname(__DIR__).'/header.phtml';
?>
<h2>Ihre Anfrage an uns</h2>
<form method="post">

View File

@@ -7,6 +7,6 @@ include dirname(__DIR__).'/header.phtml';
<a href="?controller=Event&do=showEvents">Weiter</a>
</div>
<?php include dirname(__DIR__).'/footer.phtml'; ?>
<?php
include dirname(__DIR__).'/footer.phtml';
?>

View File

@@ -7,6 +7,6 @@ include dirname(__DIR__).'/header.phtml';
<a href="?controller=Event&do=showEvents">Weiter</a>
</div>
<?php include dirname(__DIR__).'/footer.phtml'; ?>
<?php
include dirname(__DIR__).'/footer.phtml';
?>

View File

@@ -1,7 +1,7 @@
<?php include dirname(__DIR__) . '/header.phtml'; ?>
<?php
include dirname(__DIR__).'/header.phtml';
?>
<h2>Alle Ausstellungen</h2>
<?php if (!empty($events)): ?>
<table>
<thead>
@@ -28,5 +28,6 @@
<?php else: ?>
<p>Derzeit sind keine Ausstellungen verfügbar.</p>
<?php endif; ?>
<?php include dirname(__DIR__) . '/footer.phtml'; ?>
<?php
include dirname(__DIR__).'/footer.phtml';
?>

View File

@@ -7,6 +7,6 @@ include dirname(__DIR__).'/header.phtml';
<a href="?controller=Event&do=showEvents">Weiter</a>
</div>
<?php include dirname(__DIR__).'/footer.phtml'; ?>
<?php
include dirname(__DIR__).'/footer.phtml';
?>

View File

@@ -1 +1,7 @@
echo "create gutschein"
<?php
include dirname(__DIR__).'/header.phtml';
?>
<!-- Gutschein-Erstellungsformular oder Inhalt hier einfügen -->
<?php
include dirname(__DIR__).'/footer.phtml';
?>

View File

@@ -1,5 +1,6 @@
<?php include dirname(__DIR__) . '/header.phtml'; ?>
<?php
include dirname(__DIR__).'/header.phtml';
?>
<h2>Alle Gutscheine</h2>
<a href="?controller=Gutschein&do=createGutscheinForm">Neuen Gutschein anlegen</a>
<?php if (!empty($gutscheine)): ?>
@@ -18,8 +19,8 @@
<tr>
<td><?php echo htmlspecialchars($g['code']); ?></td>
<td><?php echo (int)$g['rabatt']; ?></td>
<td><?php echo (int)$g['eventid']; ?></td>
<td><?php echo htmlspecialchars($g['gültigkeit']); ?></td>
<td><?php echo (int)$g['ausstellungid']; ?></td>
<td><?php echo htmlspecialchars($g['gueltigkeit']); ?></td>
<td>
<a href="?controller=Gutschein&action=editGutscheinForm&id=<?php echo $g['gutscheinid']; ?>">Bearbeiten</a> |
<a href="?controller=Gutschein&action=deleteGutschein&id=<?php echo $g['gutscheinid']; ?>" onclick="return confirm('Wirklich löschen?');">Löschen</a>
@@ -31,5 +32,6 @@
<?php else: ?>
<p>Keine Gutscheine vorhanden.</p>
<?php endif; ?>
<?php include dirname(__DIR__) . '/footer.phtml'; ?>
<?php
include dirname(__DIR__).'/footer.phtml';
?>

View File

@@ -1,12 +1,3 @@
<!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>
<?php
include dirname(__DIR__) . '/header.phtml';
?>
@@ -26,12 +17,9 @@ include dirname(__DIR__) . '/header.phtml';
<button class="button-loggin">Login</button>
<a class="link-passwort-vergessen">Passwort vergessen?</a>
<a class="link-konto-erstellen">Konto erstellen</a>
</div>
</div>
<?php
include dirname(__DIR__) . '/footer.phtml';
?>
<body>
</html>

View File

@@ -1,7 +1,7 @@
<?php include dirname(__DIR__) . '/header.phtml'; ?>
<?php
include dirname(__DIR__).'/header.phtml';
?>
<h2>Alle News</h2>
<?php if (!empty($news)): ?>
<table>
<thead>
@@ -24,5 +24,6 @@
<?php else: ?>
<p>Derzeit sind keine News verfügbar.</p>
<?php endif; ?>
<?php include dirname(__DIR__) . '/footer.phtml'; ?>
<?php
include dirname(__DIR__).'/footer.phtml';
?>

View File

@@ -1,12 +1,3 @@
<!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>
<?php
include dirname(__DIR__) . '/header.phtml';
?>
@@ -70,12 +61,9 @@ include dirname(__DIR__) . '/header.phtml';
</form>
<button class="button-register">Registrieren</button>
<a class="link-konto-erstellen">Login</a>
</div>
</div>
<?php
include dirname(__DIR__) . '/footer.phtml';
?>
<body>
</html>

View File

@@ -1,7 +1,7 @@
<?php include dirname(__DIR__) . '/header.phtml'; ?>
<?php
include dirname(__DIR__).'/header.phtml';
?>
<h2>Unsere Standorte</h2>
<?php if (!empty($standorte)): ?>
<table border="1" cellpadding="8" cellspacing="0">
<thead>
@@ -18,9 +18,9 @@
<tbody>
<?php foreach ($standorte as $standort): ?>
<tr>
<td><?php echo htmlspecialchars($standort['straße']); ?></td>
<td><?php echo htmlspecialchars($standort['strasse']); ?></td>
<td><?php echo htmlspecialchars($standort['hausnr']); ?></td>
<td><?php echo htmlspecialchars($standort['postleitzahl']); ?></td>
<td><?php echo htmlspecialchars($standort['plz']); ?></td>
<td><?php echo htmlspecialchars($standort['ort']); ?></td>
<td><?php echo htmlspecialchars($standort['land']); ?></td>
<td><?php echo htmlspecialchars($standort['tel']); ?></td>
@@ -32,5 +32,6 @@
<?php else: ?>
<p>Keine Standorte gefunden.</p>
<?php endif; ?>
<?php include dirname(__DIR__) . '/footer.phtml'; ?>
<?php
include dirname(__DIR__).'/footer.phtml';
?>

View File

@@ -7,6 +7,6 @@ include dirname(__DIR__).'/header.phtml';
<a href="?controller=Welcome&do=showWelcome">Weiter</a>
</div>
<?php include dirname(__DIR__).'/footer.phtml'; ?>
<?php
include dirname(__DIR__).'/footer.phtml';
?>

View File

@@ -1,11 +1,9 @@
<?php
include dirname(__DIR__).'/header.phtml';
?>
<article>
<h2>Virtuelles Museum</h2>
<span class="articleInfo">John Doe | 12.08.2018 um 10:18 Uhr</span>
<p>
<img class="articleImg" src="images/museum.jpg" alt="my Oculus Rift">
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. Curabitur pretium tincidunt lacus. Nulla gravida orci a odio.
@@ -18,4 +16,6 @@ include dirname(__DIR__).'/header.phtml';
Praesent ut quam.
</p>
</article>
<?php include dirname(__DIR__).'/footer.phtml'; ?>
<?php
include dirname(__DIR__).'/footer.phtml';
?>

View File

@@ -1,11 +1,9 @@
<?php
include dirname(__DIR__).'/header.phtml';
?>
<article>
<h2>Implement Controller</h2>
<span class="articleInfo">John Doe | 18.07.2018 um 18:43 Uhr</span>
<p>
<img class="articleImg" src="images/controller.jpg" alt="my Oculus Rift">
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. Curabitur pretium tincidunt lacus. Nulla gravida orci a odio.
@@ -18,4 +16,6 @@ include dirname(__DIR__).'/header.phtml';
Praesent ut quam.
</p>
</article>
<?php include dirname(__DIR__).'/footer.phtml'; ?>
<?php
include dirname(__DIR__).'/footer.phtml';
?>

View File

@@ -1,5 +1,3 @@
<!DOCTYPE html>
<html lang="HTML-5">
<?php
include dirname(__DIR__).'/header.phtml';
?>
@@ -12,5 +10,3 @@ include dirname(__DIR__).'/header.phtml';
<?php
include dirname(__DIR__).'/footer.phtml';
?>
</html>

View File

@@ -1,10 +1,3 @@
<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>
<div id="footer">
<div class="container-zahlungsmittel">
<h2 class="header-zahlungsarten">Mögliche Zahlungsarten</h2>
@@ -17,3 +10,4 @@
<span class="text-bib">© bib arts GmbH</span>
</div>
</body>
</html>

View File

@@ -1,10 +1,10 @@
<!DOCTYPE html>
<html lang="HTML-5">
<html lang="de">
<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" />
<link href="/bibarts/CSS/style.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="wrapper">
@@ -17,5 +17,4 @@
<div id="profile-picture"></div>
</div>
</nav>
</body>
</html>
</div>

View File

@@ -1,19 +1,6 @@
-- 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 User (