diff options
author | Karl 'vollmerk' Vollmer <vollmer@ampache.org> | 2007-11-30 06:57:34 +0000 |
---|---|---|
committer | Karl 'vollmerk' Vollmer <vollmer@ampache.org> | 2007-11-30 06:57:34 +0000 |
commit | d14a08c618c8ea38b7fad26bee6fee51ea55b9c6 (patch) | |
tree | 131160370438508eb7b1faa2b84a506bdfbe7a55 | |
parent | a08a42eec0f419cf9db07fd155ecb0a661556656 (diff) | |
download | ampache-d14a08c618c8ea38b7fad26bee6fee51ea55b9c6.tar.gz ampache-d14a08c618c8ea38b7fad26bee6fee51ea55b9c6.tar.bz2 ampache-d14a08c618c8ea38b7fad26bee6fee51ea55b9c6.zip |
tweaked the denied page, made it a little prettier and added conditional note for demos
-rw-r--r-- | lib/ui.lib.php | 6 | ||||
-rw-r--r-- | templates/show_denied.inc.php | 49 |
2 files changed, 51 insertions, 4 deletions
diff --git a/lib/ui.lib.php b/lib/ui.lib.php index 9ab7650d..10924f08 100644 --- a/lib/ui.lib.php +++ b/lib/ui.lib.php @@ -88,10 +88,8 @@ if (!function_exists('_')) { */ function access_denied() { - echo "<br /><br /><br />"; - echo "<div class=\"fatalerror\">" . _("Error Access Denied") . "</div>\n"; - show_footer(); - exit(); + require_once Config::get('prefix') . '/templates/show_denied.inc.php'; + exit; } // access_denied diff --git a/templates/show_denied.inc.php b/templates/show_denied.inc.php new file mode 100644 index 00000000..fbd4bbab --- /dev/null +++ b/templates/show_denied.inc.php @@ -0,0 +1,49 @@ +<?php +/* + + Copyright (c) 2001 - 2007 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. + +*/ +?> +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "DTD/xhtml1-transitional.dtd"> +<html lang="en-US"> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> +<title>Ampache -- Debug Page</title> +</head> +<body bgcolor="#f0f0f0"> +<link rel="stylesheet" href="<?php echo Config::get('web_path'); ?>/templates/install.css" type="text/css" media="screen" /> +<div id="header"> +<h1>Ampache :: <?php echo _('Access Denied'); ?></h1> +<p>This Event has been logged</p> +</div> +<p class="error"> +<?php if (!Config::get('demo_mode')) { ?> +You've been redirected to this page because you do not have access to this function. If you believe this is an error please +contact an Ampache administrator. This event has been logged +<?php } else { ?> +You've been redirected to this page because you've attempted to access a function that is disabled in the demo. +Functions are disabled in the demo because previous users of the demo have used the functionality to post inappropriate materials +<?php } ?> +</p> +<div id="bottom"> +<p><b>Ampache</b><br /> +Pour l'Amour de la Musique.</p> +</div> +</body> +</html> |