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. if( function_exists( 'mysql_connect' ) ) {
  11.     $dbtodsn['mysql'] = 'MySQL';
  12. }
  13. if( function_exists( 'mysqli_connect' ) ) {
  14.     $dbtodsn['mysqli'] = 'MySQLi';
  15. }
  16. if( function_exists( 'pg_connect' ) ) {
  17.     $dbtodsn['postgres'] = 'PostgreSQL';
  18. }
  19. if( function_exists( 'ocilogon' ) ) {
  20.     $dbtodsn['oci8po'] = 'Oracle 8.i';
  21.     $gBitDbCaseSensitivity = FALSE;
  22. }
  23. if( function_exists( 'sybase_connect' ) ) {
  24.     $dbtodsn['sybase'] = 'Sybase';
  25. }
  26. if( function_exists( 'mssql_connect' ) ) {
  27.     $dbtodsn['mssql'] = 'MS-SQL';
  28. }
  29. if( function_exists( 'fbsql_connect' ) ) {
  30.     $dbtodsn['fbsql'] = 'FrontBase';
  31. }
  32. if( function_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. } 
  49. if( function_exists( 'sqlite_open' ) ) {
  50.     $dbtodsn['sqlite'] = 'SQLLite';
  51. }
  52. $gBitSmarty->assign_by_ref('dbservers', $dbtodsn);
  53.  
  54. $gBitSmarty->assign( 'gBitDbType', $gBitDbType );
  55. $gBitSmarty->assign( 'gBitDbHost', $gBitDbHost );
  56. $gBitSmarty->assign( 'gBitDbUser', $gBitDbUser );
  57. $gBitSmarty->assign( 'gBitDbPassword', $gBitDbPassword );
  58. $gBitSmarty->assign( 'gBitDbName', $gBitDbName );
  59. $gBitSmarty->assign( 'gBitDbCaseSensitivity', $gBitDbCaseSensitivity );
  60. $gBitSmarty->assign( 'db_prefix_bit', BIT_DB_PREFIX );
  61. $gBitSmarty->assign( 'bit_root_url', $bit_root_url );
  62. if( defined( 'AUTO_BUG_SUBMIT' ) ) {
  63.     $gBitSmarty->assign( 'auto_bug_submit', AUTO_BUG_SUBMIT );
  64. }
  65.  
  66. $gBitSmarty->assign( 'gBitDbPassword_input', $gBitDbPassword );
  67. $gBitSmarty->assign( 'gBitDbPassword_print', preg_replace( '/./','&bull;',$gBitDbPassword ) );
  68. ?>

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