-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathajax.php
66 lines (51 loc) · 1.53 KB
/
ajax.php
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
<?php
include_once('classes/selection_class.php');
$Selection = new Selection();
//uses from classes
if(isset($_POST['division_id'])){
$division_id = $_POST["division_id"];
$div = $Selection->district($division_id);
}
if(isset($_POST['from_upazila'])){
$upazila_id = $_POST["from_upazila"];
$div = $Selection->from_upazila($upazila_id);
}
//Uses To classes
if(isset($_POST['ToDivId'])){
$division_id = $_POST["ToDivId"];
$div = $Selection->district($division_id);
}
if(isset($_POST['TopUpId'])){
$upazila_id = $_POST["TopUpId"];
$div = $Selection->from_upazila($upazila_id);
}
if(isset($_POST['weight'])){
//print_r($_POST['calValue']);
$calData = $_POST;
//parse_str($calData, $calData);
//print_r($calData);
echo $Selection->QueryCalculationData($calData);
}
/*$conn = mysqli_connect("localhost","root","","courierdb");
if(isset($_POST["division_id"])){
$division_id = $_POST["division_id"];
$sql = "SELECT * FROM district WHERE division_id = '$division_id'";
$run = mysqli_query($conn, $sql);
if(!empty($run)){
while ($row = $run->fetch_assoc()) {
echo "<option value=".$row['district_id'].">".$row['district_name']."</option>";
}
}
}*/
if(isset($_POST['done'])){
$CourieriD = $_POST['CourieriD'];
$from_thana_list = $_POST['from_thana_list'];
$Selection->SelectBranch($CourieriD, $from_thana_list);
}
if(isset($_POST['done_2'])){
$CourieriD = $_POST['CourieriD'];
$toUpazila = $_POST['toUpazila'];
$from_branch = $_POST['from_branch'];
$Selection->ToSelectBranch($CourieriD, $toUpazila, $from_branch);
}
?>