Skip to content

Commit

Permalink
last commit before 1.8 release
Browse files Browse the repository at this point in the history
  • Loading branch information
GoldDominik893 committed Jan 28, 2024
1 parent d395a0b commit 543aed0
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 16 deletions.
29 changes: 18 additions & 11 deletions admin/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,27 @@
header( "refresh:2;url=/" );
exit();
}
$conn = new mysqli($servername, $username, $password, $dbname);
if ($conn->connect_error) {
die("Connection failed: " . $conn->connect_error);
}
$query = mysqli_query($conn, "SELECT * FROM login WHERE username = '".$_SESSION['logged_in_user']."'");
$numrows = mysqli_num_rows($query);
while ($row = mysqli_fetch_assoc($query))
{
$pwrow = $row['password'];
}
if ($_SESSION['hashed_pass'] == $pwrow) {

if ($useSQL == true) {
$conn = new mysqli($servername, $username, $password, $dbname);
if ($conn->connect_error) {
die("Connection failed: " . $conn->connect_error);
}
$stmt = $conn->prepare("SELECT * FROM login WHERE username = ?");
$stmt->bind_param("s", $_SESSION['logged_in_user']);
$stmt->execute();
$result = $stmt->get_result();
while ($row = $result->fetch_assoc())
{
$pwrow = $row['password'];
}
if ($_SESSION['hashed_pass'] == $pwrow) {
} else {
session_destroy();
}
} else {
session_destroy();
}
?>
<!DOCTYPE HTML>
<html>
Expand Down
2 changes: 1 addition & 1 deletion config.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
$defaultLang = "en"; // If the user is logged out or doesn't have a language set this will be the default
$defaultLoadCommentsSetting = "nothing"; // If the user is logged out or doesn't have a comments loading preference set this will be the default (nothing / noreplies / showall)
$adminuser = "GoldDominik893"; // The user on liberatube you want to have access to the admin dashboard
$testinstance = true; // Whether this is a test instance. A disclaimer will be shown, (true / false)
$testinstance = false; // Whether this is a test instance. A disclaimer will be shown, (true / false)
$allowProxy = "false"; // Choose if the users can proxy video data through the server, (true / false / downloads)
$useReturnYTDislike = true; // Choose whether the server contacts the return youtube dislike api for an estimate of the dislikes, (true / false)

3 changes: 1 addition & 2 deletions images.php
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
<?php
header('Location: https://golddominik893.github.io/file-hosting/images/'.mt_rand(1, 15).'.jpeg');
?>
header('Location: https://golddominik893.github.io/file-hosting/images/'.mt_rand(1, 15).'.jpeg');
1 change: 0 additions & 1 deletion videodata/hls.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,4 +71,3 @@
header('Location: '.$selectedNonHlsUrl);
}
exit;
?>
1 change: 0 additions & 1 deletion videodata/poster.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,3 @@
parse_str($url_components['query'], $params);
header('Location: '.$InvVIServer.'/vi/' . $params['id'] . '/maxres.jpg');
exit;
?>

0 comments on commit 543aed0

Please # to comment.