Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
cherry_toto
极致CMS
提交
b6c7b0cc
极
极致CMS
项目概览
cherry_toto
/
极致CMS
通知
3
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
极
极致CMS
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
b6c7b0cc
编写于
1月 04, 2023
作者:
cherry_toto
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
优化链接
上级
5ffcfb01
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
12 addition
and
10 deletion
+12
-10
conf/Functions.php
conf/Functions.php
+12
-10
未找到文件。
conf/Functions.php
浏览文件 @
b6c7b0cc
...
...
@@ -318,7 +318,7 @@ function classTypeData(){
if
(
!
$res
||
!
$cache_time
){
$classtypedata
=
get_classtype_tree
();
$d
=
array
();
$www
=
webConf
(
'domain'
)
?
webConf
(
'domain'
)
:
get_domain
();
$htmlpath
=
webConf
(
'pc_html'
);
$htmlpath
=
(
$htmlpath
==
''
||
$htmlpath
==
'/'
)
?
''
:
'/'
.
$htmlpath
;
foreach
(
$classtypedata
as
$k
=>
$v
){
...
...
@@ -330,7 +330,7 @@ function classTypeData(){
if
(
$file_txt
==
''
){
$file_txt
=
CLASS_HIDE_SLASH
?
$file_txt
:
$file_txt
.
'/'
;
}
$d
[
$v
[
'id'
]][
'url'
]
=
get_domain
()
.
$htmlpath
.
'/'
.
$v
[
'htmlurl'
]
.
$file_txt
;
$d
[
$v
[
'id'
]][
'url'
]
=
$www
.
$htmlpath
.
'/'
.
$v
[
'htmlurl'
]
.
$file_txt
;
}
}
...
...
@@ -349,7 +349,7 @@ function classTypeDataMobile(){
if
(
!
$res
||
!
$cache_time
){
$classtypedata
=
get_classtype_tree
();
$d
=
array
();
$www
=
webConf
(
'domain'
)
?
webConf
(
'domain'
)
:
get_domain
();
$htmlpath
=
webConf
(
'mobile_html'
);
$htmlpath
=
(
$htmlpath
==
''
||
$htmlpath
==
'/'
)
?
''
:
'/'
.
$htmlpath
;
foreach
(
$classtypedata
as
$k
=>
$v
){
...
...
@@ -361,7 +361,7 @@ function classTypeDataMobile(){
if
(
$file_txt
==
''
){
$file_txt
=
CLASS_HIDE_SLASH
?
$file_txt
:
$file_txt
.
'/'
;
}
$d
[
$v
[
'id'
]][
'url'
]
=
get_domain
()
.
$htmlpath
.
'/'
.
$v
[
'htmlurl'
]
.
$file_txt
;
$d
[
$v
[
'id'
]][
'url'
]
=
$www
.
$htmlpath
.
'/'
.
$v
[
'htmlurl'
]
.
$file_txt
;
}
}
...
...
@@ -1048,6 +1048,7 @@ function isWeixin(){
}
//内容url
function
gourl
(
$id
,
$htmlurl
=
null
,
$molds
=
'article'
){
$www
=
webConf
(
'domain'
)
?
webConf
(
'domain'
)
:
get_domain
();
if
(
is_array
(
$id
)){
/**
ownurl target id
...
...
@@ -1057,7 +1058,7 @@ function gourl($id,$htmlurl=null,$molds='article'){
return
$value
[
'target'
];
}
else
{
if
(
$value
[
'ownurl'
]){
return
get_domain
()
.
'/'
.
$value
[
'ownurl'
];
return
$www
.
'/'
.
$value
[
'ownurl'
];
}
}
...
...
@@ -1068,15 +1069,16 @@ function gourl($id,$htmlurl=null,$molds='article'){
$htmlpath
=
(
isMobile
()
&&
webConf
(
'iswap'
)
==
1
)
?
webConf
(
'mobile_html'
)
:
webConf
(
'pc_html'
);
$htmlpath
=
(
$htmlpath
==
''
||
$htmlpath
==
'/'
)
?
''
:
'/'
.
$htmlpath
;
if
(
$htmlurl
!=
null
){
return
get_domain
()
.
$htmlpath
.
'/'
.
$htmlurl
.
'/'
.
$id
.
'.html'
;
return
$www
.
$htmlpath
.
'/'
.
$htmlurl
.
'/'
.
$id
.
'.html'
;
}
$tid
=
M
(
$molds
)
->
getField
(
array
(
'id'
=>
$id
),
'tid'
);
$htmlurl
=
M
(
'classtype'
)
->
getField
(
array
(
'id'
=>
$tid
),
'htmlurl'
);
return
get_domain
()
.
$htmlpath
.
'/'
.
$htmlurl
.
'/'
.
$id
.
'.html'
;
return
$www
.
$htmlpath
.
'/'
.
$htmlurl
.
'/'
.
$id
.
'.html'
;
}
//输出任何模块的内容URL
function
all_url
(
$id
,
$molds
=
'article'
,
$htmlurl
=
null
){
$www
=
webConf
(
'domain'
)
?
webConf
(
'domain'
)
:
get_domain
();
if
(
is_array
(
$id
)){
/**
ownurl target id
...
...
@@ -1086,7 +1088,7 @@ function all_url($id,$molds='article',$htmlurl=null){
return
$value
[
'target'
];
}
else
{
if
(
$value
[
'ownurl'
]){
return
get_domain
()
.
'/'
.
$value
[
'ownurl'
];
return
$www
.
'/'
.
$value
[
'ownurl'
];
}
}
$id
=
$value
[
'id'
];
...
...
@@ -1096,12 +1098,12 @@ function all_url($id,$molds='article',$htmlurl=null){
$htmlpath
=
(
$htmlpath
==
''
||
$htmlpath
==
'/'
)
?
''
:
'/'
.
$htmlpath
;
if
(
$htmlurl
!=
null
){
$file_txt
=
File_TXT_HIDE
?
''
:
'.html'
;
return
get_domain
()
.
$htmlpath
.
'/'
.
$htmlurl
.
'/'
.
$id
.
$file_txt
;
return
$www
.
$htmlpath
.
'/'
.
$htmlurl
.
'/'
.
$id
.
$file_txt
;
}
$tid
=
M
(
$molds
)
->
getField
(
array
(
'id'
=>
$id
),
'tid'
);
$htmlurl
=
M
(
'classtype'
)
->
getField
(
array
(
'id'
=>
$tid
),
'htmlurl'
);
$file_txt
=
File_TXT_HIDE
?
''
:
'.html'
;
return
get_domain
()
.
$htmlpath
.
'/'
.
$htmlurl
.
'/'
.
$id
.
$file_txt
;
return
$www
.
$htmlpath
.
'/'
.
$htmlurl
.
'/'
.
$id
.
$file_txt
;
}
//递增
function
incrData
(
$table
=
null
,
$id
=
0
,
$field
=
'hits'
,
$num
=
1
){
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录