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">Przypomnienia</li> </ul> </div> </div> </div> <!-- my account start --> <div class="shop-page-area pt-75 pb-75"> <div class="container"> <div class="row flex-row-reverse"> <div class="col-lg-12"> <div class="grid-list-product-wrapper"> <div class="product-grid product-view pb-20"> <!--====================================--> <div class="row"> <div class="col-lg-8 col-md-6" style="margin-bottom: 20px;"> <div class="cart-tax"> <div class="title-wrap"> <h4 class="cart-bottom-title section-bg-gray"><?php if($_GET['edit'] != "1"){echo "Dodaj przypomnienie";} else {echo "Edytuj przypomnienie";} ?></h4> </div> <div class="tax-wrapper"> <div id="odbiorcaForm"> <?php if($_GET['edit'] != "1"){ //=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=# $try = trim(addslashes(strip_tags($_POST['try']))); $data = trim(addslashes(strip_tags($_POST['data']))); $ile_dni = trim(addslashes(strip_tags($_POST['ile_dni']))); $rodzaj = trim(addslashes(strip_tags($_POST['rodzaj']))); $tresc = trim(addslashes(strip_tags($_POST['tresc']))); if(!empty($try) AND $try == "1"){ mysqli_query($connect,"INSERT INTO `reminder` (`user_id`,`data`,`ile_dni`,`rodzaj`,`tresc`) VALUES ('".$_SESSION['user_id']."','$data','$ile_dni','$rodzaj','$tresc')"); echo ' <CENTER> <h4 style="margin-bottom: 20px;">Zapisano przypomnienie!</h4> </CENTER> '; } ?> <form action="" method="post"> <div class="row"> <div class="col-md-6" style="margin-bottom: 12px;"> Podaj datę wydarzenia <input type="text" id="datepicker" name="data" placeholder="Data wydarzenia" style="background: #fff;" required> </div> <div class="col-md-6" style="margin-bottom: 12px;"> Ile dni wcześniej mamy Cię powiadomić? <select name="ile_dni" class="form form-control" style="background: #fff; height: 43px;" required> <option>1</option> <option>2</option> <option>3</option> <option>5</option> <option>7</option> <option>10</option> <option>14</option> <option>30</option> <option>60</option> </select> </div> </div> <div class="row"> <div class="col-md-6" style="margin-bottom: 12px;"> Rodzaj przypomnienia <select name="rodzaj" class="form form-control" style="background: #fff; height: 43px;" required> <option></option> <option>Imieniny</option> <option>Urodziny</option> <option>Rocznica</option> <option>Inne</option> </select> </div> <div class="col-md-6" style="margin-bottom: 12px;"> Dodatkowe informacje <input type="text" name="tresc" placeholder="*Dodatkowe informacje" style="background: #fff;" maxlength="150"> </div> </div> <div style="text-align: right;"> <input type="hidden" name="try" value="1"> <button type='submit' class='btn btn-primary' style='border-radius: 5px; padding: 5px 15px 5px 15px; cursor: pointer; background: #e93c01; color: #fff; border: 1px solid #de3801; height: auto;'>Dodaj</button> </div> </form> <?php } //=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=# else { $id3 = trim(addslashes(strip_tags($_GET['id']))); //=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=# $try = trim(addslashes(strip_tags($_POST['try']))); $data = trim(addslashes(strip_tags($_POST['data']))); $ile_dni = trim(addslashes(strip_tags($_POST['ile_dni']))); $rodzaj = trim(addslashes(strip_tags($_POST['rodzaj']))); $tresc = trim(addslashes(strip_tags($_POST['tresc']))); if(!empty($try) AND $try == "1"){ mysqli_query($connect,"UPDATE `reminder` SET `data` = '$data' WHERE `id` = $id3"); mysqli_query($connect,"UPDATE `reminder` SET `ile_dni` = '$ile_dni' WHERE `id` = $id3"); mysqli_query($connect,"UPDATE `reminder` SET `rodzaj` = '$rodzaj' WHERE `id` = $id3"); mysqli_query($connect,"UPDATE `reminder` SET `tresc` = '$tresc' WHERE `id` = $id3"); echo ' <CENTER> <h4 style="margin-bottom: 20px;">Zapisano zmiany!</h4> </CENTER> '; } //========================================================= $q3 = mysqli_query($connect,"SELECT * FROM `reminder` WHERE `id` = $id3 AND `user_id` = ".$_SESSION['user_id']); $n3 = mysqli_num_rows($q3); if($n3 > 0){ $s3 = mysqli_fetch_array($q3); $data3 = $s3['data']; $ile_dni3 = $s3['ile_dni']; $rodzaj3 = $s3['rodzaj']; $tresc3 = $s3['tresc']; ?> <form action="" method="post"> <div class="row"> <div class="col-md-6" style="margin-bottom: 12px;"> Podaj datę wydarzenia <input type="text" id="datepicker" value="<?=$data3;?>" name="data" placeholder="Data wydarzenia" style="background: #fff;" required> </div> <div class="col-md-6" style="margin-bottom: 12px;"> Ile dni wcześniej mamy Cię powiadomić? <select name="ile_dni" class="form form-control" style="background: #fff; height: 43px;" required> <option><?=$ile_dni3;?></option> <option disabled>-------------</option> <option>1</option> <option>2</option> <option>3</option> <option>5</option> <option>7</option> <option>10</option> <option>14</option> <option>30</option> <option>60</option> </select> </div> </div> <div class="row"> <div class="col-md-6" style="margin-bottom: 12px;"> Rodzaj przypomnienia <select name="rodzaj" class="form form-control" style="background: #fff; height: 43px;" required> <option><?=$rodzaj3;?></option> <option disabled>-------------</option> <option>Imieniny</option> <option>Urodziny</option> <option>Rocznica</option> <option>Inne</option> </select> </div> <div class="col-md-6" style="margin-bottom: 12px;"> Dodatkowe informacje <input type="text" name="tresc" value="<?=$tresc3;?>" placeholder="*Dodatkowe informacje" style="background: #fff;" maxlength="150"> </div> </div> <div style="text-align: right;"> <input type="hidden" name="try" value="1"> <button type='submit' class='btn btn-primary' style='border-radius: 5px; padding: 5px 15px 5px 15px; cursor: pointer; background: #e93c01; color: #fff; border: 1px solid #de3801; height: auto;'>Zapisz zmiany</button> </div> </form> <?php } else {header("Location: reminder");exit;} //=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=# } ?> </div> </div> </div> </div> <div class="col-lg-4 col-md-6"> <div class="grand-totall"> <div class="title-wrap"> <h4 class="cart-bottom-title section-bg-gary-cart">Przypomnienia</h4> </div> <div style="height: 20px;"></div> <?php $q = mysqli_query($connect,"SELECT * FROM `reminder` WHERE `user_id` = ".$_SESSION['user_id']." ORDER BY `data` ASC"); $n = mysqli_num_rows($q); if($n > 0){ $i = 0; echo "<table class='table table-striped'>"; while($s = mysqli_fetch_array($q)){ $i++; $dataS = $s['data']; $rodzajS = $s['rodzaj']; $id = $s['id']; echo " <tr> <td style='width: 1%;' nowrap='nowrap'>$i.</td> <td>$dataS</td> <td>$rodzajS</td> <td style='width: 1%; text-align: right;' nowrap='nowrap'> <a href='editReminder-$id'><i class='la la-edit'></i></a> <a href='delReminder-$id'><i class='la la-trash'></i></a> </td> </tr> "; } echo "</table>"; } else {echo "<CENTER><B>Nie masz przypomnień!</B></CENTER>";} ?> </div> </div> </div> <!--====================================--> </div> </div> </div> </div> </div> </div> <!--====================================================--> <?php include("inc/footer.php"); ?> <!-- all js here --> <?php include("inc/footerScripts.php"); ?> </body> </html>