Location: PHPKode > projects > phpMUR Multi User Randomizer > tpl/andreas02/index.tpl.php
<?php


	// Here's a good place to define specific ajax functions for this page.

	function logged_in_users($args = array()) {
		ob_start();
		inc('listening.users.tpl.php', $args);
		$content = ob_get_clean();
		global $objResponse;
		if ($objResponse) {
			$objResponse->assign('logged_in_users', 'innerHTML', $content);
			return;
		}
		echo $content;
	}

	$xajax->processRequest();

	$callback->unregister_all('mark_login');
	$callback->unregister_all('set_listening');
	// $callback->register('mark_login', 'test_callback');
	$callback->register('mark_login', 'logged_in_users');
	$callback->register('set_listening', 'logged_in_users');


	// register($called_from, $exec, $eargs = array() );

?><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<?php
	$xajax->printJavascript();
?>
<script type="text/javascript"><!--
	var user_ratings = [];
	var user_names = [];
	mur_artist = '';
	mur_title = '';
	var playlist = [];
	var genres = {};

	// some variables to save
	var currentPosition = 0;
	var currentVolume;
	var currentItem;
	var percentLoaded = 0;
	var scrubTo = 0;
	var mediaplayer = 'mur_mediaplayer';
	var player_initialized;
	player_initialized = false;


	<?php
		if (isset($_SESSION['currentItem'])) {
			?>currentItem = <?php echo $_SESSION['currentItem']; ?>;<?php
		}
	?>

	showLoading = function() {
			//alert("called show");
			xajax.$('loading_message').style.display = 'block';

	};

	hideLoading = function() {
			//alert("called hide");
			xajax.$('loading_message').style.display = 'none';
	};

	xajax.callback.global.onResponseDelay = showLoading;
	xajax.callback.global.onComplete = hideLoading;

	<?php
	if (!$_SESSION['xdebug']) {
		?>xajax.debug.enabled=false;<?php
	} else {
		?>xajax.debug.enabled=true;<?php
	}
	?>



	function getElementsByClassName(className, tag, elm){
		var testClass = new RegExp("(^|\\s)" + className + "(\\s|$)");
		var tag = tag || "*";
		var elm = elm || document;
		var elements = (tag == "*" && elm.all)? elm.all : elm.getElementsByTagName(tag);
		var returnElements = [];
		var current;
		var length = elements.length;
		for(var i=0; i<length; i++){
			current = elements[i];
			if(testClass.test(current.className)){
				returnElements.push(current);
			}
		}
		return returnElements;
	}


	// Start of code taken from http://www.xs4all.nl/~peterned/blog/sortrows.html
	// Many modifications done by Erm to work with playlistItem class only.
	// <![CDATA[

	// quick 'n dirty,
	// oo(h) brother where art thou!

	window.onload = function() {
		// ie_debug("window.onload");
		var current = null;
		var dragTarget = null;
		var dragState = false;

		function toggleCurrent(row) {
			if(current) {
				current.className = current.className.replace(/\bactive\b/g, ' ');
			}
			(current = row).className += ' active';
		}

		function toggleTarget(row) {
			if(dragTarget && dragTarget.className.match(/playlistItem/)) {
				dragTarget.className = dragTarget.className.replace(/\btarget\b/g, ' ');
			}
			dragTarget = row;
			if(row && row.className.match(/playlistItem/)) {
				row.className += ' target';
			}
		}

		function cancelEvent(e) {
			try {
				e.preventDefault();
				e.stopPropagation();
			} catch (exception) {
				e.returnValue = false;
			}
			return false;
		}

		function getRow(e) {
			var target = e.target;
			while(target && !/^tr$/i.test(target.nodeName)) {
				target = target.parentNode;
			}
			return target;
		}



		if(!document.addEventListener) { // IIIEEEE!!!
			document.addEventListener = function(type, handler) {
				document.attachEvent('on'+type, function(e) {
					e.target = e.srcElement;
					return handler(e);
				});
			}
		}

		document.addEventListener('mousedown', function(e){
			var target = getRow(e);
			if (!target) {
				return;
			}
			if (!target.className.match(/playlistItem/)) {
				return;
			}
			if(target) {
				if (target.className.match(/^playlistItem/)) {
					toggleCurrent(target);
					dragState = true;
				}
				return cancelEvent(e);
			}
		}, false);

		document.addEventListener('mousemove', function(e){
			if(!dragState) {
				// debug("no drag state");
				return;
			}
			toggleTarget(getRow(e));
			return cancelEvent(e);
		}, false);

		document.addEventListener('mouseup', function(e) {
			if(dragState && current && dragTarget) {
				if (dragTarget.className.match(/playlistItem/)) {
					dragTarget.parentNode.insertBefore(current, dragTarget);
					if (dragTarget.className.match(/playlistItem/)) {
						reorder_playlist();
					}
				}
			}
			dragState = false;
			toggleTarget(false);

		}, false);
		// ie_debug("window.onload /done");
		minimize();

	}

	// ]]>
	// End of code taken from http://www.xs4all.nl/~peterned/blog/sortrows.html

	ie_debug_content = "";
	function ie_debug(string) {
		// return;
		var div = document.getElementById('ie_debug');
		if (div) {
			if (ie_debug_content) {
				div.innerHTML += ie_debug_content+"<br />";
				ie_debug_content = "";
			}
			div.innerHTML += string+"<br />";
		} else {
			ie_debug_content += string+"<br />";
		}
	}


	function minimize() {
		// ie_debug("minimize()");
		var large = document.getElementById('large_player');
		if (large) {
			large.innerHTML = '';
			large.style.display = 'none';
		} else {
			window.setTimeout('minimize()',1000);
			return;
		}
		document.getElementById('small_player').innerHTML = '<div id="player" style="height:240px; width:300;"><a href="http://www.macromedia.com/go/getflashplayer">Get Flash</a> to see this player.</div>';
		document.getElementById('large_player').innerHTML = '';
		so = new SWFObject('mediaplayer.swf',mediaplayer,300,240,7);
		so.addParam("allowfullscreen","true");
		so.addVariable("autostart","true");
		so.addVariable("file","playlist.xml.php");
		so.addVariable("repeat","true");
		so.addVariable("shuffle","false");
		so.addVariable("enablejs","true");
		so.addVariable("displayheight","250");
		so.addVariable("image","logo.jpg");
		so.addVariable("usefullscreen","true");
		so.addVariable("usekeys","true");
		so.addVariable("rotatetime",1);
		so.addParam("image","logo.jpg");

		so.write('player');
		if (currentPosition) {
			scrubTo = currentPosition;
		}
		// ie_debug("minimize()");

		wait_for_player();
		//window.setTimeout('populate_playlist()', 1000);

	}

	function wait_for_player() {
		try {
			thisMovie(mediaplayer).sendEvent('stop');
			populate_playlist();
		} catch (e) {
			window.setTimeout("wait_for_player();", 500);
		}
	}

	function maximize() {
		ie_debug("maximize()");
		var large = document.getElementById('large_player');
		large.innerHTML = '<div id="player"><a href="http://www.macromedia.com/go/getflashplayer">Get Flash</a> to see this player.</div>';

		document.getElementById('small_player').innerHTML = '';
		var winW = 630;
		var winH = 460;


		if (parseInt(navigator.appVersion)>3) {
			if (navigator.appName=="Netscape") {
				winW = window.innerWidth;
				winH = window.innerHeight;
			}
			if (navigator.appName.indexOf("Microsoft")!=-1) {
				winW = document.body.offsetWidth;
				winH = document.body.offsetHeight;
			}
		}

		large.style.display = 'block';

		large.style.height = winH;
		large.style.width = 760;

			/*document.write(
			"Window width = "+winW+"<br>"
			+"Window height = "+winH */
		// alert(winH+':'+winW);
		so = new SWFObject('mediaplayer.swf',mediaplayer, 760, winH, '7');
		so.addParam("allowfullscreen","true");
		so.addVariable("autostart","true");
		so.addVariable("repeat","true");
		so.addVariable("shuffle","false");
		so.addVariable("enablejs","true");
		so.addVariable("image","logo.jpg");
		so.addVariable("usefullscreen","true");
		so.addVariable("displayheight",winH);
		so.addVariable("usekeys","true");
		so.addVariable("rotatetime",1);
		so.addVariable("fsbuttonlink","javascript:minimize();");
		so.addParam("image","logo.jpg");

		so.write('player');

		if (currentPosition) {
			scrubTo = currentPosition;
		}
		wait_for_player();
		// ie_debug("// maximize()");
  		// window.setTimeout('populate_playlist()',1000);
	}


		// these functions are caught by the JavascriptView object of the player.
	function sendEvent(typ,prm) {
		thisMovie(mediaplayer).sendEvent(typ,prm);
	};

	function scrub() {
		var _mod = document.getElementById('scrub_mod');
		var mod = _mod.options[_mod.selectedIndex].value;
		var scrub_mesurement = document.getElementById('scrub_mesurement');
		var _scrub_value = document.getElementById('scrub_value');
		var scrub_value = _scrub_value.options[_scrub_value.selectedIndex].value;
		var mesurement = scrub_mesurement.options[scrub_mesurement.selectedIndex].value;
		// scrub_value = scrub_value.toInt();
		// currentPosition = currentPosition.toInt();
		currentPosition = parseInt (currentPosition);
		scrub_value = parseInt (scrub_value);
		if (mesurement == 'min') {
			scrub_value = (scrub_value * 60);
		}
		var to = 0;
		if(mod == '-') {
			to = currentPosition - scrub_value;
			sendEvent("scrub",to);
		}
		if(mod == '+') {
			to = currentPosition + scrub_value;
		}
		if (to < 0) {
			to = 0;
		}
		// alert("scrub: to:"+to+" currentPosition:"+currentPosition+" scrub_value:"+scrub_value);
		sendEvent("scrub",to);

	}

	function getUpdate(typ,pr1,pr2,pid) {
		// ie_debug("getUpdate("+typ+","+pr1+","+pr2+","+pid+")");
		if(typ == "time") {
			currentPosition = pr1;
			/*
			if (document.getElementById('currentPosition')) {
				document.getElementById('currentPosition').innerHTML = currentPosition;
			} */
			if (scrubTo && percentLoaded == 100) {
				sendEvent("scrub",scrubTo);
				scrubTo = 0;
			}
		}
		else if(typ == "volume") { currentVolume = pr1; }
		else if(typ == "item") {
			currentItem = pr1;
			setTimeout("setItemData(currentItem)",500);
		} else if (typ == 'load') {
			percentLoaded = pr1;
		}
		var id = document.getElementById(typ);
		id.innerHTML = typ+ ": "+Math.round(pr1);
		pr2 == undefined ? null: id.innerHTML += ", "+Math.round(pr2);
		if(pid != "null") {
			document.getElementById("pid").innerHTML = "(received from the player with id <i>"+pid+"</i>)";
		}
	};

	// These functions are caught by the feeder object of the player.
	function loadFile(obj) { thisMovie(mediaplayer).loadFile(obj); };

	var tmp_playlist = [];
	function addItem(obj,idx) {
		try {
			thisMovie(mediaplayer).addItem(obj,idx);
		} catch (e) {
			// populate_playlist();
			if (!thisMove(mediaplayer)) {
				wait_for_player();
			} else {
				addItem(obj, idx);
			}
		}
	}


	function removeItem(idx) {
		thisMovie(mediaplayer).removeItem(idx); reverse_sync_playlist();
	}


	function trimPlaylist() {
		var reload_playlist = false;
		while (currentItem > 4) {
			reload_playlist = true;
			currentItem--;
			document.getElementById('item').innerHTML = currentItem+'t';
			thisMovie(mediaplayer).removeItem(0);
		}
		if (reload_playlist) {
			reverse_sync_playlist();
		}
	}

	function clearPlaylist() {
		var playlist = get_playlist();
		for (i=0;i<playlist.length;i++) {
			thisMovie(mediaplayer).removeItem(0);
		}
	}

	var last_id = 0;
	function getItemData(idx) {
		try {
			return thisMovie(mediaplayer).itemData(idx);
		} catch(e) {
			return;
		}
	};
	function setItemData(idx) {
		var obj = getItemData(idx);
		var nodes = "";
		for(var i in obj) {
			/* nodes += "<li>"+i+": "+obj[i]+"</li>"; */
			nodes += "<li>"+i+": <span id='mur_"+i+"'>"+obj[i]+"</span></li>";
		}
		if (typeof(obj) != 'undefined' && typeof(obj['id']) != 'undefined' && obj['id'] != last_id) {
			last_id = obj['id'];
			reverse_sync_playlist();
		}
		document.getElementById("_data").innerHTML = nodes;
	};

	try {
		playlist = new Array();
	} catch (e) {
		alert("Proplem creating playlist Array 1");
	}

	function get_playlist() {
		var fetch = true;
		var i = 0;
		try {
			playlist = new Array();
		} catch (e) {
			alert("Proplem creating playlist Array 2");
		}
		while (fetch == true) {
			try {
				var obj = getItemData(i);
			} catch (e) {
				return playlist;
			}
			if (obj == null || obj == undefined) {
				return playlist;
			}
			playlist[i] = obj;
			i++;
		}
		return playlist;
	}

	function reverse_sync_playlist() {
		xajax_reverse_sync_playlist(get_playlist(), currentItem);
	};

	function reorder_playlist() {
		var pl = getElementsByClassName('playlistItem');
		var new_order = [];
		for (i in pl) {
			// content += "pl["+i+"] = "+pl[i]['id']+"<br />";
			new_order[i] = pl[i]['id'].replace(/pl_/,'');
		}
		var current_playlist = get_playlist();
		try {
			var current_id = current_playlist[currentItem]['id'];
		} catch(e) {
			populate_playlist();
			return;
		}
		var reorder = false;
		for(i=(new_order.length - 1);i>=0;i--) {
			if (current_playlist[i]['id'] != new_order[i]) {
				reorder = true;
			}
		}
		if (!reorder) {
			return;
		}
		var new_currentItem = 0;
		for(i=(new_order.length - 1);i>=0;i--) {
			if (current_playlist[i] != 'undefined' && current_playlist[i]['id'] != undefined && new_order[i] == current_playlist[currentItem]['id']) {
				new_currentItem = i;
			}
		}

		for(i=(new_order.length - 1);i>=0;i--) {
			if (i != currentItem) {
				thisMovie(mediaplayer).removeItem(i);
			}
		}

		for(i=0;i<new_order.length;i++) {
			if (i != new_currentItem) {
				for(i2 in current_playlist) {
					if (current_playlist[i2]['id'] == new_order[i]) {
						addItem(current_playlist[i2], i);
					}
				}
			}
		}
		reverse_sync_playlist();
	}

	// This is a javascript handler for the player and is always needed.
	function thisMovie(movieName) {
	    if(navigator.appName.indexOf("Microsoft") != -1) {
			return window[movieName];
		} else {
			return document[movieName];
		}
	};

	function next_song() {
		sendEvent('next');
		reverse_sync_playlist();
	}

	function prev_song() {
		sendEvent('prev');
		reverse_sync_playlist();
	}

	function set_current_rating() {
		var uid = document.getElementById("value_uid").value;
		var rating = document.getElementById("value_rate").value;
		var fid = document.getElementById("mur_id").innerHTML;
		//set_rating($div, $fid, $uid, $rating)
		//echo build_rating_select('playlist' , $f['fid'], $uid,$uinfo['rating'],true).' ';
		//$div_id = $div.'['.$fid.']'.'['.$uid.']';
		xajax_set_rating("playlist",fid ,uid, rating, true);
	}

	function populate_playlist() {
		playlist = get_playlist();
		xajax_populate_playlist(playlist, currentItem);
	}

//-->
</script>
<script type="text/javascript" src="flash_media_player.3.8/swfobject.js"></script>
<?php /*
<script src="scriptaculous/lib/prototype.js" type="text/javascript"></script>
<script src="scriptaculous/src/scriptaculous.js" type="text/javascript"></script>
<script src="scriptaculous/src/unittest.js" type="text/javascript"></script> */ ?>
<link rel="stylesheet" type="text/css" href="tpl/andreas02/andreas02.css" media="screen" title="andreas02 (screen)" />
</head>
<body>
<?php /*
<div id="toptabs">
<p>Site Network:
<a class="activetoptab" href="index.html">Personal</a><span class="hide"> | </span>
<a class="toptab" href="index.html">My Company</a><span class="hide"> | </span>
<a class="toptab" href="index.html">Artist projects</a><span class="hide"> | </span>
<a class="toptab" href="index.html">Shop</a></p>
</div> */
?>
<div id="container">
<span id="firefox2" style="float:right; width: 90px; padding: 5px;" onMouseOver="div=document.getElementById('firefox2'); div.style.width='250'; div=document.getElementById('firefox2_blurb'); div.style.display ='block';" onMouseOut="div=document.getElementById('firefox2'); div.style.width='90'; div=document.getElementById('firefox2_blurb');div.style.display ='none';">
<a href="http://www.spreadfirefox.com/?q=affiliates&amp;id=0&amp;t=210"><img border="0" alt="Firefox 2" title="Firefox 2" src="widget/firefox-spread-btn-1b.png" align="right" /></a><span id="firefox2_blurb" style="display:none;">
This site has been designed and tested on Firefox 2.<br /></span>
</span>
<div id="logo">

<h1>phpMUR</h1>
</div>
<div id="large_player"></div><br />
<div id="navitabs"><span id="menu"><?php
?></span><?php

	$radio_tab = new radio_tab();
	/*
	$tabs = array(
		'Welcome' => 'logged.in.users.tpl.php'
	);
	$logged_in_tabs = array(
		'Playlist' => 'playlist.tpl.php',
		'Preload' => 'preload.tpl.php',
		'Search' => 'search.tpl.php',
		'Genre' => 'genre.tpl.php'
	);

	$admin_tabs = array(
		'Admin' => 'admin.tpl.php',
		'Scan' => 'scan.tpl.php',
		'Create CD' => 'cd.tpl.php'
	);
	*/
	$radio_tab->write_tab(
		array(
			'id' => 'new_menu',
			'seperator' => ' ',
			'class' => array(
				'open' => 'activenavitab',
				'closed' => 'navitab',
			),
			'items' => array(
				'Welcome' => array(
					'check' => '',
					'templates' => array(
						'blurb' => 'login.blurb.tpl.php',
						'content' => 'listening.users.tpl.php',
						'current_song' => 'current.song.tpl.php'
					)
				),
				'Playlist' => array(
					'check' => '',
					'templates' => array(
						'blurb' => 'playlist.blurb.tpl.php',
						'content' => 'playlist.tpl.php',
						'current_song' => 'current.song.tpl.php'
					)
				),
				'Preload' => array(
					'check' => 'logged_in',
					'templates' => array(
						'blurb' => 'preload.blurb.tpl.php',
						'content' => 'preload.tpl.php',
						'current_song' => 'current.song.tpl.php'
					)
				),
				'Search' => array(
					'check' => 'logged_in',
					'templates' => array(
						'blurb' => 'search.blurb.tpl.php',
						'content' => 'search.tpl.php',
						'current_song' => 'current.song.tpl.php'
					)
				),
				'Seeqpod' => array(
					'check' => 'admin',
					'templates' => array(
						'blurb' => 'seeqpod.blurb.tpl.php',
						'content' => 'seeqpod.tpl.php',
						'current_song' => 'current.song.tpl.php'
					)
				),
				'Genre' => array(
					'check' => 'logged_in',
					'templates' => array(
						'blurb' => 'genre.blurb.tpl.php',
						'content' => 'genre.tpl.php',
						'current_song' => 'current.song.tpl.php'
					)
				),
				'Scan' => array(
					'check' => 'admin',
					'templates' => array(
						'blurb' => 'scan.blurb.tpl.php',
						'content' => 'scan.tpl.php',
						'current_song' => 'current.song.tpl.php'
					)
				),
				'Create CD' => array(
					'check' => 'admin',
					'templates' => array(
						'blurb' => 'cd.blurb.tpl.php',
						'content' => 'cd.tpl.php',
						'current_song' => 'current.song.tpl.php'
					)
				),
				'About' => array(
					'check' => '',
					'templates' => array(
						'blurb' => 'about.blurb.tpl.php',
						'content' => 'about.tpl.php',
						'current_song' => 'current.song.tpl.php'
					)
				)
			)
		)
	);

/*
	array(
				'id' => 'navitabs',
				'items' => array(
					'test1' => array(
						'check' => 'admin/logged_in/null',
						'templates' => array(
							'test_div1' => 'test.tpl.php',
							'test_div2' => 'test.tpl.php'
						)

					),
					'test2' => array(
						'check' => 'admin/logged_in/null',
						'templates' => array(
							'test_div1' => 'test.tpl.php',
							'test_div2' => 'test.tpl.php'
						)
					)
				),
				'class' => array(
						'open' => 'activenavitab',
						'closed' => 'navitab',
				)
			)
	*/

/*
<a class="activenavitab" href="index.html">Welcome</a><span class="hide"> | </span>
<a class="navitab" href="#">Bio</a><span class="hide"> | </span>
<a class="navitab" href="#">Discography</a><span class="hide"> | </span>
<a class="navitab" href="#">Downloads</a><span class="hide"> | </span>
<a class="navitab" href="#">Photos</a><span class="hide"> | </span>
<a class="navitab" href="#">Tour</a><span class="hide"> | </span>
<a class="navitab" href="#">Merchandise</a><span class="hide"> | </span>
<a class="navitab" href="#">Interviews</a> */
// inc ('menu.tpl.php',$args);
?></div>
<style>
	#player {
		z-index: 1;
	}
</style>
<div id="desc">
	<span id="small_player" style="z-index:1000;">
	<div id="player"><a href="http://www.macromedia.com/go/getflashplayer">Get Flash</a> to see this player.</div></span>
	<div id="blurb">
		<h2>Welcome to phpMUR!</h2>
		<p>This is the worlds first, and to my knowledge only multi-user-randomizer.</p>
		<p><?php
			inc('login.form.tpl.php');

		?></p>
	</div>
</div>
<div id="main">
<div id="current_song"></div>
<div id="content">
<?php
	inc($_SESSION['tabs']["{$_SESSION['open_tab']}"]);
?>
</div>
<br />
<?php /*
<h3>The idea behind the design:</h3>
<p>I run several websites on different domains, and they are all connected in various ways. One website is my personal site, and it has a lot of links to my company website, which shares a lot of content with my studio and artist websites. Despite this, all the sites have different designs and different functionality - and it is all one big mess to keep track of it all. Are you familiar with the situation? Then read on!</p>

<p>When it was time to redesign one of the sites, I got an idea about making a standard design that all of my sites could use and make some kind of official link network between the sites. My way of doing this turned out to be the use of toptabs (for selecting a website) and navitabs (for selecting subsections within the different sites). With a basic PHP template, all sites can have the same design and share the same toptabs - but they can have their own separate content. The final touch to it would be to give each site a color scheme of its own. The personal site has blue colors, the company site is green, the artist site is red and so on.</p>

<p class="block"><strong>Please note:</strong> As with all designs I publish on <a href="http://oswd.org/userinfo.phtml?user=Andreas">my page at OSWD.org</a>, I have not aimed at making any kind of trendy or shiny design. I prefer to keep it clean and simple, and let others add the details that will make the design special and unique. However, the design has some useful built-in features, such as a print CSS and full functionality when degrading to no-CSS mode. You can use the design as it is, but I recommend that you play around with it. Add things, remove things, let your creativity flow!</p>

<h3>An open source design!</h3>
<p>If you like this layout and would like to use it in any way, you are free to do so. This is an <a href="http://oswd.org">open source web design</a>, and all I ask for is that you leave the "Design by Andreas Viklund" link in the footer of the site. If you would like to remove that line, or if you would like professional help with anything related to this layout (such as custom design, branding, scripting or programming), please contact me <a href="http://oswd.org/email.phtml?user=Andreas">through OSWD.org</a> or through my website for more information.</p>

<p>Version: 1.0 (July 27, 2005)</p> */ ?>
</div>
<?php /*
<div id="sidebar">
<h3>More information:</h3>
<p>Do you want more information about this design (and other designs I have released)? Then you should check out these pages:</p>

<p><a class="sidelink" href="http://andreasviklund.com/">My website</a><span class="hide"> | </span>
<a class="sidelink" href="http://oswd.org/">My OSWD.org page</a><span class="hide"> | </span>
<a class="sidelink" href="http://validator.w3.org/check/referer">Valid XHTML</a><span class="hide"> | </span>
<a class="sidelink" href="http://jigsaw.w3.org/css-validator/check/referer">Valid CSS</a></p>

<h3>Random image:</h3>
<p><img class="photo" src="images/test.jpg" height="100" width="130" alt="" /></p>

<h3>Wise words:</h3>
<p>"It happens every day: information overload! Time for a reboot..."<br />
(traditional haiku poem)</p>
</div>
*/ ?>
<div id="footer">
Copyright &copy; 2007 (Eugene R. Miller). Original Design by <a href="http://andreasviklund.com">Andreas Viklund</a>.
</div>
</div>

<div id="xajax_xdebug"></div>
<div id="loading_message">Loading Please Wait ...</div>
<a href="?reset">reset</a>
<a onClick="populate_playlist();"
 style='cursor:pointer;'>populate_playlist()</a>
<a onClick="reverse_sync_playlist();" style='cursor:pointer;'>reverse_sync_playlist()</a> <a onClick="wait_for_playlist();">wait_for_playlist()</a>
<a onClick="trimPlaylist();" style='cursor:pointer;'>trimPlaylist();</a> <a onClick="maximize();">maximize();</a><br />
<?php
	if ($_SERVER['REMOTE_ADDR'] == $_SERVER['SERVER_ADDR']) {
		echo $html->checkbox(
				array(
					'onClick' => 'xajax_xdebug(this.checked)',
					'id' => 'enable_debug'
				), $_SESSION['xdebug'],
				'Debug',
				$label = true,
				$orient = 'left'
			);
	}

?>
<div id="hide_me"<?php
	if (!$_SESSION['xdebug']) {
		?> style="display:none;"<?php
	}
?>>
	<p id="pid"></p>
	<ul>
		<li id="item">&nbsp;</li>
		<li id="volume">&nbsp;</li>
		<li id="state">&nbsp;</li>
		<li id="time">&nbsp;</li>
		<li id="load">&nbsp;</li>
		<li id="size">&nbsp;</li>
	</ul>
	<h2>ITEM DATA</h2>
	<ul id="_data"></ul>
	<pre>
	<div id="mur_debug" style="overflow:auto; width:800px; "></div>
	<input type="button" value="clear" onClick="document.getElementById('mur_debug').innerHTML='';">
	<!--
	<div id="xajax_debug_div" style="overflow:auto; width:800px; height:400px;"></div>
	<input type="button" value="clear" onClick="document.getElementById('xajax_debug_div').innerHTML='';"> -->
	</pre>

	<div>
	<input type="button" value="prev" id="button_prev" onClick="prev_song();">
	<input type="button" value="next" id="button_next" onClick="next_song();">
	<input type="button" value="play" id="button_play" onClick="sendEvent('playpause');">
	<input type="button" value="pause" id="button_pause" onClick="sendEvent('playpause');">
	<input type="button" value="stop" id="button_stop" onClick="sendEvent('stop');">
	uid:<input type="text" id="value_uid">
	rating:<input type="text" id="value_rate">
	<input type="button" value="rate" id="button_rate" onClick="set_current_rating();">
	</div>
</div>
<?php
		// $_SESSION['tabs'] = array();

		if (file_exists('/var/www/links.php')) {
			include_once '/var/www/links.php';
		}
	/*<div style="display:none;"> */
	// /*
	?>
<br /><input type="button" value="clear ie debug" onClick="document.getElementById('ie_debug').innerHTML='';" >
<div id="ie_debug">IE Debug<br /></div>
</body>
</html>
Return current item: phpMUR Multi User Randomizer