hjkhghopjkertteerterterterertertrtoirh
bnmbertsurhetertertertertertertertpdf'tdfg
/
home
/
easy3158
/
domains
/
ekwiatki.pl
/
public_html
/
Upload FileeE
HOME
<?php ob_start(); session_start(); error_reporting(0); include("admin/inc/conn.php"); include("admin/inc/config.php"); include("admin/inc/func.php"); //---------------------------------------------------------------------- $qContact = mysqli_query($connect,"SELECT * FROM `contact` ORDER BY `id` DESC LIMIT 1"); $sContact = mysqli_fetch_array($qContact); $emailContact = $sContact['email']; $telefonContact = $sContact['telefon']; $dane_firmyContact = $sContact['dane_firmy']; $instagramContact = $sContact['instagram']; $facebookContact = $sContact['facebook']; //---------------------------------------------------------------------- $q_mail_config = mysqli_query($connect,"SELECT * FROM `mail_config` ORDER BY `id` DESC LIMIT 1"); $n_mail_config = mysqli_num_rows($q_mail_config); if($n_mail_config > 0){ $s_mail_config = mysqli_fetch_array($q_mail_config); $email_mail_config = $s_mail_config['email']; $naglowek_mail_config = $s_mail_config['naglowek']; $smtp_mail_config = $s_mail_config['smtp']; $login_mail_config = $s_mail_config['login']; $haslo_mail_config = $s_mail_config['haslo']; } require("admin/modules/phpmailer/class.phpmailer.php"); $mail = new PHPMailer(); $mail->PluginDir = "admin/modules/phpmailer/"; $mail->From = "$email_mail_config"; //adres naszego konta $mail->FromName = "$naglowek_mail_config";//nagłówek From $mail->Host = "$smtp_mail_config";//adres serwera SMTP $mail->SMTPAuth = true; $mail->Port='25'; $mail->Mailer = "smtp"; $mail->Username = "$login_mail_config";//nazwa użytkownika $mail->Password = "$haslo_mail_config";//nasze hasło do konta SMTP $mail->SetLanguage("en", "admin/modules/phpmailer/language/"); $mail->SMTPDebug = 1; $mail->AddReplyTo($emailContact, $emailContact); //---------------------------------------------------------------------- ?> <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8" /> <title>Kwiaciarnia Pełna Marzeń - Rejestracja</title> <meta name="viewport" content="width=device-width, initial-scale=1.0" /> <link rel="shortcut icon" type="image/x-icon" href="assets/images/favicon.png"> <!-- Template CSS Files --> <link rel="stylesheet" type="text/css" href="assets/css/loginStuff/bootstrap.min.css" /> <link rel="stylesheet" type="text/css" href="assets/css/loginStuff/font-awesome.min.css" /> <link rel="stylesheet" type="text/css" href="assets/css/loginStuff/style.css" /> <link rel="stylesheet" type="text/css" href="assets/css/loginStuff/yellow.css" /> <script src="assets/js/loginStuff/modernizr.js"></script> <style type='text/css'> @media (min-width: 480px){ .komunikat { width: 450px; margin: 0 auto; background: #662f2f; border: 1px solid #7e3232; border-radius: 4px; color: #fff; text-align: center; padding: 10px; font-weight: bold; margin-bottom: 20px; } } @media (max-width: 480px){ .komunikat { width: 100%; background: #662f2f; border: 1px solid #7e3232; border-radius: 4px; color: #fff; text-align: center; padding: 10px; font-weight: bold; margin-bottom: 20px; } } </style> </head> <body class="double-diagonal dark auth-page"> <!-- Preloader Starts --> <div class="preloader" id="preloader"> <div class="logopreloader"> <img src="assets/images/loginStuff/logo-1.png" alt="logo-black"> </div> <div class="loader" id="loader"></div> </div> <!-- Preloader Ends --> <!-- Page Wrapper Starts --> <div class="wrapper"> <div class="container-fluid user-auth"> <div class="hidden-xs col-sm-4 col-md-4 col-lg-4"> <!-- Logo Starts --> <a class="logo" href="index"> <img id="single-logo" class="img-responsive" src="assets/images/loginStuff/logo-1.png" alt="logo"> </a> <!-- Logo Ends --> <!-- Slider Starts --> <div id="carousel-testimonials" class="carousel slide carousel-fade" data-ride="carousel"> <!-- Indicators Starts --> <ol class="carousel-indicators"> <li data-target="#carousel-testimonials" data-slide-to="0" class="active"></li> <li data-target="#carousel-testimonials" data-slide-to="1"></li> <li data-target="#carousel-testimonials" data-slide-to="2"></li> </ol> <!-- Indicators Ends --> <!-- Carousel Inner Starts --> <div class="carousel-inner"> <!-- Carousel Item Starts --> <div class="item active item-1"> <div> <blockquote> <p>To faktycznie rzetelna i uczciwa poczta kwiatowa, wszystko dokładnie tak jak zamówiłem, nawet uśmiech dziewczyny dla której przesłałem bukiet ;)</p> <footer><span>Marcin</span>, Biskupiec</footer> </blockquote> </div> </div> <!-- Carousel Item Ends --> <!-- Carousel Item Starts --> <div class="item item-2"> <div> <blockquote> <p>Bardzo profesjonalne podejście, dzięki tej kwiaciarni nasz ślub wyglądał naprawdę super. Pani Basiu jeszcze raz dziękujemy i wszystkim gorąco POLECAMY.</p> <footer><span>Marzena i Dawid</span></footer> </blockquote> </div> </div> <!-- Carousel Item Ends --> <!-- Carousel Item Starts --> <div class="item item-3"> <div> <blockquote> <p>W tej kwiaciarni naprawdę pracują ludzie z pasją którzy znają się na tym co robią. Niesamowita kreatywność i zawsze świeże kwiaty sprawiają że jestem ich stałą klientką.</p> <footer><span>Beata</span>, Biskupiec</footer> </blockquote> </div> </div> <!-- Carousel Item Ends --> </div> <!-- Carousel Inner Ends --> </div> <!-- Slider Ends --> </div> <div class="col-xs-12 col-sm-8 col-md-8 col-lg-8"> <!-- Logo Starts --> <a class="visible-xs" href="index"> <img id="logo-mobile-light" class="img-responsive mobile-logo white-l" src="assets/images/loginStuff/logo-1.png" style="margin-bottom: 20px;" alt="logo"> </a> <!-- Logo Ends --> <div class="form-container" style="background: #fff;"> <div> <!-- Main Heading Starts --> <?php function verificationReCaptcha($token) { $url = "https://www.google.com/recaptcha/api/siteverify?secret=6LdNZtYiAAAAAIfkaTAdgnapfB6McLaV7YTRSL7C&response=".$token."&remoteip=".$_SERVER["REMOTE_ADDR"]; $response = json_decode(file_get_contents($url)); return $response->success; } function validationRegisterForm($connect, $email, $imie, $nazwisko, $telefon, $pass, $pass2, $reCaptcha) { if (empty($email) || empty($imie) || empty($nazwisko) || empty($telefon) || empty($pass) || empty($pass2)) { return 'Nie wypełniono wszystkich pól!'; } if (!filter_var($email, FILTER_VALIDATE_EMAIL)) { return 'Podany adres e-mail jest niepoprawny!'; } if (!is_numeric($telefon) || strlen($telefon) > 9) { return 'Podany numer telefonu jest niepoprawny!'; } if ($pass !== $pass2) { return 'Wpisane hasła muszą być identyczne!'; } if (!isset($_POST['regulaminRegister']) || $_POST['regulaminRegister'] != '1') { return 'Regulamin musi zostać zaakceptowany!'; } if (!verificationReCaptcha($reCaptcha)) { return 'Błędnie rozwiązany kod reCaptcha'; } if (mysqli_num_rows(mysqli_query($connect,"SELECT * FROM `users` WHERE `email` = '$email'")) !== 0) { return 'Konto o podanym adresie e-mail już istnieje!'; } return true; } $tokenReCaptcha = $_POST["g-recaptcha-response"]; $tryRegister = trim(addslashes(strip_tags($_POST['tryRegister']))); $emailRegister = strtolower(trim(addslashes(strip_tags($_POST['emailRegister'])))); $imieRegister = trim(addslashes(strip_tags($_POST['imieRegister']))); $nazwiskoRegister = trim(addslashes(strip_tags($_POST['nazwiskoRegister']))); $telefonRegister = trim(addslashes(strip_tags($_POST['telefonRegister']))); $passRegister = trim(addslashes(strip_tags($_POST['passRegister']))); $pass2Register = trim(addslashes(strip_tags($_POST['pass2Register']))); if(!empty($tryRegister)){ if(($validationResult = validationRegisterForm($connect, $emailRegister, $imieRegister, $nazwiskoRegister, $telefonRegister, $passRegister, $pass2Register, $tokenReCaptcha)) === true){ $passRegister = sha1(md5($passRegister)); $active_code = rand(1111,9999); //----------------- $params = array('username' => "smsapi@ekwiatki.pl", 'password' => "64b26a27353092413c91a3841a713efe", 'to' => $telefonRegister, 'message' => 'Twoj kod aktywacyjny do Kwiaciarni Pelnej Marzen to: '.$active_code, ); if ($params['username']&&$params['password']&&$params['to']&&$params['message']) { $data = '?username='.$params['username'].'&password='.$params['password'].'&to='.$params['to'].'&message='.urlencode($params['message']); $plik = fopen('http://api.smsapi.pl/sms.do'.$data,'r'); $wynik = fread($plik,1024); fclose($plik); } //----------------- $newHash = sha1(md5(time().rand(9999,999999).$emailRegister)); $qNewID = mysqli_query($connect,"SELECT * FROM `users` ORDER BY `id` DESC LIMIT 1"); $nNewID = mysqli_num_rows($qNewID); if($nNewID > 0){ $sNewID = mysqli_fetch_array($qNewID); $newID = $sNewID['id'] + 1; } else {$newID = 1;} mysqli_query($connect,"INSERT INTO `users` (`id`,`email`, `password`, `telefon`, `imie`, `nazwisko`, `ulica`, `nr_domu`, `nr_lokalu`, `zip`, `miasto`, `firma_nazwa`, `firma_nip`, `firma_ulica`, `firma_nr_domu`, `firma_nr_lokalu`, `firma_zip`, `firma_miasto`, `active_code`, `active`, `hash`,`notifs_newsletter`,`notifs_points`,`points`,`data`,`spent_count`) VALUES ('$newID','$emailRegister','$passRegister','$telefonRegister','$imieRegister', '$nazwiskoRegister','','','','','','','','','','','','','$active_code','0', '$newHash','1','1','$register_pointsPOINTS','".date("Y-m-d H:i")."','0');"); if($register_pointsPOINTS > 0){ mysqli_query($connect,"INSERT INTO `points_history` (`user_id`,`data`,`opis`,`points`) VALUES ('$newID','".date("Y-m-d H:i")."','Punkty otrzymane za rejestrację w naszym sklepie internetowym!','$register_pointsPOINTS')"); //------------------------------------------ $mail->Subject = "ekwiatki.pl - Rejestracja";//temat maila $mail->AddEmbeddedImage("assets/images/logo.png", "baner1", "logo.png", "base64"); $text_body = '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="content-type" content="text/html; charset=UTF-8" /> </head> <body style="padding: 0px; margin: 0px;"> <div style="padding: 10px; background: #4b0c31; font-family: Arial;"> <div style="padding: 10px; background: #fff; font-family: Arial;"> '; $text_body .= '<BR><CENTER><img src="cid:baner1" style="margin-bottom: 10px;" /></CENTER><BR><BR>'; $text_body .= "Witaj, $imieRegister!<BR>Dziękujemy za założenie konta w serwisie ekwiatki.pl!<BR><BR>W prezencie otrzymujesz od nas na start <B>$register_pointsPOINTS punktów</B>.<BR>Zaloguj się do swojego profilu i dowiedz się, jak działają punkty."; $text_body .= "<BR><BR>Pozdrawiamy!<BR><B>Kwiaciarnia Pełna Marzeń</B><BR><BR>biuro@ekwiatki.pl<BR>www.ekwiatki.pl"; $text_body .= "</div><div style='clear: both; height: 4px;'></div><div style='float: right; color: #fff; font-family: Arial; padding-top: 5px;'>ekwiatki.pl</div><div style='clear: both; height: 4px;'></div></div></body></html>"; $mail->Body = $text_body; // adresatów dodajemy poprzez metode 'AddAddress' $mail->AddAddress($emailRegister,"Kwiaciarnia Pelna Marzen"); if(!$mail->Send()) echo $mail->ErrorInfo; // Clear all addresses and attachments $mail->ClearAddresses(); $mail->ClearAttachments(); //------------------------------------------ } } else { echo "<div class='komunikat'>".$validationResult."</div>"; $error = 1; } } ?> <!-- Main Heading Ends --> <!-- Form Starts --> <?php $tryRegister2 = trim(addslashes(strip_tags($_POST['tryRegister2']))); $email2 = trim(addslashes(strip_tags($_POST['email2']))); $active_code2 = trim(addslashes(strip_tags($_POST['active_code2']))); //---------------------------------------------------------- if($tryRegister2 == "1"){ $qCheckActive = mysqli_query($connect,"SELECT * FROM `users` WHERE `email` = '$email2'"); $sCheckActive = mysqli_fetch_array($qCheckActive); $rightActiveCode = $sCheckActive['active_code']; if($active_code2 == $rightActiveCode){ mysqli_query($connect,"UPDATE `users` SET `active` = '1' WHERE `email` = '$email2'"); correctIMG("Twoje konto zostało aktywowane!"); echo "<div style='height: 20px;'></div>"; echo "<a href='login' class='custom-button login' style='width: 155px;'>Zaloguj się</a>"; $correct = 1; } else {echo "<div class='komunikat'>Nieprawidłowy kod aktywacyjny!</div>";} } //---------------------------------------------------------- if(($tryRegister == "1" OR $tryRegister2 == "1") AND $error != 1 AND $correct != 1){ ?> <div class="text-center top-text"> <h1 style="text-transform: none; color: #4d4d4d;">Aktywuj <span>konto</span></h1> <p style="text-transform: none; color: #4d4d4d;">Podaj kod aktywacyjny otrzymany SMSem</p> </div> <form class="custom-form" action="" method="post"> <CENTER><span style="font-weight: bold; color: #4d4d4d;">Kod aktywacyjny:</span></CENTER> <div class="form-group"> <input class="form-control" name="active_code2" placeholder="Kod aktywacyjny" type="text" autocomplete="off" required style="text-align: center; background: #f9f9f9; border: 1px solid #efefef; color: #4d4d4d;"> </div> <input type='hidden' name='email2' value='<?=$emailRegister.$email2;?>'> <div style='clear: both; height: 20px;'></div> <div class="form-group"> <input type="hidden" name="tryRegister2" value="1"> <button class="custom-button login" type="submit">Aktywuj konto</button> </div> <div style='height: 15px;'></div> <CENTER><a href='smsProblem'>Nie otrzymałem SMSa</a></CENTER> <!-- Submit Form Button Ends --> </form> <?php } else { if($correct != 1){ ?> <div class="text-center top-text"> <h1 style="text-transform: none; color: #4d4d4d;">Załóż nowe <span>konto</span></h1> <p style="text-transform: none; color: #4d4d4d;">Wypełnij poniższe pola, aby w pełni korzystać ze sklepu</p> </div> <form id="register-form" class="custom-form" action="" method="post"> <input type='text' name='login' style='background: none; width: 1px; height: 1px; position: absolute; top: -10px; left: -10px; opacity: 0;'> <input type='password' name='pass' style='background: none; width: 1px; height: 1px; position: absolute; top: -10px; left: -10px; opacity: 0;'> <!-- Input Field Starts --> <div class="form-group"> <input class="form-control" name="emailRegister" placeholder="Adres e-mail" type="email" autocomplete="off" required style="background: #f9f9f9; border: 1px solid #efefef; color: #4d4d4d;"> </div> <div class="form-group"> <input class="form-control" name="imieRegister" placeholder="Imię" type="text" autocomplete="off" required style="background: #f9f9f9; border: 1px solid #efefef; color: #4d4d4d;"> </div> <div class="form-group"> <input class="form-control" name="nazwiskoRegister" placeholder="Nazwisko" type="text" autocomplete="off" required style="background: #f9f9f9; border: 1px solid #efefef; color: #4d4d4d;"> </div> <div class="form-group"> <input class="form-control" name="telefonRegister" pattern='^[0-9]{9}$' maxlength='9' placeholder="Numer telefonu (9 cyfr)" type="text" autocomplete="off" required style="background: #f9f9f9; border: 1px solid #efefef; color: #4d4d4d;"> <span style="color: #4d4d4d; font-size: 11px;"><i class="fa fa-info-circle"></i> Na ten numer wyślemy wiadomość z kodem weryfikacyjnym.</span> </div> <!-- Input Field Ends --> <!-- Input Field Starts --> <div class="form-group"> <input class="form-control" id="password" placeholder="Hasło" name="passRegister" type="password" autocomplete="off" required style="background: #f9f9f9; border: 1px solid #efefef; color: #4d4d4d;"> </div> <div class="form-group"> <input class="form-control" id="password" placeholder="Powtórz hasło" name="pass2Register" type="password" autocomplete="off" required style="background: #f9f9f9; border: 1px solid #efefef; color: #4d4d4d;"> </div> <div class="form-group" style="margin-bottom: 0px;"> <div class="col m--align-left"> <label class="m-checkbox m-checkbox--light" style="color: #4d4d4d; cursor: pointer;"> <input type="checkbox" name="regulaminRegister" value="1" style="float: left; margin-right: 5px; margin-top: 5px;" required>Akceptuję postanowienia <a href="terms" class="m-link m-link--focus" target="_blank">regulaminu</a> <span></span> </label> </div> </div> <div style="height: 15px;"></div> <!-- Submit Form Button Starts --> <div class="form-group"> <input type="hidden" name="tryRegister" value="1"> <button class="g-recaptcha custom-button login" data-sitekey="6LdNZtYiAAAAAKZN_Ghpc0jjyNWIBoXZlxnenaH3" data-callback="onSubmit" data-action="submit">Załóż konto</button> <p class="text-center" style="margin-top: 20px; color: #4d4d4d;">Masz już konto? <a href="login">Zaloguj się</a></p> </div> <!-- Submit Form Button Ends --> </form> <?php }} ?> <!-- Form Ends --> </div> </div> </div> </div> </div> <!-- Wrapper Ends --> <!-- Template JS Files --> <script src="https://www.google.com/recaptcha/api.js"></script> <script> function onSubmit(token) { document.getElementById("register-form").submit(); } </script> <script src="assets/js/loginStuff/jquery-2.2.4.min.js"></script> <script src="assets/js/loginStuff/jquery.easing.1.3.js"></script> <script src="assets/js/loginStuff/bootstrap.min.js"></script> <!-- Main JS Initialization File --> <script src="assets/js/loginStuff/custom.js"></script> </body> </html>