Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $root_path = './../';
- define('PHPBB_ROOT_PATH', $root_path);
- define('IN_PHPBB', true);
- $phpbb_root_path = PHPBB_ROOT_PATH;
- $phpEx = substr(strrchr(__FILE__, '.'), 1);
- include($root_path . 'common_site.php');
- //$template->set_custom_template($root_path . 'styles/NintendoLand_Subsilver/template/posting_buttoms.html', 'posting_buttons');
- $art_id = request_var('id', 0);
- /* ----------- Start Art ----------- */
- $sql_array = array(
- 'SELECT' => 'g.*, u.*',
- 'FROM' => array(
- 'phpbb_gallery' => 'g',
- USERS_TABLE => 'u',
- ),
- 'WHERE' => 'g.art_id = ' . $art_id . ' AND g.art_author = u.user_id',
- );
- $sql = $db->sql_build_query('SELECT', $sql_array);
- $result = $db->sql_query($sql);
- while ($row = $db->sql_fetchrow($result))
- {
- $art_title = $row['art_title'];
- $img_dir = 'artwork/';
- $img_file = $img_dir . $row['art_filename'];
- $size = getimagesize($img_file);
- $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 />';
- $template->assign_vars(array(
- 'ART_ID' => $row['art_id'],
- 'ART_FILENAME' => $row['art_filename'],
- 'ART_AUTHOR' => $row['username'],
- 'ART_AUTHOR_COLOR' => $row['user_colour'],
- 'U_ART_AUTHOR' => $row['art_author'],
- 'ART_TITLE' => $row['art_title'],
- 'ART_DESCRIPTION' => $row['art_description'],
- 'ART_DATE' => $user->format_date($row['art_date'], 'D M, Y'),
- 'ART' => $s_prod_img,
- ));
- }
- /* ----------- End Art ----------- */
- $template->assign_vars(array(
- 'PAGE_TITLE' => $art_title . ' - Art Gallery - NintendoLand',
- 'BREADCRUMBS' => '» <a href="index.php">Art Gallery</a> » <a href="art.php?id=' . $art_id . '">' . $art_title . '</a>',
- ));
- $template->set_filenames(array(
- 'body' => 'gallery/art.html'
- ));
- page_footer(false);
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement