-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy patharchive.php
62 lines (59 loc) · 2.01 KB
/
archive.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
<?php if (!defined('__TYPECHO_ROOT_DIR__')) exit; ?>
<?php $this->need('header.php'); ?>
<?php $totalpages=ceil($this->getTotal() / $this->parameter->pageSize); ?>
<?php if(($this->category == 'touxiang')): //情侣头像分类?>
<div class="avatar box">
<ul>
<?php if ($this->have()): ?>
<?php while($this->next()){
$imgs = getImgs($this);
$nums = count($imgs);
for ($i = 0 ; $i < $nums ; $i ++){ ?>
<li><img class="thumb" src="<?php echo $imgs[$i]; ?>" alt="<?php $this->title() ?>"></li>
<?php } } ?>
<?php else: ?>
<article class="post">
<h2 class="post-title"><?php _e('没有找到内容'); ?></h2>
</article>
<?php endif; ?>
</ul>
</div>
<?php elseif(($this->category == 'qinglv')) : //情侣壁纸分类?>
<div class="gallery box">
<ul>
<?php if ($this->have()): ?>
<?php while($this->next()){
$imgs = getImgs($this);
$nums = count($imgs);
for ($i = 0 ; $i < $nums ; $i ++){ ?>
<li><img class="thumb" src="<?php echo $imgs[$i]; ?>" alt="<?php $this->title() ?>"></li>
<?php } } ?>
<?php else: ?>
<article class="post">
<h2 class="post-title"><?php _e('没有找到内容'); ?></h2>
</article>
<?php endif; ?>
</ul>
</div>
<?php else : //其它分类?>
<div class="gallery box default">
<ul>
<?php if ($this->have()): ?>
<?php while($this->next()){
$imgs = getImgs($this); ?>
<li><img class="thumb" src="<?php echo $imgs[0]; ?>" alt="<?php $this->title() ?>"></li>
<?php } ?>
<?php else: ?>
<article class="post">
<h2 class="post-title"><?php _e('没有找到内容'); ?></h2>
</article>
<?php endif; ?>
</ul>
</div>
<?php endif; ?>
<div class="pager">
<?php $this->pageLink('<span>上一页</span>');?>
<a class="nav_pagenum"><span><?php if($this->_currentPage>1) echo $this->_currentPage; else echo 1;?> / <?php echo ceil($this->getTotal() / $this->parameter->pageSize); ?></span></a>
<?php $this->pageLink('<span>下一页</span>','next');?>
</div>
<?php $this->need('footer.php'); ?>