-
Notifications
You must be signed in to change notification settings - Fork 41
Expand file tree
/
Copy patharchive.php
More file actions
40 lines (33 loc) · 1.36 KB
/
Copy patharchive.php
File metadata and controls
40 lines (33 loc) · 1.36 KB
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
<?php
if (!defined('__TYPECHO_ROOT_DIR__')) exit;?>
<?php $this->need('compoment/head.php');?>
<?php
$category = array();
$category['title'] = $this->getArchiveTitle();
if(empty(CategoryEncrypt(categeid($this->getArchiveSlug()))['Cate_Encrypt_Password'])){
$category['md5_password'] = md5Encode('654321');//初始密码,即加密密码没填的情况下的默认密码,可改动
}
else{
$category['md5_password'] = md5Encode(CategoryEncrypt(categeid($this->getArchiveSlug()))['Cate_Encrypt_Password']);
}
$category['type'] = "category";
$category['category'] = $this->getArchiveSlug();
$_POST['data'] = $category;
$password = Typecho_Cookie::get('category_'.$this->getArchiveSlug());
if ((!empty($password) && $password == $category['md5_password']) || $this->user->hasLogin()){
$cookie = true;
}
?>
<?php if(Bsoptions('Cate_Encrypt_open') == true && !empty(CategoryEncrypt(categeid($this->getArchiveSlug()))) && !$cookie):?>
<?php $this->need('modules/lock.php'); ?>
<?php else:?>
<?php if(!empty(CategoryAlbum(categeid($this->getArchiveSlug()))) && $this->is('category')):?>
<?php $this->need('pages/album.php'); ?>
<?php elseif($this->is('author')):?>
<?php $this->need('pages/author.php'); ?>
<?php else:?>
<?php $this->need('pages/archive.php'); ?>
<?php endif; ?>
<?php endif; ?>
<?php $this->need('compoment/sidebar.php'); ?>
<?php $this->need('compoment/foot.php'); ?>