<?php
require("session_check.php");	
	require("../foundation/module_album.php");
	
	//语言包引入
	$f_langpackage=new foundationlp;
	$m_langpackage=new modulelp;
	$a_langpackage=new albumlp;
	
	$user_id=short_check(get_argg('user_id'));

	//表定义区
	$t_users=$tablePreStr."users";
	$t_album=$tablePreStr."album";
	$t_recommend=$tablePreStr."recommend";

	$dbo = new dbex;
	dbtarget('r',$dbServs);
	
	$sql="select user_name , user_ico , show_ico from $t_recommend where user_id=$user_id";
	$user_row=$dbo->getRow($sql);
	
	
?>

<html>
<head>
<title><?php echo $m_langpackage->m_member_list;?></title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link rel="stylesheet" type="text/css" href="css/right.css">
<link rel="stylesheet" type="text/css" href="css/iframe.css">
<script type='text/javascript'>
function create_xmlhttp()
{
	if(window.ActiveXObject){
		xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
	}else{
		xmlhttp=new XMLHttpRequest();
	}
}

	</script>
</head>
<body>

<div class="container">
	<div class="rs_head"><?php echo $f_langpackage->f_index_pic?></div>
</div>

	<table class='main main_left' style='vertical-align:top'>
		<tr>
			<td style='text-align:center'><img src="../<?php echo $user_row['user_ico'];?>" width='45px' /></td>
			<td width="150px">
				<?php echo $user_row['user_name'];?><?php echo $f_langpackage->f_index_list?>
			</td>
			<td style="width:*">
				<?php album_name($dbo,$t_album,$user_id,$album_id);?>
			</td>
		</tr>
		<tr><td class="dotted_line" colspan="10" style="line-height:100%;">&nbsp</td></tr>
<script type='text/javascript'>
var album_select=document.getElementById("album_name");
album_select.onchange=list_album_photos;
function list_album_photos(){//获取接受返回信息层
	var album_select_val=document.getElementById("album_name").value;
	var photos_list=document.getElementById("photos_list");
	if(album_select_val==""){
		return false;
		}else{
					var url="front_end.php?app=user_ico_select&type=index_pic&user_id=<?php echo $user_id;?>&album_id="+album_select_val;
					create_xmlhttp();
					xmlhttp.open("GET", url, true);//通过Post方式打开连接
					xmlhttp.setRequestHeader("Content-Type","application/x-www-form-urlencoded"); //定义传输的文件HTTP头信息 
			    //获取执行状态 
				  xmlhttp.onreadystatechange = function() {
				      //如果执行状态成功，那么就把返回信息写到指定的层里 
				     if (xmlhttp.readyState==4&&xmlhttp.status==200) {
				     	var re_str=xmlhttp.responseText;
				     		re_str=re_str.replace(/src=\'/g,"src=\'../");
				        photos_list.innerHTML=re_str;
				     }else{
				     photos_list.innerHTML="数据加载中,请稍侯...";
				    }
				  }
					xmlhttp.send(null); //发送POST数据
			 }
	}			
</script>

		<tr><td colspan=4><div id='photos_list'></div></td></tr>
		<tr><td colspan=4><font color='red'>*</font><strong><?php echo $f_langpackage->f_select_pic?></strong></td></tr>
		<tr><td width="90px"><?php echo $f_langpackage->f_now_index?></td><td colspan=3><img src="../<?php echo $user_row['show_ico'];?>" /></td></tr>
	</table>


</body>
</html>