versuche es jetzt mal damit
<?php
/*-------------------------------------------------------+
| PHP-Fusion Content Management System
| Copyright © 2002 - 2008 Nick Jones
| http://www.php-fusion.co.uk/
+--------------------------------------------------------+
| Filename: TS3-Bestellung
| Author: BlackOut & MOD by firebase
| E-Mail: support@firebase.eu
| Web:http://www.2good4name.de & www.firebase.eu
+--------------------------------------------------------+
| This program is released as free software under the
| Affero GPL license. You can redistribute it and/or
| modify it under the terms of this license which you
| can read by viewing the included agpl.txt or online
| at www.gnu.org/licenses/agpl.html. Removal of this
| copyright header is strictly prohibited without
| written permission from the original author(s).
+--------------------------------------------------------*/
require_once("../../../maincore.php");
require_once THEMES."templates/header.php";
include "agbtext.php";
include INFUSIONS."tsserver_bestellung/infusion_db.php";
if (file_exists(INFUSIONS."tsserver_bestellung/locale/".LOCALESET.".php"))
{
include INFUSIONS."tsserver_bestellung/locale/".LOCALESET.".php";
} else {
include INFUSIONS."tsserver_bestellung/locale/German.php";
}
opentable("TS3-Bestellen");
//FORMULAR
if ($_GET['action'] == "formular"){
$ipadresse = getenv("REMOTE_ADDR");
echo "<table align='center' cellpadding='0' cellspacing='0' class='tbl'>
<tr>
<td><br>
<center>".$locale['ts6']."<br><br><br></center>
</td>
</tr>
</table>
<form name='post' method='post' action='?action=send'>
<table align='center' cellpadding='0' cellspacing='0' class='tbl'>
<tr>
<tr>
<td width='200'>".$locale['ts7']."
</td>
<td><input type='text' name='ip' value='$ipadresse' readonly maxlength='50' class='textbox' style='width: 200px;'>
</td>
</tr>
<tr>
<td width='200'>".$locale['ts9']."
</td>
<td><input type='text' name='vorname' maxlength='50' class='textbox' style='width: 200px;'>
</td>
</tr>
<tr>
<td width='200'>".$locale['ts10']."
</td>
<td><input type='text' name='nachname' value='' maxlength='50' class='textbox' style='width: 200px;'>
</td>
</tr>
<tr>
<td width='200'>".$locale['ts11']."
</td>
<td><input type='text' name='strasse' maxlength='50' class='textbox' style='width: 130px;'>".$locale['ts12']."<input type='text' name='nr' maxlength='50' class='textbox' style='width: 39px;'>
</td>
</tr>
<tr>
<td width='200'>".$locale['ts13']."
</td>
<td><input type='text' name='plz' maxlength='50' class='textbox' style='width: 88px;'>".$locale['ts14']."<input type='text' name='ort' maxlength='50' class='textbox' style='width: 80px;'>
</td>
</tr>
<tr>
<td width='200'>".$locale['ts15']."
</td>
<td><select class='textbox' name='gb1'>
<option value=''></option>
<option value='1'>1</option>
<option value='2'>2</option>
<option value='3'>3</option>
<option value='4'>4</option>
<option value='5'>5</option>
<option value='6'>6</option>
<option value='7'>7</option>
<option value='8'>8</option>
<option value='9'>9</option>
<option value='10'>10</option>
<option value='11'>11</option>
<option value='12'>12</option>
<option value='13'>13</option>
<option value='14'>14</option>
<option value='15'>15</option>
<option value='16'>16</option>
<option value='17'>17</option>
<option value='18'>18</option>
<option value='19'>19</option>
<option value='20'>20</option>
<option value='21'>21</option>
<option value='22'>22</option>
<option value='23'>23</option>
<option value='24'>24</option>
<option value='25'>25</option>
<option value='26'>26</option>
<option value='27'>27</option>
<option value='28'>28</option>
<option value='29'>29</option>
<option value='30'>30</option>
<option value='31'>31</option>
</select>
<select class='textbox' name='gb2'>
<option value=''></option>
<option value='1'>1</option>
<option value='2'>2</option>
<option value='3'>3</option>
<option value='4'>4</option>
<option value='5'>5</option>
<option value='6'>6</option>
<option value='7'>7</option>
<option value='8'>8</option>
<option value='9'>9</option>
<option value='10'>10</option>
<option value='11'>11</option>
<option value='12'>12</option>
</select>
<select class='textbox' name='gb3'>
<option value=''></option>
<option value='1940'>1940</option>
<option value='1941'>1941</option>
<option value='1942'>1942</option>
<option value='1943'>1943</option>
<option value='1944'>1944</option>
<option value='1945'>1945</option>
<option value='1946'>1946</option>
<option value='1947'>1947</option>
<option value='1948'>1948</option>
<option value='1949'>1949</option>
<option value='1950'>1950</option>
<option value='1951'>1951</option>
<option value='1952'>1952</option>
<option value='1953'>1953</option>
<option value='1954'>1954</option>
<option value='1955'>1955</option>
<option value='1956'>1956</option>
<option value='1957'>1957</option>
<option value='1958'>1958</option>
<option value='1959'>1959</option>
<option value='1960'>1960</option>
<option value='1961'>1961</option>
<option value='1962'>1962</option>
<option value='1963'>1963</option>
<option value='1964'>1964</option>
<option value='1965'>1965</option>
<option value='1966'>1966</option>
<option value='1967'>1967</option>
<option value='1968'>1968</option>
<option value='1969'>1969</option>
<option value='1970'>1970</option>
<option value='1971'>1971</option>
<option value='1972'>1972</option>
<option value='1973'>1973</option>
<option value='1974'>1974</option>
<option value='1975'>1975</option>
<option value='1976'>1976</option>
<option value='1977'>1977</option>
<option value='1978'>1978</option>
<option value='1979'>1979</option>
<option value='1980'>1980</option>
<option value='1981'>1981</option>
<option value='1982'>1982</option>
<option value='1983'>1983</option>
<option value='1984'>1984</option>
<option value='1985'>1985</option>
<option value='1986'>1986</option>
<option value='1987'>1987</option>
<option value='1988'>1988</option>
<option value='1989'>1989</option>
<option value='1990'>1990</option>
<option value='1991'>1991</option>
<option value='1992'>1992</option>
<option value='1993'>1993</option>
<option value='1994'>1994</option>
<option value='1995'>1995</option>
<option value='1996'>1996</option>
<option value='1997'>1997</option>
<option value='1998'>1998</option>
<option value='1999'>1999</option>
<option value='2000'>2000</option>
</select>
</td>
</tr>
<td width='200'>".$locale['ts16']."
</td>
<td><input type='text' name='mail' maxlength='100' class='textbox' style='width: 200px;'>
</td>
</tr>
<td width='200'>".$locale['ts17']."
</td>
<td><input type='text' name='hp' maxlength='100' value='falls vorhanden' class='textbox' style='width: 200px;'>
</td>
</tr>
<tr>
<td width='200'>".$locale['ts25']."
</td>
<td><select class='textbox' name='slots'>
<option value='1'>1</option>
<option value='2'>2</option>
<option value='3'>3</option>
<option value='4'>4</option>
<option value='5'>5</option>
<option value='6'>6</option>
<option value='7'>7</option>
<option value='8'>8</option>
<option value='9'>9</option>
<option value='10'>10</option>
<option value='15'>15</option>
<option value='20'>20</option>
<option value='25'>25</option>
<option value='30'>30</option>
<option value='35'>35</option>
<option value='40'>40</option>
<option value='45'>45</option>
<option value='50'>50</option>
<option value='55'>55</option>
<option value='60'>60</option>
<option value='65'>65</option>
<option value='70'>70</option>
<option value='75'>75</option>
<option value='80'>80</option>
<option value='85'>85</option>
<option value='90'>90</option>
<option value='95'>95</option>
<option value='100'>100</option>
</select>
</td>
</tr>
</table><br> <br> <br> <br>
<table align='center' cellpadding='0' cellspacing='0' class='tbl'>
<tr>
<td><textarea readonly class='textbox' rows='10' style='width: 500px'>$agbtext</textarea>
</td>
</tr>
</table><br> <br> <br> <br>
<table align='center' cellpadding='0' cellspacing='0' class='tbl'>
<tr>
<td width='100'>".$locale['ts34']."
</td>
<td><select class='textbox' name='agb'>
<option value=''>".$locale['ts2']."</option>
<option value='".$locale['ts1']."'>".$locale['ts1']."</option>
</select>
</td>
</tr>
</table>";
echo "<table align='center' cellpadding='0' cellspacing='0' class='tbl'>
<tr>
<tr>
<td align='center' colspan='2'><br><br><br><input type='submit' name='senden' value='".$locale['ts3']."' class='button'>
</td>
</tr>
</tr>
</table></form>\n";
//Das Copyright darf niciht entfernt werden!!!
echo "<p align='right'><a href='http://firebase.eu/' target='_blank' title='Copyrigt 2014 firebase - BJF_ts3_bestellsystem'>©</a></p>";
}
//Copyright ENDE!!!
//SEND
if (isset($_POST["senden"])) {
//ERROR Prüfung
$error = "";
if ($_POST['vorname'] == "") {
$error .= "· <span class='alt'>".$locale['ts36']."</span> ·<br>\n";
}
if ($_POST['nachname'] == "") {
$error .= "· <span class='alt'>".$locale['ts37']."</span> ·<br>\n";
}
if ($_POST['strasse'] == "") {
$error .= "· <span class='alt'>".$locale['ts38']."</span> ·<br>\n";
}
if ($_POST['nr'] == "") {
$error .= "· <span class='alt'>".$locale['ts39']."</span> ·<br>\n";
}
if ($_POST['plz'] == "") {
$error .= "· <span class='alt'>".$locale['ts40']."</span> ·<br>\n";
}
if ($_POST['ort'] == "") {
$error .= "· <span class='alt'>".$locale['ts41']."</span> ·<br>\n";
}
if ($_POST['gb1'] == "") {
$error .= "· <span class='alt'>".$locale['ts42']."</span> ·<br>\n";
}
if ($_POST['gb2'] == "") {
$error .= "· <span class='alt'>".$locale['ts43']."</span> ·<br>\n";
}
if ($_POST['gb3'] == "") {
$error .= "· <span class='alt'>".$locale['ts44']."</span> ·<br>\n";
}
if ($_POST['mail'] == "" || !preg_match("/^[-0-9A-Z_\.]{1,50}@([-0-9A-Z_\.]+\.){1,50}([0-9A-Z]){2,4}$/i",$_POST['mail'])) {
$error .= "· <span class='alt'>".$locale['ts45']."</span> ·<br>\n";
}
if ($_POST['hp'] == "") {
$error .= "· <span class='alt'>".$locale['ts46']."</span> ·<br>\n";
}
if ($_POST['slots'] == "") {
$error .= "· <span class='alt'>".$locale['ts50']."</span> ·<br>\n";
}
if ($_POST['agb'] == "") {
$error .= "· <span class='alt'>".$locale['ts57']."</span> ·<br>\n";
}
//Ausgabe der Fehlermeldung
if ($error != "") {
echo "<center>·".$locale['ts58']."<br><br>$error<br><a href='/index.php'>".$locale['ts59']."</a><br>\n</center>";
} else {
// Datensatz-Inhalte festlegen
if (!$error) {
$result = dbquery("INSERT INTO ".TS3_BESTELLUNG." (
ip,
vorname,
nachname,
strasse,
nr,
plz,
ort,
gb1,
gb2,
gb3,
mail,
hp,
slots,
message)
VALUES (
'".$_POST['ip']."',
'".$_POST['vorname']."',
'".$_POST['nachname']."',
'".$_POST['strasse']."',
'".$_POST['nr']."',
'".$_POST['plz']."',
'".$_POST['ort']."',
'".$_POST['gb1']."',
'".$_POST['gb2']."',
'".$_POST['gb3']."',
'".$_POST['mail']."',
'".$_POST['hp']."',
'".$_POST['slots']."',
'".$_POST['message']."')");
// Meldung bei erfolg
echo "<table align='center' cellpadding='0' cellspacing='0' class='tbl'>
<tr>
<td><center>".$locale['ts60']."<br><br><a href='/index.php'>".$locale['ts59']."</a></center>
</td>
</tr>
</table>";
}
}
}
closetable();
require_once THEMES."templates/footer.php";
?>
|