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
44ea46fc
Commit
44ea46fc
authored
Oct 02, 2021
by
Mihiranga G.L.V - IT18500790
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Custermized trip plan
parent
ba159270
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
108 additions
and
9 deletions
+108
-9
.gitignore
.gitignore
+0
-1
js/xpedia.js
js/xpedia.js
+1
-1
sub_change_line_name.php
sub_change_line_name.php
+22
-0
sub_update_date.php
sub_update_date.php
+18
-0
train_planned.php
train_planned.php
+67
-7
No files found.
.gitignore
View file @
44ea46fc
images/
\ No newline at end of file
js/xpedia.js
View file @
44ea46fc
...
@@ -103,7 +103,7 @@ jQuery(document).ready(function($) {
...
@@ -103,7 +103,7 @@ jQuery(document).ready(function($) {
/*----------------------------------------------------------------------------------*/
/*----------------------------------------------------------------------------------*/
/* Date and Tiem Picker
/* Date and Tiem Picker
/*-----------------------------------------------------------------------------------*/
/*-----------------------------------------------------------------------------------*/
$
(
'
.datepicker
'
).
datepicker
({
dateFormat
:
'
y
-m-d
'
});
$
(
'
.datepicker
'
).
datepicker
({
dateFormat
:
'
y
y-mm-dd
'
,
minDate
:
0
});
$
(
'
.dateDisplay
'
).
datepicker
({
dateFormat
:
'
yy-mm-dd
'
,
minDate
:
0
});
$
(
'
.dateDisplay
'
).
datepicker
({
dateFormat
:
'
yy-mm-dd
'
,
minDate
:
0
});
$
(
'
.horizontal-datepicker
'
).
datepicker
({
dateFormat
:
'
dd-mm-yy
'
,
minDate
:
0
});
$
(
'
.horizontal-datepicker
'
).
datepicker
({
dateFormat
:
'
dd-mm-yy
'
,
minDate
:
0
});
...
...
sub_change_line_name.php
0 → 100644
View file @
44ea46fc
<?php
session_start
();
include
"db_connect.php"
;
$logUserid
=
mysqli_real_escape_string
(
$con
,
$_POST
[
'logUserid'
]);
$sql1
=
"SELECT * FROM linelist WHERE logUserid =
$logUserid
ORDER BY `priority` ASC "
;
$result1
=
mysqli_query
(
$con
,
$sql1
)
or
die
(
mysqli_error
(
$con
));
$line_list
=
array
();
while
(
$row1
=
mysqli_fetch_array
(
$result1
)){
array_push
(
$line_list
,
$row1
[
'lineNo'
]);
}
$first_line_num
=
$line_list
[
0
];
$sql2
=
"SELECT * FROM railway_line WHERE id = '
$first_line_num
'"
;
$result2
=
mysqli_query
(
$con
,
$sql2
)
or
die
(
mysqli_error
(
$con
));
$row2
=
mysqli_fetch_assoc
(
$result2
);
echo
$row2
[
'line'
];
sub_update_date.php
0 → 100644
View file @
44ea46fc
<?php
session_start
();
include
"db_connect.php"
;
$logUserid
=
mysqli_real_escape_string
(
$con
,
$_POST
[
'logUserid'
]);
$startTime
=
mysqli_real_escape_string
(
$con
,
$_POST
[
'startTime'
]);
$endTime
=
mysqli_real_escape_string
(
$con
,
$_POST
[
'endTime'
]);
$sql1
=
"UPDATE `user_details` SET `start`='
$startTime
',`end`='
$endTime
' WHERE `logUserid`='
$logUserid
'"
;
$result1
=
mysqli_query
(
$con
,
$sql1
)
or
die
(
mysqli_error
(
$con
));
if
(
$result1
){
echo
1
;
}
else
{
echo
0
;
}
\ No newline at end of file
train_planned.php
View file @
44ea46fc
...
@@ -126,6 +126,7 @@
...
@@ -126,6 +126,7 @@
// alert(req.responseText);
// alert(req.responseText);
// console.log(req.responseText);
// console.log(req.responseText);
document
.
getElementById
(
`collapseOne`
).
innerHTML
=
req
.
responseText
;
document
.
getElementById
(
`collapseOne`
).
innerHTML
=
req
.
responseText
;
changeLineName
();
}
}
}
}
}
}
...
@@ -134,6 +135,29 @@
...
@@ -134,6 +135,29 @@
req
.
send
(
formData
);
req
.
send
(
formData
);
}
}
}
}
function
changeLineName
(){
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);
document
.
getElementById
(
`lineNameSec`
).
innerHTML
=
req
.
responseText
;
}
}
}
req
.
open
(
"
POST
"
,
'
sub_change_line_name.php
'
,
true
);
req
.
send
(
formData
);
}
}
</script>
</script>
<!-- hs Navigation End -->
<!-- hs Navigation End -->
...
@@ -278,16 +302,21 @@
...
@@ -278,16 +302,21 @@
<div
class=
"col-md-12"
>
<div
class=
"col-md-12"
>
<div
class=
"form-sec-header"
>
<div
class=
"form-sec-header"
>
<h3>
Start Date
</h3>
<h3>
Start Date
</h3>
<label
class=
"cal-icon"
>
Pick-up Date
<?php
<input
type=
"text"
placeholder=
"Tue 16 Jan 2018"
class=
"form-control datepicker"
>
$sql5
=
"SELECT * FROM user_details WHERE logUserid =
$logUserid
"
;
$result5
=
mysqli_query
(
$con
,
$sql5
)
or
die
(
mysqli_error
(
$con
));
$row5
=
mysqli_fetch_assoc
(
$result5
)
?>
<label
class=
"cal-icon"
>
<input
type=
"text"
id=
"startTime"
onchange=
"changeTime();"
value=
"
<?php
echo
$row5
[
'start'
]
?>
"
placeholder=
"Start Date"
class=
"form-control datepicker"
readonly
>
</label>
</label>
</div>
</div>
</div>
</div>
<div
class=
"col-md-12"
>
<div
class=
"col-md-12"
>
<div
class=
"form-sec-header"
>
<div
class=
"form-sec-header"
>
<h3>
End Date
</h3>
<h3>
End Date
</h3>
<label
class=
"cal-icon"
>
Pick-up Date
<label
class=
"cal-icon"
>
<input
type=
"text"
placeholder=
"Tue 16 Jan 2018"
class=
"form-control datepicker"
>
<input
type=
"text"
id=
"endTime"
onchange=
"changeTime();"
value=
"
<?php
echo
$row5
[
'end'
]
?>
"
placeholder=
"End Date"
class=
"form-control datepicker"
readonly
>
</label>
</label>
</div>
</div>
</div>
</div>
...
@@ -300,6 +329,37 @@
...
@@ -300,6 +329,37 @@
<script>
<script>
function
changeTime
()
{
let
logUserid
=
document
.
getElementById
(
`logUserid`
).
value
;
let
startTime
=
document
.
getElementById
(
`startTime`
).
value
;
let
endTime
=
document
.
getElementById
(
`endTime`
).
value
;
var
formData
=
new
FormData
();
formData
.
append
(
'
logUserid
'
,
logUserid
);
formData
.
append
(
'
startTime
'
,
startTime
);
formData
.
append
(
'
endTime
'
,
endTime
);
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
==
1
)
{
createTripPlan
();
}
// createTripPlan();
}
}
}
req
.
open
(
"
POST
"
,
'
sub_update_date.php
'
,
true
);
req
.
send
(
formData
);
}
}
function
setToCat
(
value
)
{
function
setToCat
(
value
)
{
let
logUserid
=
document
.
getElementById
(
`logUserid`
).
value
;
let
logUserid
=
document
.
getElementById
(
`logUserid`
).
value
;
let
catDropValue
=
value
;
let
catDropValue
=
value
;
...
@@ -358,7 +418,7 @@
...
@@ -358,7 +418,7 @@
<h4>
Trip Details
</h4>
<h4>
Trip Details
</h4>
</div>
</div>
<hr>
<hr>
<form
class=
"billing-form"
>
<
!-- <
form class="billing-form">
<ul class="list-unstyled row">
<ul class="list-unstyled row">
<li class="col-md-6">
<li class="col-md-6">
<label>First Name *
<label>First Name *
...
@@ -380,7 +440,7 @@
...
@@ -380,7 +440,7 @@
<input type="text" placeholder="" class="form-control">
<input type="text" placeholder="" class="form-control">
</label>
</label>
</li>
</li>
</form>
</form>
-->
<div
class=
"container-fluid"
style=
"border: 1px solid rgb(223, 222, 222); border-radius: 10px; margin-bottom: 3%;"
>
<div
class=
"container-fluid"
style=
"border: 1px solid rgb(223, 222, 222); border-radius: 10px; margin-bottom: 3%;"
>
<div
class=
"row"
style=
"margin-bottom: 1%; margin-top: 3%;"
>
<div
class=
"row"
style=
"margin-bottom: 1%; margin-top: 3%;"
>
...
@@ -566,7 +626,7 @@
...
@@ -566,7 +626,7 @@
<div
class=
"card-header"
id=
"headingOne"
style=
"background-color: #4f5dec;"
>
<div
class=
"card-header"
id=
"headingOne"
style=
"background-color: #4f5dec;"
>
<h2
class=
"mb-0"
>
<h2
class=
"mb-0"
>
<button
style=
"color: #ffffff;"
class=
"btn btn-link btn-block text-left"
type=
"button"
data-toggle=
"collapse"
data-target=
"#collapseOne"
aria-expanded=
"true"
aria-controls=
"collapseOne"
>
<button
style=
"color: #ffffff;"
class=
"btn btn-link btn-block text-left"
type=
"button"
data-toggle=
"collapse"
data-target=
"#collapseOne"
aria-expanded=
"true"
aria-controls=
"collapseOne"
>
Best Trip Plan -
<b>
Main Line
</b>
Best Trip Plan -
<b>
<span
id=
"lineNameSec"
>
Main Line
</span>
</b>
</button>
</button>
</h2>
</h2>
</div>
</div>
...
...
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