attrmap.php3

来自「使用最广泛的radius的linux的源码」· PHP3 代码 · 共 38 行

PHP3
38
字号
<?php#Read sql attribute mapunset($attrmap);unset($rev_attrmap);unset($attr_type);if (isset($_SESSION['attrmap'])){	#If attrmap is set then the rest will also be set        $attrmap = $_SESSION['attrmap'];	$rev_attrmap =$_SESSION['rev_attrmap'];	$attr_type = $_SESSION['attr_type'];}else{	$ARR = file("$config[general_sql_attrmap]");	foreach($ARR as $val){		$val=chop($val);		if (ereg('^[[:space:]]*#',$val) || ereg('^[[:space:]]*$',$val))			continue;		list($type,$key,$v)=split('[[:space:]]+',$val);		$attrmap["$key"]=$v;		$rev_attrmap["$v"] = $key;		$attr_type["$key"]=$type;	}	if (isset($show_attrs)){		foreach($show_attrs as $key => $desc){			if ($attrmap["$key"] == ''){				$attrmap["$key"] = $key;				$attr_type["key"] = 'replyItem';				$rev_attrmap["$key"] = $key;			}		}	}	if ($config[general_use_session] == 'yes'){		session_register('attrmap');		session_register('rev_attrmap');		session_register('attr_type');	}}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?