mirror of
http://git.nowherejezfoltodf4jiyl6r56jnzintap5vyjlia7fkirfsnfizflqd.onion/nihilist/darknet-lantern.git
synced 2025-07-01 22:06:40 +00:00
issue 83: submission status is centered in the middle on submission
This commit is contained in:
parent
0240c82df0
commit
7c144fec1d
4 changed files with 23 additions and 9 deletions
|
@ -204,7 +204,7 @@ function DisplayCategories($instancename, $path) {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<center><a href="submit.php">Submit a link</a></center>
|
||||||
</br>
|
</br>
|
||||||
<h1><a href="http://git.nowherejezfoltodf4jiyl6r56jnzintap5vyjlia7fkirfsnfizflqd.onion/nihilist/darknet-lantern"><img src="img/lantern project large.png" class="projectbanner"></a></h1>
|
<h1><a href="http://git.nowherejezfoltodf4jiyl6r56jnzintap5vyjlia7fkirfsnfizflqd.onion/nihilist/darknet-lantern"><img src="img/lantern project large.png" class="projectbanner"></a></h1>
|
||||||
<p><u>Update Frequency:</u> every 3 hours</p> </br>
|
<p><u>Update Frequency:</u> every 3 hours</p> </br>
|
||||||
|
|
|
@ -23,6 +23,7 @@
|
||||||
<div class="width-class">
|
<div class="width-class">
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
|
||||||
require("header.php");
|
require("header.php");
|
||||||
$min_length = 1;
|
$min_length = 1;
|
||||||
$max_length = 32;
|
$max_length = 32;
|
||||||
|
@ -35,8 +36,8 @@ require("header.php");
|
||||||
$lines_uv = count(file($unverifiedcsvpath));
|
$lines_uv = count(file($unverifiedcsvpath));
|
||||||
$lines_v = count(file($verifiedcsvpath));
|
$lines_v = count(file($verifiedcsvpath));
|
||||||
//echo "<p>CSV LINES: " . $lines_uv . " " . $lines_v . "</p>";
|
//echo "<p>CSV LINES: " . $lines_uv . " " . $lines_v . "</p>";
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<form action="index.php" method="GET">
|
<form action="index.php" method="GET">
|
||||||
<input type="text" name="query" />
|
<input type="text" name="query" />
|
||||||
<input type="submit" value="Search" /> </br>
|
<input type="submit" value="Search" /> </br>
|
||||||
|
@ -99,7 +100,6 @@ require("header.php");
|
||||||
|
|
||||||
?>
|
?>
|
||||||
</div>
|
</div>
|
||||||
<center><a href="submit.php">Submit a new link</a></center>
|
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
require("footer.php");
|
require("footer.php");
|
||||||
|
|
|
@ -325,3 +325,10 @@ img{
|
||||||
}*/
|
}*/
|
||||||
|
|
||||||
|
|
||||||
|
.submission-status-success{
|
||||||
|
color: green;
|
||||||
|
}
|
||||||
|
|
||||||
|
.submission-status-error{
|
||||||
|
color: red;
|
||||||
|
}
|
||||||
|
|
|
@ -4,6 +4,8 @@ if (isset($_POST['submit'])){
|
||||||
// Link checks
|
// Link checks
|
||||||
$link = str_replace(['<','>'],'', $_POST['link']);
|
$link = str_replace(['<','>'],'', $_POST['link']);
|
||||||
// Clear user input
|
// Clear user input
|
||||||
|
$success_message = null;
|
||||||
|
$error_message = null;
|
||||||
$link = htmlspecialchars($link);
|
$link = htmlspecialchars($link);
|
||||||
$name = htmlspecialchars($_POST['name']);
|
$name = htmlspecialchars($_POST['name']);
|
||||||
$description = htmlspecialchars($_POST['description']);
|
$description = htmlspecialchars($_POST['description']);
|
||||||
|
@ -12,13 +14,13 @@ if (isset($_POST['submit'])){
|
||||||
$captcha = htmlspecialchars($_POST['captcha']);
|
$captcha = htmlspecialchars($_POST['captcha']);
|
||||||
// Captcha Auth check
|
// Captcha Auth check
|
||||||
if ($captcha != htmlspecialchars($_SESSION['secure'])){
|
if ($captcha != htmlspecialchars($_SESSION['secure'])){
|
||||||
echo "Captcha Failed";
|
$error_message = "Captcha Failed";
|
||||||
}else{
|
}else{
|
||||||
if (empty($link) or empty($name) or empty($description)){
|
if (empty($link) or empty($name) or empty($description)){
|
||||||
echo "All of the fields must not be empty";
|
$error_message = "All of the fields must not be empty";
|
||||||
}else{
|
}else{
|
||||||
if (strlen($link) > 512 or strlen($name) > 64 or strlen($description) > 256 or strlen($sensitive) > 1 or strlen($category) > 64){
|
if (strlen($link) > 512 or strlen($name) > 64 or strlen($description) > 256 or strlen($sensitive) > 1 or strlen($category) > 64){
|
||||||
echo "Don't excede the limit";
|
$error_message = "Don't excede the limit";
|
||||||
}else{
|
}else{
|
||||||
|
|
||||||
// Open the file once before the loop
|
// Open the file once before the loop
|
||||||
|
@ -37,7 +39,7 @@ if (isset($_POST['submit'])){
|
||||||
// Handle error opening the file
|
// Handle error opening the file
|
||||||
error_log("Error opening the file.");
|
error_log("Error opening the file.");
|
||||||
}
|
}
|
||||||
echo "Link Successfully Submitted";
|
$success_message = "Link Successfully Submitted";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -68,6 +70,11 @@ if (isset($_POST['submit'])){
|
||||||
<html>
|
<html>
|
||||||
<?php include("header.php");?>
|
<?php include("header.php");?>
|
||||||
<div class="width-class">
|
<div class="width-class">
|
||||||
|
<?php if ($success_message != null){?>
|
||||||
|
<h3 class="submission-status-success"> <?php echo $success_message ?></h3>
|
||||||
|
<?php }else {?>
|
||||||
|
<h3 class="submission-status-error"><?php echo $error_message ?></h3>
|
||||||
|
<?php }?>
|
||||||
<center>
|
<center>
|
||||||
<h1>Character Limits</h1>
|
<h1>Character Limits</h1>
|
||||||
<p>Link should be 354</p>
|
<p>Link should be 354</p>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue