<?php
/**
* Z-Blog with PHP
* @author
* @copyright (C) RainbowSoft Studio
* @version 2.0 2013-06-14
*/
################################################################################################################
function GetPost($idorname, $option = null) {
global $zbp;
if (!is_array($option)) {
$option = array();
}
if (!isset($option['only_article']))
$option['only_article'] = false;
if (!isset($option['only_page']))
$option['only_page'] = false;
if(is_string($idorname)){
$w[] = array('array', array(array('log_Alias', $idorname), array('log_Title', $idorname)));
if($option['only_article']==true){
$w[]=array('=','log_Type','0');
}
elseif($option['only_page']==true){
$w[]=array('=','log_Type','1');
}
$articles = $zbp->GetPostList('*', $w, null, 1, null);
if (count($articles) == 0) {
return new Post;
}
return $articles[0];
}
if(is_integer($idorname)){
return $zbp->GetPostByID($idorname);
}
}
function GetList($count = 10, $cate = null, $auth = null, $date = null, $tags = null, $search = null, $option = null) {
global $zbp;
if (!is_array($option)) {
$option = array();
}
if (!isset($option['only_ontop']))
$option['only_ontop'] = false;
if (!isset($option['only_not_ontop']))
$option['only_not_ontop'] = false;
if (!isset($option['has_subcate']))
$option['has_subcate'] = false;
if (!isset($option['is_related']))
$option['is_related'] = false;
if ($option['is_related']) {
$at = $zbp->GetPostByID($option['is_related']);
$tags = $at->Tags;
if (!$tags)
return array();
$count = $count + 1;
}
if ($option['only_ontop'] == true) {
$w[] = array('=', 'log_IsTop', 0);
} elseif ($option['only_not_ontop'] == true) {
$w[] = array('=', 'log_IsTop', 1);
}
$w = array();
$w[] = array('=', 'log_Status', 0);
$articles = array();
if ($cate) {
$category = new Category;
$category = $zbp->GetCategoryByID($cate);
if ($category->ID > 0) {
if (!$option['has_subcate']) {
$w[] = array('=', 'log_CateID', $category->ID);
} else {
$arysubcate = array();
$arysubcate[] = array('log_CateID', $category->ID);
foreach ($zbp->categorys[$category->ID]->SubCategorys as $subcate) {
$arysubcate[] = array('log_CateID', $subcate->ID);
}
$w[] = array('array', $arysubcate);
}
}
}
if ($auth) {
$author = new Member;
$author = $zbp->GetMemberByID($auth);
if ($author->ID > 0) {
$w[] = array('=', 'log_AuthorID', $author->ID);
}
}
if ($date) {
$datetime = strtotime($date);
if ($datetime) {
$datetitle = str_replace(array('%y%', '%m%'), array(date('Y', $datetime), date('n', $datetime)), $zbp->lang['msg']['year_month']);
$w[] = array('BETWEEN', 'log_PostTime', $datetime, strtotime('+1 month', $datetime));
}
}
if ($tags) {
$tag = new Tag;
if (is_array($tags)) {
$ta = array();
foreach ($tags as $t) {
$ta[] = array('log_Tag', '%{' . $t->ID . '}%');
}
$w[] = array('array_like', $ta);
unset($ta);
} else {
if (is_int($tags)) {
$tag = $zbp->GetTagByID($tags);
} else {
$tag = $zbp->GetTagByAliasOrName($tags);
}
if ($tag->ID > 0) {
$w[] = array('LIKE', 'log_Tag', '%{' . $tag->ID . '}%');
}
}
}
if ($search) {
$w[] = array('search', 'log_Content', 'log_Intro', 'log_Title', $search);
}
$articles = $zbp->GetArticleList('*', $w, array('log_PostTime' => 'DESC'), $count, null, false);
if ($option['is_related']) {
foreach ($articles as $k => $a) {
if ($a->ID == $option['is_related'])
unset($articles[$k]);
}
if (count($articles) == $count)
$articles = array_pop($articles);
}
return $articles;
}
################################################################################################################
function VerifyLogin() {
global $zbp;
if (isset($zbp->membersbyname[GetVars('username', 'POST')])) {
if ($zbp->Verify_MD5(GetVars('username', 'POST'), GetVars('password', 'POST'))) {
$un = GetVars('username', 'POST');
$ps = md5($zbp->user->Password . $zbp->guid);
if (GetVars('savedate') == 0) {
setcookie("username", $un, 0, $zbp->cookiespath);
setcookie("password", $ps, 0, $zbp->cookiespath);
} else {
setcookie("username", $un, time() + 3600 * 24 * GetVars('savedate', 'POST'), $zbp->cookiespath);
setcookie("password", $ps, time() + 3600 * 24 * GetVars('savedate', 'POST'), $zbp->cookiespath);
}
return true;
} else {
$zbp->ShowError(8, __FILE__, __LINE__);
}
} else {
$zbp->ShowError(8, __FILE__, __LINE__);
}
}
function Logout() {
global $zbp;
setcookie('username', '', time() - 3600, $zbp->cookiespath);
setcookie('password', '', time() - 3600, $zbp->cookiespath);
}
################################################################################################################
function ViewAuto($inpurl) {
global $zbp;
if ($zbp->option['ZC_STATIC_MODE'] == 'ACTIVE') {
$zbp->ShowError(2, __FILE__, __LINE__);
return null;
}
$url=GetValueInArray(explode('?',$inpurl),'0');
if($zbp->cookiespath === substr($url, 0 , strlen($zbp->cookiespath)))
$url = substr($url, strlen($zbp->cookiespath));
if (isset($_SERVER['SERVER_SOFTWARE'])) {
if ((strpos($_SERVER['SERVER_SOFTWARE'], 'Microsoft-IIS') !== false) && (isset($_GET['rewrite']) == true)){
//iis+httpd.ini下如果存在真实文件
$realurl = $zbp->path . urldecode($url);
if(is_readable($realurl)&&is_file($realurl)){
die(file_get_contents($realurl));
}
unset($realurl);
}
}
$url = urldecode($url);
$r = UrlRule::Rewrite_url($zbp->option['ZC_INDEX_REGEX'], 'index');
$m = array();
if (preg_match($r, $url, $m) == 1) {
ViewList($m[1], null, null, null, null, true);
return null;
}
$r = UrlRule::Rewrite_url($zbp->option['ZC_DATE_REGEX'], 'date');
$m = array();
if (preg_match($r, $url, $m) == 1) {
ViewList($m[2], null, null, $m[1], null, true);
return null;
}
$r = UrlRule::Rewrite_url($zbp->option['ZC_AUTHOR_REGEX'], 'auth');
$m = array();
if (preg_match($r, $url, $m) == 1) {
ViewList($m[2], null, $m[1], null, null, true);
return null;
}
$r = UrlRule::Rewrite_url($zbp->option['ZC_TAGS_REGEX'], 'tags');
$m = array();
if (preg_match($r, $url, $m) == 1) {
ViewList($m[2], null, null, null, $m[1], true);
return null;
}
$r = UrlRule::Rewrite_url($zbp->option['ZC_CATEGORY_REGEX'], 'cate');
$m = array();
if (preg_match($r, $url, $m) == 1) {
$result = ViewList($m[2], $m[1], null, null, null, true);
if ($result <> ZC_REWRITE_GO_ON)
return null;
}
$r = UrlRule::Rewrite_url($zbp->option['ZC_ARTICLE_REGEX'], 'article');
$m = array();
if (preg_match($r, $url, $m) == 1) {
if (strpos($zbp->option['ZC_ARTICLE_REGEX'], '{%id%}') !== false) {
$result = ViewPost($m[1], null, true);
} else {
$result = ViewPost(null, $m[1], true);
}
if ($result == ZC_REWRITE_GO_ON)
$zbp->ShowError(2, __FILE__, __LINE__);
return null;
}
$r = UrlRule::Rewrite_url($zbp->option['ZC_PAGE_REGEX'], 'page');
$m = array();
if (preg_match($r, $url, $m) == 1) {
if (strpos($zbp->option['ZC_PAGE_REGEX'], '{%id%}') !== false) {
$result = ViewPost($m[1], null, true);
} else {
$result = ViewPost(null, $m[1], true);
}
if ($result == ZC_REWRITE_GO_ON)
$zbp->ShowError(2, __FILE__, __LINE__);
return null;
}
if($url==''||$url=='index.php'){
return ViewList(null,null,null,null,null);
}
foreach ($GLOBALS['Filter_Plugin_ViewAuto_End'] as $fpname => &$fpsignal) {
$fpreturn = $fpname($url);
if ($fpsignal == PLUGIN_EXITSIGNAL_RETURN) {
return $fpreturn;
}
}
$zbp->ShowError(2, __FILE__, __LINE__);
}
function ViewList($page, $cate, $auth, $date, $tags, $isrewrite = false) {
globa
没有合适的资源?快使用搜索试试~ 我知道了~
基于PHP的zblogPHP php博客程序.zip
![preview](https://csdnimg.cn/release/downloadcmsfe/public/img/white-bg.ca8570fa.png)
共678个文件
png:264个
php:241个
gif:61个
![preview-icon](https://csdnimg.cn/release/downloadcmsfe/public/img/scale.ab9e0183.png)
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 35 浏览量
2023-07-24
21:58:56
上传
评论
收藏 2.22MB ZIP 举报
温馨提示
基于PHP的zblogPHP php博客程序.zip
资源推荐
资源详情
资源评论
![thumb](https://img-home.csdnimg.cn/images/20210720083646.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![rar](https://img-home.csdnimg.cn/images/20210720083606.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![rar](https://img-home.csdnimg.cn/images/20210720083606.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![rar](https://img-home.csdnimg.cn/images/20210720083606.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
收起资源包目录
![package](https://csdnimg.cn/release/downloadcmsfe/public/img/package.f3fc750b.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/GIF.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/GIF.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/GIF.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/GIF.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/GIF.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/GIF.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/GIF.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/GIF.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/GIF.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/GIF.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/GIF.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/GIF.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/GIF.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/GIF.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/GIF.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/GIF.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/GIF.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/GIF.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/GIF.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/GIF.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/GIF.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/GIF.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/GIF.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/GIF.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/GIF.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/GIF.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/GIF.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/GIF.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/GIF.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/GIF.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/GIF.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/GIF.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/GIF.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/GIF.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/GIF.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/GIF.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/GIF.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/GIF.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/GIF.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/GIF.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/GIF.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/GIF.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/GIF.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/GIF.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/GIF.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/GIF.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/GIF.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/GIF.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/GIF.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/GIF.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/GIF.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/GIF.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/GIF.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/GIF.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/GIF.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/GIF.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/GIF.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/GIF.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/GIF.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/GIF.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/GIF.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/HTML.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/HTML.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/HTML.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/HTML.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/HTML.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/HTML.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/HTML.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/HTML.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/HTML.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/HTML.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/HTML.png)
共 678 条
- 1
- 2
- 3
- 4
- 5
- 6
- 7
资源评论
![avatar-default](https://csdnimg.cn/release/downloadcmsfe/public/img/lazyLogo2.1882d7f4.png)
![avatar](https://profile-avatar.csdnimg.cn/ff1da12a7f324b6098abfc954947719c_weixin_39827856.jpg!1)
助力毕业
- 粉丝: 2182
- 资源: 5146
上传资源 快速赚钱
我的内容管理 展开
我的资源 快来上传第一个资源
我的收益
登录查看自己的收益我的积分 登录查看自己的积分
我的C币 登录后查看C币余额
我的收藏
我的下载
下载帮助
![voice](https://csdnimg.cn/release/downloadcmsfe/public/img/voice.245cc511.png)
![center-task](https://csdnimg.cn/release/downloadcmsfe/public/img/center-task.c2eda91a.png)
最新资源
- 基于MFC恶意文件检测系统 框架 vs2022 + c/c++ + hook + PE + inject + 动态调试工具Imm
- 基于MFC恶意文件检测系统框架 vs2022 + c/c++ + hook + PE + inject + 动态调试工具Imm
- 八路抢答器电子工艺实习报告
- 5积分 MongoDB V3.6.32 Plus(SSL) For Windows
- 大学生方程式赛车设计(总体设计)
- 【哈工大计算机系统】CSAPP计统大作业
- 音视频对齐python脚本
- Tkinter简易版学生信息管理系统源码+数据库配置文件
- Advanced Sniper Starter kit v4.3.unitypackage
- tensorflow-gpu-2.8.3-cp37-cp37m-win-amd64.whl
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
![feedback](https://img-home.csdnimg.cn/images/20220527035711.png)
![feedback](https://img-home.csdnimg.cn/images/20220527035711.png)
![feedback-tip](https://img-home.csdnimg.cn/images/20220527035111.png)
安全验证
文档复制为VIP权益,开通VIP直接复制
![dialog-icon](https://csdnimg.cn/release/downloadcmsfe/public/img/green-success.6a4acb44.png)