Bernd Wurst commited on 2018-03-17 17:30:37
Zeige 2 geänderte Dateien mit 6 Einfügungen und 3 Löschungen.
... | ... |
@@ -13,12 +13,15 @@ if (isset($_REQUEST['form'])) { |
13 | 13 |
case 'start': |
14 | 14 |
$number = NULL; |
15 | 15 |
if (isset($_REQUEST['phone']) && trim($_REQUEST['phone']) != '') { |
16 |
- $number = $_REQUEST['phone']; |
|
16 |
+ $number = trim($_REQUEST['phone']); |
|
17 | 17 |
} |
18 | 18 |
if (! $number) { |
19 | 19 |
$redirect = 'index.php?error&num='; |
20 | 20 |
break; |
21 | 21 |
} |
22 |
+ if (substr($number, 0, 1) != 0 && substr($number, 0, 3) != '+49' && substr($number, 0, 4) != '0049') { |
|
23 |
+ $number = '07192'.$number; |
|
24 |
+ } |
|
22 | 25 |
|
23 | 26 |
require_once('vendor/autoload.php'); |
24 | 27 |
|
... | ... |
@@ -40,7 +43,7 @@ if (isset($_REQUEST['form'])) { |
40 | 43 |
setcookie('NUMBER', $number, time() + 24*3600*500, ""); |
41 | 44 |
|
42 | 45 |
if (! $_SESSION['phone']) { |
43 |
- header('Location: index.php?error&num='.urlencode($_REQUEST['phone'])); |
|
46 |
+ $redirect = 'index.php?error&num='.urlencode($_REQUEST['phone']); |
|
44 | 47 |
break; |
45 | 48 |
} |
46 | 49 |
|
... | ... |
@@ -46,13 +46,13 @@ |
46 | 46 |
} |
47 | 47 |
?> |
48 | 48 |
</ul></div> |
49 |
- <?php } ?> |
|
50 | 49 |
<a class="btn btn-sm btn-block btn-danger" href="clear.php">Alle Eingaben löschen und von vorne beginnen</a> |
51 | 50 |
<div class="panel panel-info" id="footer"> |
52 | 51 |
<div class="panel-heading">Hilfe?</div> |
53 | 52 |
<div class="panel-body"><p>Für Unterstützung bei der Nutzung dieses Formulars können Sie gerne unsere Telefonnummer <a href="tel:+497192936434">07192-936434</a> anrufen.</p></div> |
54 | 53 |
<div class="panel-footer"><a href="https://mosterei-wurst.de/impressum/">Impressum</a> · <a href="https://mosterei-wurst.de/">Website besuchen</a></div> |
55 | 54 |
</div> |
55 |
+ <?php } ?> |
|
56 | 56 |
|
57 | 57 |
</div> |
58 | 58 |
|
59 | 59 |