You can subscribe to this list here.
| 2005 |
Jan
|
Feb
|
Mar
(95) |
Apr
(270) |
May
(111) |
Jun
|
Jul
|
Aug
(64) |
Sep
(130) |
Oct
(319) |
Nov
(17) |
Dec
(191) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2006 |
Jan
(53) |
Feb
|
Mar
|
Apr
|
May
(6) |
Jun
(387) |
Jul
(102) |
Aug
(247) |
Sep
(120) |
Oct
(1) |
Nov
(8) |
Dec
(21) |
| 2007 |
Jan
(38) |
Feb
(36) |
Mar
|
Apr
(32) |
May
(135) |
Jun
(523) |
Jul
(192) |
Aug
(103) |
Sep
(533) |
Oct
(77) |
Nov
(23) |
Dec
(203) |
| 2008 |
Jan
(312) |
Feb
(1193) |
Mar
(404) |
Apr
(67) |
May
(62) |
Jun
(497) |
Jul
(297) |
Aug
(110) |
Sep
(335) |
Oct
(256) |
Nov
(50) |
Dec
(118) |
| 2009 |
Jan
(67) |
Feb
(10) |
Mar
(1) |
Apr
(1) |
May
|
Jun
(10) |
Jul
(61) |
Aug
|
Sep
(16) |
Oct
(45) |
Nov
(12) |
Dec
(14) |
| 2010 |
Jan
(30) |
Feb
|
Mar
|
Apr
(4) |
May
|
Jun
|
Jul
(7) |
Aug
(7) |
Sep
(5) |
Oct
(5) |
Nov
|
Dec
|
| 2011 |
Jan
(7) |
Feb
(3) |
Mar
(89) |
Apr
(11) |
May
(5) |
Jun
|
Jul
(8) |
Aug
(1) |
Sep
(2) |
Oct
|
Nov
(2) |
Dec
(89) |
| 2012 |
Jan
(7) |
Feb
(1) |
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
|
Aug
(4) |
Sep
(3) |
Oct
(42) |
Nov
(1) |
Dec
|
| 2013 |
Jan
|
Feb
|
Mar
(19) |
Apr
(90) |
May
(38) |
Jun
(235) |
Jul
(38) |
Aug
(10) |
Sep
|
Oct
(29) |
Nov
|
Dec
|
| 2014 |
Jan
|
Feb
|
Mar
|
Apr
(6) |
May
(52) |
Jun
|
Jul
(7) |
Aug
|
Sep
(17) |
Oct
|
Nov
|
Dec
|
|
From: OryNider <ory...@us...> - 2008-03-08 20:09:10
|
Update of /cvsroot/mxbb/mx_music/language/lang_romanian In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv6081/language/lang_romanian Modified Files: lang_admin.php Added Files: lang_main.php Log Message: --- NEW FILE: lang_main.php --- <?php /** * * @package mxBB Portal Module - mx_music * @version $Id: lang_main.php,v 1.1 2008/03/08 20:08:27 orynider Exp $ * @copyright (c) 2003 [ory...@rd..., OryNider] mxBB Development Team * @license http://opensource.org/licenses/gpl-license.php GNU General Public License v2 * */ /* Translation: Românã (Romanian) Rev date: September 02, 2006 Copyright: (C) 2006 Romanian phpBB online community - http://www.phpbb.ro/ Translator: Aliniuz < al...@ya... > */ // // Music Online // $lang['Music'] = 'Media Center'; // // Music Index // $lang['Music_Online'] = 'Muzicã'; $lang['Songs'] = 'Melodii'; $lang['Cat_Views'] = 'Board Views'; $lang['Last_Song'] = 'Ultima melodie'; $lang['Public_Categories'] = 'Categorii publice'; $lang['Music_sub_categories'] = 'Sub-categorii'; $lang['No_Songs'] = 'Nici o melodie'; $lang['Top_Songs'] = 'Top melodii'; $lang['Recent_Songs'] = 'Melodii recente'; $lang['Song_Limit'] = 'Limitã de melodii'; $lang['Nav_Separator'] = ' » '; $lang['View'] = 'Ascultã'; $lang['Singer'] = 'Solist'; // // Category View // $lang['Category_not_exist'] = 'Aceastã categorie nu existã'; $lang['Upload_Song'] = 'Uploadeazã melodie'; $lang['Song_Title'] = 'Numele melodiei'; $lang['Pic_Title'] = 'Numele imaginii'; $lang['Category_pics'] = 'Vezi Imaginile din categorie'; $lang['Images'] = 'Imagini'; $lang['Category_songs'] = 'Vezi Videos ºi Media din categorie'; $lang['Media'] = 'Media'; $lang['Edit_song'] = 'Editeazã'; $lang['Delete_song'] = 'ªterge'; $lang['Rating'] = 'Rating'; $lang['Comments'] = 'Comentarii'; $lang['Download'] = 'Download'; $lang['New_Comment'] = 'Comentariu nou'; $lang['Not_rated'] = '<i>nu este votat</i>'; // // Upload // $lang['Song_url'] = 'Adresa catre melodie'; $lang['Song_Desc'] = 'Versurile cântecului'; $lang['Plain_text_only'] = 'Numai text plan'; $lang['Max_length'] = 'Dimensiunea maximã (bytes)'; $lang['Upload_song_from_machine'] = 'Uploadeazã melodie din PC-ul tãu'; $lang['Upload_to_Category'] = 'Uploadeazã cãtre categorie'; $lang['Upload_no_title'] = 'Ai uitat sa precizezi numele melodiei'; $lang['Upload_no_file'] = 'Trebuie sa precizati calea cãtre melodie'; $lang['Upload_both_file'] = 'Puteþi alege doar o singura cale: Upload sau Adresa cãtre melodie'; $lang['Desc_too_long'] = 'Versurile melodiei depãseste numarul maxim de caractere'; $lang['Max_file_size'] = 'Dimensiunea maximã a unei melodii (bytes)'; $lang['Allowed_file'] = 'Aceste fiºiere sunt permise'; $lang['Music_reached_quota'] = 'Aceastã categorie a atins numãrul maxim de melodii. Acum nu mai poþi uploada melodii. Contacteazã administratorii pentru mai multe informaþii'; $lang['User_reached_songs_quota'] = 'Ai atins numãrul maxim de melodii pe care le poþi uploada. Acum nu mai poþi uploada melodii. Contacteazã administratorii pentru mai multe informaþii'; $lang['Bad_upload_file_size'] = 'Melodia uploadatã de tine este coruptã sau depãseste dimensiunea maxima'; $lang['Not_allowed_file_type'] = 'Extensia fiºierului tãu nu e permisã'; $lang['Missed_song_title'] = 'Nu ai precizat numele melodiei'; $lang['Missed_song_url'] = 'Nu ai precizat adresa cãtre melodie'; $lang['Music_upload_successful'] = 'Melodia ta a fost uploadatã cu succes'; $lang['Music_upload_need_approval'] = 'Melodia ta a fost uploadatã cu succes.<br /><br />Dar facilitatea Aprobarea Melodiei este activatã, aºa cã trebuie ca melodia ta sa fie aprobatã de un administrator sau de un moderator înainte de a fi postatã'; $lang['Click_return_category'] = 'Click %saici%s pentru a te întoarce la categorie'; $lang['Click_return_music_index'] = 'Click %saici%s pentru a te întoarce la Pagina de Muzicã Online'; // View song $lang['Song_not_exist'] = 'Aceastã melodie nu existã'; // Edit song $lang['Edit_Song_Info'] = 'Editeazã informaþiile melodiei'; $lang['Songs_updated_successfully'] = 'Informaþiile melodiei au fost actualizate cu succes'; // Delete song $lang['Music_delete_confirm'] = 'Eºti sigur cã vrei sã ºtergi aceasta(aceste) melodie(melodii)?'; $lang['Songs_deleted_successfully'] = 'Aceasta(aceste) melodie(melodii) a(au) fost ºterse cu succes'; // // ModCP // $lang['Approval'] = 'Aprobare'; $lang['Approve'] = 'Aprobã'; $lang['Unapprove'] = 'Dezaprobã'; $lang['Status'] = 'Statut'; $lang['Locked'] = 'Închis'; $lang['Not_approved'] = 'Nu este aprobat'; $lang['Approved'] = 'Aprobat'; $lang['Move_to_Category'] = 'Mutã la Categorie'; $lang['Songs_moved_successfully'] = 'Melodiile tale au fost mutate cu succes'; $lang['Songs_locked_successfully'] = 'Melodiile tale au fost închise cu succes'; $lang['Songs_unlocked_successfully'] = 'Melodiile tale au fost deschise cu succes'; $lang['Songs_approved_successfully'] = 'Melodiile tale au fost aprobate cu succes'; $lang['Songs_unapproved_successfully'] = 'Melodiile tale au fost dezaprobate cu succes'; // // Rate // $lang['Current_Rating'] = 'Nota curentã'; $lang['Please_Rate_It'] = 'Voteazã'; $lang['Already_rated'] = 'Ai votat deja aceastã melodie'; $lang['Music_rate_successfully'] = 'Melodia ta a fost votatã cu succes'; // // Comment // $lang['Comment_no_text'] = 'Scrie comentariul'; $lang['Comment_too_long'] = 'Comentariul tãu e prea lung'; $lang['Comment_delete_confirm'] = 'Eºti sigur cã vrei sã ºtergi acest comentariu?'; $lang['Song_Locked'] = 'Scuze, aceastã melodie a fost închisã. Deci nu mai puteþi posta comentarii'; // // Song Image // $lang['Song_image'] = 'Song Image'; $lang['Song_image_desc'] = 'The Image of this song<br />(such as CD Cover, Artist Photo...)'; $lang['No_image'] = 'No Image'; $lang['Upload_image'] = 'Upload Image from your PC'; $lang['Not_allowed_image_type'] = 'Your uploaded image type is not allowed'; $lang['Bad_upload_image_size'] = 'Bad upload image size'; $lang['Upload_image_size_too_big'] = 'Your uploaded image size is too big'; // // Search Song // $lang['Search_song'] = 'Cautã melodii'; // auth_key $lang['Music_view_can'] = '<b>Poþi</b> vizualiza melodii în aceastã categorie'; $lang['Music_view_cannot'] = '<b>Nu poþi</b> vizualiza melodii în aceastã categorie'; $lang['Music_upload_can'] = '<b>Poþi</b> uploada noi melodii în aceastã categorie'; $lang['Music_upload_cannot'] = '<b>Nu poþi</b> uploada noi melodii în aceastã categorie'; $lang['Music_download_can'] = '<b>Poþi</b> downloada melodii în aceastã categorie'; $lang['Music_download_cannot'] = '<b>Nu poþi</b> downloada melodii în aceastã categorie'; $lang['Music_rate_can'] = '<b>Poþi</b> vota melodii în aceastã categorie'; $lang['Music_rate_cannot'] = '<b>Nu poþi</b> vota melodii în aceastã categorie'; $lang['Music_comment_can'] = '<b>Poþi</b> adãuga comentarii melodiilor din aceastã categorie'; $lang['Music_comment_cannot'] = '<b>Nu poþi</b> adãuga comentarii melodiilor din aceastã categorie'; $lang['Music_edit_can'] = '<b>Poþi</b> edita melodiile tale ºi comentariile acestora din aceastã categorie'; $lang['Music_edit_cannot'] = '<b>Nu poþi</b> edita melodiile tale ºi comentariile acestora din aceastã categorie'; $lang['Music_delete_can'] = '<b>Poþi</b> ºterge melodiile tale ºi comentariile acestora din aceastã categorie'; $lang['Music_delete_cannot'] = '<b>Nu poþi</b> ºterge melodiile tale ºi comentariile din aceastã categorie'; $lang['Music_moderate_can'] = '<b>Poþi</b> %smodera%s aceastã categorie'; ?> Index: lang_admin.php =================================================================== RCS file: /cvsroot/mxbb/mx_music/language/lang_romanian/lang_admin.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** lang_admin.php 1 Aug 2007 23:34:36 -0000 1.2 --- lang_admin.php 8 Mar 2008 20:08:26 -0000 1.3 *************** *** 18,21 **** --- 18,28 ---- // setlocale(LC_ALL, "en"); + /* + Translation: Românã (Romanian) + Rev date: September 02, 2006 + Copyright: (C) 2006 Romanian phpBB online community - http://www.phpbb.ro/ + Translator: Aliniuz < al...@ya... > + */ + $lang['display_most_posts'] = "Display most posts"; $lang['display_random_posts'] = "Display random posts"; *************** *** 50,53 **** --- 57,156 ---- $lang['override_yes'] = 'Use Block Settings'; $lang['override_no'] = 'Use fixed mappings (see below)'; + + // + // Configuration + // + $lang['Music_config'] = 'Configuraþia Melodiilor'; + $lang['Music_config_explain'] = 'Aici poþi schimba setãrile generale Music Online-ului instalat pe forumul tãu'; + $lang['Music_config_updated'] = 'Configuraþia Melodiilor a fost actualizatã cu succes'; + $lang['Click_return_music_config'] = 'Click %saici%s pentru a te întoarce la Configuraþia Melodiilor'; + $lang['Max_songs'] = 'Numãrul maxim de melodii pentru fiecare categorie (-1 = nelimitat)'; + $lang['User_songs_limit'] = 'Limita de melodii pe fiecare categorie pentru fiecare membru (-1 = nelimitat)'; + $lang['Moderator_songs_limit'] = 'Limita de melodii pe fiecare categorie pentru fiecare moderator (-1 = nelimitat)'; + $lang['Songs_Approval'] = 'Aprobarea melodiilor'; + $lang['Rows_per_page'] = 'Numãrul de rânduri'; + $lang['Cols_per_page'] = 'Numãrul de coloane'; + $lang['Rows_per_page_music_pic_cat'] = 'Numãrul de rânduri în subcategorie virtualã de imagini'; + $lang['Cols_per_page_music_pic_cat'] = 'Numãrul de coloane în subcategorie virtualã de imagini'; + $lang['Rows_per_page_music_media_cat'] = 'Number of rows în subcategorie virtualã media'; + $lang['Cols_per_page_music_media_cat'] = 'Number of columns în subcategorie virtualã media'; + $lang['Top'] = 'Numãrul de melodii pe lista Top Melodii'; + $lang['Song_Desc_Max_Length'] = 'Lungimea maximã a versurilor/comentariilor melodiilor (bytes)'; + $lang['Hotlink_prevent'] = 'Prevenire HotLink'; + $lang['Hotlink_allowed'] = 'Domenii acceptate pentru hotlink (separate printr-o virgulã)'; + $lang['Rate_system'] = 'Activare sistemul de votare'; + $lang['Rate_Scale'] =' Scala notelor (pentru rating)'; + $lang['Comment_system'] = 'Activeazã sistemul pentru comentarii'; + $lang['Download_system'] = 'Activeazã sistemul pentru download'; + $lang['Extra_Settings'] = 'Setãri suplimentare'; + $lang['Default_Sort_Method'] = 'Metoda implicitã de sortare'; + $lang['Default_Sort_Order'] = 'Ordinea implicitã de sortare'; + + //Index + $lang['Music_Index_Settings'] = 'Music Index'; + $lang['Show_Index_Subcats'] = 'Aratã subcategorii în index'; + + // + // Categories + // + $lang['Music_Categories_Title'] = 'Configuraþia Categoriilor de Melodii'; + $lang['Music_Categories_Explain'] = 'În aceastã secþiune îþi poþi conduce categoriile: creazã, modificã, ºterge, sorteazã, etc.'; + $lang['Category_Permissions'] = 'Permisiunile Categoriilor'; + $lang['Category_Title'] = 'Titlul Categoriei'; + $lang['Category_Desc'] = 'Descrierea Categoriei'; + $lang['View_level'] = 'Nivelul de vizualizãri'; + $lang['Upload_level'] = 'Nivelul de upload'; + $lang['Rate_level'] = 'Nivelul de votare'; + $lang['Comment_level'] = 'Nivelul de comentarii'; + $lang['Edit_level'] = ' Nivelul de editare'; + $lang['Delete_level'] = 'Nivelul de ºtergere'; + $lang['New_category_created'] = 'Categoria a fost creatã cu succes'; + $lang['Click_return_music_category'] = 'Click %saici%s pentru a te intoarce la Configuraþia Categoriilor de Melodii'; + $lang['Category_updated'] = 'Categoria a fost actualizatã cu succes'; + $lang['Delete_Category'] = 'ºterge categoria'; + $lang['Delete_Category_Explain'] = 'Formularul de mai jos îþi vã permite sã ºtergi o categorie ºi sã decizi unde vrei sã pui melodiile pe care le conþine categoria respectivã'; + $lang['Delete_all_songs'] = 'ºterge toate melodiile'; + $lang['Category_deleted'] = 'Categoria a fost ºtearsã cu succes'; + $lang['Category_changed_order'] = 'Categoria s-a mutat cu succes'; + $lang['Create_music'] = 'Create new music'; + $lang['Create_sub_music'] = 'Create sub-music'; + + // + // Permissions + // + $lang['Music_Auth_Title'] = 'Permisiuni'; + $lang['Music_Auth_Explain'] = 'Aici poþi alege ce grupuri pot deveni moderator pentru fiecare categorie de muzicã sau sã aibã doar acces privat'; + $lang['Select_a_Category'] = 'Selecteazã o categorie'; + $lang['Look_up_Category'] = 'Vezi aceastã categorie'; + $lang['Music_Auth_successfully'] = 'Permisiunile au fost actualizate cu succes'; + $lang['Click_return_music_auth'] = 'Click %saici%s pentru a te intoarce la Permisiuni'; + + $lang['Upload'] = 'Upload'; + $lang['Rate'] = 'Vot'; + $lang['Comment'] = 'Comentariu'; + + //Allowed File Types + $lang['MP3_allowed'] = 'MP3 Acceptatã'; + $lang['WAV_allowed'] = 'WAV Acceptatã'; + $lang['WMA_allowed'] = 'WMA Acceptatã'; + $lang['WMV_allowed'] = 'WMV Acceptatã'; + $lang['MIDI_allowed'] = 'MIDI Acceptatã'; + $lang['RAM_allowed'] = 'RAM Acceptatã'; + $lang['AU_allowed'] = 'AU Acceptatã'; + $lang['MPEG_allowed'] = 'MPEG Acceptatã'; + $lang['AVI_allowed'] = 'AVI Acceptatã'; + $lang['SWF_allowed'] = 'SWF Acceptatã'; + $lang['QT_allowed'] = 'QT Acceptatã'; + $lang['FLV_allowed'] = 'FLV Acceptatã'; + $lang['RM_allowed'] = 'RM Acceptatã'; + $lang['IMG_allowed'] = 'JPG, GIF and PNG Acceptate'; + + // + // Song Image + // + $lang['Max_image_size'] = 'Max song image size (bytes)'; + $lang['Max_image_width'] = 'Max song image width (pixel)'; + $lang['Max_image_height'] = 'Max song image height (pixel)'; + // // That's all Folks! |
|
From: OryNider <ory...@us...> - 2008-03-08 20:09:09
|
Update of /cvsroot/mxbb/mx_music/music_box/includes In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv6081/music_box/includes Modified Files: music_constants.php Log Message: Index: music_constants.php =================================================================== RCS file: /cvsroot/mxbb/mx_music/music_box/includes/music_constants.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** music_constants.php 29 Jan 2008 07:51:05 -0000 1.2 --- music_constants.php 8 Mar 2008 20:08:32 -0000 1.3 *************** *** 61,63 **** --- 61,95 ---- !defined('MUSIC_RATE_TABLE') ? define('MUSIC_RATE_TABLE', $mx_table_prefix.'music_rate') : false; + // ------------------------------------------------------------------------- + // Footer Copyrights + // ------------------------------------------------------------------------- + if ( !MXBB_MODULE || MXBB_27x ) + { + if (!defined( 'IN_ADMIN' )) + { + $mx_user->set_module_cfg_name('music'); + $mx_user->set_module_lang_path($module_root_path . 'music_box/'); + $mx_user->extend(MX_LANG_ALL, MX_IMAGES); + } + } + else + { + if (!$_GET['print']) // Do not "fix" with reuest wrapper!! + { + $mx_user->set_module_default_style('_core'); // For compatibility with core 2.8.x + } + + if (is_object($mx_page)) + { + // ------------------------------------------------------------------------- + // Extend User Style with module lang and images + // Usage: $mx_user->extend(LANG, IMAGES) + // Switches: + // - LANG: MX_LANG_MAIN (default), MX_LANG_ADMIN, MX_LANG_ALL, MX_LANG_NONE + // - IMAGES: MX_IMAGES (default), MX_IMAGES_NONE + // ------------------------------------------------------------------------- + $mx_user->extend(MX_LANG_ALL, MX_IMAGES); + } + } + ?> \ No newline at end of file |
|
From: OryNider <ory...@us...> - 2008-03-08 20:09:09
|
Update of /cvsroot/mxbb/mx_music/language/lang_english In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv6081/language/lang_english Modified Files: lang_admin.php Added Files: lang_main.php Removed Files: lang_admin_music.php lang_main_music.php Log Message: --- lang_main_music.php DELETED --- --- lang_admin_music.php DELETED --- --- NEW FILE: lang_main.php --- <?php /** * * @package mxBB Portal Module - mx_music * @version $Id: lang_main.php,v 1.1 2008/03/08 20:08:00 orynider Exp $ * @copyright (c) 2003 [ory...@rd..., OryNider] mxBB Development Team * @license http://opensource.org/licenses/gpl-license.php GNU General Public License v2 * */ // // Music Online // $lang['Music'] = 'Media Center'; // // Music Index // $lang['Music_Online'] = 'Music Online'; $lang['Songs'] = 'Songs'; $lang['Cat_Views'] = 'Board Views'; $lang['Last_Song'] = 'Last Song'; $lang['Public_Categories'] = 'Public Categories'; $lang['Music_sub_categories'] = 'Sub-categories'; $lang['No_Songs'] = 'No Song'; $lang['Top_Songs'] = 'Top Songs'; $lang['Recent_Songs'] = 'Recent Songs'; $lang['Song_Limit'] = 'Song limit'; $lang['Nav_Separator'] = ' » '; $lang['View'] = 'Listen'; $lang['Singer'] = 'Singer'; // // Category View // $lang['Category_not_exist'] = 'This category does not exist'; $lang['Upload_Song'] = 'Upload Song'; $lang['Song_Title'] = 'Song Title'; $lang['Pic_Title'] = 'Pic Title'; $lang['Category_pics'] = 'Category Images'; $lang['Images'] = 'Images'; $lang['Category_songs'] = 'Category Media'; $lang['Media'] = 'Media'; $lang['Edit_song'] = 'Edit'; $lang['Delete_song'] = 'Del'; $lang['Rating'] = 'Rating'; $lang['Comments'] = 'Comments'; $lang['Download'] = 'Download'; $lang['Listen'] = 'Listen URL'; $lang['New_Comment'] = 'New Comment'; $lang['Not_rated'] = '<i>not rated</i>'; // // Upload // $lang['Song_url'] = 'Song URL'; $lang['Song_Desc'] = 'Song Lyric'; $lang['Plain_text_only'] = 'Plain text only'; $lang['Max_length'] = 'Max length (bytes)'; $lang['Upload_song_from_machine'] = 'Upload song from your PC'; $lang['Upload_to_Category'] = 'Upload to Category'; $lang['Upload_no_title'] = 'You missed the song title'; $lang['Upload_no_file'] = 'You must enter the path of song'; $lang['Upload_both_file'] = 'You can just choose 1 in 2 way Upload or Link URL'; $lang['Desc_too_long'] = 'Song lyric is too long'; $lang['Max_file_size'] = 'Maximum file size (bytes)'; $lang['Allowed_file'] = 'These files are allowed'; $lang['Music_reached_quota'] = 'This category has reached the quota of songs. Now you cannot upload any more. Please contact the administrators for more information'; $lang['User_reached_songs_quota'] = 'You have reached your quota of songs. Now you cannot upload any more. Please contact the administrators for more information'; $lang['Bad_upload_file_size'] = 'Your uploaded file is too large or corrupted'; $lang['Not_allowed_file_type'] = 'Your file type is not allowed'; $lang['Missed_song_title'] = 'You missed the song title'; $lang['Missed_song_url'] = 'You missed the song url'; $lang['Music_upload_successful'] = 'Your song has been uploaded successfully'; $lang['Music_upload_need_approval'] = 'Your song has been uploaded successfully.<br /><br />But the feature Song Approval has been enabled so your song must be approved by a administrator or a moderator before posting'; $lang['Click_return_category'] = 'Click %shere%s to return to the category'; $lang['Click_return_music_index'] = 'Click %shere%s to return to the Music Index'; // View song $lang['Song_not_exist'] = 'This song does not exits'; // Edit song $lang['Edit_Song_Info'] = 'Edit Song infomation'; $lang['Songs_updated_successfully'] = 'Your song information has been updated successfully'; // Delete song $lang['Music_delete_confirm'] = 'Are you sure to delete these song(s)?'; $lang['Songs_deleted_successfully'] = 'These song(s) have been deleted successfully'; // // ModCP // $lang['Approval'] = 'Approval'; $lang['Approve'] = 'Approve'; $lang['Unapprove'] = 'Unapprove'; $lang['Status'] = 'Status'; $lang['Locked'] = 'Locked'; $lang['Not_approved'] = 'Not approved'; $lang['Approved'] = 'Approved'; $lang['Move_to_Category'] = 'Move to Category'; $lang['Songs_moved_successfully'] = 'Your song(s) have been moved successfully'; $lang['Songs_locked_successfully'] = 'Your song(s) have been locked successfully'; $lang['Songs_unlocked_successfully'] = 'Your song(s) have been unlocked successfully'; $lang['Songs_approved_successfully'] = 'Your song(s) have been approved successfully'; $lang['Songs_unapproved_successfully'] = 'Your song(s) have been unapproved successfully'; // // Rate // $lang['Current_Rating'] = 'Current Rating'; $lang['Please_Rate_It'] = 'Please Rate It'; $lang['Already_rated'] = 'You have already rated this song'; $lang['Music_rate_successfully'] = 'Your song has been rated successfully'; // // Comment // $lang['Comment_no_text'] = 'Please enter your comment'; $lang['Comment_too_long'] = 'Your comment is too long'; $lang['Comment_delete_confirm'] = 'Are you sure to delete this comment?'; $lang['Song_Locked'] = 'Sorry, this song was locked. So you cannot post comment for this song anymore'; // // Song Image // $lang['Song_image'] = 'Song Image'; $lang['Song_image_desc'] = 'The Image of this song<br />(such as CD Cover, Artist Photo...)'; $lang['No_image'] = 'No Image'; $lang['Upload_image'] = 'Upload Image from your PC'; $lang['Not_allowed_image_type'] = 'Your uploaded image type is not allowed'; $lang['Bad_upload_image_size'] = 'Bad upload image size'; $lang['Upload_image_size_toobig'] = 'Your uploaded image size is too big'; // // Search Song // $lang['Search_song'] = 'Search song'; // auth_key $lang['Music_view_can'] = 'You <b>can</b> view songs in this category'; $lang['Music_view_cannot'] = 'You <b>cannot</b> view songs in this category'; $lang['Music_download_can'] = 'You <b>can</b> download songs in this category'; $lang['Music_download_cannot'] = 'You <b>cannot</b> download songs in this category'; $lang['Music_upload_can'] = 'You <b>can</b> upload new songs in this category'; $lang['Music_upload_cannot'] = 'You <b>cannot</b> upload new songs in this category'; $lang['Music_rate_can'] = 'You <b>can</b> rate songs in this category'; $lang['Music_rate_cannot'] = 'You <b>cannot</b> rate songs in this category'; $lang['Music_comment_can'] = 'You <b>can</b> post comments to songs in this category'; $lang['Music_comment_cannot'] = 'You <b>cannot</b> post comments to songs in this category'; $lang['Music_edit_can'] = 'You <b>can</b> edit your songs and comments in this category'; $lang['Music_edit_cannot'] = 'You <b>cannot</b> edit your songs and comments in this category'; $lang['Music_delete_can'] = 'You <b>can</b> delete your songs and comments in this category'; $lang['Music_delete_cannot'] = 'You <b>cannot</b> delete your songs and comments in this category'; $lang['Music_moderate_can'] = 'You <b>can</b> %smoderate%s this category'; ?> Index: lang_admin.php =================================================================== RCS file: /cvsroot/mxbb/mx_music/language/lang_english/lang_admin.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** lang_admin.php 1 Aug 2007 23:34:35 -0000 1.2 --- lang_admin.php 8 Mar 2008 20:08:00 -0000 1.3 *************** *** 50,53 **** --- 50,149 ---- $lang['override_yes'] = 'Use Block Settings'; $lang['override_no'] = 'Use fixed mappings (see below)'; + + // + // Configuration + // + $lang['Music_config'] = 'Music Configuration'; + $lang['Music_config_explain'] = 'You can change the general settings of your Music Online here'; + $lang['Music_config_updated'] = 'Music Configuration has been updated successfully'; + $lang['Click_return_music_config'] = 'Click %sHere%s to return to the Music Configuration'; + $lang['Max_songs'] = 'Maximum songs for each Category (-1 = unlimited)'; + $lang['User_songs_limit'] = 'Songs limit per category for each user (-1 = unlimited)'; + $lang['Moderator_songs_limit'] = 'Songs limit per category for each moderator (-1 = unlimited)'; + $lang['Songs_Approval'] = 'Songs Approval'; + $lang['Rows_per_page'] = 'Number of rows'; + $lang['Cols_per_page'] = 'Number of columns'; + $lang['Rows_per_page_music_pic_cat'] = 'Number of rows in virtual images subcategories'; + $lang['Cols_per_page_music_pic_cat'] = 'Number of columns in virtual images subcategories'; + $lang['Rows_per_page_music_media_cat'] = 'Number of rows in virtual media subcategories'; + $lang['Cols_per_page_music_media_cat'] = 'Number of columns in virtual media subcategories'; + $lang['Top'] = 'Number of songs on Top Hit List'; + $lang['Song_Desc_Max_Length'] = 'Song Lyric/Comment Max Length (bytes)'; + $lang['Hotlink_prevent'] = 'Hotlink Prevention'; + $lang['Hotlink_allowed'] = 'Allowed domains for hotlink (separated by a comma)'; + $lang['Rate_system'] = 'Enable rate system'; + $lang['Rate_Scale'] =' Rating Scale'; + $lang['Comment_system'] = 'Enable comment system'; + $lang['Download_system'] = 'Enable download system'; + $lang['Extra_Settings'] = 'Extra Settings'; + $lang['Default_Sort_Method'] = 'Default Sort Method'; + $lang['Default_Sort_Order'] = 'Default Sort Order'; + + //Index + $lang['Music_Index_Settings'] = 'Music Index'; + $lang['Show_Index_Subcats'] = 'Show sub categories in index table'; + + // + // Categories + // + $lang['Music_Categories_Title'] = 'Music Categories Control'; + $lang['Music_Categories_Explain'] = 'On this screen you can manage your categories: create, alter, delete, sort, etc.'; + $lang['Category_Permissions'] = 'Category Permissions'; + $lang['Category_Title'] = 'Category Title'; + $lang['Category_Desc'] = 'Category Description'; + $lang['View_level'] = 'View Level'; + $lang['Upload_level'] = 'Upload Level'; + $lang['Rate_level'] = 'Rate Level'; + $lang['Comment_level'] = 'Comment Level'; + $lang['Edit_level'] = ' Edit Level'; + $lang['Delete_level'] = 'Delete Level'; + $lang['New_category_created'] = 'New category has been created successfully'; + $lang['Click_return_music_category'] = 'Click %sHere%s to return to the Music Categories Manager'; + $lang['Category_updated'] = 'This category has been updated successfully'; + $lang['Delete_Category'] = 'Delete Category'; + $lang['Delete_Category_Explain'] = 'The form below will allow you to delete a category and decide where you want to put songs it contained'; + $lang['Delete_all_songs'] = 'Delete all songs'; + $lang['Category_deleted'] = 'This category has been deleted successfully'; + $lang['Category_changed_order'] = 'This category has been changed order successfully'; + $lang['Create_music'] = 'Create new music'; + $lang['Create_sub_music'] = 'Create sub-music'; + + // + // Permissions + // + $lang['Music_Auth_Title'] = 'Music Permissions'; + $lang['Music_Auth_Explain'] = 'Here you can choose which usergroup(s) can be the moderators for each Music category or just has the private access'; + $lang['Select_a_Category'] = 'Select a Category'; + $lang['Look_up_Category'] = 'Look up Category'; + $lang['Music_Auth_successfully'] = 'Auth has been updated successfully'; + $lang['Click_return_music_auth'] = 'Click %sHere%s to return to the Music Permissions'; + + $lang['Upload'] = 'Upload'; + $lang['Rate'] = 'Rate'; + $lang['Comment'] = 'Comment'; + + //Allowed File Types + $lang['MP3_allowed'] = 'MP3 Allowed'; + $lang['WAV_allowed'] = 'WAV Allowed'; + $lang['WMA_allowed'] = 'WMA Allowed'; + $lang['WMV_allowed'] = 'WMV Allowed'; + $lang['MIDI_allowed'] = 'MIDI Allowed'; + $lang['RAM_allowed'] = 'RAM Allowed'; + $lang['AU_allowed'] = 'AU Allowed'; + $lang['MPEG_allowed'] = 'MPEG Allowed'; + $lang['AVI_allowed'] = 'AVI Allowed'; + $lang['SWF_allowed'] = 'SWF Allowed'; + $lang['QT_allowed'] = 'QT Allowed'; + $lang['FLV_allowed'] = 'FLV Allowed'; + $lang['RM_allowed'] = 'RM Allowed'; + $lang['IMG_allowed'] = 'JPG, GIF and PNG Allowed'; + + // + // Song Image + // + $lang['Max_image_size'] = 'Max song image size (bytes)'; + $lang['Max_image_width'] = 'Max song image width (pixel)'; + $lang['Max_image_height'] = 'Max song image height (pixel)'; + // // That's all Folks! |
|
From: OryNider <ory...@us...> - 2008-03-08 20:08:46
|
Update of /cvsroot/mxbb/mx_music/phpbb2/admin In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv6081/phpbb2/admin Added Files: admin_music_auth.php admin_music_cat.php admin_music_cfg.php Log Message: --- NEW FILE: admin_music_auth.php --- <?php /** * * @package mxBB Portal Module - mx_music * @version $Id: admin_music_auth.php,v 1.2 2008/03/08 20:08:35 orynider Exp $ * @copyright (c) 2003 [ory...@rd..., OryNider] mxBB Development Team * @license http://opensource.org/licenses/gpl-license.php GNU General Public License v2 * */ $phpEx = substr(strrchr(__FILE__, '.'), 1); if ( @file_exists( './../viewtopic.' . $phpEx ) ) // -------------------------------------------- phpBB MOD MODE { define('MXBB_MODULE', false); define('IN_PHPBB', true); $phpbb_root_path = $module_root_path = './../'; $mx_mod_path = $phpbb_root_path . 'mx_mod/'; require_once($mx_mod_path . "includes/functions_required.$phpEx"); @define('IN_PORTAL', true); //Check if forum_hack is installed if (!isset($mx_root_path)) { $mx_root_path = './../'; include_once($mx_mod_path . "includes/mx_constants.$phpEx"); include_once($mx_mod_path . "includes/shared/phpbb2/includes/functions.$phpEx"); } require_once($mx_mod_path . "includes/functions_core.$phpEx"); //Check for cash mod if (file_exists($phpbb_root_path . 'includes/functions_cash.'.$phpEx)) { define('IN_CASHMOD', true); } //@ini_set( 'display_errors', '1' ); error_reporting (E_ERROR | E_WARNING | E_PARSE); // This will NOT report uninitialized variables //error_reporting(E_ALL & ~E_NOTICE); define( 'PAGE_MUSIC', -506 ); // If this id generates a conflict with other mods, change it ;) // // Instatiate the mx_cache class // $mx_cache = new mx_cache(); // // instatiate the mx_request_vars class // $mx_request_vars = new mx_request_vars(); // // instatiate the mx_user class // //$mx_user = new mx_user(); // // Left Pane Paths // $setmodules_admin_path = ''; $setmodules_module_path = "./../"; if (file_exists($phpbb_root_path."modcp.$phpEx")) // phpBB2 { define('PORTAL_BACKEND', 'phpbb2'); $tplEx = 'tpl'; } else if (@file_exists($phpbb_root_path."mcp.$phpEx")) // phpBB3 { define('PORTAL_BACKEND', 'phpbb3'); $tplEx = 'html'; } } else { define( 'IN_PORTAL', 1 ); define( 'MXBB_MODULE', true ); // // Main paths // $mx_root_path = './../../../'; $module_root_path = './../../../modules/mx_music/'; $setmodules_admin_path = 'modules/mx_linkdb/admin/'; define( 'MXBB_27x', file_exists( $mx_root_path . 'mx_login.php' ) ); $phpEx = substr(strrchr(__FILE__, '.'), 1); } if ( !empty( $setmodules ) ) { $file = basename( __FILE__ ); $module['Music_Online']['Permissions'] = $setmodules_admin_path . $file; return; } $music_root_path = $module_root_path . 'music_box/'; // // Get general information // require($mx_root_path . 'admin/pagestart.' . $phpEx); if ( !MXBB_MODULE ) { require_once($mx_mod_path . "includes/functions_styles.$phpEx"); $mx_user = new mx_user(); // instatiate the mx_user class // // Define basic constants // $mx_user->page_id = 506; $mx_user->user_ip = $user_ip; $mx_user->_init_userprefs(); $mx_user->set_module_cfg_name('music'); $mx_user->set_module_lang_path($module_root_path . 'music_box/'); $mx_user->extend(); // Read language definition } require($music_root_path . 'music_common.'.$phpEx); // ********************************************************************** // Read language definition // ********************************************************************** if ( !MXBB_MODULE ) { if ( !file_exists( $module_root_path . 'music_box/language/lang_' . $board_config['default_lang'] . '/lang_admin.' . $phpEx ) ) { include( $module_root_path . 'music_box/language/lang_english/lang_admin.' . $phpEx ); } else { include( $module_root_path . 'music_box/language/lang_' . $board_config['default_lang'] . '/lang_admin.' . $phpEx ); } } else { if ( file_exists( $module_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_admin.' . $phpEx ) ) { include( $module_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_admin.' . $phpEx ); } else if ( file_exists( $module_root_path . 'language/lang_english/lang_admin.' . $phpEx ) ) { include( $module_root_path . 'language/lang_english/lang_admin.' . $phpEx ); } } if( !isset($HTTP_POST_VARS['submit']) ) { // Build the category selector $sql = "SELECT cat_id, cat_title, cat_order FROM ". MUSIC_CAT_TABLE ." ORDER BY cat_order ASC"; if( !$result = $db->sql_query($sql) ) { message_die(GENERAL_ERROR, 'Could not get Category list', '', __LINE__, __FILE__, $sql); } while( $row = $db->sql_fetchrow($result) ) { $catrows[] = $row; } for ($i = 0; $i < count($catrows); $i++) { $template->assign_block_vars('catrow', array( 'CAT_ID' => $catrows[$i]['cat_id'], 'CAT_TITLE' => $catrows[$i]['cat_title']) ); } $template->set_filenames(array( 'body' => 'admin/music_cat_select_body.tpl') ); $template->assign_vars(array( 'L_MUSIC_AUTH_TITLE' => $lang['Music_Auth_Title'], 'L_MUSIC_AUTH_EXPLAIN' => $lang['Music_Auth_Explain'], 'L_SELECT_CAT' => $lang['Select_a_Category'], 'S_MUSIC_ACTION' => append_sid("admin_music_auth.$phpEx"), 'L_LOOK_UP_CAT' => $lang['Look_up_Category']) ); $template->pparse('body'); include($mx_root_path . 'admin/page_footer_admin.'.$phpEx); } else { if( !isset($HTTP_GET_VARS['cat_id']) ) { $cat_id = intval($HTTP_POST_VARS['cat_id']); $template->set_filenames(array( 'body' => 'admin/music_auth_body.tpl') ); $template->assign_vars(array( 'L_MUSIC_AUTH_TITLE' => $lang['Music_Auth_Title'], 'L_MUSIC_AUTH_EXPLAIN' => $lang['Music_Auth_Explain'], 'L_SUBMIT' => $lang['Submit'], 'L_RESET' => $lang['Reset'], 'L_GROUPS' => $lang['Usergroups'], 'L_VIEW' => $lang['View'], 'L_UPLOAD' => $lang['Upload'], 'L_RATE' => $lang['Rate'], 'L_COMMENT' => $lang['Comment'], 'L_EDIT' => $lang['Edit'], 'L_DELETE' => $lang['Delete'], 'L_IS_MODERATOR' => $lang['Is_Moderator'], 'S_MUSIC_ACTION' => append_sid("admin_music_auth.$phpEx?cat_id=$cat_id"), ) ); // Get the list of phpBB usergroups $sql = "SELECT group_id, group_name FROM " . GROUPS_TABLE . " WHERE group_single_user <> " . TRUE ." ORDER BY group_name ASC"; if ( !($result = $db->sql_query($sql)) ) { message_die(GENERAL_ERROR, 'Could not get group list', '', __LINE__, __FILE__, $sql); } while( $row = $db->sql_fetchrow($result) ) { $groupdata[] = $row; } // Get info of this cat $sql = "SELECT cat_id, cat_title, cat_view_groups, cat_upload_groups, cat_rate_groups, cat_comment_groups, cat_edit_groups, cat_delete_groups, cat_moderator_groups FROM ". MUSIC_CAT_TABLE ." WHERE cat_id = '$cat_id'"; if( !$result = $db->sql_query($sql) ) { message_die(GENERAL_ERROR, 'Could not get Category information', '', __LINE__, __FILE__, $sql); } $thiscat = $db->sql_fetchrow($result); $view_groups = @explode(',', $thiscat['cat_view_groups']); $upload_groups = @explode(',', $thiscat['cat_upload_groups']); $rate_groups = @explode(',', $thiscat['cat_rate_groups']); $comment_groups = @explode(',', $thiscat['cat_comment_groups']); $edit_groups = @explode(',', $thiscat['cat_edit_groups']); $delete_groups = @explode(',', $thiscat['cat_delete_groups']); $moderator_groups = @explode(',', $thiscat['cat_moderator_groups']); for ($i = 0; $i < count($groupdata); $i++) { $template->assign_block_vars('grouprow', array( 'GROUP_ID' => $groupdata[$i]['group_id'], 'GROUP_NAME' => $groupdata[$i]['group_name'], 'VIEW_CHECKED' => (in_array($groupdata[$i]['group_id'], $view_groups)) ? 'checked="checked"' : '', 'UPLOAD_CHECKED' => (in_array($groupdata[$i]['group_id'], $upload_groups)) ? 'checked="checked"' : '', 'RATE_CHECKED' => (in_array($groupdata[$i]['group_id'], $rate_groups)) ? 'checked="checked"' : '', 'COMMENT_CHECKED' => (in_array($groupdata[$i]['group_id'], $comment_groups)) ? 'checked="checked"' : '', 'EDIT_CHECKED' => (in_array($groupdata[$i]['group_id'], $edit_groups)) ? 'checked="checked"' : '', 'DELETE_CHECKED' => (in_array($groupdata[$i]['group_id'], $delete_groups)) ? 'checked="checked"' : '', 'MODERATOR_CHECKED' => (in_array($groupdata[$i]['group_id'], $moderator_groups)) ? 'checked="checked"' : '') ); } $template->pparse('body'); include($mx_root_path . 'admin/page_footer_admin.'.$phpEx); } else { $cat_id = intval($HTTP_GET_VARS['cat_id']); $view_groups = @implode(',', $HTTP_POST_VARS['view']); $upload_groups = @implode(',', $HTTP_POST_VARS['upload']); $rate_groups = @implode(',', $HTTP_POST_VARS['rate']); $comment_groups = @implode(',', $HTTP_POST_VARS['comment']); $edit_groups = @implode(',', $HTTP_POST_VARS['edit']); $delete_groups = @implode(',', $HTTP_POST_VARS['delete']); $moderator_groups = @implode(',', $HTTP_POST_VARS['moderator']); $sql = "UPDATE ". MUSIC_CAT_TABLE ." SET cat_view_groups = '$view_groups', cat_upload_groups = '$upload_groups', cat_rate_groups = '$rate_groups', cat_comment_groups = '$comment_groups', cat_edit_groups = '$edit_groups', cat_delete_groups = '$delete_groups', cat_moderator_groups = '$moderator_groups' WHERE cat_id = '$cat_id'"; if ( !$result = $db->sql_query($sql) ) { message_die(GENERAL_ERROR, 'Could not update music config table', '', __LINE__, __FILE__, $sql); } // okay, return a message... $message = $lang['Music_Auth_successfully'] . '<br /><br />' . sprintf($lang['Click_return_music_auth'], '<a href="' . append_sid("admin_music_auth.$phpEx") . '">', '</a>') . '<br /><br />' . sprintf($lang['Click_return_admin_index'], '<a href="' . append_sid("index.$phpEx?pane=right") . '">', '</a>'); message_die(GENERAL_MESSAGE, $message); } } /* Powered by Music Online 2.0 (c) 2003 Cf Manager */ ?> --- NEW FILE: admin_music_cat.php --- <?php /** * * @package mxBB Portal Module - mx_music * @version $Id: admin_music_cat.php,v 1.2 2008/03/08 20:08:36 orynider Exp $ * @copyright (c) 2003 [ory...@rd..., OryNider] mxBB Development Team * @license http://opensource.org/licenses/gpl-license.php GNU General Public License v2 * */ $phpEx = substr(strrchr(__FILE__, '.'), 1); if ( @file_exists( './../viewtopic.' . $phpEx ) ) // -------------------------------------------- phpBB MOD MODE { define('MXBB_MODULE', false); define('IN_PHPBB', true); $phpbb_root_path = $module_root_path = './../'; $mx_mod_path = $phpbb_root_path . 'mx_mod/'; require_once($mx_mod_path . "includes/functions_required.$phpEx"); @define('IN_PORTAL', true); //Check if forum_hack is installed if (!isset($mx_root_path)) { $mx_root_path = './../'; include_once($mx_mod_path . "includes/mx_constants.$phpEx"); include_once($mx_mod_path . "includes/shared/phpbb2/includes/functions.$phpEx"); } require_once($mx_mod_path . "includes/functions_core.$phpEx"); //Check for cash mod if (file_exists($phpbb_root_path . 'includes/functions_cash.'.$phpEx)) { define('IN_CASHMOD', true); } //@ini_set( 'display_errors', '1' ); error_reporting (E_ERROR | E_WARNING | E_PARSE); // This will NOT report uninitialized variables //error_reporting(E_ALL & ~E_NOTICE); define( 'PAGE_KB', -502 ); // If this id generates a conflict with other mods, change it ;) // // Instatiate the mx_cache class // $mx_cache = new mx_cache(); // // instatiate the mx_request_vars class // $mx_request_vars = new mx_request_vars(); // // instatiate the mx_user class // //$mx_user = new mx_user(); // // Left Pane Paths // $setmodules_admin_path = ''; $setmodules_module_path = "./../"; if (file_exists($phpbb_root_path."modcp.$phpEx")) // phpBB2 { define('PORTAL_BACKEND', 'phpbb2'); $tplEx = 'tpl'; } else if (@file_exists($phpbb_root_path."mcp.$phpEx")) // phpBB3 { define('PORTAL_BACKEND', 'phpbb3'); $tplEx = 'html'; } } else { define( 'IN_PORTAL', 1 ); define( 'MXBB_MODULE', true ); // // Main paths // $mx_root_path = './../../../'; $module_root_path = './../../../modules/mx_music/'; $setmodules_admin_path = 'modules/mx_linkdb/admin/'; define( 'MXBB_27x', file_exists( $mx_root_path . 'mx_login.php' ) ); $phpEx = substr(strrchr(__FILE__, '.'), 1); } if ( !empty( $setmodules ) ) { $file = basename( __FILE__ ); $module['Music_Online']['Categories'] = $setmodules_admin_path . $file; return; } $music_root_path = $module_root_path . 'music_box/'; // // Get general information // require($mx_root_path . 'admin/pagestart.' . $phpEx); if ( !MXBB_MODULE ) { require_once($mx_mod_path . "includes/functions_styles.$phpEx"); $mx_user = new mx_user(); // instatiate the mx_user class // // Define basic constants // $mx_user->page_id = 1; $mx_user->user_ip = $user_ip; $mx_user->_init_userprefs(); } require($music_root_path . 'music_common.'.$phpEx); // ********************************************************************** // Read language definition // ********************************************************************** if ( !MXBB_MODULE ) { if ( !file_exists( $module_root_path . 'music_box/language/lang_' . $board_config['default_lang'] . '/lang_admin.' . $phpEx ) ) { include( $module_root_path . 'music_box/language/lang_english/lang_admin.' . $phpEx ); } else { include( $module_root_path . 'music_box/language/lang_' . $board_config['default_lang'] . '/lang_admin.' . $phpEx ); } } else { if ( file_exists( $module_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_admin.' . $phpEx ) ) { include( $module_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_admin.' . $phpEx ); } else if ( file_exists( $module_root_path . 'language/lang_english/lang_admin.' . $phpEx ) ) { include( $module_root_path . 'language/lang_english/lang_admin.' . $phpEx ); } } // -------------------------- // This function will sort the order of all categories // function mx_music_reorder_cat() { global $db; $sql = "SELECT cat_id, cat_order FROM ". MUSIC_CAT_TABLE ." WHERE cat_id <> 0 ORDER BY cat_order ASC"; if( !$result = $db->sql_query($sql) ) { message_die(GENERAL_ERROR, 'Could not get list of Categories', '', __LINE__, __FILE__, $sql); } $i = 10; while( $row = $db->sql_fetchrow($result) ) { $sql = "UPDATE ". MUSIC_CAT_TABLE ." SET cat_order = $i WHERE cat_id = ". $row['cat_id']; if( !$db->sql_query($sql) ) { message_die(GENERAL_ERROR, 'Could not update order fields', '', __LINE__, __FILE__, $sql); } $i += 10; } } // END // -------------------------- if( !isset($HTTP_POST_VARS['mode']) ) { if( !isset($HTTP_GET_VARS['action']) ) { $template->set_filenames(array( 'body' => 'admin/music_cat_body.tpl') ); $template->assign_vars(array( 'L_MUSIC_CAT_TITLE' => $lang['Music_Categories_Title'], 'L_MUSIC_CAT_EXPLAIN' => $lang['Music_Categories_Explain'], 'S_MUSIC_ACTION' => append_sid("admin_music_cat.$phpEx"), 'L_MOVE_UP' => $lang['Move_up'], 'L_MOVE_DOWN' => $lang['Move_down'], 'L_EDIT' => $lang['Edit'], 'L_DELETE' => $lang['Delete'], 'S_MODE' => 'new', 'L_CREATE_MUSIC' => $lang['Create_music'], 'L_CREATE_CATEGORY' => $lang['Create_category']) ); $sql = "SELECT * FROM ". MUSIC_CAT_TABLE ." WHERE cat_parent = 0 ORDER BY cat_order ASC"; if(!$result = $db->sql_query($sql)) { message_die(GENERAL_ERROR, 'Could not query music Categories information', '', __LINE__, __FILE__, $sql); } while ($row = $db->sql_fetchrow($result)) { $catrow[] = $row; } for( $i = 0; $i < count($catrow); $i++ ) { if ($catrow[$i]['cat_type'] != 0) { $colspan = 1; $add_sc = "<td class=\"" . (($i % 2) ? 'row1' : 'row2') . "\" align=\"center\">" . "<form action=\"" . append_sid("admin_music_cat.$phpEx") . "\" method=\"post\"><input type=\"hidden\" value=\"new\" name=\"mode\" /><input type=\"hidden\" value=\"" . $catrow[$i]['cat_id'] . "\" name=\"cat_parent\"><input name=\"submit\" type=\"submit\" value=\"" . $lang['Create_sub_music'] . "\" class=\"liteoption\">" . "</form></td>"; } else { $colspan = 2; $add_sc = ""; } $template->assign_block_vars('catrow', array( 'COLOR' => ($i % 2) ? 'row1' : 'row2', 'TITLE' => $catrow[$i]['cat_title'], 'DESC' => $catrow[$i]['cat_desc'], 'COLSPAN' => $colspan, 'ADD_SC' => $add_sc, 'S_MOVE_UP' => append_sid("admin_music_cat.$phpEx?action=move&move=-15&cat_id=" . $catrow[$i]['cat_id']), 'S_MOVE_DOWN' => append_sid("admin_music_cat.$phpEx?action=move&move=15&cat_id=" . $catrow[$i]['cat_id']), 'S_EDIT_ACTION' => append_sid("admin_music_cat.$phpEx?action=edit&cat_id=" . $catrow[$i]['cat_id']), 'S_DELETE_ACTION' => append_sid("admin_music_cat.$phpEx?action=delete&cat_id=" . $catrow[$i]['cat_id']) ) ); if ($catrow[$i]['cat_type'] != 0) { // this is a parent category $sc_sql = "SELECT * FROM ". MUSIC_CAT_TABLE ." WHERE cat_parent = " . $catrow[$i]['cat_id'] . " GROUP BY cat_id ORDER BY cat_order ASC"; if ( !($sc_result = $db->sql_query($sc_sql)) ) { mx_message_die(GENERAL_ERROR, 'Could not query sub categories', '', __LINE__, __FILE__, $sc_sql); } while ($subcatrow = $db->sql_fetchrow($sc_result)) { $template->assign_block_vars('catrow', array( 'COLSPAN' => 2, 'ADD_SC' => '', 'COLOR' => ($i % 2) ? 'row1' : 'row2', 'TITLE' => " " . $subcatrow['cat_title'], 'DESC' => " " . preg_replace("#\n#", "<br> ", $subcatrow['cat_desc']), 'S_MOVE_UP' => append_sid("admin_music_cat.$phpEx?action=move&move=-15&cat_parent=" . $catrow[$i]['cat_id'] . "&cat_id=" . $subcatrow['cat_id']), 'S_MOVE_UP' => append_sid("admin_music_cat.$phpEx?action=move&move=15&cat_parent=" . $catrow[$i]['cat_id'] . "&cat_id=" . $subcatrow['cat_id']), 'S_EDIT_ACTION' => append_sid("admin_music_cat.$phpEx?action=edit&cat_id=" . $subcatrow['cat_id']), 'S_DELETE_ACTION' => append_sid("admin_music_cat.$phpEx?action=delete&cat_id=" . $subcatrow['cat_id']) )); } } } $template->pparse('body'); include($mx_root_path . 'admin/page_footer_admin.'.$phpEx); } else { if( $HTTP_GET_VARS['action'] == 'edit' ) { $cat_id = intval($HTTP_GET_VARS['cat_id']); $sql = "SELECT * FROM ". MUSIC_CAT_TABLE ." WHERE cat_id = '$cat_id'"; if(!$result = $db->sql_query($sql)) { message_die(GENERAL_ERROR, 'Could not query music Categories information', '', __LINE__, __FILE__, $sql); } if( $db->sql_numrows($result) == 0 ) { message_die(GENERAL_ERROR, 'The requested category is not existed'); } $catrow = $db->sql_fetchrow($result); $template->set_filenames(array( 'body' => 'admin/music_cat_new_body.tpl') ); $template->assign_vars(array( 'L_MUSIC_CAT_TITLE' => $lang['Music_Categories_Title'], 'L_MUSIC_CAT_EXPLAIN' => $lang['Music_Categories_Explain'], 'S_MUSIC_ACTION' => append_sid("admin_music_cat.$phpEx?cat_id=$cat_id"), 'L_CAT_TITLE' => $lang['Category_Title'], 'L_CAT_DESC' => $lang['Category_Desc'], 'L_CAT_PERMISSIONS' => $lang['Category_Permissions'], 'L_VIEW_LEVEL' => $lang['View_level'], 'L_UPLOAD_LEVEL' => $lang['Upload_level'], 'L_RATE_LEVEL' => $lang['Rate_level'], 'L_COMMENT_LEVEL' => $lang['Comment_level'], 'L_EDIT_LEVEL' => $lang['Edit_level'], 'L_DELETE_LEVEL' => $lang['Delete_level'], 'L_SONGS_APPROVAL' => $lang['Songs_Approval'], 'L_GUEST' => $lang['Forum_ALL'], 'L_REG' => $lang['Forum_REG'], 'L_PRIVATE' => $lang['Forum_PRIVATE'], 'L_MOD' => $lang['Forum_MOD'], 'L_ADMIN' => $lang['Forum_ADMIN'], 'L_DISABLED' => $lang['Disabled'], 'S_CAT_TITLE' => $catrow['cat_title'], 'S_CAT_DESC' => $catrow['cat_desc'], 'VIEW_GUEST' => ($catrow['cat_view_level'] == MUSIC_GUEST) ? 'selected="selected"' : '', 'VIEW_REG' => ($catrow['cat_view_level'] == MUSIC_USER) ? 'selected="selected"' : '', 'VIEW_PRIVATE' => ($catrow['cat_view_level'] == MUSIC_PRIVATE) ? 'selected="selected"' : '', 'VIEW_MOD' => ($catrow['cat_view_level'] == MUSIC_MOD) ? 'selected="selected"' : '', 'VIEW_ADMIN' => ($catrow['cat_view_level'] == MUSIC_ADMIN) ? 'selected="selected"' : '', 'UPLOAD_GUEST' => ($catrow['cat_upload_level'] == MUSIC_GUEST) ? 'selected="selected"' : '', 'UPLOAD_REG' => ($catrow['cat_upload_level'] == MUSIC_USER) ? 'selected="selected"' : '', 'UPLOAD_PRIVATE' => ($catrow['cat_upload_level'] == MUSIC_PRIVATE) ? 'selected="selected"' : '', 'UPLOAD_MOD' => ($catrow['cat_upload_level'] == MUSIC_MOD) ? 'selected="selected"' : '', 'UPLOAD_ADMIN' => ($catrow['cat_upload_level'] == MUSIC_ADMIN) ? 'selected="selected"' : '', 'RATE_GUEST' => ($catrow['cat_rate_level'] == MUSIC_GUEST) ? 'selected="selected"' : '', 'RATE_REG' => ($catrow['cat_rate_level'] == MUSIC_USER) ? 'selected="selected"' : '', 'RATE_PRIVATE' => ($catrow['cat_rate_level'] == MUSIC_PRIVATE) ? 'selected="selected"' : '', 'RATE_MOD' => ($catrow['cat_rate_level'] == MUSIC_MOD) ? 'selected="selected"' : '', 'RATE_ADMIN' => ($catrow['cat_rate_level'] == MUSIC_ADMIN) ? 'selected="selected"' : '', 'COMMENT_GUEST' => ($catrow['cat_comment_level'] == MUSIC_GUEST) ? 'selected="selected"' : '', 'COMMENT_REG' => ($catrow['cat_comment_level'] == MUSIC_USER) ? 'selected="selected"' : '', 'COMMENT_PRIVATE' => ($catrow['cat_comment_level'] == MUSIC_PRIVATE) ? 'selected="selected"' : '', 'COMMENT_MOD' => ($catrow['cat_comment_level'] == MUSIC_MOD) ? 'selected="selected"' : '', 'COMMENT_ADMIN' => ($catrow['cat_comment_level'] == MUSIC_ADMIN) ? 'selected="selected"' : '', 'EDIT_REG' => ($catrow['cat_edit_level'] == MUSIC_USER) ? 'selected="selected"' : '', 'EDIT_PRIVATE' => ($catrow['cat_edit_level'] == MUSIC_PRIVATE) ? 'selected="selected"' : '', 'EDIT_MOD' => ($catrow['cat_edit_level'] == MUSIC_MOD) ? 'selected="selected"' : '', 'EDIT_ADMIN' => ($catrow['cat_edit_level'] == MUSIC_ADMIN) ? 'selected="selected"' : '', 'DELETE_REG' => ($catrow['cat_delete_level'] == MUSIC_USER) ? 'selected="selected"' : '', 'DELETE_PRIVATE' => ($catrow['cat_delete_level'] == MUSIC_PRIVATE) ? 'selected="selected"' : '', 'DELETE_MOD' => ($catrow['cat_delete_level'] == MUSIC_MOD) ? 'selected="selected"' : '', 'DELETE_ADMIN' => ($catrow['cat_delete_level'] == MUSIC_ADMIN) ? 'selected="selected"' : '', 'APPROVAL_DISABLED' => ($catrow['cat_approval'] == MUSIC_USER) ? 'selected="selected"' : '', 'APPROVAL_MOD' => ($catrow['cat_approval'] == MUSIC_MOD) ? 'selected="selected"' : '', 'APPROVAL_ADMIN' => ($catrow['cat_approval'] == MUSIC_ADMIN) ? 'selected="selected"' : '', 'S_MODE' => 'edit', 'S_GUEST' => MUSIC_GUEST, 'S_USER' => MUSIC_USER, 'S_PRIVATE' => MUSIC_PRIVATE, 'S_MOD' => MUSIC_MOD, 'S_ADMIN' => MUSIC_ADMIN, 'L_PANEL_TITLE' => $lang['Edit_Category']) ); $template->pparse('body'); include($mx_root_path . 'admin/page_footer_admin.'.$phpEx); } else if( $HTTP_GET_VARS['action'] == 'delete' ) { $cat_id = intval($HTTP_GET_VARS['cat_id']); $sql = "SELECT cat_id, cat_title, cat_order FROM ". MUSIC_CAT_TABLE ." ORDER BY cat_order ASC"; if(!$result = $db->sql_query($sql)) { message_die(GENERAL_ERROR, 'Could not query music Categories information', '', __LINE__, __FILE__, $sql); } $cat_found = FALSE; while( $row = $db->sql_fetchrow($result) ) { if( $row['cat_id'] == $cat_id ) { $thiscat = $row; $cat_found = TRUE; } else { $catrow[] = $row; } } if( $cat_found == FALSE ) { message_die(GENERAL_ERROR, 'The requested category is not existed'); } $select_to = '<select name="target"><option value="0">'. $lang['Delete_all_songs'] .'</option>'; for ($i = 0; $i < count($catrow); $i++) { $select_to .= '<option value="'. $catrow[$i]['cat_id'] .'">'. $catrow[$i]['cat_title'] .'</option>'; } $select_to .= '</select>'; $template->set_filenames(array( 'body' => 'admin/music_cat_delete_body.tpl') ); $template->assign_vars(array( 'S_MUSIC_ACTION' => append_sid("admin_music_cat.$phpEx?cat_id=$cat_id"), 'L_CAT_DELETE' => $lang['Delete_Category'], 'L_CAT_DELETE_EXPLAIN' => $lang['Delete_Category_Explain'], 'L_CAT_TITLE' => $lang['Category_Title'], 'S_CAT_TITLE' => $thiscat['cat_title'], 'L_MOVE_CONTENTS' => $lang['Move_contents'], 'L_MOVE_DELETE' => $lang['Move_and_Delete'], 'S_SELECT_TO' => $select_to) ); $template->pparse('body'); include($mx_root_path . 'admin/page_footer_admin.'.$phpEx); } else if( $HTTP_GET_VARS['action'] == 'move' ) { $cat_id = intval($HTTP_GET_VARS['cat_id']); $move = intval($HTTP_GET_VARS['move']); $sql = "UPDATE ". MUSIC_CAT_TABLE ." SET cat_order = cat_order + $move WHERE cat_id = $cat_id"; if( !$result = $db->sql_query($sql) ) { message_die(GENERAL_ERROR, 'Could not change category order', '', __LINE__, __FILE__, $sql); } mx_music_reorder_cat(); // Return a message... $message = $lang['Category_changed_order'] . "<br /><br />" . sprintf($lang['Click_return_music_category'], "<a href=\"" . append_sid("admin_music_cat.$phpEx") . "\">", "</a>") . "<br /><br />" . sprintf($lang['Click_return_admin_index'], "<a href=\"" . append_sid("index.$phpEx?pane=right") . "\">", "</a>"); message_die(GENERAL_MESSAGE, $message); } } } else { if(( $HTTP_POST_VARS['mode'] == 'new' ) || ($HTTP_POST_VARS['mode'] == 'newcat')) { if( !isset($HTTP_POST_VARS['cat_title']) ) { $template->set_filenames(array( 'body' => 'admin/music_cat_new_body.tpl') ); if ( !isset($HTTP_POST_VARS['cat_parent']) ) { $cat_parent = ""; } else { $cat_parent = "<input type=\"hidden\" value=\"" . $HTTP_POST_VARS['cat_parent'] . "\" name=\"cat_parent\">"; } if ($HTTP_POST_VARS['mode'] == 'newcat') { $cat_type = "<input type=\"hidden\" value=\"1\" name=\"cat_type\">"; } $template->assign_vars(array( 'L_MUSIC_CAT_TITLE' => $lang['Music_Categories_Title'], 'L_MUSIC_CAT_EXPLAIN' => $lang['Music_Categories_Explain'], 'S_MUSIC_ACTION' => append_sid("admin_music_cat.$phpEx"), 'L_CAT_TITLE' => $lang['Category_Title'], 'L_CAT_DESC' => $lang['Category_Desc'], 'L_CAT_PERMISSIONS' => $lang['Category_Permissions'], 'L_VIEW_LEVEL' => $lang['View_level'], 'L_UPLOAD_LEVEL' => $lang['Upload_level'], 'L_RATE_LEVEL' => $lang['Rate_level'], 'L_COMMENT_LEVEL' => $lang['Comment_level'], 'L_EDIT_LEVEL' => $lang['Edit_level'], 'L_DELETE_LEVEL' => $lang['Delete_level'], 'L_SONGS_APPROVAL' => $lang['Songs_Approval'], 'L_GUEST' => $lang['Forum_ALL'], 'L_REG' => $lang['Forum_REG'], 'L_PRIVATE' => $lang['Forum_PRIVATE'], 'L_MOD' => $lang['Forum_MOD'], 'L_ADMIN' => $lang['Forum_ADMIN'], 'L_DISABLED' => $lang['Disabled'], 'VIEW_GUEST' => 'selected="selected"', 'UPLOAD_REG' => 'selected="selected"', 'RATE_REG' => 'selected="selected"', 'COMMENT_REG' => 'selected="selected"', 'EDIT_REG' => 'selected="selected"', 'DELETE_MOD' => 'selected="selected"', 'APPROVAL_DISABLED' => 'selected="selected"', 'S_MODE' => 'new', 'S_GUEST' => MUSIC_GUEST, 'S_USER' => MUSIC_USER, 'S_PRIVATE' => MUSIC_PRIVATE, 'S_MOD' => MUSIC_MOD, 'S_ADMIN' => MUSIC_ADMIN, 'CAT_PARENT' => $cat_parent, 'CAT_TYPE' => $cat_type, 'L_PANEL_TITLE' => $lang['Create_category']) ); $template->pparse('body'); include($mx_root_path . 'admin/page_footer_admin.'.$phpEx); } else { // Get posting variables if ( !isset($HTTP_POST_VARS['cat_parent']) ) { $cat_parent = 0; } else { $cat_parent = intval($HTTP_POST_VARS['cat_parent']); } if ( !isset($HTTP_POST_VARS['cat_type']) ) { $cat_type = 0; } else { $cat_type = 1; } $cat_title = str_replace("\'", "''", htmlspecialchars(trim($HTTP_POST_VARS['cat_title']))); $cat_desc = str_replace("\'", "''", trim($HTTP_POST_VARS['cat_desc'])); $view_level = intval($HTTP_POST_VARS['cat_view_level']); $upload_level = intval($HTTP_POST_VARS['cat_upload_level']); $rate_level = intval($HTTP_POST_VARS['cat_rate_level']); $comment_level = intval($HTTP_POST_VARS['cat_comment_level']); $edit_level = intval($HTTP_POST_VARS['cat_edit_level']); $delete_level = intval($HTTP_POST_VARS['cat_delete_level']); $cat_approval = intval($HTTP_POST_VARS['cat_approval']); // Get the last ordered category $sql = "SELECT cat_order FROM ". MUSIC_CAT_TABLE ." ORDER BY cat_order DESC LIMIT 1"; if(!$result = $db->sql_query($sql)) { message_die(GENERAL_ERROR, 'Could not query music Categories information', '', __LINE__, __FILE__, $sql); } $row = $db->sql_fetchrow($result); $last_order = $row['cat_order']; $cat_order = $last_order + 10; // Here we insert a new row into the db $sql = "INSERT INTO ". MUSIC_CAT_TABLE ." (cat_title, cat_desc, cat_order, cat_view_level, cat_upload_level, cat_rate_level, cat_comment_level, cat_edit_level, cat_delete_level, cat_approval, cat_parent, cat_type) VALUES ('$cat_title', '$cat_desc', '$cat_order', '$view_level', '$upload_level', '$rate_level', '$comment_level', '$edit_level', '$delete_level', '$cat_approval', $cat_parent, $cat_type)"; if(!$result = $db->sql_query($sql)) { message_die(GENERAL_ERROR, 'Could not create new music Category', '', __LINE__, __FILE__, $sql); } // Return a message... $message = $lang['New_category_created'] . "<br /><br />" . sprintf($lang['Click_return_music_category'], "<a href=\"" . append_sid("admin_music_cat.$phpEx") . "\">", "</a>") . "<br /><br />" . sprintf($lang['Click_return_admin_index'], "<a href=\"" . append_sid("index.$phpEx?pane=right") . "\">", "</a>"); message_die(GENERAL_MESSAGE, $message); } } else if( $HTTP_POST_VARS['mode'] == 'edit' ) { // Get posting variables $cat_id = intval($HTTP_GET_VARS['cat_id']); $cat_title = str_replace("\'", "''", htmlspecialchars(trim($HTTP_POST_VARS['cat_title']))); $cat_desc = str_replace("\'", "''", trim($HTTP_POST_VARS['cat_desc'])); $view_level = intval($HTTP_POST_VARS['cat_view_level']); $upload_level = intval($HTTP_POST_VARS['cat_upload_level']); $rate_level = intval($HTTP_POST_VARS['cat_rate_level']); $comment_level = intval($HTTP_POST_VARS['cat_comment_level']); $edit_level = intval($HTTP_POST_VARS['cat_edit_level']); $delete_level = intval($HTTP_POST_VARS['cat_delete_level']); $cat_approval = intval($HTTP_POST_VARS['cat_approval']); // Now we update this row $sql = "UPDATE ". MUSIC_CAT_TABLE ." SET cat_title = '$cat_title', cat_desc = '$cat_desc', cat_view_level = '$view_level', cat_upload_level = '$upload_level', cat_rate_level = '$rate_level', cat_comment_level = '$comment_level', cat_edit_level = '$edit_level', cat_delete_level = '$delete_level', cat_approval = '$cat_approval' WHERE cat_id = '$cat_id'"; if(!$result = $db->sql_query($sql)) { message_die(GENERAL_ERROR, 'Could not update this music Category', '', __LINE__, __FILE__, $sql); } // Return a message... $message = $lang['Category_updated'] . "<br /><br />" . sprintf($lang['Click_return_music_category'], "<a href=\"" . append_sid("admin_music_cat.$phpEx") . "\">", "</a>") . "<br /><br />" . sprintf($lang['Click_return_admin_index'], "<a href=\"" . append_sid("index.$phpEx?pane=right") . "\">", "</a>"); message_die(GENERAL_MESSAGE, $message); } else if( $HTTP_POST_VARS['mode'] == 'delete' ) { $cat_id = intval($HTTP_GET_VARS['cat_id']); $target = intval($HTTP_POST_VARS['target']); if( $target == 0 ) // Delete All { // Get file information of all songs in this category $sql = "SELECT song_id, song_filename, song_cat_id FROM ". MUSIC_TABLE ." WHERE song_cat_id = '$cat_id'"; if(!$result = $db->sql_query($sql)) { message_die(GENERAL_ERROR, 'Could not query music information', '', __LINE__, __FILE__, $sql); } $songrow = array(); while( $row = $db ->sql_fetchrow($result) ) { $songrow[] = $row; $song_id_row[] = $row['song_id']; } if( count($songrow) != 0 ) // if this category is not empty { // Delete all physical song for ($i = 0; $i < count($songrow); $i++) { @unlink('../' . MUSIC_UPLOAD_PATH . $songrow[$i]['song_filename']); } $song_id_sql = '(' . implode(',', $song_id_row) . ')'; // Delete all related ratings $sql = "DELETE FROM ". MUSIC_RATE_TABLE ." WHERE rate_song_id IN ". $song_id_sql; if(!$result = $db->sql_query($sql)) { message_die(GENERAL_ERROR, 'Could not delete Ratings information', '', __LINE__, __FILE__, $sql); } // Delete all related comments $sql = "DELETE FROM ". MUSIC_COMMENT_TABLE ." WHERE comment_song_id IN ". $song_id_sql; if(!$result = $db->sql_query($sql)) { message_die(GENERAL_ERROR, 'Could not delete Comments information', '', __LINE__, __FILE__, $sql); } // Delete song entries in db $sql = "DELETE FROM ". MUSIC_TABLE ." WHERE song_cat_id = '$cat_id'"; if(!$result = $db->sql_query($sql)) { message_die(GENERAL_ERROR, 'Could not delete song entries in the DB', '', __LINE__, __FILE__, $sql); } } // This category is now emptied, we can remove it! $sql = "DELETE FROM ". MUSIC_CAT_TABLE ." WHERE cat_id = '$cat_id'"; if(!$result = $db->sql_query($sql)) { message_die(GENERAL_ERROR, 'Could not delete this Category', '', __LINE__, __FILE__, $sql); } // Re-order the rest of categories mx_music_reorder_cat(); // Return a message... $message = $lang['Category_deleted'] . "<br /><br />" . sprintf($lang['Click_return_music_category'], "<a href=\"" . append_sid("admin_music_cat.$phpEx") . "\">", "</a>") . "<br /><br />" . sprintf($lang['Click_return_admin_index'], "<a href=\"" . append_sid("index.$phpEx?pane=right") . "\">", "</a>"); message_die(GENERAL_MESSAGE, $message); } else // Move content... { $sql = "UPDATE ". MUSIC_TABLE ." SET song_cat_id = '$target' WHERE song_cat_id = '$cat_id'"; if(!$result = $db->sql_query($sql)) { message_die(GENERAL_ERROR, 'Could not update this Category content', '', __LINE__, __FILE__, $sql); } // This category is now emptied, we can remove it! $sql = "DELETE FROM ". MUSIC_CAT_TABLE ." WHERE cat_id = '$cat_id'"; if(!$result = $db->sql_query($sql)) { message_die(GENERAL_ERROR, 'Could not delete this Category', '', __LINE__, __FILE__, $sql); } // Re-order the rest of categories mx_music_reorder_cat(); // Return a message... $message = $lang['Category_deleted'] . "<br /><br />" . sprintf($lang['Click_return_music_category'], "<a href=\"" . append_sid("admin_music_cat.$phpEx") . "\">", "</a>") . "<br /><br />" . sprintf($lang['Click_return_admin_index'], "<a href=\"" . append_sid("index.$phpEx?pane=right") . "\">", "</a>"); message_die(GENERAL_MESSAGE, $message); } } } /* Powered by Music Online 2.0 (c) 2003 Cf Manager */ ?> --- NEW FILE: admin_music_cfg.php --- <?php /** * * @package mxBB Portal Module - mx_music * @version $Id: admin_music_cfg.php,v 1.2 2008/03/08 20:08:37 orynider Exp $ * @copyright (c) 2003 [ory...@rd..., OryNider] mxBB Development Team * @license http://opensource.org/licenses/gpl-license.php GNU General Public License v2 * */ $phpEx = substr(strrchr(__FILE__, '.'), 1); if ( @file_exists( './../viewtopic.' . $phpEx ) ) // -------------------------------------------- phpBB MOD MODE { define('MXBB_MODULE', false); define('IN_PHPBB', true); $phpbb_root_path = $module_root_path = './../'; $mx_mod_path = $phpbb_root_path . 'mx_mod/'; require_once($mx_mod_path . "includes/functions_required.$phpEx"); @define('IN_PORTAL', true); //Check if forum_hack is installed if (!isset($mx_root_path)) { $mx_root_path = './../'; include_once($mx_mod_path . "includes/mx_constants.$phpEx"); include_once($mx_mod_path . "includes/shared/phpbb2/includes/functions.$phpEx"); } require_once($mx_mod_path . "includes/functions_core.$phpEx"); //Check for cash mod if (file_exists($phpbb_root_path . 'includes/functions_cash.'.$phpEx)) { define('IN_CASHMOD', true); } //@ini_set( 'display_errors', '1' ); error_reporting (E_ERROR | E_WARNING | E_PARSE); // This will NOT report uninitialized variables //error_reporting(E_ALL & ~E_NOTICE); define( 'PAGE_KB', -502 ); // If this id generates a conflict with other mods, change it ;) // // Instatiate the mx_cache class // $mx_cache = new mx_cache(); // // instatiate the mx_request_vars class // $mx_request_vars = new mx_request_vars(); // // instatiate the mx_user class // //$mx_user = new mx_user(); // // Left Pane Paths // $setmodules_admin_path = ''; $setmodules_module_path = "./../"; if (file_exists($phpbb_root_path."modcp.$phpEx")) // phpBB2 { define('PORTAL_BACKEND', 'phpbb2'); $tplEx = 'tpl'; } else if (@file_exists($phpbb_root_path."mcp.$phpEx")) // phpBB3 { define('PORTAL_BACKEND', 'phpbb3'); $tplEx = 'html'; } } else { define( 'IN_PORTAL', 1 ); define( 'MXBB_MODULE', true ); // // Main paths // $mx_root_path = './../../../'; $module_root_path = './../../../modules/mx_music/'; $setmodules_admin_path = 'modules/mx_linkdb/admin/'; define( 'MXBB_27x', file_exists( $mx_root_path . 'mx_login.php' ) ); $phpEx = substr(strrchr(__FILE__, '.'), 1); } if ( !empty( $setmodules ) ) { $file = basename( __FILE__ ); $module['Music_Online']['Configuration'] = $setmodules_admin_path . $file; return; } $music_root_path = $module_root_path . 'music_box/'; // // Get general information // require($mx_root_path . 'admin/pagestart.' . $phpEx); if ( !MXBB_MODULE ) { require_once($mx_mod_path . "includes/functions_styles.$phpEx"); $mx_user = new mx_user(); // instatiate the mx_user class // // Define basic constants // $mx_user->page_id = 1; $mx_user->user_ip = $user_ip; $mx_user->_init_userprefs(); } require($music_root_path . 'music_common.'.$phpEx); // ********************************************************************** // Read language definition // ********************************************************************** if ( !MXBB_MODULE ) { if ( !file_exists( $module_root_path . 'music_box/language/lang_' . $board_config['default_lang'] . '/lang_admin.' . $phpEx ) ) { include( $module_root_path . 'music_box/language/lang_english/lang_admin.' . $phpEx ); } else { include( $module_root_path . 'music_box/language/lang_' . $board_config['default_lang'] . '/lang_admin.' . $phpEx ); } } else { if ( file_exists( $module_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_admin.' . $phpEx ) ) { include( $module_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_admin.' . $phpEx ); } else if ( file_exists( $module_root_path . 'language/lang_english/lang_admin.' . $phpEx ) ) { include( $module_root_path . 'language/lang_english/lang_admin.' . $phpEx ); } } // // Pull all config data // $sql = "SELECT * FROM " . MUSIC_CONFIG_TABLE; if(!$result = $db->sql_query($sql)) { message_die(CRITICAL_ERROR, "Could not query music config information", "", __LINE__, __FILE__, $sql); } else { while( $row = $db->sql_fetchrow($result) ) { $config_name = $row['config_name']; $config_value = $row['config_value']; $default_config[$config_name] = $config_value; $new[$config_name] = ( isset($HTTP_POST_VARS[$config_name]) ) ? $HTTP_POST_VARS[$config_name] : $default_config[$config_name]; if( isset($HTTP_POST_VARS['submit']) ) { $sql = "UPDATE " . MUSIC_CONFIG_TABLE . " SET config_value = '" . str_replace("\'", "''", $new[$config_name]) . "' WHERE config_name = '$config_name'"; if( !$db->sql_query($sql) ) { message_die(GENERAL_ERROR, "Failed to update music configuration for $config_name", "", __LINE__, __FILE__, $sql); } } } if( isset($HTTP_POST_VARS['submit']) ) { $message = $lang['Music_config_updated'] . "<br /><br />" . sprintf($lang['Click_return_music_config'], "<a href=\"" . append_sid("admin_music_cfg.$phpEx") . "\">", "</a>") . "<br /><br />" . sprintf($lang['Click_return_admin_index'], "<a href=\"" . append_sid($mx_root_path . "admin/index.$phpEx?pane=right") . "\">", "</a>"); message_die(GENERAL_MESSAGE, $message); } } $template->set_filenames(array( "body" => "admin/music_config_body.tpl") ); $template->assign_vars(array( 'L_MUSIC_CONFIG' => $lang['Music_config'], 'L_MUSIC_CONFIG_EXPLAIN' => $lang['Music_config_explain'], 'S_MUSIC_CONFIG_ACTION' => append_sid('admin_music_cfg.'.$phpEx), 'MAX_SONGS' => $new['max_songs'], 'MAX_FILE_SIZE' => $new['max_file_size'], 'ROWS_PER_PAGE' => $new['rows_per_page'], 'COLS_PER_PAGE' => $new['cols_per_page'], 'TOP' => $new['top'], // eXtreme Styles 'XS_ENABLED' => ($new['xs_enabled'] == 1) ? 'checked="checked"' : '', 'XS_DISABLED' => ($new['xs_enabled'] == 0) ? 'checked="checked"' : '', 'ROWS_PER_PAGE_PIC' => $new['rows_per_page_pic'], 'COLS_PER_PAGE_PIC' => $new['cols_per_page_pic'], 'ROWS_PER_PAGE_MEDIA' => $new['rows_per_page_media'], 'COLS_PER_PAGE_MEDIA' => $new['cols_per_page_media'], // Index 'INDEX_SHOW_SUBCATS_ENABLED' => ($new['show_index_subcats'] == 1) ? 'checked="checked"' : '', 'INDEX_SHOW_SUBCATS_DISABLED' => ($new['show_index_subcats'] == 0) ? 'checked="checked"' : '', // // Song image // 'MAX_IMAGE_SIZE' => $new['max_image_size'], 'MAX_IMAGE_WIDTH' => $new['max_image_width'], 'MAX_IMAGE_HEIGHT' => $new['max_image_height'], 'USER_SONGS_LIMIT' => $new['user_songs_limit'], 'MOD_SONGS_LIMIT' => $new['mod_songs_limit'], 'MP3_ENABLED' => ($new['mp3_allowed'] == 1) ? 'checked="checked"' : '', 'MP3_DISABLED' => ($new['mp3_allowed'] == 0) ? 'checked="checked"' : '', 'WAV_ENABLED' => ($new['wav_allowed'] == 1) ? 'checked="checked"' : '', 'WAV_DISABLED' => ($new['wav_allowed'] == 0) ? 'checked="checked"' : '', 'WMA_ENABLED' => ($new['wma_allowed'] == 1) ? 'checked="checked"' : '', 'WMA_DISABLED' => ($new['wma_allowed'] == 0) ? 'checked="checked"' : '', // Media Center 'WMV_ENABLED' => ($new['wmv_allowed'] == 1) ? 'checked="checked"' : '', 'WMV_DISABLED' => ($new['wmv_allowed'] == 0) ? 'checked="checked"' : '', 'MIDI_ENABLED' => ($new['mid_allowed'] == 1) ? 'checked="checked"' : '', 'MIDI_DISABLED' => ($new['mid_allowed'] == 0) ? 'checked="checked"' : '', 'RAM_ENABLED' => ($new['ram_allowed'] == 1) ? 'checked="checked"' : '', 'RAM_DISABLED' => ($new['ram_allowed'] == 0) ? 'checked="checked"' : '', 'AU_ENABLED' => ($new['au_allowed'] == 1) ? 'checked="checked"' : '', 'AU_DISABLED' => ($new['au_allowed'] == 0) ? 'checked="checked"' : '', 'MPEG_ENABLED' => ($new['mpeg_allowed'] == 1) ? 'checked="checked"' : '', 'MPEG_DISABLED' => ($new['mpeg_allowed'] == 0) ? 'checked="checked"' : '', 'AVI_ENABLED' => ($new['avi_allowed'] == 1) ? 'checked="checked"' : '', 'AVI_DISABLED' => ($new['avi_allowed'] == 0) ? 'checked="checked"' : '', 'SWF_ENABLED' => ($new['swf_allowed'] == 1) ? 'checked="checked"' : '', 'SWF_DISABLED' => ($new['swf_allowed'] == 0) ? 'checked="checked"' : '', 'QT_ENABLED' => ($new['qt_allowed'] == 1) ? 'checked="checked"' : '', 'QT_DISABLED' => ($new['qt_allowed'] == 0) ? 'checked="checked"' : '', 'FLV_ENABLED' => ($new['flv_allowed'] == 1) ? 'checked="checked"' : '', 'FLV_DISABLED' => ($new['flv_allowed'] == 0) ? 'checked="checked"' : '', 'RM_ENABLED' => ($new['rm_allowed'] == 1) ? 'checked="checked"' : '', 'RM_DISABLED' => ($new['rm_allowed'] == 0) ? 'checked="checked"' : '', 'IMG_ENABLED' => ($new['img_allowed'] == 1) ? 'checked="checked"' : '', 'IMG_DISABLED' => ($new['img_allowed'] == 0) ? 'checked="checked"' : '', // Media Center 'SONG_DESC_MAX_LENGTH' => $new['desc_length'], 'HOTLINK_PREVENT_ENABLED' => ($new['hotlink_prevent'] == 1) ? 'checked="checked"' : '', 'HOTLINK_PREVENT_DISABLED' => ($new['hotlink_prevent'] == 0) ? 'checked="checked"' : '', 'HOTLINK_ALLOWED' => $new['hotlink_allowed'], 'RATE_ENABLED' => ($new['rate'] == 1) ? 'checked="checked"' : '', 'RATE_DISABLED' => ($new['rate'] == 0) ? 'checked="checked"' : '', 'RATE_SCALE' => $new['rate_scale'], 'COMMENT_ENABLED' => ($new['comment'] == 1) ? 'checked="checked"' : '', 'COMMENT_DISABLED' => ($new['comment'] == 0) ? 'checked="checked"' : '', 'DOWNLOAD_ENABLED' => ($new['download'] == 1) ? 'checked="checked"' : '', 'DOWNLOAD_DISABLED' => ($new['download'] == 0) ? 'checked="checked"' : '', 'SORT_TIME' => ($new['sort_method'] == 'song_time') ? 'selected="selected"' : '', 'SORT_SONG_TITLE' => ($new['sort_method'] == 'song_title') ? 'selected="selected"' : '', 'SORT_USERNAME' => ($new['sort_method'] == 'song_user_id') ? 'selected="selected"' : '', 'SORT_VIEW' => ($new['sort_method'] == 'song_view_count') ? 'selected="selected"' : '', 'SORT_RATING' => ($new['sort_method'] == 'rating') ? 'selected="selected"' : '', 'SORT_COMMENTS' => ($new['sort_method'] == 'comments') ? 'selected="selected"' : '', 'SORT_NEW_COMMENT' => ($new['sort_method'] == 'new_comment') ? 'selected="selected"' : '', 'SORT_ASC' => ($new['sort_order'] == 'ASC') ? 'selected="selected"' : '', 'SORT_DESC' => ($new['sort_order'] == 'DESC') ? 'selected="selected"' : '', 'S_GUEST' => MUSIC_GUEST, 'S_USER' => MUSIC_USER, 'S_PRIVATE' => MUSIC_PRIVATE, 'S_MOD' => MUSIC_MOD, 'S_ADMIN' => MUSIC_ADMIN, 'L_MAX_SONGS' => $lang['Max_songs'], 'L_MAX_FILE_SIZE' => $lang['Max_file_size'], 'L_USER_SONGS_LIMIT' => $lang['User_songs_limit'], 'L_MOD_SONGS_LIMIT' => $lang['Moderator_songs_limit'], 'L_ROWS_PER_PAGE' => $lang['Rows_per_page'], 'L_COLS_PER_PAGE' => $lang['Cols_per_page'], 'L_ROWS_PER_PAGE_PIC' => $lang['Rows_per_page_music_pic_cat'], 'L_COLS_PER_PAGE_PIC' => $lang['Cols_per_page_music_pic_cat'], 'L_ROWS_PER_PAGE_MEDIA' => $lang['Rows_per_page_music_media_cat'], 'L_COLS_PER_PAGE_MEDIA' => $lang['Cols_per_page_music_media_cat'], 'L_TOP' => $lang['Top'], //Index 'L_INDEX_SETTINGS' => $lang['Music_Index_Settings'], 'L_INDEX_SHOW_SUBCATS' => $lang['Show_Index_Subcats'], // // Lang Song image // 'L_MAX_IMAGE_SIZE' => $lang['Max_image_size'], 'L_MAX_IMAGE_WIDTH' => $lang['Max_image_width'], 'L_MAX_IMAGE_HEIGHT' => $lang['Max_image_height'], // Media Center Allowed FileTypes 'L_MP3_ALLOWED' => $lang['MP3_allowed'], 'L_WAV_ALLOWED' => $lang['WAV_allowed'], 'L_WMA_ALLOWED' => $lang['WMA_allowed'], 'L_WMV_ALLOWED' => $lang['WMV_allowed'], 'L_MIDI_ALLOWED' => $lang['MIDI_allowed'], 'L_RAM_ALLOWED' => $lang['RAM_allowed'], 'L_AU_ALLOWED' => $lang['AU_allowed'], 'L_MPEG_ALLOWED' => $lang['MPEG_allowed'], 'L_AVI_ALLOWED' => $lang['AVI_allowed'], 'L_SWF_ALLOWED' => $lang['SWF_allowed'], 'L_QT_ALLOWED' => $lang['QT_allowed'], 'L_FLV_ALLOWED' => $lang['FLV_allowed'], 'L_RM_ALLOWED' => $lang['RM_allowed'], 'L_IMG_ALLOWED' => $lang['IMG_allowed'], // Media Center Allowed FileTypes 'L_SONG_DESC_MAX_LENGTH' => $lang['Song_Desc_Max_Length'], 'L_HOTLINK_PREVENT' => $lang['Hotlink_prevent'], 'L_HOTLINK_ALLOWED' => $lang['Hotlink_allowed'], 'L_RATE_SYSTEM' => $lang['Rate_system'], 'L_RATE_SCALE' => $lang['Rate_Scale'], 'L_COMMENT_SYSTEM' => $lang['Comment_system'], 'L_DOWNLOAD_SYSTEM' => $lang['Download_system'], 'L_EXTRA_SETTINGS' => $lang['Extra_Settings'], 'L_DEFAULT_SORT_METHOD' => $lang['Default_Sort_Method'], 'L_TIME' => $lang['Time'], 'L_SONG_TITLE' => $lang['Song_Title'], 'L_USERNAME' => $lang['Sort_Username'], 'L_VIEW' => $lang['View'], 'L_RATING' => $lang['Rating'], 'L_COMMENTS' => $lang['Comments'], 'L_DOWNLOAD' => $lang['Download'], 'L_NEW_COMMENT' => $lang['New_Comment'], 'L_DEFAULT_SORT_ORDER' => $lang['Default_Sort_Order'], 'L_ASC' => $lang['Sort_Ascending'], 'L_DESC' => $lang['Sort_Descending'], 'L_GUEST' => $lang['Forum_ALL'], 'L_REG' => $lang['Forum_REG'], 'L_PRIVATE' => $lang['Forum_PRIVATE'], 'L_MOD' => $lang['Forum_MOD'], 'L_ADMIN' => $lang['Forum_ADMIN'], 'L_DISABLED' => $lang['Disabled'], 'L_ENABLED' => $lang['Enabled'], 'L_YES' => $lang['Yes'], 'L_NO' => $lang['No'], 'L_SUBMIT' => $lang['Submit'], 'L_RESET' => $lang['Reset']) ); $template->pparse("body"); include($mx_root_path . 'admin/page_footer_admin.'.$phpEx); /* Powered by Music Online 2.0 (c) 2003 Cf Manager */ ?> |
|
From: OryNider <ory...@us...> - 2008-03-08 19:49:08
|
Update of /cvsroot/mxbb/mx_music/admin In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv24491/admin Modified Files: Tag: core28x admin_music_auth.php admin_music_cat.php admin_music_cfg.php Log Message: Index: admin_music_auth.php =================================================================== RCS file: /cvsroot/mxbb/mx_music/admin/admin_music_auth.php,v retrieving revision 1.2.2.4 retrieving revision 1.2.2.5 diff -C2 -d -r1.2.2.4 -r1.2.2.5 *** admin_music_auth.php 31 Jan 2008 04:16:24 -0000 1.2.2.4 --- admin_music_auth.php 8 Mar 2008 19:48:26 -0000 1.2.2.5 *************** *** 36,54 **** // Read language definition // ********************************************************************** ! if ( file_exists( $module_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_admin_music.' . $phpEx ) ) { ! include( $module_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_admin_music.' . $phpEx ); } ! else if ( file_exists( $module_root_path . 'language/lang_english/lang_admin_music.' . $phpEx ) ) { ! include( $module_root_path . 'language/lang_english/lang_admin_music.' . $phpEx ); } ! if ( file_exists( $module_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_main_music.' . $phpEx ) ) { ! include( $module_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_main_music.' . $phpEx ); } ! else if ( file_exists( $module_root_path . 'language/lang_english/lang_main_music.' . $phpEx ) ) { ! include( $module_root_path . 'language/lang_english/lang_main_music.' . $phpEx ); } --- 36,54 ---- // Read language definition // ********************************************************************** ! if ( file_exists( $module_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_admin.' . $phpEx ) ) { ! include( $module_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_admin.' . $phpEx ); } ! else if ( file_exists( $module_root_path . 'language/lang_english/lang_admin.' . $phpEx ) ) { ! include( $module_root_path . 'language/lang_english/lang_admin.' . $phpEx ); } ! if ( file_exists( $module_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_main.' . $phpEx ) ) { ! include( $module_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_main.' . $phpEx ); } ! else if ( file_exists( $module_root_path . 'language/lang_english/lang_main.' . $phpEx ) ) { ! include( $module_root_path . 'language/lang_english/lang_main.' . $phpEx ); } Index: admin_music_cat.php =================================================================== RCS file: /cvsroot/mxbb/mx_music/admin/admin_music_cat.php,v retrieving revision 1.3.2.4 retrieving revision 1.3.2.5 diff -C2 -d -r1.3.2.4 -r1.3.2.5 *** admin_music_cat.php 31 Jan 2008 04:16:24 -0000 1.3.2.4 --- admin_music_cat.php 8 Mar 2008 19:48:26 -0000 1.3.2.5 *************** *** 36,54 **** // Read language definition // ********************************************************************** ! if ( file_exists( $module_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_admin_music.' . $phpEx ) ) { ! include( $module_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_admin_music.' . $phpEx ); } ! else if ( file_exists( $module_root_path . 'language/lang_english/lang_admin_music.' . $phpEx ) ) { ! include( $module_root_path . 'language/lang_english/lang_admin_music.' . $phpEx ); } ! if ( file_exists( $module_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_main_music.' . $phpEx ) ) { ! include( $module_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_main_music.' . $phpEx ); } ! else if ( file_exists( $module_root_path . 'language/lang_english/lang_main_music.' . $phpEx ) ) { ! include( $module_root_path . 'language/lang_english/lang_main_music.' . $phpEx ); } --- 36,54 ---- // Read language definition // ********************************************************************** ! if ( file_exists( $module_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_admin.' . $phpEx ) ) { ! include( $module_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_admin.' . $phpEx ); } ! else if ( file_exists( $module_root_path . 'language/lang_english/lang_admin.' . $phpEx ) ) { ! include( $module_root_path . 'language/lang_english/lang_admin.' . $phpEx ); } ! if ( file_exists( $module_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_main.' . $phpEx ) ) { ! include( $module_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_main.' . $phpEx ); } ! else if ( file_exists( $module_root_path . 'language/lang_english/lang_main.' . $phpEx ) ) { ! include( $module_root_path . 'language/lang_english/lang_main.' . $phpEx ); } Index: admin_music_cfg.php =================================================================== RCS file: /cvsroot/mxbb/mx_music/admin/admin_music_cfg.php,v retrieving revision 1.4.2.6 retrieving revision 1.4.2.7 diff -C2 -d -r1.4.2.6 -r1.4.2.7 *** admin_music_cfg.php 31 Jan 2008 04:16:24 -0000 1.4.2.6 --- admin_music_cfg.php 8 Mar 2008 19:48:28 -0000 1.4.2.7 *************** *** 36,54 **** // Read language definition // ********************************************************************** ! if ( file_exists( $module_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_admin_music.' . $phpEx ) ) { ! include( $module_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_admin_music.' . $phpEx ); } ! else if ( file_exists( $module_root_path . 'language/lang_english/lang_admin_music.' . $phpEx ) ) { ! include( $module_root_path . 'language/lang_english/lang_admin_music.' . $phpEx ); } ! if ( file_exists( $module_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_main_music.' . $phpEx ) ) { ! include( $module_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_main_music.' . $phpEx ); } ! else if ( file_exists( $module_root_path . 'language/lang_english/lang_main_music.' . $phpEx ) ) { ! include( $module_root_path . 'language/lang_english/lang_main_music.' . $phpEx ); } --- 36,54 ---- // Read language definition // ********************************************************************** ! if ( file_exists( $module_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_admin.' . $phpEx ) ) { ! include( $module_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_admin.' . $phpEx ); } ! else if ( file_exists( $module_root_path . 'language/lang_english/lang_admin.' . $phpEx ) ) { ! include( $module_root_path . 'language/lang_english/lang_admin.' . $phpEx ); } ! if ( file_exists( $module_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_main.' . $phpEx ) ) { ! include( $module_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_main.' . $phpEx ); } ! else if ( file_exists( $module_root_path . 'language/lang_english/lang_main.' . $phpEx ) ) { ! include( $module_root_path . 'language/lang_english/lang_main.' . $phpEx ); } |
|
From: OryNider <ory...@us...> - 2008-03-08 19:48:38
|
Update of /cvsroot/mxbb/mx_music/phpbb2/admin In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv24491/phpbb2/admin Modified Files: Tag: core28x admin_music_auth.php admin_music_cat.php admin_music_cfg.php Log Message: Index: admin_music_auth.php =================================================================== RCS file: /cvsroot/mxbb/mx_music/phpbb2/admin/Attic/admin_music_auth.php,v retrieving revision 1.1.2.1 retrieving revision 1.1.2.2 diff -C2 -d -r1.1.2.1 -r1.1.2.2 *** admin_music_auth.php 8 Mar 2008 15:42:58 -0000 1.1.2.1 --- admin_music_auth.php 8 Mar 2008 19:48:29 -0000 1.1.2.2 *************** *** 136,157 **** if ( !MXBB_MODULE ) { ! if ( !file_exists( $module_root_path . 'music_box/language/lang_' . $board_config['default_lang'] . '/lang_admin_music.' . $phpEx ) ) { ! include( $module_root_path . 'music_box/language/lang_english/lang_admin_music.' . $phpEx ); } else { ! include( $module_root_path . 'music_box/language/lang_' . $board_config['default_lang'] . '/lang_admin_music.' . $phpEx ); } } else { ! if ( file_exists( $module_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_admin_music.' . $phpEx ) ) { ! include( $module_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_admin_music.' . $phpEx ); } ! else if ( file_exists( $module_root_path . 'language/lang_english/lang_admin_music.' . $phpEx ) ) { ! include( $module_root_path . 'language/lang_english/lang_admin_music.' . $phpEx ); } } --- 136,157 ---- if ( !MXBB_MODULE ) { ! if ( !file_exists( $module_root_path . 'music_box/language/lang_' . $board_config['default_lang'] . '/lang_admin.' . $phpEx ) ) { ! include( $module_root_path . 'music_box/language/lang_english/lang_admin.' . $phpEx ); } else { ! include( $module_root_path . 'music_box/language/lang_' . $board_config['default_lang'] . '/lang_admin.' . $phpEx ); } } else { ! if ( file_exists( $module_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_admin.' . $phpEx ) ) { ! include( $module_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_admin.' . $phpEx ); } ! else if ( file_exists( $module_root_path . 'language/lang_english/lang_admin.' . $phpEx ) ) { ! include( $module_root_path . 'language/lang_english/lang_admin.' . $phpEx ); } } Index: admin_music_cat.php =================================================================== RCS file: /cvsroot/mxbb/mx_music/phpbb2/admin/Attic/admin_music_cat.php,v retrieving revision 1.1.2.1 retrieving revision 1.1.2.2 diff -C2 -d -r1.1.2.1 -r1.1.2.2 *** admin_music_cat.php 8 Mar 2008 15:42:59 -0000 1.1.2.1 --- admin_music_cat.php 8 Mar 2008 19:48:30 -0000 1.1.2.2 *************** *** 133,154 **** if ( !MXBB_MODULE ) { ! if ( !file_exists( $module_root_path . 'music_box/language/lang_' . $board_config['default_lang'] . '/lang_admin_music.' . $phpEx ) ) { ! include( $module_root_path . 'music_box/language/lang_english/lang_admin_music.' . $phpEx ); } else { ! include( $module_root_path . 'music_box/language/lang_' . $board_config['default_lang'] . '/lang_admin_music.' . $phpEx ); } } else { ! if ( file_exists( $module_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_admin_music.' . $phpEx ) ) { ! include( $module_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_admin_music.' . $phpEx ); } ! else if ( file_exists( $module_root_path . 'language/lang_english/lang_admin_music.' . $phpEx ) ) { ! include( $module_root_path . 'language/lang_english/lang_admin_music.' . $phpEx ); } } --- 133,154 ---- if ( !MXBB_MODULE ) { ! if ( !file_exists( $module_root_path . 'music_box/language/lang_' . $board_config['default_lang'] . '/lang_admin.' . $phpEx ) ) { ! include( $module_root_path . 'music_box/language/lang_english/lang_admin.' . $phpEx ); } else { ! include( $module_root_path . 'music_box/language/lang_' . $board_config['default_lang'] . '/lang_admin.' . $phpEx ); } } else { ! if ( file_exists( $module_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_admin.' . $phpEx ) ) { ! include( $module_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_admin.' . $phpEx ); } ! else if ( file_exists( $module_root_path . 'language/lang_english/lang_admin.' . $phpEx ) ) { ! include( $module_root_path . 'language/lang_english/lang_admin.' . $phpEx ); } } Index: admin_music_cfg.php =================================================================== RCS file: /cvsroot/mxbb/mx_music/phpbb2/admin/Attic/admin_music_cfg.php,v retrieving revision 1.1.2.1 retrieving revision 1.1.2.2 diff -C2 -d -r1.1.2.1 -r1.1.2.2 *** admin_music_cfg.php 8 Mar 2008 15:42:59 -0000 1.1.2.1 --- admin_music_cfg.php 8 Mar 2008 19:48:31 -0000 1.1.2.2 *************** *** 133,154 **** if ( !MXBB_MODULE ) { ! if ( !file_exists( $module_root_path . 'music_box/language/lang_' . $board_config['default_lang'] . '/lang_admin_music.' . $phpEx ) ) { ! include( $module_root_path . 'music_box/language/lang_english/lang_admin_music.' . $phpEx ); } else { ! include( $module_root_path . 'music_box/language/lang_' . $board_config['default_lang'] . '/lang_admin_music.' . $phpEx ); } } else { ! if ( file_exists( $module_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_admin_music.' . $phpEx ) ) { ! include( $module_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_admin_music.' . $phpEx ); } ! else if ( file_exists( $module_root_path . 'language/lang_english/lang_admin_music.' . $phpEx ) ) { ! include( $module_root_path . 'language/lang_english/lang_admin_music.' . $phpEx ); } } --- 133,154 ---- if ( !MXBB_MODULE ) { ! if ( !file_exists( $module_root_path . 'music_box/language/lang_' . $board_config['default_lang'] . '/lang_admin.' . $phpEx ) ) { ! include( $module_root_path . 'music_box/language/lang_english/lang_admin.' . $phpEx ); } else { ! include( $module_root_path . 'music_box/language/lang_' . $board_config['default_lang'] . '/lang_admin.' . $phpEx ); } } else { ! if ( file_exists( $module_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_admin.' . $phpEx ) ) { ! include( $module_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_admin.' . $phpEx ); } ! else if ( file_exists( $module_root_path . 'language/lang_english/lang_admin.' . $phpEx ) ) { ! include( $module_root_path . 'language/lang_english/lang_admin.' . $phpEx ); } } |
Update of /cvsroot/mxbb/mx_music/music_box/modules In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv31978/music_box/modules Modified Files: Tag: core28x music_cat.php music_comment.php music_comment_delete.php music_comment_edit.php music_delete.php music_download.php music_edit.php music_list.php music_media_cat.php music_modcp.php music_page.php music_pic_cat.php music_rate.php music_rss.php music_song.php music_stream.php music_upload.php Log Message: update for new mx_mod 2.8.2 Index: music_pic_cat.php =================================================================== RCS file: /cvsroot/mxbb/mx_music/music_box/modules/music_pic_cat.php,v retrieving revision 1.1.2.2 retrieving revision 1.1.2.3 diff -C2 -d -r1.1.2.2 -r1.1.2.3 *** music_pic_cat.php 31 Jan 2008 04:16:59 -0000 1.1.2.2 --- music_pic_cat.php 8 Mar 2008 15:42:51 -0000 1.1.2.3 *************** *** 442,446 **** if ( $thissong['song_imagename'] == '' ) { ! $img_id = $mx_images['no_image']; } else --- 442,446 ---- if ( $thissong['song_imagename'] == '' ) { ! $img_id = $images['no_image']; } else *************** *** 926,930 **** 'U_UPLOAD_SONG' => mx_append_sid(this_mo_mxurl("music_mode=music_upload&cat_id=$cat_id")), ! 'UPLOAD_SONG_IMG' => $mx_images['upload_song'], 'L_UPLOAD_SONG' => $lang['Upload_Song'], --- 926,930 ---- 'U_UPLOAD_SONG' => mx_append_sid(this_mo_mxurl("music_mode=music_upload&cat_id=$cat_id")), ! 'UPLOAD_SONG_IMG' => $images['upload_song'], 'L_UPLOAD_SONG' => $lang['Upload_Song'], Index: music_cat.php =================================================================== RCS file: /cvsroot/mxbb/mx_music/music_box/modules/music_cat.php,v retrieving revision 1.1.2.2 retrieving revision 1.1.2.3 diff -C2 -d -r1.1.2.2 -r1.1.2.3 *** music_cat.php 31 Jan 2008 04:16:58 -0000 1.1.2.2 --- music_cat.php 8 Mar 2008 15:42:48 -0000 1.1.2.3 *************** *** 439,443 **** if ( $thissong['song_imagename'] == '' ) { ! $img_id = $mx_images['no_image']; } else --- 439,443 ---- if ( $thissong['song_imagename'] == '' ) { ! $img_id = $images['no_image']; } else *************** *** 929,933 **** 'U_UPLOAD_SONG' => mx_append_sid(this_mo_mxurl("music_mode=music_upload&cat_id=$cat_id")), ! 'UPLOAD_SONG_IMG' => $mx_images['upload_song'], 'L_UPLOAD_SONG' => $lang['Upload_Song'], --- 929,933 ---- 'U_UPLOAD_SONG' => mx_append_sid(this_mo_mxurl("music_mode=music_upload&cat_id=$cat_id")), ! 'UPLOAD_SONG_IMG' => $images['upload_song'], 'L_UPLOAD_SONG' => $lang['Upload_Song'], Index: music_stream.php =================================================================== RCS file: /cvsroot/mxbb/mx_music/music_box/modules/music_stream.php,v retrieving revision 1.1.2.2 retrieving revision 1.1.2.3 diff -C2 -d -r1.1.2.2 -r1.1.2.3 *** music_stream.php 31 Jan 2008 04:16:59 -0000 1.1.2.2 --- music_stream.php 8 Mar 2008 15:42:53 -0000 1.1.2.3 *************** *** 174,194 **** */ ! // Settings by lsn ! $host = explode("//", $thissong['song_url']); ! $host = $host[1]; ! $host = explode(":", $host); ! $ip = $host[0]; // Shoutcast Ip or Host $port = explode("/", $host[1]); - $port = $port[0]; // Shoutcast Port - $mount = "/"; // Used for alternate path to "Streaming URL" -- leave as "/" for the default setup. - $artist = "Shotcast Steam -via- Mx Music Center"; - $title = "Radio Steam - Mx Music Center!"; - $album = "Live"; ! if ( $port == '' ) { $port = '80'; } ! // Make socket connection $errno = "errno"; --- 174,235 ---- */ ! // Settings by lsn (hb...@ho...) ! $hostandport = explode("//", $thissong['song_url']); ! ! //Trasfer Protocol ! if ($hostandport[0]) ! { ! $protocol_type = $hostandport[0]; ! } ! else ! { ! $protocol_type = 'http:'; ! } ! ! //Domain ! $hostname = $hostandport[1]; ! ! // Shoutcast Ip or Host ! $host = explode(":", $hostname); ! ! if ($host[0]) ! { ! $ip = $host[0]; ! } ! elseif ($hostname) ! { ! $ip = $hostname; ! } ! else ! { ! $ip = '127.0.0.0'; //localhost ! } ! ! // Shoutcast Port $port = explode("/", $host[1]); ! if ($port[0]) ! { ! $port = $port[0]; ! } ! elseif ($host[1]) ! { ! $port = $host[1]; ! } ! else { $port = '80'; } ! ! $mount = "/"; // Used for alternate path to "Streaming URL" -- leave as "/" for the default setup. ! ! $wmpmode = ($protocol_type == 'icyx:') ? 'icyx://' : 'http://'; // AAC VS MPEG ! $mimetype = ($protocol_type == 'icyx:') ? 'audio/aacp' : 'audio/x-mpeg'; // AAC VS MPEG ! ! //Other ! $artist = "Shotcast Steam -via- Mx Music Center"; ! $title = "Radio Steam - Mx Music Center!"; ! $album = "Live"; ! // Make socket connection $errno = "errno"; *************** *** 199,203 **** // Establish response headers header("HTTP/1.0 200 OK"); ! header("Content-Type: audio/x-mpeg, audio/x-mpeg-3, audio/mpeg3"); header("Content-Transfer-Encoding: binary"); --- 240,244 ---- // Establish response headers header("HTTP/1.0 200 OK"); ! header("Content-Type: $mimetype, audio/x-mpeg-3, audio/mpeg3"); header("Content-Transfer-Encoding: binary"); *************** *** 229,232 **** --- 270,276 ---- echo $outData; } + elseif (!stristr($outData, "icyx") && !stristr($outData, "content")){ + echo $outData; + } } Index: music_rss.php =================================================================== RCS file: /cvsroot/mxbb/mx_music/music_box/modules/music_rss.php,v retrieving revision 1.1.2.2 retrieving revision 1.1.2.3 diff -C2 -d -r1.1.2.2 -r1.1.2.3 *** music_rss.php 31 Jan 2008 04:16:59 -0000 1.1.2.2 --- music_rss.php 8 Mar 2008 15:42:52 -0000 1.1.2.3 *************** *** 231,235 **** if ( $thissong['song_imagename'] == '' ) { ! $img_id = $mx_images['no_image']; } else --- 231,235 ---- if ( $thissong['song_imagename'] == '' ) { ! $img_id = $images['no_image']; } else Index: music_media_cat.php =================================================================== RCS file: /cvsroot/mxbb/mx_music/music_box/modules/music_media_cat.php,v retrieving revision 1.1.2.2 retrieving revision 1.1.2.3 diff -C2 -d -r1.1.2.2 -r1.1.2.3 *** music_media_cat.php 31 Jan 2008 04:16:59 -0000 1.1.2.2 --- music_media_cat.php 8 Mar 2008 15:42:50 -0000 1.1.2.3 *************** *** 469,473 **** if ( $thissong['song_imagename'] == '' ) { ! $img_id = $mx_images['no_image']; } else --- 469,473 ---- if ( $thissong['song_imagename'] == '' ) { ! $img_id = $images['no_image']; } else *************** *** 1198,1202 **** 'U_UPLOAD_SONG' => mx_append_sid(this_mo_mxurl("music_mode=music_upload&cat_id=$cat_id")), ! 'UPLOAD_SONG_IMG' => $mx_images['upload_song'], 'L_UPLOAD_SONG' => $lang['Upload_Song'], --- 1198,1202 ---- 'U_UPLOAD_SONG' => mx_append_sid(this_mo_mxurl("music_mode=music_upload&cat_id=$cat_id")), ! 'UPLOAD_SONG_IMG' => $images['upload_song'], 'L_UPLOAD_SONG' => $lang['Upload_Song'], Index: music_page.php =================================================================== RCS file: /cvsroot/mxbb/mx_music/music_box/modules/music_page.php,v retrieving revision 1.1.2.2 retrieving revision 1.1.2.3 diff -C2 -d -r1.1.2.2 -r1.1.2.3 *** music_page.php 31 Jan 2008 04:16:59 -0000 1.1.2.2 --- music_page.php 8 Mar 2008 15:42:51 -0000 1.1.2.3 *************** *** 33,37 **** $music_root_path = $module_root_path . 'music_box/'; $song_image_path = MUSIC_IMAGE_PATH; ! $song_image_default = $mx_images['no_image']; // The default image // ------------------------------------ --- 33,37 ---- $music_root_path = $module_root_path . 'music_box/'; $song_image_path = MUSIC_IMAGE_PATH; ! $song_image_default = $images['no_image']; // The default image // ------------------------------------ |
|
From: OryNider <ory...@us...> - 2008-03-08 15:43:26
|
Update of /cvsroot/mxbb/mx_music In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv31978 Modified Files: Tag: core28x music.php Added Files: Tag: core28x music_db_install.php music_db_uninstall.php Log Message: update for new mx_mod 2.8.2 --- NEW FILE: music_db_install.php --- <?php /** * * @package phpBB Mod - Media Center * @version $Id: music_db_install.php,v 1.1.2.1 2008/03/08 15:42:46 orynider Exp $ * @copyright (c) 2002-2006 [Jon Ohlsson, Mohd Basri, wGEric, PHP Arena, pafileDB, CRLin] mxBB Project Team * @license http://opensource.org/licenses/gpl-license.php GNU General Public License v2 * */ $phpEx = substr(strrchr(__FILE__, '.'), 1); if ( !defined('PORTAL_BACKEND') && @file_exists( './viewtopic.' . $phpEx ) ) // -------------------------------------------- phpBB MOD MODE { define( 'MXBB_MODULE', false ); define( 'IN_PHPBB', true ); $phpbb_root_path = $module_root_path = './'; $mx_mod_path = $phpbb_root_path . 'mx_mod/'; include($phpbb_root_path . 'common.' . $phpEx); include($mx_mod_path . "includes/functions_required.$phpEx"); //Check if forum_hack is installed if (!isset($mx_root_path)) { $mx_root_path = './'; @define('IN_PORTAL', true); include_once($mx_mod_path . "includes/mx_constants.$phpEx"); include_once($mx_mod_path . "includes/shared/phpbb2/includes/functions.$phpEx"); } else { @define('IN_PORTAL', true); include_once($mx_root_path . "includes/mx_constants.$phpEx"); include_once($mx_root_path . "includes/shared/phpbb2/includes/functions.$phpEx"); } require($mx_mod_path . "includes/functions_core.$phpEx"); require($mx_mod_path . "includes/functions_styles.$phpEx"); //Check for cash mod if (file_exists($phpbb_root_path . 'includes/functions_cash.'.$phpEx)) { define('IN_CASHMOD', true); } //@ini_set( 'display_errors', '1' ); error_reporting (E_ERROR | E_WARNING | E_PARSE); // This will NOT report uninitialized variables //error_reporting(E_ALL & ~E_NOTICE); define( 'PAGE_KB', -502 ); // If this id generates a conflict with other mods, change it ;) // // Instatiate the mx_cache class // $mx_cache = new mx_cache(); // // Get mxBB config settings // //$portal_config = $mx_cache->obtain_mxbb_config(); // // instatiate the mx_request_vars class // $mx_request_vars = new mx_request_vars(); // // Page selector // $page_id = $mx_request_vars->request('page', MX_TYPE_INT, 1); $is_block = false; // // instatiate the mx_user class // $mx_user = new mx_user(); if (file_exists("./modcp.$phpEx")) // phpBB2 { define('PORTAL_BACKEND', 'phpbb2'); $tplEx = 'tpl'; // // Start user session // - populate $userdata and $lang // $mx_user->init($user_ip, $page_id, false); init_userprefs($userdata); $mx_user->set_module_default_style('prosilver'); // For compatibility with core 2.8.x if (!$userdata['user_level'] == ADMIN) { die('Only admins may run this script!!!'); } } else if (@file_exists("./mcp.$phpEx")) // phpBB3 { define('PORTAL_BACKEND', 'phpbb3'); $tplEx = 'html'; // // Start user session // - populate $userdata and $lang // $mx_user->init($user_ip, $page_id, false); $user->setup(); // // End session management // $mx_user->set_module_default_style('prosilver'); // For compatibility with core 2.8.x if ($userdata['user_type'] != USER_FOUNDER) { die('Only admins may run this script!!!'); } } else { die('Copy this file in phpbb_root_path were is your viewtopic.php file!!!'); } } else // --------------------------------------------------------------------------------- mxBB Module MODE { define( 'MXBB_MODULE', true ); if ( !function_exists( 'read_block_config' ) ) { define( 'IN_PORTAL', true ); $mx_root_path = './../../'; $module_root_path = './'; $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 define( 'MXBB_27x', file_exists( $mx_root_path . 'mx_login.' . $phpEx ) ); } else { if( !defined('IN_PORTAL') || !is_object($mx_block)) { die("Hacking attempt"); } // // Read Block Settings (default mode) // $title = !empty( $mx_block->block_info['block_title'] ) ? $mx_block->block_info['block_title'] : $lang['KB_title']; $desc = $mx_block->block_info['block_desc']; $block_size = ( isset( $block_size ) && !empty( $block_size ) ? $block_size : '100%' ); //Check for cash mod if (file_exists($phpbb_root_path . 'includes/functions_cash.'.$phpEx)) { define('IN_CASHMOD', true); } $is_block = true; global $images; } define( 'MXBB_27x', @file_exists( $mx_root_path . 'mx_login.'.$phpEx ) ); } // // Check if mx_common Mod is prezent // if (!file_exists($mx_mod_path . "includes/functions_admincp.$phpEx")) { die('mx mod is not uploaded!!!'); } else { require($mx_mod_path . "includes/functions_admincp.$phpEx"); } // // Check if mx_common Mod is prezent // if ( !file_exists( $mx_mod_path . 'includes/' . 'functions_admincp.' . $phpEx ) ) { die('mx_mod folder is not uploaded!!!'); } else { include_once( $mx_mod_path . 'includes/' . 'functions_admincp.' . $phpEx ); include_once( $mx_mod_path . 'includes/functions_required.' . $phpEx ); } $page_title = 'Installing/Upgrading Media Center'; include($phpbb_root_path . 'includes/page_header.'.$phpEx); $sql = array(); // If fresh install if ( !$result = $db->sql_query( "SELECT config_name from " . $table_prefix . "music_config" ) ) { $message = "<b>This is a fresh install!</b><br/><br/>"; $sql[] = "DROP TABLE IF EXISTS " . $table_prefix . "music"; $sql[] = "DROP TABLE IF EXISTS " . $table_prefix . "music_rate"; $sql[] = "DROP TABLE IF EXISTS " . $table_prefix . "music_comment"; $sql[] = "DROP TABLE IF EXISTS " . $table_prefix . "music_cat"; $sql[] = "DROP TABLE IF EXISTS " . $table_prefix . "music_config"; $sql[] = "CREATE TABLE ". $table_prefix . "music ( song_id int(11) UNSIGNED NOT NULL auto_increment, song_filename varchar(255) NOT NULL, song_filetype 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 ". $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 ". $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 ". $table_prefix . "music_cat ( cat_id mediumint(8) UNSIGNED NOT NULL auto_increment, cat_parent mediumint(8) UNSIGNED NOT NULL DEFAULT '0', cat_type tinyint NOT NULL DEFAULT '0', 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 " . $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 " . $table_prefix . "music_config VALUES ('max_songs', '1024')"; $sql[] = "INSERT INTO " . $table_prefix . "music_config VALUES ('user_songs_limit', '50')"; $sql[] = "INSERT INTO " . $table_prefix . "music_config VALUES ('mod_songs_limit', '250')"; $sql[] = "INSERT INTO " . $table_prefix . "music_config VALUES ('max_file_size', '3145728')"; $sql[] = "INSERT INTO " . $table_prefix . "music_config VALUES ('rows_per_page', '20')"; $sql[] = "INSERT INTO " . $table_prefix . "music_config VALUES ('cols_per_page', '1')"; $sql[] = "INSERT INTO " . $table_prefix . "music_config VALUES ('top', '5')"; $sql[] = "INSERT INTO " . $table_prefix . "music_config VALUES ('sort_method', 'song_time')"; $sql[] = "INSERT INTO " . $table_prefix . "music_config VALUES ('sort_order', 'DESC')"; $sql[] = "INSERT INTO " . $table_prefix . "music_config VALUES ('mp3_allowed', '1')"; $sql[] = "INSERT INTO " . $table_prefix . "music_config VALUES ('wav_allowed', '1')"; $sql[] = "INSERT INTO " . $table_prefix . "music_config VALUES ('wma_allowed', '1')"; $sql[] = "INSERT INTO " . $table_prefix . "music_config VALUES ('wmv_allowed', '1')"; $sql[] = "INSERT INTO " . $table_prefix . "music_config VALUES ('mid_allowed', '1')"; $sql[] = "INSERT INTO " . $table_prefix . "music_config VALUES ('ram_allowed', '1')"; $sql[] = "INSERT INTO " . $table_prefix . "music_config VALUES ('au_allowed', '1')"; $sql[] = "INSERT INTO " . $table_prefix . "music_config VALUES ('mpeg_allowed', '1')"; $sql[] = "INSERT INTO " . $table_prefix . "music_config VALUES ('avi_allowed', '1')"; $sql[] = "INSERT INTO " . $table_prefix . "music_config VALUES ('swf_allowed', '1')"; $sql[] = "INSERT INTO " . $table_prefix . "music_config VALUES ('qt_allowed', '1')"; $sql[] = "INSERT INTO " . $table_prefix . "music_config VALUES ('rm_allowed', '1')"; $sql[] = "INSERT INTO " . $table_prefix . "music_config VALUES ('desc_length', '512000')"; $sql[] = "INSERT INTO " . $table_prefix . "music_config VALUES ('hotlink_prevent', '0')"; $sql[] = "INSERT INTO " . $table_prefix . "music_config VALUES ('hotlink_allowed', 'cfmanager.gate2vn.net')"; $sql[] = "INSERT INTO " . $table_prefix . "music_config VALUES ('rate', '1')"; $sql[] = "INSERT INTO " . $table_prefix . "music_config VALUES ('rate_scale', '10')"; $sql[] = "INSERT INTO " . $table_prefix . "music_config VALUES ('comment', '1')"; $sql[] = "INSERT INTO " . $table_prefix . "music_config VALUES ('music_version', '.1.0')"; $sql[] = "INSERT INTO " . $table_prefix . "music_config VALUES ('max_image_size', '1024000')"; $sql[] = "INSERT INTO " . $table_prefix . "music_config VALUES ('max_image_width', '800')"; $sql[] = "INSERT INTO " . $table_prefix . "music_config VALUES ('max_image_height', '600')"; $sql[] = "INSERT INTO " . $table_prefix . "music_config VALUES ('download', '1')"; $sql[] = "INSERT INTO " . $table_prefix . "music_config VALUES ('enable_integration', '1')"; $sql[] = "INSERT INTO " . $table_prefix . "music_config VALUES ('override_default_pages', '0')"; $sql[] = "INSERT INTO " . $table_prefix . "music_config VALUES ('index', '5')"; $sql[] = "INSERT INTO " . $table_prefix . "music_config VALUES ('xs_enabled', '1')"; $sql[] = "INSERT INTO " . $table_prefix . "music_config VALUES ('img_allowed', '1')"; $sql[] = "INSERT INTO " . $table_prefix . "music_config VALUES ('flv_allowed', '1')"; $sql[] = "INSERT INTO " . $table_prefix . "music_config VALUES ('show_index_subcats', '1')"; $sql[] = "INSERT INTO " . $table_prefix . "music_config VALUES ('rows_per_page_pic', '5')"; $sql[] = "INSERT INTO " . $table_prefix . "music_config VALUES ('cols_per_page_pic', '5')"; $sql[] = "INSERT INTO " . $table_prefix . "music_config VALUES ('rows_per_page_media', '10')"; $sql[] = "INSERT INTO " . $table_prefix . "music_config VALUES ('cols_per_page_media', '1')"; $message .= mx_do_install_upgrade( $sql ); } else { // // Upgrade checks // $upgrade_206 = 0; $upgrade_207 = 0; // // validate before 2.06 // $result = $db->sql_query( "SELECT config_value from " . $table_prefix . "music_config WHERE config_name = 'enable_integration'" ); if ( $db->sql_numrows( $result ) == 0 ) { $upgrade_206 = 1; } // // validate before 2.07 // $result = $db->sql_query( "SELECT config_value from " . $table_prefix . "music_config WHERE config_name = 'xs_enabled'" ); if ( $db->sql_numrows( $result ) == 0 ) { $upgrade_207 = 1; } $message = "<b>Upgrading!</b><br/><br/>"; if ( $upgrade_206 == 1 ) { $message .= "<b>Upgrading to v. 2.06 ...</b><br/><br/>"; $sql[] = "ALTER TABLE " . $table_prefix . "music ADD song_imagename VARCHAR(255) not null AFTER song_filename"; $sql[] = "ALTER TABLE " . $table_prefix . "music ADD song_download_count VARCHAR(255) not null DEFAULT '0' AFTER song_approval"; $sql[] = "ALTER TABLE " . $table_prefix . "music_cat ADD cat_views mediumint(8) NOT NULL"; $sql[] = "INSERT INTO " . $table_prefix . "music_config VALUES ('wmv_allowed', '1')"; $sql[] = "INSERT INTO " . $table_prefix . "music_config VALUES ('mid_allowed', '1')"; $sql[] = "INSERT INTO " . $table_prefix . "music_config VALUES ('ram_allowed', '1')"; $sql[] = "INSERT INTO " . $table_prefix . "music_config VALUES ('au_allowed', '1')"; $sql[] = "INSERT INTO " . $table_prefix . "music_config VALUES ('mpeg_allowed', '1')"; $sql[] = "INSERT INTO " . $table_prefix . "music_config VALUES ('avi_allowed', '1')"; $sql[] = "INSERT INTO " . $table_prefix . "music_config VALUES ('swf_allowed', '1')"; $sql[] = "INSERT INTO " . $table_prefix . "music_config VALUES ('qt_allowed', '1')"; $sql[] = "INSERT INTO " . $table_prefix . "music_config VALUES ('rm_allowed', '1')"; $sql[] = "INSERT INTO " . $table_prefix . "music_config VALUES ('max_image_size', '1024000')"; $sql[] = "INSERT INTO " . $table_prefix . "music_config VALUES ('max_image_width', '800')"; $sql[] = "INSERT INTO " . $table_prefix . "music_config VALUES ('max_image_height', '600')"; $sql[] = "INSERT INTO " . $table_prefix . "music_config VALUES ('download', '1')"; $sql[] = "INSERT INTO " . $table_prefix . "music_config VALUES ('enable_integration', '1')"; $sql[] = "INSERT INTO " . $table_prefix . "music_config VALUES ('override_default_pages', '0')"; $sql[] = "INSERT INTO " . $table_prefix . "music_config VALUES ('index', '5')"; } if ( $upgrade_207 == 1 ) { $message .= "<b>Upgrading to v. 2.0.7...</b><br/><br/>"; $sql[] = "INSERT INTO " . $table_prefix . "music_config VALUES ('xs_enabled', '1')"; $sql[] = "INSERT INTO " . $table_prefix . "music_config VALUES ('img_allowed', '1')"; $sql[] = "INSERT INTO " . $table_prefix . "music_config VALUES ('flv_allowed', '1')"; $sql[] = "INSERT INTO " . $table_prefix . "music_config VALUES ('show_index_subcats', '1')"; $sql[] = "INSERT INTO " . $table_prefix . "music_config VALUES ('rows_per_page_pic', '5')"; $sql[] = "INSERT INTO " . $table_prefix . "music_config VALUES ('cols_per_page_pic', '5')"; $sql[] = "INSERT INTO " . $table_prefix . "music_config VALUES ('rows_per_page_media', '10')"; $sql[] = "INSERT INTO " . $table_prefix . "music_config VALUES ('cols_per_page_media', '1')"; $sql[] = "ALTER TABLE " . $table_prefix . "music_cat ADD cat_parent mediumint(8) UNSIGNED NOT NULL DEFAULT '0' AFTER cat_id"; $sql[] = "ALTER TABLE " . $table_prefix . "music_cat ADD cat_type tinyint NOT NULL DEFAULT '0' AFTER cat_parent"; $sql[] = "ALTER TABLE " . $table_prefix . "music ADD song_filetype varchar(255) NOT NULL AFTER song_filename"; $sql[] = "UPDATE ". $table_prefix ."music_config SET config_value = '0.7' WHERE config_name = 'music_version'"; } else { $message .= "<b>Nothing to upgrade...</b><br/><br/>"; } $message .= mx_do_install_upgrade( $sql ); // // Empty module cache // include_once( $mx_mod_path . 'includes/functions_tools.' . $phpEx ); $module_cache = new module_cache($root_path); $module_cache->tidy(); $module_cache->save(); } echo "<br /><br />"; echo "<table width=\"90%\" align=\"center\" cellpadding=\"4\" cellspacing=\"1\" border=\"0\" class=\"forumline\">"; echo "<tr><th class=\"thHead\" align=\"center\">Mod Installation/Upgrading/Uninstalling Information - mod specific db tables</th></tr>"; echo "<tr><td class=\"row1\" align=\"left\"><span class=\"gen\">" . $message . "</span></td></tr>"; echo "</table><br />"; include($phpbb_root_path . 'includes/page_tail.'.$phpEx); ?> --- NEW FILE: music_db_uninstall.php --- <?php /** * * @package phpBB2 Mod - pafileDB * @version $Id: music_db_uninstall.php,v 1.1.2.1 2008/03/08 15:42:47 orynider Exp $ * @copyright (c) 2002-2006 [Jon Ohlsson, Mohd Basri, wGEric, PHP Arena, pafileDB, CRLin] mxBB Project Team * @license http://opensource.org/licenses/gpl-license.php GNU General Public License v2 * */ $phpEx = substr(strrchr(__FILE__, '.'), 1); if ( !defined('PORTAL_BACKEND') && @file_exists( './viewtopic.' . $phpEx ) ) // -------------------------------------------- phpBB MOD MODE { define( 'MXBB_MODULE', false ); define( 'IN_PHPBB', true ); $phpbb_root_path = $module_root_path = './'; $mx_mod_path = $phpbb_root_path . 'mx_mod/'; include($phpbb_root_path . 'common.' . $phpEx); include($mx_mod_path . "includes/functions_required.$phpEx"); //Check if forum_hack is installed if (!isset($mx_root_path)) { $mx_root_path = './'; @define('IN_PORTAL', true); include_once($mx_mod_path . "includes/mx_constants.$phpEx"); include_once($mx_mod_path . "includes/shared/phpbb2/includes/functions.$phpEx"); } else { @define('IN_PORTAL', true); include_once($mx_root_path . "includes/mx_constants.$phpEx"); include_once($mx_root_path . "includes/shared/phpbb2/includes/functions.$phpEx"); } require($mx_mod_path . "includes/functions_core.$phpEx"); require($mx_mod_path . "includes/functions_styles.$phpEx"); //Check for cash mod if (file_exists($phpbb_root_path . 'includes/functions_cash.'.$phpEx)) { define('IN_CASHMOD', true); } //@ini_set( 'display_errors', '1' ); error_reporting (E_ERROR | E_WARNING | E_PARSE); // This will NOT report uninitialized variables //error_reporting(E_ALL & ~E_NOTICE); define( 'PAGE_KB', -502 ); // If this id generates a conflict with other mods, change it ;) // // Instatiate the mx_cache class // $mx_cache = new mx_cache(); // // Get mxBB config settings // //$portal_config = $mx_cache->obtain_mxbb_config(); // // instatiate the mx_request_vars class // $mx_request_vars = new mx_request_vars(); // // Page selector // $page_id = $mx_request_vars->request('page', MX_TYPE_INT, 1); $is_block = false; // // instatiate the mx_user class // $mx_user = new mx_user(); if (file_exists("./modcp.$phpEx")) // phpBB2 { define('PORTAL_BACKEND', 'phpbb2'); $tplEx = 'tpl'; // // Start user session // - populate $userdata and $lang // $mx_user->init($user_ip, $page_id, false); init_userprefs($userdata); $mx_user->set_module_default_style('prosilver'); // For compatibility with core 2.8.x if (!$userdata['user_level'] == ADMIN) { die('Only admins may run this script!!!'); } } else if (@file_exists("./mcp.$phpEx")) // phpBB3 { define('PORTAL_BACKEND', 'phpbb3'); $tplEx = 'html'; // // Start user session // - populate $userdata and $lang // $mx_user->init($user_ip, $page_id, false); $user->setup(); // // End session management // $mx_user->set_module_default_style('prosilver'); // For compatibility with core 2.8.x if ($userdata['user_type'] != USER_FOUNDER) { die('Only admins may run this script!!!'); } } else { die('Copy this file in phpbb_root_path were is your viewtopic.php file!!!'); } } else // --------------------------------------------------------------------------------- mxBB Module MODE { define( 'MXBB_MODULE', true ); if ( !function_exists( 'read_block_config' ) ) { define( 'IN_PORTAL', true ); $mx_root_path = './../../'; $module_root_path = './'; $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 define( 'MXBB_27x', file_exists( $mx_root_path . 'mx_login.' . $phpEx ) ); } else { if( !defined('IN_PORTAL') || !is_object($mx_block)) { die("Hacking attempt"); } // // Read Block Settings (default mode) // $title = !empty( $mx_block->block_info['block_title'] ) ? $mx_block->block_info['block_title'] : $lang['KB_title']; $desc = $mx_block->block_info['block_desc']; $block_size = ( isset( $block_size ) && !empty( $block_size ) ? $block_size : '100%' ); //Check for cash mod if (file_exists($phpbb_root_path . 'includes/functions_cash.'.$phpEx)) { define('IN_CASHMOD', true); } $is_block = true; global $images; } define( 'MXBB_27x', @file_exists( $mx_root_path . 'mx_login.'.$phpEx ) ); } // // Check if mx_common Mod is prezent // if (!file_exists($mx_mod_path . "includes/functions_admincp.$phpEx")) { die('mx mod is not uploaded!!!'); } else { require($mx_mod_path . "includes/functions_admincp.$phpEx"); } $page_title = 'Uninstalling Media Center'; include($phpbb_root_path . 'includes/page_header.'.$phpEx); $sql = array( "DROP TABLE " . $table_prefix . "music", "DROP TABLE " . $table_prefix . "music_rate", "DROP TABLE " . $table_prefix . "music_comment", "DROP TABLE " . $table_prefix . "music_config" ); echo "<br /><br />"; echo "<table width=\"90%\" align=\"center\" cellpadding=\"4\" cellspacing=\"1\" border=\"0\" class=\"forumline\">"; echo "<tr><th class=\"thHead\" align=\"center\">Mod Installation/Upgrading/Uninstalling Information - mod specific db tables</th></tr>"; echo "<tr><td class=\"row1\" align=\"left\"><span class=\"gen\">" . mx_do_install_upgrade( $sql ) . "</span></td></tr>"; echo "</table><br />"; include($phpbb_root_path . 'includes/page_tail.'.$phpEx); ?> Index: music.php =================================================================== RCS file: /cvsroot/mxbb/mx_music/music.php,v retrieving revision 1.8.2.4 retrieving revision 1.8.2.5 diff -C2 -d -r1.8.2.4 -r1.8.2.5 *** music.php 31 Jan 2008 04:16:25 -0000 1.8.2.4 --- music.php 8 Mar 2008 15:42:44 -0000 1.8.2.5 *************** *** 15,53 **** @ini_set( 'display_errors', '1' ); ! if ( file_exists( './viewtopic.php' ) ) // -------------------------------------------- phpBB MOD MODE ! { ! define( 'MXBB_MODULE', false ); ! define( 'IN_PHPBB', true ); ! define( 'IN_PORTAL', true ); ! define( 'IN_DOWNLOAD', true ); ! // When run as a phpBB mod these paths are identical ;) ! $phpbb_root_path = $module_root_path = $mx_root_path = './'; $mx_mod_path = $phpbb_root_path . 'mx_mod/'; ! $phpEx = substr(strrchr(__FILE__, '.'), 1); ! include( $phpbb_root_path . 'common.' . $phpEx ); ! ! include_once( $phpbb_root_path . 'includes/bbcode.' . $phpEx ); ! include_once( $phpbb_root_path . 'includes/functions_post.' . $phpEx ); ! include_once( $mx_mod_path . 'includes/functions_required.' . $phpEx ); ! include_once( $mx_mod_path . 'includes/functions_core.' . $phpEx ); ! define( 'PAGE_DOWNLOAD', -501 ); // If this id generates a conflict with other mods, change it ;) ! // Start session management ! $userdata = session_pagestart( $user_ip, PAGE_DOWNLOAD ); ! init_userprefs( $userdata ); - // End session management // // Instatiate the mx_cache class // $mx_cache = new mx_cache(); ! // // Get mxBB config settings // ! $portal_config = $mx_cache->obtain_mxbb_config(); // --- 15,73 ---- @ini_set( 'display_errors', '1' ); ! $phpEx = substr(strrchr(__FILE__, '.'), 1); ! if ( !defined('PORTAL_BACKEND') && @file_exists( './viewtopic.' . $phpEx ) ) // -------------------------------------------- phpBB MOD MODE ! { ! define('MXBB_MODULE', false); ! define('IN_PHPBB', true); ! ! $phpbb_root_path = $module_root_path = './'; $mx_mod_path = $phpbb_root_path . 'mx_mod/'; + + include($phpbb_root_path . 'common.' . $phpEx); + include($mx_mod_path . "includes/functions_required.$phpEx"); + + //Check if forum_hack is installed + if (!isset($mx_root_path)) + { + $mx_root_path = './'; + @define('IN_PORTAL', true); + include_once($mx_mod_path . "includes/mx_constants.$phpEx"); + include_once($mx_mod_path . "includes/shared/phpbb2/includes/functions.$phpEx"); + } + else + { + @define('IN_PORTAL', true); + include_once($mx_root_path . "includes/mx_constants.$phpEx"); + include_once($mx_root_path . "includes/shared/phpbb2/includes/functions.$phpEx"); ! //Redefine mx_root_path to include phpbb page_tail.php ! $mx_root_path = $phpbb_root_path; ! } ! ! require($mx_mod_path . "includes/functions_core.$phpEx"); ! require($mx_mod_path . "includes/functions_styles.$phpEx"); ! ! //Check for cash mod ! if (file_exists($phpbb_root_path . 'includes/functions_cash.'.$phpEx)) ! { ! define('IN_CASHMOD', true); ! } ! //@ini_set( 'display_errors', '1' ); ! error_reporting (E_ERROR | E_WARNING | E_PARSE); // This will NOT report uninitialized variables ! //error_reporting(E_ALL & ~E_NOTICE); ! define( 'PAGE_KB', -502 ); // If this id generates a conflict with other mods, change it ;) // // Instatiate the mx_cache class // $mx_cache = new mx_cache(); ! // // Get mxBB config settings // ! //$portal_config = $mx_cache->obtain_mxbb_config(); // *************** *** 55,60 **** --- 75,144 ---- // $mx_request_vars = new mx_request_vars(); + + // + // Page selector + // + $page_id = $mx_request_vars->request('page', MX_TYPE_INT, 1); $is_block = false; + + // + // instatiate the mx_user class + // + $mx_user = new mx_user(); + + if (file_exists("./modcp.$phpEx")) // phpBB2 + { + define('PORTAL_BACKEND', 'phpbb2'); + $tplEx = 'tpl'; + + // + // Start user session + // - populate $userdata and $lang + // + $mx_user->init($user_ip, $page_id, false); + //init_userprefs($userdata); + $mx_user->init_style(); //Overwrite template class + + /* + $mx_user->set_module_default_style('_core'); // For compatibility with core 2.8.x + if (!$userdata['user_level'] == ADMIN) + { + die('Only admins may run this script!!!'); + } + */ + include_once($phpbb_root_path . 'includes/bbcode.' . $phpEx); + include_once($phpbb_root_path . 'includes/functions_post.' . $phpEx); + + } + else if (@file_exists("./mcp.$phpEx")) // phpBB3 + { + define('PORTAL_BACKEND', 'phpbb3'); + $tplEx = 'html'; + + // + // Start user session + // - populate $userdata and $lang + // + $mx_user->init($user_ip, $page_id, false); + $user->setup(); + // + // End session management + // + + /* + $mx_user->set_module_default_style('_core'); // For compatibility with core 2.8.x + if ($userdata['user_type'] != USER_FOUNDER) + { + die('Only admins may run this script!!!'); + } + */ + include_once($mx_mod_path . "includes/shared/phpbb2/includes/bbcode.$phpEx"); + include_once($mx_mod_path . "includes/shared/phpbb2/includes/functions_post.$phpEx"); + } + else + { + die('Copy this file in phpbb_root_path were is your viewtopic.php file!!!'); + } } else *************** *** 82,86 **** if(!$result = $db->sql_query($sql)) { ! mx_message_die(GENERAL_ERROR, "Could not query Music Center module information", "", __LINE__, __FILE__, $sql); } $row = $db->sql_fetchrow($result); --- 166,170 ---- 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); *************** *** 104,108 **** } ! global $images, $mx_images; } } --- 188,192 ---- } ! global $images; } } *************** *** 216,219 **** --- 300,316 ---- else { + + /* + +---------------------------------------------------------- + | Start output the page + +---------------------------------------------------------- + */ + + $page_title = $lang['Music']; + + if ( !is_object($mx_block)) + { + include($mx_root_path . 'includes/page_header.'.$phpEx); + } /* *************** *** 237,244 **** $template->assign_vars(array( ! 'U_VIEW_CAT_PARENT' => mx_append_sid(this_mo_mxurl("c=" . $thiscat_parent['cat_id'])), ! 'SUBCAT_NAV' => ' ' . $lang['Nav_Separator'] . ' <a class="nav" href="' . mx_append_sid(this_mo_mxurl("c=" . $thiscat_parent['cat_id'])) . '">' . $thiscat_parent['cat_title'] . '</a>', 'CAT_PARENT_TITLE' => $thiscat_parent['cat_title'], ! 'U_RSS' => mx_append_sid(this_mo_mxurl("music_mode=music_rss&c=" . $thiscat_parent['cat_id'] . "&sid=" . $userdata['session_id'], true)), 'CAT_PARENT' => $thiscat_parent['cat_id']) ); --- 334,341 ---- $template->assign_vars(array( ! 'U_VIEW_CAT_PARENT' => append_sid(this_mo_mxurl("c=" . $thiscat_parent['cat_id'])), ! 'SUBCAT_NAV' => ' ' . $lang['Nav_Separator'] . ' <a class="nav" href="' . append_sid(this_mo_mxurl("c=" . $thiscat_parent['cat_id'])) . '">' . $thiscat_parent['cat_title'] . '</a>', 'CAT_PARENT_TITLE' => $thiscat_parent['cat_title'], ! 'U_RSS' => append_sid(this_mo_mxurl("music_mode=music_rss&c=" . $thiscat_parent['cat_id'] . "&sid=" . $userdata['session_id'], true)), 'CAT_PARENT' => $thiscat_parent['cat_id']) ); *************** *** 248,252 **** { $template->assign_vars(array( ! 'U_RSS' => mx_append_sid(this_mo_mxurl("music_mode=music_rss" . "&sid=" . $userdata['session_id'], true)) )); --- 345,349 ---- { $template->assign_vars(array( ! 'U_RSS' => append_sid(this_mo_mxurl("music_mode=music_rss" . "&sid=" . $userdata['session_id'], true)) )); *************** *** 324,328 **** for ($j = 0; $j < count($grouprows); $j++) { ! $group_link = '<a href="'. mx_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; --- 421,425 ---- 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; *************** *** 380,384 **** // Write the Date // ---------------------------- ! $last_song_info = (@function_exists( 'create_date' )) ? create_date($board_config['default_dateformat'], $lastrow['song_time'], $board_config['board_timezone']) : phpBB2::create_date($board_config['default_dateformat'], $lastrow['song_time'], $board_config['board_timezone']); $last_song_info .= '<br />'; --- 477,483 ---- // Write the Date // ---------------------------- ! ! $last_song_info = create_date($board_config['default_dateformat'], $lastrow['song_time'], $board_config['board_timezone']); ! $last_song_info .= '<br />'; *************** *** 394,398 **** else { ! $last_song_info .= $lang['Poster'] .': <a href="'. mx_append_sid($phpbb_root_path . "profile.$phpEx?mode=viewprofile&". POST_USERS_URL .'='. $lastrow['user_id']) .'">'. $lastrow['username'] .'</a>'; } --- 493,497 ---- 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>'; } *************** *** 417,421 **** $last_song_info .= '<br />'. $lang['Song_Title'] .': <a href="'; ! $last_song_info .= mx_append_sid(this_mo_mxurl("music_mode=music_page&song_id=". $lastrow['song_id'])) .'">' ; $last_song_info .= $lastrow['song_title'] .'</a>'; --- 516,520 ---- $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>'; *************** *** 424,430 **** $template->assign_block_vars('catrow', array( ! 'U_VIEW_CAT' => mx_append_sid(this_mo_mxurl("music_mode=music_cat&cat_id=". $catrows[$i]['cat_id'])), ! 'U_VIEW_PIC_CAT' => mx_append_sid(this_mo_mxurl("music_mode=music_pic_cat&cat_id=". $catrows[$i]['cat_id'])), ! 'U_VIEW_MEDIA_CAT' => mx_append_sid(this_mo_mxurl("music_mode=music_media_cat&cat_id=". $catrows[$i]['cat_id'])), 'CAT_TITLE' => $catrows[$i]['cat_title'], 'CAT_DESC' => $catrows[$i]['cat_desc'], --- 523,529 ---- $template->assign_block_vars('catrow', array( ! 'U_VIEW_CAT' => append_sid(this_mo_mxurl("music_mode=music_cat&cat_id=". $catrows[$i]['cat_id'])), ! 'U_VIEW_PIC_CAT' => append_sid(this_mo_mxurl("music_mode=music_pic_cat&cat_id=". $catrows[$i]['cat_id'])), ! 'U_VIEW_MEDIA_CAT' => append_sid(this_mo_mxurl("music_mode=music_media_cat&cat_id=". $catrows[$i]['cat_id'])), 'CAT_TITLE' => $catrows[$i]['cat_title'], 'CAT_DESC' => $catrows[$i]['cat_desc'], *************** *** 512,516 **** if ( !($sc_result = $db->sql_query($sc_sql)) ) { ! mx_message_die(GENERAL_ERROR, 'Could not query sub categories', '', __LINE__, __FILE__, $sql); } --- 611,615 ---- if ( !($sc_result = $db->sql_query($sc_sql)) ) { ! message_die(GENERAL_ERROR, 'Could not query sub categories', '', __LINE__, __FILE__, $sql); } *************** *** 531,540 **** while ( $subcatrow = $db->sql_fetchrow($sc_result) ) { ! $subcats .= ' - <a class="gensmall" href="' . mx_append_sid(this_mo_mxurl('music_mode=music_cat&cat_id='. $subcatrow['cat_id'])) . '">' . $subcatrow['cat_title'] . '</a><br />'; } $subcats .= '</span><br />'; $template->assign_block_vars('catrow', array( ! 'U_VIEW_CAT' => mx_append_sid(this_mo_mxurl("music_mode=music_index&c=". $catrows[$i]['cat_id'])), 'CAT_TITLE' => $catrows[$i]['cat_title'], 'CAT_DESC' => $catrows[$i]['cat_desc'], --- 630,639 ---- while ( $subcatrow = $db->sql_fetchrow($sc_result) ) { ! $subcats .= ' - <a class="gensmall" href="' . append_sid(this_mo_mxurl('music_mode=music_cat&cat_id='. $subcatrow['cat_id'])) . '">' . $subcatrow['cat_title'] . '</a><br />'; } $subcats .= '</span><br />'; $template->assign_block_vars('catrow', array( ! 'U_VIEW_CAT' => append_sid(this_mo_mxurl("music_mode=music_index&c=". $catrows[$i]['cat_id'])), 'CAT_TITLE' => $catrows[$i]['cat_title'], 'CAT_DESC' => $catrows[$i]['cat_desc'], *************** *** 721,725 **** $template->assign_block_vars('top_songs.top_row', array( ! 'U_SONG' => mx_append_sid(this_mo_mxurl("music_mode=music_page&song_id=". $topsongrow[$j]['song_id'])), 'DESC' => $topsongrow[$j]['song_desc'] ) --- 820,824 ---- $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'] ) *************** *** 732,757 **** else { ! $top_poster = '<a href="'. mx_append_sid($phpbb_root_path . "profile.$phpEx?mode=viewprofile&". POST_USERS_URL .'='. $topsongrow[$j]['user_id']) .'">'. $topsongrow[$j]['username'] .'</a>'; } - $song_user_ip = (@function_exists( 'decode_ip' )) ? decode_ip($topsongrow[$j]['song_user_ip']) : phpBB2::decode_ip($topsongrow[$j]['song_user_ip']); - - $template->assign_block_vars('top_songs.top_detail', array( ! 'TITLE' => '<a href="'. mx_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' => (@function_exists( 'create_date' )) ? create_date($board_config['default_dateformat'], $topsongrow[$j]['song_time'], $board_config['board_timezone']) : phpBB2::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="'. mx_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="'. mx_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=' . $song_user_ip . '" target="_blank">' . $song_user_ip .'</a><br />' : '' ) ); --- 831,850 ---- 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 />' : '' ) ); *************** *** 840,844 **** $template->assign_block_vars('top_songs.top_row', array( ! 'U_SONG' => mx_append_sid(this_mo_mxurl("music_mode=music_page&song_id=". $topsongrow[$j]['song_id'])), 'DESC' => $topsongrow[$j]['song_desc'] ) --- 933,937 ---- $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'] ) *************** *** 851,875 **** else { ! $top_poster = '<a href="'. mx_append_sid($phpbb_root_path . "profile.$phpEx?mode=viewprofile&". POST_USERS_URL .'='. $topsongrow[$j]['user_id']) .'">'. $topsongrow[$j]['username'] .'</a>'; } - $song_user_ip = (@function_exists( 'decode_ip' )) ? decode_ip($topsongrow[$j]['song_user_ip']) : phpBB2::decode_ip($topsongrow[$j]['song_user_ip']); - $template->assign_block_vars('top_songs.top_detail', array( ! 'TITLE' => '<a href="'. mx_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' => (@function_exists( 'create_date' )) ? create_date($board_config['default_dateformat'], $topsongrow[$j]['song_time'], $board_config['board_timezone']) : phpBB2::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="'. mx_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="'. mx_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=' . $song_user_ip . '" target="_blank">' . $song_user_ip .'</a><br />' : '' ) ); --- 944,963 ---- 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 />' : '' ) ); *************** *** 933,949 **** - /* - +---------------------------------------------------------- - | 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') --- 1021,1024 ---- *************** *** 956,960 **** 'L_LAST_SONG' => $lang['Last_Song'], ! 'S_MUSIC_ACTION' => mx_append_sid(this_mo_mxurl()), 'S_ROWS' => $music_config['rows_per_page'], --- 1031,1035 ---- 'L_LAST_SONG' => $lang['Last_Song'], ! 'S_MUSIC_ACTION' => append_sid(this_mo_mxurl()), 'S_ROWS' => $music_config['rows_per_page'], *************** *** 972,976 **** 'L_PUBLIC_CATS' => $lang['Public_Categories'], 'L_SEARCH_SONGS' => $lang['Search_song'], ! 'S_MUSIC_LIST' => mx_append_sid(this_mo_mxurl("music_mode=music_list")), 'L_TIME' => $lang['Time'], --- 1047,1051 ---- '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'], |
|
From: OryNider <ory...@us...> - 2008-03-08 15:43:25
|
Update of /cvsroot/mxbb/mx_music/music_box/includes In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv31978/music_box/includes Modified Files: Tag: core28x music_constants.php music_functions.php music_integration.php Log Message: update for new mx_mod 2.8.2 Index: music_constants.php =================================================================== RCS file: /cvsroot/mxbb/mx_music/music_box/includes/music_constants.php,v retrieving revision 1.1.2.2 retrieving revision 1.1.2.3 diff -C2 -d -r1.1.2.2 -r1.1.2.3 *** music_constants.php 31 Jan 2008 04:16:58 -0000 1.1.2.2 --- music_constants.php 8 Mar 2008 15:42:47 -0000 1.1.2.3 *************** *** 61,63 **** --- 61,95 ---- !defined('MUSIC_RATE_TABLE') ? define('MUSIC_RATE_TABLE', $mx_table_prefix.'music_rate') : false; + // ------------------------------------------------------------------------- + // Footer Copyrights + // ------------------------------------------------------------------------- + if ( !MXBB_MODULE || MXBB_27x ) + { + if (!defined( 'IN_ADMIN' )) + { + $mx_user->set_module_cfg_name('music'); + $mx_user->set_module_lang_path($module_root_path . 'music_box/'); + $mx_user->extend(MX_LANG_ALL, MX_IMAGES); + } + } + else + { + if (!$_GET['print']) // Do not "fix" with reuest wrapper!! + { + $mx_user->set_module_default_style('_core'); // For compatibility with core 2.8.x + } + + if (is_object($mx_page)) + { + // ------------------------------------------------------------------------- + // Extend User Style with module lang and images + // Usage: $mx_user->extend(LANG, IMAGES) + // Switches: + // - LANG: MX_LANG_MAIN (default), MX_LANG_ADMIN, MX_LANG_ALL, MX_LANG_NONE + // - IMAGES: MX_IMAGES (default), MX_IMAGES_NONE + // ------------------------------------------------------------------------- + $mx_user->extend(MX_LANG_ALL, MX_IMAGES); + } + } + ?> \ No newline at end of file |
|
From: OryNider <ory...@us...> - 2008-03-08 15:43:23
|
Update of /cvsroot/mxbb/mx_music/music_box In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv31978/music_box Modified Files: Tag: core28x music_common.php Log Message: update for new mx_mod 2.8.2 Index: music_common.php =================================================================== RCS file: /cvsroot/mxbb/mx_music/music_box/music_common.php,v retrieving revision 1.5.2.2 retrieving revision 1.5.2.3 diff -C2 -d -r1.5.2.2 -r1.5.2.3 *** music_common.php 31 Jan 2008 04:16:25 -0000 1.5.2.2 --- music_common.php 8 Mar 2008 15:42:48 -0000 1.5.2.3 *************** *** 28,35 **** include_once($music_root_path . 'includes/' . 'music_constants.'.$phpEx); // ********************************************************************** // Read language definition // ********************************************************************** - if ( !MXBB_MODULE ) { --- 28,35 ---- include_once($music_root_path . 'includes/' . 'music_constants.'.$phpEx); + /* // ********************************************************************** // Read language definition // ********************************************************************** if ( !MXBB_MODULE ) { *************** *** 58,62 **** } } ! // ********************************************************************** // Read theme definition and language in theme definition --- 58,63 ---- } } ! */ ! /* // ********************************************************************** // Read theme definition and language in theme definition *************** *** 69,73 **** if ( !($result = $db->sql_query($sql)) ) { ! mx_message_die(CRITICAL_ERROR, 'Could not query database for theme info'); } --- 70,74 ---- if ( !($result = $db->sql_query($sql)) ) { ! message_die(CRITICAL_ERROR, 'Could not query database for theme info'); } *************** *** 89,93 **** if ( !($result = $db->sql_query($sql)) ) { ! mx_message_die(CRITICAL_ERROR, 'Could not query database for theme info'); } --- 90,94 ---- if ( !($result = $db->sql_query($sql)) ) { ! message_die(CRITICAL_ERROR, 'Could not query database for theme info'); } *************** *** 99,108 **** else { ! mx_message_die(CRITICAL_ERROR, "Could not get theme data for themes_id [$style]"); } } else { ! mx_message_die(CRITICAL_ERROR, "Could not get theme data for themes_id [$style]"); } } --- 100,109 ---- else { ! message_die(CRITICAL_ERROR, "Could not get theme data for themes_id [$style]"); } } else { ! message_die(CRITICAL_ERROR, "Could not get theme data for themes_id [$style]"); } } *************** *** 165,168 **** --- 166,170 ---- } } + */ // *************** *** 173,177 **** if(!$result = $db->sql_query($sql)) { ! mx_message_die(GENERAL_ERROR, "Could not query music config information", "", __LINE__, __FILE__, $sql); } while( $row = $db->sql_fetchrow($result) ) --- 175,179 ---- if(!$result = $db->sql_query($sql)) { ! message_die(GENERAL_ERROR, "Could not query music config information", "", __LINE__, __FILE__, $sql); } while( $row = $db->sql_fetchrow($result) ) *************** *** 236,245 **** 'MUSIC_COPYRIGHT' => $music_module_copyright, 'L_INDEX' => '<<', ! 'U_INDEX' => mx_append_sid($mx_root_path . "index.".$phpEx), 'L_MUSIC_INDEX' => $lang['Music'], 'L_MUSIC' => $lang['Music'], ! 'U_MUSIC' => mx_append_sid(this_mo_mxurl()), 'L_SEARCH' => $lang['Search'], ! 'U_MX_MUSIC' => mx_append_sid(this_mo_portalurl()) ) ); --- 238,247 ---- 'MUSIC_COPYRIGHT' => $music_module_copyright, 'L_INDEX' => '<<', ! 'U_INDEX' => append_sid($mx_root_path . "index.".$phpEx), 'L_MUSIC_INDEX' => $lang['Music'], 'L_MUSIC' => $lang['Music'], ! 'U_MUSIC' => append_sid(this_mo_mxurl()), 'L_SEARCH' => $lang['Search'], ! 'U_MX_MUSIC' => append_sid(this_mo_portalurl()) ) ); |
|
From: OryNider <ory...@us...> - 2008-03-08 15:43:06
|
Update of /cvsroot/mxbb/mx_music/templates/subSilver In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv31978/templates/subSilver Added Files: Tag: core28x music.cfg Log Message: update for new mx_mod 2.8.2 --- NEW FILE: music.cfg --- <?php /** * * @package mxBB Portal Module - mx_music * @version $Id: music.cfg,v 1.1.2.1 2008/03/08 15:43:00 orynider Exp $ * @copyright (c) 2002-2006 mxBB Development Team * @license http://opensource.org/licenses/gpl-license.php GNU General Public License v2 * */ // // ** Configuration file for subSilver template ** // // ** copyright (C) 2001 The phpBB Group ** // ** Created by subBlue design ** // ** www.subBlue.com ** // // ** subSilver dev. forum: www.subSky.com/phpBB2/ ** // // $Id: music.cfg,v 1.1.2.1 2008/03/08 15:43:00 orynider Exp $ // // Please note that to enable support of different languages // the ". LANG ." place holder is available. This will be replaced // with xxx where xxx is the users selected language. If // that language isn't available it will default to english. // Therefore you MUST ensure you have at least a english // directory if you choose to localise your template // // // Do not alter this line! // @define(MX_TEMPLATE_CONFIG, TRUE); $mx_template_config = true; $mx_template_name = 'subSilver'; // ------------------------------------------------------------------------- // Prefix with PORTAL_URL // ------------------------------------------------------------------------- // $current_template_images = PORTAL_URL . $current_template_path . "/images"; $current_template_images = $module_root_path . "templates/". $mx_template_name ."/images"; $current_template_phpbb_images = PHPBB_URL . "templates/". $mx_template_name ."/images"; // phpBB graphics template if ( !file_exists( $current_template_images . '/lang_' . $board_config['default_lang'] ) ) { $link_language='lang_english'; } else { $link_language='lang_' . $board_config['default_lang']; } define('LANG', $link_language); // ------------------------------------------------------------------------- // (Re)Define images // ------------------------------------------------------------------------- // MOM Pics $mx_images['upload_song'] = "$current_template_images/" . LANG . "/upload_song.gif"; $mx_images['no_image'] = "$current_template_images/no_image.gif"; // Use standard phpBB graphics // $mx_images['icon_quote'] = "$current_template_phpbb_images/" . LANG . "/icon_quote.gif"; $mx_images['icon_edit'] = "$current_template_phpbb_images/" . LANG . "/icon_edit.gif"; $mx_images['icon_search'] = "$current_template_phpbb_images/" . LANG . "/icon_search.gif"; $mx_images['icon_profile'] = "$current_template_phpbb_images/" . LANG . "/icon_profile.gif"; $mx_images['icon_pm'] = "$current_template_phpbb_images/" . LANG . "/icon_pm.gif"; $mx_images['icon_email'] = "$current_template_phpbb_images/" . LANG . "/icon_email.gif"; $mx_images['icon_delpost'] = "$current_template_phpbb_images/icon_delete.gif"; $mx_images['icon_ip'] = "$current_template_phpbb_images/" . LANG . "/icon_ip.gif"; $mx_images['icon_www'] = "$current_template_phpbb_images/" . LANG . "/icon_www.gif"; $mx_images['icon_icq'] = "$current_template_phpbb_images/" . LANG . "/icon_icq_add.gif"; $mx_images['icon_aim'] = "$current_template_phpbb_images/" . LANG . "/icon_aim.gif"; $mx_images['icon_yim'] = "$current_template_phpbb_images/" . LANG . "/icon_yim.gif"; $mx_images['icon_msnm'] = "$current_template_phpbb_images/" . LANG . "/icon_msnm.gif"; $mx_images['icon_minipost'] = "$current_template_phpbb_images/icon_minipost.gif"; $mx_images['icon_gotopost'] = "$current_template_phpbb_images/icon_minipost.gif"; $mx_images['icon_minipost_new'] = "$current_template_phpbb_images/icon_minipost_new.gif"; $mx_images['icon_latest_reply'] = "$current_template_phpbb_images/icon_latest_reply.gif"; $mx_images['icon_newest_reply'] = "$current_template_phpbb_images/icon_newest_reply.gif"; $mx_images['forum'] = "$current_template_phpbb_images/folder_big.gif"; $mx_images['forum_new'] = "$current_template_phpbb_images/folder_new_big.gif"; $mx_images['forum_locked'] = "$current_template_phpbb_images/folder_locked_big.gif"; ?> |
|
From: OryNider <ory...@us...> - 2008-03-08 15:43:06
|
Update of /cvsroot/mxbb/mx_music/phpbb2/admin In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv31978/phpbb2/admin Added Files: Tag: core28x admin_music_auth.php admin_music_cat.php admin_music_cfg.php Log Message: update for new mx_mod 2.8.2 --- NEW FILE: admin_music_auth.php --- <?php /** * * @package mxBB Portal Module - mx_music * @version $Id: admin_music_auth.php,v 1.1.2.1 2008/03/08 15:42:58 orynider Exp $ * @copyright (c) 2003 [ory...@rd..., OryNider] mxBB Development Team * @license http://opensource.org/licenses/gpl-license.php GNU General Public License v2 * */ $phpEx = substr(strrchr(__FILE__, '.'), 1); if ( @file_exists( './../viewtopic.' . $phpEx ) ) // -------------------------------------------- phpBB MOD MODE { define('MXBB_MODULE', false); define('IN_PHPBB', true); $phpbb_root_path = $module_root_path = './../'; $mx_mod_path = $phpbb_root_path . 'mx_mod/'; require_once($mx_mod_path . "includes/functions_required.$phpEx"); @define('IN_PORTAL', true); //Check if forum_hack is installed if (!isset($mx_root_path)) { $mx_root_path = './../'; include_once($mx_mod_path . "includes/mx_constants.$phpEx"); include_once($mx_mod_path . "includes/shared/phpbb2/includes/functions.$phpEx"); } require_once($mx_mod_path . "includes/functions_core.$phpEx"); //Check for cash mod if (file_exists($phpbb_root_path . 'includes/functions_cash.'.$phpEx)) { define('IN_CASHMOD', true); } //@ini_set( 'display_errors', '1' ); error_reporting (E_ERROR | E_WARNING | E_PARSE); // This will NOT report uninitialized variables //error_reporting(E_ALL & ~E_NOTICE); define( 'PAGE_MUSIC', -506 ); // If this id generates a conflict with other mods, change it ;) // // Instatiate the mx_cache class // $mx_cache = new mx_cache(); // // instatiate the mx_request_vars class // $mx_request_vars = new mx_request_vars(); // // instatiate the mx_user class // //$mx_user = new mx_user(); // // Left Pane Paths // $setmodules_admin_path = ''; $setmodules_module_path = "./../"; if (file_exists($phpbb_root_path."modcp.$phpEx")) // phpBB2 { define('PORTAL_BACKEND', 'phpbb2'); $tplEx = 'tpl'; } else if (@file_exists($phpbb_root_path."mcp.$phpEx")) // phpBB3 { define('PORTAL_BACKEND', 'phpbb3'); $tplEx = 'html'; } } else { define( 'IN_PORTAL', 1 ); define( 'MXBB_MODULE', true ); // // Main paths // $mx_root_path = './../../../'; $module_root_path = './../../../modules/mx_music/'; $setmodules_admin_path = 'modules/mx_linkdb/admin/'; define( 'MXBB_27x', file_exists( $mx_root_path . 'mx_login.php' ) ); $phpEx = substr(strrchr(__FILE__, '.'), 1); } if ( !empty( $setmodules ) ) { $file = basename( __FILE__ ); $module['Music_Online']['Permissions'] = $setmodules_admin_path . $file; return; } $music_root_path = $module_root_path . 'music_box/'; // // Get general information // require($mx_root_path . 'admin/pagestart.' . $phpEx); if ( !MXBB_MODULE ) { require_once($mx_mod_path . "includes/functions_styles.$phpEx"); $mx_user = new mx_user(); // instatiate the mx_user class // // Define basic constants // $mx_user->page_id = 506; $mx_user->user_ip = $user_ip; $mx_user->_init_userprefs(); $mx_user->set_module_cfg_name('music'); $mx_user->set_module_lang_path($module_root_path . 'music_box/'); $mx_user->extend(); // Read language definition } require($music_root_path . 'music_common.'.$phpEx); // ********************************************************************** // Read language definition // ********************************************************************** if ( !MXBB_MODULE ) { if ( !file_exists( $module_root_path . 'music_box/language/lang_' . $board_config['default_lang'] . '/lang_admin_music.' . $phpEx ) ) { include( $module_root_path . 'music_box/language/lang_english/lang_admin_music.' . $phpEx ); } else { include( $module_root_path . 'music_box/language/lang_' . $board_config['default_lang'] . '/lang_admin_music.' . $phpEx ); } } else { if ( file_exists( $module_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_admin_music.' . $phpEx ) ) { include( $module_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_admin_music.' . $phpEx ); } else if ( file_exists( $module_root_path . 'language/lang_english/lang_admin_music.' . $phpEx ) ) { include( $module_root_path . 'language/lang_english/lang_admin_music.' . $phpEx ); } } if( !isset($HTTP_POST_VARS['submit']) ) { // Build the category selector $sql = "SELECT cat_id, cat_title, cat_order FROM ". MUSIC_CAT_TABLE ." ORDER BY cat_order ASC"; if( !$result = $db->sql_query($sql) ) { message_die(GENERAL_ERROR, 'Could not get Category list', '', __LINE__, __FILE__, $sql); } while( $row = $db->sql_fetchrow($result) ) { $catrows[] = $row; } for ($i = 0; $i < count($catrows); $i++) { $template->assign_block_vars('catrow', array( 'CAT_ID' => $catrows[$i]['cat_id'], 'CAT_TITLE' => $catrows[$i]['cat_title']) ); } $template->set_filenames(array( 'body' => 'admin/music_cat_select_body.tpl') ); $template->assign_vars(array( 'L_MUSIC_AUTH_TITLE' => $lang['Music_Auth_Title'], 'L_MUSIC_AUTH_EXPLAIN' => $lang['Music_Auth_Explain'], 'L_SELECT_CAT' => $lang['Select_a_Category'], 'S_MUSIC_ACTION' => append_sid("admin_music_auth.$phpEx"), 'L_LOOK_UP_CAT' => $lang['Look_up_Category']) ); $template->pparse('body'); include($mx_root_path . 'admin/page_footer_admin.'.$phpEx); } else { if( !isset($HTTP_GET_VARS['cat_id']) ) { $cat_id = intval($HTTP_POST_VARS['cat_id']); $template->set_filenames(array( 'body' => 'admin/music_auth_body.tpl') ); $template->assign_vars(array( 'L_MUSIC_AUTH_TITLE' => $lang['Music_Auth_Title'], 'L_MUSIC_AUTH_EXPLAIN' => $lang['Music_Auth_Explain'], 'L_SUBMIT' => $lang['Submit'], 'L_RESET' => $lang['Reset'], 'L_GROUPS' => $lang['Usergroups'], 'L_VIEW' => $lang['View'], 'L_UPLOAD' => $lang['Upload'], 'L_RATE' => $lang['Rate'], 'L_COMMENT' => $lang['Comment'], 'L_EDIT' => $lang['Edit'], 'L_DELETE' => $lang['Delete'], 'L_IS_MODERATOR' => $lang['Is_Moderator'], 'S_MUSIC_ACTION' => append_sid("admin_music_auth.$phpEx?cat_id=$cat_id"), ) ); // Get the list of phpBB usergroups $sql = "SELECT group_id, group_name FROM " . GROUPS_TABLE . " WHERE group_single_user <> " . TRUE ." ORDER BY group_name ASC"; if ( !($result = $db->sql_query($sql)) ) { message_die(GENERAL_ERROR, 'Could not get group list', '', __LINE__, __FILE__, $sql); } while( $row = $db->sql_fetchrow($result) ) { $groupdata[] = $row; } // Get info of this cat $sql = "SELECT cat_id, cat_title, cat_view_groups, cat_upload_groups, cat_rate_groups, cat_comment_groups, cat_edit_groups, cat_delete_groups, cat_moderator_groups FROM ". MUSIC_CAT_TABLE ." WHERE cat_id = '$cat_id'"; if( !$result = $db->sql_query($sql) ) { message_die(GENERAL_ERROR, 'Could not get Category information', '', __LINE__, __FILE__, $sql); } $thiscat = $db->sql_fetchrow($result); $view_groups = @explode(',', $thiscat['cat_view_groups']); $upload_groups = @explode(',', $thiscat['cat_upload_groups']); $rate_groups = @explode(',', $thiscat['cat_rate_groups']); $comment_groups = @explode(',', $thiscat['cat_comment_groups']); $edit_groups = @explode(',', $thiscat['cat_edit_groups']); $delete_groups = @explode(',', $thiscat['cat_delete_groups']); $moderator_groups = @explode(',', $thiscat['cat_moderator_groups']); for ($i = 0; $i < count($groupdata); $i++) { $template->assign_block_vars('grouprow', array( 'GROUP_ID' => $groupdata[$i]['group_id'], 'GROUP_NAME' => $groupdata[$i]['group_name'], 'VIEW_CHECKED' => (in_array($groupdata[$i]['group_id'], $view_groups)) ? 'checked="checked"' : '', 'UPLOAD_CHECKED' => (in_array($groupdata[$i]['group_id'], $upload_groups)) ? 'checked="checked"' : '', 'RATE_CHECKED' => (in_array($groupdata[$i]['group_id'], $rate_groups)) ? 'checked="checked"' : '', 'COMMENT_CHECKED' => (in_array($groupdata[$i]['group_id'], $comment_groups)) ? 'checked="checked"' : '', 'EDIT_CHECKED' => (in_array($groupdata[$i]['group_id'], $edit_groups)) ? 'checked="checked"' : '', 'DELETE_CHECKED' => (in_array($groupdata[$i]['group_id'], $delete_groups)) ? 'checked="checked"' : '', 'MODERATOR_CHECKED' => (in_array($groupdata[$i]['group_id'], $moderator_groups)) ? 'checked="checked"' : '') ); } $template->pparse('body'); include($mx_root_path . 'admin/page_footer_admin.'.$phpEx); } else { $cat_id = intval($HTTP_GET_VARS['cat_id']); $view_groups = @implode(',', $HTTP_POST_VARS['view']); $upload_groups = @implode(',', $HTTP_POST_VARS['upload']); $rate_groups = @implode(',', $HTTP_POST_VARS['rate']); $comment_groups = @implode(',', $HTTP_POST_VARS['comment']); $edit_groups = @implode(',', $HTTP_POST_VARS['edit']); $delete_groups = @implode(',', $HTTP_POST_VARS['delete']); $moderator_groups = @implode(',', $HTTP_POST_VARS['moderator']); $sql = "UPDATE ". MUSIC_CAT_TABLE ." SET cat_view_groups = '$view_groups', cat_upload_groups = '$upload_groups', cat_rate_groups = '$rate_groups', cat_comment_groups = '$comment_groups', cat_edit_groups = '$edit_groups', cat_delete_groups = '$delete_groups', cat_moderator_groups = '$moderator_groups' WHERE cat_id = '$cat_id'"; if ( !$result = $db->sql_query($sql) ) { message_die(GENERAL_ERROR, 'Could not update music config table', '', __LINE__, __FILE__, $sql); } // okay, return a message... $message = $lang['Music_Auth_successfully'] . '<br /><br />' . sprintf($lang['Click_return_music_auth'], '<a href="' . append_sid("admin_music_auth.$phpEx") . '">', '</a>') . '<br /><br />' . sprintf($lang['Click_return_admin_index'], '<a href="' . append_sid("index.$phpEx?pane=right") . '">', '</a>'); message_die(GENERAL_MESSAGE, $message); } } /* Powered by Music Online 2.0 (c) 2003 Cf Manager */ ?> --- NEW FILE: admin_music_cat.php --- <?php /** * * @package mxBB Portal Module - mx_music * @version $Id: admin_music_cat.php,v 1.1.2.1 2008/03/08 15:42:59 orynider Exp $ * @copyright (c) 2003 [ory...@rd..., OryNider] mxBB Development Team * @license http://opensource.org/licenses/gpl-license.php GNU General Public License v2 * */ $phpEx = substr(strrchr(__FILE__, '.'), 1); if ( @file_exists( './../viewtopic.' . $phpEx ) ) // -------------------------------------------- phpBB MOD MODE { define('MXBB_MODULE', false); define('IN_PHPBB', true); $phpbb_root_path = $module_root_path = './../'; $mx_mod_path = $phpbb_root_path . 'mx_mod/'; require_once($mx_mod_path . "includes/functions_required.$phpEx"); @define('IN_PORTAL', true); //Check if forum_hack is installed if (!isset($mx_root_path)) { $mx_root_path = './../'; include_once($mx_mod_path . "includes/mx_constants.$phpEx"); include_once($mx_mod_path . "includes/shared/phpbb2/includes/functions.$phpEx"); } require_once($mx_mod_path . "includes/functions_core.$phpEx"); //Check for cash mod if (file_exists($phpbb_root_path . 'includes/functions_cash.'.$phpEx)) { define('IN_CASHMOD', true); } //@ini_set( 'display_errors', '1' ); error_reporting (E_ERROR | E_WARNING | E_PARSE); // This will NOT report uninitialized variables //error_reporting(E_ALL & ~E_NOTICE); define( 'PAGE_KB', -502 ); // If this id generates a conflict with other mods, change it ;) // // Instatiate the mx_cache class // $mx_cache = new mx_cache(); // // instatiate the mx_request_vars class // $mx_request_vars = new mx_request_vars(); // // instatiate the mx_user class // //$mx_user = new mx_user(); // // Left Pane Paths // $setmodules_admin_path = ''; $setmodules_module_path = "./../"; if (file_exists($phpbb_root_path."modcp.$phpEx")) // phpBB2 { define('PORTAL_BACKEND', 'phpbb2'); $tplEx = 'tpl'; } else if (@file_exists($phpbb_root_path."mcp.$phpEx")) // phpBB3 { define('PORTAL_BACKEND', 'phpbb3'); $tplEx = 'html'; } } else { define( 'IN_PORTAL', 1 ); define( 'MXBB_MODULE', true ); // // Main paths // $mx_root_path = './../../../'; $module_root_path = './../../../modules/mx_music/'; $setmodules_admin_path = 'modules/mx_linkdb/admin/'; define( 'MXBB_27x', file_exists( $mx_root_path . 'mx_login.php' ) ); $phpEx = substr(strrchr(__FILE__, '.'), 1); } if ( !empty( $setmodules ) ) { $file = basename( __FILE__ ); $module['Music_Online']['Categories'] = $setmodules_admin_path . $file; return; } $music_root_path = $module_root_path . 'music_box/'; // // Get general information // require($mx_root_path . 'admin/pagestart.' . $phpEx); if ( !MXBB_MODULE ) { require_once($mx_mod_path . "includes/functions_styles.$phpEx"); $mx_user = new mx_user(); // instatiate the mx_user class // // Define basic constants // $mx_user->page_id = 1; $mx_user->user_ip = $user_ip; $mx_user->_init_userprefs(); } require($music_root_path . 'music_common.'.$phpEx); // ********************************************************************** // Read language definition // ********************************************************************** if ( !MXBB_MODULE ) { if ( !file_exists( $module_root_path . 'music_box/language/lang_' . $board_config['default_lang'] . '/lang_admin_music.' . $phpEx ) ) { include( $module_root_path . 'music_box/language/lang_english/lang_admin_music.' . $phpEx ); } else { include( $module_root_path . 'music_box/language/lang_' . $board_config['default_lang'] . '/lang_admin_music.' . $phpEx ); } } else { if ( file_exists( $module_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_admin_music.' . $phpEx ) ) { include( $module_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_admin_music.' . $phpEx ); } else if ( file_exists( $module_root_path . 'language/lang_english/lang_admin_music.' . $phpEx ) ) { include( $module_root_path . 'language/lang_english/lang_admin_music.' . $phpEx ); } } // -------------------------- // This function will sort the order of all categories // function mx_music_reorder_cat() { global $db; $sql = "SELECT cat_id, cat_order FROM ". MUSIC_CAT_TABLE ." WHERE cat_id <> 0 ORDER BY cat_order ASC"; if( !$result = $db->sql_query($sql) ) { message_die(GENERAL_ERROR, 'Could not get list of Categories', '', __LINE__, __FILE__, $sql); } $i = 10; while( $row = $db->sql_fetchrow($result) ) { $sql = "UPDATE ". MUSIC_CAT_TABLE ." SET cat_order = $i WHERE cat_id = ". $row['cat_id']; if( !$db->sql_query($sql) ) { message_die(GENERAL_ERROR, 'Could not update order fields', '', __LINE__, __FILE__, $sql); } $i += 10; } } // END // -------------------------- if( !isset($HTTP_POST_VARS['mode']) ) { if( !isset($HTTP_GET_VARS['action']) ) { $template->set_filenames(array( 'body' => 'admin/music_cat_body.tpl') ); $template->assign_vars(array( 'L_MUSIC_CAT_TITLE' => $lang['Music_Categories_Title'], 'L_MUSIC_CAT_EXPLAIN' => $lang['Music_Categories_Explain'], 'S_MUSIC_ACTION' => append_sid("admin_music_cat.$phpEx"), 'L_MOVE_UP' => $lang['Move_up'], 'L_MOVE_DOWN' => $lang['Move_down'], 'L_EDIT' => $lang['Edit'], 'L_DELETE' => $lang['Delete'], 'S_MODE' => 'new', 'L_CREATE_MUSIC' => $lang['Create_music'], 'L_CREATE_CATEGORY' => $lang['Create_category']) ); $sql = "SELECT * FROM ". MUSIC_CAT_TABLE ." WHERE cat_parent = 0 ORDER BY cat_order ASC"; if(!$result = $db->sql_query($sql)) { message_die(GENERAL_ERROR, 'Could not query music Categories information', '', __LINE__, __FILE__, $sql); } while ($row = $db->sql_fetchrow($result)) { $catrow[] = $row; } for( $i = 0; $i < count($catrow); $i++ ) { if ($catrow[$i]['cat_type'] != 0) { $colspan = 1; $add_sc = "<td class=\"" . (($i % 2) ? 'row1' : 'row2') . "\" align=\"center\">" . "<form action=\"" . append_sid("admin_music_cat.$phpEx") . "\" method=\"post\"><input type=\"hidden\" value=\"new\" name=\"mode\" /><input type=\"hidden\" value=\"" . $catrow[$i]['cat_id'] . "\" name=\"cat_parent\"><input name=\"submit\" type=\"submit\" value=\"" . $lang['Create_sub_music'] . "\" class=\"liteoption\">" . "</form></td>"; } else { $colspan = 2; $add_sc = ""; } $template->assign_block_vars('catrow', array( 'COLOR' => ($i % 2) ? 'row1' : 'row2', 'TITLE' => $catrow[$i]['cat_title'], 'DESC' => $catrow[$i]['cat_desc'], 'COLSPAN' => $colspan, 'ADD_SC' => $add_sc, 'S_MOVE_UP' => append_sid("admin_music_cat.$phpEx?action=move&move=-15&cat_id=" . $catrow[$i]['cat_id']), 'S_MOVE_DOWN' => append_sid("admin_music_cat.$phpEx?action=move&move=15&cat_id=" . $catrow[$i]['cat_id']), 'S_EDIT_ACTION' => append_sid("admin_music_cat.$phpEx?action=edit&cat_id=" . $catrow[$i]['cat_id']), 'S_DELETE_ACTION' => append_sid("admin_music_cat.$phpEx?action=delete&cat_id=" . $catrow[$i]['cat_id']) ) ); if ($catrow[$i]['cat_type'] != 0) { // this is a parent category $sc_sql = "SELECT * FROM ". MUSIC_CAT_TABLE ." WHERE cat_parent = " . $catrow[$i]['cat_id'] . " GROUP BY cat_id ORDER BY cat_order ASC"; if ( !($sc_result = $db->sql_query($sc_sql)) ) { mx_message_die(GENERAL_ERROR, 'Could not query sub categories', '', __LINE__, __FILE__, $sc_sql); } while ($subcatrow = $db->sql_fetchrow($sc_result)) { $template->assign_block_vars('catrow', array( 'COLSPAN' => 2, 'ADD_SC' => '', 'COLOR' => ($i % 2) ? 'row1' : 'row2', 'TITLE' => " " . $subcatrow['cat_title'], 'DESC' => " " . preg_replace("#\n#", "<br> ", $subcatrow['cat_desc']), 'S_MOVE_UP' => append_sid("admin_music_cat.$phpEx?action=move&move=-15&cat_parent=" . $catrow[$i]['cat_id'] . "&cat_id=" . $subcatrow['cat_id']), 'S_MOVE_UP' => append_sid("admin_music_cat.$phpEx?action=move&move=15&cat_parent=" . $catrow[$i]['cat_id'] . "&cat_id=" . $subcatrow['cat_id']), 'S_EDIT_ACTION' => append_sid("admin_music_cat.$phpEx?action=edit&cat_id=" . $subcatrow['cat_id']), 'S_DELETE_ACTION' => append_sid("admin_music_cat.$phpEx?action=delete&cat_id=" . $subcatrow['cat_id']) )); } } } $template->pparse('body'); include($mx_root_path . 'admin/page_footer_admin.'.$phpEx); } else { if( $HTTP_GET_VARS['action'] == 'edit' ) { $cat_id = intval($HTTP_GET_VARS['cat_id']); $sql = "SELECT * FROM ". MUSIC_CAT_TABLE ." WHERE cat_id = '$cat_id'"; if(!$result = $db->sql_query($sql)) { message_die(GENERAL_ERROR, 'Could not query music Categories information', '', __LINE__, __FILE__, $sql); } if( $db->sql_numrows($result) == 0 ) { message_die(GENERAL_ERROR, 'The requested category is not existed'); } $catrow = $db->sql_fetchrow($result); $template->set_filenames(array( 'body' => 'admin/music_cat_new_body.tpl') ); $template->assign_vars(array( 'L_MUSIC_CAT_TITLE' => $lang['Music_Categories_Title'], 'L_MUSIC_CAT_EXPLAIN' => $lang['Music_Categories_Explain'], 'S_MUSIC_ACTION' => append_sid("admin_music_cat.$phpEx?cat_id=$cat_id"), 'L_CAT_TITLE' => $lang['Category_Title'], 'L_CAT_DESC' => $lang['Category_Desc'], 'L_CAT_PERMISSIONS' => $lang['Category_Permissions'], 'L_VIEW_LEVEL' => $lang['View_level'], 'L_UPLOAD_LEVEL' => $lang['Upload_level'], 'L_RATE_LEVEL' => $lang['Rate_level'], 'L_COMMENT_LEVEL' => $lang['Comment_level'], 'L_EDIT_LEVEL' => $lang['Edit_level'], 'L_DELETE_LEVEL' => $lang['Delete_level'], 'L_SONGS_APPROVAL' => $lang['Songs_Approval'], 'L_GUEST' => $lang['Forum_ALL'], 'L_REG' => $lang['Forum_REG'], 'L_PRIVATE' => $lang['Forum_PRIVATE'], 'L_MOD' => $lang['Forum_MOD'], 'L_ADMIN' => $lang['Forum_ADMIN'], 'L_DISABLED' => $lang['Disabled'], 'S_CAT_TITLE' => $catrow['cat_title'], 'S_CAT_DESC' => $catrow['cat_desc'], 'VIEW_GUEST' => ($catrow['cat_view_level'] == MUSIC_GUEST) ? 'selected="selected"' : '', 'VIEW_REG' => ($catrow['cat_view_level'] == MUSIC_USER) ? 'selected="selected"' : '', 'VIEW_PRIVATE' => ($catrow['cat_view_level'] == MUSIC_PRIVATE) ? 'selected="selected"' : '', 'VIEW_MOD' => ($catrow['cat_view_level'] == MUSIC_MOD) ? 'selected="selected"' : '', 'VIEW_ADMIN' => ($catrow['cat_view_level'] == MUSIC_ADMIN) ? 'selected="selected"' : '', 'UPLOAD_GUEST' => ($catrow['cat_upload_level'] == MUSIC_GUEST) ? 'selected="selected"' : '', 'UPLOAD_REG' => ($catrow['cat_upload_level'] == MUSIC_USER) ? 'selected="selected"' : '', 'UPLOAD_PRIVATE' => ($catrow['cat_upload_level'] == MUSIC_PRIVATE) ? 'selected="selected"' : '', 'UPLOAD_MOD' => ($catrow['cat_upload_level'] == MUSIC_MOD) ? 'selected="selected"' : '', 'UPLOAD_ADMIN' => ($catrow['cat_upload_level'] == MUSIC_ADMIN) ? 'selected="selected"' : '', 'RATE_GUEST' => ($catrow['cat_rate_level'] == MUSIC_GUEST) ? 'selected="selected"' : '', 'RATE_REG' => ($catrow['cat_rate_level'] == MUSIC_USER) ? 'selected="selected"' : '', 'RATE_PRIVATE' => ($catrow['cat_rate_level'] == MUSIC_PRIVATE) ? 'selected="selected"' : '', 'RATE_MOD' => ($catrow['cat_rate_level'] == MUSIC_MOD) ? 'selected="selected"' : '', 'RATE_ADMIN' => ($catrow['cat_rate_level'] == MUSIC_ADMIN) ? 'selected="selected"' : '', 'COMMENT_GUEST' => ($catrow['cat_comment_level'] == MUSIC_GUEST) ? 'selected="selected"' : '', 'COMMENT_REG' => ($catrow['cat_comment_level'] == MUSIC_USER) ? 'selected="selected"' : '', 'COMMENT_PRIVATE' => ($catrow['cat_comment_level'] == MUSIC_PRIVATE) ? 'selected="selected"' : '', 'COMMENT_MOD' => ($catrow['cat_comment_level'] == MUSIC_MOD) ? 'selected="selected"' : '', 'COMMENT_ADMIN' => ($catrow['cat_comment_level'] == MUSIC_ADMIN) ? 'selected="selected"' : '', 'EDIT_REG' => ($catrow['cat_edit_level'] == MUSIC_USER) ? 'selected="selected"' : '', 'EDIT_PRIVATE' => ($catrow['cat_edit_level'] == MUSIC_PRIVATE) ? 'selected="selected"' : '', 'EDIT_MOD' => ($catrow['cat_edit_level'] == MUSIC_MOD) ? 'selected="selected"' : '', 'EDIT_ADMIN' => ($catrow['cat_edit_level'] == MUSIC_ADMIN) ? 'selected="selected"' : '', 'DELETE_REG' => ($catrow['cat_delete_level'] == MUSIC_USER) ? 'selected="selected"' : '', 'DELETE_PRIVATE' => ($catrow['cat_delete_level'] == MUSIC_PRIVATE) ? 'selected="selected"' : '', 'DELETE_MOD' => ($catrow['cat_delete_level'] == MUSIC_MOD) ? 'selected="selected"' : '', 'DELETE_ADMIN' => ($catrow['cat_delete_level'] == MUSIC_ADMIN) ? 'selected="selected"' : '', 'APPROVAL_DISABLED' => ($catrow['cat_approval'] == MUSIC_USER) ? 'selected="selected"' : '', 'APPROVAL_MOD' => ($catrow['cat_approval'] == MUSIC_MOD) ? 'selected="selected"' : '', 'APPROVAL_ADMIN' => ($catrow['cat_approval'] == MUSIC_ADMIN) ? 'selected="selected"' : '', 'S_MODE' => 'edit', 'S_GUEST' => MUSIC_GUEST, 'S_USER' => MUSIC_USER, 'S_PRIVATE' => MUSIC_PRIVATE, 'S_MOD' => MUSIC_MOD, 'S_ADMIN' => MUSIC_ADMIN, 'L_PANEL_TITLE' => $lang['Edit_Category']) ); $template->pparse('body'); include($mx_root_path . 'admin/page_footer_admin.'.$phpEx); } else if( $HTTP_GET_VARS['action'] == 'delete' ) { $cat_id = intval($HTTP_GET_VARS['cat_id']); $sql = "SELECT cat_id, cat_title, cat_order FROM ". MUSIC_CAT_TABLE ." ORDER BY cat_order ASC"; if(!$result = $db->sql_query($sql)) { message_die(GENERAL_ERROR, 'Could not query music Categories information', '', __LINE__, __FILE__, $sql); } $cat_found = FALSE; while( $row = $db->sql_fetchrow($result) ) { if( $row['cat_id'] == $cat_id ) { $thiscat = $row; $cat_found = TRUE; } else { $catrow[] = $row; } } if( $cat_found == FALSE ) { message_die(GENERAL_ERROR, 'The requested category is not existed'); } $select_to = '<select name="target"><option value="0">'. $lang['Delete_all_songs'] .'</option>'; for ($i = 0; $i < count($catrow); $i++) { $select_to .= '<option value="'. $catrow[$i]['cat_id'] .'">'. $catrow[$i]['cat_title'] .'</option>'; } $select_to .= '</select>'; $template->set_filenames(array( 'body' => 'admin/music_cat_delete_body.tpl') ); $template->assign_vars(array( 'S_MUSIC_ACTION' => append_sid("admin_music_cat.$phpEx?cat_id=$cat_id"), 'L_CAT_DELETE' => $lang['Delete_Category'], 'L_CAT_DELETE_EXPLAIN' => $lang['Delete_Category_Explain'], 'L_CAT_TITLE' => $lang['Category_Title'], 'S_CAT_TITLE' => $thiscat['cat_title'], 'L_MOVE_CONTENTS' => $lang['Move_contents'], 'L_MOVE_DELETE' => $lang['Move_and_Delete'], 'S_SELECT_TO' => $select_to) ); $template->pparse('body'); include($mx_root_path . 'admin/page_footer_admin.'.$phpEx); } else if( $HTTP_GET_VARS['action'] == 'move' ) { $cat_id = intval($HTTP_GET_VARS['cat_id']); $move = intval($HTTP_GET_VARS['move']); $sql = "UPDATE ". MUSIC_CAT_TABLE ." SET cat_order = cat_order + $move WHERE cat_id = $cat_id"; if( !$result = $db->sql_query($sql) ) { message_die(GENERAL_ERROR, 'Could not change category order', '', __LINE__, __FILE__, $sql); } mx_music_reorder_cat(); // Return a message... $message = $lang['Category_changed_order'] . "<br /><br />" . sprintf($lang['Click_return_music_category'], "<a href=\"" . append_sid("admin_music_cat.$phpEx") . "\">", "</a>") . "<br /><br />" . sprintf($lang['Click_return_admin_index'], "<a href=\"" . append_sid("index.$phpEx?pane=right") . "\">", "</a>"); message_die(GENERAL_MESSAGE, $message); } } } else { if(( $HTTP_POST_VARS['mode'] == 'new' ) || ($HTTP_POST_VARS['mode'] == 'newcat')) { if( !isset($HTTP_POST_VARS['cat_title']) ) { $template->set_filenames(array( 'body' => 'admin/music_cat_new_body.tpl') ); if ( !isset($HTTP_POST_VARS['cat_parent']) ) { $cat_parent = ""; } else { $cat_parent = "<input type=\"hidden\" value=\"" . $HTTP_POST_VARS['cat_parent'] . "\" name=\"cat_parent\">"; } if ($HTTP_POST_VARS['mode'] == 'newcat') { $cat_type = "<input type=\"hidden\" value=\"1\" name=\"cat_type\">"; } $template->assign_vars(array( 'L_MUSIC_CAT_TITLE' => $lang['Music_Categories_Title'], 'L_MUSIC_CAT_EXPLAIN' => $lang['Music_Categories_Explain'], 'S_MUSIC_ACTION' => append_sid("admin_music_cat.$phpEx"), 'L_CAT_TITLE' => $lang['Category_Title'], 'L_CAT_DESC' => $lang['Category_Desc'], 'L_CAT_PERMISSIONS' => $lang['Category_Permissions'], 'L_VIEW_LEVEL' => $lang['View_level'], 'L_UPLOAD_LEVEL' => $lang['Upload_level'], 'L_RATE_LEVEL' => $lang['Rate_level'], 'L_COMMENT_LEVEL' => $lang['Comment_level'], 'L_EDIT_LEVEL' => $lang['Edit_level'], 'L_DELETE_LEVEL' => $lang['Delete_level'], 'L_SONGS_APPROVAL' => $lang['Songs_Approval'], 'L_GUEST' => $lang['Forum_ALL'], 'L_REG' => $lang['Forum_REG'], 'L_PRIVATE' => $lang['Forum_PRIVATE'], 'L_MOD' => $lang['Forum_MOD'], 'L_ADMIN' => $lang['Forum_ADMIN'], 'L_DISABLED' => $lang['Disabled'], 'VIEW_GUEST' => 'selected="selected"', 'UPLOAD_REG' => 'selected="selected"', 'RATE_REG' => 'selected="selected"', 'COMMENT_REG' => 'selected="selected"', 'EDIT_REG' => 'selected="selected"', 'DELETE_MOD' => 'selected="selected"', 'APPROVAL_DISABLED' => 'selected="selected"', 'S_MODE' => 'new', 'S_GUEST' => MUSIC_GUEST, 'S_USER' => MUSIC_USER, 'S_PRIVATE' => MUSIC_PRIVATE, 'S_MOD' => MUSIC_MOD, 'S_ADMIN' => MUSIC_ADMIN, 'CAT_PARENT' => $cat_parent, 'CAT_TYPE' => $cat_type, 'L_PANEL_TITLE' => $lang['Create_category']) ); $template->pparse('body'); include($mx_root_path . 'admin/page_footer_admin.'.$phpEx); } else { // Get posting variables if ( !isset($HTTP_POST_VARS['cat_parent']) ) { $cat_parent = 0; } else { $cat_parent = intval($HTTP_POST_VARS['cat_parent']); } if ( !isset($HTTP_POST_VARS['cat_type']) ) { $cat_type = 0; } else { $cat_type = 1; } $cat_title = str_replace("\'", "''", htmlspecialchars(trim($HTTP_POST_VARS['cat_title']))); $cat_desc = str_replace("\'", "''", trim($HTTP_POST_VARS['cat_desc'])); $view_level = intval($HTTP_POST_VARS['cat_view_level']); $upload_level = intval($HTTP_POST_VARS['cat_upload_level']); $rate_level = intval($HTTP_POST_VARS['cat_rate_level']); $comment_level = intval($HTTP_POST_VARS['cat_comment_level']); $edit_level = intval($HTTP_POST_VARS['cat_edit_level']); $delete_level = intval($HTTP_POST_VARS['cat_delete_level']); $cat_approval = intval($HTTP_POST_VARS['cat_approval']); // Get the last ordered category $sql = "SELECT cat_order FROM ". MUSIC_CAT_TABLE ." ORDER BY cat_order DESC LIMIT 1"; if(!$result = $db->sql_query($sql)) { message_die(GENERAL_ERROR, 'Could not query music Categories information', '', __LINE__, __FILE__, $sql); } $row = $db->sql_fetchrow($result); $last_order = $row['cat_order']; $cat_order = $last_order + 10; // Here we insert a new row into the db $sql = "INSERT INTO ". MUSIC_CAT_TABLE ." (cat_title, cat_desc, cat_order, cat_view_level, cat_upload_level, cat_rate_level, cat_comment_level, cat_edit_level, cat_delete_level, cat_approval, cat_parent, cat_type) VALUES ('$cat_title', '$cat_desc', '$cat_order', '$view_level', '$upload_level', '$rate_level', '$comment_level', '$edit_level', '$delete_level', '$cat_approval', $cat_parent, $cat_type)"; if(!$result = $db->sql_query($sql)) { message_die(GENERAL_ERROR, 'Could not create new music Category', '', __LINE__, __FILE__, $sql); } // Return a message... $message = $lang['New_category_created'] . "<br /><br />" . sprintf($lang['Click_return_music_category'], "<a href=\"" . append_sid("admin_music_cat.$phpEx") . "\">", "</a>") . "<br /><br />" . sprintf($lang['Click_return_admin_index'], "<a href=\"" . append_sid("index.$phpEx?pane=right") . "\">", "</a>"); message_die(GENERAL_MESSAGE, $message); } } else if( $HTTP_POST_VARS['mode'] == 'edit' ) { // Get posting variables $cat_id = intval($HTTP_GET_VARS['cat_id']); $cat_title = str_replace("\'", "''", htmlspecialchars(trim($HTTP_POST_VARS['cat_title']))); $cat_desc = str_replace("\'", "''", trim($HTTP_POST_VARS['cat_desc'])); $view_level = intval($HTTP_POST_VARS['cat_view_level']); $upload_level = intval($HTTP_POST_VARS['cat_upload_level']); $rate_level = intval($HTTP_POST_VARS['cat_rate_level']); $comment_level = intval($HTTP_POST_VARS['cat_comment_level']); $edit_level = intval($HTTP_POST_VARS['cat_edit_level']); $delete_level = intval($HTTP_POST_VARS['cat_delete_level']); $cat_approval = intval($HTTP_POST_VARS['cat_approval']); // Now we update this row $sql = "UPDATE ". MUSIC_CAT_TABLE ." SET cat_title = '$cat_title', cat_desc = '$cat_desc', cat_view_level = '$view_level', cat_upload_level = '$upload_level', cat_rate_level = '$rate_level', cat_comment_level = '$comment_level', cat_edit_level = '$edit_level', cat_delete_level = '$delete_level', cat_approval = '$cat_approval' WHERE cat_id = '$cat_id'"; if(!$result = $db->sql_query($sql)) { message_die(GENERAL_ERROR, 'Could not update this music Category', '', __LINE__, __FILE__, $sql); } // Return a message... $message = $lang['Category_updated'] . "<br /><br />" . sprintf($lang['Click_return_music_category'], "<a href=\"" . append_sid("admin_music_cat.$phpEx") . "\">", "</a>") . "<br /><br />" . sprintf($lang['Click_return_admin_index'], "<a href=\"" . append_sid("index.$phpEx?pane=right") . "\">", "</a>"); message_die(GENERAL_MESSAGE, $message); } else if( $HTTP_POST_VARS['mode'] == 'delete' ) { $cat_id = intval($HTTP_GET_VARS['cat_id']); $target = intval($HTTP_POST_VARS['target']); if( $target == 0 ) // Delete All { // Get file information of all songs in this category $sql = "SELECT song_id, song_filename, song_cat_id FROM ". MUSIC_TABLE ." WHERE song_cat_id = '$cat_id'"; if(!$result = $db->sql_query($sql)) { message_die(GENERAL_ERROR, 'Could not query music information', '', __LINE__, __FILE__, $sql); } $songrow = array(); while( $row = $db ->sql_fetchrow($result) ) { $songrow[] = $row; $song_id_row[] = $row['song_id']; } if( count($songrow) != 0 ) // if this category is not empty { // Delete all physical song for ($i = 0; $i < count($songrow); $i++) { @unlink('../' . MUSIC_UPLOAD_PATH . $songrow[$i]['song_filename']); } $song_id_sql = '(' . implode(',', $song_id_row) . ')'; // Delete all related ratings $sql = "DELETE FROM ". MUSIC_RATE_TABLE ." WHERE rate_song_id IN ". $song_id_sql; if(!$result = $db->sql_query($sql)) { message_die(GENERAL_ERROR, 'Could not delete Ratings information', '', __LINE__, __FILE__, $sql); } // Delete all related comments $sql = "DELETE FROM ". MUSIC_COMMENT_TABLE ." WHERE comment_song_id IN ". $song_id_sql; if(!$result = $db->sql_query($sql)) { message_die(GENERAL_ERROR, 'Could not delete Comments information', '', __LINE__, __FILE__, $sql); } // Delete song entries in db $sql = "DELETE FROM ". MUSIC_TABLE ." WHERE song_cat_id = '$cat_id'"; if(!$result = $db->sql_query($sql)) { message_die(GENERAL_ERROR, 'Could not delete song entries in the DB', '', __LINE__, __FILE__, $sql); } } // This category is now emptied, we can remove it! $sql = "DELETE FROM ". MUSIC_CAT_TABLE ." WHERE cat_id = '$cat_id'"; if(!$result = $db->sql_query($sql)) { message_die(GENERAL_ERROR, 'Could not delete this Category', '', __LINE__, __FILE__, $sql); } // Re-order the rest of categories mx_music_reorder_cat(); // Return a message... $message = $lang['Category_deleted'] . "<br /><br />" . sprintf($lang['Click_return_music_category'], "<a href=\"" . append_sid("admin_music_cat.$phpEx") . "\">", "</a>") . "<br /><br />" . sprintf($lang['Click_return_admin_index'], "<a href=\"" . append_sid("index.$phpEx?pane=right") . "\">", "</a>"); message_die(GENERAL_MESSAGE, $message); } else // Move content... { $sql = "UPDATE ". MUSIC_TABLE ." SET song_cat_id = '$target' WHERE song_cat_id = '$cat_id'"; if(!$result = $db->sql_query($sql)) { message_die(GENERAL_ERROR, 'Could not update this Category content', '', __LINE__, __FILE__, $sql); } // This category is now emptied, we can remove it! $sql = "DELETE FROM ". MUSIC_CAT_TABLE ." WHERE cat_id = '$cat_id'"; if(!$result = $db->sql_query($sql)) { message_die(GENERAL_ERROR, 'Could not delete this Category', '', __LINE__, __FILE__, $sql); } // Re-order the rest of categories mx_music_reorder_cat(); // Return a message... $message = $lang['Category_deleted'] . "<br /><br />" . sprintf($lang['Click_return_music_category'], "<a href=\"" . append_sid("admin_music_cat.$phpEx") . "\">", "</a>") . "<br /><br />" . sprintf($lang['Click_return_admin_index'], "<a href=\"" . append_sid("index.$phpEx?pane=right") . "\">", "</a>"); message_die(GENERAL_MESSAGE, $message); } } } /* Powered by Music Online 2.0 (c) 2003 Cf Manager */ ?> --- NEW FILE: admin_music_cfg.php --- <?php /** * * @package mxBB Portal Module - mx_music * @version $Id: admin_music_cfg.php,v 1.1.2.1 2008/03/08 15:42:59 orynider Exp $ * @copyright (c) 2003 [ory...@rd..., OryNider] mxBB Development Team * @license http://opensource.org/licenses/gpl-license.php GNU General Public License v2 * */ $phpEx = substr(strrchr(__FILE__, '.'), 1); if ( @file_exists( './../viewtopic.' . $phpEx ) ) // -------------------------------------------- phpBB MOD MODE { define('MXBB_MODULE', false); define('IN_PHPBB', true); $phpbb_root_path = $module_root_path = './../'; $mx_mod_path = $phpbb_root_path . 'mx_mod/'; require_once($mx_mod_path . "includes/functions_required.$phpEx"); @define('IN_PORTAL', true); //Check if forum_hack is installed if (!isset($mx_root_path)) { $mx_root_path = './../'; include_once($mx_mod_path . "includes/mx_constants.$phpEx"); include_once($mx_mod_path . "includes/shared/phpbb2/includes/functions.$phpEx"); } require_once($mx_mod_path . "includes/functions_core.$phpEx"); //Check for cash mod if (file_exists($phpbb_root_path . 'includes/functions_cash.'.$phpEx)) { define('IN_CASHMOD', true); } //@ini_set( 'display_errors', '1' ); error_reporting (E_ERROR | E_WARNING | E_PARSE); // This will NOT report uninitialized variables //error_reporting(E_ALL & ~E_NOTICE); define( 'PAGE_KB', -502 ); // If this id generates a conflict with other mods, change it ;) // // Instatiate the mx_cache class // $mx_cache = new mx_cache(); // // instatiate the mx_request_vars class // $mx_request_vars = new mx_request_vars(); // // instatiate the mx_user class // //$mx_user = new mx_user(); // // Left Pane Paths // $setmodules_admin_path = ''; $setmodules_module_path = "./../"; if (file_exists($phpbb_root_path."modcp.$phpEx")) // phpBB2 { define('PORTAL_BACKEND', 'phpbb2'); $tplEx = 'tpl'; } else if (@file_exists($phpbb_root_path."mcp.$phpEx")) // phpBB3 { define('PORTAL_BACKEND', 'phpbb3'); $tplEx = 'html'; } } else { define( 'IN_PORTAL', 1 ); define( 'MXBB_MODULE', true ); // // Main paths // $mx_root_path = './../../../'; $module_root_path = './../../../modules/mx_music/'; $setmodules_admin_path = 'modules/mx_linkdb/admin/'; define( 'MXBB_27x', file_exists( $mx_root_path . 'mx_login.php' ) ); $phpEx = substr(strrchr(__FILE__, '.'), 1); } if ( !empty( $setmodules ) ) { $file = basename( __FILE__ ); $module['Music_Online']['Configuration'] = $setmodules_admin_path . $file; return; } $music_root_path = $module_root_path . 'music_box/'; // // Get general information // require($mx_root_path . 'admin/pagestart.' . $phpEx); if ( !MXBB_MODULE ) { require_once($mx_mod_path . "includes/functions_styles.$phpEx"); $mx_user = new mx_user(); // instatiate the mx_user class // // Define basic constants // $mx_user->page_id = 1; $mx_user->user_ip = $user_ip; $mx_user->_init_userprefs(); } require($music_root_path . 'music_common.'.$phpEx); // ********************************************************************** // Read language definition // ********************************************************************** if ( !MXBB_MODULE ) { if ( !file_exists( $module_root_path . 'music_box/language/lang_' . $board_config['default_lang'] . '/lang_admin_music.' . $phpEx ) ) { include( $module_root_path . 'music_box/language/lang_english/lang_admin_music.' . $phpEx ); } else { include( $module_root_path . 'music_box/language/lang_' . $board_config['default_lang'] . '/lang_admin_music.' . $phpEx ); } } else { if ( file_exists( $module_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_admin_music.' . $phpEx ) ) { include( $module_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_admin_music.' . $phpEx ); } else if ( file_exists( $module_root_path . 'language/lang_english/lang_admin_music.' . $phpEx ) ) { include( $module_root_path . 'language/lang_english/lang_admin_music.' . $phpEx ); } } // // Pull all config data // $sql = "SELECT * FROM " . MUSIC_CONFIG_TABLE; if(!$result = $db->sql_query($sql)) { message_die(CRITICAL_ERROR, "Could not query music config information", "", __LINE__, __FILE__, $sql); } else { while( $row = $db->sql_fetchrow($result) ) { $config_name = $row['config_name']; $config_value = $row['config_value']; $default_config[$config_name] = $config_value; $new[$config_name] = ( isset($HTTP_POST_VARS[$config_name]) ) ? $HTTP_POST_VARS[$config_name] : $default_config[$config_name]; if( isset($HTTP_POST_VARS['submit']) ) { $sql = "UPDATE " . MUSIC_CONFIG_TABLE . " SET config_value = '" . str_replace("\'", "''", $new[$config_name]) . "' WHERE config_name = '$config_name'"; if( !$db->sql_query($sql) ) { message_die(GENERAL_ERROR, "Failed to update music configuration for $config_name", "", __LINE__, __FILE__, $sql); } } } if( isset($HTTP_POST_VARS['submit']) ) { $message = $lang['Music_config_updated'] . "<br /><br />" . sprintf($lang['Click_return_music_config'], "<a href=\"" . append_sid("admin_music_cfg.$phpEx") . "\">", "</a>") . "<br /><br />" . sprintf($lang['Click_return_admin_index'], "<a href=\"" . append_sid($mx_root_path . "admin/index.$phpEx?pane=right") . "\">", "</a>"); message_die(GENERAL_MESSAGE, $message); } } $template->set_filenames(array( "body" => "admin/music_config_body.tpl") ); $template->assign_vars(array( 'L_MUSIC_CONFIG' => $lang['Music_config'], 'L_MUSIC_CONFIG_EXPLAIN' => $lang['Music_config_explain'], 'S_MUSIC_CONFIG_ACTION' => append_sid('admin_music_cfg.'.$phpEx), 'MAX_SONGS' => $new['max_songs'], 'MAX_FILE_SIZE' => $new['max_file_size'], 'ROWS_PER_PAGE' => $new['rows_per_page'], 'COLS_PER_PAGE' => $new['cols_per_page'], 'TOP' => $new['top'], // eXtreme Styles 'XS_ENABLED' => ($new['xs_enabled'] == 1) ? 'checked="checked"' : '', 'XS_DISABLED' => ($new['xs_enabled'] == 0) ? 'checked="checked"' : '', 'ROWS_PER_PAGE_PIC' => $new['rows_per_page_pic'], 'COLS_PER_PAGE_PIC' => $new['cols_per_page_pic'], 'ROWS_PER_PAGE_MEDIA' => $new['rows_per_page_media'], 'COLS_PER_PAGE_MEDIA' => $new['cols_per_page_media'], // Index 'INDEX_SHOW_SUBCATS_ENABLED' => ($new['show_index_subcats'] == 1) ? 'checked="checked"' : '', 'INDEX_SHOW_SUBCATS_DISABLED' => ($new['show_index_subcats'] == 0) ? 'checked="checked"' : '', // // Song image // 'MAX_IMAGE_SIZE' => $new['max_image_size'], 'MAX_IMAGE_WIDTH' => $new['max_image_width'], 'MAX_IMAGE_HEIGHT' => $new['max_image_height'], 'USER_SONGS_LIMIT' => $new['user_songs_limit'], 'MOD_SONGS_LIMIT' => $new['mod_songs_limit'], 'MP3_ENABLED' => ($new['mp3_allowed'] == 1) ? 'checked="checked"' : '', 'MP3_DISABLED' => ($new['mp3_allowed'] == 0) ? 'checked="checked"' : '', 'WAV_ENABLED' => ($new['wav_allowed'] == 1) ? 'checked="checked"' : '', 'WAV_DISABLED' => ($new['wav_allowed'] == 0) ? 'checked="checked"' : '', 'WMA_ENABLED' => ($new['wma_allowed'] == 1) ? 'checked="checked"' : '', 'WMA_DISABLED' => ($new['wma_allowed'] == 0) ? 'checked="checked"' : '', // Media Center 'WMV_ENABLED' => ($new['wmv_allowed'] == 1) ? 'checked="checked"' : '', 'WMV_DISABLED' => ($new['wmv_allowed'] == 0) ? 'checked="checked"' : '', 'MIDI_ENABLED' => ($new['mid_allowed'] == 1) ? 'checked="checked"' : '', 'MIDI_DISABLED' => ($new['mid_allowed'] == 0) ? 'checked="checked"' : '', 'RAM_ENABLED' => ($new['ram_allowed'] == 1) ? 'checked="checked"' : '', 'RAM_DISABLED' => ($new['ram_allowed'] == 0) ? 'checked="checked"' : '', 'AU_ENABLED' => ($new['au_allowed'] == 1) ? 'checked="checked"' : '', 'AU_DISABLED' => ($new['au_allowed'] == 0) ? 'checked="checked"' : '', 'MPEG_ENABLED' => ($new['mpeg_allowed'] == 1) ? 'checked="checked"' : '', 'MPEG_DISABLED' => ($new['mpeg_allowed'] == 0) ? 'checked="checked"' : '', 'AVI_ENABLED' => ($new['avi_allowed'] == 1) ? 'checked="checked"' : '', 'AVI_DISABLED' => ($new['avi_allowed'] == 0) ? 'checked="checked"' : '', 'SWF_ENABLED' => ($new['swf_allowed'] == 1) ? 'checked="checked"' : '', 'SWF_DISABLED' => ($new['swf_allowed'] == 0) ? 'checked="checked"' : '', 'QT_ENABLED' => ($new['qt_allowed'] == 1) ? 'checked="checked"' : '', 'QT_DISABLED' => ($new['qt_allowed'] == 0) ? 'checked="checked"' : '', 'FLV_ENABLED' => ($new['flv_allowed'] == 1) ? 'checked="checked"' : '', 'FLV_DISABLED' => ($new['flv_allowed'] == 0) ? 'checked="checked"' : '', 'RM_ENABLED' => ($new['rm_allowed'] == 1) ? 'checked="checked"' : '', 'RM_DISABLED' => ($new['rm_allowed'] == 0) ? 'checked="checked"' : '', 'IMG_ENABLED' => ($new['img_allowed'] == 1) ? 'checked="checked"' : '', 'IMG_DISABLED' => ($new['img_allowed'] == 0) ? 'checked="checked"' : '', // Media Center 'SONG_DESC_MAX_LENGTH' => $new['desc_length'], 'HOTLINK_PREVENT_ENABLED' => ($new['hotlink_prevent'] == 1) ? 'checked="checked"' : '', 'HOTLINK_PREVENT_DISABLED' => ($new['hotlink_prevent'] == 0) ? 'checked="checked"' : '', 'HOTLINK_ALLOWED' => $new['hotlink_allowed'], 'RATE_ENABLED' => ($new['rate'] == 1) ? 'checked="checked"' : '', 'RATE_DISABLED' => ($new['rate'] == 0) ? 'checked="checked"' : '', 'RATE_SCALE' => $new['rate_scale'], 'COMMENT_ENABLED' => ($new['comment'] == 1) ? 'checked="checked"' : '', 'COMMENT_DISABLED' => ($new['comment'] == 0) ? 'checked="checked"' : '', 'DOWNLOAD_ENABLED' => ($new['download'] == 1) ? 'checked="checked"' : '', 'DOWNLOAD_DISABLED' => ($new['download'] == 0) ? 'checked="checked"' : '', 'SORT_TIME' => ($new['sort_method'] == 'song_time') ? 'selected="selected"' : '', 'SORT_SONG_TITLE' => ($new['sort_method'] == 'song_title') ? 'selected="selected"' : '', 'SORT_USERNAME' => ($new['sort_method'] == 'song_user_id') ? 'selected="selected"' : '', 'SORT_VIEW' => ($new['sort_method'] == 'song_view_count') ? 'selected="selected"' : '', 'SORT_RATING' => ($new['sort_method'] == 'rating') ? 'selected="selected"' : '', 'SORT_COMMENTS' => ($new['sort_method'] == 'comments') ? 'selected="selected"' : '', 'SORT_NEW_COMMENT' => ($new['sort_method'] == 'new_comment') ? 'selected="selected"' : '', 'SORT_ASC' => ($new['sort_order'] == 'ASC') ? 'selected="selected"' : '', 'SORT_DESC' => ($new['sort_order'] == 'DESC') ? 'selected="selected"' : '', 'S_GUEST' => MUSIC_GUEST, 'S_USER' => MUSIC_USER, 'S_PRIVATE' => MUSIC_PRIVATE, 'S_MOD' => MUSIC_MOD, 'S_ADMIN' => MUSIC_ADMIN, 'L_MAX_SONGS' => $lang['Max_songs'], 'L_MAX_FILE_SIZE' => $lang['Max_file_size'], 'L_USER_SONGS_LIMIT' => $lang['User_songs_limit'], 'L_MOD_SONGS_LIMIT' => $lang['Moderator_songs_limit'], 'L_ROWS_PER_PAGE' => $lang['Rows_per_page'], 'L_COLS_PER_PAGE' => $lang['Cols_per_page'], 'L_ROWS_PER_PAGE_PIC' => $lang['Rows_per_page_music_pic_cat'], 'L_COLS_PER_PAGE_PIC' => $lang['Cols_per_page_music_pic_cat'], 'L_ROWS_PER_PAGE_MEDIA' => $lang['Rows_per_page_music_media_cat'], 'L_COLS_PER_PAGE_MEDIA' => $lang['Cols_per_page_music_media_cat'], 'L_TOP' => $lang['Top'], //Index 'L_INDEX_SETTINGS' => $lang['Music_Index_Settings'], 'L_INDEX_SHOW_SUBCATS' => $lang['Show_Index_Subcats'], // // Lang Song image // 'L_MAX_IMAGE_SIZE' => $lang['Max_image_size'], 'L_MAX_IMAGE_WIDTH' => $lang['Max_image_width'], 'L_MAX_IMAGE_HEIGHT' => $lang['Max_image_height'], // Media Center Allowed FileTypes 'L_MP3_ALLOWED' => $lang['MP3_allowed'], 'L_WAV_ALLOWED' => $lang['WAV_allowed'], 'L_WMA_ALLOWED' => $lang['WMA_allowed'], 'L_WMV_ALLOWED' => $lang['WMV_allowed'], 'L_MIDI_ALLOWED' => $lang['MIDI_allowed'], 'L_RAM_ALLOWED' => $lang['RAM_allowed'], 'L_AU_ALLOWED' => $lang['AU_allowed'], 'L_MPEG_ALLOWED' => $lang['MPEG_allowed'], 'L_AVI_ALLOWED' => $lang['AVI_allowed'], 'L_SWF_ALLOWED' => $lang['SWF_allowed'], 'L_QT_ALLOWED' => $lang['QT_allowed'], 'L_FLV_ALLOWED' => $lang['FLV_allowed'], 'L_RM_ALLOWED' => $lang['RM_allowed'], 'L_IMG_ALLOWED' => $lang['IMG_allowed'], // Media Center Allowed FileTypes 'L_SONG_DESC_MAX_LENGTH' => $lang['Song_Desc_Max_Length'], 'L_HOTLINK_PREVENT' => $lang['Hotlink_prevent'], 'L_HOTLINK_ALLOWED' => $lang['Hotlink_allowed'], 'L_RATE_SYSTEM' => $lang['Rate_system'], 'L_RATE_SCALE' => $lang['Rate_Scale'], 'L_COMMENT_SYSTEM' => $lang['Comment_system'], 'L_DOWNLOAD_SYSTEM' => $lang['Download_system'], 'L_EXTRA_SETTINGS' => $lang['Extra_Settings'], 'L_DEFAULT_SORT_METHOD' => $lang['Default_Sort_Method'], 'L_TIME' => $lang['Time'], 'L_SONG_TITLE' => $lang['Song_Title'], 'L_USERNAME' => $lang['Sort_Username'], 'L_VIEW' => $lang['View'], 'L_RATING' => $lang['Rating'], 'L_COMMENTS' => $lang['Comments'], 'L_DOWNLOAD' => $lang['Download'], 'L_NEW_COMMENT' => $lang['New_Comment'], 'L_DEFAULT_SORT_ORDER' => $lang['Default_Sort_Order'], 'L_ASC' => $lang['Sort_Ascending'], 'L_DESC' => $lang['Sort_Descending'], 'L_GUEST' => $lang['Forum_ALL'], 'L_REG' => $lang['Forum_REG'], 'L_PRIVATE' => $lang['Forum_PRIVATE'], 'L_MOD' => $lang['Forum_MOD'], 'L_ADMIN' => $lang['Forum_ADMIN'], 'L_DISABLED' => $lang['Disabled'], 'L_ENABLED' => $lang['Enabled'], 'L_YES' => $lang['Yes'], 'L_NO' => $lang['No'], 'L_SUBMIT' => $lang['Submit'], 'L_RESET' => $lang['Reset']) ); $template->pparse("body"); include($mx_root_path . 'admin/page_footer_admin.'.$phpEx); /* Powered by Music Online 2.0 (c) 2003 Cf Manager */ ?> |
|
From: OryNider <ory...@us...> - 2008-03-08 15:43:03
|
Update of /cvsroot/mxbb/mx_music/music_box/language/lang_english In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv31978/music_box/language/lang_english Added Files: Tag: core28x index.htm lang_admin.php lang_main.php Log Message: update for new mx_mod 2.8.2 --- NEW FILE: lang_main.php --- <?php /** * * @package mxBB Portal Module - mx_music * @version $Id: lang_main.php,v 1.1.2.1 2008/03/08 15:42:56 orynider Exp $ * @copyright (c) 2003 [ory...@rd..., OryNider] mxBB Development Team * @license http://opensource.org/licenses/gpl-license.php GNU General Public License v2 * */ // // Music Online // $lang['Music'] = 'Media Center'; // // Music Index // $lang['Music_Online'] = 'Music Online'; $lang['Songs'] = 'Songs'; $lang['Cat_Views'] = 'Board Views'; $lang['Last_Song'] = 'Last Song'; $lang['Public_Categories'] = 'Public Categories'; $lang['Music_sub_categories'] = 'Sub-categories'; $lang['No_Songs'] = 'No Song'; $lang['Top_Songs'] = 'Top Songs'; $lang['Recent_Songs'] = 'Recent Songs'; $lang['Song_Limit'] = 'Song limit'; $lang['Nav_Separator'] = ' » '; $lang['View'] = 'Listen'; $lang['Singer'] = 'Singer'; // // Category View // $lang['Category_not_exist'] = 'This category does not exist'; $lang['Upload_Song'] = 'Upload Song'; $lang['Song_Title'] = 'Song Title'; $lang['Pic_Title'] = 'Pic Title'; $lang['Category_pics'] = 'Category Images'; $lang['Images'] = 'Images'; $lang['Category_songs'] = 'Category Media'; $lang['Media'] = 'Media'; $lang['Edit_song'] = 'Edit'; $lang['Delete_song'] = 'Del'; $lang['Rating'] = 'Rating'; $lang['Comments'] = 'Comments'; $lang['Download'] = 'Download'; $lang['Listen'] = 'Listen URL'; $lang['New_Comment'] = 'New Comment'; $lang['Not_rated'] = '<i>not rated</i>'; // // Upload // $lang['Song_url'] = 'Song URL'; $lang['Song_Desc'] = 'Song Lyric'; $lang['Plain_text_only'] = 'Plain text only'; $lang['Max_length'] = 'Max length (bytes)'; $lang['Upload_song_from_machine'] = 'Upload song from your PC'; $lang['Upload_to_Category'] = 'Upload to Category'; $lang['Upload_no_title'] = 'You missed the song title'; $lang['Upload_no_file'] = 'You must enter the path of song'; $lang['Upload_both_file'] = 'You can just choose 1 in 2 way Upload or Link URL'; $lang['Desc_too_long'] = 'Song lyric is too long'; $lang['Max_file_size'] = 'Maximum file size (bytes)'; $lang['Allowed_file'] = 'These files are allowed'; $lang['Music_reached_quota'] = 'This category has reached the quota of songs. Now you cannot upload any more. Please contact the administrators for more information'; $lang['User_reached_songs_quota'] = 'You have reached your quota of songs. Now you cannot upload any more. Please contact the administrators for more information'; $lang['Bad_upload_file_size'] = 'Your uploaded file is too large or corrupted'; $lang['Not_allowed_file_type'] = 'Your file type is not allowed'; $lang['Missed_song_title'] = 'You missed the song title'; $lang['Missed_song_url'] = 'You missed the song url'; $lang['Music_upload_successful'] = 'Your song has been uploaded successfully'; $lang['Music_upload_need_approval'] = 'Your song has been uploaded successfully.<br /><br />But the feature Song Approval has been enabled so your song must be approved by a administrator or a moderator before posting'; $lang['Click_return_category'] = 'Click %shere%s to return to the category'; $lang['Click_return_music_index'] = 'Click %shere%s to return to the Music Index'; // View song $lang['Song_not_exist'] = 'This song does not exits'; // Edit song $lang['Edit_Song_Info'] = 'Edit Song infomation'; $lang['Songs_updated_successfully'] = 'Your song information has been updated successfully'; // Delete song $lang['Music_delete_confirm'] = 'Are you sure to delete these song(s)?'; $lang['Songs_deleted_successfully'] = 'These song(s) have been deleted successfully'; // // ModCP // $lang['Approval'] = 'Approval'; $lang['Approve'] = 'Approve'; $lang['Unapprove'] = 'Unapprove'; $lang['Status'] = 'Status'; $lang['Locked'] = 'Locked'; $lang['Not_approved'] = 'Not approved'; $lang['Approved'] = 'Approved'; $lang['Move_to_Category'] = 'Move to Category'; $lang['Songs_moved_successfully'] = 'Your song(s) have been moved successfully'; $lang['Songs_locked_successfully'] = 'Your song(s) have been locked successfully'; $lang['Songs_unlocked_successfully'] = 'Your song(s) have been unlocked successfully'; $lang['Songs_approved_successfully'] = 'Your song(s) have been approved successfully'; $lang['Songs_unapproved_successfully'] = 'Your song(s) have been unapproved successfully'; // // Rate // $lang['Current_Rating'] = 'Current Rating'; $lang['Please_Rate_It'] = 'Please Rate It'; $lang['Already_rated'] = 'You have already rated this song'; $lang['Music_rate_successfully'] = 'Your song has been rated successfully'; // // Comment // $lang['Comment_no_text'] = 'Please enter your comment'; $lang['Comment_too_long'] = 'Your comment is too long'; $lang['Comment_delete_confirm'] = 'Are you sure to delete this comment?'; $lang['Song_Locked'] = 'Sorry, this song was locked. So you cannot post comment for this song anymore'; // // Song Image // $lang['Song_image'] = 'Song Image'; $lang['Song_image_desc'] = 'The Image of this song<br />(such as CD Cover, Artist Photo...)'; $lang['No_image'] = 'No Image'; $lang['Upload_image'] = 'Upload Image from your PC'; $lang['Not_allowed_image_type'] = 'Your uploaded image type is not allowed'; $lang['Bad_upload_image_size'] = 'Bad upload image size'; $lang['Upload_image_size_toobig'] = 'Your uploaded image size is too big'; // // Search Song // $lang['Search_song'] = 'Search song'; // auth_key $lang['Music_view_can'] = 'You <b>can</b> view songs in this category'; $lang['Music_view_cannot'] = 'You <b>cannot</b> view songs in this category'; $lang['Music_download_can'] = 'You <b>can</b> download songs in this category'; $lang['Music_download_cannot'] = 'You <b>cannot</b> download songs in this category'; $lang['Music_upload_can'] = 'You <b>can</b> upload new songs in this category'; $lang['Music_upload_cannot'] = 'You <b>cannot</b> upload new songs in this category'; $lang['Music_rate_can'] = 'You <b>can</b> rate songs in this category'; $lang['Music_rate_cannot'] = 'You <b>cannot</b> rate songs in this category'; $lang['Music_comment_can'] = 'You <b>can</b> post comments to songs in this category'; $lang['Music_comment_cannot'] = 'You <b>cannot</b> post comments to songs in this category'; $lang['Music_edit_can'] = 'You <b>can</b> edit your songs and comments in this category'; $lang['Music_edit_cannot'] = 'You <b>cannot</b> edit your songs and comments in this category'; $lang['Music_delete_can'] = 'You <b>can</b> delete your songs and comments in this category'; $lang['Music_delete_cannot'] = 'You <b>cannot</b> delete your songs and comments in this category'; $lang['Music_moderate_can'] = 'You <b>can</b> %smoderate%s this category'; ?> --- NEW FILE: lang_admin.php --- <?php /** * * @package mxBB Portal Module - mx_music * @version $Id: lang_admin.php,v 1.1.2.1 2008/03/08 15:42:56 orynider Exp $ * @copyright (c) 2007 [ory...@rd..., OryNider] mxBB Development Team * @license http://opensource.org/licenses/gpl-license.php GNU General Public License v2 * */ // // The format of this file is: // // ---> $lang["message"] = "text"; // // Specify your language character encoding... [optional] // // setlocale(LC_ALL, "en"); $lang['display_most_posts'] = "Display most posts"; $lang['display_random_posts'] = "Display random posts"; $lang['display_top_ranked'] = "Display top ranked"; $lang['display_latest_posts'] = "Display latest posts"; $lang['num_of_cols'] = "Num of cols"; $lang['num_of_rows'] = "Num of rows"; $lang['music_config_updated'] = 'Mx MOM Configuration Updated Successfully.'; $lang['Click_return_music_config'] = 'Click %sHere%s to return to mx_music Configuration'; $lang['index'] = 'Mx MOM Album Index'; $lang['mx_music_admin'] = 'mxBB MOM Integration'; $lang['mx_music_admin_explain'] = 'Here, you can do music index and mxBB page mappings.'; $lang['default_pages_title'] = 'mxBB and MOM integration'; $lang['default_pages_title_explain'] = ''; $lang['default_pages_more_title'] = 'More mappings...'; $lang['default_pages_more_title_explain'] = ''; $lang['integration_enabled'] = 'Activate the Integration?'; $lang['integration_enabled_explain'] = 'When the MOM module integration is activated, all mx_music URLs will be directed to mxBB pages. If deactivated, music.php will operate "as usual"'; $lang['integration_enabled_yes'] = 'Activate'; $lang['integration_enabled_no'] = 'Do not integrate music.php'; $lang['override'] = 'Associate music.php and mxBB pages'; $lang['override_explain'] = 'All mx_music urls are redirected to mxBB pages following these settings.'; $lang['override_yes'] = 'Use Block Settings'; $lang['override_no'] = 'Use fixed mappings (see below)'; // // Configuration // $lang['Music_config'] = 'Music Configuration'; $lang['Music_config_explain'] = 'You can change the general settings of your Music Online here'; $lang['Music_config_updated'] = 'Music Configuration has been updated successfully'; $lang['Click_return_music_config'] = 'Click %sHere%s to return to the Music Configuration'; $lang['Max_songs'] = 'Maximum songs for each Category (-1 = unlimited)'; $lang['User_songs_limit'] = 'Songs limit per category for each user (-1 = unlimited)'; $lang['Moderator_songs_limit'] = 'Songs limit per category for each moderator (-1 = unlimited)'; $lang['Songs_Approval'] = 'Songs Approval'; $lang['Rows_per_page'] = 'Number of rows'; $lang['Cols_per_page'] = 'Number of columns'; $lang['Rows_per_page_music_pic_cat'] = 'Number of rows in virtual images subcategories'; $lang['Cols_per_page_music_pic_cat'] = 'Number of columns in virtual images subcategories'; $lang['Rows_per_page_music_media_cat'] = 'Number of rows in virtual media subcategories'; $lang['Cols_per_page_music_media_cat'] = 'Number of columns in virtual media subcategories'; $lang['Top'] = 'Number of songs on Top Hit List'; $lang['Song_Desc_Max_Length'] = 'Song Lyric/Comment Max Length (bytes)'; $lang['Hotlink_prevent'] = 'Hotlink Prevention'; $lang['Hotlink_allowed'] = 'Allowed domains for hotlink (separated by a comma)'; $lang['Rate_system'] = 'Enable rate system'; $lang['Rate_Scale'] =' Rating Scale'; $lang['Comment_system'] = 'Enable comment system'; $lang['Download_system'] = 'Enable download system'; $lang['Extra_Settings'] = 'Extra Settings'; $lang['Default_Sort_Method'] = 'Default Sort Method'; $lang['Default_Sort_Order'] = 'Default Sort Order'; //Index $lang['Music_Index_Settings'] = 'Music Index'; $lang['Show_Index_Subcats'] = 'Show sub categories in index table'; // // Categories // $lang['Music_Categories_Title'] = 'Music Categories Control'; $lang['Music_Categories_Explain'] = 'On this screen you can manage your categories: create, alter, delete, sort, etc.'; $lang['Category_Permissions'] = 'Category Permissions'; $lang['Category_Title'] = 'Category Title'; $lang['Category_Desc'] = 'Category Description'; $lang['View_level'] = 'View Level'; $lang['Upload_level'] = 'Upload Level'; $lang['Rate_level'] = 'Rate Level'; $lang['Comment_level'] = 'Comment Level'; $lang['Edit_level'] = ' Edit Level'; $lang['Delete_level'] = 'Delete Level'; $lang['New_category_created'] = 'New category has been created successfully'; $lang['Click_return_music_category'] = 'Click %sHere%s to return to the Music Categories Manager'; $lang['Category_updated'] = 'This category has been updated successfully'; $lang['Delete_Category'] = 'Delete Category'; $lang['Delete_Category_Explain'] = 'The form below will allow you to delete a category and decide where you want to put songs it contained'; $lang['Delete_all_songs'] = 'Delete all songs'; $lang['Category_deleted'] = 'This category has been deleted successfully'; $lang['Category_changed_order'] = 'This category has been changed order successfully'; $lang['Create_music'] = 'Create new music'; $lang['Create_sub_music'] = 'Create sub-music'; // // Permissions // $lang['Music_Auth_Title'] = 'Music Permissions'; $lang['Music_Auth_Explain'] = 'Here you can choose which usergroup(s) can be the moderators for each Music category or just has the private access'; $lang['Select_a_Category'] = 'Select a Category'; $lang['Look_up_Category'] = 'Look up Category'; $lang['Music_Auth_successfully'] = 'Auth has been updated successfully'; $lang['Click_return_music_auth'] = 'Click %sHere%s to return to the Music Permissions'; $lang['Upload'] = 'Upload'; $lang['Rate'] = 'Rate'; $lang['Comment'] = 'Comment'; //Allowed File Types $lang['MP3_allowed'] = 'MP3 Allowed'; $lang['WAV_allowed'] = 'WAV Allowed'; $lang['WMA_allowed'] = 'WMA Allowed'; $lang['WMV_allowed'] = 'WMV Allowed'; $lang['MIDI_allowed'] = 'MIDI Allowed'; $lang['RAM_allowed'] = 'RAM Allowed'; $lang['AU_allowed'] = 'AU Allowed'; $lang['MPEG_allowed'] = 'MPEG Allowed'; $lang['AVI_allowed'] = 'AVI Allowed'; $lang['SWF_allowed'] = 'SWF Allowed'; $lang['QT_allowed'] = 'QT Allowed'; $lang['FLV_allowed'] = 'FLV Allowed'; $lang['RM_allowed'] = 'RM Allowed'; $lang['IMG_allowed'] = 'JPG, GIF and PNG Allowed'; // // Song Image // $lang['Max_image_size'] = 'Max song image size (bytes)'; $lang['Max_image_width'] = 'Max song image width (pixel)'; $lang['Max_image_height'] = 'Max song image height (pixel)'; // // That's all Folks! // ------------------------------------------------- ?> --- NEW FILE: index.htm --- <html> <head> <title></title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> </head> <body bgcolor="#FFFFFF" text="#000000"> </body> </html> |
|
From: OryNider <ory...@us...> - 2008-03-08 15:42:58
|
Update of /cvsroot/mxbb/mx_music/music_box/language In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv31978/music_box/language Added Files: Tag: core28x index.htm Log Message: update for new mx_mod 2.8.2 --- NEW FILE: index.htm --- <html> <head> <title></title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> </head> <body bgcolor="#FFFFFF" text="#000000"> </body> </html> |
|
From: OryNider <ory...@us...> - 2008-03-08 15:41:51
|
Update of /cvsroot/mxbb/mx_music/phpbb2/admin In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv31518/admin Log Message: Directory /cvsroot/mxbb/mx_music/phpbb2/admin added to the repository --> Using per-directory sticky tag `core28x' |
|
From: OryNider <ory...@us...> - 2008-03-08 15:41:29
|
Update of /cvsroot/mxbb/mx_music/music_box/language/lang_english In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv31399/lang_english Log Message: Directory /cvsroot/mxbb/mx_music/music_box/language/lang_english added to the repository --> Using per-directory sticky tag `core28x' |
|
From: OryNider <ory...@us...> - 2008-03-08 15:41:17
|
Update of /cvsroot/mxbb/mx_music/music_box/language In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv31341/language Log Message: Directory /cvsroot/mxbb/mx_music/music_box/language added to the repository --> Using per-directory sticky tag `core28x' |
|
From: OryNider <ory...@us...> - 2008-03-08 15:41:06
|
Update of /cvsroot/mxbb/mx_music/phpbb2 In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv31280/phpbb2 Log Message: Directory /cvsroot/mxbb/mx_music/phpbb2 added to the repository --> Using per-directory sticky tag `core28x' |
|
From: OryNider <ory...@us...> - 2008-03-08 15:34:47
|
Update of /cvsroot/mxbb/mx_linkdb/admin In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv27616 Modified Files: Tag: core28x admin_linkdb.php Log Message: update for new mx_mod 2.8.2 Index: admin_linkdb.php =================================================================== RCS file: /cvsroot/mxbb/mx_linkdb/admin/admin_linkdb.php,v retrieving revision 1.12 retrieving revision 1.12.2.1 diff -C2 -d -r1.12 -r1.12.2.1 *** admin_linkdb.php 13 Aug 2006 19:43:50 -0000 1.12 --- admin_linkdb.php 8 Mar 2008 15:34:43 -0000 1.12.2.1 *************** *** 9,42 **** */ ! define( 'IN_PORTAL', true ); if ( !empty( $setmodules ) ) { $filename = basename( __FILE__ ); ! $module['LinkDb_links']['0_Configuration'] = 'modules/mx_linkdb/admin/' . $filename . "?action=setting"; ! $module['LinkDb_links']['1_Cat_manage'] = 'modules/mx_linkdb/admin/' . $filename . "?action=cat_manage"; ! //$module['LinkDb_links']['2_Link_manage'] = 'modules/mx_linkdb/admin/' . $filename . "?action=link_manage"; ! $module['LinkDb_links']['3_Permissions'] = 'modules/mx_linkdb/admin/' . $filename . "?action=auth_manage"; ! $module['LinkDb_links']['5_Custom_manage'] = 'modules/mx_linkdb/admin/' . $filename . "?action=custom_manage"; return; } - $mx_root_path = '../../../'; - $module_root_path = "../"; - $phpEx = substr(strrchr(__FILE__, '.'), 1); require( $mx_root_path . '/admin/pagestart.' . $phpEx ); ! include( $module_root_path . 'linkdb/linkdb_common.' . $phpEx ); // ********************************************************************** // Read language definition // ********************************************************************** ! if ( !file_exists( $module_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_admin.' . $phpEx ) ) { ! include( $module_root_path . 'language/lang_english/lang_admin.' . $phpEx ); } else { ! include( $module_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_admin.' . $phpEx ); } --- 9,165 ---- */ ! $phpEx = substr(strrchr(__FILE__, '.'), 1); ! ! if ( @file_exists( './../viewtopic.' . $phpEx ) ) // -------------------------------------------- phpBB MOD MODE ! { ! define('MXBB_MODULE', false); ! define('IN_PHPBB', true); ! ! $phpbb_root_path = $module_root_path = './../'; ! $mx_mod_path = $phpbb_root_path . 'mx_mod/'; ! ! require_once($mx_mod_path . "includes/functions_required.$phpEx"); ! ! @define('IN_PORTAL', true); ! ! //Check if forum_hack is installed ! if (!isset($mx_root_path)) ! { ! $mx_root_path = './../'; ! ! include_once($mx_mod_path . "includes/mx_constants.$phpEx"); ! include_once($mx_mod_path . "includes/shared/phpbb2/includes/functions.$phpEx"); ! } ! ! require_once($mx_mod_path . "includes/functions_core.$phpEx"); ! ! //Check for cash mod ! if (file_exists($phpbb_root_path . 'includes/functions_cash.'.$phpEx)) ! { ! define('IN_CASHMOD', true); ! } ! ! //@ini_set( 'display_errors', '1' ); ! error_reporting (E_ERROR | E_WARNING | E_PARSE); // This will NOT report uninitialized variables ! //error_reporting(E_ALL & ~E_NOTICE); ! ! define( 'PAGE_KB', -502 ); // If this id generates a conflict with other mods, change it ;) ! ! // ! // Instatiate the mx_cache class ! // ! $mx_cache = new mx_cache(); ! ! // ! // instatiate the mx_request_vars class ! // ! $mx_request_vars = new mx_request_vars(); ! ! ! // ! // instatiate the mx_user class ! // ! //$mx_user = new mx_user(); ! ! // ! // Left Pane Paths ! // ! $setmodules_admin_path = ''; ! $setmodules_module_path = "./../"; ! ! if (file_exists($phpbb_root_path."modcp.$phpEx")) // phpBB2 ! { ! define('PORTAL_BACKEND', 'phpbb2'); ! $tplEx = 'tpl'; ! } ! else if (@file_exists($phpbb_root_path."mcp.$phpEx")) // phpBB3 ! { ! define('PORTAL_BACKEND', 'phpbb3'); ! $tplEx = 'html'; ! } ! } ! else ! { ! define( 'IN_PORTAL', 1 ); ! define( 'MXBB_MODULE', true ); ! ! // ! // Main paths ! // ! $mx_root_path = './../../../'; ! $module_root_path = './../../../modules/mx_linkdb/'; ! ! // ! // Left Pane Paths ! // ! $setmodules_root_path = './../'; ! $setmodules_module_path = 'modules/mx_linkdb/'; ! $setmodules_admin_path = $setmodules_module_path . 'admin/'; ! ! define( 'MXBB_27x', file_exists( $setmodules_root_path . 'mx_login.php' ) ); ! ! $phpEx = substr(strrchr(__FILE__, '.'), 1); ! } if ( !empty( $setmodules ) ) { + + include_once( $setmodules_root_path . $setmodules_module_path . 'linkdb/includes/linkdb_constants.' . $phpEx ); + $filename = basename( __FILE__ ); ! $module['LinkDb_links']['0_Configuration'] = $setmodules_admin_path . $filename . "?action=setting"; ! $module['LinkDb_links']['1_Cat_manage'] = $setmodules_admin_path . $filename . "?action=cat_manage"; ! //$module['LinkDb_links']['2_Link_manage'] = $setmodules_admin_path . $filename . "?action=link_manage"; ! $module['LinkDb_links']['3_Permissions'] = $setmodules_admin_path . $filename . "?action=auth_manage"; ! $module['LinkDb_links']['5_Custom_manage'] = $setmodules_admin_path . $filename . "?action=custom_manage"; return; } require( $mx_root_path . '/admin/pagestart.' . $phpEx ); ! if ( !MXBB_MODULE ) ! { ! require_once($mx_mod_path . "includes/functions_styles.$phpEx"); ! ! $mx_user = new mx_user(); // instatiate the mx_user class ! ! // ! // Define basic constants ! // ! $mx_user->page_id = 1; ! $mx_user->user_ip = $user_ip; ! $mx_user->_init_userprefs(); ! $mx_user->set_module_cfg_name('linkdb'); ! $mx_user->set_module_lang_path($module_root_path . 'linkdb/'); ! $mx_user->extend(); ! } ! ! include_once( $module_root_path . 'linkdb/linkdb_common.' . $phpEx ); ! // ********************************************************************** // Read language definition // ********************************************************************** ! if ( !MXBB_MODULE ) { ! if ( !file_exists( $module_root_path . 'linkdb/language/lang_' . $board_config['default_lang'] . '/lang_admin.' . $phpEx ) ) ! { ! include( $module_root_path . 'linkdb/language/lang_english/lang_admin.' . $phpEx ); ! } ! else ! { ! include( $module_root_path . 'linkdb/language/lang_' . $board_config['default_lang'] . '/lang_admin.' . $phpEx ); ! } } else { ! if ( !file_exists( $module_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_admin.' . $phpEx ) ) ! { ! include( $module_root_path . 'language/lang_english/lang_admin.' . $phpEx ); ! } ! else ! { ! include( $module_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_admin.' . $phpEx ); ! } } |
|
From: OryNider <ory...@us...> - 2008-03-08 15:33:13
|
Update of /cvsroot/mxbb/mx_linkdb/linkdb/includes In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv25414/linkdb/includes Modified Files: Tag: core28x linkdb_constants.php Log Message: update for new mx_mod 2.8.2 Index: linkdb_constants.php =================================================================== RCS file: /cvsroot/mxbb/mx_linkdb/linkdb/includes/linkdb_constants.php,v retrieving revision 1.10 retrieving revision 1.10.2.1 diff -C2 -d -r1.10 -r1.10.2.1 *** linkdb_constants.php 13 Aug 2006 19:43:51 -0000 1.10 --- linkdb_constants.php 8 Mar 2008 15:32:38 -0000 1.10.2.1 *************** *** 55,61 **** if ( !MXBB_MODULE || MXBB_27x ) { ! $linkdb_module_version = "linkDB Manager v. 2.8.0"; $linkdb_module_author = "Jon"; $linkdb_module_orig_author = "CRLin"; } else --- 55,68 ---- if ( !MXBB_MODULE || MXBB_27x ) { ! $linkdb_module_version = "linkDB Manager v. 2.8.1"; $linkdb_module_author = "Jon"; $linkdb_module_orig_author = "CRLin"; + + if (!defined( 'IN_ADMIN' )) + { + $mx_user->set_module_cfg_name('linkdb'); + $mx_user->set_module_lang_path($module_root_path . 'linkdb/'); + $mx_user->extend(); + } } else |
|
From: OryNider <ory...@us...> - 2008-03-08 15:32:43
|
Update of /cvsroot/mxbb/mx_linkdb/templates/subSilver In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv25414/templates/subSilver Added Files: Tag: core28x linkdb.cfg Log Message: update for new mx_mod 2.8.2 --- NEW FILE: linkdb.cfg --- <?php // // ** Configuration file for subSilver template ** // // ** copyright (C) 2001 The phpBB Group ** // ** Created by subBlue design ** // ** www.subBlue.com ** // // ** subSilver dev. forum: www.subSky.com/phpBB2/ ** // // $Id: linkdb.cfg,v 1.1.2.1 2008/03/08 15:32:40 orynider Exp $ // // Please note that to enable support of different languages // the {LANG} place holder is available. This will be replaced // with xxx where xxx is the users selected language. If // that language isn't available it will default to english. // Therefore you MUST ensure you have at least a english // directory if you choose to localise your template // // // Do not alter this line! // define(MX_TEMPLATE_CONFIG, TRUE); $mx_template_config = true; // ------------------------------------------------------------------------- // Prefix with PORTAL_URL // ------------------------------------------------------------------------- $current_template_images = PORTAL_URL . $current_template_path . "/images"; // ------------------------------------------------------------------------- // Define images // ------------------------------------------------------------------------- $mx_images['linkdb_comment_post'] = $images['reply_new']; // ------------------------------------------------------------------------- // Redefine phpBB images // ------------------------------------------------------------------------- $mx_images['linkdb_folder'] = $images['folder']; $mx_images['linkdb_folder_new'] = $images['folder_new']; $mx_images['linkdb_icon_latest_reply'] = $images['icon_latest_reply']; $mx_images['linkdb_icon_minipost'] = $images['icon_minipost']; $mx_images['linkdb_icon_edit'] = $images['icon_edit']; $mx_images['linkdb_icon_delpost'] = $images['icon_delpost']; $images['linkdb_link_new'] = "$current_template_images/icon_link_new.gif"; ?> |
|
From: OryNider <ory...@us...> - 2008-03-08 15:32:43
|
Update of /cvsroot/mxbb/mx_linkdb In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv25414 Modified Files: Tag: core28x linkdb.php Added Files: Tag: core28x linkdb_install.php linkdb_uninstall.php Log Message: update for new mx_mod 2.8.2 --- NEW FILE: linkdb_install.php --- <?php /** * * @package phpBB2 Mod - pafileDB * @version $Id: linkdb_install.php,v 1.1.2.1 2008/03/08 15:32:36 orynider Exp $ * @copyright (c) 2002-2006 [Jon Ohlsson, Mohd Basri, wGEric, PHP Arena, pafileDB, CRLin] mxBB Project Team * @license http://opensource.org/licenses/gpl-license.php GNU General Public License v2 * */ $phpEx = substr(strrchr(__FILE__, '.'), 1); if ( !defined('PORTAL_BACKEND') && @file_exists( './viewtopic.' . $phpEx ) ) // -------------------------------------------- phpBB MOD MODE { define( 'MXBB_MODULE', false ); define( 'IN_PHPBB', true ); $phpbb_root_path = $module_root_path = './'; $mx_mod_path = $phpbb_root_path . 'mx_mod/'; include($phpbb_root_path . 'common.' . $phpEx); include($mx_mod_path . "includes/functions_required.$phpEx"); //Check if forum_hack is installed if (!isset($mx_root_path)) { $mx_root_path = './'; @define('IN_PORTAL', true); include_once($mx_mod_path . "includes/mx_constants.$phpEx"); include_once($mx_mod_path . "includes/shared/phpbb2/includes/functions.$phpEx"); } else { @define('IN_PORTAL', true); include_once($mx_root_path . "includes/mx_constants.$phpEx"); include_once($mx_root_path . "includes/shared/phpbb2/includes/functions.$phpEx"); } require($mx_mod_path . "includes/functions_core.$phpEx"); require($mx_mod_path . "includes/functions_styles.$phpEx"); //Check for cash mod if (file_exists($phpbb_root_path . 'includes/functions_cash.'.$phpEx)) { define('IN_CASHMOD', true); } //@ini_set( 'display_errors', '1' ); error_reporting (E_ERROR | E_WARNING | E_PARSE); // This will NOT report uninitialized variables //error_reporting(E_ALL & ~E_NOTICE); define( 'PAGE_KB', -502 ); // If this id generates a conflict with other mods, change it ;) // // Instatiate the mx_cache class // $mx_cache = new mx_cache(); // // Get mxBB config settings // //$portal_config = $mx_cache->obtain_mxbb_config(); // // instatiate the mx_request_vars class // $mx_request_vars = new mx_request_vars(); // // Page selector // $page_id = $mx_request_vars->request('page', MX_TYPE_INT, 1); $is_block = false; // // instatiate the mx_user class // $mx_user = new mx_user(); if (file_exists("./modcp.$phpEx")) // phpBB2 { define('PORTAL_BACKEND', 'phpbb2'); $tplEx = 'tpl'; // // Start user session // - populate $userdata and $lang // $mx_user->init($user_ip, $page_id, false); init_userprefs($userdata); $mx_user->set_module_default_style('prosilver'); // For compatibility with core 2.8.x if (!$userdata['user_level'] == ADMIN) { die('Only admins may run this script!!!'); } } else if (@file_exists("./mcp.$phpEx")) // phpBB3 { define('PORTAL_BACKEND', 'phpbb3'); $tplEx = 'html'; // // Start user session // - populate $userdata and $lang // $mx_user->init($user_ip, $page_id, false); $user->setup(); // // End session management // $mx_user->set_module_default_style('prosilver'); // For compatibility with core 2.8.x if ($userdata['user_type'] != USER_FOUNDER) { die('Only admins may run this script!!!'); } } else { die('Copy this file in phpbb_root_path were is your viewtopic.php file!!!'); } } else // --------------------------------------------------------------------------------- mxBB Module MODE { define( 'MXBB_MODULE', true ); if ( !function_exists( 'read_block_config' ) ) { define( 'IN_PORTAL', true ); $mx_root_path = './../../'; $module_root_path = './'; $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 define( 'MXBB_27x', file_exists( $mx_root_path . 'mx_login.' . $phpEx ) ); } else { if( !defined('IN_PORTAL') || !is_object($mx_block)) { die("Hacking attempt"); } // // Read Block Settings (default mode) // $title = !empty( $mx_block->block_info['block_title'] ) ? $mx_block->block_info['block_title'] : $lang['KB_title']; $desc = $mx_block->block_info['block_desc']; $block_size = ( isset( $block_size ) && !empty( $block_size ) ? $block_size : '100%' ); //Check for cash mod if (file_exists($phpbb_root_path . 'includes/functions_cash.'.$phpEx)) { define('IN_CASHMOD', true); } $is_block = true; global $images; } define( 'MXBB_27x', @file_exists( $mx_root_path . 'mx_login.'.$phpEx ) ); } // // Check if mx_common Mod is prezent // if (!file_exists($mx_mod_path . "includes/functions_admincp.$phpEx")) { die('mx mod is not uploaded!!!'); } else { require($mx_mod_path . "includes/functions_admincp.$phpEx"); } // // Check if mx_common Mod is prezent // if ( !file_exists( $mx_mod_path . 'includes/' . 'functions_admincp.' . $phpEx ) ) { die('mx_mod folder is not uploaded!!!'); } else { include_once( $mx_mod_path . 'includes/' . 'functions_admincp.' . $phpEx ); include_once( $mx_mod_path . 'includes/functions_required.' . $phpEx ); } $page_title = 'Installing/Upgrading linkDB'; include($phpbb_root_path . 'includes/page_header.'.$phpEx); $sql = array(); // If fresh install if ( !$result = $db->sql_query( "SELECT config_name from " . $table_prefix . "linkdb_config" ) ) { $message = "<b>This is a fresh install!</b><br/><br/>"; $sql[] = "DROP TABLE IF EXISTS " . $table_prefix . "linkdb_categories "; $sql[] = "DROP TABLE IF EXISTS " . $table_prefix . "linkdb "; $sql[] = "DROP TABLE IF EXISTS " . $table_prefix . "linkdb_config "; $sql[] = "DROP TABLE IF EXISTS " . $table_prefix . "linkdb_custom "; $sql[] = "DROP TABLE IF EXISTS " . $table_prefix . "linkdb_customdata "; $sql[] = "DROP TABLE IF EXISTS " . $table_prefix . "linkdb_votes "; $sql[] = "DROP TABLE IF EXISTS " . $table_prefix . "linkdb_comments "; $sql[] = "CREATE TABLE " . $table_prefix . "linkdb_categories ( cat_id int(10) NOT NULL auto_increment, cat_name text, cat_desc text, cat_parent int(50) default NULL, parents_data text NOT NULL, cat_order int(50) default NULL, cat_allow_file tinyint(2) NOT NULL default '1', cat_allow_comments tinyint(2) NOT NULL default '-1', internal_comments tinyint(2) NOT NULL default '-1', autogenerate_comments tinyint(2) NOT NULL default '-1', comments_forum_id mediumint(8) NOT NULL DEFAULT '-1', cat_allow_ratings tinyint(2) NOT NULL default '-1', show_pretext tinyint(2) NOT NULL default '-1', notify tinyint(2) NOT NULL default '-1', notify_group mediumint(8) NOT NULL default '-1', cat_links mediumint(8) NOT NULL default '-1', cat_last_link_id mediumint(8) unsigned NOT NULL default '0', cat_last_link_name varchar(255) NOT NULL default '', cat_last_link_time INT(50) UNSIGNED NOT NULL default '0', auth_view tinyint(3) NOT NULL DEFAULT '0', auth_post tinyint(3) NOT NULL DEFAULT '0', auth_rate tinyint(3) NOT NULL DEFAULT '0', auth_view_comment tinyint(3) NOT NULL DEFAULT '0', auth_post_comment tinyint(3) NOT NULL DEFAULT '0', auth_edit_comment tinyint(3) NOT NULL DEFAULT '0', auth_delete_comment tinyint(3) NOT NULL DEFAULT '0', auth_edit tinyint(3) NOT NULL DEFAULT '0', auth_delete tinyint(3) NOT NULL DEFAULT '2', auth_approval tinyint(3) NOT NULL DEFAULT '0', auth_approval_edit tinyint(3) NOT NULL DEFAULT '0', auth_view_groups varchar(255) NOT NULL default '0', auth_post_groups varchar(255) NOT NULL default '0', auth_rate_groups varchar(255) NOT NULL default '0', auth_view_comment_groups varchar(255) NOT NULL default '0', auth_post_comment_groups varchar(255) NOT NULL default '0', auth_edit_comment_groups varchar(255) NOT NULL default '0', auth_delete_comment_groups varchar(255) NOT NULL default '0', auth_edit_groups varchar(255) NOT NULL default '0', auth_delete_groups varchar(255) NOT NULL default '0', auth_approval_groups varchar(255) NOT NULL default '0', auth_approval_edit_groups varchar(255) NOT NULL default '0', auth_moderator_groups varchar(255) NOT NULL default '0', PRIMARY KEY (cat_id), KEY cat_order (cat_order) )"; $sql[] = "INSERT INTO " . $table_prefix . "linkdb_categories VALUES (1, 'PHP', '', '', '', '1', 0, '-1', '-1', '-1', '-1', '-1', '-1', '-1', '-1', '-1', 0, '', 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)"; $sql[] = "INSERT INTO " . $table_prefix . "linkdb_categories VALUES (2, 'Bulletin Board', '', 1, '', '2', 1, '-1', '-1', '-1', '-1', '-1', '-1', '-1', '-1', '-1', 0, '', 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)"; $sql[] = "CREATE TABLE " . $table_prefix . "linkdb ( link_id mediumint(8) unsigned NOT NULL auto_increment, link_name text, link_desc text, link_longdesc text, link_catid mediumint(8) unsigned NOT NULL default '0', link_approved tinyint(1) NOT NULL default '0', link_url varchar(100) NOT NULL default '', link_logo_src varchar(120) default NULL, link_time int(25) default '0', user_id mediumint(8) NOT NULL default '0', poster_ip varchar(8) NOT NULL default '', post_username varchar(25) default NULL, last_user_ip varchar(8) NOT NULL default '', link_hits int(10) unsigned NOT NULL default '0', topic_id mediumint(8) unsigned NOT NULL default '0', PRIMARY KEY (link_id) )"; $sql[] = "INSERT INTO " . $table_prefix . "linkdb VALUES (1, 'phpBB Official Website', 'Official phpBB Website', '', 2, 1, 'http://www.phpbb.com/', 'linkdb/images/phpBB_88a.gif', " . time() . ", " . $userdata['user_id'] . ", '', '', '', '', '')"; $sql[] = "INSERT INTO " . $table_prefix . "linkdb VALUES (2, 'mxP Official Website', NULL, 'Mx-Publisher - Modular Portal & CMS', 2, 1, 'http://mx-publisher.com', 'linkdb/images/mxbb_88a.gif', " . time() . ", " . $userdata['user_id'] . ", '', '', '', '', '')"; $sql[] = "CREATE TABLE " . $table_prefix . "linkdb_config ( config_name varchar(255) NOT NULL default '', config_value varchar(255) NOT NULL default '', PRIMARY KEY (config_name) )"; // -------------------------------------------------------- // Table structure for table `phpbb_pa_comments` $sql[] = "CREATE TABLE " . $table_prefix . "linkdb_comments ( comments_id int(10) NOT NULL auto_increment, link_id int(10) NOT NULL default '0', comments_text text NOT NULL, comments_title text NOT NULL, comments_time int(50) NOT NULL default '0', comment_bbcode_uid varchar(10) default NULL, poster_id mediumint(8) NOT NULL default '0', PRIMARY KEY (comments_id), KEY comments_id (comments_id), FULLTEXT KEY comment_bbcode_uid (comment_bbcode_uid) )"; $sql[] = "CREATE TABLE " . $table_prefix . "linkdb_custom ( custom_id int(50) NOT NULL auto_increment, custom_name text NOT NULL, custom_description text NOT NULL, data text NOT NULL, field_order int(20) NOT NULL default '0', field_type tinyint(2) NOT NULL default '0', regex varchar(255) NOT NULL default '', PRIMARY KEY (custom_id) )"; $sql[] = "CREATE TABLE " . $table_prefix . "linkdb_customdata ( customdata_file int(50) NOT NULL default '0', customdata_custom int(50) NOT NULL default '0', data text NOT NULL )"; $sql[] = "CREATE TABLE " . $table_prefix . "linkdb_votes ( user_id mediumint(8) NOT NULL default '0', votes_ip varchar(50) NOT NULL default '0', votes_link int(50) NOT NULL default '0', rate_point tinyint(3) unsigned NOT NULL default '0', KEY user_id (user_id) )"; // General $sql[] = "INSERT INTO " . $table_prefix . "linkdb_config VALUES ('enable_module', '0')"; // settings_disable $sql[] = "INSERT INTO " . $table_prefix . "linkdb_config VALUES ('module_name', 'Download Database')"; // settings_dbname $sql[] = "INSERT INTO " . $table_prefix . "linkdb_config VALUES ('wysiwyg_path', 'mx_mod/mx_shared/')"; $sql[] = "INSERT INTO " . $table_prefix . "linkdb_config VALUES ('site_logo', 'http://" . $board_config['server_name'] . $board_config['script_path'] . "linkdb/images/web_logo88a.gif')"; $sql[] = "INSERT INTO " . $table_prefix . "linkdb_config VALUES ('site_url', 'http://" . $board_config['server_name'] . $board_config['script_path'] . "')"; $sql[] = "INSERT INTO " . $table_prefix . "linkdb_config VALUES ('display_interval', '6000')"; $sql[] = "INSERT INTO " . $table_prefix . "linkdb_config VALUES ('lock_submit_site', '0')"; // Link $sql[] = "INSERT INTO " . $table_prefix . "linkdb_config VALUES ('width', '88')"; $sql[] = "INSERT INTO " . $table_prefix . "linkdb_config VALUES ('height', '31')"; $sql[] = "INSERT INTO " . $table_prefix . "linkdb_config VALUES ('display_links_logo', '1')"; $sql[] = "INSERT INTO " . $table_prefix . "linkdb_config VALUES ('allow_no_logo', '0')"; $sql[] = "INSERT INTO " . $table_prefix . "linkdb_config VALUES ('split_links', '1')"; // Appearance $sql[] = "INSERT INTO " . $table_prefix . "linkdb_config VALUES ('sort_method', 'link_time')"; $sql[] = "INSERT INTO " . $table_prefix . "linkdb_config VALUES ('sort_order', 'DESC')"; $sql[] = "INSERT INTO " . $table_prefix . "linkdb_config VALUES ('pagination', '10')"; $sql[] = "INSERT INTO " . $table_prefix . "linkdb_config VALUES ('use_simple_navigation', '1')"; $sql[] = "INSERT INTO " . $table_prefix . "linkdb_config VALUES ('cat_col', '2')"; $sql[] = "INSERT INTO " . $table_prefix . "linkdb_config VALUES ('settings_newdays', '1')"; // New -------------------- // Comments $sql[] = "INSERT INTO " . $table_prefix . "linkdb_config VALUES ('use_comments', '0')"; // comments_show $sql[] = "INSERT INTO " . $table_prefix . "linkdb_config VALUES ('internal_comments', '1')"; // NEW $sql[] = "INSERT INTO " . $table_prefix . "linkdb_config VALUES ('formatting_comment_wordwrap', '1')"; // formatting_comment_fixup $sql[] = "INSERT INTO " . $table_prefix . "linkdb_config VALUES ('formatting_comment_image_resize', '300')"; // NEW $sql[] = "INSERT INTO " . $table_prefix . "linkdb_config VALUES ('formatting_comment_truncate_links', '1')"; // NEW $sql[] = "INSERT INTO " . $table_prefix . "linkdb_config VALUES ('max_comment_subject_chars', '50')"; // NEW $sql[] = "INSERT INTO " . $table_prefix . "linkdb_config VALUES ('max_comment_chars', '5000')"; $sql[] = "INSERT INTO " . $table_prefix . "linkdb_config VALUES ('allow_comment_wysiwyg', '0')"; // allow_wysiwyg_comments & allow_wysiwyg $sql[] = "INSERT INTO " . $table_prefix . "linkdb_config VALUES ('allow_comment_html', '1')"; $sql[] = "INSERT INTO " . $table_prefix . "linkdb_config VALUES ('allow_comment_bbcode', '1')"; $sql[] = "INSERT INTO " . $table_prefix . "linkdb_config VALUES ('allow_comment_smilies', '1')"; $sql[] = "INSERT INTO " . $table_prefix . "linkdb_config VALUES ('allow_comment_links', '1')"; $sql[] = "INSERT INTO " . $table_prefix . "linkdb_config VALUES ('allow_comment_images', '0')"; $sql[] = "INSERT INTO " . $table_prefix . "linkdb_config VALUES ('no_comment_image_message', '[No image please]')"; $sql[] = "INSERT INTO " . $table_prefix . "linkdb_config VALUES ('no_comment_link_message', '[No links please]')"; $sql[] = "INSERT INTO " . $table_prefix . "linkdb_config VALUES ('allowed_comment_html_tags', 'b,i,u,a')"; // NEW $sql[] = "INSERT INTO " . $table_prefix . "linkdb_config VALUES ('del_topic', '1')"; // NEW $sql[] = "INSERT INTO " . $table_prefix . "linkdb_config VALUES ('autogenerate_comments', '1')"; // NEW $sql[] = "INSERT INTO " . $table_prefix . "linkdb_config VALUES ('comments_pagination', '5')"; $sql[] = "INSERT INTO " . $table_prefix . "linkdb_config VALUES ('comments_forum_id', '1')"; // New // Ratings $sql[] = "INSERT INTO " . $table_prefix . "linkdb_config VALUES ('use_ratings', '0')"; $sql[] = "INSERT INTO " . $table_prefix . "linkdb_config VALUES ('votes_check_userid', '1')"; $sql[] = "INSERT INTO " . $table_prefix . "linkdb_config VALUES ('votes_check_ip', '1')"; // Instructions $sql[] = "INSERT INTO " . $table_prefix . "linkdb_config VALUES ('show_pretext', '0')"; // NEW $sql[] = "INSERT INTO " . $table_prefix . "linkdb_config VALUES ('pt_header', 'Link Submission Instructions')"; // NEW $sql[] = "INSERT INTO " . $table_prefix . "linkdb_config values ('pt_body', 'Please check your references and include as much information as you can.')"; // NEW // Notifications $sql[] = "INSERT INTO " . $table_prefix . "linkdb_config VALUES ('notify', 'pm')"; // pm_notify $sql[] = "INSERT INTO " . $table_prefix . "linkdb_config VALUES ('notify_group', '0')"; // NEW $message .= mx_do_install_upgrade( $sql ); } else { // Upgrade checks $upgrade_280 = 0; // validate before 2.8.0 $result = $db->sql_query( "SELECT config_value from " . $table_prefix . "linkdb_config WHERE config_name = 'comments_forum_id'" ); if ( $db->sql_numrows( $result ) == 0 ) { $upgrade_280 = 1; $message .= "<b>Upgrading to v. 2.8.0...ok</b><br/><br/>"; } else { $message .= "<b>Validating v. 2.8.0...ok</b><br/><br/>"; } $message = "<b>Upgrading!</b><br/><br/>"; if ( $upgrade_280 == 1 ) { //$sql[] = "INSERT INTO " . $table_prefix . "linkdb_config VALUES ('comments_forum_id', '0')"; //$sql[] = "ALTER TABLE " . $table_prefix . "linkdb_categories MODIFY cat_allow_ratings tinyint(2) NOT NULL default '-1' "; //$sql[] = "ALTER TABLE " . $table_prefix . "linkdb_categories ADD auth_approval_groups tinyint(2) NOT NULL default '0' "; // // Category // $sql[] = "ALTER TABLE " . $table_prefix . "linkdb_categories ADD cat_desc text "; $sql[] = "ALTER TABLE " . $table_prefix . "linkdb_categories ADD cat_allow_file tinyint(2) NOT NULL default '1' "; $sql[] = "ALTER TABLE " . $table_prefix . "linkdb_categories ADD cat_allow_comments tinyint(2) NOT NULL default '-1' "; $sql[] = "ALTER TABLE " . $table_prefix . "linkdb_categories ADD internal_comments tinyint(2) NOT NULL default '-1' "; $sql[] = "ALTER TABLE " . $table_prefix . "linkdb_categories ADD autogenerate_comments tinyint(2) NOT NULL default '-1' "; $sql[] = "ALTER TABLE " . $table_prefix . "linkdb_categories ADD comments_forum_id mediumint(8) NOT NULL DEFAULT '-1' "; $sql[] = "ALTER TABLE " . $table_prefix . "linkdb_categories ADD cat_allow_ratings tinyint(2) NOT NULL default '-1' "; $sql[] = "ALTER TABLE " . $table_prefix . "linkdb_categories ADD show_pretext tinyint(2) NOT NULL default '-1' "; $sql[] = "ALTER TABLE " . $table_prefix . "linkdb_categories ADD notify tinyint(2) NOT NULL default '-1' "; $sql[] = "ALTER TABLE " . $table_prefix . "linkdb_categories ADD notify_group mediumint(8) NOT NULL default '-1' "; $sql[] = "ALTER TABLE " . $table_prefix . "linkdb_categories ADD cat_last_link_id mediumint(8) unsigned NOT NULL default '0' "; $sql[] = "ALTER TABLE " . $table_prefix . "linkdb_categories ADD cat_last_link_name varchar(255) NOT NULL default '' "; $sql[] = "ALTER TABLE " . $table_prefix . "linkdb_categories ADD cat_last_link_time INT(50) UNSIGNED NOT NULL default '0' "; $sql[] = "ALTER TABLE " . $table_prefix . "linkdb_categories ADD auth_view tinyint(3) NOT NULL DEFAULT '0' "; $sql[] = "ALTER TABLE " . $table_prefix . "linkdb_categories ADD auth_post tinyint(3) NOT NULL DEFAULT '0' "; $sql[] = "ALTER TABLE " . $table_prefix . "linkdb_categories ADD auth_rate tinyint(3) NOT NULL DEFAULT '0' "; $sql[] = "ALTER TABLE " . $table_prefix . "linkdb_categories ADD auth_view_comment tinyint(3) NOT NULL DEFAULT '0' "; $sql[] = "ALTER TABLE " . $table_prefix . "linkdb_categories ADD auth_post_comment tinyint(3) NOT NULL DEFAULT '0' "; $sql[] = "ALTER TABLE " . $table_prefix . "linkdb_categories ADD auth_edit_comment tinyint(3) NOT NULL DEFAULT '0' "; $sql[] = "ALTER TABLE " . $table_prefix . "linkdb_categories ADD auth_delete_comment tinyint(3) NOT NULL DEFAULT '0' "; $sql[] = "ALTER TABLE " . $table_prefix . "linkdb_categories ADD auth_edit tinyint(3) NOT NULL DEFAULT '0' "; $sql[] = "ALTER TABLE " . $table_prefix . "linkdb_categories ADD auth_delete tinyint(3) NOT NULL DEFAULT '2' "; $sql[] = "ALTER TABLE " . $table_prefix . "linkdb_categories ADD auth_approval tinyint(3) NOT NULL DEFAULT '0' "; $sql[] = "ALTER TABLE " . $table_prefix . "linkdb_categories ADD auth_approval_edit tinyint(3) NOT NULL DEFAULT '0' "; $sql[] = "ALTER TABLE " . $table_prefix . "linkdb_categories ADD auth_view_groups varchar(255) NOT NULL default '0' "; $sql[] = "ALTER TABLE " . $table_prefix . "linkdb_categories ADD auth_post_groups varchar(255) NOT NULL default '0' "; $sql[] = "ALTER TABLE " . $table_prefix . "linkdb_categories ADD auth_rate_groups varchar(255) NOT NULL default '0' "; $sql[] = "ALTER TABLE " . $table_prefix . "linkdb_categories ADD auth_view_comment_groups varchar(255) NOT NULL default '0' "; $sql[] = "ALTER TABLE " . $table_prefix . "linkdb_categories ADD auth_post_comment_groups varchar(255) NOT NULL default '0' "; $sql[] = "ALTER TABLE " . $table_prefix . "linkdb_categories ADD auth_edit_comment_groups varchar(255) NOT NULL default '0' "; $sql[] = "ALTER TABLE " . $table_prefix . "linkdb_categories ADD auth_delete_comment_groups varchar(255) NOT NULL default '0' "; $sql[] = "ALTER TABLE " . $table_prefix . "linkdb_categories ADD auth_edit_groups varchar(255) NOT NULL default '0' "; $sql[] = "ALTER TABLE " . $table_prefix . "linkdb_categories ADD auth_delete_groups varchar(255) NOT NULL default '0' "; $sql[] = "ALTER TABLE " . $table_prefix . "linkdb_categories ADD auth_approval_groups varchar(255) NOT NULL default '0' "; $sql[] = "ALTER TABLE " . $table_prefix . "linkdb_categories ADD auth_approval_edit_groups varchar(255) NOT NULL default '0' "; $sql[] = "ALTER TABLE " . $table_prefix . "linkdb_categories ADD auth_moderator_groups varchar(255) NOT NULL default '0' "; // // linkdb // $sql[] = "ALTER TABLE " . $table_prefix . "linkdb ADD link_desc text "; $sql[] = "ALTER TABLE " . $table_prefix . "linkdb ADD topic_id mediumint(8) unsigned NOT NULL default '0' "; // // Config // $sql[] = "ALTER TABLE " . $table_prefix . "linkdb_config DROP PRIMARY KEY, ADD PRIMARY KEY (config_name) "; $sql[] = "DELETE FROM " . $table_prefix . "linkdb_config" . " WHERE config_name = 'allow_guest_submit_site'"; $sql[] = "DELETE FROM " . $table_prefix . "linkdb_config" . " WHERE config_name = 'allow_vote'"; $sql[] = "DELETE FROM " . $table_prefix . "linkdb_config" . " WHERE config_name = 'linkdb_versions'"; $sql[] = "DELETE FROM " . $table_prefix . "linkdb_config" . " WHERE config_name = 'link_validation'"; $sql[] = "DELETE FROM " . $table_prefix . "linkdb_config" . " WHERE config_name = 'email_notify'"; $sql[] = "DELETE FROM " . $table_prefix . "linkdb_config" . " WHERE config_name = 'display_logo_num'"; $sql[] = "UPDATE " . $table_prefix . "linkdb_config" . " SET config_name = 'notify', config_value = 'pm' WHERE config_name = 'pm_notify'"; $sql[] = "UPDATE " . $table_prefix . "linkdb_config" . " SET config_name = 'pagination' WHERE config_name = 'settings_link_page'"; // General $sql[] = "INSERT INTO " . $table_prefix . "linkdb_config VALUES ('enable_module', '0') "; $sql[] = "INSERT INTO " . $table_prefix . "linkdb_config VALUES ('module_name', 'Download Database') "; $sql[] = "INSERT INTO " . $table_prefix . "linkdb_config VALUES ('wysiwyg_path', 'mx_mod/mx_shared/') "; // Appearance $sql[] = "INSERT INTO " . $table_prefix . "linkdb_config VALUES ('use_simple_navigation', '1') "; $sql[] = "INSERT INTO " . $table_prefix . "linkdb_config VALUES ('settings_newdays', '1') "; // Comments $sql[] = "INSERT INTO " . $table_prefix . "linkdb_config VALUES ('use_comments', '0') "; // comments_show $sql[] = "INSERT INTO " . $table_prefix . "linkdb_config VALUES ('internal_comments', '1') "; // NEW $sql[] = "INSERT INTO " . $table_prefix . "linkdb_config VALUES ('formatting_comment_wordwrap', '1') "; // formatting_comment_fixup $sql[] = "INSERT INTO " . $table_prefix . "linkdb_config VALUES ('formatting_comment_image_resize', '300') "; // NEW $sql[] = "INSERT INTO " . $table_prefix . "linkdb_config VALUES ('formatting_comment_truncate_links', '1') "; // NEW $sql[] = "INSERT INTO " . $table_prefix . "linkdb_config VALUES ('max_comment_subject_chars', '50') "; // NEW $sql[] = "INSERT INTO " . $table_prefix . "linkdb_config VALUES ('max_comment_chars', '5000') "; $sql[] = "INSERT INTO " . $table_prefix . "linkdb_config VALUES ('allow_comment_wysiwyg', '0') "; // allow_wysiwyg_comments & allow_wysiwyg $sql[] = "INSERT INTO " . $table_prefix . "linkdb_config VALUES ('allow_comment_html', '1') "; $sql[] = "INSERT INTO " . $table_prefix . "linkdb_config VALUES ('allow_comment_bbcode', '1') "; $sql[] = "INSERT INTO " . $table_prefix . "linkdb_config VALUES ('allow_comment_smilies', '1') "; $sql[] = "INSERT INTO " . $table_prefix . "linkdb_config VALUES ('allow_comment_links', '1') "; $sql[] = "INSERT INTO " . $table_prefix . "linkdb_config VALUES ('allow_comment_images', '0') "; $sql[] = "INSERT INTO " . $table_prefix . "linkdb_config VALUES ('no_comment_image_message', '[No image please]') "; $sql[] = "INSERT INTO " . $table_prefix . "linkdb_config VALUES ('no_comment_link_message', '[No links please]') "; $sql[] = "INSERT INTO " . $table_prefix . "linkdb_config VALUES ('allowed_comment_html_tags', 'b,i,u,a') "; // NEW $sql[] = "INSERT INTO " . $table_prefix . "linkdb_config VALUES ('del_topic', '1') "; // NEW $sql[] = "INSERT INTO " . $table_prefix . "linkdb_config VALUES ('autogenerate_comments', '1') "; // NEW $sql[] = "INSERT INTO " . $table_prefix . "linkdb_config VALUES ('comments_pagination', '5') "; $sql[] = "INSERT INTO " . $table_prefix . "linkdb_config VALUES ('comments_forum_id', '1') "; // New $sql[] = "INSERT INTO " . $table_prefix . "linkdb_config VALUES ('show_pretext', '0') "; // NEW $sql[] = "INSERT INTO " . $table_prefix . "linkdb_config VALUES ('pt_header', 'Link Submission Instructions') "; // NEW $sql[] = "INSERT INTO " . $table_prefix . "linkdb_config values ('pt_body', 'Please check your references and include as much information as you can.') "; // NEW // Ratings $sql[] = "INSERT INTO " . $table_prefix . "linkdb_config VALUES ('use_ratings', '0') "; $sql[] = "INSERT INTO " . $table_prefix . "linkdb_config VALUES ('votes_check_userid', '1') "; $sql[] = "INSERT INTO " . $table_prefix . "linkdb_config VALUES ('votes_check_ip', '1') "; // // Comments // // -------------------------------------------------------- // Table structure for table `phpbb_pa_comments` $sql[] = "CREATE TABLE " . $table_prefix . "linkdb_comments ( comments_id int(10) NOT NULL auto_increment, link_id int(10) NOT NULL default '0', comments_text text NOT NULL, comments_title text NOT NULL, comments_time int(50) NOT NULL default '0', comment_bbcode_uid varchar(10) default NULL, poster_id mediumint(8) NOT NULL default '0', PRIMARY KEY (comments_id), KEY comments_id (comments_id), FULLTEXT KEY comment_bbcode_uid (comment_bbcode_uid) )"; } else { $message .= "<b>Nothing to upgrade...</b><br/><br/>"; } $message .= mx_do_install_upgrade( $sql ); // // Empty module cache // //include_once( $phpbb_root_path . 'mx_mod/functions_tools.' . $phpEx ); //$module_cache = new module_cache($phpbb_root_path . 'linkdb/'); //$module_cache->tidy(); //$module_cache->save(); } echo "<br /><br />"; echo "<table width=\"90%\" align=\"center\" cellpadding=\"4\" cellspacing=\"1\" border=\"0\" class=\"forumline\">"; echo "<tr><th class=\"thHead\" align=\"center\">Mod Installation/Upgrading/Uninstalling Information - mod specific db tables</th></tr>"; echo "<tr><td class=\"row1\" align=\"left\"><span class=\"gen\">" . $message . "</span></td></tr>"; echo "</table><br />"; include($phpbb_root_path . 'includes/page_tail.'.$phpEx); ?> --- NEW FILE: linkdb_uninstall.php --- <?php /** * * @package phpBB2 Mod - pafileDB * @version $Id: linkdb_uninstall.php,v 1.1.2.1 2008/03/08 15:32:38 orynider Exp $ * @copyright (c) 2002-2006 [Jon Ohlsson, Mohd Basri, wGEric, PHP Arena, pafileDB, CRLin] mxBB Project Team * @license http://opensource.org/licenses/gpl-license.php GNU General Public License v2 * */ $phpEx = substr(strrchr(__FILE__, '.'), 1); if ( !defined('PORTAL_BACKEND') && @file_exists( './viewtopic.' . $phpEx ) ) // -------------------------------------------- phpBB MOD MODE { define( 'MXBB_MODULE', false ); define( 'IN_PHPBB', true ); $phpbb_root_path = $module_root_path = './'; $mx_mod_path = $phpbb_root_path . 'mx_mod/'; include($phpbb_root_path . 'common.' . $phpEx); include($mx_mod_path . "includes/functions_required.$phpEx"); //Check if forum_hack is installed if (!isset($mx_root_path)) { $mx_root_path = './'; @define('IN_PORTAL', true); include_once($mx_mod_path . "includes/mx_constants.$phpEx"); include_once($mx_mod_path . "includes/shared/phpbb2/includes/functions.$phpEx"); } else { @define('IN_PORTAL', true); include_once($mx_root_path . "includes/mx_constants.$phpEx"); include_once($mx_root_path . "includes/shared/phpbb2/includes/functions.$phpEx"); } require($mx_mod_path . "includes/functions_core.$phpEx"); require($mx_mod_path . "includes/functions_styles.$phpEx"); //Check for cash mod if (file_exists($phpbb_root_path . 'includes/functions_cash.'.$phpEx)) { define('IN_CASHMOD', true); } //@ini_set( 'display_errors', '1' ); error_reporting (E_ERROR | E_WARNING | E_PARSE); // This will NOT report uninitialized variables //error_reporting(E_ALL & ~E_NOTICE); define( 'PAGE_KB', -502 ); // If this id generates a conflict with other mods, change it ;) // // Instatiate the mx_cache class // $mx_cache = new mx_cache(); // // Get mxBB config settings // //$portal_config = $mx_cache->obtain_mxbb_config(); // // instatiate the mx_request_vars class // $mx_request_vars = new mx_request_vars(); // // Page selector // $page_id = $mx_request_vars->request('page', MX_TYPE_INT, 1); $is_block = false; // // instatiate the mx_user class // $mx_user = new mx_user(); if (file_exists("./modcp.$phpEx")) // phpBB2 { define('PORTAL_BACKEND', 'phpbb2'); $tplEx = 'tpl'; // // Start user session // - populate $userdata and $lang // $mx_user->init($user_ip, $page_id, false); init_userprefs($userdata); $mx_user->set_module_default_style('prosilver'); // For compatibility with core 2.8.x if (!$userdata['user_level'] == ADMIN) { die('Only admins may run this script!!!'); } } else if (@file_exists("./mcp.$phpEx")) // phpBB3 { define('PORTAL_BACKEND', 'phpbb3'); $tplEx = 'html'; // // Start user session // - populate $userdata and $lang // $mx_user->init($user_ip, $page_id, false); $user->setup(); // // End session management // $mx_user->set_module_default_style('prosilver'); // For compatibility with core 2.8.x if ($userdata['user_type'] != USER_FOUNDER) { die('Only admins may run this script!!!'); } } else { die('Copy this file in phpbb_root_path were is your viewtopic.php file!!!'); } } else // --------------------------------------------------------------------------------- mxBB Module MODE { define( 'MXBB_MODULE', true ); if ( !function_exists( 'read_block_config' ) ) { define( 'IN_PORTAL', true ); $mx_root_path = './../../'; $module_root_path = './'; $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 define( 'MXBB_27x', file_exists( $mx_root_path . 'mx_login.' . $phpEx ) ); } else { if( !defined('IN_PORTAL') || !is_object($mx_block)) { die("Hacking attempt"); } // // Read Block Settings (default mode) // $title = !empty( $mx_block->block_info['block_title'] ) ? $mx_block->block_info['block_title'] : $lang['KB_title']; $desc = $mx_block->block_info['block_desc']; $block_size = ( isset( $block_size ) && !empty( $block_size ) ? $block_size : '100%' ); //Check for cash mod if (file_exists($phpbb_root_path . 'includes/functions_cash.'.$phpEx)) { define('IN_CASHMOD', true); } $is_block = true; global $images; } define( 'MXBB_27x', @file_exists( $mx_root_path . 'mx_login.'.$phpEx ) ); } // // Check if mx_common Mod is prezent // if (!file_exists($mx_mod_path . "includes/functions_admincp.$phpEx")) { die('mx mod is not uploaded!!!'); } else { require($mx_mod_path . "includes/functions_admincp.$phpEx"); } $page_title = 'Uninstalling linkDB'; include($phpbb_root_path . 'includes/page_header.'.$phpEx); $sql = array( "DROP TABLE " . $table_prefix . "linkdb_categories ", "DROP TABLE " . $table_prefix . "linkdb ", "DROP TABLE " . $table_prefix . "linkdb_config ", "DROP TABLE " . $table_prefix . "linkdb_custom ", "DROP TABLE " . $table_prefix . "linkdb_customdata ", "DROP TABLE " . $table_prefix . "linkdb_votes ", "DROP TABLE " . $table_prefix . "linkdb_comments ", ); echo "<br /><br />"; echo "<table width=\"90%\" align=\"center\" cellpadding=\"4\" cellspacing=\"1\" border=\"0\" class=\"forumline\">"; echo "<tr><th class=\"thHead\" align=\"center\">Mod Installation/Upgrading/Uninstalling Information - mod specific db tables</th></tr>"; echo "<tr><td class=\"row1\" align=\"left\"><span class=\"gen\">" . mx_do_install_upgrade( $sql ) . "</span></td></tr>"; echo "</table><br />"; include($phpbb_root_path . 'includes/page_tail.'.$phpEx); ?> Index: linkdb.php =================================================================== RCS file: /cvsroot/mxbb/mx_linkdb/linkdb.php,v retrieving revision 1.13.2.2 retrieving revision 1.13.2.3 diff -C2 -d -r1.13.2.2 -r1.13.2.3 *** linkdb.php 15 Feb 2008 23:52:24 -0000 1.13.2.2 --- linkdb.php 8 Mar 2008 15:32:35 -0000 1.13.2.3 *************** *** 13,26 **** if ( !defined('PORTAL_BACKEND') && @file_exists( './viewtopic.' . $phpEx ) ) // -------------------------------------------- phpBB MOD MODE { ! define( 'MXBB_MODULE', false ); ! define( 'IN_PHPBB', true ); ! define( 'IN_PORTAL', true ); ! define( 'IN_DOWNLOAD', true ); ! define( 'IN_LINKS', true ); ! ! // When run as a phpBB mod these paths are identical ;) ! $phpbb_root_path = $module_root_path = $mx_root_path = './'; $mx_mod_path = $phpbb_root_path . 'mx_mod/'; //Check for cash mod if (file_exists($phpbb_root_path . 'includes/functions_cash.'.$phpEx)) --- 13,46 ---- if ( !defined('PORTAL_BACKEND') && @file_exists( './viewtopic.' . $phpEx ) ) // -------------------------------------------- phpBB MOD MODE { ! define('MXBB_MODULE', false); ! define('IN_PHPBB', true); ! ! $phpbb_root_path = $module_root_path = './'; $mx_mod_path = $phpbb_root_path . 'mx_mod/'; + + include($phpbb_root_path . 'common.' . $phpEx); + include($mx_mod_path . "includes/functions_required.$phpEx"); + + //Check if forum_hack is installed + if (!isset($mx_root_path)) + { + $mx_root_path = './'; + @define('IN_PORTAL', true); + include_once($mx_mod_path . "includes/mx_constants.$phpEx"); + include_once($mx_mod_path . "includes/shared/phpbb2/includes/functions.$phpEx"); + } + else + { + @define('IN_PORTAL', true); + include_once($mx_root_path . "includes/mx_constants.$phpEx"); + include_once($mx_root_path . "includes/shared/phpbb2/includes/functions.$phpEx"); + //Redefine mx_root_path to include phpbb page_tail.php + $mx_root_path = $phpbb_root_path; + } + + require($mx_mod_path . "includes/functions_core.$phpEx"); + require($mx_mod_path . "includes/functions_styles.$phpEx"); + //Check for cash mod if (file_exists($phpbb_root_path . 'includes/functions_cash.'.$phpEx)) *************** *** 29,41 **** } ! include( $phpbb_root_path . 'common.' . $phpEx ); ! ! @ini_set( 'display_errors', '1' ); error_reporting (E_ERROR | E_WARNING | E_PARSE); // This will NOT report uninitialized variables ! include_once( $mx_mod_path . 'includes/functions_required.' . $phpEx ); ! include_once( $mx_mod_path . 'includes/functions_core.' . $phpEx ); ! ! define( 'PAGE_LINKS', -502 ); // If this id generates a conflict with other mods, change it ;) // --- 49,57 ---- } ! //@ini_set( 'display_errors', '1' ); error_reporting (E_ERROR | E_WARNING | E_PARSE); // This will NOT report uninitialized variables + //error_reporting(E_ALL & ~E_NOTICE); ! define( 'PAGE_KB', -502 ); // If this id generates a conflict with other mods, change it ;) // *************** *** 43,51 **** // $mx_cache = new mx_cache(); ! // // Get mxBB config settings // ! $portal_config = $mx_cache->obtain_mxbb_config(); // --- 59,67 ---- // $mx_cache = new mx_cache(); ! // // Get mxBB config settings // ! //$portal_config = $mx_cache->obtain_mxbb_config(); // *************** *** 53,87 **** // $mx_request_vars = new mx_request_vars(); $is_block = false; ! if ( file_exists("./modcp.$phpEx") ) // phpBB2 { define('PORTAL_BACKEND', 'phpbb2'); $tplEx = 'tpl'; ! include_once( $phpbb_root_path . 'includes/bbcode.' . $phpEx ); ! include_once( $phpbb_root_path . 'includes/functions_post.' . $phpEx ); ! ! // Start session management ! $userdata = session_pagestart( $user_ip, PAGE_DOWNLOAD ); ! init_userprefs( $userdata ); ! // End session management ! ! } ! else if ( @file_exists("./mcp.$phpEx") ) // phpBB3 { define('PORTAL_BACKEND', 'phpbb3'); $tplEx = 'html'; ! ! //include_once( $mx_mod_path . 'includes/shared/phpbb2/includes/bbcode.' . $phpEx ); ! //include_once( $mx_mod_path . 'includes/shared/phpbb2/includes/functions_post.' . $phpEx ); ! // ! // Start session management // ! $user->session_begin(); ! $userdata = $user->data; $user->setup(); // --- 69,119 ---- // $mx_request_vars = new mx_request_vars(); + + // + // Page selector + // + $page_id = $mx_request_vars->request('page', MX_TYPE_INT, 1); $is_block = false; + + // + // instatiate the mx_user class + // + $mx_user = new mx_user(); ! if (file_exists("./modcp.$phpEx")) // phpBB2 { define('PORTAL_BACKEND', 'phpbb2'); $tplEx = 'tpl'; + + // + // Start user session + // - populate $userdata and $lang + // + $mx_user->init($user_ip, $page_id, false); + //init_userprefs($userdata); + $mx_user->init_style(); //Overwrite template class ! /* ! $mx_user->set_module_default_style('_core'); // For compatibility with core 2.8.x ! if (!$userdata['user_level'] == ADMIN) ! { ! die('Only admins may run this script!!!'); ! } ! */ ! include_once($phpbb_root_path . 'includes/bbcode.' . $phpEx); ! include_once($phpbb_root_path . 'includes/functions_post.' . $phpEx); ! } ! else if (@file_exists("./mcp.$phpEx")) // phpBB3 { define('PORTAL_BACKEND', 'phpbb3'); $tplEx = 'html'; ! // ! // Start user session ! // - populate $userdata and $lang // ! $mx_user->init($user_ip, $page_id, false); $user->setup(); // *************** *** 89,96 **** // ! // ! // Get phpBB config settings ! // ! $board_config = $config; } else --- 121,133 ---- // ! /* ! $mx_user->set_module_default_style('_core'); // For compatibility with core 2.8.x ! if ($userdata['user_type'] != USER_FOUNDER) ! { ! die('Only admins may run this script!!!'); ! } ! */ ! include_once($mx_mod_path . "includes/shared/phpbb2/includes/bbcode.$phpEx"); ! include_once($mx_mod_path . "includes/shared/phpbb2/includes/functions_post.$phpEx"); } else *************** *** 146,159 **** $block_size = ( isset( $block_size ) && !empty( $block_size ) ? $block_size : '100%' ); - //Check for cash mod - if (file_exists($phpbb_root_path . 'includes/functions_cash.'.$phpEx)) - { - define('IN_CASHMOD', true); - } - $is_block = true; global $images; } ! define( 'MXBB_27x', @file_exists( $mx_root_path . 'mx_login.'.$phpEx ) ); } --- 183,190 ---- $block_size = ( isset( $block_size ) && !empty( $block_size ) ? $block_size : '100%' ); $is_block = true; global $images; } ! define( 'MXBB_27x', file_exists( $mx_root_path . 'mx_login.php' ) ); } *************** *** 178,196 **** // Get action variable other wise set it to the main // ! $action = $mx_request_vars->request('action', MX_TYPE_NO_TAGS, 'main'); // =================================================== // Is admin? // =================================================== ! switch (PORTAL_BACKEND) ! { ! case 'internal': ! case 'phpbb2': ! $is_admin = ( ( $userdata['user_level'] == ADMIN ) && $userdata['session_logged_in'] ) ? true : 0; ! break; ! case 'phpbb3': ! $is_admin = ( $userdata['user_type'] == USER_FOUNDER ) ? true : 0; ! break; ! } // =================================================== --- 209,218 ---- // Get action variable other wise set it to the main // ! $action = ( isset( $_REQUEST['action'] ) ) ? htmlspecialchars( $_REQUEST['action'] ) : 'main'; // =================================================== // Is admin? // =================================================== ! $is_admin = ( ( $userdata['user_level'] == ADMIN ) && $userdata['session_logged_in'] ) ? true : 0; // =================================================== |
|
From: OryNider <ory...@us...> - 2008-03-08 15:32:43
|
Update of /cvsroot/mxbb/mx_linkdb/linkdb In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv25414/linkdb Modified Files: Tag: core28x linkdb_common.php Log Message: update for new mx_mod 2.8.2 Index: linkdb_common.php =================================================================== RCS file: /cvsroot/mxbb/mx_linkdb/linkdb/linkdb_common.php,v retrieving revision 1.5.2.1 retrieving revision 1.5.2.2 diff -C2 -d -r1.5.2.1 -r1.5.2.2 *** linkdb_common.php 28 Jan 2008 03:08:25 -0000 1.5.2.1 --- linkdb_common.php 8 Mar 2008 15:32:38 -0000 1.5.2.2 *************** *** 84,91 **** } // ********************************************************************** // If phpBB mod read language definition // ********************************************************************** - if ( !MXBB_MODULE ) { --- 84,91 ---- } + /* // ********************************************************************** // If phpBB mod read language definition // ********************************************************************** if ( !MXBB_MODULE ) { *************** *** 191,194 **** --- 191,195 ---- } } + */ include_once( $module_root_path . 'linkdb/includes/functions.' . $phpEx ); |
|
From: OryNider <ory...@us...> - 2008-03-08 15:28:02
|
Update of /cvsroot/mxbb/mx_pafiledb/pafiledb In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv18254/pafiledb Modified Files: Tag: core28x pafiledb_common.php Log Message: update for new mx_mod 2.8.2 Index: pafiledb_common.php =================================================================== RCS file: /cvsroot/mxbb/mx_pafiledb/pafiledb/pafiledb_common.php,v retrieving revision 1.19.2.1 retrieving revision 1.19.2.2 diff -C2 -d -r1.19.2.1 -r1.19.2.2 *** pafiledb_common.php 28 Jan 2008 03:11:06 -0000 1.19.2.1 --- pafiledb_common.php 8 Mar 2008 15:27:22 -0000 1.19.2.2 *************** *** 64,68 **** // Include Files // =================================================== ! include_once( $module_root_path . 'pafiledb/includes/pafiledb_constants.' . $phpEx ); // --- 64,68 ---- // Include Files // =================================================== ! include_once($module_root_path . 'pafiledb/includes/pafiledb_constants.' . $phpEx); // *************** *** 84,88 **** include_once( $mx_root_path . 'includes/mx_functions_tools.' . $phpEx ); } ! // ********************************************************************** // If phpBB mod read language definition --- 84,88 ---- include_once( $mx_root_path . 'includes/mx_functions_tools.' . $phpEx ); } ! /* // ********************************************************************** // If phpBB mod read language definition *************** *** 189,193 **** } } ! include_once( $module_root_path . 'pafiledb/includes/functions.' . $phpEx ); include_once( $module_root_path . 'pafiledb/includes/functions_auth.' . $phpEx ); --- 189,193 ---- } } ! */ include_once( $module_root_path . 'pafiledb/includes/functions.' . $phpEx ); include_once( $module_root_path . 'pafiledb/includes/functions_auth.' . $phpEx ); |
|
From: OryNider <ory...@us...> - 2008-03-08 15:28:00
|
Update of /cvsroot/mxbb/mx_pafiledb In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv18254 Modified Files: Tag: core28x dload.php Added Files: Tag: core28x pa_install.php pa_uninstall.php Log Message: update for new mx_mod 2.8.2 --- NEW FILE: pa_uninstall.php --- <?php /** * * @package phpBB2 Mod - pafileDB * @version $Id: pa_uninstall.php,v 1.1.2.1 2008/03/08 15:27:20 orynider Exp $ * @copyright (c) 2002-2006 [Jon Ohlsson, Mohd Basri, wGEric, PHP Arena, pafileDB, CRLin] mxBB Project Team * @license http://opensource.org/licenses/gpl-license.php GNU General Public License v2 * */ $phpEx = substr(strrchr(__FILE__, '.'), 1); if ( !defined('PORTAL_BACKEND') && @file_exists( './viewtopic.' . $phpEx ) ) // -------------------------------------------- phpBB MOD MODE { define( 'MXBB_MODULE', false ); define( 'IN_PHPBB', true ); $phpbb_root_path = $module_root_path = './'; $mx_mod_path = $phpbb_root_path . 'mx_mod/'; include($phpbb_root_path . 'common.' . $phpEx); include($mx_mod_path . "includes/functions_required.$phpEx"); //Check if forum_hack is installed if (!isset($mx_root_path)) { $mx_root_path = './'; @define('IN_PORTAL', true); include_once($mx_mod_path . "includes/mx_constants.$phpEx"); include_once($mx_mod_path . "includes/shared/phpbb2/includes/functions.$phpEx"); } else { @define('IN_PORTAL', true); include_once($mx_root_path . "includes/mx_constants.$phpEx"); include_once($mx_root_path . "includes/shared/phpbb2/includes/functions.$phpEx"); } require($mx_mod_path . "includes/functions_core.$phpEx"); require($mx_mod_path . "includes/functions_styles.$phpEx"); //Check for cash mod if (file_exists($phpbb_root_path . 'includes/functions_cash.'.$phpEx)) { define('IN_CASHMOD', true); } //@ini_set( 'display_errors', '1' ); error_reporting (E_ERROR | E_WARNING | E_PARSE); // This will NOT report uninitialized variables //error_reporting(E_ALL & ~E_NOTICE); define( 'PAGE_KB', -502 ); // If this id generates a conflict with other mods, change it ;) // // Instatiate the mx_cache class // $mx_cache = new mx_cache(); // // Get mxBB config settings // //$portal_config = $mx_cache->obtain_mxbb_config(); // // instatiate the mx_request_vars class // $mx_request_vars = new mx_request_vars(); // // Page selector // $page_id = $mx_request_vars->request('page', MX_TYPE_INT, 1); $is_block = false; // // instatiate the mx_user class // $mx_user = new mx_user(); if (file_exists("./modcp.$phpEx")) // phpBB2 { define('PORTAL_BACKEND', 'phpbb2'); $tplEx = 'tpl'; // // Start user session // - populate $userdata and $lang // $mx_user->init($user_ip, $page_id, false); init_userprefs($userdata); $mx_user->set_module_default_style('prosilver'); // For compatibility with core 2.8.x if (!$userdata['user_level'] == ADMIN) { die('Only admins may run this script!!!'); } } else if (@file_exists("./mcp.$phpEx")) // phpBB3 { define('PORTAL_BACKEND', 'phpbb3'); $tplEx = 'html'; // // Start user session // - populate $userdata and $lang // $mx_user->init($user_ip, $page_id, false); $user->setup(); // // End session management // $mx_user->set_module_default_style('prosilver'); // For compatibility with core 2.8.x if ($userdata['user_type'] != USER_FOUNDER) { die('Only admins may run this script!!!'); } } else { die('Copy this file in phpbb_root_path were is your viewtopic.php file!!!'); } } else // --------------------------------------------------------------------------------- mxBB Module MODE { define( 'MXBB_MODULE', true ); if ( !function_exists( 'read_block_config' ) ) { define( 'IN_PORTAL', true ); $mx_root_path = './../../'; $module_root_path = './'; $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 define( 'MXBB_27x', file_exists( $mx_root_path . 'mx_login.' . $phpEx ) ); } else { if( !defined('IN_PORTAL') || !is_object($mx_block)) { die("Hacking attempt"); } // // Read Block Settings (default mode) // $title = !empty( $mx_block->block_info['block_title'] ) ? $mx_block->block_info['block_title'] : $lang['KB_title']; $desc = $mx_block->block_info['block_desc']; $block_size = ( isset( $block_size ) && !empty( $block_size ) ? $block_size : '100%' ); //Check for cash mod if (file_exists($phpbb_root_path . 'includes/functions_cash.'.$phpEx)) { define('IN_CASHMOD', true); } $is_block = true; global $images; } define( 'MXBB_27x', @file_exists( $mx_root_path . 'mx_login.'.$phpEx ) ); } // // Check if mx_common Mod is prezent // if (!file_exists($mx_mod_path . "includes/functions_admincp.$phpEx")) { die('mx mod is not uploaded!!!'); } else { require($mx_mod_path . "includes/functions_admincp.$phpEx"); } $page_title = 'Uninstalling pafileDB'; include($phpbb_root_path . 'includes/page_header.'.$phpEx); $sql = array( "DROP TABLE " . $table_prefix . "pa_cat ", "DROP TABLE " . $table_prefix . "pa_auth ", "DROP TABLE " . $table_prefix . "pa_comments ", "DROP TABLE " . $table_prefix . "pa_config ", "DROP TABLE " . $table_prefix . "pa_custom ", "DROP TABLE " . $table_prefix . "pa_customdata ", "DROP TABLE " . $table_prefix . "pa_download_info ", "DROP TABLE " . $table_prefix . "pa_license ", "DROP TABLE " . $table_prefix . "pa_votes ", "DROP TABLE " . $table_prefix . "pa_mirrors ", "DROP TABLE " . $table_prefix . "pa_files " ); echo "<br /><br />"; echo "<table width=\"90%\" align=\"center\" cellpadding=\"4\" cellspacing=\"1\" border=\"0\" class=\"forumline\">"; echo "<tr><th class=\"thHead\" align=\"center\">Mod Installation/Upgrading/Uninstalling Information - mod specific db tables</th></tr>"; echo "<tr><td class=\"row1\" align=\"left\"><span class=\"gen\">" . mx_do_install_upgrade( $sql ) . "</span></td></tr>"; echo "</table><br />"; include($phpbb_root_path . 'includes/page_tail.'.$phpEx); ?> Index: dload.php =================================================================== RCS file: /cvsroot/mxbb/mx_pafiledb/dload.php,v retrieving revision 1.23.2.2 retrieving revision 1.23.2.3 diff -C2 -d -r1.23.2.2 -r1.23.2.3 *** dload.php 15 Feb 2008 23:53:11 -0000 1.23.2.2 --- dload.php 8 Mar 2008 15:27:16 -0000 1.23.2.3 *************** *** 13,25 **** if ( !defined('PORTAL_BACKEND') && @file_exists( './viewtopic.' . $phpEx ) ) // -------------------------------------------- phpBB MOD MODE { ! define( 'MXBB_MODULE', false ); ! define( 'IN_PHPBB', true ); ! define( 'IN_PORTAL', true ); ! define( 'IN_DOWNLOAD', true ); ! ! // When run as a phpBB mod these paths are identical ;) ! $phpbb_root_path = $module_root_path = $mx_root_path = './'; $mx_mod_path = $phpbb_root_path . 'mx_mod/'; //Check for cash mod if (file_exists($phpbb_root_path . 'includes/functions_cash.'.$phpEx)) --- 13,46 ---- if ( !defined('PORTAL_BACKEND') && @file_exists( './viewtopic.' . $phpEx ) ) // -------------------------------------------- phpBB MOD MODE { ! define('MXBB_MODULE', false); ! define('IN_PHPBB', true); ! ! $phpbb_root_path = $module_root_path = './'; $mx_mod_path = $phpbb_root_path . 'mx_mod/'; + + include($phpbb_root_path . 'common.' . $phpEx); + include($mx_mod_path . "includes/functions_required.$phpEx"); + + //Check if forum_hack is installed + if (!isset($mx_root_path)) + { + $mx_root_path = './'; + @define('IN_PORTAL', true); + include_once($mx_mod_path . "includes/mx_constants.$phpEx"); + include_once($mx_mod_path . "includes/shared/phpbb2/includes/functions.$phpEx"); + } + else + { + @define('IN_PORTAL', true); + include_once($mx_root_path . "includes/mx_constants.$phpEx"); + include_once($mx_root_path . "includes/shared/phpbb2/includes/functions.$phpEx"); + //Redefine mx_root_path to include phpbb page_tail.php + $mx_root_path = $phpbb_root_path; + } + + require($mx_mod_path . "includes/functions_core.$phpEx"); + require($mx_mod_path . "includes/functions_styles.$phpEx"); + //Check for cash mod if (file_exists($phpbb_root_path . 'includes/functions_cash.'.$phpEx)) *************** *** 28,40 **** } ! include( $phpbb_root_path . 'common.' . $phpEx ); ! ! @ini_set( 'display_errors', '1' ); error_reporting (E_ERROR | E_WARNING | E_PARSE); // This will NOT report uninitialized variables ! include_once( $mx_mod_path . 'includes/functions_required.' . $phpEx ); ! include_once( $mx_mod_path . 'includes/functions_core.' . $phpEx ); ! ! define( 'PAGE_DOWNLOAD', -501 ); // If this id generates a conflict with other mods, change it ;) // --- 49,57 ---- } ! //@ini_set( 'display_errors', '1' ); error_reporting (E_ERROR | E_WARNING | E_PARSE); // This will NOT report uninitialized variables + //error_reporting(E_ALL & ~E_NOTICE); ! define( 'PAGE_KB', -502 ); // If this id generates a conflict with other mods, change it ;) // *************** *** 42,50 **** // $mx_cache = new mx_cache(); ! // // Get mxBB config settings // ! $portal_config = $mx_cache->obtain_mxbb_config(); // --- 59,67 ---- // $mx_cache = new mx_cache(); ! // // Get mxBB config settings // ! //$portal_config = $mx_cache->obtain_mxbb_config(); // *************** *** 52,86 **** // $mx_request_vars = new mx_request_vars(); $is_block = false; ! if ( file_exists("./modcp.$phpEx") ) // phpBB2 { define('PORTAL_BACKEND', 'phpbb2'); $tplEx = 'tpl'; ! include_once( $phpbb_root_path . 'includes/bbcode.' . $phpEx ); ! include_once( $phpbb_root_path . 'includes/functions_post.' . $phpEx ); ! ! // Start session management ! $userdata = session_pagestart( $user_ip, PAGE_DOWNLOAD ); ! init_userprefs( $userdata ); ! // End session management ! ! } ! else if ( @file_exists("./mcp.$phpEx") ) // phpBB3 { define('PORTAL_BACKEND', 'phpbb3'); $tplEx = 'html'; ! ! //include_once( $mx_mod_path . 'includes/shared/phpbb2/includes/bbcode.' . $phpEx ); ! //include_once( $mx_mod_path . 'includes/shared/phpbb2/includes/functions_post.' . $phpEx ); ! // ! // Start session management // ! $user->session_begin(); ! $userdata = $user->data; $user->setup(); // --- 69,119 ---- // $mx_request_vars = new mx_request_vars(); + + // + // Page selector + // + $page_id = $mx_request_vars->request('page', MX_TYPE_INT, 1); $is_block = false; + + // + // instatiate the mx_user class + // + $mx_user = new mx_user(); ! if (file_exists("./modcp.$phpEx")) // phpBB2 { define('PORTAL_BACKEND', 'phpbb2'); $tplEx = 'tpl'; + + // + // Start user session + // - populate $userdata and $lang + // + $mx_user->init($user_ip, $page_id, false); + //init_userprefs($userdata); + $mx_user->init_style(); //Overwrite template class ! /* ! $mx_user->set_module_default_style('_core'); // For compatibility with core 2.8.x ! if (!$userdata['user_level'] == ADMIN) ! { ! die('Only admins may run this script!!!'); ! } ! */ ! include_once($phpbb_root_path . 'includes/bbcode.' . $phpEx); ! include_once($phpbb_root_path . 'includes/functions_post.' . $phpEx); ! } ! else if (@file_exists("./mcp.$phpEx")) // phpBB3 { define('PORTAL_BACKEND', 'phpbb3'); $tplEx = 'html'; ! // ! // Start user session ! // - populate $userdata and $lang // ! $mx_user->init($user_ip, $page_id, false); $user->setup(); // *************** *** 88,95 **** // ! // ! // Get phpBB config settings ! // ! $board_config = $config; } else --- 121,133 ---- // ! /* ! $mx_user->set_module_default_style('_core'); // For compatibility with core 2.8.x ! if ($userdata['user_type'] != USER_FOUNDER) ! { ! die('Only admins may run this script!!!'); ! } ! */ ! include_once($mx_mod_path . "includes/shared/phpbb2/includes/bbcode.$phpEx"); ! include_once($mx_mod_path . "includes/shared/phpbb2/includes/functions_post.$phpEx"); } else *************** *** 142,148 **** $title = $mx_block->block_info['block_title']; $block_size = ( isset( $block_size ) && !empty( $block_size ) ? $block_size : '100%' ); ! //Check for cash mod ! if (file_exists($phpbb_root_path . 'includes/functions_cash.'.$phpEx)) { define('IN_CASHMOD', true); --- 180,186 ---- $title = $mx_block->block_info['block_title']; $block_size = ( isset( $block_size ) && !empty( $block_size ) ? $block_size : '100%' ); ! //Check for cash mod ! if (file_exists($phpbb_root_path . 'includes/functions_cash.'.$phpEx)) { define('IN_CASHMOD', true); *************** *** 152,156 **** global $images; } ! define( 'MXBB_27x', @file_exists( $mx_root_path . 'mx_login.'.$phpEx ) ); } --- 190,194 ---- global $images; } ! define( 'MXBB_27x', file_exists( $mx_root_path . 'mx_login.php' ) ); } *************** *** 171,193 **** // =================================================== include_once( $module_root_path . 'pafiledb/pafiledb_common.' . $phpEx ); // =================================================== // Get action variable otherwise set it to the main // =================================================== ! $action = $mx_request_vars->request('action', MX_TYPE_NO_TAGS, 'main'); // =================================================== // Is admin? // =================================================== ! switch (PORTAL_BACKEND) ! { ! case 'internal': ! case 'phpbb2': ! $is_admin = ( ( $userdata['user_level'] == ADMIN ) && $userdata['session_logged_in'] ) ? true : 0; ! break; ! case 'phpbb3': ! $is_admin = ( $userdata['user_type'] == USER_FOUNDER ) ? true : 0; ! break; ! } // =================================================== --- 209,230 ---- // =================================================== include_once( $module_root_path . 'pafiledb/pafiledb_common.' . $phpEx ); + $pafiledb_template->destroy(); // =================================================== // Get action variable otherwise set it to the main // =================================================== ! if ( !MXBB_MODULE ) ! { ! $action = ( isset( $_REQUEST['action'] ) ) ? htmlspecialchars( $_REQUEST['action'] ) : 'main'; ! } ! else ! { ! $action = $mx_request_vars->request('action', MX_TYPE_NO_TAGS, 'main'); ! } // =================================================== // Is admin? // =================================================== ! $is_admin = ( ( $userdata['user_level'] == ADMIN ) && $userdata['session_logged_in'] ) ? true : 0; // =================================================== --- NEW FILE: pa_install.php --- <?php /** * * @package phpBB2 Mod - pafileDB * @version $Id: pa_install.php,v 1.1.2.1 2008/03/08 15:27:17 orynider Exp $ * @copyright (c) 2002-2006 [Jon Ohlsson, Mohd Basri, wGEric, PHP Arena, pafileDB, CRLin] mxBB Project Team * @license http://opensource.org/licenses/gpl-license.php GNU General Public License v2 * */ $phpEx = substr(strrchr(__FILE__, '.'), 1); if ( !defined('PORTAL_BACKEND') && @file_exists( './viewtopic.' . $phpEx ) ) // -------------------------------------------- phpBB MOD MODE { define( 'MXBB_MODULE', false ); define( 'IN_PHPBB', true ); $phpbb_root_path = $module_root_path = './'; $mx_mod_path = $phpbb_root_path . 'mx_mod/'; include($phpbb_root_path . 'common.' . $phpEx); include($mx_mod_path . "includes/functions_required.$phpEx"); //Check if forum_hack is installed if (!isset($mx_root_path)) { $mx_root_path = './'; @define('IN_PORTAL', true); include_once($mx_mod_path . "includes/mx_constants.$phpEx"); include_once($mx_mod_path . "includes/shared/phpbb2/includes/functions.$phpEx"); } else { @define('IN_PORTAL', true); include_once($mx_root_path . "includes/mx_constants.$phpEx"); include_once($mx_root_path . "includes/shared/phpbb2/includes/functions.$phpEx"); } require($mx_mod_path . "includes/functions_core.$phpEx"); require($mx_mod_path . "includes/functions_styles.$phpEx"); //Check for cash mod if (file_exists($phpbb_root_path . 'includes/functions_cash.'.$phpEx)) { define('IN_CASHMOD', true); } //@ini_set( 'display_errors', '1' ); error_reporting (E_ERROR | E_WARNING | E_PARSE); // This will NOT report uninitialized variables //error_reporting(E_ALL & ~E_NOTICE); define( 'PAGE_KB', -502 ); // If this id generates a conflict with other mods, change it ;) // // Instatiate the mx_cache class // $mx_cache = new mx_cache(); // // Get mxBB config settings // //$portal_config = $mx_cache->obtain_mxbb_config(); // // instatiate the mx_request_vars class // $mx_request_vars = new mx_request_vars(); // // Page selector // $page_id = $mx_request_vars->request('page', MX_TYPE_INT, 1); $is_block = false; // // instatiate the mx_user class // $mx_user = new mx_user(); if (file_exists("./modcp.$phpEx")) // phpBB2 { define('PORTAL_BACKEND', 'phpbb2'); $tplEx = 'tpl'; // // Start user session // - populate $userdata and $lang // $mx_user->init($user_ip, $page_id, false); init_userprefs($userdata); $mx_user->set_module_default_style('prosilver'); // For compatibility with core 2.8.x if (!$userdata['user_level'] == ADMIN) { die('Only admins may run this script!!!'); } } else if (@file_exists("./mcp.$phpEx")) // phpBB3 { define('PORTAL_BACKEND', 'phpbb3'); $tplEx = 'html'; // // Start user session // - populate $userdata and $lang // $mx_user->init($user_ip, $page_id, false); $user->setup(); // // End session management // $mx_user->set_module_default_style('prosilver'); // For compatibility with core 2.8.x if ($userdata['user_type'] != USER_FOUNDER) { die('Only admins may run this script!!!'); } } else { die('Copy this file in phpbb_root_path were is your viewtopic.php file!!!'); } } else // --------------------------------------------------------------------------------- mxBB Module MODE { define( 'MXBB_MODULE', true ); if ( !function_exists( 'read_block_config' ) ) { define( 'IN_PORTAL', true ); $mx_root_path = './../../'; $module_root_path = './'; $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 define( 'MXBB_27x', file_exists( $mx_root_path . 'mx_login.' . $phpEx ) ); } else { if( !defined('IN_PORTAL') || !is_object($mx_block)) { die("Hacking attempt"); } // // Read Block Settings (default mode) // $title = !empty( $mx_block->block_info['block_title'] ) ? $mx_block->block_info['block_title'] : $lang['KB_title']; $desc = $mx_block->block_info['block_desc']; $block_size = ( isset( $block_size ) && !empty( $block_size ) ? $block_size : '100%' ); //Check for cash mod if (file_exists($phpbb_root_path . 'includes/functions_cash.'.$phpEx)) { define('IN_CASHMOD', true); } $is_block = true; global $images; } define( 'MXBB_27x', @file_exists( $mx_root_path . 'mx_login.'.$phpEx ) ); } // // Check if mx_common Mod is prezent // if (!file_exists($mx_mod_path . "includes/functions_admincp.$phpEx")) { die('mx mod is not uploaded!!!'); } else { require($mx_mod_path . "includes/functions_admincp.$phpEx"); } // // Check if mx_common Mod is prezent // if ( !file_exists( $mx_mod_path . 'includes/' . 'functions_admincp.' . $phpEx ) ) { die('mx mod is not uploaded!!!'); } else { include_once( $mx_mod_path . 'includes/' . 'functions_admincp.' . $phpEx ); include_once( $mx_mod_path . 'includes/functions_required.' . $phpEx ); } $page_title = 'Installing/Upgrading pafileDB'; include($phpbb_root_path . 'includes/page_header.'.$phpEx); $sql = array(); // If fresh install if ( !$result = $db->sql_query( "SELECT config_name from " . $table_prefix . "pa_config" ) ) { $message = "<b>This is a fresh install!</b><br/><br/>"; $sql[] = "DROP TABLE IF EXISTS " . $table_prefix . "pa_cat "; $sql[] = "DROP TABLE IF EXISTS " . $table_prefix . "pa_auth "; $sql[] = "DROP TABLE IF EXISTS " . $table_prefix . "pa_comments "; $sql[] = "DROP TABLE IF EXISTS " . $table_prefix . "pa_config "; $sql[] = "DROP TABLE IF EXISTS " . $table_prefix . "pa_custom "; $sql[] = "DROP TABLE IF EXISTS " . $table_prefix . "pa_customdata "; $sql[] = "DROP TABLE IF EXISTS " . $table_prefix . "pa_download_info "; $sql[] = "DROP TABLE IF EXISTS " . $table_prefix . "pa_license "; $sql[] = "DROP TABLE IF EXISTS " . $table_prefix . "pa_votes "; $sql[] = "DROP TABLE IF EXISTS " . $table_prefix . "pa_mirrors "; $sql[] = "DROP TABLE IF EXISTS " . $table_prefix . "pa_files "; // Table structure for table `pa_cat` $sql[] = "CREATE TABLE " . $table_prefix . "pa_cat ( cat_id int(10) NOT NULL auto_increment, cat_name text, cat_desc text, cat_parent int(50) default NULL, parents_data text NOT NULL default '', cat_order int(50) default NULL, cat_allow_file tinyint(2) NOT NULL default '0', cat_allow_comments tinyint(2) NOT NULL default '-1', internal_comments tinyint(2) NOT NULL default '-1', autogenerate_comments tinyint(2) NOT NULL default '-1', comments_forum_id mediumint(8) NOT NULL DEFAULT '-1', cat_allow_ratings tinyint(2) NOT NULL default '-1', show_pretext tinyint(2) NOT NULL default '-1', notify tinyint(2) NOT NULL default '-1', notify_group mediumint(8) NOT NULL default '-1', cat_files mediumint(8) NOT NULL default '-1', cat_last_file_id mediumint(8) unsigned NOT NULL default '0', cat_last_file_name varchar(255) NOT NULL default '', cat_last_file_time INT(50) UNSIGNED NOT NULL default '0', auth_view tinyint(2) NOT NULL default '0', auth_read tinyint(2) NOT NULL default '0', auth_view_file tinyint(2) NOT NULL default '0', auth_edit_file tinyint(2) NOT NULL default '0', auth_delete_file tinyint(2) NOT NULL default '2', auth_upload tinyint(2) NOT NULL default '0', auth_download tinyint(2) NOT NULL default '0', auth_rate tinyint(2) NOT NULL default '0', auth_email tinyint(2) NOT NULL default '0', auth_view_comment tinyint(2) NOT NULL default '0', auth_post_comment tinyint(2) NOT NULL default '0', auth_edit_comment tinyint(2) NOT NULL default '0', auth_delete_comment tinyint(2) NOT NULL default '0', auth_approval tinyint(2) NOT NULL default '0', auth_approval_edit tinyint(2) NOT NULL default '0', PRIMARY KEY (cat_id), KEY cat_order (cat_order) )"; // // Insert // $sql[] = "INSERT INTO " . $table_prefix . "pa_cat VALUES (1, 'My Category', '', '', '', '', 0, '-1', '-1', '-1', '-1', '-1', '-1', '-1', '-1', '-1', 0, '', 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)"; $sql[] = "INSERT INTO " . $table_prefix . "pa_cat VALUES (2, 'Test Cagegory', 'Just a test category', 1, '', '', 1, '-1', '-1', '-1', '-1', '-1', '-1', '-1', '-1', '-1', 0, '', 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)"; // -------------------------------------------------------- // Table structure for table `phpbb_pa_files` $sql[] = "CREATE TABLE " . $table_prefix . "pa_files ( file_id int(10) NOT NULL auto_increment, file_name text, file_desc text, file_longdesc text, file_catid int(10) default NULL, file_approved TINYINT(1) NOT NULL default '1', file_size int(20) NOT NULL default '0', unique_name varchar(255) NOT NULL default '', real_name VARCHAR(255) NOT NULL, file_dir VARCHAR(255) NOT NULL, file_creator text, file_version text, file_ssurl text, file_sshot_link tinyint(2) NOT NULL default '0', file_dlurl text, file_posticon text, file_license int(10) default NULL, file_docsurl text, file_time int(50) default NULL, user_id mediumint(8) NOT NULL default '0', poster_ip varchar(8) NOT NULL default '', file_update_time int(50) NOT NULL default '0', file_last int(50) default NULL, file_pin int(2) default NULL, file_broken TINYINT(1) DEFAULT '0' NOT NULL, topic_id mediumint(8) unsigned NOT NULL default '0', file_dls int(10) DEFAULT '0' NOT NULL, PRIMARY KEY (file_id) )"; // -------------------------------------------------------- // Table structure for table `phpbb_pa_config` $sql[] = "CREATE TABLE " . $table_prefix . "pa_config ( config_name varchar(255) NOT NULL default '', config_value varchar(255) NOT NULL default '', PRIMARY KEY (config_name) )"; // -------------------------------------------------------- // Table structure for table `phpbb_pa_comments` $sql[] = "CREATE TABLE " . $table_prefix . "pa_comments ( comments_id int(10) NOT NULL auto_increment, file_id int(10) NOT NULL default '0', comments_text text NOT NULL, comments_title text NOT NULL, comments_time int(50) NOT NULL default '0', comment_bbcode_uid varchar(10) default NULL, poster_id mediumint(8) NOT NULL default '0', PRIMARY KEY (comments_id), KEY comments_id (comments_id), FULLTEXT KEY comment_bbcode_uid (comment_bbcode_uid) )"; // -------------------------------------------------------- // Table structure for table `phpbb_pa_custom` $sql[] = "CREATE TABLE " . $table_prefix . "pa_custom ( custom_id int(50) NOT NULL auto_increment, custom_name text NOT NULL, custom_description text NOT NULL, data text NOT NULL, field_order int(20) NOT NULL default '0', field_type tinyint(2) NOT NULL default '0', regex varchar(255) NOT NULL default '', PRIMARY KEY (custom_id) )"; // -------------------------------------------------------- // Table structure for table `phpbb_pa_customdata` $sql[] = "CREATE TABLE " . $table_prefix . "pa_customdata ( customdata_file int(50) NOT NULL default '0', customdata_custom int(50) NOT NULL default '0', data text NOT NULL )"; // -------------------------------------------------------- // Table structure for table `phpbb_pa_download_info` $sql[] = "CREATE TABLE " . $table_prefix . "pa_download_info ( file_id mediumint(8) NOT NULL default '0', user_id mediumint(8) NOT NULL default '0', downloader_ip varchar(8) NOT NULL default '', downloader_os varchar(255) NOT NULL default '', downloader_browser varchar(255) NOT NULL default '', browser_version varchar(255) NOT NULL default '' )"; // -------------------------------------------------------- $sql[] = "CREATE TABLE " . $table_prefix . "pa_mirrors ( mirror_id mediumint(8) NOT NULL auto_increment, file_id int(10) NOT NULL, unique_name varchar(255) NOT NULL default '', file_dir VARCHAR(255) NOT NULL, file_dlurl varchar(255) NOT NULL default '', mirror_location VARCHAR(255) NOT NULL default '', PRIMARY KEY (mirror_id), KEY file_id (file_id) )"; // Table structure for table `phpbb_pa_license` $sql[] = "CREATE TABLE " . $table_prefix . "pa_license ( license_id int(10) NOT NULL auto_increment, license_name text, license_text text, PRIMARY KEY (license_id) )"; // -------------------------------------------------------- // Table structure for table `phpbb_pa_votes` $sql[] = "CREATE TABLE " . $table_prefix . "pa_votes ( user_id mediumint(8) NOT NULL default '0', votes_ip varchar(50) NOT NULL default '0', votes_file int(50) NOT NULL default '0', rate_point tinyint(3) unsigned NOT NULL default '0', voter_os varchar(255) NOT NULL default '', voter_browser varchar(255) NOT NULL default '', browser_version varchar(8) NOT NULL default '', KEY user_id (user_id), KEY votes_file (votes_file), KEY votes_ip (votes_ip), KEY voter_os (voter_os), KEY voter_browser (voter_browser), KEY browser_version (browser_version), KEY rate_point (rate_point) )"; // Table structure for table `pa_auth` $sql[] = "CREATE TABLE " . $table_prefix . "pa_auth ( group_id mediumint(8) DEFAULT '0' NOT NULL, cat_id smallint(5) UNSIGNED DEFAULT '0' NOT NULL, auth_view tinyint(1) DEFAULT '0' NOT NULL, auth_read tinyint(1) DEFAULT '0' NOT NULL, auth_view_file tinyint(1) DEFAULT '0' NOT NULL, auth_edit_file tinyint(1) DEFAULT '0' NOT NULL, auth_delete_file tinyint(1) DEFAULT '0' NOT NULL, auth_upload tinyint(1) DEFAULT '0' NOT NULL, auth_download tinyint(1) DEFAULT '0' NOT NULL, auth_rate tinyint(1) DEFAULT '0' NOT NULL, auth_email tinyint(1) DEFAULT '0' NOT NULL, auth_view_comment tinyint(1) DEFAULT '0' NOT NULL, auth_post_comment tinyint(1) DEFAULT '0' NOT NULL, auth_edit_comment tinyint(1) DEFAULT '0' NOT NULL, auth_delete_comment tinyint(1) DEFAULT '0' NOT NULL, auth_approval tinyint(1) DEFAULT '0' NOT NULL, auth_approval_edit tinyint(1) DEFAULT '0' NOT NULL, auth_mod tinyint(1) DEFAULT '1' NOT NULL, auth_search tinyint(1) DEFAULT '1' NOT NULL, auth_stats tinyint(1) DEFAULT '1' NOT NULL, auth_toplist tinyint(1) DEFAULT '1' NOT NULL, auth_viewall tinyint(1) DEFAULT '1' NOT NULL, KEY group_id (group_id), KEY cat_id (cat_id) )"; // // Config values // // General $sql[] = "INSERT INTO " . $table_prefix . "pa_config VALUES ('enable_module', '0')"; // settings_disable $sql[] = "INSERT INTO " . $table_prefix . "pa_config VALUES ('module_name', 'Download Database')"; // settings_dbname $sql[] = "INSERT INTO " . $table_prefix . "pa_config VALUES ('wysiwyg_path', 'mx_mod/mx_shared/')"; $sql[] = "INSERT INTO " . $table_prefix . "pa_config VALUES ('upload_dir','pafiledb/uploads/')"; $sql[] = "INSERT INTO " . $table_prefix . "pa_config VALUES ('screenshots_dir','pafiledb/images/screenshots/')"; // Files $sql[] = "INSERT INTO " . $table_prefix . "pa_config VALUES ('max_file_size','262144')"; $sql[] = "INSERT INTO " . $table_prefix . "pa_config VALUES ('forbidden_extensions','php, php3, php4, phtml, pl, asp, aspx, cgi')"; $sql[] = "INSERT INTO " . $table_prefix . "pa_config VALUES ('hotlink_prevent', '1')"; $sql[] = "INSERT INTO " . $table_prefix . "pa_config VALUES ('hotlink_allowed', '')"; $sql[] = "INSERT INTO " . $table_prefix . "pa_config VALUES ('tpl_php', '0')"; // Appearance $sql[] = "INSERT INTO " . $table_prefix . "pa_config VALUES ('sort_method', 'file_time')"; $sql[] = "INSERT INTO " . $table_prefix . "pa_config VALUES ('sort_order', 'DESC')"; $sql[] = "INSERT INTO " . $table_prefix . "pa_config VALUES ('pagination', '20')"; // art_pagination & settings_file_page $sql[] = "INSERT INTO " . $table_prefix . "pa_config VALUES ('settings_stats', '')"; $sql[] = "INSERT INTO " . $table_prefix . "pa_config VALUES ('settings_viewall', '1')"; $sql[] = "INSERT INTO " . $table_prefix . "pa_config VALUES ('settings_dbdescription', '')"; $sql[] = "INSERT INTO " . $table_prefix . "pa_config VALUES ('settings_topnumber', '10')"; $sql[] = "INSERT INTO " . $table_prefix . "pa_config VALUES ('use_simple_navigation', '1')"; $sql[] = "INSERT INTO " . $table_prefix . "pa_config VALUES ('cat_col', '2')"; $sql[] = "INSERT INTO " . $table_prefix . "pa_config VALUES ('settings_newdays', '1')"; // Comments $sql[] = "INSERT INTO " . $table_prefix . "pa_config VALUES ('use_comments', '0')"; // comments_show $sql[] = "INSERT INTO " . $table_prefix . "pa_config VALUES ('internal_comments', '1')"; // NEW $sql[] = "INSERT INTO " . $table_prefix . "pa_config VALUES ('formatting_comment_wordwrap', '1')"; // formatting_comment_fixup $sql[] = "INSERT INTO " . $table_prefix . "pa_config VALUES ('formatting_comment_image_resize', '300')"; // NEW $sql[] = "INSERT INTO " . $table_prefix . "pa_config VALUES ('formatting_comment_truncate_links', '1')"; // NEW $sql[] = "INSERT INTO " . $table_prefix . "pa_config VALUES ('max_comment_subject_chars', '50')"; // NEW $sql[] = "INSERT INTO " . $table_prefix . "pa_config VALUES ('max_comment_chars', '5000')"; $sql[] = "INSERT INTO " . $table_prefix . "pa_config VALUES ('allow_comment_wysiwyg', '0')"; // allow_wysiwyg_comments & allow_wysiwyg $sql[] = "INSERT INTO " . $table_prefix . "pa_config VALUES ('allow_comment_html', '1')"; $sql[] = "INSERT INTO " . $table_prefix . "pa_config VALUES ('allow_comment_bbcode', '1')"; $sql[] = "INSERT INTO " . $table_prefix . "pa_config VALUES ('allow_comment_smilies', '1')"; $sql[] = "INSERT INTO " . $table_prefix . "pa_config VALUES ('allow_comment_links', '1')"; $sql[] = "INSERT INTO " . $table_prefix . "pa_config VALUES ('allow_comment_images', '0')"; $sql[] = "INSERT INTO " . $table_prefix . "pa_config VALUES ('no_comment_image_message', '[No image please]')"; $sql[] = "INSERT INTO " . $table_prefix . "pa_config VALUES ('no_comment_link_message', '[No links please]')"; $sql[] = "INSERT INTO " . $table_prefix . "pa_config VALUES ('allowed_comment_html_tags', 'b,i,u,a')"; // NEW $sql[] = "INSERT INTO " . $table_prefix . "pa_config VALUES ('del_topic', '1')"; // NEW $sql[] = "INSERT INTO " . $table_prefix . "pa_config VALUES ('autogenerate_comments', '1')"; // NEW $sql[] = "INSERT INTO " . $table_prefix . "pa_config VALUES ('comments_pagination', '5')"; $sql[] = "INSERT INTO " . $table_prefix . "pa_config VALUES ('comments_forum_id', '0')"; // New // Ratings $sql[] = "INSERT INTO " . $table_prefix . "pa_config VALUES ('use_ratings', '0')"; $sql[] = "INSERT INTO " . $table_prefix . "pa_config VALUES ('votes_check_userid', '1')"; $sql[] = "INSERT INTO " . $table_prefix . "pa_config VALUES ('votes_check_ip', '1')"; // Instructions $sql[] = "INSERT INTO " . $table_prefix . "pa_config VALUES ('show_pretext', '0')"; // NEW $sql[] = "INSERT INTO " . $table_prefix . "pa_config VALUES ('pt_header', 'File Submission Instructions')"; // NEW $sql[] = "INSERT INTO " . $table_prefix . "pa_config values ('pt_body', 'Please check your references and include as much information as you can.')"; // NEW // Notifications $sql[] = "INSERT INTO " . $table_prefix . "pa_config VALUES ('notify', 'pm')"; // pm_notify $sql[] = "INSERT INTO " . $table_prefix . "pa_config VALUES ('notify_group', '0')"; // NEW // Permissions $sql[] = "INSERT INTO " . $table_prefix . "pa_config VALUES ('auth_search','0')"; $sql[] = "INSERT INTO " . $table_prefix . "pa_config VALUES ('auth_stats','0')"; $sql[] = "INSERT INTO " . $table_prefix . "pa_config VALUES ('auth_toplist','0')"; $sql[] = "INSERT INTO " . $table_prefix . "pa_config VALUES ('auth_viewall','0')"; $message .= mx_do_install_upgrade( $sql ); } else { // Upgrade checks $upgrade_103 = 0; $upgrade_201 = 0; $upgrade_280 = 0; // mxBB 2.8 branch -> $message = "<b>Upgrading!</b><br/><br/>"; // validate before 1.0.3 if ( !$result = $db->sql_query( "SELECT auth_edit_file from " . $table_prefix . "pa_cat" ) ) { $upgrade_103 = 1; $message .= "<b>Upgrading to v. 1.0.3...</b><br/><br/>"; } else { $message .= "<b>Validating v. 1.0.3...ok</b><br/><br/>"; } // validate before 2.0.1 if ( !$result = $db->sql_query( "SELECT auth_approval from " . $table_prefix . "pa_cat" ) ) { $upgrade_201 = 1; $message .= "<b>Validating v. 2.0.1...ok</b><br/><br/>"; } else { $message .= "<b>Validating v. 2.0.1...ok</b><br/><br/>"; } // validate before 2.0.2 $result = $db->sql_query( "SELECT config_value from " . $table_prefix . "pa_config WHERE config_name = 'internal_comments'" ); if ( $db->sql_numrows( $result ) == 0 ) { $upgrade_202 = 1; $message .= "<b>Upgrading to v. 2.0.2...ok</b><br/><br/>"; } else { $message .= "<b>Validating v. 2.0.2...ok</b><br/><br/>"; } // validate before 2.8.0 $result = $db->sql_query( "SELECT config_value from " . $table_prefix . "pa_config WHERE config_name = 'comments_forum_id'" ); if ( $db->sql_numrows( $result ) == 0 ) { $upgrade_280 = 1; $message .= "<b>Upgrading to v. 2.8.0...ok</b><br/><br/>"; } else { $message .= "<b>Validating v. 2.8.0...ok</b><br/><br/>"; } // ------------------------------------------------------------------------------------------------------ if ( $upgrade_103 == 1 ) { $sql[] = "ALTER TABLE " . $table_prefix . "pa_cat ADD auth_edit_file tinyint(2) NOT NULL default '0' AFTER auth_view_file "; $sql[] = "ALTER TABLE " . $table_prefix . "pa_cat ADD auth_delete_file tinyint(2) NOT NULL default '0' AFTER auth_edit_file "; $sql[] = "ALTER TABLE " . $table_prefix . "pa_cat ADD cat_allow_ratings tinyint(2) NOT NULL default '-1' AFTER cat_allow_file "; $sql[] = "ALTER TABLE " . $table_prefix . "pa_cat ADD cat_allow_comments tinyint(2) NOT NULL default '-1' AFTER cat_allow_ratings "; $sql[] = "ALTER TABLE " . $table_prefix . "pa_auth ADD auth_edit_file tinyint(1) DEFAULT '0' NOT NULL AFTER auth_view_file "; $sql[] = "ALTER TABLE " . $table_prefix . "pa_auth ADD auth_delete_file tinyint(1) DEFAULT '0' NOT NULL AFTER auth_edit_file "; $sql[] = "INSERT INTO " . $table_prefix . "pa_config VALUES ('pm_notify', '0')"; } if ( $upgrade_201 == 1 ) { $sql[] = "ALTER TABLE " . $table_prefix . "pa_cat ADD auth_approval tinyint(2) NOT NULL default '0' AFTER auth_delete_comment "; $sql[] = "ALTER TABLE " . $table_prefix . "pa_auth ADD auth_approval tinyint(1) DEFAULT '0' NOT NULL AFTER auth_delete_comment "; $sql[] = "ALTER TABLE " . $table_prefix . "pa_cat MODIFY auth_edit_file tinyint(2) NOT NULL default '0' "; $sql[] = "ALTER TABLE " . $table_prefix . "pa_cat MODIFY auth_delete_file tinyint(2) NOT NULL default '0' "; // Upgrade the config table to avoid duplicate entries /* $sql[] = "ALTER TABLE " . $table_prefix . "pa_config MODIFY config_name VARCHAR(255) NOT NULL default '' "; $sql[] = "ALTER TABLE " . $table_prefix . "pa_config MODIFY config_value VARCHAR(255) NOT NULL default '' "; $sql[] = "ALTER TABLE " . $table_prefix . "pa_config DROP PRIMARY KEY, ADD PRIMARY KEY (config_name) "; */ } if ( $upgrade_202 == 1 ) { // Upgrade the config table to avoid duplicate entries $sql[] = "ALTER TABLE " . $table_prefix . "pa_config MODIFY config_name VARCHAR(255) NOT NULL default '' "; $sql[] = "ALTER TABLE " . $table_prefix . "pa_config MODIFY config_value VARCHAR(255) NOT NULL default '' "; $sql[] = "ALTER TABLE " . $table_prefix . "pa_config DROP PRIMARY KEY, ADD PRIMARY KEY (config_name) "; // Configs $sql[] = "UPDATE " . $table_prefix . "pa_config" . " SET config_name = 'enable_module' WHERE config_name = 'settings_disable'"; $sql[] = "UPDATE " . $table_prefix . "pa_config" . " SET config_name = 'module_name' WHERE config_name = 'settings_dbname'"; $sql[] = "UPDATE " . $table_prefix . "pa_config" . " SET config_name = 'pagination' WHERE config_name = 'settings_file_page'"; $sql[] = "DELETE FROM " . $table_prefix . "pa_config" . " WHERE config_name = 'art_pagination'"; $sql[] = "DELETE FROM " . $table_prefix . "pa_config" . " WHERE config_name = 'comments_show'"; $sql[] = "DELETE FROM " . $table_prefix . "pa_config" . " WHERE config_name = 'pm_notify'"; $sql[] = "DELETE FROM " . $table_prefix . "pa_config" . " WHERE config_name = 'allow_wysiwyg_comments'"; $sql[] = "DELETE FROM " . $table_prefix . "pa_config" . " WHERE config_name = 'allow_wysiwyg'"; $sql[] = "DELETE FROM " . $table_prefix . "pa_config" . " WHERE config_name = 'formatting_fixup'"; $sql[] = "DELETE FROM " . $table_prefix . "pa_config" . " WHERE config_name = 'formatting_comment_fixup'"; $sql[] = "DELETE FROM " . $table_prefix . "pa_config" . " WHERE config_name = 'need_validation'"; $sql[] = "DELETE FROM " . $table_prefix . "pa_config" . " WHERE config_name = 'validator'"; $sql[] = "INSERT INTO " . $table_prefix . "pa_config VALUES ('wysiwyg_path', 'mx_mod/mx_shared/')"; $sql[] = "INSERT INTO " . $table_prefix . "pa_config VALUES ('use_comments', '1')"; $sql[] = "INSERT INTO " . $table_prefix . "pa_config VALUES ('internal_comments', '1')"; $sql[] = "INSERT INTO " . $table_prefix . "pa_config VALUES ('formatting_comment_wordwrap', '1')"; $sql[] = "INSERT INTO " . $table_prefix . "pa_config VALUES ('formatting_comment_image_resize', '300')"; $sql[] = "INSERT INTO " . $table_prefix . "pa_config VALUES ('formatting_comment_truncate_links', '1')"; $sql[] = "INSERT INTO " . $table_prefix . "pa_config VALUES ('max_comment_subject_chars', '50')"; $sql[] = "INSERT INTO " . $table_prefix . "pa_config VALUES ('max_comment_chars', '5000')"; $sql[] = "INSERT INTO " . $table_prefix . "pa_config VALUES ('allow_comment_wysiwyg', '1')"; $sql[] = "INSERT INTO " . $table_prefix . "pa_config VALUES ('allow_comment_html', '1')"; $sql[] = "INSERT INTO " . $table_prefix . "pa_config VALUES ('allow_comment_bbcode', '1')"; $sql[] = "INSERT INTO " . $table_prefix . "pa_config VALUES ('allow_comment_smilies', '1')"; $sql[] = "INSERT INTO " . $table_prefix . "pa_config VALUES ('allow_comment_links', '1')"; $sql[] = "INSERT INTO " . $table_prefix . "pa_config VALUES ('allow_comment_images', '1')"; $sql[] = "INSERT INTO " . $table_prefix . "pa_config VALUES ('no_comment_image_message', '[No image please]')"; $sql[] = "INSERT INTO " . $table_prefix . "pa_config VALUES ('no_comment_link_message', '[No links please]')"; $sql[] = "INSERT INTO " . $table_prefix . "pa_config VALUES ('allowed_comment_html_tags', 'b,i,u,a')"; $sql[] = "INSERT INTO " . $table_prefix . "pa_config VALUES ('del_topic', '1')"; $sql[] = "INSERT INTO " . $table_prefix . "pa_config VALUES ('autogenerate_comments', '1')"; $sql[] = "INSERT INTO " . $table_prefix . "pa_config VALUES ('comments_pagination', '5')"; $sql[] = "INSERT INTO " . $table_prefix . "pa_config VALUES ('use_ratings', '1')"; $sql[] = "INSERT INTO " . $table_prefix . "pa_config VALUES ('votes_check_userid', '1')"; $sql[] = "INSERT INTO " . $table_prefix . "pa_config VALUES ('votes_check_ip', '1')"; $sql[] = "INSERT INTO " . $table_prefix . "pa_config VALUES ('notify', '0')"; $sql[] = "INSERT INTO " . $table_prefix . "pa_config VALUES ('notify_group', '0')"; $sql[] = "INSERT INTO " . $table_prefix . "pa_config VALUES ('show_pretext', '1')"; $sql[] = "INSERT INTO " . $table_prefix . "pa_config VALUES ('pt_header', 'File Submission Instructions')"; $sql[] = "INSERT INTO " . $table_prefix . "pa_config VALUES ('pt_body', 'Please check your references and include as much information as you can.')"; // add fields to pa_category table $sql[] = "ALTER TABLE " . $table_prefix . "pa_cat ADD internal_comments tinyint(2) NOT NULL default '-1' "; $sql[] = "ALTER TABLE " . $table_prefix . "pa_cat ADD autogenerate_comments tinyint(2) NOT NULL default '-1' "; $sql[] = "ALTER TABLE " . $table_prefix . "pa_cat ADD comments_forum_id mediumint(8) NOT NULL default '-1' "; $sql[] = "ALTER TABLE " . $table_prefix . "pa_cat ADD show_pretext tinyint(2) NOT NULL default '-1' "; $sql[] = "ALTER TABLE " . $table_prefix . "pa_cat ADD notify tinyint(2) NOT NULL DEFAULT '-1' "; $sql[] = "ALTER TABLE " . $table_prefix . "pa_cat ADD notify_group mediumint(8) NOT NULL DEFAULT '-1' "; // auth $sql[] = "ALTER TABLE " . $table_prefix . "pa_cat ADD auth_approval_groups tinyint(2) NOT NULL default '0' "; $sql[] = "ALTER TABLE " . $table_prefix . "pa_auth ADD auth_approval_groups tinyint(1) NOT NULL default '0' "; // add fields to pa_files table $sql[] = "ALTER TABLE " . $table_prefix . "pa_files ADD topic_id mediumint(8) unsigned NOT NULL default '0'"; } if ( $upgrade_280 == 1 ) { $sql[] = "INSERT INTO " . $table_prefix . "pa_config VALUES ('comments_forum_id', '0')"; $sql[] = "ALTER TABLE " . $table_prefix . "pa_cat MODIFY cat_allow_ratings tinyint(2) NOT NULL default '-1' "; $sql[] = "ALTER TABLE " . $table_prefix . "pa_cat MODIFY cat_allow_comments tinyint(2) NOT NULL default '-1' "; $sql[] = "ALTER TABLE " . $table_prefix . "pa_cat MODIFY notify_group mediumint(8) NOT NULL default '-1' "; $sql[] = "ALTER TABLE " . $table_prefix . "pa_cat MODIFY auth_delete_file tinyint(2) NOT NULL default '2' "; // Appearance $sql[] = "INSERT INTO " . $table_prefix . "pa_config VALUES ('use_simple_navigation', '1') "; $sql[] = "INSERT INTO " . $table_prefix . "pa_config VALUES ('cat_col', '2') "; // Auth $sql[] = "ALTER TABLE " . $table_prefix . "pa_cat CHANGE auth_approval_groups auth_approval_edit tinyint(2) NOT NULL default '0' "; $sql[] = "ALTER TABLE " . $table_prefix . "pa_auth CHANGE auth_approval_groups auth_approval_edit tinyint(2) NOT NULL default '0' "; } else { $message .= "<b>Nothing to upgrade...</b><br/><br/>"; } $message .= mx_do_install_upgrade( $sql ); // // Empty module cache // //include_once( $phpbb_root_path . 'mx_mod/functions_tools.' . $phpEx ); //$module_cache = new module_cache($phpbb_root_path . 'pafiledb/'); //$module_cache->tidy(); //$module_cache->save(); } echo "<br /><br />"; echo "<table width=\"90%\" align=\"center\" cellpadding=\"4\" cellspacing=\"1\" border=\"0\" class=\"forumline\">"; echo "<tr><th class=\"thHead\" align=\"center\">Mod Installation/Upgrading/Uninstalling Information - mod specific db tables</th></tr>"; echo "<tr><td class=\"row1\" align=\"left\"><span class=\"gen\">" . $message . "</span></td></tr>"; echo "</table><br />"; include($phpbb_root_path . 'includes/page_tail.'.$phpEx); ?> |