init
This commit is contained in:
191
install/TeamDemoData.php
Normal file
191
install/TeamDemoData.php
Normal file
@@ -0,0 +1,191 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* SugarCRM Community Edition is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2011 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
|
||||
|
||||
|
||||
|
||||
class TeamDemoData {
|
||||
var $_team;
|
||||
var $_large_scale_test;
|
||||
|
||||
var $guids = array(
|
||||
'jim' => 'seed_jim_id',
|
||||
'sarah' => 'seed_sarah_id',
|
||||
'sally' => 'seed_sally_id',
|
||||
'max' => 'seed_max_id',
|
||||
'will' => 'seed_will_id',
|
||||
'chris' => 'seed_chris_id',
|
||||
/*
|
||||
* Pending fix of demo data mechanism
|
||||
'jim' => 'jim00000-0000-0000-0000-000000000000',
|
||||
'sarah' => 'sarah000-0000-0000-0000-000000000000',
|
||||
'sally' => 'sally000-0000-0000-0000-000000000000',
|
||||
'max' => 'max00000-0000-0000-0000-000000000000',
|
||||
'will' => 'will0000-0000-0000-0000-000000000000',
|
||||
'chris' => 'chris000-0000-0000-0000-000000000000',
|
||||
*/
|
||||
);
|
||||
|
||||
/**
|
||||
* Constructor for creating demo data for teams
|
||||
*/
|
||||
function TeamDemoData($seed_team, $large_scale_test = false)
|
||||
{
|
||||
$this->_team = $seed_team;
|
||||
$this->_large_scale_test = $large_scale_test;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
function create_demo_data() {
|
||||
global $current_language;
|
||||
global $sugar_demodata;
|
||||
foreach($sugar_demodata['teams'] as $v)
|
||||
{
|
||||
if (!$this->_team->retrieve($v['team_id']))
|
||||
$this->_team->create_team($v['name'], $v['description'], $v['team_id']);
|
||||
}
|
||||
|
||||
if($this->_large_scale_test)
|
||||
{
|
||||
$team_list = $this->_seed_data_get_team_list();
|
||||
foreach($team_list as $team_name)
|
||||
{
|
||||
$this->_quick_create($team_name);
|
||||
}
|
||||
}
|
||||
|
||||
$this->add_users_to_team();
|
||||
}
|
||||
|
||||
function add_users_to_team() {
|
||||
// Create the west team memberships
|
||||
$this->_team->retrieve("West");
|
||||
$this->_team->add_user_to_team($this->guids['sarah']);
|
||||
$this->_team->add_user_to_team($this->guids['sally']);
|
||||
$this->_team->add_user_to_team($this->guids["max"]);
|
||||
|
||||
// Create the east team memberships
|
||||
$this->_team->retrieve("East");
|
||||
$this->_team->add_user_to_team($this->guids["will"]);
|
||||
$this->_team->add_user_to_team($this->guids['chris']);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
function get_random_team()
|
||||
{
|
||||
$team_list = $this->_seed_data_get_team_list();
|
||||
$team_list_size = count($team_list);
|
||||
$random_index = mt_rand(0,$team_list_size-1);
|
||||
|
||||
return $team_list[$random_index];
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
function get_random_teamset()
|
||||
{
|
||||
$team_list = $this->_seed_data_get_teamset_list();
|
||||
$team_list_size = count($team_list);
|
||||
$random_index = mt_rand(0,$team_list_size-1);
|
||||
|
||||
return $team_list[$random_index];
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
function _seed_data_get_teamset_list()
|
||||
{
|
||||
$teamsets = Array();
|
||||
$teamsets[] = array("East", "West");
|
||||
$teamsets[] = array("East", "West", "1");
|
||||
$teamsets[] = array("West", "East");
|
||||
$teamsets[] = array("West", "East", "1");
|
||||
$teamsets[] = array("1", "East");
|
||||
$teamsets[] = array("1", "West");
|
||||
return $teamsets;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
function _seed_data_get_team_list()
|
||||
{
|
||||
$teams = Array();
|
||||
//bug 28138 todo
|
||||
$teams[] = "north";
|
||||
$teams[] = "south";
|
||||
$teams[] = "left";
|
||||
$teams[] = "right";
|
||||
$teams[] = "in";
|
||||
$teams[] = "out";
|
||||
$teams[] = "fly";
|
||||
$teams[] = "walk";
|
||||
$teams[] = "crawl";
|
||||
$teams[] = "pivot";
|
||||
$teams[] = "money";
|
||||
$teams[] = "dinero";
|
||||
$teams[] = "shadow";
|
||||
$teams[] = "roof";
|
||||
$teams[] = "sales";
|
||||
$teams[] = "pillow";
|
||||
$teams[] = "feather";
|
||||
|
||||
return $teams;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
function _quick_create($name)
|
||||
{
|
||||
if (!$this->_team->retrieve($name))
|
||||
{
|
||||
$this->_team->create_team($name, $name, $name);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
?>
|
||||
87
install/UploadLangFileCheck.php
Normal file
87
install/UploadLangFileCheck.php
Normal file
@@ -0,0 +1,87 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* SugarCRM Community Edition is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2011 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
|
||||
//Request object must have these property values:
|
||||
// Module: module name, this module should have a file called TreeData.php
|
||||
// Function: name of the function to be called in TreeData.php, the function will be called statically.
|
||||
// PARAM prefixed properties: array of these property/values will be passed to the function as parameter.
|
||||
|
||||
require_once('include/JSON.php');
|
||||
require_once('include/upload_file.php');
|
||||
|
||||
//require_once('modules/UpgradeWizard/uw_utils.php');
|
||||
|
||||
$json = getJSONobj();
|
||||
/*
|
||||
$file_name = $json->decode(html_entity_decode($_REQUEST['file_name']));
|
||||
|
||||
if(isset($file_name['jsonObject']) && $file_name['jsonObject'] != null){
|
||||
$file_name = $file_name['jsonObject'];
|
||||
}
|
||||
*/
|
||||
|
||||
$file_name = $_REQUEST['file_name'];
|
||||
$filesize = '';
|
||||
if(file_exists($file_name)){
|
||||
$filesize =filesize($file_name);
|
||||
}
|
||||
|
||||
//$GLOBALS['log']->fatal($file_name);
|
||||
$response = '';
|
||||
|
||||
//$GLOBALS['log']->fatal('file name '.$file_name);
|
||||
//$GLOBALS['log']->fatal('file size loaded '.filesize($file_name));
|
||||
|
||||
|
||||
//if($filesize > ini_get("upload_max_filesize"))
|
||||
|
||||
//$GLOBALS['log']->fatal(substr(ini_get("upload_max_filesize"), 0, strlen( ini_get("upload_max_filesize")) - 1));
|
||||
//get the file size defined in php.ini
|
||||
//$uploadSizeIni = substr(ini_get("upload_max_filesize"), 0, strlen( ini_get("upload_max_filesize")) - 1);
|
||||
//$GLOBALS['log']->fatal('Upload php setting Size '.return_bytes(ini_get("upload_max_filesize")));
|
||||
if($filesize != null){
|
||||
if(($filesize > return_bytes(ini_get("upload_max_filesize"))) || ($filesize > return_bytes(ini_get("post_max_size")))){
|
||||
$response=$filesize;
|
||||
//$response= "<script>alert('File size is bigger than the max_upload-size setting in php.ini. Upgrade attempt will fail. Increase the upload_max_size in php.ini to greater than ')</script>";
|
||||
}
|
||||
}
|
||||
|
||||
if (!empty($response)) {
|
||||
echo $response;
|
||||
}
|
||||
sugar_cleanup();
|
||||
exit();
|
||||
188
install/UserDemoData.php
Normal file
188
install/UserDemoData.php
Normal file
@@ -0,0 +1,188 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* SugarCRM Community Edition is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2011 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
|
||||
|
||||
|
||||
|
||||
class UserDemoData {
|
||||
var $_user;
|
||||
var $_large_scale_test;
|
||||
var $guids = array(
|
||||
'jim' => 'seed_jim_id',
|
||||
'sarah' => 'seed_sarah_id',
|
||||
'sally' => 'seed_sally_id',
|
||||
'max' => 'seed_max_id',
|
||||
'will' => 'seed_will_id',
|
||||
'chris' => 'seed_chris_id',
|
||||
/*
|
||||
* Pending fix of demo data mechanism
|
||||
'jim' => 'jim00000-0000-0000-0000-000000000000',
|
||||
'sarah' => 'sarah000-0000-0000-0000-000000000000',
|
||||
'sally' => 'sally000-0000-0000-0000-000000000000',
|
||||
'max' => 'max00000-0000-0000-0000-000000000000',
|
||||
'will' => 'will0000-0000-0000-0000-000000000000',
|
||||
'chris' => 'chris000-0000-0000-0000-000000000000',
|
||||
*/
|
||||
);
|
||||
|
||||
/**
|
||||
* Constructor for creating user demo data
|
||||
*/
|
||||
function UserDemoData($seed_user, $large_scale_test = false)
|
||||
{
|
||||
// use a seed user so it does not have to be known which file to
|
||||
// include the User class from
|
||||
$this->_user = $seed_user;
|
||||
$this->_large_scale_test = $large_scale_test;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
function create_demo_data()
|
||||
{
|
||||
global $current_language;
|
||||
global $sugar_demodata;
|
||||
foreach($sugar_demodata['users'] as $v)
|
||||
{
|
||||
$this->_create_seed_user($v['id'], $v['last_name'], $v['first_name'], $v['user_name'], $v['title'], $v['is_admin'], $v['reports_to'], $v['reports_to_name'], $v['email']);
|
||||
|
||||
}
|
||||
if($this->_large_scale_test) {
|
||||
$user_list = $this->_seed_data_get_user_list();
|
||||
foreach($user_list as $user_name)
|
||||
{
|
||||
$this->_quick_create_user($user_name);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Create a user in the seed data.
|
||||
*/
|
||||
function _create_seed_user($id, $last_name, $first_name, $user_name,
|
||||
$title, $is_admin, $reports_to, $reports_to_name, $email)
|
||||
{
|
||||
$u = new User();
|
||||
|
||||
$u->id=$id;
|
||||
$u->new_with_id = true;
|
||||
$u->last_name = $last_name;
|
||||
$u->first_name = $first_name;
|
||||
$u->user_name = $user_name;
|
||||
$u->title = $title;
|
||||
$u->status = 'Active';
|
||||
$u->employee_status = 'Active';
|
||||
$u->is_admin = $is_admin;
|
||||
//$u->user_password = $u->encrypt_password($user_name);
|
||||
$u->user_hash = strtolower(md5($user_name));
|
||||
$u->reports_to_id = $reports_to;
|
||||
$u->reports_to_name = $reports_to_name;
|
||||
//$u->email1 = $email;
|
||||
$u->emailAddress->addAddress($email, true);
|
||||
$u->emailAddress->addAddress("reply.".$email, false, true);
|
||||
$u->emailAddress->addAddress("alias.".$email);
|
||||
|
||||
// bug 15371 tyoung set a user preference so that Users/DetailView.php can find something without repeatedly querying the db in vain
|
||||
$u->setPreference('max_tabs','7');
|
||||
$u->savePreferencesToDB();
|
||||
|
||||
|
||||
$u->picture = $this->_copy_user_image($id);
|
||||
|
||||
$u->save();
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
function _seed_data_get_user_list()
|
||||
{
|
||||
$users = Array();
|
||||
//bug 28138 todo
|
||||
$users[] = "north";
|
||||
$users[] = "south";
|
||||
$users[] = "east";
|
||||
$users[] = "west";
|
||||
$users[] = "left";
|
||||
$users[] = "right";
|
||||
$users[] = "in";
|
||||
$users[] = "out";
|
||||
$users[] = "fly";
|
||||
$users[] = "walk";
|
||||
$users[] = "crawl";
|
||||
$users[] = "pivot";
|
||||
$users[] = "money";
|
||||
$users[] = "dinero";
|
||||
$users[] = "shadow";
|
||||
$users[] = "roof";
|
||||
$users[] = "sales";
|
||||
$users[] = "pillow";
|
||||
$users[] = "feather";
|
||||
|
||||
return $users;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
function _quick_create_user($name)
|
||||
{
|
||||
global $sugar_demodata;
|
||||
if (!$this->_user->retrieve($name.'_id'))
|
||||
{
|
||||
$this->_create_seed_user("{$name}_id", $name, $name, $name,
|
||||
$sugar_demodata['users'][0]['title'], $sugar_demodata['users'][0]['is_admin'], "seed_jim_id", $sugar_demodata['users'][0]['last_name'].", ".$sugar_demodata['users'][0]['first_name'], $sugar_demodata['users'][0]['email']);
|
||||
}
|
||||
}
|
||||
|
||||
function _copy_user_image($id) {
|
||||
global $sugar_config;
|
||||
$picture_file = create_guid();
|
||||
$file = "include/images/".$id.".gif";
|
||||
$newfile = $sugar_config['upload_dir'].$picture_file;
|
||||
if (!copy($file, $newfile)) {
|
||||
global $app_strings;
|
||||
$GLOBALS['log']->fatal(string_format($app_strings['ERR_FILE_NOT_FOUND'], array($file)));
|
||||
|
||||
}
|
||||
return $picture_file;
|
||||
}
|
||||
|
||||
}
|
||||
?>
|
||||
571
install/checkDBSettings.php
Normal file
571
install/checkDBSettings.php
Normal file
@@ -0,0 +1,571 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* SugarCRM Community Edition is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2011 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
function checkDBSettings($silent=false) {
|
||||
installLog("Begin DB Check Process *************");
|
||||
if(function_exists('mysqli_connect')){
|
||||
$_SESSION['mysql_type'] = 'mysqli';
|
||||
}
|
||||
if(function_exists('sqlsrv_connect')){
|
||||
$_SESSION['mssql_type'] = 'sqlsrv';
|
||||
}
|
||||
global $mod_strings;
|
||||
$errors = array();
|
||||
copyInputsIntoSession();
|
||||
|
||||
if( trim($_SESSION['setup_db_database_name']) == '' ){
|
||||
$errors['ERR_DB_NAME'] = $mod_strings['ERR_DB_NAME'];
|
||||
installLog("ERROR:: {$errors['ERR_DB_NAME']}");
|
||||
}
|
||||
|
||||
if($_SESSION['setup_db_type'] != 'oci8') {
|
||||
|
||||
if( trim($_SESSION['setup_db_host_name']) == '' ){
|
||||
$errors['ERR_DB_HOSTNAME'] = $mod_strings['ERR_DB_HOSTNAME'];
|
||||
installLog("ERROR:: {$errors['ERR_DB_HOSTNAME']}");
|
||||
}
|
||||
}
|
||||
|
||||
//check to see that password and retype are same, if needed
|
||||
if((isset($_SESSION['dbUSRData']) && !empty($_SESSION['dbUSRData'])) &&
|
||||
($_SESSION['dbUSRData']=='create' || $_SESSION['dbUSRData']=='provide'))
|
||||
{
|
||||
if( $_SESSION['setup_db_sugarsales_password'] != $_SESSION['setup_db_sugarsales_password_retype'] ){
|
||||
$errors['ERR_DBCONF_PASSWORD_MISMATCH'] = $mod_strings['ERR_DBCONF_PASSWORD_MISMATCH'];
|
||||
installLog("ERROR:: {$errors['ERR_DBCONF_PASSWORD_MISMATCH']}");
|
||||
}
|
||||
}
|
||||
|
||||
// bail if the basic info isn't valid
|
||||
if( count($errors) > 0 ){
|
||||
installLog("Basic form info is INVALID, exit Process.");
|
||||
return printErrors($errors);
|
||||
}else{
|
||||
installLog("Basic form info is valid, continuing Process.");
|
||||
}
|
||||
|
||||
// test the account that will talk to the db if we're not creating it
|
||||
if( $_SESSION['setup_db_sugarsales_user'] != '' && !$_SESSION['setup_db_create_sugarsales_user'] ){
|
||||
if( $_SESSION['setup_db_type'] == 'mysql' ){
|
||||
installLog("testing with mysql");
|
||||
if(isset($_SESSION['mysql_type']) && $_SESSION['mysql_type'] == 'mysqli'){
|
||||
installLog("MySQLI library detected");
|
||||
}
|
||||
|
||||
if(isset($_SESSION['mysql_type'])){
|
||||
$host_name = getHostPortFromString($_SESSION['setup_db_host_name']);
|
||||
if(empty($host_name)){
|
||||
$link = @mysqli_connect( $_SESSION['setup_db_host_name'], $_SESSION['setup_db_sugarsales_user'], $_SESSION['setup_db_sugarsales_password']);
|
||||
}else{
|
||||
$link = @mysqli_connect( $host_name[0], $_SESSION['setup_db_sugarsales_user'], $_SESSION['setup_db_sugarsales_password'], null, $host_name[1]);
|
||||
}
|
||||
}else{
|
||||
$link = @mysql_connect( $_SESSION['setup_db_host_name'],
|
||||
$_SESSION['setup_db_sugarsales_user'],
|
||||
$_SESSION['setup_db_sugarsales_password'] );
|
||||
}
|
||||
|
||||
if( !$link ){
|
||||
installLog("Could not make Connection using host: {$_SESSION['setup_db_host_name']}, usr: {$_SESSION['setup_db_sugarsales_user']}");
|
||||
if(isset($_SESSION['mysql_type'])){
|
||||
$errno = mysqli_connect_errno();
|
||||
$error = mysqli_connect_error();
|
||||
}else{
|
||||
$errno = mysql_errno();
|
||||
$error = mysql_error();
|
||||
}
|
||||
|
||||
$errors['ERR_DB_LOGIN_FAILURE'] = $mod_strings['ERR_DB_LOGIN_FAILURE_MYSQL'];
|
||||
installLog("ERROR:: {$errors['ERR_DB_LOGIN_FAILURE']}");
|
||||
}
|
||||
else{
|
||||
installLog("Connection made using host: {$_SESSION['setup_db_host_name']}, usr: {$_SESSION['setup_db_sugarsales_user']}");
|
||||
if(isset($_SESSION['mysql_type'])){
|
||||
mysqli_close($link );
|
||||
}else{
|
||||
mysql_close($link );
|
||||
}
|
||||
}
|
||||
} elseif( $_SESSION['setup_db_type'] == 'mssql' ) {
|
||||
installLog("testing with mssql");
|
||||
$connect_host = "";
|
||||
$_SESSION['setup_db_host_instance'] = trim($_SESSION['setup_db_host_instance']);
|
||||
|
||||
if (empty($_SESSION['setup_db_host_instance'])){
|
||||
$connect_host = $_SESSION['setup_db_host_name'];
|
||||
}else{
|
||||
$connect_host = $_SESSION['setup_db_host_name']. "\\" . $_SESSION['setup_db_host_instance'];
|
||||
}
|
||||
if(isset($_SESSION['mssql_type'])){
|
||||
$connect_params = array(
|
||||
"UID"=>$_SESSION['setup_db_sugarsales_user'],
|
||||
"PWD"=>$_SESSION['setup_db_sugarsales_password'],
|
||||
"MultipleActiveResultSets"=>false,
|
||||
);
|
||||
$link = sqlsrv_connect( $connect_host , $connect_params);
|
||||
}
|
||||
else {
|
||||
$link = @mssql_connect( $connect_host ,
|
||||
$_SESSION['setup_db_sugarsales_user'],
|
||||
$_SESSION['setup_db_sugarsales_password'] );
|
||||
}
|
||||
if( !$link ) {
|
||||
$errors['ERR_DB_LOGIN_FAILURE'] = $mod_strings['ERR_DB_LOGIN_FAILURE_MSSQL'];
|
||||
installLog("ERROR:: {$errors['ERR_DB_LOGIN_FAILURE']}");
|
||||
} else {
|
||||
installLog("Connection made using host: {$_SESSION['setup_db_host_name']}, usr: {$_SESSION['setup_db_sugarsales_user']}");
|
||||
if(isset($_SESSION['mssql_type'])){
|
||||
sqlsrv_close($link );
|
||||
}
|
||||
else {
|
||||
mssql_close($link );
|
||||
}
|
||||
}
|
||||
// Bug 29855 - Check to see if given db name is valid
|
||||
if (preg_match("/[\"\'\*\/\\?\:\\<\>\-]+/i", $_SESSION['setup_db_database_name']) ) {
|
||||
$errors['ERR_DB_MSSQL_DB_NAME'] = $mod_strings['ERR_DB_MSSQL_DB_NAME_INVALID'];
|
||||
installLog("ERROR:: {$errors['ERR_DB_MSSQL_DB_NAME']}");
|
||||
}
|
||||
|
||||
} elseif( $_SESSION['setup_db_type'] == 'oci8' ){
|
||||
}
|
||||
}
|
||||
|
||||
// privileged account tests
|
||||
if( $_SESSION['setup_db_admin_user_name'] == '' ){
|
||||
$errors['ERR_DB_PRIV_USER'] = $mod_strings['ERR_DB_PRIV_USER'];
|
||||
installLog("ERROR:: {$errors['ERR_DB_PRIV_USER']}");
|
||||
}
|
||||
else {
|
||||
installLog("Testing priviliged account...");
|
||||
if( $_SESSION['setup_db_type'] == 'mysql' ){
|
||||
if(isset($_SESSION['mysql_type'])){
|
||||
$host_name = getHostPortFromString($_SESSION['setup_db_host_name']);
|
||||
if(empty($host_name)){
|
||||
$link = @mysqli_connect( $_SESSION['setup_db_host_name'], $_SESSION['setup_db_admin_user_name'], $_SESSION['setup_db_admin_password']);
|
||||
}else{
|
||||
$link = @mysqli_connect( $host_name[0], $_SESSION['setup_db_admin_user_name'], $_SESSION['setup_db_admin_password'], null, $host_name[1]);
|
||||
}
|
||||
}else{
|
||||
$link = @mysql_connect( $_SESSION['setup_db_host_name'],
|
||||
$_SESSION['setup_db_admin_user_name'],
|
||||
$_SESSION['setup_db_admin_password'] );
|
||||
|
||||
}
|
||||
if( $link ){
|
||||
installLog("Connection made for Privileged admin account using host: {$_SESSION['setup_db_host_name']}, usr: {$_SESSION['setup_db_admin_user_name']}");
|
||||
// database admin credentials are valid--can continue check on stuff
|
||||
if(isset($_SESSION['mysql_type'])){
|
||||
$db_selected = @mysqli_select_db($link, $_SESSION['setup_db_database_name']);
|
||||
}else{
|
||||
$db_selected = @mysql_select_db($_SESSION['setup_db_database_name'], $link);
|
||||
}
|
||||
if($silent==false && $db_selected && $_SESSION['setup_db_create_database'] && (!isset($_SESSION['setup_db_drop_tables']) || !$_SESSION['setup_db_drop_tables'])){
|
||||
$errStr = $mod_strings['ERR_DB_EXISTS_PROCEED'];
|
||||
$errors['ERR_DB_EXISTS_PROCEED'] = $errStr;
|
||||
installLog("ERROR:: {$errors['ERR_DB_EXISTS_PROCEED']}");
|
||||
}
|
||||
else if( !$db_selected && !$_SESSION['setup_db_create_database'] ){
|
||||
$errors['ERR_DB_EXISTS_NOT'] = $mod_strings['ERR_DB_EXISTS_NOT'];
|
||||
installLog("ERROR:: {$errors['ERR_DB_EXISTS_NOT']}");
|
||||
}
|
||||
|
||||
// test for upgrade and inform user about the upgrade wizard
|
||||
if( $db_selected ){
|
||||
installLog("DB Selected, will reuse {$_SESSION['setup_db_database_name']}");
|
||||
if(isset($_SESSION['mysql_type'])){
|
||||
$config_query = "SHOW TABLES LIKE 'config'";
|
||||
$config_result = mysqli_query($link , $config_query);
|
||||
$config_table_exists = (mysqli_num_rows( $config_result ) == 1);
|
||||
mysqli_free_result( $config_result );
|
||||
include('sugar_version.php');
|
||||
if( !$_SESSION['setup_db_drop_tables'] && $config_table_exists ){
|
||||
$query = "SELECT COUNT(*) FROM config WHERE category='info' AND name='sugar_version' AND VALUE LIKE '$sugar_db_version'";
|
||||
$result = mysqli_query( $link , $query );
|
||||
$row = mysqli_fetch_row( $result );
|
||||
if($row[0] != 1 && $silent==false) {
|
||||
$errors['ERR_DB_EXISTS_WITH_CONFIG'] = $mod_strings['ERR_DB_EXISTS_WITH_CONFIG'];
|
||||
installLog("ERROR:: {$errors['ERR_DB_EXISTS_WITH_CONFIG']}");
|
||||
}
|
||||
mysqli_free_result($result);
|
||||
}
|
||||
}else{
|
||||
$config_query = "SHOW TABLES LIKE 'config'";
|
||||
$config_result = mysql_query( $config_query, $link );
|
||||
$config_table_exists = (mysql_num_rows( $config_result ) == 1);
|
||||
mysql_free_result( $config_result );
|
||||
include('sugar_version.php');
|
||||
if( !$_SESSION['setup_db_drop_tables'] && $config_table_exists ){
|
||||
$query = "SELECT COUNT(*) FROM config WHERE category='info' AND name='sugar_version' AND VALUE LIKE '$sugar_db_version'";
|
||||
$result = mysql_query( $query, $link );
|
||||
$row = mysql_fetch_row( $result );
|
||||
if($row[0] != 1 && $silent==false) {
|
||||
$errors['ERR_DB_EXISTS_WITH_CONFIG'] = $mod_strings['ERR_DB_EXISTS_WITH_CONFIG'];
|
||||
installLog("ERROR:: {$errors['ERR_DB_EXISTS_WITH_CONFIG']}");
|
||||
}
|
||||
mysql_free_result($result);
|
||||
}
|
||||
}
|
||||
|
||||
}else{
|
||||
installLog("DB not selected, will create {$_SESSION['setup_db_database_name']}");
|
||||
}
|
||||
|
||||
|
||||
// check for existing SugarCRM database user if create flag is set,
|
||||
//user name has been given, and database has been selected (reusing db, not creating new one)
|
||||
if($_SESSION['setup_db_create_sugarsales_user'] && $_SESSION['setup_db_sugarsales_user'] != '' && $db_selected){
|
||||
if(isset($_SESSION['mysql_type'])){
|
||||
$mysqli_db_selected = mysqli_select_db($link, 'mysql');
|
||||
$user = $_SESSION['setup_db_sugarsales_user'];
|
||||
$query = "select count(*) from user where User ='$user'";
|
||||
$result = mysqli_query($link, $query);
|
||||
if(!$result){
|
||||
$errno = mysqli_connect_errno();
|
||||
$error = mysqli_connect_error();
|
||||
$errors['ERR_DB_ADMIN'] = $mod_strings['ERR_DB_ADMIN'].$errno. ": {$error}).";
|
||||
installLog("ERROR:: {$errors['ERR_DB_ADMIN']}");
|
||||
}else{
|
||||
$row = mysqli_fetch_row($result);
|
||||
if($row[0] == 1){
|
||||
$errors['ERR_DB_USER_EXISTS'] = $mod_strings['ERR_DB_USER_EXISTS'];
|
||||
installLog("ERROR:: {$errors['ERR_DB_USER_EXISTS']}");
|
||||
}
|
||||
mysqli_free_result($result);
|
||||
}
|
||||
}else{
|
||||
$mysql_db_selected = mysql_select_db('mysql', $link);
|
||||
$user = $_SESSION['setup_db_sugarsales_user'];
|
||||
$query = "select count(*) from user where User ='$user'";
|
||||
$result = mysql_query($query, $link);
|
||||
if(!$result){
|
||||
$errno = mysql_errno();
|
||||
$error = mysql_error();
|
||||
$errors['ERR_DB_ADMIN'] = $mod_strings['ERR_DB_ADMIN'].$errno. ": {$error}).";
|
||||
installLog("ERROR:: {$errors['ERR_DB_ADMIN']}");
|
||||
}else{
|
||||
$row = mysql_fetch_row($result);
|
||||
if($row[0] == 1){
|
||||
$errors['ERR_DB_USER_EXISTS'] = $mod_strings['ERR_DB_USER_EXISTS'];
|
||||
installLog("ERROR:: {$errors['ERR_DB_USER_EXISTS']}");
|
||||
//do not throw errors, reuse existing user
|
||||
//$_SESSION['setup_db_create_sugarsales_user'] = 0;
|
||||
}
|
||||
mysql_free_result($result);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// check mysql minimum version requirement
|
||||
$db_version = getMysqlVersion($link);
|
||||
if(version_compare($db_version, '4.1.2') < 0) {
|
||||
$errors['ERR_DB_MYSQL_VERSION1'] = $mod_strings['ERR_DB_MYSQL_VERSION1'].$db_version.$mod_strings['ERR_DB_MYSQL_VERSION2'];
|
||||
installLog("ERROR:: {$errors['ERR_DB_MYSQL_VERSION1']}");
|
||||
}else{
|
||||
installLog("Passed DB Version check, version is {$db_version}");
|
||||
}
|
||||
|
||||
if(isset($_SESSION['mysql_type'])){
|
||||
mysqli_close($link);
|
||||
}else{
|
||||
mysql_close($link);
|
||||
}
|
||||
}
|
||||
else { // dblink was bad
|
||||
if(isset($_SESSION['mysql_type'])){
|
||||
$errno = mysqli_connect_errno();
|
||||
$error = mysqli_connect_error();
|
||||
}else{
|
||||
$errno = mysql_errno();
|
||||
$error = mysql_error();
|
||||
}
|
||||
$errors['ERR_DB_ADMIN'] = $mod_strings['ERR_DB_ADMIN'].$errno. ": {$error}).";
|
||||
installLog("ERROR:: {$errors['ERR_DB_ADMIN']}");
|
||||
}
|
||||
|
||||
}else if( $_SESSION['setup_db_type'] == 'mssql' ){
|
||||
installLog("Testing priviliged account...");
|
||||
$connect_host = "";
|
||||
$_SESSION['setup_db_host_instance'] = trim($_SESSION['setup_db_host_instance']);
|
||||
|
||||
if (empty($_SESSION['setup_db_host_instance'])){
|
||||
$connect_host = $_SESSION['setup_db_host_name'];
|
||||
}else{
|
||||
$connect_host = $_SESSION['setup_db_host_name']. "\\" . $_SESSION['setup_db_host_instance'];
|
||||
}
|
||||
if(isset($_SESSION['mssql_type'])){
|
||||
$connect_params = array(
|
||||
"UID"=>$_SESSION['setup_db_sugarsales_user'],
|
||||
"PWD"=>$_SESSION['setup_db_sugarsales_password'],
|
||||
"MultipleActiveResultSets"=>false,
|
||||
);
|
||||
$link = sqlsrv_connect( $connect_host , $connect_params);
|
||||
}
|
||||
else {
|
||||
$link = @mssql_connect( $connect_host ,
|
||||
$_SESSION['setup_db_admin_user_name'],
|
||||
$_SESSION['setup_db_admin_password'] );
|
||||
}
|
||||
if( $link ){
|
||||
installLog("Connection made for Privileged admin account using host: {$_SESSION['setup_db_host_name']}, usr: {$_SESSION['setup_db_admin_user_name']}");
|
||||
// database admin credentials are valid--can continue check on stuff
|
||||
$tbl_exists_qry = "SELECT name FROM master..sysdatabases WHERE name = N'{$_SESSION['setup_db_database_name']}'";
|
||||
if(isset($_SESSION['mssql_type']))
|
||||
$res = sqlsrv_query($link,$tbl_exists_qry);
|
||||
else
|
||||
$res = mssql_query($tbl_exists_qry);
|
||||
$db_exists = false;
|
||||
if ( isset($_SESSION['mssql_type']) && sqlsrv_fetch( $res) == 1){$db_exists = true;
|
||||
installLog("DB Exists and selected, will reuse {$_SESSION['setup_db_database_name']}");
|
||||
}elseif ( !isset($_SESSION['mssql_type']) && mssql_num_rows( $res) == 1){$db_exists = true;
|
||||
installLog("DB Exists and selected, will reuse {$_SESSION['setup_db_database_name']}");
|
||||
}else{
|
||||
installLog("No DB Selected, will create {$_SESSION['setup_db_database_name']}");
|
||||
}
|
||||
if($silent==false && $db_exists && $_SESSION['setup_db_create_database'] && (!isset($_SESSION['setup_db_drop_tables']) || !$_SESSION['setup_db_drop_tables'])){
|
||||
$errStr = $mod_strings['ERR_DB_EXISTS_PROCEED'];
|
||||
$errors['ERR_DB_EXISTS_PROCEED'] = $errStr;
|
||||
installLog("ERROR:: {$errors['ERR_DB_EXISTS_PROCEED']}");
|
||||
}
|
||||
else if( !$db_exists && !$_SESSION['setup_db_create_database'] ){
|
||||
$errors['ERR_DB_EXISTS_NOT'] = $mod_strings['ERR_DB_EXISTS_NOT'];
|
||||
installLog("ERROR:: {$errors['ERR_DB_EXISTS_NOT']}");
|
||||
}
|
||||
|
||||
// check for existing SugarCRM database user if create flag is set,
|
||||
//user name has been given, and database has been selected (reusing db, not creating new one)
|
||||
if($_SESSION['setup_db_create_sugarsales_user'] && $_SESSION['setup_db_sugarsales_user'] != ''){
|
||||
if(isset($_SESSION['mssql_type'])) {
|
||||
$mssql_db_selected = (bool) sqlsrv_query($link,'USE master');
|
||||
$user = $_SESSION['setup_db_sugarsales_user'];
|
||||
$query = "select count(*) from sys.sql_logins where name ='$user'";
|
||||
$result = sqlsrv_query($link, $query);
|
||||
if(!$result){
|
||||
$errors['ERR_DB_ADMIN'] = $mod_strings['ERR_DB_ADMIN'];
|
||||
installLog("ERROR:: {$errors['ERR_DB_ADMIN']}");
|
||||
}else{
|
||||
$row = sqlsrv_fetch_array($result);
|
||||
if($row[0] == 1){
|
||||
$errors['ERR_DB_USER_EXISTS'] = $mod_strings['ERR_DB_USER_EXISTS'];
|
||||
installLog("ERROR:: {$errors['ERR_DB_USER_EXISTS']}");
|
||||
}
|
||||
sqlsrv_free_stmt($result);
|
||||
}
|
||||
}
|
||||
else {
|
||||
$mssql_db_selected = mssql_select_db('master', $link);
|
||||
$user = $_SESSION['setup_db_sugarsales_user'];
|
||||
$query = "select count(*) from sys.sql_logins where name ='$user'";
|
||||
$result = mssql_query($query, $link);
|
||||
if(!$result){
|
||||
$errors['ERR_DB_ADMIN'] = $mod_strings['ERR_DB_ADMIN'];
|
||||
installLog("ERROR:: {$errors['ERR_DB_ADMIN']}");
|
||||
}else{
|
||||
$row = mssql_fetch_row($result);
|
||||
if($row[0] == 1){
|
||||
$errors['ERR_DB_USER_EXISTS'] = $mod_strings['ERR_DB_USER_EXISTS'];
|
||||
installLog("ERROR:: {$errors['ERR_DB_USER_EXISTS']}");
|
||||
}
|
||||
mssql_free_result($result);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(isset($_SESSION['mssql_type']))
|
||||
sqlsrv_close($link);
|
||||
else
|
||||
mssql_close($link);
|
||||
|
||||
}
|
||||
else { // dblink was bad
|
||||
$errors['ERR_DB_ADMIN_MSSQL'] = $mod_strings['ERR_DB_ADMIN_MSSQL'].$connect_host;
|
||||
installLog("ERROR:: {$errors['ERR_DB_ADMIN_MSSQL']}");
|
||||
}
|
||||
|
||||
}else if( $_SESSION['setup_db_type'] == 'oci8' ){
|
||||
}
|
||||
} // end of privileged user tests
|
||||
if($silent){
|
||||
return $errors;
|
||||
}else{
|
||||
printErrors($errors);
|
||||
}
|
||||
installLog("End DB Check Process *************");
|
||||
}
|
||||
|
||||
function printErrors($errors ){
|
||||
|
||||
global $mod_strings;
|
||||
if(count($errors) == 0){
|
||||
echo 'dbCheckPassed';
|
||||
installLog("SUCCESS:: no errors detected!");
|
||||
}else if((count($errors) == 1 && isset($errors["ERR_DB_EXISTS_PROCEED"])) ||
|
||||
(count($errors) == 2 && isset($errors["ERR_DB_EXISTS_PROCEED"]) && isset($errors["ERR_DB_EXISTS_WITH_CONFIG"])) ){
|
||||
///throw alert asking to overwwrite db
|
||||
echo 'preexeest';
|
||||
installLog("WARNING:: no errors detected, but DB tables will be dropped!, issuing warning to user");
|
||||
}else{
|
||||
installLog("FATAL:: errors have been detected! User will not be allowed to continue. Errors are as follow:");
|
||||
//print out errors
|
||||
$validationErr = "<p><b>{$mod_strings['ERR_DBCONF_VALIDATION']}</b></p>";
|
||||
$validationErr .= '<ul>';
|
||||
|
||||
foreach($errors as $key =>$erMsg){
|
||||
if($key != "ERR_DB_EXISTS_PROCEED" && $key != "ERR_DB_EXISTS_WITH_CONFIG"){
|
||||
if($_SESSION['dbUSRData'] == 'same' && $key == 'ERR_DB_ADMIN'){
|
||||
installLog(".. {$erMsg}");
|
||||
break;
|
||||
}
|
||||
$validationErr .= '<li class="error">' . $erMsg . '</li>';
|
||||
installLog(".. {$erMsg}");
|
||||
}
|
||||
}
|
||||
$validationErr .= '</ul>';
|
||||
$validationErr .= '</div>';
|
||||
|
||||
echo $validationErr;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
function copyInputsIntoSession(){
|
||||
if(isset($_REQUEST['setup_db_type'])){$_SESSION['setup_db_type'] = $_REQUEST['setup_db_type'];}
|
||||
if(isset($_REQUEST['setup_db_admin_user_name'])){$_SESSION['setup_db_admin_user_name'] = $_REQUEST['setup_db_admin_user_name'];}
|
||||
if(isset($_REQUEST['setup_db_admin_password'])){$_SESSION['setup_db_admin_password'] = $_REQUEST['setup_db_admin_password'];}
|
||||
if(isset($_REQUEST['setup_db_database_name'])){$_SESSION['setup_db_database_name'] = $_REQUEST['setup_db_database_name'];}
|
||||
if(isset($_REQUEST['setup_db_host_name'])){$_SESSION['setup_db_host_name'] = $_REQUEST['setup_db_host_name'];}
|
||||
|
||||
if(isset($_REQUEST['setup_db_host_instance'])){
|
||||
$_SESSION['setup_db_host_instance'] = $_REQUEST['setup_db_host_instance'];
|
||||
}
|
||||
|
||||
|
||||
// on a silent install, copy values from $_SESSION into $_REQUEST
|
||||
if (isset($_REQUEST['goto']) && $_REQUEST['goto'] == 'SilentInstall') {
|
||||
if (isset($_SESSION['dbUSRData']) && !empty($_SESSION['dbUSRData']))
|
||||
$_REQUEST['dbUSRData'] = $_SESSION['dbUSRData'];
|
||||
else $_REQUEST['dbUSRData'] = 'same';
|
||||
|
||||
if (isset($_SESSION['setup_db_sugarsales_user']) && !empty($_SESSION['setup_db_sugarsales_user']))
|
||||
$_REQUEST['setup_db_sugarsales_user'] = $_SESSION['setup_db_sugarsales_user'];
|
||||
else $_REQUEST['dbUSRData'] = 'same';
|
||||
|
||||
$_REQUEST['setup_db_sugarsales_password'] = $_SESSION['setup_db_sugarsales_password'];
|
||||
$_REQUEST['setup_db_sugarsales_password_retype'] = $_SESSION['setup_db_sugarsales_password'];
|
||||
}
|
||||
|
||||
//make sure we are creating or using provided user for app db connections
|
||||
$_SESSION['setup_db_create_sugarsales_user'] = true;//get_boolean_from_request('setup_db_create_sugarsales_user');
|
||||
if( $_SESSION['setup_db_type'] == 'oci8' ){
|
||||
//if we are in Oracle Mode, make the admin user/password same as connecting user/password
|
||||
$_SESSION['setup_db_sugarsales_user'] = $_SESSION['setup_db_admin_user_name'];
|
||||
$_SESSION['setup_db_sugarsales_password'] = $_SESSION['setup_db_admin_password'];
|
||||
$_SESSION['setup_db_sugarsales_password_retype'] = $_SESSION['setup_db_sugarsales_password'];
|
||||
$_SESSION['setup_db_create_sugarsales_user'] = false;
|
||||
$_SESSION['setup_db_create_database'] = false;
|
||||
|
||||
}//elseif(isset($_SESSION['install_type']) && !empty($_SESSION['install_type']) && strtolower($_SESSION['install_type'])=='typical'){
|
||||
else{
|
||||
|
||||
|
||||
//retrieve the value from dropdown in order to know what settings the user
|
||||
//wants to use for the sugar db user.
|
||||
|
||||
//use provided db admin by default
|
||||
$_SESSION['dbUSRData'] = 'same';
|
||||
|
||||
if(isset($_REQUEST['dbUSRData']) && !empty($_REQUEST['dbUSRData'])){
|
||||
$_SESSION['dbUSRData'] = $_REQUEST['dbUSRData'];
|
||||
}
|
||||
|
||||
|
||||
if($_SESSION['dbUSRData'] == 'auto'){
|
||||
//create user automatically
|
||||
$_SESSION['setup_db_create_sugarsales_user'] = true;
|
||||
$_SESSION['setup_db_sugarsales_user'] = "sugar".create_db_user_creds(5);
|
||||
$_SESSION['setup_db_sugarsales_password'] = create_db_user_creds(10);
|
||||
$_SESSION['setup_db_sugarsales_password_retype'] = $_SESSION['setup_db_sugarsales_password'];
|
||||
}elseif($_SESSION['dbUSRData'] == 'provide'){
|
||||
//use provided user info
|
||||
$_SESSION['setup_db_create_sugarsales_user'] = false;
|
||||
$_SESSION['setup_db_sugarsales_user'] = $_REQUEST['setup_db_sugarsales_user'];
|
||||
$_SESSION['setup_db_sugarsales_password'] = $_REQUEST['setup_db_sugarsales_password'];
|
||||
$_SESSION['setup_db_sugarsales_password_retype'] = $_REQUEST['setup_db_sugarsales_password_retype'];
|
||||
}elseif($_SESSION['dbUSRData'] == 'create'){
|
||||
// create user with provided info
|
||||
$_SESSION['setup_db_create_sugarsales_user'] = true;
|
||||
$_SESSION['setup_db_sugarsales_user'] = $_REQUEST['setup_db_sugarsales_user'];
|
||||
$_SESSION['setup_db_sugarsales_password'] = $_REQUEST['setup_db_sugarsales_password'];
|
||||
$_SESSION['setup_db_sugarsales_password_retype'] = $_REQUEST['setup_db_sugarsales_password_retype'];
|
||||
}else{
|
||||
//Use the same login as provided admin user
|
||||
$_SESSION['setup_db_create_sugarsales_user'] = false;
|
||||
$_SESSION['setup_db_sugarsales_user'] = $_SESSION['setup_db_admin_user_name'];
|
||||
$_SESSION['setup_db_sugarsales_password'] = $_SESSION['setup_db_admin_password'];
|
||||
$_SESSION['setup_db_sugarsales_retype'] = $_SESSION['setup_db_admin_password'];
|
||||
}
|
||||
}
|
||||
|
||||
if(!isset($_SESSION['demoData']) || empty($_SESSION['demoData'])){
|
||||
$_SESSION['demoData'] = 'no';
|
||||
}
|
||||
if(isset($_REQUEST['demoData'])){$_SESSION['demoData'] = $_REQUEST['demoData'] ;}
|
||||
if (isset($_REQUEST['goto']) && $_REQUEST['goto'] == 'SilentInstall' && isset($SESSION['setup_db_drop_tables'])) {
|
||||
//set up for Oracle Silent Installer
|
||||
$_REQUEST['setup_db_drop_tables'] = $_SESSION['setup_db_drop_tables'] ;
|
||||
}
|
||||
if (isset($_REQUEST['setup_db_drop_tables'])
|
||||
|| ((isset($_REQUEST['goto']) && $_REQUEST['goto'] == 'SilentInstall' && isset($SESSION['setup_db_drop_tables'])))
|
||||
){
|
||||
$_SESSION['setup_db_drop_tables'] = true;
|
||||
$_SESSION['setup_db_create_database'] = false;
|
||||
|
||||
}else{
|
||||
$_SESSION['setup_db_drop_tables'] = false;
|
||||
$_SESSION['setup_db_create_database'] = true;
|
||||
}
|
||||
}
|
||||
|
||||
//// END PAGEOUTPUT
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
?>
|
||||
591
install/confirmSettings.php
Normal file
591
install/confirmSettings.php
Normal file
@@ -0,0 +1,591 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* SugarCRM Community Edition is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2011 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
|
||||
|
||||
|
||||
global $sugar_config,$db;
|
||||
|
||||
if( !isset( $install_script ) || !$install_script ){
|
||||
die($mod_strings['ERR_NO_DIRECT_SCRIPT']);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
$dbType = '';
|
||||
$oci8 = '';
|
||||
|
||||
|
||||
$dbCreate = "({$mod_strings['LBL_CONFIRM_WILL']} ";
|
||||
if(!$_SESSION['setup_db_create_database']){
|
||||
$dbCreate .= $mod_strings['LBL_CONFIRM_NOT'];
|
||||
}
|
||||
$dbCreate .= " {$mod_strings['LBL_CONFIRM_BE_CREATED']})";
|
||||
|
||||
$dbUser = "{$_SESSION['setup_db_sugarsales_user']} ({$mod_strings['LBL_CONFIRM_WILL']} ";
|
||||
if( $_SESSION['setup_db_create_sugarsales_user'] != 1 ){
|
||||
$dbUser .= $mod_strings['LBL_CONFIRM_NOT'];
|
||||
}
|
||||
$dbUser .= " {$mod_strings['LBL_CONFIRM_BE_CREATED']})";
|
||||
$yesNoDropCreate = $mod_strings['LBL_NO'];
|
||||
if ($_SESSION['setup_db_drop_tables']===true ||$_SESSION['setup_db_drop_tables'] == 'true'){
|
||||
$yesNoDropCreate = $mod_strings['LBL_YES'];
|
||||
}
|
||||
$yesNoSugarUpdates = ($_SESSION['setup_site_sugarbeet']) ? $mod_strings['LBL_YES'] : $mod_strings['LBL_NO'];
|
||||
$yesNoCustomSession = ($_SESSION['setup_site_custom_session_path']) ? $mod_strings['LBL_YES'] : $mod_strings['LBL_NO'];
|
||||
$yesNoCustomLog = ($_SESSION['setup_site_custom_log_dir']) ? $mod_strings['LBL_YES'] : $mod_strings['LBL_NO'];
|
||||
$yesNoCustomId = ($_SESSION['setup_site_specify_guid']) ? $mod_strings['LBL_YES'] : $mod_strings['LBL_NO'];
|
||||
$demoData = ($_SESSION['demoData'] == 'en_us') ? ($mod_strings['LBL_YES']) : ($_SESSION['demoData']);
|
||||
// Populate the default date format, time format, and language for the system
|
||||
$defaultDateFormat = "";
|
||||
$defaultTimeFormat = "";
|
||||
$defaultLanguages = "";
|
||||
|
||||
$sugar_config_defaults = get_sugar_config_defaults();
|
||||
if(isset($_REQUEST['default_language'])){
|
||||
$defaultLanguages = $sugar_config_defaults['languages'][$_REQUEST['default_language']];
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//// START OUTPUT
|
||||
|
||||
$out =<<<EOQ
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<meta http-equiv="Content-Script-Type" content="text/javascript">
|
||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||
<title>{$mod_strings['LBL_WIZARD_TITLE']} {$mod_strings['LBL_CONFIRM_TITLE']}</title>
|
||||
<link REL="SHORTCUT ICON" HREF="$icon">
|
||||
<link rel="stylesheet" href="$css" type="text/css" />
|
||||
</head>
|
||||
<body onload="javascript:document.getElementById('button_next2').focus();">
|
||||
<form action="install.php" method="post" name="setConfig" id="form">
|
||||
<input type="hidden" name="current_step" value="{$next_step}">
|
||||
<table cellspacing="0" cellpadding="0" border="0" align="center" class="shell">
|
||||
<tr><td colspan="2" id="help"><a href="{$help_url}" target='_blank'>{$mod_strings['LBL_HELP']} </a></td></tr>
|
||||
<tr>
|
||||
<th width="500">
|
||||
<p>
|
||||
<img src="{$sugar_md}" alt="SugarCRM" border="0">
|
||||
</p>
|
||||
{$mod_strings['LBL_CONFIRM_TITLE']}</th>
|
||||
<th width="200" style="text-align: right;"><a href="http://www.sugarcrm.com" target="_blank"><IMG src="$loginImage" width="145" height="30" alt="SugarCRM" border="0"></a>
|
||||
</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
|
||||
<table width="100%" cellpadding="0" cellpadding="0" border="0" class="StyleDottedHr">
|
||||
<tr><th colspan="3" align="left">{$mod_strings['LBL_DBCONF_TITLE']}</th></tr>
|
||||
{$dbType}
|
||||
{$oci8}
|
||||
<tr>
|
||||
<td></td>
|
||||
<td><b>{$mod_strings['LBL_DBCONF_DB_NAME']}</b></td>
|
||||
<td>
|
||||
{$_SESSION['setup_db_database_name']} {$dbCreate}
|
||||
</td>
|
||||
</tr>
|
||||
EOQ;
|
||||
|
||||
$out .=<<<EOQ
|
||||
<tr>
|
||||
<td></td>
|
||||
<td><b>{$mod_strings['LBL_DBCONF_DB_ADMIN_USER']}</b></td>
|
||||
<td>{$_SESSION['setup_db_admin_user_name']}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td><b>{$mod_strings['LBL_DBCONF_DEMO_DATA']}</b></td>
|
||||
<td>{$demoData}</td>
|
||||
</tr>
|
||||
EOQ;
|
||||
if($yesNoDropCreate){
|
||||
|
||||
$out .=<<<EOQ
|
||||
<tr>
|
||||
<td></td>
|
||||
<td><b>{$mod_strings['LBL_DBCONF_DB_DROP']}</b></td>
|
||||
<td>{$yesNoDropCreate}</td>
|
||||
</tr>
|
||||
EOQ;
|
||||
|
||||
}
|
||||
|
||||
|
||||
if(isset($_SESSION['install_type']) && !empty($_SESSION['install_type']) && $_SESSION['install_type']=='custom'){
|
||||
$out .=<<<EOQ
|
||||
|
||||
<tr><td colspan="3" align="left"></td></tr>
|
||||
<tr>
|
||||
<th colspan="3" align="left">{$mod_strings['LBL_SITECFG_TITLE']}</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td><b>{$mod_strings['LBL_SITECFG_URL']}</b></td>
|
||||
<td>{$_SESSION['setup_site_url']}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<tr><td colspan="3" align="left"></td></tr>
|
||||
<th colspan="3" align="left">{$mod_strings['LBL_SITECFG_SUGAR_UPDATES']}</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td><b>{$mod_strings['LBL_SITECFG_SUGAR_UP']}</b></td>
|
||||
<td>{$yesNoSugarUpdates}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<tr><td colspan="3" align="left"></td></tr>
|
||||
<th colspan="3" align="left">{$mod_strings['LBL_SITECFG_SITE_SECURITY']}</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td><b>{$mod_strings['LBL_SITECFG_CUSTOM_SESSION']}?</b></td>
|
||||
<td>{$yesNoCustomSession}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td><b>{$mod_strings['LBL_SITECFG_CUSTOM_LOG']}?</b></td>
|
||||
<td>{$yesNoCustomLog}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td><b>{$mod_strings['LBL_SITECFG_CUSTOM_ID']}?</b></td>
|
||||
<td>{$yesNoCustomId}</td>
|
||||
</tr>
|
||||
EOQ;
|
||||
}
|
||||
/*
|
||||
if(isset($_SESSION['licenseKey_submitted']) && ($_SESSION['licenseKey_submitted'])
|
||||
&& (isset($GLOBALS['db']) && !empty($GLOBALS['db']))){
|
||||
$out .=<<<EOQ
|
||||
|
||||
<!--
|
||||
-->
|
||||
EOQ;
|
||||
}
|
||||
*/
|
||||
|
||||
|
||||
$out .=<<<EOQ
|
||||
|
||||
<tr><td colspan="3" align="left"></td></tr>
|
||||
<tr><th colspan="3" align="left">{$mod_strings['LBL_SYSTEM_CREDS']}</th></tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td><b>{$mod_strings['LBL_DBCONF_DB_USER']}</b></td>
|
||||
<td>
|
||||
{$_SESSION['setup_db_sugarsales_user']}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td><b>{$mod_strings['LBL_DBCONF_DB_PASSWORD']}</b></td>
|
||||
<td>
|
||||
<span id='hide_db_admin_pass'>{$mod_strings['LBL_HIDDEN']}</span>
|
||||
<span style='display:none' id='show_db_admin_pass'>{$_SESSION['setup_db_sugarsales_password']}</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td><b>{$mod_strings['LBL_SITECFG_ADMIN_Name']}</b></td>
|
||||
<td>
|
||||
Admin
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td><b>{$mod_strings['LBL_SITECFG_ADMIN_PASS']}</b></td>
|
||||
<td>
|
||||
<span id='hide_site_admin_pass'>{$mod_strings['LBL_HIDDEN']}</span>
|
||||
<span style='display:none' id='show_site_admin_pass'>{$_SESSION['setup_site_admin_password']}</span>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
EOQ;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
$envString = '
|
||||
<tr><td colspan="3" align="left"></td></tr><tr><th colspan="3" align="left">'.$mod_strings['LBL_SYSTEM_ENV'].'</th></tr>';
|
||||
|
||||
// PHP VERSION
|
||||
$envString .='
|
||||
<tr>
|
||||
<td></td>
|
||||
<td><b>'.$mod_strings['LBL_CHECKSYS_PHPVER'].'</b></td>
|
||||
<td >'.constant('PHP_VERSION').'</td>
|
||||
</tr>';
|
||||
|
||||
|
||||
//Begin List of already known good variables. These were checked during the initial sys check
|
||||
// XML Parsing
|
||||
$envString .='
|
||||
<tr>
|
||||
<td></td>
|
||||
<td><strong>'.$mod_strings['LBL_CHECKSYS_XML'].'</strong></td>
|
||||
<td >'.$mod_strings['LBL_CHECKSYS_OK'].'</td>
|
||||
</tr>';
|
||||
|
||||
|
||||
|
||||
// mbstrings
|
||||
|
||||
$envString .='
|
||||
<tr>
|
||||
<td></td>
|
||||
<td><strong>'.$mod_strings['LBL_CHECKSYS_MBSTRING'].'</strong></td>
|
||||
<td >'.$mod_strings['LBL_CHECKSYS_OK'].'</td>
|
||||
</tr>';
|
||||
|
||||
// config.php
|
||||
$envString .='
|
||||
<tr>
|
||||
<td></td>
|
||||
<td><strong>'.$mod_strings['LBL_CHECKSYS_CONFIG'].'</strong></td>
|
||||
<td >'.$mod_strings['LBL_CHECKSYS_OK'].'</td>
|
||||
</tr>';
|
||||
|
||||
// custom dir
|
||||
|
||||
|
||||
$envString .='
|
||||
<tr>
|
||||
<td></td>
|
||||
<td><strong>'.$mod_strings['LBL_CHECKSYS_CUSTOM'].'</strong></td>
|
||||
<td >'.$mod_strings['LBL_CHECKSYS_OK'].'</td>
|
||||
</tr>';
|
||||
|
||||
|
||||
// modules dir
|
||||
$envString .='
|
||||
<tr>
|
||||
<td></td>
|
||||
<td><strong>'.$mod_strings['LBL_CHECKSYS_MODULE'].'</strong></td>
|
||||
<td >'.$mod_strings['LBL_CHECKSYS_OK'].'</td>
|
||||
</tr>';
|
||||
|
||||
// data dir
|
||||
|
||||
$envString .='
|
||||
<tr>
|
||||
<td></td>
|
||||
<td><strong>'.$mod_strings['LBL_CHECKSYS_DATA'].'</strong></td>
|
||||
<td >'.$mod_strings['LBL_CHECKSYS_OK'].'</td>
|
||||
</tr>';
|
||||
|
||||
// cache dir
|
||||
$error_found = true;
|
||||
$envString .='
|
||||
<tr>
|
||||
<td></td>
|
||||
<td><strong>'.$mod_strings['LBL_CHECKSYS_CACHE'].'</strong></td>
|
||||
<td >'.$mod_strings['LBL_CHECKSYS_OK'].'</td>
|
||||
</tr>';
|
||||
// End already known to be good
|
||||
|
||||
// memory limit
|
||||
$memory_msg = "";
|
||||
// CL - fix for 9183 (if memory_limit is enabled we will honor it and check it; otherwise use unlimited)
|
||||
$memory_limit = ini_get('memory_limit');
|
||||
if(empty($memory_limit)){
|
||||
$memory_limit = "-1";
|
||||
}
|
||||
if(!defined('SUGARCRM_MIN_MEM')) {
|
||||
define('SUGARCRM_MIN_MEM', 40);
|
||||
}
|
||||
$sugarMinMem = constant('SUGARCRM_MIN_MEM');
|
||||
// logic based on: http://us2.php.net/manual/en/ini.core.php#ini.memory-limit
|
||||
if( $memory_limit == "" ){ // memory_limit disabled at compile time, no memory limit
|
||||
$memory_msg = "<b>{$mod_strings['LBL_CHECKSYS_MEM_OK']}</b>";
|
||||
} elseif( $memory_limit == "-1" ){ // memory_limit enabled, but set to unlimited
|
||||
$memory_msg = "{$mod_strings['LBL_CHECKSYS_MEM_UNLIMITED']}";
|
||||
} else {
|
||||
$mem_display = $memory_limit;
|
||||
rtrim($memory_limit, 'M');
|
||||
$memory_limit_int = (int) $memory_limit;
|
||||
$SUGARCRM_MIN_MEM = (int) constant('SUGARCRM_MIN_MEM');
|
||||
if( $memory_limit_int < constant('SUGARCRM_MIN_MEM') ){
|
||||
$memory_msg = "<span class='stop'><b>$memory_limit{$mod_strings['ERR_CHECKSYS_MEM_LIMIT_1']}" . constant('SUGARCRM_MIN_MEM') . "{$mod_strings['ERR_CHECKSYS_MEM_LIMIT_2']}</b></span>";
|
||||
$memory_msg = str_replace('$memory_limit', $mem_display, $memory_msg);
|
||||
} else {
|
||||
$memory_msg = "{$mod_strings['LBL_CHECKSYS_OK']} ({$memory_limit})";
|
||||
}
|
||||
}
|
||||
|
||||
$envString .='
|
||||
<tr>
|
||||
<td></td>
|
||||
<td><strong>'.$mod_strings['LBL_CHECKSYS_MEM'].'</strong></td>
|
||||
<td >'.$memory_msg.'</td>
|
||||
</tr>';
|
||||
|
||||
// zlib
|
||||
if(function_exists('gzclose')) {
|
||||
$zlibStatus = "{$mod_strings['LBL_CHECKSYS_OK']}";
|
||||
} else {
|
||||
$zlibStatus = "<span class='stop'><b>{$mod_strings['ERR_CHECKSYS_ZLIB']}</b></span>";
|
||||
}
|
||||
$envString .='
|
||||
<tr>
|
||||
<td></td>
|
||||
<td><strong>'.$mod_strings['LBL_CHECKSYS_ZLIB'].'</strong></td>
|
||||
<td >'.$zlibStatus.'</td>
|
||||
</tr>';
|
||||
|
||||
// zip
|
||||
if(class_exists("ZipArchive")) {
|
||||
$zipStatus = "{$mod_strings['LBL_CHECKSYS_OK']}";
|
||||
} else {
|
||||
$zipStatus = "<span class='stop'><b>{$mod_strings['ERR_CHECKSYS_ZIP']}</b></span>";
|
||||
}
|
||||
$envString .='
|
||||
<tr>
|
||||
<td></td>
|
||||
<td><strong>'.$mod_strings['LBL_CHECKSYS_ZIP'].'</strong></td>
|
||||
<td >'.$zipStatus.'</td>
|
||||
</tr>';
|
||||
|
||||
|
||||
|
||||
// imap
|
||||
if(function_exists('imap_open')) {
|
||||
$imapStatus = "{$mod_strings['LBL_CHECKSYS_OK']}";
|
||||
} else {
|
||||
$imapStatus = "<span class='stop'><b>{$mod_strings['ERR_CHECKSYS_IMAP']}</b></span>";
|
||||
}
|
||||
|
||||
$envString .='
|
||||
<tr>
|
||||
<td></td>
|
||||
<td><strong>'.$mod_strings['LBL_CHECKSYS_IMAP'].'</strong></td>
|
||||
<td >'.$imapStatus.'</td>
|
||||
</tr>';
|
||||
|
||||
|
||||
// cURL
|
||||
if(function_exists('curl_init')) {
|
||||
$curlStatus = "{$mod_strings['LBL_CHECKSYS_OK']}";
|
||||
} else {
|
||||
$curlStatus = "<span class='stop'><b>{$mod_strings['ERR_CHECKSYS_CURL']}</b></span>";
|
||||
}
|
||||
|
||||
$envString .='
|
||||
<tr>
|
||||
<td></td>
|
||||
<td><strong>'.$mod_strings['LBL_CHECKSYS_CURL'].'</strong></td>
|
||||
<td >'.$curlStatus.'</td>
|
||||
</tr>';
|
||||
|
||||
|
||||
//CHECK UPLOAD FILE SIZE
|
||||
$upload_max_filesize = ini_get('upload_max_filesize');
|
||||
$upload_max_filesize_bytes = return_bytes($upload_max_filesize);
|
||||
if(!defined('SUGARCRM_MIN_UPLOAD_MAX_FILESIZE_BYTES')){
|
||||
define('SUGARCRM_MIN_UPLOAD_MAX_FILESIZE_BYTES', 6 * 1024 * 1024);
|
||||
}
|
||||
|
||||
if($upload_max_filesize_bytes > constant('SUGARCRM_MIN_UPLOAD_MAX_FILESIZE_BYTES')) {
|
||||
$fileMaxStatus = "{$mod_strings['LBL_CHECKSYS_OK']}</font>";
|
||||
} else {
|
||||
$fileMaxStatus = "<span class='stop'><b>{$mod_strings['ERR_UPLOAD_MAX_FILESIZE']}</font></b></span>";
|
||||
}
|
||||
|
||||
$envString .='
|
||||
<tr>
|
||||
<td></td>
|
||||
<td><strong>'.$mod_strings['LBL_UPLOAD_MAX_FILESIZE_TITLE'].'</strong></td>
|
||||
<td >'.$fileMaxStatus.'</td>
|
||||
</tr>';
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// PHP.ini
|
||||
$phpIniLocation = get_cfg_var("cfg_file_path");
|
||||
$envString .='
|
||||
<tr>
|
||||
<td></td>
|
||||
<td><strong>'.$mod_strings['LBL_CHECKSYS_PHP_INI'].'</strong></td>
|
||||
<td >'.$phpIniLocation.'</td>
|
||||
</tr>';
|
||||
|
||||
$out .= $envString;
|
||||
|
||||
$out .=<<<EOQ
|
||||
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="right" colspan="2">
|
||||
<table cellspacing="0" cellpadding="0" border="0" class="stdTable">
|
||||
<tr><th align="left" colspan="2"> </th></tr>
|
||||
EOQ;
|
||||
|
||||
// CRON Settings
|
||||
if ( !isset($sugar_config['default_language']) )
|
||||
$sugar_config['default_language'] = $_SESSION['default_language'];
|
||||
if ( !isset($sugar_config['cache_dir']) )
|
||||
$sugar_config['cache_dir'] = $sugar_config_defaults['cache_dir'];
|
||||
if ( !isset($sugar_config['site_url']) )
|
||||
$sugar_config['site_url'] = $_SESSION['setup_site_url'];
|
||||
if ( !isset($sugar_config['translation_string_prefix']) )
|
||||
$sugar_config['translation_string_prefix'] = $sugar_config_defaults['translation_string_prefix'];
|
||||
$mod_strings_scheduler = return_module_language($GLOBALS['current_language'], 'Schedulers');
|
||||
$error = '';
|
||||
|
||||
if (!isset($_SERVER['Path'])) {
|
||||
$_SERVER['Path'] = getenv('Path');
|
||||
}
|
||||
if(is_windows()) {
|
||||
if(isset($_SERVER['Path']) && !empty($_SERVER['Path'])) { // IIS IUSR_xxx may not have access to Path or it is not set
|
||||
if(!strpos($_SERVER['Path'], 'php')) {
|
||||
// $error = '<em>'.$mod_strings_scheduler['LBL_NO_PHP_CLI'].'</em>';
|
||||
}
|
||||
}
|
||||
$cronString = '
|
||||
<tr>
|
||||
<td align="left" colspan="2">
|
||||
<font color="red">
|
||||
'.$mod_strings_scheduler['LBL_CRON_WINDOWS_DESC'].'<br>
|
||||
</font>
|
||||
cd '.realpath('./').'<br>
|
||||
php.exe -f cron.php
|
||||
<br>'.$error.'
|
||||
</td>
|
||||
</tr>
|
||||
';
|
||||
} else {
|
||||
if(isset($_SERVER['Path']) && !empty($_SERVER['Path'])) { // some Linux servers do not make this available
|
||||
if(!strpos($_SERVER['PATH'], 'php')) {
|
||||
// $error = '<em>'.$mod_strings_scheduler['LBL_NO_PHP_CLI'].'</em>';
|
||||
}
|
||||
}
|
||||
$cronString = '
|
||||
<tr>
|
||||
<td align="left" colspan="2">
|
||||
<font color="red">
|
||||
'.$mod_strings_scheduler['LBL_CRON_INSTRUCTIONS_LINUX'].'
|
||||
</font>
|
||||
'.$mod_strings_scheduler['LBL_CRON_LINUX_DESC'].'<br>
|
||||
* * * * *
|
||||
cd '.realpath('./').'; php -f cron.php > /dev/null 2>&1
|
||||
<br>'.$error.'
|
||||
</td>
|
||||
</tr>
|
||||
';
|
||||
}
|
||||
|
||||
$out .= $cronString;
|
||||
|
||||
$out .=<<<EOQ
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan='3' align='right'>
|
||||
<input type="button" class="button" name="print_summary" id="button_print_summary_settings" value="{$mod_strings['LBL_PRINT_SUMM']}"
|
||||
onClick='window.print()' onCluck='window.open("install.php?current_step="+(document.setConfig.current_step.value -1)+"&goto={$mod_strings["LBL_NEXT"]}&print=true");' />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="right" colspan="2">
|
||||
<hr>
|
||||
<table cellspacing="0" cellpadding="0" border="0" class="stdTable">
|
||||
<tr>
|
||||
<td align=right>
|
||||
<input type="button" class="button" id="show_pass_button" value="{$mod_strings['LBL_SHOW_PASS']}"
|
||||
onClick='togglePass();' />
|
||||
</td>
|
||||
<td>
|
||||
<input type="hidden" name="goto" id="goto">
|
||||
<input class="button" type="button" value="{$mod_strings['LBL_BACK']}" id="button_back_settings" onclick="document.getElementById('goto').value='{$mod_strings['LBL_BACK']}';document.getElementById('form').submit();" />
|
||||
</td>
|
||||
<td>
|
||||
<input class="button" type="button" value="{$mod_strings['LBL_LANG_BUTTON_COMMIT']}" onclick="document.getElementById('goto').value='{$mod_strings['LBL_NEXT']}';document.getElementById('form').submit();" id="button_next2"/>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
<br>
|
||||
<script>
|
||||
function togglePass(){
|
||||
if(document.getElementById('show_site_admin_pass').style.display == ''){
|
||||
document.getElementById('show_pass_button').value = "{$mod_strings['LBL_SHOW_PASS']}";
|
||||
document.getElementById('hide_site_admin_pass').style.display = '';
|
||||
document.getElementById('hide_db_admin_pass').style.display = '';
|
||||
document.getElementById('show_site_admin_pass').style.display = 'none';
|
||||
document.getElementById('show_db_admin_pass').style.display = 'none';
|
||||
|
||||
}else{
|
||||
document.getElementById('show_pass_button').value = "{$mod_strings['LBL_HIDE_PASS']}";
|
||||
document.getElementById('show_site_admin_pass').style.display = '';
|
||||
document.getElementById('show_db_admin_pass').style.display = '';
|
||||
document.getElementById('hide_site_admin_pass').style.display = 'none';
|
||||
document.getElementById('hide_db_admin_pass').style.display = 'none';
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
||||
EOQ;
|
||||
echo $out;
|
||||
|
||||
?>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
57
install/data/disc_client.php
Normal file
57
install/data/disc_client.php
Normal file
@@ -0,0 +1,57 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* SugarCRM Community Edition is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2011 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
|
||||
// array elements are regexp patterns, and must not contain '#' signs
|
||||
$disc_client_ignore = array (
|
||||
// dirs
|
||||
"\\./cache/.*",
|
||||
"\\./examples/.*",
|
||||
// files
|
||||
"\\.*config\\.php\$",
|
||||
"\\.*sugarcrm\\.log\\.*",
|
||||
|
||||
"\\.*sync\\.log\\.*",
|
||||
"\\.htaccess\$",
|
||||
"\\.*\\.tmp\$",
|
||||
"\\.*\\.bak\$",
|
||||
"\\.*\\.zip\$",
|
||||
|
||||
);
|
||||
|
||||
$disc_client_no_sync = array (
|
||||
);
|
||||
?>
|
||||
76
install/dbConfig.js
Normal file
76
install/dbConfig.js
Normal file
@@ -0,0 +1,76 @@
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
|
||||
|
||||
function togglePasswordRetypeRequired() {
|
||||
var theForm = document.forms[0];
|
||||
var elem = document.getElementById('password_retype_required');
|
||||
|
||||
if( theForm.setup_db_create_sugarsales_user.checked ){
|
||||
elem.style.display = '';
|
||||
// theForm.setup_db_sugarsales_user.focus();
|
||||
theForm.setup_db_username_is_privileged.checked = "";
|
||||
theForm.setup_db_username_is_privileged.disabled = "disabled";
|
||||
toggleUsernameIsPrivileged();
|
||||
}
|
||||
else {
|
||||
elem.style.display = 'none';
|
||||
theForm.setup_db_username_is_privileged.disabled = "";
|
||||
}
|
||||
}
|
||||
|
||||
function toggleDropTables(){
|
||||
var theForm = document.forms[0];
|
||||
|
||||
if( theForm.setup_db_create_database.checked ){
|
||||
theForm.setup_db_drop_tables.checked = '';
|
||||
theForm.setup_db_drop_tables.disabled = "disabled";
|
||||
}
|
||||
else {
|
||||
theForm.setup_db_drop_tables.disabled = '';
|
||||
}
|
||||
}
|
||||
|
||||
function toggleUsernameIsPrivileged(){
|
||||
var theForm = document.forms[0];
|
||||
var elem = document.getElementById('privileged_user_info');
|
||||
|
||||
if( theForm.setup_db_username_is_privileged.checked ){
|
||||
elem.style.display = 'none';
|
||||
}
|
||||
else {
|
||||
elem.style.display = '';
|
||||
}
|
||||
}
|
||||
465
install/dbConfig_a.php
Normal file
465
install/dbConfig_a.php
Normal file
@@ -0,0 +1,465 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* SugarCRM Community Edition is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2011 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
|
||||
|
||||
|
||||
global $sugar_version, $js_custom_version;
|
||||
|
||||
|
||||
if(empty($_SESSION['setup_db_host_name'])){
|
||||
$_SESSION['setup_db_host_name'] = (isset($sugar_config['db_host_name'])) ? $sugar_config['db_host_name'] : $_SERVER['SERVER_NAME'];
|
||||
}
|
||||
|
||||
if( !isset( $install_script ) || !$install_script ){
|
||||
die($mod_strings['ERR_NO_DIRECT_SCRIPT']);
|
||||
}
|
||||
|
||||
|
||||
// DB split
|
||||
$oci8sid = '';
|
||||
$createDbCheckbox = '';
|
||||
$createDb = (isset($_SESSION['setup_db_create_database']) && !empty($_SESSION['setup_db_create_database'])) ? 'checked="checked"' : '';
|
||||
$dropCreate = (isset($_SESSION['setup_db_drop_tables']) && !empty($_SESSION['setup_db_drop_tables'])) ? 'checked="checked"' : '';
|
||||
$instanceName = '';
|
||||
if (isset($_SESSION['setup_db_host_instance']) && !empty($_SESSION['setup_db_host_instance'])){
|
||||
$instanceName = $_SESSION['setup_db_host_instance'];
|
||||
}
|
||||
|
||||
if($_SESSION['setup_db_type'] == 'oci8') {
|
||||
}else {
|
||||
|
||||
$host_lbl = $mod_strings['LBL_DBCONF_HOST_NAME'];
|
||||
if($_SESSION['setup_db_type'] == 'mssql') {
|
||||
$host_lbl = $mod_strings['LBL_DBCONF_HOST_NAME_MSSQL'];
|
||||
}
|
||||
|
||||
$dbSplit1 = '<tr><td colspan="3" align="left">'.$mod_strings['LBL_DBCONFIG_MSG2'].' </td></tr>
|
||||
<tr>
|
||||
<td><span class="required">*</span></td>
|
||||
<td nowrap><b>'.$host_lbl.'</b></td>
|
||||
<td align="left">
|
||||
<input type="text" name="setup_db_host_name" id="setup_db_host_name" value="'.$_SESSION['setup_db_host_name'].'" />';
|
||||
if (isset($_SESSION['setup_db_type']) && $_SESSION['setup_db_type'] =='mssql'){
|
||||
$dbSplit1 .= ' \ <input type="text" name="setup_db_host_instance" id="setup_db_host_instance" value="'.$instanceName.'" />';
|
||||
}
|
||||
$dbSplit1 .= '</td>
|
||||
</tr>';
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//// BEGIN PAGE OUTPUT
|
||||
|
||||
$out =<<<EOQ
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<meta http-equiv="Content-Script-Type" content="text/javascript">
|
||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||
<title>{$mod_strings['LBL_WIZARD_TITLE']} {$mod_strings['LBL_DBCONF_TITLE']}</title>
|
||||
<link rel="stylesheet" href="install/install.css" type="text/css" />
|
||||
<script type="text/javascript" src="install/installCommon.js"></script>
|
||||
<script type="text/javascript" src="install/dbConfig.js"></script>
|
||||
<link REL="SHORTCUT ICON" HREF="include/images/sugar_icon.ico">
|
||||
<script src="include/javascript/sugar_grp1_yui.js?s={$sugar_version}&c={$js_custom_version}"></script>
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
if ( YAHOO.env.ua )
|
||||
UA = YAHOO.env.ua;
|
||||
-->
|
||||
</script>
|
||||
<link rel='stylesheet' type='text/css' href='include/javascript/yui/build/container/assets/container.css' />
|
||||
|
||||
</head>
|
||||
EOQ;
|
||||
$out .= '<body onload="document.getElementById(\'button_next2\').focus();">';
|
||||
|
||||
$out2 =<<<EOQ2
|
||||
<form action="install.php" method="post" name="setConfig" id="form">
|
||||
<input type='hidden' name='setup_db_drop_tables' id='setup_db_drop_tables' value='false'>
|
||||
<input type="hidden" id="hidden_goto" name="goto" value="{$mod_strings['LBL_BACK']}" />
|
||||
<table cellspacing="0" cellpadding="0" border="0" align="center" class="shell">
|
||||
|
||||
<tr><td colspan="2" id="help"><a href="{$help_url}" target='_blank'>{$mod_strings['LBL_HELP']} </a></td></tr>
|
||||
<tr>
|
||||
<th width="500">
|
||||
<p>
|
||||
<img src="{$sugar_md}" alt="SugarCRM" border="0">
|
||||
</p>
|
||||
{$mod_strings['LBL_DBCONF_TITLE']}
|
||||
</th>
|
||||
<th width="200" height="30" style="text-align: right;"><a href="http://www.sugarcrm.com" target="_blank">
|
||||
<IMG src="include/images/sugarcrm_login.png" width="145" height="30" alt="SugarCRM" border="0"></a>
|
||||
</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<div id="errorMsgs" style="display:none"></div>
|
||||
<div class="required">{$mod_strings['LBL_REQUIRED']}</div>
|
||||
<table width="100%" cellpadding="0" cellpadding="0" border="0" class="StyleDottedHr">
|
||||
<tr><th colspan="3" align="left" >{$mod_strings['LBL_DBCONF_TITLE_NAME']} </td></tr>
|
||||
|
||||
<tr><td colspan="3" align="left"> {$mod_strings['LBL_DBCONFIG_MSG3']}</td></tr>
|
||||
<tr><td width='1%'><span class="required">*</span></td>
|
||||
<td width='60%' nowrap><b>{$mod_strings['LBL_DBCONF_DB_NAME']} {$oci8sid}</b></td>
|
||||
<td width='35%' nowrap align="left">
|
||||
<input type="text" name="setup_db_database_name" value="{$_SESSION['setup_db_database_name']}"><br>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
|
||||
{$dbSplit1}
|
||||
|
||||
|
||||
<tr><th colspan="3" align="left">{$mod_strings['LBL_DBCONF_TITLE_USER_INFO']} </td></tr>
|
||||
<tr><td colspan="3" align="left">{$mod_strings['LBL_DBCONFIG_B_MSG1']}</td></tr>
|
||||
<tr>
|
||||
<td><span class="required">*</span></td>
|
||||
<td nowrap><b>{$mod_strings['LBL_DBCONF_DB_ADMIN_USER']}</b></td>
|
||||
<td nowrap align="left">
|
||||
<input type="text" name="setup_db_admin_user_name" maxlength="30" value="{$_SESSION['setup_db_admin_user_name']}" autocomplete="off"/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td nowrap><b>{$mod_strings['LBL_DBCONF_DB_ADMIN_PASSWORD']}</b></td>
|
||||
<td nowrap align="left"><input type="password" name="setup_db_admin_password" value="{$_SESSION['setup_db_admin_password']}" autocomplete="off" /></td></tr>
|
||||
</table>
|
||||
EOQ2;
|
||||
|
||||
//if we are installing in custom mode, include the following html
|
||||
if($_SESSION['setup_db_type'] != 'oci8' ){
|
||||
|
||||
// create / set db user dropdown
|
||||
$auto_select = '';$provide_select ='';$create_select = '';$same_select = '';
|
||||
if(isset($_SESSION['dbUSRData'])){
|
||||
// if($_SESSION['dbUSRData']=='auto') {$auto_select ='selected';}
|
||||
if($_SESSION['dbUSRData']=='provide') {$provide_select ='selected';}
|
||||
if(isset($_SESSION['install_type']) && !empty($_SESSION['install_type']) && strtolower($_SESSION['install_type'])=='custom'){
|
||||
if($_SESSION['dbUSRData']=='create') {$create_select ='selected';}
|
||||
}
|
||||
if($_SESSION['dbUSRData']=='same') {$same_select ='selected';}
|
||||
}else{
|
||||
$same_select ='selected';
|
||||
}
|
||||
$dbUSRDD = "<select name='dbUSRData' id='dbUSRData' onchange='toggleDBUser();'>";
|
||||
$dbUSRDD .= "<option value='provide' $provide_select>".$mod_strings['LBL_DBCONFIG_PROVIDE_DD']."</option>";
|
||||
$dbUSRDD .= "<option value='create' $create_select>".$mod_strings['LBL_DBCONFIG_CREATE_DD']."</option>";
|
||||
$dbUSRDD .= "<option value='same' $same_select>".$mod_strings['LBL_DBCONFIG_SAME_DD']."</option>";
|
||||
$dbUSRDD .= "</select><br> ";
|
||||
|
||||
|
||||
|
||||
|
||||
$out2 .=<<<EOQ2
|
||||
|
||||
<table width="100%" cellpadding="0" cellpadding="0" border="0" class="StyleDottedHr">
|
||||
<tr><td colspan="3" align="left"><br>{$mod_strings['LBL_DBCONFIG_SECURITY']}</td></tr>
|
||||
<tr><td width='1%'> </td><td width='60%'><div id='sugarDBUser'><b>{$mod_strings['LBL_DBCONF_SUGAR_DB_USER']}</b></div> </td><td width='35%'>$dbUSRDD</td></tr>
|
||||
</table>
|
||||
|
||||
<span id='connection_user_div' style="display:none">
|
||||
<table width="100%" cellpadding="0" cellpadding="0" border="0" class="StyleDottedHr">
|
||||
<tr>
|
||||
<td width='1%'><span class="required">*</span></td>
|
||||
<td nowrap width='60%'><b>{$mod_strings['LBL_DBCONF_SUGAR_DB_USER']}</b></td>
|
||||
<td width='35%'nowrap align="left">
|
||||
<input type="text" name="setup_db_sugarsales_user" maxlength="16" value="{$_SESSION['setup_db_sugarsales_user']}" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td nowrap><b>{$mod_strings['LBL_DBCONF_DB_PASSWORD']}</b></td>
|
||||
<td nowrap align="left"><input type="password" name="setup_db_sugarsales_password" value="{$_SESSION['setup_db_sugarsales_password']}" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td nowrap><b>{$mod_strings['LBL_DBCONF_DB_PASSWORD2']}</b></td>
|
||||
<td nowrap align="left"><input type="password" name="setup_db_sugarsales_password_retype" value="{$_SESSION['setup_db_sugarsales_password_retype']}" /></td>
|
||||
</tr></table>
|
||||
</span>
|
||||
|
||||
EOQ2;
|
||||
}
|
||||
|
||||
//set demo dropdown
|
||||
//$supported_demodata = array(
|
||||
// 'en_us' => 'English (US)',
|
||||
// 'zh_cn' => '简体中文',
|
||||
// 'ja_jp' => 'Japanese - 日本語',
|
||||
//);
|
||||
$demoDD = "<select name='demoData' id='demoData'><option value='no' >".$mod_strings['LBL_NO']."</option><option value='yes'>".$mod_strings['LBL_YES']."</option>";
|
||||
//foreach($supported_demodata as $key => $v){
|
||||
// // mssql is broken for mbcs
|
||||
// if( ($_SESSION['setup_db_type'] == 'mssql') && ($key != 'en_us'))
|
||||
// continue;
|
||||
// $selected = '';
|
||||
// if($_SESSION['demoData'] == $key)
|
||||
// $selected = "selected";
|
||||
// $demoDD .="<option value='$key' $selected>".$v."</option>";
|
||||
//}
|
||||
$demoDD .= "</select><br> ";
|
||||
|
||||
|
||||
$out3 =<<<EOQ3
|
||||
<table width="100%" cellpadding="0" cellpadding="0" border="0" class="StyleDottedHr">
|
||||
<tr><th colspan="3" align="left">{$mod_strings['LBL_DBCONF_DEMO_DATA_TITLE']}</th></tr>
|
||||
<tr>
|
||||
<td width='1%'> </td>
|
||||
<td width='60%'nowrap><b>{$mod_strings['LBL_DBCONF_DEMO_DATA']}</b></td>
|
||||
<td width='35%'nowrap align="left">
|
||||
{$demoDD}
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
EOQ3;
|
||||
|
||||
|
||||
$out4 =<<<EOQ4
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="right" colspan="2">
|
||||
<hr>
|
||||
<input type="hidden" name="current_step" value="{$next_step}">
|
||||
<table cellspacing="0" cellpadding="0" border="0" class="stdTable">
|
||||
<tr>
|
||||
<td>
|
||||
<input class="button" type="button" name="goto" value="{$mod_strings['LBL_BACK']}" id="button_back_dbConfig" onclick="document.getElementById('form').submit();" />
|
||||
</td>
|
||||
<td>
|
||||
<input class="button" type="button" name="goto" id="button_next2" value="{$mod_strings['LBL_NEXT']}" onClick="callDBCheck();"/>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
<br>
|
||||
|
||||
<script>
|
||||
function toggleDBUser(){
|
||||
if(typeof(document.getElementById('dbUSRData')) !='undefined'
|
||||
&& document.getElementById('dbUSRData') != null){
|
||||
|
||||
ouv = document.getElementById('dbUSRData').value;
|
||||
if(ouv == 'provide' || ouv == 'create'){
|
||||
document.getElementById('connection_user_div').style.display = '';
|
||||
document.getElementById('sugarDBUser').style.display = 'none';
|
||||
}else{
|
||||
document.getElementById('connection_user_div').style.display = 'none';
|
||||
document.getElementById('sugarDBUser').style.display = '';
|
||||
}
|
||||
}
|
||||
}
|
||||
toggleDBUser();
|
||||
|
||||
var msgPanel;
|
||||
function callDBCheck(){
|
||||
|
||||
//begin main function that will be called
|
||||
ajaxCall = function(msg_panel){
|
||||
//create success function for callback
|
||||
|
||||
getPanel = function() {
|
||||
var args = { width:"300px",
|
||||
modal:true,
|
||||
fixedcenter: true,
|
||||
constraintoviewport: false,
|
||||
underlay:"shadow",
|
||||
close:false,
|
||||
draggable:true,
|
||||
|
||||
effect:{effect:YAHOO.widget.ContainerEffect.FADE, duration:.5}
|
||||
} ;
|
||||
msg_panel = new YAHOO.widget.Panel('p_msg', args);
|
||||
|
||||
msg_panel.setHeader("{$mod_strings['LBL_LICENSE_CHKDB_HEADER']}");
|
||||
msg_panel.setBody(document.getElementById("checkingDiv").innerHTML);
|
||||
msg_panel.render(document.body);
|
||||
msgPanel = msg_panel;
|
||||
}
|
||||
|
||||
|
||||
passed = function(url){
|
||||
document.setConfig.goto.value="{$mod_strings['LBL_NEXT']}";
|
||||
document.getElementById('hidden_goto').value="{$mod_strings['LBL_NEXT']}";
|
||||
document.setConfig.current_step.value="{$next_step}";
|
||||
document.setConfig.submit();
|
||||
}
|
||||
success = function(o) {
|
||||
|
||||
//condition for just the preexisting database
|
||||
if (o.responseText.indexOf('preexeest')>=0){
|
||||
|
||||
// throw confirmation message
|
||||
msg_panel.setBody(document.getElementById("sysCheckMsg").innerHTML);
|
||||
msg_panel.render(document.body);
|
||||
msgPanel = msg_panel;
|
||||
document.getElementById('accept_btn').focus();
|
||||
//condition for no errors
|
||||
}else if (o.responseText.indexOf('dbCheckPassed')>=0){
|
||||
//make navigation
|
||||
passed("install.php?goto={$mod_strings['LBL_NEXT']}");
|
||||
|
||||
//condition for other errors
|
||||
}else{
|
||||
//turn off loading message
|
||||
msgPanel.hide();
|
||||
document.getElementById("errorMsgs").innerHTML = o.responseText;
|
||||
document.getElementById("errorMsgs").style.display = '';
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
}//end success
|
||||
|
||||
//set loading message and create url
|
||||
|
||||
postData = "checkDBSettings=true&to_pdf=1&sugar_body_only=1";
|
||||
postData += "&setup_db_database_name="+document.setConfig.setup_db_database_name.value;
|
||||
if(typeof(document.setConfig.setup_db_host_instance) != 'undefined'){
|
||||
postData += "&setup_db_host_instance="+document.setConfig.setup_db_host_instance.value;
|
||||
}
|
||||
postData += "&setup_db_host_name="+document.setConfig.setup_db_host_name.value;
|
||||
postData += "&setup_db_admin_user_name="+document.setConfig.setup_db_admin_user_name.value;
|
||||
postData += "&setup_db_admin_password="+document.setConfig.setup_db_admin_password.value;
|
||||
if(typeof(document.setConfig.setup_db_sugarsales_user) != 'undefined'){
|
||||
postData += "&setup_db_sugarsales_user="+document.setConfig.setup_db_sugarsales_user.value;
|
||||
}
|
||||
if(typeof(document.setConfig.setup_db_sugarsales_password) != 'undefined'){
|
||||
postData += "&setup_db_sugarsales_password="+document.setConfig.setup_db_sugarsales_password.value;
|
||||
}
|
||||
if(typeof(document.setConfig.setup_db_sugarsales_password_retype) != 'undefined'){
|
||||
postData += "&setup_db_sugarsales_password_retype="+document.setConfig.setup_db_sugarsales_password_retype.value;
|
||||
}
|
||||
if(typeof(document.setConfig.dbUSRData) != 'undefined'){
|
||||
postData += "&dbUSRData="+document.getElementById('dbUSRData').value;
|
||||
}
|
||||
|
||||
EOQ4;
|
||||
|
||||
$out_dd = 'postData += "&demoData="+document.setConfig.demoData.value;';
|
||||
$out5 =<<<EOQ5
|
||||
postData += "&to_pdf=1&sugar_body_only=1";
|
||||
|
||||
//if this is a call already in progress, then just return
|
||||
if(typeof ajxProgress != 'undefined'){
|
||||
return;
|
||||
}
|
||||
|
||||
getPanel();
|
||||
msgPanel.show;
|
||||
var ajxProgress = YAHOO.util.Connect.asyncRequest('POST','install.php', {success: success, failure: success}, postData);
|
||||
|
||||
|
||||
};//end ajaxCall method
|
||||
ajaxCall();
|
||||
return;
|
||||
}
|
||||
|
||||
function confirm_drop_tables(yes_no){
|
||||
|
||||
if(yes_no == true){
|
||||
document.getElementById('setup_db_drop_tables').value = true;
|
||||
//make navigation
|
||||
document.setConfig.goto.value="{$mod_strings['LBL_NEXT']}";
|
||||
document.getElementById('hidden_goto').value="{$mod_strings['LBL_NEXT']}";
|
||||
document.setConfig.current_step.value="{$next_step}";
|
||||
document.setConfig.submit();
|
||||
}else{
|
||||
//set drop tables to false
|
||||
document.getElementById('setup_db_drop_tables').value = false;
|
||||
msgPanel.hide();
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
<div id="checkingDiv" style="display:none">
|
||||
<table cellspacing="0" cellpadding="0" border="0">
|
||||
<tr><td>
|
||||
<p><img src='install/processing.gif'> <br>{$mod_strings['LBL_LICENSE_CHKDB_HEADER']}</p>
|
||||
</td></tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div id='sysCheckMsg' style="display:none">
|
||||
<table cellspacing="0" cellpadding="0" border="0" >
|
||||
<tr><td>
|
||||
<p>{$mod_strings['LBL_DROP_DB_CONFIRM']}</p>
|
||||
</td></tr>
|
||||
<tr><td align='center'>
|
||||
<input id='accept_btn' type='button' class='button' onclick='confirm_drop_tables(true)' value="{$mod_strings['LBL_ACCEPT']}">
|
||||
<input type='button' class='button' onclick='confirm_drop_tables(false)' id="button_cancel_dbConfig" value="{$mod_strings['LBL_CANCEL']}">
|
||||
</td></tr>
|
||||
</table>
|
||||
|
||||
<div>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
||||
|
||||
|
||||
EOQ5;
|
||||
|
||||
|
||||
|
||||
|
||||
//// END PAGE OUTPUT
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
|
||||
echo $out.$out2;
|
||||
echo $out3;
|
||||
echo $out4;
|
||||
echo $out_dd;
|
||||
echo $out5;
|
||||
|
||||
?>
|
||||
21721
install/demoData.en_us.php
Normal file
21721
install/demoData.en_us.php
Normal file
File diff suppressed because it is too large
Load Diff
356
install/download_modules.php
Normal file
356
install/download_modules.php
Normal file
@@ -0,0 +1,356 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* SugarCRM Community Edition is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2011 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
|
||||
global $sugar_version, $js_custom_version;
|
||||
$lang_curr = $_SESSION['language'];
|
||||
require_once('ModuleInstall/PackageManager/PackageManagerDisplay.php');
|
||||
|
||||
if(!isset( $install_script ) || !$install_script || empty($_SESSION['setup_db_admin_user_name'])){
|
||||
die($mod_strings['ERR_NO_DIRECT_SCRIPT']);
|
||||
}
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//// PREFILL $sugar_config VARS
|
||||
if(empty($sugar_config['upload_dir'])) {
|
||||
$sugar_config['upload_dir'] = 'cache/upload/';
|
||||
}
|
||||
if(empty($sugar_config['upload_maxsize'])) {
|
||||
$sugar_config['upload_maxsize'] = 8192000;
|
||||
}
|
||||
if(empty($sugar_config['upload_badext'])) {
|
||||
$sugar_config['upload_badext'] = array('php', 'php3', 'php4', 'php5', 'pl', 'cgi', 'py', 'asp', 'cfm', 'js', 'vbs', 'html', 'htm');
|
||||
}
|
||||
//// END PREFILL $sugar_config VARS
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
require_once('include/utils/zip_utils.php');
|
||||
|
||||
require_once('include/upload_file.php');
|
||||
|
||||
|
||||
|
||||
$GLOBALS['log'] = LoggerManager::getLogger('SugarCRM');
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//// PREP VARS FOR LANG PACK
|
||||
$base_upgrade_dir = $sugar_config['upload_dir'] . "upgrades";
|
||||
$base_tmp_upgrade_dir = $base_upgrade_dir."/temp";
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//// HANDLE FILE UPLOAD AND PROCESSING
|
||||
$errors = array();
|
||||
$uploadResult = '';
|
||||
//commitModules();
|
||||
if(isset($_REQUEST['languagePackAction']) && !empty($_REQUEST['languagePackAction'])) {
|
||||
switch($_REQUEST['languagePackAction']) {
|
||||
case 'upload':
|
||||
$perform = false;
|
||||
$tempFile = '';
|
||||
if(isset($_REQUEST['release_id']) && $_REQUEST['release_id'] != ""){
|
||||
require_once('ModuleInstall/PackageManager/PackageManager.php');
|
||||
$pm = new PackageManager();
|
||||
$tempFile = $pm->download($_REQUEST['release_id'], getcwd().'/'.$sugar_config['upload_dir']);
|
||||
$perform = true;
|
||||
//$base_filename = urldecode($tempFile);
|
||||
}else{
|
||||
$file = new UploadFile('language_pack');
|
||||
if($file->confirm_upload()){
|
||||
$perform = true;
|
||||
if(strpos($file->mime_type, 'zip') !== false) { // only .zip files
|
||||
if(langPackFinalMove($file)) {
|
||||
$perform = true;
|
||||
}
|
||||
else {
|
||||
$errors[] = $mod_strings['ERR_LANG_UPLOAD_3'];
|
||||
}
|
||||
} else {
|
||||
$errors[] = $mod_strings['ERR_LANG_UPLOAD_2'];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if($perform) { // check for a real file
|
||||
$uploadResult = $mod_strings['LBL_LANG_SUCCESS'];
|
||||
$result = langPackUnpack('langpack', $tempFile);
|
||||
} else {
|
||||
$errors[] = $mod_strings['ERR_LANG_UPLOAD_1'];
|
||||
}
|
||||
|
||||
if(count($errors) > 0) {
|
||||
foreach($errors as $error) {
|
||||
$uploadResult .= $error."<br />";
|
||||
}
|
||||
}
|
||||
break; // end 'validate'
|
||||
case 'commit':
|
||||
$sugar_config = commitModules(false, 'langpack');
|
||||
break;
|
||||
case 'uninstall': // leaves zip file in "uploaded" state
|
||||
$sugar_config = uninstallLanguagePack();
|
||||
break;
|
||||
case 'remove':
|
||||
removeLanguagePack();
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
//// END HANDLE FILE UPLOAD AND PROCESSING
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//// PRELOAD DISPLAY DATA
|
||||
$upload_max_filesize = ini_get('upload_max_filesize');
|
||||
$upload_max_filesize_bytes = return_bytes($upload_max_filesize);
|
||||
$fileMaxSize ='';
|
||||
if(!defined('SUGARCRM_MIN_UPLOAD_MAX_FILESIZE_BYTES')){
|
||||
define('SUGARCRM_MIN_UPLOAD_MAX_FILESIZE_BYTES', 6 * 1024 * 1024);
|
||||
}
|
||||
|
||||
if($upload_max_filesize_bytes < constant('SUGARCRM_MIN_UPLOAD_MAX_FILESIZE_BYTES')) {
|
||||
$GLOBALS['log']->debug("detected upload_max_filesize: $upload_max_filesize");
|
||||
$fileMaxSize = '<p class="error">'.$mod_strings['ERR_UPLOAD_MAX_FILESIZE']."</p>\n";
|
||||
}
|
||||
$availablePatches = getLangPacks(true);
|
||||
$installedLanguagePacks = getInstalledLangPacks();
|
||||
$errs = '';
|
||||
if(isset($validation_errors)) {
|
||||
if(count($validation_errors) > 0) {
|
||||
$errs = '<div id="errorMsgs">';
|
||||
$errs .= "<p>{$mod_strings['LBL_SYSOPTS_ERRS_TITLE']}</p>";
|
||||
$errs .= '<ul>';
|
||||
|
||||
foreach($validation_errors as $error) {
|
||||
$errs .= '<li>' . $error . '</li>';
|
||||
}
|
||||
|
||||
$errs .= '</ul>';
|
||||
$errs .= '</div>';
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
//// PRELOAD DISPLAY DATA
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//// BEING PAGE OUTPUT
|
||||
$disabled = "";
|
||||
$result = "";
|
||||
$out =<<<EOQ
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<meta http-equiv="Content-Script-Type" content="text/javascript">
|
||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||
<title>{$mod_strings['LBL_WIZARD_TITLE']} {$mod_strings['LBL_MODULE_TITLE']}</title>
|
||||
<link REL="SHORTCUT ICON" HREF="include/images/sugar_icon.ico">
|
||||
<link rel="stylesheet" href="install/install.css" type="text/css">
|
||||
<script type="text/javascript" src="install/installCommon.js"></script>
|
||||
<link rel="stylesheet" type="text/css" media="all" href="jscalendar/calendar-win2k-cold-1.css?s={$sugar_version}&c={$js_custom_version}">
|
||||
<script>jscal_today = 1161698116000; if(typeof app_strings == "undefined") app_strings = new Array();</script>
|
||||
<script type="text/javascript" src="include/javascript/sugar_grp1.js?s={$sugar_version}&c={$js_custom_version}"></script>
|
||||
<script type="text/javascript" src="include/javascript/sugar_grp1_yui.js?s={$sugar_version}&c={$js_custom_version}"></script>
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
if ( YAHOO.env.ua )
|
||||
UA = YAHOO.env.ua;
|
||||
-->
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<body onLoad="document.getElementById('button_next2').focus();">
|
||||
{$fileMaxSize}
|
||||
<table cellspacing="0" width="100%" cellpadding="0" border="0" align="center" class="shell">
|
||||
<tr><td colspan="2" id="help"><a href="{$help_url}" target='_blank'>{$mod_strings['LBL_HELP']} </a></td></tr>
|
||||
<tr>
|
||||
<th width="500">
|
||||
<p>
|
||||
<img src="{$sugar_md}" alt="SugarCRM" border="0">
|
||||
</p>{$mod_strings['LBL_MODULE_TITLE']}</th>
|
||||
<th width="200" style="text-align: right;"><a href="http://www.sugarcrm.com" target=
|
||||
"_blank"><IMG src="include/images/sugarcrm_login.png" width="145" height="30" alt="SugarCRM" border="0"></a>
|
||||
</th>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<p>{$mod_strings['LBL_LANG_1']}</p>
|
||||
<table width="100%" cellspacing="0" cellpadding="0" border="0" align="center" class="StyleDottedHr">
|
||||
<tr>
|
||||
<th colspan="2" align="left">{$mod_strings['LBL_LANG_TITLE']}</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
EOQ;
|
||||
$form =<<<EOQ1
|
||||
<form name="the_form" enctype="multipart/form-data"
|
||||
action="install.php" method="post">
|
||||
<input type="hidden" name="current_step" value="{$next_step}">
|
||||
<input type="hidden" name="language" value="{$lang_curr}">
|
||||
<input type="hidden" name="goto" value="{$mod_strings['LBL_CHECKSYS_RECHECK']}">
|
||||
<input type="hidden" name="languagePackAction" value="upload">
|
||||
<input type="hidden" name="install_type" value="custom">
|
||||
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="edit view">
|
||||
<tr>
|
||||
<td>
|
||||
<table width="450" border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td colspan='2'>
|
||||
{$mod_strings['LBL_LANG_UPLOAD']}:<br />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
|
||||
<input type="file" name="language_pack" onchange="uploadCheck();" size="40" />
|
||||
</td>
|
||||
<td valign="bottom">
|
||||
<input class='button' id="upload_button" type=button value="{$mod_strings['LBL_LANG_BUTTON_UPLOAD']}"
|
||||
disabled="disabled"
|
||||
onClick="document.the_form.language_pack_escaped.value = escape( document.the_form.language_pack.value );
|
||||
document.the_form.submit();"
|
||||
/>
|
||||
<input type=hidden name="language_pack_escaped" value="" />
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
{$uploadResult}
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
<script>
|
||||
function uploadCheck(){
|
||||
var len = escape(document.the_form.language_pack.value).length;
|
||||
if(escape(document.the_form.language_pack.value).substr(len-3,len) !='zip'){
|
||||
//document.the_form.upgrade_zip.value = '';
|
||||
//document.getElementById("upgrade_zip").value = '';
|
||||
alert('Not a zip file');
|
||||
document.the_form.language_pack.value = '';
|
||||
//document.getElementById("language_pack").value='';
|
||||
document.getElementById("upload_button").disabled='disabled';
|
||||
}
|
||||
else{
|
||||
//AJAX call for checking the file size and comparing with php.ini settings.
|
||||
var callback = {
|
||||
success:function(r) {
|
||||
document.the_form.upload_button.disabled='';
|
||||
}
|
||||
}
|
||||
//var file_name = document.getElementById('upgrade_zip').value;
|
||||
var file_name = document.the_form.language_pack.value;
|
||||
postData = 'file_name=' + file_name + 'install&action=UploadLangFileCheck&to_pdf=1';
|
||||
YAHOO.util.Connect.asyncRequest('POST', 'index.php', callback, postData);
|
||||
}
|
||||
}
|
||||
</script>
|
||||
EOQ1;
|
||||
$out1 =<<<EOQ2
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan=2>
|
||||
{$result}
|
||||
</td>
|
||||
</tr>
|
||||
<!--// Available Upgrades //-->
|
||||
<tr>
|
||||
<td align="left" colspan="2">
|
||||
<hr>
|
||||
<table cellspacing="0" cellpadding="0" border="0" class="stdTable">
|
||||
{$availablePatches}
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<td align="left" colspan="2">
|
||||
<hr>
|
||||
<table cellspacing="0" cellpadding="0" border="0" class="stdTable">
|
||||
{$installedLanguagePacks}
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="right" colspan="2">
|
||||
<hr>
|
||||
<form name="the_form1" action="install.php" method="post" id="form">
|
||||
<input type="hidden" name="current_step" value="{$next_step}">
|
||||
<input type="hidden" name="language" value="{$lang_curr}">
|
||||
<input type="hidden" name="install_type" value="custom">
|
||||
<table cellspacing="0" cellpadding="0" border="0" class="stdTable">
|
||||
<tr>
|
||||
|
||||
<td>
|
||||
<input type="hidden" name="default_user_name" value="admin">
|
||||
</td>
|
||||
<td>
|
||||
<input class="button" type="submit" name="goto" value="{$mod_strings['LBL_NEXT']}" id="button_next2" {$disabled} />
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
EOQ2;
|
||||
$hidden_fields = "<input type=\"hidden\" name=\"current_step\" value=\"{$next_step}\">";
|
||||
$hidden_fields .= "<input type=\"hidden\" name=\"goto\" value=\"{$mod_strings['LBL_CHECKSYS_RECHECK']}\">";
|
||||
$hidden_fields .= "<input type=\"hidden\" name=\"languagePackAction\" value=\"commit\">";
|
||||
//$form2 = PackageManagerDisplay::buildPackageDisplay($form, $hidden_fields, 'install.php', array('langpack'), 'form1', true);
|
||||
$form2 = PackageManagerDisplay::buildPatchDisplay($form, $hidden_fields, 'install.php', array('langpack'));
|
||||
|
||||
echo $out.$form2.$out1;
|
||||
|
||||
//unlinkTempFiles('','');
|
||||
//// END PAGEOUTPUT
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
?>
|
||||
316
install/download_patches.php
Normal file
316
install/download_patches.php
Normal file
@@ -0,0 +1,316 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* SugarCRM Community Edition is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2011 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
|
||||
global $sugar_version, $js_custom_version;
|
||||
require_once('ModuleInstall/PackageManager/PackageManagerDisplay.php');
|
||||
if( !isset( $install_script ) || !$install_script ){
|
||||
die($mod_strings['ERR_NO_DIRECT_SCRIPT']);
|
||||
}
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//// PREFILL $sugar_config VARS
|
||||
if(empty($sugar_config['upload_dir'])) {
|
||||
$sugar_config['upload_dir'] = 'cache/upload/';
|
||||
}
|
||||
if(empty($sugar_config['upload_maxsize'])) {
|
||||
$sugar_config['upload_maxsize'] = 8192000;
|
||||
}
|
||||
if(empty($sugar_config['upload_badext'])) {
|
||||
$sugar_config['upload_badext'] = array('php', 'php3', 'php4', 'php5', 'pl', 'cgi', 'py', 'asp', 'cfm', 'js', 'vbs', 'html', 'htm');
|
||||
}
|
||||
//// END PREFILL $sugar_config VARS
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
require_once('include/utils/zip_utils.php');
|
||||
|
||||
require_once('include/upload_file.php');
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//// PREP VARS FOR LANG PACK
|
||||
$base_upgrade_dir = $sugar_config['upload_dir'] . "upgrades";
|
||||
$base_tmp_upgrade_dir = $base_upgrade_dir."/temp";
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//// HANDLE FILE UPLOAD AND PROCESSING
|
||||
$errors = array();
|
||||
$uploadResult = '';
|
||||
if(isset($_REQUEST['languagePackAction']) && !empty($_REQUEST['languagePackAction'])) {
|
||||
switch($_REQUEST['languagePackAction']) {
|
||||
case 'upload':
|
||||
$perform = false;
|
||||
$tempFile = '';
|
||||
if(isset($_REQUEST['release_id']) && $_REQUEST['release_id'] != ""){
|
||||
require_once('ModuleInstall/PackageManager/PackageManager.php');
|
||||
$pm = new PackageManager();
|
||||
$tempFile = $pm->download('3', '3', $_REQUEST['release_id'], getcwd().'/'.$sugar_config['upload_dir']);
|
||||
$perform = true;
|
||||
//$base_filename = urldecode($tempFile);
|
||||
}else{
|
||||
$file = new UploadFile('language_pack');
|
||||
if($file->confirm_upload())
|
||||
$perform = true;
|
||||
if(strpos($file->mime_type, 'zip') !== false) { // only .zip files
|
||||
if(langPackFinalMove($file)) {
|
||||
$perform = true;
|
||||
}
|
||||
else {
|
||||
$errors[] = $mod_strings['ERR_LANG_UPLOAD_3'];
|
||||
}
|
||||
} else {
|
||||
$errors[] = $mod_strings['ERR_LANG_UPLOAD_2'];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if($perform) { // check for a real file
|
||||
$uploadResult = $mod_strings['LBL_LANG_SUCCESS'];
|
||||
$result = langPackUnpack('patch', $tempFile);
|
||||
} else {
|
||||
$errors[] = $mod_strings['ERR_LANG_UPLOAD_1'];
|
||||
}
|
||||
|
||||
if(count($errors) > 0) {
|
||||
foreach($errors as $error) {
|
||||
$uploadResult .= $error."<br />";
|
||||
}
|
||||
}
|
||||
break; // end 'validate'
|
||||
case 'commit':
|
||||
$sugar_config = commitPatch();
|
||||
break;
|
||||
case 'remove':
|
||||
removeLanguagePack();
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
//// END HANDLE FILE UPLOAD AND PROCESSING
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//// PRELOAD DISPLAY DATA
|
||||
$upload_max_filesize = ini_get('upload_max_filesize');
|
||||
$upload_max_filesize_bytes = return_bytes($upload_max_filesize);
|
||||
$fileMaxSize ='';
|
||||
if(!defined('SUGARCRM_MIN_UPLOAD_MAX_FILESIZE_BYTES')){
|
||||
define('SUGARCRM_MIN_UPLOAD_MAX_FILESIZE_BYTES', 6 * 1024 * 1024);
|
||||
}
|
||||
if($upload_max_filesize_bytes < constant('SUGARCRM_MIN_UPLOAD_MAX_FILESIZE_BYTES')) {
|
||||
$GLOBALS['log']->debug("detected upload_max_filesize: $upload_max_filesize");
|
||||
$fileMaxSize = '<p class="error">'.$mod_strings['ERR_UPLOAD_MAX_FILESIZE']."</p>\n";
|
||||
}
|
||||
$availablePatches = getLangPacks(false, array('patch'), $mod_strings['LBL_PATCH_READY']);
|
||||
|
||||
$errs = '';
|
||||
if(isset($validation_errors)) {
|
||||
if(count($validation_errors) > 0) {
|
||||
$errs = '<div id="errorMsgs">';
|
||||
$errs .= "<p>{$mod_strings['LBL_SYSOPTS_ERRS_TITLE']}</p>";
|
||||
$errs .= '<ul>';
|
||||
|
||||
foreach($validation_errors as $error) {
|
||||
$errs .= '<li>' . $error . '</li>';
|
||||
}
|
||||
|
||||
$errs .= '</ul>';
|
||||
$errs .= '</div>';
|
||||
}
|
||||
}
|
||||
|
||||
//// PRELOAD DISPLAY DATA
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//// BEING PAGE OUTPUT
|
||||
$disabled = "";
|
||||
$result = "";
|
||||
$out =<<<EOQ
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<meta http-equiv="Content-Script-Type" content="text/javascript">
|
||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||
<title>{$mod_strings['LBL_WIZARD_TITLE']} {$next_step}</title>
|
||||
<link REL="SHORTCUT ICON" HREF="include/images/sugar_icon.ico">
|
||||
<link rel="stylesheet" href="install/install.css" type="text/css">
|
||||
<script type="text/javascript" src="install/installCommon.js"></script>
|
||||
<link rel="stylesheet" type="text/css" media="all" href="jscalendar/calendar-win2k-cold-1.css?s={$sugar_version}&c={$js_custom_version}">
|
||||
<script>jscal_today = 1161698116000; if(typeof app_strings == "undefined") app_strings = new Array();</script>
|
||||
<script type="text/javascript" src="include/javascript/sugar_grp1.js?s={$sugar_version}&c={$js_custom_version}"></script>
|
||||
<script type="text/javascript" src="include/javascript/sugar_grp1_yui.js?s={$sugar_version}&c={$js_custom_version}"></script>
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
if ( YAHOO.env.ua )
|
||||
UA = YAHOO.env.ua;
|
||||
-->
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<body onLoad="document.getElementById('button_next2').focus();">
|
||||
{$fileMaxSize}
|
||||
<table cellspacing="0" width="100%" cellpadding="0" border="0" align="center" class="shell">
|
||||
<tr><td colspan="2" id="help"><a href="{$help_url}" target='_blank'>{$mod_strings['LBL_HELP']} </a></td></tr>
|
||||
<tr>
|
||||
<th width="500">
|
||||
<p>
|
||||
<img src="{$sugar_md}" alt="SugarCRM" border="0">
|
||||
</p>
|
||||
{$mod_strings['LBL_PATCHES_TITLE']}</th>
|
||||
<th width="200" style="text-align: right;"><a href="http://www.sugarcrm.com" target=
|
||||
"_blank"><IMG src="include/images/sugarcrm_login.png" width="145" height="30" alt="SugarCRM" border="0"></a>
|
||||
</th>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<p>{$mod_strings['LBL_PATCH_1']}</p>
|
||||
<table width="100%" cellspacing="0" cellpadding="0" border="0" align="center" class="StyleDottedHr">
|
||||
<tr>
|
||||
<th colspan="2" align="left">{$mod_strings['LBL_PATCH_TITLE']}</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
EOQ;
|
||||
$form =<<<EOQ1
|
||||
<form name="the_form" enctype="multipart/form-data"
|
||||
action="install.php" method="post">
|
||||
<input type="hidden" name="current_step" value="{$next_step}">
|
||||
<input type="hidden" name="goto" value="{$mod_strings['LBL_CHECKSYS_RECHECK']}">
|
||||
<input type="hidden" name="languagePackAction" value="upload">
|
||||
|
||||
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="edit view">
|
||||
<tr>
|
||||
<td>
|
||||
<table width="450" border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td colspan='2'>
|
||||
{$mod_strings['LBL_PATCH_UPLOAD']}:
|
||||
</td>
|
||||
</tr><tr>
|
||||
<td>
|
||||
|
||||
<input type="file" name="language_pack" size="40" />
|
||||
</td>
|
||||
<td valign="bottom">
|
||||
<input class='button' type=button value="{$mod_strings['LBL_LANG_BUTTON_UPLOAD']}" onClick="document.the_form.language_pack_escaped.value = escape( document.the_form.language_pack.value ); document.the_form.submit();"/>
|
||||
<input type=hidden name="language_pack_escaped" value="" />
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
{$uploadResult}
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
EOQ1;
|
||||
$out1 =<<<EOQ2
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan=2>
|
||||
{$result}
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<!--// Available Upgrades //-->
|
||||
<tr>
|
||||
<td align="left" colspan="2">
|
||||
<hr>
|
||||
<table cellspacing="0" cellpadding="0" border="0" class="stdTable">
|
||||
{$availablePatches}
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="right" colspan="2">
|
||||
<hr>
|
||||
<table cellspacing="0" cellpadding="0" border="0" class="stdTable">
|
||||
<tr><td><form action='install.php' method='POST'>
|
||||
<input type='hidden' name='current_step' value="{$next_step}">
|
||||
<input type='hidden' name='goto' value="{$mod_strings['LBL_CHECKSYS_RECHECK']}">
|
||||
<input type='hidden' name='languagePackAction' value='commit'>
|
||||
<input type='submit' value="{$mod_strings['LBL_INSTALL']}" class='button'>
|
||||
</form>
|
||||
</td></tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="right" colspan="2">
|
||||
<hr>
|
||||
<form name="the_form1" action="install.php" method="post">
|
||||
<input type="hidden" name="current_step" value="{$next_step}">
|
||||
<table cellspacing="0" cellpadding="0" border="0" class="stdTable">
|
||||
<tr>
|
||||
<td>
|
||||
|
||||
</td>
|
||||
<td>
|
||||
<input class="button" type="submit" name="goto" value="{$mod_strings['LBL_NEXT']}" id="button_next2" {$disabled} />
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
EOQ2;
|
||||
$hidden_fields = "<input type=\"hidden\" name=\"current_step\" value=\"{$next_step}\">";
|
||||
$hidden_fields .= "<input type=\"hidden\" name=\"goto\" value=\"{$mod_strings['LBL_CHECKSYS_RECHECK']}\">";
|
||||
$hidden_fields .= "<input type=\"hidden\" name=\"languagePackAction\" value=\"upload\">";
|
||||
$form2 = PackageManagerDisplay::buildPatchDisplay($form, $hidden_fields, 'install.php', array('patch'));
|
||||
|
||||
echo $out.$form2.$out1;
|
||||
|
||||
//unlinkTempFiles('','');
|
||||
//// END PAGEOUTPUT
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
?>
|
||||
47
install/installCommon.js
Normal file
47
install/installCommon.js
Normal file
@@ -0,0 +1,47 @@
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
|
||||
|
||||
function showHelp(step)
|
||||
{
|
||||
url = 'http://www.sugarcrm.com/forums/';
|
||||
name = 'helpWindowPopup';
|
||||
window.open(url,name);
|
||||
}
|
||||
|
||||
function setFocus() {
|
||||
focus = document.getElementById('defaultFocus');
|
||||
focus.focus();
|
||||
}
|
||||
93
install/installDisabled.php
Normal file
93
install/installDisabled.php
Normal file
@@ -0,0 +1,93 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* SugarCRM Community Edition is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2011 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
|
||||
|
||||
|
||||
|
||||
if( !isset( $install_script ) || !$install_script ){
|
||||
die($mod_strings['ERR_NO_DIRECT_SCRIPT']);
|
||||
}
|
||||
|
||||
|
||||
|
||||
$out =<<<EOQ
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||
<title>{$disabled_title}</title>
|
||||
<link rel="stylesheet" href="install/install.css" type="text/css">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<table cellspacing="0" cellpadding="0" border="0" align="center" class=
|
||||
"shell">
|
||||
<tr>
|
||||
<th width="400">{$disabled_title_2}</th>
|
||||
|
||||
<th width="200" height="30" style="text-align: right;"><a href="http://www.sugarcrm.com" target="_blank"><IMG src="include/images/sugarcrm_login.png" width="145" height="30" alt="SugarCRM" border="0"></a></th>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<p>
|
||||
<img src="{$sugar_md}" alt="SugarCRM" border="0">
|
||||
</p>
|
||||
{$disabled_text}
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td align="right" colspan="2" height="20">
|
||||
<hr>
|
||||
<form action="install.php" method="post" name="form" id="form">
|
||||
<table cellspacing="0" cellpadding="0" border="0" class="stdTable">
|
||||
<tr>
|
||||
<td><input class="button" type="submit" value="{$mod_strings['LBL_START']}" /></td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
||||
EOQ;
|
||||
echo $out;
|
||||
?>
|
||||
373
install/installHelp.php
Normal file
373
install/installHelp.php
Normal file
@@ -0,0 +1,373 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* SugarCRM Community Edition is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2011 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
|
||||
|
||||
|
||||
class HelpItem {
|
||||
var $associated_field = '';
|
||||
var $title = '';
|
||||
var $text = '';
|
||||
}
|
||||
|
||||
function &help_menu_html() {
|
||||
$str =<<<HEREDOC_END
|
||||
<div>SugarCRM Install Help</div>
|
||||
<ul>
|
||||
<li><a href="$_SERVER[PHP_SELF]?step=1">Step 1: Prerequisite checks</a></li>
|
||||
<li><a href="$_SERVER[PHP_SELF]?step=2">Step 2: Database configuration</a></li>
|
||||
<li><a href="$_SERVER[PHP_SELF]?step=3">Step 3: Site configuration</a></li>
|
||||
<li><a href="$_SERVER[PHP_SELF]?step=4">Step 4: Saving config file and setting up the database</a></li>
|
||||
<li><a href="$_SERVER[PHP_SELF]?step=5">Step 5: Registration</a></li>
|
||||
</ul>
|
||||
HEREDOC_END;
|
||||
return $str;
|
||||
}
|
||||
|
||||
function &format_help_items(&$help_items)
|
||||
{
|
||||
$str = '<table>';
|
||||
|
||||
foreach($help_items as $help_item)
|
||||
{
|
||||
$str .= <<< HEREDOC_END
|
||||
<tr><td><b>$help_item->title</b></td></tr>
|
||||
<tr><td>$help_item->text</td></tr>
|
||||
HEREDOC_END;
|
||||
}
|
||||
|
||||
$str .= '</table>';
|
||||
|
||||
return $str;
|
||||
}
|
||||
|
||||
function &help_step_1_html()
|
||||
{
|
||||
$help_items = array();
|
||||
|
||||
$help_item = new HelpItem();
|
||||
$help_item->title = 'PHP Version';
|
||||
$help_item->text = <<< HEREDOC_END
|
||||
The version of PHP installed must be 4.3.x or 5.x.
|
||||
HEREDOC_END;
|
||||
|
||||
$help_items[] = $help_item;
|
||||
|
||||
$help_item = new HelpItem();
|
||||
$help_item->title = 'MySQL Database';
|
||||
$help_item->text = <<< HEREDOC_END
|
||||
Checking that the MySQL API is accessible.
|
||||
HEREDOC_END;
|
||||
|
||||
$help_items[] = $help_item;
|
||||
|
||||
$help_item = new HelpItem();
|
||||
$help_item->title = 'SugarCRM Configuration File';
|
||||
$help_item->text = <<< HEREDOC_END
|
||||
The configuration file (config.php) must be writable.
|
||||
HEREDOC_END;
|
||||
|
||||
$help_items[] = $help_item;
|
||||
|
||||
$help_item = new HelpItem();
|
||||
$help_item->title = 'Cache Sub-Directories';
|
||||
$help_item->text = <<< HEREDOC_END
|
||||
All the sub-directories beneath the cache directory (cache) must be
|
||||
writable.
|
||||
HEREDOC_END;
|
||||
|
||||
$help_items[] = $help_item;
|
||||
|
||||
$help_item = new HelpItem();
|
||||
$help_item->title = 'Session Save Path';
|
||||
$help_item->text = <<< HEREDOC_END
|
||||
The session save path specified in the PHP initialization file (php.ini)
|
||||
as session_save_path must exist and be writable.
|
||||
HEREDOC_END;
|
||||
|
||||
$help_items[] = $help_item;
|
||||
|
||||
$str =format_help_items($help_items);
|
||||
return $str;
|
||||
}
|
||||
|
||||
function &help_step_2_html()
|
||||
{
|
||||
$help_items = array();
|
||||
|
||||
$help_item = new HelpItem();
|
||||
$help_item->title = 'Host Name';
|
||||
$help_item->text = <<< HEREDOC_END
|
||||
TODO
|
||||
HEREDOC_END;
|
||||
|
||||
$help_items[] = $help_item;
|
||||
|
||||
$help_item = new HelpItem();
|
||||
$help_item->title = 'Database Name';
|
||||
$help_item->text = <<< HEREDOC_END
|
||||
TODO
|
||||
HEREDOC_END;
|
||||
|
||||
$help_items[] = $help_item;
|
||||
|
||||
$help_item = new HelpItem();
|
||||
$help_item->title = 'Create Database';
|
||||
$help_item->text = <<< HEREDOC_END
|
||||
TODO
|
||||
HEREDOC_END;
|
||||
|
||||
$help_items[] = $help_item;
|
||||
|
||||
$help_item = new HelpItem();
|
||||
$help_item->title = 'User Name for SugarCRM';
|
||||
$help_item->text = <<< HEREDOC_END
|
||||
TODO
|
||||
HEREDOC_END;
|
||||
|
||||
$help_items[] = $help_item;
|
||||
|
||||
$help_item = new HelpItem();
|
||||
$help_item->title = 'Create User';
|
||||
$help_item->text = <<< HEREDOC_END
|
||||
TODO
|
||||
HEREDOC_END;
|
||||
|
||||
$help_items[] = $help_item;
|
||||
|
||||
$help_item = new HelpItem();
|
||||
$help_item->title = 'Password for SugarCRM';
|
||||
$help_item->text = <<< HEREDOC_END
|
||||
TODO
|
||||
HEREDOC_END;
|
||||
|
||||
$help_items[] = $help_item;
|
||||
|
||||
$help_item = new HelpItem();
|
||||
$help_item->title = 'Re-Type Password for SugarCRM';
|
||||
$help_item->text = <<< HEREDOC_END
|
||||
TODO
|
||||
HEREDOC_END;
|
||||
|
||||
$help_items[] = $help_item;
|
||||
|
||||
$help_item = new HelpItem();
|
||||
$help_item->title = 'Drop and recreate existing SugarCRM tables?';
|
||||
$help_item->text = <<< HEREDOC_END
|
||||
TODO
|
||||
HEREDOC_END;
|
||||
|
||||
$help_items[] = $help_item;
|
||||
|
||||
$help_item = new HelpItem();
|
||||
$help_item->title = 'Populate database with demo data?';
|
||||
$help_item->text = <<< HEREDOC_END
|
||||
TODO
|
||||
HEREDOC_END;
|
||||
|
||||
$help_items[] = $help_item;
|
||||
|
||||
$help_item = new HelpItem();
|
||||
$help_item->title = 'Database Admin User Name';
|
||||
$help_item->text = <<< HEREDOC_END
|
||||
TODO
|
||||
HEREDOC_END;
|
||||
|
||||
$help_items[] = $help_item;
|
||||
|
||||
$help_item = new HelpItem();
|
||||
$help_item->title = 'Database Admin Password';
|
||||
$help_item->text = <<< HEREDOC_END
|
||||
TODO
|
||||
HEREDOC_END;
|
||||
|
||||
$help_items[] = $help_item;
|
||||
|
||||
$str =format_help_items($help_items);
|
||||
return $str;
|
||||
}
|
||||
|
||||
function &help_step_3_html()
|
||||
{
|
||||
$help_items = array();
|
||||
|
||||
$help_item = new HelpItem();
|
||||
$help_item->title = 'URL';
|
||||
$help_item->text = <<< HEREDOC_END
|
||||
TODO
|
||||
HEREDOC_END;
|
||||
|
||||
$help_items[] = $help_item;
|
||||
|
||||
$help_item = new HelpItem();
|
||||
$help_item->title = 'SugarCRM Admin Password';
|
||||
$help_item->text = <<< HEREDOC_END
|
||||
TODO
|
||||
HEREDOC_END;
|
||||
|
||||
$help_items[] = $help_item;
|
||||
|
||||
$help_item = new HelpItem();
|
||||
$help_item->title = 'Re-type SugarCRM Admin Password';
|
||||
$help_item->text = <<< HEREDOC_END
|
||||
TODO
|
||||
HEREDOC_END;
|
||||
|
||||
$help_items[] = $help_item;
|
||||
|
||||
$help_item = new HelpItem();
|
||||
$help_item->title = 'Allow SugarCRM to collect anonymous usage information?';
|
||||
$help_item->text = <<< HEREDOC_END
|
||||
TODO
|
||||
HEREDOC_END;
|
||||
|
||||
$help_items[] = $help_item;
|
||||
|
||||
$help_item = new HelpItem();
|
||||
$help_item->title = 'Use a Custom Session Directory for SugarCRM';
|
||||
$help_item->text = <<< HEREDOC_END
|
||||
TODO
|
||||
HEREDOC_END;
|
||||
|
||||
$help_items[] = $help_item;
|
||||
|
||||
$help_item = new HelpItem();
|
||||
$help_item->title = 'Path to Session Directory';
|
||||
$help_item->text = <<< HEREDOC_END
|
||||
TODO
|
||||
HEREDOC_END;
|
||||
|
||||
$help_items[] = $help_item;
|
||||
|
||||
$help_item = new HelpItem();
|
||||
$help_item->title = 'Provide Your Own Application ID';
|
||||
$help_item->text = <<< HEREDOC_END
|
||||
TODO
|
||||
HEREDOC_END;
|
||||
|
||||
$help_items[] = $help_item;
|
||||
|
||||
$help_item = new HelpItem();
|
||||
$help_item->title = 'Application ID';
|
||||
$help_item->text = <<< HEREDOC_END
|
||||
TODO
|
||||
HEREDOC_END;
|
||||
|
||||
$help_items[] = $help_item;
|
||||
|
||||
$str =format_help_items($help_items);
|
||||
return $str;
|
||||
}
|
||||
|
||||
function &help_step_4_html()
|
||||
{
|
||||
$help_items = array();
|
||||
|
||||
$help_item = new HelpItem();
|
||||
$help_item->title = 'Perform Install';
|
||||
$help_item->text = <<< HEREDOC_END
|
||||
TODO
|
||||
HEREDOC_END;
|
||||
|
||||
$help_items[] = $help_item;
|
||||
|
||||
$str =format_help_items($help_items);
|
||||
return $str;
|
||||
}
|
||||
|
||||
function &help_step_5_html()
|
||||
{
|
||||
$help_items = array();
|
||||
|
||||
$help_item = new HelpItem();
|
||||
$help_item->title = 'Registration';
|
||||
$help_item->text = <<< HEREDOC_END
|
||||
TODO
|
||||
HEREDOC_END;
|
||||
|
||||
$help_items[] = $help_item;
|
||||
|
||||
$str =format_help_items($help_items);
|
||||
return $str;
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||
<title>SugarCRM Install Help</title>
|
||||
<link rel="stylesheet" href="install/install.css" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
<?php
|
||||
if(isset($_GET['step']))
|
||||
{
|
||||
switch($_GET['step'])
|
||||
{
|
||||
case 1:
|
||||
echo help_step_1_html();
|
||||
break;
|
||||
case 2:
|
||||
echo help_step_2_html();
|
||||
break;
|
||||
case 3:
|
||||
echo help_step_3_html();
|
||||
break;
|
||||
case 4:
|
||||
echo help_step_4_html();
|
||||
break;
|
||||
case 5:
|
||||
echo help_step_5_html();
|
||||
break;
|
||||
default:
|
||||
echo help_menu_html();
|
||||
break;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
echo help_menu_html();
|
||||
}
|
||||
?>
|
||||
|
||||
<form>
|
||||
<input type="button" value="Close" onclick="javascript:window.close();" />
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
421
install/installSystemCheck.php
Normal file
421
install/installSystemCheck.php
Normal file
@@ -0,0 +1,421 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* SugarCRM Community Edition is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2011 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
|
||||
|
||||
$_SESSION['setup_license_accept'] = true;
|
||||
|
||||
function runCheck($install_script = false, $mod_strings){
|
||||
installLog("Begin System Check Process *************");
|
||||
|
||||
if( !isset( $install_script ) || !$install_script ){
|
||||
installLog("Error:: ".$mod_strings['ERR_NO_DIRECT_SCRIPT']);
|
||||
die($mod_strings['ERR_NO_DIRECT_SCRIPT']);
|
||||
}
|
||||
|
||||
if(!defined('SUGARCRM_MIN_MEM')) {
|
||||
define('SUGARCRM_MIN_MEM', 40);
|
||||
}
|
||||
|
||||
|
||||
|
||||
// for keeping track of whether to enable/disable the 'Next' button
|
||||
$error_found = false;
|
||||
$error_txt = '';
|
||||
|
||||
|
||||
// check IIS and FastCGI
|
||||
$server_software = $_SERVER["SERVER_SOFTWARE"];
|
||||
if ((strpos($_SERVER["SERVER_SOFTWARE"],'Microsoft-IIS') !== false)
|
||||
&& php_sapi_name() == 'cgi-fcgi'
|
||||
&& ini_get('fastcgi.logging') != '0')
|
||||
{
|
||||
installLog($mod_strings['ERR_CHECKSYS_FASTCGI_LOGGING']);
|
||||
$iisVersion = "<b><span class=stop>{$mod_strings['ERR_CHECKSYS_FASTCGI_LOGGING']}</span></b>";
|
||||
$error_found = true;
|
||||
$error_txt .= '
|
||||
<tr>
|
||||
<td><b>'.$mod_strings['LBL_CHECKSYS_FASTCGI'].'</b></td>
|
||||
<td ><span class="error">'.$iisVersion.'</span></td>
|
||||
</tr>';
|
||||
}
|
||||
|
||||
if(strpos($server_software,'Microsoft-IIS') !== false)
|
||||
{
|
||||
$iis_version = '';
|
||||
if(preg_match_all("/^.*\/(\d+\.?\d*)$/", $server_software, $out))
|
||||
$iis_version = $out[1][0];
|
||||
|
||||
$check_iis_version_result = check_iis_version($iis_version);
|
||||
if($check_iis_version_result == -1) {
|
||||
installLog($mod_strings['ERR_CHECKSYS_IIS_INVALID_VER'].' '.$iis_version);
|
||||
$iisVersion = "<b><span class=stop>{$mod_strings['ERR_CHECKSYS_IIS_INVALID_VER']} {$iis_version}</span></b>";
|
||||
$error_found = true;
|
||||
$error_txt .= '
|
||||
<tr>
|
||||
<td><b>'.$mod_strings['LBL_CHECKSYS_IISVER'].'</b></td>
|
||||
<td ><span class="error">'.$iisVersion.'</span></td>
|
||||
</tr>';
|
||||
} else if(php_sapi_name() != 'cgi-fcgi')
|
||||
{
|
||||
installLog($mod_strings['ERR_CHECKSYS_FASTCGI'].' '.$iis_version);
|
||||
$iisVersion = "<b><span class=stop>{$mod_strings['ERR_CHECKSYS_FASTCGI']}</span></b>";
|
||||
$error_found = true;
|
||||
$error_txt .= '
|
||||
<tr>
|
||||
<td><b>'.$mod_strings['LBL_CHECKSYS_FASTCGI'].'</b></td>
|
||||
<td ><span class="error">'.$iisVersion.'</span></td>
|
||||
</tr>';
|
||||
} else if(ini_get('fastcgi.logging') != '0')
|
||||
{
|
||||
installLog($mod_strings['ERR_CHECKSYS_FASTCGI_LOGGING'].' '.$iis_version);
|
||||
$iisVersion = "<b><span class=stop>{$mod_strings['ERR_CHECKSYS_FASTCGI_LOGGING']}</span></b>";
|
||||
$error_found = true;
|
||||
$error_txt .= '
|
||||
<tr>
|
||||
<td><b>'.$mod_strings['LBL_CHECKSYS_FASTCGI'].'</b></td>
|
||||
<td ><span class="error">'.$iisVersion.'</span></td>
|
||||
</tr>';
|
||||
}
|
||||
}
|
||||
|
||||
// PHP VERSION
|
||||
$php_version = constant('PHP_VERSION');
|
||||
$check_php_version_result = check_php_version($php_version);
|
||||
|
||||
if($check_php_version_result == -1) {
|
||||
installLog($mod_strings['ERR_CHECKSYS_PHP_INVALID_VER'].' '.$php_version);
|
||||
$phpVersion = "<b><span class=stop>{$mod_strings['ERR_CHECKSYS_PHP_INVALID_VER']} {$php_version} )</span></b>";
|
||||
$error_found = true;
|
||||
$error_txt .= '
|
||||
<tr>
|
||||
<td><b>'.$mod_strings['LBL_CHECKSYS_PHPVER'].'</b></td>
|
||||
<td ><span class="error">'.$phpVersion.'</span></td>
|
||||
</tr>';
|
||||
|
||||
}
|
||||
|
||||
//Php Backward compatibility checks
|
||||
if(ini_get("zend.ze1_compatibility_mode")) {
|
||||
installLog($mod_strings['LBL_BACKWARD_COMPATIBILITY_ON'].' '.'Php Backward Compatibility');
|
||||
$phpCompatibility = "<b><span class=stop>{$mod_strings['LBL_BACKWARD_COMPATIBILITY_ON']}</span></b>";
|
||||
$error_found = true;
|
||||
$error_txt .= '
|
||||
<tr>
|
||||
<td><b>Php Backward Compatibility</b></td>
|
||||
<td ><span class="error">'.$phpCompatibility.'</span></td>
|
||||
</tr>';
|
||||
|
||||
}
|
||||
|
||||
// database and connect
|
||||
|
||||
if (!empty($_REQUEST['setup_db_type']))
|
||||
$_SESSION['setup_db_type'] = $_REQUEST['setup_db_type'];
|
||||
|
||||
$mssqlStatus = '';
|
||||
$dbVersion = '';
|
||||
// Removed php_sqlsrv install support until the driver support is out of beta status
|
||||
$supported_dbs = array("mysql_connect",
|
||||
"mysqli_connect",
|
||||
"mssql_connect",
|
||||
|
||||
"sqlsrv_connect",
|
||||
);
|
||||
$db_support_exists = false;
|
||||
|
||||
foreach ($supported_dbs as $dbfunct){
|
||||
|
||||
if( function_exists( $dbfunct) ){
|
||||
$db_support_exists = true;
|
||||
installLog("Found at least one supported DB Type");
|
||||
break;
|
||||
}
|
||||
}
|
||||
if( !$db_support_exists ){
|
||||
$db_name = $mod_strings['LBL_DB_UNAVAILABLE'];
|
||||
installLog("ERROR:: {$mod_strings['LBL_CHECKSYS_DB_SUPPORT_NOT_AVAILABLE']}");
|
||||
$dbStatus = "<b><span class=stop>{$mod_strings['LBL_CHECKSYS_DB_SUPPORT_NOT_AVAILABLE']}</span></b>";
|
||||
$error_found = true;
|
||||
$error_txt .= '
|
||||
<tr>
|
||||
<td><strong>'.$db_name.'</strong></td>
|
||||
<td class="error">'.$dbStatus.'</td>
|
||||
</tr>';
|
||||
}
|
||||
|
||||
// XML Parsing
|
||||
if(!function_exists('xml_parser_create')) {
|
||||
$xmlStatus = "<b><span class=stop>{$mod_strings['LBL_CHECKSYS_XML_NOT_AVAILABLE']}</span></b>";
|
||||
installLog("ERROR:: {$mod_strings['LBL_CHECKSYS_XML_NOT_AVAILABLE']}");
|
||||
$error_found = true;
|
||||
$error_txt .= '
|
||||
<tr>
|
||||
<td><strong>'.$mod_strings['LBL_CHECKSYS_XML'].'</strong></td>
|
||||
<td class="error">'.$xmlStatus.'</td>
|
||||
</tr>';
|
||||
}else{
|
||||
installLog("XML Parsing Support Found");
|
||||
}
|
||||
|
||||
|
||||
// mbstrings
|
||||
if(!function_exists('mb_strlen')) {
|
||||
$mbstringStatus = "<b><span class=stop>{$mod_strings['ERR_CHECKSYS_MBSTRING']}</font></b>";
|
||||
installLog("ERROR:: {$mod_strings['ERR_CHECKSYS_MBSTRING']}");
|
||||
$error_found = true;
|
||||
$error_txt .= '
|
||||
<tr>
|
||||
<td><strong>'.$mod_strings['LBL_CHECKSYS_MBSTRING'].'</strong></td>
|
||||
<td class="error">'.$mbstringStatus.'</td>
|
||||
</tr>';
|
||||
}else{
|
||||
installLog("MBString Support Found");
|
||||
}
|
||||
|
||||
// zip
|
||||
if(!class_exists('ZipArchive')) {
|
||||
$zipStatus = "<b><span class=stop>{$mod_strings['ERR_CHECKSYS_ZIP']}</font></b>";
|
||||
installLog("ERROR:: {$mod_strings['ERR_CHECKSYS_ZIP']}");
|
||||
}else{
|
||||
installLog("ZIP Support Found");
|
||||
}
|
||||
|
||||
// config.php
|
||||
if(file_exists('./config.php') && (!(make_writable('./config.php')) || !(is_writable('./config.php')))) {
|
||||
installLog("ERROR:: {$mod_strings['ERR_CHECKSYS_CONFIG_NOT_WRITABLE']}");
|
||||
$configStatus = "<b><span class='stop'>{$mod_strings['ERR_CHECKSYS_CONFIG_NOT_WRITABLE']}</span></b>";
|
||||
$error_found = true;
|
||||
$error_txt .= '
|
||||
<tr>
|
||||
<td><strong>'.$mod_strings['LBL_CHECKSYS_CONFIG'].'</strong></td>
|
||||
<td class="error">'.$configStatus.'</td>
|
||||
</tr>';
|
||||
}
|
||||
|
||||
// custom dir
|
||||
if(!make_writable('./custom')) {
|
||||
$customStatus = "<b><span class='stop'>{$mod_strings['ERR_CHECKSYS_CUSTOM_NOT_WRITABLE']}</font></b>";
|
||||
installLog("ERROR:: {$mod_strings['ERR_CHECKSYS_CUSTOM_NOT_WRITABLE']}");
|
||||
$error_found = true;
|
||||
$error_txt .= '
|
||||
<tr>
|
||||
<td><strong>'.$mod_strings['LBL_CHECKSYS_CUSTOM'].'</strong></td>
|
||||
<td class="error">'.$customStatus.'</td>
|
||||
</tr>';
|
||||
}else{
|
||||
installLog("/custom directory and subdirectory check passed");
|
||||
}
|
||||
|
||||
// data dir
|
||||
if(!make_writable('./data') || !make_writable('./data/upload')) {
|
||||
$dataStatus = "<b><span class='stop'>{$mod_strings['ERR_CHECKSYS_FILES_NOT_WRITABLE']}</span></b>";
|
||||
installLog("ERROR:: {$mod_strings['ERR_CHECKSYS_FILES_NOT_WRITABLE']}");
|
||||
$error_found = true;
|
||||
$error_txt .= '
|
||||
<tr>
|
||||
<td><strong>'.$mod_strings['LBL_CHECKSYS_DATA'].'</strong></td>
|
||||
<td class="error">'.$dataStatus
|
||||
.'</td>
|
||||
</tr><tr>
|
||||
<td colspan="2">
|
||||
<b>'.$mod_strings['LBL_CHECKSYS_FIX_FILES'].'</b>';
|
||||
if(!make_writable('./data')) {
|
||||
$error_txt .='<br>'.getcwd().'/data';
|
||||
}
|
||||
if(!make_writable('./data/upload')) {
|
||||
$error_txt .='<br>'.getcwd().'/data/upload';
|
||||
}
|
||||
$error_txt .= '</td>
|
||||
</tr>';
|
||||
}else{
|
||||
installLog("/data/upoad directory and subdirectory check passed");
|
||||
}
|
||||
|
||||
|
||||
// cache dir
|
||||
$cache_files[] = '/cache';
|
||||
$cache_files[] = '/cache/images';
|
||||
$cache_files[] = '/cache/import';
|
||||
$cache_files[] = '/cache/layout';
|
||||
$cache_files[] = '/cache/pdf';
|
||||
$cache_files[] = '/cache/upload';
|
||||
$cache_files[] = '/cache/xml';
|
||||
$filelist = '';
|
||||
|
||||
foreach($cache_files as $c_file)
|
||||
{
|
||||
$dirname = ".".$c_file;
|
||||
$ok = false;
|
||||
if ((is_dir($dirname)) || @sugar_mkdir($dirname,0555)) // set permissions to restrictive - use make_writable to change in a standard way to the required permissions
|
||||
{
|
||||
$ok = make_writable($dirname);
|
||||
}
|
||||
if (!$ok)
|
||||
{
|
||||
$filelist .= '<br>'.getcwd().$c_file;
|
||||
|
||||
}
|
||||
}
|
||||
if (strlen($filelist)>0)
|
||||
{
|
||||
$error_found = true;
|
||||
installLog("ERROR:: Some subdirectories in cache subfolder were not read/writeable:");
|
||||
installLog($filelist);
|
||||
$error_txt .= '
|
||||
<tr>
|
||||
<td><strong>'.$mod_strings['LBL_CHECKSYS_CACHE'].'</strong></td>
|
||||
<td align="right" class="error" class="error"><b><span class="stop">'.$mod_strings['ERR_CHECKSYS_FILES_NOT_WRITABLE'].'</span></b></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2"><b>'.$mod_strings['LBL_CHECKSYS_FIX_FILES'].'</b>'.$filelist. '</td>
|
||||
</tr>';
|
||||
}else{
|
||||
installLog("/cache directory and subdirectory check passed");
|
||||
}
|
||||
|
||||
|
||||
// check modules dir
|
||||
$_SESSION['unwriteable_module_files'] = array();
|
||||
//if(!$writeableFiles['ret_val']) {
|
||||
$passed_write = recursive_make_writable('./modules');
|
||||
if (isset($_SESSION['unwriteable_module_files']['failed']) && $_SESSION['unwriteable_module_files']['failed']){
|
||||
$passed_write = false;
|
||||
}
|
||||
|
||||
if(!$passed_write) {
|
||||
|
||||
$moduleStatus = "<b><span class='stop'>{$mod_strings['ERR_CHECKSYS_NOT_WRITABLE']}</span></b>";
|
||||
installLog("ERROR:: Module directories and the files under them are not writeable.");
|
||||
$error_found = true;
|
||||
$error_txt .= '
|
||||
<tr>
|
||||
<td><strong>'.$mod_strings['LBL_CHECKSYS_MODULE'].'</strong></td>
|
||||
<td align="right" class="error">'.$moduleStatus.'</td>
|
||||
</tr>';
|
||||
|
||||
//list which module directories are not writeable, if there are less than 10
|
||||
$error_txt .= '
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<b>'.$mod_strings['LBL_CHECKSYS_FIX_MODULE_FILES'].'</b>';
|
||||
foreach($_SESSION['unwriteable_module_files'] as $key=>$file){
|
||||
if($key !='.' && $key != 'failed'){
|
||||
$error_txt .='<br>'.$file;
|
||||
}
|
||||
}
|
||||
$error_txt .= '
|
||||
</td>
|
||||
</tr>';
|
||||
|
||||
}else{
|
||||
installLog("/module directory and subdirectory check passed");
|
||||
}
|
||||
|
||||
|
||||
|
||||
// PHP.ini
|
||||
$phpIniLocation = get_cfg_var("cfg_file_path");
|
||||
installLog("php.ini location found. {$phpIniLocation}");
|
||||
// disable form if error found
|
||||
|
||||
if($error_found){
|
||||
installLog("Outputting HTML for System check");
|
||||
installLog("Errors were found *************");
|
||||
$disabled = $error_found ? 'disabled="disabled"' : '';
|
||||
|
||||
$help_url = get_help_button_url();
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//// BEGIN PAGE OUTPUT
|
||||
$out =<<<EOQ
|
||||
|
||||
<table cellspacing="0" cellpadding="0" border="0" align="center" class="shell">
|
||||
<tr>
|
||||
<th width="400">{$mod_strings['LBL_CHECKSYS_TITLE']}</th>
|
||||
<th width="200" height="30" style="text-align: right;"><a href="http://www.sugarcrm.com" target=
|
||||
"_blank"><IMG src="include/images/sugarcrm_login.png" width="145" height="30" alt="SugarCRM" border="0"></a>
|
||||
<br><a href="{$help_url}" target='_blank'>{$mod_strings['LBL_HELP']} </a>
|
||||
</th>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td colspan="2" width="600">
|
||||
<p>{$mod_strings['ERR_CHECKSYS']}</p>
|
||||
|
||||
<table cellpadding="0" cellspacing="0" border="0" width="100%" class="StyleDottedHr">
|
||||
<tr>
|
||||
<th align="left">{$mod_strings['LBL_CHECKSYS_COMPONENT']}</th>
|
||||
<th style="text-align: right;">{$mod_strings['LBL_CHECKSYS_STATUS']}</th>
|
||||
</tr>
|
||||
$error_txt
|
||||
|
||||
</table>
|
||||
|
||||
<div align="center" style="margin: 5px;">
|
||||
<i>{$mod_strings['LBL_CHECKSYS_PHP_INI']}<br>{$phpIniLocation}</i>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td align="right" colspan="2">
|
||||
<hr>
|
||||
<form action="install3.php" method="post" name="theForm" id="theForm">
|
||||
|
||||
<table cellspacing="0" cellpadding="0" border="0" class="stdTable">
|
||||
<tr>
|
||||
<td><input class="button" type="button" onclick="window.open('http://www.sugarcrm.com/forums/');" value="{$mod_strings['LBL_HELP']}" /></td>
|
||||
<td>
|
||||
<input class="button" type="button" name="Re-check" value="{$mod_strings['LBL_CHECKSYS_RECHECK']}" onclick="callSysCheck();" id="button_next2"/>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
</table><br>
|
||||
EOQ;
|
||||
return $out;
|
||||
}else{
|
||||
installLog("Outputting HTML for System check");
|
||||
installLog("No Errors were found *************");
|
||||
return 'passed';
|
||||
}
|
||||
|
||||
}
|
||||
//// END PAGEOUTPUT
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
?>
|
||||
154
install/installType.php
Normal file
154
install/installType.php
Normal file
@@ -0,0 +1,154 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* SugarCRM Community Edition is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2011 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
|
||||
|
||||
|
||||
|
||||
if( !isset( $install_script ) || !$install_script ){
|
||||
die($mod_strings['ERR_NO_DIRECT_SCRIPT']);
|
||||
}
|
||||
// $mod_strings come from calling page.
|
||||
|
||||
$langDropDown = get_select_options_with_id($supportedLanguages, $current_language);
|
||||
|
||||
|
||||
|
||||
if( !isset($_SESSION['licenseKey_submitted']) || !$_SESSION['licenseKey_submitted'] ) {
|
||||
$_SESSION['setup_license_key_users'] = 0;
|
||||
$_SESSION['setup_license_key_expire_date'] = "";
|
||||
$_SESSION['setup_license_key'] = "";
|
||||
$_SESSION['setup_num_lic_oc'] = 0;
|
||||
|
||||
} else {
|
||||
|
||||
}
|
||||
|
||||
//php 521 suggestion
|
||||
$php_521 = '';
|
||||
if(version_compare(phpversion(),'5.2.0') < 0){
|
||||
$php_521=$mod_strings['LBL_YOUR_PHP_VERSION'].phpversion().$mod_strings['LBL_RECOMMENDED_PHP_VERSION'];
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//// START OUTPUT
|
||||
|
||||
|
||||
$out = <<<EOQ
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||
<title>{$mod_strings['LBL_WIZARD_TITLE']} {$mod_strings['LBL_INSTALL_TYPE_TITLE']}</title>
|
||||
<link REL="SHORTCUT ICON" HREF="$icon">
|
||||
<link rel="stylesheet" href="$css" type="text/css">
|
||||
</head>
|
||||
|
||||
<body onload="javascript:document.getElementById('button_next').focus();">
|
||||
<form action="install.php" method="post" name="form" id="form">
|
||||
<table cellspacing="0" cellpadding="0" border="0" align="center" class="shell">
|
||||
<tr><td colspan="2" id="help"><a href="{$help_url}" target='_blank'>{$mod_strings['LBL_HELP']} </a></td></tr>
|
||||
<tr>
|
||||
<th width="500">
|
||||
<p>
|
||||
<img src="{$sugar_md}" alt="SugarCRM" border="0">
|
||||
</p>
|
||||
{$mod_strings['LBL_INSTALL_TYPE_TITLE']}</th>
|
||||
|
||||
<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>
|
||||
</th>
|
||||
</tr>
|
||||
|
||||
<tr><td colspan="2">
|
||||
<table width="100%" class="StyleDottedHr">
|
||||
EOQ;
|
||||
|
||||
|
||||
|
||||
|
||||
$typical_checked ='checked';
|
||||
$custom_checked ='';
|
||||
if(isset($_SESSION['install_type']) && $_SESSION['install_type']=='custom'){
|
||||
$typical_checked ='';
|
||||
$custom_checked ='checked';
|
||||
|
||||
}else{
|
||||
//do nothing because defaults handle this condition
|
||||
}
|
||||
|
||||
|
||||
$out .= <<<EOQ2
|
||||
<tr><th colspan='2' align="left">{$mod_strings['LBL_INSTALL_TYPE_SUBTITLE']}</th></tr>
|
||||
<tr><td width='200'>
|
||||
<input name="install_type" type="radio" value="Typical" {$typical_checked}>{$mod_strings['LBL_INSTALL_TYPE_TYPICAL']}
|
||||
</td><td width='500'>
|
||||
{$mod_strings['LBL_INSTALL_TYPE_MSG2']}
|
||||
<td></tr>
|
||||
<tr><td width='200'>
|
||||
<input type="radio" name="install_type" value="custom" {$custom_checked}>{$mod_strings['LBL_INSTALL_TYPE_CUSTOM']}
|
||||
</td><td width='500'>
|
||||
{$mod_strings['LBL_INSTALL_TYPE_MSG3']}
|
||||
<td></tr>
|
||||
</table>
|
||||
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr><td width='1000'><b><i>{$php_521}</i></b></td></tr>
|
||||
<tr>
|
||||
<td align="right" colspan="2" height="20">
|
||||
<hr>
|
||||
<input type="hidden" name="current_step" value="{$next_step}">
|
||||
|
||||
<table cellspacing="0" cellpadding="0" border="0" class="stdTable">
|
||||
<tr>
|
||||
|
||||
<td><input class="button" type="button" value="{$mod_strings['LBL_BACK']}" id="button_back_installType" onclick="document.getElementById('form').submit();" />
|
||||
<input type="hidden" name="goto" value="{$mod_strings['LBL_BACK']}" /></td>
|
||||
<td><input class="button" type="submit" name="goto" value="{$mod_strings['LBL_NEXT']}" id="button_next" /></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
EOQ2;
|
||||
echo $out;
|
||||
?>
|
||||
100
install/install_defaults.php
Normal file
100
install/install_defaults.php
Normal file
@@ -0,0 +1,100 @@
|
||||
<?php
|
||||
/*********************************************************************************
|
||||
* SugarCRM Community Edition is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2011 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
|
||||
|
||||
|
||||
$installer_defaults = array(
|
||||
'language' => 'en_us',
|
||||
'oc_install' => '',
|
||||
'setup_license_accept' => false,
|
||||
'test_session' => 'sessions are available',
|
||||
'license_submitted' => false,
|
||||
'setup_license_key_users' => '0',
|
||||
'setup_license_key_expire_date' => '',
|
||||
'setup_license_key' => '',
|
||||
'setup_num_lic_oc' => '0',
|
||||
'install_type' => 'typical',
|
||||
'setup_db_type' => 'mysql',
|
||||
'setup_db_host_name' => '',
|
||||
'setup_db_host_instance' => 'SQLEXPRESS',
|
||||
'setup_db_database_name' => 'sugarcrm',
|
||||
'setup_db_sugarsales_user' => '',
|
||||
'setup_db_sugarsales_password' => '',
|
||||
'setup_db_sugarsales_password_retype' => '',
|
||||
'demoData' => false,
|
||||
'setup_db_create_database' => true,
|
||||
'setup_db_drop_tables' => false,
|
||||
'setup_db_username_is_privileged' => true,
|
||||
'setup_db_admin_user_name' => '',
|
||||
'setup_db_admin_password' => '',
|
||||
'setup_db_provide_own_user' => false,
|
||||
'dbConfig_submitted' => false,
|
||||
'demoData' => 'no',
|
||||
'setup_site_url' => '',
|
||||
'setup_system_name' => 'SugarCRM',
|
||||
'setup_site_sugarbeet' => true,
|
||||
'setup_site_defaults' => true,
|
||||
'setup_site_custom_session_path' => false,
|
||||
'setup_site_session_path' => false,
|
||||
'setup_site_custom_log_dir' => false,
|
||||
'setup_site_log_dir' => false,
|
||||
'setup_site_log_level' =>'fatal',
|
||||
'setup_site_specify_guid' => false,
|
||||
'setup_site_guid' => '',
|
||||
'setup_site_admin_password' => '',
|
||||
'setup_site_admin_password_retype' => '',
|
||||
'site_default_theme' => 'Sugar5',
|
||||
'disable_persistent_connections' => 'false',
|
||||
'default_language' => 'en_us',
|
||||
'default_charset' => 'UTF-8',
|
||||
'default_currency_name' => 'US Dollars',
|
||||
'default_currency_symbol' => '$',
|
||||
'default_currency_iso4217' => 'USD',
|
||||
'default_locale_name_format' => 's f l',
|
||||
'default_email_charset' => 'UTF-8',
|
||||
'default_export_charset' => 'UTF-8',
|
||||
'export_delimiter' => ',',
|
||||
'rss_cache_time' => '10800',
|
||||
'language_keys' => 'en_us',
|
||||
'language_values' => 'US+English',
|
||||
'setup_site_sugarbeet_automatic_checks' => true,
|
||||
'setup_site_sugarbeet_anonymous_stats' => true,
|
||||
'siteConfig_submitted' => false,
|
||||
'dbUSRData' => 'same',
|
||||
|
||||
);
|
||||
|
||||
?>
|
||||
2329
install/install_utils.php
Normal file
2329
install/install_utils.php
Normal file
File diff suppressed because it is too large
Load Diff
564
install/language/en_us.lang.php
Normal file
564
install/language/en_us.lang.php
Normal file
@@ -0,0 +1,564 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* SugarCRM Community Edition is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2011 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
|
||||
/*********************************************************************************
|
||||
|
||||
* Description:
|
||||
* Portions created by SugarCRM are Copyright (C) SugarCRM, Inc. All Rights
|
||||
* Reserved. Contributor(s): ______________________________________..
|
||||
* *******************************************************************************/
|
||||
|
||||
$mod_strings = array(
|
||||
|
||||
'LBL_SYSOPTS_1' => 'Select from the following system configuration options below.',
|
||||
'LBL_SYSOPTS_2' => 'What type of database will be used for the Sugar instance you are about to install?',
|
||||
'LBL_SYSOPTS_CONFIG' => 'System Configuration',
|
||||
'LBL_SYSOPTS_DB_TYPE' => '',
|
||||
'LBL_SYSOPTS_DB' => 'Specify Database Type',
|
||||
'LBL_SYSOPTS_DB_TITLE' => 'Database Type',
|
||||
'LBL_SYSOPTS_ERRS_TITLE' => 'Please fix the following errors before proceeding:',
|
||||
'LBL_MAKE_DIRECTORY_WRITABLE' => 'Please make the following directory writable:',
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
'DEFAULT_CHARSET' => 'UTF-8',
|
||||
'ERR_ADMIN_USER_NAME_BLANK' => 'Provide the user name for the Sugar admin user. ',
|
||||
'ERR_ADMIN_PASS_BLANK' => 'Provide the password for the Sugar admin user. ',
|
||||
|
||||
//'ERR_CHECKSYS_CALL_TIME' => 'Allow Call Time Pass Reference is Off (please enable in php.ini)',
|
||||
'ERR_CHECKSYS' => 'Errors have been detected during compatibility check. In order for your SugarCRM Installation to function properly, please take the proper steps to address the issues listed below and either press the recheck button, or try installing again.',
|
||||
'ERR_CHECKSYS_CALL_TIME' => 'Allow Call Time Pass Reference is On (this should be set to Off in php.ini)',
|
||||
'ERR_CHECKSYS_CURL' => 'Not found: Sugar Scheduler will run with limited functionality.',
|
||||
'ERR_CHECKSYS_FASTCGI_LOGGING' => 'For optimal experience using IIS/FastCGI sapi, set fastcgi.logging to 0 in your php.ini file.',
|
||||
'ERR_CHECKSYS_IMAP' => 'Not found: InboundEmail and Campaigns (Email) require the IMAP libraries. Neither will be functional.',
|
||||
'ERR_CHECKSYS_MSSQL_MQGPC' => 'Magic Quotes GPC cannot be turned "On" when using MS SQL Server.',
|
||||
'ERR_CHECKSYS_MEM_LIMIT_0' => 'Warning: ',
|
||||
'ERR_CHECKSYS_MEM_LIMIT_1' => ' (Set this to ',
|
||||
'ERR_CHECKSYS_MEM_LIMIT_2' => 'M or larger in your php.ini file)',
|
||||
'ERR_CHECKSYS_MYSQL_VERSION' => 'Minimum Version 4.1.2 - Found: ',
|
||||
'ERR_CHECKSYS_NO_SESSIONS' => 'Failed to write and read session variables. Unable to proceed with the installation.',
|
||||
'ERR_CHECKSYS_NOT_VALID_DIR' => 'Not A Valid Directory',
|
||||
'ERR_CHECKSYS_NOT_WRITABLE' => 'Warning: Not Writable',
|
||||
'ERR_CHECKSYS_PHP_INVALID_VER' => 'Your version of PHP is not supported by Sugar. You will need to install a version that is compatible with the Sugar application. Please consult the Compatibility Matrix in the Release Notes for supported PHP Versions. Your version is ',
|
||||
'ERR_CHECKSYS_IIS_INVALID_VER' => 'Your version of IIS is not supported by Sugar. You will need to install a version that is compatible with the Sugar application. Please consult the Compatibility Matrix in the Release Notes for supported IIS Versions. Your version is ',
|
||||
'ERR_CHECKSYS_FASTCGI' => 'We detect that you are not using a FastCGI handler mapping for PHP. You will need to install/configure a version that is compatible with the Sugar application. Please consult the Compatibility Matrix in the Release Notes for supported Versions. Please see <a href="http://www.iis.net/php/" target="_blank">http://www.iis.net/php/</a> for details ',
|
||||
'ERR_CHECKSYS_FASTCGI_LOGGING' => 'For optimal experience using IIS/FastCGI sapi, set fastcgi.logging to 0 in your php.ini file.',
|
||||
'ERR_CHECKSYS_PHP_UNSUPPORTED' => 'Unsupported PHP Version Installed: ( ver',
|
||||
'LBL_DB_UNAVAILABLE' => 'Database unavailable',
|
||||
'LBL_CHECKSYS_DB_SUPPORT_NOT_AVAILABLE' => 'Database Support was not found. Please make sure you have the necessary drivers for one of the following supported Database Types: MySQL or MS SQLServer. You might need to uncomment the extension in the php.ini file, or recompile with the right binary file, depending on your version of PHP. Please refer to your PHP Manual for more information on how to enable Database Support.',
|
||||
'LBL_CHECKSYS_XML_NOT_AVAILABLE' => 'Functions associated with XML Parser Libraries that are needed by the Sugar application were not found. You might need to uncomment the extension in the php.ini file, or recompile with the right binary file, depending on your version of PHP. Please refer to your PHP Manual for more information.',
|
||||
'ERR_CHECKSYS_MBSTRING' => 'Functions associated with the Multibyte Strings PHP extension (mbstring) that are needed by the Sugar application were not found. <br/><br/>Generally, the mbstring module is not enabled by default in PHP and must be activated with --enable-mbstring when the PHP binary is built. Please refer to your PHP Manual for more information on how to enable mbstring support.',
|
||||
'ERR_CHECKSYS_SESSION_SAVE_PATH_NOT_SET' => 'The session.save_path setting in your php configuration file (php.ini) is not set or is set to a folder which did not exist. You might need to set the save_path setting in php.ini or verify that the folder sets in save_path exist.',
|
||||
'ERR_CHECKSYS_SESSION_SAVE_PATH_NOT_WRITABLE' => 'The session.save_path setting in your php configuration file (php.ini) is set to a folder which is not writeable. Please take the necessary steps to make the folder writeable. <br>Depending on your Operating system, this might require you to change the permissions by running chmod 766, or to right click on the filename to access the properties and uncheck the read only option.',
|
||||
'ERR_CHECKSYS_CONFIG_NOT_WRITABLE' => 'The config file exists but is not writeable. Please take the necessary steps to make the file writeable. Depending on your Operating system, this might require you to change the permissions by running chmod 766, or to right click on the filename to access the properties and uncheck the read only option.',
|
||||
'ERR_CHECKSYS_CUSTOM_NOT_WRITABLE' => 'The Custom Directory exists but is not writeable. You may have to change permissions on it (chmod 766) or right click on it and uncheck the read only option, depending on your Operating System. Please take the needed steps to make the file writeable.',
|
||||
'ERR_CHECKSYS_FILES_NOT_WRITABLE' => "The files or directories listed below are not writeable or are missing and cannot be created. Depending on your Operating System, correcting this may require you to change permissions on the files or parent directory (chmod 766), or to right click on the parent directory and uncheck the 'read only' option and apply it to all subfolders.",
|
||||
//'ERR_CHECKSYS_SAFE_MODE' => 'Safe Mode is On (please disable in php.ini)',
|
||||
'ERR_CHECKSYS_SAFE_MODE' => 'Safe Mode is On (you may wish to disable in php.ini)',
|
||||
'ERR_CHECKSYS_ZLIB' => 'ZLib support not found: SugarCRM reaps enormous performance benefits with zlib compression.',
|
||||
'ERR_CHECKSYS_ZIP' => 'ZIP support not found: SugarCRM needs ZIP support in order to process compressed files.',
|
||||
'ERR_DB_ADMIN' => 'The provided database administrator username and/or password is invalid, and a connection to the database could not be established. Please enter a valid user name and password. (Error: ',
|
||||
'ERR_DB_ADMIN_MSSQL' => 'The provided database administrator username and/or password is invalid, and a connection to the database could not be established. Please enter a valid user name and password.',
|
||||
'ERR_DB_EXISTS_NOT' => 'The specified database does not exist.',
|
||||
'ERR_DB_EXISTS_WITH_CONFIG' => 'Database already exists with config data. To run an install with the chosen database, please re-run the install and choose: "Drop and recreate existing SugarCRM tables?" To upgrade, use the Upgrade Wizard in the Admin Console. Please read the upgrade documentation located <a href="http://www.sugarforge.org/content/downloads/" target="_new">here</a>.',
|
||||
'ERR_DB_EXISTS' => 'The provided Database Name already exists -- cannot create another one with the same name.',
|
||||
'ERR_DB_EXISTS_PROCEED' => 'The provided Database Name already exists. You can<br>1. hit the back button and choose a new database name <br>2. click next and continue but all existing tables on this database will be dropped. <strong>This means your tables and data will be blown away.</strong>',
|
||||
'ERR_DB_HOSTNAME' => 'Host name cannot be blank.',
|
||||
'ERR_DB_INVALID' => 'Invalid database type selected.',
|
||||
'ERR_DB_LOGIN_FAILURE_MYSQL' => 'The provided database host, username, and/or password is invalid, and a connection to the database could not be established. Please enter a valid host, username and password.',
|
||||
'ERR_DB_LOGIN_FAILURE_MSSQL' => 'The provided database host, username, and/or password is invalid, and a connection to the database could not be established. Please enter a valid host, username and password.',
|
||||
'ERR_DB_MYSQL_VERSION1' => 'Your MySQL version (',
|
||||
'ERR_DB_MYSQL_VERSION2' => ') is not supported by Sugar. You will need to install a version that is compatible with the Sugar application. Please consult the Compatibility Matrix in the Release Notes for supported MySQL versions.',
|
||||
'ERR_DB_NAME' => 'Database name cannot be blank.',
|
||||
'ERR_DB_NAME2' => "Database name cannot contain a '\\', '/', or '.'",
|
||||
'ERR_DB_MSSQL_DB_NAME_INVALID' => "Database name cannot contain a '\"', \"'\", '*', '/', '\', '?', ':', '<', '>', or '-'",
|
||||
'ERR_DB_PASSWORD' => 'The passwords provided for the Sugar database administrator do not match. Please re-enter the same passwords in the password fields.',
|
||||
'ERR_DB_PRIV_USER' => 'Provide a database administrator user name. The user is required for the initial connection to the database.',
|
||||
'ERR_DB_USER_EXISTS' => 'User name for Sugar database user already exists -- cannot create another one with the same name. Please enter a new user name.',
|
||||
'ERR_DB_USER' => 'Enter a user name for the Sugar database administrator.',
|
||||
'ERR_DBCONF_VALIDATION' => 'Please fix the following errors before proceeding:',
|
||||
'ERR_DBCONF_PASSWORD_MISMATCH' => 'The passwords provided for the Sugar database user do not match. Please re-enter the same passwords in the password fields.',
|
||||
'ERR_ERROR_GENERAL' => 'The following errors were encountered:',
|
||||
'ERR_LANG_CANNOT_DELETE_FILE' => 'Cannot delete file: ',
|
||||
'ERR_LANG_MISSING_FILE' => 'Cannot find file: ',
|
||||
'ERR_LANG_NO_LANG_FILE' => 'No language pack file found at include/language inside: ',
|
||||
'ERR_LANG_UPLOAD_1' => 'There was a problem with your upload. Please try again.',
|
||||
'ERR_LANG_UPLOAD_2' => 'Language Packs must be ZIP archives.',
|
||||
'ERR_LANG_UPLOAD_3' => 'PHP could not move the temp file to the upgrade directory.',
|
||||
'ERR_LICENSE_MISSING' => 'Missing Required Fields',
|
||||
'ERR_LICENSE_NOT_FOUND' => 'License file not found!',
|
||||
'ERR_LOG_DIRECTORY_NOT_EXISTS' => 'Log directory provided is not a valid directory.',
|
||||
'ERR_LOG_DIRECTORY_NOT_WRITABLE' => 'Log directory provided is not a writable directory.',
|
||||
'ERR_LOG_DIRECTORY_REQUIRED' => 'Log directory is required if you wish to specify your own.',
|
||||
'ERR_NO_DIRECT_SCRIPT' => 'Unable to process script directly.',
|
||||
'ERR_NO_SINGLE_QUOTE' => 'Cannot use the single quotation mark for ',
|
||||
'ERR_PASSWORD_MISMATCH' => 'The passwords provided for the Sugar admin user do not match. Please re-enter the same passwords in the password fields.',
|
||||
'ERR_PERFORM_CONFIG_PHP_1' => 'Cannot write to the <span class=stop>config.php</span> file.',
|
||||
'ERR_PERFORM_CONFIG_PHP_2' => 'You can continue this installation by manually creating the config.php file and pasting the configuration information below into the config.php file. However, you <strong>must </strong>create the config.php file before you continue to the next step.',
|
||||
'ERR_PERFORM_CONFIG_PHP_3' => 'Did you remember to create the config.php file?',
|
||||
'ERR_PERFORM_CONFIG_PHP_4' => 'Warning: Could not write to config.php file. Please ensure it exists.',
|
||||
'ERR_PERFORM_HTACCESS_1' => 'Cannot write to the ',
|
||||
'ERR_PERFORM_HTACCESS_2' => ' file.',
|
||||
'ERR_PERFORM_HTACCESS_3' => 'If you want to secure your log file from being accessible via browser, create an .htaccess file in your log directory with the line:',
|
||||
'ERR_PERFORM_NO_TCPIP' => '<b>We could not detect an Internet connection.</b> When you do have a connection, please visit <a href="http://www.sugarcrm.com/home/index.php?option=com_extended_registration&task=register">http://www.sugarcrm.com/home/index.php?option=com_extended_registration&task=register</a> to register with SugarCRM. By letting us know a little bit about how your company plans to use SugarCRM, we can ensure we are always delivering the right application for your business needs.',
|
||||
'ERR_SESSION_DIRECTORY_NOT_EXISTS' => 'Session directory provided is not a valid directory.',
|
||||
'ERR_SESSION_DIRECTORY' => 'Session directory provided is not a writable directory.',
|
||||
'ERR_SESSION_PATH' => 'Session path is required if you wish to specify your own.',
|
||||
'ERR_SI_NO_CONFIG' => 'You did not include config_si.php in the document root, or you did not define $sugar_config_si in config.php',
|
||||
'ERR_SITE_GUID' => 'Application ID is required if you wish to specify your own.',
|
||||
'ERR_UPLOAD_MAX_FILESIZE' => 'Warning: Your PHP configuration should be changed to allow files of at least 6MB to be uploaded.',
|
||||
'LBL_UPLOAD_MAX_FILESIZE_TITLE' => 'Upload File Size',
|
||||
'ERR_URL_BLANK' => 'Provide the base URL for the Sugar instance.',
|
||||
'ERR_UW_NO_UPDATE_RECORD' => 'Could not locate installation record of',
|
||||
'ERROR_FLAVOR_INCOMPATIBLE' => 'The uploaded file is not compatible with this flavor (Community Edition, Professional, or Enterprise) of Sugar: ',
|
||||
'ERROR_LICENSE_EXPIRED' => "Error: Your license expired ",
|
||||
'ERROR_LICENSE_EXPIRED2' => " day(s) ago. Please go to the <a href='index.php?action=LicenseSettings&module=Administration'>'\"License Management\"</a> in the Admin screen to enter your new license key. If you do not enter a new license key within 30 days of your license key expiration, you will no longer be able to log in to this application.",
|
||||
'ERROR_MANIFEST_TYPE' => 'Manifest file must specify the package type.',
|
||||
'ERROR_PACKAGE_TYPE' => 'Manifest file specifies an unrecognized package type',
|
||||
'ERROR_VALIDATION_EXPIRED' => "Error: Your validation key expired ",
|
||||
'ERROR_VALIDATION_EXPIRED2' => " day(s) ago. Please go to the <a href='index.php?action=LicenseSettings&module=Administration'>'\"License Management\"</a> in the Admin screen to enter your new validation key. If you do not enter a new validation key within 30 days of your validation key expiration, you will no longer be able to log in to this application.",
|
||||
'ERROR_VERSION_INCOMPATIBLE' => 'The uploaded file is not compatible with this version of Sugar: ',
|
||||
|
||||
'LBL_BACK' => 'Back',
|
||||
'LBL_CANCEL' => 'Cancel',
|
||||
'LBL_ACCEPT' => 'I Accept',
|
||||
'LBL_CHECKSYS_1' => 'In order for your SugarCRM installation to function properly, please ensure all of the system check items listed below are green. If any are red, please take the necessary steps to fix them.<BR><BR> For help on these system checks, please visit the <a href="http://www.sugarcrm.com/crm/installation" target="_blank">Sugar Wiki</a>.',
|
||||
'LBL_CHECKSYS_CACHE' => 'Writable Cache Sub-Directories',
|
||||
//'LBL_CHECKSYS_CALL_TIME' => 'PHP Allow Call Time Pass Reference Turned On',
|
||||
'LBL_DROP_DB_CONFIRM' => 'The provided Database Name already exists.<br>You can either:<br>1. Click on the Cancel button and choose a new database name, or <br>2. Click the Accept button and continue. All existing tables in the database will be dropped. <strong>This means that all of the tables and pre-existing data will be blown away.</strong>',
|
||||
'LBL_CHECKSYS_CALL_TIME' => 'PHP Allow Call Time Pass Reference Turned Off',
|
||||
'LBL_CHECKSYS_COMPONENT' => 'Component',
|
||||
'LBL_CHECKSYS_COMPONENT_OPTIONAL' => 'Optional Components',
|
||||
'LBL_CHECKSYS_CONFIG' => 'Writable SugarCRM Configuration File (config.php)',
|
||||
'LBL_CHECKSYS_CURL' => 'cURL Module',
|
||||
'LBL_CHECKSYS_SESSION_SAVE_PATH' => 'Session Save Path Setting',
|
||||
'LBL_CHECKSYS_CUSTOM' => 'Writeable Custom Directory',
|
||||
'LBL_CHECKSYS_DATA' => 'Writable Data Sub-Directories',
|
||||
'LBL_CHECKSYS_IMAP' => 'IMAP Module',
|
||||
'LBL_CHECKSYS_FASTCGI' => 'FastCGI',
|
||||
'LBL_CHECKSYS_MQGPC' => 'Magic Quotes GPC',
|
||||
'LBL_CHECKSYS_MBSTRING' => 'MB Strings Module',
|
||||
'LBL_CHECKSYS_MEM_OK' => 'OK (No Limit)',
|
||||
'LBL_CHECKSYS_MEM_UNLIMITED' => 'OK (Unlimited)',
|
||||
'LBL_CHECKSYS_MEM' => 'PHP Memory Limit',
|
||||
'LBL_CHECKSYS_MODULE' => 'Writable Modules Sub-Directories and Files',
|
||||
'LBL_CHECKSYS_MYSQL_VERSION' => 'MySQL Version',
|
||||
'LBL_CHECKSYS_NOT_AVAILABLE' => 'Not Available',
|
||||
'LBL_CHECKSYS_OK' => 'OK',
|
||||
'LBL_CHECKSYS_PHP_INI' => 'Location of your PHP configuration file (php.ini):',
|
||||
'LBL_CHECKSYS_PHP_OK' => 'OK (ver ',
|
||||
'LBL_CHECKSYS_PHPVER' => 'PHP Version',
|
||||
'LBL_CHECKSYS_IISVER' => 'IIS Version',
|
||||
'LBL_CHECKSYS_FASTCGI' => 'FastCGI',
|
||||
'LBL_CHECKSYS_RECHECK' => 'Re-check',
|
||||
'LBL_CHECKSYS_SAFE_MODE' => 'PHP Safe Mode Turned Off',
|
||||
'LBL_CHECKSYS_SESSION' => 'Writable Session Save Path (',
|
||||
'LBL_CHECKSYS_STATUS' => 'Status',
|
||||
'LBL_CHECKSYS_TITLE' => 'System Check Acceptance',
|
||||
'LBL_CHECKSYS_VER' => 'Found: ( ver ',
|
||||
'LBL_CHECKSYS_XML' => 'XML Parsing',
|
||||
'LBL_CHECKSYS_ZLIB' => 'ZLIB Compression Module',
|
||||
'LBL_CHECKSYS_ZIP' => 'ZIP Handling Module',
|
||||
'LBL_CHECKSYS_FIX_FILES' => 'Please fix the following files or directories before proceeding:',
|
||||
'LBL_CHECKSYS_FIX_MODULE_FILES' => 'Please fix the following module directories and the files under them before proceeding:',
|
||||
'LBL_CLOSE' => 'Close',
|
||||
'LBL_THREE' => '3',
|
||||
'LBL_CONFIRM_BE_CREATED' => 'be created',
|
||||
'LBL_CONFIRM_DB_TYPE' => 'Database Type',
|
||||
'LBL_CONFIRM_DIRECTIONS' => 'Please confirm the settings below. If you would like to change any of the values, click "Back" to edit. Otherwise, click "Next" to start the installation.',
|
||||
'LBL_CONFIRM_LICENSE_TITLE' => 'License Information',
|
||||
'LBL_CONFIRM_NOT' => 'not',
|
||||
'LBL_CONFIRM_TITLE' => 'Confirm Settings',
|
||||
'LBL_CONFIRM_WILL' => 'will',
|
||||
'LBL_DBCONF_CREATE_DB' => 'Create Database',
|
||||
'LBL_DBCONF_CREATE_USER' => 'Create User',
|
||||
'LBL_DBCONF_DB_DROP_CREATE_WARN' => 'Caution: All Sugar data will be erased<br>if this box is checked.',
|
||||
'LBL_DBCONF_DB_DROP_CREATE' => 'Drop and Recreate Existing Sugar tables?',
|
||||
'LBL_DBCONF_DB_DROP' => 'Drop Tables',
|
||||
'LBL_DBCONF_DB_NAME' => 'Database Name',
|
||||
'LBL_DBCONF_DB_PASSWORD' => 'Sugar Database User Password',
|
||||
'LBL_DBCONF_DB_PASSWORD2' => 'Re-enter Sugar Database User Password',
|
||||
'LBL_DBCONF_DB_USER' => 'Sugar Database Username',
|
||||
'LBL_DBCONF_SUGAR_DB_USER' => 'Sugar Database Username',
|
||||
'LBL_DBCONF_DB_ADMIN_USER' => 'Database Administrator Username',
|
||||
'LBL_DBCONF_DB_ADMIN_PASSWORD' => 'Database Admin Password',
|
||||
'LBL_DBCONF_DEMO_DATA' => 'Populate Database with Demo Data?',
|
||||
'LBL_DBCONF_DEMO_DATA_TITLE' => 'Choose Demo Data',
|
||||
'LBL_DBCONF_HOST_NAME' => 'Host Name',
|
||||
'LBL_DBCONF_HOST_NAME_MSSQL' => 'Host Name \ Host Instance',
|
||||
'LBL_DBCONF_INSTRUCTIONS' => 'Please enter your database configuration information below. If you are unsure of what to fill in, we suggest that you use the default values.',
|
||||
'LBL_DBCONF_MB_DEMO_DATA' => 'Use multi-byte text in demo data?',
|
||||
'LBL_DBCONFIG_MSG2' => 'Name of web server or machine (host) on which the database is located ( such as localhost or www.mydomain.com ):',
|
||||
'LBL_DBCONFIG_MSG3' => 'Name of the database that will contain the data for the Sugar instance you are about to install:',
|
||||
'LBL_DBCONFIG_B_MSG1' => 'The username and password of a database administrator who can create database tables and users and who can write to the database is necessary in order to set up the Sugar database.',
|
||||
'LBL_DBCONFIG_SECURITY' => 'For security purposes, you can specify an exclusive database user to connect to the Sugar database. This user must be able to write, update and retrieve data on the Sugar database that will be created for this instance. This user can be the database administrator specified above, or you can provide new or existing database user information.',
|
||||
'LBL_DBCONFIG_AUTO_DD' => 'Do it for me',
|
||||
'LBL_DBCONFIG_PROVIDE_DD' => 'Provide existing user',
|
||||
'LBL_DBCONFIG_CREATE_DD' => 'Define user to create',
|
||||
'LBL_DBCONFIG_SAME_DD' => 'Same as Admin User',
|
||||
//'LBL_DBCONF_I18NFIX' => 'Apply database column expansion for varchar and char types (up to 255) for multi-byte data?',
|
||||
'LBL_MSSQL_FTS' => 'Full Text Search',
|
||||
'LBL_MSSQL_FTS_INSTALLED' => 'Installed',
|
||||
'LBL_MSSQL_FTS_INSTALLED_ERR1' => 'Full Text Search capability is not installed.',
|
||||
'LBL_MSSQL_FTS_INSTALLED_ERR2' => 'You can still install but will not be able to use Full Text Search functionality unless you reinstall SQL Server with Full Text Search enabled. Please refer to Sql Server install guide on how to do this, or contact your Administrator.',
|
||||
'LBL_DBCONF_PRIV_PASS' => 'Privileged Database User Password',
|
||||
'LBL_DBCONF_PRIV_USER_2' => 'Database Account Above Is a Privileged User?',
|
||||
'LBL_DBCONF_PRIV_USER_DIRECTIONS' => 'This privileged database user must have the proper permissions to create a database, drop/create tables, and create a user. This privileged database user will only be used to perform these tasks as needed during the installation process. You may also use the same database user as above if that user has sufficient privileges.',
|
||||
'LBL_DBCONF_PRIV_USER' => 'Privileged Database User Name',
|
||||
'LBL_DBCONF_TITLE' => 'Database Configuration',
|
||||
'LBL_DBCONF_TITLE_NAME' => 'Provide Database Name',
|
||||
'LBL_DBCONF_TITLE_USER_INFO' => 'Provide Database User Information',
|
||||
'LBL_DISABLED_DESCRIPTION_2' => 'After this change has been made, you may click the "Start" button below to begin your installation. <i>After the installation is complete, you will want to change the value for \'installer_locked\' to \'true\'.</i>',
|
||||
'LBL_DISABLED_DESCRIPTION' => 'The installer has already been run once. As a safety measure, it has been disabled from running a second time. If you are absolutely sure you want to run it again, please go to your config.php file and locate (or add) a variable called \'installer_locked\' and set it to \'false\'. The line should look like this:',
|
||||
'LBL_DISABLED_HELP_1' => 'For installation help, please visit the SugarCRM',
|
||||
'LBL_DISABLED_HELP_LNK' => 'http://www.sugarcrm.com/forums/',
|
||||
'LBL_DISABLED_HELP_2' => 'support forums',
|
||||
'LBL_DISABLED_TITLE_2' => 'SugarCRM Installation has been Disabled',
|
||||
'LBL_DISABLED_TITLE' => 'SugarCRM Installation Disabled',
|
||||
'LBL_EMAIL_CHARSET_DESC' => 'Character Set most commonly used in your locale',
|
||||
'LBL_EMAIL_CHARSET_TITLE' => 'Outbound Email Settings',
|
||||
'LBL_EMAIL_CHARSET_CONF' => 'Character Set for Outbound Email ',
|
||||
'LBL_HELP' => 'Help',
|
||||
'LBL_INSTALL' => 'Install',
|
||||
'LBL_INSTALL_TYPE_TITLE' => 'Installation Options',
|
||||
'LBL_INSTALL_TYPE_SUBTITLE' => 'Choose Install Type',
|
||||
'LBL_INSTALL_TYPE_TYPICAL' => ' <b>Typical Install</b>',
|
||||
'LBL_INSTALL_TYPE_CUSTOM' => ' <b>Custom Install</b>',
|
||||
'LBL_INSTALL_TYPE_MSG1' => 'The key is required for general application functionality, but it is not required for installation. You do not need to enter the key at this time, but you will need to provide the key after you have installed the application.',
|
||||
'LBL_INSTALL_TYPE_MSG2' => 'Requires minimum information for the installation. Recommended for new users.',
|
||||
'LBL_INSTALL_TYPE_MSG3' => 'Provides additional options to set during the installation. Most of these options are also available after installation in the admin screens. Recommended for advanced users.',
|
||||
'LBL_LANG_1' => 'To use a language in Sugar other than the default language (US-English), you can upload and install the language pack at this time. You will be able to upload and install language packs from within the Sugar application as well. If you would like to skip this step, click Next.',
|
||||
'LBL_LANG_BUTTON_COMMIT' => 'Install',
|
||||
'LBL_LANG_BUTTON_REMOVE' => 'Remove',
|
||||
'LBL_LANG_BUTTON_UNINSTALL' => 'Uninstall',
|
||||
'LBL_LANG_BUTTON_UPLOAD' => 'Upload',
|
||||
'LBL_LANG_NO_PACKS' => 'none',
|
||||
'LBL_LANG_PACK_INSTALLED' => 'The following language packs have been installed: ',
|
||||
'LBL_LANG_PACK_READY' => 'The following language packs are ready to be installed: ',
|
||||
'LBL_LANG_SUCCESS' => 'The language pack was successfully uploaded.',
|
||||
'LBL_LANG_TITLE' => 'Language Pack',
|
||||
'LBL_LAUNCHING_SILENT_INSTALL' => 'Installing Sugar now. This may take up to a few minutes.',
|
||||
'LBL_LANG_UPLOAD' => 'Upload a Language Pack',
|
||||
'LBL_LICENSE_ACCEPTANCE' => 'License Acceptance',
|
||||
'LBL_LICENSE_CHECKING' => 'Checking system for compatibility.',
|
||||
'LBL_LICENSE_CHKENV_HEADER' => 'Checking Environment',
|
||||
'LBL_LICENSE_CHKDB_HEADER' => 'Verifying DB Credentials.',
|
||||
'LBL_LICENSE_CHECK_PASSED' => 'System passed check for compatibility.',
|
||||
'LBL_LICENSE_REDIRECT' => 'Redirecting in ',
|
||||
'LBL_LICENSE_DIRECTIONS' => 'If you have your license information, please enter it in the fields below.',
|
||||
'LBL_LICENSE_DOWNLOAD_KEY' => 'Enter Download Key',
|
||||
'LBL_LICENSE_EXPIRY' => 'Expiration Date',
|
||||
'LBL_LICENSE_I_ACCEPT' => 'I Accept',
|
||||
'LBL_LICENSE_NUM_USERS' => 'Number of Users',
|
||||
'LBL_LICENSE_OC_DIRECTIONS' => 'Please enter the number of purchased offline clients.',
|
||||
'LBL_LICENSE_OC_NUM' => 'Number of Offline Client Licenses',
|
||||
'LBL_LICENSE_OC' => 'Offline Client Licenses',
|
||||
'LBL_LICENSE_PRINTABLE' => ' Printable View ',
|
||||
'LBL_PRINT_SUMM' => 'Print Summary',
|
||||
'LBL_LICENSE_TITLE_2' => 'SugarCRM License',
|
||||
'LBL_LICENSE_TITLE' => 'License Information',
|
||||
'LBL_LICENSE_USERS' => 'Licensed Users',
|
||||
|
||||
'LBL_LOCALE_CURRENCY' => 'Currency Settings',
|
||||
'LBL_LOCALE_CURR_DEFAULT' => 'Default Currency',
|
||||
'LBL_LOCALE_CURR_SYMBOL' => 'Currency Symbol',
|
||||
'LBL_LOCALE_CURR_ISO' => 'Currency Code (ISO 4217)',
|
||||
'LBL_LOCALE_CURR_1000S' => '1000s Separator',
|
||||
'LBL_LOCALE_CURR_DECIMAL' => 'Decimal Separator',
|
||||
'LBL_LOCALE_CURR_EXAMPLE' => 'Example',
|
||||
'LBL_LOCALE_CURR_SIG_DIGITS' => 'Significant Digits',
|
||||
'LBL_LOCALE_DATEF' => 'Default Date Format',
|
||||
'LBL_LOCALE_DESC' => 'The specified locale settings will be reflected globally within the Sugar instance.',
|
||||
'LBL_LOCALE_EXPORT' => 'Character Set for Import/Export<br> <i>(Email, .csv, vCard, PDF, data import)</i>',
|
||||
'LBL_LOCALE_EXPORT_DELIMITER' => 'Export (.csv) Delimiter',
|
||||
'LBL_LOCALE_EXPORT_TITLE' => 'Import/Export Settings',
|
||||
'LBL_LOCALE_LANG' => 'Default Language',
|
||||
'LBL_LOCALE_NAMEF' => 'Default Name Format',
|
||||
'LBL_LOCALE_NAMEF_DESC' => 's = salutation<br />f = first name<br />l = last name',
|
||||
'LBL_LOCALE_NAME_FIRST' => 'David',
|
||||
'LBL_LOCALE_NAME_LAST' => 'Livingstone',
|
||||
'LBL_LOCALE_NAME_SALUTATION' => 'Dr.',
|
||||
'LBL_LOCALE_TIMEF' => 'Default Time Format',
|
||||
'LBL_LOCALE_TITLE' => 'Locale Settings',
|
||||
'LBL_CUSTOMIZE_LOCALE' => 'Customize Locale Settings',
|
||||
'LBL_LOCALE_UI' => 'User Interface',
|
||||
|
||||
'LBL_ML_ACTION' => 'Action',
|
||||
'LBL_ML_DESCRIPTION' => 'Description',
|
||||
'LBL_ML_INSTALLED' => 'Date Installed',
|
||||
'LBL_ML_NAME' => 'Name',
|
||||
'LBL_ML_PUBLISHED' => 'Date Published',
|
||||
'LBL_ML_TYPE' => 'Type',
|
||||
'LBL_ML_UNINSTALLABLE' => 'Uninstallable',
|
||||
'LBL_ML_VERSION' => 'Version',
|
||||
'LBL_MSSQL' => 'SQL Server',
|
||||
'LBL_MSSQL2' => 'SQL Server (FreeTDS)',
|
||||
'LBL_MYSQL' => 'MySQL',
|
||||
'LBL_NEXT' => 'Next',
|
||||
'LBL_NO' => 'No',
|
||||
'LBL_ORACLE' => 'Oracle',
|
||||
'LBL_PERFORM_ADMIN_PASSWORD' => 'Setting site admin password',
|
||||
'LBL_PERFORM_AUDIT_TABLE' => 'audit table / ',
|
||||
'LBL_PERFORM_CONFIG_PHP' => 'Creating Sugar configuration file',
|
||||
'LBL_PERFORM_CREATE_DB_1' => '<b>Creating the database</b> ',
|
||||
'LBL_PERFORM_CREATE_DB_2' => ' <b>on</b> ',
|
||||
'LBL_PERFORM_CREATE_DB_USER' => 'Creating the Database username and password...',
|
||||
'LBL_PERFORM_CREATE_DEFAULT' => 'Creating default Sugar data',
|
||||
'LBL_PERFORM_CREATE_LOCALHOST' => 'Creating the Database username and password for localhost...',
|
||||
'LBL_PERFORM_CREATE_RELATIONSHIPS' => 'Creating Sugar relationship tables',
|
||||
'LBL_PERFORM_CREATING' => 'creating / ',
|
||||
'LBL_PERFORM_DEFAULT_REPORTS' => 'Creating default reports',
|
||||
'LBL_PERFORM_DEFAULT_SCHEDULER' => 'Creating default scheduler jobs',
|
||||
'LBL_PERFORM_DEFAULT_SETTINGS' => 'Inserting default settings',
|
||||
'LBL_PERFORM_DEFAULT_USERS' => 'Creating default users',
|
||||
'LBL_PERFORM_DEMO_DATA' => 'Populating the database tables with demo data (this may take a little while)',
|
||||
'LBL_PERFORM_DONE' => 'done<br>',
|
||||
'LBL_PERFORM_DROPPING' => 'dropping / ',
|
||||
'LBL_PERFORM_FINISH' => 'Finish',
|
||||
'LBL_PERFORM_LICENSE_SETTINGS' => 'Updating license information',
|
||||
'LBL_PERFORM_OUTRO_1' => 'The setup of Sugar ',
|
||||
'LBL_PERFORM_OUTRO_2' => ' is now complete!',
|
||||
'LBL_PERFORM_OUTRO_3' => 'Total time: ',
|
||||
'LBL_PERFORM_OUTRO_4' => ' seconds.',
|
||||
'LBL_PERFORM_OUTRO_5' => 'Approximate memory used: ',
|
||||
'LBL_PERFORM_OUTRO_6' => ' bytes.',
|
||||
'LBL_PERFORM_OUTRO_7' => 'Your system is now installed and configured for use.',
|
||||
'LBL_PERFORM_REL_META' => 'relationship meta ... ',
|
||||
'LBL_PERFORM_SUCCESS' => 'Success!',
|
||||
'LBL_PERFORM_TABLES' => 'Creating Sugar application tables, audit tables and relationship metadata',
|
||||
'LBL_PERFORM_TITLE' => 'Perform Setup',
|
||||
'LBL_PRINT' => 'Print',
|
||||
'LBL_REG_CONF_1' => 'Please complete the short form below to receive product announcements, training news, special offers and special event invitations from SugarCRM. We do not sell, rent, share or otherwise distribute the information collected here to third parties.',
|
||||
'LBL_REG_CONF_2' => 'Your name and email address are the only required fields for registration. All other fields are optional, but very helpful. We do not sell, rent, share, or otherwise distribute the information collected here to third parties.',
|
||||
'LBL_REG_CONF_3' => 'Thank you for registering. Click on the Finish button to login to SugarCRM. You will need to log in for the first time using the username "admin" and the password you entered in step 2.',
|
||||
'LBL_REG_TITLE' => 'Registration',
|
||||
'LBL_REG_NO_THANKS' => 'No Thanks',
|
||||
'LBL_REG_SKIP_THIS_STEP' => 'Skip this Step',
|
||||
'LBL_REQUIRED' => '* Required field',
|
||||
|
||||
'LBL_SITECFG_ADMIN_Name' => 'Sugar Application Admin Name',
|
||||
'LBL_SITECFG_ADMIN_PASS_2' => 'Re-enter Sugar Admin User Password',
|
||||
'LBL_SITECFG_ADMIN_PASS_WARN' => 'Caution: This will override the admin password of any previous installation.',
|
||||
'LBL_SITECFG_ADMIN_PASS' => 'Sugar Admin User Password',
|
||||
'LBL_SITECFG_APP_ID' => 'Application ID',
|
||||
'LBL_SITECFG_CUSTOM_ID_DIRECTIONS' => 'If selected, you must provide an application ID to override the auto-generated ID. The ID ensures that sessions of one Sugar instance are not used by other instances. If you have a cluster of Sugar installations, they all must share the same application ID.',
|
||||
'LBL_SITECFG_CUSTOM_ID' => 'Provide Your Own Application ID',
|
||||
'LBL_SITECFG_CUSTOM_LOG_DIRECTIONS' => 'If selected, you must specify a log directory to override the default directory for the Sugar log. Regardless of where the log file is located, access to it through a web browser will be restricted via an .htaccess redirect.',
|
||||
'LBL_SITECFG_CUSTOM_LOG' => 'Use a Custom Log Directory',
|
||||
'LBL_SITECFG_CUSTOM_SESSION_DIRECTIONS' => 'If selected, you must provide a secure folder for storing Sugar session information. This can be done to prevent session data from being vulnerable on shared servers.',
|
||||
'LBL_SITECFG_CUSTOM_SESSION' => 'Use a Custom Session Directory for Sugar',
|
||||
'LBL_SITECFG_DIRECTIONS' => 'Please enter your site configuration information below. If you are unsure of the fields, we suggest that you use the default values.',
|
||||
'LBL_SITECFG_FIX_ERRORS' => '<b>Please fix the following errors before proceeding:</b>',
|
||||
'LBL_SITECFG_LOG_DIR' => 'Log Directory',
|
||||
'LBL_SITECFG_SESSION_PATH' => 'Path to Session Directory<br>(must be writable)',
|
||||
'LBL_SITECFG_SITE_SECURITY' => 'Select Security Options',
|
||||
'LBL_SITECFG_SUGAR_UP_DIRECTIONS' => 'If selected, the system will periodically check for updated versions of the application.',
|
||||
'LBL_SITECFG_SUGAR_UP' => 'Automatically Check For Updates?',
|
||||
'LBL_SITECFG_SUGAR_UPDATES' => 'Sugar Updates Config',
|
||||
'LBL_SITECFG_TITLE' => 'Site Configuration',
|
||||
'LBL_SITECFG_TITLE2' => 'Identify Administration User',
|
||||
'LBL_SITECFG_SECURITY_TITLE' => 'Site Security',
|
||||
'LBL_SITECFG_URL' => 'URL of Sugar Instance',
|
||||
'LBL_SITECFG_USE_DEFAULTS' => 'Use Defaults?',
|
||||
'LBL_SITECFG_ANONSTATS' => 'Send Anonymous Usage Statistics?',
|
||||
'LBL_SITECFG_ANONSTATS_DIRECTIONS' => 'If selected, Sugar will send <b>anonymous</b> statistics about your installation to SugarCRM Inc. every time your system checks for new versions. This information will help us better understand how the application is used and guide improvements to the product.',
|
||||
'LBL_SITECFG_URL_MSG' => 'Enter the URL that will be used to access the Sugar instance after installation. The URL will also be used as a base for the URLs in the Sugar application pages. The URL should include the web server or machine name or IP address.',
|
||||
'LBL_SITECFG_SYS_NAME_MSG' => 'Enter a name for your system. This name will be displayed in the browser title bar when users visit the Sugar application.',
|
||||
'LBL_SITECFG_PASSWORD_MSG' => 'After installation, you will need to use the Sugar admin user (default username = admin) to log in to the Sugar instance. Enter a password for this administrator user. This password can be changed after the initial login. You may also enter another admin username to use besides the default value provided.',
|
||||
'LBL_SYSTEM_CREDS' => 'System Credentials',
|
||||
'LBL_SYSTEM_ENV' => 'System Environment',
|
||||
'LBL_START' => 'Start',
|
||||
'LBL_SHOW_PASS' => 'Show Passwords',
|
||||
'LBL_HIDE_PASS' => 'Hide Passwords',
|
||||
'LBL_HIDDEN' => '<i>(hidden)</i>',
|
||||
// 'LBL_NO_THANKS' => 'Continue to installer',
|
||||
'LBL_CHOOSE_LANG' => '<b>Choose your language</b>',
|
||||
'LBL_STEP' => 'Step',
|
||||
'LBL_TITLE_WELCOME' => 'Welcome to the SugarCRM ',
|
||||
'LBL_WELCOME_1' => 'This installer creates the SugarCRM database tables and sets the configuration variables that you need to start. The entire process should take about ten minutes.',
|
||||
'LBL_WELCOME_2' => 'For installation documentation, please visit the <a href="http://www.sugarcrm.com/crm/installation" target="_blank">Sugar Wiki</a>. <BR><BR> You can also find help from the Sugar Community in the <a href="http://www.sugarcrm.com/forums/" target="_blank">Sugar Forums</a>.',
|
||||
//welcome page variables
|
||||
'LBL_TITLE_ARE_YOU_READY' => 'Are you ready to install?',
|
||||
'REQUIRED_SYS_COMP' => 'Required System Components',
|
||||
'REQUIRED_SYS_COMP_MSG' =>
|
||||
'Before you begin, please be sure that you have the supported versions of the following system
|
||||
components:<br>
|
||||
<ul>
|
||||
<li> Database/Database Management System (Examples: MySQL, SQL Server, Oracle)</li>
|
||||
<li> Web Server (Apache, IIS)</li>
|
||||
</ul>
|
||||
Consult the Compatibility Matrix in the Release Notes for
|
||||
compatible system components for the Sugar version that you are installing.<br>',
|
||||
'REQUIRED_SYS_CHK' => 'Initial System Check',
|
||||
'REQUIRED_SYS_CHK_MSG' =>
|
||||
'When you begin the installation process, a system check will be performed on the web server on which the Sugar files are located in order to
|
||||
make sure the system is configured properly and has all of the necessary components
|
||||
to successfully complete the installation. <br><br>
|
||||
The system checks all of the following:<br>
|
||||
<ul>
|
||||
<li><b>PHP version</b> – must be compatible
|
||||
with the application</li>
|
||||
<li><b>Session Variables</b> – must be working properly</li>
|
||||
<li> <b>MB Strings</b> – must be installed and enabled in php.ini</li>
|
||||
|
||||
<li> <b>Database Support</b> – must exist for MySQL, SQL
|
||||
Server or Oracle</li>
|
||||
|
||||
<li> <b>Config.php</b> – must exist and must have the appropriate
|
||||
permissions to make it writeable</li>
|
||||
<li>The following Sugar files must be writeable:<ul><li><b>/custom</li>
|
||||
<li>/cache</li>
|
||||
<li>/modules</b></li></ul></li></ul>
|
||||
If the check fails, you will not be able to proceed with the installation. An error message will be displayed, explaining why your system
|
||||
did not pass the check.
|
||||
After making any necessary changes, you can undergo the system
|
||||
check again to continue the installation.<br>',
|
||||
'REQUIRED_INSTALLTYPE' => 'Typical or Custom install',
|
||||
'REQUIRED_INSTALLTYPE_MSG' =>
|
||||
'After the system check is performed, you can choose either
|
||||
the Typical or the Custom installation.<br><br>
|
||||
For both <b>Typical</b> and <b>Custom</b> installations, you will need to know the following:<br>
|
||||
<ul>
|
||||
<li> <b>Type of database</b> that will house the Sugar data <ul><li>Compatible database
|
||||
types: MySQL, MS SQL Server, Oracle.<br><br></li></ul></li>
|
||||
<li> <b>Name of the web server</b> or machine (host) on which the database is located
|
||||
<ul><li>This may be <i>localhost</i> if the database is on your local computer or is on the same web server or machine as your Sugar files.<br><br></li></ul></li>
|
||||
<li><b>Name of the database</b> that you would like to use to house the Sugar data</li>
|
||||
<ul>
|
||||
<li> You might already have an existing database that you would like to use. If
|
||||
you provide the name of an existing database, the tables in the database will
|
||||
be dropped during installation when the schema for the Sugar database is defined.</li>
|
||||
<li> If you do not already have a database, the name you provide will be used for
|
||||
the new database that is created for the instance during installation.<br><br></li>
|
||||
</ul>
|
||||
<li><b>Database administrator user name and password</b> <ul><li>The database administrator should be able to create tables and users and write to the database.</li><li>You might need to
|
||||
contact your database administrator for this information if the database is
|
||||
not located on your local computer and/or if you are not the database administrator.<br><br></ul></li></li>
|
||||
<li> <b>Sugar database user name and password</b>
|
||||
</li>
|
||||
<ul>
|
||||
<li> The user may be the database administrator, or you may provide the name of
|
||||
another existing database user. </li>
|
||||
<li> If you would like to create a new database user for this purpose, you will
|
||||
be able to provide a new username and password during the installation process,
|
||||
and the user will be created during installation. </li>
|
||||
</ul></ul><p>
|
||||
|
||||
For the <b>Custom</b> setup, you might also need to know the following:<br>
|
||||
<ul>
|
||||
<li> <b>URL that will be used to access the Sugar instance</b> after it is installed.
|
||||
This URL should include the web server or machine name or IP address.<br><br></li>
|
||||
<li> [Optional] <b>Path to the session directory</b> if you wish to use a custom
|
||||
session directory for Sugar information in order to prevent session data from
|
||||
being vulnerable on shared servers.<br><br></li>
|
||||
<li> [Optional] <b>Path to a custom log directory</b> if you wish to override the default directory for the Sugar log.<br><br></li>
|
||||
<li> [Optional] <b>Application ID</b> if you wish to override the auto-generated
|
||||
ID that ensures that sessions of one Sugar instance are not used by other instances.<br><br></li>
|
||||
<li><b>Character Set</b> most commonly used in your locale.<br><br></li></ul>
|
||||
For more detailed information, please consult the Installation Guide.
|
||||
',
|
||||
'LBL_WELCOME_PLEASE_READ_BELOW' => 'Please read the following important information before proceeding with the installation. The information will help you determine whether or not you are ready to install the application at this time.',
|
||||
|
||||
'LBL_WELCOME_CHOOSE_LANGUAGE' => '<b>Choose your language</b>',
|
||||
'LBL_WELCOME_SETUP_WIZARD' => 'Setup Wizard',
|
||||
'LBL_WELCOME_TITLE_WELCOME' => 'Welcome to the SugarCRM ',
|
||||
'LBL_WELCOME_TITLE' => 'SugarCRM Setup Wizard',
|
||||
'LBL_WIZARD_TITLE' => 'Sugar Setup Wizard: ',
|
||||
'LBL_YES' => 'Yes',
|
||||
'LBL_YES_MULTI' => 'Yes - Multibyte',
|
||||
// OOTB Scheduler Job Names:
|
||||
'LBL_OOTB_WORKFLOW' => 'Process Workflow Tasks',
|
||||
'LBL_OOTB_REPORTS' => 'Run Report Generation Scheduled Tasks',
|
||||
'LBL_OOTB_IE' => 'Check Inbound Mailboxes',
|
||||
'LBL_OOTB_BOUNCE' => 'Run Nightly Process Bounced Campaign Emails',
|
||||
'LBL_OOTB_CAMPAIGN' => 'Run Nightly Mass Email Campaigns',
|
||||
'LBL_OOTB_PRUNE' => 'Prune Database on 1st of Month',
|
||||
'LBL_OOTB_TRACKER' => 'Prune tracker tables',
|
||||
'LBL_UPDATE_TRACKER_SESSIONS' => 'Update tracker_sessions table',
|
||||
|
||||
|
||||
'LBL_PATCHES_TITLE' => 'Install Latest Patches',
|
||||
'LBL_MODULE_TITLE' => 'Install Language Packs',
|
||||
'LBL_PATCH_1' => 'If you would like to skip this step, click Next.',
|
||||
'LBL_PATCH_TITLE' => 'System Patch',
|
||||
'LBL_PATCH_READY' => 'The following patch(es) are ready to be installed:',
|
||||
'LBL_SESSION_ERR_DESCRIPTION' => "SugarCRM relies upon PHP sessions to store important information while connected to this web server. Your PHP installation does not have the Session information correctly configured.
|
||||
<br><br>A common misconfiguration is that the <b>'session.save_path'</b> directive is not pointing to a valid directory. <br>
|
||||
<br> Please correct your <a target=_new href='http://us2.php.net/manual/en/ref.session.php'>PHP configuration</a> in the php.ini file located here below.",
|
||||
'LBL_SESSION_ERR_TITLE' => 'PHP Sessions Configuration Error',
|
||||
'LBL_SYSTEM_NAME'=>'System Name',
|
||||
'LBL_REQUIRED_SYSTEM_NAME'=>'Provide a System Name for the Sugar instance.',
|
||||
'LBL_PATCH_UPLOAD' => 'Select a patch file from your local computer',
|
||||
'LBL_INCOMPATIBLE_PHP_VERSION' => 'Php version 5 or above is required.',
|
||||
'LBL_MINIMUM_PHP_VERSION' => 'Minimum Php version required is 5.1.0. Recommended Php version is 5.2.x.',
|
||||
'LBL_YOUR_PHP_VERSION' => '(Your current php version is ',
|
||||
'LBL_RECOMMENDED_PHP_VERSION' =>' Recommended php version is 5.2.x)',
|
||||
'LBL_BACKWARD_COMPATIBILITY_ON' => 'Php Backward Compatibility mode is turned on. Set zend.ze1_compatibility_mode to Off for proceeding further',
|
||||
|
||||
'advanced_password_new_account_email' => array(
|
||||
'subject' => 'New account information',
|
||||
'description' => 'This template is used when the System Administrator sends a new password to a user.',
|
||||
'body' => '<div><table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" width="550" align=\"\"\"center\"\"\"><tbody><tr><td colspan=\"2\"><p>Here is your account username and temporary password:</p><p>Username : $contact_user_user_name </p><p>Password : $contact_user_user_hash </p><br><p>$config_site_url</p><br><p>After you log in using the above password, you may be required to reset the password to one of your own choice.</p> </td> </tr><tr><td colspan=\"2\"></td> </tr> </tbody></table> </div>',
|
||||
'txt_body' =>
|
||||
'
|
||||
Here is your account username and temporary password:
|
||||
Username : $contact_user_user_name
|
||||
Password : $contact_user_user_hash
|
||||
|
||||
$config_site_url
|
||||
|
||||
After you log in using the above password, you may be required to reset the password to one of your own choice.',
|
||||
'name' => 'System-generated password email',
|
||||
),
|
||||
'advanced_password_forgot_password_email' => array(
|
||||
'subject' => 'Reset your account password',
|
||||
'description' => "This template is used to send a user a link to click to reset the user's account password.",
|
||||
'body' => '<div><table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" width="550" align=\"\"\"center\"\"\"><tbody><tr><td colspan=\"2\"><p>You recently requested on $contact_user_pwd_last_changed to be able to reset your account password. </p><p>Click on the link below to reset your password:</p><p> $contact_user_link_guid </p> </td> </tr><tr><td colspan=\"2\"></td> </tr> </tbody></table> </div>',
|
||||
'txt_body' =>
|
||||
'
|
||||
You recently requested on $contact_user_pwd_last_changed to be able to reset your account password.
|
||||
|
||||
Click on the link below to reset your password:
|
||||
|
||||
$contact_user_link_guid',
|
||||
'name' => 'Forgot Password email',
|
||||
),
|
||||
);
|
||||
|
||||
?>
|
||||
61
install/license.js
Normal file
61
install/license.js
Normal file
@@ -0,0 +1,61 @@
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
|
||||
|
||||
function toggleLicenseAccept(){
|
||||
var theForm = document.forms[0];
|
||||
|
||||
if( theForm.setup_license_accept.checked ){
|
||||
theForm.setup_license_accept.checked = "";
|
||||
}
|
||||
else {
|
||||
theForm.setup_license_accept.checked = "yes";
|
||||
}
|
||||
|
||||
toggleNextButton();
|
||||
}
|
||||
|
||||
function toggleNextButton(){
|
||||
var theForm = document.forms[0];
|
||||
var nextButton = document.getElementById( "button_next" );
|
||||
|
||||
if( theForm.setup_license_accept.checked ){
|
||||
nextButton.disabled = '';
|
||||
nextButton.focus();
|
||||
}
|
||||
else {
|
||||
nextButton.disabled = "disabled";
|
||||
}
|
||||
}
|
||||
237
install/license.php
Normal file
237
install/license.php
Normal file
@@ -0,0 +1,237 @@
|
||||
<?php
|
||||
//if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* SugarCRM Community Edition is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2011 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
|
||||
|
||||
|
||||
global $sugar_version, $js_custom_version;
|
||||
if( !isset( $install_script ) || !$install_script ){
|
||||
die('Unable to process script directly.');
|
||||
}
|
||||
|
||||
// setup session variables (and their defaults) if this page has not yet been submitted
|
||||
if(!isset($_SESSION['license_submitted']) || !$_SESSION['license_submitted']){
|
||||
$_SESSION['setup_license_accept'] = false;
|
||||
}
|
||||
|
||||
$checked = (isset($_SESSION['setup_license_accept']) && !empty($_SESSION['setup_license_accept'])) ? 'checked="on"' : '';
|
||||
|
||||
require_once("install/install_utils.php");
|
||||
$license_file = getLicenseContents("LICENSE.txt");
|
||||
|
||||
$out =<<<EOQ
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||
<title>{$mod_strings['LBL_WIZARD_TITLE']} {$mod_strings['LBL_LICENSE_ACCEPTANCE']}</title>
|
||||
<link REL="SHORTCUT ICON" HREF="include/images/sugar_icon.ico">
|
||||
<link rel="stylesheet" href="install/install.css" type="text/css">
|
||||
<script src="include/javascript/sugar_grp1_yui.js?s={$sugar_version}&c={$js_custom_version}"></script>
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
if ( YAHOO.env.ua )
|
||||
UA = YAHOO.env.ua;
|
||||
-->
|
||||
</script>
|
||||
<link rel='stylesheet' type='text/css' href='include/javascript/yui/build/container/assets/container.css' />
|
||||
<script type="text/javascript" src="install/license.js"></script>
|
||||
</head>
|
||||
|
||||
<body onload="javascript:toggleNextButton();document.getElementById('button_next2').focus();">
|
||||
<div id='licenseDiv'>
|
||||
<form action="install.php" method="post" name="setConfig" id="form">
|
||||
<form action="welcome.php" method="post" name="setLang" id="langForm">
|
||||
<table cellspacing="0" cellpadding="0" border="0" align="center" class="shell">
|
||||
<tr><td colspan="2" id="help"><a href="{$help_url}" target='_blank'>{$mod_strings['LBL_HELP']} </a></td></tr>
|
||||
<tr>
|
||||
<th width="500">
|
||||
<p>
|
||||
<img src="{$sugar_md}" alt="SugarCRM" border="0">
|
||||
</p>
|
||||
{$mod_strings['LBL_LICENSE_ACCEPTANCE']}</th>
|
||||
<th width="200" height="30" style="text-align: right;"><a href="http://www.sugarcrm.com" target="_blank">
|
||||
<IMG src="include/images/sugarcrm_login.png" width="145" height="30" alt="SugarCRM" border="0"></a>
|
||||
</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<textarea cols="80" rows="20" readonly>{$license_file}</textarea>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td align=left>
|
||||
<input type="checkbox" class="checkbox" name="setup_license_accept" id="button_next2" onClick='toggleNextButton();' {$checked} />
|
||||
<a href='javascript:void(0)' onClick='toggleLicenseAccept();toggleNextButton();'>{$mod_strings['LBL_LICENSE_I_ACCEPT']}</a>
|
||||
</td>
|
||||
<td align=right>
|
||||
<input type="button" class="button" name="print_license" id="button_print_license" value="{$mod_strings['LBL_LICENSE_PRINTABLE']}"
|
||||
onClick='window.open("install.php?page=licensePrint&language={$current_language}");' />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="right" colspan="2">
|
||||
<hr>
|
||||
<input type="hidden" name="current_step" value="{$next_step}">
|
||||
<table cellspacing="0" cellpadding="0" border="0" class="stdTable">
|
||||
<tr>
|
||||
<td>
|
||||
<input class="acceptButton" type="button" name="goto" value="{$mod_strings['LBL_BACK']}" id="button_back_license" onclick="document.getElementById('form').submit();" />
|
||||
<input class="acceptButton" type="button" name="goto" value="{$mod_strings['LBL_NEXT']}" id="button_next" disabled="disabled" onclick="callSysCheck();"/>
|
||||
<input type="hidden" name="goto" id='hidden_goto' value="{$mod_strings['LBL_BACK']}" />
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
var msgPanel;
|
||||
function callSysCheck(){
|
||||
|
||||
//begin main function that will be called
|
||||
ajaxCall = function(msg_panel){
|
||||
//create success function for callback
|
||||
|
||||
getPanel = function() {
|
||||
var args = { width:"300px",
|
||||
modal:true,
|
||||
fixedcenter: true,
|
||||
constraintoviewport: false,
|
||||
underlay:"shadow",
|
||||
close:false,
|
||||
draggable:true,
|
||||
|
||||
effect:{effect:YAHOO.widget.ContainerEffect.FADE, duration:.5}
|
||||
} ;
|
||||
msg_panel = new YAHOO.widget.Panel('p_msg', args);
|
||||
//If we haven't built our panel using existing markup,
|
||||
//we can set its content via script:
|
||||
msg_panel.setHeader("{$mod_strings['LBL_LICENSE_CHKENV_HEADER']}");
|
||||
msg_panel.setBody(document.getElementById("checkingDiv").innerHTML);
|
||||
msg_panel.render(document.body);
|
||||
msgPanel = msg_panel;
|
||||
}
|
||||
|
||||
|
||||
passed = function(url){
|
||||
document.setConfig.goto.value="{$mod_strings['LBL_NEXT']}";
|
||||
document.getElementById('hidden_goto').value="{$mod_strings['LBL_NEXT']}";
|
||||
document.setConfig.current_step.value="{$next_step}";
|
||||
document.setConfig.submit();
|
||||
window.focus();
|
||||
}
|
||||
success = function(o) {
|
||||
if (o.responseText.indexOf('passed')>=0){
|
||||
if ( YAHOO.util.Selector.query('button', 'p_msg', true) != null )
|
||||
YAHOO.util.Selector.query('button', 'p_msg', true).style.display = 'none';
|
||||
scsbody = "<table cellspacing='0' cellpadding='0' border='0' align='center'><tr><td>";
|
||||
scsbody += "<p>{$mod_strings['LBL_LICENSE_CHECK_PASSED']}</p>";
|
||||
scsbody += "<div id='cntDown'>{$mod_strings['LBL_THREE']}</div>";
|
||||
scsbody += "</td></tr></table>";
|
||||
scsbody += "<script>countdown(3);<\/script>";
|
||||
msgPanel.setBody(scsbody);
|
||||
msgPanel.render();
|
||||
countdown(3);
|
||||
window.setTimeout('passed("install.php?goto=next")', 2500);
|
||||
|
||||
}else{
|
||||
//turn off loading message
|
||||
msgPanel.hide();
|
||||
document.getElementById('sysCheckMsg').style.display = '';
|
||||
document.getElementById('licenseDiv').style.display = 'none';
|
||||
document.getElementById('sysCheckMsg').innerHTML=o.responseText;
|
||||
}
|
||||
|
||||
|
||||
}//end success
|
||||
|
||||
//set loading message and create url
|
||||
postData = "checkInstallSystem=true&to_pdf=1&sugar_body_only=1";
|
||||
|
||||
//if this is a call already in progress, then just return
|
||||
if(typeof ajxProgress != 'undefined'){
|
||||
return;
|
||||
}
|
||||
|
||||
getPanel();
|
||||
msgPanel.show;
|
||||
var ajxProgress = YAHOO.util.Connect.asyncRequest('POST','install.php', {success: success, failure: success}, postData);
|
||||
|
||||
|
||||
};//end ajaxCall method
|
||||
ajaxCall();
|
||||
return;
|
||||
}
|
||||
|
||||
function countdown(num){
|
||||
scsbody = "<table cellspacing='0' cellpadding='0' border='0' align='center'><tr><td>";
|
||||
scsbody += "<p>{$mod_strings['LBL_LICENSE_CHECK_PASSED']}</p>";
|
||||
scsbody += "<div id='cntDown'>{$mod_strings['LBL_LICENSE_REDIRECT']}"+num+"</div>";
|
||||
scsbody += "</td></tr></table>";
|
||||
msgPanel.setBody(scsbody);
|
||||
msgPanel.render();
|
||||
if(num >0){
|
||||
num = num-1;
|
||||
setTimeout("countdown("+num+")",1000);
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<div id="checkingDiv" style="display:none">
|
||||
<table cellspacing="0" cellpadding="0" border="0">
|
||||
<tr><td>
|
||||
<p><img src='install/processing.gif'> <br>{$mod_strings['LBL_LICENSE_CHECKING']}</p>
|
||||
</td></tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div id='sysCheckMsg'><div>
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
EOQ;
|
||||
|
||||
echo $out;
|
||||
?>
|
||||
90
install/licensePrint.php
Normal file
90
install/licensePrint.php
Normal file
@@ -0,0 +1,90 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* SugarCRM Community Edition is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2011 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
|
||||
/*********************************************************************************
|
||||
|
||||
* Description: printable license page.
|
||||
********************************************************************************/
|
||||
|
||||
clean_incoming_data();
|
||||
|
||||
require_once("install/language/{$_GET['language']}.lang.php");
|
||||
require_once("install/install_utils.php");
|
||||
|
||||
$license_file = wordwrap(getLicenseContents("LICENSE.txt"),100);
|
||||
|
||||
$out =<<<EOQ
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||
<title>{$mod_strings['LBL_LICENSE_TITLE_2']}</title>
|
||||
<link REL="SHORTCUT ICON" HREF="include/images/sugar_icon.ico">
|
||||
<link rel="stylesheet" href="install/install.css" type="text/css">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<table cellspacing="0" cellpadding="0" border="0" align="center" class="shell" width="90%">
|
||||
<tr>
|
||||
<td colspan='3' align="right">
|
||||
<input type="button" name="print_license" value=" {$mod_strings['LBL_PRINT']} " onClick='window.print();' />
|
||||
<input type="button" name="close_windows" value=" {$mod_strings['LBL_CLOSE']} " onClick='window.close();' />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="2%"> </td>
|
||||
<td>
|
||||
<pre>
|
||||
{$license_file}
|
||||
</pre>
|
||||
</td>
|
||||
<td width="2%"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan='3' align="right">
|
||||
<input type="button" name="print_license" value=" {$mod_strings['LBL_PRINT']} " onClick='window.print();' />
|
||||
<input type="button" name="close_windows" value=" {$mod_strings['LBL_CLOSE']} " onClick='window.close();' />
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
||||
EOQ;
|
||||
echo $out;
|
||||
?>
|
||||
40
install/oc_convert.js
Normal file
40
install/oc_convert.js
Normal file
@@ -0,0 +1,40 @@
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
|
||||
|
||||
function toggleIsFirstTime(){
|
||||
var theForm = document.forms[0];
|
||||
theForm.first_time.value = "false";
|
||||
}
|
||||
50
install/oc_install.js
Normal file
50
install/oc_install.js
Normal file
@@ -0,0 +1,50 @@
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
|
||||
|
||||
function toggleOfflineClientInstallation(){
|
||||
var theForm = document.forms[0];
|
||||
|
||||
if(!theForm.oc_install.checked ){
|
||||
theForm.oc_server_url.disabled = "disabled";
|
||||
theForm.oc_username.disabled = "disabled";
|
||||
theForm.oc_password.disabled = "disabled";
|
||||
}
|
||||
else {
|
||||
theForm.oc_server_url.disabled = '';
|
||||
theForm.oc_username.disabled = '';
|
||||
theForm.oc_password.disabled = '';
|
||||
}
|
||||
}
|
||||
570
install/performSetup.php
Normal file
570
install/performSetup.php
Normal file
@@ -0,0 +1,570 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* SugarCRM Community Edition is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2011 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
|
||||
|
||||
|
||||
// This file will load the configuration settings from session data,
|
||||
// write to the config file, and execute any necessary database steps.
|
||||
$GLOBALS['installing'] = true;
|
||||
if( !isset( $install_script ) || !$install_script ){
|
||||
die($mod_strings['ERR_NO_DIRECT_SCRIPT']);
|
||||
}
|
||||
ini_set("output_buffering","0");
|
||||
set_time_limit(3600);
|
||||
// flush after each output so the user can see the progress in real-time
|
||||
ob_implicit_flush();
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
require_once('install/install_utils.php');
|
||||
|
||||
require_once('modules/TableDictionary.php');
|
||||
|
||||
|
||||
$trackerManager = TrackerManager::getInstance();
|
||||
$trackerManager->pause();
|
||||
|
||||
|
||||
$cache_dir = 'cache/';
|
||||
$line_entry_format = "     <b>";
|
||||
$line_exit_format = "...   </b>";
|
||||
$rel_dictionary = $dictionary; // sourced by modules/TableDictionary.php
|
||||
$render_table_close = "";
|
||||
$render_table_open = "";
|
||||
$setup_db_admin_password = $_SESSION['setup_db_admin_password'];
|
||||
$setup_db_admin_user_name = $_SESSION['setup_db_admin_user_name'];
|
||||
$setup_db_create_database = $_SESSION['setup_db_create_database'];
|
||||
$setup_db_create_sugarsales_user = $_SESSION['setup_db_create_sugarsales_user'];
|
||||
$setup_db_database_name = $_SESSION['setup_db_database_name'];
|
||||
$setup_db_drop_tables = $_SESSION['setup_db_drop_tables'];
|
||||
$setup_db_host_instance = $_SESSION['setup_db_host_instance'];
|
||||
$setup_db_host_name = $_SESSION['setup_db_host_name'];
|
||||
$demoData = $_SESSION['demoData'];
|
||||
$setup_db_sugarsales_password = $_SESSION['setup_db_sugarsales_password'];
|
||||
$setup_db_sugarsales_user = $_SESSION['setup_db_sugarsales_user'];
|
||||
$setup_site_admin_user_name = $_SESSION['setup_site_admin_user_name'];
|
||||
$setup_site_admin_password = $_SESSION['setup_site_admin_password'];
|
||||
$setup_site_guid = (isset($_SESSION['setup_site_specify_guid']) && $_SESSION['setup_site_specify_guid'] != '') ? $_SESSION['setup_site_guid'] : '';
|
||||
$setup_site_url = $_SESSION['setup_site_url'];
|
||||
$parsed_url = parse_url($setup_site_url);
|
||||
$setup_site_host_name = $parsed_url['host'];
|
||||
$setup_site_log_dir = isset($_SESSION['setup_site_custom_log_dir']) ? $_SESSION['setup_site_log_dir'] : '.';
|
||||
$setup_site_log_file = 'sugarcrm.log'; // may be an option later
|
||||
$setup_site_session_path = isset($_SESSION['setup_site_custom_session_path']) ? $_SESSION['setup_site_session_path'] : '';
|
||||
$setup_site_log_level ='fatal';
|
||||
|
||||
sugar_cache_clear('TeamSetsCache');
|
||||
if ( file_exists($cache_dir .'modules/Teams/TeamSetCache.php') ) {
|
||||
unlink($cache_dir.'modules/Teams/TeamSetCache.php');
|
||||
}
|
||||
|
||||
sugar_cache_clear('TeamSetsMD5Cache');
|
||||
if ( file_exists($cache_dir.'modules/Teams/TeamSetMD5Cache.php') ) {
|
||||
unlink($cache_dir.'modules/Teams/TeamSetMD5Cache.php');
|
||||
}
|
||||
|
||||
$out =<<<EOQ
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<meta http-equiv="Content-Script-Type" content="text/javascript">
|
||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||
<title>{$mod_strings['LBL_WIZARD_TITLE']} {$mod_strings['LBL_PERFORM_TITLE']}</title>
|
||||
<link REL="SHORTCUT ICON" HREF="$icon">
|
||||
<link rel="stylesheet" href="$css" type="text/css" />
|
||||
<script type="text/javascript" src="$common"></script>
|
||||
</head>
|
||||
<body onload="javascript:document.getElementById('button_next2').focus();">
|
||||
<table cellspacing="0" cellpadding="0" border="0" align="center" class="shell">
|
||||
<tr><td colspan="2" id="help"><a href="{$help_url}" target='_blank'>{$mod_strings['LBL_HELP']} </a></td></tr>
|
||||
<tr>
|
||||
<th width="500">
|
||||
<p>
|
||||
<img src="{$sugar_md}" alt="SugarCRM" border="0">
|
||||
</p>
|
||||
{$mod_strings['LBL_PERFORM_TITLE']}</th>
|
||||
<th width="200" style="text-align: right;"><a href="http://www.sugarcrm.com" target="_blank">
|
||||
<IMG src="$loginImage" width="145" height="30" alt="SugarCRM" border="0"></a></th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
EOQ;
|
||||
echo $out;
|
||||
installLog("calling handleSugarConfig()");
|
||||
$bottle = handleSugarConfig();
|
||||
installLog("calling handleLog4Php()");
|
||||
handleLog4Php();
|
||||
|
||||
$server_software = $_SERVER["SERVER_SOFTWARE"];
|
||||
if(strpos($server_software,'Microsoft-IIS') !== false)
|
||||
{
|
||||
installLog("calling handleWebConfig()");
|
||||
handleWebConfig();
|
||||
} else {
|
||||
installLog("calling handleHtaccess()");
|
||||
handleHtaccess();
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//// START TABLE STUFF
|
||||
echo "<br>";
|
||||
echo "<b>{$mod_strings['LBL_PERFORM_TABLES']}</b>";
|
||||
echo "<br>";
|
||||
|
||||
// create the SugarCRM database
|
||||
if($setup_db_create_database) {
|
||||
installLog("calling handleDbCreateDatabase()");
|
||||
handleDbCreateDatabase();
|
||||
} else {
|
||||
|
||||
// ensure the charset and collation are utf8
|
||||
installLog("calling handleDbCharsetCollation()");
|
||||
handleDbCharsetCollation();
|
||||
}
|
||||
|
||||
// create the SugarCRM database user
|
||||
if($setup_db_create_sugarsales_user)
|
||||
handleDbCreateSugarUser();
|
||||
|
||||
|
||||
foreach( $beanFiles as $bean => $file ){
|
||||
require_once( $file );
|
||||
}
|
||||
|
||||
// load up the config_override.php file.
|
||||
// This is used to provide default user settings
|
||||
if( is_file("config_override.php") ){
|
||||
require_once("config_override.php");
|
||||
}
|
||||
|
||||
$db = &DBManagerFactory::getInstance();
|
||||
$startTime = microtime(true);
|
||||
$focus = 0;
|
||||
$processed_tables = array(); // for keeping track of the tables we have worked on
|
||||
$empty = '';
|
||||
$new_tables = 1; // is there ever a scenario where we DON'T create the admin user?
|
||||
$new_config = 1;
|
||||
$new_report = 1;
|
||||
|
||||
// add non-module Beans to this array to keep the installer from erroring.
|
||||
$nonStandardModules = array (
|
||||
//'Tracker',
|
||||
);
|
||||
|
||||
//if working with sql-server create a catalog for full-text indexes.
|
||||
if ($GLOBALS['db']->dbType=='mssql') {
|
||||
$GLOBALS['db']->helper->create_default_full_text_catalog();
|
||||
}
|
||||
/**
|
||||
* loop through all the Beans and create their tables
|
||||
*/
|
||||
installLog("looping through all the Beans and create their tables");
|
||||
//start by clearing out the vardefs
|
||||
VardefManager::clearVardef();
|
||||
foreach( $beanFiles as $bean => $file ) {
|
||||
$doNotInit = array('Scheduler', 'SchedulersJob', 'ProjectTask');
|
||||
|
||||
if(in_array($bean, $doNotInit)) {
|
||||
$focus = new $bean(false);
|
||||
} else {
|
||||
$focus = new $bean();
|
||||
}
|
||||
|
||||
if ( $bean == 'Configurator' )
|
||||
continue;
|
||||
|
||||
$table_name = $focus->table_name;
|
||||
installLog("processing table ".$focus->table_name);
|
||||
// check to see if we have already setup this table
|
||||
if(!in_array($table_name, $processed_tables)) {
|
||||
if(!file_exists("modules/".$focus->module_dir."/vardefs.php")){
|
||||
continue;
|
||||
}
|
||||
if(!in_array($bean, $nonStandardModules)) {
|
||||
require_once("modules/".$focus->module_dir."/vardefs.php"); // load up $dictionary
|
||||
if($dictionary[$focus->object_name]['table'] == 'does_not_exist') {
|
||||
continue; // support new vardef definitions
|
||||
}
|
||||
} else {
|
||||
continue; //no further processing needed for ignored beans.
|
||||
}
|
||||
|
||||
// table has not been setup...we will do it now and remember that
|
||||
$processed_tables[] = $table_name;
|
||||
|
||||
$focus->db->database = $db->database; // set db connection so we do not need to reconnect
|
||||
|
||||
if($setup_db_drop_tables) {
|
||||
drop_table_install($focus);
|
||||
installLog("dropping table ".$focus->table_name);
|
||||
}
|
||||
|
||||
if(create_table_if_not_exist($focus)) {
|
||||
installLog("creating table ".$focus->table_name);
|
||||
if( $bean == "User" ){
|
||||
$new_tables = 1;
|
||||
}
|
||||
if($bean == "Administration")
|
||||
$new_config = 1;
|
||||
|
||||
|
||||
}
|
||||
|
||||
installLog("creating Relationship Meta for ".$focus->getObjectName());
|
||||
SugarBean::createRelationshipMeta($focus->getObjectName(), $db, $table_name, $empty, $focus->module_dir);
|
||||
echo ".";
|
||||
|
||||
} // end if()
|
||||
}
|
||||
|
||||
echo "<br>";
|
||||
//// END TABLE STUFF
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//// START RELATIONSHIP CREATION
|
||||
|
||||
ksort($rel_dictionary);
|
||||
foreach( $rel_dictionary as $rel_name => $rel_data ){
|
||||
$table = $rel_data['table'];
|
||||
|
||||
if( $setup_db_drop_tables ){
|
||||
if( $db->tableExists($table) ){
|
||||
$db->dropTableName($table);
|
||||
}
|
||||
}
|
||||
|
||||
if( !$db->tableExists($table) ){
|
||||
$db->createTableParams($table, $rel_data['fields'], $rel_data['indices']);
|
||||
}
|
||||
|
||||
SugarBean::createRelationshipMeta($rel_name,$db,$table,$rel_dictionary,'');
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//// START CREATE DEFAULTS
|
||||
echo "<br>";
|
||||
echo "<b>{$mod_strings['LBL_PERFORM_CREATE_DEFAULT']}</b><br>";
|
||||
echo "<br>";
|
||||
installLog("Begin creating Defaults");
|
||||
if ($new_config) {
|
||||
installLog("insert defaults into config table");
|
||||
insert_default_settings();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
if ($new_tables) {
|
||||
echo $line_entry_format.$mod_strings['LBL_PERFORM_DEFAULT_USERS'].$line_exit_format;
|
||||
installLog($mod_strings['LBL_PERFORM_DEFAULT_USERS']);
|
||||
create_default_users();
|
||||
echo $mod_strings['LBL_PERFORM_DONE'];
|
||||
} else {
|
||||
echo $line_entry_format.$mod_strings['LBL_PERFORM_ADMIN_PASSWORD'].$line_exit_format;
|
||||
installLog($mod_strings['LBL_PERFORM_ADMIN_PASSWORD']);
|
||||
$db->setUserName($setup_db_sugarsales_user);
|
||||
$db->setUserPassword($setup_db_sugarsales_password);
|
||||
set_admin_password($setup_site_admin_password);
|
||||
echo $mod_strings['LBL_PERFORM_DONE'];
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
// default OOB schedulers
|
||||
|
||||
echo $line_entry_format.$mod_strings['LBL_PERFORM_DEFAULT_SCHEDULER'].$line_exit_format;
|
||||
installLog($mod_strings['LBL_PERFORM_DEFAULT_SCHEDULER']);
|
||||
$scheduler = new Scheduler();
|
||||
if(isset($sugar_config['demoData']) && $sugar_config['demoData'] != 'no' && $_SESSION['setup_db_type'] == 'mssql') {
|
||||
$db->query('DELETE FROM schedulers');
|
||||
$db->query('DELETE FROM schedulers_times');
|
||||
|
||||
|
||||
$sched3 = new Scheduler();
|
||||
$sched3->name = 'Prune the User History Table';
|
||||
$sched3->job = 'function::trimTracker';
|
||||
$sched3->date_time_start = create_date(2005,1,1) . ' ' . create_time(0,0,1);
|
||||
$sched3->date_time_end = create_date(2020,12,31) . ' ' . create_time(23,59,59);
|
||||
$sched3->job_interval = '*::*::*::*::*';
|
||||
$sched3->status = 'Active';
|
||||
$sched3->created_by = '1';
|
||||
$sched3->modified_user_id = '1';
|
||||
$sched3->catch_up = '1';
|
||||
$sched3->save();
|
||||
$sched4 = new Scheduler();
|
||||
$sched4->name = 'Check Inbound Mailboxes';
|
||||
$sched4->job = 'function::pollMonitoredInboxes';
|
||||
$sched4->date_time_start = create_date(2005,1,1) . ' ' . create_time(0,0,1);
|
||||
$sched4->date_time_end = create_date(2020,12,31) . ' ' . create_time(23,59,59);
|
||||
$sched4->job_interval = '*::*::*::*::*';
|
||||
$sched4->status = 'Active';
|
||||
$sched4->created_by = '1';
|
||||
$sched4->modified_user_id = '1';
|
||||
$sched4->catch_up = '0';
|
||||
$sched4->save();
|
||||
$sched5 = new Scheduler();
|
||||
$sched5->name = 'Run Nightly Process Bounced Campaign Emails';
|
||||
$sched5->job = 'function::pollMonitoredInboxesForBouncedCampaignEmails';
|
||||
$sched5->date_time_start = create_date(2005,1,1) . ' ' . create_time(0,0,1);
|
||||
$sched5->date_time_end = create_date(2020,12,31) . ' ' . create_time(23,59,59);
|
||||
$sched5->job_interval = '0::2-6::*::*::*';
|
||||
$sched5->status = 'Active';
|
||||
$sched5->created_by = '1';
|
||||
$sched5->modified_user_id = '1';
|
||||
$sched5->catch_up = '1';
|
||||
$sched5->save();
|
||||
|
||||
$sched6 = new Scheduler();
|
||||
$sched6->name = 'Run Nightly Mass Email Campaigns';
|
||||
$sched6->job = 'function::runMassEmailCampaign';
|
||||
$sched6->date_time_start = create_date(2005,1,1) . ' ' . create_time(0,0,1);
|
||||
$sched6->date_time_end = create_date(2020,12,31) . ' ' . create_time(23,59,59);
|
||||
$sched6->job_interval = '0::2-6::*::*::*';
|
||||
$sched6->status = 'Active';
|
||||
$sched6->created_by = '1';
|
||||
$sched6->modified_user_id = '1';
|
||||
$sched6->catch_up = '1';
|
||||
$sched6->save();
|
||||
|
||||
|
||||
$sched7 = new Scheduler();
|
||||
$sched7->name = 'Prune Database on 1st of Month';
|
||||
$sched7->job = 'function::pruneDatabase';
|
||||
$sched7->date_time_start = create_date(2005,1,1) . ' ' . create_time(0,0,1);
|
||||
$sched7->date_time_end = create_date(2020,12,31) . ' ' . create_time(23,59,59);
|
||||
$sched7->job_interval = '0::4::1::*::*';
|
||||
$sched7->status = 'Inactive';
|
||||
$sched7->created_by = '1';
|
||||
$sched7->modified_user_id = '1';
|
||||
$sched7->catch_up = '0';
|
||||
$sched7->save();
|
||||
|
||||
|
||||
|
||||
} else {
|
||||
$scheduler->rebuildDefaultSchedulers();
|
||||
}
|
||||
|
||||
|
||||
echo $mod_strings['LBL_PERFORM_DONE'];
|
||||
|
||||
|
||||
|
||||
// Enable Sugar Feeds and add all feeds by default
|
||||
installLog("Enable SugarFeeds");
|
||||
enableSugarFeeds();
|
||||
|
||||
|
||||
// Enable the InsideView connector and add all modules
|
||||
installLog("Enable InsideView Connector");
|
||||
enableInsideViewConnector();
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//// START DEMO DATA
|
||||
|
||||
// populating the db with seed data
|
||||
installLog("populating the db with seed data");
|
||||
if( $_SESSION['demoData'] != 'no' ){
|
||||
set_time_limit( 301 );
|
||||
|
||||
echo "<br>";
|
||||
echo "<b>{$mod_strings['LBL_PERFORM_DEMO_DATA']}</b>";
|
||||
echo "<br><br>";
|
||||
|
||||
print( $render_table_close );
|
||||
print( $render_table_open );
|
||||
|
||||
$current_user = new User();
|
||||
$current_user->retrieve(1);
|
||||
include("install/populateSeedData.php");
|
||||
}
|
||||
|
||||
$endTime = microtime(true);
|
||||
$deltaTime = $endTime - $startTime;
|
||||
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
//// FINALIZE LANG PACK INSTALL
|
||||
if(isset($_SESSION['INSTALLED_LANG_PACKS']) && is_array($_SESSION['INSTALLED_LANG_PACKS']) && !empty($_SESSION['INSTALLED_LANG_PACKS'])) {
|
||||
updateUpgradeHistory();
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
//// HANDLE SUGAR VERSIONS
|
||||
require_once('modules/Versions/InstallDefaultVersions.php');
|
||||
|
||||
|
||||
|
||||
require_once('modules/Connectors/InstallDefaultConnectors.php');
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//// INSTALL PASSWORD TEMPLATES
|
||||
include('install/seed_data/Advanced_Password_SeedData.php');
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//// SETUP DONE
|
||||
installLog("Installation has completed *********");
|
||||
$memoryUsed = '';
|
||||
if(function_exists('memory_get_usage')) {
|
||||
$memoryUsed = $mod_strings['LBL_PERFORM_OUTRO_5'].memory_get_usage().$mod_strings['LBL_PERFORM_OUTRO_6'];
|
||||
}
|
||||
|
||||
|
||||
$errTcpip = '';
|
||||
$fp = @fsockopen("www.sugarcrm.com", 80, $errno, $errstr, 3);
|
||||
if (!$fp) {
|
||||
$errTcpip = "<p>{$mod_strings['ERR_PERFORM_NO_TCPIP']}</p>";
|
||||
}
|
||||
if ($fp && (!isset( $_SESSION['oc_install']) || $_SESSION['oc_install'] == false)) {
|
||||
@fclose($fp);
|
||||
if ( $next_step == 9999 )
|
||||
$next_step = 8;
|
||||
$fpResult =<<<FP
|
||||
<form action="install.php" method="post" name="form" id="form">
|
||||
<input type="hidden" name="current_step" value="{$next_step}">
|
||||
<table cellspacing="0" cellpadding="0" border="0" class="stdTable">
|
||||
<tr>
|
||||
<td>
|
||||
|
||||
</td>
|
||||
<td><input class="button" type="submit" name="goto" value="{$mod_strings['LBL_NEXT']}" id="button_next2"/></td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
FP;
|
||||
} else {
|
||||
$fpResult =<<<FP
|
||||
<table cellspacing="0" cellpadding="0" border="0" class="stdTable">
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td>
|
||||
<form action="index.php" method="post" name="formFinish" id="formFinish">
|
||||
<input type="hidden" name="default_user_name" value="admin" />
|
||||
<input class="button" type="submit" name="next" value="{$mod_strings['LBL_PERFORM_FINISH']}" id="button_next2"/>
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
FP;
|
||||
}
|
||||
|
||||
if( isset($_SESSION['setup_site_sugarbeet_automatic_checks']) && $_SESSION['setup_site_sugarbeet_automatic_checks'] == true){
|
||||
set_CheckUpdates_config_setting('automatic');
|
||||
}else{
|
||||
set_CheckUpdates_config_setting('manual');
|
||||
}
|
||||
if(!empty($_SESSION['setup_system_name'])){
|
||||
$admin=new Administration();
|
||||
$admin->saveSetting('system','name',$_SESSION['setup_system_name']);
|
||||
}
|
||||
|
||||
|
||||
// Bug 28601 - Set the default list of tabs to show
|
||||
$enabled_tabs = array();
|
||||
$enabled_tabs[] = 'Home';
|
||||
|
||||
$enabled_tabs[] = 'Accounts';
|
||||
$enabled_tabs[] = 'Contacts';
|
||||
$enabled_tabs[] = 'Opportunities';
|
||||
$enabled_tabs[] = 'Leads';
|
||||
$enabled_tabs[] = 'Calendar';
|
||||
$enabled_tabs[] = 'Documents';
|
||||
$enabled_tabs[] = 'Emails';
|
||||
$enabled_tabs[] = 'Campaigns';
|
||||
$enabled_tabs[] = 'Calls';
|
||||
$enabled_tabs[] = 'Meetings';
|
||||
$enabled_tabs[] = 'Tasks';
|
||||
$enabled_tabs[] = 'Notes';
|
||||
$enabled_tabs[] = 'Cases';
|
||||
$enabled_tabs[] = 'Prospects';
|
||||
$enabled_tabs[] = 'ProspectLists';
|
||||
|
||||
|
||||
require_once('modules/MySettings/TabController.php');
|
||||
$tabs = new TabController();
|
||||
$tabs->set_system_tabs($enabled_tabs);
|
||||
|
||||
post_install_modules();
|
||||
if( count( $bottle ) > 0 ){
|
||||
foreach( $bottle as $bottle_message ){
|
||||
$bottleMsg .= "{$bottle_message}\n";
|
||||
}
|
||||
} else {
|
||||
$bottleMsg = $mod_strings['LBL_PERFORM_SUCCESS'];
|
||||
}
|
||||
|
||||
|
||||
|
||||
$out =<<<EOQ
|
||||
<br><p><b>{$mod_strings['LBL_PERFORM_OUTRO_1']} {$setup_sugar_version} {$mod_strings['LBL_PERFORM_OUTRO_2']}</b></p>
|
||||
|
||||
{$mod_strings['LBL_PERFORM_OUTRO_3']} {$deltaTime} {$mod_strings['LBL_PERFORM_OUTRO_4']}<br />
|
||||
{$memoryUsed}
|
||||
{$errTcpip}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="right" colspan="2">
|
||||
<hr>
|
||||
<table cellspacing="0" cellpadding="0" border="0" class="stdTable">
|
||||
<tr>
|
||||
<td>
|
||||
{$fpResult}
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
||||
<!--
|
||||
<bottle>{$bottleMsg}</bottle>
|
||||
-->
|
||||
EOQ;
|
||||
|
||||
echo $out;
|
||||
|
||||
|
||||
?>
|
||||
506
install/populateSeedData.php
Normal file
506
install/populateSeedData.php
Normal file
@@ -0,0 +1,506 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* SugarCRM Community Edition is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2011 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
|
||||
|
||||
|
||||
|
||||
// load the correct demo data and main application language file depending upon the installer language selected; if
|
||||
// it's not found fall back on en_us
|
||||
if(file_exists("include/language/{$current_language}.lang.php")){
|
||||
require_once("include/language/{$current_language}.lang.php");
|
||||
}
|
||||
else {
|
||||
require_once("include/language/en_us.lang.php");
|
||||
}
|
||||
require_once('install/UserDemoData.php');
|
||||
require_once('install/TeamDemoData.php');
|
||||
|
||||
global $sugar_demodata;
|
||||
if(file_exists("install/demoData.{$current_language}.php")){
|
||||
require_once("install/demoData.{$current_language}.php");
|
||||
}
|
||||
else {
|
||||
require_once("install/demoData.en_us.php");
|
||||
}
|
||||
|
||||
$last_name_count = count($sugar_demodata['last_name_array']);
|
||||
$first_name_count = count($sugar_demodata['first_name_array']);
|
||||
$company_name_count = count($sugar_demodata['company_name_array']);
|
||||
$street_address_count = count($sugar_demodata['street_address_array']);
|
||||
$city_array_count = count($sugar_demodata['city_array']);
|
||||
global $app_list_strings;
|
||||
global $sugar_config;
|
||||
$_REQUEST['useEmailWidget'] = "true";
|
||||
if(empty($app_list_strings)) {
|
||||
$app_list_strings = return_app_list_strings_language('en_us');
|
||||
}
|
||||
/*
|
||||
* Seed the random number generator with a fixed constant. This will make all installs of the same code have the same
|
||||
* seed data. This facilitates cross database testing..
|
||||
*/
|
||||
mt_srand(93285903);
|
||||
$db = DBManagerFactory::getInstance();
|
||||
$timedate = TimeDate::getInstance();
|
||||
// Set the max time to one hour (helps Windows load the seed data)
|
||||
ini_set("max_execution_time", "3600");
|
||||
// ensure we have enough memory
|
||||
$memory_needed = 256;
|
||||
$memory_limit = ini_get('memory_limit');
|
||||
if( $memory_limit != "" && $memory_limit != "-1" ){ // if memory_limit is set
|
||||
rtrim($memory_limit, 'M');
|
||||
$memory_limit_int = (int) $memory_limit;
|
||||
if( $memory_limit_int < $memory_needed ){
|
||||
ini_set("memory_limit", "$memory_needed" . "M");
|
||||
}
|
||||
}
|
||||
$large_scale_test = empty($sugar_config['large_scale_test']) ?
|
||||
false : $sugar_config['large_scale_test'];
|
||||
|
||||
$seed_user = new User();
|
||||
$user_demo_data = new UserDemoData($seed_user, $large_scale_test);
|
||||
$user_demo_data->create_demo_data();
|
||||
$number_contacts = 200;
|
||||
$number_companies = 50;
|
||||
$number_leads = 200;
|
||||
$large_scale_test = empty($sugar_config['large_scale_test']) ? false : $sugar_config['large_scale_test'];
|
||||
// If large scale test is set to true, increase the seed data.
|
||||
if($large_scale_test) {
|
||||
// increase the cuttoff time to 1 hour
|
||||
ini_set("max_execution_time", "3600");
|
||||
$number_contacts = 100000;
|
||||
$number_companies = 15000;
|
||||
$number_leads = 100000;
|
||||
}
|
||||
|
||||
|
||||
$possible_duration_hours_arr = array( 0, 1, 2, 3);
|
||||
$possible_duration_minutes_arr = array('00' => '00','15' => '15', '30' => '30', '45' => '45');
|
||||
$account_ids = Array();
|
||||
$accounts = Array();
|
||||
$opportunity_ids = Array();
|
||||
|
||||
// Determine the assigned user for all demo data. This is the default user if set, or admin
|
||||
$assigned_user_name = "admin";
|
||||
if(!empty($sugar_config['default_user_name']) &&
|
||||
!empty($sugar_config['create_default_user']) &&
|
||||
$sugar_config['create_default_user'])
|
||||
{
|
||||
$assigned_user_name = $sugar_config['default_user_name'];
|
||||
}
|
||||
|
||||
// Look up the user id for the assigned user
|
||||
$seed_user = new User();
|
||||
$assigned_user_id = $seed_user->retrieve_user_id($assigned_user_name);
|
||||
$patterns[] = '/ /';
|
||||
$patterns[] = '/\./';
|
||||
$patterns[] = '/&/';
|
||||
$patterns[] = '/\//';
|
||||
$replacements[] = '';
|
||||
$replacements[] = '';
|
||||
$replacements[] = '';
|
||||
$replacements[] = '';
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//// ACCOUNTS
|
||||
|
||||
for($i = 0; $i < $number_companies; $i++) {
|
||||
$account_name = $sugar_demodata['company_name_array'][mt_rand(0,$company_name_count-1)];
|
||||
// Create new accounts.
|
||||
$account = new Account();
|
||||
$account->name = $account_name;
|
||||
$account->phone_office = create_phone_number();
|
||||
$account->assigned_user_id = $assigned_user_id;
|
||||
$account->emailAddress->addAddress(createEmailAddress(), true);
|
||||
$account->emailAddress->addAddress(createEmailAddress());
|
||||
$account->website = createWebAddress();
|
||||
$account->billing_address_street = $sugar_demodata['street_address_array'][mt_rand(0,$street_address_count-1)];
|
||||
$account->billing_address_city = $sugar_demodata['city_array'][mt_rand(0,$city_array_count-1)];
|
||||
if($i % 3 == 1) {
|
||||
$account->billing_address_state = "NY";
|
||||
$assigned_user_id = mt_rand(9,10);
|
||||
if($assigned_user_id == 9) {
|
||||
$account->assigned_user_name = "seed_will";
|
||||
$account->assigned_user_id = $account->assigned_user_name."_id";
|
||||
} else {
|
||||
$account->assigned_user_name = "seed_chris";
|
||||
$account->assigned_user_id = $account->assigned_user_name."_id";
|
||||
}
|
||||
|
||||
$account->assigned_user_id = $account->assigned_user_name."_id";
|
||||
} else {
|
||||
$account->billing_address_state = "CA";
|
||||
$assigned_user_id = mt_rand(6,8);
|
||||
if($assigned_user_id == 6) {
|
||||
$account->assigned_user_name = "seed_sarah";
|
||||
} elseif($assigned_user_id == 7) {
|
||||
$account->assigned_user_name = "seed_sally";
|
||||
} else {
|
||||
$account->assigned_user_name = "seed_max";
|
||||
}
|
||||
|
||||
$account->assigned_user_id = $account->assigned_user_name."_id";
|
||||
}
|
||||
|
||||
$account->billing_address_postalcode = mt_rand(10000, 99999);
|
||||
$account->billing_address_country = 'USA';
|
||||
$account->shipping_address_street = $account->billing_address_street;
|
||||
$account->shipping_address_city = $account->billing_address_city;
|
||||
$account->shipping_address_state = $account->billing_address_state;
|
||||
$account->shipping_address_postalcode = $account->billing_address_postalcode;
|
||||
$account->shipping_address_country = $account->billing_address_country;
|
||||
$account->industry = array_rand($app_list_strings['industry_dom']);
|
||||
$account->account_type = "Customer";
|
||||
$account->save();
|
||||
$account_ids[] = $account->id;
|
||||
$accounts[] = $account;
|
||||
|
||||
// Create a case for the account
|
||||
$case = new aCase();
|
||||
$case->account_id = $account->id;
|
||||
$case->priority = array_rand($app_list_strings['case_priority_dom']);
|
||||
$case->status = array_rand($app_list_strings['case_status_dom']);
|
||||
$case->name = $sugar_demodata['case_seed_names'][mt_rand(0,4)];
|
||||
$case->assigned_user_id = $account->assigned_user_id;
|
||||
$case->assigned_user_name = $account->assigned_user_name;
|
||||
$case->save();
|
||||
|
||||
// Create a bug for the account
|
||||
$bug = new Bug();
|
||||
$bug->account_id = $account->id;
|
||||
$bug->priority = array_rand($app_list_strings['bug_priority_dom']);
|
||||
$bug->status = array_rand($app_list_strings['bug_status_dom']);
|
||||
$bug->name = $sugar_demodata['bug_seed_names'][mt_rand(0,4)];
|
||||
$bug->assigned_user_id = $account->assigned_user_id;
|
||||
$bug->assigned_user_name = $account->assigned_user_name;
|
||||
$bug->save();
|
||||
|
||||
$note = new Note();
|
||||
$note->parent_type = 'Accounts';
|
||||
$note->parent_id = $account->id;
|
||||
$seed_data_index = mt_rand(0,3);
|
||||
$note->name = $sugar_demodata['note_seed_names_and_Descriptions'][$seed_data_index][0];
|
||||
$note->description = $sugar_demodata['note_seed_names_and_Descriptions'][$seed_data_index][1];
|
||||
$note->assigned_user_id = $account->assigned_user_id;
|
||||
$note->assigned_user_name = $account->assigned_user_name;
|
||||
$note->save();
|
||||
|
||||
$call = new Call();
|
||||
$call->parent_type = 'Accounts';
|
||||
$call->parent_id = $account->id;
|
||||
$call->name = $sugar_demodata['call_seed_data_names'][mt_rand(0,3)];
|
||||
$call->assigned_user_id = $account->assigned_user_id;
|
||||
$call->assigned_user_name = $account->assigned_user_name;
|
||||
$call->direction='Outbound';
|
||||
$call->date_start = create_date(). ' ' . create_time();
|
||||
$call->duration_hours='0';
|
||||
$call->duration_minutes='30';
|
||||
$call->account_id =$account->id;
|
||||
$call->status='Planned';
|
||||
$call->save();
|
||||
|
||||
//Create new opportunities
|
||||
$opp = new Opportunity();
|
||||
$opp->assigned_user_id = $account->assigned_user_id;
|
||||
$opp->assigned_user_name = $account->assigned_user_name;
|
||||
$opp->name = substr($account_name." - 1000 units", 0, 50);
|
||||
$opp->date_closed = create_date();
|
||||
$opp->lead_source = array_rand($app_list_strings['lead_source_dom']);
|
||||
$opp->sales_stage = array_rand($app_list_strings['sales_stage_dom']);
|
||||
// If the deal is already one, make the date closed occur in the past.
|
||||
if($opp->sales_stage == "Closed Won" || $opp->sales_stage == "Closed Lost")
|
||||
{
|
||||
$opp->date_closed = create_past_date();
|
||||
}
|
||||
$opp->opportunity_type = array_rand($app_list_strings['opportunity_type_dom']);
|
||||
$amount = array("10000", "25000", "50000", "75000");
|
||||
$key = array_rand($amount);
|
||||
$opp->amount = $amount[$key];
|
||||
$probability = array("10", "70", "40", "60");
|
||||
$key = array_rand($probability);
|
||||
$opp->probability = $probability[$key];
|
||||
$opp->save();
|
||||
$opportunity_ids[] = $opp->id;
|
||||
// Create a linking table entry to assign an account to the opportunity.
|
||||
$opp->set_relationship('accounts_opportunities', array('opportunity_id'=>$opp->id ,'account_id'=> $account->id), false);
|
||||
|
||||
}
|
||||
|
||||
$titles = $sugar_demodata['titles'];
|
||||
$account_max = count($account_ids) - 1;
|
||||
$first_name_max = $first_name_count - 1;
|
||||
$last_name_max = $last_name_count - 1;
|
||||
$street_address_max = $street_address_count - 1;
|
||||
$city_array_max = $city_array_count - 1;
|
||||
$lead_source_max = count($app_list_strings['lead_source_dom']) - 1;
|
||||
$lead_status_max = count($app_list_strings['lead_status_dom']) - 1;
|
||||
$title_max = count($titles) - 1;
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//// DEMO CONTACTS
|
||||
for($i=0; $i<$number_contacts; $i++) {
|
||||
$contact = new Contact();
|
||||
$contact->first_name = $sugar_demodata['first_name_array'][mt_rand(0,$first_name_max)];
|
||||
$contact->last_name = $sugar_demodata['last_name_array'][mt_rand(0,$last_name_max)];
|
||||
$contact->assigned_user_id = $account->assigned_user_id;
|
||||
$contact->primary_address_street = $sugar_demodata['street_address_array'][mt_rand(0,$street_address_max)];
|
||||
$contact->primary_address_city = $sugar_demodata['city_array'][mt_rand(0,$city_array_max)];
|
||||
$contact->lead_source = array_rand($app_list_strings['lead_source_dom']);
|
||||
$contact->title = $titles[mt_rand(0,$title_max)];
|
||||
$contact->emailAddress->addAddress(createEmailAddress(), true, true);
|
||||
$contact->emailAddress->addAddress(createEmailAddress(), false, false, false, true);
|
||||
$assignedUser = new User();
|
||||
$assignedUser->retrieve($contact->assigned_user_id);
|
||||
$contact->assigned_user_id = $assigned_user_id;
|
||||
$contact->email1 = createEmailAddress();
|
||||
$key = array_rand($sugar_demodata['street_address_array']);
|
||||
$contact->primary_address_street = $sugar_demodata['street_address_array'][$key];
|
||||
$key = array_rand($sugar_demodata['city_array']);
|
||||
$contact->primary_address_city = $sugar_demodata['city_array'][$key];
|
||||
$contact->lead_source = array_rand($app_list_strings['lead_source_dom']);
|
||||
$contact->title = $titles[array_rand($titles)];
|
||||
$contact->phone_work = create_phone_number();
|
||||
$contact->phone_home = create_phone_number();
|
||||
$contact->phone_mobile = create_phone_number();
|
||||
$account_number = mt_rand(0,$account_max);
|
||||
$account_id = $account_ids[$account_number];
|
||||
// Fill in a bogus address
|
||||
$contacts_account = $accounts[$account_number];
|
||||
$contact->primary_address_state = $contacts_account->billing_address_state;
|
||||
$contact->assigned_user_id = $contacts_account->assigned_user_id;
|
||||
$contact->assigned_user_name = $contacts_account->assigned_user_name;
|
||||
$contact->primary_address_postalcode = mt_rand(10000,99999);
|
||||
$contact->primary_address_country = 'USA';
|
||||
$contact->save();
|
||||
// Create a linking table entry to assign an account to the contact.
|
||||
$contact->set_relationship('accounts_contacts', array('contact_id'=>$contact->id ,'account_id'=> $account_id), false);
|
||||
// This assumes that there will be one opportunity per company in the seed data.
|
||||
$opportunity_key = array_rand($opportunity_ids);
|
||||
$contact->set_relationship('opportunities_contacts', array('contact_id'=>$contact->id ,'opportunity_id'=> $opportunity_ids[$opportunity_key], 'contact_role'=>$app_list_strings['opportunity_relationship_type_default_key']), false);
|
||||
|
||||
//Create new tasks
|
||||
$task = new Task();
|
||||
$key = array_rand($sugar_demodata['task_seed_data_names']);
|
||||
$task->name = $sugar_demodata['task_seed_data_names'][$key];
|
||||
//separate date and time field have been merged into one.
|
||||
$task->date_due = create_date() . ' ' . create_time();
|
||||
$task->date_due_flag = 0;
|
||||
$task->assigned_user_id = $contacts_account->assigned_user_id;
|
||||
$task->assigned_user_name = $contacts_account->assigned_user_name;
|
||||
$task->priority = array_rand($app_list_strings['task_priority_dom']);
|
||||
$task->status = array_rand($app_list_strings['task_status_dom']);
|
||||
$task->contact_id = $contact->id;
|
||||
if ($contact->primary_address_city == "San Mateo") {
|
||||
$task->parent_id = $account_id;
|
||||
$task->parent_type = 'Accounts';
|
||||
}
|
||||
$task->save();
|
||||
|
||||
//Create new meetings
|
||||
$meeting = new Meeting();
|
||||
$key = array_rand($sugar_demodata['meeting_seed_data_names']);
|
||||
$meeting->name = $sugar_demodata['meeting_seed_data_names'][$key];
|
||||
$meeting->date_start = create_date(). ' ' . create_time();
|
||||
//$meeting->time_start = date("H:i",time());
|
||||
$meeting->duration_hours = array_rand($possible_duration_hours_arr);
|
||||
$meeting->duration_minutes = array_rand($possible_duration_minutes_arr);
|
||||
$meeting->assigned_user_id = $assigned_user_id;
|
||||
$meeting->assigned_user_id = $contacts_account->assigned_user_id;
|
||||
$meeting->assigned_user_name = $contacts_account->assigned_user_name;
|
||||
$meeting->description = $sugar_demodata['meeting_seed_data_descriptions'];
|
||||
$meeting->status = array_rand($app_list_strings['meeting_status_dom']);
|
||||
$meeting->contact_id = $contact->id;
|
||||
$meeting->parent_id = $account_id;
|
||||
$meeting->parent_type = 'Accounts';
|
||||
// dont update vcal
|
||||
$meeting->update_vcal = false;
|
||||
$meeting->save();
|
||||
// leverage the seed user to set the acceptance status on the meeting.
|
||||
$seed_user->id = $meeting->assigned_user_id;
|
||||
$meeting->set_accept_status($seed_user,'accept');
|
||||
|
||||
//Create new emails
|
||||
$email = new Email();
|
||||
$key = array_rand($sugar_demodata['email_seed_data_subjects']);
|
||||
$email->name = $sugar_demodata['email_seed_data_subjects'][$key];
|
||||
$email->date_start = create_date();
|
||||
$email->time_start = create_time();
|
||||
$email->duration_hours = array_rand($possible_duration_hours_arr);
|
||||
$email->duration_minutes = array_rand($possible_duration_minutes_arr);
|
||||
$email->assigned_user_id = $assigned_user_id;
|
||||
$email->assigned_user_id = $contacts_account->assigned_user_id;
|
||||
$email->assigned_user_name = $contacts_account->assigned_user_name;
|
||||
$email->description = $sugar_demodata['email_seed_data_descriptions'];
|
||||
$email->status = 'sent';
|
||||
$email->parent_id = $account_id;
|
||||
$email->parent_type = 'Accounts';
|
||||
$email->to_addrs = $contact->emailAddress->getPrimaryAddress($contact);
|
||||
$email->from_addr = $assignedUser->emailAddress->getPrimaryAddress($assignedUser);
|
||||
$email->from_addr_name = $email->from_addr;
|
||||
$email->to_addrs_names = $email->to_addrs;
|
||||
$email->type = 'out';
|
||||
$email->save();
|
||||
$email->load_relationship('contacts');
|
||||
$email->contacts->add($contact);
|
||||
$email->load_relationship('accounts');
|
||||
$email->accounts->add($contacts_account);
|
||||
}
|
||||
|
||||
for($i=0; $i<$number_leads; $i++)
|
||||
{
|
||||
$lead = new Lead();
|
||||
$lead->account_name = $sugar_demodata['company_name_array'][mt_rand(0,$company_name_count-1)];
|
||||
$lead->first_name = $sugar_demodata['first_name_array'][mt_rand(0,$first_name_max)];
|
||||
$lead->last_name = $sugar_demodata['last_name_array'][mt_rand(0,$last_name_max)];
|
||||
$lead->primary_address_street = $sugar_demodata['street_address_array'][mt_rand(0,$street_address_max)];
|
||||
$lead->primary_address_city = $sugar_demodata['city_array'][mt_rand(0,$city_array_max)];
|
||||
$lead->lead_source = array_rand($app_list_strings['lead_source_dom']);
|
||||
$lead->title = $sugar_demodata['titles'][mt_rand(0,$title_max)];
|
||||
$lead->phone_work = create_phone_number();
|
||||
$lead->phone_home = create_phone_number();
|
||||
$lead->phone_mobile = create_phone_number();
|
||||
$lead->emailAddress->addAddress(createEmailAddress(), true);
|
||||
// Fill in a bogus address
|
||||
$lead->primary_address_state = $sugar_demodata['primary_address_state'];
|
||||
$leads_account = $accounts[$account_number];
|
||||
$lead->primary_address_state = $leads_account->billing_address_state;
|
||||
$lead->status = array_rand($app_list_strings['lead_status_dom']);
|
||||
$lead->lead_source = array_rand($app_list_strings['lead_source_dom']);
|
||||
if($i % 3 == 1)
|
||||
{
|
||||
$lead->billing_address_state = $sugar_demodata['billing_address_state']['east'];
|
||||
$assigned_user_id = mt_rand(9,10);
|
||||
if($assigned_user_id == 9)
|
||||
{
|
||||
$lead->assigned_user_name = "seed_will";
|
||||
$lead->assigned_user_id = $lead->assigned_user_name."_id";
|
||||
}
|
||||
else
|
||||
{
|
||||
$lead->assigned_user_name = "seed_chris";
|
||||
$lead->assigned_user_id = $lead->assigned_user_name."_id";
|
||||
}
|
||||
|
||||
$lead->assigned_user_id = $lead->assigned_user_name."_id";
|
||||
}
|
||||
else
|
||||
{
|
||||
$lead->billing_address_state = $sugar_demodata['billing_address_state']['west'];
|
||||
$assigned_user_id = mt_rand(6,8);
|
||||
if($assigned_user_id == 6)
|
||||
{
|
||||
$lead->assigned_user_name = "seed_sarah";
|
||||
}
|
||||
else if($assigned_user_id == 7)
|
||||
{
|
||||
$lead->assigned_user_name = "seed_sally";
|
||||
}
|
||||
else
|
||||
{
|
||||
$lead->assigned_user_name = "seed_max";
|
||||
}
|
||||
|
||||
$lead->assigned_user_id = $lead->assigned_user_name."_id";
|
||||
}
|
||||
|
||||
|
||||
// If this is a large scale test, switch to the bulk teams 90% of the time.
|
||||
if ($large_scale_test)
|
||||
{
|
||||
if(mt_rand(0,100) < 90) {
|
||||
$assigned_team = $team_demo_data->get_random_team();
|
||||
$lead->assigned_user_name = $assigned_team;
|
||||
} else {
|
||||
}
|
||||
}
|
||||
$lead->primary_address_postalcode = mt_rand(10000,99999);
|
||||
$lead->primary_address_country = $sugar_demodata['primary_address_country'];
|
||||
$lead->save();
|
||||
}
|
||||
|
||||
|
||||
///
|
||||
/// SEED DATA FOR EMAIL TEMPLATES
|
||||
///
|
||||
if(!empty($sugar_demodata['emailtemplates_seed_data'])) {
|
||||
foreach($sugar_demodata['emailtemplates_seed_data'] as $v){
|
||||
$EmailTemp = new EmailTemplate();
|
||||
$EmailTemp->name = $v['name'];
|
||||
$EmailTemp->description = $v['description'];
|
||||
$EmailTemp->subject = $v['subject'];
|
||||
$EmailTemp->body = $v['text_body'];
|
||||
$EmailTemp->body_html = $v['body'];
|
||||
$EmailTemp->deleted = 0;
|
||||
$EmailTemp->published = 'off';
|
||||
$EmailTemp->text_only = 0;
|
||||
$id =$EmailTemp->save();
|
||||
}
|
||||
}
|
||||
///
|
||||
/// SEED DATA FOR PROJECT AND PROJECT TASK
|
||||
///
|
||||
include_once('modules/Project/Project.php');
|
||||
include_once('modules/ProjectTask/ProjectTask.php');
|
||||
// Project: Audit Plan
|
||||
$project = new Project();
|
||||
$project->name = $sugar_demodata['project_seed_data']['audit']['name'];
|
||||
$project->description = $sugar_demodata['project_seed_data']['audit']['description'];
|
||||
$project->assigned_user_id = 1;
|
||||
$project->estimated_start_date = $sugar_demodata['project_seed_data']['audit']['estimated_start_date'];
|
||||
$project->estimated_end_date = $sugar_demodata['project_seed_data']['audit']['estimated_end_date'];
|
||||
$project->status = $sugar_demodata['project_seed_data']['audit']['status'];
|
||||
$project->priority = $sugar_demodata['project_seed_data']['audit']['priority'];
|
||||
$audit_plan_id = $project->save();
|
||||
|
||||
$project_task_id_counter = 1; // all the project task IDs cannot be 1, so using couter
|
||||
foreach($sugar_demodata['project_seed_data']['audit']['project_tasks'] as $v){
|
||||
$project_task = new ProjectTask();
|
||||
$project_task->assigned_user_id = 1;
|
||||
$project_task->name = $v['name'];
|
||||
$project_task->date_start = $v['date_start'];
|
||||
$project_task->date_finish = $v['date_finish'];
|
||||
$project_task->project_id = $audit_plan_id;
|
||||
$project_task->project_task_id = $project_task_id_counter;
|
||||
$project_task->description = $v['description'];
|
||||
$project_task->duration = $v['duration'];
|
||||
$project_task->duration_unit = $v['duration_unit'];
|
||||
$project_task->percent_complete = $v['percent_complete'];
|
||||
$communicate_stakeholders_id = $project_task->save();
|
||||
|
||||
$project_task_id_counter++;
|
||||
}
|
||||
|
||||
|
||||
?>
|
||||
166
install/ready.php
Normal file
166
install/ready.php
Normal file
@@ -0,0 +1,166 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* SugarCRM Community Edition is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2011 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
|
||||
|
||||
|
||||
|
||||
if( !isset( $install_script ) || !$install_script ){
|
||||
die($mod_strings['ERR_NO_DIRECT_SCRIPT']);
|
||||
}
|
||||
// $mod_strings come from calling page.
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//// START OUTPUT
|
||||
|
||||
|
||||
$out = <<<EOQ
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||
<title>{$mod_strings['LBL_WIZARD_TITLE']} {$mod_strings['LBL_TITLE_ARE_YOU_READY']}</title>
|
||||
<link REL="SHORTCUT ICON" HREF="include/images/sugar_icon.ico">
|
||||
<link rel="stylesheet" href="install/install.css" type="text/css">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<form action="install.php" method="post" name="form" id="form">
|
||||
<table cellspacing="0" cellpadding="0" border="0" align="center" class="shell">
|
||||
<tr><td colspan="2" id="help"><a href="{$help_url}" target='_blank'>{$mod_strings['LBL_HELP']} </a></td></tr>
|
||||
<tr>
|
||||
<th id="title" width="500">
|
||||
<p>
|
||||
<img src="{$sugar_md}" alt="SugarCRM" border="0">
|
||||
</p>
|
||||
</th>
|
||||
<th width="200" height="30" style="text-align: right;"><a href="http://www.sugarcrm.com" target=
|
||||
"_blank"><IMG src="include/images/sugarcrm_login.png" width="145" height="30" alt="SugarCRM" border="0"></a>
|
||||
</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" id="ready">{$mod_strings['LBL_TITLE_ARE_YOU_READY']} </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<p><strong>{$mod_strings['LBL_WELCOME_PLEASE_READ_BELOW']}</strong></p>
|
||||
|
||||
<table width="100%" cellpadding="0" cellpadding="0" border="0" class="Welcome">
|
||||
<tr>
|
||||
<th>
|
||||
<span onclick="showtime('sys_comp');" style="cursor:pointer;cursor:hand">
|
||||
<span id='basic_sys_comp'><img src="themes/default/images/basic_search.gif" border="0"></span>
|
||||
<span id='adv_sys_comp' style='display:none'><img src="themes/default/images/advanced_search.gif" border="0"></span>
|
||||
{$mod_strings['REQUIRED_SYS_COMP']}
|
||||
</span>
|
||||
</th>
|
||||
</tr>
|
||||
<td>
|
||||
<div id='sys_comp' >{$mod_strings['REQUIRED_SYS_COMP_MSG']}</div>
|
||||
</td>
|
||||
</table>
|
||||
|
||||
<table width="100%" cellpadding="0" cellpadding="0" border="0" class="Welcome">
|
||||
<tr>
|
||||
<th>
|
||||
<span onclick="showtime('sys_check');" style="cursor:pointer;cursor:hand">
|
||||
<span id='basic_sys_check'><img src="themes/default/images/basic_search.gif" border="0"></span>
|
||||
<span id='adv_sys_check' style='display:none'><img src="themes/default/images/advanced_search.gif" border="0"></span>
|
||||
{$mod_strings['REQUIRED_SYS_CHK']}
|
||||
</span>
|
||||
</th>
|
||||
</tr>
|
||||
<td>
|
||||
<div id='sys_check' >{$mod_strings['REQUIRED_SYS_CHK_MSG']}</div>
|
||||
</td>
|
||||
</table>
|
||||
|
||||
<table width="100%" cellpadding="0" cellpadding="0" border="0" class="Welcome">
|
||||
<tr>
|
||||
<th>
|
||||
<span onclick="showtime('installType');" style="cursor:pointer;cursor:hand">
|
||||
<span id='basic_installType'><img src="themes/default/images/basic_search.gif" border="0"></span>
|
||||
<span id='adv_installType' style='display:none'><img src="themes/default/images/advanced_search.gif" border="0"></span>
|
||||
{$mod_strings['REQUIRED_INSTALLTYPE']}
|
||||
</span>
|
||||
</th>
|
||||
</tr>
|
||||
<td>
|
||||
<div id='installType' >{$mod_strings['REQUIRED_INSTALLTYPE_MSG']}</div>
|
||||
</td>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td align="right" colspan="2" height="20">
|
||||
<hr>
|
||||
<table cellspacing="0" cellpadding="0" border="0" class="stdTable">
|
||||
<tr>
|
||||
<td>
|
||||
<input type="hidden" name="current_step" value="{$next_step}">
|
||||
</td>
|
||||
<td>
|
||||
<input class="acceptButton" type="button" name="goto" value="{$mod_strings['LBL_BACK']}" id="button_back_ready" onclick="document.getElementById('form').submit();" />
|
||||
<input class="button" type="submit" name="goto" value="{$mod_strings['LBL_NEXT']}" id="button_next2" />
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
<script>
|
||||
function showtime(div){
|
||||
|
||||
if(document.getElementById(div).style.display == ''){
|
||||
document.getElementById(div).style.display = 'none';
|
||||
document.getElementById('adv_'+div).style.display = '';
|
||||
document.getElementById('basic_'+div).style.display = 'none';
|
||||
}else{
|
||||
document.getElementById(div).style.display = '';
|
||||
document.getElementById('adv_'+div).style.display = 'none';
|
||||
document.getElementById('basic_'+div).style.display = '';
|
||||
}
|
||||
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
EOQ;
|
||||
echo $out;
|
||||
?>
|
||||
82
install/register.js
Normal file
82
install/register.js
Normal file
@@ -0,0 +1,82 @@
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
|
||||
|
||||
function submitbutton()
|
||||
{
|
||||
var form = document.mosForm;
|
||||
var r = new RegExp("[^0-9A-Za-z]", "i");
|
||||
|
||||
if (form.email1.value != "")
|
||||
{
|
||||
var myString = form.email1.value;
|
||||
var pattern = /(\W)|(_)/g;
|
||||
var adate = new Date();
|
||||
var ms = adate.getMilliseconds();
|
||||
var sec = adate.getSeconds();
|
||||
var mins = adate.getMinutes();
|
||||
ms = ms.toString();
|
||||
sec = sec.toString();
|
||||
mins = mins.toString();
|
||||
newdate = ms + sec + mins;
|
||||
|
||||
var newString = myString.replace(pattern,"");
|
||||
newString = newString + newdate;
|
||||
//form.username.value = newString;
|
||||
//form.password.value = newString;
|
||||
//form.password2.value = newString;
|
||||
}
|
||||
|
||||
// do field validation
|
||||
if (form.name.value == "")
|
||||
{
|
||||
form.name.focus();
|
||||
alert( "Please provide your name" );
|
||||
return false;
|
||||
}
|
||||
else if (form.email1.value == "")
|
||||
{
|
||||
form.email1.focus();
|
||||
alert( "Please provide your email address" );
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
form.submit();
|
||||
}
|
||||
|
||||
document.appform.submit();
|
||||
window.focus();
|
||||
}
|
||||
139
install/register.php
Normal file
139
install/register.php
Normal file
@@ -0,0 +1,139 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* SugarCRM Community Edition is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2011 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
|
||||
|
||||
|
||||
$suicide = true;
|
||||
if(isset($install_script)) {
|
||||
if($install_script) {
|
||||
$suicide = false;
|
||||
}
|
||||
}
|
||||
|
||||
if($suicide) {
|
||||
// mysterious suicide note
|
||||
die($mod_strings['ERR_NO_DIRECT_SCRIPT']);
|
||||
}
|
||||
|
||||
|
||||
if (!isset($_POST['confirm']) || !$_POST['confirm']) {
|
||||
include("sugar_version.php"); // provide $sugar_flavor
|
||||
global $sugar_config;
|
||||
$ik = '';
|
||||
if(isset($sugar_config['unique_key']) && !empty($sugar_config['unique_key']) ){
|
||||
$ik = $sugar_config['unique_key'];
|
||||
}
|
||||
|
||||
//$regPhp = file_get_contents("http://www.sugarcrm.com/product-registration/registration_php.php?edition={$sugar_flavor}&instance_key=".$ik);
|
||||
//changing the reg form. placing in an iframe
|
||||
/*
|
||||
$regPhp="<iframe src='https://www.sugarcrm.com/product-registration/
|
||||
registration_php_080428.php?edition={$sugar_flavor}&instance_key=
|
||||
{$ik}' height='400px' width='700px' frameborder='0' scrolling='no'
|
||||
allowtransparency='true'</iframe>";
|
||||
*/
|
||||
$regPhp="<iframe src='https://www.sugarcrm.com/product-registration/registration_php_080428.php?edition={$sugar_flavor}&instance_key=
|
||||
{$ik}' height='515px' width='700px' frameborder='0' scrolling='no'
|
||||
allowtransparency='true'></iframe>";
|
||||
|
||||
|
||||
$notConfirmed =<<<CONF
|
||||
<!-- <p>{$mod_strings['LBL_REG_CONF_1']}</p> -->
|
||||
<!-- begin registration -->
|
||||
{$regPhp}
|
||||
<!-- end registration -->
|
||||
CONF;
|
||||
|
||||
} else {
|
||||
$notConfirmed = $mod_strings['LBL_REG_CONF_3'];
|
||||
}
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//// START OUTPUT
|
||||
|
||||
$out =<<<EOQ
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<meta http-equiv="Content-Script-Type" content="text/javascript">
|
||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||
<title>{$mod_strings['LBL_WIZARD_TITLE']} {$mod_strings['LBL_REG_TITLE']}</title>
|
||||
<link REL="SHORTCUT ICON" HREF="$icon">
|
||||
<link rel="stylesheet" href="$css" type="text/css" />
|
||||
<script type="text/javascript" src="$common"></script>
|
||||
</head>
|
||||
<body onload="javascript:document.getElementById('button_next2').focus();">
|
||||
<table cellspacing="0" cellpadding="0" border="0" align="center" class="shell">
|
||||
<tr><td colspan="2" id="help"> </td></tr>
|
||||
<tr>
|
||||
<th width="500">
|
||||
<p>
|
||||
<img src="{$sugar_md}" alt="SugarCRM" border="0">
|
||||
</p>
|
||||
{$mod_strings['LBL_REG_TITLE']} <span style="font-size: 9px;"> (Optional)</span></th>
|
||||
<th width="200" style="text-align: right;"><a href="http://www.sugarcrm.com" target="_blank"><IMG src="$loginImage" width="145" height="30" alt="SugarCRM" border="0"></a></th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2">{$notConfirmed}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="right" colspan="2">
|
||||
<hr>
|
||||
<table cellspacing="0" cellpadding="0" border="0" class="stdTable">
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td>
|
||||
<form action="index.php" method="post" name="appform" id="appform">
|
||||
<input type="hidden" name="default_user_name" value="admin">
|
||||
<input class="button" type="submit" name="next" value="{$mod_strings['LBL_NEXT']}" id="button_next2"/>
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<br>
|
||||
</body>
|
||||
</html>
|
||||
EOQ;
|
||||
|
||||
echo $out;
|
||||
|
||||
?>
|
||||
83
install/seed_data/Advanced_Password_SeedData.php
Normal file
83
install/seed_data/Advanced_Password_SeedData.php
Normal file
@@ -0,0 +1,83 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
|
||||
/*********************************************************************************
|
||||
* SugarCRM Community Edition is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2011 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
|
||||
require('config.php');
|
||||
global $sugar_config;
|
||||
global $timedate;
|
||||
global $mod_strings;
|
||||
|
||||
//Sent when the admin generate a new password
|
||||
$EmailTemp = new EmailTemplate();
|
||||
$EmailTemp->name = $mod_strings['advanced_password_new_account_email']['name'];
|
||||
$EmailTemp->description = $mod_strings['advanced_password_new_account_email']['description'];
|
||||
$EmailTemp->subject = $mod_strings['advanced_password_new_account_email']['subject'];
|
||||
$EmailTemp->body = $mod_strings['advanced_password_new_account_email']['txt_body'];
|
||||
$EmailTemp->body_html = $mod_strings['advanced_password_new_account_email']['body'];
|
||||
$EmailTemp->deleted = 0;
|
||||
$EmailTemp->published = 'off';
|
||||
$EmailTemp->text_only = 0;
|
||||
$id =$EmailTemp->save();
|
||||
$sugar_config['passwordsetting']['generatepasswordtmpl'] = $id;
|
||||
|
||||
//User generate a link to set a new password
|
||||
$EmailTemp = new EmailTemplate();
|
||||
$EmailTemp->name = $mod_strings['advanced_password_forgot_password_email']['name'];
|
||||
$EmailTemp->description = $mod_strings['advanced_password_forgot_password_email']['description'];
|
||||
$EmailTemp->subject = $mod_strings['advanced_password_forgot_password_email']['subject'];
|
||||
$EmailTemp->body = $mod_strings['advanced_password_forgot_password_email']['txt_body'];
|
||||
$EmailTemp->body_html = $mod_strings['advanced_password_forgot_password_email']['body'];
|
||||
$EmailTemp->deleted = 0;
|
||||
$EmailTemp->published = 'off';
|
||||
$EmailTemp->text_only = 0;
|
||||
$id =$EmailTemp->save();
|
||||
$sugar_config['passwordsetting']['lostpasswordtmpl'] = $id;
|
||||
|
||||
// set all other default settings
|
||||
$sugar_config['passwordsetting']['forgotpasswordON'] = true;
|
||||
$sugar_config['passwordsetting']['SystemGeneratedPasswordON'] = true;
|
||||
$sugar_config['passwordsetting']['systexpirationtime'] = 7;
|
||||
$sugar_config['passwordsetting']['systexpiration'] = 1;
|
||||
$sugar_config['passwordsetting']['linkexpiration'] = true;
|
||||
$sugar_config['passwordsetting']['linkexpirationtime'] = 24;
|
||||
$sugar_config['passwordsetting']['linkexpirationtype'] = 60;
|
||||
$sugar_config['passwordsetting']['minpwdlength'] = 6;
|
||||
$sugar_config['passwordsetting']['oneupper'] = true;
|
||||
$sugar_config['passwordsetting']['onelower'] = true;
|
||||
$sugar_config['passwordsetting']['onenumber'] = true;
|
||||
|
||||
write_array_to_file( "sugar_config", $sugar_config, "config.php");
|
||||
174
install/seed_data/quotes_SeedData.php
Normal file
174
install/seed_data/quotes_SeedData.php
Normal file
@@ -0,0 +1,174 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* SugarCRM Community Edition is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2011 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
|
||||
|
||||
|
||||
require_once('modules/Quotes/Quote.php');
|
||||
require_once('modules/ProductBundleNotes/ProductBundleNote.php');
|
||||
require_once('modules/Products/Product.php');
|
||||
|
||||
global $current_user;
|
||||
global $sugar_demodata;
|
||||
|
||||
if(!empty($sugar_demodata['quotes_seed_data']['quotes'])) {
|
||||
|
||||
foreach($sugar_demodata['quotes_seed_data']['quotes'] as $key=>$quote) {
|
||||
|
||||
$focus = new Quote();
|
||||
$focus->id = create_guid();
|
||||
$focus->new_with_id = true;
|
||||
$focus->name = $quote['name'];
|
||||
$focus->description = !empty($quote['description']) ? $quote['description'] : '';
|
||||
$focus->quote_stage = !empty($quote['quote_stage']) ? $quote['quote_stage'] : '';
|
||||
$focus->date_quote_expected_closed = $quote['date_quote_expected_closed'];
|
||||
if(!empty($quote['purcahse_order_num'])) {
|
||||
$focus->purchase_order_num = $quote['purcahse_order_num'];
|
||||
}
|
||||
|
||||
if(!empty($quote['original_po_date'])) {
|
||||
$focus->original_po_date = $quote['original_po_date'];
|
||||
}
|
||||
|
||||
if(!empty($quote['payment_terms'])) {
|
||||
$focus->payment_terms = $quote['payment_terms'];
|
||||
}
|
||||
|
||||
$focus->quote_type = 'Quotes';
|
||||
$focus->calc_grand_total = 1;
|
||||
$focus->show_line_nums = 1;
|
||||
$focus->team_id = $current_user->team_id;
|
||||
$focus->team_set_id = $current_user->team_set_id;
|
||||
|
||||
//Set random account and contact ids
|
||||
$sql = 'SELECT * FROM accounts WHERE deleted = 0';
|
||||
$result = $GLOBALS['db']->limitQuery($sql,0,10,true,"Error retrieving Accounts");
|
||||
while ($row = $GLOBALS['db']->fetchByAssoc($result)) {
|
||||
$focus->billing_account_id = $row['id'];
|
||||
$focus->name = str_replace('[account name]', $row['name'], $focus->name);
|
||||
$focus->billing_address_street = $row['billing_address_street'];
|
||||
$focus->billing_address_city = $row['billing_address_city'];
|
||||
$focus->billing_address_state = $row['billing_address_state'];
|
||||
$focus->billing_address_country = $row['billing_address_country'];
|
||||
$focus->billing_address_postalcode = $row['billing_address_postalcode'];
|
||||
$focus->shipping_address_street = $row['shipping_address_street'];
|
||||
$focus->shipping_address_city = $row['shipping_address_city'];
|
||||
$focus->shipping_address_state = $row['shipping_address_state'];
|
||||
$focus->shipping_address_country = $row['shipping_address_country'];
|
||||
$focus->shipping_address_postalcode = $row['shipping_address_postalcode'];
|
||||
break;
|
||||
}
|
||||
|
||||
foreach($quote['bundle_data'] as $bundle_key=>$bundle) {
|
||||
$pb = new ProductBundle();
|
||||
$pb->team_id = $focus->team_set_id;
|
||||
$pb->team_set_id = $focus->team_set_id;
|
||||
$pb->currency_id = $focus->currency_id;
|
||||
$pb->bundle_stage = $bundle['bundle_stage'];
|
||||
$pb->name = $bundle['bundle_name'];
|
||||
|
||||
$product_bundle_id = $pb->save();
|
||||
|
||||
//Save the products
|
||||
foreach($bundle['products'] as $product_key=>$products) {
|
||||
$sql = 'SELECT * FROM product_templates WHERE name = \'' . $products['name'] . '\'';
|
||||
$result = $GLOBALS['db']->query($sql);
|
||||
while ($row = $GLOBALS['db']->fetchByAssoc($result)) {
|
||||
$product = new Product();
|
||||
|
||||
foreach($product->column_fields as $field) {
|
||||
if(isset($row[$field])) {
|
||||
$product->$field = $row[$field];
|
||||
}
|
||||
}
|
||||
|
||||
$product->name = $products['name'];
|
||||
$product->id = create_guid();
|
||||
$product->new_with_id = true;
|
||||
$product->quantity = $products['quantity'];
|
||||
$product->currency_id = $focus->currency_id;
|
||||
$product->team_id = $focus->team_id;
|
||||
$product->team_set_id = $focus->team_set_id;
|
||||
$product->quote_id = $focus->id;
|
||||
$product->account_id = $focus->billing_account_id;
|
||||
$product->status = 'Quotes';
|
||||
|
||||
if ($focus->quote_stage == 'Closed Accepted') {
|
||||
$product->status='Orders';
|
||||
}
|
||||
|
||||
$pb->subtotal += ($product->list_price * $product->quantity);
|
||||
$pb->deal_tot += ($product->list_price * $product->quantity);
|
||||
$pb->new_sub += ($product->list_price * $product->quantity);
|
||||
$pb->total += ($product->list_price * $product->quantity);
|
||||
|
||||
$product_id = $product->save();
|
||||
$pb->set_productbundle_product_relationship($product_id, $product_key, $product_bundle_id);
|
||||
break;
|
||||
} //while
|
||||
|
||||
} //foreach
|
||||
|
||||
$pb->tax = 0;
|
||||
$pb->shipping = 0;
|
||||
$pb->save();
|
||||
|
||||
//Save any product bundle comment
|
||||
if(isset($bundle['comment'])) {
|
||||
$product_bundle_note = new ProductBundleNote();
|
||||
$product_bundle_note->description = $bundle['comment'];
|
||||
$product_bundle_note->save();
|
||||
$pb->set_product_bundle_note_relationship($bundle_key, $product_bundle_note->id, $product_bundle_id);
|
||||
}
|
||||
|
||||
$pb->set_productbundle_quote_relationship($focus->id, $product_bundle_id, $bundle_key);
|
||||
|
||||
$focus->tax += $pb->tax;
|
||||
$focus->shipping += $pb->shipping;
|
||||
$focus->subtotal += $pb->subtotal;
|
||||
$focus->deal_tot += $pb->deal_tot;
|
||||
$focus->new_sub += $pb->new_sub;
|
||||
$focus->total += $pb->total;
|
||||
|
||||
} //foreach
|
||||
|
||||
//Save the quote
|
||||
$focus->save();
|
||||
} //foreach
|
||||
}
|
||||
|
||||
|
||||
?>
|
||||
92
install/siteConfig.js
Normal file
92
install/siteConfig.js
Normal file
@@ -0,0 +1,92 @@
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
|
||||
|
||||
function toggleSiteDefaults(){
|
||||
var theForm = document.forms[0];
|
||||
var elem = document.getElementById('setup_site_session');
|
||||
|
||||
if( theForm.setup_site_defaults.checked ){
|
||||
document.getElementById('setup_site_session_section_pre').style.display = 'none';
|
||||
document.getElementById('setup_site_session_section').style.display = 'none';
|
||||
document.getElementById('setup_site_log_dir_pre').style.display = 'none';
|
||||
document.getElementById('setup_site_log_dir').style.display = 'none';
|
||||
document.getElementById('setup_site_guid_section_pre').style.display = 'none';
|
||||
document.getElementById('setup_site_guid_section').style.display = 'none';
|
||||
}
|
||||
else {
|
||||
document.getElementById('setup_site_session_section_pre').style.display = '';
|
||||
document.getElementById('setup_site_log_dir_pre').style.display = '';
|
||||
document.getElementById('setup_site_guid_section_pre').style.display = '';
|
||||
toggleSession();
|
||||
toggleGUID();
|
||||
}
|
||||
}
|
||||
|
||||
function toggleSession(){
|
||||
var theForm = document.forms[0];
|
||||
var elem = document.getElementById('setup_site_session_section');
|
||||
|
||||
if( theForm.setup_site_custom_session_path.checked ){
|
||||
elem.style.display = '';
|
||||
}
|
||||
else {
|
||||
elem.style.display = 'none';
|
||||
}
|
||||
}
|
||||
|
||||
function toggleLogDir(){
|
||||
var theForm = document.forms[0];
|
||||
var elem = document.getElementById('setup_site_log_dir');
|
||||
|
||||
if( theForm.setup_site_custom_log_dir.checked ){
|
||||
elem.style.display = '';
|
||||
}
|
||||
else {
|
||||
elem.style.display = 'none';
|
||||
}
|
||||
}
|
||||
|
||||
function toggleGUID(){
|
||||
var theForm = document.forms[0];
|
||||
var elem = document.getElementById('setup_site_guid_section');
|
||||
|
||||
if( theForm.setup_site_specify_guid.checked ){
|
||||
elem.style.display = '';
|
||||
}
|
||||
else {
|
||||
elem.style.display = 'none';
|
||||
}
|
||||
}
|
||||
210
install/siteConfig_a.php
Normal file
210
install/siteConfig_a.php
Normal file
@@ -0,0 +1,210 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* SugarCRM Community Edition is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2011 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
|
||||
|
||||
|
||||
|
||||
if( !isset( $install_script ) || !$install_script ){
|
||||
die($mod_strings['ERR_NO_DIRECT_SCRIPT']);
|
||||
}
|
||||
|
||||
|
||||
if( is_file("config.php") ){
|
||||
|
||||
|
||||
|
||||
if(!empty($sugar_config['default_theme']))
|
||||
$_SESSION['site_default_theme'] = $sugar_config['default_theme'];
|
||||
|
||||
if(!empty($sugar_config['disable_persistent_connections']))
|
||||
$_SESSION['disable_persistent_connections'] =
|
||||
$sugar_config['disable_persistent_connections'];
|
||||
if(!empty($sugar_config['default_language']))
|
||||
$_SESSION['default_language'] = $sugar_config['default_language'];
|
||||
if(!empty($sugar_config['translation_string_prefix']))
|
||||
$_SESSION['translation_string_prefix'] = $sugar_config['translation_string_prefix'];
|
||||
if(!empty($sugar_config['default_charset']))
|
||||
$_SESSION['default_charset'] = $sugar_config['default_charset'];
|
||||
|
||||
if(!empty($sugar_config['default_currency_name']))
|
||||
$_SESSION['default_currency_name'] = $sugar_config['default_currency_name'];
|
||||
if(!empty($sugar_config['default_currency_symbol']))
|
||||
$_SESSION['default_currency_symbol'] = $sugar_config['default_currency_symbol'];
|
||||
if(!empty($sugar_config['default_currency_iso4217']))
|
||||
$_SESSION['default_currency_iso4217'] = $sugar_config['default_currency_iso4217'];
|
||||
|
||||
if(!empty($sugar_config['rss_cache_time']))
|
||||
$_SESSION['rss_cache_time'] = $sugar_config['rss_cache_time'];
|
||||
if(!empty($sugar_config['languages']))
|
||||
{
|
||||
// We need to encode the languages in a way that can be retrieved later.
|
||||
$language_keys = Array();
|
||||
$language_values = Array();
|
||||
|
||||
foreach($sugar_config['languages'] as $key=>$value)
|
||||
{
|
||||
$language_keys[] = $key;
|
||||
$language_values[] = $value;
|
||||
}
|
||||
|
||||
$_SESSION['language_keys'] = urlencode(implode(",",$language_keys));
|
||||
$_SESSION['language_values'] = urlencode(implode(",",$language_values));
|
||||
}
|
||||
}
|
||||
|
||||
//// errors
|
||||
$errors = '';
|
||||
if( isset($validation_errors) && is_array($validation_errors)){
|
||||
if( count($validation_errors) > 0 ){
|
||||
$errors = '<div id="errorMsgs">';
|
||||
$errors .= '<p>'.$mod_strings['LBL_SITECFG_FIX_ERRORS'].'</p><ul>';
|
||||
foreach( $validation_errors as $error ){
|
||||
$errors .= '<li>' . $error . '</li>';
|
||||
}
|
||||
$errors .= '</ul></div>';
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//// ternaries
|
||||
$sugarUpdates = (isset($_SESSION['setup_site_sugarbeet']) && !empty($_SESSION['setup_site_sugarbeet'])) ? 'checked="checked"' : '';
|
||||
$siteSecurity = (isset($_SESSION['setup_site_defaults']) && !empty($_SESSION['setup_site_defaults'])) ? 'checked="checked"' : '';
|
||||
$customSession = (isset($_SESSION['setup_site_custom_session_path']) && !empty($_SESSION['setup_site_custom_session_path'])) ? 'checked="checked"' : '';
|
||||
$customLog = (isset($_SESSION['setup_site_custom_log_dir']) && !empty($_SESSION['setup_site_custom_log_dir'])) ? 'checked="checked"' : '';
|
||||
$customId = (isset($_SESSION['setup_site_specify_guid']) && !empty($_SESSION['setup_site_specify_guid'])) ? 'checked="checked"' : '';
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//// START OUTPUT
|
||||
$out =<<<EOQ
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<meta http-equiv="Content-Script-Type" content="text/javascript">
|
||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||
<title>{$mod_strings['LBL_WIZARD_TITLE']} {$mod_strings['LBL_SITECFG_TITLE']}</title>
|
||||
<link REL="SHORTCUT ICON" HREF="include/images/sugar_icon.ico">
|
||||
<link rel="stylesheet" href="install/install.css" type="text/css" />
|
||||
<script type="text/javascript" src="install/installCommon.js"></script>
|
||||
<script type="text/javascript" src="install/siteConfig.js"></script>
|
||||
</head>
|
||||
<body onload="javascript:document.getElementById('button_next2').focus();">
|
||||
<form action="install.php" method="post" name="setConfig" id="form">
|
||||
<input type="hidden" name="current_step" value="{$next_step}">
|
||||
<table cellspacing="0" cellpadding="0" border="0" align="center" class="shell">
|
||||
<tr><td colspan="2" id="help"><a href="{$help_url}" target='_blank'>{$mod_strings['LBL_HELP']} </a></td></tr>
|
||||
<tr>
|
||||
<th width="500">
|
||||
<p>
|
||||
<img src="{$sugar_md}" alt="SugarCRM" border="0">
|
||||
</p>
|
||||
{$mod_strings['LBL_SITECFG_TITLE']}</th>
|
||||
<th width="200" style="text-align: right;"><a href="http://www.sugarcrm.com" target="_blank">
|
||||
<IMG src="include/images/sugarcrm_login.png" width="145" height="30" alt="SugarCRM" border="0"></a>
|
||||
</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
{$errors}
|
||||
<div class="required">{$mod_strings['LBL_REQUIRED']}</div>
|
||||
<table width="100%" cellpadding="0" cellpadding="0" border="0" class="StyleDottedHr">
|
||||
<tr><th colspan="3" align="left">{$mod_strings['LBL_SITECFG_TITLE2']}</td></tr>
|
||||
EOQ;
|
||||
|
||||
|
||||
|
||||
//hide this in typical mode
|
||||
if(isset($_SESSION['install_type']) && !empty($_SESSION['install_type']) && strtolower($_SESSION['install_type'])=='custom'){
|
||||
$out .=<<<EOQ
|
||||
|
||||
<tr><td colspan="3" align="left"> {$mod_strings['LBL_SITECFG_URL_MSG']}
|
||||
</td></tr>
|
||||
<tr><td><span class="required">*</span></td>
|
||||
<td><b>{$mod_strings['LBL_SITECFG_URL']}</td>
|
||||
<td align="left"><input type="text" name="setup_site_url" id="button_next2" value="{$_SESSION['setup_site_url']}" size="40" /></td></tr>
|
||||
<tr><td colspan="3" align="left"> <br>{$mod_strings['LBL_SITECFG_SYS_NAME_MSG']}</td></tr>
|
||||
<tr><td><span class="required">*</span></td>
|
||||
<td><b>{$mod_strings['LBL_SYSTEM_NAME']}</b></td>
|
||||
<td align="left"><input type="text" name="setup_system_name" value="{$_SESSION['setup_system_name']}" size="40" /><br> </td></tr>
|
||||
EOQ;
|
||||
}
|
||||
|
||||
$out .=<<<EOQ
|
||||
|
||||
<tr><td colspan="3" align="left"> {$mod_strings['LBL_SITECFG_PASSWORD_MSG']}</td></tr>
|
||||
<tr><td><span class="required">*</span></td>
|
||||
<td><b>{$mod_strings['LBL_SITECFG_ADMIN_Name']}</b><br>
|
||||
</td>
|
||||
<td align="left"><input type="text" name="setup_site_admin_user_name" value="{$_SESSION['setup_site_admin_user_name']}" size="20" maxlength="60" /></td></tr>
|
||||
<tr><td><span class="required">*</span></td>
|
||||
<td><b>{$mod_strings['LBL_SITECFG_ADMIN_PASS']}</b><br>
|
||||
</td>
|
||||
<td align="left"><input type="password" name="setup_site_admin_password" value="{$_SESSION['setup_site_admin_password']}" size="20" /></td></tr>
|
||||
<tr><td><span class="required">*</span></td>
|
||||
<td><b>{$mod_strings['LBL_SITECFG_ADMIN_PASS_2']}</td>
|
||||
<td align="left"><input type="password" name="setup_site_admin_password_retype" value="{$_SESSION['setup_site_admin_password_retype']}" size="20" /></td></tr>
|
||||
|
||||
EOQ;
|
||||
|
||||
$out .= <<<EOQ
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="right" colspan="2">
|
||||
<hr>
|
||||
<table cellspacing="0" cellpadding="0" border="0" class="stdTable">
|
||||
<tr>
|
||||
<td>
|
||||
<input class="button" type="button" name="goto" value="{$mod_strings['LBL_BACK']}" id="button_back_siteConfig_a" onclick="document.getElementById('form').submit();" />
|
||||
<input type="hidden" name="goto" value="{$mod_strings['LBL_BACK']}" />
|
||||
</td>
|
||||
<td><input class="button" type="submit" name="goto" id="button_next2" value="{$mod_strings['LBL_NEXT']}" /></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
<br>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
EOQ;
|
||||
|
||||
echo $out;
|
||||
?>
|
||||
235
install/siteConfig_b.php
Normal file
235
install/siteConfig_b.php
Normal file
@@ -0,0 +1,235 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* SugarCRM Community Edition is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2011 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
|
||||
|
||||
|
||||
|
||||
if( !isset( $install_script ) || !$install_script ){
|
||||
die($mod_strings['ERR_NO_DIRECT_SCRIPT']);
|
||||
}
|
||||
|
||||
if( is_file("config.php") ){
|
||||
|
||||
|
||||
|
||||
if(!empty($sugar_config['default_theme']))
|
||||
$_SESSION['site_default_theme'] = $sugar_config['default_theme'];
|
||||
|
||||
if(!empty($sugar_config['disable_persistent_connections']))
|
||||
$_SESSION['disable_persistent_connections'] =
|
||||
$sugar_config['disable_persistent_connections'];
|
||||
if(!empty($sugar_config['default_language']))
|
||||
$_SESSION['default_language'] = $sugar_config['default_language'];
|
||||
if(!empty($sugar_config['translation_string_prefix']))
|
||||
$_SESSION['translation_string_prefix'] = $sugar_config['translation_string_prefix'];
|
||||
if(!empty($sugar_config['default_charset']))
|
||||
$_SESSION['default_charset'] = $sugar_config['default_charset'];
|
||||
|
||||
if(!empty($sugar_config['default_currency_name']))
|
||||
$_SESSION['default_currency_name'] = $sugar_config['default_currency_name'];
|
||||
if(!empty($sugar_config['default_currency_symbol']))
|
||||
$_SESSION['default_currency_symbol'] = $sugar_config['default_currency_symbol'];
|
||||
if(!empty($sugar_config['default_currency_iso4217']))
|
||||
$_SESSION['default_currency_iso4217'] = $sugar_config['default_currency_iso4217'];
|
||||
|
||||
if(!empty($sugar_config['rss_cache_time']))
|
||||
$_SESSION['rss_cache_time'] = $sugar_config['rss_cache_time'];
|
||||
if(!empty($sugar_config['languages']))
|
||||
{
|
||||
// We need to encode the languages in a way that can be retrieved later.
|
||||
$language_keys = Array();
|
||||
$language_values = Array();
|
||||
|
||||
foreach($sugar_config['languages'] as $key=>$value)
|
||||
{
|
||||
$language_keys[] = $key;
|
||||
$language_values[] = $value;
|
||||
}
|
||||
|
||||
$_SESSION['language_keys'] = urlencode(implode(",",$language_keys));
|
||||
$_SESSION['language_values'] = urlencode(implode(",",$language_values));
|
||||
}
|
||||
}
|
||||
|
||||
//// errors
|
||||
$errors = '';
|
||||
if( isset($validation_errors) ){
|
||||
if( count($validation_errors) > 0 ){
|
||||
$errors = '<div id="errorMsgs">';
|
||||
$errors .= '<p>'.$mod_strings['LBL_SITECFG_FIX_ERRORS'].'</p><ul>';
|
||||
foreach( $validation_errors as $error ){
|
||||
$errors .= '<li>' . $error . '</li>';
|
||||
}
|
||||
$errors .= '</ul></div>';
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//// ternaries
|
||||
$sugarUpdates = (isset($_SESSION['setup_site_sugarbeet']) && !empty($_SESSION['setup_site_sugarbeet'])) ? 'checked="checked"' : '';
|
||||
$siteSecurity = (isset($_SESSION['setup_site_defaults']) && !empty($_SESSION['setup_site_defaults'])) ? 'checked="checked"' : '';
|
||||
$customSession = (isset($_SESSION['setup_site_custom_session_path']) && !empty($_SESSION['setup_site_custom_session_path'])) ? 'checked="checked"' : '';
|
||||
$customLog = (isset($_SESSION['setup_site_custom_log_dir']) && !empty($_SESSION['setup_site_custom_log_dir'])) ? 'checked="checked"' : '';
|
||||
$customId = (isset($_SESSION['setup_site_specify_guid']) && !empty($_SESSION['setup_site_specify_guid'])) ? 'checked="checked"' : '';
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//// START OUTPUT
|
||||
$out =<<<EOQ
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<meta http-equiv="Content-Script-Type" content="text/javascript">
|
||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||
<title>{$mod_strings['LBL_WIZARD_TITLE']} {$mod_strings['LBL_SITECFG_SECURITY_TITLE']}</title>
|
||||
<link REL="SHORTCUT ICON" HREF="include/images/sugar_icon.ico">
|
||||
<link rel="stylesheet" href="install/install.css" type="text/css" />
|
||||
<script type="text/javascript" src="install/installCommon.js"></script>
|
||||
<script type="text/javascript" src="install/siteConfig.js"></script>
|
||||
</head>
|
||||
<body onload="javascript:toggleGUID();toggleSession();toggleLogDir();document.getElementById('button_next2').focus();">
|
||||
<form action="install.php" method="post" name="setConfig" id="form">
|
||||
<input type="hidden" name="current_step" value="{$next_step}">
|
||||
<table cellspacing="0" cellpadding="0" border="0" align="center" class="shell">
|
||||
<tr><td colspan="2" id="help"><a href="{$help_url}" target='_blank'>{$mod_strings['LBL_HELP']} </a></td></tr>
|
||||
<tr>
|
||||
<th width="500">
|
||||
<p>
|
||||
<img src="{$sugar_md}" alt="SugarCRM" border="0">
|
||||
</p>
|
||||
{$mod_strings['LBL_SITECFG_SECURITY_TITLE']}</th>
|
||||
<th width="200" style="text-align: right;"><a href="http://www.sugarcrm.com" target="_blank"><IMG src="include/images/sugarcrm_login.png" width="145" height="30" alt="SugarCRM" border="0"></a></th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
{$errors}
|
||||
<div class="required">{$mod_strings['LBL_REQUIRED']}</div>
|
||||
<table width="100%" cellpadding="0" cellpadding="0" border="0" class="StyleDottedHr">
|
||||
<tr><th colspan="3" align="left">{$mod_strings['LBL_SITECFG_SITE_SECURITY']}</td></tr>
|
||||
|
||||
EOQ;
|
||||
$checked = '';
|
||||
if(!empty($_SESSION['setup_site_sugarbeet_anonymous_stats'])) $checked = 'checked="checked"';
|
||||
$out .= "
|
||||
<tr><td></td>
|
||||
<td><input type='checkbox' class='checkbox' name='setup_site_sugarbeet_anonymous_stats' value='yes' $checked /></td>
|
||||
<td><b>{$mod_strings['LBL_SITECFG_ANONSTATS']}</b><br><i>{$mod_strings['LBL_SITECFG_ANONSTATS_DIRECTIONS']}</i></td></tr>
|
||||
|
||||
";
|
||||
$checked = '';
|
||||
if(!empty($_SESSION['setup_site_sugarbeet_automatic_checks'])) $checked = 'checked="checked"';
|
||||
$out .= <<<EOQ
|
||||
<tr><td></td>
|
||||
<td><input type="checkbox" class="checkbox" name="setup_site_sugarbeet_automatic_checks" value="yes" checked="checked" /></td>
|
||||
<td><b>{$mod_strings['LBL_SITECFG_SUGAR_UP']}</b><br><i>{$mod_strings['LBL_SITECFG_SUGAR_UP_DIRECTIONS']}</i><br> </td></tr>
|
||||
<tbody id="setup_site_session_section_pre">
|
||||
<tr><td></td>
|
||||
<td><input type="checkbox" class="checkbox" name="setup_site_custom_session_path" value="yes" onclick="javascript:toggleSession();" {$customSession} /></td>
|
||||
<td><b>{$mod_strings['LBL_SITECFG_CUSTOM_SESSION']}</b><br>
|
||||
<em>{$mod_strings['LBL_SITECFG_CUSTOM_SESSION_DIRECTIONS']}</em><br> </td>
|
||||
</tr>
|
||||
</tbody>
|
||||
<tbody id="setup_site_session_section">
|
||||
<tr><td></td>
|
||||
<td style="text-align : right;"><span class="required">*</span></td>
|
||||
<td align="left">
|
||||
<div><div style="width:200px;float:left"><b>{$mod_strings['LBL_SITECFG_SESSION_PATH']}</b></div>
|
||||
<input type="text" name="setup_site_session_path" size='40' value="{$_SESSION['setup_site_session_path']}" /></td>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
<tbody id="setup_site_log_dir_pre">
|
||||
<tr><td></td>
|
||||
<td><input type="checkbox" class="checkbox" name="setup_site_custom_log_dir" value="yes" onclick="javascript:toggleLogDir();" {$customLog} /></td>
|
||||
<td><b>{$mod_strings['LBL_SITECFG_CUSTOM_LOG']}</b><br>
|
||||
<em>{$mod_strings['LBL_SITECFG_CUSTOM_LOG_DIRECTIONS']}</em><br> </td>
|
||||
</tr>
|
||||
</tbody>
|
||||
<tbody id="setup_site_log_dir">
|
||||
<tr><td></td>
|
||||
<td style="text-align : right;" ><span class="required">*</span></td>
|
||||
<td align="left">
|
||||
<div><div style="width:200px;float:left"><b>{$mod_strings['LBL_SITECFG_LOG_DIR']}</b></div>
|
||||
<input type="text" name="setup_site_log_dir" size='30' value="{$_SESSION['setup_site_log_dir']}" />
|
||||
</div>
|
||||
</tr>
|
||||
</tbody>
|
||||
<tbody id="setup_site_guid_section_pre">
|
||||
<tr><td></td>
|
||||
<td><input type="checkbox" class="checkbox" name="setup_site_specify_guid" value="yes" onclick="javascript:toggleGUID();" {$customId} /></td>
|
||||
<td><b>{$mod_strings['LBL_SITECFG_CUSTOM_ID']}</b><br>
|
||||
<em>{$mod_strings['LBL_SITECFG_CUSTOM_ID_DIRECTIONS']}</em><br> </td>
|
||||
</tr>
|
||||
</tbody>
|
||||
<tbody id="setup_site_guid_section">
|
||||
<tr><td></td>
|
||||
<td style="text-align : right;"><span class="required">*</span></td>
|
||||
<td align="left">
|
||||
<div><div style="width:200px;float:left"><b>{$mod_strings['LBL_SITECFG_APP_ID']}</b></div>
|
||||
<input type="text" name="setup_site_guid" size='30' value="{$_SESSION['setup_site_guid']}" />
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="right" colspan="2">
|
||||
<hr>
|
||||
<table cellspacing="0" cellpadding="0" border="0" class="stdTable">
|
||||
<tr>
|
||||
<td>
|
||||
<input class="button" type="button" name="goto" value="{$mod_strings['LBL_BACK']}" id="button_back_siteConfig_b" onclick="document.getElementById('form').submit();" />
|
||||
<input type="hidden" name="goto" value="{$mod_strings['LBL_BACK']}" />
|
||||
</td>
|
||||
<td><input class="button" type="submit" id="button_next2" name="goto" value="{$mod_strings['LBL_NEXT']}" /></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
<br>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
EOQ;
|
||||
|
||||
echo $out;
|
||||
?>
|
||||
174
install/systemOptions.php
Normal file
174
install/systemOptions.php
Normal file
@@ -0,0 +1,174 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* SugarCRM Community Edition is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2011 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
|
||||
|
||||
if( !isset( $install_script ) || !$install_script ){
|
||||
die($mod_strings['ERR_NO_DIRECT_SCRIPT']);
|
||||
}
|
||||
if(!isset($_SESSION['setup_db_type']) || $_SESSION['setup_db_type'] ==''){
|
||||
$_SESSION['setup_db_type'] = 'mysql';
|
||||
}
|
||||
$setup_db_type = $_SESSION['setup_db_type'];
|
||||
|
||||
$errs = '';
|
||||
if(isset($validation_errors)) {
|
||||
if(count($validation_errors) > 0) {
|
||||
$errs = '<div id="errorMsgs">';
|
||||
$errs .= "<p>{$mod_strings['LBL_SYSOPTS_ERRS_TITLE']}</p>";
|
||||
$errs .= '<ul>';
|
||||
|
||||
foreach($validation_errors as $error) {
|
||||
$errs .= '<li>' . $error . '</li>';
|
||||
}
|
||||
|
||||
$errs .= '</ul>';
|
||||
$errs .= '</div>';
|
||||
}
|
||||
}
|
||||
|
||||
$mysql = '';
|
||||
$oci8 = '';
|
||||
$mssql = '';
|
||||
if($setup_db_type == "mysql")
|
||||
$mysql = 'checked="checked"';
|
||||
else if ($setup_db_type == "mssql")
|
||||
$mssql = 'checked="checked"';
|
||||
|
||||
|
||||
$out=<<<EOQ
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<meta http-equiv="Content-Script-Type" content="text/javascript">
|
||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||
<title>{$mod_strings['LBL_WIZARD_TITLE']} {$mod_strings['LBL_SYSOPTS_DB_TITLE']}</title>
|
||||
<link REL="SHORTCUT ICON" HREF="include/images/sugar_icon.ico">
|
||||
<link rel="stylesheet" href="install/install.css" type="text/css" />
|
||||
<script type="text/javascript" src="install/installCommon.js"></script>
|
||||
</head>
|
||||
<body onload="document.getElementById('button_next2').focus();">
|
||||
<form action="install.php" method="post" name="systemOptions" id="form">
|
||||
|
||||
<table cellspacing="0" cellpadding="0" border="0" align="center" class="shell">
|
||||
<tr><td colspan="2" id="help"><a href="{$help_url}" target='_blank'>{$mod_strings['LBL_HELP']} </a></td></tr>
|
||||
<tr>
|
||||
<th width="500">
|
||||
<p>
|
||||
<img src="{$sugar_md}" alt="SugarCRM" border="0">
|
||||
</p>
|
||||
{$mod_strings['LBL_SYSOPTS_DB_TITLE']}</th>
|
||||
<th width="200" style="text-align: right;">
|
||||
<a href="http://www.sugarcrm.com" target="_blank"><IMG src="include/images/sugarcrm_login.png" width="145" height="30" alt="SugarCRM" border="0"></a>
|
||||
</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
{$errs}
|
||||
|
||||
|
||||
<table width="100%" cellpadding="0" cellpadding="0" border="0" class="StyleDottedHr">
|
||||
<tr><th colspan="3" align="left">{$mod_strings['LBL_SYSOPTS_DB']}</td></tr>
|
||||
<tr><td colspan="3" align="left">{$mod_strings['LBL_SYSOPTS_2']}</td></tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td align="left">
|
||||
EOQ;
|
||||
if(function_exists('mysql_connect') || function_exists('mysqli_connect')){
|
||||
$out.=<<<EOQ
|
||||
<input type="radio" class="checkbox" name="setup_db_type" id="setup_db_type" value="mysql" {$mysql} onclick="document.getElementById('ociMsg').style.display='none'"/>{$mod_strings['LBL_MYSQL']}
|
||||
EOQ;
|
||||
//check to see if mysqli is enabled
|
||||
if(function_exists('mysqli_connect')){
|
||||
$_SESSION['mysql_type'] = 'mysqli';
|
||||
$out.=' (MySQLi detected)<br>';
|
||||
}else{
|
||||
$out.= '<br>';
|
||||
}
|
||||
}
|
||||
if(function_exists('mssql_connect') || function_exists('sqlsrv_connect')){
|
||||
$out.=<<<EOQ
|
||||
<input type="radio" class="checkbox" name="setup_db_type" id="setup_db_type" value="mssql" {$mssql} onclick="document.getElementById('ociMsg').style.display='none'"/>{$mod_strings['LBL_MSSQL']}
|
||||
EOQ;
|
||||
}
|
||||
//check to see if sqlsrv is enabled
|
||||
if(function_exists('sqlsrv_connect')){
|
||||
$_SESSION['mssql_type'] = 'sqlsrv';
|
||||
$out.=' (Microsoft SQL Server Driver for PHP detected)<br>';
|
||||
}else{
|
||||
$out.= '<br>';
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
$out.=<<<EOQ
|
||||
</td>
|
||||
<td width='350'nowrap>
|
||||
<div name="ociMsg" id="ociMsg" style="display:none">
|
||||
</div>
|
||||
EOQ;
|
||||
|
||||
$out.=<<<EOQ
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="right" colspan="2">
|
||||
<hr>
|
||||
<input type="hidden" name="current_step" value=" $next_step ">
|
||||
<table cellspacing="0" cellpadding="0" border="0" class="stdTable">
|
||||
<tr>
|
||||
<td>
|
||||
<input class="button" type="button" value="{$mod_strings['LBL_BACK']}" id="button_back_systemOptions" onclick="document.getElementById('form').submit();" />
|
||||
<input type="hidden" name="goto" value="{$mod_strings['LBL_BACK']}" />
|
||||
</td>
|
||||
<td><input class="button" type="submit" id="button_next2" name="goto" value="{$mod_strings['LBL_NEXT']}" /></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
EOQ;
|
||||
echo $out;
|
||||
?>
|
||||
145
install/welcome.php
Normal file
145
install/welcome.php
Normal file
@@ -0,0 +1,145 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* SugarCRM Community Edition is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2011 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
|
||||
|
||||
|
||||
|
||||
if( !isset( $install_script ) || !$install_script ){
|
||||
die($mod_strings['ERR_NO_DIRECT_SCRIPT']);
|
||||
}
|
||||
// $mod_strings come from calling page.
|
||||
|
||||
$langDropDown = get_select_options_with_id($supportedLanguages, $current_language);
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//// START OUTPUT
|
||||
|
||||
|
||||
$out = <<<EOQ
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||
<title>{$mod_strings['LBL_WIZARD_TITLE']} {$mod_strings['LBL_TITLE_WELCOME']} {$setup_sugar_version} {$mod_strings['LBL_WELCOME_SETUP_WIZARD']}</title>
|
||||
<link REL="SHORTCUT ICON" HREF="include/images/sugar_icon.ico">
|
||||
<link rel="stylesheet" href="install/install.css" type="text/css">
|
||||
</head>
|
||||
|
||||
<body onload="javascript:document.getElementById('button_next2').focus();">
|
||||
<form action="install.php" method="post" name="form" id="form">
|
||||
<table cellspacing="0" cellpadding="0" border="0" align="center" class="shell">
|
||||
<tr><td colspan="2" id="help"><a href="{$help_url}" target='_blank'>{$mod_strings['LBL_HELP']} </a></td></tr>
|
||||
<tr>
|
||||
<th width="500">
|
||||
<p>
|
||||
<img src="{$sugar_md}" alt="SugarCRM" border="0">
|
||||
</p>
|
||||
{$mod_strings['LBL_TITLE_WELCOME']} {$setup_sugar_version} {$mod_strings['LBL_WELCOME_SETUP_WIZARD']}</th>
|
||||
|
||||
<th width="200" height="30" style="text-align: right;"><a href="http://www.sugarcrm.com" target=
|
||||
"_blank"><IMG src="include/images/sugarcrm_login.png" width="145" height="30" alt="SugarCRM" border="0"></a>
|
||||
</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" id="ready_image"><IMG src="include/images/install_themes.jpg" width="698" height="247" alt="Sugar Themes" border="0"></td>
|
||||
</tr>
|
||||
<td>
|
||||
{$mod_strings['LBL_WELCOME_CHOOSE_LANGUAGE']}: <select name="language" onchange='this.form.submit()';>{$langDropDown}</select>
|
||||
</td>
|
||||
<td>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td align="right" colspan="2">
|
||||
<hr>
|
||||
<table cellspacing="0" cellpadding="0" border="0" class="stdTable">
|
||||
<tr>
|
||||
<td>
|
||||
<input type="hidden" name="current_step" value="{$next_step}">
|
||||
</td>
|
||||
<td>
|
||||
<input class="button" type="submit" name="goto" value="{$mod_strings['LBL_NEXT']}" id="button_next2" />
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
<script>
|
||||
function showtime(div){
|
||||
|
||||
if(document.getElementById(div).style.display == ''){
|
||||
document.getElementById(div).style.display = 'none';
|
||||
document.getElementById('adv_'+div).style.display = '';
|
||||
document.getElementById('basic_'+div).style.display = 'none';
|
||||
}else{
|
||||
document.getElementById(div).style.display = '';
|
||||
document.getElementById('adv_'+div).style.display = 'none';
|
||||
document.getElementById('basic_'+div).style.display = '';
|
||||
}
|
||||
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
EOQ;
|
||||
if (version_compare(phpversion(),'5.2.0') < 0) {
|
||||
if(empty($mod_strings['LBL_MINIMUM_PHP_VERSION'])){
|
||||
$mod_strings['LBL_MINIMUM_PHP_VERSION'] = 'Minimum Php version required is 5.2.1.';
|
||||
}
|
||||
|
||||
$php_verison_warning =<<<eoq
|
||||
<table width="100%" cellpadding="0" cellpadding="0" border="0" class="Welcome">
|
||||
<tr>
|
||||
<td colspan="2" align="center" id="ready_image"><IMG src="include/images/install_themes.jpg" width="698" height="190" alt="Sugar Themes" border="0"></td>
|
||||
</tr>
|
||||
<th colspan="2" align="center">
|
||||
<h1><span class='error'><b>{$mod_strings['LBL_MINIMUM_PHP_VERSION']}</b></span></h1>
|
||||
</th>
|
||||
<tr>
|
||||
<td colspan="2" align="center" id="ready_image"><IMG src="include/images/install_themes.jpg" width="698" height="190" alt="Sugar Themes" border="0"></td>
|
||||
</tr>
|
||||
</table>
|
||||
eoq;
|
||||
$out = $php_verison_warning;
|
||||
}
|
||||
echo $out;
|
||||
?>
|
||||
Reference in New Issue
Block a user