예제 #1
0
파일: list.php 프로젝트: klimjr/cms
// Тип сортировки
$sort_type = Text::get_get('st');
if ($sort_type == '') {
    $sort_type = 'ASC';
}
// Установка группововй таблицы
if (isset($group_table) && $group_table != '' && ($object_list->getBase() instanceof TreeTableGroup || $object_list->getBase() instanceof SimpleTableGroup)) {
    $base->setTableGroupName($group_table);
    $group_data = $object_list->getRow($group_table, $group_id);
    $bread_crumbs[] = array('link' => '/admin/?lang=' . $current_lang . '&action=' . $action . '&do=' . $table . '_list&group_id=' . $group_id, 'name' => $group_data['name']);
    $object_list->setBreadCrumbs($bread_crumbs);
}
if (isset($_GET['search'])) {
    $data = $object_list->searchAllTables($table, Text::get_get('search'), $parent, $page_num, $sort, $sort_type);
} else {
    $data = $object_list->getAdminList($table, $parent, $page_num, $sort, $sort_type);
}
$smarty->assign('count_rows', $object_list->getCount());
// определение постраничной навигации
$pagination = $object_list->getPagination($page_num);
// Обработка данных
$data = $object_list->getAdminListData($table, $data);
// Получение заголовков таблицы
$table_head = $object_list->getTableColumns($table);
//  Получение информации о родителях для хлебных крошек
$breadcrumbs = $object_list->getAdminBreadCrumbs($table, $parent, $action);
//	Массив детей
if ($sort != '') {
    $sort_type = $sort_type == 'ASC' ? 'DESC' : 'ASC';
}
$smarty->assign('table_head', $table_head);