File size: 1.76Kb
<?php header("Content-type: text/vnd.wap.wml; charset=utf-8"); $errors=0;
$name="zip/temp.zip";
@copy($adr,$name) or die("not ".$adr.". XZ<br/><anchor>beck<prev/></anchor></p></card></wml>");
echo "<?xml version=\"1.0\" encoding=\"utf-8\"?>";?> <!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN" "http://www.wapforum.org/DTD/wml_1.1.xml"><wml><card title="Result"> <p align="left"><?php $c=@ftp_connect($s) or die("ftp error<br/><anchor>beck<prev/></anchor></p></card></wml>"); $login=@ftp_login($c,$l,$p) or die("login or pass incorrect<br/><anchor>beck<prev/></anchor></p></card></wml>"); @ftp_chdir($c,$f) or die("dir $f false<br/><anchor>beck<prev/></anchor></p></card></wml>"); $zip=@zip_open($name) or die("unzip error<br/><anchor>beck<prev/></anchor></p></card></wml>"); if($zip)
{
while($zipe=@zip_read($zip)) { $im=zip_entry_name($zipe); $r3=zip_entry_filesize($zipe); if($r3!=0) { if(zip_entry_open($zip,$zipe,"r")) { $buf=zip_entry_read($zipe,zip_entry_filesize($zipe)); } $imja=explode("/",$im); for($a=1;$a<100;$a++) { $b=$a+1; if($imja[$a] and !$imja[$b]) { $nd=$a; $m=$imja[$a]; } } $v=date("dmiY"); $h="temp/".$v; $ta=fopen($h,"w"); fputs($ta,"$buf"); @fclose($ta); if($nd) { for($i="0";$i<$nd;$i++)
{
if(@ftp_mkdir($c,$imja[$i])) { @ftp_chdir($c,$imja[$i]); }
else { @ftp_chdir($c,$imja[$i]); }
} @ftp_put($c,$m,$h,FTP_BINARY) or $errors++;
@ftp_chdir($c,$f); } else { $m=$im; @ftp_put($c,$m,$h,FTP_BINARY) or $errors++; } unlink("$h"); } } } echo "unzip finish. ".$errors." errors.<br/>-<br/>"; @ftp_close($c); echo "<a href=\"../creator/a.php?s=$s&u=$l&p=$p&d=$f&c=m\">meneger</a><br/>"; ?><anchor title="Back">:Beck<prev/></anchor><br/>-<br/><?php ?><br/>-<br/><do type="options" label="beck"><prev/></do><do type="accept" label=""><noop/></do></p></card></wml>