Location: PHPKode > projects > Axis Groupware > musiclib/inc/sidebar.inc.php
<table cellpadding=0 cellspacing=0 border=0 width=100%><tr><td rowspan=2 valign="top" width=145>
<div id="leftnav">
<p>
<a href="<? echo $GLOBALS['phpgw']->link("/musiclib/index.php") ?>">Home</a><br>
<a href="<? echo $GLOBALS['phpgw']->link("/musiclib/recent.php","mode=album") ?>">New Albums</a><br>
<a href="<? echo $GLOBALS['phpgw']->link("/musiclib/recent.php","mode=misc") ?>">New Misc</a><br>
<a href="<? echo $GLOBALS['phpgw']->link("/musiclib/top.php","mode=album") ?>">Top Albums</a><br>
<a href="<? echo $GLOBALS['phpgw']->link("/musiclib/top.php","mode=song") ?>">Top Songs</a><br>
<a href="<? echo $GLOBALS['phpgw']->link("/musiclib/top.php","mode=misc") ?>">Top Misc</a><br>
<a href="<? echo $GLOBALS['phpgw']->link("/musiclib/browse.php","mode=album") ?>">Browse Albums</a><br>
<a href="<? echo $GLOBALS['phpgw']->link("/musiclib/browse.php","mode=misc") ?>">Browse Misc</a><br>
<!--		<a href="charts.php">:: Charts</a><br> -->
<a href="<? echo $GLOBALS['phpgw']->link("/musiclib/random.php") ?>">Random Play</a><br>
<FORM action="<? echo $GLOBALS['phpgw']->link("/musiclib/playlists.php") ?>" method="post">
<a href="<? echo $GLOBALS['phpgw']->link("/musiclib/playlists.php") ?>">Playlists</a>
<?
// PLAYLISTS SELECT BOX

	echo "<SELECT size=1 class=\"selectbox\" name=\"playlist_select\" onChange=\"javascript:submit();\">\n";

 	$query  = construct_playlists_select(" WHERE owner=".$GLOBALS['phpgw_info']['user']['account_id']
									   ." ORDER BY playlist_title");
	$result = $GLOBALS['phpgw']->db->query($query);
	
	echo "<OPTION ";
	# echo " selected "
	echo " label=\"My Playlists\" value=\"myplaylists\">- My Playlists -</OPTION>\n";

	echo "<OPTION ";
	echo " label=\"Random\" value=\"random\">+ Random Play +</OPTION>\n";

	while ($GLOBALS['phpgw']->db->next_record()) {
		$row = $GLOBALS['phpgw']->db->Record;
		
		$playlist_id = $row['id'];
		$playlist_title = $row['playlist_title'];
		
		if (strlen($playlist_title) > 20) 
		{
			$playlist_title = substr($playlist_title,0,20)."...";
		}
		
	    echo "<OPTION ";
		# echo " selected "
	    echo " label=\"".$playlist_title."\" value=\"".$playlist_id."\">".$playlist_title."</OPTION>\n";
    } 

// continue sidebar
?>
</SELECT>
</form>
</p>
<a href="<? echo $GLOBALS['phpgw']->link("/musiclib/searchpage.php") ?>">Adv. Searches</a><br>
	<font size=1><b>Search Albums</b></font>
	  <form action="<? echo $GLOBALS['phpgw']->link("/musiclib/searches.php") ?>" method="post" name="defaultsearch">
		<p><input type="hidden" name="action" value="doSearch">
		<input type="hidden" name="search" value="albumkey">
		<input type="hidden" name="mode" value="album">
		<input type="hidden" name="table" value="1">
		<input tabindex=1 class="field" type="text" name="searchFor" size="15" value="<? echo stripslashes($searchFor); ?>"></p>
	  </form>
	<font size=1><b>Search Songs</b></font>
	  <form action="<? echo $GLOBALS['phpgw']->link("/musiclib/searches.php") ?>" method="post" name="songsearch">
		<p><input type="hidden" name="action" value="doSearch">
		<input type="hidden" name="search" value="songkey">
		<input type="hidden" name="mode" value="song">
		<input type="hidden" name="table" value="1">
		<input tabindex=1 class="field" type="text" name="searchFor" size="15" value="<? echo stripslashes($searchFor); ?>"></p>
	  </form>
	<font size=1><b>Search Misc</b></font>
	  <form action="<? echo $GLOBALS['phpgw']->link("/musiclib/searches.php") ?>" method="post" name="miscsearch">
		<p><input type="hidden" name="action" value="doSearch">
		<input type="hidden" name="search" value="misckey">
		<input type="hidden" name="mode" value="misc">
		<input type="hidden" name="table" value="2">
		<input tabindex=1 class="field" type="text" name="searchFor" size="15" value="<? echo stripslashes($searchFor); ?>"></p>
	  </form>
<?


if ($GLOBALS['phpgw_info']['user']['apps']['admin']) {
	    echo "<a href=\"";
		echo $GLOBALS['phpgw']->link("/musiclib/updateDb.php");
		echo "\">Update Database</a>";
}
?>
</div>
</td>
<td valign=top>
<div class="content"><b>
<font size=4>Music Library</font></b>
</div></td></tr><tr valign=top><td><div class="content">
Return current item: Axis Groupware