<?php function reserv_config_common_text($useConfig,$valuemap) { $config_common="<?php
if (!defined('SESSKEYPFX'))
	define('SESSKEYPFX','reserv.');

function initialize_config(&\$Config)
{
	\$Config->SESSION_NAME=".var_export($useConfig->SESSION_NAME,true).";
	\$Config->CookieName=array(
	 	'uniwits_ipdata'=>".var_export($useConfig->CookieName['uniwits_ipdata'],true).",
		'uniwits_lang'=>".var_export($useConfig->CookieName['uniwits_lang'],true).",
		'uniwits_timebias'=>".var_export($useConfig->CookieName['uniwits_timebias'],true).",
		'userpcid'=>".var_export($useConfig->CookieName['userpcid'],true)."
	);

	\$Config->Paths=array(
		'login.path'=>".var_export(or_default($valuemap['loginpath'],$useConfig->Paths['login.path']),true).",
		'theme.shared'=>".var_export($useConfig->Paths['theme.shared'],true).",
		'theme.shared.report'=>".var_export($useConfig->Paths['theme.shared.report'],true).",
		'counter.compere'=>".var_export($useConfig->Paths['data']."/counter/compere",true).",
		'counter.course'=>".var_export($useConfig->Paths['data']."/counter/course",true).",
		'theme.system'=>".var_export(or_default($useConfig->Paths['theme.system'],'themes'),true).",
		'user.base'=>".var_export($useConfig->Paths['user.base'],true).",
		'lang.system'=>".var_export(or_default($useConfig->Paths['lang.system'],'languages'),true).",
		'upload'=>".var_export($useConfig->Paths['upload'],true).",
		'tasklistbase'=>".var_export($useConfig->Paths['tasklistbase'],true)."
	);
	
	\$Config->ThemeLimits=array(
		'style.zip.size'=>5242880,
		'style.expanded.size'=>10485760
	);

	\$Config->SESSION_SAVE_PATH=null;
	\$Config->CachePrefix=".var_export($useConfig->CachePrefix,true).";

	\$Config->Limits=array(
		'timeavail.count'=>240,
		'seat.count'=>999,
		'place.count'=>20,
		'classroom.seat.count'=>999,
		'classroom.count'=>99,
		'lecture.count'=>999,
		'course.count'=>99,
		'coursegroup.count'=>99,
		'reservation.count'=>999,
		'option.count'=>999,
		'question.count'=>999,
		'questionnaire.count'=>999,
		'team.size'=>10,
		'max_image_file_size'=>10485760,
		'download_peakrate'=>655360,
		'thumbnail.sx'=>120,
		'thumbnail.sy'=>120
	);

	\$Config->ChargedPlans=array(
		'default'=>'0',
		'alias'=>'0.alias'
	);
	
	\$Config->DefaultCompereInfoCategorized=array();
	
	\$Config->TablePrefix=array(
		'reserv'=>".var_export(or_default($valuemap['dbtblpfx'],$useConfig->TablePrefix['reserv']),true).",
		'uniwits'=>".var_export($useConfig->TablePrefix['uniwits'],true)."
	);

	\$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 reserv_config_locals_text($useConfig,$valuemap) { $config_local="<?php
function set_local_configurations(&\$Config)
{
	\$Config->DBType=".var_export($useConfig->DBType,true).";
	\$Config->SESSION_DOMAIN=".var_export($useConfig->SESSION_DOMAIN,true).";
	\$Config->SERVER_DOMAIN=".var_export($_SERVER['SERVER_NAME'].($_SERVER['SERVER_PORT']==80?'':':'.$_SERVER['SERVER_PORT']).dirname(dirname($_SERVER['REQUEST_URI'])),true).";
	\$Config->LOGIN_SERVER_NAME=".var_export(or_default($useConfig->LOGIN_SERVER_NAME,$_SERVER['SERVER_NAME'].($_SERVER['SERVER_PORT']==80?'':':'.$_SERVER['SERVER_PORT']).dirname(dirname(dirname($_SERVER['REQUEST_URI'])))).$valuemap['loginpath'],true).";

	\$Config->COOKIE_DOMAIN=".var_export($useConfig->COOKIE_DOMAIN,true).";
	
	\$Config->DBConfWritable=array(
		array(
			'DBHost'=>".var_export($useConfig->DBConfWritable[0]['DBHost'],true).",
			'DBPort'=>".var_export($useConfig->DBConfWritable[0]['DBPort'],true).",
			'DBName'=>".var_export($useConfig->DBConfWritable[0]['DBName'],true).",
			'DBUser'=>".var_export($useConfig->DBConfWritable[0]['DBUser'],true).",
			'DBPass'=>".var_export($useConfig->DBConfWritable[0]['DBPass'],true)."
		)
	);
	\$Config->DBConfReadonly=\$Config->DBConfWritable;
		
	\$Config->MailingMethod=".var_export($useConfig->MailingMethod,true).";
	\$Config->MailerAddress=".var_export($useConfig->MailerAddress,true).";
	\$Config->SmtpServer=".var_export($useConfig->SmtpServer,true).";
	\$Config->SmtpPort=".var_export($useConfig->SmtpPort,true).";
	\$Config->PopServer=".var_export($useConfig->PopServer,true).";
	\$Config->PopPort=".var_export($useConfig->PopPort,true).";
	\$Config->PopUser=".var_export($useConfig->PopUser,true).";
	\$Config->PopPass=".var_export($useConfig->PopPass,true).";
	\$Config->ErrorReportMail=".var_export($useConfig->ErrorReportMail,true).";
	\$Config->SupportMail=".var_export($useConfig->MailerAddress,true).";

	\$Config->ServerList=array(".var_export($_SERVER['SERVER_ADDR']."-".$_SERVER['SERVER_NAME'],true).");

	\$Config->TeamAvailable=true;
	
	\$Config->DefaultCPID=1;
}
?>"; return $config_local; } ?>