Changeset 1024
- Timestamp:
- 07/19/08 15:00:05 (4 months ago)
- Files:
-
- trunk/swisscenter/config/config_audio.php (modified) (1 diff)
- trunk/swisscenter/config/config_musicip.php (added)
- trunk/swisscenter/config/index.php (modified) (1 diff)
- trunk/swisscenter/lang/en/en.xml (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/swisscenter/config/config_audio.php
r820 r1024 4 4 *************************************************************************************************/ 5 5 6 require_once( realpath(dirname(__FILE__).'/../base/musicip.php'));7 8 6 // ---------------------------------------------------------------------------------- 9 7 // Display current config 10 8 // ---------------------------------------------------------------------------------- 11 9 12 function audio_display( $message _audio = '', $message_musicip = '')10 function audio_display( $message = '' ) 13 11 { 14 $opts2_vals = array( str('ENABLED')=>'YES',str('DISABLED')=>'NO'); 15 $opts3_vals = array( str('ENABLED')=>'YES',str('DISABLED')=>'NO',str('AUTOMATIC')=>'AUTO'); 12 $opts_vals = array( str('ENABLED')=>'YES',str('DISABLED')=>'NO',str('AUTOMATIC')=>'AUTO'); 16 13 17 14 echo "<h1>".str('CONFIG_AUDIO_OPTIONS')."</h1>"; 18 message($message _audio);15 message($message); 19 16 form_start('index.php'); 20 17 form_hidden('section','AUDIO'); 21 18 form_hidden('action','UPDATE'); 22 form_radio_static('style',str('NOW_PLAYING_SUPPORT'),$opts 3_vals, get_sys_pref('SUPPORT_NOW_PLAYING','AUTO') ,false,true);19 form_radio_static('style',str('NOW_PLAYING_SUPPORT'),$opts_vals, get_sys_pref('SUPPORT_NOW_PLAYING','AUTO') ,false,true); 23 20 form_label(str('NOW_PLAYING_PROMPT')); 24 21 form_submit(str('SAVE_SETTINGS')); 25 22 form_end(); 26 27 echo "<h1>".str('CONFIG_MIP_OPTIONS')."</h1>";28 $opts_type = array( str('TRACKS')=>'tracks',str('MINUTES')=>'min');29 30 // Display any messages to the user regarding the state of the MusicIP service31 if ( ! empty($message_musicip) )32 message($message_musicip);33 elseif ( ! musicip_available() )34 message('!'.str('MIP_NOT_FOUND'));35 36 echo '<b>'.str('MIP_WHATIS').'</b>';37 echo '<p>'.str('MIP_DESC','<a href="http://www.musicip.com">www.musicip.com</a>');38 39 form_start('index.php');40 form_hidden('section','AUDIO');41 form_hidden('action','UPDATE_MUSICIP');42 43 form_input('port',str('MIP_PORT'),3,'', get_sys_pref('MUSICIP_PORT'));44 form_label(str('MIP_PORT_PROMPT'));45 46 form_slider('size',str('MIP_SIZE'),5,500,3, get_sys_pref('MUSICIP_SIZE',20));47 form_radio_static('size_type','',$opts_type, get_sys_pref('MUSICIP_SIZE_TYPE','tracks') ,false,true);48 form_label(str('MIP_SIZE_PROMPT'));49 50 form_slider('reject',str('MIP_REJECT'),1,100,3, get_sys_pref('MUSICIP_REJECT',5));51 form_radio_static('reject_type','',$opts_type, get_sys_pref('MUSICIP_REJECT_TYPE','tracks') ,false,true);52 form_label(str('MIP_REJECT_PROMPT'));53 54 form_slider('style',str('MIP_STYLE'),0,200,3, get_sys_pref('MUSICIP_STYLE',20));55 form_label(str('MIP_STYLE_PROMPT'));56 57 form_slider('variety',str('MIP_VARIETY'),0,9,3, get_sys_pref('MUSICIP_VARIETY',0));58 form_label(str('MIP_VARIETY_PROMPT'));59 60 form_submit(str('SAVE_SETTINGS'));61 form_end();62 23 } 63 64 // ----------------------------------------------------------------------------------65 // Saves the MusicIP settings66 // ----------------------------------------------------------------------------------67 68 function audio_update_musicip()69 {70 $port = $_REQUEST["port"];71 72 if (empty($port) || (int)$port < 1 || (int)$port > 65535)73 audio_display('',"!".str('MIP_INVALID_PORT'));74 else75 {76 if ( musicip_check($port) )77 {78 set_sys_pref('MUSICIP_PORT',$port);79 set_sys_pref('MUSICIP_STYLE',$_REQUEST["style"]);80 set_sys_pref('MUSICIP_VARIETY',$_REQUEST["variety"]);81 set_sys_pref('MUSICIP_REJECT',$_REQUEST["reject"]);82 set_sys_pref('MUSICIP_REJECT_TYPE',$_REQUEST["reject_type"]);83 set_sys_pref('MUSICIP_SIZE',$_REQUEST["size"]);84 set_sys_pref('MUSICIP_SIZE_TYPE',$_REQUEST["size_type"]);85 audio_display('',str('SAVE_SETTINGS_OK'));86 }87 else88 {89 audio_display('',"!".str('MIP_INVALID_PORT',$port));90 }91 }92 }93 24 94 25 // ---------------------------------------------------------------------------------- trunk/swisscenter/config/index.php
r1021 r1024 101 101 $menu->add_item(str('MISC_TITLE') ,'section=MISC&action=DISPLAY'); 102 102 103 $menu->add_menu(str('ADDITIONAL_COMPONENTS')); 104 $menu->add_item(str('CONFIG_MUSICIP') ,'section=MUSICIP&action=DISPLAY'); 105 103 106 $menu->add_menu(str('EXPERT_OPTIONS')); 104 107 $menu->add_item(str('LANG_EDITOR') ,'section=LANGUAGE&action=DISPLAY'); trunk/swisscenter/lang/en/en.xml
r1021 r1024 14 14 </string> 15 15 <string> 16 <id>ADDITIONAL_COMPONENTS</id> 17 <text>Other Components</text> 18 <version>1.20.1</version> 19 </string> 20 <string> 16 21 <id>ADD_PLAYLIST</id> 17 22 <text>Add to your playlist</text> … … 554 559 </string> 555 560 <string> 561 <id>CONFIG_MUSICIP</id> 562 <text>MusicIP Settings</text> 563 <version>1.20.1</version> 564 </string> 565 <string> 556 566 <id>CONFIG_RADIO_OPTIONS</id> 557 567 <text>Internet Radio</text> … … 1815 1825 <string> 1816 1826 <id>MEDIA_MANAGEMENT</id> 1817 <text>Media management</text>1818 <version>1. 19</version>1827 <text>Media Management</text> 1828 <version>1.20.1</version> 1819 1829 </string> 1820 1830 <string>