Salve a tutti, sto cercando di modificare una template comprata su Themeforest, data la mia poca esperienza in programmazione,
codesta template viene fuori con un modulo per le prenotazioni, il problema è che (in locale), una volta premuto Prenota, esce fuori un riquadro rosso e non credo mandi l'impulso che invia poi la prenotazione, non ne capisco molto se qualcuno riesce ad aiutarmi ve ne sarei grato.
Potrei postare l'html della home, il form è uguale per tutte le altre pagine. La cartella con i php include un file che si chiama mail.php, una cartella che si chiama lib con altri file php come mail sender, mime types, preferences, swift init, swift required pear, swift required, swift mailer generate config.
I CSS allegati sono bootstrap e theme, socicon, fontrestaurant e due file JS ma non credo c'entrino
Quello che vorrei è fare arrivare l'email con tutte le richieste definite ad es. numero di persone, crudi, orario e data, nome e telefono.
Allegherò anche mail.php perchè magari è quello che c'entra con il form prenotazioni.
HOME:
codesta template viene fuori con un modulo per le prenotazioni, il problema è che (in locale), una volta premuto Prenota, esce fuori un riquadro rosso e non credo mandi l'impulso che invia poi la prenotazione, non ne capisco molto se qualcuno riesce ad aiutarmi ve ne sarei grato.
Potrei postare l'html della home, il form è uguale per tutte le altre pagine. La cartella con i php include un file che si chiama mail.php, una cartella che si chiama lib con altri file php come mail sender, mime types, preferences, swift init, swift required pear, swift required, swift mailer generate config.
I CSS allegati sono bootstrap e theme, socicon, fontrestaurant e due file JS ma non credo c'entrino
Quello che vorrei è fare arrivare l'email con tutte le richieste definite ad es. numero di persone, crudi, orario e data, nome e telefono.
Allegherò anche mail.php perchè magari è quello che c'entra con il form prenotazioni.
HOME:
<!DOCTYPE html><html lang="en"><head>
<meta charset="utf-8">
<title> Ristorante</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link href="css/bootstrap.css" rel="stylesheet" type="text/css" media="all">
<link href="css/socicon.css" rel="stylesheet" type="text/css" media="all">
<link href="css/theme.css" rel="stylesheet" type="text/css" media="all">
<link href="https://fonts.googleapis.com/css?family=Fira+Sans:400,500,400italic" rel="stylesheet" type="text/css">
<link href="css/font-restaurant.css" rel="stylesheet" type="text/css" media="all">
</head>
<body data-smooth-scroll-offset="0">
<section class="page-container bg--dark">
<div class="loader loader--fade"></div>
<header class="bg--dark">
<div class="container">
<div class="row">
<div class="col-sm-6">
<a href="restaurant-home.html" class="logo logo--lg">
<img alt="logo" src="img/logo-restaurant.png">
</a>
</div>
<div class="col-sm-6 text-right text-left-xs">
<a href="#">
<span class="type--fade">Via Falcone</span>
</a>
<a href="#" data-notification-link="contact">
<!--?php
header( 'Location: http://www.yoursite.com/new_page.html' ) ;
?--><span class="underline active">PRENOTA ORA</span>
</a>
</div>
</div>
<!--end of row-->
</div>
<!--end of container-->
</header>
<div class="contact-notification notification pos-right pos-top bg--primary" data-animation="from-right" data-notification-link="contact">
<div class="notification__content pos-vertical-center">
<h3>Prenota ora</h3>
<p>
To ensure a comfortable experience for all guests, we ask that children be over the age of 5.
</p>
<p>
</p>
<form class="form-email" data-error="Per favore, completa tutti i campi correttamente" data-success="Prenotazione ricevuta, riceverà a breve una conferma" novalidate="true">
<label>Nome:</label>
<input type="text" class="validate-required">
<label>Numero di telefono:</label>
<input type="tel" class="validate-required">
<label>Data della prenotazione:</label>
<input type="date">
<div>
<label>Orario:</label>
<select>
<option>12:00</option>
<option>12:30</option>
<option>13:00</option>
<option>13:30</option>
<option>19:00</option>
<option>19:30</option>
<option>20:30</option>
<option>21:00</option>
<option>21:30</option>
<option>21:45</option>
</select>
</div>
<div>
<label>Numero di persone:</label>
<select>
<option>1</option>
<option>2</option>
<option>3</option>
<option>4</option>
<option>5</option>
<option>6</option>
<option>7</option>
<option>7</option>
<option>8</option>
<option>9</option>
<option>10</option>
<option>11</option>
<option>12</option>
</select>
</div>
<div>
<label>Crudi di mare</label>
<select>
<option>No</option>
<option>Si (verrai ricontattato per conferma)</option>
</select>
</div>
<button type="submit" class="underline active">Prenota</button>
</form>
</div>
<div class="notification-close-cross notification-close"></div></div>
<!--end of notification-->
<div class="main-container transition--fade transition--active">
<section class="section-home bg--dark">
<div class="container">
<div class="row">
<div class="col-md-6 col-sm-6 col-md-offset-1 col-sm-offset-0 col-md-push-5">
<h1>Vieni a scoprire un'esperienza di cena dove ogni morso è infuso con amore.</h1>
<nav>
<ul class="navigation">
<li>
<a href="restaurant-about.html">
<span class="underline active">
Chi Siamo</span>
</a>
</li>
<li>
<a href="restaurant-menu.html">
<span class="underline active">
Menu Degustazione
</span>
</a>
</li><li>
<a href="https://www.scoutmenu.it/dettagli-locale.php?id=" target="_blank">
<span class="underline active">
Menu alla carta</span>
</a>
</li>
<li>
<a href="restaurant-blog.html">
<span class="underline active">
Latest News
</span>
</a>
</li>
<li>
<a href="restaurant-contact.html">
<span class="underline active">
Contatti
</span>
</a>
</li>
</ul>
</nav>
<img alt="Pic" src="img/restaurant-7.jpg">
</div>
<div class="col-md-5 col-sm-6 col-md-pull-7">
<img alt="Pic" src="img/restaurant-5.jpg">
</div>
</div>
<!--end of row-->
</div>
<!--end of container-->
</section>
<section class="section-cta bg--dark">
<div class="container">
<div class="row">
<div class="col-sm-12">
<h3>“Utterly essential for fans of experimental cuisine”</h3>
<span class="type--fade">
— Simon Pickering, The Age
</span>
<a href="#" data-notification-link="contact">
<span class="underline active">
PRENOTA ORA
</span>
</a>
</div>
</div>
<!--end of row-->
</div>
<!--end of container-->
</section>
<footer class="bg--dark">
<div class="container">
<div class="row">
<div class="col-sm-6">
<ul class="social-networks">
<li>
<a href="https://www.tripadvisor.it/Restaurant_Review-" target="_blank">
<i class="socicon-tripadvisor"></i>
</a>
</li>
<li>
<a href="https://www.instagram.com//" target="_blank">
<i class="socicon-instagram"></i>
</a>
</li>
<li>
<a href="https://it-it.facebook.com//" target="_blank">
<i class="socicon-facebook"></i>
</a>
</li>
<li>
<a href="https://goo.gl/maps/" target="_blank">
<i class="socicon-google"></i>
</a>
</li>
</ul>
</div>
</div>
<!--end of row-->
</div>
<!--end of container-->
</footer>
</div>
</section>
<script src="http://code.jquery.com/jquery.min.js"></script>
<script src="js/scripts.js"></script>
</body></html>
<?php
/*----------------------------------------------------------------------------*\
|* Email settings for sending all emails from your website forms. *|
\*============================================================================*/
// Choose here whether to use php mail() function or your SMTP server (recommended) to send the email.
// Use 'smtp' for better reliability, or use 'phpmail' for quick + easy setup with lower reliability.
$emailMethod = 'phpmail'; // REQUIRED value. Options: 'smtp' , 'phpmail'
// Outgoing Server Settings - replace values on the right of the = sign with your own.
// These 3 settings are only required if you choose 'smtp' for emailMethod above.
$outgoingServerAddress = '??????'; // Consult your hosting provider.
$outgoingServerPort = '?????'; // Options: '587' , '25' - Consult your hosting provider.
$outgoingServerSecurity = '?????'; // Options: 'ssl' , 'tls' , null - Consult your hosting provider.
// Sending Account Settings - replace these details with an email account held on the SMTP server entered above.
// These 2 settings are only required if you choose 'smtp' for emailMethod above.
$sendingAccountUsername = 'email@domain.com';
$sendingAccountPassword = 'p@55w0rd';
// Recipient (To:) Details - Change this to the email details of who will receive all the emails from the website.
$recipientEmail = 'MIAMAIL???@gmail.com'; // REQUIRED value.
$recipientName = 'Metropolitan Ristorante'; // REQUIRED value.
// Email details - Change these to suit your website needs
$emailSubject = 'Messaggio dal tuo sito web'; // REQUIRED value. Subject of the email that the recipient will see
$websiteName = 'Metropolitan'; // REQUIRED value. This is used when a name or email is not collected from the website form
$timeZone = 'Europe/Amsterdam'; // OPTIONAL, but some servers require this to be set.
// See a list of all supported timezones at: http://php.net/manual/en/timezones.php
/*----------------------------------------------------------------------------*\
|* You do not need to edit anything below this line, the rest is automatic. *|
\*============================================================================*/
include('lib/mail_sender.php');
?>