Transfer template logic to includes, see #749 thx @mp035

This commit is contained in:
billz
2021-02-02 12:26:14 +00:00
parent 3d2d608477
commit b21ea0d28d
19 changed files with 216 additions and 193 deletions

View File

@@ -1,6 +1,9 @@
<?php
$user = $_SERVER['PHP_AUTH_USER'];
$pass = $_SERVER['PHP_AUTH_PW'];
$user = $_SERVER['PHP_AUTH_USER'] ?? "";
$pass = $_SERVER['PHP_AUTH_PW'] ?? "";
require_once RASPI_CONFIG.'/raspap.php';
$config = getConfig();
$validated = ($user == $config['admin_user']) && password_verify($pass, $config['admin_pass']);