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

Source for file install_database.php

Documentation is available at install_database.php

  1. <?php
  2. /**
  3.  * @version $Header: /cvsroot/bitweaver/_bit_install/install_database.php,v 1.18 2007/01/11 08:41:37 squareing Exp $
  4.  * @package install
  5.  * @subpackage functions
  6.  */
  7.  
  8. /**
  9.  * assign next step in installation process
  10.  */ 
  11. $gBitSmarty->assign'next_step',$step );
  12.  
  13. require_once"get_databases_inc.php" );
  14.  
  15. // next block checks if there is a config_inc.php and if we can connect through this.
  16. ifisset$_REQUEST['submit_db_info')) {
  17.     if$gBitDbType == 'sybase' {
  18.         // avoid database change messages
  19.         ini_set'sybct.min_server_severity''11' );
  20.     }
  21.  
  22.     $gBitDb &ADONewConnection$gBitDbType );
  23.  
  24.     if$gBitDb->Connect$gBitDbHost$gBitDbUser$gBitDbPassword$gBitDbName )) {
  25.         // display success page when done
  26.         $app '_done';
  27.         $gBitSmarty->assign'next_step',$step );
  28.         // this is where we tell the installer that this is the first install
  29. // if so, clear out session variables
  30.         // if we are coming here from the upgrade process, don't change any value
  31.         
  32.         ifisset$_SESSION['first_install'&& $_SESSION['first_install'== TRUE && isset$_SESSION['upgrade'&& $_SESSION['upgrade'== TRUE {
  33.             // nothing to do
  34.         elseif!$gBitUser->isAdmin() ) {
  35.             $_SESSION NULL;
  36.             $_SESSION['first_install'TRUE;
  37.         else {
  38.             $_SESSION['first_install'FALSE;
  39.         }
  40.     else {
  41.         $gBitSmarty->assign'error'TRUE );
  42.         $gBitSmarty->assign'errorMsg'$gBitDb->_errorMsg );
  43.         $error TRUE;
  44.     }
  45. }
  46. ?>

Documentation generated on Thu, 15 Feb 2007 20:41:28 +0000 by phpDocumentor 1.3.0