11<?php
22/*
3- Copyright (c) 2007 , Till Brehm, Falko Timme, projektfarm Gmbh
3+ Copyright (c) 2008 , Till Brehm, Falko Timme, projektfarm Gmbh
44All rights reserved.
55
66Redistribution and use in source and binary forms, with or without modification,
2727EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2828*/
2929
30- error_reporting (E_ALL |E_NOTICE );
30+ //** Web-only
31+ if ( !empty ($ _SERVER ['DOCUMENT_ROOT ' ]) ) {
3132
32- header ('Pragma: no-cache ' );
33- header ('Cache-Control: no-store, no-cache, max-age=0, must-revalidate ' );
34- header ('Content-Type: text/html; charset=utf-8 ' );
35- //* TODO: Js caching - pedro
33+ Header ("Pragma: no-cache " );
34+ Header ("Cache-Control: no-store, no-cache, max-age=0, must-revalidate " );
35+ Header ("Content-Type: text/html " );
36+
37+ ini_set ('register_globals ' ,0 );
38+ }
39+
40+ $ conf ["app_title " ] = "ISPConfig " ;
41+ $ conf ["app_version " ] = "3.0.0 " ;
42+ $ conf ["modules_available " ] = "admin,mail,sites,monitor,client,dns " ;
43+ $ conf ["interface_logout_url " ] = "" ;
3644
3745//** Key paramaters
3846define ('ISPC_APP_TITLE ' , 'ISPConfig ' );
5159define ('ISPC_WEB_TEMP_PATH ' , ISPC_WEB_PATH .'/temp ' ); // Path for downloads, accessible via browser
5260define ('ISPC_CACHE_PATH ' , ISPC_ROOT_PATH .'/cache ' );
5361
62+ //** Interface settings
5463define ('ISPC_INTERFACE_MODULES_ENABLED ' , 'mail,sites,dns,tools ' );
5564
56- //********************************************************************************
57- //** Future Code idea - pedro - rfc
58- //** >>>>
59- /* Database connection
60- The only time paramaters are needed is to connect, otherwise the variables
61- are not required "around" the application. ie Connected and done.
62- Prefered is an array as $DB in capitals, ie
63- $DB['engine'] = 'type';
64- $DB['host'] = 'ip';
65- $DB['user'] = 'me';
66- $DB['password'] = 'secret';
67- $DB['database'] = 'db_name';
68-
69- The connection paramaters are all contained within one array structure
70- With this array structure the connection can be passed around, to functions
71- However it can also leak so it can be destroyed eg
72- $dbClass->connect($DB);
73- unset($DB); // only the paranoid survive
74-
75- Also there is a scenario where we are devloping and using this file
76- and the database paramaters might leak into svn etc.
77- (This idea is borrowed from the tikiwiki.org project)
78- To resolve this there is a file called db_local.php.skel which is not detected
79- rename this to db_local.php and edit the paramaters.
65+
66+ /*
67+ Server variables
8068*/
8169
82- //* Detect the local database settings ie $DB array()
83- //* Copy db_local.php.skel for and change for local development
84- if (file_exists (dirname (__FILE__ ).'/db_local.php ' )){
85- require_once (dirname (__FILE__ ).'/db_local.php ' );
86- $ conf ['db_type ' ] = $ DB ['type ' ];
87- $ conf ['db_host ' ] = $ DB ['host ' ];
88- $ conf ['db_user ' ] = $ DB ['user ' ];
89- $ conf ['db_password ' ] = $ DB ['password ' ];
90- $ conf ['db_database ' ] = $ DB ['database ' ];
91- }else {
92- //** Database Settings
93- $ conf ['db_type ' ] = 'mysql ' ;
94- $ conf ['db_host ' ] = 'localhost ' ;
95- $ conf ['db_user ' ] = 'root ' ;
96- $ conf ['db_password ' ] = '' ;
97- $ conf ['db_database ' ] = 'ispconfig3 ' ;
98- }
70+ $ conf ["server_id " ] = "{server_id} " ;
71+
9972
100- //** Database Settings
101- /* See above
102- $conf['db_type'] = 'mysql';
103- $conf['db_host'] = 'localhost';
104- $conf['db_user'] = 'root';
105- $conf['db_password'] = '';
106- $conf['db_database'] = 'ispconfig3';
73+ /*
74+ Database Settings
10775*/
10876
77+ $ conf ["db_type " ] = 'mysql ' ;
78+ $ conf ["db_host " ] = 'localhost ' ;
79+ $ conf ["db_database " ] = 'dbispconfig ' ;
80+ $ conf ["db_user " ] = 'ispconfig ' ;
81+ $ conf ["db_password " ] = 'e8605b27a4360d135f62129627d8d9ad ' ;
10982
11083
111- //** External programs
112- //$conf["programs"]["convert"] = "/usr/bin/convert";
113- $ conf ['programs ' ]['wput ' ] = ISPC_ROOT_PATH ."\\tools \\wput \\wput.exe " ;
84+ /*
85+ Path Settings (Do not change!)
86+ */
87+
88+ $ conf ["rootpath " ] = substr (dirname (__FILE__ ),0 ,-4 );
89+ $ conf ["fs_div " ] = "/ " ; // File system divider, \\ on windows and / on linux and unix
90+ $ conf ["classpath " ] = $ conf ["rootpath " ].$ conf ["fs_div " ]."lib " .$ conf ["fs_div " ]."classes " ;
91+ $ conf ["temppath " ] = $ conf ["rootpath " ].$ conf ["fs_div " ]."temp " ;
11492
11593
116- //** Themes
117- $ conf ['theme ' ] = 'default ' ;
118- $ conf ['html_content_encoding ' ] = 'text/html; charset=utf-8 ' ;
94+ define ("DIR_TRENNER " ,$ conf ["fs_div " ]);
95+ define ("SERVER_ROOT " ,$ conf ["rootpath " ]);
96+ define ("INCLUDE_ROOT " ,SERVER_ROOT .DIR_TRENNER ."lib " );
97+ define ("CLASSES_ROOT " ,INCLUDE_ROOT .DIR_TRENNER ."classes " );
11998
120- //** Default Language
121- $ conf ['language ' ] = 'en ' ;
99+ define ("DB_TYPE " ,$ conf ["db_type " ]);
100+ define ("DB_HOST " ,$ conf ["db_host " ]);
101+ define ("DB_DATABASE " ,$ conf ["db_database " ]);
102+ define ("DB_USER " ,$ conf ["db_user " ]);
103+ define ("DB_PASSWORD " ,$ conf ["db_password " ]);
104+
105+ /*
106+ Logging
107+ */
122108
123- //** Auto Load Modules
124- $ conf ['start_db ' ] = true ;
125- $ conf ['start_session ' ] = true ;
109+ $ conf ["log_file " ] = '/var/log/ispconfig/ispconfig.log ' ;
110+ $ conf ["log_priority " ] = 2 ; // 0 = Debug, 1 = Warning, 2 = Error
111+
112+ /*
113+ Allow software package installations
114+ */
115+
116+ $ conf ['software_updates_enabled ' ] = false ;
117+
118+
119+ /*
120+ Themes
121+ */
122+
123+ $ conf ["theme " ] = 'default ' ;
124+ $ conf ["html_content_encoding " ] = 'text/html; charset=iso-8859-1 ' ;
125+ $ conf ["logo " ] = 'themes/default/images/mydnsconfig_logo.gif ' ;
126+
127+ /*
128+ Default Language
129+ */
130+
131+ $ conf ["language " ] = 'en ' ;
126132
127133/*
128134 Misc.
131137$ conf ["interface_logout_url " ] = "" ; // example: http://www.domain.tld/
132138
133139
134- //** DNS Settings
140+ /*
141+ Auto Load Modules
142+ */
143+
144+ $ conf ["start_db " ] = true ;
145+ $ conf ["start_session " ] = true ;
146+
147+ /*
148+ Constants
149+ */
135150
136- //* Automatically create PTR records?
137- $ conf ['auto_create_ptr ' ] = 1 ;
138- //* must be set if $conf['auto_create_ptr'] is 1. Don't forget the trailing dot!
139- $ conf ['default_ns ' ] = 'ns1.example.com. ' ;
140- //* Admin email address. Must be set if $conf['auto_create_ptr'] is 1. Replace "@" with ".". Don't forget the trailing dot!
141- $ conf ['default_mbox ' ] = 'admin.example.com. ' ;
142- $ conf ['default_ttl ' ] = 86400 ;
143- $ conf ['default_refresh ' ] = 28800 ;
144- $ conf ['default_retry ' ] = 7200 ;
145- $ conf ['default_expire ' ] = 604800 ;
146- $ conf ['default_minimum_ttl ' ] = 86400 ;
151+ define ("LOGLEVEL_DEBUG " ,0 );
152+ define ("LOGLEVEL_WARN " ,1 );
153+ define ("LOGLEVEL_ERROR " ,2 );
147154
148155?>
0 commit comments