Odkurzony formularz zamówień dla v9 .
Powinien działać , pod warunkiem iż serwer obsługuje sendmail_include.php (php Mailer)
Na moim hostingu nie działa ale nie było błędów.
Plik do wysyłania zamówień. <?php
/*-------------------------------------------------------+
| PHP-Fusion Content Management System
| Copyright (C) 2002 - 2014 Nick Jones
| http://www.php-fusion.co.uk/
+--------------------------------------------------------+
| Filename: booking_form.php
| Version : 1.00
| Author: PHP-Fusion Mods UK
| Developer: Craig
| Site: http://www.phpfusionmods.co.uk
+--------------------------------------------------------+
| BASED ON contact.php by Nick (RIP)
+--------------------------------------------------------+
| Filename: contact.php
| Author: Nick Jones (Digitanium)
+--------------------------------------------------------+
| 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 http://www.gnu.org/licenses/agpl.html. Removal of this
| copyright header is strictly prohibited without
| written permission from the original author(s).
+--------------------------------------------------------*/
require_once __DIR__.'/maincore.php';
require_once THEMES.'templates/header.php';
add_to_title ('FORMULARZ REZERWACJI NOCLEGU W DOMU Szczęśliwego właściciela PHP Fusion V9 .');
set_meta("description","formularz zamówienia określający szczegółowe zapotrzebowanie na Rezerwację. Noclegu/ów wraz ze wskazaniem w szczególności:.");
add_to_head("<style>.shadowbox { width: 45em;
border: 1px solid #333;
box-shadow: 8px 8px 5px #444;
padding: 8px 12px;
background-image: linear-gradient(180deg, #fff, #ddd 40%, #ccc);</style>");
echo "<center><div class='shadowbox'>";
include INFUSIONS."katalog/Polish.php";
if (isset($_POST['sendbooking'])) {
$error = "";
$subject = $locale['bok_002'];
$mailname = isset($_POST['mailname']) ? substr(stripinput(trim($_POST['mailname'])), 0, 50) : "";
$email = isset($_POST['email']) ? substr(stripinput(trim($_POST['email'])), 0, 100) : "";
$telephone = isset($_POST['telephone']) ? substr(stripinput(trim($_POST['telephone'])), 0, 50) : "";
$from_date = isset($_POST['from_date']) ? descript(stripslash(trim($_POST['from_date']))) : "";
$to_date = isset($_POST['to_date']) ? descript(stripslash(trim($_POST['to_date']))) : "";
$num_adults = isset($_POST['num_adults']) ? substr(stripinput(trim($_POST['num_adults'])), 0, 4) : "";
$num_children = isset($_POST['num_children']) ? substr(stripinput(trim($_POST['num_children'])), 0, 4) : "";
$rooms =(isset($_POST['rooms']) && isNum($_POST['rooms'])) ? $_POST['rooms'] : "0";
$smoking =(isset($_POST['smoking']) && isNum($_POST['smoking'])) ? $_POST['smoking'] : "0";
$stay_type =(isset($_POST['stay_type']) && isNum($_POST['stay_type'])) ? $_POST['stay_type'] : "0";
$notes = isset($_POST['message']) ? descript(stripslash(trim($_POST['message']))) : "";
$message = $locale['bok_003'].$mailname.$locale['bok_004'].$telephone.$locale['bok_005'].$from_date.$locale['bok_006'].$to_date.$locale['bok_007'].(($num_adults == "0") ? "0" : $num_adults).$locale['bok_008'].(($num_children == "0") ? "0" : $num_children).$locale['bok_009'].$rooms.$locale['bok_010'].(($stay_type == "0") ? $locale['bok_011'] : "").(($stay_type == "1") ? $locale['bok_012'] : "").(($stay_type == "2") ? $locale['bok_013'] : "").$locale['bok_014'].(($smoking == "0") ? $locale['bok_015'] : $locale['bok_016']).$locale['bok_017'].(($notes !== "") ? $notes : $locale['bok_018'])."</p>";
if ($mailname == "") {
$error .= " <span class='alt'>".$locale['bok_019']."</span><br />\n";
}
if ($email == "" || !preg_match("/^[-0-9A-Z_\.]{1,50}@([-0-9A-Z_\.]+\.){1,50}([0-9A-Z]){2,4}$/i", $email)) {
$error .= " <span class='alt'>".$locale['bok_020']."</span><br />\n";
}
if ($telephone == "" || !preg_match("/^[0-9]+$/", $telephone) || strlen($telephone) < 10) {
$error .= " <span class='alt'>".$locale['bok_021']."</span><br />\n";
}
if ($from_date == "" || !preg_match("/^(?:(0[1-9]|1[012])[\/.](0[1-9]|[12][0-9]|3[01])[\/.](19|20)[0-9]{2})$/", $from_date)|| strlen($from_date)> 10 || strlen($from_date)< 10) {
$error .= " <span class='alt'>".$locale['bok_022']."</span><br />\n";
}
if ($to_date == "" || !preg_match("/^(?:(0[1-9]|1[012])[\/.](0[1-9]|[12][0-9]|3[01])[\/.](19|20)[0-9]{2})$/", $to_date) || strlen($to_date)> 10 || strlen($to_date)< 10) {
$error .= " <span class='alt'>".$locale['bok_023']."</span><br />\n";
}
if ($num_adults == "" || !preg_match("/^[0-9]+$/", $num_adults)) {
$error .= " <span class='alt'>".$locale['bok_024']."</span><br />\n";
}
if ($num_children == "" || !preg_match("/^[0-9]+$/", $num_children)) {
$error .= " <span class='alt'>".$locale['bok_025']."</span><br />\n";
}
if ($rooms == "" || $rooms == "0") {
$error .= " <span class='alt'>".$locale['bok_026']."</span><br />\n";
}
if (strlen($notes)>= 200) {
$error .= " <span class='alt'>".$locale['bok_027']."</span><br />\n";
}
if ($stay_type == "") {
$error .= " <span class='alt'>".$locale['bok_028']."</span><br />\n";
}
if ($smoking == "") {
$error .= " <span class='alt'>".$locale['bok_029']."</span><br />\n";
}
if (!$error) {
require_once INCLUDES."sendmail_include.php";
if (!sendemail($settings['siteusername'],$settings['siteemail'],$mailname,$email,$subject,$message,$from_date,$to_date)) {
$error .= " <span class='alt'>".$locale['bok_031']."</span><br />\n";
}
}
if ($error) {
opentable($locale['bok_001']);
echo "<div style='text-align:center'><br />\n".$locale['bok_032'].":<br /><br />\n".$error."<br />\n".$locale['bok_033']."</div><br />\n";
closetable();
} else {
opentable($locale['bok_001']);
echo "<div style='text-align:center'><br />\n".$locale['bok_034']."<br /><br />\n".$locale['bok_035']."</div><br />\n";
closetable();
}
} else {
opentable($locale['bok_001']);
echo $locale['bok_036'];
echo "<form name='userform' method='post' action='".FUSION_SELF."'>\n";
echo "<table cellpadding='0' cellspacing='0' class='tbl'>\n<tr>\n";
echo "<td width='150' class='tbl'>".$locale['bok_037'].":</td>\n";
echo "<td class='tbl'><input type='text' name='mailname' maxlength='50' class='textbox' style='width: 200px;' /></td>\n";
echo "</tr>\n<tr>\n";
echo "<td width='150' class='tbl'>".$locale['bok_038'].":</td>\n";
echo "<td class='tbl'><input type='text' name='email' maxlength='100' class='textbox' style='width: 200px;' /></td>\n";
echo "</tr>\n<tr>\n";
echo "<td width='150' class='tbl'>".$locale['bok_039'].":</td>\n";
echo "<td class='tbl'><input type='text' name='telephone' maxlength='20' class='textbox' style='width: 200px;' /></td>\n";
echo "</tr>\n<tr>\n";
echo "<td width='150' class='tbl'>".$locale['bok_040'].":</td>\n";
echo "<td class='tbl'><input type='text' name='num_adults' maxlength='4' class='textbox' style='width: 20px;' /></td>\n";
echo "</tr>\n<tr>\n";
echo "<td width='150' class='tbl'>".$locale['bok_041'].":</td>\n";
echo "<td class='tbl'><input type='text' name='num_children' maxlength='4' class='textbox' style='width: 20px;' /></td>\n";
echo "</tr>\n<tr>\n";
echo "<td class='tbl' >".$locale['bok_042'].":</td>\n";
echo "<td class='tbl' ><select name='rooms' class='textbox'>\n";
echo "<option value='0'>--</option>\n";
echo "<option value='1'>1</option>\n";
echo "<option value='2'>2</option>\n";
echo "<option value='3'>3</option>\n";
echo "<option value='4'>4</option>\n";
echo "<option value='5'>5</option>\n";
echo "<option value='6'>6</option>\n";
echo "<option value='7'>7</option>\n";
echo "<option value='8'>8</option>\n";
echo "<option value='9'>9</option>\n";
echo "<option value='10'>10</option>\n";
echo "<option value='11'>".$locale['bok_043']."</option>\n";
echo "</select></td>\n</tr><tr>\n";
echo "<td width='120' class='tbl'>".$locale['bok_044'].":</td>\n";
echo "<td class='tbl'>".$locale['bok_045']." <input maxlength='10' autocomplete='off' class='textbox' name='from_date' id='datepicker-from' type='text'> ".$locale['bok_046']." <input autocomplete='off' maxlength='10' class='textbox' name='to_date' id='datepicker-to' type='text'></td>\n";
echo "</tr>\n<tr>\n";
echo "<td width='150' class='tbl'>".$locale['bok_047']."</td>\n";
echo "<td class='tbl'><textarea name='message' rows='10' maxlength='199' class='textbox' cols='50'></textarea></td>\n";
echo "</tr>\n<tr>\n";
echo "<td class='tbl' >".$locale['bok_048'].":</td>\n";
echo "<td class='tbl' ><select name='stay_type' class='textbox'>\n";
echo "<option value='0'>".$locale['bok_011']."</option>\n";
echo "<option value='1'>".$locale['bok_012']."</option>\n";
echo "<option value='2'>".$locale['bok_013']."</option>\n";
echo "</select></td>\n</tr><tr>\n";
echo "<td class='tbl' >".$locale['bok_049'].":</td>\n";
echo "<td class='tbl' ><select name='smoking' class='textbox'>\n";
echo "<option value='0'>".$locale['bok_015']."</option>\n";
echo "<option value='1'>".$locale['bok_016']."</option>\n";
echo "</select></td>\n</tr><tr>\n";
echo "<td width='150' class='tbl'>".$locale['bok_050'].":</td>\n";
echo "<td class='tbl'>\n";
}
echo "</td>\n</tr>\n<tr>\n";
echo "<td align='center' colspan='2' class='tbl'>\n";
echo "<input type='submit' name='sendbooking' value='".$locale['bok_052']."' class='button' /></td>\n";
echo "</tr>\n</table>\n</form>\n";
closetable();
echo "<center></div>";
add_to_footer("<link rel='stylesheet' href='//code.jquery.com/ui/1.10.4/themes/smoothness/jquery-ui.css'>
<script src='".INCLUDES."jquery/jquery-ui.js'></script>
<link rel='stylesheet' href='/resources/demos/style.css'> <script>
$(function() {
$( '#datepicker-from' ).datepicker();
$( '#datepicker-to' ).datepicker();
});
</script>");
require_once THEMES.'templates/footer.php';
?>
Lokale dowolny katalog lub tak jak tu .
INFUSIONS."katalog/Polish.php
<?php
/*----------------------------------------------+
| Polish translation and coding: bogdan - lajkonik
| Site: http://dysko-patia.eu/
+----------------------------------------------*/
$locale['bok_001'] = "Formularz rezerwacji";
$locale['bok_002'] = "Zamówienie rezerwacji";
$locale['bok_003'] = "<strong>Imię/nazwisko: </strong> ";
$locale['bok_004'] = " <strong>Telefon:</strong> ";
$locale['bok_005'] = "<p><strong>Pobyt - od:</strong> ";
$locale['bok_006'] = " <strong>Pobyt - do:</strong> ";
$locale['bok_007'] = "</p><p><strong>Osób dorosłych:</strong> ";
$locale['bok_008'] = "<strong>Dzieci: </strong> ";
$locale['bok_009'] = "</p><p><strong>Ilość pokoi:</strong> ";
$locale['bok_010'] = "</p><p><strong>Rodzaj pobytu:</strong> ";
$locale['bok_011'] = "Tylko nocleg";
$locale['bok_012'] = "Nocleg ze śniadaniem";
$locale['bok_013'] = "Nocleg, śniadanie, kolacja";
$locale['bok_014'] = "</p><p><strong>Palący:</strong> ";
$locale['bok_015'] = "Nie";
$locale['bok_016'] = "Tak";
$locale['bok_017'] = " </p><p><strong>Dodatkowe uwagi:</strong> ";
$locale['bok_018'] = "Brak dodatkowych uwag";
$locale['bok_019'] = "Proszę o podanie imienia/nazwizka";
$locale['bok_020'] = "Proszę o podanie adrsu E-mail";
$locale['bok_021'] = "Błędnie podany numer telefonu. <br />Proszę wpisać bez spacji i znaku +.";
$locale['bok_022'] = "Nieprawidłowa data przyjazdu lub nie została zaznaczona.";
$locale['bok_023'] = "Nieprawidłowa data wyjazdu lub nie została zaznaczona.";
$locale['bok_024'] = "Błędna liczba osób dorosłych lub pole nie zostało zapisane.";
$locale['bok_025'] = "Błędna liczba dzieci lub pole nie zostało zapisane";
$locale['bok_026'] = "Proszę wybrać liczbę";
$locale['bok_027'] = "Zbyt wiele znaków w dodatkowych uwagach";
$locale['bok_028'] = "Proszę podać rodzaj pobytu";
$locale['bok_029'] = "Należy wybrać opcję Palenie";
$locale['bok_030'] = "Proszę podać poprawny kod potwierdzający";
$locale['bok_031'] = "Błąd wewnętrzny: nie można wysłać formularza.";
$locale['bok_032'] = "Rezerwacja nie została wysłana z następujących powodów:";
$locale['bok_033'] = "Proszę spróbować ponownie.";
$locale['bok_034'] = "Formularz został wysłany. Wkrótce się z Państwem skontaktujemy.";
$locale['bok_035'] = "Dziękujemy";
$locale['bok_036'] = "Proszę użyć poniższego formularza, aby zarezerwować czas pobytu. Proszę pamiętać, aby wypełnić wszystkie pola.<br />Bardzo nam miło będzie gościć Państwa u nas.<br />Pozdrawiamy.<br/>Nazwa firmy<br /><br />";
$locale['bok_037'] = "Imię/nazwisko";
$locale['bok_038'] = "Adres E-mail";
$locale['bok_039'] = "Telefon<br />(format numeru: <span style='color:#D11E0A'><strong>48XXXXXXXXX</strong></span> <br />Proszę wpisać bez spacji i znaku +)";
$locale['bok_040'] = "Osób dorosłych";
$locale['bok_041'] = "Dzieci";
$locale['bok_042'] = "Ilość pokoi";
$locale['bok_043'] = "Jeśli więcej niż 10 osób, proszę wpisać poniżej w Dodatkowych uwagach.";
$locale['bok_044'] = "Proszę wybrać okres pobytu";
$locale['bok_045'] = "Pobyt - od";
$locale['bok_046'] = "Pobyt - do";
$locale['bok_047'] = "Dodatkowe uwagi:";
$locale['bok_048'] = "Rodzaj pobytu";
$locale['bok_049'] = "Palący";
$locale['bok_050'] = "Kod weryfikacyjny";
$locale['bok_051'] = "Proszę wpisać kod weryfikacyjny";
$locale['bok_052'] = "Wyślij formularz";
$locale['bok_053'] = "";
$locale['bok_054'] = "";
$locale['bok_055'] = "";
?>
|