0){
        $offset = strpos($r[3], '"', $dl);
        //echo $dl." - ".$offset." - ".str_replace('download.php?file=','',substr($r[3], $dl, $offset-$dl))."
\n";
        $filePath = str_replace("//","/", "../../docs/".str_replace('download.php?file=','',substr($r[3], $dl, $offset-$dl)));
        $filePathInfo = pathinfo($filePath);
        if(file_exists($filePath)){
            //print_r($filePathInfo);
            //echo filesize($filePath)."\n
";
            $filename = $cnt.'_'.preg_replace('/[^a-zA-Z0-9\-\._]/','', $filePathInfo['basename']);
            $filesize = (filesize($filePath) < 1000000) ? round(filesize($filePath) / 1000)."k" : round(filesize($filePath) / 1000000)."M";
            $title = "Scarica la relativa circolare";
            $path = '../../docs/files/news';
            copy($filePath, "$path/$filename");
            $query.="INSERT INTO files VALUES($cnt, '$title', '$filename', '".$path."', '".$r[1]."', '$filesize');\n";
            $append[$index] = $cnt;
            $cnt++;
        }
        $r[3]=substr($r[3],0,strpos($r[3],'