123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257 |
- <?php session_start(); ?>
- <html lang="en">
- <head id="top">
- <meta charset="UTF-8">
- <meta http-equiv="X-UA-Compatible" content="IE=edge">
- <link rel="stylesheet" href="styles/product_style.css">
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
- <title>Shop</title>
- </head>
- <header>
- <div class="logo_content">
-
- <div class="logo">SITE-SHOP</div>
- </div>
- <div class="hd">
- <div class = "login1">
- <button type="submit" class = "login"><a href="index.html">
- <p class="log" id="openModalBtn3">Выйти</p></a>
- </button>
- </div>
- </div>
- </header>
- <body>
- <script src="k.js"></script>
- <script src="bloki.js"></script>
- <div id="modal" class="modal">
- <div class="modal-content">
- <span class="close" id="close" ondblclick="closeb()">X</span>
- <h2>Заявка на регистрацию</h2>
- <form id="myForm" action="registration.php" method="POST" class="forma">
- <input class="inp" type="text" id="FIO" name="FIO" placeholder="ФИО" required>
- <input class="inp" type="text" id="region" name="region" placeholder="регион" required>
- <input class="inp" type="text" id="login" name="login" placeholder="логин" required>
- <input class="inp" type="email" id="Email" name="Email" placeholder="Email" required>
- <input class="inp" type="password" id="password" name="password" placeholder="пароль" required>
- <p class="ft">внимательно заполните каждое поле, когда администратор одобрит регистрацию, вам придет уведомление на почту.</p>
- <button type="submit" class="but_otprav">Отправить</button>
-
- </form>
-
- </div>
- </div>
- <div id="Basket" class="Basket">
- <div class="modal-content">
- <span class="close" id="close" ondblclick="CloseBasket()">X</span>
- <h2>Оформление заказа</h2>
-
- <input class="inp" type="text" id="product_id" name="product_id" placeholder="Артикул" required>
- <input class="inp" type="number" id="count_prod" name="count_prod" placeholder="количество" required>
-
- <input class="inp" type="hidden" id="summ" name="summ" required>
- <div class="but_otprav1" onclick="count_sum()">Рассчитать </div>
- <div id="productPrice"></div>
-
-
- <p class="t" id="sum"></p>
- <p class="ft">внимательно заполните каждое поле, когда заказ будет проведен, он отобразиться у вас во вкладке профиля</p>
-
- <script>
- function count_sum(){
- var product_id = document.getElementById("product_id").value;
- var count_prod = document.getElementById("count_prod").value;
- var xhr = new XMLHttpRequest();
- var sum =0;
- xhr.open("GET", "inp_price.php?product_id=" + product_id, true);
- xhr.onreadystatechange = function() {
- if (xhr.readyState === 4 && xhr.status === 200) {
- var price = xhr.responseText;
- sum = price*count_prod;
- document.getElementById("productPrice").innerText = sum;
- document.getElementById('su').value =sum;
- }
- };
- xhr.send();
- document.getElementById('productid').value =product_id;
- document.getElementById('countprod').value =count_prod;
- }
- </script>
- <!-- </form> -->
- <form id="myForm" action="add_orders.php" method="POST" class="forma">
- <input type="hidden" name="productid" id="productid">
- <input type="hidden" name="countprod" id="countprod">
- <input type="text" name="id_login" id="id_login" placeholder="повторите логин">
- <input type="hidden" name="su" id="su">
- <button class="but_otprav1" type="submit" >Заказать</button>
- </form>
-
-
- </div>
- </div>
-
- <div class="orders" id="orders">
- <?php include 'connect.php';
- session_start();
- $login=$_SESSION['login'];
- $result = mysqli_query($mysql, "SELECT * FROM `Orders` WHERE `login` = '$login' ");
- ?>
- <div class="product_card_conteiner1" id="b">
- <?php
- While($Orders= mysqli_fetch_assoc($result)){
- ?>
-
- <div class="product_card1">
- <div class="text_card">
- <div class="ouput_text" id="login">Пользователь:
- <?php echo $Orders['login'];?></div>
- <div class="ouput_text" id="summ_order">Сумма:
-
- <?php echo $Orders['summ_order'];?></div>
- <div class="ouput_text" id="count_order"> Количество:
- <?php echo $Orders['count_order'];?></div>
- <div class="ouput_text">Артикул:
- <?php echo $Orders['id_product'];?></div>
- </div>
- <div class="knopkii">
- <div class="yes">оплачено</div>
- </div>
- </div>
- <?php
- }
- ?>
- </div>
- </div>
-
- <div id="nav-bar">
- <input id="nav-toggle" type="checkbox"/>
- <div id="nav-header"><a id="nav-title" target="_blank"><i class="fab fa-codepen"></i><div></div><div id="userrr">Пользователь: <?php echo $_SESSION['login'];?></div></a>
- <label for="nav-toggle"><span id="nav-toggle-burger"></span></label>
- <hr/>
- </div>
- <div id="nav-content">
-
- <div class="nav-button" id="open" onclick="openBasket()"><i class="fas fa-gem"></i><span>Корзина</span></div>
- <div class="nav-button" onclick="togglePanel6()"><i class="fas fa-gem"></i><span>Покупки</span></div>
-
- <div id="nav-content-highlight"></div>
- </div>
- <input id="nav-footer-toggle" type="checkbox"/>
- </div>
- <div id="modal1" class="modal1">
- <div class="modal-content1">
- <span class="close1" ondblclick="closebb()">X</span>
- <h2>Анонимный комментарий</h2>
- <form id="myForm1" action="review.php" method="post" class="forma1">
- <div class="rating-area">
-
- <input type="radio" id="star-5" name="rating" value="5">
- <label for="star-5" title="Оценка «5»"></label>
- <input type="radio" id="star-4" name="rating" value="4">
- <label for="star-4" title="Оценка «4»"></label>
- <input type="radio" id="star-3" name="rating" value="3">
- <label for="star-3" title="Оценка «3»"></label>
- <input type="radio" id="star-2" name="rating" value="2">
- <label for="star-2" title="Оценка «2»"></label>
- <input type="radio" id="star-1" name="rating" value="1">
- <label for="star-1" title="Оценка «1»"></label>
- </div>
- <label for="review"></label>
- <input type="text" name="review" id="review" required placeholder="Введите текст комментария">
-
- <button type="submit" class="but_otprav">Отправить</button>
- </form>
-
- </div><div id="successMessage1" class="success-messege1">
- <span class="close1">×</span>
- <p>Заявка отправлена</p>
- </div>
- </div>
- <div class="info_block" id="block2">
- <div id="overlay1" class="overlay1" >
- </div>
-
-
- </div>
- <div class="navigation">
- <div ><a href="index_a.php" class ="navigationItemRL">главная</a></div>
- <div> <a href="product.php" class ="navigationItem">продукция</a></div>
- </div>
- <div class="product_card_conteiner">
- <?php include 'connect.php';
- $result = mysqli_query($mysql, "SELECT * FROM `Products`");
- ?>
- <div class="product_card_conteiner">
- <?php
- While($Products= mysqli_fetch_assoc($result)){
- ?>
- <div class="product_card">
- <div class="img_cont">
- <div class="im"><?php echo $Products['img'];?></div>
- </div>
- <div class="name_star">
- <p class="t" id="title"><?php echo $Products['title'];?></p>
- <!-- <p class="t">★★★★★ : </p> -->
-
- <p class="t" id="price1">Стоимость: <?php echo $Products['price'];?></p>
- <p class="t">остаток на складе: <?php echo $Products['count_p'];?></p>
- <p class="t" id="article">Артикул: <?php echo $Products['id'];?></p>
- <div class="discription"><?php echo $Products['discription'];?></div>
- </div>
-
- <!-- <button class="but_otprav1" id="open" onclick="imputArticle(); openBasket()">Заказать</button> -->
- </div>
- <?php
- }
- ?>
- </div>
- </div>
- </body>
- <footer>
- </footer>
- </html>
|