Exemple #1
0
    $minute = (int) ($span / 60);
    $second = $span % 60;
    if ($timeout == 1) {
        echo "<font size=3 color=red>Analysis takes longer than expected. Process aborted !!!<br/><br/></font>";
    }
    echo "<font size=3 color=\"#9900CC\">time spent in analysis: {$minute} minutes {$second} seconds<br/><br/></font>";
    //fclose($file);
}
$filepath = $dir . "sha1.report.final";
if (file_exists($filepath)) {
    show_text_file($filepath);
}
echo "<br/>";
$filepath = $dir . "gpg.sig.asc";
if (file_exists($filepath)) {
    show_text_file($filepath);
}
echo "<br/>";
echo "<font size=5 color=blue>Settings</br></font>";
echo '<div id="setting" >';
//show_text_file($dir. "analysis_result");
echo '</div>';
echo "<br/>";
echo '<script>';
echo 'function ToggleCodeDisplay()';
echo '{';
echo '	var h = document.getElementById("code");';
echo '  if (h.style.display=="block")   h.style.display="none";';
echo '  else h.style.display="block";';
echo '}';
echo '</script>';
Exemple #2
0
// 	these copied from [php.net/header][1], tested myself - works
header("Expires: Sat, 26 Jul 1997 05:00:00 GMT");
// Some time in the past
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
header("Cache-Control: no-store, no-cache, must-revalidate");
header("Cache-Control: post-check=0, pre-check=0", false);
header("Pragma: no-cache");
include_once "account.php";
if (!CookieAuthenticate($userid, $user_name)) {
    echo "<font size=5 color=red>You need to login first !</font></h1>";
    mylog($_POST["userid"], "view result login faiulre");
    exit(-1);
}
$dir = $root_dir . $userid . "/current";
$real_dir = readlink($dir);
$file = $_GET["file"];
$file = substr($file, 0, strrpos($file, "."));
//	error_log("show_text_file ".$dir.$file."  ==>  ".$real_dir.$file);
if ($file == "code") {
    show_text_file($real_dir . $file, true);
} else {
    show_text_file($real_dir . $file);
}
/*
		$userid = $_GET["id"];
		echo "<h1>Hi</h1>" ;
		echo "<h1>$userid</h1>" ;*/
?>