<?php
if (file_exists($abs1."otd/2.txt"))
{
echo '<body leftMargin=0 id=bod topMargin=0  style="#dcdcdc;overflow:hidden;background:silver;">';
echo '<body><table border=0 style="background:#dcdcdc;width:100%;height:100%;z-index:9999;position:absolute;top:0px;left:0px">
<tr ><td width=30%>&nbsp;</td><td width=30%  valign=top align=center>
<table border=0 width=400 style="background:white" >
<tr><td><IMG height=60 border=0 src="../../../../d~e~f/pas.jpg"></td>
<td  height=30px ><center><b style="color:red" >ATTENTION !'.
'</b></center><br>
<ol>
<li> ADMINISTRATOR closed the site for work on its reorganization!
<li> The site will be available after completion of work!
<li> For information, contact your ADMINISTRATOR!
<li> Close site
<li> Check back later!</ol>
</td></tr>
</table>
</td><td width=30%>&nbsp;</td></tr></table></body></html>';
die;
}


//
//
//

if (isset ($_REQUEST['vers2']))           //
{$vers2=$_REQUEST['vers2'];}          
else
{$vers2="";}

if (isset ($_REQUEST['from_reddoc']))           //
{$from_reddoc=$_REQUEST['from_reddoc'];}          
else
{$from_reddoc="";}


$fv=getcwd ( )."/1s/v.txt";
if (file_exists($fv))              //
{$lp = file($fv); 			       //
foreach ($lp as $lpi => $lpin)     //
{$v=$lpin;
echo '<b id=ver style="display:none">'.$v.'</b>'; 
break;
}}
else                          //
{
echo '<script type="text/javascript">'."\r\n";	
echo 'window.top.document.getElementById("jd").style.display="none";';
echo '</script>';	
echo '<table id=vers  border=0 style="width:100%;height:100%;z-index:3;position:absolute;top:0px;left:0px;">';
echo '<tr ><td width=30%>&nbsp;</td><td width=30%  valign=center align=center>';
echo '<table border=0 width=400 >';
echo '<tr style="background:grey;color:yellow">';
echo '<td  height=30px ><center><b >ATTENTION !</b></center><br>';
echo '<ol>';
echo '<li>An attempt to access a table on the server was rejected!';
echo '<li>Deleted table version file v.txt!';
echo '<li>Close the table and restore the file by copying!';
echo '<li>Click &nbsp;<button style="background:silver;color:yellow" onclick="window.top.close();"> close</button>.';
echo '<li>Restore the file by copying!';
echo '<li>After restoring the file, open the table!';
echo '</ol>';
echo '</td></tr>';
echo '</table>';
echo '</td><td width=30%>&nbsp;</td></tr></table>';
die;
}
if  (!file_exists($abs1.'otd/odin.txt'))  //
{if ($vers2!="" and  $vers2!=$v)          //
{
echo '<script type="text/javascript">'."\r\n";	
echo "window.top.document.getElementById('jd').style.display='none';";
echo "if (window.top.document.getElementById('jd1')!=undefined)";
echo "{window.top.document.getElementById('jd1').style.display='none';}"; 
echo "if (window.top.document.getElementById('jd2')!=undefined)";
echo "{window.top.document.getElementById('jd2').style.display='none';}";
echo '</script>';	

echo '<table id=vers  border=0 style="z-index:99;width:100%;height:100%;z-index:3;position:absolute;
background:white;top:0px;left:0px;">';
echo '<tr ><td width=30%>&nbsp;</td><td width=30%  valign=center align=center>';
echo '<table border=0 width=400 >';
echo '<tr style="background:grey;color:yellow">';
echo '<td  height=30px ><center><b >ATTENTION !</b></center><br>';
echo '<ol>';
echo '<li>An attempt to access a table on the server was rejected!';
echo '<li>The table has a different version than when opened!';
echo '<li>Work has been done to reorganize the table after opening it!';
echo '<li>Recent changes rejected!';
echo '<li>If the administrator has finished, click &nbsp;<button style="background:silver;color:yellow" onclick="window.top.close();">close</button>.';
echo '<li>Reopen the table!';
echo '</ol>';
echo '</td></tr>';
echo '</table>';
echo '</td><td width=30%>&nbsp;</td></tr></table>';
die;
}}