Skip to content
Find file
Fetching contributors…
Cannot retrieve contributors at this time
33 lines (26 sloc) 834 Bytes
<?php
include 'config/phpconf.php';
$file_id = $_GET['file_id'];
$mach_id = $_GET['mach_id'];
$name = $_GET['name'];
$dbh = new PDO($dir) or die("cannot open the database");
$sql = 'SELECT * FROM filehst WHERE file_id=:file_id ORDER BY time DESC';
$stmt = $dbh->prepare($sql);
$stmt->execute(array(':file_id'=>$file_id));
foreach ($stmt->fetchAll() as $row){
$type = $row[2];
$last_update = $row[3];
$hash = $row[4];
if($type == 'N')
$type = 'New';
elseif($type == 'M')
$type = 'Modify';
elseif($type == 'D')
$type = 'Delete';
echo '<tr class="clickable hist" hash="'.$hash.'" name="'.$name.'">';
echo '<td class="highlight">'.$type.'</td>';
echo '<td class="highlight">'.date('Y:m:d H:i:s', $last_update).'</td>';
echo '<td class="highlight">'.$hash.'</td>';
echo '</tr>';
}
?>
Jump to Line
Something went wrong with that request. Please try again.