00001 <?php
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014 require_once("modules/music/mp3act_functions.php");
00015 require_once("modules/music/mp3act_sajax.php");
00016
00017 GarbageCollector();
00018
00019 $sajax_remote_uri = root.'music/';
00020 $sajax_request_type = 'POST';
00021 sajax_init();
00022 sajax_export("getplaylistnames","musicLookup","playlist_rem","playlist_add","playlistInfo","clearPlaylist","buildBreadcrumb","play","playlist_move","searchMusic","viewPlaylist","getDropDown","savePlaylist","getRandItems","randAdd","deletePlaylist");
00023 sajax_handle_client_request();
00024
00025 $headers[] = '<link rel="Stylesheet" href="'.skin_url.'music.css" type="text/css">';
00026
00027 require 'modules/_shared/tmpl/'.tmpl.'/header.php';
00028 ?>
00029
00030 <script type="text/javascript">
00031 var page = 'search';
00032 var mode = '<?php echo $_SESSION['sess_playmode']; ?>';
00033 var bc_parenttype = '';
00034 var bc_parentitem = '';
00035 var bc_childtype = '';
00036 var bc_childitem = '';
00037 var prevpage = '';
00038 var currentpage = 'search';
00039 var nowplaying = 0;
00040 var isplaying = 0;
00041 var clearbc = 1;
00042
00043 function getCookie( cookieName ) {
00044 var cookies = document.cookie;
00045 var substr1 = cookies.split( cookieName+'=' )
00046 if ( substr1 == cookies ) return -1;
00047 var substr2 = substr1[1].split( ';' );
00048 var len1 = substr1[0].length + cookieName.length + 1;
00049 var len2 = substr2[0].length
00050 return cookies.substring( len1, len1+len2 );
00051 }
00052
00053 function checkPlaylistLoad( playlistId, unsavedPlaylistId ) {
00054 var pl_id = getCookie('mp3act_playlist_id');
00055 if (pl_id < 1) return true;
00056 if (playlistId == pl_id) {
00057 alert ('<?php echo t('This playlist is already loaded!'); ?>');
00058 return false;
00059 }
00060 if (unsavedPlaylistId == pl_id) {
00061 return confirm('<?php echo t('This will overwrite your current, unsaved playlist. Are you sure you want to continue?'); ?>');
00062 }
00063 return true;
00064 }
00065 <?php sajax_show_javascript(); ?></script>
00066 <script type="text/javascript" src="<?php echo root; ?>music/mp3act_js.js.php"></script>
00067 <script type="text/javascript" src="<?php echo root; ?>music/mp3act_fat.js"></script>
00068
00069 <div id="wrap">
00070 <div id="header">
00071 <div id="controls">
00072
00073 </div>
00074 <h1 id="pagetitle"></h1>
00075 <ul class="music" id="nav">
00076 <li><a href="#" id="search_music" onclick="switchPage('search'); return false;" title="<?php echo t('Search the Music Database'); ?>"><?php echo t('Search'); ?></a></li>
00077 <li><a href="#" id="browse" onclick="switchPage('browse'); return false;" title="<?php echo t('Browse the Music Database'); ?>" class="c"><?php echo t('Browse'); ?></a></li>
00078 <li><a href="#" id="random" onclick="switchPage('random'); return false;" title="Create Random Mixes"><?php echo t('Random'); ?></a></li>
00079 <li><a href="#" id="playlists" onclick="switchPage('playlists'); return false;" title="<?php echo t('Load Saved Playlists'); ?>"><?php echo t('Playlists'); ?></a></li>
00080 <li><a href="#" id="stats" onclick="switchPage('stats'); return false;" title="<?php echo t('View Server Statistics'); ?>"><?php echo t('Stats'); ?></a></li>
00081 </ul>
00082
00083 </div>
00084 <div id="loading"><h1><?php echo t("LOADING"); ?>...</h1></div>
00085 <div id="left">
00086 <!--Disable breadcrumbs so info box and playlist align.-->
00087 <h2 id="breadcrumb" style="display:none"></h2>
00088 <div class="box" id="info">
00089 </div>
00090 </div>
00091
00092 <div id="right">
00093 <div class="box">
00094 <div class="head">
00095 <div class="right"><a href="#" onclick="play('pl',0); return false;" title="<?php echo t('Play This Playlist Now'); ?>"><?php echo t('Play'); ?></a> <a href="#" onclick="savePL('open',0); return false;" title="<?php echo t('Save or Rename the Current Playlist'); ?>"><?php echo t('Save/Rename'); ?></a> <a href="#" onclick="plclear(); return false;" class="red" title="<?php echo t('Create a New Playlist'); ?>"><?php echo t('New'); ?></a></div>
00096 <h2 id="pl_title"></h2><span id="pl_info"></span>
00097 </div>
00098 <ul class="music" id="playlist">
00099
00100 </ul>
00101
00102 <div id="box_extra"> </div>
00103 </div>
00104 </div>
00105 <div class="clear"></div>
00106 </div>
00107 <iframe src="<?php echo root; ?>music/mp3act_hidden.php" frameborder="0" height="0" width="0" id="hidden" name="hidden"></iframe>
00108 <?php
00109 require 'modules/_shared/tmpl/'.tmpl.'/footer.php';