|
From: Jon O. <jon...@us...> - 2008-01-28 21:59:33
|
Update of /cvsroot/mxbb/mx_radiocast In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv19556 Modified Files: radiocast.php Log Message: Index: radiocast.php =================================================================== RCS file: /cvsroot/mxbb/mx_radiocast/radiocast.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** radiocast.php 17 Sep 2007 07:19:37 -0000 1.2 --- radiocast.php 28 Jan 2008 21:59:28 -0000 1.3 *************** *** 26,30 **** // Start session management // ! $mx_user->init($user_ip, PAGE_INDEX); // // End session management --- 26,30 ---- // Start session management // ! $mx_user->init($user_ip, PAGE_INDEX); // // End session management *************** *** 55,61 **** if( is_object($mx_block)) { ! $is_block = TRUE; } ! global $images, $mx_images; } --- 55,61 ---- if( is_object($mx_block)) { ! $is_block = TRUE; } ! global $images, $mx_images; } *************** *** 169,200 **** */ ! $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)) )); ! } --- 169,200 ---- */ ! $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)) )); ! } *************** *** 281,286 **** // ------------------------------------------ ! if ($catrows[$i]['cat_type'] == 0) ! { if ($catrows[$i]['count'] == 0) { --- 281,286 ---- // ------------------------------------------ ! if ($catrows[$i]['cat_type'] == 0) ! { if ($catrows[$i]['count'] == 0) { *************** *** 371,413 **** } // 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'], --- 371,413 ---- } // 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'], *************** *** 416,420 **** 'L_ALL_CAT_SONGS' => $lang['Category_stations'], 'MODERATORS' => $moderators_list, ! 'LAST_SONG_INFO' => $last_station_info) ); --- 416,420 ---- 'L_ALL_CAT_SONGS' => $lang['Category_stations'], 'MODERATORS' => $moderators_list, ! 'LAST_SONG_INFO' => $last_station_info) ); *************** *** 425,429 **** 'SUBCATS' => $subcats) ); ! } } --- 425,429 ---- 'SUBCATS' => $subcats) ); ! } } *************** *** 432,436 **** // ------------------------------------------ ! if ($catrows[$i]['cat_type'] == 0) { $template->assign_block_vars('catrow', array( --- 432,436 ---- // ------------------------------------------ ! if ($catrows[$i]['cat_type'] == 0) { $template->assign_block_vars('catrow', array( |