Ejemplo n.º 1
0
if (file_exists(CMbDebug::DEBUG_PATH)) {
    $debug_size = filesize(CMbDebug::DEBUG_PATH);
    $debug_size_limit = CMbDebug::DEBUG_SIZE_LIMIT;
    $offset = -1;
    if ($debug_size > $debug_size_limit) {
        $offset = $debug_size - $debug_size_limit;
    }
    $debug_content = file_get_contents(CMbDebug::DEBUG_PATH, false, null, $offset);
}
// Récupération de la liste des utilisateurs disponibles
$user = new CUser();
$user->template = "0";
$order = "user_last_name, user_first_name";
$list_users = $user->loadMatchingList($order);
// Création du template
$smarty = new CSmartyDP();
$smarty->assign("log", $log_content);
$smarty->assign("log_size", CMbString::toDecaBinary($log_size));
$smarty->assign("debug", $debug_content);
$smarty->assign("debug_size", CMbString::toDecaBinary($debug_size));
$smarty->assign("error_log", $error_log);
$smarty->assign("error_type", $error_type);
$smarty->assign("server_ip", $server_ip);
$smarty->assign("order_by", $order_by);
$smarty->assign("group_similar", $group_similar);
$smarty->assign("error_types", CError::getErrorTypesByCategory());
$smarty->assign("user_id", $user_id);
$smarty->assign("list_users", $list_users);
$smarty->assign("human", $human);
$smarty->assign("robot", $robot);
$smarty->display('view_logs.tpl');