PageRenderTime 299ms CodeModel.GetById 90ms app.highlight 99ms RepoModel.GetById 103ms app.codeStats 0ms

/install.php

https://github.com/mikmagic/sugarcrm_dev
PHP | 587 lines | 423 code | 81 blank | 83 comment | 109 complexity | 19729b83b5d2ea947763f56f264a88e8 MD5 | raw file
  1<?php
  2 if(!defined('sugarEntry'))define('sugarEntry', true);
  3/*********************************************************************************
  4 * SugarCRM Community Edition is a customer relationship management program developed by
  5 * SugarCRM, Inc. Copyright (C) 2004-2011 SugarCRM Inc.
  6 * 
  7 * This program is free software; you can redistribute it and/or modify it under
  8 * the terms of the GNU Affero General Public License version 3 as published by the
  9 * Free Software Foundation with the addition of the following permission added
 10 * to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
 11 * IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
 12 * OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
 13 * 
 14 * This program is distributed in the hope that it will be useful, but WITHOUT
 15 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
 16 * FOR A PARTICULAR PURPOSE.  See the GNU Affero General Public License for more
 17 * details.
 18 * 
 19 * You should have received a copy of the GNU Affero General Public License along with
 20 * this program; if not, see http://www.gnu.org/licenses or write to the Free
 21 * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
 22 * 02110-1301 USA.
 23 * 
 24 * You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
 25 * SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
 26 * 
 27 * The interactive user interfaces in modified source and object code versions
 28 * of this program must display Appropriate Legal Notices, as required under
 29 * Section 5 of the GNU Affero General Public License version 3.
 30 * 
 31 * In accordance with Section 7(b) of the GNU Affero General Public License version 3,
 32 * these Appropriate Legal Notices must retain the display of the "Powered by
 33 * SugarCRM" logo. If the display of the logo is not reasonably feasible for
 34 * technical reasons, the Appropriate Legal Notices must display the words
 35 * "Powered by SugarCRM".
 36 ********************************************************************************/
 37
 38//session_destroy();
 39if (version_compare(phpversion(),'5.2.0') < 0) {
 40	$msg = 'Minimum PHP version required is 5.2.0.  You are using PHP version  '. phpversion();
 41    die($msg);
 42}
 43$session_id = session_id();
 44if(empty($session_id)){
 45	@session_start();
 46}
 47$GLOBALS['installing'] = true;
 48define('SUGARCRM_IS_INSTALLING', $GLOBALS['installing']);
 49$GLOBALS['sql_queries'] = 0;
 50require_once('include/SugarLogger/LoggerManager.php');
 51require_once('sugar_version.php');
 52require_once('include/utils.php');
 53require_once('install/install_utils.php');
 54require_once('install/install_defaults.php');
 55require_once('include/TimeDate.php');
 56require_once('include/Localization/Localization.php');
 57require_once('include/SugarTheme/SugarTheme.php');
 58require_once('include/utils/LogicHook.php');
 59require_once('data/SugarBean.php');
 60require_once('include/entryPoint.php');
 61//check to see if the script files need to be rebuilt, add needed variables to request array
 62    $_REQUEST['root_directory'] = getcwd();
 63    $_REQUEST['js_rebuild_concat'] = 'rebuild';
 64    require_once('jssource/minify.php');
 65
 66$timedate = TimeDate::getInstance();
 67// cn: set php.ini settings at entry points
 68setPhpIniSettings();
 69$locale = new Localization();
 70
 71if(get_magic_quotes_gpc() == 1) {
 72   $_REQUEST = array_map("stripslashes_checkstrings", $_REQUEST);
 73   $_POST = array_map("stripslashes_checkstrings", $_POST);
 74   $_GET = array_map("stripslashes_checkstrings", $_GET);
 75}
 76
 77
 78$GLOBALS['log'] = LoggerManager::getLogger('SugarCRM');
 79$setup_sugar_version = $sugar_version;
 80$install_script = true;
 81
 82///////////////////////////////////////////////////////////////////////////////
 83//// INSTALL RESOURCE SETUP
 84$css = 'install/install.css';
 85$icon = 'include/images/sugar_icon.ico';
 86$sugar_md = 'include/images/sugar_md_open.png';
 87$loginImage = 'include/images/sugarcrm_login.png';
 88$common = 'install/installCommon.js';
 89
 90///////////////////////////////////////////////////////////////////////////////
 91////	INSTALLER LANGUAGE
 92
 93
 94
 95function getSupportedInstallLanguages(){
 96	$supportedLanguages = array(
 97	'en_us'	=> 'English (US)',
 98	);
 99	if(file_exists('install/lang.config.php')){
100		include('install/lang.config.php');
101		if(!empty($config['languages'])){
102			
103			foreach($config['languages'] as $k=>$v){
104				if(file_exists('install/language/' . $k . '.lang.php')){
105					$supportedLanguages[$k] = $v;	
106				}	
107			}	
108		}
109	}
110	return $supportedLanguages;
111}
112$supportedLanguages = getSupportedInstallLanguages();
113
114
115
116
117
118
119
120// after install language is selected, use that pack
121$default_lang = 'en_us';
122if(!isset($_POST['language']) && (!isset($_SESSION['language']) && empty($_SESSION['language']))) {
123	if(isset($_SERVER['HTTP_ACCEPT_LANGUAGE']) && !empty($_SERVER['HTTP_ACCEPT_LANGUAGE'])) {
124		$lang = parseAcceptLanguage();
125		if(isset($supportedLanguages[$lang])) {
126			$_POST['language'] = $lang;
127		} else {
128			$_POST['language'] = $default_lang;
129	    }
130	}
131}
132
133if(isset($_POST['language'])) {
134	$_SESSION['language'] = str_replace('-','_',$_POST['language']);
135}
136
137$current_language = isset($_SESSION['language']) ? $_SESSION['language'] : $default_lang;
138
139if(file_exists("install/language/{$current_language}.lang.php")) {
140	require_once("install/language/{$current_language}.lang.php");
141} else {
142	require_once("install/language/{$default_lang}.lang.php");
143}
144
145if($current_language != 'en_us') {
146	$my_mod_strings = $mod_strings;
147	include('install/language/en_us.lang.php');
148	$mod_strings = sugarArrayMerge($mod_strings, $my_mod_strings);
149}
150////	END INSTALLER LANGUAGE
151///////////////////////////////////////////////////////////////////////////////
152
153//get the url for the helper link
154$help_url = get_help_button_url();
155
156
157
158//if this license print, then redirect and exit,
159if(isset($_REQUEST['page']) && $_REQUEST['page'] == 'licensePrint')
160{
161    include('install/licensePrint.php');
162    exit ();
163}
164
165//check to see if mysqli is enabled
166if(function_exists('mysqli_connect')){
167    $_SESSION['mysql_type'] = 'mysqli';
168}
169
170//if this is a system check, then just run the check and return,
171//this is an ajax call and there is no need for further processing
172if(isset($_REQUEST['checkInstallSystem']) && ($_REQUEST['checkInstallSystem'])){
173    require_once('install/installSystemCheck.php');
174    echo runCheck($install_script, $mod_strings);
175    return;
176}
177
178//if this is a DB Settings check, then just run the check and return,
179//this is an ajax call and there is no need for further processing
180if(isset($_REQUEST['checkDBSettings']) && ($_REQUEST['checkDBSettings'])){
181    require_once('install/checkDBSettings.php');
182    echo checkDBSettings();
183    return;
184}
185
186//maintaining the install_type if earlier set to custom
187if(isset($_REQUEST['install_type']) && $_REQUEST['install_type'] == 'custom'){
188	$_SESSION['install_type'] = $_REQUEST['install_type'];
189}
190
191//set the default settings into session
192foreach($installer_defaults as $key =>$val){
193    if(!isset($_SESSION[$key])){
194        $_SESSION[$key] = $val;
195    }
196}
197
198// always perform
199clean_special_arguments();
200print_debug_comment();
201$next_clicked = false;
202$next_step = 0;
203
204// use a simple array to map out the steps of the installer page flow
205$workflow = array(  'welcome.php',
206                    'ready.php',
207                    'license.php',
208                    'installType.php',
209);
210$workflow[] =  'systemOptions.php';
211$workflow[] = 'dbConfig_a.php';
212//$workflow[] = 'dbConfig_b.php';
213
214//define web root, which will be used as default for site_url
215if($_SERVER['SERVER_PORT']=='80'){
216    $web_root = $_SERVER['SERVER_NAME'].$_SERVER['PHP_SELF'];
217}else{
218    $web_root = $_SERVER['SERVER_NAME'].':'.$_SERVER['SERVER_PORT'].$_SERVER['PHP_SELF'];
219}
220$web_root = str_replace("/install.php", "", $web_root);
221$web_root = "http://$web_root";
222
223 if(!isset($_SESSION['oc_install']) ||  $_SESSION['oc_install'] == false) {
224    $workflow[] = 'siteConfig_a.php';
225    if(isset($_SESSION['install_type'])  && !empty($_SESSION['install_type'])  && $_SESSION['install_type']=='custom'){
226        $workflow[] = 'siteConfig_b.php';
227    }
228 } else {
229    if(is_readable('config.php')) {
230        require_once('config.php');
231    }
232 }
233
234   // set the form's php var to the loaded config's var else default to sane settings
235    if(!isset($_SESSION['setup_site_url'])  || empty($_SESSION['setup_site_url'])){
236        if(isset($sugar_config['site_url']) && !empty($sugar_config['site_url'])){
237            $_SESSION['setup_site_url']= $sugar_config['site_url'];
238        }else{
239         $_SESSION['setup_site_url']= $web_root;
240        }
241    }
242    if(!isset($_SESSION['setup_system_name']) || empty($_SESSION['setup_system_name'])){$_SESSION['setup_system_name'] = 'SugarCRM';}
243    if(!isset($_SESSION['setup_site_session_path']) || empty($_SESSION['setup_site_session_path'])){$_SESSION['setup_site_session_path']                = (isset($sugar_config['session_dir']))   ? $sugar_config['session_dir']  :  '';}
244    if(!isset($_SESSION['setup_site_log_dir']) || empty($_SESSION['setup_site_log_dir'])){$_SESSION['setup_site_log_dir']                     = (isset($sugar_config['log_dir']))       ? $sugar_config['log_dir']      : '.';}
245    if(!isset($_SESSION['setup_site_guid']) || empty($_SESSION['setup_site_guid'])){$_SESSION['setup_site_guid']                        = (isset($sugar_config['unique_key']))    ? $sugar_config['unique_key']   :  '';}
246
247
248
249  $workflow[] = 'confirmSettings.php';
250  $workflow[] = 'performSetup.php';
251
252  if(!isset($_SESSION['oc_install']) ||  $_SESSION['oc_install'] == false){
253    if(isset($_SESSION['install_type'])  && !empty($_SESSION['install_type'])  && $_SESSION['install_type']=='custom'){
254        //$workflow[] = 'download_patches.php';
255        $workflow[] = 'download_modules.php';
256    }
257  }
258
259    $workflow[] = 'register.php';
260
261
262// increment/decrement the workflow pointer
263if(!empty($_REQUEST['goto'])) {
264    switch($_REQUEST['goto']) {
265        case $mod_strings['LBL_CHECKSYS_RECHECK']:
266            $next_step = $_REQUEST['current_step'];
267            break;
268        case $mod_strings['LBL_BACK']:
269            $next_step = $_REQUEST['current_step'] - 1;
270            break;
271        case $mod_strings['LBL_NEXT']:
272        case $mod_strings['LBL_START']:
273            $next_step = $_REQUEST['current_step'] + 1;
274            $next_clicked = true;
275            break;
276        case 'SilentInstall':
277            $next_step = 9999;
278            break;
279		case 'oc_convert':
280            $next_step = 9191;
281            break;
282    }
283}
284// Add check here to see if a silent install config file exists; if so then launch silent installer
285elseif ( is_file('config_si.php') && empty($sugar_config['installer_locked'])) {
286    echo <<<EOHTML
287<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
288<html>
289<head>
290   <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
291   <meta http-equiv="Content-Style-Type" content="text/css">
292   <meta http-equiv="Refresh" content="1; url=install.php?goto=SilentInstall&cli=true">
293   <title>{$mod_strings['LBL_WIZARD_TITLE']} {$mod_strings['LBL_TITLE_WELCOME']} {$setup_sugar_version} {$mod_strings['LBL_WELCOME_SETUP_WIZARD']}</title>
294   <link REL="SHORTCUT ICON" HREF="{$icon}">
295   <link rel="stylesheet" href="{$css}" type="text/css">
296</head>
297<body>
298    <table cellspacing="0" cellpadding="0" border="0" align="center" class="shell">
299    <tr>
300        <td colspan="2" id="help"><a href="{$help_url}" target='_blank'>{$mod_strings['LBL_HELP']} </a></td></tr>
301    <tr>
302      <th width="500">
303		<p>
304		<img src="{$sugar_md}" alt="SugarCRM" border="0">
305		</p>
306		{$mod_strings['LBL_TITLE_WELCOME']} {$setup_sugar_version} {$mod_strings['LBL_WELCOME_SETUP_WIZARD']}</th>
307
308      <th width="200" height="30" style="text-align: right;"><a href="http://www.sugarcrm.com" target="_blank"><IMG src="{$loginImage}" width="145" height="30" alt="SugarCRM" border="0"></a>
309      </th>
310    </tr>
311    <tr>
312      <td colspan="2"  id="ready_image"><IMG src="include/images/install_themes.jpg" width="698" height="247" alt="Sugar Themes" border="0"></td>
313    </tr>
314
315    <tr>
316      <td colspan="2" id="ready">{$mod_strings['LBL_LAUNCHING_SILENT_INSTALL']} </td>
317    </tr>
318    </table>
319</body>
320</html>
321EOHTML;
322    die();
323}
324
325
326
327$exclude_files = array('register.php','download_modules.php');
328
329if(isset($next_step) && isset($workflow[$next_step]) && !in_array($workflow[$next_step],$exclude_files) && isset($sugar_config['installer_locked']) && $sugar_config['installer_locked'] == true) {
330    $the_file = 'installDisabled.php';
331	$disabled_title = $mod_strings['LBL_DISABLED_DESCRIPTION'];
332	$disabled_title_2 = $mod_strings['LBL_DISABLED_TITLE_2'];
333	$disabled_text =<<<EOQ
334		<p>{$mod_strings['LBL_DISABLED_DESCRIPTION']}</p>
335		<pre>
336			'installer_locked' => false,
337		</pre>
338		<p>{$mod_strings['LBL_DISABLED_DESCRIPTION_2']}</p>
339
340		<p>{$mod_strings['LBL_DISABLED_HELP_1']} <a href="{$mod_strings['LBL_DISABLED_HELP_LNK']}" target="_blank">{$mod_strings['LBL_DISABLED_HELP_2']}</a>.</p>
341EOQ;
342}
343else{
344$validation_errors = array();
345// process the data posted
346if($next_clicked) {
347	// store the submitted data because the 'Next' button was clicked
348    switch($workflow[trim($_REQUEST['current_step'])]) {
349        case 'welcome.php':
350        	$_SESSION['language'] = $_REQUEST['language'];
351   			$_SESSION['setup_site_admin_user_name'] = 'admin';
352        break;
353      case 'license.php':
354                $_SESSION['setup_license_accept']   = get_boolean_from_request('setup_license_accept');
355                $_SESSION['license_submitted']      = true;
356
357
358           // eventually default all vars here, with overrides from config.php
359            if(is_readable('config.php')) {
360            	global $sugar_config;
361                include_once('config.php');
362            }
363
364            $default_db_type = 'mysql';
365
366            if(!isset($_SESSION['setup_db_type'])) {
367                $_SESSION['setup_db_type'] = empty($sugar_config['dbconfig']['db_type']) ? $default_db_type : $sugar_config['dbconfig']['db_type'];
368            }
369
370            break;
371        case 'installType.php':
372            $_SESSION['install_type']   = $_REQUEST['install_type'];
373            if(isset($_REQUEST['setup_license_key']) && !empty($_REQUEST['setup_license_key'])){
374                $_SESSION['setup_license_key']  = $_REQUEST['setup_license_key'];
375            }
376            $_SESSION['licenseKey_submitted']      = true;
377
378
379
380            break;
381
382        case 'systemOptions.php':
383            $_SESSION['setup_db_type'] = $_REQUEST['setup_db_type'];
384            $validation_errors = validate_systemOptions();
385            if(count($validation_errors) > 0) {
386                $next_step--;
387            }
388            break;
389
390        case 'dbConfig_a.php':
391            //validation is now done through ajax call to checkDBSettings.php
392            if(isset($_REQUEST['setup_db_drop_tables'])){
393                $_SESSION['setup_db_drop_tables'] = $_REQUEST['setup_db_drop_tables'];
394                if($_SESSION['setup_db_drop_tables']=== true || $_SESSION['setup_db_drop_tables'] == 'true'){
395                    $_SESSION['setup_db_create_database'] = false;
396                }
397            }
398            break;
399
400        case 'siteConfig_a.php':
401            if(isset($_REQUEST['setup_site_url'])){$_SESSION['setup_site_url']          = $_REQUEST['setup_site_url'];}
402            if(isset($_REQUEST['setup_system_name'])){$_SESSION['setup_system_name']    = $_REQUEST['setup_system_name'];}
403            $_SESSION['setup_site_admin_user_name']             = $_REQUEST['setup_site_admin_user_name'];
404            $_SESSION['setup_site_admin_password']              = $_REQUEST['setup_site_admin_password'];
405            $_SESSION['setup_site_admin_password_retype']       = $_REQUEST['setup_site_admin_password_retype'];
406            $_SESSION['siteConfig_submitted']               = true;
407
408            $validation_errors = array();
409            $validation_errors = validate_siteConfig('a');
410            if(count($validation_errors) > 0) {
411                $next_step--;
412            }
413            break;
414        case 'siteConfig_b.php':
415            $_SESSION['setup_site_sugarbeet_automatic_checks'] = get_boolean_from_request('setup_site_sugarbeet_automatic_checks');
416
417            $_SESSION['setup_site_custom_session_path']     = get_boolean_from_request('setup_site_custom_session_path');
418            if($_SESSION['setup_site_custom_session_path']){
419                $_SESSION['setup_site_session_path']            = $_REQUEST['setup_site_session_path'];
420            }else{
421                $_SESSION['setup_site_session_path'] = '';
422            }
423
424            $_SESSION['setup_site_custom_log_dir']          = get_boolean_from_request('setup_site_custom_log_dir');
425            if($_SESSION['setup_site_custom_log_dir']){
426                $_SESSION['setup_site_log_dir']                 = $_REQUEST['setup_site_log_dir'];
427            }else{
428                $_SESSION['setup_site_log_dir'] = '.';
429            }
430
431            $_SESSION['setup_site_specify_guid']            = get_boolean_from_request('setup_site_specify_guid');
432            if($_SESSION['setup_site_specify_guid']){
433                $_SESSION['setup_site_guid']                    = $_REQUEST['setup_site_guid'];
434            }else{
435                $_SESSION['setup_site_guid'] = '';
436            }
437            $_SESSION['siteConfig_submitted']               = true;
438            if(isset($_REQUEST['setup_site_sugarbeet_anonymous_stats'])){
439                $_SESSION['setup_site_sugarbeet_anonymous_stats'] = get_boolean_from_request('setup_site_sugarbeet_anonymous_stats');
440            }else{
441                $_SESSION['setup_site_sugarbeet_anonymous_stats'] = 0;
442            }
443
444            $validation_errors = array();
445            $validation_errors = validate_siteConfig('b');
446            if(count($validation_errors) > 0) {
447                $next_step--;
448            }
449            break;
450}
451    }
452
453if($next_step == 9999) {
454    $the_file = 'SilentInstall';
455}else if($next_step == 9191) {
456	$_SESSION['oc_server_url']	= $_REQUEST['oc_server_url'];
457    $_SESSION['oc_username']    = $_REQUEST['oc_username'];
458    $_SESSION['oc_password']   	= $_REQUEST['oc_password'];
459    $the_file = 'oc_convert.php';
460}
461else{
462        $the_file = $workflow[$next_step];
463
464}
465
466switch($the_file) {
467    case 'welcome.php':
468    case 'license.php':
469			//
470			// Check to see if session variables are working properly
471			//
472			$_SESSION['test_session'] = 'sessions are available';
473        @session_write_close();
474			unset($_SESSION['test_session']);
475        @session_start();
476
477			if(!isset($_SESSION['test_session']))
478			{
479                $the_file = 'installDisabled.php';
480				// PHP.ini location -
481				$phpIniLocation = get_cfg_var("cfg_file_path");
482				$disabled_title = $mod_strings['LBL_SESSION_ERR_TITLE'];
483				$disabled_title_2 = $mod_strings['LBL_SESSION_ERR_TITLE'];
484				$disabled_text = $mod_strings['LBL_SESSION_ERR_DESCRIPTION']."<pre>{$phpIniLocation}</pre>";
485            break;
486			}
487        // check to see if installer has been disabled
488        if(is_readable('config.php') && (filesize('config.php') > 0)) {
489            include_once('config.php');
490
491            if(!isset($sugar_config['installer_locked']) || $sugar_config['installer_locked'] == true) {
492                $the_file = 'installDisabled.php';
493				$disabled_title = $mod_strings['LBL_DISABLED_DESCRIPTION'];
494				$disabled_title_2 = $mod_strings['LBL_DISABLED_TITLE_2'];
495				$disabled_text =<<<EOQ
496					<p>{$mod_strings['LBL_DISABLED_DESCRIPTION']}</p>
497					<pre>
498						'installer_locked' => false,
499					</pre>
500					<p>{$mod_strings['LBL_DISABLED_DESCRIPTION_2']}</p>
501
502					<p>{$mod_strings['LBL_DISABLED_HELP_1']} <a href="{$mod_strings['LBL_DISABLED_HELP_LNK']}" target="_blank">{$mod_strings['LBL_DISABLED_HELP_2']}</a>.</p>
503EOQ;
504		             //if this is an offline client installation but the conversion did not succeed,
505		            //then try to convert again
506					if(isset($sugar_config['disc_client']) && $sugar_config['disc_client'] == true && isset($sugar_config['oc_converted']) && $sugar_config['oc_converted'] == false) {
507			          header('Location: index.php?entryPoint=oc_convert&first_time=true');
508						exit ();
509		            }
510            }
511        }
512        break;
513    case 'register.php':
514        session_unset();
515        break;
516    case 'SilentInstall':
517        $si_errors = false;
518        pullSilentInstallVarsIntoSession();
519        $validation_errors = validate_dbConfig('a');
520        if(count($validation_errors) > 0) {
521            $the_file = 'dbConfig_a.php';
522            $si_errors = true;
523        }
524        $validation_errors = validate_siteConfig('a');
525        if(count($validation_errors) > 0) {
526            $the_file = 'siteConfig_a.php';
527            $si_errors = true;
528        }
529        $validation_errors = validate_siteConfig('b');
530        if(count($validation_errors) > 0) {
531            $the_file = 'siteConfig_b.php';
532            $si_errors = true;
533        }
534
535        if(!$si_errors){
536            $the_file = 'performSetup.php';
537        }
538        //since this is a SilentInstall we still need to make sure that
539        //the appropriate files are writable
540        // config.php
541        make_writable('./config.php');
542
543        // custom dir
544        make_writable('./custom');
545
546        // modules dir
547        recursive_make_writable('./modules');
548
549        // data dir
550        make_writable('./data');
551        make_writable('./data/upload');
552
553        // cache dir
554        make_writable('./cache/custom_fields');
555        make_writable('./cache/dyn_lay');
556        make_writable('./cache/images');
557        make_writable('./cache/import');
558        make_writable('./cache/layout');
559        make_writable('./cache/pdf');
560        make_writable('./cache/upload');
561        make_writable('./cache/xml');
562
563        // check whether we're getting this request from a command line tool
564        // we want to output brief messages if we're outputting to a command line tool
565        $cli_mode = false;
566        if(isset($_REQUEST['cli']) && ($_REQUEST['cli'] == 'true')) {
567            $_SESSION['cli'] = true;
568            // if we have errors, just shoot them back now
569            if(count($validation_errors) > 0) {
570                foreach($validation_errors as $error) {
571                    print($mod_strings['ERR_ERROR_GENERAL']."\n");
572                    print("    " . $error . "\n");
573                    print("Exit 1\n");
574                    exit(1);
575                }
576            }
577        }
578        break;
579	}
580}
581
582
583$the_file = clean_string($the_file, 'FILE');
584// change to require to get a good file load error message if the file is not available.
585require('install/' . $the_file);
586
587?>