|
From: FlorinCB <ory...@us...> - 2009-06-11 08:16:00
|
Update of /cvsroot/mxbb/mx_radiocast/includes In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv17130/includes Modified Files: radiocast_cat.php radiocast_comment.php radiocast_comment_edit.php radiocast_list.php radiocast_modcp.php radiocast_player.php radiocast_rate.php Log Message: some fixes for permissions. Index: radiocast_comment.php =================================================================== RCS file: /cvsroot/mxbb/mx_radiocast/includes/radiocast_comment.php,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** radiocast_comment.php 22 Jan 2009 08:29:51 -0000 1.4 --- radiocast_comment.php 11 Jun 2009 08:15:55 -0000 1.5 *************** *** 316,320 **** $edit_info = ($commentrow[$i]['comment_edit_count'] == 1) ? $lang['Edited_time_total'] : $lang['Edited_times_total']; ! $edit_info = '<br /><br />» '. sprintf($edit_info, $lastedit_row['username'], create_date($board_config['default_dateformat'], $commentrow[$i]['comment_edit_time'], $board_config['board_timezone']), $commentrow[$i]['comment_edit_count']) .'<br />'; } else --- 316,320 ---- $edit_info = ($commentrow[$i]['comment_edit_count'] == 1) ? $lang['Edited_time_total'] : $lang['Edited_times_total']; ! $edit_info = '<br /><br />» '. sprintf($edit_info, $lastedit_row['username'], phpBB2::create_date($board_config['default_dateformat'], $commentrow[$i]['comment_edit_time'], $board_config['board_timezone']), $commentrow[$i]['comment_edit_count']) .'<br />'; } else *************** *** 326,330 **** 'ID' => $commentrow[$i]['comment_id'], 'POSTER' => $poster, ! 'TIME' => create_date($board_config['default_dateformat'], $commentrow[$i]['comment_time'], $board_config['board_timezone']), 'IP' => ($userdata['user_level'] == ADMIN) ? '-----------------------------------<br />' . $lang['IP_Address'] . ': <a href="http://www.nic.com/cgi-bin/whois.cgi?query=' . decode_ip($commentrow[$i]['comment_user_ip']) . '" target="_blank">' . decode_ip($commentrow[$i]['comment_user_ip']) .'</a><br />' : '', --- 326,330 ---- 'ID' => $commentrow[$i]['comment_id'], 'POSTER' => $poster, ! 'TIME' => phpBB2::create_date($board_config['default_dateformat'], $commentrow[$i]['comment_time'], $board_config['board_timezone']), 'IP' => ($userdata['user_level'] == ADMIN) ? '-----------------------------------<br />' . $lang['IP_Address'] . ': <a href="http://www.nic.com/cgi-bin/whois.cgi?query=' . decode_ip($commentrow[$i]['comment_user_ip']) . '" target="_blank">' . decode_ip($commentrow[$i]['comment_user_ip']) .'</a><br />' : '', *************** *** 395,399 **** 'POSTER' => $poster, ! 'STATION_TIME' => create_date($board_config['default_dateformat'], $thisstation['station_time'], $board_config['board_timezone']), 'STATION_VIEW' => $thisstation['station_view_count'], 'STATION_COMMENTS' => $total_comments, --- 395,399 ---- 'POSTER' => $poster, ! 'STATION_TIME' => phpBB2::create_date($board_config['default_dateformat'], $thisstation['station_time'], $board_config['board_timezone']), 'STATION_VIEW' => $thisstation['station_view_count'], 'STATION_COMMENTS' => $total_comments, Index: radiocast_player.php =================================================================== RCS file: /cvsroot/mxbb/mx_radiocast/includes/radiocast_player.php,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** radiocast_player.php 21 Mar 2008 08:51:07 -0000 1.4 --- radiocast_player.php 11 Jun 2009 08:15:55 -0000 1.5 *************** *** 261,265 **** // ------------------------------------ ! $radiocast_user_access = radiocast_user_access($cat_id, $thiscat, 1, 0, 0, 0, 0, 0); // UPLOAD if ($radiocast_user_access['view'] == 0) --- 261,265 ---- // ------------------------------------ ! $radiocast_user_access = radiocast_user_access($cat_id, $thiscat, 1, 0, 0, 0, 0, 0); // VIEW if ($radiocast_user_access['view'] == 0) *************** *** 283,289 **** if( ($thiscat['cat_approval'] == ADMIN) or (($thiscat['cat_approval'] == MOD) and !$radiocast_user_access['moderator']) ) { ! if ($thisstation['station_approval'] != 1) { ! mx_message_die(GENERAL_ERROR, $lang['Not_Authorised']); } } --- 283,289 ---- if( ($thiscat['cat_approval'] == ADMIN) or (($thiscat['cat_approval'] == MOD) and !$radiocast_user_access['moderator']) ) { ! if ($thisstation['station_approval'] == 0) { ! mx_message_die(GENERAL_ERROR, $lang['Not_Authorised'] . ' ,Station need approval.'); } } Index: radiocast_comment_edit.php =================================================================== RCS file: /cvsroot/mxbb/mx_radiocast/includes/radiocast_comment_edit.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** radiocast_comment_edit.php 22 Jan 2009 08:29:51 -0000 1.2 --- radiocast_comment_edit.php 11 Jun 2009 08:15:55 -0000 1.3 *************** *** 233,237 **** 'STATION_TITLE' => $thisstation['station_title'], 'POSTER' => $poster, ! 'STATION_TIME' => create_date($board_config['default_dateformat'], $thisstation['station_time'], $board_config['board_timezone']), 'STATION_VIEW' => $thisstation['station_view_count'], 'STATION_COMMENTS' => $total_comments, --- 233,237 ---- 'STATION_TITLE' => $thisstation['station_title'], 'POSTER' => $poster, ! 'STATION_TIME' => phpBB2::create_date($board_config['default_dateformat'], $thisstation['station_time'], $board_config['board_timezone']), 'STATION_VIEW' => $thisstation['station_view_count'], 'STATION_COMMENTS' => $total_comments, Index: radiocast_cat.php =================================================================== RCS file: /cvsroot/mxbb/mx_radiocast/includes/radiocast_cat.php,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** radiocast_cat.php 22 Jan 2009 08:29:51 -0000 1.4 --- radiocast_cat.php 11 Jun 2009 08:15:55 -0000 1.5 *************** *** 68,71 **** --- 68,73 ---- } + $auth_data['moderator'] = ($auth_data['moderator'] == false) ? $mx_page->auth_mod : $auth_data['moderator']; + if (empty($thiscat)) { *************** *** 141,146 **** } ! // add Moderator Control Panel here ! if( ($userdata['user_level'] == ADMIN) or ($auth_data['moderator'] == 1) ) { $auth_list .= sprintf($lang['RadioCast_moderate_can'], '<a href="'. mx_append_sid(this_rc_mxurl("radiocast_mode=radiocast_modcp&cat_id=$cat_id")) .'">', '</a>'); --- 143,151 ---- } ! // ! // Add Moderator Control Panel here ! // ! ! if( ($userdata['user_level'] == ADMIN) or ($auth_data['moderator'] == 1)) { $auth_list .= sprintf($lang['RadioCast_moderate_can'], '<a href="'. mx_append_sid(this_rc_mxurl("radiocast_mode=radiocast_modcp&cat_id=$cat_id")) .'">', '</a>'); *************** *** 384,390 **** $approval_link = ''; ! if ($thiscat['cat_approval'] != RADIOCAST_USER) { ! if( ($userdata['user_level'] == ADMIN) or (($auth_data['moderator'] == 1) and ($thiscat['cat_approval'] == RADIOCAST_MOD)) ) { $approval_mode = ($stationrow[$j]['station_approval'] == 0) ? 'approval' : 'unapproval'; --- 389,395 ---- $approval_link = ''; ! if ($thiscat['cat_approval']) { ! if( ($mx_user->data['user_level'] == ADMIN) or (($auth_data['moderator'] == 1) and ($thiscat['cat_approval'] == RADIOCAST_MOD)) ) { $approval_mode = ($stationrow[$j]['station_approval'] == 0) ? 'approval' : 'unapproval'; *************** *** 783,791 **** if ($station_filetype == 'flv') { ! $url_song = PORTAL_URL. str_replace('./', '/', RADIOCAST_UPLOAD_PATH) . $thisstation['station_filename']; } else { ! $url_song = mx_append_sid(this_rc_mxurl("radiocast_mode=radiocast_song&station_id=" . $stationrow[$j]['station_id'], true)); } --- 788,796 ---- if ($station_filetype == 'flv') { ! $url_station = PORTAL_URL. str_replace('./', '/', RADIOCAST_UPLOAD_PATH) . $thisstation['station_filename']; } else { ! $url_station = mx_append_sid(this_rc_mxurl("radiocast_mode=radiocast_station&station_id=" . $stationrow[$j]['station_id'], true)); } *************** *** 795,807 **** 'TITLE' => '<a href="'. mx_append_sid(this_rc_mxurl("radiocast_mode=radiocast_player&station_id=". $stationrow[$j]['station_id'])) . '">' . $stationrow[$j]['station_title'] . '</a>', ! 'U_STATION' => $url_song, 'SONG_TITLE' => $thisstation['station_title'], ! 'SONG_URL' => !empty($thisstation['station_url']) ? $thisstation['station_url'] : $url_song, ! 'SONG_THUMB_URL' => !empty($thisstation['station_url']) ? $thisstation['station_url'] : mx_append_sid(this_rc_mxurl("radiocast_mode=radiocast_song&station_id=" . $stationrow[$j]['station_id'] . "&item_size=425", true)), ! 'SONG_FULL_URL' => !empty($thisstation['station_url']) ? $thisstation['station_url'] : mx_append_sid(this_rc_mxurl("radiocast_mode=radiocast_song&station_id=" . $stationrow[$j]['station_id'] . "&item_size=800", true)), 'VIDEO_URL' => !empty($url_player) ? $url_player : $url_video, --- 800,812 ---- 'TITLE' => '<a href="'. mx_append_sid(this_rc_mxurl("radiocast_mode=radiocast_player&station_id=". $stationrow[$j]['station_id'])) . '">' . $stationrow[$j]['station_title'] . '</a>', ! 'U_STATION' => $url_station, 'SONG_TITLE' => $thisstation['station_title'], ! 'SONG_URL' => !empty($thisstation['station_url']) ? $thisstation['station_url'] : $url_station, ! 'SONG_THUMB_URL' => !empty($thisstation['station_url']) ? $thisstation['station_url'] : mx_append_sid(this_rc_mxurl("radiocast_mode=radiocast_station&station_id=" . $stationrow[$j]['station_id'] . "&item_size=425", true)), ! 'SONG_FULL_URL' => !empty($thisstation['station_url']) ? $thisstation['station_url'] : mx_append_sid(this_rc_mxurl("radiocast_mode=radiocast_station&station_id=" . $stationrow[$j]['station_id'] . "&item_size=800", true)), 'VIDEO_URL' => !empty($url_player) ? $url_player : $url_video, *************** *** 819,823 **** 'HEIGHT' => ( !empty($media_height) ? $media_height : '350' ), ! 'TIME' => (@function_exists( 'create_date' )) ? create_date($board_config['default_dateformat'], $stationrow[$j]['station_time'], $board_config['board_timezone']) : phpBB2::create_date($board_config['default_dateformat'], $stationrow[$j]['station_time'], $board_config['board_timezone']), 'VIEW' => $stationrow[$j]['station_view_count'], --- 824,828 ---- 'HEIGHT' => ( !empty($media_height) ? $media_height : '350' ), ! 'TIME' => (@function_exists( 'create_date' )) ? phpBB2::create_date($board_config['default_dateformat'], $stationrow[$j]['station_time'], $board_config['board_timezone']) : phpBB2::create_date($board_config['default_dateformat'], $stationrow[$j]['station_time'], $board_config['board_timezone']), 'VIEW' => $stationrow[$j]['station_view_count'], *************** *** 827,833 **** 'COMMENTS' => ($radiocast_config['comment'] == 1) ? ( '<a href="'. mx_append_sid(this_rc_mxurl("radiocast_mode=radiocast_comment&station_id=". $stationrow[$j]['station_id'])) . '">' . $stationrow[$j]['comments'] . '</a>' ) : '', ! 'EDIT' => ( ( $auth_data['edit'] and ($stationrow[$j]['station_user_id'] == $userdata['user_id']) ) or ($auth_data['moderator'] and ($thiscat['cat_edit_level'] != RADIOCAST_ADMIN) ) or ($userdata['user_level'] == ADMIN) ) ? '<a href="'. mx_append_sid(this_rc_mxurl("radiocast_mode=radiocast_edit&station_id=". $stationrow[$j]['station_id'])) . '">' . $lang['Edit_song'] . '</a>' : '', ! 'DELETE' => ( ( $auth_data['delete'] and ($stationrow[$j]['station_user_id'] == $userdata['user_id']) ) or ($auth_data['moderator'] and ($thiscat['cat_delete_level'] != RADIOCAST_ADMIN) ) or ($userdata['user_level'] == ADMIN) ) ? '<a href="'. mx_append_sid(this_rc_mxurl("radiocast_mode=radiocast_delete&station_id=". $stationrow[$j]['station_id'])) . '">' . $lang['Delete_song'] . '</a>' : '', 'MOVE' => ($auth_data['moderator']) ? '<a href="'. mx_append_sid(this_rc_mxurl("radiocast_mode=radiocast_modcp&mode=move&station_id=". $stationrow[$j]['station_id'])) .'">'. $lang['Move'] .'</a>' : '', --- 832,838 ---- 'COMMENTS' => ($radiocast_config['comment'] == 1) ? ( '<a href="'. mx_append_sid(this_rc_mxurl("radiocast_mode=radiocast_comment&station_id=". $stationrow[$j]['station_id'])) . '">' . $stationrow[$j]['comments'] . '</a>' ) : '', ! 'EDIT' => ( ($mx_user->data['user_level'] == ADMIN) or ($auth_data['edit']) or ($auth_data['moderator']) ) ? '<a href="'. mx_append_sid(this_rc_mxurl("radiocast_mode=radiocast_edit&station_id=". $stationrow[$j]['station_id'])) . '">' . $lang['Edit_station'] . '</a>' : '', ! 'DELETE' => ( ( ($auth_data['delete']) or ($auth_data['moderator']) ) or ($userdata['user_level'] == ADMIN) ) ? '<a href="'. mx_append_sid(this_rc_mxurl("radiocast_mode=radiocast_delete&station_id=". $stationrow[$j]['station_id'])) . '">' . $lang['Delete_station'] . '</a>' : '', 'MOVE' => ($auth_data['moderator']) ? '<a href="'. mx_append_sid(this_rc_mxurl("radiocast_mode=radiocast_modcp&mode=move&station_id=". $stationrow[$j]['station_id'])) .'">'. $lang['Move'] .'</a>' : '', Index: radiocast_rate.php =================================================================== RCS file: /cvsroot/mxbb/mx_radiocast/includes/radiocast_rate.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** radiocast_rate.php 22 Jan 2009 08:29:51 -0000 1.2 --- radiocast_rate.php 11 Jun 2009 08:15:56 -0000 1.3 *************** *** 226,230 **** 'POSTER' => $poster, ! 'STATION_TIME' => create_date($board_config['default_dateformat'], $thisstation['station_time'], $board_config['board_timezone']), 'STATION_VIEW' => $thisstation['station_view_count'], 'STATION_RATING' => ($thisstation['rating'] != 0) ? round($thisstation['rating'], 2) : $lang['Not_rated'], --- 226,230 ---- 'POSTER' => $poster, ! 'STATION_TIME' => phpBB2::create_date($board_config['default_dateformat'], $thisstation['station_time'], $board_config['board_timezone']), 'STATION_VIEW' => $thisstation['station_view_count'], 'STATION_RATING' => ($thisstation['rating'] != 0) ? round($thisstation['rating'], 2) : $lang['Not_rated'], Index: radiocast_list.php =================================================================== RCS file: /cvsroot/mxbb/mx_radiocast/includes/radiocast_list.php,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** radiocast_list.php 22 Jan 2009 08:29:51 -0000 1.4 --- radiocast_list.php 11 Jun 2009 08:15:55 -0000 1.5 *************** *** 181,185 **** 'SINGER' => $searchstationrow[$j]['station_singer'], 'POSTER' => $search_poster, ! 'TIME' => create_date($board_config['default_dateformat'], $searchstationrow[$j]['station_time'], $board_config['board_timezone']), 'VIEW' => $searchstationrow[$j]['station_view_count'], --- 181,185 ---- 'SINGER' => $searchstationrow[$j]['station_singer'], 'POSTER' => $search_poster, ! 'TIME' => phpBB2::create_date($board_config['default_dateformat'], $searchstationrow[$j]['station_time'], $board_config['board_timezone']), 'VIEW' => $searchstationrow[$j]['station_view_count'], Index: radiocast_modcp.php =================================================================== RCS file: /cvsroot/mxbb/mx_radiocast/includes/radiocast_modcp.php,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** radiocast_modcp.php 22 Jan 2009 08:29:51 -0000 1.3 --- radiocast_modcp.php 11 Jun 2009 08:15:55 -0000 1.4 *************** *** 363,367 **** 'STATION_TITLE' => '<a href="'. mx_append_sid(this_rc_mxurl("radiocast_mode=radiocast_station&station_id=". $stationrow[$i]['station_id'])) .'" target="_blank">'. $stationrow[$i]['station_title'] .'</a>', 'POSTER' => $station_poster, ! 'TIME' => create_date($board_config['default_dateformat'], $stationrow[$i]['station_time'], $board_config['board_timezone']), 'RATING' => ($stationrow[$i]['rating'] == 0) ? $lang['Not_rated'] : round($stationrow[$i]['rating'], 2), 'COMMENTS' => $stationrow[$i]['comments'], --- 363,367 ---- 'STATION_TITLE' => '<a href="'. mx_append_sid(this_rc_mxurl("radiocast_mode=radiocast_station&station_id=". $stationrow[$i]['station_id'])) .'" target="_blank">'. $stationrow[$i]['station_title'] .'</a>', 'POSTER' => $station_poster, ! 'TIME' => phpBB2::create_date($board_config['default_dateformat'], $stationrow[$i]['station_time'], $board_config['board_timezone']), 'RATING' => ($stationrow[$i]['rating'] == 0) ? $lang['Not_rated'] : round($stationrow[$i]['rating'], 2), 'COMMENTS' => $stationrow[$i]['comments'], *************** *** 372,376 **** } $template->assign_vars(array( ! 'PAGINATION' => generate_pagination(mx_append_sid(this_rc_mxurl("radiocast_mode=radiocast_modcp&cat_id=$cat_id&sort_method=$sort_method&sort_order=$sort_order")), $total_stations, $stations_per_page, $start), 'PAGE_NUMBER' => sprintf($lang['Page_of'], ( floor( $start / $stations_per_page ) + 1 ), ceil( $total_stations / $stations_per_page )) ) --- 372,376 ---- } $template->assign_vars(array( ! 'PAGINATION' => phpBB2::generate_pagination(mx_append_sid(this_rc_mxurl("radiocast_mode=radiocast_modcp&cat_id=$cat_id&sort_method=$sort_method&sort_order=$sort_order")), $total_stations, $stations_per_page, $start), 'PAGE_NUMBER' => sprintf($lang['Page_of'], ( floor( $start / $stations_per_page ) + 1 ), ceil( $total_stations / $stations_per_page )) ) *************** *** 427,431 **** 'L_POSTED' => $lang['Posted'], ! 'S_RADIOCAST_ACTION' => mx_append_sid(this_rc_mxurl("radiocast_mode=radiocast_modcp&cat_id=$cat_id")), 'L_SELECT_SORT_METHOD' => $lang['Select_sort_method'], --- 427,431 ---- 'L_POSTED' => $lang['Posted'], ! 'S_RADIOCAST_ACTION' => mx_append_sid(this_rc_mxurl("radiocast_mode=radiocast_modcp&cat_id=$cat_id")), 'L_SELECT_SORT_METHOD' => $lang['Select_sort_method'], |