<?php
/*
 * 注意：此文件由tpl_engine编译型模板引擎编译生成。
 * 如果您的模板要进行修改，请修改 templates/default/modules/album/album_list.html
 * 如果您的模型要进行修改，请修改 models/modules/album/album_list.php
 *
 * 修改完成之后需要您进入后台重新编译，才会重新生成。
 * 如果您开启了debug模式运行，那么您可以省去上面这一步，但是debug模式每次都会判断程序是否更新，debug模式只适合开发调试。
 * 如果您正式运行此程序时，请切换到service模式运行！
 * 
 * 如有您有问题请到官方论坛（http://tech.jooyea.com/bbs/）提问，谢谢您的支持。
 */
?><?php
	//引入语言包
	$a_langpackage=new albumlp;

	//变量取得
	$album_id=short_check(get_argg('album_id'));
	$url_uid=short_check(get_argg('user_id'));
	$ses_uid=get_sess_userid();

	//引入模块公共权限过程文件
	$is_self_mode='partLimit';
	$is_login_mode='';
	require("foundation/auser_validate.php");
	require("foundation/module_users.php");
	require("foundation/module_mypals.php");
	require("foundation/fpages_bar.php");
	require("foundation/module_album.php");

	//数据表定义区
	$t_album = $tablePreStr."album";
	$t_photo = $tablePreStr."photo";
	$t_users = $tablePreStr."users";
	$t_holerpals = $tablePreStr."pals_mine";

	$dbo=new dbex;
	//读写分离定义方法
	dbtarget('r',$dbServs);
	
	$holder_name=get_hodler_name($dbo,$t_users,$url_uid);
	$holder_pals=getHodlerpals($dbo,$t_holerpals,$url_uid);
	$p=strstr($holder_pals,",".$ses_uid.",");

	//缓存区
	require($webRoot.$baseLibsPath."model/album_list.model.cache.php");
	
	if($is_self=='Y'){
		$a_who=$a_langpackage->a_mine;
		$guide_txt=$a_langpackage->a_no_alb.",<a href='?app=album_creat'>".$a_langpackage->a_crt_alb."</a>,<a href='?app=album_friend'>".$a_langpackage->a_fri_alb."</a>";  
		$button="";
	}else{
		$a_who=str_replace('{holder}',filt_word($holder_name),$a_langpackage->a_holder)."</div>";
		$guide_txt=$a_langpackage->a_no_fri;
		$button="content_none";
	}
	
	$isNull=0;//不为空则设置为零
	$a_main="";
	$guide="content_none";
	if(empty($album_rs)){
		$isNull=1;//判断结果集是否为空
		$a_main="content_none";
		$guide="";		 	
	}
?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title></title>
<link rel="stylesheet" type="text/css" href="skin/<?php echo $skinUrl;?>/css/row_menus.css">
<link rel="stylesheet" type="text/css" href="skin/<?php echo $skinUrl;?>/css/iframe.css">
<script type='text/javascript'>
	parent.guide("album");
	</script>
</head>
<body>
  <div class="main_right_title">
     <span class="main_title_dot2"></span>
     <span class="main_title_txt"><?php echo $a_who;?></span>
  </div>
  <div id='tabsB' class="<?php echo $button;?>">
  <ul>
    <li class="nowbutl"><a href="?app=album_list" title="<?php echo $a_langpackage->a_main;?>" class="nowbutl"><span class="nowbutr"><?php echo $a_langpackage->a_mine;?></span></a></li>
    <li><a href="?app=album_friend" title="<?php echo $a_langpackage->a_friend;?>"><span><?php echo $a_langpackage->a_friend;?></span></a></li>
  </ul>
    <div class="div_but" onclick="location.href='?app=album_creat'"><?php echo $a_langpackage->a_creat;?></div>
    <div class="div_but_3" onclick="location.href='?app=photo_upload'"><?php echo $a_langpackage->a_upload;?></div>
  </div>
	<div class="guide_info <?php echo $guide;?>">
		<?php echo $guide_txt;?>
	</div>
    <?php foreach($album_rs as $val){?>
	<div class="album_list2 <?php echo $a_main;?>">
			<dl>
				<dt><a href='?app=photo_list&album_id=<?php echo $val['album_id'];?>&user_id=<?php echo $val['user_id'];?>'><img src='<?php echo $val['album_skin'];?>' width="185px" onerror="parent.pic_error(this)" class='user_ico'></a></dt>
			    <dd><strong><a href='?app=photo_list&album_id=<?php echo $val['album_id'];?>&user_id=<?php echo $val['user_id'];?>'><?php echo filt_word($val['album_name']);?></a></strong></dd>
				<dd><?php echo str_replace('{holder}',$val['photo_num'],$a_langpackage->a_num);?></dd>
				<dd><?php echo $a_langpackage->a_crt_time;?><?php echo $val['add_time'];?></dd>
				<dd class="album_conf">
				<?php if($is_self=='Y'){?>
				<a class="album_edit" href='?app=album_update&album_id=<?php echo $val['album_id'];?>'><?php echo $a_langpackage->a_edit;?></a>
				<a class="album_del" href='do.php?act=album_del&album_id=<?php echo $val['album_id'];?>' onclick="return confirm('<?php echo $a_langpackage->a_del_asc;?>')";><?php echo $a_langpackage->a_del;?></a>
				<?php }?>
				</dd>
			</dl>
	</div>
	<?php }?>
	<div class="clear"></div>
	<?php page_show($isNull,$page_num,$page_total);?>
</body>
</html>