/ Published in: PHP
Expand |
Embed | Plain Text
<!DOCTYPE html> <html lang="en"> <head> <meta http-equiv="content-type" content="text/html; charset=utf-8" /> <meta name="robots" content="all, index, follow" /> <meta name="description" content="" /> <meta name="keywords" content="" /> <meta name="author" content="" /> <title>Images</title> <link rel="shortcut icon" href="#" /> </head> <body> <div id="wrap" class="clearfix"> <? } } //path to directory to scan $directory = ""; //get all image files with a .jpg extension. //print each file name ?> <? foreach($images as $image){ ?> <div style="width:100px; float:left; margin:20px; margin-bottom:50px; font-size:11px; font-family:arial; text-align:center;"> <div style="width:100px; height:150px; overflow:hidden;"><a href="<?=$image;?>" target="_blank"><img src="<?=$image;?>" alt="" width="100"/></a></div> <p><?=$image;?></p> <p><a href="<?=$_SERVER['PHP_SELF'];?>?option=delete&f=<?=$image;?>" class="delete" title="Are you sure you want to delete <?=$image;?>">Delete?</a></p> </div> <? } ?> </div><!-- end of wrap --> <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.1/jquery.min.js"></script> <script> $(".delete").click(function() { return window.confirm(this.title || 'Delete this record?'); }); </script> </body> </html>
You need to login to post a comment.
