".__("Cannot find file"). "(".$file_name; echo ")"; } else { if (filesize ($file_name) > 512000) { echo "

".__("File is too large (> 500KB)"). "(".$file_name; echo ")

"; } else { $data = file_get_contents ($file_name); echo "

$file_name (".format_numeric(filesize ($file_name)/1024)." KB)

"; echo "

"; } } } function pandoralogs_extension_main () { global $config; echo "

".__('Extensions'). " » ".__("System logfile viewer"). "

"; echo "

This tool is used just to view your Pandora FMS system logfiles directly from console

"; view_logfile ($config["homedir"]."/pandora_console.log"); view_logfile ("/var/log/pandora/pandora_server.log"); view_logfile ("/var/log/pandora/pandora_server.error"); } add_godmode_menu_option (__('System logfiles'), 'PM','glog',""); add_extension_godmode_function('pandoralogs_extension_main'); ?>