Manual merge of pr/64 by @0x5f3

This commit is contained in:
jokob-sk
2022-08-05 10:57:16 +10:00
parent 7d50e3407b
commit e6d75b411a
10 changed files with 16 additions and 15 deletions

View File

@@ -13,7 +13,8 @@ RUN apt-get update \
&& apt-get clean autoclean \ && apt-get clean autoclean \
&& apt-get autoremove \ && apt-get autoremove \
&& rm -rf /var/lib/apt/lists/* \ && rm -rf /var/lib/apt/lists/* \
&& ln -s /home/pi/pialert/install/index.html /var/www/html/index.html \ && rm -rf /var/www/html \
&& ln -s /home/pi/pialert/front /var/www/html \
&& ln -s /home/pi/pialert/front /var/www/html/pialert \ && ln -s /home/pi/pialert/front /var/www/html/pialert \
&& lighttpd-enable-mod fastcgi-php && lighttpd-enable-mod fastcgi-php

View File

@@ -12,7 +12,7 @@ session_start();
if ($_SESSION["login"] != 1) if ($_SESSION["login"] != 1)
{ {
header('Location: /pialert/index.php'); header('Location: /index.php');
exit; exit;
} }

View File

@@ -12,7 +12,7 @@ session_start();
if ($_SESSION["login"] != 1) if ($_SESSION["login"] != 1)
{ {
header('Location: /pialert/index.php'); header('Location: /index.php');
exit; exit;
} }

View File

@@ -12,7 +12,7 @@ session_start();
if ($_SESSION["login"] != 1) if ($_SESSION["login"] != 1)
{ {
header('Location: /pialert/index.php'); header('Location: /index.php');
exit; exit;
} }

View File

@@ -3,7 +3,7 @@ session_start();
if ($_REQUEST['action'] == 'logout') { if ($_REQUEST['action'] == 'logout') {
session_destroy(); session_destroy();
header('Location: /pialert/index.php'); header('Location: /index.php');
} }
// ################################### // ###################################
// ## Login settings locale start // ## Login settings locale start
@@ -40,7 +40,7 @@ $Pia_WebProtection = strtolower(trim($protection_line[1]));
if ($Pia_WebProtection == 'false') if ($Pia_WebProtection == 'false')
{ {
header('Location: /pialert/devices.php'); header('Location: /devices.php');
$_SESSION["login"] = 1; $_SESSION["login"] = 1;
exit; exit;
} }
@@ -55,13 +55,13 @@ $Pia_Password = $password_line[1];
if ($Pia_Password == hash('sha256',$_POST["loginpassword"])) if ($Pia_Password == hash('sha256',$_POST["loginpassword"]))
{ {
header('Location: /pialert/devices.php'); header('Location: /devices.php');
$_SESSION["login"] = 1; $_SESSION["login"] = 1;
} }
if ($_SESSION["login"] == 1) if ($_SESSION["login"] == 1)
{ {
header('Location: /pialert/devices.php'); header('Location: /devices.php');
} }
if ($_SESSION["login"] != 1) if ($_SESSION["login"] != 1)
@@ -118,12 +118,12 @@ if ($ENABLED_DARKMODE === True) {
<body class="hold-transition login-page"> <body class="hold-transition login-page">
<div class="login-box"> <div class="login-box">
<div class="login-logo"> <div class="login-logo">
<a href="/pialert/index2.php">Pi.<b>Alert</b></a> <a href="/index2.php">Pi.<b>Alert</b></a>
</div> </div>
<!-- /.login-logo --> <!-- /.login-logo -->
<div class="login-box-body"> <div class="login-box-body">
<p class="login-box-msg"><?php echo $pia_lang['Login_Box'];?></p> <p class="login-box-msg"><?php echo $pia_lang['Login_Box'];?></p>
<form action="/pialert/index.php" method="post"> <form action="/index.php" method="post">
<div class="form-group has-feedback"> <div class="form-group has-feedback">
<input type="password" class="form-control" placeholder="<?php echo $pia_lang['Login_Psw-box'];?>" name="loginpassword"> <input type="password" class="form-control" placeholder="<?php echo $pia_lang['Login_Psw-box'];?>" name="loginpassword">
<span class="glyphicon glyphicon-lock form-control-feedback"></span> <span class="glyphicon glyphicon-lock form-control-feedback"></span>

View File

@@ -3,7 +3,7 @@ session_start();
if ($_SESSION["login"] != 1) if ($_SESSION["login"] != 1)
{ {
header('Location: /pialert/index.php'); header('Location: /index.php');
exit; exit;
} }

View File

@@ -2,7 +2,7 @@
session_start(); session_start();
if ($_SESSION["login"] != 1) if ($_SESSION["login"] != 1)
{ {
header('Location: /pialert/index.php'); header('Location: /index.php');
exit; exit;
} }

View File

@@ -177,7 +177,7 @@ function show_pia_servertime() {
<li class="user-footer"> <li class="user-footer">
<div class="pull-right"> <div class="pull-right">
<a href="/pialert/index.php?action=logout" class="btn btn-danger">Sign out</a> <a href="/index.php?action=logout" class="btn btn-danger">Sign out</a>
</div> </div>
</li> </li>
</ul> </ul>

View File

@@ -12,7 +12,7 @@ session_start();
if ($_SESSION["login"] != 1) if ($_SESSION["login"] != 1)
{ {
header('Location: /pialert/index.php'); header('Location: /index.php');
exit; exit;
} }

View File

@@ -8,5 +8,5 @@
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
$HTTP["host"] == "pi.alert" { $HTTP["host"] == "pi.alert" {
server.document-root = "/var/www/html/pialert/" server.document-root = "/var/www/html/"
} }