Advertisement
Guest User

Untitled

a guest
Aug 18th, 2017
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.85 KB | None | 0 0
  1. <?php
  2. $root_path = './../';
  3. define('PHPBB_ROOT_PATH', $root_path);
  4.  
  5. define('IN_PHPBB', true);
  6. $phpbb_root_path = PHPBB_ROOT_PATH;
  7. $phpEx = substr(strrchr(__FILE__, '.'), 1);
  8. include($root_path . 'common_site.php');
  9. //$template->set_custom_template($root_path . 'styles/NintendoLand_Subsilver/template/posting_buttoms.html', 'posting_buttons');
  10.  
  11. $art_id = request_var('id', 0);
  12.  
  13. /* ----------- Start Art ----------- */
  14. $sql_array = array(
  15. 'SELECT' => 'g.*, u.*',
  16. 'FROM' => array(
  17. 'phpbb_gallery' => 'g',
  18. USERS_TABLE => 'u',
  19. ),
  20. 'WHERE' => 'g.art_id = ' . $art_id . ' AND g.art_author = u.user_id',
  21. );
  22. $sql = $db->sql_build_query('SELECT', $sql_array);
  23. $result = $db->sql_query($sql);
  24. while ($row = $db->sql_fetchrow($result))
  25. {
  26. $art_title = $row['art_title'];
  27. $img_dir = 'artwork/';
  28. $img_file = $img_dir . $row['art_filename'];
  29. $size = getimagesize($img_file);
  30. $s_prod_img = '<img src="' . $img_file . '" alt="' . $row['art_title'] . '" style="margin-bottom: 4px; border: 1px solid #000000;" ' . imageResize($size[0], $size[1], 500) . ' /><br />';
  31. $template->assign_vars(array(
  32. 'ART_ID' => $row['art_id'],
  33. 'ART_FILENAME' => $row['art_filename'],
  34. 'ART_AUTHOR' => $row['username'],
  35. 'ART_AUTHOR_COLOR' => $row['user_colour'],
  36. 'U_ART_AUTHOR' => $row['art_author'],
  37. 'ART_TITLE' => $row['art_title'],
  38. 'ART_DESCRIPTION' => $row['art_description'],
  39. 'ART_DATE' => $user->format_date($row['art_date'], 'D M, Y'),
  40. 'ART' => $s_prod_img,
  41. ));
  42. }
  43. /* ----------- End Art ----------- */
  44.  
  45. $template->assign_vars(array(
  46. 'PAGE_TITLE' => $art_title . ' - Art Gallery - NintendoLand',
  47. 'BREADCRUMBS' => '&#187; <a href="index.php">Art Gallery</a> &#187; <a href="art.php?id=' . $art_id . '">' . $art_title . '</a>',
  48. ));
  49.  
  50. $template->set_filenames(array(
  51. 'body' => 'gallery/art.html'
  52. ));
  53.  
  54. page_footer(false);
  55. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement