|
From: FlorinCB <ory...@us...> - 2009-12-29 07:50:41
|
Update of /cvsroot/mxbb/mx_radio In directory sfp-cvsdas-1.v30.ch3.sourceforge.com:/tmp/cvs-serv22313 Modified Files: Media_Radio.pak Added Files: radio_front2.php radio_front3.php Log Message: Index: Media_Radio.pak =================================================================== RCS file: /cvsroot/mxbb/mx_radio/Media_Radio.pak,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** Media_Radio.pak 22 Sep 2009 03:53:16 -0000 1.5 --- Media_Radio.pak 29 Dec 2009 07:50:25 -0000 1.6 *************** *** 1,16 **** module=+:89=+:Media Radio=+:modules/mx_radio/=+:mx_radio=+:1 New_function=+:---------------------------=+:0=+:0=+:0=+:0=+:0 ! function=+:89=+:99=+:Radio Front=+:mx_radio front block=+:radio_front.php=+: ! parameter=+:90=+:91=+:player_width=+:Number=+:333=+:=+:1=+:0 ! parameter=+:90=+:92=+:url_file=+:Text=+:127.0.0.1=+:=+:1=+:0 ! parameter=+:90=+:93=+:url_title=+:Text=+:Radio station=+:=+:1=+:0 parameter=+:0=+:0=+:0=+:endoflist=+:0=+:0 ! block=+:=+:Radio Front=+:Demo block=+:99=+:0=+:5=+:0=+:0=+:0=+:0=+:1=+:1 New_function=+:---------------------------=+:0=+:0=+:0=+:0=+:0 ! function=+:89=+:100=+:Radio Player=+:Radio Player or Index=+:radio_index.php=+: ! parameter=+:100=+:107=+:player_width=+:Number=+:333=+:=+:1=+:0 ! parameter=+:100=+:108=+:url_file=+:Text=+:=+:=+:1=+:0 ! parameter=+:100=+:109=+:url_title=+:Text=+:=+:=+:1=+:0 parameter=+:0=+:0=+:0=+:endoflist=+:0=+:0 ! block=+:=+:Radio Player=+:Demo block=+:100=+:0=+:5=+:0=+:0=+:0=+:0=+:1=+:1 function=+:0=+:0=+:0=+:endoflist=+:0=+:0 \ No newline at end of file --- 1,30 ---- module=+:89=+:Media Radio=+:modules/mx_radio/=+:mx_radio=+:1 New_function=+:---------------------------=+:0=+:0=+:0=+:0=+:0 ! function=+:89=+:189=+:Radio Front=+:mx_radio front block=+:radio_front.php=+: ! parameter=+:180=+:181=+:player_width=+:Number=+:333=+:=+:1=+:0 ! parameter=+:180=+:182=+:url_file=+:Text=+:127.0.0.1=+:=+:1=+:0 ! parameter=+:180=+:183=+:url_title=+:Text=+:Radio station=+:=+:1=+:0 parameter=+:0=+:0=+:0=+:endoflist=+:0=+:0 ! block=+:=+:Radio Front=+:Demo block=+:189=+:0=+:5=+:0=+:0=+:0=+:0=+:1=+:1 New_function=+:---------------------------=+:0=+:0=+:0=+:0=+:0 ! function=+:89=+:199=+:Radio Front #2=+:front block #2=+:radio_front2.php=+: ! parameter=+:190=+:191=+:player_width=+:Number=+:333=+:=+:1=+:0 ! parameter=+:190=+:192=+:url_file=+:Text=+:127.0.0.1=+:=+:1=+:0 ! parameter=+:190=+:193=+:url_title=+:Text=+:Radio station=+:=+:1=+:0 parameter=+:0=+:0=+:0=+:endoflist=+:0=+:0 ! block=+:=+:Radio Front #2=+:Demo block=+:199=+:0=+:5=+:0=+:0=+:0=+:0=+:1=+:1 ! New_function=+:---------------------------=+:0=+:0=+:0=+:0=+:0 ! function=+:89=+:299=+:Radio Front #3=+:front block #3=+:radio_front3.php=+: ! parameter=+:290=+:291=+:player_width=+:Number=+:333=+:=+:1=+:0 ! parameter=+:290=+:292=+:url_file=+:Text=+:127.0.0.1=+:=+:1=+:0 ! parameter=+:290=+:293=+:url_title=+:Text=+:Radio station=+:=+:1=+:0 ! parameter=+:0=+:0=+:0=+:endoflist=+:0=+:0 ! block=+:=+:Radio Front #3=+:Demo block=+:299=+:0=+:5=+:0=+:0=+:0=+:0=+:1=+:1 ! New_function=+:---------------------------=+:0=+:0=+:0=+:0=+:0 ! function=+:89=+:300=+:Radio Player=+:Radio Player or Index=+:radio_index.php=+: ! parameter=+:300=+:307=+:player_width=+:Number=+:333=+:=+:1=+:0 ! parameter=+:300=+:308=+:url_file=+:Text=+:=+:=+:1=+:0 ! parameter=+:300=+:309=+:url_title=+:Text=+:=+:=+:1=+:0 ! parameter=+:0=+:0=+:0=+:endoflist=+:0=+:0 ! block=+:=+:Radio Player=+:Demo block=+:300=+:0=+:5=+:0=+:0=+:0=+:0=+:1=+:1 function=+:0=+:0=+:0=+:endoflist=+:0=+:0 \ No newline at end of file --- NEW FILE: radio_front3.php --- <?php /** * * @package Mx-Publisher Module - mx_radio * @version $Id: radio_front3.php,v 1.1 2009/12/29 07:50:25 orynider Exp $ * @copyright (c) 2002-2006 [OryNider] mxBB Development Team * @license http://opensource.org/licenses/gpl-license.php GNU General Public License v2 * */ /*************************************************************************** * mx_chatbox module written by markus_petrux at phpmix dot com *************************************************************************** * History: * 2006/09/10 * -modified by OryNider to radio_front ***************************************************************************/ // -------------------------------------------------------------------------------- // Security check // if( !defined('IN_PORTAL') ) { die("Hacking attempt"); } // -------------------------------------------------------------------------------- // Initialization // @define('_RADIO_CONFIG', true); // // Common Includes and Read Module Settings // if ((include_once $module_root_path . "includes/common.$phpEx") === false) { mx_message_die(GENERAL_ERROR, "Could not find mx_radio includes folder.", "", __LINE__, __FILE__); } // // Read block Configuration // $title = $mx_block->block_info['block_title']; $block_id = $mx_block->block_info['block_id']; $block_size = ( isset($block_size) && !empty($block_size) ? $block_size : '100%' ); $radio_icon = 'radio_front_02.gif'; $player_size = $mx_block->get_parameters('player_width'); $player_url = $mx_block->get_parameters('url_file'); $player_title = $mx_block->get_parameters('url_title'); // -------------------------------------------------------------------------------- // Get ChatBox Session information // // Get all remain sessions $sql = "SELECT * FROM " . RADIO_SESSION_TABLE; if (!$sol = $db->sql_query($sql)) { mx_message_die(GENERAL_ERROR, "Could not query radio Session information", "", __LINE__, __FILE__, $sql); } $howmanylisten = $db->sql_numrows($sol); // Return this //Get registreg users sessions $sql = "SELECT * FROM " . RADIO_SESSION_TABLE . " WHERE user_id <> '" . ANONYMOUS . "'"; if (!$sol = $db->sql_query($sql)) { mx_message_die(GENERAL_ERROR, "Could not query radio Session information", "", __LINE__, __FILE__, $sql); } $isimler[0] = $db->sql_numrows($sol); $can_listen = 'TRUE'; $i = 1; while ($record = $db->sql_fetchrow($sol)) { $isimler[$i++] = $record['username']; if ($record['username'] == $userdata['username']) { $can_listen = "yes"; } else { $can_listen = "yes"; } } $listeners = ( empty($isimler[1]) ? '' : '<a href="' . mx_append_sid(PHPBB_URL . 'profile.php?mode=viewprofile&u='.$isimler[1]) . '" >'.$isimler[1].'</a><br />'); for($s = 2; $s <= $isimler[0]; $s++) { $listeners .= ', <a href="' . mx_append_sid(PHPBB_URL . 'profile.php?mode=viewprofile&u='.$isimler[$s]) . '" >'.$isimler[$s].'</a><br />'; } //Get bots sessions $sql = "SELECT * FROM " . RADIO_SESSION_TABLE . " WHERE user_id = '" . ANONYMOUS . "' AND bot_id <> '" . ANONYMOUS . "'"; if (!$sol = $db->sql_query($sql)) { mx_message_die(GENERAL_ERROR, "Could not query radio Session information", "", __LINE__, __FILE__, $sql); } $isimlerb[0] = $db->sql_numrows($sol); $i = 1; while ($record = $db->sql_fetchrow($sol)) { $isimlerb[$i++] = $record['username']; } $radio_bots = empty($isimlerb[1]) ? '' : $isimlerb[1]; for($s = 2; $s <= $isimlerb[0]; $s++) { $radio_bots .= ', ' . $isimlerb[$s]; } $msn_color = 'style="font-weight: bold; color:#' . $theme['fontcolor1'] . '"'; $yahoo_color = 'style="font-weight: bold; color: #DD2222;"'; $lycos_color = 'style="font-weight: bold;"'; $radio_bots = str_replace('google','<span style="font-weight: bold; color: #2244BB;">G</span><span style="font-weight: bold; color: #DD2222;">o</span><span style="font-weight: bold; color: #EEBB00;">o</span><span style="font-weight: bold; color: #2244BB;">g</span><span style="font-weight: bold; color: #339933;">l</span><span style="font-weight: bold; color: #DD2222;">e</span>',$radio_bots); $radio_bots = str_replace('adsense','<span ' . $yahoo_color . '>adsense</span>',$radio_bots); $radio_bots = str_replace('msn','<span ' . $msn_color . '>msn</span>',$radio_bots); $radio_bots = str_replace('lycos','<span ' . $lycos_color . '>lycos</span>',$radio_bots); $radio_bots = str_replace('yahoo','<span ' . $yahoo_color . '>Yahoo!</span>',$radio_bots); $radio_bots = str_replace('slurp','<span ' . $yahoo_color . '>Yahoo! Slurp</span>',$radio_bots); if ($isimlerb[0]) { $listeners .= ', ' . $radio_bots; } // -------------------------------------------------------------------------------- // Generate block output (using templates) // Generate HTML for the block... // $template->set_filenames(array( 'body' => 'radio_front.tpl') ); if ( !$userdata['session_logged_in'] ) { $template->assign_block_vars('switch_user_logged_out', array()); } else { if ($can_listen == "no") { $template->assign_block_vars('switch_user_chatting', array()); } else { $template->assign_block_vars('switch_user_logged_in', array()); } } if( empty($listeners) ) { $template->assign_block_vars('switch_listeners_list_off', array()); $listeners_list = ''; } else { $template->assign_block_vars('switch_listeners_list_on', array()); $listeners_list = sprintf($lang['Who_Are_Listening'], $listeners); } $template->assign_vars(array( 'RADIO_IMG' => $module_root_path.'images/'.$radio_icon, 'TOTAL_LISTENERS_ONLINE' => sprintf($lang['How_Many_Listeners'], $howmanylisten), 'LISTENERS_LIST' => $listeners_list, 'S_LISTEN_STATION' => mx_append_sid($module_root_path.'radio_index.'.$phpEx.'?player_id='.$block_id), 'L_ALREADY_LISTENING' => $lang['Already_listening'], 'L_CLICK_TO_LISTEN_STATION' => $lang['Click_to_listen_station'], 'L_LOGIN_TO_LISTEN_STATION' => $lang['Login_to_listen_station'], 'BLOCK_SIZE' => $block_size, 'BLOCK_ID' => $block_id, 'L_VERSION' => _radio_VERSION, 'L_TITLE' => $player_url ? $player_title : $radio_config['radio_name'] )); $template->pparse('body'); unset($liteners, $block_config, $sql, $howmanylisten, $listeners_list, $block_size, $module_root_path, $isimler, $can_listen); ?> --- NEW FILE: radio_front2.php --- <?php /** * * @package Mx-Publisher Module - mx_radio * @version $Id: radio_front2.php,v 1.1 2009/12/29 07:50:25 orynider Exp $ * @copyright (c) 2002-2006 [OryNider] mxBB Development Team * @license http://opensource.org/licenses/gpl-license.php GNU General Public License v2 * */ /*************************************************************************** * mx_chatbox module written by markus_petrux at phpmix dot com *************************************************************************** * History: * 2006/09/10 * -modified by OryNider to radio_front ***************************************************************************/ // -------------------------------------------------------------------------------- // Security check // if( !defined('IN_PORTAL') ) { die("Hacking attempt"); } // -------------------------------------------------------------------------------- // Initialization // @define('_RADIO_CONFIG', true); // // Common Includes and Read Module Settings // if ((include_once $module_root_path . "includes/common.$phpEx") === false) { mx_message_die(GENERAL_ERROR, "Could not find mx_radio includes folder.", "", __LINE__, __FILE__); } // // Read block Configuration // $title = $mx_block->block_info['block_title']; $block_id = $mx_block->block_info['block_id']; $block_size = ( isset($block_size) && !empty($block_size) ? $block_size : '100%' ); $radio_icon = 'radio_front_02.gif'; $player_size = $mx_block->get_parameters('player_width'); $player_url = $mx_block->get_parameters('url_file'); $player_title = $mx_block->get_parameters('url_title'); // -------------------------------------------------------------------------------- // Get ChatBox Session information // // Get all remain sessions $sql = "SELECT * FROM " . RADIO_SESSION_TABLE; if (!$sol = $db->sql_query($sql)) { mx_message_die(GENERAL_ERROR, "Could not query radio Session information", "", __LINE__, __FILE__, $sql); } $howmanylisten = $db->sql_numrows($sol); // Return this //Get registreg users sessions $sql = "SELECT * FROM " . RADIO_SESSION_TABLE . " WHERE user_id <> '" . ANONYMOUS . "'"; if (!$sol = $db->sql_query($sql)) { mx_message_die(GENERAL_ERROR, "Could not query radio Session information", "", __LINE__, __FILE__, $sql); } $isimler[0] = $db->sql_numrows($sol); $can_listen = 'TRUE'; $i = 1; while ($record = $db->sql_fetchrow($sol)) { $isimler[$i++] = $record['username']; if ($record['username'] == $userdata['username']) { $can_listen = "yes"; } else { $can_listen = "yes"; } } $listeners = ( empty($isimler[1]) ? '' : '<a href="' . mx_append_sid(PHPBB_URL . 'profile.php?mode=viewprofile&u='.$isimler[1]) . '" >'.$isimler[1].'</a><br />'); for($s = 2; $s <= $isimler[0]; $s++) { $listeners .= ', <a href="' . mx_append_sid(PHPBB_URL . 'profile.php?mode=viewprofile&u='.$isimler[$s]) . '" >'.$isimler[$s].'</a><br />'; } //Get bots sessions $sql = "SELECT * FROM " . RADIO_SESSION_TABLE . " WHERE user_id = '" . ANONYMOUS . "' AND bot_id <> '" . ANONYMOUS . "'"; if (!$sol = $db->sql_query($sql)) { mx_message_die(GENERAL_ERROR, "Could not query radio Session information", "", __LINE__, __FILE__, $sql); } $isimlerb[0] = $db->sql_numrows($sol); $i = 1; while ($record = $db->sql_fetchrow($sol)) { $isimlerb[$i++] = $record['username']; } $radio_bots = empty($isimlerb[1]) ? '' : $isimlerb[1]; for($s = 2; $s <= $isimlerb[0]; $s++) { $radio_bots .= ', ' . $isimlerb[$s]; } $msn_color = 'style="font-weight: bold; color:#' . $theme['fontcolor1'] . '"'; $yahoo_color = 'style="font-weight: bold; color: #DD2222;"'; $lycos_color = 'style="font-weight: bold;"'; $radio_bots = str_replace('google','<span style="font-weight: bold; color: #2244BB;">G</span><span style="font-weight: bold; color: #DD2222;">o</span><span style="font-weight: bold; color: #EEBB00;">o</span><span style="font-weight: bold; color: #2244BB;">g</span><span style="font-weight: bold; color: #339933;">l</span><span style="font-weight: bold; color: #DD2222;">e</span>',$radio_bots); $radio_bots = str_replace('adsense','<span ' . $yahoo_color . '>adsense</span>',$radio_bots); $radio_bots = str_replace('msn','<span ' . $msn_color . '>msn</span>',$radio_bots); $radio_bots = str_replace('lycos','<span ' . $lycos_color . '>lycos</span>',$radio_bots); $radio_bots = str_replace('yahoo','<span ' . $yahoo_color . '>Yahoo!</span>',$radio_bots); $radio_bots = str_replace('slurp','<span ' . $yahoo_color . '>Yahoo! Slurp</span>',$radio_bots); if ($isimlerb[0]) { $listeners .= ', ' . $radio_bots; } // -------------------------------------------------------------------------------- // Generate block output (using templates) // Generate HTML for the block... // $template->set_filenames(array( 'body' => 'radio_front.tpl') ); if ( !$userdata['session_logged_in'] ) { $template->assign_block_vars('switch_user_logged_out', array()); } else { if ($can_listen == "no") { $template->assign_block_vars('switch_user_chatting', array()); } else { $template->assign_block_vars('switch_user_logged_in', array()); } } if( empty($listeners) ) { $template->assign_block_vars('switch_listeners_list_off', array()); $listeners_list = ''; } else { $template->assign_block_vars('switch_listeners_list_on', array()); $listeners_list = sprintf($lang['Who_Are_Listening'], $listeners); } $template->assign_vars(array( 'RADIO_IMG' => $module_root_path.'images/'.$radio_icon, 'TOTAL_LISTENERS_ONLINE' => sprintf($lang['How_Many_Listeners'], $howmanylisten), 'LISTENERS_LIST' => $listeners_list, 'S_LISTEN_STATION' => mx_append_sid($module_root_path.'radio_index.'.$phpEx.'?player_id='.$block_id), 'L_ALREADY_LISTENING' => $lang['Already_listening'], 'L_CLICK_TO_LISTEN_STATION' => $lang['Click_to_listen_station'], 'L_LOGIN_TO_LISTEN_STATION' => $lang['Login_to_listen_station'], 'BLOCK_SIZE' => $block_size, 'BLOCK_ID' => $block_id, 'L_VERSION' => _radio_VERSION, 'L_TITLE' => $player_url ? $player_title : $radio_config['radio_name'] )); $template->pparse('body'); unset($liteners, $block_config, $sql, $howmanylisten, $listeners_list, $block_size, $module_root_path, $isimler, $can_listen); ?> |