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
d0c12959
Commit
d0c12959
authored
Sep 27, 2021
by
Mihiranga G.L.V - IT18500790
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Recorrect trip plan
parent
da55e731
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
78 additions
and
106 deletions
+78
-106
models/.idea/vcs.xml
models/.idea/vcs.xml
+6
-0
sub_trip_planned_create_trip_plan.php
sub_trip_planned_create_trip_plan.php
+27
-21
train_planned.php
train_planned.php
+45
-85
No files found.
models/.idea/vcs.xml
0 → 100644
View file @
d0c12959
<?xml version="1.0" encoding="UTF-8"?>
<project
version=
"4"
>
<component
name=
"VcsDirectoryMappings"
>
<mapping
directory=
"$PROJECT_DIR$/.."
vcs=
"Git"
/>
</component>
</project>
\ No newline at end of file
sub_trip_planned_create_trip_plan.php
View file @
d0c12959
...
...
@@ -192,34 +192,40 @@
$start_date
=
$ini_start_date
;
$end_date
=
$ini_end_date
;
$start_time
=
'05:00:00'
;
$start_date_time
=
$ini_start_date
.
" "
.
$start_time
;
for
(
$c
=
$start_location
;
$c
>=
$last_railway_stop
;
$c
--
)
{
$sql13
=
"SELECT * FROM `train_times` WHERE `lineno` = '
$now_line_no
' AND `trainno` = '
$c
' AND dirId ='f' ORDER BY `arrival` ASC"
;
$result13
=
mysqli_query
(
$con
,
$sql13
)
or
die
(
mysqli_error
(
$con
));
$all_times
=
array
();
while
(
$row13
=
mysqli_fetch_array
(
$result13
))
{
$time_arrival
=
$row13
[
'arrival'
];
$train_id
=
$row13
[
'id'
];
$time_arrival
=
strtotime
(
$time_arrival
);
$start_time
=
strtotime
(
$start_time
);
if
(
$time_arrival
>
$start_time
){
array_push
(
$all_times
,
$train_id
);
$sql15
=
"SELECT * FROM visitplacetemp WHERE placeTrainNo = '
$c
' AND logUserid =
$logUserid
"
;
$result15
=
mysqli_query
(
$con
,
$sql15
)
or
die
(
mysqli_error
(
$con
));
$rowcount15
=
mysqli_num_rows
(
$result15
);
$row15
=
mysqli_fetch_assoc
(
$result15
);
if
(
$c
==
$start_location
){
//Colombo fort to relevent Location
echo
$start_date_time
.
"<br>"
;
$start_date_time
=
date
(
'Y-m-d H:i:s'
,
strtotime
(
$start_date_time
.
'+15 hour'
));
}
else
if
(
$rowcount15
>
0
)
{
// Place to place
echo
$start_date_time
.
"<br>"
;
$start_date_time
=
date
(
'Y-m-d H:i:s'
,
strtotime
(
$start_date_time
.
'+12 hour'
));
}
else
{
continue
;
}
}
$get_best_train_id
=
$all_times
[
0
];
?>
$sql14
=
"SELECT * FROM `train_times` WHERE id = '
$get_best_train_id
' "
;
$result14
=
mysqli_query
(
$con
,
$sql14
)
or
die
(
mysqli_error
(
$con
));
$row14
=
mysqli_fetch_assoc
(
$result14
);
echo
$tra_train_name
=
$row14
[
'trainname'
];
$tra_train_arrival
=
$row14
[
'arrival'
];
$tra_train_dep
=
$row14
[
'dep'
];
</tbody>
</table>
</div>
$start_time
=
$tra_train_dep
;
}
<?php
...
...
train_planned.php
View file @
d0c12959
...
...
@@ -123,8 +123,9 @@
req
.
onreadystatechange
=
function
()
{
if
(
req
.
readyState
==
4
)
{
if
(
req
.
status
==
200
)
{
alert
(
req
.
responseText
);
//
alert(req.responseText);
console
.
log
(
req
.
responseText
);
document
.
getElementById
(
`collapseOne`
).
innerHTML
=
req
.
responseText
;
}
}
}
...
...
@@ -505,7 +506,7 @@
</div>
<div
id=
"collapseOne"
class=
"collapse show"
aria-labelledby=
"headingOne"
data-parent=
"#accordionExample"
>
<div
class=
"card-body"
>
<
!-- <
div class="card-body">
<table class="table table-bordered">
<thead class="thead-light">
<tr>
...
...
@@ -530,7 +531,7 @@
<button type="button" class="btn btn-primary" data-toggle="modal" data-target="#exampleModal">
Locations
</button>
<div
class=
"modal fade"
id=
"exampleModal"
tabindex=
"-1"
role=
"dialog"
aria-labelledby=
"exampleModalLabel"
aria-hidden=
"true"
>
<div class="modal fade" id="exampleModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
<div class="modal-dialog modal-lg" role="document">
<div class="modal-content">
<div class="modal-header">
...
...
@@ -570,53 +571,12 @@
</div>
</div>
</div>
</div>
</td>
</tr>
<tr>
<td>
Night Mail
</td>
<td>
Haputhale
</td>
<td>
08/26/2021
<br>
06:10
</td>
<td>
Ellass
</td>
<td>
08/26/2021
<br>
07:10
</td>
<td>
08/26/2021
<br>
15:00
</td>
<td>
<button
type=
"button"
class=
"btn btn-primary"
data-toggle=
"modal"
data-target=
"#exampleModal"
>
Locations
</button>
</td>
</tr>
<tr>
<td>
Podi Manike
</td>
<td>
Ella
</td>
<td>
08/26/2021
<br>
16:00
</td>
<td>
Badulla
</td>
<td>
08/26/2021
<br>
17:00
</td>
<td>
08/26/2021
<br>
18:00
</td>
<td>
<button
type=
"button"
class=
"btn btn-primary"
data-toggle=
"modal"
data-target=
"#exampleModal"
>
Locations
</button>
</td>
</tr>
<tr>
<td>
Night Mail
</td>
<td>
Badulla
</td>
<td>
08/26/2021
<br>
18:00
</td>
<td>
Colombo Fort
</td>
<td>
08/27/2021
<br>
05:00
</td>
<td>
08/27/2021
<br>
05:00
</td>
<td>
<button
type=
"button"
class=
"btn btn-primary"
data-toggle=
"modal"
data-target=
"#exampleModal"
>
Locations
</button>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
-->
</div>
</div>
<div
class=
"card"
>
...
...
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