<?PHP include("./../".$SYSP."/languages/".$tlanguage."/systems.inc.php");?>

<div class="box-body">

<div class="padd-lr10">
<div class="box boxStyle2 infoBox margin-b15">
<div class="padd10t">

<table id="tableN" class="col-md-12">
<tr class='tabTop'>
<td colspan="2"><div class='padd-left10'>

<?PHP 
extract($_POST);
$prgUds=($_POST['prgUds']);
$prgUdb=($_POST['prgUdb']);
$prgUdv=($_POST['prgUdv']);

if($prgUds == ""){$prgUdsX=0;}else{$prgUdsX=1;}
if($prgUdb == ""){$prgUdbX=0;}else{$prgUdbX=1;}
if($prgUdv == ""){$prgUdvX=0;}else{$prgUdvX=1;}
$checkSTx=$prgUdsX + $prgUdbX + $prgUdvX;

$prgUdv1=substr($prgUdv, 0, 1);
$prgUdv2=substr($prgUdv, 1, 1);
$prgUdv3=substr($prgUdv, 2, 3);
$prgUdvX=$prgUdv1.".".$prgUdv2.".".$prgUdv3;

if($checkSTx == 3){

$sourceX="./../".$SYSU."/".$prgUds."_".$prgUdv;
$targetX="./../";

function FolderCopy($sourceY,$targetY){
if(is_dir($sourceY) AND is_string($targetY)){
$sourceY .= (substr($sourceY,-1) == "/" OR substr($sourceY,-1) == "\\") ? "" : "/";
$targetY .= (substr($targetY,-1) == "/" OR substr($targetY,-1) == "\\") ? "" : "/";
if(!file_exists($targetY)){
$oldumask = umask(0);
mkdir($targetY, 0755);
umask($oldumask);
}
if($handle = opendir($sourceY)){
if(!is_bool($handle)){
while(false !== ($found = readdir($handle))){
if($found != '.' AND $found != '..'){
if(is_file($sourceY.$found)){
copy($sourceY.$found,$targetY.$found);
$oldumask = umask(0);
chmod($targetY.$found, 0644);
umask($oldumask);
}
elseif(is_dir($sourceY.$found)){
FolderCopy($sourceY.$found."/",$targetY.$found."/");
}
}
}
}
closedir($handle);
return true;
}
}else{
return false;
}
}
FolderCopy($sourceX,$targetX);

$checkVersX="./../_verscheck.inc.php";
if (file_exists($checkVersX)){unlink($checkVersX);}

echo "
<div class='fwb'>".$$prgUdb.", ".$updatedata1." ".$prgUdvX."</div>
<div class='resT'>".$updatedata14."</div>
<div class='ph15'></div>
<a href='$ilink'>
<div class='vlinkS'>
<i class='hvL fa fa-arrow-circle-right padd-right5'></i>
<span class='hvS'>".$updatedata16."</span>
</div>
</a>
";

}else{

echo "
<div class='resF fwb'>".$updatedata15."</div>
<div class=''>".$updatedata15a."</div>
<div class='ph15'></div>
<a href='$ilink'>
<div class='vlinkS'>
<i class='hvL fa fa-arrow-circle-right padd-right5'></i>
<span class='hvS'>".$back1."</span>
</div>
</a>
";
}
?>
</div>
</td>
</tr>

</table>
<div class="clearX box-footer"></div>
</div>
</div>
</div>

</div>
