<?php
    $filename = $_POST['filename'];
	$dir = "images/tmp/";
	$filename_tmp = $dir.$filename."_tmp";
    $data = date("y-m-d h:i:s");
    $auto = $_POST['auto'];        
	require_once("lib.php");
	checkState($filename, $auto);
	if($auto){
		file_put_contents($filename_tmp, $data);		
	}
?>