|
From: Jon O. <jon...@us...> - 2008-07-15 22:06:17
|
Update of /cvsroot/mxbb/mx_music In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv25527 Modified Files: music.php music_flv.php Log Message: More Index: music.php =================================================================== RCS file: /cvsroot/mxbb/mx_music/music.php,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** music.php 13 Mar 2008 04:57:57 -0000 1.16 --- music.php 15 Jul 2008 22:06:07 -0000 1.17 *************** *** 21,31 **** define('MXBB_MODULE', false); define('IN_PHPBB', true); ! $phpbb_root_path = $module_root_path = './'; $mx_mod_path = $phpbb_root_path . 'mx_mod/'; ! include($phpbb_root_path . 'common.' . $phpEx); include($mx_mod_path . "includes/functions_required.$phpEx"); ! //Check if forum_hack is installed if (!isset($mx_root_path)) --- 21,31 ---- define('MXBB_MODULE', false); define('IN_PHPBB', true); ! $phpbb_root_path = $module_root_path = './'; $mx_mod_path = $phpbb_root_path . 'mx_mod/'; ! include($phpbb_root_path . 'common.' . $phpEx); include($mx_mod_path . "includes/functions_required.$phpEx"); ! //Check if forum_hack is installed if (!isset($mx_root_path)) *************** *** 45,52 **** $mx_root_path = $phpbb_root_path; } ! require($mx_mod_path . "includes/functions_core.$phpEx"); require($mx_mod_path . "includes/functions_styles.$phpEx"); ! //Check for cash mod if (file_exists($phpbb_root_path . 'includes/functions_cash.'.$phpEx)) --- 45,52 ---- $mx_root_path = $phpbb_root_path; } ! require($mx_mod_path . "includes/functions_core.$phpEx"); require($mx_mod_path . "includes/functions_styles.$phpEx"); ! //Check for cash mod if (file_exists($phpbb_root_path . 'includes/functions_cash.'.$phpEx)) *************** *** 65,69 **** // $mx_cache = new mx_cache(); ! // // Get mxBB config settings --- 65,69 ---- // $mx_cache = new mx_cache(); ! // // Get mxBB config settings *************** *** 75,79 **** // $mx_request_vars = new mx_request_vars(); ! // // Page selector --- 75,79 ---- // $mx_request_vars = new mx_request_vars(); ! // // Page selector *************** *** 82,86 **** $is_block = false; ! // // instatiate the mx_user class --- 82,86 ---- $is_block = false; ! // // instatiate the mx_user class *************** *** 92,96 **** define('PORTAL_BACKEND', 'phpbb2'); $tplEx = 'tpl'; ! // // Start user session --- 92,96 ---- define('PORTAL_BACKEND', 'phpbb2'); $tplEx = 'tpl'; ! // // Start user session *************** *** 108,114 **** } */ ! include_once($phpbb_root_path . 'includes/bbcode.' . $phpEx); ! include_once($phpbb_root_path . 'includes/functions_post.' . $phpEx); ! } else if (@file_exists("./mcp.$phpEx")) // phpBB3 --- 108,114 ---- } */ ! ! mx_cache::load_file('bbcode'); ! mx_cache::load_file('functions_post'); } else if (@file_exists("./mcp.$phpEx")) // phpBB3 *************** *** 116,120 **** define('PORTAL_BACKEND', 'phpbb3'); $tplEx = 'html'; ! // // Start user session --- 116,120 ---- define('PORTAL_BACKEND', 'phpbb3'); $tplEx = 'html'; ! // // Start user session *************** *** 156,160 **** // Start session management // ! $mx_user->init($user_ip, PAGE_INDEX); // // End session management --- 156,160 ---- // Start session management // ! $mx_user->init($user_ip, PAGE_INDEX); // // End session management *************** *** 185,191 **** if( is_object($mx_block)) { ! $is_block = TRUE; } ! global $images; } --- 185,191 ---- if( is_object($mx_block)) { ! $is_block = TRUE; } ! global $images; } *************** *** 300,304 **** else { ! /* +---------------------------------------------------------- --- 300,304 ---- else { ! /* +---------------------------------------------------------- *************** *** 320,351 **** */ ! $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 ". MUSIC_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_mo_mxurl("c=" . $thiscat_parent['cat_id'])), 'SUBCAT_NAV' => ' ' . $lang['Nav_Separator'] . ' <a class="nav" href="' . append_sid(this_mo_mxurl("c=" . $thiscat_parent['cat_id'])) . '">' . $thiscat_parent['cat_title'] . '</a>', 'CAT_PARENT_TITLE' => $thiscat_parent['cat_title'], 'U_RSS' => append_sid(this_mo_mxurl("music_mode=music_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_mo_mxurl("music_mode=music_rss" . "&sid=" . $userdata['session_id'], true)) )); ! } --- 320,351 ---- */ ! $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 ". MUSIC_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_mo_mxurl("c=" . $thiscat_parent['cat_id'])), 'SUBCAT_NAV' => ' ' . $lang['Nav_Separator'] . ' <a class="nav" href="' . append_sid(this_mo_mxurl("c=" . $thiscat_parent['cat_id'])) . '">' . $thiscat_parent['cat_title'] . '</a>', 'CAT_PARENT_TITLE' => $thiscat_parent['cat_title'], 'U_RSS' => append_sid(this_mo_mxurl("music_mode=music_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_mo_mxurl("music_mode=music_rss" . "&sid=" . $userdata['session_id'], true)) )); ! } *************** *** 431,436 **** // ------------------------------------------ ! if ($catrows[$i]['cat_type'] == 0) ! { if ($catrows[$i]['count'] == 0) { --- 431,436 ---- // ------------------------------------------ ! if ($catrows[$i]['cat_type'] == 0) ! { if ($catrows[$i]['count'] == 0) { *************** *** 550,554 **** { mx_message_die(GENERAL_ERROR, 'Could not query songs information', '', __LINE__, __FILE__, $sql); ! } $mediarow = array(); --- 550,554 ---- { mx_message_die(GENERAL_ERROR, 'Could not query songs information', '', __LINE__, __FILE__, $sql); ! } $mediarow = array(); *************** *** 563,567 **** if(!empty($template->xs_version)) { ! if ($total_media > 0) { $template->assign_block_vars('catrow.virtualmediacat', array()); --- 563,567 ---- if(!empty($template->xs_version)) { ! if ($total_media > 0) { $template->assign_block_vars('catrow.virtualmediacat', array()); *************** *** 579,583 **** { mx_message_die(GENERAL_ERROR, 'Could not query songs information', '', __LINE__, __FILE__, $sql); ! } $totalrow = array(); --- 579,583 ---- { mx_message_die(GENERAL_ERROR, 'Could not query songs information', '', __LINE__, __FILE__, $sql); ! } $totalrow = array(); *************** *** 594,641 **** if(!empty($template->xs_version)) { ! if ($total_images > 0) { $template->assign_block_vars('catrow.virtualimagecat', array()); } } ! } ! else ! { ! // this is a parent category ! $sc_sql = "SELECT * ! FROM ". MUSIC_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 ". MUSIC_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['Music_sub_categories'] . ':</b><br />'; ! while ( $subcatrow = $db->sql_fetchrow($sc_result) ) ! { ! $subcats .= ' - <a class="gensmall" href="' . append_sid(this_mo_mxurl('music_mode=music_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_mo_mxurl("music_mode=music_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'], --- 594,641 ---- if(!empty($template->xs_version)) { ! if ($total_images > 0) { $template->assign_block_vars('catrow.virtualimagecat', array()); } } ! } ! else ! { ! // this is a parent category ! $sc_sql = "SELECT * ! FROM ". MUSIC_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 ". MUSIC_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['Music_sub_categories'] . ':</b><br />'; ! while ( $subcatrow = $db->sql_fetchrow($sc_result) ) ! { ! $subcats .= ' - <a class="gensmall" href="' . append_sid(this_mo_mxurl('music_mode=music_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_mo_mxurl("music_mode=music_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'], *************** *** 644,648 **** 'L_ALL_CAT_SONGS' => $lang['Category_songs'], 'MODERATORS' => $moderators_list, ! 'LAST_SONG_INFO' => $last_song_info) ); --- 644,648 ---- 'L_ALL_CAT_SONGS' => $lang['Category_songs'], 'MODERATORS' => $moderators_list, ! 'LAST_SONG_INFO' => $last_song_info) ); *************** *** 653,663 **** 'SUBCATS' => $subcats) ); ! } ! } // ------------------------------------------ // Parse to template the info of the current Category // ------------------------------------------ if ($catrows[$i]['cat_type'] == 0) ! { //Removed code } --- 653,663 ---- 'SUBCATS' => $subcats) ); ! } ! } // ------------------------------------------ // Parse to template the info of the current Category // ------------------------------------------ if ($catrows[$i]['cat_type'] == 0) ! { //Removed code } Index: music_flv.php =================================================================== RCS file: /cvsroot/mxbb/mx_music/music_flv.php,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** music_flv.php 19 Jun 2008 12:01:55 -0000 1.3 --- music_flv.php 15 Jul 2008 22:06:07 -0000 1.4 *************** *** 21,31 **** define('MXBB_MODULE', false); define('IN_PHPBB', true); ! $phpbb_root_path = $module_root_path = './'; $mx_mod_path = $phpbb_root_path . 'mx_mod/'; ! include($phpbb_root_path . 'common.' . $phpEx); include($mx_mod_path . "includes/functions_required.$phpEx"); ! //Check if forum_hack is installed if (!isset($mx_root_path)) --- 21,31 ---- define('MXBB_MODULE', false); define('IN_PHPBB', true); ! $phpbb_root_path = $module_root_path = './'; $mx_mod_path = $phpbb_root_path . 'mx_mod/'; ! include($phpbb_root_path . 'common.' . $phpEx); include($mx_mod_path . "includes/functions_required.$phpEx"); ! //Check if forum_hack is installed if (!isset($mx_root_path)) *************** *** 45,52 **** $mx_root_path = $phpbb_root_path; } ! require($mx_mod_path . "includes/functions_core.$phpEx"); require($mx_mod_path . "includes/functions_styles.$phpEx"); ! //Check for cash mod if (file_exists($phpbb_root_path . 'includes/functions_cash.'.$phpEx)) --- 45,52 ---- $mx_root_path = $phpbb_root_path; } ! require($mx_mod_path . "includes/functions_core.$phpEx"); require($mx_mod_path . "includes/functions_styles.$phpEx"); ! //Check for cash mod if (file_exists($phpbb_root_path . 'includes/functions_cash.'.$phpEx)) *************** *** 65,69 **** // $mx_cache = new mx_cache(); ! // // Get mxBB config settings --- 65,69 ---- // $mx_cache = new mx_cache(); ! // // Get mxBB config settings *************** *** 75,79 **** // $mx_request_vars = new mx_request_vars(); ! // // Page selector --- 75,79 ---- // $mx_request_vars = new mx_request_vars(); ! // // Page selector *************** *** 82,86 **** $is_block = false; ! // // instatiate the mx_user class --- 82,86 ---- $is_block = false; ! // // instatiate the mx_user class *************** *** 92,96 **** define('PORTAL_BACKEND', 'phpbb2'); $tplEx = 'tpl'; ! // // Start user session --- 92,96 ---- define('PORTAL_BACKEND', 'phpbb2'); $tplEx = 'tpl'; ! // // Start user session *************** *** 108,114 **** } */ ! include_once($phpbb_root_path . 'includes/bbcode.' . $phpEx); ! include_once($phpbb_root_path . 'includes/functions_post.' . $phpEx); ! } else if (@file_exists("./mcp.$phpEx")) // phpBB3 --- 108,115 ---- } */ ! ! mx_cache::load_file('bbcode'); ! mx_cache::load_file('functions_post'); ! } else if (@file_exists("./mcp.$phpEx")) // phpBB3 *************** *** 116,120 **** define('PORTAL_BACKEND', 'phpbb3'); $tplEx = 'html'; ! // // Start user session --- 117,121 ---- define('PORTAL_BACKEND', 'phpbb3'); $tplEx = 'html'; ! // // Start user session *************** *** 157,161 **** // Start session management // ! $mx_user->init($user_ip, PAGE_INDEX); // // End session management --- 158,162 ---- // Start session management // ! $mx_user->init($user_ip, PAGE_INDEX); // // End session management *************** *** 187,193 **** if(is_object($mx_block)) { ! $is_block = TRUE; } ! global $images; } --- 188,194 ---- if(is_object($mx_block)) { ! $is_block = TRUE; } ! global $images; } *************** *** 354,358 **** if (!$userdata['session_logged_in']) { ! mx_redirect(mx_append_sid($mx_root_path . "login.php?redirect=" . this_mo_loginurl("music_mode=music_page&song_id=$song_id"), true)); } else --- 355,359 ---- if (!$userdata['session_logged_in']) { ! mx_redirect(mx_append_sid($mx_root_path . "login.php?redirect=" . this_mo_loginurl("music_mode=music_page&song_id=$song_id"), true)); } else *************** *** 561,565 **** $url_download = ( !empty($videoid['song_url'][1]) ? 'http://' . $domain . '/videoplay?docid=-' . $videoid['song_url'][1] : $thissong['song_url'] ); $lang['Download'] = ( !empty($lang['Watch']) ? $lang['Watch'] : 'Watch URL' ); ! } } else if ( ($sitename == 'www.youtube') || ($sitename == 'youtube') ) --- 562,566 ---- $url_download = ( !empty($videoid['song_url'][1]) ? 'http://' . $domain . '/videoplay?docid=-' . $videoid['song_url'][1] : $thissong['song_url'] ); $lang['Download'] = ( !empty($lang['Watch']) ? $lang['Watch'] : 'Watch URL' ); ! } } else if ( ($sitename == 'www.youtube') || ($sitename == 'youtube') ) *************** *** 569,573 **** if (empty($videoid['song_url'][1]) ) { ! $videoid['song_url'] = explode("/v/", $thissong['song_url']); } --- 570,574 ---- if (empty($videoid['song_url'][1]) ) { ! $videoid['song_url'] = explode("/v/", $thissong['song_url']); } *************** *** 631,635 **** $url_download = ( !empty($docid2) ? 'http://' . $domain . '/watch/' . $docid2 : $thissong['song_url'] ); $lang['Download'] = ( !empty($lang['Share']) ? $lang['Share'] : 'Share URL' ); ! $url_video = ( !empty($docid2) ? 'http://' . $domain . '/movie/' . $docid2 : $url_download ); } } --- 632,636 ---- $url_download = ( !empty($docid2) ? 'http://' . $domain . '/watch/' . $docid2 : $thissong['song_url'] ); $lang['Download'] = ( !empty($lang['Share']) ? $lang['Share'] : 'Share URL' ); ! $url_video = ( !empty($docid2) ? 'http://' . $domain . '/movie/' . $docid2 : $url_download ); } } *************** *** 654,658 **** $url_download = ( !empty($docid2) ? 'http://' . $sitelngprefix . 'sevenload.' . 'com' . '/videos/' . $docid2 : $thissong['song_url'] ); $lang['Download'] = ( !empty($lang['Share']) ? $lang['Share'] : 'Share URL' ); ! $url_video = ( !empty($docid2) ? 'http://' . $domain . '/swf/player.swf?id=' . $docid2 : $url_download ); } } --- 655,659 ---- $url_download = ( !empty($docid2) ? 'http://' . $sitelngprefix . 'sevenload.' . 'com' . '/videos/' . $docid2 : $thissong['song_url'] ); $lang['Download'] = ( !empty($lang['Share']) ? $lang['Share'] : 'Share URL' ); ! $url_video = ( !empty($docid2) ? 'http://' . $domain . '/swf/player.swf?id=' . $docid2 : $url_download ); } } *************** *** 663,667 **** $url_download = ( !empty($videoid['song_url'][1]) ? 'http://' . $sitelngprefix . 'sevenload.'. 'com' . '/videos/' . $videoid['song_url'][1] : $thissong['song_url'] ); $lang['Download'] = ( !empty($lang['Share']) ? $lang['Share'] : 'Share URL' ); ! $url_video = ( !empty($videoid['song_url'][1]) ? 'http://' . $domain . '/swf/player.swf?id=' . $videoid['song_url'][1] : $url_download ); } --- 664,668 ---- $url_download = ( !empty($videoid['song_url'][1]) ? 'http://' . $sitelngprefix . 'sevenload.'. 'com' . '/videos/' . $videoid['song_url'][1] : $thissong['song_url'] ); $lang['Download'] = ( !empty($lang['Share']) ? $lang['Share'] : 'Share URL' ); ! $url_video = ( !empty($videoid['song_url'][1]) ? 'http://' . $domain . '/swf/player.swf?id=' . $videoid['song_url'][1] : $url_download ); } *************** *** 769,775 **** 'L_COMMENTS' => $lang['Comments']) ); ! } ! else { $template->assign_block_vars('flv', array()); --- 770,776 ---- 'L_COMMENTS' => $lang['Comments']) ); ! } ! else { $template->assign_block_vars('flv', array()); *************** *** 777,781 **** //$url_video = (@file_exists($music_root_path . 'mediaplayer.swf')) ? $music_root_path . 'mediaplayer.swf' : PORTAL_URL . 'modules/mx_music/music_box/mediaplayer.swf'; $url_video = PORTAL_URL . 'modules/mx_music/music_box/mediaplayer.swf'; ! if (@file_exists($mx_root_path . $flv_file)) { --- 778,782 ---- //$url_video = (@file_exists($music_root_path . 'mediaplayer.swf')) ? $music_root_path . 'mediaplayer.swf' : PORTAL_URL . 'modules/mx_music/music_box/mediaplayer.swf'; $url_video = PORTAL_URL . 'modules/mx_music/music_box/mediaplayer.swf'; ! if (@file_exists($mx_root_path . $flv_file)) { *************** *** 790,794 **** $url_song = $flv_file; } ! if (@file_exists($mx_root_path . $flv_img)) { --- 791,795 ---- $url_song = $flv_file; } ! if (@file_exists($mx_root_path . $flv_img)) { *************** *** 802,806 **** { $img_id = $flv_img; ! } $template->assign_vars(array( --- 803,807 ---- { $img_id = $flv_img; ! } $template->assign_vars(array( *************** *** 881,885 **** 'L_COMMENTS' => $lang['Comments']) ); ! } --- 882,886 ---- 'L_COMMENTS' => $lang['Comments']) ); ! } |