Example #1
0
File: app.php Project: hflw/lucid
                $files[$file] = jsSearch($path . "/" . $file, $strip);
            } else {
                $files[] = $file;
            }
        }
    }
    return $files;
}
if ($_GET['section'] == "install") {
    $cur = $User->get_current();
    if ($_GET['action'] == "package" && $cur->has_permission("core.app.write")) {
        import("lib.package");
        $out = new textareaOutput();
        if (isset($_FILES['uploadedfile']['name'])) {
            $target_path = '../../tmp/' . $_FILES['uploadedfile']['name'];
            if (move_uploaded_file($_FILES['uploadedfile']['tmp_name'], $target_path) && ($res = package::install($target_path))) {
                $out->append("status", "success");
                $out->append("compatible", package::compatible($res["compatible"]));
            } else {
                $out->append("error", "Problem accessing uploaded file");
            }
        } else {
            $out->append("error", "No File Uploaded");
        }
    }
}
if ($_GET['section'] == "fetch") {
    if ($_GET['action'] == "full") {
        if (isset($_POST['filename'])) {
            $_POST['filename'] = str_replace("..", "", $_POST['filename']);
            $file = $GLOBALS['path'] . "/../desktop/dojotoolkit/lucid/apps/" . $_POST['filename'];
Example #2
0
        $out = new jsonOutput($p);
    }
}
if ($_GET['section'] == "package") {
    import("models.user");
    $cur = $User->get_current();
}
if ($_GET['section'] == "package" && $cur->has_permission("core.administration")) {
    if ($_GET['action'] == "install") {
        import("lib.package");
        $out = new textareaOutput();
        if (isset($_FILES['uploadedfile']['name'])) {
            $_FILES['uploadedfile']['name'] = str_replace("..", "", $_FILES['uploadedfile']['name']);
            $target_path = '../../tmp/' . $_FILES['uploadedfile']['name'];
            if (move_uploaded_file($_FILES['uploadedfile']['tmp_name'], $target_path)) {
                if ($res = package::install($target_path)) {
                    $out->append("status", "success");
                    $out->append("compatible", package::compatible($res["compatible"]));
                } else {
                    $out->append("error", "Problem installing package");
                }
            } else {
                $out->append("error", "Problem accessing uploaded package");
            }
        } else {
            $out->append("error", "No File Uploaded");
        }
    }
    if ($_GET['action'] == "remove") {
        function rmdir_recurse($file)
        {
Example #3
0
    exit;
}
if ($action == "install") {
    $m_name = c_trim($_GET['id']);
    $setup_filename = LITO_ROOT_PATH . "acp/tmp/" . $m_name . "/setup.php";
    if (is_file($setup_filename)) {
        include LITO_ROOT_PATH . "acp/includes/ftp_class.php";
        include LITO_ROOT_PATH . "acp/includes/package_class.php";
        if (!isset($ftp) || !is_a($ftp, 'ftp')) {
            $ftp = new ftp($ftphost, $ftpuser, $ftppassword, $ftproot, $ftpport);
        }
        $pm = new package($m_name, $ftp);
        if (!$pm->initialized) {
            die('Schwerer Fehler!');
        }
        $pm->install();
        $tpl->assign('debug', $pm->debug());
        template_out('action.html', $modul_name);
    } else {
        error_msg("Die Datei " . $setup_filename . "konnte nicht gefunden werden");
        exit;
    }
}
if ($action == "update") {
    $sql = "SELECT * from  cc" . $n . "_modul_admin order by acp_modul";
    $result_modules = $db->query($sql);
    $array = "";
    $out_a = array();
    while ($row = $db->fetch_array($result_modules)) {
        $out_a[] = $row;
        if ($array == "") {