|
From: OryNider <ory...@us...> - 2008-02-01 14:12:42
|
Update of /cvsroot/mxbb/mx_smartor/includes In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv32052/includes Modified Files: Tag: core28x album_pic.php album_showpage.php album_thumbnail.php Log Message: some admin files fixed Index: album_showpage.php =================================================================== RCS file: /cvsroot/mxbb/mx_smartor/includes/album_showpage.php,v retrieving revision 1.12.2.2 retrieving revision 1.12.2.3 diff -C2 -d -r1.12.2.2 -r1.12.2.3 *** album_showpage.php 15 Jan 2008 10:56:13 -0000 1.12.2.2 --- album_showpage.php 1 Feb 2008 14:12:27 -0000 1.12.2.3 *************** *** 44,47 **** --- 44,48 ---- include_once($phpbb_root_path . 'includes/functions_color_groups.' . $phpEx); include_once($phpbb_root_path . 'includes/bbcode.' . $phpEx); + if ( isset($_POST['message']) ) { *************** *** 171,175 **** $template->assign_block_vars('disable_pic_nuffed', array( 'L_PIC_UNNUFFED_CLICK' => $lang['Nuff_UnClick'], ! 'U_PIC_UNNUFFED_CLICK' => append_sid(this_smartor_mxurl("smartor_mode=album_showpage" . '&pic_id=' . $pic_id . $full_size_param)), ) ); --- 172,176 ---- $template->assign_block_vars('disable_pic_nuffed', array( 'L_PIC_UNNUFFED_CLICK' => $lang['Nuff_UnClick'], ! 'U_PIC_UNNUFFED_CLICK' => mx_append_sid(this_smartor_mxurl("smartor_mode=album_showpage" . '&pic_id=' . $pic_id . $full_size_param)), ) ); *************** *** 244,250 **** $pic_array_id = $i; } ! $pic_list .= 'Pic[' . $i . '] = \'' . append_sid(this_smartor_mxurl("smartor_mode=" . $pic_link . '&pic_id=' . $total_pic_rows[$i]['pic_id']), true) . '\'; ' . "\n"; /* ! $pic_list .= 'Pic[' . $i . '] = \'' . append_sid(album_append_uid($pic_link . $phpEx . '?pic_id=' . $total_pic_rows[$i]['pic_id']), true) . '\'; ' . "\n"; */ $tit_list .= 'Tit[' . $i . '] = \'' . $total_pic_rows[$i]['pic_title'] . '\'; ' . "\n"; --- 245,251 ---- $pic_array_id = $i; } ! $pic_list .= 'Pic[' . $i . '] = \'' . mx_append_sid(this_smartor_mxurl("smartor_mode=" . $pic_link . '&pic_id=' . $total_pic_rows[$i]['pic_id']), true) . '\'; ' . "\n"; /* ! $pic_list .= 'Pic[' . $i . '] = \'' . mx_append_sid(album_append_uid($pic_link . $phpEx . '?pic_id=' . $total_pic_rows[$i]['pic_id']), true) . '\'; ' . "\n"; */ $tit_list .= 'Tit[' . $i . '] = \'' . $total_pic_rows[$i]['pic_title'] . '\'; ' . "\n"; *************** *** 361,365 **** for($i = $min_pic_counter; $i <= $max_pic_counter; $i++) { ! $thumbnail_file = append_sid(this_smartor_mxurl('smartor_mode=album_thumbnail&pic_id=' . $total_pic_rows[$i]['pic_id'], TRUE)); if ( ($album_config['thumbnail_cache'] == true) && ($album_config['quick_thumbs'] == true) ) { --- 362,366 ---- for($i = $min_pic_counter; $i <= $max_pic_counter; $i++) { ! $thumbnail_file = mx_append_sid(this_smartor_mxurl('smartor_mode=album_thumbnail&pic_id=' . $total_pic_rows[$i]['pic_id'], TRUE)); if ( ($album_config['thumbnail_cache'] == true) && ($album_config['quick_thumbs'] == true) ) { *************** *** 384,388 **** else { ! $pic_preview = 'onmouseover="showtrail(\'' . append_sid(this_fap_addonurl('smartor_mode=album_picm&pic_id=' . $total_pic_rows[$i]['pic_id'])) . '\',\'' . addslashes($total_pic_rows[$i]['pic_title']) . '\', ' . $album_config['midthumb_width'] . ', ' . $album_config['midthumb_height'] . ')" onmouseout="hidetrail()"'; } if ($album_config['show_pics_nav'] == 1) --- 385,389 ---- else { ! $pic_preview = 'onmouseover="showtrail(\'' . mx_append_sid(this_fap_addonurl('smartor_mode=album_picm&pic_id=' . $total_pic_rows[$i]['pic_id'])) . '\',\'' . addslashes($total_pic_rows[$i]['pic_title']) . '\', ' . $album_config['midthumb_width'] . ', ' . $album_config['midthumb_height'] . ')" onmouseout="hidetrail()"'; } if ($album_config['show_pics_nav'] == 1) *************** *** 390,394 **** $template->assign_block_vars('pics_nav.pics', array( 'U_PIC_THUMB' => $thumbnail_file, ! 'U_PIC_LINK' => ($i == $new_pic_array_id) ? '#' : append_sid(this_smartor_mxurl('smartor_mode=album_showpage&pic_id=' . $total_pic_rows[$i]['pic_id'] . $full_size_param . $nuffimage_vars . $sort_append)), 'PIC_TITLE' => $total_pic_rows[$i]['pic_title'], 'PIC_PREVIEW' => ($i == $new_pic_array_id) ? '' : $pic_preview, --- 391,395 ---- $template->assign_block_vars('pics_nav.pics', array( 'U_PIC_THUMB' => $thumbnail_file, ! 'U_PIC_LINK' => ($i == $new_pic_array_id) ? '#' : mx_append_sid(this_smartor_mxurl('smartor_mode=album_showpage&pic_id=' . $total_pic_rows[$i]['pic_id'] . $full_size_param . $nuffimage_vars . $sort_append)), 'PIC_TITLE' => $total_pic_rows[$i]['pic_title'], 'PIC_PREVIEW' => ($i == $new_pic_array_id) ? '' : $pic_preview, *************** *** 405,409 **** for($i = $min_pic_counter; $i >= $max_pic_counter; $i--) { ! $thumbnail_file = append_sid(this_smartor_mxurl('smartor_mode=album_thumbnail&pic_id=' . $total_pic_rows[$i]['pic_id'], TRUE)); if ( ($album_config['thumbnail_cache'] == true) && ($album_config['quick_thumbs'] == true) ) { --- 406,410 ---- for($i = $min_pic_counter; $i >= $max_pic_counter; $i--) { ! $thumbnail_file = mx_append_sid(this_smartor_mxurl('smartor_mode=album_thumbnail&pic_id=' . $total_pic_rows[$i]['pic_id'], TRUE)); if ( ($album_config['thumbnail_cache'] == true) && ($album_config['quick_thumbs'] == true) ) { *************** *** 428,432 **** else { ! $pic_preview = 'onmouseover="showtrail(\'' . append_sid(this_fap_addonurl('smartor_mode=album_picm&pic_id=' . $total_pic_rows[$i]['pic_id'], TRUE)) . '\',\'' . addslashes($total_pic_rows[$i]['pic_title']) . '\', ' . $album_config['midthumb_width'] . ', ' . $album_config['midthumb_height'] . ')" onmouseout="hidetrail()"'; } if ($album_config['show_pics_nav'] == 1) --- 429,433 ---- else { ! $pic_preview = 'onmouseover="showtrail(\'' . mx_append_sid(this_fap_addonurl('smartor_mode=album_picm&pic_id=' . $total_pic_rows[$i]['pic_id'], TRUE)) . '\',\'' . addslashes($total_pic_rows[$i]['pic_title']) . '\', ' . $album_config['midthumb_width'] . ', ' . $album_config['midthumb_height'] . ')" onmouseout="hidetrail()"'; } if ($album_config['show_pics_nav'] == 1) *************** *** 434,438 **** $template->assign_block_vars('pics_nav.pics', array( 'U_PIC_THUMB' => $thumbnail_file, ! 'U_PIC_LINK' => ($i == $new_pic_array_id) ? '#' : append_sid(this_smartor_mxurl('smartor_mode=album_showpage&pic_id=' . $total_pic_rows[$i]['pic_id'] . $full_size_param . $nuffimage_vars . $sort_append)), 'PIC_TITLE' => $total_pic_rows[$i]['pic_title'], 'PIC_PREVIEW' => ($i == $new_pic_array_id) ? '' : $pic_preview, --- 435,439 ---- $template->assign_block_vars('pics_nav.pics', array( 'U_PIC_THUMB' => $thumbnail_file, ! 'U_PIC_LINK' => ($i == $new_pic_array_id) ? '#' : mx_append_sid(this_smartor_mxurl('smartor_mode=album_showpage&pic_id=' . $total_pic_rows[$i]['pic_id'] . $full_size_param . $nuffimage_vars . $sort_append)), 'PIC_TITLE' => $total_pic_rows[$i]['pic_title'], 'PIC_PREVIEW' => ($i == $new_pic_array_id) ? '' : $pic_preview, *************** *** 452,456 **** $template->assign_block_vars('pic_nuffed_enabled', array( 'L_PIC_NUFFED_CLICK' => $lang['Nuff_Click'], ! 'U_PIC_NUFFED_CLICK' => append_sid(this_smartor_mxurl("smartor_mode=album_showpage" . '&pic_id=' . $pic_id . $full_size_param . '&nuffimage=true')), ) ); --- 453,457 ---- $template->assign_block_vars('pic_nuffed_enabled', array( 'L_PIC_NUFFED_CLICK' => $lang['Nuff_Click'], ! 'U_PIC_NUFFED_CLICK' => mx_append_sid(this_smartor_mxurl("smartor_mode=album_showpage" . '&pic_id=' . $pic_id . $full_size_param . '&nuffimage=true')), ) ); *************** *** 548,552 **** // Check the permissions // ------------------------------------ - $auth_data = album_user_access($cat_id, $thiscat, 1, 0, 1, 1, 1, 1); --- 549,552 ---- *************** *** 556,560 **** { mx_message_die(GENERAL_ERROR, $lang['Not_Authorised']); ! redirect(append_sid($phpbb_root_path ."login.$phpEx?redirect=album.php?smartor_mode=album_showpage&pic_id=$pic_id")); exit; } --- 556,560 ---- { mx_message_die(GENERAL_ERROR, $lang['Not_Authorised']); ! mx_redirect(mx_append_sid($phpbb_root_path ."login.$phpEx?mx_redirect=album.php?smartor_mode=album_showpage&pic_id=$pic_id")); exit; } *************** *** 717,721 **** else { ! $poster = '<a href="'. append_sid($phpbb_root_path ."profile.php?mode=viewprofile&". POST_USERS_URL .'='. $commentrow[$i]['user_id']) .'">'. $commentrow[$i]['username'] .'</a>'; } --- 717,721 ---- else { ! $poster = '<a href="'. mx_append_sid($phpbb_root_path ."profile.php?mode=viewprofile&". POST_USERS_URL .'='. $commentrow[$i]['user_id']) .'">'. $commentrow[$i]['username'] .'</a>'; } *************** *** 750,756 **** //email, profile, pm links ! $email_uri = ( $board_config['board_email_form'] ) ? append_sid($phpbb_root_path ."profile.$phpEx?mode=email&" . POST_USERS_URL .'=' . $commentrow[$i]['user_id']) : 'mailto:' . $commentrow[$i]['user_email']; ! $profile_url = append_sid($phpbb_root_path ."profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . "=" . $commentrow[$i]['user_id'] ); ! $pm_url = append_sid($phpbb_root_path ."privmsg.$phpEx?mode=post&" . POST_USERS_URL . "=" . $commentrow[$i]['user_id']); //avatar --- 750,756 ---- //email, profile, pm links ! $email_uri = ( $board_config['board_email_form'] ) ? mx_append_sid($phpbb_root_path ."profile.$phpEx?mode=email&" . POST_USERS_URL .'=' . $commentrow[$i]['user_id']) : 'mailto:' . $commentrow[$i]['user_email']; ! $profile_url = mx_append_sid($phpbb_root_path ."profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . "=" . $commentrow[$i]['user_id'] ); ! $pm_url = mx_append_sid($phpbb_root_path ."privmsg.$phpEx?mode=post&" . POST_USERS_URL . "=" . $commentrow[$i]['user_id']); //avatar *************** *** 853,859 **** 'EDIT_INFO' => $edit_info, ! 'EDIT' => ( ( $auth_data['edit'] and ($commentrow[$i]['comment_user_id'] == $userdata['user_id']) ) or ($auth_data['moderator'] and ($thiscat['cat_edit_level'] != ALBUM_ADMIN) ) or ($userdata['user_level'] == ADMIN) ) ? '<a href="'. append_sid(this_smartor_mxurl("smartor_mode=album_comment_edit&comment_id=". $commentrow[$i]['comment_id'])) .'">'. $lang['Edit_pic'] .'</a>' : '', ! 'DELETE' => ( ( $auth_data['delete'] and ($commentrow[$i]['comment_user_id'] == $userdata['user_id']) ) or ($auth_data['moderator'] and ($thiscat['cat_delete_level'] != ALBUM_ADMIN) ) or ($userdata['user_level'] == ADMIN) ) ? '<a href="'. append_sid(this_smartor_mxurl("smartor_mode=album_comment_delete&comment_id=". $commentrow[$i]['comment_id'])) .'">'. $lang['Delete_pic'] .'</a>' : '' ) ); --- 853,859 ---- 'EDIT_INFO' => $edit_info, ! 'EDIT' => ( ( $auth_data['edit'] and ($commentrow[$i]['comment_user_id'] == $userdata['user_id']) ) or ($auth_data['moderator'] and ($thiscat['cat_edit_level'] != ALBUM_ADMIN) ) or ($userdata['user_level'] == ADMIN) ) ? '<a href="'. mx_append_sid(this_smartor_mxurl("smartor_mode=album_comment_edit&comment_id=". $commentrow[$i]['comment_id'])) .'">'. $lang['Edit_pic'] .'</a>' : '', ! 'DELETE' => ( ( $auth_data['delete'] and ($commentrow[$i]['comment_user_id'] == $userdata['user_id']) ) or ($auth_data['moderator'] and ($thiscat['cat_delete_level'] != ALBUM_ADMIN) ) or ($userdata['user_level'] == ADMIN) ) ? '<a href="'. mx_append_sid(this_smartor_mxurl("smartor_mode=album_comment_delete&comment_id=". $commentrow[$i]['comment_id'])) .'">'. $lang['Delete_pic'] .'</a>' : '' ) ); *************** *** 863,867 **** $template->assign_vars(array( ! 'PAGINATION' => generate_pagination(append_sid(this_smartor_mxurl("smartor_mode=album_showpage&pic_id=$pic_id&sort_order=$sort_order")), $total_comments, $comments_per_page, $start), 'PAGE_NUMBER' => sprintf($lang['Page_of'], ( floor( $start / $comments_per_page ) + 1 ), ceil( $total_comments / $comments_per_page )) ) --- 863,867 ---- $template->assign_vars(array( ! 'PAGINATION' => generate_pagination(mx_append_sid(this_smartor_mxurl("smartor_mode=album_showpage&pic_id=$pic_id&sort_order=$sort_order")), $total_comments, $comments_per_page, $start), 'PAGE_NUMBER' => sprintf($lang['Page_of'], ( floor( $start / $comments_per_page ) + 1 ), ceil( $total_comments / $comments_per_page )) ) *************** *** 890,894 **** else { ! $poster = '<a href="'. append_sid($phpbb_root_path ."profile.$phpEx?mode=viewprofile&". POST_USERS_URL .'='. $thispic['user_id']) .'">'. $thispic['username'] .'</a>'; } --- 890,894 ---- else { ! $poster = '<a href="'. mx_append_sid($phpbb_root_path ."profile.$phpEx?mode=viewprofile&". POST_USERS_URL .'='. $thispic['user_id']) .'">'. $thispic['username'] .'</a>'; } *************** *** 896,900 **** // Comment Posting Form //--------------------------------- - if ($auth_data['comment'] == 1) { --- 896,899 ---- *************** *** 906,947 **** } } ! $image_rating = ImageRating($thispic['rating']); - - //begin shows smilies - $max_smilies = 20; ! $sql = 'SELECT emoticon, code, smile_url ! FROM ' . SMILIES_TABLE . ' ! GROUP BY smile_url ! ORDER BY smilies_id LIMIT ' . $max_smilies; ! if (!$result = $db->sql_query($sql)) ! { ! mx_message_die(GENERAL_ERROR, "Couldn't retrieve smilies list", '', __LINE__, __FILE__, $sql); ! } ! $smilies_count = $db->sql_numrows($result); ! $smilies_data = $db->sql_fetchrowset($result); ! ! if ($auth_data['comment'] == 1) { ! for ($i = 1; $i < $smilies_count+1; $i++) ! { ! $template->assign_block_vars('switch_comment_post.smilies', array( ! 'CODE' => $smilies_data[$i - 1]['code'], ! 'URL' => $phpbb_root_path . $board_config['smilies_path'] . '/' . $smilies_data[$i - 1]['smile_url'], ! 'DESC' => $smilies_data[$i - 1]['emoticon'] ! )); ! ! if ( is_integer($i / 5) ) ! $template->assign_block_vars('switch_comment_post.smilies.new_col', array()); ! ! } ! } ! ! // -------------------------------- // Rate Scale // -------------------------------- - if (!$already_rated) { --- 905,946 ---- } } ! $image_rating = ImageRating($thispic['rating']); ! //begin shows smilies ! $max_smilies = 20; ! $sql = 'SELECT emoticon, code, smile_url ! FROM ' . SMILIES_TABLE . ' ! GROUP BY smile_url ! ORDER BY smilies_id LIMIT ' . $max_smilies; ! ! if (!$result = $db->sql_query($sql)) { ! mx_message_die(GENERAL_ERROR, "Couldn't retrieve smilies list", '', __LINE__, __FILE__, $sql); ! } ! $smilies_count = $db->sql_numrows($result); ! $smilies_data = $db->sql_fetchrowset($result); ! ! if ($auth_data['comment'] == 1) ! { ! for ($i = 1; $i < $smilies_count+1; $i++) ! { ! $template->assign_block_vars('switch_comment_post.smilies', array( ! 'CODE' => $smilies_data[$i - 1]['code'], ! 'URL' => $phpbb_root_path . $board_config['smilies_path'] . '/' . $smilies_data[$i - 1]['smile_url'], ! 'DESC' => $smilies_data[$i - 1]['emoticon'] ! )); ! ! if ( is_integer($i / 5) ) ! { ! $template->assign_block_vars('switch_comment_post.smilies.new_col', array()); ! } ! } ! } ! ! // -------------------------------- // Rate Scale // -------------------------------- if (!$already_rated) { *************** *** 969,979 **** $slideshow_select = ''; $slideshow_onoff = $lang['Slideshow_Off']; ! $slideshow_link = append_sid(this_smartor_mxurl("smartor_mode=album_showpage&pic_id=" . $pic_id)); $slideshow_link_full = '<a href="' . $slideshow_link . '">' . $lang['Slideshow_Off'] . '</a>'; ! $pic_link = append_sid(this_smartor_mxurl("smartor_mode=" . $nuffimage_pic . "&pic_id=" . $pic_id, TRUE)); ! $next_pic = ($no_next_pic == false) ? '<a href="' . append_sid(this_smartor_mxurl("smartor_mode=album_showpage&pic_id=" . $pic_id . $full_size_param . '&mode=next&slideshow=' . $slideshow_delay)) . '#TopPic"><img src="' . $images['icon_right_arrow3'] . '" title="' . $lang['Next_Pic'] . '" border="0" alt="' . $lang['Next_Pic'] . '" align="middle" /></a>' : ''; ! $prev_pic = ($no_prev_pic == false) ? '<a href="' . append_sid(this_smartor_mxurl("smartor_mode=album_showpage&pic_id=" . $pic_id . $full_size_param . '&mode=prev&slideshow=' . $slideshow_delay)) . '#TopPic"><img src="' . $images['icon_left_arrow3'] . '" title="' . $lang['Prev_Pic'] . '" border="0" alt="' . $lang['Prev_Pic'] . '" align="middle" /></a>' : ''; ! $next_pic_url = ($no_next_pic == false) ? append_sid(this_smartor_mxurl("smartor_mode=album_showpage&pic_id=" . $pic_id . $full_size_param . '&mode=next&slideshow=' . $slideshow_delay)) . '#TopPic' : append_sid(this_smartor_mxurl("smartor_mode=album_showpage&pic_id=" . $first_pic_id . $full_size_param)) . '#TopPic'; ! $prev_pic_url = ($no_prev_pic == false) ? append_sid(this_smartor_mxurl("smartor_mode=album_showpage&pic_id=" . $pic_id . $full_size_param . '&mode=prev&slideshow=' . $slideshow_delay)) . '#TopPic' : append_sid(this_smartor_mxurl("smartor_mode=album_showpage&pic_id=" . $last_pic_id . $full_size_param)) . '#TopPic'; } else --- 968,978 ---- $slideshow_select = ''; $slideshow_onoff = $lang['Slideshow_Off']; ! $slideshow_link = mx_append_sid(this_smartor_mxurl("smartor_mode=album_showpage&pic_id=" . $pic_id)); $slideshow_link_full = '<a href="' . $slideshow_link . '">' . $lang['Slideshow_Off'] . '</a>'; ! $pic_link = mx_append_sid(this_smartor_mxurl("smartor_mode=" . $nuffimage_pic . "&pic_id=" . $pic_id, TRUE)); ! $next_pic = ($no_next_pic == false) ? '<a href="' . mx_append_sid(this_smartor_mxurl("smartor_mode=album_showpage&pic_id=" . $pic_id . $full_size_param . '&mode=next&slideshow=' . $slideshow_delay)) . '#TopPic"><img src="' . $images['icon_right_arrow3'] . '" title="' . $lang['Next_Pic'] . '" border="0" alt="' . $lang['Next_Pic'] . '" align="middle" /></a>' : ''; ! $prev_pic = ($no_prev_pic == false) ? '<a href="' . mx_append_sid(this_smartor_mxurl("smartor_mode=album_showpage&pic_id=" . $pic_id . $full_size_param . '&mode=prev&slideshow=' . $slideshow_delay)) . '#TopPic"><img src="' . $images['icon_left_arrow3'] . '" title="' . $lang['Prev_Pic'] . '" border="0" alt="' . $lang['Prev_Pic'] . '" align="middle" /></a>' : ''; ! $next_pic_url = ($no_next_pic == false) ? mx_append_sid(this_smartor_mxurl("smartor_mode=album_showpage&pic_id=" . $pic_id . $full_size_param . '&mode=next&slideshow=' . $slideshow_delay)) . '#TopPic' : mx_append_sid(this_smartor_mxurl("smartor_mode=album_showpage&pic_id=" . $first_pic_id . $full_size_param)) . '#TopPic'; ! $prev_pic_url = ($no_prev_pic == false) ? mx_append_sid(this_smartor_mxurl("smartor_mode=album_showpage&pic_id=" . $pic_id . $full_size_param . '&mode=prev&slideshow=' . $slideshow_delay)) . '#TopPic' : mx_append_sid(this_smartor_mxurl("smartor_mode=album_showpage&pic_id=" . $last_pic_id . $full_size_param)) . '#TopPic'; } else *************** *** 994,1003 **** $slideshow_select .= '</select> '; $slideshow_onoff = $lang['Slideshow_On']; ! //$slideshow_link = append_sid(this_smartor_mxurl("smartor_mode=album_showpage&pic_id=" . $pic_id . '&full=true&slideshow=' . $slideshow_delay)); ! $slideshow_link = append_sid(this_smartor_mxurl("smartor_mode=album_showpage&pic_id=" . $pic_id . '&full=true')); $slideshow_link_full = '<a href="' . $slideshow_link . '">' . $lang['Slideshow_On'] . '</a>'; ! $pic_link = append_sid(this_smartor_mxurl("smartor_mode=" . $nuffimage_pic . "&pic_id=" . $pic_id . $sort_append . $full_size_param . $nuff_http_full_string, TRUE)); ! $next_pic = ($no_next_pic == false) ? '<a href="' . append_sid(this_smartor_mxurl("smartor_mode=album_showpage&pic_id=" . $pic_id . $full_size_param . '&mode=next' . $nuffimage_vars)) . '#TopPic"><img src="' . $images['icon_left_arrow3'] . '" title="' . $lang['Next_Pic'] . '" border="0" alt="' . $lang['Next_Pic'] . '" align="middle" /></a>' : ''; ! $prev_pic = ($no_prev_pic == false) ? '<a href="' . append_sid(this_smartor_mxurl("smartor_mode=album_showpage&pic_id=" . $pic_id . $full_size_param . '&mode=prev' . $nuffimage_vars)) . '#TopPic"><img src="' . $images['icon_right_arrow3'] . '" title="' . $lang['Prev_Pic'] . '" border="0" alt="' . $lang['Prev_Pic'] . '" align="middle" /></a>' : ''; $next_pic_url = '#TopPic'; $prev_pic_url = '#TopPic'; --- 993,1002 ---- $slideshow_select .= '</select> '; $slideshow_onoff = $lang['Slideshow_On']; ! //$slideshow_link = mx_append_sid(this_smartor_mxurl("smartor_mode=album_showpage&pic_id=" . $pic_id . '&full=true&slideshow=' . $slideshow_delay)); ! $slideshow_link = mx_append_sid(this_smartor_mxurl("smartor_mode=album_showpage&pic_id=" . $pic_id . '&full=true')); $slideshow_link_full = '<a href="' . $slideshow_link . '">' . $lang['Slideshow_On'] . '</a>'; ! $pic_link = mx_append_sid(this_smartor_mxurl("smartor_mode=" . $nuffimage_pic . "&pic_id=" . $pic_id . $sort_append . $full_size_param . $nuff_http_full_string, TRUE)); ! $next_pic = ($no_next_pic == false) ? '<a href="' . mx_append_sid(this_smartor_mxurl("smartor_mode=album_showpage&pic_id=" . $pic_id . $full_size_param . '&mode=next' . $nuffimage_vars)) . '#TopPic"><img src="' . $images['icon_left_arrow3'] . '" title="' . $lang['Next_Pic'] . '" border="0" alt="' . $lang['Next_Pic'] . '" align="middle" /></a>' : ''; ! $prev_pic = ($no_prev_pic == false) ? '<a href="' . mx_append_sid(this_smartor_mxurl("smartor_mode=album_showpage&pic_id=" . $pic_id . $full_size_param . '&mode=prev' . $nuffimage_vars)) . '#TopPic"><img src="' . $images['icon_right_arrow3'] . '" title="' . $lang['Prev_Pic'] . '" border="0" alt="' . $lang['Prev_Pic'] . '" align="middle" /></a>' : ''; $next_pic_url = '#TopPic'; $prev_pic_url = '#TopPic'; *************** *** 1045,1049 **** $server_path = $server_protocol . $server_name . $server_port . $script_name; ! $thumbnail_file = append_sid(this_smartor_mxurl("album_thumbnail" . '&pic_id=' . $pic_id)); if ( ($album_config['thumbnail_cache'] == true) && ($album_config['quick_thumbs'] == true) ) { --- 1044,1048 ---- $server_path = $server_protocol . $server_name . $server_port . $script_name; ! $thumbnail_file = mx_append_sid(this_smartor_mxurl("album_thumbnail" . '&pic_id=' . $pic_id)); if ( ($album_config['thumbnail_cache'] == true) && ($album_config['quick_thumbs'] == true) ) { *************** *** 1061,1067 **** $template->assign_vars(array( 'CAT_TITLE' => $thiscat['cat_title'], ! 'U_VIEW_CAT' => ($cat_id != PERSONAL_GALLERY) ? append_sid(this_smartor_mxurl("smartor_mode=album_cat&cat_id=$cat_id")) : append_sid(this_smartor_mxurl("smartor_mode=album_personal&user_id=$user_id")), ! //'U_PIC' => ( $picm ) ? append_sid(this_smartor_mxurl("smartor_mode=album_pic&pic_id=$pic_id", TRUE)) : append_sid(this_smartor_mxurl("smartor_mode=album_picm&pic_id=$pic_id", TRUE)), 'U_PIC' => $pic_link, 'U_PIC_L1' => ( $picm ) ? '<a href='.this_smartor_mxurl("smartor_mode=album_showpage&full=true&pic_id=" . $pic_id) . '>' : '', --- 1060,1066 ---- $template->assign_vars(array( 'CAT_TITLE' => $thiscat['cat_title'], ! 'U_VIEW_CAT' => ($cat_id != PERSONAL_GALLERY) ? mx_append_sid(this_smartor_mxurl("smartor_mode=album_cat&cat_id=$cat_id")) : mx_append_sid(this_smartor_mxurl("smartor_mode=album_personal&user_id=$user_id")), ! //'U_PIC' => ( $picm ) ? mx_append_sid(this_smartor_mxurl("smartor_mode=album_pic&pic_id=$pic_id", TRUE)) : mx_append_sid(this_smartor_mxurl("smartor_mode=album_picm&pic_id=$pic_id", TRUE)), 'U_PIC' => $pic_link, 'U_PIC_L1' => ( $picm ) ? '<a href='.this_smartor_mxurl("smartor_mode=album_showpage&full=true&pic_id=" . $pic_id) . '>' : '', *************** *** 1069,1074 **** 'U_PIC_CLICK' => ( $picm ) ? '' : 'Click on image to view larger image', ! 'U_NEXT' => append_sid(this_smartor_mxurl("smartor_mode=album_showpage&pic_id=$pic_id&mode=next")), ! 'U_PREVIOUS' => append_sid(this_smartor_mxurl("smartor_mode=album_showpage&pic_id=$pic_id&mode=previous")), 'PIC_RATING' => $image_rating, --- 1068,1073 ---- 'U_PIC_CLICK' => ( $picm ) ? '' : 'Click on image to view larger image', ! 'U_NEXT' => mx_append_sid(this_smartor_mxurl("smartor_mode=album_showpage&pic_id=$pic_id&mode=next")), ! 'U_PREVIOUS' => mx_append_sid(this_smartor_mxurl("smartor_mode=album_showpage&pic_id=$pic_id&mode=previous")), 'PIC_RATING' => $image_rating, *************** *** 1115,1119 **** 'L_SUBMIT' => $lang['Submit'], ! 'S_ALBUM_ACTION' => append_sid(this_smartor_mxurl("smartor_mode=album_showpage&pic_id=$pic_id")), // Mighty Gorgon - Slideshow - BEGIN --- 1114,1118 ---- 'L_SUBMIT' => $lang['Submit'], ! 'S_ALBUM_ACTION' => mx_append_sid(this_smartor_mxurl("smartor_mode=album_showpage&pic_id=$pic_id")), // Mighty Gorgon - Slideshow - BEGIN *************** *** 1148,1156 **** $template->pparse('body'); ! if ( !is_object($mx_block) ) ! { ! include($mx_root_path . 'includes/page_tail.'.$phpEx); ! } ! } else --- 1147,1154 ---- $template->pparse('body'); ! if ( !is_object($mx_block) ) ! { ! include($mx_root_path . 'includes/page_tail.'.$phpEx); ! } } else *************** *** 1169,1173 **** { mx_message_die(GENERAL_ERROR, $lang['Not_Authorised']); ! redirect(append_sid($phpbb_root_path ."login.$phpEx?redirect=album.php?smartor_mode=album_showpage&pic_id=$pic_id")); } else --- 1167,1171 ---- { mx_message_die(GENERAL_ERROR, $lang['Not_Authorised']); ! mx_redirect(mx_append_sid($phpbb_root_path ."login.$phpEx?mx_redirect=album.php?smartor_mode=album_showpage&pic_id=$pic_id")); } else *************** *** 1181,1185 **** $comment_username = (!$userdata['session_logged_in']) ? str_replace("\'", "''", substr(htmlspecialchars(trim($HTTP_POST_VARS['comment_username'])), 0, 32)) : str_replace("'", "''", htmlspecialchars(trim($userdata['username']))); - --- 1179,1182 ---- *************** *** 1289,1296 **** $template->assign_vars(array( ! 'META' => '<meta http-equiv="refresh" content="3;url=' . append_sid(this_smartor_mxurl("smartor_mode=album_showpage&pic_id=$pic_id")) . '">') ); ! $message = $lang['Stored'] . "<br /><br />" . sprintf($lang['Click_view_message'], "<a href=\"" . append_sid(this_smartor_mxurl("smartor_mode=album_showpage&pic_id=$pic_id ")) . "\">", "</a>") . "<br /><br />" . sprintf($lang['Click_return_album_index'], "<a href=\"" . append_sid(this_smartor_mxurl()) . "\">", "</a>"); mx_message_die(GENERAL_MESSAGE, $message); --- 1286,1293 ---- $template->assign_vars(array( ! 'META' => '<meta http-equiv="refresh" content="3;url=' . mx_append_sid(this_smartor_mxurl("smartor_mode=album_showpage&pic_id=$pic_id")) . '">') ); ! $message = $lang['Stored'] . "<br /><br />" . sprintf($lang['Click_view_message'], "<a href=\"" . mx_append_sid(this_smartor_mxurl("smartor_mode=album_showpage&pic_id=$pic_id ")) . "\">", "</a>") . "<br /><br />" . sprintf($lang['Click_return_album_index'], "<a href=\"" . mx_append_sid(this_smartor_mxurl()) . "\">", "</a>"); mx_message_die(GENERAL_MESSAGE, $message); Index: album_pic.php =================================================================== RCS file: /cvsroot/mxbb/mx_smartor/includes/album_pic.php,v retrieving revision 1.6 retrieving revision 1.6.2.1 diff -C2 -d -r1.6 -r1.6.2.1 *** album_pic.php 7 Jun 2007 20:13:30 -0000 1.6 --- album_pic.php 1 Feb 2008 14:12:27 -0000 1.6.2.1 *************** *** 15,31 **** } - $phpEx = substr(strrchr(__FILE__, '.'), 1); - include_once($mx_root_path . 'common.'.$phpEx); - - // - // Start session management - // - $mx_user->init($user_ip, PAGE_INDEX); - // - // End session management - // - ! define('ALBUM_MOD_PATH', 'album_mod/'); // Get general album information --- 15,20 ---- } ! @define('ALBUM_MOD_PATH', 'album_mod/'); // Get general album information *************** *** 107,114 **** // ------------------------------------ // Check the permissions // ------------------------------------ $album_user_access = album_permissions($album_user_id, $cat_id, ALBUM_AUTH_VIEW, $thispic); ! if ( $album_user_access['view'] == false ) { mx_message_die(GENERAL_MESSAGE, $lang['Not_Authorised']); --- 96,127 ---- // ------------------------------------ + // Get the current Category Info + // ------------------------------------ + + if ($cat_id != PERSONAL_GALLERY) + { + $sql = "SELECT * + FROM ". ALBUM_CAT_TABLE ." + WHERE cat_id = '$cat_id'"; + if( !($result = $db->sql_query($sql)) ) + { + mx_message_die(GENERAL_ERROR, 'Could not query category information', '', __LINE__, __FILE__, $sql); + } + + $thiscat = $db->sql_fetchrow($result); + } + else + { + $thiscat = init_personal_gallery_cat($user_id); + } + + // ------------------------------------ // Check the permissions // ------------------------------------ $album_user_access = album_permissions($album_user_id, $cat_id, ALBUM_AUTH_VIEW, $thispic); ! ! $auth_data = album_user_access($cat_id, $thiscat, 1, 0, 1, 1, 1, 1); ! ! if (($auth_data['view'] == 0) && ($album_user_access['view'] == false)) { mx_message_die(GENERAL_MESSAGE, $lang['Not_Authorised']); *************** *** 122,126 **** if ( ($thispic['cat_approval'] == ADMIN) || (($thispic['cat_approval'] == MOD) && !$album_user_access['moderator']) ) { ! if ( $thispic['pic_approval'] != 1 ) { mx_message_die(GENERAL_MESSAGE, $lang['Not_Authorised']); --- 135,139 ---- if ( ($thispic['cat_approval'] == ADMIN) || (($thispic['cat_approval'] == MOD) && !$album_user_access['moderator']) ) { ! if ($thispic['pic_approval'] !== 1) { mx_message_die(GENERAL_MESSAGE, $lang['Not_Authorised']); Index: album_thumbnail.php =================================================================== RCS file: /cvsroot/mxbb/mx_smartor/includes/album_thumbnail.php,v retrieving revision 1.7 retrieving revision 1.7.2.1 diff -C2 -d -r1.7 -r1.7.2.1 *** album_thumbnail.php 9 Aug 2007 13:17:01 -0000 1.7 --- album_thumbnail.php 1 Feb 2008 14:12:27 -0000 1.7.2.1 *************** *** 120,133 **** } ! /* // ------------------------------------ // Check the permissions // ------------------------------------ $album_user_access = album_permissions($album_user_id, $cat_id, ALBUM_AUTH_VIEW, $thispic); ! if ( $album_user_access['view'] == false ) { mx_message_die(GENERAL_MESSAGE, $lang['Not_Authorised']); } // ------------------------------------ // Check Pic Approval --- 120,157 ---- } ! // ------------------------------------ ! // Get the current Category Info ! // ------------------------------------ ! ! if ($cat_id != PERSONAL_GALLERY) ! { ! $sql = "SELECT * ! FROM ". ALBUM_CAT_TABLE ." ! WHERE cat_id = '$cat_id'"; ! if( !($result = $db->sql_query($sql)) ) ! { ! mx_message_die(GENERAL_ERROR, 'Could not query category information', '', __LINE__, __FILE__, $sql); ! } ! ! $thiscat = $db->sql_fetchrow($result); ! } ! else ! { ! $thiscat = init_personal_gallery_cat($user_id); ! } ! ! // ------------------------------------ // Check the permissions // ------------------------------------ $album_user_access = album_permissions($album_user_id, $cat_id, ALBUM_AUTH_VIEW, $thispic); ! $auth_data = album_user_access($cat_id, $thiscat, 1, 0, 1, 1, 1, 1); ! ! if (($auth_data['view'] == 0) && ($album_user_access['view'] == false)) { mx_message_die(GENERAL_MESSAGE, $lang['Not_Authorised']); } + /* // ------------------------------------ // Check Pic Approval |