<?php
require '../core1.php';
$messaggio = new PHPMailer();
$messaggio2 = new PHPMailer();
// PHP MAILER LIBRARY //
if (isset($_POST['privacy']))
{
//Codice da eseguire solo in presenza della spunta alla checkbox
if(isset($_POST['send-email']))
{
$email = htmlspecialchars($_POST['email_send']);
if($email == '')
{
echo '<div class="alert alert-warning">Compila il campo Mail!</div>';
}
elseif(!filter_var($email, FILTER_VALIDATE_EMAIL))
{
echo '<div class="alert alert-warning">La mail non è valida!</div>';
}
elseif(isset($_POST['send-email']))
{
$number = htmlspecialchars($_POST['number']);
if($number == '')
{
echo '<div class="alert alert-warning">Compila il campo Cellulare!</div>';
}
else
{
$messaggio->From='prova@outlook.it';
$messaggio->AddAddress($_POST['email_send']);
$messaggio->AddBCC('nascosto@mail.it');
$messaggio->AddReplyTo('prova@outlook.it');
$messaggio->Subject='Codice Vincente!';
$messaggio->Body=stripslashes('Salve, il suo codice è risultato vincente.\n\n Venga subito a ritirarlo in negozio! \r\n Premio Ottenuto: '.$premio->fetchCODE('premio').' ');
if(!$messaggio->Send())
{
echo '<div class="alert alert-danger">ERRORE: E-mail non inviata</div>';
}
else
{
echo '<div class="alert alert-success">Email inviata correttamente.</div>';
header('Refresh: 5; URL=http://scommesseonlinetest.altervista.org/mobile/');
}
}
$messaggio2->From='prova@outlook.it';
$messaggio2->AddAddress('prova@gmail.com');
$messaggio2->Subject='PoggioShopping - Cellulare cliente';
$messaggio2->Body=stripslashes($_POST['number']);
if(!$messaggio2->Send())
{
}
else
{
echo '<div class="alert alert-success">Riceverai a breve un sms con tutte le informazioni!</div>';
}
}
}
}
else
echo '<div class="alert alert-warning">Autorizzare il trattamento dei dati personali</div>';
if(isset($_POST['back']))
{
$premio->destroySession();
}
// session key //
if($premio->sessionEnabled() == '')
{
header('location: index.php?#');
}
?>
<!DOCTYPE html>
<html class="nojs html css_verticalspacer" lang="it-IT">
<head>
<meta http-equiv="Content-type" content="text/html;charset=UTF-8"/>
<meta name="generator" content="2015.2.0.352"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no"/>
<script type="text/javascript">
// Update the 'nojs'/'js' class on the html node
document.documentElement.className = document.documentElement.className.replace(/\bnojs\b/g, 'js');
// Check that all required assets are uploaded and up-to-date
if(typeof Muse == "undefined") window.Muse = {}; window.Muse.assets = {"required":["jquery-1.8.3.min.js", "museutils.js", "museconfig.js", "jquery.watch.js", "jquery.musepolyfill.bgsize.js", "jquery.museresponsive.js", "require.js", "form.css"], "outOfDate":[]};
</script>
<title>Ritiro premio</title>
<!-- CSS -->
<link rel="stylesheet" type="text/css" href="css/site_global.css?crc=3916556066"/>
<link rel="stylesheet" type="text/css" href="css/form.css?crc=437394260" id="pagesheet"/>
<!-- IE-only CSS -->
<!--[if lt IE 9]>
<link rel="stylesheet" type="text/css" href="css/nomq_form.css?crc=3896556268" id="nomq_pagesheet"/>
<![endif]-->
</head>
<body>
<style type="text/css">
/* Margini, padding, bordo e arrotondamento */
.alert {
padding: 15px;
margin-bottom: 20px;
border: 1px solid transparent;
border-radius: 4px;
}
/* Padding destro per l'alert con pulsante di chiusura */
.alert-dismissable {
padding-right: 35px;
}
/* Posizione del pulsante di chiusura */
.alert-dismissable .close {
position: relative;
top: -2px;
right: -21px;
color: inherit;
}
/* Colori per la classe .success */
.alert-success {
color: #468847;
background-color: #dff0d8;
border-color: #d6e9c6;
text-align: center;
}
/* Colori per la classe .info */
.alert-info {
color: #3a87ad;
background-color: #d9edf7;
border-color: #bce8f1;
}
/* Colori per la classe .warning */
.alert-warning {
color: #c09853;
background-color: #fcf8e3;
border-color: #fbeed5;
}
/* Colori per la classe .danger */
.alert-danger {
color: #b94a48;
background-color: #f2dede;
border-color: #eed3d7;
}
.alert-danger hr {
border-top-color: #e6c1c7;
}
.alert-danger .alert-link {
color: #953b39;
}
</style>
<div class="breakpoint active" id="bp_infinity" data-min-width="1236"><!-- responsive breakpoint node -->
<div class="clearfix borderbox" id="page"><!-- column -->
<!-- m_editable region-id="editable-static-tag-U1775-BP_infinity" template="form.html" data-type="image" -->
<div class="clip_frame colelem" id="u1775" data-muse-uid="U1775" data-muse-type="img_frame"><!-- image -->
<img class="block temp_no_img_src" id="u1775_img" data-orig-src="images/imgpsh_fullsize-resize.jpg?crc=370696106" alt="" data-muse-src="images/imgpsh_fullsize-resize.jpg?crc=370696106" data-image-width="190" data-image-height="190" src="images/blank.gif?crc=4208392903"/>
</div>
<!-- /m_editable -->
<div class="browser_width colelem shared_content" id="u4392-bw" data-content-guid="u4392-bw_content">
<div id="u4392"><!-- custom html -->
<style>
input[type=text] {
text-align: center;
width: 100%;
padding: 12px 20px;
margin: 8px 0;
box-sizing: border-box;
border: 3px solid #ccc;
-webkit-transition: 0.5s;
transition: 0.5s;
outline: none;
}
input[type=text]:focus {
border: 3px solid #555;
}
</style>
<form method="post">
<input class="focus2" type="text" name="nome1" placeholder="Nome ..." class="input">
</div>
</div>
<div class="browser_width colelem shared_content" id="u4464-bw" data-content-guid="u4464-bw_content">
<div id="u4464"><!-- custom html -->
<style>
input[type=text] {
text-align: center;
width: 100%;
padding: 12px 20px;
margin: 8px 0;
box-sizing: border-box;
border: 3px solid #ccc;
-webkit-transition: 0.5s;
transition: 0.5s;
outline: none;
}
input[type=text]:focus {
border: 3px solid #555;
}
</style>
<input class="focus2" type="text" name="number" placeholder="Cellulare ..." class="input">
</div>
</div>
<div class="browser_width colelem shared_content" id="u4414-bw" data-content-guid="u4414-bw_content">
<div id="u4414"><!-- custom html -->
<style>
input[type=text] {
text-align: center;
width: 100%;
padding: 12px 20px;
margin: 8px 0;
box-sizing: border-box;
border: 3px solid #ccc;
-webkit-transition: 0.5s;
transition: 0.5s;
outline: none;
}
input[type=text]:focus {
border: 3px solid #555;
}
</style>
<input class="focus2" type="text" name="email_send" placeholder="E-mail ..." class="input">
<style type="text/css">
input[type="checkbox"]:checked
{
background:blue;
color:white;
}
</style>
<input type="checkbox" class="required" name="privacy" value="Autorizzo il trattamento dei miei dati personali" class="input" /> <label for="webform_privacy_0"><strong>Autorizzo il trattamento dei miei dati personali ai sensi del Decreto Legislativo 30 giugno 2003, n. 196 "Codice in materia di protezione dei dati personali" *</strong></label>
</body>
</form>
</html>