<?php

$ver = $_GET[ver];
$updated = false;
$i = 0;

while (!$updated){
	sleep(1);
	if(file_exists("C:\tmp\EnTrak_V".$ver."_src"))$updated = true;
	$i++;
	if($i > 300)break; // break if more than 5 minutes
}

if($updated){
	echo "<h3><center>Updated to version {$ver}";
	echo ("<button onclick='javascript:parent.window.location.reload(true)'>OK</button></center></h3>");
}else{
	echo ("<h3><center>The operation timed out or there was some other problem</center></h3>");
}
exit;





?>