require_once("common.php");
require_once("contenthandler.php");
$file = $_GET['file'];
if (!isVarGood($file, false)) {
die("Form variables invalid and/or incomplete!");
}
$db = getDBConnection();
$result = mysql_query("SELECT Creators.username, Approvers.username,timestamp,data FROM History,VerifiedUsers AS Creators,VerifiedUsers AS Approvers WHERE path='" . $file . "' AND Creators.UID=createdbyUID AND Approvers.UID=approvedbyUID ORDER BY timestamp DESC", $db);
if (mysql_affected_rows($db) > 0) {
echo "History for $file
";
while($row = mysql_fetch_row($result)) {
$stuff = htmlize($row[ 3 ]);
echo "$stuff
Submitted by $row[0]; approved by $row[1] at $row[2]
";
}
}
?>