iTx Technologies offre gratuitement
cet espace pour SugarCRM !

title

Body

[fermer]

/install/ -> systemOptions.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  if( !isset( $install_script ) || !$install_script ){
  39      die($mod_strings['ERR_NO_DIRECT_SCRIPT']);
  40  }
  41  if(!isset($_SESSION['setup_db_type']) || $_SESSION['setup_db_type'] ==''){
  42   $_SESSION['setup_db_type'] = 'mysql';   
  43  }
  44  $setup_db_type = $_SESSION['setup_db_type'];
  45  
  46  $errs = '';
  47  if(isset($validation_errors)) {
  48      if(count($validation_errors) > 0) {
  49          $errs  = '<div id="errorMsgs">';
  50          $errs .= "<p>{$mod_strings['LBL_SYSOPTS_ERRS_TITLE']}</p>";
  51          $errs .= '<ul>';
  52  
  53          foreach($validation_errors as $error) {
  54              $errs .= '<li>' . $error . '</li>';
  55          }
  56  
  57          $errs .= '</ul>';
  58          $errs .= '</div>';
  59      }
  60  }
  61  
  62  $mysql = '';
  63  $oci8 = '';
  64  $mssql = '';
  65  if($setup_db_type == "mysql")
  66      $mysql = 'checked="checked"';
  67  else if ($setup_db_type == "mssql")
  68      $mssql = 'checked="checked"';
  69  
  70  
  71  
  72  
  73  
  74  
  75  $out=<<<EOQ
  76  <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
  77  <html>
  78  <head>
  79     <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  80     <meta http-equiv="Content-Script-Type" content="text/javascript">
  81     <meta http-equiv="Content-Style-Type" content="text/css">
  82     <title>{$mod_strings['LBL_WIZARD_TITLE']} {$mod_strings['LBL_SYSOPTS_DB_TITLE']}</title>
  83     <link REL="SHORTCUT ICON" HREF="include/images/sugar_icon.ico">
  84     <link rel="stylesheet" href="install/install.css" type="text/css" />
  85     <script type="text/javascript" src="install/installCommon.js"></script>
  86  </head>
  87  <body onload="document.getElementById('defaultFocus').focus();">
  88  <form action="install.php" method="post" name="systemOptions" id="form">
  89  
  90  <table cellspacing="0" cellpadding="0" border="0" align="center" class="shell">
  91        <tr><td colspan="2" id="help"><a href="{$help_url}" target='_blank'>{$mod_strings['LBL_HELP']} </a></td></tr>
  92      <tr>
  93        <th width="500">
  94          <p><img src="include/images/sugar_md.png" alt="SugarCRM" border="0"></p>
  95      {$mod_strings['LBL_SYSOPTS_DB_TITLE']}</th>
  96      <th width="200" style="text-align: right;">
  97          <a href="http://www.sugarcrm.com" target="_blank"><IMG src="include/images/sugarcrm_login.png" width="145" height="30" alt="SugarCRM" border="0"></a>
  98          </th>
  99  </tr>
 100  <tr>
 101     <td colspan="2">    
 102          {$errs}
 103  
 104  
 105  <table width="100%" cellpadding="0" cellpadding="0" border="0" class="StyleDottedHr">
 106  <tr><th colspan="3" align="left">{$mod_strings['LBL_SYSOPTS_DB']}</td></tr>
 107  <tr><td colspan="3" align="left">{$mod_strings['LBL_SYSOPTS_2']}</td></tr>
 108  <tr>
 109      <td>&nbsp;</td>
 110      <td align="left">
 111          <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']}
 112  EOQ;
 113  //check to see if mysqli is enabled
 114  if(function_exists('mysqli_connect')){
 115      $_SESSION['mysql_type'] = 'mysqli';
 116      $out.=' &nbsp;(MySQLi detected)<br>';
 117  }else{
 118       $out.= '<br>';
 119  }    
 120  // Removed php_sqlsrv install support until the driver support is out of beta status
 121  if(function_exists('mssql_connect') /*|| function_exists('sqlsrv_connect')*/){
 122  $out.=<<<EOQ
 123          <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']}
 124  EOQ;
 125  }
 126  //check to see if sqlsrv is enabled
 127  // Removed php_sqlsrv install support until the driver support is out of beta status
 128  //if(function_exists('sqlsrv_connect') && !function_exists('mssql_connect')){
 129  //    $_SESSION['mssql_type'] = 'sqlsrv';
 130  //    $out.=' &nbsp;(Microsoft SQL Server Driver for PHP detected)<br>';
 131  //}else{
 132       $out.= '<br>';
 133  //}
 134  
 135  
 136  
 137  
 138  
 139  
 140  
 141  
 142  
 143  
 144  $out.=<<<EOQ
 145      </td>
 146      <td width='350'nowrap>&nbsp;
 147      <div name="ociMsg" id="ociMsg" style="display:none">
 148  
 149  
 150  
 151      </div>
 152      
 153      </td>
 154          
 155  </tr>
 156  </table>
 157  </td>
 158  </tr>
 159  <tr>
 160  <td align="right" colspan="2">
 161  <hr>
 162       <input type="hidden" name="current_step" value=" $next_step ">
 163       <table cellspacing="0" cellpadding="0" border="0" class="stdTable">
 164         <tr>
 165           <td>
 166              <input class="button" type="button" value="{$mod_strings['LBL_BACK']}" onclick="document.getElementById('form').submit();" />
 167              <input type="hidden" name="goto" value="{$mod_strings['LBL_BACK']}" />
 168           </td>
 169           <td><input class="button" type="submit" id="defaultFocus" name="goto" value="{$mod_strings['LBL_NEXT']}" /></td>
 170         </tr>
 171       </table>
 172  </td>
 173  </tr>
 174  </table>
 175  </form>
 176  </body>
 177  </html>
 178  EOQ;
 179  echo $out;
 180  ?>


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