Update of /cvsroot/mxbb/mx_radiocast In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv1615 Added Files: Radio_Cast.nfo Radio_Cast.pak db_install.php db_uninstall.php index.html mx_install_readme.htm radiocast.php Log Message: --- NEW FILE: index.html --- <html> <head> <title>Mx Radio Cast Module</title> </head> <body> <br /><br /><br /><br /><br /><br /><br /> <center><h1><a href="http://mxbb.net/">mxBB-Portal</a></h1></center> </body> --- NEW FILE: db_uninstall.php --- <?php /** * * @package mxBB Portal Module - mx_radiocast * @version $Id: db_uninstall.php,v 1.1 2007/06/06 23:03:44 orynider Exp $ * @copyright (c) 2007 [sma...@ho..., Smartor] 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(3)"); } if( $userdata['user_level'] != ADMIN ) { die("Hacking attempt(4)"); } // // End session management // } $sql = array( "DROP TABLE IF EXISTS " . $mx_table_prefix . "radiocast", "DROP TABLE IF EXISTS " . $mx_table_prefix . "radiocast_rate", "DROP TABLE IF EXISTS " . $mx_table_prefix . "radiocast_comment", "DROP TABLE IF EXISTS " . $mx_table_prefix . "radiocast_cat", "DROP TABLE IF EXISTS " . $mx_table_prefix . "radiocast_config", ); $n = 0; $message = "<b>This list is a result of the SQL queries needed for Radio Cast module</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, Already deleted or updated]</font></b> line: '.($n+1).' , '.$sql[$n].'<br />'; } else { $message .='<b><font color=#0000fF>[Deleted/Updated]</font></b> line: '.($n+1).' , '.$sql[$n].'<br />'; } $n++; } $message .= '<br /> If you get some Error, Already Deleted or Updated, relax, this is normal ;)'; echo "<br /><br />"; echo "<table cellpadding=\"4\" cellspacing=\"1\" border=\"0\" class=\"forumline\">"; echo "<tr><th class=\"thHead\" align=\"center\">Module Uninstallation Information</th></tr>"; echo "<tr><td class=\"row1\" align=\"center\"><span class=\"gen\">" . $message . "</span></td></tr>"; echo "</table><br />"; ?> --- NEW FILE: mx_install_readme.htm --- <html> <head> <title>Mx Portal installation - readme</title> <meta http-equiv="Content-Type" content="text/html; charset=windows-1250"> <!-- 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 style="font-size: 9pt; font-family:Verdana, Arial, Helvetica, sans-serif">MX Module - <span lang="ro">Radio</span> <span lang="ro">Cast</span> <br> v. <span lang="ro">1</span>.0.<span lang="ro">0 RC 2</span> </font></b></p> <p><span style="line-height: normal; font-weight:bold"> <font style="font-size: 9pt">Module</font></span><font style="font-size: 9pt"> <br /> - for mxBB-Portal v. 2.8.</font><span lang="ro"><font style="font-size: 9pt">x</font></span></p> <p><strong><font style="font-size: 9pt">Author</font></strong><font style="font-size: 9pt"><span lang="ro">: </span>OryNider (mxBB-Development Team)</font></p> <p><font style="font-size: 9pt"> <br /> <span style="font-weight: bold">Description</span> <br /> </font><span class="postbody">This Module allows you create the <span lang="ro">Radio </span>Center Page/Block where <span lang="ro"> admins/</span>users can <span lang="ro">add</span>, listen, rate and comment on s<span lang="ro">tations</span>. <br> Beside that, users can link URL of the <span lang="ro">station</span> from the <span lang="ro">shotcast or icecast like </span>server<span lang="ro">s</span>. <br> You have an admin panel that allows you to manage the features of the module. </span></p> <p><font style="font-size: 9pt"> <br /> </font><strong> <span style="font-size: 9pt">Features</span></strong><span style="font-size: 9pt"> - <span lang="ro">Radio </span>Center, Easy to install/uninstall module:</span><span class="postbody"></p> <ul> <li> <p style="margin-top: 0; margin-bottom: 0"> <span style="text-decoration: underline" lang="ro">Station</span><span style="TEXT-DECORATION: underline"> Song Image</span> - You can add the S<span lang="ro">tation</span> Image to the section of each <span lang="ro">radio station</span>. <span lang="ro">(</span>any image you want <img alt="Wink" src="http://www.mx-system.com/forum/images/smiles/icon_wink.gif" border="0" width="15" height="15"> ) <br> Maximum image size is configurable in <span lang="ro">A</span>dminCP <img alt="Very Happy" src="http://www.mx-system.com/forum/images/smiles/icon_biggrin.gif" border="0" width="15" height="15"> <br> </li> <li> <p style="margin-top: 0; margin-bottom: 0"> <span style="TEXT-DECORATION: underline">Search <span lang="ro"> Station</span></span> - is helping you find the s<span lang="ro">tation</span> by Title, <span lang="ro">Dj</span> or Poster quickly and easily. <br> </li> <li> <p style="margin-top: 0; margin-bottom: 0"> <span style="TEXT-DECORATION: underline">Cat Views</span> - is adding a viewed counter of each Category; <br> </li> <li> <p style="margin-top: 0; margin-bottom: 0"> <span style="text-decoration: underline" lang="ro">Share</span><span style="TEXT-DECORATION: underline"> S<span lang="ro">tation URL</span></span> - alows users to directly <span lang="ro">copy/paste</span> the s<span lang="ro">tation</span> <span lang="ro">listen url </span>to their <span lang="ro">favorite player</span>.</li> </ul> </span> <p> <font style="font-size: 9pt"> <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://mxbb-portal.evonet.ro/index.php?page=15">DEMO</a><br /> <br /></font><a name="install"> <font style="font-size: 9pt"> <br /> <span style="font-weight: bold">I. Installation Instructions</span> <br /> To install this module, follow these instructions.</font></a></p> <font style="font-size: 9pt">To</font><font style="font-size: 9pt"> 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</font></p> <p><font style="font-size: 9pt">Note: If upgrading,<span lang="ro"> </span>uninstall module without <span lang="ro">deleating</span> db entries, or else you'll lose all module data!<br /> <br /> <br /> </font> <span class="gensmall"><a href="#top" onclick="window.scrollTo(0,0); return false"> <font style="font-size: 9pt">Back to Top</font></a></span><font style="font-size: 9pt"> <br /> <br /><b>II. Additional Styles</b> <br> This module is compatible with any theme/style. <br> </font> <a name="themes"><font style="font-size: 9pt"> </font></font></p> <p style="margin-top: 0; margin-bottom: 0"> <span class="gensmall"></span> <span class="gensmall"><font face="Tahoma"> <a href="#top" onclick="window.scrollTo(0,0); return false"> <font style="font-size: 9pt">Back to Top</font></a></font></span><font face="Tahoma"><font style="font-size: 9pt"> <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 /> </font> <span class="gensmall"><a href="#top" onclick="window.scrollTo(0,0); return false"> <font style="font-size: 9pt">Back to Top</font></a></span><font style="font-size: 9pt"> </font> <p> <font style="font-size: 9pt">/MxBB Development Team</font></p> </td> </tr> </table> </body> </html> --- NEW FILE: db_install.php --- <?php /** * * @package mxBB Portal Module - mx_radiocast * @version $Id: db_install.php,v 1.1 2007/06/06 23:03:43 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> - Radio Cast</i> module by <a href="http://www.mxbb.net/" target="_blank">OryNider</a>'; // If fresh install if ( !$result = $db->sql_query( "SELECT config_name from " . $mx_table_prefix . "radiocast_config" ) ) { $message = "<b>This is a fresh install!</b><br/><br/>"; $sql = array(); $sql[] = "DROP TABLE IF EXISTS " . $mx_table_prefix . "radiocast"; $sql[] = "DROP TABLE IF EXISTS " . $mx_table_prefix . "radiocast_rate"; $sql[] = "DROP TABLE IF EXISTS " . $mx_table_prefix . "radiocast_comment"; $sql[] = "DROP TABLE IF EXISTS " . $mx_table_prefix . "radiocast_cat"; $sql[] = "DROP TABLE IF EXISTS " . $mx_table_prefix . "radiocast_config"; $sql[] = "CREATE TABLE ". $mx_table_prefix . "radiocast ( station_id int(11) UNSIGNED NOT NULL auto_increment, station_filename varchar(255) NOT NULL, station_imagename varchar(255) NOT NULL, station_title varchar(255) NOT NULL, station_url varchar(255) NOT NULL, station_desc text, station_singer varchar(255) NOT NULL, station_user_id mediumint(8) NOT NULL, station_username varchar(32), station_user_ip char(8) NOT NULL DEFAULT '0', station_time int(11) UNSIGNED NOT NULL, station_cat_id mediumint(8) UNSIGNED NOT NULL DEFAULT '1', station_view_count int(11) UNSIGNED NOT NULL DEFAULT '0', station_lock tinyint(3) NOT NULL DEFAULT '0', station_approval tinyint(3) NOT NULL DEFAULT '1', station_download_count varchar(255) NOT NULL, PRIMARY KEY (station_id), KEY station_cat_id (station_cat_id), KEY station_user_id (station_user_id), KEY station_time (station_time) ) TYPE=MyISAM"; $sql[] = "CREATE TABLE ". $mx_table_prefix . "radiocast_rate ( rate_station_id int(11) UNSIGNED NOT NULL, rate_user_id mediumint(8) NOT NULL, rate_user_ip char(8) NOT NULL, rate_point tinyint(3) UNSIGNED NOT NULL, KEY rate_station_id (rate_station_id), KEY rate_user_id (rate_user_id), KEY rate_user_ip (rate_user_ip), KEY rate_point (rate_point) ) TYPE=MyISAM"; $sql[] = "CREATE TABLE ". $mx_table_prefix . "radiocast_comment ( comment_id int(11) UNSIGNED NOT NULL auto_increment, comment_station_id int(11) UNSIGNED NOT NULL, comment_user_id mediumint(8) NOT NULL, comment_username varchar(32), comment_user_ip char(8) NOT NULL, comment_time int(11) UNSIGNED NOT NULL, comment_text TEXT, comment_edit_time int(11) UNSIGNED, comment_edit_count smallint(5) UNSIGNED NOT NULL DEFAULT '0', comment_edit_user_id mediumint(8), PRIMARY KEY(comment_id), KEY comment_station_id (comment_station_id), KEY comment_user_id (comment_user_id), KEY comment_user_ip (comment_user_ip), KEY comment_time (comment_time) ) TYPE=MyISAM"; $sql[] = "CREATE TABLE ". $mx_table_prefix . "radiocast_cat ( cat_id mediumint(8) UNSIGNED NOT NULL auto_increment, cat_title varchar(255) NOT NULL, cat_desc text, cat_order mediumint(8) NOT NULL, cat_views mediumint(8) NOT NULL, cat_view_level tinyint(3) NOT NULL DEFAULT '-1', cat_upload_level tinyint(3) NOT NULL DEFAULT '0', cat_rate_level tinyint(3) NOT NULL DEFAULT '0', cat_comment_level tinyint(3) NOT NULL DEFAULT '0', cat_edit_level tinyint(3) NOT NULL DEFAULT '0', cat_delete_level tinyint(3) NOT NULL DEFAULT '2', cat_view_groups varchar(255), cat_upload_groups varchar(255), cat_rate_groups varchar(255), cat_comment_groups varchar(255), cat_edit_groups varchar(255), cat_delete_groups varchar(255), cat_moderator_groups varchar(255), cat_approval tinyint(3) NOT NULL DEFAULT '0', PRIMARY KEY (cat_id), KEY cat_order (cat_order) ) TYPE=MyISAM"; $sql[] = "CREATE TABLE " . $mx_table_prefix . "radiocast_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 . "radiocast_config VALUES ('max_stations', '1024')"; $sql[] = "INSERT INTO " . $mx_table_prefix . "radiocast_config VALUES ('user_stations_limit', '50')"; $sql[] = "INSERT INTO " . $mx_table_prefix . "radiocast_config VALUES ('mod_stations_limit', '250')"; $sql[] = "INSERT INTO " . $mx_table_prefix . "radiocast_config VALUES ('max_file_size', '3145728')"; $sql[] = "INSERT INTO " . $mx_table_prefix . "radiocast_config VALUES ('rows_per_page', '20')"; $sql[] = "INSERT INTO " . $mx_table_prefix . "radiocast_config VALUES ('cols_per_page', '1')"; $sql[] = "INSERT INTO " . $mx_table_prefix . "radiocast_config VALUES ('top', '5')"; $sql[] = "INSERT INTO " . $mx_table_prefix . "radiocast_config VALUES ('sort_method', 'station_time')"; $sql[] = "INSERT INTO " . $mx_table_prefix . "radiocast_config VALUES ('sort_order', 'DESC')"; $sql[] = "INSERT INTO " . $mx_table_prefix . "radiocast_config VALUES ('mp3_allowed', '1')"; $sql[] = "INSERT INTO " . $mx_table_prefix . "radiocast_config VALUES ('wav_allowed', '1')"; $sql[] = "INSERT INTO " . $mx_table_prefix . "radiocast_config VALUES ('wma_allowed', '1')"; $sql[] = "INSERT INTO " . $mx_table_prefix . "radiocast_config VALUES ('wmv_allowed', '1')"; $sql[] = "INSERT INTO " . $mx_table_prefix . "radiocast_config VALUES ('mid_allowed', '1')"; $sql[] = "INSERT INTO " . $mx_table_prefix . "radiocast_config VALUES ('ram_allowed', '1')"; $sql[] = "INSERT INTO " . $mx_table_prefix . "radiocast_config VALUES ('au_allowed', '1')"; $sql[] = "INSERT INTO " . $mx_table_prefix . "radiocast_config VALUES ('mpeg_allowed', '1')"; $sql[] = "INSERT INTO " . $mx_table_prefix . "radiocast_config VALUES ('avi_allowed', '1')"; $sql[] = "INSERT INTO " . $mx_table_prefix . "radiocast_config VALUES ('swf_allowed', '1')"; $sql[] = "INSERT INTO " . $mx_table_prefix . "radiocast_config VALUES ('qt_allowed', '1')"; $sql[] = "INSERT INTO " . $mx_table_prefix . "radiocast_config VALUES ('rm_allowed', '1')"; $sql[] = "INSERT INTO " . $mx_table_prefix . "radiocast_config VALUES ('desc_length', '512000')"; $sql[] = "INSERT INTO " . $mx_table_prefix . "radiocast_config VALUES ('hotlink_prevent', '0')"; $sql[] = "INSERT INTO " . $mx_table_prefix . "radiocast_config VALUES ('hotlink_allowed', 'mxbb.net')"; $sql[] = "INSERT INTO " . $mx_table_prefix . "radiocast_config VALUES ('rate', '1')"; $sql[] = "INSERT INTO " . $mx_table_prefix . "radiocast_config VALUES ('rate_scale', '10')"; $sql[] = "INSERT INTO " . $mx_table_prefix . "radiocast_config VALUES ('comment', '1')"; $sql[] = "INSERT INTO " . $mx_table_prefix . "radiocast_config VALUES ('radiocast_version', '.0.0')"; $sql[] = "INSERT INTO " . $mx_table_prefix . "radiocast_config VALUES ('max_image_size', '10240')"; $sql[] = "INSERT INTO " . $mx_table_prefix . "radiocast_config VALUES ('max_image_width', '300')"; $sql[] = "INSERT INTO " . $mx_table_prefix . "radiocast_config VALUES ('max_image_height', '200')"; $sql[] = "INSERT INTO " . $mx_table_prefix . "radiocast_config VALUES ('download', '1')"; $sql[] = "INSERT INTO " . $mx_table_prefix . "radiocast_config VALUES ('enable_integration', '1')"; $sql[] = "INSERT INTO " . $mx_table_prefix . "radiocast_config VALUES ('override_default_pages', '0')"; $sql[] = "INSERT INTO " . $mx_table_prefix . "radiocast_config VALUES ('index', '5')"; $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_Cast.pak --- module=+:76=+:Radio Cast=+:modules/mx_radiocast/=+:Radio_Cast=+:1 New_function=+:---------------------------=+:0=+:0=+:0=+:0=+:0 function=+:76=+:94=+:Radio_Cast=+:Radio Cast=+:radiocast.php=+: parameter=+:0=+:0=+:0=+:endoflist=+:0=+:0 block=+:=+:Radio Cast=+:Demo block=+:94=+:0=+:5=+:0=+:0=+:0=+:0=+:1=+:1 function=+:0=+:0=+:0=+:endoflist=+:0=+:0 --- NEW FILE: radiocast.php --- <?php /** * * @package mxBB Portal Module - mx_radiocast * @version $Id: radiocast.php,v 1.1 2007/06/06 23:03:45 orynider Exp $ * @copyright (c) 2007 [ory...@rd..., OryNider] mxBB Development Team * @license http://opensource.org/licenses/gpl-license.php GNU General Public License v2 * */ // // ERROR HANDLING // //error_reporting( E_ALL ); if( !defined('IN_PORTAL') || !is_object($mx_block)) { define('IN_PORTAL', true); $mx_root_path = '../../'; // // Let's include some stuff... // $phpEx = substr(strrchr(__FILE__, '.'), 1); include_once($mx_root_path . 'common.' . $phpEx); // // Start session management // $mx_user->init($user_ip, PAGE_INDEX); // // End session management // $block_id = ( !empty($HTTP_GET_VARS['block_id']) ) ? $HTTP_GET_VARS['block_id'] : $HTTP_POST_VARS['id']; if( empty($block_id) ) { $sql = "SELECT * FROM " . BLOCK_TABLE . " WHERE block_title = 'Radio Cast' LIMIT 1"; if(!$result = $db->sql_query($sql)) { message_die(GENERAL_ERROR, "Could not query Music Center module information", "", __LINE__, __FILE__, $sql); } $row = $db->sql_fetchrow($result); $block_id = $row['block_id']; } $is_block = FALSE; } else { // // Read block Configuration // $title = $mx_block->block_info['block_title']; $block_size = ( isset($block_size) && !empty($block_size) ? $block_size : '100%' ); if( is_object($mx_block)) { $is_block = TRUE; } global $images, $mx_images; } $radiocast_root_path = $module_root_path . 'radiocast_mod/'; // // Get general music information // include($radiocast_root_path . 'radiocast_common.'.$phpEx); // // Nav switch for mx // // --------------------- // Check $album_user_id // --------------------- if (isset ($_POST['user_id'])) { $radiocast_user_id = intval($_POST['user_id']); } elseif (isset ($_GET['user_id'])) { $radiocast_user_id = intval($_GET['user_id']); } else { $radiocast_user_id = $userdata['user_id']; } // //mode // if ( isset($HTTP_POST_VARS['radiocast_mode']) || isset($HTTP_GET_VARS['radiocast_mode']) ) { $mode= ( isset($HTTP_POST_VARS['radiocast_mode']) ) ? $HTTP_POST_VARS['radiocast_mode'] : $HTTP_GET_VARS['radiocast_mode']; } else { $mode= 'radiocast_index'; } if ( $mode == 'radiocast_cat' ) { include($module_root_path. 'includes/radiocast_cat.'.$phpEx); } else if ( $mode == 'radiocast_comment' ) { include($module_root_path. 'includes/radiocast_comment.'.$phpEx); } else if ( $mode == 'radiocast_comment_delete' ) { include($module_root_path. 'includes/radiocast_comment_delete.'.$phpEx); } else if ( $mode == 'radiocast_comment_edit' ) { include($module_root_path. 'includes/radiocast_comment_edit.'.$phpEx); } else if ( $mode == 'radiocast_delete' ) { include($module_root_path. 'includes/radiocast_delete.'.$phpEx); } else if ( $mode == 'radiocast_download' ) { include($module_root_path. 'includes/radiocast_download.'.$phpEx); } else if ( $mode == 'radiocast_add' ) { include($module_root_path. 'includes/radiocast_add.'.$phpEx); } else if ( $mode == 'radiocast_edit' ) { include($module_root_path. 'includes/radiocast_edit.'.$phpEx); } else if ( $mode == 'radiocast_list' ) { include($module_root_path. 'includes/radiocast_list.'.$phpEx); } else if ( $mode == 'radiocast_modcp' ) { include($module_root_path. 'includes/radiocast_modcp.'.$phpEx); } else if ( $mode == 'radiocast_player' ) { include($module_root_path. 'includes/radiocast_player.'.$phpEx); } else if ( $mode == 'radiocast_rate' ) { include($module_root_path. 'includes/radiocast_rate.'.$phpEx); } else if ( $mode == 'radiocast_station' ) { include($module_root_path. 'includes/radiocast_station.'.$phpEx); } else if ( $mode == 'radiocast_stream' ) { include($module_root_path. 'includes/radiocast_stream.'.$phpEx); } else if( !is_object($mx_block)) { die("Hacking attempt"); } else { /* +---------------------------------------------------------- | Build Categories Index +---------------------------------------------------------- */ $sql = "SELECT c.*, COUNT(s.station_id) AS count FROM ". RADIOCAST_CAT_TABLE ." AS c LEFT JOIN ". RADIOCAST_TABLE ." AS s ON c.cat_id = s.station_cat_id WHERE cat_id <> 0 GROUP BY cat_id ORDER BY cat_order ASC"; if( !($result = $db->sql_query($sql)) ) { mx_message_die(GENERAL_ERROR, 'Could not query categories list', '', __LINE__, __FILE__, $sql); } $catrows = array(); while( $row = $db->sql_fetchrow($result) ) { $radiocast_user_access = radiocast_user_access($row['cat_id'], $row, 1, 0, 0, 0, 0, 0); // VIEW if ($radiocast_user_access['view'] == 1) { $catrows[] = $row; } } $allowed_cat = ''; // For Recent Public Stations below // // $catrows now stores all categories which this user can view. Dump them out! // for ($i = 0; $i < count($catrows); $i++) { // -------------------------------- // Build allowed category-list (for recent stations after here) // -------------------------------- $allowed_cat .= ($allowed_cat == '') ? $catrows[$i]['cat_id'] : ',' . $catrows[$i]['cat_id']; // -------------------------------- // Build moderators list // -------------------------------- $l_moderators = ''; $moderators_list = ''; $grouprows= array(); if( $catrows[$i]['cat_moderator_groups'] != '') { // We have usergroup_ID, now we need usergroup name $sql = "SELECT group_id, group_name FROM " . GROUPS_TABLE . " WHERE group_single_user <> 1 AND group_type <> ". GROUP_HIDDEN ." AND group_id IN (". $catrows[$i]['cat_moderator_groups'] .") ORDER BY group_name ASC"; if ( !$result = $db->sql_query($sql) ) { mx_message_die(GENERAL_ERROR, 'Could not obtain usergroups data', '', __LINE__, __FILE__, $sql); } while( $row = $db->sql_fetchrow($result) ) { $grouprows[] = $row; } } if( count($grouprows) > 0 ) { $l_moderators = $lang['Moderators']; for ($j = 0; $j < count($grouprows); $j++) { $group_link = '<a href="'. append_sid($phpbb_root_path. "groupcp.$phpEx?". POST_GROUPS_URL .'='. $grouprows[$j]['group_id']) .'">'. $grouprows[$j]['group_name'] .'</a>'; $moderators_list .= ($moderators_list == '') ? $group_link : ', ' . $group_link; } } // ------------------------------------------ // Get Last station of this Category // ------------------------------------------ if ($catrows[$i]['count'] == 0) { // // Oh, this category is empty // $last_station_info = $lang['No_Stations']; $u_last_station = ''; $last_station_title = ''; } else { // ---------------------------- // Check Station Approval // ---------------------------- if(($catrows[$i]['cat_approval'] == RADIOCAST_ADMIN) or ($catrows[$i]['cat_approval'] == RADIOCAST_MOD)) { $station_approval_sql = 'AND s.station_approval = 1'; // station Approval ON } else { $station_approval_sql = ''; // station Approval OFF } // ---------------------------- // OK, we may do a query now... // ---------------------------- $sql = "SELECT s.station_id, s.station_title, s.station_singer, s.station_user_id, s.station_username, s.station_time, s.station_cat_id, u.user_id, u.username FROM ". RADIOCAST_TABLE ." AS s LEFT JOIN ". USERS_TABLE ." AS u ON s.station_user_id = u.user_id WHERE s.station_cat_id = '". $catrows[$i]['cat_id'] ."' $station_approval_sql ORDER BY s.station_time DESC LIMIT 1"; if ( !$result = $db->sql_query($sql) ) { mx_message_die(GENERAL_ERROR, 'Could not get last station information', '', __LINE__, __FILE__, $sql); } $lastrow = $db->sql_fetchrow($result); // ---------------------------- // Write the Date // ---------------------------- $last_station_info = create_date($board_config['default_dateformat'], $lastrow['station_time'], $board_config['board_timezone']); $last_station_info .= '<br />'; // ---------------------------- // Write username of last poster // ---------------------------- if( ($lastrow['user_id'] == RADIOCAST_GUEST) or ($lastrow['username'] == '') ) { $last_station_info .= ($lastrow['station_username'] == '') ? $lang['Guest'] : $lastrow['station_username']; } else { $last_station_info .= $lang['Poster'] .': <a href="'. append_sid($phpbb_root_path . "profile.$phpEx?mode=viewprofile&". POST_USERS_URL .'='. $lastrow['user_id']) .'">'. $lastrow['username'] .'</a>'; } // ---------------------------- // Write the last station's title. // Truncate it if it's too long // ---------------------------- if( !isset($radiocast_config['last_station_title_length']) ) { $radiocast_config['last_station_title_length'] = 25; } $lastrow['station_title'] = $lastrow['station_title']; if (strlen($lastrow['station_title']) > $radiocast_config['last_station_title_length']) { $lastrow['station_title'] = substr($lastrow['station_title'], 0, $radiocast_config['last_station_title_length']) . '...'; } $last_station_info .= '<br />'. $lang['Station_Title'] .': <a href="'; $last_station_info .= append_sid(this_rc_mxurl("radiocast_mode=radiocast_player&station_id=". $lastrow['station_id'])) .'">' ; $last_station_info .= $lastrow['station_title'] .'</a>'; } // END of Last Station // ------------------------------------------ // Parse to template the info of the current Category // ------------------------------------------ $template->assign_block_vars('catrow', array( 'U_VIEW_CAT' => append_sid(this_rc_mxurl("radiocast_mode=radiocast_cat&cat_id=". $catrows[$i]['cat_id'])), 'CAT_TITLE' => $catrows[$i]['cat_title'], 'CAT_DESC' => $catrows[$i]['cat_desc'], 'CAT_VIEWS' => $catrows[$i]['cat_views'], 'L_MODERATORS' => $l_moderators, 'MODERATORS' => $moderators_list, 'STATIONS' => $catrows[$i]['count'], 'LAST_STATION_INFO' => $last_station_info) ); } // END of Categories Index /* +---------------------------------------------------------- | Top Stations +---------------------------------------------------------- */ if( isset($HTTP_GET_VARS['sort_method']) ) { switch ($HTTP_GET_VARS['sort_method']) { case 'station_time': $sort_method = 'station_time'; break; case 'station_view_count': $sort_method = 'station_view_count'; break; case 'rating': $sort_method = 'rating'; break; case 'comments': $sort_method = 'comments'; break; case 'new_comment': $sort_method = 'new_comment'; break; default: $sort_method = $radiocast_config['sort_method']; } } else if( isset($HTTP_POST_VARS['sort_method']) ) { switch ($HTTP_POST_VARS['sort_method']) { case 'station_time': $sort_method = 'station_time'; break; case 'station_view_count': $sort_method = 'station_view_count'; break; case 'rating': $sort_method = 'rating'; break; case 'comments': $sort_method = 'comments'; break; case 'new_comment': $sort_method = 'new_comment'; break; default: $sort_method = $radiocast_config['sort_method']; } } else { $sort_method = $radiocast_config['sort_method']; } // Station limit if( isset($HTTP_GET_VARS['station_limit']) ) { switch ($HTTP_GET_VARS['station_limit']) { case '5': $station_limit = '5'; break; case '10': $station_limit = '10'; break; case '15': $station_limit = '15'; break; case '20': $station_limit = '20'; break; default: $station_limit = $radiocast_config['top']; } } else if( isset($HTTP_POST_VARS['station_limit']) ) { switch ($HTTP_POST_VARS['station_limit']) { case '5': $station_limit = '5'; break; case '10': $station_limit = '10'; break; case '15': $station_limit = '15'; break; case '20': $station_limit = '20'; break; default: $station_limit = $radiocast_config['top']; } } else { $station_limit = $radiocast_config['top']; } // // We may do query now // if ($allowed_cat != '') { $sql = "SELECT s.station_id, s.station_title, s.station_desc, s.station_singer, s.station_user_id, s.station_user_ip, s.station_username, s.station_time, s.station_cat_id, s.station_view_count, u.user_id, u.username, r.rate_station_id, AVG(r.rate_point) AS rating, COUNT(DISTINCT c.comment_id) AS comments, MAX(c.comment_id) as new_comment FROM ". RADIOCAST_TABLE ." AS s LEFT JOIN ". USERS_TABLE ." AS u ON s.station_user_id = u.user_id LEFT JOIN ". RADIOCAST_CAT_TABLE ." AS ct ON s.station_cat_id = ct.cat_id LEFT JOIN ". RADIOCAST_RATE_TABLE ." AS r ON s.station_id = r.rate_station_id LEFT JOIN ". RADIOCAST_COMMENT_TABLE ." AS c ON s.station_id = c.comment_station_id WHERE s.station_cat_id IN ($allowed_cat) AND ( s.station_approval = 1 OR ct.cat_approval = 0 ) GROUP BY s.station_id ORDER BY $sort_method DESC LIMIT $station_limit"; if( !($result = $db->sql_query($sql)) ) { mx_message_die(GENERAL_ERROR, 'Could not query top stations information', '', __LINE__, __FILE__, $sql); } $topstationrow = array(); while( $row = $db->sql_fetchrow($result) ) { $topstationrow[] = $row; } if (count($topstationrow) > 0) { for ($i = 0; $i < count($topstationrow); $i += $radiocast_config['rows_per_page']) { $template->assign_block_vars('top_stations', array()); for ($j = $i; $j < ($i + $radiocast_config['rows_per_page']); $j++) { if( $j >= count($topstationrow) ) { break; } if(!$topstationrow[$j]['rating']) { $topstationrow[$j]['rating'] = $lang['Not_rated']; } else { $topstationrow[$j]['rating'] = round($topstationrow[$j]['rating'], 2); } $template->assign_block_vars('top_stations.top_row', array( 'U_STATION' => append_sid(this_rc_mxurl("radiocast_mode=radiocast_player&station_id=". $topstationrow[$j]['station_id'])), 'DESC' => $topstationrow[$j]['station_desc'] ) ); if( ($topstationrow[$j]['user_id'] == RADIOCAST_GUEST) or ($topstationrow[$j]['username'] == '') ) { $top_poster = ($topstationrow[$j]['station_username'] == '') ? $lang['Guest'] : $topstationrow[$j]['station_username']; } else { $top_poster = '<a href="'. append_sid($phpbb_root_path . "profile.$phpEx?mode=viewprofile&". POST_USERS_URL .'='. $topstationrow[$j]['user_id']) .'">'. $topstationrow[$j]['username'] .'</a>'; } $template->assign_block_vars('top_stations.top_detail', array( 'TITLE' => '<a href="'. append_sid(this_rc_mxurl("radiocast_mode=radiocast_player&station_id=". $topstationrow[$j]['station_id'])) . '">' . $topstationrow[$j]['station_title'] . '</a>', 'SINGER' => $topstationrow[$j]['station_singer'], 'RADIO_FRONT_IMG' => $mx_images['radio_front'], 'POSTER' => $top_poster, 'TIME' => create_date($board_config['default_dateformat'], $topstationrow[$j]['station_time'], $board_config['board_timezone']), 'VIEW' => $topstationrow[$j]['station_view_count'], 'RATING' => ($radiocast_config['rate'] == 1) ? ( '<a href="'. append_sid(this_rc_mxurl("radiocast_mode=radiocast_rate&station_id=". $topstationrow[$j]['station_id'])) . '">' . $topstationrow[$j]['rating'] . '</a>' ) : '', 'COMMENTS' => ($radiocast_config['comment'] == 1) ? ( '<a href="'. append_sid(this_rc_mxurl("radiocast_mode=radiocast_comment&station_id=". $topstationrow[$j]['station_id'])) . '">' . $topstationrow[$j]['comments'] . '</a>' ) : '', 'IP' => ($userdata['user_level'] == ADMIN) ? $lang['IP_Address'] . ': <a href="http://www.nic.com/cgi-bin/whois.cgi?query=' . decode_ip($topstationrow[$j]['station_user_ip']) . '" target="_blank">' . decode_ip($topstationrow[$j]['station_user_ip']) .'</a><br />' : '' ) ); } } } else { // // No stations Found // $template->assign_block_vars('no_stations', array()); } } else { // // No Cats Found // $template->assign_block_vars('no_stations', array()); } // ------------------------------------ // additional sorting options // ------------------------------------ $sort_rating_option = ''; $sort_comments_option = ''; if( $radiocast_config['rate'] == 1 ) { $sort_rating_option = '<option value="rating" '; $sort_rating_option .= ($sort_method == 'rating') ? 'selected="selected"' : ''; $sort_rating_option .= '>' . $lang['Rating'] .'</option>'; } if( $radiocast_config['comment'] == 1 ) { $sort_comments_option = '<option value="comments" '; $sort_comments_option .= ($sort_method == 'comments') ? 'selected="selected"' : ''; $sort_comments_option .= '>' . $lang['Comments'] .'</option>'; $sort_new_comment_option = '<option value="new_comment" '; $sort_new_comment_option .= ($sort_method == 'new_comment') ? 'selected="selected"' : ''; $sort_new_comment_option .= '>' . $lang['New_Comment'] .'</option>'; } /* +---------------------------------------------------------- | Start output the page +---------------------------------------------------------- */ $page_title = $lang['Radio']; if ( !is_object($mx_block)) { include($mx_root_path . 'includes/page_header.'.$phpEx); } $template->set_filenames(array( 'body' => 'radiocast_index_body.tpl') ); $template->assign_vars(array( 'L_CATEGORY' => $lang['Category'], 'L_STATIONS' => $lang['Stations'], 'L_CAT_VIEWS' => $lang['Cat_Views'], 'L_LAST_STATION' => $lang['Last_Station'], 'S_RADIOCAST_ACTION' => append_sid(this_rc_mxurl()), 'S_ROWS' => $radiocast_config['rows_per_page'], 'S_ROW_WIDTH' => (100/$radiocast_config['rows_per_page']) . '%', 'L_TOP_STATIONS' => $lang['Top_Stations'], 'L_SELECT_SORT_METHOD' => $lang['Select_sort_method'], 'L_STATION_LIMIT' => $lang['Station_Limit'], 'L_NO_STATIONS' => $lang['No_Stations'], 'L_STATION_TITLE' => $lang['Station_Title'], 'L_SINGER' => $lang['Singer'], 'L_POSTER' => $lang['Poster'], 'L_POSTED' => $lang['Posted'], 'L_RATING' => $lang['Rating'], 'L_COMMENTS' => $lang['Comments'], 'L_PUBLIC_CATS' => $lang['Public_Categories'], 'L_SEARCH_STATIONS' => $lang['Search_station'], 'S_RADIOCAST_LIST' => append_sid(this_rc_mxurl("radiocast_mode=radiocast_list")), 'L_TIME' => $lang['Time'], 'L_VIEW' => $lang['View'], 'SORT_TIME' => ($sort_method == 'station_time') ? 'selected="selected"' : '', 'SORT_VIEW' => ($sort_method == 'station_view_count') ? 'selected="selected"' : '', 'SORT_RATING_OPTION' => $sort_rating_option, 'SORT_COMMENTS_OPTION' => $sort_comments_option, 'SORT_NEW_COMMENT_OPTION' => $sort_new_comment_option, 'L_SORT' => $lang['Sort']) ); // // Generate the page // $template->pparse('body'); if ( !is_object($mx_block)) { include($mx_root_path . 'includes/page_tail.'.$phpEx); } } ?> --- NEW FILE: Radio_Cast.nfo --- (This appears to be a binary file; contents omitted.) |