summaryrefslogtreecommitdiffstats
path: root/localplay.php
diff options
context:
space:
mode:
authorKarl 'vollmerk' Vollmer <vollmer@ampache.org>2007-09-12 07:30:55 +0000
committerKarl 'vollmerk' Vollmer <vollmer@ampache.org>2007-09-12 07:30:55 +0000
commitbff9e37fa5fa41111b5b06ce6cdcb0eb8e5c21f9 (patch)
treef9f61787479b286e5ae5efb96447107c10dd553e /localplay.php
parentc99ad11ee04fa811aaf6988a2daa0567ab6ee0d8 (diff)
downloadampache-bff9e37fa5fa41111b5b06ce6cdcb0eb8e5c21f9.tar.gz
ampache-bff9e37fa5fa41111b5b06ce6cdcb0eb8e5c21f9.tar.bz2
ampache-bff9e37fa5fa41111b5b06ce6cdcb0eb8e5c21f9.zip
more work on the localplay stuff, most details ironed out, just needs some code to back it up, also tweaked plugins and threw in some extra goodies in the preference class, also pimped out the error class
Diffstat (limited to 'localplay.php')
-rw-r--r--localplay.php37
1 files changed, 10 insertions, 27 deletions
diff --git a/localplay.php b/localplay.php
index 06f081c7..4cc0b094 100644
--- a/localplay.php
+++ b/localplay.php
@@ -1,7 +1,7 @@
<?php
/*
- Copyright (c) 2001 - 2006 Ampache.org
+ Copyright (c) 2001 - 2007 Ampache.org
All rights reserved.
This program is free software; you can redistribute it and/or
@@ -19,28 +19,17 @@
*/
+require 'lib/init.php';
-require('lib/init.php');
-
-/* If we are running a demo, quick while you still can! */
-if (conf('demo_mode')) {
- exit();
-}
-
-$web_path = conf('web_path');
-
-if($GLOBALS['user']->prefs['localplay_level'] < 1) {
- access_denied();
- exit();
-}
-
-/* Scrub in the action */
-$action = scrub_in($_REQUEST['action']);
-
-show_template('header');
+show_header();
+switch ($_REQUEST['action']) {
+ case 'show_add_instance':
+ require_once Config::get('prefix') . '/templates/show_localplay_add_instance.inc.php';
+ break;
+ case 'add_instance':
-switch ($action) {
+ break;
case 'delete_song':
$song_id = scrub_in($_REQUEST['song_id']);
$songs = array($song_id);
@@ -70,13 +59,7 @@ switch ($action) {
require_once (conf('prefix') . '/templates/show_localplay.inc.php');
break;
default:
- if ($localplay = init_localplay()) {
- require_once (conf('prefix') . '/templates/show_localplay.inc.php');
- }
- else {
- $GLOBALS['error']->add_error('general',_('Localplay Init Failed'));
- $GLOBALS['error']->print_error('general');
- }
+ // Rien a faire?
break;
} // end switch action