mirror of
https://github.com/p08dev/Bloggr.git
synced 2026-06-17 04:33:56 +02:00
Fixed error messages
This commit is contained in:
41
post.php
41
post.php
@ -101,17 +101,6 @@ require_once(__DIR__."/inc/head.php");
|
||||
}
|
||||
?>
|
||||
<?php
|
||||
foreach ($errors as $key=>$value):
|
||||
?>
|
||||
<span style="color: red;">
|
||||
<?= $value ?>
|
||||
</span><br>
|
||||
<?php
|
||||
endforeach;
|
||||
|
||||
if($success == true) {
|
||||
echo '<span style="color: green;">Post bearbeitet!</span><br>';
|
||||
}
|
||||
if ($action == 'view'):
|
||||
?>
|
||||
<div>
|
||||
@ -131,6 +120,15 @@ require_once(__DIR__."/inc/head.php");
|
||||
?>
|
||||
</div>
|
||||
<?php
|
||||
foreach ($errors as $key=>$value):
|
||||
?>
|
||||
<br><span style="color: red;">
|
||||
<?= $value ?>
|
||||
</span>
|
||||
<?php
|
||||
endforeach;
|
||||
?>
|
||||
<?php
|
||||
if ($auth->isLoggedIn()) {
|
||||
?>
|
||||
<p>
|
||||
@ -162,6 +160,15 @@ require_once(__DIR__."/inc/head.php");
|
||||
if ($action == 'new'):
|
||||
?>
|
||||
<h2>Neuer Beitrag</h2>
|
||||
<?php
|
||||
foreach ($errors as $key=>$value):
|
||||
?>
|
||||
<span style="color: red;">
|
||||
<?= $value ?>
|
||||
</span><br>
|
||||
<?php
|
||||
endforeach;
|
||||
?>
|
||||
<form action="<?= htmlspecialchars($_SERVER['REQUEST_URI']) ?>" method="post" class="clearfix">
|
||||
<label for="title">Titel</label>
|
||||
<input type="text" name="title" id="title" value="<?= (isset($_POST['title'])) ? htmlspecialchars($_POST['title']) : ''; ?>"><br>
|
||||
@ -175,6 +182,18 @@ require_once(__DIR__."/inc/head.php");
|
||||
if ($action == 'edit'):
|
||||
?>
|
||||
<h2>Beitrag Bearbeiten</h2>
|
||||
<?php
|
||||
if($success == true) {
|
||||
echo '<span style="color: green;">Post bearbeitet!</span><br>';
|
||||
}
|
||||
foreach ($errors as $key=>$value):
|
||||
?>
|
||||
<span style="color: red;">
|
||||
<?= $value ?>
|
||||
</span><br>
|
||||
<?php
|
||||
endforeach;
|
||||
?>
|
||||
<form action="<?= htmlspecialchars($_SERVER['REQUEST_URI']) ?>" method="post" class="clearfix">
|
||||
<label for="title">Titel</label>
|
||||
<input type="text" name="title" id="title" value="<?= (isset($data['title'])) ? $data['title'] : $ptitle; ?>"><br>
|
||||
|
||||
Reference in New Issue
Block a user