<?php

include 'inc/files/file_scr.php';
include 'inc/files/data_ff.php';
if (!is_file($dir_loads . '/' . $name . '.99.99.jad')) {
    include_once H . 'sys/classes/pclzip.class.php';
    $zip = new PclZip($dir_loads . '/' . $file);
    $content = $zip->extract(PCLZIP_OPT_BY_NAME, "META-INF/MANIFEST.MF", PCLZIP_OPT_EXTRACT_AS_STRING);
    $jad = eregi_replace("(MIDlet-Jar-URL:( )*[^(\n|\r)]*)", NULL, $content[0]['content']);
    $jad = eregi_replace("(MIDlet-Jar-Size:( )*[^(\n|\r)]*)(\n|\r)", NULL, $jad);
    $jad = trim($jad);
    $jad.="\r\nMIDlet-Jar-Size: " . filesize($dir_loads . '/' . $file) . "";
    $jad.="\r\nMIDlet-Jar-URL: $name.jar";
    $jad = br($jad, "\r\n");
    file_put_contents($dir_loads . '/' . $name . '.99.99.jad', $jad);
    @chmod($dir_loads . '/' . $name . '.99.99.jad', 0777);
}

include 'inc/files/opis_ff.php';
include 'inc/files/prosm.php';
include 'inc/files/rating.php';
include 'inc/add_file_loads.php';
include 'inc/files/komm.php';
