Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
2
20_21-J09
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
2
Merge Requests
2
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
20_21-J09
20_21-J09
Commits
0b798412
Commit
0b798412
authored
Nov 08, 2020
by
IT17167338_Minoli Pemmawadu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
the first file uploaded.
parent
072edde3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
134 additions
and
0 deletions
+134
-0
login.php
login.php
+134
-0
No files found.
login.php
0 → 100644
View file @
0b798412
<?php
require_once
(
"include/initialize.php"
);
if
(
isset
(
$_SESSION
[
'StudentID'
]))
{
# code...
redirect
(
'index.php'
);
}
?>
<style
type=
"text/css"
>
body
{
background-color
:
#00061a
;
}
</style>
<!DOCTYPE html>
<html
lang=
"en"
>
<head>
<title>
Login
</title>
<meta
charset=
"UTF-8"
>
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1"
>
<!--===============================================================================================-->
<link
rel=
"icon"
type=
"image/png"
href=
"images/icons/favicon.ico"
/>
<link
href=
"
<?php
echo
web_root
;
?>
css/bootstrap.min.css"
rel=
"stylesheet"
>
<link
href=
"
<?php
echo
web_root
;
?>
fonts/font-awesome.min.css"
rel=
"stylesheet"
media=
"screen"
>
<!--===============================================================================================-->
<link
rel=
"stylesheet"
type=
"text/css"
href=
"
<?php
echo
web_root
;
?>
css/util.css"
>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"
<?php
echo
web_root
;
?>
css/main.css"
>
<!--===============================================================================================-->
</head>
<body>
<div
class=
"limiter"
>
<div
class=
"container-login100"
>
<?php
check_message
();
?>
<div
class=
"wrap-login100"
>
<div
class=
"login100-pic js-tilt"
data-tilte
>
<img
src=
"
<?php
echo
web_root
;
?>
images/janobe.png"
alt=
"IMG"
>
</div>
<form
class=
"login100-form validate-form"
action=
""
method=
"POST"
>
<span
class=
"login100-form-title"
>
<img
src=
"images/profile.png"
width=
"150"
/><br><br>
<font
color=
"white"
>
Member Login
</font>
</span>
<div
class=
"wrap-input100 validate-input"
>
<input
class=
"input100"
type=
"text"
name=
"user_email"
placeholder=
"Username"
>
<span
class=
"focus-input100"
></span>
<span
class=
"symbol-input100"
>
<i
class=
"fa fa-user"
aria-hidden=
"true"
></i>
</span>
</div>
<div
class=
"wrap-input100 validate-input"
data-validate =
"Password is required"
>
<input
class=
"input100"
type=
"password"
name=
"user_pass"
placeholder=
"Password"
>
<span
class=
"focus-input100"
></span>
<span
class=
"symbol-input100"
>
<i
class=
"fa fa-lock"
aria-hidden=
"true"
></i>
</span>
</div>
<div
class=
"container-login100-form-btn"
>
<button
class=
"login100-form-btn"
type=
"submit"
name=
"btnLogin"
>
Login
</button>
</div>
<div
class=
"text-center p-t-80"
>
<a
class=
"txt2"
href=
"register.php"
>
Create your Account
<i
class=
"fa fa-long-arrow-right m-l-5"
aria-hidden=
"true"
></i>
</a>
</div>
</form>
</div>
</div>
</div>
<?php
if
(
isset
(
$_POST
[
'btnLogin'
])){
$email
=
trim
(
$_POST
[
'user_email'
]);
$upass
=
trim
(
$_POST
[
'user_pass'
]);
$h_upass
=
sha1
(
$upass
);
if
(
$email
==
''
OR
$upass
==
''
)
{
message
(
"Invalid Username and Password!"
,
"error"
);
redirect
(
web_root
.
"login.php"
);
}
else
{
//it creates a new objects of member
$student
=
new
Student
();
//make use of the static function, and we passed to parameters
$res
=
$student
::
studentAuthentication
(
$email
,
$h_upass
);
if
(
$res
==
true
)
{
// redirect(web_root."index.php");
echo
$_SESSION
[
'StudentID'
];
}
else
{
message
(
"Account does not exist! Please contact Administrator."
,
"error"
);
redirect
(
web_root
.
"login.php"
);
}
}
}
?>
<script
type=
"text/javascript"
language=
"javascript"
src=
"
<?php
echo
web_root
;
?>
js/jquery.js"
></script>
<script
src=
"
<?php
echo
web_root
;
?>
js/bootstrap.min.js"
></script>
<!--===============================================================================================-->
<script
src=
"
<?php
echo
web_root
;
?>
vendor/select2/select2.min.js"
></script>
<!--===============================================================================================-->
<script
src=
"
<?php
echo
web_root
;
?>
vendor/tilt/tilt.jquery.min.js"
></script>
<script >
$
(
'
.js-tilt
'
).
tilt
({
scale
:
1.1
})
</script>
<!--===============================================================================================-->
<script
src=
"js/main.js"
></script>
</body>
</html>
\ No newline at end of file
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