config.dist.php 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. <?php
  2. /**
  3. * This is the configuration file allowing you to connect to the origin
  4. * database. You should either fill this one in or generate your own
  5. * copy as config.php
  6. */
  7. /**
  8. * Define all connection variables
  9. */
  10. /*
  11. * The database type allows you to define with database driver to use.
  12. * Currently allowed values are: mssql. Defaults to: mssql
  13. */
  14. $db_type = 'mssql';
  15. /*
  16. * The database host is the name of the server on which the origin
  17. * database is located. This name should be routeable by PHP.
  18. * Defaults to: localhost
  19. */
  20. //$db_host = 'localhost';
  21. /*
  22. * The database port is the port on which to connect on the origin
  23. * database host. The default port for MS-SQL is 1433, which we
  24. * use as a default port here. Defaults to: 1433
  25. */
  26. $db_port = '1433';
  27. /*
  28. * The database user is the name under which to connect to the
  29. * origin database server. Defaults to: lms
  30. */
  31. $db_user = 'user_of_db';
  32. /*
  33. * The database password is the password for the user on the origin
  34. * database server. Defaults to: password
  35. */
  36. $db_pass = '**********';
  37. /*
  38. * The database name on the database origin server.
  39. * Defaults to: master
  40. */
  41. $db_name = 'master1';
  42. //second DB
  43. $db_name2 = 'master';
  44. $config = array(
  45. 'type' => $db_type,
  46. 'host' => $db_host,
  47. 'port' => $db_port,
  48. 'db_user' => $db_user,
  49. 'db_pass' => $db_pass,
  50. 'db_name' => $db_name,
  51. );
  52. $config2 = array(
  53. 'type' => $db_type,
  54. 'host' => $db_host,
  55. 'port' => $db_port,
  56. 'db_user' => $db_user,
  57. 'db_pass' => $db_pass,
  58. 'db_name' => $db_name2,
  59. );
  60. $servers = array(
  61. array( 'name' => 'Old ms',
  62. 'filename' => 'db_matches.php',
  63. 'connection' => $config,
  64. 'active' => false
  65. ),
  66. array( 'name' => 'with e class stuff',
  67. 'filename' => 'db_matches_2.php',
  68. 'connection' => $config2,
  69. 'active' => true
  70. ),
  71. );
  72. /**
  73. * Load the real configuration file (except if we're already in config.php)
  74. */
  75. if ((basename(__FILE__) != 'config.php') && is_file('config.php')) {
  76. include 'config.php';
  77. }