install
[ class tree: install ] [ index: install ] [ all elements ]

Source for file get_databases_inc.php

Documentation is available at get_databases_inc.php

  1. <?php
  2. /**
  3.  * check what db servers are available and display them accordingly - only seems to work with *nix
  4.  *
  5.  * @package install
  6.  * @subpackage functions
  7.  */
  8. $gBitDbCaseSensitivity TRUE;
  9. $dbtodsn array();
  10. iffunction_exists'mysql_connect' ) ) {
  11.     $dbtodsn['mysql''MySQL';
  12. }
  13. iffunction_exists'mysqli_connect' ) ) {
  14.     $dbtodsn['mysqli''MySQLi';
  15. }
  16. iffunction_exists'pg_connect' ) ) {
  17.     $dbtodsn['postgres''PostgreSQL';
  18. }
  19. iffunction_exists'ocilogon' ) ) {
  20.     $dbtodsn['oci8po''Oracle 8.i';
  21.     $gBitDbCaseSensitivity FALSE;
  22. }
  23. iffunction_exists'sybase_connect' ) ) {
  24.     $dbtodsn['sybase''Sybase';
  25. }
  26. iffunction_exists'mssql_connect' ) ) {
  27.     $dbtodsn['mssql''MS-SQL';
  28. }
  29. iffunction_exists'fbsql_connect' ) ) {
  30.     $dbtodsn['fbsql''FrontBase';
  31. }
  32. iffunction_exists'fbird_connect' ) ) {
  33.     $dbtodsn['firebird''Firebird';
  34.     if !empty($_REQUEST['fbpath']) ) $fbpath $_REQUEST['fbpath'];
  35.     if empty($fbpath) ) {
  36.         if is_windows() )
  37.             $fbpath 'c:\Program Files\Firebird\Firebird_2_1\bin\isql';
  38.         else
  39.             $fbpath '/opt/firebird/bin/isql';
  40.     }
  41.     $gBitSmarty->assign'fbpath'$fbpath );
  42.     if empty($gBitDbName) ) $gBitDbName 'bitweaver'}
  43.     $gBitDbCaseSensitivity FALSE;
  44.     if empty($gBitDbUser) ) {
  45.         $gBitDbUser 'SYSDBA';
  46.         $gBitDbPassword 'masterkey';
  47.     }
  48. iffunction_exists'sqlite_open' ) ) {
  49.     $dbtodsn['sqlite''SQLLite';
  50. }
  51. $gBitSmarty->assign_by_ref('dbservers'$dbtodsn);
  52.  
  53. $gBitSmarty->assign'gBitDbType'$gBitDbType );
  54. $gBitSmarty->assign'gBitDbHost'$gBitDbHost );
  55. $gBitSmarty->assign'gBitDbUser'$gBitDbUser );
  56. $gBitSmarty->assign'gBitDbPassword'$gBitDbPassword );
  57. $gBitSmarty->assign'gBitDbName'$gBitDbName );
  58. $gBitSmarty->assign'gBitDbCaseSensitivity'$gBitDbCaseSensitivity );
  59. $gBitSmarty->assign'db_prefix_bit'BIT_DB_PREFIX );
  60. $gBitSmarty->assign'bit_root_url'$bit_root_url );
  61. ifdefined'AUTO_BUG_SUBMIT' ) ) {
  62.     $gBitSmarty->assign'auto_bug_submit'AUTO_BUG_SUBMIT );
  63. }
  64.  
  65. $gBitSmarty->assign'gBitDbPassword_input'$gBitDbPassword );
  66. $gBitSmarty->assign'gBitDbPassword_print'preg_replace'/./','&bull;',$gBitDbPassword ) );
  67. ?>

Documentation generated on Wed, 29 Jul 2015 13:56:40 +0000 by phpDocumentor 1.5.0-lsces