Compare commits

..

No commits in common. "555b475b6915783fcd0ffabc3c352d3235118fa0" and "1826e9f61bb3738f036af881c435d14830e992c2" have entirely different histories.

4 changed files with 0 additions and 103 deletions

View File

@ -18,18 +18,6 @@ class BenutzerController
$this->db = new BenutzerModel(); $this->db = new BenutzerModel();
} }
public function getBenutzer($id) {
$result = $this->db->selectBenutzer($id);
if ($id !== false) {
if ($result)
$result = $result[0];
else
$result = false;
}
return json_encode($result);
}
// Updated einen Benutzer // Updated einen Benutzer
public function updateBenutzer($elternId, $data) public function updateBenutzer($elternId, $data)
{ {
@ -56,13 +44,6 @@ class BenutzerController
return json_encode($result); return json_encode($result);
} }
public function anmeldeVersuch()
{
$result = $this->db->anmeldeVersuch();
return json_encode($result);
}
} }
?> ?>

View File

@ -33,11 +33,5 @@ class TagesplanController
$result = $this->db->deleteTagesplan($id); $result = $this->db->deleteTagesplan($id);
return json_encode($result); return json_encode($result);
} }
public function getGerichteOnTag()
{
$result = $this->db->getGerichteOnTag();
return json_encode($result);
}
} }
?> ?>

View File

@ -9,31 +9,6 @@ use ppb\Library\Msg;
class BenutzerModel extends Database class BenutzerModel extends Database
{ {
public function selectBestellung($id)
{
$pdo = $this->linkDB();
$params = array();
$sql = "SELECT FROM Benutzer WHERE id = :id";
$params["id"] = $id;
//Ausführen des SQL befehls
try {
$stmt = $pdo->prepare($sql);
$stmt->execute($params);
} catch (\PDOException $e) {
echo $e;
return false;
}
$result = $stmt->fetchAll(\PDO::FETCH_ASSOC);
//Die Datensätze werden nummeriert
foreach ($result as $key => $row) {
$result[$key]["id"] += 0;
}
return $result;
}
/** /**
@ -111,7 +86,6 @@ class BenutzerModel extends Database
$stmt = $pdo->prepare($sql); $stmt = $pdo->prepare($sql);
$stmt->execute($params); $stmt->execute($params);
} catch (\PDOException $e) { } catch (\PDOException $e) {
echo "Faulty Sql? " . $sql;
return false; return false;
} }
@ -131,7 +105,6 @@ class BenutzerModel extends Database
$stmt = $pdo->prepare($sql); $stmt = $pdo->prepare($sql);
$stmt->execute(); $stmt->execute();
} catch (\PDOException $e) { } catch (\PDOException $e) {
echo "Faulty Sql? " . $sql;
return false; return false;
} }
@ -140,34 +113,6 @@ class BenutzerModel extends Database
return $result; return $result;
} }
public function anmeldeVersuch()
{
$pdo = $this->linkDB();
$params = array();
$params[":Benutzername"] = $_GET["Benutzername"];
$params[":passwort"] = $_GET["passwort"];
$sql = "SELECT * FROM Benutzerkonto WHERE name = :Benutzername AND passwort = :passwort";
try {
$stmt = $pdo->prepare($sql);
$stmt->execute($params);
} catch (\PDOException $e) {
return false;
}
$result = $stmt->fetchALL(\PDO::FETCH_ASSOC);
if (count($result) > 0)
return true;
else
return false;
}
} }
?> ?>

View File

@ -65,28 +65,5 @@ class TagesplanModel extends Database
return false; return false;
} }
} }
public function getGerichteOnTag()
{
$pdo = $this->linkDB();
$datum = $_GET["datum"];
$sql = "SELECT Gericht.id, Gericht.name, Gericht.preis, Gericht.beschreibung FROM Gericht LEFT JOIN GibtsAm ON Gericht.id = GibtsAm.gid LEFT JOIN Tagesplan ON GibtsAm.tid = Tagesplan.id WHERE Tagesplan.datum = '$datum'";
try {
$stmt = $pdo->prepare($sql);
$stmt->execute();
} catch (\PDOException $e) {
echo $sql . " This do be faulty";
return false;
}
$result = $stmt->fetchAll(\PDO::FETCH_ASSOC);
return $result;
}
} }
?> ?>