Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
2
2021-193 User-friendly enhanced machine learning-based railway management system
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
2021-193
2021-193 User-friendly enhanced machine learning-based railway management system
Commits
a1669263
Commit
a1669263
authored
Nov 22, 2021
by
Mihiranga G.L.V - IT18500790
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Correct final changes
parent
917c3db1
Changes
10
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
263 additions
and
29 deletions
+263
-29
.gitignore
.gitignore
+2
-0
index.php
index.php
+12
-4
sub_check_seat_select.php
sub_check_seat_select.php
+25
-0
sub_design_seat.php
sub_design_seat.php
+44
-16
sub_design_seat_add_to_temp.php
sub_design_seat_add_to_temp.php
+31
-1
sub_design_seat_remove_from_temp.php
sub_design_seat_remove_from_temp.php
+31
-1
sub_save_predict_cat_values.php
sub_save_predict_cat_values.php
+0
-3
sub_save_predict_values.php
sub_save_predict_values.php
+0
-3
sub_seat_deails_to_db.php
sub_seat_deails_to_db.php
+23
-0
train_planned.php
train_planned.php
+95
-1
No files found.
.gitignore
View file @
a1669263
images/
.history/
\ No newline at end of file
index.php
View file @
a1669263
...
...
@@ -557,7 +557,7 @@
lineList
.
splice
(
lineIndex
,
1
);
lineList
.
splice
(
0
,
0
,
lineno
);
// alert(lineList);
savePredictValue
(
lineList
);
savePredictValue
(
lineList
,
changeStationInitially
);
}
}
...
...
@@ -611,7 +611,7 @@
catList
.
splice
(
catIndex
,
1
);
catList
.
splice
(
0
,
0
,
catno
);
// alert(catList);
savePredictCatList
(
catList
);
savePredictCatList
(
catList
,
changeLocationList
);
}
}
...
...
@@ -711,7 +711,7 @@
}
function
savePredictValue
(
lineList
){
function
savePredictValue
(
lineList
,
callback
){
let
logUserid
=
document
.
getElementById
(
`logUserid`
).
value
;
...
...
@@ -729,6 +729,7 @@
if
(
req
.
status
==
200
)
{
// alert(req.responseText);
document
.
getElementById
(
`lineDrop`
).
innerHTML
=
req
.
responseText
;
callback
();
}
}
}
...
...
@@ -739,7 +740,7 @@
}
function
savePredictCatList
(
catList
)
{
function
savePredictCatList
(
catList
,
callback
)
{
let
logUserid
=
document
.
getElementById
(
`logUserid`
).
value
;
...
...
@@ -758,6 +759,7 @@
// alert(req.responseText);
document
.
getElementById
(
`catDrop`
).
innerHTML
=
req
.
responseText
;
saveOverAllSummary
();
callback
();
}
}
}
...
...
@@ -936,6 +938,12 @@
</div>
<script>
function
changeStationInitially
(){
let
id
=
document
.
getElementById
(
'
lineDrop
'
).
value
;
changeStations
(
id
);
}
function
changeStations
(
id
)
{
var
formData
=
new
FormData
();
formData
.
append
(
'
id
'
,
id
);
...
...
sub_check_seat_select.php
0 → 100644
View file @
a1669263
<?php
session_start
();
include
"db_connect.php"
;
$logUserid
=
mysqli_real_escape_string
(
$con
,
$_POST
[
'logUserid'
]);
$status
=
1
;
$sql1
=
"SELECT * FROM train_info WHERE logUserId =
$logUserid
"
;
$result1
=
mysqli_query
(
$con
,
$sql1
)
or
die
(
mysqli_error
(
$con
));
while
(
$row1
=
mysqli_fetch_array
(
$result1
))
{
$train_id
=
$row1
[
'train_id'
];
$sql2
=
"SELECT * FROM select_seat_temp WHERE train_id =
$train_id
AND logUserId =
$logUserid
"
;
$result2
=
mysqli_query
(
$con
,
$sql2
)
or
die
(
mysqli_error
(
$con
));
$rowcount2
=
mysqli_num_rows
(
$result2
);
if
(
$rowcount2
==
0
)
{
$status
=
0
;
break
;
}
}
echo
$status
;
\ No newline at end of file
sub_design_seat.php
View file @
a1669263
...
...
@@ -29,6 +29,7 @@
$best_line
=
$row5
[
'next_line'
];
for
(
$i
=
1
;
$i
<=
4
;
$i
++
){
$sql6
=
"SELECT * FROM select_seat WHERE `train_id` = '
$train_id
' AND `date` = '
$train_date
' AND `arrival` = '
$train_arrival
' AND `row` = '
$i
' AND `seat` = '
$best_line
'"
;
$result6
=
mysqli_query
(
$con
,
$sql6
)
or
die
(
mysqli_error
(
$con
));
$rowcount6
=
mysqli_num_rows
(
$result6
);
...
...
@@ -101,24 +102,33 @@
$result4
=
mysqli_query
(
$con
,
$sql4
)
or
die
(
mysqli_error
(
$con
));
$rowcount4
=
mysqli_num_rows
(
$result4
);
if
(
$i
==
1
)
{
$first
=
$i
+
2
;
}
else
{
$first
=
$first
+
4
;
}
if
(
$rowcount3
==
0
)
{
if
(
$rowcount4
==
0
)
{
?>
<button
class=
"btn btn-primary"
onclick=
"selectSeat('
<?php
echo
$logUserid
?>
','
<?php
echo
$train_id
?>
','
<?php
echo
$train_start_station
?>
','
<?php
echo
$r
?>
','
<?php
echo
$i
?>
','no');"
id=
"seatbtn_
<?php
echo
$r
?>
_
<?php
echo
$i
?>
"
>
1
</button>
<button
class=
"btn btn-primary"
onclick=
"selectSeat('
<?php
echo
$logUserid
?>
','
<?php
echo
$train_id
?>
','
<?php
echo
$train_start_station
?>
','
<?php
echo
$r
?>
','
<?php
echo
$i
?>
','no');"
id=
"seatbtn_
<?php
echo
$r
?>
_
<?php
echo
$i
?>
"
>
<?php
echo
$first
?>
</button>
<?php
}
else
if
(
$rowcount4
==
1
)
{
?>
<button
class=
"btn btn-danger tooltip"
id=
"seatbtn_
<?php
echo
$r
?>
_
<?php
echo
$i
?>
"
disabled
>
1
<span
class=
"tooltiptext"
>
Selected Seat
</span></button>
<button
class=
"btn btn-danger tooltip"
id=
"seatbtn_
<?php
echo
$r
?>
_
<?php
echo
$i
?>
"
disabled
>
<?php
echo
$first
?>
<span
class=
"tooltiptext"
>
Selected Seat
</span></button>
<?php
}
}
else
if
(
$rowcount3
==
1
)
{
?>
<button
class=
"btn btn-success"
onclick=
"selectSeat('
<?php
echo
$logUserid
?>
','
<?php
echo
$train_id
?>
','
<?php
echo
$train_start_station
?>
','
<?php
echo
$r
?>
','
<?php
echo
$i
?>
','yes');"
id=
"seatbtn_
<?php
echo
$r
?>
_
<?php
echo
$i
?>
"
>
1
</button>
<button
class=
"btn btn-success"
onclick=
"selectSeat('
<?php
echo
$logUserid
?>
','
<?php
echo
$train_id
?>
','
<?php
echo
$train_start_station
?>
','
<?php
echo
$r
?>
','
<?php
echo
$i
?>
','yes');"
id=
"seatbtn_
<?php
echo
$r
?>
_
<?php
echo
$i
?>
"
>
<?php
echo
$first
?>
</button>
<?php
...
...
@@ -154,24 +164,30 @@
$result4
=
mysqli_query
(
$con
,
$sql4
)
or
die
(
mysqli_error
(
$con
));
$rowcount4
=
mysqli_num_rows
(
$result4
);
if
(
$i
==
1
)
{
$second
=
$i
+
3
;
}
else
{
$second
=
$second
+
4
;
}
if
(
$rowcount3
==
0
)
{
if
(
$rowcount4
==
0
)
{
?>
<button
class=
"btn btn-primary"
onclick=
"selectSeat('
<?php
echo
$logUserid
?>
','
<?php
echo
$train_id
?>
','
<?php
echo
$train_start_station
?>
','
<?php
echo
$r
?>
','
<?php
echo
$i
?>
','no');"
id=
"seatbtn_
<?php
echo
$r
?>
_
<?php
echo
$i
?>
"
>
1
</button>
<button
class=
"btn btn-primary"
onclick=
"selectSeat('
<?php
echo
$logUserid
?>
','
<?php
echo
$train_id
?>
','
<?php
echo
$train_start_station
?>
','
<?php
echo
$r
?>
','
<?php
echo
$i
?>
','no');"
id=
"seatbtn_
<?php
echo
$r
?>
_
<?php
echo
$i
?>
"
>
<?php
echo
$second
?>
</button>
<?php
}
else
if
(
$rowcount4
==
1
)
{
?>
<button
class=
"btn btn-danger tooltip"
id=
"seatbtn_
<?php
echo
$r
?>
_
<?php
echo
$i
?>
"
disabled
>
1
<span
class=
"tooltiptext"
>
Selected Seat
</span></button>
<button
class=
"btn btn-danger tooltip"
id=
"seatbtn_
<?php
echo
$r
?>
_
<?php
echo
$i
?>
"
disabled
>
<?php
echo
$second
?>
<span
class=
"tooltiptext"
>
Selected Seat
</span></button>
<?php
}
}
else
if
(
$rowcount3
==
1
)
{
?>
<button
class=
"btn btn-success"
onclick=
"selectSeat('
<?php
echo
$logUserid
?>
','
<?php
echo
$train_id
?>
','
<?php
echo
$train_start_station
?>
','
<?php
echo
$r
?>
','
<?php
echo
$i
?>
','yes');"
id=
"seatbtn_
<?php
echo
$r
?>
_
<?php
echo
$i
?>
"
>
1
</button>
<button
class=
"btn btn-success"
onclick=
"selectSeat('
<?php
echo
$logUserid
?>
','
<?php
echo
$train_id
?>
','
<?php
echo
$train_start_station
?>
','
<?php
echo
$r
?>
','
<?php
echo
$i
?>
','yes');"
id=
"seatbtn_
<?php
echo
$r
?>
_
<?php
echo
$i
?>
"
>
<?php
echo
$second
?>
</button>
<?php
...
...
@@ -213,24 +229,30 @@
$result4
=
mysqli_query
(
$con
,
$sql4
)
or
die
(
mysqli_error
(
$con
));
$rowcount4
=
mysqli_num_rows
(
$result4
);
if
(
$i
==
1
)
{
$third
=
$i
+
1
;
}
else
{
$third
=
$third
+
4
;
}
if
(
$rowcount3
==
0
)
{
if
(
$rowcount4
==
0
)
{
?>
<button
class=
"btn btn-primary"
onclick=
"selectSeat('
<?php
echo
$logUserid
?>
','
<?php
echo
$train_id
?>
','
<?php
echo
$train_start_station
?>
','
<?php
echo
$r
?>
','
<?php
echo
$i
?>
','no');"
id=
"seatbtn_
<?php
echo
$r
?>
_
<?php
echo
$i
?>
"
>
1
</button>
<button
class=
"btn btn-primary"
onclick=
"selectSeat('
<?php
echo
$logUserid
?>
','
<?php
echo
$train_id
?>
','
<?php
echo
$train_start_station
?>
','
<?php
echo
$r
?>
','
<?php
echo
$i
?>
','no');"
id=
"seatbtn_
<?php
echo
$r
?>
_
<?php
echo
$i
?>
"
>
<?php
echo
$third
?>
</button>
<?php
}
else
if
(
$rowcount4
==
1
)
{
?>
<button
class=
"btn btn-danger tooltip"
id=
"seatbtn_
<?php
echo
$r
?>
_
<?php
echo
$i
?>
"
disabled
>
1
<span
class=
"tooltiptext"
>
Selected Seat
</span></button>
<button
class=
"btn btn-danger tooltip"
id=
"seatbtn_
<?php
echo
$r
?>
_
<?php
echo
$i
?>
"
disabled
>
<?php
echo
$third
?>
<span
class=
"tooltiptext"
>
Selected Seat
</span></button>
<?php
}
}
else
if
(
$rowcount3
==
1
)
{
?>
<button
class=
"btn btn-success"
onclick=
"selectSeat('
<?php
echo
$logUserid
?>
','
<?php
echo
$train_id
?>
','
<?php
echo
$train_start_station
?>
','
<?php
echo
$r
?>
','
<?php
echo
$i
?>
','yes');"
id=
"seatbtn_
<?php
echo
$r
?>
_
<?php
echo
$i
?>
"
>
1
</button>
<button
class=
"btn btn-success"
onclick=
"selectSeat('
<?php
echo
$logUserid
?>
','
<?php
echo
$train_id
?>
','
<?php
echo
$train_start_station
?>
','
<?php
echo
$r
?>
','
<?php
echo
$i
?>
','yes');"
id=
"seatbtn_
<?php
echo
$r
?>
_
<?php
echo
$i
?>
"
>
<?php
echo
$third
?>
</button>
<?php
...
...
@@ -266,24 +288,30 @@
$result4
=
mysqli_query
(
$con
,
$sql4
)
or
die
(
mysqli_error
(
$con
));
$rowcount4
=
mysqli_num_rows
(
$result4
);
if
(
$i
==
1
)
{
$fourth
=
$i
;
}
else
{
$fourth
=
$fourth
+
4
;
}
if
(
$rowcount3
==
0
)
{
if
(
$rowcount4
==
0
)
{
?>
<button
class=
"btn btn-primary"
onclick=
"selectSeat('
<?php
echo
$logUserid
?>
','
<?php
echo
$train_id
?>
','
<?php
echo
$train_start_station
?>
','
<?php
echo
$r
?>
','
<?php
echo
$i
?>
','no');"
id=
"seatbtn_
<?php
echo
$r
?>
_
<?php
echo
$i
?>
"
>
1
</button>
<button
class=
"btn btn-primary"
onclick=
"selectSeat('
<?php
echo
$logUserid
?>
','
<?php
echo
$train_id
?>
','
<?php
echo
$train_start_station
?>
','
<?php
echo
$r
?>
','
<?php
echo
$i
?>
','no');"
id=
"seatbtn_
<?php
echo
$r
?>
_
<?php
echo
$i
?>
"
>
<?php
echo
$fourth
?>
</button>
<?php
}
else
if
(
$rowcount4
==
1
)
{
?>
<button
class=
"btn btn-danger tooltip"
id=
"seatbtn_
<?php
echo
$r
?>
_
<?php
echo
$i
?>
"
disabled
>
1
<span
class=
"tooltiptext"
>
Selected Seat
</span></button>
<button
class=
"btn btn-danger tooltip"
id=
"seatbtn_
<?php
echo
$r
?>
_
<?php
echo
$i
?>
"
disabled
>
<?php
echo
$fourth
?>
<span
class=
"tooltiptext"
>
Selected Seat
</span></button>
<?php
}
}
else
if
(
$rowcount3
==
1
)
{
?>
<button
class=
"btn btn-success"
onclick=
"selectSeat('
<?php
echo
$logUserid
?>
','
<?php
echo
$train_id
?>
','
<?php
echo
$train_start_station
?>
','
<?php
echo
$r
?>
','
<?php
echo
$i
?>
','yes');"
id=
"seatbtn_
<?php
echo
$r
?>
_
<?php
echo
$i
?>
"
>
1
</button>
<button
class=
"btn btn-success"
onclick=
"selectSeat('
<?php
echo
$logUserid
?>
','
<?php
echo
$train_id
?>
','
<?php
echo
$train_start_station
?>
','
<?php
echo
$r
?>
','
<?php
echo
$i
?>
','yes');"
id=
"seatbtn_
<?php
echo
$r
?>
_
<?php
echo
$i
?>
"
>
<?php
echo
$fourth
?>
</button>
<?php
...
...
sub_design_seat_add_to_temp.php
View file @
a1669263
...
...
@@ -11,6 +11,36 @@
$seat
=
mysqli_real_escape_string
(
$con
,
$_POST
[
'seat'
]);
$status
=
mysqli_real_escape_string
(
$con
,
$_POST
[
'status'
]);
if
(
$row
==
1
)
{
$iniSeat
=
3
;
if
(
$seat
==
1
){
$currentSeat
=
$iniSeat
;
}
else
{
$currentSeat
=
$iniSeat
+
(
$seat
-
1
)
*
4
;
}
}
else
if
(
$row
==
2
)
{
$iniSeat
=
4
;
if
(
$seat
==
1
){
$currentSeat
=
$iniSeat
;
}
else
{
$currentSeat
=
$iniSeat
+
(
$seat
-
1
)
*
4
;
}
}
else
if
(
$row
==
3
)
{
$iniSeat
=
2
;
if
(
$seat
==
1
){
$currentSeat
=
$iniSeat
;
}
else
{
$currentSeat
=
$iniSeat
+
(
$seat
-
1
)
*
4
;
}
}
else
if
(
$row
==
4
)
{
$iniSeat
=
1
;
if
(
$seat
==
1
){
$currentSeat
=
$iniSeat
;
}
else
{
$currentSeat
=
$iniSeat
+
(
$seat
-
1
)
*
4
;
}
}
$sql2
=
"SELECT * FROM train_info WHERE logUserId = '
$logUserid
' AND train_id = '
$train_id
' AND train_start_station = '
$train_start_station
' "
;
$result2
=
mysqli_query
(
$con
,
$sql2
)
or
die
(
mysqli_error
(
$con
));
$row2
=
mysqli_fetch_assoc
(
$result2
);
...
...
@@ -32,7 +62,7 @@
if
(
$result4
){
?>
<button
class=
"btn btn-success"
onclick=
"selectSeat('
<?php
echo
$logUserid
?>
','
<?php
echo
$train_id
?>
','
<?php
echo
$train_start_station
?>
','
<?php
echo
$row
?>
','
<?php
echo
$seat
?>
','yes');"
id=
"seatbtn_
<?php
echo
$row
?>
_
<?php
echo
$seat
?>
"
>
1
</button>
<button
class=
"btn btn-success"
onclick=
"selectSeat('
<?php
echo
$logUserid
?>
','
<?php
echo
$train_id
?>
','
<?php
echo
$train_start_station
?>
','
<?php
echo
$row
?>
','
<?php
echo
$seat
?>
','yes');"
id=
"seatbtn_
<?php
echo
$row
?>
_
<?php
echo
$seat
?>
"
>
<?php
echo
$currentSeat
?>
</button>
<?php
}
else
{
...
...
sub_design_seat_remove_from_temp.php
View file @
a1669263
...
...
@@ -11,6 +11,36 @@
$seat
=
mysqli_real_escape_string
(
$con
,
$_POST
[
'seat'
]);
$status
=
mysqli_real_escape_string
(
$con
,
$_POST
[
'status'
]);
if
(
$row
==
1
)
{
$iniSeat
=
3
;
if
(
$seat
==
1
){
$currentSeat
=
$iniSeat
;
}
else
{
$currentSeat
=
$iniSeat
+
(
$seat
-
1
)
*
4
;
}
}
else
if
(
$row
==
2
)
{
$iniSeat
=
4
;
if
(
$seat
==
1
){
$currentSeat
=
$iniSeat
;
}
else
{
$currentSeat
=
$iniSeat
+
(
$seat
-
1
)
*
4
;
}
}
else
if
(
$row
==
3
)
{
$iniSeat
=
2
;
if
(
$seat
==
1
){
$currentSeat
=
$iniSeat
;
}
else
{
$currentSeat
=
$iniSeat
+
(
$seat
-
1
)
*
4
;
}
}
else
if
(
$row
==
4
)
{
$iniSeat
=
1
;
if
(
$seat
==
1
){
$currentSeat
=
$iniSeat
;
}
else
{
$currentSeat
=
$iniSeat
+
(
$seat
-
1
)
*
4
;
}
}
$sql2
=
"SELECT * FROM train_info WHERE logUserId = '
$logUserid
' AND train_id = '
$train_id
' AND train_start_station = '
$train_start_station
' "
;
$result2
=
mysqli_query
(
$con
,
$sql2
)
or
die
(
mysqli_error
(
$con
));
$row2
=
mysqli_fetch_assoc
(
$result2
);
...
...
@@ -29,7 +59,7 @@
if
(
$result3
){
?>
<button
class=
"btn btn-primary"
onclick=
"selectSeat('
<?php
echo
$logUserid
?>
','
<?php
echo
$train_id
?>
','
<?php
echo
$train_start_station
?>
','
<?php
echo
$row
?>
','
<?php
echo
$seat
?>
','no');"
id=
"seatbtn_
<?php
echo
$row
?>
_
<?php
echo
$seat
?>
"
>
1
</button>
<button
class=
"btn btn-primary"
onclick=
"selectSeat('
<?php
echo
$logUserid
?>
','
<?php
echo
$train_id
?>
','
<?php
echo
$train_start_station
?>
','
<?php
echo
$row
?>
','
<?php
echo
$seat
?>
','no');"
id=
"seatbtn_
<?php
echo
$row
?>
_
<?php
echo
$seat
?>
"
>
<?php
echo
$currentSeat
?>
</button>
<?php
}
else
{
...
...
sub_save_predict_cat_values.php
View file @
a1669263
...
...
@@ -26,9 +26,6 @@
}
?>
<option
value=
"select"
>
Filter By Location Category
</option>
<?php
for
(
$i
=
0
;
$i
<
6
;
$i
++
)
{
$catNo
=
$catListArray
[
$i
];
...
...
sub_save_predict_values.php
View file @
a1669263
...
...
@@ -26,9 +26,6 @@
}
?>
<option
value=
"select"
>
Filter By Railway Line
</option>
<?php
for
(
$i
=
0
;
$i
<
6
;
$i
++
)
{
$lineNo
=
$lineListArray
[
$i
];
...
...
sub_seat_deails_to_db.php
0 → 100644
View file @
a1669263
<?php
session_start
();
include
"db_connect.php"
;
$logUserid
=
mysqli_real_escape_string
(
$con
,
$_POST
[
'logUserid'
]);
$sql1
=
"SELECT * FROM select_seat_temp WHERE logUserId =
$logUserid
"
;
$result1
=
mysqli_query
(
$con
,
$sql1
)
or
die
(
mysqli_error
(
$con
));
while
(
$row1
=
mysqli_fetch_array
(
$result1
))
{
$logUserid
=
$row1
[
'logUserid'
];
$train_id
=
$row1
[
'train_id'
];
$date
=
$row1
[
'date'
];
$arrival
=
$row1
[
'arrival'
];
$train_start_station
=
$row1
[
'train_start_station'
];
$row
=
$row1
[
'row'
];
$seat
=
$row1
[
'seat'
];
$sql2
=
" INSERT INTO `select_seat`(`logUserid`, `train_id`, `date`, `arrival`, `train_start_station`, `row`, `seat`) VALUES ('
$logUserid
', '
$train_id
', '
$date
', '
$arrival
', '
$train_start_station
', '
$row
', '
$seat
') "
;
$result2
=
mysqli_query
(
$con
,
$sql2
)
or
die
(
mysqli_error
(
$con
));
}
\ No newline at end of file
train_planned.php
View file @
a1669263
...
...
@@ -201,6 +201,7 @@
req
.
onreadystatechange
=
function
()
{
if
(
req
.
readyState
==
4
)
{
if
(
req
.
status
==
200
)
{
console
.
log
(
req
.
responseText
);
document
.
getElementById
(
`seatPlanAdd`
).
innerHTML
=
req
.
responseText
;
$
(
`#train_
${
train_id
}
_
${
train_start_station
}
`
).
modal
(
'
show
'
);
highlightBest
(
logUserid
,
train_id
,
train_start_station
);
...
...
@@ -596,7 +597,7 @@
<div
class=
"col-md-12"
>
<div
class=
"contect_btn contect_btn_contact"
>
<ul>
<li><a
href=
"javascript:void(0)"
>
Confirm Plan
<i
class=
"fa fa-arrow-right"
></i></a>
<li><a
href=
"javascript:void(0)"
onclick=
"confirmTripPlan();"
>
Confirm Plan
<i
class=
"fa fa-arrow-right"
></i></a>
</li>
</ul>
</div>
...
...
@@ -630,6 +631,35 @@
}
</style>
<style>
.tooltip
{
position
:
relative
;
display
:
inline-block
;
border-bottom
:
1px
dotted
black
;
}
.tooltip
.tooltiptext
{
visibility
:
hidden
;
width
:
120px
;
background-color
:
black
;
color
:
#fff
;
text-align
:
center
;
border-radius
:
6px
;
padding
:
5px
0
;
/* Position the tooltip */
position
:
absolute
;
z-index
:
1
;
bottom
:
100%
;
left
:
50%
;
margin-left
:
-60px
;
}
.tooltip
:hover
.tooltiptext
{
visibility
:
visible
;
}
</style>
...
...
@@ -641,6 +671,70 @@
<?php
include
(
'common_chatbot.php'
);
?>
<script>
function
confirmTripPlan
()
{
let
logUserid
=
document
.
getElementById
(
`logUserid`
).
value
;
var
formData
=
new
FormData
();
formData
.
append
(
'
logUserid
'
,
logUserid
);
var
req
=
getXmlHttpRequestObject
();
if
(
req
)
{
req
.
onreadystatechange
=
function
()
{
if
(
req
.
readyState
==
4
)
{
if
(
req
.
status
==
200
)
{
// alert(req.responseText);
// console.log(req.responseText);
if
(
req
.
responseText
.
trim
()
==
'
1
'
)
{
// alert('yes');
confirmAllSeat
();
}
else
{
Lobibox
.
notify
(
'
error
'
,
{
size
:
'
normal
'
,
sound
:
false
,
title
:
'
Oops...
'
,
icon
:
'
fa fa-times-circle
'
,
msg
:
'
Please select all seats.
'
});
}
}
}
}
req
.
open
(
"
POST
"
,
'
sub_check_seat_select.php
'
,
true
);
req
.
send
(
formData
);
}
}
function
confirmAllSeat
()
{
let
logUserid
=
document
.
getElementById
(
`logUserid`
).
value
;
var
formData
=
new
FormData
();
formData
.
append
(
'
logUserid
'
,
logUserid
);
var
req
=
getXmlHttpRequestObject
();
if
(
req
)
{
req
.
onreadystatechange
=
function
()
{
if
(
req
.
readyState
==
4
)
{
if
(
req
.
status
==
200
)
{
Lobibox
.
notify
(
'
success
'
,
{
size
:
'
normal
'
,
sound
:
false
,
title
:
'
Success
'
,
icon
:
'
fa fa-check-circle
'
,
msg
:
'
Successfully confirm your plan.
'
});
}
}
}
req
.
open
(
"
POST
"
,
'
sub_seat_deails_to_db.php
'
,
true
);
req
.
send
(
formData
);
}
}
function
MsgSend
()
{
var
msg
=
document
.
getElementById
(
"
msg_value
"
).
value
;
let
logUserid
=
document
.
getElementById
(
`logUserid`
).
value
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment