| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546 |
- <?php
- if (!defined('IN_ONLINE')) {
- exit('Access Denied');
- }
- if ($_SESSION['ONLINE_USER']['is_demo'] == "t") {
- $_CBP_DB['host'] = '192.168.0.168';
- $_CBP_DB['username'] = 'root';
- $_CBP_DB['password'] = 'uls';
- $_CBP_DB['dbname'] = 'redant_to_cbp_demo';
- $_CBP_DB['port'] = '5432';
- $_CBP_DB['type'] = 'postgres';
- } else {
- $_CBP_DB['host'] = '192.168.8.82';
- $_CBP_DB['username'] = 'ksmap';
- $_CBP_DB['password'] = 'A876ctG$Fex!!';
- $_CBP_DB['dbname'] = 'redant_online';
- $_CBP_DB['port'] = '5437';
- $_CBP_DB['type'] = 'postgres';
- // $_CBP_DB['host'] = '192.168.0.121';
- // $_CBP_DB['username'] = 'root';
- // $_CBP_DB['password'] = '123456';
- // $_CBP_DB['dbname'] = 'online_t_1125';
- // $_CBP_DB['port'] = '5434';
- // $_CBP_DB['type'] = 'postgres';
- // $_CBP_DB['host'] = '192.168.0.177';
- // $_CBP_DB['username'] = 'root';
- // $_CBP_DB['password'] = '123456';
- // if (!empty($_GET['_schemas'])) {
- // $_CBP_DB['dbname'] = 'redant_online_new2';
- // } else {
- // $_CBP_DB['dbname'] = 'redant_online_new2';
- // }
- // $_CBP_DB['port'] = '5433';
- // $_CBP_DB['type'] = 'postgres';
- }
- $mapdb_url = "host=" . $_CBP_DB['host'] . " port=" . $_CBP_DB['port'] . " dbname=" . $_CBP_DB['dbname'] . " user=" . $_CBP_DB['username'] . " password=" . $_CBP_DB['password'];
- $mapdb = NewADOConnection($_CBP_DB['type']);
- $mapdb->Connect($mapdb_url) or die('Connect Database Error');
- $ADODB_FETCH_MODE = ADODB_FETCH_ASSOC;
- //$mapdb->Execute("set client_encoding to 'gbk'");
- ?>
|