root/c3crm/sugarcrm/trunk/install/siteConfig.php
Revision 349 (by c3crm, 01/01/06 16:37:34) |
---|
<?php /********************************************************************************* * The contents of this file are subject to the SugarCRM Public License Version * 1.1.3 ("License"); You may not use this file except in compliance with the * License. You may obtain a copy of the License at http://www.sugarcrm.com/SPL * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * All copies of the Covered Code must include on each user interface screen: * (i) the "Powered by SugarCRM" logo and * (ii) the SugarCRM copyright notice * in the same form as they appear in the distribution. See full license for * requirements. * * The Original Code is: SugarCRM Open Source * The Initial Developer of the Original Code is SugarCRM, Inc. * Portions created by SugarCRM are Copyright (C) 2004-2005 SugarCRM, Inc.; * All Rights Reserved. * Contributor(s): ______________________________________. ********************************************************************************/ // $Id: siteConfig.php,v 1.4 2005/08/01 10:54:03 clint Exp $ if( !isset( $install_script ) || !$install_script ){ die('Unable to process script directly.'); } if( !isset($_SESSION['siteConfig_submitted']) || !$_SESSION['siteConfig_submitted'] ){ $web_root = $_SERVER['SERVER_NAME'].$_SERVER['PHP_SELF']; $web_root = str_replace("/install.php", "", $web_root); $web_root = "http://$web_root"; $current_dir = str_replace('\install',"", dirname(__FILE__)); $current_dir = str_replace('/install',"", $current_dir); $current_dir = trim($current_dir); if( is_readable('config.php') ){ include_once('config.php'); } // set the form's php var to the loaded config's var else default to sane settings $_SESSION['setup_site_url'] = (empty($sugar_config['site_url']) || $sugar_config['site_url'] == '' ) ? $web_root : $sugar_config['site_url']; $_SESSION['setup_site_sugarbeet'] = true; $_SESSION['setup_site_defaults'] = true; $_SESSION['setup_site_custom_session_path'] = false; $_SESSION['setup_site_session_path'] = (isset($sugar_config['session_dir'])) ? $sugar_config['session_dir'] : ''; $_SESSION['setup_site_custom_log_dir'] = false; $_SESSION['setup_site_log_dir'] = (isset($sugar_config['log_dir'])) ? $sugar_config['log_dir'] : '.'; $_SESSION['setup_site_specify_guid'] = false; $_SESSION['setup_site_guid'] = (isset($sugar_config['unique_key'])) ? $sugar_config['unique_key'] : ''; $_SESSION['setup_site_admin_password'] = ''; $_SESSION['setup_site_admin_password_retype'] = ''; } // should this be moved to install.php? if( is_file("config.php") ){ require_once("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)); } } ?> <!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>C3CRM安装向导: 步骤 <?php echo $next_step ?></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/siteConfig.js"></script> </head> <body onload="javascript:toggleGUID();toggleSession();toggleSiteDefaults();document.getElementById('defaultFocus').focus();"> <form action="install.php" method="post" name="setConfig" id="form"> <input type="hidden" name="current_step" value="<?php echo $next_step ?>"> <table cellspacing="0" cellpadding="0" border="0" align="center" class="shell"> <tr> <th width="400">步骤 <?php echo $next_step ?>: 站点配置</th> <th width="200" height="30" style="text-align: right;"><a href="http://www.c3crm.com" target= "_blank"><IMG src="include/images/sugarcrm_login.png" width="120" height="19" alt="SugarCRM" border="0"></a></th> </tr> <tr> <td colspan="2" width="600"> <p>请输入以下的站点配置信息。如果您不能确定所填项,我们建议您使用默认值。</p> <?php if( isset($validation_errors) ){ if( count($validation_errors) > 0 ){ echo '<div id="errorMsgs">'; echo '<p>Please fix the following errors before proceeding:</p>'; echo '<ul>'; foreach( $validation_errors as $error ){ echo '<li>' . $error . '</li>'; } echo '</ul>'; echo '</div>'; } } ?> <div class="required">* 必填</div> <table width="100%" cellpadding="0" cellpadding="0" border="0" class="StyleDottedHr"> <tr><th colspan="3" align="left">站点配置</td></tr> <tr><td><span class="required">*</span></td> <td><b>URL</td> <td align="left"><input type="text" name="setup_site_url" id="defaultFocus" value="<?php echo $_SESSION['setup_site_url']; ?>" size="40" /></td></tr> <tr><td><span class="required">*</span></td> <td><b>c3crm <em>admin</em> 密码</b><br><i>提醒: 这个操作将覆盖以前安装设置的admin密码。</i></td> <td align="left"><input type="password" name="setup_site_admin_password" value="<?php echo $_SESSION['setup_site_admin_password']; ?>" size="20" /></td></tr> <tr><td><span class="required">*</span></td> <td><b>确认 c3crm <em>admin</em> 密码</td> <td align="left"><input type="password" name="setup_site_admin_password_retype" value="<?php echo $_SESSION['setup_site_admin_password_retype']; ?>" size="20" /></td></tr> <tr><th colspan="3" align="left">C3CRM更新配置</td></tr> <tr><td></td> <td><b>允许C3CRM更新?</b><br><i>如果选择此项,那么你的系统将经常发送匿名信息到SugarCRM Inc,这些信息将帮助我们理解你们使用情况以便于我们更好的改善产品。同时,系统管理员也将经常收到有关新版本信息。</i></td> <td><input type="checkbox" class="checkbox" name="setup_site_sugarbeet" value="yes" <?php if($_SESSION['setup_site_sugarbeet']) echo 'checked="checked"'; ?> /></td></tr> <tr><th colspan="3" align="left">高级站点安全</td></tr> <tr><td></td> <td><b>使用默认值吗?</b></td> <td><input type="checkbox" class="checkbox" name="setup_site_defaults" value="yes" onclick="javascript:toggleSiteDefaults();" <?php if($_SESSION['setup_site_defaults']) echo 'checked="checked"'; ?> /></td></tr> <tbody id="setup_site_session_section_pre"> <tr><td></td> <td><b>Session目录</b><br>{必须允许写入}</td> <td><input type="checkbox" class="checkbox" name="setup_site_custom_session_path" value="yes" onclick="javascript:toggleSession();" <?php if($_SESSION['setup_site_custom_session_path']) echo 'checked="checked"'; ?> /></td></tr> </tbody> <tbody id="setup_site_session_section"> <tr><td><span class="required">*</span></td> <td><b>Session目录</b><br>(必须允许写入)</td> <td align="left"><input type="text" name="setup_site_session_path" size='40' value="<?php echo $_SESSION['setup_site_session_path']; ?>" /></td></tr> </tbody> <tbody id="setup_site_log_dir_pre"> <tr><td></td> <td><b>使用自定义日志目录</b><br>(必须允许写入)</td> <td><input type="checkbox" class="checkbox" name="setup_site_custom_log_dir" value="yes" onclick="javascript:toggleLogDir();" <?php if($_SESSION['setup_site_custom_log_dir']) echo 'checked="checked"'; ?> /></td></tr> </tbody> <tbody id="setup_site_log_dir"> <tr><td><span class="required">*</span></td> <td><b>日志目录</td> <td align="left"><input type="text" name="setup_site_log_dir" size='30' value="<?php echo $_SESSION['setup_site_log_dir']; ?>" /></td></tr> </tbody> <tbody id="setup_site_guid_section_pre"> <tr><td></td> <td><b>Provide Your Own Application ID</b><br> <em>Override the auto-generated application ID that prevents sessions from one instance of SugarCRM from being used on another instance. If you have a cluster of SugarCRM installations, they all must share the same application ID.</em></td> <td><input type="checkbox" class="checkbox" name="setup_site_specify_guid" value="yes" onclick="javascript:toggleGUID();" <?php if($_SESSION['setup_site_specify_guid']) echo 'checked="checked"'; ?> /></td></tr> </tbody> <tbody id="setup_site_guid_section"> <tr><td><span class="required">*</span></td> <td><b>Application ID</td> <td align="left"><input type="text" name="setup_site_guid" size='30' value="<?php echo $_SESSION['setup_site_guid']; ?>" /></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" onclick="window.open('http://www.c3crm.com/forums/');" value="帮助" /></td> <td> <input class="button" type="button" name="goto" value="上一步" onclick="document.getElementById('form').submit();" /> <input type="hidden" name="goto" value="Back" /> </td> <td><input class="button" type="submit" name="goto" value="下一步" /></td> </tr> </table> </td> </tr> </table> </form> <br> </body> </html>
Note: See TracBrowser for help on using the browser.