Skip to content

Commit

Permalink
Added Styles
Browse files Browse the repository at this point in the history
  • Loading branch information
NukeDev committed Jul 19, 2024
1 parent 822b2e6 commit 7512b16
Show file tree
Hide file tree
Showing 4 changed files with 43 additions and 19 deletions.
19 changes: 13 additions & 6 deletions web/www/check_blacklist.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Check Blacklist</title>
<style>
<link rel="stylesheet" href="https://cdn.simplecss.org/simple.min.css">
<!-- <style>
body {
display: flex;
justify-content: center;
Expand All @@ -53,17 +54,21 @@
.home-link:hover {
text-decoration: underline;
}
</style>
</style> -->
</head>
<header>
<h1>MyRBL - rbl.<?php echo getenv('RBL_DOMAIN')?></h1>
</header>
<body>
<div class="container">
<h1>Check if IP/Domain is blacklisted</h1>
<h4>Check if IP/Domain is blacklisted</h4>
<form id="checkForm">
<input type="text" id="value" name="value" required>
<button type="submit">Check</button>
</form>
<div id="message" class="result"></div>
<a class="home-link" href="/">&larr; Go back to homepage</a>
</br>
<code id="message" class="result"></code></br></br>
<a class="home-link" href="/" style="margin: top 2px;">&larr; Go back to homepage</a>
</div>
<script>
document.getElementById('checkForm').addEventListener('submit', function(event) {
Expand Down Expand Up @@ -96,6 +101,8 @@ function reverseIP(ip) {
});
});
</script>
<?php include 'footer.php'; ?>
</body>
<footer>
<?php include 'footer.php'; ?>
</footer>
</html>
6 changes: 3 additions & 3 deletions web/www/footer.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
<html>
<head>
<style>
.footer {
/*.footer {
text-align: center;
padding: 20px;
background-color: #f1f1f1;
Expand All @@ -34,7 +34,7 @@
bottom: 0;
width: 100%;
font-family: Arial, sans-serif;
}
}*/
.footer p {
margin: 5px 0;
font-size: 14px;
Expand All @@ -59,7 +59,7 @@
<p>
<a href="https://github.com/NukeDev/MyRBL" target="_blank">
<img src="https://cdn-icons-png.flaticon.com/512/25/25231.png" alt="GitHub" class="github-icon">
NukeDev/MyRBL
<mark>NukeDev/MyRBL</mark>
</a>
</p>
<p>
Expand Down
14 changes: 11 additions & 3 deletions web/www/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@
<html>
<head>
<title>MyRBL - <?php echo getenv('RBL_DOMAIN')?> Dashboard</title>
<style>
<link rel="stylesheet" href="https://cdn.simplecss.org/simple.min.css">

<!--style>
body {
display: flex;
justify-content: center;
Expand Down Expand Up @@ -55,15 +57,21 @@
.home-link:hover {
text-decoration: underline;
}
</style>
</style-->
</head>
<header>
<h1>MyRBL - rbl.<?php echo getenv('RBL_DOMAIN')?></h1>
</header>
<body>
<h1>MyRBL - rbl.<?php echo getenv('RBL_DOMAIN')?></h1>

<ul>
<li><a href="check_blacklist.php">Check if IP/Domain is blacklisted</a></li>
<li><a href="report_spam.php">Report IP/Domain as spam</a></li>
<!--li><a href="/">View Statistics</a></li-->
</ul>
</body>
<footer>
<?php include 'footer.php'; ?>
</footer>

</html>
23 changes: 16 additions & 7 deletions web/www/report_spam.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,17 +44,17 @@
$value_to_check = $value;
} else {
$invalidFormat = true;
$message = "Invalid IP/Domain format.";
$message = "<code>Invalid IP/Domain format.</code>";
}
if (!$invalidFormat) {
$stmt = $conn->prepare("INSERT INTO $table ($column, motivation) VALUES (?, ?)");
$stmt->bind_param("ss", $value_to_check, $motivation);
$stmt->execute();

if ($stmt->affected_rows > 0) {
$message = "The IP/Domain '$value' has been reported successfully.";
$message = "<code>The IP/Domain '$value' has been reported successfully.</code>";
} else {
$message = "There was an error reporting the IP/Domain '$value'.";
$message = "<code>There was an error reporting the IP/Domain '$value'.</code>";
}

$stmt->close();
Expand All @@ -78,7 +78,8 @@
<html>
<head>
<title>Report IP/Domain Spam</title>
<style>
<link rel="stylesheet" href="https://cdn.simplecss.org/simple.min.css">
<!--style>
body {
display: flex;
justify-content: center;
Expand Down Expand Up @@ -107,11 +108,14 @@
.home-link:hover {
text-decoration: underline;
}
</style>
</style-->
</head>
<header>
<h1>MyRBL - rbl.<?php echo getenv('RBL_DOMAIN')?></h1>
</header>
<body>
<div class="container">
<h1>Report IP/Domain Spam</h1>
<h4>Report IP/Domain Spam</h4>
<form method="post">
<div class="form-group">
<label for="value">IP/Domain:</label>
Expand All @@ -124,15 +128,20 @@
<button type="submit">Report</button>
</form>
<?php if ($message): ?>
</br>
<div class="result">

<?php echo $message; ?>
<?php if ($report_count > 0): ?>
<p>This IP/Domain has been reported <?php echo $report_count; ?> times.</p>
</br><code>This IP/Domain has been reported <?php echo $report_count; ?> times.</code>
<?php endif; ?>
</div>
<?php endif; ?>
</br>
<a class="home-link" href="/">&larr; Go back to homepage</a>
</div>
</body>
<footer>
<?php include 'footer.php'; ?>
</footer>
</html>

0 comments on commit 7512b16

Please sign in to comment.