Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $cdb = new PDO('mysql:dbname=xx;host=localhost', 'xxx', 'xxx');
- foreach ($cdb->query("SELECT * FROM images ORDER BY posted DESC LIMIT 3") AS $img)
- {
- $twofirst = substr($img['hash'], 0, 2);
- echo '
- <a style="position: relative; display: block; height: 140px;" href="/booru/post/view/' . $img['id'] . '" target="_top">
- <img src="booru/timthumb.php?src=images/' . $twofirst . '/' . $img['hash'] . '&h=125&w=125&q=100" width="125px" style="border-style: none"/>
- </a>
- ';
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement