Location: PHPKode > scripts > HostBuilder > hostbuilder/install.php
<?php
/*
	HostBuilder
	Free Edition
	(C) 2007-2008 Data Components Software Development

	Installation program
*/

include "templates.php";

if (file_exists(getcwd()."/config.inc")) {
	echo "Configuration is set. Installation terminated.";
	exit;
}

if ($_POST['funcbtn'] == "Install") {
	if ($_POST['commname'] != NULL && $_POST['webspace'] != NULL && $_POST['sizelimit'] != NULL && $_POST['signups'] != NULL && $_POST['filetypes'] != NULL && $_POST['memberdir'] != NULL && $_POST['memberurl'] != NULL && $_POST['inactivity'] != NULL && $_POST['password'] != NULL && $_POST['email'] != NULL && $_POST['accessurl'] != NULL && $_POST['terms'] != NULL) {
		$h = fopen(getcwd()."/config.inc", "w");
		fwrite($h, stripslashes($_POST['commname'])."::".intval($_POST['webspace'])."::".intval($_POST['signups'])."::".intval($_POST['sizelimit'])."::".$_POST['filetypes']."::".$_POST['memberdir']."::".$_POST['memberurl']."::".intval($_POST['inactivity'])."::".md5($_POST['password'])."::".$_POST['email']."::".$_POST['accessurl']);
		fclose($h);
		$h = fopen(getcwd()."/terms.inc", "w");
		fwrite($h, stripslashes($_POST['terms']));
		fclose($h);
		touch(getcwd()."/accounts.db", 0777);
    echo get_raw_tpl("install.complete");
    exit;
	} else {
		$globalmsg = "<center><b><font face=Tahoma>You are missing information! Please fill out the form completely!</font></b></center>";
	}
}

$t['message'] = $globalmsg;
$t['terms'] = "1. Do not spam
2. Do not perform any illegal acts
3. Use this software as is
4. This software and its company will not be held liable for charges
5. Enjoy";
$t['accessurl'] = "http://www.mysite.com/host/";
$t['email'] = "hide@address.com";
$t['password'] = "";
$t['inactivity'] = "14";
$t['memberurl'] = "http://members.mysite.com/";
$t['memberdir'] = getcwd()."/members/";
$t['filetypes'] = "cgi,pl,php,php3,php4,php5,py";
$t['signups'] = "0";
$t['sizelimit'] = "500";
$t['webspace'] = "5000";
$t['commname'] = "";
foreach ($HTTP_POST_VARS as $pn => $pv) {
  $t[$pn] = $pv;
}
echo parse_tpl("install", $t);
?>
Return current item: HostBuilder