Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <html>
- <head>
- <meta charset="utf-8">
- </head>
- <!-- Latest compiled and minified CSS -->
- <link rel="stylesheet" href="//netdna.bootstrapcdn.com/bootstrap/3.3.2/css/bootstrap.min.css">
- <!-- Optional theme -->
- <link rel="stylesheet" href="//netdna.bootstrapcdn.com/bootstrap/3.3.2/css/bootstrap-theme.min.css">
- <!-- Latest compiled and minified JavaScript -->
- <script src="//netdna.bootstrapcdn.com/bootstrap/3.3.2/js/bootstrap.min.js"></script>
- <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.2.0/jquery.min.js"></script>
- <style type="text/css">
- square {
- position: absolute;
- top: 70px;
- right: 1070px;
- }
- square1 {
- position: absolute;
- top: 160px;
- right: 180px;
- }
- square2 {
- position: absolute;
- top: 70px;
- right: 950px;
- }
- square3 {
- position: absolute;
- top: 70px;
- right: 900px;
- }
- square4 {
- position: absolute;
- top: 73px;
- right: 750px;
- }
- .modalDialog {
- background: none repeat scroll 0 0 rgba(0, 0, 0, 0.8);
- bottom: 0;
- font-family: Arial,Helvetica,sans-serif;
- left: 0;
- opacity: 0;
- pointer-events: none;
- position: fixed;
- right: 0;
- top: 0;
- transition: opacity 400ms ease-in 0s;
- z-index: 99999;
- }
- .modalDialog:target {
- opacity: 1;
- pointer-events: auto;
- }
- .modalDialog > div {
- background: linear-gradient(#fff, #999) repeat scroll 0 0 rgba(0, 0, 0, 0);
- border-radius: 10px;
- margin: 10% auto;
- padding: 5px 20px 13px;
- position: relative;
- width: 400px;
- }
- .close {
- background: none repeat scroll 0 0 #606061;
- border-radius: 12px;
- box-shadow: 1px 1px 3px #000;
- color: #ffffff;
- font-weight: bold;
- line-height: 25px;
- position: absolute;
- right: -12px;
- text-align: center;
- text-decoration: none;
- top: -10px;
- width: 24px;
- }
- .close:hover {
- background: none repeat scroll 0 0 #00d9ff;
- }
- .c {
- border: 1px solid #333; /* Рамка */
- display: inline-block;
- padding: 5px 15px; /* Поля */
- text-decoration: none; /* Убираем подчёркивание */
- color: #000; /* Цвет текста */
- }
- .c:hover {
- box-shadow: 0 0 5px rgba(0,0,0,0.3); /* Тень */
- background: linear-gradient(to bottom, #fcfff4, #e9e9ce); /* Градиент */
- color: #a00;
- }
- </style>
- <body>
- <!--------------------------------------------Кнопка добавления---------------------------------------------->
- <square>
- <a class="c" href="#openModal">Добавление</a>
- <div id="openModal" class="modalDialog">
- <div>
- <a class="close1" title="Close1" href="#close">X</a>
- <h2>Добавление</h2>
- <!--<h2>Добавление</h2>-->
- <?php
- include 'form.php';
- ?>
- </div>
- </div>
- </square>
- <!------------------------------------------------------------------------------------------>
- <!--------------------------------------------Кнопка удаления----------------------------------------------
- <square2>
- <a class="c" href="#openModal1">Удаления</a>
- <div id="openModal1" class="modalDialog">
- <div>
- <a class="close1" title="Close1" href="#close">X</a>
- <h2>Удаление</h2>
- <?php
- //include 'del.php';
- ?>
- </div>
- </div>
- </square2>
- !------------------------------------------------------------------------------------------>
- <!--------------------------------------------Кнопка редактирования----------------------------------------------
- <square3>
- <a class="c" href="#openModal2">Редактирование</a>
- <div id="openModal2" class="modalDialog">
- <div>
- <a class="close1" title="Close1" href="#close">X</a>
- <h2>Редактирование</h2>
- <?php
- //include 'reda.php';
- ?>
- </div>
- </div>
- </square3>
- !------------------------------------------------------------------------------------------>
- <square4>
- <?php
- include '11.php';
- ?>
- </square4>
- <!-------Форма добавления---------->
- <?php
- //include 'form.php';
- ?>
- <!----------------->
- <square1>
- <?php
- require_once("2.php");
- if($connection == false){
- echo "Error!";
- echo mysqli_connect_errno();
- exit();
- }
- if (isset($_GET['page'])){
- $page = $_GET['page'];
- } else {
- $page = 1;
- }
- $limit = 12;
- $number = ($page * $limit) - $limit;
- $res_count = mysqli_query($connection, "SELECT COUNT(*) FROM zakaz1 ");
- $row = mysqli_fetch_row($res_count);
- $total = $row[0];
- $str_pag = ceil($total / $limit);
- $query = mysqli_query($connection, "SELECT * FROM zakaz1 ORDER BY Nomer DESC LIMIT $number, $limit");
- ?>
- <?php
- //$n1 = $_POST['n1'];
- //$n1='1';
- //echo "$n1";
- //echo "$n1";
- //============================================================================================ТАБЛИЦА
- echo "<table class='table table-inverse' align='center'>";
- echo "<th>Номер заказаᅠ ᅠ ᅠ ᅠ ᅠ ᅠ ᅠ ᅠ ᅠ ᅠ ᅠ ᅠ ᅠ ᅠ ᅠ ᅠ ᅠ ᅠ </th><th>Дата заказа ᅠ ᅠ ᅠ ᅠ ᅠ ᅠ ᅠ ᅠ ᅠ </th><th>Сумма ᅠᅠ ᅠ ᅠ ᅠ ᅠ </th>";
- //=============================================================================================
- for ($i = 1; $i <=$str_pag; $i++){
- echo " <a href=1.php?page=".$i.">".$i."</a> ";
- }
- if(mysqli_num_rows($query) == 0){
- echo "There are no records!";
- } else {
- echo "<br/>";
- while($article = mysqli_fetch_assoc($query)){
- //if (!empty($n1))
- //{
- if($article['Nomer'] >= '1'){
- echo '<tr><td>'.$article['Nomer'].'</td><td>'.$article['Date1'].'</td><td>'.$article['Sum'].'</td><td><a href=del.php?Nomer='.$article['Nomer'].'>Удалить</a></td><td><a href=reda.php?Nomer='.$article['Nomer'].'>Редактировать</a></td></tr>';
- //}
- }
- }
- echo "</table>";
- }
- //////////////////////////////////////////////////
- ?>
- </square1>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement