{if config::get('guestbook_list')=='1'}

{if config::get('guestbook_user')=='1'}
<link href="{$template_path}/visual/list/listguestbooktag/list/css/style.css" rel="stylesheet">
<?php if(isset($user) && is_array($user)) { ?>
	<div class="guestbook-list guestbook-list-$_id">
		<?php if(!is_array($data) || (is_array($data) && count($data)<1)){ ?>
		<div class="blank30"></div>
		
			<p class="text-center">
				{lang('no_guestbook_list')}
			</p>
			
		<?php };	?>
		{loop $data $d}
		<div class="guestbook-content-item">
			<div class="guestbook-head col-xs-3 col-sm-1">
				<img src="{getuserheadimg($d['userid'])}" alt="headimage" class="img-responsive">
			</div>
			<div class="col-xs-9 col-sm-11">
				<p><strong>{$d['username']}</strong> <span class="pull-right">{sdate($d['adddate'],'Y-m-d H:i')}</span></p>
				<div class="guestbook-content ">
					<p>{$d['content']}</p>
					<div class="clearfix"></div>
				</div>
				{if $d['reply']}
				<div style="margin:10px 0px 0px 15px;">
					<p>{lang('admin_reply')}：</p>
					<div class="guestbook-content ">
						<dd class="guestbook_admin_reply">
							<p>{$d['reply']}</p>
						</dd>
						<div class="clearfix"></div>
					</div>
				</div>
				{/if}
				<div class="clearfix"></div>
			</div>
			<div class="clearfix"></div>
		</div>
		{/loop}
	</div>
<?php
}else{
?>

<div class="blank30"></div>
<div class="text-center">
<input type="button" value=" {lang('please')}{lang('login')} " onclick="window.open('{url('user/login')}')" class="btn" />
</div>

<?php
}
?>

{else}
<div class="guestbook-list guestbook-list-$_id">
	<?php if(is_array($data) && count($data)<1){ ?>
	<div class="blank30"></div>

	<p class="text-center">
		{lang('no_guestbook_list')}
	</p>

	<?php };	?>
	{loop $data $d}
	<div class="guestbook-content-item">
		<div class="guestbook-head col-xs-3 col-sm-1">
			<img src="{getuserheadimg($d['userid'])}" alt="headimage" class="img-responsive">
		</div>
		<div class="col-xs-9 col-sm-11">
			<p><strong>{$d['username']}</strong> <span class="pull-right">{sdate($d['adddate'],'Y-m-d H:i')}</span></p>
			<div class="guestbook-content ">
				<p>{$d['content']}</p>
			</div>
			{if $d['reply']}
			<div style="margin:10px 0px 0px 15px;">
				<p>{lang('admin_reply')}：</p>
				<div class="guestbook-content ">
					<dd class="guestbook_admin_reply">
						<p>{$d['reply']}</p>
					</dd>
				</div>
			</div>
			{/if}
			<div class="clearfix"></div>
		</div>
		<div class="clearfix"></div>
	</div>
	{/loop}
</div>
{/if}
<style>
	.guestbook-list-$_id .btn {
		font-size:$_btn-size;
		color:$_btn-text-color;
		border-color:$_btn-border-color;
		border-radius: $_btn-border-radius;
		background:$_btn-background-color;
	}
	.guestbook-list-$_id .btn:hover {
		color:$_btn-text-hover-color;
		border-color:$_btn-border-hover-color;
		border-radius: $_btn-border-hover-radius;
		background:$_btn-background-hover-color;
	}
	.guestbook-list-$_id .guestbook-content {
		font-size:$_p-size;
		color:$_p-color;
		background:$_background-color;
		border-color:$_background-border-color;
	}
	.guestbook-list-$_id .guestbook-content-item:hover .guestbook-content {
		color:$_p-hover-color;
		background:$_background-hover-color;
		border-color:$_background-border-hover-color;
	}
	.guestbook-list-$_id .guestbook-content-item p strong {
		font-size:$_title-size;
		color:$_title-color;
	}
	.guestbook-list-$_id .guestbook-content-item:hover p strong {
		color:$_title-hover-color;
	}
	.guestbook-list-$_id .guestbook-content-item p span.pull-right {
		font-size:$_subtitle-size;
		color:$_subtitle-color;
	}
	.guestbook-list-$_id .guestbook-content-item:hover p span.pull-right {
		color:$_subtitle-hover-color;
	}
	.guestbook-list-$_id .guestbook-content:before {
		border-bottom: 10px solid $_background-border-color;
	}
	.guestbook-list-$_id .guestbook-content:after {
		border-bottom: 8px solid $_background-color;
	}
	.guestbook-list-$_id .guestbook-content-item:hover .guestbook-content:before {
		border-bottom: 10px solid $_background-border-hover-color;;
	}
	.guestbook-list-$_id .guestbook-content-item:hover .guestbook-content:after {
		border-bottom: 8px solid $_background-hover-color;
	}
</style>
{else}
<div class="guestbook-list guestbook-list-$_id">

	<div class="blank30"></div>
	<div class="text-center">
		<h3>
			{lang('no_guestbook_list')}
		</h3>
	</div>


</div>

{/if}
