Commit 1f064674 by 庄欣

4.23

parent 4367d3b4
......@@ -77,16 +77,16 @@ function getCityName ($id,$field = "city_name") {
}
function list_to_tree($list, $pk='id', $pid = 'pid', $child = 'child', $root = 0) {
// 创建Tree
// ����Tree
$tree = array();
if(is_array($list)) {
// 创建基于主键的数组引用
// ����������������������
$refer = array();
foreach ($list as $key => $data) {
$refer[$data[$pk]] =& $list[$key];
}
foreach ($list as $key => $data) {
// 判断是否存在parent
// �ж��Ƿ�����parent
$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 .= "&nbsp;&nbsp;";
......@@ -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 .= "&nbsp;&nbsp;";
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment