get_session();
$request = http_request::getInstance();
$parm = $request->get_parms('fil', 'log', 'id', 'act');
?>
logfile :
'log', 'o' => 'stdout', 'e' => 'stderr') as $k => $v)
{
$cls = '';
if($k == $parm['log'])
$cls = 'current';
printf("(%s)\n"
, $cls
, urlencode($parm['fil'])
, urlencode($k)
, urlencode($parm['id'])
, $v);
}
?>
get_registry();
$logdir = p4string::addEndSlash($registry->get('GV_RootPath') . 'logs');
$logfile = $logdir . $parm['fil'];
if($parm['log'])
$logfile .= '_' . $parm['log'];
if($parm['id'])
$logfile .= '_' . $parm['id'];
$logfile .= '.log';
if(file_exists($logfile))
{
if($parm['act'] == 'CLR')
{
file_put_contents($logfile, '');
return phrasea::redirect(sprintf("/admin/showlogtask.php?fil=%s&log=%s&id=%s"
, urlencode($parm['fil'])
, urlencode($parm['log'])
, urlencode($parm['id']))
);
}
else
{
printf("%s\n", $logfile);
printf(" effacer\n"
, urlencode($parm['fil'])
, urlencode($parm['log'])
, urlencode($parm['id']));
print("
\n\n");
print(htmlentities(file_get_contents($logfile)));
print("
\n");
}
}
else
{
printf("file %s does not exists
\n", $logfile);
}
?>