|
From: OryNider <ory...@us...> - 2007-06-06 20:32:36
|
Update of /cvsroot/mxbb/mx_music In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv6104 Added Files: db_install.php db_uninstall.php db_upgrade.php music.php music_center.pak mx_install_readme.htm release.txt Log Message: --- NEW FILE: release.txt --- [b][Release][mx_music]: Music Center[/b] [b][Authors]: Cf Manager, OryNider[/b] [b][Version]: 2.0.6 [/b] [b]Designed for mxBB Version: 2.8.0[/b] [b][Support]:[/b] [u]Here[/u] [b][DEMO]:[/b] [url=http://atcer.ministry.ro/board/?page=16]Here[/url] [b][Note]:[/b] [color=red]If you upgrade from 2.7.x and you have mx_musiconline, the posibility of migration to mx_music it's just teoretical with unknown rezult, and you do it at your own risc!!! A mx_musiconline module for 2.8.0 may be relesed by Selven.[/color] [b][Description]:[/b] This Module allows you create the Music Center Page/Block where users can upload, listen, rate and comment on songs. Beside that, users can link URL of the song from the another server without uploading. You have an admin panel that allows you to manage the features of the module. Some modifications on the original MODS have been applied to make this package more integrated, flexible and multilanguage. Allowed files: MP3, WMA, WMV, WAV, MIDI, MPEG, AVI, AU, SWF, QT, RAM, RM and others. [b]Additionaly:[/b] [list] [*][u]Music Song Image[/u] - You can add the Song Image to the section of each song. (Maybe CD Cover, Artist Photo or any image you want ;) ) Maximum image size is configurable in adminCP :D [*][u]Music Search Song[/u] - is helping you find the song by Song Title, Singer or Song Poster quickly and easily. [*][u]Music Cat Views[/u] - is adding a viewed counter of each Category; [*][u]Music Download Song[/u] - alows users to directly download the song to their computer.[/list] [b]Special Note:[/b] [color=blue] In version 2.0.2 and above if you are posting a radio stream that ends with "/listen.pls" on music_page will be swiched to music_stream mode and will make traffic on your website, but if it's submited like a normal url with no "/listen.pls" will make traffic on the shotcast server who is brotcasting the stream. But if it's submited with "/listen.pls" can be listened with your favorite player and the original stream informations will he hidden To do this copy the link from Download/Listen in your player on the website or local computer such as WinAMP :wink: But do not try to save the file couse you will just make not needed traffic and get a very large file!!![/color] [b][Download]:[/b] [URL=http://www.mx-system.com/modules/mx_pafiledb/dload.php?action=download&file_id=368]mx_music_center.zip[/URL] [b][Languages]:[/b] [color=blue]Please if you traslate the language files to your language post a link to a zip with the traslated files. Thaks![/color] [b][Romanian Language][/b]: [url=http://pubory.uv.ro/portal/modules/mx_pafiledb/dload.php?action=download&file_id=44]mx_music_romanian_language.zip[/url] [b][German Language][/b]: [url=http://pubory.uv.ro/portal/modules/mx_pafiledb/dload.php?action=download&file_id=45]mx_music_german_language.zip[/url] [b][Dutch Language][/b]: [url=http://pubory.uv.ro/portal/modules/mx_pafiledb/dload.php?action=download&file_id=46]mx_music_lang_dutch.zip[/url] [b][Chinese Language][/b]: [url=http://pubory.uv.ro/portal/modules/mx_pafiledb/dload.php?action=download&file_id=47]mx_music_lang_chinese.zip[/url] [b][Vietnamese Language][/b]: [url=http://pubory.uv.ro/portal/modules/mx_pafiledb/dload.php?action=download&file_id=48]mx_music_lang_vietnamese.zip[/url] --- NEW FILE: db_uninstall.php --- <?php /** * * @package mxBB Portal Module - mx_music * @version $Id: db_uninstall.php,v 1.1 2007/06/06 20:32:26 orynider Exp $ * @copyright (c) 2003 [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 ".$mx_table_prefix."music ", "DROP TABLE ".$mx_table_prefix."music_rate ", "DROP TABLE ".$mx_table_prefix."music_comment ", "DROP TABLE ".$mx_table_prefix."music_cat ", "DROP TABLE ".$mx_table_prefix."music_config ", ); $n = 0; $message = "<b>This list is a result of the SQL queries needed for music online 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=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("../../phpBB2/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">MX Module - Music Online <br> v. 2.0.6 </font></b></p> <p><span style="font-size: 9pt; line-height: normal; font-weight:bold">Module</span><span style="font-size: 9pt"> <br /> - for mxBB-Portal v. 2.8.0</span></p> <p><strong><span style="font-size: 9pt">Author</span></strong><span style="font-size: 9pt"><br /> Cf Manager, OryNider (mxBB-Development Team)<br /> <br /> <span style="font-weight: bold">Description:</span> <br /> </span><span class="postbody">This Module allows you create the Music Center Page/Block where users can upload, listen, rate and comment on songs. <br> Beside that, users can link URL of the song from the another server without uploading. <br> You have an admin panel that allows you to manage the features of the module. <br> Some modifications on the original MODS have been applied to make this package more integrated, flexible and multilanguage. <br> Allowed files: MP3, WMA, WMV, WAV, MIDI, MPEG, AVI, AU, SWF, QT, RAM, RM and others. <br> <br> </span><strong> <span style="font-size: 9pt">Features</span></strong><span style="font-size: 9pt"> - Media 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">Music Song Image</span> - You can add the Song Image to the section of each song. (Maybe CD Cover, Artist Photo or 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 adminCP <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">Music Search Song</span> - is helping you find the song by Song Title, Singer or Song Poster quickly and easily. <br> </li> <li> <p style="margin-top: 0; margin-bottom: 0"> <span style="TEXT-DECORATION: underline">Music 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">Music Download Song</span> - alows users to directly download the song to their computer.</li> </ul> </span> <p style="margin-top: 0; margin-bottom: 0"><span style="font-size: 9pt"> Special Note: </span><span class="postbody"><span style="COLOR: red">If you are posting a radio stream that ends with "/listen.pls" on music_page will be swiched to music_stream mode and will make traffic on your website, but if it's submited like a normal url with no "/listen.pls" will make traffic on the shotcast server who is brotcasting the stream. But if it's submited with "/listen.pls" can be listened with your favorite player and the original stream informations will he hidden To do this copy the link from Download/Listen in your player on the website or local computer such as WinAMP </span> <img alt="Wink" src="http://www.mx-system.com/forum/images/smiles/icon_wink.gif" border="0" width="15" height="15"><span style="COLOR: red"> But do not try to save the file couse you will just make not needed traffic and get a very large file!!!</span> </span></p> <p style="margin-top: 0; margin-bottom: 0"><span 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://arcer.ministry.ro/board/?page=16">DEMO </a> <br /> <br /> <a href="http://www.mx-system.com/index.php?page=4" target="_blank" class="postlink"> DOWNLOAD </a> <br /> <br /><a name="install"> <br /> <span style="font-weight: bold">I. Installation Instructions</span> <br /> To install this module, follow these instructions. If you encounter any problems during install, visit the <a target="_blank" class="postlink" href="http://www.mx-system.com/forum/viewtopic.php?t=9823">module support forum</a>. <br> <br> To summarize:<br> If installing from scratch, use import module in the AdminCP.<br> If upgrading, use the upgrade option in the AdminCP<br> If uninstalling, use the delete feature in the AdminCP</span></p> <p style="margin-top: 0; margin-bottom: 0"> </p> <p style="margin-top: 0; margin-bottom: 0"><span style="font-size: 9pt">Special note for mx_music online:<br> # CHMOD 777 upload<br> # CHMOD 777 upload/song_image</span></p> <p style="margin-top: 0; margin-bottom: 0"> </p> <p style="margin-top: 0; margin-bottom: 0"><span style="font-size: 9pt"> Special Note: </span><span class="postbody"><span style="COLOR: red">If you upgrade from 2.7.x and you have mx_musiconline, the posibility of migration to mx_music it's just teoretical with unknown rezult, and you do it at your own risc!!! A mx_musiconline module for 2.8.0 may be relesed by Selven.</span></span><span style="font-size: 9pt"><br> <br /> <a href="#top"> Back to Top</a> <br /> <br /><a name="themes"> <br /> <span style="font-weight: bold">II. Additional Styles</span> <br /> This module is compatible with any theme/style. <br /> <br /> <a href="#top"> Back to Top</a> <br /> <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. <br /> <br /> Translated languages are downloaded <a target="_blank" class="postlink" href="http://www.mx-system.com/index.php?page=2&t=9823&phpbb_script=viewtopic">here</a>. <br /> <br /> If exists, download and install in the modules/mx_modulename/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> </span></p> <p> <span style="font-size: 9pt">/mxBB-Development Team</span></p> </td> </tr> </table> </body> </html> --- NEW FILE: db_upgrade.php --- <?php /** * * @package mxBB Portal Module - mx_music * @version $Id: db_upgrade.php,v 1.1 2007/06/06 20:32:27 orynider Exp $ * @copyright (c) 2002-2006 [Markus, 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 = '2.0.6'; $mx_module_copy = 'mxBB <i> - Music Center</i> module by Cf Manager & <a href="http://www.mxbb.net" target="_blank">OryNider</a>'; $sql = array(); // // Precheck // if ( $result = $db->sql_query( "SELECT config_name from " . $mx_table_prefix . "music_config" ) ) { // // Upgrade checks // $upgrade_206 = 0; // // validate before 2.06 // $result = $db->sql_query( "SELECT config_value from " . $mx_table_prefix . "music_config WHERE config_name = 'enable_integration'" ); if ( $db->sql_numrows( $result ) == 0 ) { $upgrade_206 = 1; } $message = "<b>Upgrading!</b><br/><br/>"; if ( $upgrade_206 == 1 ) { $message .= "<b>Upgrading to v. 2.01(2.06)...</b><br/><br/>"; $sql[] = "ALTER TABLE " . $mx_table_prefix . "music ADD song_imagename VARCHAR(255) not null AFTER song_filename"; $sql[] = "ALTER TABLE " . $mx_table_prefix . "music ADD song_download_count VARCHAR(255) not null DEFAULT '0' AFTER song_approval"; $sql[] = "ALTER TABLE " . $mx_table_prefix . "music_cat ADD cat_views mediumint(8) NOT NULL"; $sql[] = "INSERT INTO " . $mx_table_prefix . "music_config VALUES ('wmv_allowed', '1')"; $sql[] = "INSERT INTO " . $mx_table_prefix . "music_config VALUES ('mid_allowed', '1')"; $sql[] = "INSERT INTO " . $mx_table_prefix . "music_config VALUES ('ram_allowed', '1')"; $sql[] = "INSERT INTO " . $mx_table_prefix . "music_config VALUES ('au_allowed', '1')"; $sql[] = "INSERT INTO " . $mx_table_prefix . "music_config VALUES ('mpeg_allowed', '1')"; $sql[] = "INSERT INTO " . $mx_table_prefix . "music_config VALUES ('avi_allowed', '1')"; $sql[] = "INSERT INTO " . $mx_table_prefix . "music_config VALUES ('swf_allowed', '1')"; $sql[] = "INSERT INTO " . $mx_table_prefix . "music_config VALUES ('qt_allowed', '1')"; $sql[] = "INSERT INTO " . $mx_table_prefix . "music_config VALUES ('rm_allowed', '1')"; $sql[] = "UPDATE ". $mx_table_prefix ."music_config SET config_value = '0.6' WHERE config_name = 'music_version'"; $sql[] = "INSERT INTO " . $mx_table_prefix . "music_config VALUES ('max_image_size', '10240')"; $sql[] = "INSERT INTO " . $mx_table_prefix . "music_config VALUES ('max_image_width', '300')"; $sql[] = "INSERT INTO " . $mx_table_prefix . "music_config VALUES ('max_image_height', '200')"; $sql[] = "INSERT INTO " . $mx_table_prefix . "music_config VALUES ('download', '1')"; $sql[] = "INSERT INTO " . $mx_table_prefix . "music_config VALUES ('enable_integration', '1')"; $sql[] = "INSERT INTO " . $mx_table_prefix . "music_config VALUES ('override_default_pages', '0')"; $sql[] = "INSERT INTO " . $mx_table_prefix . "music_config VALUES ('index', '5')"; } else { $message .= "<b>Nothing to upgrade...</b><br/><br/>"; } $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 not installed // $message = "<b>Module is not installed...and thus cannot be upgraded ;)</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/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: music.php --- <?php /** * * @package mxBB Portal Module - mx_music * @version $Id: music.php,v 1.1 2007/06/06 20:32:28 orynider Exp $ * @copyright (c) 2003 [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 = 'Music Center' 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; } $music_root_path = $module_root_path . 'music_box/'; // // Get general music information // include($music_root_path . 'music_common.'.$phpEx); // // Nav switch for mx // // --------------------- // Check $album_user_id // --------------------- if (isset ($_POST['user_id'])) { $music_user_id = intval($_POST['user_id']); } elseif (isset ($_GET['user_id'])) { $music_user_id = intval($_GET['user_id']); } else { $music_user_id = $userdata['user_id']; } // //mode // if ( isset($HTTP_POST_VARS['music_mode']) || isset($HTTP_GET_VARS['music_mode']) ) { $mode= ( isset($HTTP_POST_VARS['music_mode']) ) ? $HTTP_POST_VARS['music_mode'] : $HTTP_GET_VARS['music_mode']; } else { $mode= 'music_index'; } if ( $mode == 'music_cat' ) { include($module_root_path. 'includes/music_cat.'.$phpEx); } else if ( $mode == 'music_comment' ) { include($module_root_path. 'includes/music_comment.'.$phpEx); } else if ( $mode == 'music_comment_delete' ) { include($module_root_path. 'includes/music_comment_delete.'.$phpEx); } else if ( $mode == 'music_comment_edit' ) { include($module_root_path. 'includes/music_comment_edit.'.$phpEx); } else if ( $mode == 'music_delete' ) { include($module_root_path. 'includes/music_delete.'.$phpEx); } else if ( $mode == 'music_download' ) { include($module_root_path. 'includes/music_download.'.$phpEx); } else if ( $mode == 'music_edit' ) { include($module_root_path. 'includes/music_edit.'.$phpEx); } else if ( $mode == 'music_list' ) { include($module_root_path. 'includes/music_list.'.$phpEx); } else if ( $mode == 'music_modcp' ) { include($module_root_path. 'includes/music_modcp.'.$phpEx); } else if ( $mode == 'music_page' ) { include($module_root_path. 'includes/music_page.'.$phpEx); } else if ( $mode == 'music_rate' ) { include($module_root_path. 'includes/music_rate.'.$phpEx); } else if ( $mode == 'music_song' ) { include($module_root_path. 'includes/music_song.'.$phpEx); } else if ( $mode == 'music_upload' ) { include($module_root_path. 'includes/music_upload.'.$phpEx); } else if ( $mode == 'music_stream' ) { include($module_root_path. 'includes/music_stream.'.$phpEx); } else if( !is_object($mx_block)) { die("Hacking attempt"); } else { /* +---------------------------------------------------------- | Build Categories Index +---------------------------------------------------------- */ $sql = "SELECT c.*, COUNT(s.song_id) AS count FROM ". MUSIC_CAT_TABLE ." AS c LEFT JOIN ". MUSIC_TABLE ." AS s ON c.cat_id = s.song_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) ) { $music_user_access = music_user_access($row['cat_id'], $row, 1, 0, 0, 0, 0, 0); // VIEW if ($music_user_access['view'] == 1) { $catrows[] = $row; } } $allowed_cat = ''; // For Recent Public Songs 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 songs 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 song of this Category // ------------------------------------------ if ($catrows[$i]['count'] == 0) { // // Oh, this category is empty // $last_song_info = $lang['No_Songs']; $u_last_song = ''; $last_song_title = ''; } else { // ---------------------------- // Check Song Approval // ---------------------------- if(($catrows[$i]['cat_approval'] == MUSIC_ADMIN) or ($catrows[$i]['cat_approval'] == MUSIC_MOD)) { $song_approval_sql = 'AND s.song_approval = 1'; // song Approval ON } else { $song_approval_sql = ''; // song Approval OFF } // ---------------------------- // OK, we may do a query now... // ---------------------------- $sql = "SELECT s.song_id, s.song_title, s.song_singer, s.song_user_id, s.song_username, s.song_time, s.song_cat_id, u.user_id, u.username FROM ". MUSIC_TABLE ." AS s LEFT JOIN ". USERS_TABLE ." AS u ON s.song_user_id = u.user_id WHERE s.song_cat_id = '". $catrows[$i]['cat_id'] ."' $song_approval_sql ORDER BY s.song_time DESC LIMIT 1"; if ( !$result = $db->sql_query($sql) ) { mx_message_die(GENERAL_ERROR, 'Could not get last song information', '', __LINE__, __FILE__, $sql); } $lastrow = $db->sql_fetchrow($result); // ---------------------------- // Write the Date // ---------------------------- $last_song_info = create_date($board_config['default_dateformat'], $lastrow['song_time'], $board_config['board_timezone']); $last_song_info .= '<br />'; // ---------------------------- // Write username of last poster // ---------------------------- if( ($lastrow['user_id'] == MUSIC_GUEST) or ($lastrow['username'] == '') ) { $last_song_info .= ($lastrow['song_username'] == '') ? $lang['Guest'] : $lastrow['song_username']; } else { $last_song_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 song's title. // Truncate it if it's too long // ---------------------------- if( !isset($music_config['last_song_title_length']) ) { $music_config['last_song_title_length'] = 25; } $lastrow['song_title'] = $lastrow['song_title']; if (strlen($lastrow['song_title']) > $music_config['last_song_title_length']) { $lastrow['song_title'] = substr($lastrow['song_title'], 0, $music_config['last_song_title_length']) . '...'; } $last_song_info .= '<br />'. $lang['Song_Title'] .': <a href="'; $last_song_info .= append_sid(this_mo_mxurl("music_mode=music_page&song_id=". $lastrow['song_id'])) .'">' ; $last_song_info .= $lastrow['song_title'] .'</a>'; } // END of Last Song // ------------------------------------------ // Parse to template the info of the current Category // ------------------------------------------ $template->assign_block_vars('catrow', array( 'U_VIEW_CAT' => append_sid(this_mo_mxurl("music_mode=music_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, 'SONGS' => $catrows[$i]['count'], 'LAST_SONG_INFO' => $last_song_info) ); } // END of Categories Index /* +---------------------------------------------------------- | Top Song +---------------------------------------------------------- */ if( isset($HTTP_GET_VARS['sort_method']) ) { switch ($HTTP_GET_VARS['sort_method']) { case 'song_time': $sort_method = 'song_time'; break; case 'song_view_count': $sort_method = 'song_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 = $music_config['sort_method']; } } else if( isset($HTTP_POST_VARS['sort_method']) ) { switch ($HTTP_POST_VARS['sort_method']) { case 'song_time': $sort_method = 'song_time'; break; case 'song_view_count': $sort_method = 'song_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 = $music_config['sort_method']; } } else { $sort_method = $music_config['sort_method']; } // Song limit if( isset($HTTP_GET_VARS['song_limit']) ) { switch ($HTTP_GET_VARS['song_limit']) { case '5': $song_limit = '5'; break; case '10': $song_limit = '10'; break; case '15': $song_limit = '15'; break; case '20': $song_limit = '20'; break; default: $song_limit = $music_config['top']; } } else if( isset($HTTP_POST_VARS['song_limit']) ) { switch ($HTTP_POST_VARS['song_limit']) { case '5': $song_limit = '5'; break; case '10': $song_limit = '10'; break; case '15': $song_limit = '15'; break; case '20': $song_limit = '20'; break; default: $song_limit = $music_config['top']; } } else { $song_limit = $music_config['top']; } // // We may do query now // if ($allowed_cat != '') { $sql = "SELECT s.song_id, s.song_title, s.song_desc, s.song_singer, s.song_user_id, s.song_user_ip, s.song_username, s.song_time, s.song_cat_id, s.song_view_count, u.user_id, u.username, r.rate_song_id, AVG(r.rate_point) AS rating, COUNT(DISTINCT c.comment_id) AS comments, MAX(c.comment_id) as new_comment FROM ". MUSIC_TABLE ." AS s LEFT JOIN ". USERS_TABLE ." AS u ON s.song_user_id = u.user_id LEFT JOIN ". MUSIC_CAT_TABLE ." AS ct ON s.song_cat_id = ct.cat_id LEFT JOIN ". MUSIC_RATE_TABLE ." AS r ON s.song_id = r.rate_song_id LEFT JOIN ". MUSIC_COMMENT_TABLE ." AS c ON s.song_id = c.comment_song_id WHERE s.song_cat_id IN ($allowed_cat) AND ( s.song_approval = 1 OR ct.cat_approval = 0 ) GROUP BY s.song_id ORDER BY $sort_method DESC LIMIT $song_limit"; if( !($result = $db->sql_query($sql)) ) { mx_message_die(GENERAL_ERROR, 'Could not query top songs information', '', __LINE__, __FILE__, $sql); } $topsongrow = array(); while( $row = $db->sql_fetchrow($result) ) { $topsongrow[] = $row; } if (count($topsongrow) > 0) { for ($i = 0; $i < count($topsongrow); $i += $music_config['rows_per_page']) { $template->assign_block_vars('top_songs', array()); for ($j = $i; $j < ($i + $music_config['rows_per_page']); $j++) { if( $j >= count($topsongrow) ) { break; } if(!$topsongrow[$j]['rating']) { $topsongrow[$j]['rating'] = $lang['Not_rated']; } else { $topsongrow[$j]['rating'] = round($topsongrow[$j]['rating'], 2); } $template->assign_block_vars('top_songs.top_row', array( 'U_SONG' => append_sid(this_mo_mxurl("music_mode=music_page&song_id=". $topsongrow[$j]['song_id'])), 'DESC' => $topsongrow[$j]['song_desc'] ) ); if( ($topsongrow[$j]['user_id'] == MUSIC_GUEST) or ($topsongrow[$j]['username'] == '') ) { $top_poster = ($topsongrow[$j]['song_username'] == '') ? $lang['Guest'] : $topsongrow[$j]['song_username']; } else { $top_poster = '<a href="'. append_sid($phpbb_root_path . "profile.$phpEx?mode=viewprofile&". POST_USERS_URL .'='. $topsongrow[$j]['user_id']) .'">'. $topsongrow[$j]['username'] .'</a>'; } $template->assign_block_vars('top_songs.top_detail', array( 'TITLE' => '<a href="'. append_sid(this_mo_mxurl("music_mode=music_page&song_id=". $topsongrow[$j]['song_id'])) . '">' . $topsongrow[$j]['song_title'] . '</a>', 'SINGER' => $topsongrow[$j]['song_singer'], 'POSTER' => $top_poster, 'TIME' => create_date($board_config['default_dateformat'], $topsongrow[$j]['song_time'], $board_config['board_timezone']), 'VIEW' => $topsongrow[$j]['song_view_count'], 'RATING' => ($music_config['rate'] == 1) ? ( '<a href="'. append_sid(this_mo_mxurl("music_mode=music_rate&song_id=". $topsongrow[$j]['song_id'])) . '">' . $topsongrow[$j]['rating'] . '</a>' ) : '', 'COMMENTS' => ($music_config['comment'] == 1) ? ( '<a href="'. append_sid(this_mo_mxurl("music_mode=music_comment&song_id=". $topsongrow[$j]['song_id'])) . '">' . $topsongrow[$j]['comments'] . '</a>' ) : '', 'IP' => ($userdata['user_level'] == ADMIN) ? $lang['IP_Address'] . ': <a href="http://www.nic.com/cgi-bin/whois.cgi?query=' . decode_ip($topsongrow[$j]['song_user_ip']) . '" target="_blank">' . decode_ip($topsongrow[$j]['song_user_ip']) .'</a><br />' : '' ) ); } } } else { // // No songs Found // $template->assign_block_vars('no_songs', array()); } } else { // // No Cats Found // $template->assign_block_vars('no_songs', array()); } // ------------------------------------ // additional sorting options // ------------------------------------ $sort_rating_option = ''; $sort_comments_option = ''; if( $music_config['rate'] == 1 ) { $sort_rating_option = '<option value="rating" '; $sort_rating_option .= ($sort_method == 'rating') ? 'selected="selected"' : ''; $sort_rating_option .= '>' . $lang['Rating'] .'</option>'; } if( $music_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['Music']; if ( !is_object($mx_block)) { include($mx_root_path . 'includes/page_header.'.$phpEx); } $template->set_filenames(array( 'body' => 'music_index_body.tpl') ); $template->assign_vars(array( 'L_CATEGORY' => $lang['Category'], 'L_SONGS' => $lang['Songs'], 'L_CAT_VIEWS' => $lang['Cat_Views'], 'L_LAST_SONG' => $lang['Last_Song'], 'S_MUSIC_ACTION' => append_sid(this_mo_mxurl()), 'S_ROWS' => $music_config['rows_per_page'], 'S_ROW_WIDTH' => (100/$music_config['rows_per_page']) . '%', 'L_TOP_SONGS' => $lang['Top_Songs'], 'L_SELECT_SORT_METHOD' => $lang['Select_sort_method'], 'L_SONG_LIMIT' => $lang['Song_Limit'], 'L_NO_SONGS' => $lang['No_Songs'], 'L_SONG_TITLE' => $lang['Song_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_SONGS' => $lang['Search_song'], 'S_MUSIC_LIST' => append_sid(this_mo_mxurl("music_mode=music_list")), 'L_TIME' => $lang['Time'], 'L_VIEW' => $lang['View'], 'SORT_TIME' => ($sort_method == 'song_time') ? 'selected="selected"' : '', 'SORT_VIEW' => ($sort_method == 'song_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); } // +------------------------------------------------------+ // | Powered by Music Online 2.0 (c) 2003 Cf Manager | // +------------------------------------------------------+ } ?> --- NEW FILE: music_center.pak --- module=+:57=+:Music Center=+:modules/mx_music/=+:music_center=+:1 New_function=+:---------------------------=+:0=+:0=+:0=+:0=+:0 function=+:57=+:60=+:music_center=+:Music Center=+:music.php=+: parameter=+:0=+:0=+:0=+:endoflist=+:0=+:0 block=+:=+:Music Center=+:Demo block=+:60=+:0=+:5=+:0=+:0=+:0=+:0=+:1=+:1 function=+:0=+:0=+:0=+:endoflist=+:0=+:0 --- NEW FILE: db_install.php --- <?php /** * * @package mxBB Portal Module - mx_music * @version $Id: db_install.php,v 1.1 2007/06/06 20:32:25 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 = '2.0.6'; $mx_module_copy = 'mxBB <i> - Music Center</i> module by Cf Manager & <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 . "music_config" ) ) { $message = "<b>This is a fresh install!</b><br/><br/>"; $sql = array(); $sql[] = "DROP TABLE IF EXISTS " . $mx_table_prefix . "music"; $sql[] = "DROP TABLE IF EXISTS " . $mx_table_prefix . "music_rate"; $sql[] = "DROP TABLE IF EXISTS " . $mx_table_prefix . "music_comment"; $sql[] = "DROP TABLE IF EXISTS " . $mx_table_prefix . "music_cat"; $sql[] = "DROP TABLE IF EXISTS " . $mx_table_prefix . "music_config"; $sql[] = "CREATE TABLE ". $mx_table_prefix . "music ( song_id int(11) UNSIGNED NOT NULL auto_increment, song_filename varchar(255) NOT NULL, song_imagename varchar(255) NOT NULL, song_title varchar(255) NOT NULL, song_url varchar(255) NOT NULL, song_desc text, song_singer varchar(255) NOT NULL, song_user_id mediumint(8) NOT NULL, song_username varchar(32), song_user_ip char(8) NOT NULL DEFAULT '0', song_time int(11) UNSIGNED NOT NULL, song_cat_id mediumint(8) UNSIGNED NOT NULL DEFAULT '1', song_view_count int(11) UNSIGNED NOT NULL DEFAULT '0', song_lock tinyint(3) NOT NULL DEFAULT '0', song_approval tinyint(3) NOT NULL DEFAULT '1', song_download_count varchar(255) NOT NULL, PRIMARY KEY (song_id), KEY song_cat_id (song_cat_id), KEY song_user_id (song_user_id), KEY song_time (song_time) ) TYPE=MyISAM"; $sql[] = "CREATE TABLE ". $mx_table_prefix . "music_rate ( rate_song_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_song_id (rate_song_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 . "music_comment ( comment_id int(11) UNSIGNED NOT NULL auto_increment, comment_song_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_song_id (comment_song_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 . "music_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 . "music_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 . "music_config VALUES ('max_songs', '1024')"; $sql[] = "INSERT INTO " . $mx_table_prefix . "music_config VALUES ('user_songs_limit', '50')"; $sql[] = "INSERT INTO " . $mx_table_prefix . "music_config VALUES ('mod_songs_limit', '250')"; $sql[] = "INSERT INTO " . $mx_table_prefix . "music_config VALUES ('max_file_size', '3145728')"; $sql[] = "INSERT INTO " . $mx_table_prefix . "music_config VALUES ('rows_per_page', '20')"; $sql[] = "INSERT INTO " . $mx_table_prefix . "music_config VALUES ('cols_per_page', '1')"; $sql[] = "INSERT INTO " . $mx_table_prefix . "music_config VALUES ('top', '5')"; $sql[] = "INSERT INTO " . $mx_table_prefix . "music_config VALUES ('sort_method', 'song_time')"; $sql[] = "INSERT INTO " . $mx_table_prefix . "music_config VALUES ('sort_order', 'DESC')"; $sql[] = "INSERT INTO " . $mx_table_prefix . "music_config VALUES ('mp3_allowed', '1')"; $sql[] = "INSERT INTO " . $mx_table_prefix . "music_config VALUES ('wav_allowed', '1')"; $sql[] = "INSERT INTO " . $mx_table_prefix . "music_config VALUES ('wma_allowed', '1')"; $sql[] = "INSERT INTO " . $mx_table_prefix . "music_config VALUES ('wmv_allowed', '1')"; $sql[] = "INSERT INTO " . $mx_table_prefix . "music_config VALUES ('mid_allowed', '1')"; $sql[] = "INSERT INTO " . $mx_table_prefix . "music_config VALUES ('ram_allowed', '1')"; $sql[] = "INSERT INTO " . $mx_table_prefix . "music_config VALUES ('au_allowed', '1')"; $sql[] = "INSERT INTO " . $mx_table_prefix . "music_config VALUES ('mpeg_allowed', '1')"; $sql[] = "INSERT INTO " . $mx_table_prefix . "music_config VALUES ('avi_allowed', '1')"; $sql[] = "INSERT INTO " . $mx_table_prefix . "music_config VALUES ('swf_allowed', '1')"; $sql[] = "INSERT INTO " . $mx_table_prefix . "music_config VALUES ('qt_allowed', '1')"; $sql[] = "INSERT INTO " . $mx_table_prefix . "music_config VALUES ('rm_allowed', '1')"; $sql[] = "INSERT INTO " . $mx_table_prefix . "music_config VALUES ('desc_length', '512000')"; $sql[] = "INSERT INTO " . $mx_table_prefix . "music_config VALUES ('hotlink_prevent', '0')"; $sql[] = "INSERT INTO " . $mx_table_prefix . "music_config VALUES ('hotlink_allowed', 'cfmanager.gate2vn.net')"; $sql[] = "INSERT INTO " . $mx_table_prefix . "music_config VALUES ('rate', '1')"; $sql[] = "INSERT INTO " . $mx_table_prefix . "music_config VALUES ('rate_scale', '10')"; $sql[] = "INSERT INTO " . $mx_table_prefix . "music_config VALUES ('comment', '1')"; $sql[] = "INSERT INTO " . $mx_table_prefix . "music_config VALUES ('music_version', '.0.6')"; $sql[] = "INSERT INTO " . $mx_table_prefix . "music_config VALUES ('max_image_size', '10240')"; $sql[] = "INSERT INTO " . $mx_table_prefix . "music_config VALUES ('max_image_width', '300')"; $sql[] = "INSERT INTO " . $mx_table_prefix . "music_config VALUES ('max_image_height', '200')"; $sql[] = "INSERT INTO " . $mx_table_prefix . "music_config VALUES ('download', '1')"; $sql[] = "INSERT INTO " . $mx_table_prefix . "music_config VALUES ('enable_integration', '1')"; $sql[] = "INSERT INTO " . $mx_table_prefix . "music_config VALUES ('override_default_pages', '0')"; $sql[] = "INSERT INTO " . $mx_table_prefix . "music_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 />"; ?> |