|
From: OryNider <ory...@us...> - 2008-04-29 02:40:01
|
Update of /cvsroot/mxbb/mx_shotcast In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv19075 Modified Files: db_install.php db_upgrade.php moreinfo.php play.php radio_update.php radioplayer.php shotcast_front.php shotcast_last10.php shotcast_stats.php Log Message: version 3.0.0-RC Index: shotcast_stats.php =================================================================== RCS file: /cvsroot/mxbb/mx_shotcast/shotcast_stats.php,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** shotcast_stats.php 28 Feb 2008 06:26:40 -0000 1.6 --- shotcast_stats.php 29 Apr 2008 02:39:48 -0000 1.7 *************** *** 33,38 **** define('IN_SHOTCAST', true); include_once($module_root_path . 'includes/common.'.$phpEx); - include_once($module_root_path . 'getinfo.'.$phpEx); - $state = ($text[1] == 1) ? 'Up' : 'Down'; --- 33,36 ---- Index: db_upgrade.php =================================================================== RCS file: /cvsroot/mxbb/mx_shotcast/db_upgrade.php,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** db_upgrade.php 20 Apr 2008 07:21:39 -0000 1.8 --- db_upgrade.php 29 Apr 2008 02:39:48 -0000 1.9 *************** *** 48,51 **** --- 48,52 ---- $upgrade_100 = 0; $upgrade_108 = 0; + $upgrade_300 = 0; // *************** *** 64,71 **** $upgrade_108 = 1; } $message = "<b>Upgrading!</b><br/><br/>"; ! if ( $upgrade_100 == 1 ) { $message .= "<b>Upgrading to v. 1.0 (Gold)...</b><br/><br/>"; --- 65,80 ---- $upgrade_108 = 1; } + + // + // validate before 3.0 Gold + // + if (!$result = $db->sql_query("SELECT config_value from " . $mx_table_prefix . "shotcast_config WHERE config_name = 'skin'")) + { + $upgrade_300 = 1; + } $message = "<b>Upgrading!</b><br/><br/>"; ! if ($upgrade_100 == 1) { $message .= "<b>Upgrading to v. 1.0 (Gold)...</b><br/><br/>"; *************** *** 92,97 **** ) TYPE=MyISAM"; } ! else { $message .= "<b>Nothing to upgrade...</b><br/><br/>"; } --- 101,115 ---- ) TYPE=MyISAM"; } ! ! if ($upgrade_300 == 1) { + $message .= "<b>Upgrading to v. 3.0.0...</b><br/><br/>"; + + $sql[] = "INSERT INTO " . $mx_table_prefix . "shotcast_config VALUES ('allow_guests', '0')"; + $sql[] = "INSERT INTO " . $mx_table_prefix . "shotcast_config VALUES ('guestname', 'Guest')"; + $sql[] = "INSERT INTO " . $mx_table_prefix . "shotcast_config VALUES ('skin', 'aero')"; + } + else + { $message .= "<b>Nothing to upgrade...</b><br/><br/>"; } Index: shotcast_front.php =================================================================== RCS file: /cvsroot/mxbb/mx_shotcast/shotcast_front.php,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** shotcast_front.php 20 Apr 2008 07:21:40 -0000 1.8 --- shotcast_front.php 29 Apr 2008 02:39:48 -0000 1.9 *************** *** 45,49 **** require($module_root_path .'includes/common.'.$phpEx); - require($module_root_path . 'getinfo.'.$phpEx); if (empty($shotcast_config['shotcast_host'])) --- 45,48 ---- *************** *** 103,117 **** { $isimler[$i++] = $record['username']; ! if ( ( $shotcast_config['show_listen_select'] ) ) ! { ! $can_listen="yes"; ! } ! elseif ($record['username'] == $userdata['username']) ! { ! $can_listen="no"; ! } ! else { ! $can_listen="yes"; } } --- 102,150 ---- { $isimler[$i++] = $record['username']; ! ! // Checks if guests are allowed ! if($shotcast_config['allow_guests']) ! { ! if (!$userdata['session_logged_in']) ! { ! if ($record['username']==$userdata['username']) ! { ! $can_listen="yes"; ! } ! else ! { ! $can_listen="yes"; ! } ! } ! else ! { ! if ($shotcast_config['show_listen_select']) ! { ! $can_listen="yes"; ! } ! elseif ($record['username']==$userdata['username']) ! { ! $can_listen="no"; ! } ! else ! { ! $can_listen="yes"; ! } ! } ! } ! else { ! if ($shotcast_config['show_listen_select']) ! { ! $can_listen="yes"; ! } ! elseif ($record['username'] == $userdata['username']) ! { ! $can_listen="no"; ! } ! else ! { ! $can_listen="yes"; ! } } } Index: db_install.php =================================================================== RCS file: /cvsroot/mxbb/mx_shotcast/db_install.php,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** db_install.php 20 Apr 2008 07:21:39 -0000 1.8 --- db_install.php 29 Apr 2008 02:39:47 -0000 1.9 *************** *** 68,74 **** ) TYPE=MyISAM"; ! $sql[] = "INSERT INTO " . $mx_table_prefix . "shotcast_config ( config_name , config_value ) VALUES ('shotcast_name', 'Happy Radio')"; ! $sql[] = "INSERT INTO " . $mx_table_prefix . "shotcast_config ( config_name , config_value ) VALUES ('shotcast_host', 'Happy.Radio.Su')"; ! $sql[] = "INSERT INTO " . $mx_table_prefix . "shotcast_config ( config_name , config_value ) VALUES ('shotcast_port', '8000')"; $sql[] = "INSERT INTO " . $mx_table_prefix . "shotcast_config ( config_name , config_value ) VALUES ('shotcast_pass', 'thejoyfm')"; $sql[] = "INSERT INTO " . $mx_table_prefix . "shotcast_config ( config_name , config_value ) VALUES ('play_list', 'listen.pls')"; --- 68,74 ---- ) TYPE=MyISAM"; ! $sql[] = "INSERT INTO " . $mx_table_prefix . "shotcast_config ( config_name , config_value ) VALUES ('shotcast_name', 'Shotcast Radio')"; ! $sql[] = "INSERT INTO " . $mx_table_prefix . "shotcast_config ( config_name , config_value ) VALUES ('shotcast_host', 'tv3.stream-music.net')"; ! $sql[] = "INSERT INTO " . $mx_table_prefix . "shotcast_config ( config_name , config_value ) VALUES ('shotcast_port', '8188')"; $sql[] = "INSERT INTO " . $mx_table_prefix . "shotcast_config ( config_name , config_value ) VALUES ('shotcast_pass', 'thejoyfm')"; $sql[] = "INSERT INTO " . $mx_table_prefix . "shotcast_config ( config_name , config_value ) VALUES ('play_list', 'listen.pls')"; *************** *** 81,84 **** --- 81,88 ---- $sql[] = "INSERT INTO " . $mx_table_prefix . "shotcast_config ( config_name , config_value ) VALUES ('show_status', 'true')"; $sql[] = "INSERT INTO " . $mx_table_prefix . "shotcast_config ( config_name , config_value ) VALUES ('currentlisteners', '1')"; + + $sql[] = "INSERT INTO " . $mx_table_prefix . "shotcast_config ( config_name , config_value ) VALUES ('allow_guests', '0')"; + $sql[] = "INSERT INTO " . $mx_table_prefix . "shotcast_config ( config_name , config_value ) VALUES ('guestname', 'Guest')"; + $sql[] = "INSERT INTO " . $mx_table_prefix . "shotcast_config ( config_name , config_value ) VALUES ('skin', 'aero')"; $sql[] = "UPDATE " . $mx_table_prefix . "module" . " Index: radio_update.php =================================================================== RCS file: /cvsroot/mxbb/mx_shotcast/radio_update.php,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** radio_update.php 28 Feb 2008 06:26:38 -0000 1.5 --- radio_update.php 29 Apr 2008 02:39:48 -0000 1.6 *************** *** 59,64 **** define('IN_SHOTCAST', true); require($module_root_path .'includes/common.'.$phpEx); - require($module_root_path . 'getinfo.'.$phpEx); - --- 59,62 ---- Index: radioplayer.php =================================================================== RCS file: /cvsroot/mxbb/mx_shotcast/radioplayer.php,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** radioplayer.php 20 Apr 2008 07:21:40 -0000 1.10 --- radioplayer.php 29 Apr 2008 02:39:48 -0000 1.11 *************** *** 2,6 **** /** * ! * @package Mx-Publisher Module - mx_shotcast * @version $Id$ * @copyright (c) 2004-2008 [Niklas Pull, http://pull.zapto.org] Mx-Publisher Team --- 2,6 ---- /** * ! * @package Mx-Publisher StandAllone - radioplayer * @version $Id$ * @copyright (c) 2004-2008 [Niklas Pull, http://pull.zapto.org] Mx-Publisher Team *************** *** 8,11 **** --- 8,20 ---- * */ + /*************************************************************************** + * mx_shotcast + *************************************************************************** + * History: + *OryNider (16/09/2006) : 1st try + *OryNider (19/04/2008) backported to radioplayer + ***************************************************************************/ + // error_reporting( E_ALL ); + // ini_set( 'display_errors', '1' ); if( !defined('IN_PORTAL') || !is_object($mx_block)) *************** *** 49,67 **** define('IN_SHOTCAST', true); require($module_root_path .'includes/common.'.$phpEx); - require($module_root_path . 'getinfo.'.$phpEx); - - user_listensc($nick); ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> <head> ! <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1" /> <meta name="description" content="Radio Player" /> <meta name="keywords" content="Radio Player" /> <meta name="author" content="Radio Player originaly made by: Niklas Pull - http://pull.zapto.org" /> <!-- First load standard template *.css definition, located in the the phpbb template folder --> - <link rel="stylesheet" href="<?php echo PHPBB_URL . TEMPLATE_ROOT_PATH . $theme['head_stylesheet']; ?>" type="text/css" /> - <!-- Then load MX-Publisher template *.css definition for mx, located in the the portal template folder --> - <link rel="stylesheet" href="<?php echo PORTAL_URL . TEMPLATE_ROOT_PATH . $theme['head_stylesheet']; ?>" type="text/css" /> <style type="text/css"> <!-- --- 58,70 ---- define('IN_SHOTCAST', true); require($module_root_path .'includes/common.'.$phpEx); ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> <head> ! <meta http-equiv="content-type" content="text/html; charset=Windows-1250" /> <meta name="description" content="Radio Player" /> <meta name="keywords" content="Radio Player" /> <meta name="author" content="Radio Player originaly made by: Niklas Pull - http://pull.zapto.org" /> <!-- First load standard template *.css definition, located in the the phpbb template folder --> <style type="text/css"> <!-- *************** *** 118,127 **** font-size: 12px; font-family: Calibri, Helvetica, sans-serif; - - } - #station{ - font-weight: bold; - font-size: 12px; - font-family: Calibri, Helvetica, sans-serif; } #shell{ --- 121,124 ---- *************** *** 138,145 **** position: absolute; } #songtitle{ width: 305px; left: 10px; ! top: 30px; font-weight: bold; font-size: 12px; --- 135,158 ---- position: absolute; } + #display{ + width: 300px; + height: 24px; + left: 10px; + right: 10px; + top: 24px; + font-weight: bold; + font-size: 12px; + font-family: Calibri, Trebuchet MS, Lucida Grande, Helvetica, Verdana, sans-serif; + display: inline; + position: absolute; + } #songtitle{ + } + #currentlisteners{ + } + #streamtitle{ width: 305px; left: 10px; ! top: 37px; font-weight: bold; font-size: 12px; *************** *** 147,158 **** position: absolute; } #bitrate{ ! left: 138px; ! top: 60px; position: absolute; } #contentType{ ! left: 138px; ! top: 80px; position: absolute; } --- 160,182 ---- position: absolute; } + #listeners{ + left: 123px; + top: 56px; + position: absolute; + float:left; + } #bitrate{ ! left: 136px; ! top: 69px; ! position: absolute; ! } ! #servergenre{ ! left: 137px; ! top: 82px; position: absolute; } #contentType{ ! left: 137px; ! top: 95px; position: absolute; } *************** *** 179,183 **** #infoPlugin{ left: 8px; ! top: 79px; position: absolute; } --- 203,207 ---- #infoPlugin{ left: 8px; ! top: 76px; position: absolute; } *************** *** 204,207 **** --- 228,232 ---- window.onload = function(){ checkSong(); + checklisteners(); embedInfo(detectEmbed()); <?php *************** *** 216,220 **** //--> </script> ! <title>Radio Player :: <?=$station;?></title> <?php require($module_root_path . "includes/detectScript.htm"); ?> --- 241,245 ---- //--> </script> ! <title><?=$lang['Radio_Player'];?> • <?=$servertitle;?></title> <?php require($module_root_path . "includes/detectScript.htm"); ?> *************** *** 222,240 **** <body> <div id="shell"> ! <div style="font-weight: bold; font-size: 12px; font-family: Calibri, Helvetica, sans-serif;" id="station">Radio Player :: <?=$station;?></div> <div id="songtitle"> ! <?php ! if($text[1] == 0) ! { ! echo "<b>Radio station currently Offline.</b>"; ! } ! else ! { ! echo "Checking for song title..."; ! } ! ?> </div> ! <div id="bitrate"><?=$text[5];?> kbps</div> <div id="contentType"><?=$mimetype;?></div> --- 247,270 ---- <body> <div id="shell"> ! <div style="font-weight: bold; font-size: 12px; font-family: Calibri, Helvetica, sans-serif;" id="station">Radio Player :: <?=$servertitle;?></div> ! ! <marquee id="display" behavior="scroll" class="marquee" direction="left" scrolldelay="100" scrollamount="2"> <div id="songtitle"> ! <?php ! if($text[1] == 0) ! { ! echo $lang['Off_Air']; ! } ! else ! { ! echo $lang['checking_title']; ! } ! ?> </div> + </marquee> ! <div id="listeners"><?=$lang['Listeners_peak'];?> <nobr id="currentlisteners"><?=$currentlisteners;?></nobr></div> ! <div id="bitrate"><?=$bitrate;?> kbps</div> ! <div id="servergenre"><?=$stream_genre;?></div> <div id="contentType"><?=$mimetype;?></div> *************** *** 243,262 **** <div id="equalizer"><img id="eq" src="<?=$module_root_path;?>images/<?=SKIN;?>/equalizer_stop.gif" /></div> ! <div id="closeButton"><img id="closeB" src="<?=$module_root_path;?>images/<?=SKIN;?>/close.png" onclick="javascript:window.close()" ! onmouseover="javascript:document.getElementById('closeB').src = '<?=$module_root_path;?>images/<?=SKIN;?>/close_h.png';" onmouseout="javascript:document.getElementById('closeB').src = '<?=$module_root_path;?>images/<?=SKIN;?>/close.png';" /> </div> ! <div id="play"><img id="playB" src="<?=$module_root_path;?>images/<?=SKIN;?>/play.jpg" onclick="javascript:playR()" ! onmouseover="javascript:document.getElementById('playB').src = '<?=$module_root_path;?>images/<?=SKIN;?>/play_h.jpg';" ! onmouseout="javascript:document.getElementById('playB').src = '<?=$module_root_path;?>images/<?=SKIN;?>/play.jpg';" /> </div> ! <div id="stop"><img id="stopB" src="<?=$module_root_path;?>images/<?=SKIN;?>/stop.jpg" onclick="javascript:stopR()" ! onmouseover="document.getElementById('stopB').src = '<?=$module_root_path;?>images/<?=SKIN;?>/stop_h.jpg';" onmouseout="document.getElementById('stopB').src = '<?=$module_root_path;?>images/<?=SKIN;?>/stop.jpg';" /> </div> <div id="select"> ! Media Player:<br><select id="embedchoise" onchange="javascript:changeEmbed()"> <option value="auto">Auto detect</option> <option value="wmp">WMP</option> --- 273,293 ---- <div id="equalizer"><img id="eq" src="<?=$module_root_path;?>images/<?=SKIN;?>/equalizer_stop.gif" /></div> ! <div id="closeButton"><img id="closeB" src="<?=$module_root_path;?>images/<?=SKIN;?>/close.png" onclick="javascript:window.close()" ! onmouseover="javascript:document.getElementById('closeB').src = '<?=$module_root_path;?>images/<?=SKIN;?>/close_h.png';" onmouseout="javascript:document.getElementById('closeB').src = '<?=$module_root_path;?>images/<?=SKIN;?>/close.png';" /> </div> ! <div id="play"><img id="playB" src="<?=$module_root_path;?>images/<?=SKIN;?>/play.jpg" onclick="javascript:playR()" ! onmouseover="javascript:document.getElementById('playB').src = '<?=$module_root_path;?>images/<?=SKIN;?>/play_h.jpg';" ! onmouseout="javascript:document.getElementById('playB').src = '<?=$module_root_path;?>images/<?=SKIN;?>/play.jpg';" /> </div> ! <div id="stop"><img id="stopB" src="<?=$module_root_path;?>images/<?=SKIN;?>/stop.jpg" onclick="javascript:stopR()" ! onmouseover="document.getElementById('stopB').src = '<?=$module_root_path;?>images/<?=SKIN;?>/stop_h.jpg';" onmouseout="document.getElementById('stopB').src = '<?=$module_root_path;?>images/<?=SKIN;?>/stop.jpg';" /> </div> <div id="select"> ! Media Player:<br /> ! <select id="embedchoise" onchange="javascript:changeEmbed()"> <option value="auto">Auto detect</option> <option value="wmp">WMP</option> *************** *** 266,270 **** ?> <option value="real">RealPlayer</option> ! <? } ?> --- 297,301 ---- ?> <option value="real">RealPlayer</option> ! <?php } ?> *************** *** 287,291 **** </select> </div> ! <br> </div> --- 318,322 ---- </select> </div> ! <br /> </div> Index: play.php =================================================================== RCS file: /cvsroot/mxbb/mx_shotcast/play.php,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** play.php 7 Mar 2008 03:28:33 -0000 1.5 --- play.php 29 Apr 2008 02:39:48 -0000 1.6 *************** *** 40,44 **** define('IN_SHOTCAST', true); require($module_root_path .'includes/common.'.$phpEx); ! require($module_root_path . 'getinfo.'.$phpEx); header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); --- 40,44 ---- define('IN_SHOTCAST', true); require($module_root_path .'includes/common.'.$phpEx); ! header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); Index: shotcast_last10.php =================================================================== RCS file: /cvsroot/mxbb/mx_shotcast/shotcast_last10.php,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** shotcast_last10.php 28 Feb 2008 06:26:40 -0000 1.6 --- shotcast_last10.php 29 Apr 2008 02:39:48 -0000 1.7 *************** *** 33,37 **** define('IN_SHOTCAST', true); include_once($module_root_path . 'includes/common.'.$phpEx); - include_once($module_root_path . 'getinfo.'.$phpEx); $bgcolor = '#ffffff'; // Page background color --- 33,36 ---- Index: moreinfo.php =================================================================== RCS file: /cvsroot/mxbb/mx_shotcast/moreinfo.php,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** moreinfo.php 28 Feb 2008 06:26:38 -0000 1.5 --- moreinfo.php 29 Apr 2008 02:39:48 -0000 1.6 *************** *** 2,6 **** /** * ! * @package mxBB Portal Module - mx_shotcast * @version $Id$ * @copyright (c) 2002-2006 [OryNider] mxBB Development Team --- 2,6 ---- /** * ! * @package Mx-Publisher StandAllone - radioplayer * @version $Id$ * @copyright (c) 2002-2006 [OryNider] mxBB Development Team *************** *** 49,59 **** define('IN_SHOTCAST', true); require($module_root_path .'includes/common.'.$phpEx); - require($module_root_path . 'getinfo.'.$phpEx); - - $state = ($text[1] == 1) ? 'Up' : 'Down'; - $text[2] = !empty($text[2]) ? $text[2] : $currentlisteners; - $text[5] = !empty($text[5]) ? $text[5] : $bitrate; - $song[0] = !empty($song[0]) ? $song[0] : $text[6]; ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" --- 49,53 ---- *************** *** 85,89 **** <tr class="table"> <td class="nav" align="left" valign="bottom"> ! <h8><b>Stats for <i><?=$station;?></i></b></h8> </td> </tr> --- 79,83 ---- <tr class="table"> <td class="nav" align="left" valign="bottom"> ! <h8><b>Stats for <i><?=$servertitle;?></i></b></h8> </td> </tr> *************** *** 95,99 **** <tr class="table"> <td class="stat" align="left" valign="bottom"> ! <i>Station:<b><?=$servertitle;?></b></i> </td> </tr> --- 89,103 ---- <tr class="table"> <td class="stat" align="left" valign="bottom"> ! <i>Stream Title: <b><?=$stream_title;?></b></i> ! </td> ! </tr> ! <tr class="table"> ! <td class="stat" align="left" valign="bottom"> ! <i>Content Type: <b><?=$mimetype;?></b></i> ! </td> ! </tr> ! <tr class="table"> ! <td class="stat" align="left" valign="bottom"> ! <i>Stream Genre: <b><?=$stream_genre;?></b></i> </td> </tr> *************** *** 101,105 **** <tr class="table"> <td class="stat" align="left" valign="bottom"> ! <i>Current Song: <b><?=$song[0];?></b></i> </td> </tr> --- 105,109 ---- <tr class="table"> <td class="stat" align="left" valign="bottom"> ! <i>Current Song: <b><?=$curentsong;?></b></i> </td> </tr> *************** *** 107,116 **** <tr class="table"> <td class="stat" align="left" valign="bottom"> ! <i>BitRate: <b><?=$text[5];?> kbps</b></i> </td> </tr> <tr class="table"> <td class="stat" align="left" valign="bottom"> ! <i>Listeners Peak: <b><?=$text[2];?></b></i> </td> </tr> --- 111,120 ---- <tr class="table"> <td class="stat" align="left" valign="bottom"> ! <i>BitRate: <b><?=$bitrate;?> kbps</b></i> </td> </tr> <tr class="table"> <td class="stat" align="left" valign="bottom"> ! <i>Listeners Peak: <b><?=$currentlisteners;?></b></i> </td> </tr> |