Subversion Repositories ALCASAR

Rev

Rev 1805 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log

Rev 1805 Rev 1831
Line 3... Line 3...
3
require_once('../lib/functions.php');
3
require_once('../lib/functions.php');
4
 
4
 
5
unset($da_name_cache);
5
unset($da_name_cache);
6
if (isset($_SESSION['da_name_cache']))
6
if (isset($_SESSION['da_name_cache']))
7
	$da_name_cache = $_SESSION['da_name_cache'];
7
	$da_name_cache = $_SESSION['da_name_cache'];
8
if ($config[sql_nas_table] != ''){
8
if ($config['sql_nas_table'] != ''){
9
 
9
 
10
	if (is_file("../lib/sql/drivers/$config[sql_type]/functions.php"))
10
	if (is_file("../lib/sql/drivers/$config[sql_type]/functions.php"))
11
		include_once("../lib/sql/drivers/$config[sql_type]/functions.php");
11
		include_once("../lib/sql/drivers/$config[sql_type]/functions.php");
12
	else{
12
	else{
13
		echo "<b>Could not include SQL library</b><br>\n";
13
		echo "<b>Could not include SQL library</b><br>\n";
Line 15... Line 15...
15
	}
15
	}
16
	$link = da_sql_pconnect($config);
16
	$link = da_sql_pconnect($config);
17
	if ($link){
17
	if ($link){
18
		$auth_user = $_SERVER["PHP_AUTH_USER"];
18
		$auth_user = $_SERVER["PHP_AUTH_USER"];
19
		$extra = '';
19
		$extra = '';
20
		if (isset($mappings[$auth_user][nasdb])){
20
		if (isset($mappings[$auth_user]['nasdb'])){
21
			$NAS_ARR = array();
21
			$NAS_ARR = array();
22
			$NAS_ARR = preg_split('/,/',$mappings[$auth_user][nasdb]);
22
			$NAS_ARR = preg_split('/,/',$mappings[$auth_user][nasdb]);
23
			$extra = 'WHERE nasname IN (';
23
			$extra = 'WHERE nasname IN (';
24
			foreach ($NAS_ARR as $nas)
24
			foreach ($NAS_ARR as $nas)
25
				$extra .= "'$nasname',";
25
				$extra .= "'$nasname',";