Location: PHPKode > projects > Axis Groupware > musiclib/recent.php
<?
# recent.php
#
# Shows most recently added or modified Albums
#
$phpgw_info["flags"] = array ("currentapp" => "musiclib",
							 "enable_nextmatchs_class" => True);
$GLOBALS['phpgw_info']['cursor_focus'] = "document.defaultsearch.searchFor.focus();
										  document.defaultsearch.searchFor.select();";
 
include ("../header.inc.php"); #PHP Groupware header

include ("inc/config.inc.php");
include ("inc/functions.inc.php");
include ("inc/sidebar.inc.php");

if ($mode == 'album')
{
	$title = "Recently Added Albums";
}
else
{
	$title = "Recently Added Misc";
}

include ("inc/header.inc.php");

switch ($mode)
{
	case 'album':
        $query = construct_album_select("ORDER BY ".$musiclib['tables']['albums'].".id "
        								."DESC LIMIT ".$musiclib['config']['recent_albums']);
                
        echo "<b><font size=2>Last ".$musiclib['config']['recent_albums']
        	." albums added sorted newest to oldest:</font></b><BR><BR>\n";
        
        #echo $query;
        list_music('album','songs',$query, "no", "yes");
		break;
	case 'misc':
	
        $query = construct_song_select("WHERE repository=2 ORDER BY ".$musiclib['tables']['songs'].".id "
        								."DESC LIMIT ".$musiclib['config']['recent_misc']);
                
        echo "<b><font size=2>Last ".$musiclib['config']['recent_misc']
        	." albums added sorted newest to oldest:</font></b><BR><BR>\n";
        
        #echo $query;
        list_music('misc','songs',$query, "no", "yes");
		break;
	default:
}

#include ("inc/footer.inc.php");
?>
Return current item: Axis Groupware