4
1
Fork 0

Initial Commit

This commit is contained in:
Marc 2017-03-29 21:00:22 +02:00
commit a7a1d8ad8d
6 changed files with 157 additions and 0 deletions

BIN
bg.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 MiB

BIN
haken.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

76
index.php Normal file
View file

@ -0,0 +1,76 @@
<head>
<title>Cheaterliste</title>
<link href="style.css?v=<?php date("YmdHis");?>" rel="stylesheet" type="text/css">
<?php
$cockDatabase = "dulow";
$host = "localhost";
$user = "root";
$password = "";
$conn = new mysqli($host,$user,$password,$cockDatabase);
if ($conn->connect_error){
die("Verbindung fehlgeschlagen: " . $conn->connect_error);
}
?>
<table style="width:50%" class="center">
<tr>
<th style="padding: 0.5em 0.5em">Eintrag</th>
<!-- <th style="padding: 0.5em 0.5em">Avatar</th> -->
<th class="profil">Steam-Profil</th>
<th style="padding: 0.4em">Ersteller</th>
<th style="padding: 0.4em" class="Zeit">Erstelldatum</th>
<th style="padding: 0.4em">VAC-Ban</th>
</tr>
<?php
$sql = "SELECT * FROM cheaterliste ORDER BY addtime DESC;";
$result = $conn->query($sql);
$number = 1;
while($row = $result->fetch_assoc()){
if($row['deleted'])
continue;
if($number % 2 == 0){
$output = "<tr class='tr_even'>
<td>".$number."</td>
<td class='profil'><a target ='_blank'href='".$row['url']."'>".$row['url']."</td>
<td>".$row['author']."</td>
<td>".$row['addtime']."</td>";
if($row['banned'] == 0){
$output .= "<td><img src='kreuz.png' height='20' width='20'</td>
</tr>";
}else{
$output .= "<td><img src='haken.png' height='20' width='20'</td>
</tr>";
}
}else{
$output = "<tr class='tr_odd'>
<td>".$number."</td>
<td class='profil'><a target ='_blank'href='".$row['url']."'>".$row['url']."</td>
<td>".$row['author']."</td>
<td>".$row['addtime']."</td>";
if($row['banned'] == 0){
$output .= "<td><img src='kreuz.png' height='20' width='20'</td>
</tr>";
}else{
$output .= "<td><img src='haken.png' height='20' width='20'</td>
</tr>";
}
}
echo $output;
$number++;
}
?>
</table><br>
<form action="/insert.php" method="post">
Text:<input type="text" name="author"><br>
URL:<input type="text" name="url"><br>
<input type="submit" value="Hinzufügen">
</form>

25
insert.php Normal file
View file

@ -0,0 +1,25 @@
<?php
$cockDatabase = "dulow";
$host = "localhost";
$user = "root";
$password = "";
$conn = new mysqli($host,$user,$password,$cockDatabase);
if ($conn->connect_error){
die("Verbindung fehlgeschlagen: " . $conn->connect_error);
}
var_dump($_POST['url']);
var_dump($_POST['author']);
if($_POST['url'] == '' && $_POST['author'] == ''){
header('Location: /');
return;
}
$url = $_POST['url'];
$author = $_POST['author'];
$sql = "INSERT INTO cheaterliste (url, author) VALUES('".$url."', '".$author."')";
$conn->query($sql);
?>

BIN
kreuz.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

56
style.css Normal file
View file

@ -0,0 +1,56 @@
body {
background-size: cover;
background-image: url(bg.jpg);
}
table, td, th {
text-align: center;
}
td, th {
padding: 1px 15px;
font-family: 'Lato', Arial, sans-serif;
}
table {
border-collapse: collapse;
width: 100%
}
tr:last-child {
border-bottom: 2px solid rgba(255,255,255, 1) !important;
}
th {
color: #DDDDDD;
background: rgba(18,18,18, 0.3) !important;
border-bottom: 2px solid #DDDDDD;
border: 2px solid #DDDDDD;
}
td {
padding: 10px;
border: 2px solid #DDDDDD;
border-bottom: 2px solid rgba(255,255,255, 0.1);
color: #DDDDDD;
}
tr {
background: rgba(18,18,18, 0.6) !important;
}
.profil {
text-align: left !important;
}
a:link{
color: white;
}
a:visited{
color: white;
}
table.center {
margin-left: auto;
margin-right: auto;
margin-top: 200px;
}
form {
margin-left: 50%;
margin-right: 50%;
margin-top: 250px;
}