Esempio n. 1
0
                $serverfile = server::createServer($server_type);
                $can_create_subs = $serverfile->subdomains;
                if ($can_create_subs == false) {
                    $maincontent = main::table("Subdomain Error", "Sorry, but the server for this package doesn't allow subdomains to be used without a unique domain present on the account.  If you'd like to\n                                                                   use a domain, please go back and select the domain option.");
                } else {
                    $subdomains_query = $dbh->select("subdomains", array("server", "=", $server_type), array("subdomain", "ASC"), 0, 1);
                    while ($subdomains_data = $dbh->fetch_array($subdomains_query)) {
                        $subdomains[] = array($subdomains_data['domain'], $subdomains_data['domain']);
                    }
                    if ($postvar['csub2']) {
                        $subtld = $postvar['csub2'];
                    } else {
                        $subtld = $subdomains[0]['domain'];
                    }
                    $subdomain_array['SUBDOMTLDLIST'] = main::dropdown("csub2", $subdomains, $subtld);
                    $order_form_array['DOMORSUB'] = style::replaceVar("tpl/order/subdomain.tpl", $subdomain_array);
                }
            }
        }
    }
    //Spit out the page
    if (!$maincontent) {
        $maincontent = style::replaceVar("tpl/order/order-form.tpl", $order_form_array);
    }
    echo '<div>';
    echo $maincontent;
    echo '</div>';
}
echo '</div>';
echo style::get("footer.tpl");
include INC . "/output.php";
Esempio n. 2
0
    unset($sql);
    require $link;
    if (isset($sql)) {
        $db = new db();
    }
}
$disable = false;
if ($sql['install'] == 'true') {
    if (!writeconfig($sql['host'], $sql['user'], $sql['pass'], $sql['db'], $sql['pre'], "false")) {
        $array['ANYTHING'] = "Your {$link} isn't writeable or does not exist! Please CHMOD it to 666 and make sure it exists!";
        $disable = true;
    } else {
        $array['ANYTHING'] = "Since you've already ran the installer, your config has been re-written to the \"not installed\" state. If you are upgrading, this is normal.";
    }
}
if (!file_exists($link)) {
    $array["ANYTHING"] = "Your {$link} file doesn't exist! Please create it as a blank file and CHMOD it to 666!";
    $disable = true;
} elseif (!is_writable($link)) {
    $array["ANYTHING"] = "Your {$link} isn't writeable! Please CHMOD it to 666!";
    $disable = true;
}
echo $style->get("header.tpl");
if ($disable) {
    echo '<script type="text/javascript">$(function(){$(".twobutton").attr("disabled", "true");$("#method").attr("disabled", "true");});</script>';
}
$array["GENERATED_URL"] = generateSiteUrl();
echo $style->replaceVar("tpl/install/install.tpl", $array);
echo $style->get("footer.tpl");
include LINK . "output.php";
#Output it