<?php $title = '进度列表 - ' . setting('webname');?>
<?php include_once tpl('header');?>

<style type="text/css">
#uleft {
	float: left;
	width: 20%;
	border-right: 1px dashed #000000;
}
#uleft li {
	display: block;
	background-color: #E9F4E9;
	line-height: 30px;
	height: 30px;
	text-align: center;
	margin: 6px;
}

.uright {
	margin-top: 10px;
	width: 78%;
	float: right;
}

.uright .plist {
	border-bottom: 1px dashed #E9F4E9;
	line-height: 30px;
}

.uright .bookname a {
	color: #6F3008;
	font-size: 14px;
	margin-right: 8px;
	
}
.uright .down a {
	color: red;
	margin: 0 0;
}
.down {
	margin-right: 6px;
}
</style>
<script type="text/javascript">
function down(bookid, self) {
	var isDelete = confirm('确定要下架吗？');
	if (!isDelete) {
		return false;
	}
	$.ajax({
		type: 'GET',
		url: '<?php echo $this->url('system',array('s'=>'member','c'=>'my','a'=>'progress','do'=>'down','confirm'=>1,'page'=>(isset($_GET['page']) ? S::gp('page', 'G', 2) : 1)));?>'+'&bid='+bookid,
		success:function(msg) {
			$(self).parent().parent().parent().remove();
		}
	});
}
</script>

<div id='uleft'>
	<ul>
		<li><?php echo ilink('阅读进度', url('system',array('s'=>'member','c'=>'my','a'=>'progress')));?></li>
		<li><a href="<?php echo $this->url('system',array('s'=>'author'));?>" target="_blank">作者中心</a></li>
		<li>站内短信</li>
	</ul>
</div>

<div class='uright'>
	排序:<?php if ($sort == 'asc' && $field == 'B.updatedate'):?><?php echo ilink('更新↓',url('system',array('s'=>'member','c'=>'my','a'=>'progress')));?><?php else:?><?php echo ilink('更新↑',url('system',array('s'=>'member','c'=>'my','a'=>'progress','sort'=>'asc')));?><?php endif;?>.<?php if ($sort == 'desc' && $field == 'F.createdate'):?><?php echo ilink('保存↓',url('system',array('s'=>'member','c'=>'my','a'=>'progress','f'=>1,'sort'=>'desc')));?><?php else:?><?php echo ilink('保存↑',url('system',array('s'=>'member','c'=>'my','a'=>'progress','f'=>1)));?><?php endif;?> <?php echo ilink('有新章',url('system',array('s'=>'member','c'=>'my','a'=>'progress','filter'=>'new')));?>
	<br/>
	<?php foreach ($progresss as $progress):?>
		<div class="plist"><span class="bookname"><span class="down">[<a href="javascript:void(0);" onclick="down(<?php echo $progress['bid'];?>, this);">下架</a> <a href="<?php echo $progress['progressurl'];?>">继续</a>]</span><?php echo ilink($progress['bookname'], url('bookshow', array('bid'=>$progress['bid'])));?>[<?php if ($progress['c']):?><span style="color:blue;">有<?php echo $progress['c'];?>章未看</span><?php else:?><?php if ($progress['status']):?>已看完<?php else:?>无新章<?php endif;?><?php endif;?>]</span> <span><?php echo ilink($progress['wlastchaptername'], url('read', array('bid'=>$progress['bid'],'cid'=>$progress['wlastchapterid'])));?></span> <span><?php echo $progress['updatedate'];?></span> <span><?php echo $progress['author'];?></span></div>
	<?php endforeach;?>
	<div id="append"></div>
	<br/>
	<?php echo pagination('system', $pageObj->getTotalRecord(), $pageObj->getPageSize());?>
</div>


<?php include_once tpl('footer');?>