hjkhghopjkertteerterterterertertrtoirh
bnmbertsurhetertertertertertertertpdf'tdfg
/
home
/
easy3158
/
domains
/
ekwiatki.pl
/
public_html
/
Upload FileeE
HOME
<?php include("inc/head.php"); if(empty($_SESSION['user_id'])){header("Location: login");exit;} ?> <body> <!-- header start --> <?php include("inc/top.php"); ?> <!--====================================================--> <div class="breadcrumb-area gray-bg"> <div class="container"> <div class="breadcrumb-content"> <ul> <li><a href="index">ekwiatki.pl</a></li> <li class="active">Ustawienia</li> </ul> </div> </div> </div> <!-- my account start --> <?php $q = mysqli_query($connect,"SELECT * FROM `users` WHERE `id` = ".$_SESSION['user_id']); $s = mysqli_fetch_array($q); $notifs_newsletter = $s['notifs_newsletter']; $notifs_points = $s['notifs_points']; //============================================================== ?> <div class="checkout-area pb-55 pt-75"> <div class="container"> <div class="row"> <div class="ml-auto mr-auto col-lg-9"> <div class="checkout-wrapper"> <?php $tryPOST = trim(addslashes(strip_tags($_POST['try']))); $newsletterPOST = trim(addslashes(strip_tags($_POST['newsletter']))); $pointsPOST = trim(addslashes(strip_tags($_POST['points']))); if(!empty($tryPOST) AND $tryPOST == "1"){ mysqli_query($connect,"UPDATE `users` SET `notifs_newsletter` = '$newsletterPOST' WHERE `id` = ".$_SESSION['user_id']); mysqli_query($connect,"UPDATE `users` SET `notifs_points` = '$pointsPOST' WHERE `id` = ".$_SESSION['user_id']); echo ' <CENTER> <img src="assets/images/done.gif" style="max-width: 180px;"> <h4 style="margin-bottom: 16px;">Zmiany zostały zapisane!</h4> <a class="btn btn-danger" style="border-radius: 4px;" href="settings">Powrót</a> </CENTER> '; } else { ?> <div id="faq" class="panel-group"> <div class="panel panel-default"> <div class="panel-heading"> <h5 class="panel-title"><a data-toggle="collapse" data-parent="#faq" href="#my-account-1">Ustawienia konta</a></h5> </div> <div id="my-account-1" class="panel-collapse collapse show"> <div class="panel-body"> <div class="billing-information-wrapper"> <form action="" method="post"> <div class="row"> <div class="col-lg-6 col-md-6"> <div class="billing-info"> <label>Newsletter</label> <select name="newsletter" class="form form-control" required> <?php if($notifs_newsletter == "1"){ echo ' <option value="1">Chcę otrzymywać</option> <option value="0">Nie chcę otrzymywać</option> '; } else { echo ' <option value="0">Nie chcę otrzymywać</option> <option value="1">Chcę otrzymywać</option> '; } ?> </select> </div> </div> <div class="col-lg-6 col-md-6"> <div class="billing-info"> <label style="text-transform: none;">Mailowe powiadomienia o otrzymanych punktach</label> <select name="points" class="form form-control" required> <?php if($notifs_points == "1"){ echo ' <option value="1">Chcę otrzymywać</option> <option value="0">Nie chcę otrzymywać</option> '; } else { echo ' <option value="0">Nie chcę otrzymywać</option> <option value="1">Chcę otrzymywać</option> '; } ?> </select> </div> </div> </div> <div class="billing-back-btn"> <div class="billing-back"> </div> <div class="billing-btn"> <input type="hidden" name="try" value="1"> <button type="submit">Zapisz</button> </div> </div> </form> </div> </div> </div> </div> </div> <?php } ?> </div> </div> </div> </div> </div> <!--====================================================--> <?php include("inc/footer.php"); ?> <!-- all js here --> <?php include("inc/footerScripts.php"); ?> </body> </html>