Improved performance of code set searching in Administration->Services
[openemr.git] / gacl / admin / gacl_admin.inc.php
blob66e590075cf98ef702628cbd285b9404e7fa8d65
1 <?php
2 /*
3 * phpGACL - Generic Access Control List
4 * Copyright (C) 2002 Mike Benoit
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
11 * This library 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 GNU
14 * Lesser General Public License for more details.
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 * For questions, help, comments, discussion, etc., please join the
21 * phpGACL mailing list. http://sourceforge.net/mail/?group_id=57103
23 * You may contact the author of phpGACL by e-mail at:
24 * ipso@snappymail.ca
26 * The latest version of phpGACL can be obtained from:
27 * http://phpgacl.sourceforge.net/
31 require_once(dirname(__FILE__).'/../gacl.class.php');
32 require_once(dirname(__FILE__).'/../gacl_api.class.php');
33 require_once(dirname(__FILE__).'/gacl_admin_api.class.php');
35 // phpGACL Configuration file.
36 if ( !isset($config_file) ) {
37 # $config_file = '../gacl.ini.php';
38 $config_file = dirname(__FILE__).'/../gacl.ini.php';
41 //Values supplied in $gacl_options array overwrite those in the config file.
42 if ( file_exists($config_file) ) {
43 $config = parse_ini_file($config_file);
45 if ( is_array($config) ) {
46 if ( isset($gacl_options) ) {
47 $gacl_options = array_merge($config, $gacl_options);
48 } else {
49 $gacl_options = $config;
52 unset($config);
55 $gacl_api = new gacl_admin_api($gacl_options);
57 $gacl = &$gacl_api;
59 $db = &$gacl->db;
61 //Setup the Smarty Class.
62 require_once($gacl_options['smarty_dir'].'/Smarty.class.php');
64 $smarty = new Smarty;
65 $smarty->compile_check = TRUE;
66 $smarty->template_dir = $gacl_options['smarty_template_dir'];
67 $smarty->compile_dir = $gacl_options['smarty_compile_dir'];
70 * Email address used in setup.php, please do not change.
72 $author_email = 'ipso@snappymail.ca';
75 * Don't need to show notices, some of them are pretty lame and people get overly worried when they see them.
76 * Mean while I will try to fix most of these. ;) Please submit patches if you find any I may have missed.
78 error_reporting (E_ALL ^ E_NOTICE);