/* Enjoy!!! Dino Ciuffetti - dam2k@users.sourceforge.net
*
*
* 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; version 2 of the License.
*
* 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 (COPYING); if not, go to http://www.fsf.org/ or write
* to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
* MA 02111-1307, USA.
*
*/
/* HTTP RELATIVES */
/**
* This class is used internally by cmsdam classes, but if you need it you can use it from your templates.
* It's used to get all the configuration parameters and the sections super arrays. You shouldn't change
* any of that parameters from your sections, you are advised.
* Class instance: $cms->conf
* @author dAm2K (Dino Ciuffetti) <dam2k@users.sourceforge.net>
*/
class cmsdam_conf
{
var $general;
/**
* This array contains all the section names.
* @type array
*/
var $Section_arr;
/**
* This array contains section langs for each section.
* @type array
*/
var $Section_langs_arr;
/**
* This array contains section creation date for each section.
* @type array
*/
var $Section_cr_date_arr;
/**
* This array contains section creation user for each section.
* @type array
*/
var $Section_cr_user_arr;
/**
* This array contains the list of users that can view each section, comma separed.
* @type array
*/
var $Section_users_arr;
/**
* This array contains the list of groups that can view each section, comma separed.
* @type array
*/
var $Section_groups_arr;
/**
* This array contains all the granted users for each section.
* @type array
*/
var $Search_users_arr;
/**
* This array contains all the granted groups for each section.
* @type array
*/
var $Search_groups_arr;
/**
* This array contains all the section files for each language.
* @type array
*/
var $Section_template_arr;
/**
* This array contains all the section files.
* @type array
*/
var $Section_file_arr;
/**
* This array contains all the section short descriptions for each language.
* @type array
*/
var $Section_langs_Shortdesc_arr;
/**
* This array contains all the section short descriptions.
* @type array
*/
var $Shortdescription_arr;
/**
* This array contains all the section long descriptions for each language.
* @type array
*/
var $Section_langs_Longdesc_arr;
/**
* This array contains all the section long descriptions.
* @type array
*/
var $Longdescription_arr;
// Configurations
/**
* This is the database host name.
* @type str
*/
var $DB_servername;
/**
* This is the database name.
* @type str
*/
var $DB_name;
/**
* This is the database user name.
* @type str
*/
var $DB_username;
/**
* This is the database password.
* @type str
*/
var $DB_password;
/**
* This is the database table prefix for cmsdam.
* This is useful, for example, if your provider give you only a database and you have to
* share it with other applications.
* @type str
*/
var $DB_tbl_prefix;
/**
* This is the database type, for now it can be mysql or postgres.
* @type str
*/
var $DB_type;
/**
* This is to turn debug on, it should be only YES or NO.
* @type str
*/
var $LOG_debug;
/**
* Contains the path, absolute or relative to cmsdam directory for cmsdam loging.
* @type str
*/
var $LOG_path;
/**
* This is the cmsdam log filename. It is relative to the $LOG_debug directory.
* @type str
*/
var $LOG_file;
/**
* Logging level, from 0 (no logging) to 10 (high logging). Don't set this too high
* in production environment!! Logfile will grow very very quickly and you
* could shut down performance on sites with large number of users or templates.
* @type int
*/
var $LOG_level;
/**
* Debugging level, from 0 (no debugging) to 10 (high debugging).
* You can consider to turn debugging OFF in production environments!! Please consider that
* even with LOG_debuglevel set very low, you can have an exeption that write a debug line
* to your template, and that's not so beautiful in production environments!
* @type int
*/
var $LOG_debuglevel;
/**
* This string is the web site title (<title> HTML tag).
* @type str
*/
var $site_title;
/**
* This string is the web site META description. They are used by some web robot,
* search engine, and so on.
* @type str
*/
var $HTML_Meta_description;
/**
* This string is the web site META keywords. They are used by some web robot,
* search engine, and so on.
* @type str
*/
var $HTML_Meta_keywords;
/**
* This string is the web site META author. They are used by some web robot,
* search engine, and so on.
* @type str
*/
var $HTML_Meta_author;
/**
* This string is the web site META revisit after. They are used by some web robot,
* search engine, and so on.
* @type str
*/
var $HTML_Meta_revisit;
/**
* This string is the HTTP max-age header. Needed by cache peers to get the page expiration time
* in seconds.
* @type str
*/
var $HTTP_maxage;
/**
* This string is the HTTP content-type header (text formatting). Needed by http clients to use the proper
* mime based handler. The default is text/html, change it only if you know what you are doing.
* @type str
*/
var $HTTP_contenttype;
/**
* This string is the HTTP charset encoding header (text formatting). Needed by http clients to use
* the proper page formatting charset. The default is iso-8859-1, change it according to your
* default charset. A valid alternative would be UTF-8 encoding.
* @type str
*/
var $HTTP_charset;
/**
* CMS mail administrator, default "From: " address for mails sent from cmsdam.
* You can specify the From: address using the cmsdam_mails class, but if you don't specify it
* this is the default value used.
* @type str
*/
var $cmsdam_admin_email;
/**
* cmsdAm software description. This is a constant defined in index.php, you cannot modify it!
* @type constant
*/
var $cmsdam_description;
/**
* cmsdAm software version. You cannot modify it!
* @type constant
*/
var $cmsdam_version;
/**
* cmsdAm software version state. You cannot modify it!
* @type constant
*/
var $cmsdam_verstate;
/**
* cmsdAm software long description string. This is a constant defined in index.php, you cannot modify it!
* @type constant
*/
var $cmsdam_longversion;
/**
* This is the PHP time_limit parameter, time in seconds for a PHP page timeout.
* @type int
*/
var $PHP_time_limit;
/**
* PHP Warnings on section include
*/
var $PHPWarn_on_sectioninclude;
/**
* LDAP server name. 'null` if you don't want to use LDAP.
* NOTE: LDAP SUPPORT IS READ ONLY FOR NOW!! You must add users and group in LDAP by yourself.
* Cmsdam will never touch LDAP directory!
* @type str
*/
var $LDAP_servername;
/**
* LDAP base DN, the ldap base branch to search from.
* NOTE: LDAP SUPPORT IS READ ONLY FOR NOW!! You must add users and group in LDAP by yourself.
* Cmsdam will never touch LDAP directory!
* @type str
*/
var $LDAP_basedn;
/**
* LDAP root DN, the ldap administrator DN.
* If you want cmsdam do anonymous bind (it can run with this, check for LDAP server limits first!)
* leave it blank.
* NOTE: LDAP SUPPORT IS READ ONLY FOR NOW!! You must add users and group in LDAP by yourself.
* Cmsdam will never touch LDAP directory!
* @type str
*/
var $LDAP_rootdn;
/**
* LDAP root DN password, the ldap administrator DN password.
* Leave it blank with anonymous bind.
* NOTE: LDAP SUPPORT IS READ ONLY FOR NOW!! You must add users and group in LDAP by yourself.
* Cmsdam will never touch LDAP directory!
* @type str
*/
var $LDAP_rootdnpass;
/**
* LDAP group base DN, the ldap group base branch to search from.
* Each entry in this DN is a group for cmsdam, and must contain every user DN for that group.
* NOTE: LDAP SUPPORT IS READ ONLY FOR NOW!! You must add users and group in LDAP by yourself.
* Cmsdam will never touch LDAP directory!
* @type str
*/
var $LDAP_groupbasedn;
/**
* LDAP use.
* 0 -> never use LDAP, only use the DB for users login, groups, ecc...
* 1 -> always use LDAP, don't use DB for readonly users operations: login, groups...
* 2 -> first use LDAP, if the user is not present in LDAP or the credentials are not ok then use the DB
* NOTE: LDAP SUPPORT IS READ ONLY FOR NOW!! You must add users and group in LDAP by yourself.
* Cmsdam will never touch LDAP directory!
* @type str
*/
var $LDAP_exclusive;
/**
* LDAP filter to check if a user entry is valid.
* NOTE: LDAP SUPPORT IS READ ONLY FOR NOW!! You must add users and group in LDAP by yourself.
* Cmsdam will never touch LDAP directory!
* @type str
*/
var $LDAP_filter;
/**
* LDAP filter to check if a group entry is valid.
* NOTE: LDAP SUPPORT IS READ ONLY FOR NOW!! You must add users and group in LDAP by yourself.
* Cmsdam will never touch LDAP directory!
* @type str
*/
var $LDAP_groupfilter;
/**
* LDAP attribute to identify groups entities.
* NOTE: LDAP SUPPORT IS READ ONLY FOR NOW!! You must add users and group in LDAP by yourself.
* Cmsdam will never touch LDAP directory!
* @type str
*/
var $LDAP_groupstag;
/**
* LDAP attribute to identify groups user DNs.
* NOTE: LDAP SUPPORT IS READ ONLY FOR NOW!! You must add users and group in LDAP by yourself.
* Cmsdam will never touch LDAP directory!
* @type str
*/
var $LDAP_groupsuserstag;
/**
* if == "YES" print cmsdam parsing time HTML comment at the bottom of the page
* It is very useful for debugging informations!
* @type str
*/
var $parsetimecomment;
/**
* if == "YES" cmsdam will use memcached daemon to implement variable caching mechanism
* @type str
*/
var $use_memcached;
/**
* memcached servers name and port
* @type str
*/
var $memcached_servers;
/**
* at how many bytes should we compress?
* @type str
*/
var $memcached_compress_threshold;
/**
* are we using persistant links?
* @type str
*/
var $memcached_persistant;
/**
* Error reporting for cmsdam related errors
* @type str
*/
var $ERROR_reporting_cmsdAm;
/**
* Error reporting for cmsdam sections related errors
* @type str
*/
var $ERROR_reporting_sections;
/**
* List of all languages (get this from the sections)
* @type str
*/
var $lang_list;
/**
* This is the cmsdam_conf constructor, you cannot use it from your sections.
* @return null This method doesn't return nothing
* @author dAm2K (Dino Ciuffetti) <dam2k@users.sourceforge.net>
*/
function cmsdam_conf () {
// Sections
// IF YOU LIKE THIS SOFTWARE AND YOU WANT TO USE IT YOU SHOULDN'T CHANGE THESE LINES!!
$this->cmsdam_description = "The new tecnology free CMS system!!";
$this->cmsdam_version = "0.91";
$this->cmsdam_verstate = "Devel";
$this->cmsdam_longversion = "cmsdAm " . $this->cmsdam_version . "-". $this->cmsdam_verstate ." - GPL released, by dino@tuxweb.it - Dino Ciuffetti - TuxWeb S.r.l. - http://www.tuxweb.it/";
// Configuration file
if (file_exists("etc/config.php")) {
include ("etc/config.php");
} else { // Let the user installing cmsdam via web
header ("Location: install/?");
if (!(defined("CMSDAM_CLIENT"))) exit();
}
$this->DB_servername = $DB_servername;
$this->DB_name = $DB_name;
$this->DB_username = $DB_username;
$this->DB_password = $DB_password;
$this->DB_tbl_prefix = $DB_tbl_prefix;
$this->DB_type = $DB_type;
$this->LOG_debug = $LOG_debug;
$this->LOG_path = $LOG_path;
$this->LOG_file = $LOG_file;
$this->LOG_level = $LOG_level;
$this->LOG_debuglevel = $LOG_debuglevel;
$this->site_title = $site_title;
$this->HTML_Meta_description = $HTML_Meta_description;
$this->HTML_Meta_keywords = $HTML_Meta_keywords;
$this->HTML_Meta_author = $HTML_Meta_author;
$this->HTML_Meta_revisit = $HTML_Meta_revisit;
$this->HTTP_maxage = $HTTP_maxage;
$this->HTTP_contenttype = $HTTP_contenttype;
$this->HTTP_charset = $HTTP_charset;
$this->cmsdam_admin_email = $cmsdam_admin_email;
$this->PHP_time_limit = $PHP_time_limit;
$this->PHPWarn_on_sectioninclude = $PHPWarn_on_sectioninclude;
$this->LDAP_servername = $LDAP_servername;
$this->LDAP_basedn = $LDAP_basedn;
$this->LDAP_rootdn = $LDAP_rootdn;
$this->LDAP_rootdnpass = $LDAP_rootdnpass;
$this->LDAP_groupbasedn = $LDAP_groupbasedn;
$this->LDAP_exclusive = $LDAP_exclusive;
$this->LDAP_filter = $LDAP_filter;
$this->LDAP_groupfilter = $LDAP_groupfilter;
$this->LDAP_groupstag = $LDAP_groupstag;
$this->LDAP_groupsuserstag = $LDAP_groupsuserstag;
$this->parsetimecomment = $parsetimecomment;
$this->use_memcached = $use_memcached;
$this->memcached_servers = $memcached_servers;
$this->memcached_compress_threshold = $memcached_compress_threshold;
$this->memcached_persistant = $memcached_persistant;
$this->ERROR_reporting_cmsdAm = $ERROR_reporting_cmsdAm;
$this->ERROR_reporting_sections = $ERROR_reporting_sections;
$this->filecontainer_basedir = $filecontainer_basedir;
$this->publish_var_prefix = $publish_var_prefix;
$this->max_section_versions = $max_section_versions;
$this->max_section_vers_autoclean = $max_section_vers_autoclean;
$this->Administrator = $Administrator;
$this->Administrator_Password = $Administrator_Password;
$this->Administrator_Group = $Administrator_Group;
}
}
?>