$where["actif"] = "= '1'"; } $where["group_id"] = "= '{$group->_id}'"; $order = null; if ($order_col == "text") { $order = "text {$order_way}"; } if ($order_col == "type") { $order = "type {$order_way}, text ASC"; } if ($filter) { $functions = $function->seek($filter, $where, "{$page}, {$step}", true, null, $order); $total_functions = $function->_totalSeek; } else { $functions = $function->loadList($where, $order, "{$page}, {$step}"); $total_functions = $function->countList($where); } foreach ($functions as $_function) { $_function->countBackRefs("users"); $_function->countBackRefs("secondary_functions"); } $function_id = CValue::getOrSession("function_id"); // Création du template $smarty = new CSmartyDP(); $smarty->assign("inactif", $inactif); $smarty->assign("functions", $functions); $smarty->assign("total_functions", $total_functions); $smarty->assign("page", $page); $smarty->assign("function_id", $function_id); $smarty->assign("type", $type); $smarty->assign("order_way", $order_way);