|
From: OryNider <ory...@us...> - 2007-09-17 07:19:50
|
Update of /cvsroot/mxbb/mx_radiocast In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv960 Modified Files: db_install.php radiocast.php Log Message: This will add subcategories to mx radiocast.. Index: radiocast.php =================================================================== RCS file: /cvsroot/mxbb/mx_radiocast/radiocast.php,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** radiocast.php 6 Jun 2007 23:03:45 -0000 1.1 --- radiocast.php 17 Sep 2007 07:19:37 -0000 1.2 *************** *** 169,176 **** */ $sql = "SELECT c.*, COUNT(s.station_id) AS count FROM ". RADIOCAST_CAT_TABLE ." AS c LEFT JOIN ". RADIOCAST_TABLE ." AS s ON c.cat_id = s.station_cat_id ! WHERE cat_id <> 0 GROUP BY cat_id ORDER BY cat_order ASC"; --- 169,206 ---- */ + $cat_id = $_POST['c'] ? $_POST['c'] : ( $_GET['c'] ? $_GET['c'] : 0 ); + $cat_where = "cat_parent = $cat_id"; + + if ($cat_id != 0) + { + $sql = "SELECT cat_id,cat_title + FROM ". RADIOCAST_CAT_TABLE ." + WHERE cat_id = $cat_id"; + if ( $result = $db->sql_query($sql) ) + { + $thiscat_parent = array(); + $thiscat_parent = $db->sql_fetchrow($result); + + $template->assign_vars(array( + 'U_VIEW_CAT_PARENT' => append_sid(this_rc_mxurl("c=" . $thiscat_parent['cat_id'])), + 'SUBCAT_NAV' => ' ' . $lang['Nav_Separator'] . ' <a class="nav" href="' . append_sid(this_rc_mxurl("c=" . $thiscat_parent['cat_id'])) . '">' . $thiscat_parent['cat_title'] . '</a>', + 'CAT_PARENT_TITLE' => $thiscat_parent['cat_title'], + 'U_RSS' => append_sid(this_rc_mxurl("radiocast_mode=radiocast_rss&c=" . $thiscat_parent['cat_id'] . "&sid=" . $userdata['session_id'], true)), + 'CAT_PARENT' => $thiscat_parent['cat_id']) + ); + } + } + else + { + $template->assign_vars(array( + 'U_RSS' => append_sid(this_rc_mxurl("radiocast_mode=radiocast_rss" . "&sid=" . $userdata['session_id'], true)) + )); + + } + $sql = "SELECT c.*, COUNT(s.station_id) AS count FROM ". RADIOCAST_CAT_TABLE ." AS c LEFT JOIN ". RADIOCAST_TABLE ." AS s ON c.cat_id = s.station_cat_id ! WHERE $cat_where GROUP BY cat_id ORDER BY cat_order ASC"; *************** *** 251,343 **** // ------------------------------------------ ! if ($catrows[$i]['count'] == 0) ! { ! // ! // Oh, this category is empty ! // ! $last_station_info = $lang['No_Stations']; ! $u_last_station = ''; ! $last_station_title = ''; ! } ! else ! { ! // ---------------------------- ! // Check Station Approval ! // ---------------------------- ! ! if(($catrows[$i]['cat_approval'] == RADIOCAST_ADMIN) or ($catrows[$i]['cat_approval'] == RADIOCAST_MOD)) { ! $station_approval_sql = 'AND s.station_approval = 1'; // station Approval ON } else { ! $station_approval_sql = ''; // station Approval OFF ! } - // ---------------------------- - // OK, we may do a query now... - // ---------------------------- ! $sql = "SELECT s.station_id, s.station_title, s.station_singer, s.station_user_id, s.station_username, s.station_time, s.station_cat_id, u.user_id, u.username ! FROM ". RADIOCAST_TABLE ." AS s LEFT JOIN ". USERS_TABLE ." AS u ON s.station_user_id = u.user_id ! WHERE s.station_cat_id = '". $catrows[$i]['cat_id'] ."' $station_approval_sql ! ORDER BY s.station_time DESC ! LIMIT 1"; ! if ( !$result = $db->sql_query($sql) ) ! { ! mx_message_die(GENERAL_ERROR, 'Could not get last station information', '', __LINE__, __FILE__, $sql); ! } ! $lastrow = $db->sql_fetchrow($result); - // ---------------------------- - // Write the Date - // ---------------------------- ! $last_station_info = create_date($board_config['default_dateformat'], $lastrow['station_time'], $board_config['board_timezone']); ! $last_station_info .= '<br />'; - // ---------------------------- - // Write username of last poster - // ---------------------------- ! if( ($lastrow['user_id'] == RADIOCAST_GUEST) or ($lastrow['username'] == '') ) ! { ! $last_station_info .= ($lastrow['station_username'] == '') ? $lang['Guest'] : $lastrow['station_username']; ! } ! else ! { ! $last_station_info .= $lang['Poster'] .': <a href="'. append_sid($phpbb_root_path . "profile.$phpEx?mode=viewprofile&". POST_USERS_URL .'='. $lastrow['user_id']) .'">'. $lastrow['username'] .'</a>'; ! } - // ---------------------------- - // Write the last station's title. - // Truncate it if it's too long - // ---------------------------- ! if( !isset($radiocast_config['last_station_title_length']) ) ! { ! $radiocast_config['last_station_title_length'] = 25; ! } ! $lastrow['station_title'] = $lastrow['station_title']; ! if (strlen($lastrow['station_title']) > $radiocast_config['last_station_title_length']) ! { ! $lastrow['station_title'] = substr($lastrow['station_title'], 0, $radiocast_config['last_station_title_length']) . '...'; ! } ! $last_station_info .= '<br />'. $lang['Station_Title'] .': <a href="'; ! $last_station_info .= append_sid(this_rc_mxurl("radiocast_mode=radiocast_player&station_id=". $lastrow['station_id'])) .'">' ; ! $last_station_info .= $lastrow['station_title'] .'</a>'; ! } ! // END of Last Station // ------------------------------------------ --- 281,430 ---- // ------------------------------------------ ! if ($catrows[$i]['cat_type'] == 0) ! { ! if ($catrows[$i]['count'] == 0) { ! // ! // Oh, this category is empty ! // ! $last_station_info = $lang['No_Stations']; ! $u_last_station = ''; ! $last_station_title = ''; } else { ! // ---------------------------- ! // Check Station Approval ! // ---------------------------- + if(($catrows[$i]['cat_approval'] == RADIOCAST_ADMIN) or ($catrows[$i]['cat_approval'] == RADIOCAST_MOD)) + { + $station_approval_sql = 'AND s.station_approval = 1'; // station Approval ON + } + else + { + $station_approval_sql = ''; // station Approval OFF + } ! // ---------------------------- ! // OK, we may do a query now... ! // ---------------------------- + $sql = "SELECT s.station_id, s.station_title, s.station_singer, s.station_user_id, s.station_username, s.station_time, s.station_cat_id, u.user_id, u.username + FROM ". RADIOCAST_TABLE ." AS s LEFT JOIN ". USERS_TABLE ." AS u ON s.station_user_id = u.user_id + WHERE s.station_cat_id = '". $catrows[$i]['cat_id'] ."' $station_approval_sql + ORDER BY s.station_time DESC + LIMIT 1"; + if ( !$result = $db->sql_query($sql) ) + { + mx_message_die(GENERAL_ERROR, 'Could not get last station information', '', __LINE__, __FILE__, $sql); + } + $lastrow = $db->sql_fetchrow($result); ! // ---------------------------- ! // Write the Date ! // ---------------------------- ! $last_station_info = create_date($board_config['default_dateformat'], $lastrow['station_time'], $board_config['board_timezone']); + $last_station_info .= '<br />'; ! // ---------------------------- ! // Write username of last poster ! // ---------------------------- + if( ($lastrow['user_id'] == RADIOCAST_GUEST) or ($lastrow['username'] == '') ) + { + $last_station_info .= ($lastrow['station_username'] == '') ? $lang['Guest'] : $lastrow['station_username']; + } + else + { + $last_station_info .= $lang['Poster'] .': <a href="'. append_sid($phpbb_root_path . "profile.$phpEx?mode=viewprofile&". POST_USERS_URL .'='. $lastrow['user_id']) .'">'. $lastrow['username'] .'</a>'; + } ! // ---------------------------- ! // Write the last station's title. ! // Truncate it if it's too long ! // ---------------------------- ! if( !isset($radiocast_config['last_station_title_length']) ) ! { ! $radiocast_config['last_station_title_length'] = 25; ! } ! $lastrow['station_title'] = $lastrow['station_title']; ! if (strlen($lastrow['station_title']) > $radiocast_config['last_station_title_length']) ! { ! $lastrow['station_title'] = substr($lastrow['station_title'], 0, $radiocast_config['last_station_title_length']) . '...'; ! } ! $last_station_info .= '<br />'. $lang['Station_Title'] .': <a href="'; ! $last_station_info .= append_sid(this_rc_mxurl("radiocast_mode=radiocast_player&station_id=". $lastrow['station_id'])) .'">' ; + $last_station_info .= $lastrow['station_title'] .'</a>'; + } + // END of Last Station + } + else + { + // this is a parent category + $sc_sql = "SELECT * + FROM ". RADIOCAST_CAT_TABLE ." + WHERE cat_parent = " . $catrows[$i]['cat_id'] . " + GROUP BY cat_id + ORDER BY cat_order ASC"; + + if ( !($sc_result = $db->sql_query($sc_sql)) ) + { + message_die(GENERAL_ERROR, 'Could not query sub categories', '', __LINE__, __FILE__, $sql); + } + + $sql_count = "SELECT count(cat_id) as count + FROM ". RADIOCAST_CAT_TABLE ." + WHERE cat_parent = " . $catrows[$i]['cat_id']; + if ( ($result_count = $db->sql_query($sql_count)) ) + { + $subcat_count = $db->sql_fetchrow($result_count); + $subcat_count = $subcat_count['count'] . " sub catagories"; + } + else + { + $subcat_count = ""; + } + + $subcats = '<br /><span class="gensmall"><b>' . $lang['RadioCast_sub_categories'] . ':</b><br />'; + while ( $subcatrow = $db->sql_fetchrow($sc_result) ) + { + $subcats .= ' - <a class="gensmall" href="' . append_sid(this_rc_mxurl('radiocast_mode=radiocast_cat&cat_id='. $subcatrow['cat_id'])) . '">' . $subcatrow['cat_title'] . '</a><br />'; + } + $subcats .= '</span><br />'; + + $template->assign_block_vars('catrow', array( + 'U_VIEW_CAT' => append_sid(this_rc_mxurl("radiocast_mode=radiocast_index&c=". $catrows[$i]['cat_id'])), + 'CAT_TITLE' => $catrows[$i]['cat_title'], + 'CAT_DESC' => $catrows[$i]['cat_desc'], + 'SONGS' => $subcat_count, + 'CAT_VIEWS' => $catrows[$i]['cat_views'], + 'L_MODERATORS' => $l_moderators, + 'L_ALL_CAT_PICS' => $lang['Category_pics'], + 'L_ALL_CAT_SONGS' => $lang['Category_stations'], + 'MODERATORS' => $moderators_list, + 'LAST_SONG_INFO' => $last_station_info) + ); + + if ($radiocast_config['show_index_subcats'] == 1) + { + $template->assign_block_vars('catrow.subcat_link', array( + 'L_SUBCATS' => $lang['RadioCast_sub_categories'], + 'SUBCATS' => $subcats) + ); + } + } // ------------------------------------------ *************** *** 345,358 **** // ------------------------------------------ ! $template->assign_block_vars('catrow', array( ! 'U_VIEW_CAT' => append_sid(this_rc_mxurl("radiocast_mode=radiocast_cat&cat_id=". $catrows[$i]['cat_id'])), ! 'CAT_TITLE' => $catrows[$i]['cat_title'], ! 'CAT_DESC' => $catrows[$i]['cat_desc'], ! 'CAT_VIEWS' => $catrows[$i]['cat_views'], ! 'L_MODERATORS' => $l_moderators, ! 'MODERATORS' => $moderators_list, ! 'STATIONS' => $catrows[$i]['count'], ! 'LAST_STATION_INFO' => $last_station_info) ! ); } // END of Categories Index --- 432,448 ---- // ------------------------------------------ ! if ($catrows[$i]['cat_type'] == 0) ! { ! $template->assign_block_vars('catrow', array( ! 'U_VIEW_CAT' => append_sid(this_rc_mxurl("radiocast_mode=radiocast_cat&cat_id=". $catrows[$i]['cat_id'])), ! 'CAT_TITLE' => $catrows[$i]['cat_title'], ! 'CAT_DESC' => $catrows[$i]['cat_desc'], ! 'CAT_VIEWS' => $catrows[$i]['cat_views'], ! 'L_MODERATORS' => $l_moderators, ! 'MODERATORS' => $moderators_list, ! 'STATIONS' => $catrows[$i]['count'], ! 'LAST_STATION_INFO' => $last_station_info) ! ); ! } } // END of Categories Index *************** *** 465,470 **** // We may do query now // ! ! if ($allowed_cat != '') { $sql = "SELECT s.station_id, s.station_title, s.station_desc, s.station_singer, s.station_user_id, s.station_user_ip, s.station_username, s.station_time, s.station_cat_id, s.station_view_count, u.user_id, u.username, r.rate_station_id, AVG(r.rate_point) AS rating, COUNT(DISTINCT c.comment_id) AS comments, MAX(c.comment_id) as new_comment --- 555,559 ---- // We may do query now // ! if ( ($allowed_cat != '') && ($radiocast_config['top'] > '0') ) { $sql = "SELECT s.station_id, s.station_title, s.station_desc, s.station_singer, s.station_user_id, s.station_user_ip, s.station_username, s.station_time, s.station_cat_id, s.station_view_count, u.user_id, u.username, r.rate_station_id, AVG(r.rate_point) AS rating, COUNT(DISTINCT c.comment_id) AS comments, MAX(c.comment_id) as new_comment *************** *** 483,497 **** } ! $topstationrow = array(); while( $row = $db->sql_fetchrow($result) ) { ! $topstationrow[] = $row; } ! if (count($topstationrow) > 0) { ! for ($i = 0; $i < count($topstationrow); $i += $radiocast_config['rows_per_page']) { $template->assign_block_vars('top_stations', array()); --- 572,586 ---- } ! $topsongrow = array(); while( $row = $db->sql_fetchrow($result) ) { ! $topsongrow[] = $row; } ! if (count($topsongrow) > 0) { ! for ($i = 0; $i < count($topsongrow); $i += $radiocast_config['rows_per_page']) { $template->assign_block_vars('top_stations', array()); *************** *** 499,549 **** for ($j = $i; $j < ($i + $radiocast_config['rows_per_page']); $j++) { ! if( $j >= count($topstationrow) ) { break; } ! if(!$topstationrow[$j]['rating']) { ! $topstationrow[$j]['rating'] = $lang['Not_rated']; } else { ! $topstationrow[$j]['rating'] = round($topstationrow[$j]['rating'], 2); } $template->assign_block_vars('top_stations.top_row', array( ! 'U_STATION' => append_sid(this_rc_mxurl("radiocast_mode=radiocast_player&station_id=". $topstationrow[$j]['station_id'])), ! 'DESC' => $topstationrow[$j]['station_desc'] ) ); ! if( ($topstationrow[$j]['user_id'] == RADIOCAST_GUEST) or ($topstationrow[$j]['username'] == '') ) { ! $top_poster = ($topstationrow[$j]['station_username'] == '') ? $lang['Guest'] : $topstationrow[$j]['station_username']; } else { ! $top_poster = '<a href="'. append_sid($phpbb_root_path . "profile.$phpEx?mode=viewprofile&". POST_USERS_URL .'='. $topstationrow[$j]['user_id']) .'">'. $topstationrow[$j]['username'] .'</a>'; } $template->assign_block_vars('top_stations.top_detail', array( ! 'TITLE' => '<a href="'. append_sid(this_rc_mxurl("radiocast_mode=radiocast_player&station_id=". $topstationrow[$j]['station_id'])) . '">' . $topstationrow[$j]['station_title'] . '</a>', ! ! 'SINGER' => $topstationrow[$j]['station_singer'], 'RADIO_FRONT_IMG' => $mx_images['radio_front'], 'POSTER' => $top_poster, ! 'TIME' => create_date($board_config['default_dateformat'], $topstationrow[$j]['station_time'], $board_config['board_timezone']), ! ! 'VIEW' => $topstationrow[$j]['station_view_count'], ! 'RATING' => ($radiocast_config['rate'] == 1) ? ( '<a href="'. append_sid(this_rc_mxurl("radiocast_mode=radiocast_rate&station_id=". $topstationrow[$j]['station_id'])) . '">' . $topstationrow[$j]['rating'] . '</a>' ) : '', ! 'COMMENTS' => ($radiocast_config['comment'] == 1) ? ( '<a href="'. append_sid(this_rc_mxurl("radiocast_mode=radiocast_comment&station_id=". $topstationrow[$j]['station_id'])) . '">' . $topstationrow[$j]['comments'] . '</a>' ) : '', ! 'IP' => ($userdata['user_level'] == ADMIN) ? $lang['IP_Address'] . ': <a href="http://www.nic.com/cgi-bin/whois.cgi?query=' . decode_ip($topstationrow[$j]['station_user_ip']) . '" target="_blank">' . decode_ip($topstationrow[$j]['station_user_ip']) .'</a><br />' : '' ) ); --- 588,636 ---- for ($j = $i; $j < ($i + $radiocast_config['rows_per_page']); $j++) { ! if( $j >= count($topsongrow) ) { break; } ! if(!$topsongrow[$j]['rating']) { ! $topsongrow[$j]['rating'] = $lang['Not_rated']; } else { ! $topsongrow[$j]['rating'] = round($topsongrow[$j]['rating'], 2); } $template->assign_block_vars('top_stations.top_row', array( ! 'U_SONG' => append_sid(this_rc_mxurl("radiocast_mode=radiocast_player&station_id=". $topsongrow[$j]['station_id'])), ! 'DESC' => $topsongrow[$j]['station_desc'] ) ); ! if( ($topsongrow[$j]['user_id'] == RADIOCAST_GUEST) or ($topsongrow[$j]['username'] == '') ) { ! $top_poster = ($topsongrow[$j]['station_username'] == '') ? $lang['Guest'] : $topsongrow[$j]['station_username']; } else { ! $top_poster = '<a href="'. append_sid($phpbb_root_path . "profile.$phpEx?mode=viewprofile&". POST_USERS_URL .'='. $topsongrow[$j]['user_id']) .'">'. $topsongrow[$j]['username'] .'</a>'; } $template->assign_block_vars('top_stations.top_detail', array( ! 'TITLE' => '<a href="'. append_sid(this_rc_mxurl("radiocast_mode=radiocast_player&station_id=". $topsongrow[$j]['station_id'])) . '">' . $topsongrow[$j]['station_title'] . '</a>', ! 'SINGER' => $topsongrow[$j]['station_singer'], 'RADIO_FRONT_IMG' => $mx_images['radio_front'], 'POSTER' => $top_poster, + 'TIME' => create_date($board_config['default_dateformat'], $topsongrow[$j]['station_time'], $board_config['board_timezone']), ! 'VIEW' => $topsongrow[$j]['station_view_count'], ! 'RATING' => ($radiocast_config['rate'] == 1) ? ( '<a href="'. append_sid(this_rc_mxurl("radiocast_mode=radiocast_rate&station_id=". $topsongrow[$j]['station_id'])) . '">' . $topsongrow[$j]['rating'] . '</a>' ) : '', ! 'COMMENTS' => ($radiocast_config['comment'] == 1) ? ( '<a href="'. append_sid(this_rc_mxurl("radiocast_mode=radiocast_comment&station_id=". $topsongrow[$j]['station_id'])) . '">' . $topsongrow[$j]['comments'] . '</a>' ) : '', ! 'IP' => ($userdata['user_level'] == ADMIN) ? $lang['IP_Address'] . ': <a href="http://www.nic.com/cgi-bin/whois.cgi?query=' . decode_ip($topsongrow[$j]['station_user_ip']) . '" target="_blank">' . decode_ip($topsongrow[$j]['station_user_ip']) .'</a><br />' : '' ) ); *************** *** 551,554 **** --- 638,773 ---- } } + else if ( ($mode == 'radiocast_index') && !isset($_GET['c']) ) + { + $sql = "SELECT c.*, COUNT(s.station_id) AS count + FROM ". RADIOCAST_CAT_TABLE ." AS c + LEFT JOIN ". RADIOCAST_TABLE ." AS s ON c.cat_id = s.station_cat_id + WHERE cat_id <> 0 + GROUP BY cat_id + ORDER BY cat_order ASC"; + if( !($result = $db->sql_query($sql)) ) + { + mx_message_die(GENERAL_ERROR, 'Could not query categories list', '', __LINE__, __FILE__, $sql); + } + + $catsrow = array(); + + while( $row = $db->sql_fetchrow($result) ) + { + $radiocast_user_access = radiocast_user_access($row['cat_id'], $row, 1, 0, 0, 0, 0, 0); // VIEW + if ($radiocast_user_access['view'] == 1) + { + $catsrow[] = $row; + } + } + + for ($i = 0; $i < count($catsrow); $i++) + { + // -------------------------------- + // Build allowed category-list (for recent stations after here) + // -------------------------------- + + $allowed_cat .= ($allowed_cat == '') ? $catsrow[$i]['cat_id'] : ',' . $catsrow[$i]['cat_id']; + } + + if ( ($allowed_cat != '') && ($radiocast_config['top'] > '0') ) + { + $sql = "SELECT s.station_id, s.station_title, s.station_desc, s.station_singer, s.station_user_id, s.station_user_ip, s.station_username, s.station_time, s.station_cat_id, s.station_view_count, u.user_id, u.username, r.rate_station_id, AVG(r.rate_point) AS rating, COUNT(DISTINCT c.comment_id) AS comments, MAX(c.comment_id) as new_comment + FROM ". RADIOCAST_TABLE ." AS s + LEFT JOIN ". USERS_TABLE ." AS u ON s.station_user_id = u.user_id + LEFT JOIN ". RADIOCAST_CAT_TABLE ." AS ct ON s.station_cat_id = ct.cat_id + LEFT JOIN ". RADIOCAST_RATE_TABLE ." AS r ON s.station_id = r.rate_station_id + LEFT JOIN ". RADIOCAST_COMMENT_TABLE ." AS c ON s.station_id = c.comment_station_id + WHERE s.station_cat_id IN ($allowed_cat) AND ( s.station_approval = 1 OR ct.cat_approval = 0 ) + GROUP BY s.station_id + ORDER BY $sort_method DESC + LIMIT $station_limit"; + if( !($result = $db->sql_query($sql)) ) + { + mx_message_die(GENERAL_ERROR, 'Could not query top stations information', '', __LINE__, __FILE__, $sql); + } + + $topsongrow = array(); + + while( $row = $db->sql_fetchrow($result) ) + { + $topsongrow[] = $row; + } + + + if (count($topsongrow) > 0) + { + for ($i = 0; $i < count($topsongrow); $i += $radiocast_config['rows_per_page']) + { + $template->assign_block_vars('top_stations', array()); + + for ($j = $i; $j < ($i + $radiocast_config['rows_per_page']); $j++) + { + if( $j >= count($topsongrow) ) + { + break; + } + + if(!$topsongrow[$j]['rating']) + { + $topsongrow[$j]['rating'] = $lang['Not_rated']; + } + else + { + $topsongrow[$j]['rating'] = round($topsongrow[$j]['rating'], 2); + } + + $template->assign_block_vars('top_stations.top_row', array( + 'U_SONG' => append_sid(this_rc_mxurl("radiocast_mode=radiocast_player&station_id=". $topsongrow[$j]['station_id'])), + 'DESC' => $topsongrow[$j]['station_desc'] + ) + ); + + if( ($topsongrow[$j]['user_id'] == RADIOCAST_GUEST) or ($topsongrow[$j]['username'] == '') ) + { + $top_poster = ($topsongrow[$j]['station_username'] == '') ? $lang['Guest'] : $topsongrow[$j]['station_username']; + } + else + { + $top_poster = '<a href="'. append_sid($phpbb_root_path . "profile.$phpEx?mode=viewprofile&". POST_USERS_URL .'='. $topsongrow[$j]['user_id']) .'">'. $topsongrow[$j]['username'] .'</a>'; + } + + $template->assign_block_vars('top_stations.top_detail', array( + 'TITLE' => '<a href="'. append_sid(this_rc_mxurl("radiocast_mode=radiocast_player&station_id=". $topsongrow[$j]['station_id'])) . '">' . $topsongrow[$j]['station_title'] . '</a>', + 'SINGER' => $topsongrow[$j]['station_singer'], + + 'RADIO_FRONT_IMG' => $mx_images['radio_front'], + + 'POSTER' => $top_poster, + 'TIME' => create_date($board_config['default_dateformat'], $topsongrow[$j]['station_time'], $board_config['board_timezone']), + + 'VIEW' => $topsongrow[$j]['station_view_count'], + + 'RATING' => ($radiocast_config['rate'] == 1) ? ( '<a href="'. append_sid(this_rc_mxurl("radiocast_mode=radiocast_rate&station_id=". $topsongrow[$j]['station_id'])) . '">' . $topsongrow[$j]['rating'] . '</a>' ) : '', + + 'COMMENTS' => ($radiocast_config['comment'] == 1) ? ( '<a href="'. append_sid(this_rc_mxurl("radiocast_mode=radiocast_comment&station_id=". $topsongrow[$j]['station_id'])) . '">' . $topsongrow[$j]['comments'] . '</a>' ) : '', + + 'IP' => ($userdata['user_level'] == ADMIN) ? $lang['IP_Address'] . ': <a href="http://www.nic.com/cgi-bin/whois.cgi?query=' . decode_ip($topsongrow[$j]['station_user_ip']) . '" target="_blank">' . decode_ip($topsongrow[$j]['station_user_ip']) .'</a><br />' : '' + ) + ); + } + } + } + else + { + // + // No stations Found + // + $template->assign_block_vars('no_stations', array()); + } + } + else + { + // + // No stations Found + // + $template->assign_block_vars('no_stations', array()); + } + } else { Index: db_install.php =================================================================== RCS file: /cvsroot/mxbb/mx_radiocast/db_install.php,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** db_install.php 6 Jun 2007 23:03:43 -0000 1.1 --- db_install.php 17 Sep 2007 07:19:37 -0000 1.2 *************** *** 8,12 **** * */ ! ini_set( 'display_errors', '1' ); define( 'IN_PORTAL', true ); --- 8,12 ---- * */ ! //ini_set( 'display_errors', '1' ); define( 'IN_PORTAL', true ); *************** *** 33,37 **** } ! $mx_module_version = '1.0.0'; $mx_module_copy = 'mxBB <i> - Radio Cast</i> module by <a href="http://www.mxbb.net/" target="_blank">OryNider</a>'; --- 33,37 ---- } ! $mx_module_version = '1.0.1'; $mx_module_copy = 'mxBB <i> - Radio Cast</i> module by <a href="http://www.mxbb.net/" target="_blank">OryNider</a>'; *************** *** 108,111 **** --- 108,113 ---- $sql[] = "CREATE TABLE ". $mx_table_prefix . "radiocast_cat ( cat_id mediumint(8) UNSIGNED NOT NULL auto_increment, + cat_parent mediumint(8) UNSIGNED NOT NULL DEFAULT '0', + cat_type tinyint NOT NULL DEFAULT '0', cat_title varchar(255) NOT NULL, cat_desc text, |