<?php $title = '我的进度 - ' . setting('webname');?>
<?php include_once tpl('globalHeader');?>
<style type="text/css">.next {color:red;}</style>
<div class="nav"><a href="javascript:history.go(-1);">返回上级</a> <?php echo memberLink();?> <a href="<?php echo url('type');?>">书库</a></div>
<div class="kind">可存进度数:<span class="next"><?php echo $bookLimit;?></span>条,已存数:<span class="next"><?php echo $bNum;?></span>条</div>

<div class="block">注：“上次阅读”后面的 &gt;&gt;&gt;　链接，点击后去到保存的书签的下一章</div>

<div class="pl">
书架:
<?php foreach ($bookshelfs as $key => $value):?>
    <?php $print[] = ilink($value, url('system',array('s'=>'member','c'=>'bookshelf','id'=>$key)));?>
<?php endforeach;?>
<?php echo implode('.', $print);?>
</div>

排序:<?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/>
<form action="<?php echo url('system',array('s'=>'member','c'=>'my','a'=>'progress'));?>" method="get">搜索:
<select name="class"><option value="1">书名</option><option value="2">作者</option></select>
<input type="text" name="key" size="8"/>
<input type="hidden" name="s" value="member" />
<input type="hidden" name="c" value="my" />
<input type="hidden" name="a" value="progress" />
<input type="hidden" name="sid" value="<?php echo $this->sid();?>" />
<input type="hidden" name="st" value="2" />
<input type="submit" value="搜索" /></form>

<div class="kind"><h1>=更新列表=</h1></div>
<?php if (empty($progresss)):?>
    暂无记录
<?php else:?>
    <?php foreach($progresss as $progress):?>
        <div class="comment"><?php echo $floor--;?>.[<a href="<?php echo url('system',array('s'=>'member','c'=>'my','a'=>'progress','do'=>'down','bid'=>$progress['bid']));?>">删除</a>]<a href="<?php echo url('chapter', array('bid'=>$progress['bid'],'sort'=>'des'));?>"><?php echo $progress['bookname'];?>(<?php echo $progress['status'] ? '完成' : '连载';?>)</a>
		<br/>
        <?php if (!empty($progress['lastchaptername'])):?>
			最新:<a href="<?php echo url('read', array('bid'=>$progress['bid'],'cid'=>$progress['lastchapterid']));?>"><?php echo $progress['lastchaptername'];?></a>[<?php if ($progress['c']):?>有<span class="next"><?php echo $progress['c'];?></span>章未看<?php else:?><?php if ($progress['status']):?>已看完<?php else:?><span class="f">无新章</span><?php endif;?><?php endif;?>]
            <br/>
            <?php if (!empty($progress['progresschapter'])):?>上次:<a href="<?php echo $progress['progressurl'];?>"><?php echo $progress['progresschapter'];?></a> <?php echo ilink('<span class="next">&gt;&gt;&gt;</span>', url('system',array('s'=>'member','c'=>'my','a'=>'next','bid'=>$progress['bid'],'cid'=>$progress['cid'])));?><br/><?php endif;?>
			时间:<span class="f"><?php echo $progress['updatedate'];?></span>
            <br/>
		<?php endif;?>
        <a href="<?php echo $progress['progressurl'];?>">接上次看</a>|<?php echo ilink('选择书架',url('system',array('s'=>'member','c'=>'bookshelf','a'=>'select','bid'=>$progress['bid'])));?>|<?php echo ilink('前往书会',url('system',array('s'=>'forum','id'=>$progress['bid'])));?>
        </div>
    <?php endforeach;?>
    <div class="search">共<?php echo $pageObj->getTotalRecord();?>本[<?php echo $pageObj->getCurrentPage();?>/<?php echo $pageObj->getTotalPage();?>页]
    <?php echo $pageObj->show();?><?php if ($pageObj->getTotalPage() > 1):?><?php endif;?></div>
<?php endif;?>

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