Ejemplo n.º 1
0
 *
 * @author Andrew Nagy
 * @license MPL / GPLv2 / LGPL
 * @package Provisioner
 */
require 'functions.inc';
$endpoint = new endpointmanager();
echo "<html><head><title>Installer</title></head><body>";
if (!function_exists("out")) {
    function out($text)
    {
        echo $text . "<br />";
    }
}
if ($_REQUEST['type'] == "brand") {
    $endpoint->download_brand($_REQUEST['id']);
} elseif ($_REQUEST['type'] == "js-multiple") {
    $list = explode(",", $_REQUEST['id']);
    sort($list, SORT_STRING);
    foreach ($list as $data) {
    }
} elseif ($_REQUEST['type'] == "firmware") {
    $endpoint->install_firmware($_REQUEST['id']);
} elseif ($_REQUEST['type'] == "manual_install") {
    switch ($_REQUEST['install_type']) {
        case "export_brand":
            $sql = 'SELECT `name`, `directory` FROM `endpointman_brand_list` WHERE `id` = ' . $_REQUEST['package'] . '';
            $row = $endpoint->db->getRow($sql, array(), DB_FETCHMODE_ASSOC);
            echo "Exporting " . $row['name'] . "<br/>";
            if (!file_exists(PHONE_MODULES_PATH . "/temp/export/")) {
                mkdir(PHONE_MODULES_PATH . "/temp/export/");