summaryrefslogtreecommitdiffstats
path: root/admin/flags.php
diff options
context:
space:
mode:
authorKarl 'vollmerk' Vollmer <vollmer@ampache.org>2005-06-09 16:34:40 +0000
committerKarl 'vollmerk' Vollmer <vollmer@ampache.org>2005-06-09 16:34:40 +0000
commitbcad40a05ab2dc2a341a3227e30b96668bce4500 (patch)
tree6fca27588d53a1b24705bd2834e9e643bb729bd1 /admin/flags.php
downloadampache-bcad40a05ab2dc2a341a3227e30b96668bce4500.tar.gz
ampache-bcad40a05ab2dc2a341a3227e30b96668bce4500.tar.bz2
ampache-bcad40a05ab2dc2a341a3227e30b96668bce4500.zip
New Import
Diffstat (limited to 'admin/flags.php')
-rw-r--r--admin/flags.php91
1 files changed, 91 insertions, 0 deletions
diff --git a/admin/flags.php b/admin/flags.php
new file mode 100644
index 00000000..f7965d03
--- /dev/null
+++ b/admin/flags.php
@@ -0,0 +1,91 @@
+<?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 Flags Mojo
+*/
+
+require_once ("../modules/init.php");
+require_once( conf('prefix').'/lib/flag.php');
+
+if (!$user->has_access(100)) {
+ header ("Location: " . conf('web_path') . "/index.php?access=denied");
+ exit();
+}
+
+
+$action = scrub_in($_REQUEST['action']);
+show_template('header');
+
+show_menu_items('Admin');
+show_admin_menu('Users');
+
+switch ($action)
+{
+ case 'show':
+ $flags = get_flagged_songs();
+ show_flagged_songs($flags);
+ break;
+ case 'Set Flags':
+ case 'Update Flags':
+ $flags = scrub_in($_REQUEST['song']);
+ update_flags($flags);
+ $newflags = get_flagged_songs();
+ show_flagged_songs($newflags);
+ break;
+ case 'Edit Selected':
+ $flags = scrub_in($_REQUEST['song']);
+ $count = add_to_edit_queue($flags);
+ if($count) show_edit_flagged();
+ break;
+ case 'Next':
+ $song = scrub_in($_REQUEST['song']);
+ update_song_info($song);
+ show_edit_flagged();
+ // Pull song ids from an edit queue in $_SESSION,
+ // And edit them one at a time
+ break;
+ case 'Skip':
+ $count = add_to_edit_queue(scrub_in($_REQUEST['song']));
+ if($count) show_edit_flagged();
+ case 'Flag Songs':
+ break;
+ case 'Remove Flags':
+ break;
+ case 'Clear Edit List':
+ unset($_SESSION['edit_queue']);
+
+ case 'Done':
+ $song = scrub_in($_REQUEST['song']);
+ update_song_info($song);
+ default:
+ $flags = get_flagged_songs();
+ show_flagged_songs($flags);
+
+}
+
+show_footer();
+?>
+
+</body>
+</html>