if (file_exists("pages/edit.html"))
{
$filepath_init = ("pages/edit.html");
$last_modified = filemtime($filepath_init);
//Last modified Monday, 27th October, 2003 @ 02:59pm
$variable1 = "Submitted: " . date("l, dS F, Y", $last_modified);
$checkvar2 = md5($variable1);
if $checkvar1 == $checkvar2
{echo("You are free to edit.");}
else
{
echo("STOP! Someone has just edited this, page, please reload.");
}
}
Im happy to use a JavaScript equivalent but prefer to stay with this code.
Tags: