Advertisement
Guest User

ampache's test.php

a guest
May 9th, 2010
207
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.89 KB | None | 0 0
  1. <?php
  2. /*
  3.  
  4.  Copyright Ampache.org
  5.  All Rights Reserved
  6.  
  7.  This program is free software; you can redistribute it and/or
  8.  modify it under the terms of the GNU General Public License v2
  9.  as published by the Free Software Foundation.
  10.  
  11.  This program is distributed in the hope that it will be useful,
  12.  but WITHOUT ANY WARRANTY; without even the implied warranty of
  13.  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  14.  GNU General Public License for more details.
  15.  
  16.  You should have received a copy of the GNU General Public License
  17.  along with this program; if not, write to the Free Software
  18.  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
  19.  
  20. */
  21.  
  22. error_reporting(0);
  23.  
  24. $prefix = dirname(__FILE__);
  25. $configfile = "$prefix/config/ampache.cfg.php";
  26. $row_classes = array('even','odd');
  27.  
  28. define('INIT_LOADED','1');
  29.  
  30. require_once $prefix . '/lib/general.lib.php';
  31. require_once $prefix . '/lib/log.lib.php';
  32. require_once $prefix . '/lib/class/config.class.php';
  33. require_once $prefix . '/lib/class/dba.class.php';
  34. require_once $prefix . '/lib/ui.lib.php';
  35. require_once $prefix . '/lib/class/error.class.php';
  36. require_once $prefix . '/lib/class/config.class.php';
  37. require_once $prefix . '/lib/debug.lib.php';
  38.  
  39. Dba::_auto_init();
  40.  
  41. switch ($_REQUEST['action']) {
  42.         case 'config':
  43.                 $configfile = "$prefix/config/ampache.cfg.php";
  44.  
  45.                 // On every load of the config file check and see if it's working now
  46.                 if (count(parse_ini_file($configfile))) {
  47.                         require_once $prefix . '/templates/show_test.inc.php';
  48.                         break;
  49.                 }
  50.                 require_once $prefix . '/templates/show_test_config.inc.php';
  51.         break;
  52.         default:
  53.                 require_once $prefix . '/templates/show_test.inc.php';
  54.         break;
  55. } // end switch on action
  56.  
  57. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement