Kode_Omut

редактирование

Jan 19th, 2019
135
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.69 KB | None | 0 0
  1.  
  2. <!DOCTYPE html>
  3. <html>
  4. <head>
  5. <meta charset="utf-8">
  6. </head>
  7. <!-- Latest compiled and minified CSS -->
  8. <link rel="stylesheet" href="//netdna.bootstrapcdn.com/bootstrap/3.3.2/css/bootstrap.min.css">
  9.  
  10. <!-- Optional theme -->
  11. <link rel="stylesheet" href="//netdna.bootstrapcdn.com/bootstrap/3.3.2/css/bootstrap-theme.min.css">
  12.  
  13. <!-- Latest compiled and minified JavaScript -->
  14. <script src="//netdna.bootstrapcdn.com/bootstrap/3.3.2/js/bootstrap.min.js"></script>
  15. <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.2.0/jquery.min.js"></script>
  16. <style type="text/css">
  17.  
  18. square {
  19. position: absolute;
  20. top: 70px;
  21. right: 1070px;
  22. }
  23. square1 {
  24. position: absolute;
  25. top: 160px;
  26. right: 180px;
  27. }
  28.  
  29. square2 {
  30. position: absolute;
  31. top: 70px;
  32. right: 950px;
  33. }
  34.  
  35. square3 {
  36. position: absolute;
  37. top: 70px;
  38. right: 900px;
  39. }
  40.  
  41. .modalDialog {
  42. background: none repeat scroll 0 0 rgba(0, 0, 0, 0.8);
  43. bottom: 0;
  44. font-family: Arial,Helvetica,sans-serif;
  45. left: 0;
  46. opacity: 0;
  47. pointer-events: none;
  48. position: fixed;
  49. right: 0;
  50. top: 0;
  51. transition: opacity 400ms ease-in 0s;
  52. z-index: 99999;
  53. }
  54. .modalDialog:target {
  55. opacity: 1;
  56. pointer-events: auto;
  57. }
  58. .modalDialog > div {
  59. background: linear-gradient(#fff, #999) repeat scroll 0 0 rgba(0, 0, 0, 0);
  60. border-radius: 10px;
  61. margin: 10% auto;
  62. padding: 5px 20px 13px;
  63. position: relative;
  64. width: 400px;
  65. }
  66. .close {
  67. background: none repeat scroll 0 0 #606061;
  68. border-radius: 12px;
  69. box-shadow: 1px 1px 3px #000;
  70. color: #ffffff;
  71. font-weight: bold;
  72. line-height: 25px;
  73. position: absolute;
  74. right: -12px;
  75. text-align: center;
  76. text-decoration: none;
  77. top: -10px;
  78. width: 24px;
  79. }
  80. .close:hover {
  81. background: none repeat scroll 0 0 #00d9ff;
  82. }
  83.  
  84. .c {
  85. border: 1px solid #333; /* Рамка */
  86. display: inline-block;
  87. padding: 5px 15px; /* Поля */
  88. text-decoration: none; /* Убираем подчёркивание */
  89. color: #000; /* Цвет текста */
  90. }
  91. .c:hover {
  92. box-shadow: 0 0 5px rgba(0,0,0,0.3); /* Тень */
  93. background: linear-gradient(to bottom, #fcfff4, #e9e9ce); /* Градиент */
  94. color: #a00;
  95. }
  96.  
  97.  
  98. </style>
  99. <body>
  100.  
  101.  
  102. <!--------------------------------------------Кнопка добавления---------------------------------------------->
  103. <square>
  104. <a class="c" href="#openModal">Добавление</a>
  105. <div id="openModal" class="modalDialog">
  106. <div>
  107. <a class="close1" title="Close1" href="#close">X</a>
  108. <h2>Добавление</h2>
  109. <!--<h2>Добавление</h2>-->
  110. <?php
  111. include 'form.php';
  112. ?>
  113.  
  114. </div>
  115. </div>
  116. </square>
  117. <!------------------------------------------------------------------------------------------>
  118.  
  119.  
  120. <!--------------------------------------------Кнопка удаления----------------------------------------------
  121. <square2>
  122. <a class="c" href="#openModal1">Удаления</a>
  123. <div id="openModal1" class="modalDialog">
  124. <div>
  125. <a class="close1" title="Close1" href="#close">X</a>
  126. <h2>Удаление</h2>
  127. <?php
  128. //include 'del.php';
  129. ?>
  130. </div>
  131. </div>
  132. </square2>
  133. !------------------------------------------------------------------------------------------>
  134.  
  135. <!--------------------------------------------Кнопка редактирования----------------------------------------------
  136. <square3>
  137. <a class="c" href="#openModal2">Редактирование</a>
  138. <div id="openModal2" class="modalDialog">
  139. <div>
  140. <a class="close1" title="Close1" href="#close">X</a>
  141. <h2>Редактирование</h2>
  142. <?php
  143. //include 'reda.php';
  144. ?>
  145. </div>
  146. </div>
  147. </square3>
  148. !------------------------------------------------------------------------------------------>
  149.  
  150.  
  151.  
  152. <!-------Форма добавления---------->
  153. <?php
  154. include '11.php';
  155. ?>
  156. <?php
  157. //include 'form.php';
  158. ?>
  159. <!----------------->
  160. <square1>
  161. <?php
  162. require_once("2.php");
  163. if($connection == false){
  164. echo "Error!";
  165. echo mysqli_connect_errno();
  166. exit();
  167. }
  168. if (isset($_GET['page'])){
  169. $page = $_GET['page'];
  170. } else {
  171. $page = 1;
  172. }
  173. $limit = 12;
  174. $number = ($page * $limit) - $limit;
  175. $res_count = mysqli_query($connection, "SELECT COUNT(*) FROM zakaz1 ");
  176. $row = mysqli_fetch_row($res_count);
  177. $total = $row[0];
  178. $str_pag = ceil($total / $limit);
  179. $query = mysqli_query($connection, "SELECT * FROM zakaz1 ORDER BY Nomer DESC LIMIT $number, $limit");
  180. ?>
  181.  
  182. <?php
  183. $n1 = $_POST['n1'];
  184. //$n1='1';
  185. echo "$n1";
  186. //echo "$n1";
  187.  
  188. //============================================================================================ТАБЛИЦА
  189. echo "<table class='table table-inverse' align='center'>";
  190. echo "<th>Номер заказаᅠ ᅠ ᅠ ᅠ ᅠ ᅠ ᅠ ᅠ ᅠ ᅠ ᅠ ᅠ ᅠ ᅠ ᅠ ᅠ ᅠ ᅠ </th><th>Дата заказа ᅠ ᅠ ᅠ ᅠ ᅠ ᅠ ᅠ ᅠ ᅠ </th><th>Сумма ᅠᅠ ᅠ ᅠ ᅠ ᅠ </th>";
  191. //=============================================================================================
  192. for ($i = 1; $i <=$str_pag; $i++){
  193. echo " <a href=1.php?page=".$i.">".$i."</a> ";
  194. }
  195. if(mysqli_num_rows($query) == 0){
  196. echo "There are no records!";
  197. } else {
  198.  
  199. echo "<br/>";
  200. while($article = mysqli_fetch_assoc($query)){
  201. if($article['Nomer'] >= '1'){
  202. 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>';
  203.  
  204.  
  205. }
  206.  
  207. }
  208. echo "</table>";
  209. }
  210. //////////////////////////////////////////////////
  211. ?>
  212.  
  213. </square1>
  214. </body>
  215. </html>
Advertisement
Add Comment
Please, Sign In to add comment