Advertisement
Vodkaholic

Untitled

May 14th, 2011
331
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.50 KB | None | 0 0
  1. <?php
  2. $cdb = new PDO('mysql:dbname=xxx;host=localhost', 'xxx', 'xxx');
  3. $twofirst = substr($img['hash'], 0, 2);
  4. foreach ($cdb->query("SELECT * FROM images ORDER BY posted DESC LIMIT 9") AS $img)
  5. {
  6. echo '
  7. <a style="position: relative; display: block; height: 200px;" href="/booru/post/view/' . $img['id'] . '" target="_blank">
  8.  
  9. <img src="booru/timthumb.php?src=thumbs/' . $img['hash'] . '/' . $twofirst . '&h=125&w=125" width="125px" style="border-style: none"/>
  10. </a>
  11. ';
  12.  
  13. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement