Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
932d5a28f0 | ||
|
|
d061738dc4 | ||
|
|
41d73aa05a |
13
.vscode/sftp.json.template
vendored
Normal file
13
.vscode/sftp.json.template
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
{
|
||||
"name": "Schrauben",
|
||||
"host": "rundkopfschlitzschrauben.de",
|
||||
"protocol": "ftp",
|
||||
"port": 21,
|
||||
"username": "youknowme",
|
||||
"password": "youknowme",
|
||||
"remotePath": "/html/schrauben/",
|
||||
"uploadOnSave": false,
|
||||
"useTempFile": false,
|
||||
"openSsh": false,
|
||||
"ignore": [".vscode", ".git", ".gitignore", ".project"]
|
||||
}
|
||||
146
index.php
146
index.php
@@ -25,13 +25,13 @@
|
||||
$array['4 mm'][] = array("4 x 5", "Messing");
|
||||
$array['4 mm'][] = array("4 x 10", "Vernickelt");
|
||||
$array['4 mm'][] = array("4 x 20", "Vernickelt");
|
||||
$array['4 mm'][] = array("4 x 25", "Stahl blank");
|
||||
$array['4 mm'][] = array("4 x 30", "Stahl blank");
|
||||
|
||||
$array['5 mm'][] = array("5 x 8", "Vernickelt");
|
||||
$array['5 mm'][] = array("5 x 8", "Gelb verzinkt, kadmiert");
|
||||
$array['5 mm'][] = array("5 x 10", "Stahl blank");
|
||||
$array['5 mm'][] = array("5 x 10", "Vernickelt");
|
||||
$array['5 mm'][] = array("5 x 10", "Verzinkt");
|
||||
$array['5 mm'][] = array("5 x 15", "Stahl blank");
|
||||
$array['5 mm'][] = array("5 x 15", "Vernickelt");
|
||||
$array['5 mm'][] = array("5 x 20", "Vernickelt");
|
||||
@@ -58,9 +58,7 @@
|
||||
$array['6 mm'][] = array("6 x 65", "Messing");
|
||||
|
||||
$array['8 mm'][] = array("8 x 10", "Verzinkt");
|
||||
$array['8 mm'][] = array("8 x 10", "Stahl blank");
|
||||
$array['8 mm'][] = array("8 x 20", "Verzinkt");
|
||||
$array['8 mm'][] = array("8 x 20", "Messing");
|
||||
$array['8 mm'][] = array("8 x 30", "Stahl blank");
|
||||
|
||||
$array['10 mm'][] = array("10 x 15", "Stahl blank");
|
||||
@@ -74,8 +72,8 @@
|
||||
* Mail-Kram
|
||||
*/
|
||||
|
||||
//$mail_to = "jandop@yahoo.de";
|
||||
$mail_to = "sockenklaus@gmail.com";
|
||||
$mail_to = "jandop@yahoo.de";
|
||||
//$mail_to = "sockenklaus@gmail.com";
|
||||
$subject = "Rundkopfschlitzschrauben - Bestellformular";
|
||||
|
||||
/*
|
||||
@@ -169,7 +167,6 @@
|
||||
$text .= $notiz;
|
||||
|
||||
$headers = "From: \"Rundkopfschlitzschrauben.de\" <info@rundkopfschlitzschrauben.de>\r\n";
|
||||
$headers .= "BCC: sockenklaus@gmail.com\r\n";
|
||||
$headers .= "Reply-To: $mail_from\r\n";
|
||||
$headers .= "X-Mailer: PHP/" . phpversion() . "\r\n";
|
||||
$headers .= "Content-Type: text/plain; charset=UTF-8\r\n";
|
||||
@@ -177,7 +174,7 @@
|
||||
$headers .= "MIME-Version: 1.0\r\n";
|
||||
$headers .= "\r\n";
|
||||
|
||||
//$mail_ok = mail($mail_to, $subject, $text, $headers);
|
||||
$mail_ok = mail($mail_to, $subject, $text, $headers);
|
||||
|
||||
if ($mail_ok) {
|
||||
$form_errors[] = "Mail erfolgreich verschickt.";
|
||||
@@ -198,20 +195,14 @@
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>DIN 86 Metrisch Rundkopf-Schlitzschrauben</title>
|
||||
<!--<link rel="stylesheet" type="text/css" href="css/style.css" />-->
|
||||
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-QWTKZyjpPEjISv5WaRU9OFeRpok6YctnYmDr5pNlyT2bRjXh0JMhjY6hW+ALEwIH" crossorigin="anonymous">
|
||||
<!--<script type="text/javascript" src="js/form_helper.js" defer></script>-->
|
||||
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/js/bootstrap.bundle.min.js" integrity="sha384-YvpcrYf0tY3lHB60NNkmXc5s9fDVZLESaAA55NDzOxhy9GkcIdslK1eN7N6jIeHz" crossorigin="anonymous"></script>
|
||||
<link rel="stylesheet" type="text/css" href="css/style.css" />
|
||||
<script type="text/javascript" src="js/form_helper.js" defer></script>
|
||||
</head>
|
||||
<pre>
|
||||
<?php
|
||||
var_dump($_POST)
|
||||
?>
|
||||
</pre>
|
||||
<body class="bg-secondary">
|
||||
<div class="container bg-white px-5 py-4">
|
||||
<div class="mx-auto">
|
||||
<a href="/" class="link-dark"><h1>DIN 86 Metrisch Rundkopf-Schlitzschrauben</h1></a>
|
||||
|
||||
<body>
|
||||
<div class="container">
|
||||
<div>
|
||||
<a href="/"><h1>DIN 86 Metrisch Rundkopf-Schlitzschrauben</h1></a>
|
||||
|
||||
<table>
|
||||
<tr><td colspan="2" style="font-weight: bold;">Preise:</td></tr>
|
||||
@@ -259,12 +250,17 @@
|
||||
</div>
|
||||
|
||||
<form action="index.php#form" method="post">
|
||||
<table class="table table-sm align-middle">
|
||||
|
||||
<?php
|
||||
|
||||
foreach ($array as $key => $values) {
|
||||
echo '
|
||||
<table class="schrauben" rules="all">
|
||||
<colgroup>
|
||||
<col width="*" />
|
||||
<col width="*" />
|
||||
<col width="70px" />
|
||||
</colgroup>
|
||||
<tr>
|
||||
<th>Schrauben in '.$key.' Größe</th>
|
||||
<th>Ausführung</th>
|
||||
@@ -277,12 +273,11 @@
|
||||
$has_error = array_key_exists($key, $screw_errors);
|
||||
|
||||
echo '<tr>
|
||||
<td>'. $value[0] .'</td>
|
||||
<td>'. $value[1] .'</td>
|
||||
<td>'. $value[0].'</td>
|
||||
<td>'.$value[1].'</td>
|
||||
<td>
|
||||
<input
|
||||
type="text"
|
||||
class="form-control"
|
||||
size="4"
|
||||
maxlength="4"
|
||||
name="schrauben['.$key.']"
|
||||
@@ -295,26 +290,21 @@
|
||||
if($has_error) {
|
||||
echo '
|
||||
<tr>
|
||||
<td colspan="3" class="text-end text-danger">
|
||||
'. $screw_errors[$key] .'
|
||||
<td colspan="3" class="error">
|
||||
<span style="color:red">'. $screw_errors[$key] .'</span>
|
||||
</td>
|
||||
</tr>
|
||||
';
|
||||
}
|
||||
}
|
||||
|
||||
echo '
|
||||
<tr>
|
||||
<td colspan="3" class="border-bottom-0"> </td>
|
||||
</tr>
|
||||
</table>
|
||||
';
|
||||
}
|
||||
echo '
|
||||
</table>
|
||||
';
|
||||
|
||||
//if(count($form_errors) == 0 && count($screw_errors) == 0) echo '<br />';
|
||||
if(count($form_errors) == 0 && count($screw_errors) == 0) echo '<br />';
|
||||
?>
|
||||
<p class="text-danger text-center">
|
||||
<p class="error">
|
||||
<?php
|
||||
if(count($screw_errors) > 0) echo 'Fehler bei der Schraubenauswahl. Bitte prüfen.<br />';
|
||||
foreach($form_errors as $error) {
|
||||
@@ -322,65 +312,39 @@
|
||||
}
|
||||
?>
|
||||
</p>
|
||||
<h2>Bestellformular</h2>
|
||||
<div>
|
||||
<div class="row mb-3">
|
||||
<label class="col-sm col-form-label" for="name">Name / Vorname: *</label>
|
||||
<div class="col-sm">
|
||||
<input type="text" class="form-control" id="name" name="name" value="<?=$name;?>" required />
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mb-3">
|
||||
<label class="col-sm col-form-label" for="strasse">Straße, Hausnummer: *</label>
|
||||
<div class="col-sm">
|
||||
<input type="text" class="form-control" id="strasse" name="strasse" value="<?=$strasse;?>" required />
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mb-3">
|
||||
<label class="col-sm col-form-label" for="plz">PLZ: *</label>
|
||||
<div class="col-sm">
|
||||
<input type="text" class="form-control" id="plz" name="plz" value="<?=$plz;?>" required />
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mb-3">
|
||||
<label class="col-sm col-form-label" for="stadt">Stadt: *</label>
|
||||
<div class="col-sm">
|
||||
<input type="text" class="form-control" id="stadt" name="stadt" value="<?=$stadt?>" required />
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mb-3">
|
||||
<label class="col-sm col-form-label" for="email">Email: *</label>
|
||||
<div class="col-sm">
|
||||
<input type="email" class="form-control" id="email" name="email" value="<?=$mail_from;?>" required />
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mb-3">
|
||||
<label class="col-sm col-form-label" for="telefon">Telefon:</label>
|
||||
<div class="col-sm">
|
||||
<input type="tel" class="form-control" id="telefon" name="telefon" value="<?=$telefon;?>" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mb-3">
|
||||
<label class="col-sm col-form-label" for="notiz">Notiz:</label>
|
||||
<div class="col-sm">
|
||||
<textarea class="col-sm form-control" rows="4" id="notiz" name="notiz"><?=$notiz;?></textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mb-3">
|
||||
<div class="col-sm">
|
||||
Mit Sternchen markierte Felder müssen ausgefüllt sein.
|
||||
</div>
|
||||
</div>
|
||||
<div class="row-2 mb-3">
|
||||
<div class="col-sm">
|
||||
<input class="btn btn-primary" type="submit" name="senden" value="Abschicken" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="grid-container">
|
||||
<label for="name">Name / Vorname: *</label>
|
||||
<input type="text" name="name" id="name" value="<?=$name;?>" required />
|
||||
<div class="form_feedback">Name / Vorname erforderlich.</div>
|
||||
|
||||
<label for="strasse">Straße, Hausnummer: *</label>
|
||||
<input type="text" name="strasse" id="strasse" value="<?=$strasse;?>" required />
|
||||
<div class="form_feedback">Straße und Hausnummer erforderlich.</div>
|
||||
|
||||
<label for="plz">PLZ: *</label>
|
||||
<input type="text" name="plz" id="plz" value="<?=$plz;?>" required />
|
||||
<div class="form_feedback">Postleitzahl erforderlich.</div>
|
||||
|
||||
<label for="stadt">Stadt: *</label>
|
||||
<input type="text" name="stadt" id="stadt" value="<?=$stadt?>" required />
|
||||
<div class="form_feedback">Stadt erforderlich.</div>
|
||||
|
||||
<label for="email">Email: *</label>
|
||||
<input type="email" name="email" id="email" value="<?=$mail_from;?>" required />
|
||||
<div class="form_feedback">(Korrekte) E-Mail-Adresse erforderlich.</div>
|
||||
|
||||
<label for="telefon">Telefon:</label>
|
||||
<input type="tel" name="telefon" id="telefon" value="<?=$telefon;?>" />
|
||||
<div class="form_feedback">Bitte Telefonnummer eingeben.</div>
|
||||
|
||||
</div>
|
||||
|
||||
<p>Notiz:</p>
|
||||
<textarea name="notiz"><?=$notiz;?></textarea>
|
||||
<p>Mit Sternchen markierte Felder müssen ausgefüllt sein.</p>
|
||||
<input type="submit" name="senden" value="Abschicken" />
|
||||
</form>
|
||||
|
||||
<div class="mt-5">
|
||||
<div>
|
||||
<h2>Impressum</h2>
|
||||
Jan Dopheide<br />
|
||||
Schulstr. 40 b<br />
|
||||
|
||||
Reference in New Issue
Block a user