Skip to content

Commit

Permalink
first commit
Browse files Browse the repository at this point in the history
  • Loading branch information
zigazajc007 committed Dec 12, 2020
0 parents commit 7f45a5e
Show file tree
Hide file tree
Showing 13 changed files with 1,142 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# AdminBans-Website
47 changes: 47 additions & 0 deletions check_login.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
<?php
require "settings-864337.php";

session_start();

if (isset($_POST['username']) && isset($_POST["password"])) {

$_SESSION["msg"] = "";

if($login_hcaptcha){
$responseKey = $_POST['h-captcha-response'];

$url = 'https://hcaptcha.com/siteverify?secret='.$login_hcaptcha.'&response='.$responseKey;
$response = file_get_contents($url);
$response = json_decode($response);

if($response->success){



}else{
$_SESSION["msg"] = "Please complete the captcha!";
$_SESSION["color"] = "alert-danger";
header("Location: panel.php");
}
}else{
if($_POST['username'] == $login_username){
if($_POST["password"] == $login_password){
$_SESSION["username"] = $_POST['username'];
header("Location: panel.php");
}else{
$_SESSION["msg"] = "Password is incorrect!";
$_SESSION["color"] = "alert-danger";
header("Location: panel.php");
}
}else{
$_SESSION["msg"] = "Username is incorrect!";
$_SESSION["color"] = "alert-danger";
header("Location: panel.php");
}
}
}else{
$_SESSION["msg"] = "Ne dela !";
$_SESSION["color"] = "alert-danger";
header("Location: panel.php");
}
?>
9 changes: 9 additions & 0 deletions check_logout.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?php
session_start();
session_unset();
session_destroy();
session_write_close();
setcookie(session_name(),'',0,'/');
session_regenerate_id(true);
header("Location: index.php");
?>
7 changes: 7 additions & 0 deletions css/animate.css

Large diffs are not rendered by default.

36 changes: 36 additions & 0 deletions css/main.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
*{
font-family: 'Ubuntu', sans-serif;
}

span{
box-shadow: 1px 5px;
margin-top: -10px;
}

h1{
text-align: center;
margin: 1em;
}

a:hover{
text-decoration: none;
}

.table{
max-width: 80%;
margin: auto;
}

table {
border-collapse: collapse;
width: 100%;
}

th, td{
text-align: center;
padding: 15px;
}

.fa {
font-size: 12px;
}
34 changes: 34 additions & 0 deletions functions.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<?php

function chatColor($text){

if (strpos($text, '&') !== false) {
$text = str_replace('&0', "<strong style='color: #000;'>", $text);
$text = str_replace('&1', "<strong style='color: #00A;'>", $text);
$text = str_replace('&2', "<strong style='color: #0A0;'>", $text);
$text = str_replace('&3', "<strong style='color: #0AA;'>", $text);
$text = str_replace('&4', "<strong style='color: #A00;'>", $text);
$text = str_replace('&5', "<strong style='color: #A0A;'>", $text);
$text = str_replace('&6', "<strong style='color: #FA0;'>", $text);
$text = str_replace('&7', "<strong style='color: #AAA;'>", $text);
$text = str_replace('&8', "<strong style='color: #555;'>", $text);
$text = str_replace('&9', "<strong style='color: #55F;'>", $text);
$text = str_replace('&a', "<strong style='color: #5F5;'>", $text);
$text = str_replace('&b', "<strong style='color: #5FF;'>", $text);
$text = str_replace('&c', "<strong style='color: #F55;'>", $text);
$text = str_replace('&d', "<strong style='color: #F5F;'>", $text);
$text = str_replace('&e', "<strong style='color: #FF5;'>", $text);
$text = str_replace('&f', "<strong style='color: #FFF;'>", $text);
$text = str_replace('&g', "<strong style='color: #DDD605;'>", $text);

$text = str_replace('&k', "", $text);
$text = str_replace('&l', "", $text);
$text = str_replace('&m', "", $text);
$text = str_replace('&n', "", $text);
$text = str_replace('&o', "", $text);
$text = str_replace('&r', "", $text);
}
return $text;
}

?>
Binary file added images/server-icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 7f45a5e

Please sign in to comment.