Subversion Repositories ALCASAR

Rev

Go to most recent revision | Details | Last modification | View Log

Rev Author Line No. Line
1805 clement.si 1
<?php
2
#Read sql attribute map
3
unset($sql_attrs);
4
if (isset($_SESSION['sql_attrs']))
5
	$sql_attrs = $_SESSION["sql_attrs"];
6
if (!isset($sql_attrs)){
7
	$ARR = file($config[general_sql_attrs_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,$desc,$show,$func)=preg_split("/\t+/",$val);
13
		$sql_attrs[strtolower($key)][desc] = "$desc";
14
		$sql_attrs[strtolower($key)][show] = "$show";
15
		$sql_attrs[strtolower($key)][func] = ($func == "") ? "nothing" : "$func";
16
	}
17
	if ($config[general_use_session] == 'yes')
18
		session_register('sql_attrs');
19
}
20
?>