|
From: OryNider <ory...@us...> - 2007-06-06 23:31:21
|
Update of /cvsroot/mxbb/mx_radio In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv19138 Added Files: db_install.php db_uninstall.php db_upgrade.php index.htm mx_install_readme.htm mx_radio.pak radio_front.php radio_index.php radio_update.php Log Message: --- NEW FILE: db_upgrade.php --- <?php /** * * @package mxBB Portal Module - mx_radio * @version $Id: db_upgrade.php,v 1.1 2007/06/06 23:31:09 orynider Exp $ * @copyright (c) 2002-2006 [Jon Ohlsson] mxBB Project Team * @license http://opensource.org/licenses/gpl-license.php GNU General Public License v2 * */ define( 'IN_PORTAL', true ); if ( !defined( 'IN_ADMIN' ) ) { $mx_root_path = './../../'; $phpEx = substr(strrchr(__FILE__, '.'), 1); include( $mx_root_path . 'common.' . $phpEx ); // Start session management $mx_user->init($user_ip, PAGE_INDEX); if ( !$userdata['session_logged_in'] ) { die( "Hacking attempt(1)" ); } if ( $userdata['user_level'] != ADMIN ) { die( "Hacking attempt(2)" ); } // End session management } $mx_module_version = '1.0.0'; $mx_module_copy = 'mxBB <i> - Media Radio</i> module by OryNider & <a href="http://www.mxbb.net" target="_blank">Mx Team</a>'; $message = "<b>Upgrading!</b><br/><br/>"; $sql = array(); $sql[] = "UPDATE " . $mx_table_prefix . "module" . " SET module_version = '" . $mx_module_version . "', module_copy = '" . $mx_module_copy . "' WHERE module_id = '" . $mx_module_id . "'"; $message .= mx_do_install_upgrade( $sql ); echo "<br /><br />"; echo "<table width=\"90%\" align=\"center\" cellpadding=\"4\" cellspacing=\"1\" border=\"0\" class=\"forumline\">"; echo "<tr><th class=\"thHead\" align=\"center\">Module Installation/Upgrading/Uninstalling Information - module specific db tables</th></tr>"; echo "<tr><td class=\"row1\" align=\"left\"><span class=\"gen\">" . $message . "</span></td></tr>"; echo "</table><br />"; ?> --- NEW FILE: radio_front.php --- <?php /** * * @package mxBB Portal Module - mx_radio * @version $Id: radio_front.php,v 1.1 2007/06/06 23:31:13 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 // $phpEx = substr(strrchr(__FILE__, '.'), 1); // // Common Includes and Read Module Settings // if( !file_exists($module_root_path . 'includes/common.'.$phpEx) ) { message_die(GENERAL_ERROR, "Could not find mx_radio includes folder.", "", __LINE__, __FILE__); } define('_RADIO_CONFIG', true); include_once($module_root_path . 'includes/common.'.$phpEx); // // Read block Configuration // $title = $mx_block->block_info['block_title']; $block_size = ( isset($block_size) && !empty($block_size) ? $block_size : '100%' ); $radio_icon = 'radio_front_02.gif'; // // Instantiate the mx_text class // include_once($mx_root_path . 'includes/mx_functions_tools.'.$phpEx); $mx_text = new mx_text(); $mx_text->init(true, false, false); // // Decode for display // $title = $mx_text->display($title); // -------------------------------------------------------------------------------- // Get ChatBox Session information // // REMOVE OLD SESSIONS drop_radio_users($radio_config['check_period']); // Get all remain sessions $sql = "SELECT * FROM ".RADIO_SESSION_TABLE; if (!$sol = $db->sql_query($sql)) { message_die(GENERAL_ERROR, "Could not query radio Session information", "", __LINE__, __FILE__, $sql); } $howmanylisten = $db->sql_numrows($sol); // Return this $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="' . 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="' . append_sid( PHPBB_URL . 'profile.php?mode=viewprofile&u='.$isimler[$s]) . '" >'.$isimler[$s].'</a><br />'; } // -------------------------------------------------------------------------------- // 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' => append_sid($module_root_path.'radio_index.'.$phpEx), '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' => 'radio' )); $template->pparse('body'); unset($liteners, $block_config, $sql, $howmanylisten, $listeners_list, $block_size, $module_root_path, $isimler, $can_listen); ?> --- NEW FILE: mx_radio.pak --- module=+:66=+:Media Radio=+:modules/mx_radio/=+:mx_radio=+:1 New_function=+:---------------------------=+:0=+:0=+:0=+:0=+:0 function=+:66=+:77=+:Radio Front=+:mx_radio front block=+:radio_front.php=+: parameter=+:0=+:0=+:0=+:endoflist=+:0=+:0 block=+:=+:Radio Front=+:Demo block=+:77=+:0=+:5=+:0=+:0=+:0=+:0=+:1=+:1 function=+:0=+:0=+:0=+:endoflist=+:0=+:0 --- NEW FILE: mx_install_readme.htm --- <html> <head> <title>Mx Portal installation - readme</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <!-- link rel="stylesheet" href="../../templates/subSilver/subSilver.css" type="text/css" --> <style type="text/css"> <!-- /* The original subSilver Theme for phpBB version 2+ Created by subBlue design http://www.subBlue.com NOTE: These CSS definitions are stored within the main page body so that you can use the phpBB2 theme administration centre. When you have finalised your style you could cut the final CSS code and place it in an external file, deleting this section to save bandwidth. */ /* General page style. The scroll bar colours only visible in IE5.5+ */ body { background-color: #E5E5E5; scrollbar-face-color: #DEE3E7; scrollbar-highlight-color: #FFFFFF; scrollbar-shadow-color: #DEE3E7; scrollbar-3dlight-color: #D1D7DC; scrollbar-arrow-color: #006699; scrollbar-track-color: #EFEFEF; scrollbar-darkshadow-color: #98AAB1; } /* General font families for common tags */ font, th, td, p { font-family: Verdana, Arial, Helvetica, sans-serif } a:link, a:active, a:visited { color : #006699; } a:hover { text-decoration: underline; color : #DD6900; } hr { height: 0px; border: solid #D1D7DC 0px; border-top-width: 1px;} /* This is the border line & background colour round the entire page */ .bodyline { background-color: #FFFFFF; border: 1px #98AAB1 solid; } /* This is the outline round the main forum tables */ .forumline { background-color: #FFFFFF; border: 2px #006699 solid; } /* Main table cell colours and backgrounds */ td.row1 { background-color: #EFEFEF; } td.row2 { background-color: #DEE3E7; } td.row3 { background-color: #D1D7DC; } /* This is for the table cell above the Topics, Post & Last posts on the index.php page By default this is the fading out gradiated silver background. However, you could replace this with a bitmap specific for each forum */ td.rowpic { background-color: #FFFFFF; background-image: url('../../install/templates/subSilver/images/cellpic2.jpg'); background-repeat: repeat-y } /* Header cells - the blue and silver gradient backgrounds */ th { color: #FFA34F; font-size: 11px; font-weight : bold; background-color: #006699; height: 25px; background-image: url('../../install/templates/subSilver/images/cellpic3.gif'); } td.cat, td.catHead, td.catSides, td.catLeft, td.catRight, td.catBottom { background-image: url('../../install/templates/subSilver/images/cellpic1.gif'); background-color:#D1D7DC; border: medium solid #FFFFFF; height: 28px } /* Setting additional nice inner borders for the main table cells. The names indicate which sides the border will be on. Don't worry if you don't understand this, just ignore it :-) */ td.cat, td.catHead, td.catBottom { height: 29px; border-width: 0px 0px 0px 0px; } th.thHead, th.thSides, th.thTop, th.thLeft, th.thRight, th.thBottom, th.thCornerL, th.thCornerR { font-weight: bold; border: #FFFFFF; border-style: solid; height: 28px; } td.row3Right, td.spaceRow { background-color: #D1D7DC; border: #FFFFFF; border-style: solid; } th.thHead, td.catHead { font-size: 12px; border-width: 1px 1px 0px 1px; } th.thSides, td.catSides, td.spaceRow { border-width: 0px 1px 0px 1px; } th.thRight, td.catRight, td.row3Right { border-width: 0px 1px 0px 0px; } th.thLeft, td.catLeft { border-width: 0px 0px 0px 1px; } th.thBottom, td.catBottom { border-width: 0px 1px 1px 1px; } th.thTop { border-width: 1px 0px 0px 0px; } th.thCornerL { border-width: 1px 0px 0px 1px; } th.thCornerR { border-width: 1px 1px 0px 0px; } /* The largest text used in the index page title and toptic title etc. */ .maintitle { font-weight: bold; font-size: 22px; font-family: "Trebuchet MS",Verdana, Arial, Helvetica, sans-serif; text-decoration: none; line-height : 120%; color : #000000; } /* General text */ .gen { font-size : 12px; } .genmed { font-size : 11px; } .gensmall { font-size : 10px; } .gen, .genmed, .gensmall { color : #000000; } a.gen, a.genmed, a.gensmall { color: #006699; text-decoration: none; } a.gen:hover, a.genmed:hover, a.gensmall:hover { color: #DD6900; text-decoration: underline; } /* The register, login, search etc links at the top of the page */ .mainmenu { font-size : 11px; color : #000000 } a.mainmenu { text-decoration: none; color : #006699; } a.mainmenu:hover{ text-decoration: underline; color : #DD6900; } /* Forum category titles */ .cattitle { font-weight: bold; font-size: 12px ; letter-spacing: 1px; color : #006699} a.cattitle { text-decoration: none; color : #006699; } a.cattitle:hover{ text-decoration: underline; } /* Forum title: Text and link to the forums used in: index.php */ .forumlink { font-weight: bold; font-size: 12px; color : #006699; } a.forumlink { text-decoration: none; color : #006699; } a.forumlink:hover{ text-decoration: underline; color : #DD6900; } /* Used for the navigation text, (Page 1,2,3 etc) and the navigation bar when in a forum */ .nav { font-weight: bold; font-size: 11px; color : #000000;} a.nav { text-decoration: none; color : #006699; } a.nav:hover { text-decoration: underline; } /* titles for the topics: could specify viewed link colour too */ .topictitle, h1, h2 { font-weight: bold; font-size: 11px; color : #000000; } a.topictitle:link { text-decoration: none; color : #006699; } a.topictitle:visited { text-decoration: none; color : #5493B4; } a.topictitle:hover { text-decoration: underline; color : #DD6900; } /* Name of poster in viewmsg.php and viewtopic.php and other places */ .name { font-size : 11px; color : #000000;} /* Location, number of posts, post date etc */ .postdetails { font-size : 10px; color : #000000; } /* The content of the posts (body of text) */ .postbody { font-size : 12px; line-height: 18px} a.postlink:link { text-decoration: none; color : #006699 } a.postlink:visited { text-decoration: none; color : #5493B4; } a.postlink:hover { text-decoration: underline; color : #DD6900} /* Quote & Code blocks */ .code { font-family: Courier, 'Courier New', sans-serif; font-size: 11px; color: #006600; background-color: #FAFAFA; border: #D1D7DC; border-style: solid; border-left-width: 1px; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px } .quote { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 11px; color: #444444; line-height: 125%; background-color: #FAFAFA; border: #D1D7DC; border-style: solid; border-left-width: 1px; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px } /* Copyright and bottom info */ .copyright { font-size: 10px; font-family: Verdana, Arial, Helvetica, sans-serif; color: #444444; letter-spacing: -1px;} a.copyright { color: #444444; text-decoration: none;} a.copyright:hover { color: #000000; text-decoration: underline;} /* Form elements */ input, textarea, select { color : #000000; font: normal 11px Verdana, Arial, Helvetica, sans-serif; border-color : #000000; } /* The text input fields background colour */ input.post, textarea.post, select { background-color : #FFFFFF; } input { text-indent : 2px; } /* The buttons used for bbCode styling in message post */ input.button { background-color : #EFEFEF; color : #000000; font-size: 11px; font-family: Verdana, Arial, Helvetica, sans-serif; } /* The main submit button option */ input.mainoption { background-color : #FAFAFA; font-weight : bold; } /* None-bold submit button */ input.liteoption { background-color : #FAFAFA; font-weight : normal; } /* This is the line in the posting page which shows the rollover help line. This is actually a text box, but if set to be the same colour as the background no one will know ;) */ .helpline { background-color: #DEE3E7; border-style: none; } /* Import the fancy styles for IE only (NS4.x doesn't use the @import function) */ @import url("../../templates/subSilver/formIE.css"); --> </style> <script language="Javascript" type="text/javascript"> <!-- if ( 0 ) { window.open('privmsg.php?mode=newpm', '_phpbbprivmsg', 'HEIGHT=225,resizable=yes,WIDTH=400');; } //--> </script> </head> <body bgcolor="#FFFFFF" text="#000000"> <table> <tr> <td colspan="2"><p><b><font size="5"><font face="Verdana">MX Module - mx_radio</font><br> <font size="2">v. 1.0 RC 2</font></font></b></p> <p><span style="font-weight: bold"><span style="font-size: 16px; line-height: normal">Module</span></span> <br /> - for Mx Portal v. 2.8.x</p> <p><strong>Author</strong><br /> OryNider<br /> <br /> <span style="font-weight: bold">Description</span> <br /> The MX Module is an addon product for the MX-portal.</p> <p><strong>Features</strong> <br /> Easy to use and install/uninstall module.</p> <p> <br /> I. <a href="#install">Installation instructions</a> <br /> <br /> II. <a href="#themes">Additional styles</a> <br /> <br /> III. <a href="#languages">Additional languages</a><br /> <br /> <a target="_blank" class="postlink" href="http://pubory.uv.ro/potal/">DEMO </a> <br /> <br /><a name="install"> <br /> <span style="font-weight: bold">I. Installation Instructions</span> <br /> To install this module, follow these instructions.</a></p> To summarize:<br> If installing from scratch, use import module in the AdminCP.<br> If upgrading, uninstall, then reinstall from AdminCP<br> If uninstalling, use the delete feature in the AdminCP</p> <p>Note: If upgrading,uninstall module without delting db entries, or else you'll lose all module data!<br /> <br /> <br /> <span class="gensmall"><a href="#top" onclick="window.scrollTo(0,0); return false"> <font size="2">Back to Top</font></a></span><font size="2"> </font> <br /> <br /><b>II. Additional Styles</b> <br> This module is compatible with any theme/style. <br> <a name="themes"> </font></p> <p style="margin-top: 0; margin-bottom: 0"><font face="Tahoma"> <span class="gensmall"><a href="#top" onclick="window.scrollTo(0,0); return false"> <font size="2">Back to Top</font></a></span><font size="2"> </font> <br /><a name="languages"> <br /> <span style="font-weight: bold">III. Additional Languages</span> <br /> First check to see if your language is already translated. </a> <br /> <br /> If exists, download and install in the modules/mx_radio/language folder. If not, duplicate (copy and paste) any included language file, rename to match your language, translate using any texteditor, save and upload. <br /> <br /> <a href="#top"> Back to Top</a> <p> /Mx MX_RADIO Module Team</p> </td> </tr> </table> </body> </html> --- NEW FILE: db_uninstall.php --- <?php /** * * @package mxBB Portal Module - mx_radio * @version $Id: db_uninstall.php,v 1.1 2007/06/06 23:31:07 orynider Exp $ * @copyright (c) 2003 [ory...@rd..., OryNider] mxBB Development Team * @license http://opensource.org/licenses/gpl-license.php GNU General Public License v2 * */ define('IN_PORTAL', true); if ( !defined('IN_ADMIN') ) { $mx_root_path = '../../'; $phpEx = substr(strrchr(__FILE__, '.'), 1); include($mx_root_path . 'common.'.$phpEx); // // Start session management // $mx_user->init($user_ip, PAGE_INDEX); if( !$userdata['session_logged_in'] ) { die("Hacking attempt(3)"); } if( $userdata['user_level'] != ADMIN ) { die("Hacking attempt(4)"); } // // End session management // } $sql = array( "DROP TABLE ".$mx_table_prefix."radio_config", "DROP TABLE ".$mx_table_prefix."radio_session" ); $n = 0; $message = "<b>This list is a result of the SQL queries needed to uninstall radio Module Addon</b><br/><br/>"; while($sql[$n]) { $message .= ($mods[$n-1] != $mods[$n]) ? '<p><b><font size=3>'.$mods[$n].'</font></b><br/>' : ''; if( !$result = $db->sql_query($sql[$n]) ) { $message .= '<b><font color=#FF0000>[Error or Already removed]</font></b> line: '.($n+1).' , '.$sql[$n].'<br />'; } else { $message .='<b><font color=#0000fF>[Removed]</font></b> line: '.($n+1).' , '.$sql[$n].'<br />'; } $n++; } $message .= ' <br />If you get some Error, relax, this is normal when updating modules'; echo '<br /> <br />'; echo '<table cellpadding="4" cellspacing="1" border="0" class="forumline">'; echo '<tr><th class="thHead" align="center">Module Installation Information</th></tr>'; echo '<tr><td class="row1" align="center"><span class="gen">' . $message . '</span></td></tr>'; echo '</table> <br />'; ?> --- NEW FILE: db_install.php --- <?php /** * * @package mxBB Portal Module - mx_radio * @version $Id: db_install.php,v 1.1 2007/06/06 23:31:07 orynider Exp $ * @copyright (c) 2003 [ory...@rd..., OryNider] mxBB Development Team * @license http://opensource.org/licenses/gpl-license.php GNU General Public License v2 * */ //ini_set( 'display_errors', '1' ); define( 'IN_PORTAL', true ); if ( !defined( 'IN_ADMIN' ) ) { $mx_root_path = './../../'; $phpEx = substr(strrchr(__FILE__, '.'), 1); include( $mx_root_path . 'common.' . $phpEx ); // Start session management $mx_user->init($user_ip, PAGE_INDEX); // End session management if ( !$userdata['session_logged_in'] ) { die( "Hacking attempt(1)" ); } if ( $userdata['user_level'] != ADMIN ) { die( "Hacking attempt(2)" ); } } $mx_module_version = '1.0.0'; $mx_module_copy = 'mxBB <i> - Media Radio</i> module by OryNider & <a href="http://www.mxbb.net" target="_blank">Mx Team</a>'; // If fresh install if ( !$result = $db->sql_query( "SELECT config_name from " . $mx_table_prefix . "radio_config" ) ) { $message = "<b>This is a fresh install!</b><br/><br/>"; $sql = array(); $sql[] = "DROP TABLE IF EXISTS " . $mx_table_prefix . "radio_config"; $sql[] = "DROP TABLE IF EXISTS " . $mx_table_prefix . "radio_session"; $sql[] = "CREATE TABLE ".$mx_table_prefix."radio_session ( username varchar(99) NOT NULL, time bigint(20) NOT NULL, UNIQUE username (username) ) TYPE=MyISAM"; $sql[] = "CREATE TABLE " . $mx_table_prefix . "radio_config ( config_name VARCHAR(255) NOT NULL default '', config_value varchar(255) NOT NULL default '', PRIMARY KEY (config_name) ) TYPE=MyISAM"; $sql[] = "INSERT INTO " . $mx_table_prefix . "radio_config ( config_name , config_value ) VALUES ('radio_name', 'The Joy FM')"; $sql[] = "INSERT INTO " . $mx_table_prefix . "radio_config ( config_name , config_value ) VALUES ('radio_FileName', 'http://209.85.88.220/thejoyfm')"; $sql[] = "INSERT INTO " . $mx_table_prefix . "radio_config ( config_name , config_value ) VALUES ('flash_FileName', 'modules/mx_radio/gateway/flash_files/ekklesia.swf')"; $sql[] = "INSERT INTO " . $mx_table_prefix . "radio_config ( config_name , config_value ) VALUES ('gateway_FileName', 'modules/mx_radio/gateway/gateway.html')"; $sql[] = "INSERT INTO " . $mx_table_prefix . "radio_config ( config_name , config_value ) VALUES ('user_state_button', 'd1d2d2')"; $sql[] = "INSERT INTO " . $mx_table_prefix . "radio_config ( config_name , config_value ) VALUES ('check_period', '120')"; $sql[] = "INSERT INTO " . $mx_table_prefix . "radio_config ( config_name , config_value ) VALUES ('gf_select', '1')"; $sql[] = "INSERT INTO " . $mx_table_prefix . "radio_config ( config_name , config_value ) VALUES ('show_status', 'true')"; $sql[] = "INSERT INTO " . $mx_table_prefix . "radio_config ( config_name , config_value ) VALUES ('show_stations', 'true')"; $sql[] = "UPDATE " . $mx_table_prefix . "module" . " SET module_version = '" . $mx_module_version . "', module_copy = '" . $mx_module_copy . "' WHERE module_id = '" . $mx_module_id . "'"; $message .= mx_do_install_upgrade( $sql ); } else { // If already installed $message = "<b>Module is already installed... consider upgrading ;)</b><br/><br/>"; } echo "<br /><br />"; echo "<table width=\"90%\" align=\"center\" cellpadding=\"4\" cellspacing=\"1\" border=\"0\" class=\"forumline\">"; echo "<tr><th class=\"thHead\" align=\"center\">Module Installation/Upgrading/Uninstallation Information - Module specific DB tables</th></tr>"; echo "<tr><td class=\"row1\" align=\"left\"><span class=\"gen\">" . $message . "</span></td></tr>"; echo "</table><br />"; ?> --- NEW FILE: radio_update.php --- <?php /** * * @package mxBB Portal Module - mx_radio * @version $Id: radio_update.php,v 1.1 2007/06/06 23:31:15 orynider Exp $ * @copyright (c) 2002-2006 [OryNider] mxBB Development Team * @license http://opensource.org/licenses/gpl-license.php GNU General Public License v2 * */ /*************************************************************************** * mx_radio *************************************************************************** * History: *OryNider (16/09/2006) : 1st try ***************************************************************************/ define('IN_PORTAL', true); $mx_root_path = '../../'; $module_root_path = './'; $phpEx = substr(strrchr(__FILE__, '.'), 1); include_once($mx_root_path . 'common.'.$phpEx); define('_RADIO_CONFIG', true); include_once($mx_module_path .'includes/common.'.$phpEx); $mx_user->init($user_ip, PAGE_INDEX); define('_RADIO_CONFIG', true); include_once($module_root_path . 'includes/common.'.$phpEx); $time=date("U"); // $nick = str_replace(" ", "_", $userdata['username']); if ($_POST['update']==true) { update_radio_users($nick,$time); } else { update_radio_users($nick,$time); } //read check period $period=$radio_config['check_period']*1000; //radio_update.php (send to the db the user statue "listening" every $period seconds) echo "<html>"; echo "<head>"; echo "<script language=\"javascript\">"; echo "setInterval(\"document.forms['update'].submit();\",".$period.");"; echo "</script>"; echo "</head>"; echo "<body bgcolor=\"#000000\" text=\"#FFFFFF\">"; echo "<form name=\"update\" action=\"radio_update.php\" method=\"POST\">"; echo "<input type=\"hidden\" name=\"update\" value=\"true\">"; echo "</form>"; echo " Loged in as: $nick\n"; echo "</body>"; echo "</html>"; ?> --- NEW FILE: radio_index.php --- <?php /** * * @package mxBB Portal Module - mx_radio * @version $Id: radio_index.php,v 1.1 2007/06/06 23:31:14 orynider Exp $ * @copyright (c) 2002-2006 [OryNider] mxBB Development Team * @license http://opensource.org/licenses/gpl-license.php GNU General Public License v2 * */ define('IN_PORTAL', 1); $mx_root_path = "../../"; $mx_module_path = "./"; $phpEx = substr(strrchr(__FILE__, '.'), 1); include_once($mx_root_path . 'common.'.$phpEx); // // Start session management // $mx_user->init($user_ip, PAGE_INDEX); define('_RADIO_CONFIG', true); include_once($mx_module_path .'includes/common.'.$phpEx); // // End session management // // include_once($mx_module_path .'includes/player.'.$phpEx); // // Begin output of page // if ( $radio_config['gf_select'] ) { $template->set_filenames(array( 'body_radio' => 'mx_player.tpl' )); } else { $template->set_filenames(array( 'body_radio' => 'mx_playerg.tpl' )); } $template->assign_vars(array( 'BLOCK_SIZE' => $block_size, 'U_PHPBB_ROOT_PATH' => PHPBB_URL, 'U_PORTAL_ROOT_PATH' => PORTAL_URL, 'SITENAME' => $board_config['sitename'], 'L_TITLE' => $radio_config['radio_name'], 'RADIO_NAME' => $radio_config['radio_name'], 'FLASH_FILE' => $mx_root_path . $radio_config['flash_FileName'], 'GATEWAY_FILE' => $mx_root_path . $radio_config['gateway_FileName'], 'IMG_IFRAME_BG' => $mx_module_path .'images/iframe_bg.png', 'IMG_ADVIEW' => $mx_module_path .'gateway/gateway_files/adview.gif', 'JS_ADX' => $mx_module_path .'gateway/gateway_files/adx.js', 'STATION_STREAM' => $radio_config['radio_FileName'] )); user_listen($nick); $template->pparse('body_radio'); $time=date("U"); $nick = str_replace(" ", "_", $userdata['username']); if ($_POST['update']==true) { update_radio_user($nick,$time); } //read check period $period=$radio_config['check_period']*1000; ?> --- NEW FILE: index.htm --- <HTML> <HEAD> <TITLE>Internet Radio</TITLE> <META content="index, follow, noarchive" name=robots> <LINK href="templates/gateway_files/scripts.css" type=text/css rel=stylesheet> <META content="Microsoft FrontPage 5.0" name=GENERATOR> </HEAD> <BODY BGCOLOR="#CEDEDF" TEXT="#000000" LINK="#0000FF" ALINK="#FF0000" VLINK="#FF00FF"> <SCRIPT language=javascript> // Author: Eric King Url: http://redrival.com/eak/index.shtml // This script is free to use as long as this info is left in // Courtesy of SimplytheBest.net - http://simplythebest.net/scripts/ var win = null; function NewWindow(mypage,myname,w,h,scroll){ LeftPosition = (screen.width) ? (screen.width-w)/2 : 0; TopPosition = (screen.height) ? (screen.height-h)/2 : 0; settings = 'height='+h+',width='+w+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',resizable=no' win = window.open(mypage,myname,settings) } </SCRIPT> <tr> <td align="center" valign="top" nowrap> <img src="templates/images/radio_front_02.gif" border="0" alt="Radio Live" hspace="3" width="24" height="34" /></td> <td align="center" valign="top" nowrap><a href="player.php" class="bodylink" onclick="NewWindow(this.href,'name','332','360','no');return false">Radio Live</a></td> </tr> </BODY> </HTML> |