1
0
Fork 0
mirror of https://github.com/Yetangitu/ampache synced 2025-10-05 19:41:55 +02:00

catalog clean up and admin index changes

This commit is contained in:
Karl 'vollmerk' Vollmer 2006-03-20 01:55:03 +00:00
parent b99e8307ac
commit eda7fd335c
12 changed files with 379 additions and 367 deletions

View file

@ -1,7 +1,7 @@
<?php
/*
Copyright (c) 2001 - 2005 Ampache.org
Copyright (c) 2001 - 2006 Ampache.org
All rights reserved.
This program is free software; you can redistribute it and/or
@ -20,59 +20,31 @@
*/
/*!
@header Admin Index
Do most of the dirty work of displaying the mp3 catalog
*/
require ("../modules/init.php");
require ('../modules/init.php');
$action = scrub_in($_REQUEST['action']);
if (!$user->has_access(100)) {
header ("Location: " . conf('web_path') . "/index.php?access=denied");
if (!$GLOBALS['user']->has_access(100)) {
access_denied();
exit();
}
// let's set the preferences here so that they take affect on the fly
if ( $action == 'Update Preferences' ) {
update_site_preferences($preferences_id, 'true', $new_m_host, $new_w_host,
$new_site_title, $new_login_message, $new_session_lifetime, $new_font,
$new_background_color, $new_primary_color, $new_secondary_color,
$new_primary_font_color, $new_secondary_font_color,
$new_error_color, $new_popular_threshold);
// reload the preferences now
set_preferences();
}
show_template('header');
if ( $action == 'Update Preferences' ) {
$action = 'show_preferences';
}
elseif ( $action == 'show_update_catalog' ) {
show_update_catalog();
}
elseif ( $action == 'show_file_manager' ) {
show_file_manager();
}
elseif ( $action == 'show_site_preferences' ) {
$user = new User(0);
require (conf('prefix') . "/templates/show_preferences.inc");
}
elseif ( $action == 'show_preferences' ) {
$user = new User($_REQUEST['user_id']);
require (conf('prefix') . "/templates/show_preferences.inc");
}
elseif ( $action == 'show_orphaned_files' ) {
show_orphaned_files();
}
else {
show_clear();
require (conf('prefix') . "/templates/show_admin_index.inc");
} // if they didn't pick anything
show_footer();
?>
<!-- Big Daddy Table -->
<table>
<tr>
<!-- Needs Attention Cell -->
<td rowspan="2" valign="top" width="50%">
<?php require (conf('prefix') . '/templates/show_admin_info.inc.php'); ?>
</td>
<!-- Catalog Cell -->
<td width="50%"><?php require (conf('prefix') . '/templates/show_admin_catalog.inc.php'); ?></td>
</tr>
<tr>
<!-- Users Cell -->
<td><?php require (conf('prefix') . '/templates/show_admin_user.inc.php'); ?></td>
</tr>
</table>
<?php show_footer(); ?>