Subversion Repositories ALCASAR

Rev

Details | Last modification | View Log

Rev Author Line No. Line
1805 clement.si 1
<?php
2
unset($text_default_vals);
3
unset($default_vals);
4
if (isset($_SESSION['text_default_vals']))
5
	$text_default_vals = $_SESSION['text_default_vals'];
6
if (!isset($text_default_vals)){
7
	$ARR=file("$config[general_default_file]");
8
	foreach($ARR as $val) {
9
		$val=chop($val);
10
		if (preg_match('/^[[:space:]]*#/',$val) || preg_match('/^[[:space:]]*$/',$val))
11
			continue;
12
		list($key,$v)=preg_split("/:[[:space:]]*/",$val,2);
13
		$text_default_vals["$key"][0]="$v";
14
		$text_default_vals["$key"]['count']++;
15
	}
16
	if (!isset($text_default_vals))
17
		$text_default_vals["NOT_EXIST"][0] = '0';
18
	if ($config['general_use_session'] == 'yes')
19
		session_register('text_default_vals');
20
}
21
$default_vals = $text_default_vals;
22
if (is_file("../lib/$config[general_lib_type]/defaults.php"))
23
        include("../lib/$config[general_lib_type]/defaults.php");
24
?>