-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcheck_duplicate.php
More file actions
112 lines (86 loc) · 2.22 KB
/
check_duplicate.php
File metadata and controls
112 lines (86 loc) · 2.22 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
<?php
ob_start();
require_once("includes/dbsmain.inc.php");
$shipper_code=$_POST['shipper_code'];
$zone_code=$_POST['zone_code'];
$state_code=$_POST['state_code'];
$city_code=$_POST['city_code'];
$user_code=$_POST['user_code'];
$airway_bill_no=$_POST['airway_bill_no'];
$tariff_shipper_code=$_POST['tariff_shipper_code'];
$basis_value=$_POST['basis_area_name'];
$type=$_POST['type'];
if($type=="ZONE")
{
$check=db_scalar("select zone_id from tbl_zone where zone_code='$zone_code'");
if($check!=""){
echo $check;
}
}
if($type=="STATE")
{
$check=db_scalar("select state_id from tbl_state_master where state_code='$state_code'");
if($check!=""){
echo $check;
}
}
if($type=="CITY")
{
$check=db_scalar("select city_id from tbl_city_master where city_code='$city_code'");
if($check!=""){
echo $check;
}
}
if($type=="SHIPPER")
{
$check_scode=db_scalar("select shipper_id from tbl_shipper where shipper_code='$shipper_code'");
if($check_scode!=""){
echo $check_scode;
}
}
if($type=="USER_CODE")
{
$check_code=db_scalar("select user_id from tbl_parcel_user where user_code='$user_code'");
if($check_code!=""){
echo $check_code;
}
}
if($type=="PACKAGE")
{
$check_code=db_scalar("select package_id from tbl_package where airway_bill_no='$airway_bill_no'");
if($check_code!=""){
echo $check_code;
}
}
if($type=="TARIFF")
{
$trf_id=db_scalar("select tariff_id from tbl_tariff where tariff_shipper_code='$tariff_shipper_code'");
$trf_zone=db_scalar("select distinct(rate_type) from tbl_tariff_rate where tariff_id='$trf_id' and rate_type='Zone'");
$trf_state=db_scalar("select distinct(rate_type) from tbl_tariff_rate where tariff_id='$trf_id' and rate_type='State'");
$trf_city=db_scalar("select distinct(rate_type) from tbl_tariff_rate where tariff_id='$trf_id' and rate_type='City'");
if($basis_value=="Zone")
{
if($trf_zone==$basis_value)
{
$check_code="?update_id=$trf_id&edit_type=Zone";
}
}
if($basis_value=="State")
{
if($trf_state==$basis_value)
{
$check_code="?update_id=$trf_id&edit_type=State";
}
}
if($basis_value=="City")
{
if($trf_city==$basis_value)
{
$check_code="?update_id=$trf_id&edit_type=City";
}
}
if($check_code!=""){
echo $check_code;
}
}
?>