Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- function _loadImages() {
- if (isset($_SESSION['_userID'])) {
- $images = glob("upload" . DIRECTORY_SEPARATOR . $_SESSION['_userID'] . DIRECTORY_SEPARATOR . "*");
- if ($images) {
- shuffle($images);
- return $images;
- } else {
- return (bool) 0;
- }
- }
- }
- ?>
- <?php foreach (_loadImages() as $img) : ?>
- <a href="<?= $img ?>" target='_blank' title="">
- <img src="<?= $img ?>" alt="" />
- </a>
- <?php endforeach; ?>
Advertisement
Add Comment
Please, Sign In to add comment