|
From: Florin C B. <ory...@us...> - 2014-09-29 11:58:27
|
Update of /cvsroot/mxbb/mx_shotcast/includes In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv26240/includes Modified Files: cast_functions.php common.php getinfo_ice.php getinfo_shout.php java_script.php Log Message: some updates for new browsers Index: common.php =================================================================== RCS file: /cvsroot/mxbb/mx_shotcast/includes/common.php,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** common.php 28 May 2013 07:14:34 -0000 1.10 --- common.php 29 Sep 2014 11:58:25 -0000 1.11 *************** *** 30,40 **** die("Hacking attempt"); } if (!defined('PORTAL_BACKEND')) { ! define('MXBB_MODULE', false); } else { ! define('MXBB_MODULE', true); } --- 30,41 ---- die("Hacking attempt"); } + //@ for compatibility with non shoutcast version of radio front if (!defined('PORTAL_BACKEND')) { ! @define('MXBB_MODULE', false); } else { ! @define('MXBB_MODULE', true); } *************** *** 237,245 **** } } $radio_skin = preg_replace("/[^a-zA-Z0-9_.-@]/", "", $radio_skin); if (@file_exists($module_root_path . "skins/" . $radio_skin . "/skin_config.$phpEx") === false) { $radio_skin = $default_skin; ! //die('Requested skin and default skin configuration file couldn\'t be found.'); } @define('SKIN', $radio_skin); --- 238,247 ---- } } + $radio_skin = preg_replace("/[^a-zA-Z0-9_.-@]/", "", $radio_skin); if (@file_exists($module_root_path . "skins/" . $radio_skin . "/skin_config.$phpEx") === false) { $radio_skin = $default_skin; ! die('Requested skin and default skin configuration file couldn\'t be found.'); } @define('SKIN', $radio_skin); Index: cast_functions.php =================================================================== RCS file: /cvsroot/mxbb/mx_shotcast/includes/cast_functions.php,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** cast_functions.php 28 May 2013 07:14:34 -0000 1.1 --- cast_functions.php 29 Sep 2014 11:58:25 -0000 1.2 *************** *** 27,35 **** // OryNider (v 4.2 - 5.0-dev) ! if( !defined('IN_SHOTCAST')) { die("Hacking attempt"); } function asc2hex($temp) { --- 27,38 ---- // OryNider (v 4.2 - 5.0-dev) ! if( !defined('IN_PORTAL') ) { die("Hacking attempt"); } + if (!function_exists('obj_to_array')) + { + function asc2hex($temp) { *************** *** 80,84 **** $contents = curl_exec($c); $err = curl_error($c); ! //die("$url"); @curl_close($c); if ($contents) --- 83,87 ---- $contents = curl_exec($c); $err = curl_error($c); ! ////die("$url"); @curl_close($c); if ($contents) *************** *** 376,378 **** --- 379,384 ---- return $$getInfo; } + + } + ?> \ No newline at end of file Index: java_script.php =================================================================== RCS file: /cvsroot/mxbb/mx_shotcast/includes/java_script.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** java_script.php 29 May 2013 05:00:43 -0000 1.2 --- java_script.php 29 Sep 2014 11:58:25 -0000 1.3 *************** *** 20,23 **** --- 20,45 ---- // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + @ example from http://www.w3schools.com/jsref/tryit.asp?filename=tryjsref_iframe_src + <!DOCTYPE html> + <html> + <body> + + <iframe id="embedFrame" src="/default.asp"></iframe> + + <p>Click the button to return the value of the src attribute in the iframe.</p> + + <p id="eq"></p> + + <button onclick="playR()">Play</button> + + <script> + function playR() { + var frame = document.getElementById('embedFrame').src; + document.getElementById('eq').innerHTML = frame; + } + </script> + + </body> + </html> */ // History: *************** *** 181,185 **** window.attachEvent('onload',doDMarquee); } - function playR() { --- 203,206 ---- *************** *** 213,217 **** } } ! function stopR(){ document.getElementById('eq').src = '" . $module_root_path . "skins/" . SKIN . "/equalizer_stop.gif'; --- 234,273 ---- } } ! function playR_mx() ! { ! var oDivs = document.getElementsByTagName('div'); ! for( var i = 0, oDiv; i < oDivs.length; i++ ) ! { ! oDiv = oDivs[i]; ! if( oDiv.className && oDiv.className.match(/\bdmarquee\b/) ) ! { ! if( !( oDiv = oDiv.getElementsByTagName('div')[0] ) ) { continue; } ! if( !( oDiv.mchild = oDiv.getElementsByTagName('div')[0] ) ) { continue; } ! oDiv.getElementsByTagName('div')[0].innerHTML = '" . $lang['checking_title'] . "'; ! i += 2; ! } ! } ! intervalID = window.top.setInterval( 'updateInfo()', " . $update_title . " ); ! doDMarquee(); ! document.getElementById('eq').src = '" . $module_root_path . "skins/" . SKIN . "/equalizer_play.gif'; ! var embed = document.getElementById('embedchoise'); ! var frame = document.getElementById('embedFrame'); ! if(document.getElementById('embedchoise').value != \"auto\" && document.getElementById('embedchoise').value != \"wmp\") ! { ! document.getElementById('embedFrame').src = \"" . $module_root_path . "play." . $phpEx . "?config=" . $clean_config . "&embed=\" + embed.value; ! embedInfo(document.getElementById('embedchoise').value); ! } ! else if(document.getElementById('embedchoise').value == \"wmp\") ! { ! document.getElementById('embedFrame').src = \"play." . $phpEx . "?config=" . $clean_config . "&embed=\" + detectWMPEmbed(embed.value); ! embedInfo(detectWMPEmbed(document.getElementById('embedchoise').value)); ! embedFramereload(); ! } ! else ! { ! document.getElementById('embedFrame').src = \"" . $module_root_path . "play." . $phpEx . "?config=" . $clean_config . (isset($_GET['embed']) ? $_GET['embed'] : '') . "\"; ! embedInfo(detectEmbed()); ! } ! } function stopR(){ document.getElementById('eq').src = '" . $module_root_path . "skins/" . SKIN . "/equalizer_stop.gif'; Index: getinfo_shout.php =================================================================== RCS file: /cvsroot/mxbb/mx_shotcast/includes/getinfo_shout.php,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** getinfo_shout.php 28 May 2013 07:14:34 -0000 1.1 --- getinfo_shout.php 29 Sep 2014 11:58:25 -0000 1.2 *************** *** 218,222 **** if (preg_match("/Unauthorized/", $stream_genre)) { ! $servergenre = $stream_genre = $radio->genre(); } --- 218,222 ---- if (preg_match("/Unauthorized/", $stream_genre)) { ! $servergenre = $stream_genre = "genre"; } Index: getinfo_ice.php =================================================================== RCS file: /cvsroot/mxbb/mx_shotcast/includes/getinfo_ice.php,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** getinfo_ice.php 28 May 2013 07:14:34 -0000 1.1 --- getinfo_ice.php 29 Sep 2014 11:58:25 -0000 1.2 *************** *** 26,33 **** // DrKnas (Current maintainer v 4.0 -) ! if( !defined('IN_SHOTCAST')) { die("Hacking attempt"); } $state = ""; $currentsong = ""; --- 26,34 ---- // DrKnas (Current maintainer v 4.0 -) ! if( !defined('IN_PORTAL') ) { die("Hacking attempt"); } + $state = ""; $currentsong = ""; *************** *** 155,159 **** } #error_reporting(E_ALL ^ E_NOTICE); - function icecast_status($caster_ip, $caster_port, $icecast_mount_point) { --- 156,159 ---- *************** *** 174,178 **** //$mount_points = explode("_END_", $page); //$page_array = preg_split('/<td\s[^>]*class=\"streamdata\">(.*)<\/td>/isU' , $page, -1, PREG_SPLIT_DELIM_CAPTURE | PREG_SPLIT_NO_EMPTY); ! //die("$page"); //for( $i = 0; $i < $n = count($page_array); $i++ ) //{ --- 174,178 ---- //$mount_points = explode("_END_", $page); //$page_array = preg_split('/<td\s[^>]*class=\"streamdata\">(.*)<\/td>/isU' , $page, -1, PREG_SPLIT_DELIM_CAPTURE | PREG_SPLIT_NO_EMPTY); ! ////die("$page"); //for( $i = 0; $i < $n = count($page_array); $i++ ) //{ *************** *** 345,348 **** return $status; } - ?> \ No newline at end of file --- 345,347 ---- |