diff options
author | Karl 'vollmerk' Vollmer <vollmer@ampache.org> | 2007-12-10 06:03:47 +0000 |
---|---|---|
committer | Karl 'vollmerk' Vollmer <vollmer@ampache.org> | 2007-12-10 06:03:47 +0000 |
commit | 46ffeca144b7ef44572a5805061da246c8be5f3c (patch) | |
tree | 2b338376bb6e4a77839607131c22f20e6a59cb8d /templates | |
parent | 0d2c89e90d7c64eba058ae375760a350d336578b (diff) | |
download | ampache-46ffeca144b7ef44572a5805061da246c8be5f3c.tar.gz ampache-46ffeca144b7ef44572a5805061da246c8be5f3c.tar.bz2 ampache-46ffeca144b7ef44572a5805061da246c8be5f3c.zip |
database update, cleaned up some stuff
Diffstat (limited to 'templates')
-rw-r--r-- | templates/show_index.inc.php | 19 | ||||
-rw-r--r-- | templates/show_objects.inc.php | 3 | ||||
-rw-r--r-- | templates/show_stats_newest.inc.php | 41 | ||||
-rw-r--r-- | templates/show_stats_popular.inc.php | 42 |
4 files changed, 85 insertions, 20 deletions
diff --git a/templates/show_index.inc.php b/templates/show_index.inc.php index 4ff0055f..3e656024 100644 --- a/templates/show_index.inc.php +++ b/templates/show_index.inc.php @@ -43,22 +43,3 @@ if (isset($_REQUEST['xspf']) && isset ($_REQUEST['play_info'])){ show_box_bottom(); ?> </div> -<div id="recent_added"> - <?php - $objects = Stats::get_newest('album'); - $headers = array('f_link'=>_('Newest Albums')); - show_box_top('','info-box box_newest_albums'); - require Config::get('prefix') . '/templates/show_objects.inc.php'; - show_box_bottom(); - $objects = Stats::get_newest('artist'); - $headers = array('f_name_link'=>_('Newest Artists')); - show_box_top('','info-box box_newest_artists'); - require Config::get('prefix') . '/templates/show_objects.inc.php'; - show_box_bottom(); - $objects = Stats::get_newest('genre'); - $headers = array('f_link'=>_('Newest Genres')); - show_box_top('','info-box box_newest_genres'); - require Config::get('prefix') . '/templates/show_objects.inc.php'; - show_box_bottom(); - ?> -</div> diff --git a/templates/show_objects.inc.php b/templates/show_objects.inc.php index 4ebaa1f2..728c376f 100644 --- a/templates/show_objects.inc.php +++ b/templates/show_objects.inc.php @@ -22,11 +22,12 @@ /* * Variable/Non-DB object display takes headers & objects */ + ?> <table class="tabledata" cellspacing="0"> <tr> <?php foreach ($headers as $header) { ?> - <th class="th-top"><?php echo scrub_out($header); ?></th> + <th class="th-top"><?php echo $header; ?></th> <?php } ?> </tr> <?php diff --git a/templates/show_stats_newest.inc.php b/templates/show_stats_newest.inc.php new file mode 100644 index 00000000..c547198d --- /dev/null +++ b/templates/show_stats_newest.inc.php @@ -0,0 +1,41 @@ +<?php +/* + + Copyright (c) 2001 - 2007 Ampache.org + All rights reserved. + + This program is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public License v2 + as published by the Free Software Foundation. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + +*/ +?> +<div id="recent_added"> + <?php + $objects = Stats::get_newest('album'); + $headers = array('f_link'=>_('Newest Albums')); + show_box_top('','info-box box_newest_albums'); + require Config::get('prefix') . '/templates/show_objects.inc.php'; + show_box_bottom(); + $objects = Stats::get_newest('artist'); + $headers = array('f_name_link'=>_('Newest Artists')); + show_box_top('','info-box box_newest_artists'); + require Config::get('prefix') . '/templates/show_objects.inc.php'; + show_box_bottom(); + $objects = Stats::get_newest('genre'); + $headers = array('f_link'=>_('Newest Genres')); + show_box_top('','info-box box_newest_genres'); + require Config::get('prefix') . '/templates/show_objects.inc.php'; + show_box_bottom(); + ?> +</div> + diff --git a/templates/show_stats_popular.inc.php b/templates/show_stats_popular.inc.php new file mode 100644 index 00000000..648945a9 --- /dev/null +++ b/templates/show_stats_popular.inc.php @@ -0,0 +1,42 @@ +<?php +/* + + Copyright (c) 2001 - 2007 Ampache.org + All rights reserved. + + This program is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public License v2 + as published by the Free Software Foundation. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + +*/ +?> +<div> +<?php + $objects = Stats::get_top('album'); + $headers = array('f_link'=>_('Most Popular Albums')); + show_box_top('','info-box box_popular_albums'); + require Config::get('prefix') . '/templates/show_objects.inc.php'; + show_box_bottom(); + + $objects = Stats::get_top('artist'); + $headers = array('f_name_link'=>_('Most Popular Artists')); + show_box_top('','info-box box_popular_artists'); + require Config::get('prefix') . '/templates/show_objects.inc.php'; + show_box_bottom(); + + $objects = Stats::get_top('genre'); + $headers = array('f_link'=>_('Most Popular Genres')); + show_box_top('','info-box box_popular_genres'); + require Config::get('prefix') . '/templates/show_objects.inc.php'; + show_box_bottom(); +?> +</div> |