123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381 |
- <?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/ad.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="bloki.js"></script>
- <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>Администратор: <?php echo $_SESSION['login'];
- ?></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="togglePanel()"><i class="fas fa-gem"></i><span>Пользователи</span></div>
- <div class="nav-button" onclick="togglePanel1()"><i class="fas fa-gem"></i><span>Заявки на регистрацию</span><div class ="colvo_z"> <?php include 'count_z.php'; ?><?php echo $countik?></div></div>
- <div class="nav-button" onclick="togglePanel2()"><i class="fas fa-gem"></i><span>Отзывы</span></div>
- <div class="nav-button" onclick="togglePanel3()"><i class="fas fa-gem"></i><span>Склад продукции</span></div>
- <div class="nav-button" onclick="togglePanel4()"><i class="fas fa-gem"></i><span>Добавить продукцию</span></div>
- <div class="nav-button" onclick="togglePanel5()"><i class="fas fa-gem"></i><span>Статистика</span></div>
- <div class="nav-button" onclick="togglePanel6()"><i class="fas fa-gem"></i><span>Заказы</span><div class ="colvo_z"> <?php include 'count_z.php'; ?><?php echo $countik1?></div></div>
- <div id="nav-content-highlight"></div>
- </div>
- <input id="nav-footer-toggle" type="checkbox"/>
- <!-- <div id="nav-footer">
-
-
- </div> -->
- </div>
-
- <div class="warehouse" id="warehouse">
- <?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><?php echo $Products['title'];?></p>
-
- <p>остаток на складе: <?php echo $Products['count_p'];?></p>
- </div>
- <div class="discription"><?php echo $Products['discription'];?></div>
- </div>
- <?php
- }
- ?>
- </div>
- </div>
-
- <div class="statistics" id="statistics">
- <div> <?php include 'count_user.php'; ?>
- <div class="content_status">
- <div class="krug3">
- </div>
- <p> Средний балл сайта: <?php echo $Avg_b?></p>
- </div>
- <div class="content_status">
- <div class="krug2">
- </div>
-
- <p> Количество пользователей: <?php echo $count?></p>
- </div>
-
- <div class="content_status">
- <div class="krug1">
- </div>
- <p> Количество комментариев: <?php echo $count1?></p>
- </div>
- <div class="s"><a href="Statisic.csv" download><p>Получить данные о заказах</p><a></div>
-
- </div>
-
- </div>
- <script>
- function zabirat(){
- var dan =document.getElementById('myDiv').innerText;
- document.getElementById('id').value =dan;
- }
- function zabirat1(){
- var dan =document.getElementById('myDiv').innerText;
- var login1 =document.getElementById('login1').innerText;
- var region1 =document.getElementById('region1').innerText;
- var FIOo =document.getElementById('FIOo').innerText;
- var Email1 =document.getElementById('Email1').innerText;
- var password1 =document.getElementById('password1').innerText;
- document.getElementById('id1').value =dan;
- document.getElementById('login').value =login1;
- document.getElementById('region').value =region1;
- document.getElementById('FIO').value =FIOo;
- document.getElementById('Email').value =Email1;
- document.getElementById('password').value =password1;
- }
- function zabirat2(){
- var dan =document.getElementById('hide_order').innerText;
- document.getElementById('id_hide').value =dan;
-
- }
- function zabirat4(){
- var login =document.getElementById('login_order').innerText;
- var count =document.getElementById('hide_count').innerText;
- var prod =document.getElementById('product_id').innerText;
- var summ =document.getElementById('sum_order').innerText;
- document.getElementById('login_orders').value =login;
- document.getElementById('id_count_s').value =count;
- document.getElementById('summ_order').value =summ;
- document.getElementById('hide_product').value =prod;
- var dan =document.getElementById('hide_order').innerText;
- document.getElementById('id_hider').value =dan;
-
-
-
-
-
- var dan1 =document.getElementById('hide_order').innerText;
- var count1 =document.getElementById('hide_count').innerText;
- var prod1 =document.getElementById('product_id').innerText;
-
- document.getElementById('id_hide').value =dan1;
- document.getElementById('hide_c').value = count1;
- document.getElementById('hide_pr').value = prod1;
- }
- function zabirat3(){
- }
- </script>
- <div class="zajavki" id="zajavki">
- <?php include 'connect.php';
- $result = mysqli_query($mysql, "SELECT * FROM `ZUsers`");
- ?>
- <div class="product_card_conteiner1" id="b">
- <?php
- While($ZUsers= mysqli_fetch_assoc($result)){
- ?>
-
- <div class="product_card1">
- <div class="text_card">
- <div class="ouput_text" id="login1">
- <?php echo $ZUsers['login'];?></div>
- <div class="ouput_text"id="region1">
- <?php echo $ZUsers['region'];?></div>
- <div class="ouput_text" id="FIOo">
- <?php echo $ZUsers['FIO'];?></div>
- <div class="ouput_text" id="Email1">
- <?php echo $ZUsers['Email'];?></div>
- <div class="ouput_text" id="password1">
- <?php echo $ZUsers['password'];?></div>
- <div class="ouput_text">Номер заявки:<p id="myDiv" >
- <?php echo$ZUsers['id'];?></p> </div>
- </div>
- <div class="knopkii">
- <form action="delete_record.php" method="post">
- <input type="hidden" id="id" name="id" class="delete" >
- <button type="submit" class="but_otprav" onclick="zabirat()">Отклонить</button>
- </form>
- <form action="add_use.php" method="post">
- <input type="hidden" id="id1" name="id1" class="delete" >
- <input class="inp" type="hidden" id="FIO" name="FIO" placeholder="ФИО" required>
- <input class="inp" type="hidden" id="region" name="region" placeholder="регион" required>
- <input class="inp" type="hidden" id="login" name="login" placeholder="логин" required>
- <input class="inp" type="hidden" id="Email" name="Email" placeholder="Email" required>
- <input class="inp" type="hidden" id="password" name="password" placeholder="пароль" required>
- <button type="submit" class="but_otprav" onclick="zabirat1()">Принять</button>
- </form>
- </div>
- </div>
- <?php
- }
- ?>
- </div>
- </div>
- <div class="orders" id="orders">
- <?php include 'connect.php';
- $result = mysqli_query($mysql, "SELECT * FROM `Orders1` where 'condition_order' =0");
- ?>
- <div class="product_card_conteiner1" id="b">
- <?php
- While($Orders1= mysqli_fetch_assoc($result)){
- ?>
-
- <div class="product_card1">
- <div class="text_card">
- <div class="ouput_text" id="id_login">Пользователь:
- <?php echo $Orders1['id_login'];?></div>
- <div class="ouput_text" id="summ">Сумма:
- <?php echo $Orders1['summ'];?></div>
- <div class="ouput_text" id="count_prod"> Количество:
- <?php echo $Orders1['count_prod'];?></div>
- <div class="hide" id="hide_count"><?php echo $Orders1['count_prod'];?> </div>
- <div class="hide" id="product_id"><?php echo $Orders1['product_id'];?> </div>
- <div class="hide" id="login_order"><?php echo $Orders1['id_login'];?> </div>
- <div class="hide" id="sum_order"><?php echo $Orders1['summ'];?> </div>
- <div class="ouput_text">Код товара:
- <?php echo $Orders1['product_id'];?></div>
- <div class="hide" id="hide_order"><?php echo $Orders1['id'];?> </div>
- </div>
- <div class="knopkii">
- <form action="delete_order.php" method="post">
- <input type="hidden" id="id_hide" name="id_hide" class="delete" >
- <button type="submit" class="but_otprav" onclick="zabirat2()">Отклонить</button>
- </form>
- <!-- <form action="update_order.php" method="post">
- <input type="hidden" id="hide_c" name="hide_c" class="delete" >
- <input type="hidden" id="hide_pr" name="hide_pr" class="delete" >
- <button type="submit" class="but_otprav" onclick="zabirat3()">Принять</button>
- </form> -->
- <form action="update_status.php" method="post">
- <input type="hidden" id="id_hider" name="id_hider" class="delete" >
- <input type="hidden" id="summ_order" name="summ_order" class="delete" >
- <input type="hidden" id="hide_product" name="hide_product" class="delete" >
- <input type="hidden" id="id_count_s" name="id_count_s" class="delete" >
- <input type="hidden" id="login_orders" name="login_orders" class="delete" >
- <input type="hidden" id="hide_c" name="hide_c" class="delete" >
- <input type="hidden" id="hide_pr" name="hide_pr" class="delete" >
- <button type="submit" class="but_otprav" onclick="zabirat4()">Обновить статус</button>
- </form>
- </div>
- </div>
- <?php
- }
- ?>
- </div>
- </div>
- <div class="add_product" id="add_product">
- <div id="modal" class="modal">
- <div class="modal-content">
-
- <h2>Добавить товар</h2>
- <form id="myForm" action="add_product.php" method="POST" class="forma">
- <input class="inp" type="text" id="title" name="title" placeholder="Название товара" required>
- <input class="inp" type="text" id="discription" name="discription" placeholder="Описание" required>
- <input class="inp" type="number" id="count_p" name="count_p" placeholder="Количество" required>
- <input class="inp" type="number" id="price" name="price" placeholder="Цена" required>
- <input class="inp" type="file" id="img" name="img" placeholder="Изображение" required>
- <p class="ft">Заполните необходимые поля, чтобы сформировать новую карточку товара.</p>
- <button type="submit" class="but_otprav">Добавить</button>
-
- </form>
-
- </div>
- </div>
- </div>
- <div class="reviews" id="reviews">
- <?php include 'connect.php';
- $result1 = mysqli_query($mysql, "SELECT * FROM `reviews`");
- ?>
- <div class="com-containe" id="bb">
- <?php
- While($reviews= mysqli_fetch_assoc($result1)){
- ?>
- <div class="com">
- <div class="krug"></div>
- <p class="text_in_com">Дата:
- <?php echo $reviews['date'];?></p>
- <p class="text_in_com">Комментарий:
- <?php echo $reviews['review'];?> </p>
- <p class="text_in_com">Оценка:
- <?php echo $reviews['rating'];?></p>
-
- </div>
- <?php
- }
- ?>
- </div>
- </div>
- <div class="users" id="users">
- <?php include 'connect.php';
- $result1 = mysqli_query($mysql, "SELECT * FROM `Users`");
- ?>
- <div class="com-containe" id="bb">
- <?php
- While($Users= mysqli_fetch_assoc($result1)){
- ?>
- <div class="com">
- <div class="krug"></div>
- <p class="text_in_com">Логин:
- <?php echo $Users['login'];?></p>
- <p class="text_in_com"> Регион:
- <?php echo $Users['region'];?> </p>
- <p class="text_in_com"> ФИО:
- <?php echo $Users['FIO'];?></p>
- <p class="text_in_com"> Почта:
- <?php echo $Users['Email'];?> </p>
- <p class="text_in_com"> Пароль:
- <?php echo $Users['password'];?> </p>
- <p class="text_in_com"> Роль:
- <?php echo $Users['role'];?> </p>
- </div>
- <?php
- }
- ?>
- </div>
- </div>
- </body>
- <footer>
- </footer>
- </html>
|