Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
ypl_mobile_web
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
邓丽
ypl_mobile_web
Commits
1f064674
Commit
1f064674
authored
Apr 23, 2016
by
庄欣
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
4.23
parent
4367d3b4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
7 deletions
+7
-7
app/functions/functions.php
+7
-7
No files found.
app/functions/functions.php
View file @
1f064674
...
...
@@ -77,16 +77,16 @@ function getCityName ($id,$field = "city_name") {
}
function
list_to_tree
(
$list
,
$pk
=
'id'
,
$pid
=
'pid'
,
$child
=
'child'
,
$root
=
0
)
{
//
创建
Tree
//
����Tr
ee
$tree
=
array
();
if
(
is_array
(
$list
))
{
//
创建基于主键的数组引用
//
����������������������
$refer
=
array
();
foreach
(
$list
as
$key
=>
$data
)
{
$refer
[
$data
[
$pk
]]
=&
$list
[
$key
];
}
foreach
(
$list
as
$key
=>
$data
)
{
//
判断是否存在
parent
//
�ж��Ƿ�����pare
nt
$parentId
=
$data
[
$pid
];
if
(
$root
==
$parentId
)
{
$tree
[]
=&
$list
[
$key
];
...
...
@@ -116,9 +116,9 @@ function getChannelList($lists , $pid = 0,$depth = 0 ,$child = "child") {
$html
.=
">"
;
if
(
$depth
>
0
)
{
if
(
$index
==
$len
-
1
)
{
$pre
=
"
└
"
;
$pre
=
"
��"
;
}
else
{
$pre
=
"
├
"
;
$pre
=
"
��"
;
}
for
(
$i
=
0
;
$i
<
$depth
;
$i
++
){
$space
.=
" "
;
...
...
@@ -149,9 +149,9 @@ function getCateList($lists , $pid = 0,$depth = 0 ,$child = "child") {
$html
.=
">"
;
if
(
$depth
>
0
)
{
if
(
$index
==
$len
-
1
)
{
$pre
=
"
└
"
;
$pre
=
"
��"
;
}
else
{
$pre
=
"
├
"
;
$pre
=
"
��"
;
}
for
(
$i
=
0
;
$i
<
$depth
;
$i
++
){
$space
.=
" "
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment