freeradius-server-2.1.3.tar.gz安装源文件

源代码在线查看: user_info.php3

软件大小: 3601 K
上传用户: zzxt
关键词: freeradius-server tar gz
下载地址: 免注册下载 普通下载 VIP

相关代码

								require('../lib/sql/attrmap.php3');				if (is_file("../lib/sql/drivers/$config[sql_type]/functions.php3"))					include_once("../lib/sql/drivers/$config[sql_type]/functions.php3");				else{					echo "Could not include SQL library\n";					exit();				}				if ($config[sql_use_operators] == 'true'){					$op = ',op';					$use_op = 1;				}else{					$op = "";					$use_op = 0;				}				$user_exists = 'no';								$cn = '-';				$cn_lang = '-';				$address = '-';				$address_lang = '-';				$homeaddress = '-';				$homeaddress_lang = '-';				$fax = '-';				$url = '-';				$ou = '-';				$ou_lang = '-';				$title = '-';				$title_lang = '-';				$telephonenumber = '-';				$homephone = '-';				$mobile = '-';				$mail = '-';				$mailalt = '-';				$user_password_exists = 'no';								unset($item_vals);				unset($tmp);				$link = @da_sql_pconnect($config);				if ($link){					$res = @da_sql_query($link,$config,					"SELECT attribute,value $op FROM $config[sql_check_table] WHERE username = '$login';");					if ($res){						if (@da_sql_num_rows($res,$config))							$user_exists = 'yes';						while(($row = @da_sql_fetch_array($res,$config))){							$attr = $row[attribute];							$val = $row[value];							if ($attr == $config[sql_password_attribute] && $val != '')								$user_password_exists = 'yes';							if ($use_op){								$oper = $row[op];								$tmp["$attr"][operator][]="$oper";							}							$tmp["$attr"][]="$val";							$tmp["$attr"][count]++;						}						$res = @da_sql_query($link,$config,						"SELECT attribute,value $op FROM $config[sql_reply_table] WHERE username = '$login';");						if ($res){							if (@da_sql_num_rows($res,$config))								$user_exists = 'yes';							while(($row = @da_sql_fetch_array($res,$config))){								$attr = $row[attribute];								$val = $row[value];								if ($use_op){									$oper = $row[op];									$tmp["$attr"][operator][]="$oper";								}								$tmp["$attr"][] = "$val";								$tmp["$attr"][count]++;							}							if ($config[sql_use_user_info_table] == 'true'){								$res = @da_sql_query($link,$config,								"SELECT * FROM $config[sql_user_info_table] WHERE username = '$login';");								if ($res){									if (@da_sql_num_rows($res,$config)){										$user_exists = 'yes';										$user_info = 1;									}									if (($row = @da_sql_fetch_array($res,$config))){										$cn = ($row[name] != '') ? $row[name] : '-';										$telephonenumber = ($row[workphone] != '') ? $row[workphone] : '-';										$homephone = ($row[homephone] != '') ? $row[homephone] : '-';										$ou = ($row[department] != '') ? $row[department] : '-';										$mail = ($row[mail] != '') ? $row[mail] : '-';										$mobile = ($row[mobile] != '') ? $row[mobile] : '-';									}								}								else									echo "Database query failed partially: " . da_sql_error($link,$config) . "\n";							}						}						else							echo "Database query failed partially: " . da_sql_error($link,$config) . "\n";						if (isset($tmp)){							foreach(array_keys($tmp) as $val){								if ($val == '')									continue;								$key = $rev_attrmap["$val"];								if ($key == ''){									$key = $val;									$attrmap["$key"] = $val;									$attr_type["$key"] = 'replyItem';									$rev_attrmap["$val"] = $key;								}								$item_vals["$key"] = $tmp[$val];								$item_vals["$key"][count] = $tmp[$val][count];								if ($use_op)									$item_vals["$key"][operator] = $tmp[$val][operator];							}						}									}					else						echo "Database query failed: " . da_sql_error($link,$config) . "\n";				}				else					echo "Could not connect to SQL database\n";				?>							

相关资源