summaryrefslogtreecommitdiffstats
path: root/admin
diff options
context:
space:
mode:
authorKarl 'vollmerk' Vollmer <vollmer@ampache.org>2006-06-17 16:32:04 +0000
committerKarl 'vollmerk' Vollmer <vollmer@ampache.org>2006-06-17 16:32:04 +0000
commite3734f063ed58356f9653a81f6dea86aa55931f4 (patch)
tree3aace945cfd5d8e988395170ff92ab75c0419819 /admin
parentc6c2320170b488f64f1c67de23a35f4ca4de59de (diff)
downloadampache-e3734f063ed58356f9653a81f6dea86aa55931f4.tar.gz
ampache-e3734f063ed58356f9653a81f6dea86aa55931f4.tar.bz2
ampache-e3734f063ed58356f9653a81f6dea86aa55931f4.zip
moved init.php improved vainfo a bit, removed checkboxes from search page
Diffstat (limited to 'admin')
-rw-r--r--admin/access.php12
-rw-r--r--admin/album.php114
-rw-r--r--admin/artist.php121
-rw-r--r--admin/catalog.php2
-rw-r--r--admin/duplicates.php5
-rw-r--r--admin/flag.php2
-rw-r--r--admin/flags.php4
-rw-r--r--admin/index.php2
-rw-r--r--admin/mail.php2
-rw-r--r--admin/modules.php2
-rw-r--r--admin/preferences.php2
-rw-r--r--admin/users.php2
12 files changed, 17 insertions, 253 deletions
diff --git a/admin/access.php b/admin/access.php
index f0fa7d9b..f9e3d2be 100644
--- a/admin/access.php
+++ b/admin/access.php
@@ -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,7 +20,7 @@
*/
-require('../modules/init.php');
+require('../lib/init.php');
/* Scrub in the Needed vars */
@@ -28,8 +28,8 @@ $action = scrub_in($_REQUEST['action']);
$access_id = scrub_in($_REQUEST['access_id']);
$access = new Access($access_id);
-if (!$user->has_access(100)) {
- header("Location: http://" . conf('web_path') . "/index.php?access=denied");
+if (!$GLOBALS['user']->has_access(100)) {
+ access_denied();
exit();
}
@@ -39,7 +39,7 @@ show_template('header');
switch ($action ) {
case 'show_confirm_delete':
- show_confirm_action(_('Do you really want to delete this Access Reocrd?'),'admin/access.php','access_id=' . scrub_out($_REQUEST['access_id']) . '&amp;action=delete_host');
+ show_confirmation(_('Confirm Delete'),_('Do you really want to delete this Access Record?'),'admin/access.php?access_id=' . scrub_out($_REQUEST['access_id']) . '&amp;action=delete_host','1');
break;
case 'delete_host':
$access->delete($_REQUEST['access_id']);
@@ -62,7 +62,7 @@ switch ($action ) {
default:
$list = array();
$list = $access->get_access_list();
- include(conf('prefix') ."/templates/show_access_list.inc");
+ include(conf('prefix') .'/templates/show_access_list.inc');
break;
} // end switch on action
show_footer();
diff --git a/admin/album.php b/admin/album.php
deleted file mode 100644
index 006f99f8..00000000
--- a/admin/album.php
+++ /dev/null
@@ -1,114 +0,0 @@
-<?php
-
-/*
-
- Copyright (c) 2004 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
- as published by the Free Software Foundation; either version 2
- of the License, or (at your option) any later version.
-
- 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.
-
-*/
-
-/*!
- @header Admin Album Mojo
- Update the album information for the site.
-
-*/
-
-require('../modules/init.php');
-
-
-if (!$user->has_access(100)) {
- header("Location:" . conf('web_path') . "/index.php?access=denied");
- exit();
-}
-
-
-if ( $action == 'Change Name' ) {
-
- update_album_name($album, $new_name);
-
- if ( $update_tag ) {
- // get songs associated with this
- $songs = get_songs_from_album($album);
-
- // run update_local_mp3
- $total_updated = update_local_mp3($new_name, 'album', $songs);
- $update_text = "Updated the database and $total_updated local files.";
- }
-
- // set the action to view so everybody can see the changes
- $action = 'View';
-}
-
-show_template('header');
-
-show_menu_items('Admin');
-show_admin_menu('Catalog');
-
-?>
-
-<p>Use this form to change the name(s) of albums in the database. In order to update your
-local MP3's your Apache user must have write-permission to your MP3's.</p>
-
-<form name="album" method="post" action="album.php">
-<table>
- <tr>
- <td>Select Album:</td>
- <td> <?php show_album_pulldown($album) ?> </td>
- <td> <input type=submit name=action value=View> </td>
- </tr>
-</table>
-</form>
-
-<hr>
-
-<?php
-
-// if album exists then show some info
-if ( $album and $action == 'View' ) {
- $album_name = get_album_name($album);
-
-?>
-
-<p style="color: red;"><?php echo $update_text; ?></p>
-
-<form name="album_change" method=post action="album.php">
- <table>
- <tr>
- <td>Album Name:</td>
- <td><input type=text name="new_name" value="<?php echo $album_name; ?>" size="50"></td>
- <td> &nbsp; </td>
- <td><input type=submit name=action value="Change Name"></td>
- <tr>
- <td> &nbsp; </td> <td><input type="checkbox" name="update_tag">
- Update MP3 tag <b>Note: this will only modify your local MP3's</b>
- </td>
- </tr>
- </table>
- <input type=hidden name=album value="<?php echo $album; ?>">
-</form>
-
-<?php
-
- $song_ids = get_song_ids_from_album($album);
- show_songs($song_ids, 0);
-}
-
-show_footer();
-?>
-
-</body>
-</html>
diff --git a/admin/artist.php b/admin/artist.php
deleted file mode 100644
index be473d8d..00000000
--- a/admin/artist.php
+++ /dev/null
@@ -1,121 +0,0 @@
-<?php
-
-/*
-
- Copyright (c) 2001 - 2005 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
- as published by the Free Software Foundation; either version 2
- of the License, or (at your option) any later version.
-
- 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.
-
-*/
-
-/*!
- @header Admin Artist page
- Update the artist information for the site.
-
-*/
-
-require('../modules/init.php');
-
-
-if (!$user->has_access(100)) {
- header("Location:". conf('web_path') . "/index.php?access=denied");
- exit();
-}
-
-$dbh = dbh();
-
-if ( $action == 'Change Name' ) {
- if ( $settings[demo_mode] == 'false' && $username != $settings[demo_user] ) {
- $old_artist_name = get_artist_name($artist);
- update_artist_name($artist, $new_name);
-
- if ( $update_tag ) {
- // get songs associated with this
- $song_ids = get_song_ids_from_artist($artist);
-
- // run update_local_mp3
- $total_updated = update_local_mp3($new_name, 'artist', $song_ids);
- $update_text = "Updated $old_artist_name to $new_name and $total_updated local files.";
- }
- else {
- $update_text = "Updated $old_artist_name to $new_name.";
- }
-
- // set the action to view so everybody can see the changes
- $action = 'View';
- }
-}
-
-show_template('header');
-
-show_menu_items("..");
-show_admin_menu('Catalog');
-
-?>
-
-<p>Use this form to change the name(s) of artists in the database. In order to update your
-local MP3's your Apache user must have write-permission to your MP3's.</p>
-
-<form name="artist" method="post" action="artist.php">
-<table>
- <tr>
- <td>Select Artist:</td>
- <td> <?php show_artist_pulldown($artist) ?> </td>
- <td> <input type=submit name=action value=View> </td>
- </tr>
-</table>
-</form>
-
-<hr>
-
-<?php
-
-// if artist exists then show some info
-if ( $artist and $action == 'View' ) {
- $sql = "SELECT name FROM artist WHERE id='$artist'";
- $db_result = mysql_query($sql, $dbh);
-
- $r = mysql_fetch_row($db_result);
- $artist_name = $r[0];
-
-?>
-
-<p style="color: red;"><?php echo $update_text; ?></p>
-
-<form name="artist_change" method=post action="artist.php">
- <table>
- <tr>
- <td>Artist Name:</td> <td><input type=text name="new_name" value="<?php echo $artist_name; ?>" size="50"></td>
- <td> &nbsp; </td> <td><input type=submit name=action value="Change Name"></td>
- </tr>
- <tr>
- <td> &nbsp; </td> <td><input type="checkbox" name="update_tag">
- Update MP3 tag <b>Note: this will only modify your local MP3's</b>
- </td>
- </tr>
- </table>
- <input type="hidden" name="artist" value="<?php echo $artist; ?>">
-</form>
-
-<?php
-
- show_albums_for_artist($artist);
-}
-
-?>
-
-</body>
-</html>
diff --git a/admin/catalog.php b/admin/catalog.php
index 54fac154..1327e188 100644
--- a/admin/catalog.php
+++ b/admin/catalog.php
@@ -26,7 +26,7 @@
This document handles actions for catalog creation and passes them off to the catalog class
*/
-require('../modules/init.php');
+require('../lib/init.php');
if (!$GLOBALS['user']->has_access(100)) {
access_denied();
diff --git a/admin/duplicates.php b/admin/duplicates.php
index 2680e05e..d0167bbb 100644
--- a/admin/duplicates.php
+++ b/admin/duplicates.php
@@ -1,8 +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
@@ -24,7 +23,7 @@
// Allows users to search for duplicate songs in their catalogs
-require_once ("../modules/init.php");
+require_once ('../lib/init.php');
require_once( conf('prefix').'/lib/duplicates.php');
diff --git a/admin/flag.php b/admin/flag.php
index 695d90d0..e8416b6f 100644
--- a/admin/flag.php
+++ b/admin/flag.php
@@ -26,7 +26,7 @@
* flagging.
*/
-require('../modules/init.php');
+require('../lib/init.php');
if (!$GLOBALS['user']->has_access('100')) {
access_denied();
diff --git a/admin/flags.php b/admin/flags.php
index 3f47cc44..fffc0e5c 100644
--- a/admin/flags.php
+++ b/admin/flags.php
@@ -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
@@ -25,7 +25,7 @@
@header Flags Mojo
*/
-require_once ("../modules/init.php");
+require_once ("../lib/init.php");
require_once( conf('prefix').'/lib/flag.php');
if (!$user->has_access(100)) {
diff --git a/admin/index.php b/admin/index.php
index 0fcbec54..6217ef0f 100644
--- a/admin/index.php
+++ b/admin/index.php
@@ -20,7 +20,7 @@
*/
-require ('../modules/init.php');
+require ('../lib/init.php');
$action = scrub_in($_REQUEST['action']);
diff --git a/admin/mail.php b/admin/mail.php
index df717780..a71669e7 100644
--- a/admin/mail.php
+++ b/admin/mail.php
@@ -20,7 +20,7 @@
*/
-require('../modules/init.php');
+require('../lib/init.php');
if (!$GLOBALS['user']->has_access(100)) {
access_denied();
diff --git a/admin/modules.php b/admin/modules.php
index 0678ff7c..5dde981c 100644
--- a/admin/modules.php
+++ b/admin/modules.php
@@ -20,7 +20,7 @@
*/
-require('../modules/init.php');
+require('../lib/init.php');
if (!$GLOBALS['user']->has_access(100)) {
access_denied();
diff --git a/admin/preferences.php b/admin/preferences.php
index ea3175fc..94f940f3 100644
--- a/admin/preferences.php
+++ b/admin/preferences.php
@@ -29,7 +29,7 @@
* @author Karl Vollmer
*/
-require('../modules/init.php');
+require('../lib/init.php');
if (!$user->has_access(100)) {
diff --git a/admin/users.php b/admin/users.php
index e2fdcbee..3a8c132c 100644
--- a/admin/users.php
+++ b/admin/users.php
@@ -27,7 +27,7 @@
*/
-require_once ("../modules/init.php");
+require_once ('../lib/init.php');
if (!$user->has_access(100)) {
access_denied();