iTx Technologies offre gratuitement
cet espace pour SugarCRM !

title

Body

[fermer]

/install/ -> siteConfig_b.php (source)

   1  <?php
   2  if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
   3  /*********************************************************************************
   4   * SugarCRM is a customer relationship management program developed by
   5   * SugarCRM, Inc. Copyright (C) 2004 - 2009 SugarCRM Inc.
   6   * 
   7   * This program is free software; you can redistribute it and/or modify it under
   8   * the terms of the GNU General Public License version 3 as published by the
   9   * Free Software Foundation with the addition of the following permission added
  10   * to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
  11   * IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
  12   * OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
  13   * 
  14   * This program is distributed in the hope that it will be useful, but WITHOUT
  15   * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
  16   * FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more
  17   * details.
  18   * 
  19   * You should have received a copy of the GNU General Public License along with
  20   * this program; if not, see http://www.gnu.org/licenses or write to the Free
  21   * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
  22   * 02110-1301 USA.
  23   * 
  24   * You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
  25   * SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
  26   * 
  27   * The interactive user interfaces in modified source and object code versions
  28   * of this program must display Appropriate Legal Notices, as required under
  29   * Section 5 of the GNU General Public License version 3.
  30   * 
  31   * In accordance with Section 7(b) of the GNU General Public License version 3,
  32   * these Appropriate Legal Notices must retain the display of the "Powered by
  33   * SugarCRM" logo. If the display of the logo is not reasonably feasible for
  34   * technical reasons, the Appropriate Legal Notices must display the words
  35   * "Powered by SugarCRM".
  36   ********************************************************************************/
  37  
  38  
  39  
  40  if( !isset( $install_script ) || !$install_script ){
  41      die($mod_strings['ERR_NO_DIRECT_SCRIPT']);
  42  }
  43  
  44  if( is_file("config.php") ){
  45      
  46      
  47  
  48      if(!empty($sugar_config['default_theme']))
  49        $_SESSION['site_default_theme'] = $sugar_config['default_theme'];
  50  
  51      if(!empty($sugar_config['disable_persistent_connections']))
  52          $_SESSION['disable_persistent_connections'] =
  53          $sugar_config['disable_persistent_connections'];
  54      if(!empty($sugar_config['default_language']))
  55          $_SESSION['default_language'] = $sugar_config['default_language'];
  56      if(!empty($sugar_config['translation_string_prefix']))
  57          $_SESSION['translation_string_prefix'] = $sugar_config['translation_string_prefix'];
  58      if(!empty($sugar_config['default_charset']))
  59          $_SESSION['default_charset'] = $sugar_config['default_charset'];
  60  
  61      if(!empty($sugar_config['default_currency_name']))
  62          $_SESSION['default_currency_name'] = $sugar_config['default_currency_name'];
  63      if(!empty($sugar_config['default_currency_symbol']))
  64          $_SESSION['default_currency_symbol'] = $sugar_config['default_currency_symbol'];
  65      if(!empty($sugar_config['default_currency_iso4217']))
  66          $_SESSION['default_currency_iso4217'] = $sugar_config['default_currency_iso4217'];
  67  
  68      if(!empty($sugar_config['rss_cache_time']))
  69          $_SESSION['rss_cache_time'] = $sugar_config['rss_cache_time'];
  70      if(!empty($sugar_config['languages']))
  71      {
  72          // We need to encode the languages in a way that can be retrieved later.
  73          $language_keys = Array();
  74          $language_values = Array();
  75  
  76          foreach($sugar_config['languages'] as $key=>$value)
  77          {
  78              $language_keys[] = $key;
  79              $language_values[] = $value;
  80          }
  81  
  82          $_SESSION['language_keys'] = urlencode(implode(",",$language_keys));
  83          $_SESSION['language_values'] = urlencode(implode(",",$language_values));
  84      }
  85  }
  86  
  87  ////    errors
  88  $errors = '';
  89  if( isset($validation_errors) ){
  90      if( count($validation_errors) > 0 ){
  91          $errors  = '<div id="errorMsgs">';
  92          $errors .= '<p>'.$mod_strings['LBL_SITECFG_FIX_ERRORS'].'</p><ul>';
  93          foreach( $validation_errors as $error ){
  94              $errors .= '<li>' . $error . '</li>';
  95          }
  96          $errors .= '</ul></div>';
  97      }
  98  }
  99  
 100  
 101  ////    ternaries
 102  $sugarUpdates = (isset($_SESSION['setup_site_sugarbeet']) && !empty($_SESSION['setup_site_sugarbeet'])) ? 'checked="checked"' : '';
 103  $siteSecurity = (isset($_SESSION['setup_site_defaults']) && !empty($_SESSION['setup_site_defaults'])) ? 'checked="checked"' : '';
 104  $customSession = (isset($_SESSION['setup_site_custom_session_path']) && !empty($_SESSION['setup_site_custom_session_path'])) ? 'checked="checked"' : '';
 105  $customLog = (isset($_SESSION['setup_site_custom_log_dir']) && !empty($_SESSION['setup_site_custom_log_dir'])) ? 'checked="checked"' : '';
 106  $customId = (isset($_SESSION['setup_site_specify_guid']) && !empty($_SESSION['setup_site_specify_guid'])) ? 'checked="checked"' : '';
 107  
 108  ///////////////////////////////////////////////////////////////////////////////
 109  ////    START OUTPUT
 110  $out =<<<EOQ
 111  <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
 112  <html>
 113  <head>
 114     <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
 115     <meta http-equiv="Content-Script-Type" content="text/javascript">
 116     <meta http-equiv="Content-Style-Type" content="text/css">
 117     <title>{$mod_strings['LBL_WIZARD_TITLE']} {$mod_strings['LBL_SITECFG_SECURITY_TITLE']}</title>
 118     <link REL="SHORTCUT ICON" HREF="include/images/sugar_icon.ico">
 119     <link rel="stylesheet" href="install/install.css" type="text/css" />
 120     <script type="text/javascript" src="install/installCommon.js"></script>
 121     <script type="text/javascript" src="install/siteConfig.js"></script>
 122  </head>
 123  <body onload="javascript:toggleGUID();toggleSession();toggleLogDir();document.getElementById('defaultFocus').focus();">
 124  <form action="install.php" method="post" name="setConfig" id="form">
 125  <input type="hidden" name="current_step" value="{$next_step}">
 126  <table cellspacing="0" cellpadding="0" border="0" align="center" class="shell">
 127        <tr><td colspan="2" id="help"><a href="{$help_url}" target='_blank'>{$mod_strings['LBL_HELP']} </a></td></tr>
 128      <tr>
 129        <th width="500">
 130          <p><img src="include/images/sugar_md.png" alt="SugarCRM" border="0"></p>
 131     {$mod_strings['LBL_SITECFG_SECURITY_TITLE']}</th>
 132     <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>
 133     </tr>
 134  <tr>
 135      <td colspan="2">
 136      {$errors}
 137     <div class="required">{$mod_strings['LBL_REQUIRED']}</div>
 138     <table width="100%" cellpadding="0" cellpadding="0" border="0" class="StyleDottedHr">
 139     <tr><th colspan="3" align="left">{$mod_strings['LBL_SITECFG_SITE_SECURITY']}</td></tr>
 140  
 141  EOQ;
 142  
 143  
 144  
 145  $checked = '';
 146  if(!empty($_SESSION['setup_site_sugarbeet_anonymous_stats'])) $checked = 'checked="checked"'; 
 147  $out .= "
 148     <tr><td></td>       
 149         <td><input type='checkbox' class='checkbox' name='setup_site_sugarbeet_anonymous_stats' value='yes' $checked /></td>
 150         <td><b>{$mod_strings['LBL_SITECFG_ANONSTATS']}</b><br><i>{$mod_strings['LBL_SITECFG_ANONSTATS_DIRECTIONS']}</i></td></tr>
 151         
 152  ";
 153  
 154  
 155  
 156  
 157  $checked = '';
 158  if(!empty($_SESSION['setup_site_sugarbeet_automatic_checks'])) $checked = 'checked="checked"'; 
 159  $out .= <<<EOQ
 160     <tr><td></td>       
 161         <td><input type="checkbox" class="checkbox" name="setup_site_sugarbeet_automatic_checks" value="yes" checked="checked" /></td>
 162         <td><b>{$mod_strings['LBL_SITECFG_SUGAR_UP']}</b><br><i>{$mod_strings['LBL_SITECFG_SUGAR_UP_DIRECTIONS']}</i><br>&nbsp;</td></tr>
 163     <tbody id="setup_site_session_section_pre">
 164     <tr><td></td>       
 165         <td><input type="checkbox" class="checkbox" name="setup_site_custom_session_path" value="yes" onclick="javascript:toggleSession();" {$customSession} /></td>
 166         <td><b>{$mod_strings['LBL_SITECFG_CUSTOM_SESSION']}</b><br>
 167              <em>{$mod_strings['LBL_SITECFG_CUSTOM_SESSION_DIRECTIONS']}</em><br>&nbsp;</td>
 168     </tr>
 169     </tbody>
 170     <tbody id="setup_site_session_section">
 171     <tr><td></td>
 172         <td style="text-align : right;"><span class="required">*</span></td>
 173         <td align="left">
 174             <div><div style="width:200px;float:left"><b>{$mod_strings['LBL_SITECFG_SESSION_PATH']}</b></div>
 175                     <input type="text" name="setup_site_session_path" size='40' value="{$_SESSION['setup_site_session_path']}" /></td>
 176             </div>       
 177         </td>
 178     </tr>
 179     </tbody>
 180     <tbody id="setup_site_log_dir_pre">
 181     <tr><td></td>       
 182         <td><input type="checkbox" class="checkbox" name="setup_site_custom_log_dir" value="yes" onclick="javascript:toggleLogDir();" {$customLog} /></td>
 183         <td><b>{$mod_strings['LBL_SITECFG_CUSTOM_LOG']}</b><br>
 184              <em>{$mod_strings['LBL_SITECFG_CUSTOM_LOG_DIRECTIONS']}</em><br>&nbsp;</td>
 185     </tr>
 186     </tbody>
 187     <tbody id="setup_site_log_dir">
 188     <tr><td></td>       
 189         <td style="text-align : right;" ><span class="required">*</span></td>
 190         <td align="left">
 191         <div><div style="width:200px;float:left"><b>{$mod_strings['LBL_SITECFG_LOG_DIR']}</b></div>
 192              <input type="text" name="setup_site_log_dir" size='30' value="{$_SESSION['setup_site_log_dir']}" />
 193         </div>
 194     </tr>
 195     </tbody>
 196     <tbody id="setup_site_guid_section_pre">
 197     <tr><td></td>       
 198         <td><input type="checkbox" class="checkbox" name="setup_site_specify_guid" value="yes" onclick="javascript:toggleGUID();" {$customId} /></td>
 199         <td><b>{$mod_strings['LBL_SITECFG_CUSTOM_ID']}</b><br>
 200              <em>{$mod_strings['LBL_SITECFG_CUSTOM_ID_DIRECTIONS']}</em><br>&nbsp;</td>  
 201     </tr>
 202     </tbody>
 203     <tbody id="setup_site_guid_section">
 204     <tr><td></td>
 205         <td style="text-align : right;"><span class="required">*</span></td>
 206         <td align="left">
 207             <div><div style="width:200px;float:left"><b>{$mod_strings['LBL_SITECFG_APP_ID']}</b></div>
 208                     <input type="text" name="setup_site_guid" size='30' value="{$_SESSION['setup_site_guid']}" />
 209             </div>      
 210         </td>       
 211     </tr>
 212     </tbody>
 213  </table>
 214  </td>
 215  </tr>
 216  <tr>
 217     <td align="right" colspan="2">
 218     <hr>
 219     <table cellspacing="0" cellpadding="0" border="0" class="stdTable">
 220     <tr>
 221      <td>
 222          <input class="button" type="button" name="goto" value="{$mod_strings['LBL_BACK']}" onclick="document.getElementById('form').submit();" />
 223          <input type="hidden" name="goto" value="{$mod_strings['LBL_BACK']}" />
 224      </td>
 225     <td><input class="button" type="submit" id="defaultFocus" name="goto" value="{$mod_strings['LBL_NEXT']}" /></td>
 226     </tr>
 227     </table>
 228  </td>
 229  </tr>
 230  </table>
 231  </form>
 232  <br>
 233  </body>
 234  </html>
 235  
 236  EOQ;
 237  
 238  echo $out;
 239  ?>


Generé en: Thu Mar 4 09:44:50 2010 | Cross-referenced par PHPXref 0.7