Skip to content

Commit 2e45a2c

Browse files
authored
Merge pull request #4 from Zanark/php_forum
Added forum, and hosted the website on codex-iter.000webhostapp.com
2 parents bcdebcf + d32ba3b commit 2e45a2c

File tree

10 files changed

+656
-1
lines changed

10 files changed

+656
-1
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# codex-iter.github.io
22
Organisation Page
3-
[Codex 2.0](http://tiny.cc/codexiter)
3+
[Codex 2.0](https://codex-iter.000webhostapp.com/)
44

55

66
![screenshot](./codex2.0.png)

forum/connect.php

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<?php
2+
3+
$database = array();
4+
$database['host'] = "localhost";
5+
$database['port'] = "3306";
6+
$database['name'] = "forum";
7+
$database['username'] = "root";
8+
$database['password'] = "";
9+
10+
$link = mysqli_connect($database['host'] , $database['username'] , $database['password']);
11+
12+
if($link){
13+
echo "<b>Successfully</b> connected to database : " . $database['name'] . "<br/><br/>";
14+
}
15+
else {
16+
echo "Coonection to database " . $database['name'] . " <b>FAILED</b> <br/>";
17+
echo "Error is => " . mysql_error();
18+
}
19+
20+
?>

forum/css/style.css

Lines changed: 158 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,158 @@
1+
body {
2+
font-family: "Open Sans", sans-serif;
3+
height: 100vh;
4+
background: url("https://static1.squarespace.com/static/57713a8e2994cae381dd86fe/t/577e47a1ebbd1ac2b78e016c/1467893677609/iter+.jpg?format=1500w") 50% fixed;
5+
background-size: cover;
6+
}
7+
8+
@keyframes spinner {
9+
0% {
10+
transform: rotateZ(0deg);
11+
}
12+
100% {
13+
transform: rotateZ(359deg);
14+
}
15+
}
16+
* {
17+
box-sizing: border-box;
18+
}
19+
20+
.wrapper {
21+
display: flex;
22+
align-items: center;
23+
flex-direction: column;
24+
justify-content: center;
25+
width: 100%;
26+
min-height: 100%;
27+
padding: 20px;
28+
background: rgba(4, 40, 68, 0.85);
29+
}
30+
31+
.login {
32+
border-radius: 2px 2px 5px 5px;
33+
padding: 10px 20px 20px 20px;
34+
width: 90%;
35+
max-width: 320px;
36+
background: #ffffff;
37+
position: relative;
38+
padding-bottom: 80px;
39+
box-shadow: 0px 1px 5px rgba(0, 0, 0, 0.3);
40+
}
41+
.login.loading button {
42+
max-height: 100%;
43+
padding-top: 50px;
44+
}
45+
.login.loading button .spinner {
46+
opacity: 1;
47+
top: 40%;
48+
}
49+
.login.ok button {
50+
background-color: #8bc34a;
51+
}
52+
.login.ok button .spinner {
53+
border-radius: 0;
54+
border-top-color: transparent;
55+
border-right-color: transparent;
56+
height: 20px;
57+
animation: none;
58+
transform: rotateZ(-45deg);
59+
}
60+
.login input {
61+
display: block;
62+
padding: 15px 10px;
63+
margin-bottom: 10px;
64+
width: 100%;
65+
border: 1px solid #ddd;
66+
transition: border-width 0.2s ease;
67+
border-radius: 2px;
68+
color: #ccc;
69+
}
70+
.login input + i.fa {
71+
color: #fff;
72+
font-size: 1em;
73+
position: absolute;
74+
margin-top: -47px;
75+
opacity: 0;
76+
left: 0;
77+
transition: all 0.1s ease-in;
78+
}
79+
.login input:focus {
80+
outline: none;
81+
color: #444;
82+
border-color: #2196F3;
83+
border-left-width: 35px;
84+
}
85+
.login input:focus + i.fa {
86+
opacity: 1;
87+
left: 30px;
88+
transition: all 0.25s ease-out;
89+
}
90+
.login a {
91+
font-size: 0.8em;
92+
color: #2196F3;
93+
text-decoration: none;
94+
}
95+
.login .title {
96+
color: #444;
97+
font-size: 1.2em;
98+
font-weight: bold;
99+
margin: 10px 0 30px 0;
100+
border-bottom: 1px solid #eee;
101+
padding-bottom: 20px;
102+
}
103+
.login button {
104+
width: 100%;
105+
height: 100%;
106+
padding: 10px 10px;
107+
background: #2196F3;
108+
color: #fff;
109+
display: block;
110+
border: none;
111+
margin-top: 20px;
112+
position: absolute;
113+
left: 0;
114+
bottom: 0;
115+
max-height: 60px;
116+
border: 0px solid rgba(0, 0, 0, 0.1);
117+
border-radius: 0 0 2px 2px;
118+
transform: rotateZ(0deg);
119+
transition: all 0.1s ease-out;
120+
border-bottom-width: 7px;
121+
}
122+
.login button .spinner {
123+
display: block;
124+
width: 40px;
125+
height: 40px;
126+
position: absolute;
127+
border: 4px solid #ffffff;
128+
border-top-color: rgba(255, 255, 255, 0.3);
129+
border-radius: 100%;
130+
left: 50%;
131+
top: 0;
132+
opacity: 0;
133+
margin-left: -20px;
134+
margin-top: -20px;
135+
animation: spinner 0.6s infinite linear;
136+
transition: top 0.3s 0.3s ease, opacity 0.3s 0.3s ease, border-radius 0.3s ease;
137+
box-shadow: 0px 1px 0px rgba(0, 0, 0, 0.2);
138+
}
139+
.login:not(.loading) button:hover {
140+
box-shadow: 0px 1px 3px #2196F3;
141+
}
142+
.login:not(.loading) button:focus {
143+
border-bottom-width: 4px;
144+
}
145+
146+
footer {
147+
display: block;
148+
padding-top: 50px;
149+
text-align: center;
150+
color: #ddd;
151+
font-weight: normal;
152+
text-shadow: 0px -1px 0px rgba(0, 0, 0, 0.2);
153+
font-size: 0.8em;
154+
}
155+
footer a, footer a:link {
156+
color: #fff;
157+
text-decoration: none;
158+
}

forum/index.php

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<!DOCTYPE html>
2+
3+
<html lang="en-US">
4+
<head>
5+
<meta charset="utf-8" />
6+
<meta http-equiv="X-UA-Compatible" content="IE=edge">
7+
<title>CODEX FORUM</title>
8+
<meta name="viewport" content="width=device-width, initial-scale=1">
9+
<link rel="stylesheet" type="text/css" media="screen" href="main.css" />
10+
<script src="main.js"></script>
11+
</head>
12+
<body>
13+
<form action = "login.php" method = "POST">
14+
Username : <input type = "text" name = "username" placeholder="Enter your Username"><br><br>
15+
Password &nbsp;: <input type="password" name = "password" placeholder="Enter your Password"><br><br>
16+
<input type="submit" name="login" value="LOGIN">
17+
</form>
18+
</body>
19+
</html>

forum/js/index.js

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
var working = false;
2+
$('.login').on('submit', function(e) {
3+
e.preventDefault();
4+
if (working) return;
5+
working = true;
6+
var $this = $(this),
7+
$state = $this.find('button > .state');
8+
$this.addClass('loading');
9+
$state.html('Authenticating');
10+
setTimeout(function() {
11+
$this.addClass('ok');
12+
$state.html('Welcome back!');
13+
setTimeout(function() {
14+
$state.html('Log in');
15+
$this.removeClass('ok loading');
16+
working = false;
17+
}, 4000);
18+
}, 3000);
19+
});

forum/login.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<?php
2+
3+
$username = $_POST['username'];
4+
$password = $_POST['password'];
5+
6+
// echo "Username : " . $username . "<br/><br/> Password : " . $password;
7+
8+
?>

forum/register.php

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<!DOCTYPE html>
2+
3+
<html lang="en-US">
4+
<head>
5+
<meta charset="utf-8" />
6+
<meta http-equiv="X-UA-Compatible" content="IE=edge">
7+
<title>CODEX FORUM</title>
8+
<meta name="viewport" content="width=device-width, initial-scale=1">
9+
<link rel="stylesheet" type="text/css" media="screen" href="main.css" />
10+
<script src="main.js"></script>
11+
</head>
12+
<body>
13+
<form action = "register_parse.php" method = "POST">
14+
Enter a Username : <input type = "text" name = "username" placeholder="Enter a Username"><br><br>
15+
Enter a Password &nbsp;: <input type="password" name = "password" placeholder="Enter a Password"><br><br>
16+
<input type="submit" name="register" value="REGISTER">
17+
</form>
18+
</body>
19+
</html>

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy