|
@@ -12,12 +12,12 @@ if ($_SESSION['ONLINE_USER']['is_demo'] == "t") {
|
|
|
$_CBP_DB['port'] = '5432';
|
|
$_CBP_DB['port'] = '5432';
|
|
|
$_CBP_DB['type'] = 'postgres';
|
|
$_CBP_DB['type'] = 'postgres';
|
|
|
} else {
|
|
} 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.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['host'] = '192.168.0.121';
|
|
|
// $_CBP_DB['username'] = 'root';
|
|
// $_CBP_DB['username'] = 'root';
|
|
@@ -25,6 +25,17 @@ if ($_SESSION['ONLINE_USER']['is_demo'] == "t") {
|
|
|
// $_CBP_DB['dbname'] = 'online_t_1125';
|
|
// $_CBP_DB['dbname'] = 'online_t_1125';
|
|
|
// $_CBP_DB['port'] = '5434';
|
|
// $_CBP_DB['port'] = '5434';
|
|
|
// $_CBP_DB['type'] = 'postgres';
|
|
// $_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_url = "host=" . $_CBP_DB['host'] . " port=" . $_CBP_DB['port'] . " dbname=" . $_CBP_DB['dbname'] . " user=" . $_CBP_DB['username'] . " password=" . $_CBP_DB['password'];
|
|
@@ -32,22 +43,4 @@ $mapdb = NewADOConnection($_CBP_DB['type']);
|
|
|
$mapdb->Connect($mapdb_url) or die('Connect Database Error');
|
|
$mapdb->Connect($mapdb_url) or die('Connect Database Error');
|
|
|
$ADODB_FETCH_MODE = ADODB_FETCH_ASSOC;
|
|
$ADODB_FETCH_MODE = ADODB_FETCH_ASSOC;
|
|
|
//$mapdb->Execute("set client_encoding to 'gbk'");
|
|
//$mapdb->Execute("set client_encoding to 'gbk'");
|
|
|
-
|
|
|
|
|
-//打開詳細頁面時指定模式
|
|
|
|
|
-if (!empty($_REQUEST['_schemas'])) {
|
|
|
|
|
- $mapdb->Execute("SET search_path TO " . $_REQUEST['_schemas'] . ";");
|
|
|
|
|
-} elseif (!empty($_REQUEST['__schemas'])) {//部分report
|
|
|
|
|
- $mapdb->Execute("SET search_path TO " . $_REQUEST['__schemas'] . ";");
|
|
|
|
|
-} else {
|
|
|
|
|
- //超级管理员有没有选择数据库模式
|
|
|
|
|
- if (!empty($_SESSION['_current_schemas'])) {
|
|
|
|
|
- $mapdb->Execute("SET search_path TO " . $_SESSION['_current_schemas'] . ";");
|
|
|
|
|
- } else {
|
|
|
|
|
- if (empty($_SESSION['ONLINE_USER']['main_schemas'])) {
|
|
|
|
|
- $mapdb->Execute("SET search_path TO public;");
|
|
|
|
|
- } else {
|
|
|
|
|
- $mapdb->Execute("SET search_path TO " . $_SESSION['ONLINE_USER']['main_schemas'] . ";");
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
-}
|
|
|
|
|
?>
|
|
?>
|