<?
include ( "Config.php" );
$FileA = explode ( '\\' , $File1 );
$AnteprimaA = explode ( '\\' , $Anteprima );
if ( $File1 == "" || $Anteprima == "" )
GoToAdmin ( $SalvaPHP[4] );
$a = explode ( "." , $FileA[count($FileA)-1] );
$b = explode ( "." , $AnteprimaA[count($AnteprimaA)-1] );
$ControlloA = 0;
$ControlloB = 0;
for ( $i = 0 ; $i < count ($Tipi) ; $i++ )
{
if ( $a[count($a)-1] == $Tipi[$i] )
$ControlloA++;
if ( $b[count($b)-1] == $Tipi[$i] )
$ControlloB++;
}
if ( $ControlloA == 0 )
GoToAdmin ( $SalvaPHP[2] );
if ( $ControlloB == 0 )
GoToAdmin ( $SalvaPHP[3] );
$destination_file = $PosScript.$ImgDir."/".$FileA[count($FileA)-1];
copy ($File1, $destination_file);
$destination_file = $PosScript.$ImgDir."/".$PrewDir."/".$AnteprimaA[count($AnteprimaA)-1];
copy ($Anteprima, $destination_file);
$File[$Tot] = $FileA[count($FileA)-1]."|".$AnteprimaA[count($AnteprimaA)-1];
$Tot++;
$Msg = '<? $Tot = '.$Tot.'; $File = Array ( ';
for ( $i = 0 ; $i < $Tot ; $i++ )
$Msg = $Msg.'"'.$File[$i].'" , ';
$Msg = $Msg.'"%END%" ); ?>';
$file = fopen ( "Archivio.php","w+" );
fputs( $file , $Msg );
fclose ( $file );
?>
<script language = "JavaScript">
timer = setTimeout("GoToAdmin()", 3000);
function GoToAdmin()
{
location.href = "Admin.php?id=_OK";
}
</script>
<br><br><br><br>
<table border = "0" bgcolor = "#3A88FF" align = "Center">
<tr><td>
<br><br><br>
<? echo $SalvaPHP[0]; ?>
<br><br><br><br>
</td></tr>
</table>