<?php function login_config_common_text($useConfig,$valuemap) { $cookieprefix=$valuemap['cookieprefix']; $config_common="<?php
function initialize_config(&\$Config)
{
	\$Config->SESSION_NAME=".var_export(or_default($valuemap['sessionname'],$useConfig->SESSION_NAME),true).";
	\$Config->AllowSSL=false;
	\$Config->Language=".var_export(or_default($valuemap['language'],$useConfig->Language),true).";
	\$Config->CookieName=array(
		'uniwits_ipdata'=>".var_export(($cookieprefix?$cookieprefix."ipdata":$useConfig->CookieName['uniwits_ipdata']),true).",
		'uniwits_lang'=>".var_export(($cookieprefix?$cookieprefix."lang":$useConfig->CookieName['uniwits_lang']),true).",
		'uniwits_timebias'=>".var_export(($cookieprefix?$cookieprefix."timebias":$useConfig->CookieName['uniwits_timebias']),true).",
		'userpcid'=>".var_export(($cookieprefix?$cookieprefix."userpcid":$useConfig->CookieName['userpcid']),true)."
	);
	
	\$Config->CookiePrefix=".var_export(or_default($cookieprefix,$useConfig->CookiePrefix),true).";

	\$Config->TablePrefix=array(
		'uniwits'=>".var_export(or_default(addslashes($valuemap['dbtblpfx']),$useConfig->TablePrefix['uniwits']),true)."
	);
	
	\$Config->CachePrefix=".var_export(($valuemap['datapath']?$valuemap['datapath'].'/cache/':$useConfig->CachePrefix),true).";

	\$Config->Paths=array(
		'data'=>".var_export(or_default($valuemap['datapath'],$useConfig->Paths['data']),true).",
		'theme.shared'=>".var_export(($valuemap['datapath']?$valuemap['datapath'].'/themes':$useConfig->Paths['theme.shared']),true).",
		'theme.shared.report'=>".var_export(($valuemap['datapath']?$valuemap['datapath'].'/themes.report':$useConfig->Paths['theme.shared.report']),true).",
		'theme.system'=>".var_export(or_default($useConfig->Paths['theme.system'],'themes'),true).",
		'user.base'=>".var_export(($valuemap['datapath']?$valuemap['datapath'].'/user':$useConfig->Paths['user.base']),true).",
		'lang.system'=>".var_export(or_default($useConfig->Paths['lang.system'],'languages'),true).",
		'upload'=>".var_export(($valuemap['datapath']?$valuemap['datapath'].'/upload':$useConfig->Paths['upload']),true).",
		'tasklistbase'=>".var_export(($valuemap['datapath']?$valuemap['datapath'].'/tasklist':$useConfig->Paths['tasklistbase']),true)."
	);
	
	\$Config->SESSION_SAVE_PATH=null;
	
	\$Config->DISTRIBUTION_ID=".var_export(or_default($valuemap['distributionid'],$useConfig->DISTRIBUTION_ID),true).";
	\$Config->VERSION=".var_export(or_default($valuemap['VERSION'],$useConfig->VERSION),true).";
}
?>"; return $config_common; } function login_config_locals_text($useConfig,$valuemap) { $config_locals="<?php
function set_local_configurations(&\$Config)
{
	\$Config->DBType='mysql';
	\$Config->SESSION_DOMAIN=".var_export($_SERVER['SERVER_NAME'],true).";
	\$Config->SERVER_DOMAIN=".var_export(or_default($valuemap['siteurl'],$useConfig->SERVER_DOMAIN),true).";

	\$Config->COOKIE_DOMAIN=".var_export($_SERVER['SERVER_NAME'],true).";
	\$Config->COOKIE_PATH=".var_export(or_default($valuemap['cookiepath'],$useConfig->COOKIE_PATH),true).";
	
	\$Config->DBConfWritable=array(
		array(
			'DBHost'=>".var_export(or_default($valuemap['dbserver'],$useConfig->DBConfWritable[0]['DBHost']),true).",
			'DBPort'=>".var_export(or_default($valuemap['dbserverport'],$useConfig->DBConfWritable[0]['DBPort']),true).",
			'DBName'=>".var_export(or_default($valuemap['dbname'],$useConfig->DBConfWritable[0]['DBName']),true).",
			'DBUser'=>".var_export(or_default($valuemap['dbuser'],$useConfig->DBConfWritable[0]['DBUser']),true).",
			'DBPass'=>".var_export(or_default($valuemap['dbpassword'],$useConfig->DBConfWritable[0]['DBPass']),true)."
		)
	);
	\$Config->DBConfReadonly=\$Config->DBConfWritable;
	\$Config->LogDBConfWritable=\$Config->DBConfWritable;
	\$Config->LogDBConfReadonly=\$Config->LogDBConfWritable;
		
	\$Config->MailingMethod=".var_export(or_default($valuemap['mailmethod'],$useConfig->MailingMethod),true).";
	\$Config->MailerAddress=".var_export(or_default($valuemap['contactmail'],$useConfig->MailerAddress),true).";
	\$Config->SmtpServer=".var_export(or_default($valuemap['smtpserver'],$useConfig->SmtpServer),true).";
	\$Config->SmtpPort=".var_export(or_default($valuemap['smtpport'],$useConfig->SmtpPort),true).";
	\$Config->PopServer=".var_export(or_default($valuemap['popserver'],$useConfig->PopServer),true).";
	\$Config->PopPort=".var_export(or_default($valuemap['popport'],$useConfig->PopPort),true).";
	\$Config->PopUser=".var_export(or_default($valuemap['popuser'],$useConfig->PopUser),true).";
	\$Config->PopPass=".var_export(or_default($valuemap['poppass'],$useConfig->PopPass),true).";
	\$Config->ErrorReportMail=".var_export(or_default($valuemap['contactmail'],$useConfig->ErrorReportMail),true).";
	\$Config->DisplayExecutionTime=false;
	\$Config->JumpTargets=array();

	\$Config->DefaultCPID=1;
}
?>"; return $config_locals; } ?>