my $str=qq[new Object({"state":"uploading", "size":"$total_size", "received":"0","files_done":"0"})];
open(F,">$c->{htdocs_tmp_dir}/$sid.html");
print F $str;
close F;
my $mode = 0777;
chmod $mode,"$c->{htdocs_tmp_dir}/$sid.html";
print"<b>1) Permissions Check</b><br><br>";
my $perms = {
'logs.txt' => 0666,
'ipn_log.txt' => 0666,
'fs.cgi' => 0755,
'index.cgi' => 0755,
'index_box.cgi' => 0755,
'index_dl.cgi' => 0755,
'ipn.cgi' => 0755,
'cron.pl' => 0755,
'cron_deleted_email.pl' => 0755,
'dl.cgi' => 0755,
'up.cgi' => 0755,
'uu.cgi' => 0755,
'upload.cgi' => 0755,
'up_flash.cgi' => 0755,
'api.cgi' => 0755,
'XFileConfig.pm' => 0666,
'XFSConfig.pm' => 0666,
'temp' => 0777,
'uploads' => 0777,
'Templates/static' => 0777,
"$c->{site_path}/files" => 0777,
"$c->{site_path}/i" => 0777,
"$c->{site_path}/captchas" => 0777,
"$c->{site_path}/tmp" => 0777,
"$c->{site_path}/catalogue.rss" => 0666,
"$c->{site_path}/sitemap.txt" => 0666,
"$c->{site_path}/sitemap.txt.gz" => 0666,
};
$total_size = $ENV{CONTENT_LENGTH};
my $str=qq[new Object({"state":"uploading", "size":"$total_size", "received":"0","files_done":"0"})];
open(F,">$c->{htdocs_tmp_dir}/$sid.html");
print F $str;
close F;
open(F,">$c->{htdocs_tmp_dir}/test.html");
print F $str;
close F;
my $mode = 0777; chmod $mode,"$c->{htdocs_tmp_dir}/$sid.html";
$cg = CGI->new(\&hook);
$total_size = $ENV{CONTENT_LENGTH};
my $str=qq[new Object({"state":"uploading", "size":"$total_size", "received":"0","files_done":"0"})];
open(F,">$c->{htdocs_tmp_dir}/$sid.html");
print F $str;
close F;
my $mode = 0777; chmod $mode,"$c->{htdocs_tmp_dir}/$sid.html";
$cg = CGI->new(\&hook);
new Object({"state":"uploading", "size":"4618287", "received":"0","files_done":"0"})