Location: PHPKode > projects > chillyCMS > chillyCMS/installation/install.site.php
<?php
//#################################################################################################
//	Installation site
//#################################################################################################
define('DOIT',true);

require_once('../core/session.install.include.php');
require_once(PATH.'/installation/install.include.php');

if (isset($_POST['installlang'])) { $installlang = $_POST['installlang']; } else { $installlang = 'en'; }
require_once("languages/$installlang.php");

$msg = $default = $printform = false;
isset($_POST['step']) ? $mystep = $_POST['step'] : $mystep = 'step0';
$pagetitle = $l_inst['lbl_installation'].' - ';

//building the form
switch ($mystep) {
	default:
	//default = step0
		$default = true;
	
	//Step 0: select language
	case 'step0':
		//set texts
		$heading = $l_inst['lbl_welcometxt'];
		$stepmenu = '<b>>> </b>'.$l_inst['lbl_step'].'1 >> '.$l_inst['lbl_step'].'2 >> '.$l_inst['lbl_step'].'3 >> '.$l_inst['lbl_finish'];
		$text = $l_inst['lbl_langtxt'];

		//language set? then proceed to next step
		if (isset($_POST["installlang"])) {
			$mystep = 'step1';
		} else {
			$printform = step0();
			$pagetitle .= $l_inst['lbl_welcome'];
			break;
		}
	
	//Step 1: database setup
	case 'step1':
		$heading = $l_inst['lbl_step'].' '.$l_inst['lbl_dbset'];
		$stepmenu = '<b>>> '.$l_inst['lbl_step'].'1 >> </b>'.$l_inst['lbl_step'].'2 >> '.$l_inst['lbl_step'].'3 >> '.$l_inst['lbl_finish'];
		$text = $l_inst['txt_patient'];

		if (step1($printform,$msg)) {
			$mystep = 'step2';
		} else {
			$pagetitle .= $l_inst['lbl_step'].'1';
			break;
		}
		
	//Step 2: admin user setup
	case 'step2':
		$heading = $l_inst['lbl_step'].' '.$l_inst['lbl_adminset'];
		$stepmenu = '<b>>> '.$l_inst['lbl_step'].'1 >> '.$l_inst['lbl_step'].'2 >> </b>'.$l_inst['lbl_step'].'3 >> '.$l_inst['lbl_finish'];
		$text = $l_inst['lbl_admintxt'];

		if (step2($printform,$msg)) {
			$mystep = 'step3';
		} else {
			$pagetitle .= $l_inst['lbl_step'].'2';
			break;
		}
		
	//Step 3: page setup & testdata
	case 'step3':
		$heading = $l_inst['lbl_step'].' '.$l_inst['lbl_siteset'];
		$stepmenu = '<b>>> '.$l_inst['lbl_step'].'1 >> '.$l_inst['lbl_step'].'2 >> '.$l_inst['lbl_step'].'3 >> </b>'.$l_inst['lbl_finish'];
		$text = $l_inst['lbl_sitetxt'];
		
		if (step3($printform,$msg)) {
			$mystep = 'complete';
		} else {
			$pagetitle .= $l_inst['lbl_step'].' '.$l_inst['lbl_siteset'];
			break;
		}

	case 'complete':
		$pagetitle .= $l_inst['lbl_complete'];
		$heading = $l_inst['lbl_complete'];
		$stepmenu = '<b>>> '.$l_inst['lbl_step'].'1 >> '.$l_inst['lbl_step'].'2 >> '.$l_inst['lbl_step'].'3 >> '.$l_inst['lbl_finish'].'</b>';
		$text = $l_inst['lbl_completetxt'];
		
		complete($printform,$msg);
		break;	
}

$headings = '<h1>'.$heading.'</h1><br />'.
"<p class='stepmenu $mystep'>".$stepmenu.'</p><br /><br />'.
'<p>'.$text.'</p><br /><br />'.
$printform.'<div class="clr backendbottom"></div></div>';

$page->title = $pagetitle;
$page->print_head();
$page->add($headings);
$page->print_body($msg);
?>
Return current item: chillyCMS