Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <div style="display:none;">
- <div id="inline_feed">
- <?php
- //error_reporting(0);
- // Formular bol odoslany
- if ($_SERVER['REQUEST_METHOD'] === 'POST' AND isset($_POST['filled'])) {
- // Zbierame data z formu
- $data = array(
- 'Vorname' => $_POST['Vorname'],
- 'Nachname' => $_POST['Nachname'],
- 'Firma' => $_POST['Firma'],
- 'E-Mail' => $_POST['E-Mail'],
- 'area' => $_POST['area'],
- 'filled' => $_POST['filled'],
- );
- // Checkovanie inputov ci su vyplnene
- $dataError = array();
- if (empty($data['Vorname'])) {
- $dataError['error_Vorname'] = '<div class="chybova">Fehler</div>';
- }
- if (empty($data['Nachname'])) {
- $dataError['error_Nachname'] = '<div class="chybova">Fehler</div>';
- }
- if (empty($data['Firma'])) {
- $dataError['error_Firma'] = '<div class="chybova">Fehler</div>';
- }
- if (empty($data['E-Mail'])) {
- $dataError['error_E-Mail'] = '<div class="chybova">Fehler</div>';
- }
- if (empty($data['area'])) {
- $dataError['error_area'] = '<div class="chybova">Fehler</div>';
- }
- // Mame error?
- if (count($dataError) == 0) {
- $zahlavie = "Content-Type: text/html; charset=UTF-8 \n";
- $message = '
- <table cellpadding="5" border="0">
- <tr>
- <td bgcolor="#f4f4f4">Vorname: <strong>'.$data['Vorname'].'</strong></td>
- </tr>
- <tr>
- <td bgcolor="#e6e6e6">Nachname: <strong>'.$data['Nachname'].'</strong></td>
- </tr>
- <tr>
- <td bgcolor="#f4f4f4">Firma: <strong>'.$data['Firma'].'</strong></td>
- </tr>
- <tr>
- <td bgcolor="#e6e6e6">E-Mail: <strong>'.$data['E-Mail'].'</strong></td>
- </tr>
- <tr bgcolor="#e6e6e6">
- <td><b>Vaša správa:</b></td>
- <td colspan="2">'.$data['area'].'</td>
- </tr>
- </table>';
- if (mail('[email protected]', 'Feedback', $message, $zahlavie, '[email protected]')) {
- echo '<div class="odoslane">Ihre Feedback wurde gesendet.</div>';
- } else {
- echo '<div class="neodoslane">Ein Fehler ist aufgetreten. Bitte versuchen Sie es später noch einmal.</div>';
- }
- }
- }
- if (!isset($_POST['filled']) OR !(count($dataError) == 0)) {
- ?>
- <form action="" method="POST">
- <label for="edit-submitted-vorname">Vorname: <span class="form-required" title="Dieses Feld wird benötigt.">*</span></label>
- <input type="text" name="Vorname" maxlength="128" />
- <?php if (isset($dataError) AND !(count($dataError) == 0) AND array_key_exists('error_Vorname', $dataError)) { echo $dataError['error_Vorname']; } ?>
- <label for="edit-submitted-nachname">Nachname: <span class="form-required" title="Dieses Feld wird benötigt.">*</span></label>
- <input type="text" name="Nachname" maxlength="128" />
- <?php if (isset($dataError) AND !(count($dataError) == 0) AND array_key_exists('error_Nachname', $dataError)) { echo $dataError['error_Nachname']; } ?>
- <label for="edit-submitted-firma">Firma: <span class="form-required" title="Dieses Feld wird benötigt.">*</span></label>
- <input type="text" name="Firma" maxlength="128" />
- <?php if (isset($dataError) AND !(count($dataError) == 0) AND array_key_exists('error_Firma', $dataError)) { echo $dataError['error_Firma']; } ?>
- <label for="edit-submitted-e-mail">E-Mail: <span class="form-required" title="Dieses Feld wird benötigt.">*</span></label>
- <input type="text" name="E-Mail" maxlength="128" />
- <?php if (isset($dataError) AND !(count($dataError) == 0) AND array_key_exists('error_E-Mail', $dataError)) { echo $dataError['error_E-Mail']; } ?>
- <label for="edit-submitted-feedback">Feedback: <span class="form-required" title="Dieses Feld wird benötigt.">*</span></label>
- <textarea name="area"></textarea>
- <?php if (isset($dataError) AND !(count($dataError) == 0) AND array_key_exists('error_area', $dataError)) { echo $dataError['error_area']; } ?>
- <div class="clear"> </div>
- <input type="submit" name="filled" value="Speichern" id="submitbtn" class="form-submit">
- </form>
- <?php
- }
- ?>
- </div>
- </div>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement