copy from interface/web/sites/mail_blacklist_edit.php
copy to interface/lib/classes/getconf.inc.php
File was copied from interface/web/sites/mail_blacklist_edit.php |
| | |
| | | <?php
|
| | | |
| | | /*
|
| | | Copyright (c) 2005, Till Brehm, projektfarm Gmbh
|
| | | Copyright (c) 2006, Till Brehm, projektfarm Gmbh |
| | | All rights reserved.
|
| | |
|
| | | Redistribution and use in source and binary forms, with or without modification,
|
| | |
| | | EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
| | | */
|
| | |
|
| | | class getconf { |
| | |
|
| | | /******************************************
|
| | | * Begin Form configuration
|
| | | ******************************************/
|
| | | var $config; |
| | |
|
| | | $tform_def_file = "form/mail_blacklist.tform.php";
|
| | | function get_server_config($server_id, $section = '') { |
| | | global $app; |
| | |
|
| | | /******************************************
|
| | | * End Form configuration
|
| | | ******************************************/
|
| | |
|
| | | require_once('../../lib/config.inc.php');
|
| | | require_once('../../lib/app.inc.php');
|
| | |
|
| | | // Checking module permissions
|
| | | if(!stristr($_SESSION["s"]["user"]["modules"],$_SESSION["s"]["module"]["name"])) {
|
| | | header("Location: ../index.php");
|
| | | exit;
|
| | | if(!is_array($this->config[$server_id])) { |
| | | $app->uses('ini_parser'); |
| | | $server_id = intval($server_id); |
| | | $server = $app->db->queryOneRecord("SELECT config FROM server WHERE server_id = $server_id"); |
| | | $this->config[$server_id] = $app->ini_parser->parse_ini_string(stripslashes($server["config"])); |
| | | }
|
| | |
|
| | | // Loading classes
|
| | | $app->uses('tpl,tform,tform_actions');
|
| | | $app->tform_actions->onLoad();
|
| | | if($section == '') { |
| | | return $this->config[$server_id]; |
| | | } else { |
| | | return $this->config[$server_id][$section]; |
| | | } |
| | | } |
| | |
|
| | | function get_global_config() { |
| | | |
| | | die("not yet implemented"); |
| | | |
| | | } |
| | | |
| | | } |
| | |
|
| | | ?> |