Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
B
BattTho
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Thoeni Fabian (Student Com20)
BattTho
Compare revisions
c748921d778fa8d5a49f77f58fcf8533074a31aa to master
Compare revisions
Changes are shown as if the
source
revision was being merged into the
target
revision.
Learn more about comparing revisions.
Source
Fabian.Thoeni/batttho
Select target project
No results found
master
Select Git revision
Branches
master
unsecure
Swap
Target
Chiara.DErcoli/batttho
Select target project
Chiara.DErcoli/batttho
Fabian.Thoeni/batttho
2 results
c748921d778fa8d5a49f77f58fcf8533074a31aa
Select Git revision
Branches
master
unsecure
Show changes
Only incoming changes from source
Include changes to target since source was created
Compare
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
unsecure/questions.php
+3
-16
3 additions, 16 deletions
unsecure/questions.php
unsecure/register.php
+3
-24
3 additions, 24 deletions
unsecure/register.php
unsecure/styles.css
+20
-14
20 additions, 14 deletions
unsecure/styles.css
unsecure/welcome.php
+0
-50
0 additions, 50 deletions
unsecure/welcome.php
with
26 additions
and
104 deletions
unsecure/questions.php
View file @
3281567b
...
...
@@ -5,11 +5,10 @@ $host = "127.0.0.1";
$port
=
"5432"
;
$user
=
"postgres"
;
$password
=
"postgres"
;
$db
=
"
demo
"
;
$db
=
"
BattTho_unsecure
"
;
$conn_string
=
"host="
.
$host
.
" port=5432 dbname="
.
$db
.
" user="
.
$user
.
" password="
.
$password
.
""
;
$con
=
pg_connect
(
$conn_string
);
$username
=
$_SESSION
[
'uname'
];
...
...
@@ -23,7 +22,6 @@ if (isset($_GET['name'])) {
}
?>
<html>
<head>
...
...
@@ -31,8 +29,9 @@ if (isset($_GET['name'])) {
<link
rel=
"dns-prefetch"
href=
"//fonts.gstatic.com"
>
<link
href=
"https://fonts.googleapis.com/css?family=Nunito"
rel=
"stylesheet"
>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"styles
2
.css"
>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"styles.css"
>
<link
rel=
"stylesheet"
href=
"app.css"
>
<link
rel=
"icon"
type=
"image/png"
href=
"img/favicon.png"
/>
</head>
<body>
...
...
@@ -92,7 +91,6 @@ if (isset($_GET['name'])) {
</div>
<br>
<?php
if
(
isset
(
$_GET
[
'submit'
]))
{
...
...
@@ -102,7 +100,6 @@ if (isset($_GET['name'])) {
header
(
'Location: questions.php'
);
}
if
(
isset
(
$_GET
[
'submit2'
]))
{
$answer
=
$_GET
[
'Answers'
];
$id
=
$_GET
[
'currentId'
];
...
...
@@ -114,19 +111,13 @@ if (isset($_GET['name'])) {
$result
=
pg_query
(
$con
,
'SELECT question, "ID", userquestion FROM questions ORDER by "ID" DESC'
);
$result2
=
pg_query
(
$con
,
'SELECT answers, questionid, useranswer FROM answers'
);
while
(
$row
=
pg_fetch_assoc
(
$result
))
{
echo
'
<div class="card">
<div class="card-header"> Question: '
.
$row
[
"question"
]
.
'
<div>Question by: '
.
$row
[
"userquestion"
]
.
'</div>
</div>
<div class="card-body">
<form method="GET" action="">'
;
pg_result_seek
(
$result2
,
0
);
while
(
$row2
=
pg_fetch_assoc
(
$result2
))
{
if
(
$row
[
"ID"
]
==
$row2
[
"questionid"
])
{
...
...
@@ -135,21 +126,17 @@ if (isset($_GET['name'])) {
}
echo
'
<input type="hidden" name="currentId" value="'
.
$row
[
"ID"
]
.
'" />
<div class="form-group">
<input type="text" name="Answers" class="form-control" placeholder="Enter answer">
<button type="submit" name="submit2" class="top-buffer">Submit Answer</button>
</div>
</form>
</div>
</div>
<br>
'
;
}
?>
</div>
...
...
This diff is collapsed.
Click to expand it.
unsecure/register.php
View file @
3281567b
...
...
@@ -5,11 +5,10 @@ $host = "127.0.0.1";
$port
=
"5432"
;
$user
=
"postgres"
;
$password
=
"postgres"
;
$db
=
"
demo
"
;
$db
=
"
BattTho_unsecure
"
;
$conn_string
=
"host="
.
$host
.
" port=5432 dbname="
.
$db
.
" user="
.
$user
.
" password="
.
$password
.
""
;
pg_connect
(
$conn_string
);
if
(
isset
(
$_POST
[
'username'
]))
{
...
...
@@ -25,9 +24,7 @@ if (isset($_POST['username'])) {
?>
<html>
<head>
<title>
Login Page
</title>
<link
rel=
"dns-prefetch"
href=
"//fonts.gstatic.com"
>
...
...
@@ -38,10 +35,7 @@ if (isset($_POST['username'])) {
<link
rel=
"stylesheet"
href=
"https://use.fontawesome.com/releases/v5.3.1/css/all.css"
integrity=
"sha384-mzrmE5qonljUremFsqc01SB46JvROS7bZs3IO2EmfFsd15uHvIt+Y8vEf7N7fWAU"
crossorigin=
"anonymous"
>
<link
rel=
"stylesheet"
href=
"styles.css"
>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"styles2.css"
>
<link
rel=
"icon"
type=
"image/png"
href=
"img/favicon.png"
/>
</head>
<body>
...
...
@@ -51,25 +45,13 @@ if (isset($_POST['username'])) {
<a
class=
"navbar-brand"
>
BattTho
</a>
<div
class=
"collapse navbar-collapse"
id=
"navbarSupportedContent"
>
<ul
class=
"navbar-nav me-auto"
>
</ul>
<ul
class=
"navbar-nav ms-auto"
>
<li
class=
"nav-item"
>
<a
class=
"nav-link"
href=
"login.php"
>
Login
</a>
</li>
<li
class=
"nav-item dropdown"
>
<div
class=
"dropdown-menu dropdown-menu-right"
aria-labelledby=
"navbarDropdown"
>
<a
class=
"dropdown-item"
href=
"{{ route('logout') }}"
onclick=
"event.preventDefault();
document.getElementById('logout-form').submit();"
>
</a>
</div>
</li>
</ul>
</div>
</div>
...
...
@@ -78,7 +60,7 @@ if (isset($_POST['username'])) {
</div>
<div
class=
"container"
>
<div
class=
"d-flex justify-content-center h-100"
>
<div
class=
"card"
>
<div
class=
"card
2
"
>
<div
class=
"card-header"
>
<h3>
Register
</h3>
</div>
...
...
@@ -89,7 +71,6 @@ if (isset($_POST['username'])) {
<span
class=
"input-group-text"
><i
class=
"fas fa-user"
></i></span>
</div>
<input
type=
"text"
name=
"username"
class=
"form-control"
placeholder=
"username"
required
>
</div>
<div
class=
"input-group form-group"
>
<div
class=
"input-group-prepend"
>
...
...
@@ -106,6 +87,4 @@ if (isset($_POST['username'])) {
</div>
</div>
</div>
</body>
\ No newline at end of file
This diff is collapsed.
Click to expand it.
unsecure/styles.css
View file @
3281567b
/* Made with love by Mutiullah Samim*/
@import
url('https://fonts.googleapis.com/css?family=Numans')
;
html
,
body
{
background-image
:
url('https://wallpaperaccess.com/full/187161.jpg')
;
background-image
:
url('https://steamcdn-a.akamaihd.net/steamcommunity/public/images/items/286300/c33a58cd147d270171996c766b102de411603d89.jpg')
;
background-repeat
:
repeat-y
;
background-size
:
cover
;
background-repeat
:
no-repeat
;
height
:
100%
;
font-family
:
'Numans'
,
sans-serif
;
}
...
...
@@ -16,7 +14,7 @@ html, body {
align-content
:
center
;
}
.card
{
.card
2
{
height
:
370px
;
margin-top
:
auto
;
margin-bottom
:
auto
;
...
...
@@ -107,12 +105,20 @@ input:focus {
.neon
{
color
:
#fff
;
text-shadow
:
0
0
5px
#fff
,
0
0
10px
#fff
,
0
0
20px
#fff
,
0
0
40px
#0ff
,
0
0
80px
#0ff
,
0
0
90px
#0ff
,
0
0
100px
#0ff
,
0
0
150px
#0ff
;
}
\ No newline at end of file
0
0
5px
#fff
,
0
0
10px
#fff
,
0
0
20px
#fff
,
0
0
40px
#0ff
,
0
0
80px
#0ff
,
0
0
90px
#0ff
,
0
0
100px
#0ff
,
0
0
150px
#0ff
;
}
.wrongpass
{
color
:
red
;
}
.top-buffer
{
margin-top
:
15px
;
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
unsecure/welcome.php
deleted
100644 → 0
View file @
c748921d
<html>
<head>
<title>
Login Page
</title>
<link
rel=
"dns-prefetch"
href=
"//fonts.gstatic.com"
>
<link
href=
"https://fonts.googleapis.com/css?family=Nunito"
rel=
"stylesheet"
>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"styles2.css"
>
<link
rel=
"stylesheet"
href=
"app.css"
>
</head>
<body>
<div
id=
"app"
>
<nav
class=
"navbar navbar-expand-md navbar-light bg-white shadow-sm"
>
<div
class=
"container"
>
<a
class=
"navbar-brand"
>
BattTho
</a>
<button
class=
"navbar-toggler"
type=
"button"
data-bs-toggle=
"collapse"
data-bs-target=
"#navbarSupportedContent"
aria-controls=
"navbarSupportedContent"
aria-expanded=
"false"
aria-label=
"{{ __('Toggle navigation') }}"
>
<span
class=
"navbar-toggler-icon"
></span>
</button>
<div
class=
"collapse navbar-collapse"
id=
"navbarSupportedContent"
>
<ul
class=
"navbar-nav me-auto"
>
</ul>
</div>
</div>
</nav>
</div>
<br>
<div
class=
"container"
>
<div
class=
"row justify-content-center"
>
<div
class=
"col-md-8"
>
<div
class=
"card"
>
<div
class=
"card-header"
>
Please log in to make and answer questions!
</div>
<div
class=
"card-body"
>
<form
method=
"GET"
action=
""
>
<div
class=
"form-group"
>
<button
type=
"submit"
name=
"submit"
class=
"top-buffer"
>
Log in
</button>
<a
href=
"login.php"
class=
"btn float-right login_btn"
>
Login
</a>
</div>
</form>
</div>
</div>
<br>
</div>
</div>
</div>
</body>
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Prev
1
…
19
20
21
22
23
Next