|
@@ -291,11 +291,11 @@ class common {
|
|
|
$sqlWhere .= self::_bookingHandNew($user, $schames);
|
|
$sqlWhere .= self::_bookingHandNew($user, $schames);
|
|
|
}
|
|
}
|
|
|
if (strtolower($type) == "air_booking") {
|
|
if (strtolower($type) == "air_booking") {
|
|
|
- $sqlWhere .= self::_air($schames);
|
|
|
|
|
|
|
+ $sqlWhere .= self::_air($type,$schames);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
if (strtolower($type) == "air") {
|
|
if (strtolower($type) == "air") {
|
|
|
- $sqlWhere .= self::_air($schames);
|
|
|
|
|
|
|
+ $sqlWhere .= self::_air($type,$schames);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
} elseif (utils::count($schemas_list) == 2) {
|
|
} elseif (utils::count($schemas_list) == 2) {
|
|
@@ -349,24 +349,24 @@ class common {
|
|
|
}
|
|
}
|
|
|
if (strtolower($type) == "air_booking") {
|
|
if (strtolower($type) == "air_booking") {
|
|
|
$sqlWhere .= " and ((order_from='public' ";
|
|
$sqlWhere .= " and ((order_from='public' ";
|
|
|
- $sqlWhere .= self::_air("public");
|
|
|
|
|
|
|
+ $sqlWhere .= self::_air($type,"public");
|
|
|
$sqlWhere .= ") or (order_from='sfs' ";
|
|
$sqlWhere .= ") or (order_from='sfs' ";
|
|
|
if (empty($user["sfs_ONLINE_USER"])) {
|
|
if (empty($user["sfs_ONLINE_USER"])) {
|
|
|
$user = $_SESSION["sfs_ONLINE_USER"];
|
|
$user = $_SESSION["sfs_ONLINE_USER"];
|
|
|
}
|
|
}
|
|
|
- $sqlWhere .= self::_air("sfs");
|
|
|
|
|
|
|
+ $sqlWhere .= self::_air($type,"sfs");
|
|
|
$sqlWhere .= "))";
|
|
$sqlWhere .= "))";
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
if (strtolower($type) == "air") {
|
|
if (strtolower($type) == "air") {
|
|
|
$sqlWhere .= " and ((order_from='public' ";
|
|
$sqlWhere .= " and ((order_from='public' ";
|
|
|
- $sqlWhere .= self::_air($user, "public");
|
|
|
|
|
|
|
+ $sqlWhere .= self::_air($type, "public");
|
|
|
$sqlWhere .= ") or (order_from='sfs' ";
|
|
$sqlWhere .= ") or (order_from='sfs' ";
|
|
|
|
|
|
|
|
if (empty($user["sfs_ONLINE_USER"])) {
|
|
if (empty($user["sfs_ONLINE_USER"])) {
|
|
|
$user = $_SESSION["sfs_ONLINE_USER"];
|
|
$user = $_SESSION["sfs_ONLINE_USER"];
|
|
|
}
|
|
}
|
|
|
- $sqlWhere .= self::_air($user, "sfs");
|
|
|
|
|
|
|
+ $sqlWhere .= self::_air($type, "sfs");
|
|
|
$sqlWhere .= ") )";
|
|
$sqlWhere .= ") )";
|
|
|
}
|
|
}
|
|
|
} else {
|
|
} else {
|
|
@@ -596,12 +596,13 @@ class common {
|
|
|
$follow = $user['ocean_following_sales'];
|
|
$follow = $user['ocean_following_sales'];
|
|
|
$follow_or = $user['ocean_following_sales_or'];
|
|
$follow_or = $user['ocean_following_sales_or'];
|
|
|
|
|
|
|
|
|
|
+ $tableName = "kln_ocean";
|
|
|
$sqlWhere = "";
|
|
$sqlWhere = "";
|
|
|
if (_isCustomerLoginHandNew($user)) {
|
|
if (_isCustomerLoginHandNew($user)) {
|
|
|
- $sqlWhere .= " and " . _customerFilerSearchHandNew($user, $schemas);
|
|
|
|
|
|
|
+ $sqlWhere .= " and " . _customerFilerSearchHandNew($tableName,$user, $schemas);
|
|
|
} else {
|
|
} else {
|
|
|
//employee_search_type 的设置
|
|
//employee_search_type 的设置
|
|
|
- $sqlStr = _employeeFilerSearch('ocean','employee_contact_id_user','employee_company_name',$schemas);
|
|
|
|
|
|
|
+ $sqlStr = _employeeFilerSearch($tableName,'ocean','employee_contact_id_user','employee_company_name',$schemas);
|
|
|
|
|
|
|
|
if (empty($o) && empty($d) && empty($sales) && empty($op) && empty($follow)&& $sqlStr == "1<>1") {
|
|
if (empty($o) && empty($d) && empty($sales) && empty($op) && empty($follow)&& $sqlStr == "1<>1") {
|
|
|
return " and 1<>1";
|
|
return " and 1<>1";
|
|
@@ -724,12 +725,13 @@ class common {
|
|
|
$follow = $user['ocean_following_sales'];
|
|
$follow = $user['ocean_following_sales'];
|
|
|
$follow_or = $user['ocean_following_sales_or'];
|
|
$follow_or = $user['ocean_following_sales_or'];
|
|
|
|
|
|
|
|
|
|
+ $tableName = "kln_booking";
|
|
|
$sqlWhere = "";
|
|
$sqlWhere = "";
|
|
|
if (_isCustomerLoginHandNew($user)) {
|
|
if (_isCustomerLoginHandNew($user)) {
|
|
|
- $sqlWhere .= " and " . _customerFilerSearchHandNew($user, $schames);
|
|
|
|
|
|
|
+ $sqlWhere .= " and " . _customerFilerSearchHandNew($tableName,$user, $schames);
|
|
|
} else {
|
|
} else {
|
|
|
//employee_search_type 的设置
|
|
//employee_search_type 的设置
|
|
|
- $sqlStr = _employeeFilerSearch('ocean','employee_contact_id_user','employee_company_name',$schames);
|
|
|
|
|
|
|
+ $sqlStr = _employeeFilerSearch($tableName,'ocean','employee_contact_id_user','employee_company_name',$schames);
|
|
|
|
|
|
|
|
if (empty($o) && empty($d) && empty($sales) && empty($op) && empty($follow)&& $sqlStr == "1<>1") {
|
|
if (empty($o) && empty($d) && empty($sales) && empty($op) && empty($follow)&& $sqlStr == "1<>1") {
|
|
|
return " and 1<>1";
|
|
return " and 1<>1";
|
|
@@ -829,18 +831,24 @@ class common {
|
|
|
/**
|
|
/**
|
|
|
* online air
|
|
* online air
|
|
|
*/
|
|
*/
|
|
|
- private static function _air($schemas = "public") {
|
|
|
|
|
|
|
+ private static function _air($type,$schemas = "public") {
|
|
|
$station = _getAirStation($schemas);
|
|
$station = _getAirStation($schemas);
|
|
|
$station_or = _getAirStationOr($schemas);
|
|
$station_or = _getAirStationOr($schemas);
|
|
|
$sales = _getAirSales($schemas);
|
|
$sales = _getAirSales($schemas);
|
|
|
$sales_or = _getAirSalesOr($schemas);
|
|
$sales_or = _getAirSalesOr($schemas);
|
|
|
|
|
|
|
|
|
|
+ if (strtolower($type) == "air_booking") {
|
|
|
|
|
+ $tableName = "kln_booking";
|
|
|
|
|
+ } else {
|
|
|
|
|
+ $tableName = "kln_ocean";
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
$sqlWhere = " 1=1 ";
|
|
$sqlWhere = " 1=1 ";
|
|
|
if (_isCustomerLogin()) {
|
|
if (_isCustomerLogin()) {
|
|
|
- $sqlWhere .= " and " . _customerAirFilerSearch($schemas);
|
|
|
|
|
|
|
+ $sqlWhere .= " and " . _customerAirFilerSearch($tableName,$schemas);
|
|
|
} else {
|
|
} else {
|
|
|
//employee_search_type 的设置
|
|
//employee_search_type 的设置
|
|
|
- $sqlStr = _employeeFilerSearch('air','employee_air_contact_id_user','employee_air_company_name',$schemas);
|
|
|
|
|
|
|
+ $sqlStr = _employeeFilerSearch($tableName,'air','employee_air_contact_id_user','employee_air_company_name',$schemas);
|
|
|
|
|
|
|
|
if (empty($station) && empty($sales) && $sqlStr == "1<>1") {
|
|
if (empty($station) && empty($sales) && $sqlStr == "1<>1") {
|
|
|
return "and 1<>1";
|
|
return "and 1<>1";
|