map_config.ini.php 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  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. // $_DB['host'] = '172.31.2.157';
  36. // $_DB['username'] = 'ksroot';
  37. // $_DB['password'] = 'czZ7!HGSGMRPwWbypC9w';
  38. // if (!empty($_GET['_schemas'])) {
  39. // $_DB['dbname'] = 'online';
  40. // } else {
  41. // $_DB['dbname'] = 'online';
  42. // }
  43. // $_DB['port'] = '5432';
  44. // $_DB['type'] = 'postgres';
  45. }
  46. $mapdb_url = "host=" . $_CBP_DB['host'] . " port=" . $_CBP_DB['port'] . " dbname=" . $_CBP_DB['dbname'] . " user=" . $_CBP_DB['username'] . " password=" . $_CBP_DB['password'];
  47. $mapdb = NewADOConnection($_CBP_DB['type']);
  48. $mapdb->Connect($mapdb_url) or die('Connect Database Error');
  49. $ADODB_FETCH_MODE = ADODB_FETCH_ASSOC;
  50. //$mapdb->Execute("set client_encoding to 'gbk'");
  51. ?>