|
@@ -245,7 +245,7 @@ class tools {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
if ($operate == "subscribe_shipment"){
|
|
if ($operate == "subscribe_shipment"){
|
|
|
- $serial_no = common::check_input($_POST['serial_no']);
|
|
|
|
|
|
|
+ $serial_no = common::deCode($_GET['serial_no'], 'D');
|
|
|
$is_subscribe = common::check_input($_POST['is_subscribe']);
|
|
$is_subscribe = common::check_input($_POST['is_subscribe']);
|
|
|
if($is_subscribe == "yes"){
|
|
if($is_subscribe == "yes"){
|
|
|
$exist = common::excuteOneSql("select user_login from public.kln_user_subscribed where lower(user_login) = '".strtolower(_getLoginName())."' and subscribed_serial_no = '$serial_no'");
|
|
$exist = common::excuteOneSql("select user_login from public.kln_user_subscribed where lower(user_login) = '".strtolower(_getLoginName())."' and subscribed_serial_no = '$serial_no'");
|
|
@@ -265,7 +265,7 @@ class tools {
|
|
|
//取消订阅
|
|
//取消订阅
|
|
|
$sql = "delete from public.kln_user_subscribed where lower(user_login) = '".strtolower(_getLoginName())."' and subscribed_serial_no = '$serial_no';";
|
|
$sql = "delete from public.kln_user_subscribed where lower(user_login) = '".strtolower(_getLoginName())."' and subscribed_serial_no = '$serial_no';";
|
|
|
common::excuteUpdateSql($sql);
|
|
common::excuteUpdateSql($sql);
|
|
|
- $data = array("msg" => "Cancel successfully");
|
|
|
|
|
|
|
+ $data = array("msg" => "Cancel Subscribe successfully");
|
|
|
common::echo_json_encode(200,$data);
|
|
common::echo_json_encode(200,$data);
|
|
|
exit();
|
|
exit();
|
|
|
}
|
|
}
|
|
@@ -617,16 +617,28 @@ class tools {
|
|
|
$ocean_etd_change = $_POST['ocean_etd_change'];
|
|
$ocean_etd_change = $_POST['ocean_etd_change'];
|
|
|
$ocean_etd_old_sub_new = $_POST['ocean_etd_old_sub_new'];
|
|
$ocean_etd_old_sub_new = $_POST['ocean_etd_old_sub_new'];
|
|
|
$ocean_etd_old_sub_new_unit = $_POST['ocean_etd_old_sub_new_unit'];
|
|
$ocean_etd_old_sub_new_unit = $_POST['ocean_etd_old_sub_new_unit'];
|
|
|
|
|
+ if(!empty($ocean_etd_old_sub_new_unit)){
|
|
|
|
|
+ $ocean_etd_old_sub_new_unit = $ocean_etd_old_sub_new_unit=="Day(s)" ? "days":"hours";
|
|
|
|
|
+ }
|
|
|
$ocean_eta_change = $_POST['ocean_eta_change'];
|
|
$ocean_eta_change = $_POST['ocean_eta_change'];
|
|
|
$ocean_eta_old_sub_new = $_POST['ocean_eta_old_sub_new'];
|
|
$ocean_eta_old_sub_new = $_POST['ocean_eta_old_sub_new'];
|
|
|
$ocean_eta_old_sub_new_unit = $_POST['ocean_eta_old_sub_new_unit'];
|
|
$ocean_eta_old_sub_new_unit = $_POST['ocean_eta_old_sub_new_unit'];
|
|
|
|
|
+ if(!empty($ocean_eta_old_sub_new_unit)){
|
|
|
|
|
+ $ocean_eta_old_sub_new_unit = $ocean_eta_old_sub_new_unit=="Day(s)" ? "days":"hours";
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
$air_etd_change = $_POST['air_etd_change'];
|
|
$air_etd_change = $_POST['air_etd_change'];
|
|
|
$air_etd_old_sub_new = $_POST['air_etd_old_sub_new'];
|
|
$air_etd_old_sub_new = $_POST['air_etd_old_sub_new'];
|
|
|
$air_etd_old_sub_new_unit = $_POST['air_etd_old_sub_new_unit'];
|
|
$air_etd_old_sub_new_unit = $_POST['air_etd_old_sub_new_unit'];
|
|
|
|
|
+ if(!empty($air_etd_old_sub_new_unit)){
|
|
|
|
|
+ $air_etd_old_sub_new_unit = $air_etd_old_sub_new_unit=="Day(s)" ? "days":"hours";
|
|
|
|
|
+ }
|
|
|
$air_eta_change = $_POST['air_eta_change'];
|
|
$air_eta_change = $_POST['air_eta_change'];
|
|
|
$air_eta_old_sub_new = $_POST['air_eta_old_sub_new'];
|
|
$air_eta_old_sub_new = $_POST['air_eta_old_sub_new'];
|
|
|
$air_eta_old_sub_new_unit = $_POST['air_eta_old_sub_new_unit'];
|
|
$air_eta_old_sub_new_unit = $_POST['air_eta_old_sub_new_unit'];
|
|
|
|
|
+ if(!empty($air_eta_old_sub_new_unit)){
|
|
|
|
|
+ $air_eta_old_sub_new_unit = $air_eta_old_sub_new_unit=="Day(s)" ? "days":"hours";
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
$sql.="INSERT INTO public.notifications_rules(
|
|
$sql.="INSERT INTO public.notifications_rules(
|
|
|
user_login, notifications_type, rules_type,
|
|
user_login, notifications_type, rules_type,
|