map_config.ini.php 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. <?php
  2. if (!defined('IN_ONLINE')) {
  3. exit('Access Denied');
  4. }
  5. if ($_SESSION['ONLINE_USER']['is_demo'] == "t") {
  6. $_CBP_DB['host'] = '192.168.0.168';
  7. $_CBP_DB['username'] = 'root';
  8. $_CBP_DB['password'] = 'uls';
  9. $_CBP_DB['dbname'] = 'redant_to_cbp_demo';
  10. $_CBP_DB['port'] = '5432';
  11. $_CBP_DB['type'] = 'postgres';
  12. } else {
  13. // $_CBP_DB['host'] = '192.168.8.82';
  14. // $_CBP_DB['username'] = 'ksmap';
  15. // $_CBP_DB['password'] = 'A876ctG$Fex!!';
  16. // $_CBP_DB['dbname'] = 'redant_online';
  17. // $_CBP_DB['port'] = '5437';
  18. // $_CBP_DB['type'] = 'postgres';
  19. // $_CBP_DB['host'] = '192.168.0.121';
  20. // $_CBP_DB['username'] = 'root';
  21. // $_CBP_DB['password'] = '123456';
  22. // $_CBP_DB['dbname'] = 'online_t_1125';
  23. // $_CBP_DB['port'] = '5434';
  24. // $_CBP_DB['type'] = 'postgres';
  25. $_CBP_DB['host'] = '192.168.0.177';
  26. $_CBP_DB['username'] = 'root';
  27. $_CBP_DB['password'] = '123456';
  28. if (!empty($_GET['_schemas'])) {
  29. $_CBP_DB['dbname'] = 'redant_online_new2';
  30. } else {
  31. $_CBP_DB['dbname'] = 'redant_online_new2';
  32. }
  33. $_CBP_DB['port'] = '5433';
  34. $_CBP_DB['type'] = 'postgres';
  35. }
  36. $mapdb_url = "host=" . $_CBP_DB['host'] . " port=" . $_CBP_DB['port'] . " dbname=" . $_CBP_DB['dbname'] . " user=" . $_CBP_DB['username'] . " password=" . $_CBP_DB['password'];
  37. $mapdb = NewADOConnection($_CBP_DB['type']);
  38. $mapdb->Connect($mapdb_url) or die('Connect Database Error');
  39. $ADODB_FETCH_MODE = ADODB_FETCH_ASSOC;
  40. //$mapdb->Execute("set client_encoding to 'gbk'");
  41. ?>