Advertisement
ahoj111

Untitled

Apr 18th, 2022
971
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  2. <html xmlns="http://www.w3.org/1999/xhtml">
  3.  
  4. <head>
  5.     <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  6.     <title>Untitled Document</title>
  7.  
  8.  
  9.  
  10.     <style type="text/css">
  11.         * {
  12.             padding: 0;
  13.             margin: 0;
  14.         }
  15.  
  16.         .pozadi {
  17.             height: 200px;
  18.             width: 800px;
  19.             background-color: #696;
  20.             margin-top: 25px;
  21.             margin-left: 400px;
  22.         }
  23.  
  24.         .foto {
  25.             height: 100px;
  26.             width: 100px;
  27.             margin-top: 40px;
  28.             margin-left: 150px;
  29.         }
  30.  
  31.         .polozka {
  32.             font-size: 22px;
  33.             color: #666;
  34.             background-color: #0F0;
  35.             margin-top: 20px;
  36.             float: left;
  37.             margin-left: 350px;
  38.             position: absolute;
  39.         }
  40.  
  41.         .block {
  42.             position: relative;
  43.             display: inline-block;
  44.         }
  45.  
  46.         .cancel {
  47.             position: absolute;
  48.             top: 10px;
  49.             right: 10px;
  50.             font-size: 22px;
  51.             background-color: #E7F3DB;
  52.         }
  53.  
  54.         .cancel ul {
  55.             list-style: none;
  56.         }
  57.  
  58.         .cancel ul ul {
  59.             display: none;
  60.         }
  61.  
  62.         .cancel ul ul {
  63.             color: #600;
  64.         }
  65.  
  66.         .cancel ul li:hover>ul {
  67.             display: block;
  68.         }
  69.  
  70.         .po2 {
  71.             background-color: #699;
  72.             height: 200px;
  73.             width: 450px;
  74.             margin-top: 20px;
  75.             margin-left: 400px;
  76.         }
  77.  
  78.         .odhl {
  79.             font-size: 26px;
  80.             color: #603;
  81.             margin-left: 1000px;
  82.             margin-top: 5px;
  83.             position: absolute;
  84.             background-color: #399;
  85.             width: 300px;
  86.         }
  87.  
  88.         .prihla {
  89.             color: #FC6;
  90.             position: absolute;
  91.             font-size: 25px;
  92.             background-color: #F69;
  93.             float: left;
  94.             margin-top: 5px;
  95.             margin-left: 822px;
  96.         }
  97.  
  98.         .opavdu {
  99.             font-size: 22px;
  100.             color: #30C;
  101.             margin-top: 20px;
  102.             margin-left: 32px;
  103.             float: left;
  104.         }
  105.  
  106.         #sel {
  107.             font-size: 15px;
  108.             float: left;
  109.             margin-top: 25px;
  110.             margin-left: 15px;
  111.         }
  112.  
  113.         #buon {
  114.             font-size: 22px;
  115.             float: left;
  116.             margin-top: 100px;
  117.             margin-left: -250px;
  118.         }
  119.     </style>
  120. </head>
  121.  
  122. <body>
  123.  
  124.     <?php
  125.     if (isset($_GET['delete'])) {
  126.         $cela_cesta= $_GET['delete'];
  127.         if ($bbbb=unlink($cela_cesta)){
  128.    
  129.           function is_dir_empty($cela_cesta,$bbbb)
  130.         {
  131.             if (!is_readable($cela_cesta)) return null;
  132.             $cela_cesta=$_POST['null'];
  133.             return count($cela_cesta) ==$bbbb;
  134.             return (count(scandir($cela_cesta))==$bbbb);
  135.         }
  136.      $xx=is_dir_empty($cela_cesta,$bbbb);
  137.      if ($xx   ) {
  138.             echo "Složka je prázdná";
  139.         } else {
  140.             echo "Ve složce jsou obrázky";
  141.         }}
  142.                 }
  143.     ?>
  144.  
  145.  
  146.  
  147.     <?php
  148.     $adresar = '.';
  149.     $cesta = scandir($adresar, SCANDIR_SORT_DESCENDING);
  150.     foreach ($cesta as $doadresare) {
  151.         if (is_dir($doadresare)) {
  152.             if ($doadresare != '.' &&   $doadresare != '..') { ?>
  153.                 <div class='pozadi'>
  154.                     <div class="polozka"> <?php echo $doadresare; ?></div>
  155.  
  156. <div class='block'>
  157.                     <?php
  158.                     if (is_dir($adresar)) {
  159.                         $cestaq = scandir($doadresare);
  160.                         for ($i = 0; $i < count($cestaq); $i++) {
  161.                             if ($cestaq[$i] != '.' && $cestaq[$i] != '..') { ?>
  162.                                
  163.  
  164.                                     <img src="<?php echo $doadresare . '/' . $cestaq[$i] ?>" class="foto" />
  165.                                     <div class='cancel'>
  166.                                         <ul>
  167.                                             <li>Menu<ul>
  168.                                                     <li><a href="?delete=<?php echo $doadresare . '/' . $cestaq[$i] ?>">Delete</a></li>
  169.                                                 </ul>
  170.                                             </li>
  171.                                         </ul>
  172.                                     </div>
  173.                                 </div>
  174.  
  175.  
  176.             <?php  }
  177.                         }
  178.                     }
  179.                 }
  180.             } ?>
  181.                 </div>
  182.                 <span class="pozadi">
  183.                 <?php } ?>
  184.                 </span>
  185. </body>
  186.  
  187. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement