Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
- <html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
- <title>Untitled Document</title>
- <style type="text/css">
- * {
- padding: 0;
- margin: 0;
- }
- .pozadi {
- height: 200px;
- width: 800px;
- background-color: #696;
- margin-top: 25px;
- margin-left: 400px;
- }
- .foto {
- height: 100px;
- width: 100px;
- margin-top: 40px;
- margin-left: 150px;
- }
- .polozka {
- font-size: 22px;
- color: #666;
- background-color: #0F0;
- margin-top: 20px;
- float: left;
- margin-left: 350px;
- position: absolute;
- }
- .block {
- position: relative;
- display: inline-block;
- }
- .cancel {
- position: absolute;
- top: 10px;
- right: 10px;
- font-size: 22px;
- background-color: #E7F3DB;
- }
- .cancel ul {
- list-style: none;
- }
- .cancel ul ul {
- display: none;
- }
- .cancel ul ul {
- color: #600;
- }
- .cancel ul li:hover>ul {
- display: block;
- }
- .po2 {
- background-color: #699;
- height: 200px;
- width: 450px;
- margin-top: 20px;
- margin-left: 400px;
- }
- .odhl {
- font-size: 26px;
- color: #603;
- margin-left: 1000px;
- margin-top: 5px;
- position: absolute;
- background-color: #399;
- width: 300px;
- }
- .prihla {
- color: #FC6;
- position: absolute;
- font-size: 25px;
- background-color: #F69;
- float: left;
- margin-top: 5px;
- margin-left: 822px;
- }
- .opavdu {
- font-size: 22px;
- color: #30C;
- margin-top: 20px;
- margin-left: 32px;
- float: left;
- }
- #sel {
- font-size: 15px;
- float: left;
- margin-top: 25px;
- margin-left: 15px;
- }
- #buon {
- font-size: 22px;
- float: left;
- margin-top: 100px;
- margin-left: -250px;
- }
- </style>
- </head>
- <body>
- <?php
- if (isset($_GET['delete'])) {
- $cela_cesta= $_GET['delete'];
- $bbbb=unlink($cela_cesta);
- function is_dir_empty($cela_cesta,$bbbb)
- {
- if (!is_readable($cela_cesta))
- return null;
- return (scandir($bbbb)==2);
- }
- $xx=is_dir_empty($cela_cesta,$bbbb);
- if ($xx) {
- echo "Složka je prázdná"; //Vůbec nefunguje.
- } else {
- echo "Ve složce jsou obrázky"; //To funguje dobře
- }
- }
- ?>
- <?php
- $adresar = '.';
- $cesta = scandir($adresar, SCANDIR_SORT_DESCENDING);
- foreach ($cesta as $doadresare) {
- if (is_dir($doadresare)) {
- if ($doadresare != '.' && $doadresare != '..') { ?>
- <div class='pozadi'>
- <div class="polozka"> <?php echo $doadresare; ?></div>
- <div class='block'>
- <?php
- if (is_dir($adresar)) {
- $cestaq = scandir($doadresare);
- for ($i = 0; $i < count($cestaq); $i++) {
- if ($cestaq[$i] != '.' && $cestaq[$i] != '..') { ?>
- <img src="<?php echo $doadresare . '/' . $cestaq[$i] ?>" class="foto" />
- <div class='cancel'>
- <ul>
- <li>Menu<ul>
- <li><a href="?delete=<?php echo $doadresare . '/' . $cestaq[$i] ?>">Delete</a></li>
- </ul>
- </li>
- </ul>
- </div>
- </div>
- <?php }
- }
- }
- }
- } ?>
- </div>
- <span class="pozadi">
- <?php } ?>
- </span>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement