diff options
author | Karl 'vollmerk' Vollmer <vollmer@ampache.org> | 2006-01-15 06:27:55 +0000 |
---|---|---|
committer | Karl 'vollmerk' Vollmer <vollmer@ampache.org> | 2006-01-15 06:27:55 +0000 |
commit | 2d5ed879bd17024154e87de22c811bbfd0e69433 (patch) | |
tree | fbc39798312d1799510cc5ef0f103ebb554e3776 /flag.php | |
parent | e3e529394d526608e3ebeadb69234120f0f300ed (diff) | |
download | ampache-2d5ed879bd17024154e87de22c811bbfd0e69433.tar.gz ampache-2d5ed879bd17024154e87de22c811bbfd0e69433.tar.bz2 ampache-2d5ed879bd17024154e87de22c811bbfd0e69433.zip |
more flagging fixes, you can flag files now you just cant do anything about it
Diffstat (limited to 'flag.php')
-rw-r--r-- | flag.php | 53 |
1 files changed, 32 insertions, 21 deletions
@@ -20,32 +20,43 @@ */ -/* - - This will allow users to flag songs for having broken tags or bad rips. +/** + * Flag Document + * This is called for all of our flagging needs + */ -*/ -require_once("modules/init.php"); - -$action = scrub_in($_REQUEST['action']); -$song = scrub_in($_REQUEST['song']); - -if ( $action == 'flag_song') { - $flagged_type = scrub_in($_REQUEST['flagged_type']); - $comment = scrub_in($_REQUEST['comment']); - insert_flagged_song($song, $flagged_type, $comment); - $flag_text = _("Flagging song completed."); - $action = 'flag'; -} +require_once('modules/init.php'); show_template('header'); -if ( $action == 'flag' ) { - $type = 'show_flagged_form'; - $song_id = $song; - include(conf('prefix') . "/templates/flag.inc"); -} +$action = scrub_in($_REQUEST['action']); +$flag = new Flag($_REQUEST['flag_id']); + +/* Switch on the action */ +switch ($action) { + case 'remove_flag': + break; + case 'flag': + $id = scrub_in($_REQUEST['id']); + $type = scrub_in($_REQUEST['type']); + $flag_type = scrub_in($_REQUEST['flag_type']); + $comment = scrub_in($_REQUEST['comment']); + $flag->add($id,$type,$flag_type,$comment); + show_confirmation(_('Item Flagged'),_('The specified item has been flagged'),$_SESSION['source_page']); + break; + case 'show_flag': + /* Store where they came from */ + $_SESSION['source_page'] = return_referer(); + include(conf('prefix') . '/templates/show_flag.inc.php'); + break; + case 'show_remove_flag': + + break; + default: + + break; +} // end action switch show_footer(); ?> |