Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Tenzing
/
banners-with-skip
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
a9dfbb3e
authored
2016-04-14 16:23:49 -0400
by
Dan Rempel
Browse Files
Options
Browse Files
Tag
Download
Plain Diff
Merge branch 'deploy' of git.gotenzing.com:tenzing/banners-with-skip into deploy
2 parents
e4022005
d80514db
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
51 additions
and
14 deletions
includes/auth.php
includes/names.json
menu.php
includes/auth.php
View file @
a9dfbb3
<?php
session_start
();
$userinfo
=
array
(
'admin'
=>
'tenzing01pass'
);
if
(
!
isset
(
$_SESSION
[
'token'
])){
if
(
isset
(
$_GET
[
'logout'
]))
{
$_SESSION
[
'username'
]
=
''
;
header
(
'Location: '
.
$_SERVER
[
'PHP_SELF'
]);
}
echo
'<form>
<dl class="TzMenu"><a style="font-size: 25px; color: #fff !important;" href="./login.php" target="_parent">Login</a></dl></form>'
;
}
else
{
include
(
'loggedin.php'
);
return
;
if
(
isset
(
$_POST
[
'username'
]))
{
if
(
$userinfo
[
$_POST
[
'username'
]]
==
$_POST
[
'password'
])
{
$_SESSION
[
'username'
]
=
$_POST
[
'username'
];
include
(
'loggedin.php'
);
return
;
}
else
{
//Invalid Login
}
};
\ No newline at end of file
}
?>
<form
method=
"post"
>
<dl
class=
"TzMenu"
>
<dt><label
for=
"username"
>
Username:
</label></dt>
<dd><input
type=
"text"
name=
"username"
id=
"username"
/></dd>
</dl>
<dl
class=
"TzMenu"
>
<dt><label
for=
"password"
>
Password:
</label></dt>
<dd><input
type=
"password"
name=
"password"
id=
"password"
/></dd>
</dl>
<dl
class=
"TzMenu"
>
<dt><input
type=
"submit"
value=
" Log In "
/></dt>
</dl>
</form>
<script
type=
"text/javascript"
>
addEvent
(
window
,
'load'
,
function
()
{
document
.
getElementById
(
'username'
).
select
();
});
</script>
\ No newline at end of file
...
...
includes/names.json
View file @
a9dfbb3
...
...
@@ -41,5 +41,8 @@
"124"
:
"Alterna Savings"
,
"131"
:
"St. Joseph Healthcare Hamilton"
"131"
:
"The Commonwell/"
,
"131"
:
""
}
\ No newline at end of file
...
...
menu.php
View file @
a9dfbb3
...
...
@@ -55,13 +55,13 @@
<?php
include
(
'includes/loggedin.php'
);
//if (isset($_SESSION['username'])) {
// include('includes/loggedin.php');
//} else {
// include('includes/auth.php');
//}
if
(
isset
(
$_SESSION
[
'username'
]))
{
include
(
'includes/loggedin.php'
);
}
else
{
include
(
'includes/auth.php'
);
}
?>
<div
id=
"TzLogo"
>
...
...
Please
register
or
sign in
to post a comment