PHP Code:
function Unlock()
{
global $site_id, $id_connect, $run_mode, $mode, $br;
// unlock site if not normal terminate
if(connection_status())
{
mysql_query('UPDATE '.PHPDIG_DB_PREFIX.'sites SET locked=0 WHERE site_id='.$site_id,$id_connect);
print $br."Site was unlocked".$br;
if ($run_mode == 'http')
{ ?>
<hr />
<a href="index.php" >[<?php phpdigPrnMsg('back') ?>]</a> <?php phpdigPrnMsg('to_admin') ?>.
<?php
if (isset($mode) && isset($site_id) && $mode == 'small') {
print '<br /><a href="update_frame.php?site_id='.$site_id.'" >['.phpdigMsg('back').']</a> '.phpdigMsg('to_update').'.';
}
} else {
print $br;
}
}
return;
}
register_shutdown_function("Unlock");