|
|
|
@ -221,6 +221,51 @@ class Information_model extends CI_Model
|
|
|
|
|
return $path_list;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 获取当前页面的面包屑,不包括当前节点
|
|
|
|
|
*/
|
|
|
|
|
function get_breadcrumb_data($is_id, $path, $group_map)
|
|
|
|
|
{
|
|
|
|
|
$path_query = $this->HT->query("select
|
|
|
|
|
ic_id, is_id, ic_url,ic_url_title,ic_title,is_path,is_level,ic_status
|
|
|
|
|
from infoStructures a inner join infoContents b on a.is_ic_id=b.ic_id
|
|
|
|
|
where is_id in ($path 0) and is_id <> ? order by is_level asc", array($is_id));
|
|
|
|
|
$path_result = $path_query->result();
|
|
|
|
|
$path_list = [];
|
|
|
|
|
|
|
|
|
|
foreach ($path_result as $path_row) {
|
|
|
|
|
|
|
|
|
|
$ic_url = $path_row->ic_url;
|
|
|
|
|
$ic_url_title = $path_row->ic_url_title;
|
|
|
|
|
|
|
|
|
|
if ($path_row->is_level === 0) {
|
|
|
|
|
if (array_key_exists($path_row->is_id, $group_map)) {
|
|
|
|
|
$top_group = $group_map[$path_row->is_id];
|
|
|
|
|
$path_array = [
|
|
|
|
|
'ic_id' => $path_row->ic_id,
|
|
|
|
|
'is_id' => $path_row->is_id,
|
|
|
|
|
'ic_title' => $path_row->ic_title,
|
|
|
|
|
'ic_url' => $top_group['ic_url'],
|
|
|
|
|
'ic_url_title' => $top_group['ic_url_title']
|
|
|
|
|
];
|
|
|
|
|
$path_list[] = $path_array;
|
|
|
|
|
}
|
|
|
|
|
} else if ($path_row->ic_status === 1) {
|
|
|
|
|
|
|
|
|
|
$path_array = [
|
|
|
|
|
'ic_id' => $path_row->ic_id,
|
|
|
|
|
'is_id' => $path_row->is_id,
|
|
|
|
|
'ic_title' => $path_row->ic_title,
|
|
|
|
|
'ic_url' => $path_row->ic_url,
|
|
|
|
|
'ic_url_title' => $path_row->ic_url_title
|
|
|
|
|
];
|
|
|
|
|
$path_list[] = $path_array;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return $path_list;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//根据路径获取某一级别节点详细页
|
|
|
|
|
function get_detail_by_path($path, $level)
|
|
|
|
|
{
|
|
|
|
|