|
From: OryNider <ory...@us...> - 2007-09-12 23:49:21
|
Update of /cvsroot/mxbb/mx_music/includes In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv29553/includes Modified Files: Tag: core28x music_cat.php music_download.php music_media_cat.php music_page.php music_pic_cat.php music_rss.php music_song.php music_upload.php Log Message: Index: music_upload.php =================================================================== RCS file: /cvsroot/mxbb/mx_music/includes/music_upload.php,v retrieving revision 1.6 retrieving revision 1.6.2.1 diff -C2 -d -r1.6 -r1.6.2.1 *** music_upload.php 8 Sep 2007 13:28:29 -0000 1.6 --- music_upload.php 12 Sep 2007 23:49:16 -0000 1.6.2.1 *************** *** 252,255 **** --- 252,257 ---- 'S_SWF' => ($music_config['swf_allowed'] == 1) ? 'SWF,' : '', 'S_QT' => ($music_config['qt_allowed'] == 1) ? 'QT,' : '', + 'S_FLV' => ($music_config['flv_allowed'] == 1) ? 'FLV,' : '', + 'S_IMG' => ($music_config['img_allowed'] == 1) ? 'IMG,' : '', 'S_RM' => ($music_config['rm_allowed'] == 1) ? 'RM,' : '', // Media Center *************** *** 482,485 **** --- 484,497 ---- break; + case 'video/x-flv': + case 'video/flv': + case 'application/octet-stream': + if ($music_config['flv_allowed'] == 0) + { + mx_message_die(GENERAL_ERROR, $lang['Not_allowed_file_type']); + } + $song_filetype = '.flv'; + break; + case 'audio/x-midi': case 'audio/mid': *************** *** 549,553 **** default: ! mx_message_die(GENERAL_ERROR, $lang['Not_allowed_file_type']); } } --- 561,565 ---- default: ! mx_message_die(GENERAL_ERROR, $lang['Not_allowed_file_type'] . ': ' . $filetype); } } Index: music_pic_cat.php =================================================================== RCS file: /cvsroot/mxbb/mx_music/includes/music_pic_cat.php,v retrieving revision 1.2 retrieving revision 1.2.2.1 diff -C2 -d -r1.2 -r1.2.2.1 *** music_pic_cat.php 8 Sep 2007 13:28:29 -0000 1.2 --- music_pic_cat.php 12 Sep 2007 23:49:16 -0000 1.2.2.1 *************** *** 440,443 **** --- 440,452 ---- $user_id = $thissong['song_user_id']; + if ( $thissong['song_imagename'] == '' ) + { + $img_id = $mx_images['no_image']; + } + else + { + $img_id = ($module_root_path . 'upload/song_image/' . $thissong['song_imagename']); + } + if ( $thissong['song_url'] == '' ) { *************** *** 496,509 **** $row_type = 'qt'; } ! else if ( ( $song_filetype == '.jpg' ) || ( $song_filetype == '.gif' ) || ( $song_filetype == '.png' ) ) { ! $url_download = !empty($thissong['song_url']) ? $thissong['song_url'] : append_sid(this_mo_mxurl("music_mode=music_download&song_id=$song_id")); ! $url_video = $url_download; ! $row_type = 'img'; ! $template->assign_block_vars('songrow.img', array( ! 'VIDEO_URL' => $url_video, ! 'SONG_URL' => $url_video ! )); } else if ( ( $song_filetype == 'jpg' ) || ( $song_filetype == 'gif' ) || ( $song_filetype == 'png' ) ) --- 505,522 ---- $row_type = 'qt'; } ! else if ( $song_filetype == 'flv' ) { ! /* ! if ( !is_object($mx_page) ) ! { ! $mx_page = new mx_page(); ! } ! $mx_page->add_footer_text( $music_root_path . 'music_player.js', true ); ! */ ! $template->assign_block_vars('songrow.flv', array()); ! $url_download = append_sid(this_mo_mxurl("music_mode=music_download&song_id=$song_id")); ! $url_video = $music_root_path . 'music_player.swf'; ! $row_type = 'flv'; } else if ( ( $song_filetype == 'jpg' ) || ( $song_filetype == 'gif' ) || ( $song_filetype == 'png' ) ) *************** *** 749,753 **** } ! $url_song = append_sid(this_mo_mxurl("music_mode=music_song&song_id=" . $song_id, true)); $template->assign_block_vars('songrow.song_detail', array( --- 762,773 ---- } ! if ( $song_filetype == 'flv' ) ! { ! $url_song = PORTAL_URL . MUSIC_UPLOAD_PATH . $thissong['song_filename']; ! } ! else ! { ! $url_song = append_sid(this_mo_mxurl("music_mode=music_song&song_id=" . $songrow[$j]['song_id'], true)); ! } $template->assign_block_vars('songrow.song_detail', array( *************** *** 758,762 **** 'SONG_TITLE' => $thissong['song_title'], ! 'SONG_URL' => !empty($thissong['song_url']) ? $thissong['song_url'] : append_sid(this_mo_mxurl("music_mode=music_song&song_id=" . $songrow[$j]['song_id'], true)), 'SONG_THUMB_URL' => !empty($thissong['song_url']) ? $thissong['song_url'] : append_sid(this_mo_mxurl("music_mode=music_song&song_id=" . $songrow[$j]['song_id'] . "&item_size=114", true)), --- 778,782 ---- 'SONG_TITLE' => $thissong['song_title'], ! 'SONG_URL' => !empty($thissong['song_url']) ? $thissong['song_url'] : $url_song, 'SONG_THUMB_URL' => !empty($thissong['song_url']) ? $thissong['song_url'] : append_sid(this_mo_mxurl("music_mode=music_song&song_id=" . $songrow[$j]['song_id'] . "&item_size=114", true)), *************** *** 766,769 **** --- 786,791 ---- 'VIDEO_URL' => $url_video, + 'U_IMG' => append_sid("$img_id"), + 'SINGER' => $songrow[$j]['song_singer'], *************** *** 948,951 **** --- 970,982 ---- 'HEIGHT' => ( !empty($media_height) ? $media_height : '85' ), + 'FLASH' => 'flash', + 'RAM' => 'ram', + 'FLASHVIDEO' => 'flashvideo', + 'YOUTUBE' => 'youtube', + 'QT' => 'qt', + 'FLV' => 'flv', + 'IMG' => 'img', + 'MEDIA' => 'media', + 'S_AUTH_LIST' => $auth_list) ); Index: music_cat.php =================================================================== RCS file: /cvsroot/mxbb/mx_music/includes/music_cat.php,v retrieving revision 1.8 retrieving revision 1.8.2.1 diff -C2 -d -r1.8 -r1.8.2.1 *** music_cat.php 8 Sep 2007 13:28:29 -0000 1.8 --- music_cat.php 12 Sep 2007 23:49:16 -0000 1.8.2.1 *************** *** 437,440 **** --- 437,449 ---- $user_id = $thissong['song_user_id']; + if ( $thissong['song_imagename'] == '' ) + { + $img_id = $mx_images['no_image']; + } + else + { + $img_id = ($module_root_path . 'upload/song_image/' . $thissong['song_imagename']); + } + if ( $thissong['song_url'] == '' ) { *************** *** 494,497 **** --- 503,521 ---- $row_type = 'qt'; } + else if ( $song_filetype == 'flv' ) + { + /* + if ( !is_object($mx_page) ) + { + $mx_page = new mx_page(); + } + $mx_page->add_footer_text( $music_root_path . 'music_player.js', true ); + */ + + $template->assign_block_vars('songrow.flv', array()); + $url_download = append_sid(this_mo_mxurl("music_mode=music_download&song_id=$song_id")); + $url_video = $music_root_path . 'music_player.swf'; + $row_type = 'flv'; + } else if ( ( $song_filetype == '.jpg' ) || ( $song_filetype == '.gif' ) || ( $song_filetype == '.png' ) ) { *************** *** 747,751 **** } ! $url_song = append_sid(this_mo_mxurl("music_mode=music_song&song_id=" . $song_id, true)); $template->assign_block_vars('songrow.song_detail', array( --- 771,782 ---- } ! if ( $song_filetype == 'flv' ) ! { ! $url_song = PORTAL_URL . MUSIC_UPLOAD_PATH . $thissong['song_filename']; ! } ! else ! { ! $url_song = append_sid(this_mo_mxurl("music_mode=music_song&song_id=" . $songrow[$j]['song_id'], true)); ! } $template->assign_block_vars('songrow.song_detail', array( *************** *** 756,760 **** 'SONG_TITLE' => $thissong['song_title'], ! 'SONG_URL' => !empty($thissong['song_url']) ? $thissong['song_url'] : append_sid(this_mo_mxurl("music_mode=music_song&song_id=" . $songrow[$j]['song_id'], true)), 'SONG_THUMB_URL' => !empty($thissong['song_url']) ? $thissong['song_url'] : append_sid(this_mo_mxurl("music_mode=music_song&song_id=" . $songrow[$j]['song_id'] . "&item_size=425", true)), --- 787,791 ---- 'SONG_TITLE' => $thissong['song_title'], ! 'SONG_URL' => !empty($thissong['song_url']) ? $thissong['song_url'] : $url_song, 'SONG_THUMB_URL' => !empty($thissong['song_url']) ? $thissong['song_url'] : append_sid(this_mo_mxurl("music_mode=music_song&song_id=" . $songrow[$j]['song_id'] . "&item_size=425", true)), *************** *** 764,767 **** --- 795,800 ---- 'VIDEO_URL' => $url_video, + 'U_IMG' => append_sid("$img_id"), + 'SINGER' => $songrow[$j]['song_singer'], *************** *** 939,944 **** 'U_MX_MUSIC' => append_sid(this_mo_portalurl()), ! 'WIDTH' => ( !empty($media_width) ? $media_width : '228' ), ! 'HEIGHT' => ( !empty($media_height) ? $media_height : '300' ), 'S_AUTH_LIST' => $auth_list) --- 972,989 ---- 'U_MX_MUSIC' => append_sid(this_mo_portalurl()), ! 'WIDTH' => ( !empty($media_width) ? $media_width : '425' ), ! 'HEIGHT' => ( !empty($media_height) ? $media_height : '350' ), ! ! 'FLASH' => 'flash', ! 'RAM' => 'ram', ! 'FLASHVIDEO' => 'flashvideo', ! 'YOUTUBE' => 'youtube', ! 'QT' => 'qt', ! 'FLV' => 'flv', ! 'IMG' => 'img', ! 'MEDIA' => 'media', ! ! 'L_RSS' => ( !empty($lang['Rss_Feed']) ? $lang['Rss_Feed'] : 'RSS Feed' ), ! 'U_RSS' => append_sid(this_mo_mxurl("music_mode=music_rss&cat_id=" . $cat_id . "&sid=" . $userdata['session_id'], true)), 'S_AUTH_LIST' => $auth_list) Index: music_rss.php =================================================================== RCS file: /cvsroot/mxbb/mx_music/includes/music_rss.php,v retrieving revision 1.3 retrieving revision 1.3.2.1 diff -C2 -d -r1.3 -r1.3.2.1 *** music_rss.php 8 Sep 2007 13:28:29 -0000 1.3 --- music_rss.php 12 Sep 2007 23:49:16 -0000 1.3.2.1 *************** *** 115,127 **** $no_limit=( isset($HTTP_GET_VARS['nolimit']) ) ? true : false; ! $sql = "SELECT c.*, COUNT(s.song_id) AS count FROM ". MUSIC_CAT_TABLE ." AS c LEFT JOIN ". MUSIC_TABLE ." AS s ON c.cat_id = s.song_cat_id ! WHERE cat_id <> 0 GROUP BY cat_id ORDER BY cat_order ASC"; ! if( !($result = $db->sql_query($sql)) ) ! { ! die("Could not query categories list"); } --- 115,147 ---- $no_limit=( isset($HTTP_GET_VARS['nolimit']) ) ? true : false; ! $cat_id = $_POST['cat_id'] ? $_POST['cat_id'] : ( $_GET['cat_id'] ? $_GET['cat_id'] : 0 ); ! $cat_parent = $_POST['c'] ? $_POST['c'] : ( $_GET['c'] ? $_GET['c'] : 0 ); ! $cat_where = ($cat_id != 0) ? "cat_parent = $cat_parent" : "cat_id <> 0"; ! ! if ($cat_id != 0) ! { ! $sql = "SELECT c.*, COUNT(s.song_id) AS count ! FROM ". MUSIC_CAT_TABLE ." AS c ! LEFT JOIN ". MUSIC_TABLE ." AS s ON c.cat_id = s.song_cat_id ! WHERE cat_id = $cat_id ! GROUP BY cat_id ! ORDER BY cat_order ASC"; ! if( !($result = $db->sql_query($sql)) ) ! { ! die("Could not query this category"); ! } ! } ! else ! { ! $sql = "SELECT c.*, COUNT(s.song_id) AS count FROM ". MUSIC_CAT_TABLE ." AS c LEFT JOIN ". MUSIC_TABLE ." AS s ON c.cat_id = s.song_cat_id ! WHERE $cat_where GROUP BY cat_id ORDER BY cat_order ASC"; ! if( !($result = $db->sql_query($sql)) ) ! { ! die("Could not query categories list"); ! } } *************** *** 209,212 **** --- 229,241 ---- $thissong = $db->sql_fetchrow($result); + if ( $thissong['song_imagename'] == '' ) + { + $img_id = $mx_images['no_image']; + } + else + { + $img_id = ($module_root_path . 'upload/song_image/' . $thissong['song_imagename']); + } + if ( $thissong['song_url'] == '' ) { *************** *** 256,264 **** $row_type = 'qt'; } ! else if ( ( $song_filetype == '.jpg' ) || ( $song_filetype == '.gif' ) || ( $song_filetype == '.png' ) ) { ! $url_download = !empty($thissong['song_url']) ? $thissong['song_url'] : append_sid(this_mo_mxurl("music_mode=music_download&song_id=$song_id")); ! $url_video = $url_download; ! $row_type = 'img'; } else if ( ( $song_filetype == 'jpg' ) || ( $song_filetype == 'gif' ) || ( $song_filetype == 'png' ) ) --- 285,302 ---- $row_type = 'qt'; } ! else if ( $song_filetype == 'flv' ) { ! /* ! if ( !is_object($mx_page) ) ! { ! $mx_page = new mx_page(); ! } ! $mx_page->add_footer_text( $music_root_path . 'music_player.js', true ); ! */ ! ! $template->assign_block_vars('songrow.flv', array()); ! $url_download = append_sid(this_mo_mxurl("music_mode=music_download&song_id=$song_id")); ! $url_video = $music_root_path . 'music_player.swf'; ! $row_type = 'flv'; } else if ( ( $song_filetype == 'jpg' ) || ( $song_filetype == 'gif' ) || ( $song_filetype == 'png' ) ) *************** *** 470,473 **** --- 508,512 ---- $url_page = append_sid(PORTAL_URL . this_mo_rssurl("music_mode=music_page&" . "song_id=" . $thissong['song_id'])); $url_song = !empty($thissong['song_url']) ? $thissong['song_url'] : append_sid(PORTAL_URL . this_mo_rssurl("music_mode=music_song&" . "song_id=" . $thissong['song_id'], true)); + $url_flv = !empty($thissong['song_url']) ? $thissong['song_url'] : PORTAL_URL . MUSIC_UPLOAD_PATH . $thissong['song_filename']; $url_comment = append_sid(PORTAL_URL . this_mo_rssurl("music_mode=music_comment&" . "song_id=" . $thissong['song_id'])); *************** *** 489,499 **** case 'flashvideo': ! $html_code = '<embed src="' . $url_song . '" id="VideoPlayback" type="application/x-shockwave-flash" wmode="transparent" width="425" height="350" flashvars=""></embed>'; ! $enclosure = 'url="' . $url_video . '" ' . 'type="application/x-shockwave-flash" length="1024000"'; break; case 'youtube': ! $html_code = '<embed src="' . $url_video . '" id="VideoPlayback" type="application/x-shockwave-flash" wmode="transparent" width="425" height="350" flashvars=""></embed>'; ! $enclosure = 'url="' . $url_video . '" ' . 'type="application/x-shockwave-flash" length="1024000"'; break; --- 528,543 ---- case 'flashvideo': ! $html_code = '<embed src="' . $url_video . '" wmode="transparent" width="425" height="350" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />'; ! $enclosure = 'url="' . $url_song . '" ' . 'type="application/x-shockwave-flash" length="1024000"'; break; case 'youtube': ! $html_code = '<embed src="' . $url_video . '" id="VideoPlayback" wmode="transparent" width="425" height="350" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />'; ! $enclosure = 'url="' . $url_song . '" ' . 'type="application/x-shockwave-flash" length="1024000"'; ! break; ! ! case 'flv': ! $html_code = '<embed src="' . $url_video . '" flashvars="file=' . $url_flv . '&image=' . $img_id . '&shuffleOnLoad=no" loop="false" allowfullscreen="true" menu="false" quality="high" width="425" height="350" scale="noscale" salign="lt" name="flvplayer" align="center" bgcolor="000000" allowScriptAccess="always" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />'; ! $enclosure = 'url="' . $url_song . '" ' . 'type="application/x-shockwave-flash" length="1024000"'; break; *************** *** 504,508 **** case 'img': ! $html_code = '<a href="' . $url_page . '">' . '<img src="' . $url_thumb_song . '" border="1" vspace="2" hspace="2" align="left" width="425" height="350">' . '</a>'; $enclosure = 'url="' . $url_song . '" ' . 'type="image/png" length="1024000"'; break; --- 548,552 ---- case 'img': ! $html_code = '<a href="' . $url_page . '">' . '<img src="' . $url_thumb_song . '" border="1" vspace="2" hspace="2" align="left" width="425" height="350" />' . '</a>'; $enclosure = 'url="' . $url_song . '" ' . 'type="image/png" length="1024000"'; break; Index: music_media_cat.php =================================================================== RCS file: /cvsroot/mxbb/mx_music/includes/music_media_cat.php,v retrieving revision 1.2 retrieving revision 1.2.2.1 diff -C2 -d -r1.2 -r1.2.2.1 *** music_media_cat.php 8 Sep 2007 13:28:29 -0000 1.2 --- music_media_cat.php 12 Sep 2007 23:49:16 -0000 1.2.2.1 *************** *** 467,470 **** --- 467,479 ---- $user_id = $thissong['song_user_id']; + if ( $thissong['song_imagename'] == '' ) + { + $img_id = $mx_images['no_image']; + } + else + { + $img_id = ($module_root_path . 'upload/song_image/' . $thissong['song_imagename']); + } + if ( $thissong['song_url'] == '' ) { *************** *** 511,517 **** $row_type = 'qt'; } ! else if ( ( $song_filetype == '.jpg' ) || ( $song_filetype == '.gif' ) || ( $song_filetype == '.png' ) ) { ! $row_type = 'img'; } else if ( ( $song_filetype == 'jpg' ) || ( $song_filetype == 'gif' ) || ( $song_filetype == 'png' ) ) --- 520,526 ---- $row_type = 'qt'; } ! else if ( $song_filetype == 'flv' ) { ! $row_type = 'flv'; } else if ( ( $song_filetype == 'jpg' ) || ( $song_filetype == 'gif' ) || ( $song_filetype == 'png' ) ) *************** *** 694,697 **** --- 703,710 ---- break; + case 'flv': + $switch_row_type = 'media'; + break; + case 'media': $switch_row_type = 'media'; *************** *** 780,783 **** --- 793,811 ---- $url_video = $url_download; } + else if ( $song_filetype == 'flv' ) + { + + /* + if ( !is_object($mx_page) ) + { + $mx_page = new mx_page(); + } + $mx_page->add_footer_text( $music_root_path . 'music_player.js', true ); + */ + + $template->assign_block_vars('songrow.flv', array()); + $url_download = append_sid(this_mo_mxurl("music_mode=music_download&song_id=$song_id")); + $url_video = $music_root_path . 'music_player.swf'; + } else if ( ( $song_filetype == '.jpg' ) || ( $song_filetype == '.gif' ) || ( $song_filetype == '.png' ) ) { *************** *** 1006,1010 **** } ! $url_song = append_sid(this_mo_mxurl("music_mode=music_song&song_id=" . $song_id, true)); $template->assign_block_vars('songrow.song_detail', array( --- 1034,1045 ---- } ! if ( $song_filetype == 'flv' ) ! { ! $url_song = PORTAL_URL . MUSIC_UPLOAD_PATH . $thissong['song_filename']; ! } ! else ! { ! $url_song = append_sid(this_mo_mxurl("music_mode=music_song&song_id=" . $songrow[$j]['song_id'], true)); ! } $template->assign_block_vars('songrow.song_detail', array( *************** *** 1015,1019 **** 'SONG_TITLE' => $thissong['song_title'], ! 'SONG_URL' => !empty($thissong['song_url']) ? $thissong['song_url'] : append_sid(this_mo_mxurl("music_mode=music_song&song_id=" . $songrow[$j]['song_id'], true)), 'SONG_THUMB_URL' => !empty($thissong['song_url']) ? $thissong['song_url'] : append_sid(this_mo_mxurl("music_mode=music_song&song_id=" . $songrow[$j]['song_id'] . "&item_size=425", true)), --- 1050,1054 ---- 'SONG_TITLE' => $thissong['song_title'], ! 'SONG_URL' => !empty($thissong['song_url']) ? $thissong['song_url'] : $url_song, 'SONG_THUMB_URL' => !empty($thissong['song_url']) ? $thissong['song_url'] : append_sid(this_mo_mxurl("music_mode=music_song&song_id=" . $songrow[$j]['song_id'] . "&item_size=425", true)), *************** *** 1023,1026 **** --- 1058,1063 ---- 'VIDEO_URL' => $url_video, + 'U_IMG' => append_sid("$img_id"), + 'SINGER' => $songrow[$j]['song_singer'], *************** *** 1200,1205 **** 'U_MX_MUSIC' => append_sid(this_mo_portalurl()), ! 'WIDTH' => ( !empty($media_width) ? $media_width : '228' ), ! 'HEIGHT' => ( !empty($media_height) ? $media_height : '300' ), 'S_AUTH_LIST' => $auth_list) --- 1237,1251 ---- 'U_MX_MUSIC' => append_sid(this_mo_portalurl()), ! 'WIDTH' => ( !empty($media_width) ? $media_width : '425' ), ! 'HEIGHT' => ( !empty($media_height) ? $media_height : '350' ), ! ! 'FLASH' => 'flash', ! 'RAM' => 'ram', ! 'FLASHVIDEO' => 'flashvideo', ! 'YOUTUBE' => 'youtube', ! 'QT' => 'qt', ! 'FLV' => 'flv', ! 'IMG' => 'img', ! 'MEDIA' => 'media', 'S_AUTH_LIST' => $auth_list) Index: music_song.php =================================================================== RCS file: /cvsroot/mxbb/mx_music/includes/music_song.php,v retrieving revision 1.5 retrieving revision 1.5.2.1 diff -C2 -d -r1.5 -r1.5.2.1 *** music_song.php 8 Sep 2007 13:28:29 -0000 1.5 --- music_song.php 12 Sep 2007 23:49:16 -0000 1.5.2.1 *************** *** 203,206 **** --- 203,209 ---- $read_function = 'readfile'; break; + case '.flv': + $read_function = 'readfile'; + break; case 'ram': $read_function = 'readfile'; *************** *** 260,263 **** --- 263,269 ---- header('Content-type: video/quicktime'); break; + case 'flv': + header('Content-type: video/x-flv'); + break; case 'ram': header('Content-type: audio/x-pn-realaudio'); Index: music_download.php =================================================================== RCS file: /cvsroot/mxbb/mx_music/includes/music_download.php,v retrieving revision 1.4 retrieving revision 1.4.2.1 diff -C2 -d -r1.4 -r1.4.2.1 *** music_download.php 8 Sep 2007 13:28:29 -0000 1.4 --- music_download.php 12 Sep 2007 23:49:16 -0000 1.4.2.1 *************** *** 15,51 **** } - // - // Let's include some stuff... - // - $phpEx = substr(strrchr(__FILE__, '.'), 1); - - if ( !defined('TEMPLATE_ROOT_PATH') ) - { - include_once($mx_root_path . 'common.' . $phpEx); - - // - // Start session management - // - $mx_user->init($user_ip, PAGE_INDEX); - // - // End session management - // - } - $music_root_path = $module_root_path . 'music_box/'; - // - // Get general music information - // - if ( !$is_block ) - { - include($music_root_path . 'music_common.'.$phpEx); - } - else - { - include_once($music_root_path . 'music_common.'.$phpEx); - } - /* +---------------------------------------------------------- --- 15,21 ---- *************** *** 157,160 **** --- 127,133 ---- header('Content-type: video/quicktime'); break; + case 'flv': + header('Content-type: video/x-flv'); + break; case 'ram': header('Content-type: audio/x-pn-realaudio'); Index: music_page.php =================================================================== RCS file: /cvsroot/mxbb/mx_music/includes/music_page.php,v retrieving revision 1.7 retrieving revision 1.7.2.1 diff -C2 -d -r1.7 -r1.7.2.1 *** music_page.php 8 Sep 2007 13:28:29 -0000 1.7 --- music_page.php 12 Sep 2007 23:49:16 -0000 1.7.2.1 *************** *** 137,141 **** else { ! $img_id = ( $song_image_path . $thissong['song_imagename'] ); } --- 137,141 ---- else { ! $img_id = $song_image_path . $thissong['song_imagename']; } *************** *** 288,301 **** $url_video = $url_download; } ! else if ( ( $song_filetype == '.jpg' ) || ( $song_filetype == '.gif' ) || ( $song_filetype == '.png' ) ) { ! $url_download = !empty($thissong['song_url']) ? $thissong['song_url'] : append_sid(this_mo_mxurl("music_mode=music_download&song_id=$song_id")); ! $url_video = $url_download; ! $row_type = 'img'; ! $template->assign_block_vars('img', array( ! 'VIDEO_URL' => $url_video, ! 'SONG_URL' => $url_video ! )); } else if ( ( $song_filetype == 'jpg' ) || ( $song_filetype == 'gif' ) || ( $song_filetype == 'png' ) ) --- 288,304 ---- $url_video = $url_download; } ! else if ( $song_filetype == 'flv' ) { ! /* ! if ( !is_object($mx_page) ) ! { ! $mx_page = new mx_page(); ! } ! $mx_page->add_footer_text( $music_root_path . 'music_player.js', true ); ! */ ! $template->assign_block_vars('flv', array()); ! $url_download = append_sid(this_mo_mxurl("music_mode=music_download&song_id=$song_id")); ! $url_video = $music_root_path . 'music_player.swf'; } else if ( ( $song_filetype == 'jpg' ) || ( $song_filetype == 'gif' ) || ( $song_filetype == 'png' ) ) *************** *** 510,515 **** } ! //$url_song = append_sid($module_root_path . 'galerie_media.' . $phpEx . '?music_mode=music_song&song_id=' . $song_id); ! $url_song = append_sid(this_mo_mxurl("music_mode=music_song&song_id=" . $song_id, true)); $template->assign_vars(array( --- 513,524 ---- } ! if ( $song_filetype == 'flv' ) ! { ! $url_song = PORTAL_URL . MUSIC_UPLOAD_PATH . $thissong['song_filename']; ! } ! else ! { ! $url_song = append_sid(this_mo_mxurl("music_mode=music_song&song_id=" . $song_id, true)); ! } $template->assign_vars(array( *************** *** 517,521 **** 'U_VIEW_CAT' => append_sid(this_mo_mxurl("music_mode=music_cat&cat_id=$cat_id")), - //'U_SONG' => append_sid($module_root_path . 'galerie_media.' . $phpEx . '?music_mode=music_song&song_id=' . $song_id), 'U_SONG' => $url_song, --- 526,529 ---- *************** *** 524,528 **** 'SONG_TITLE' => $thissong['song_title'], ! 'SONG_URL' => !empty($thissong['song_url']) ? $thissong['song_url'] : append_sid(this_mo_mxurl("music_mode=music_song&song_id=" . $song_id, true)), 'SONG_THUMB_URL' => !empty($thissong['song_url']) ? $thissong['song_url'] : append_sid(this_mo_mxurl("music_mode=music_song&song_id=" . $song_id . "&item_size=425", true)), --- 532,536 ---- 'SONG_TITLE' => $thissong['song_title'], ! 'SONG_URL' => !empty($thissong['song_url']) ? $thissong['song_url'] : $url_song, 'SONG_THUMB_URL' => !empty($thissong['song_url']) ? $thissong['song_url'] : append_sid(this_mo_mxurl("music_mode=music_song&song_id=" . $song_id . "&item_size=425", true)), *************** *** 572,575 **** --- 580,592 ---- 'HEIGHT' => ( !empty($media_height) ? $media_height : '300' ), + 'FLASH' => 'flash', + 'RAM' => 'ram', + 'FLASHVIDEO' => 'flashvideo', + 'YOUTUBE' => 'youtube', + 'QT' => 'qt', + 'FLV' => 'flv', + 'IMG' => 'img', + 'MEDIA' => 'media', + 'L_RATING' => $lang['Rating'], 'L_SONG_TITLE' => $lang['Song_Title'], |