diff --git a/src/auth.php b/src/auth.php new file mode 100644 index 0000000..fc7a6dd --- /dev/null +++ b/src/auth.php @@ -0,0 +1,32 @@ + + +
+ diff --git a/src/common.php b/src/common.php index 563b2fb..9d11a96 100644 --- a/src/common.php +++ b/src/common.php @@ -1,4 +1,16 @@ diff --git a/src/index.php b/src/index.php index 68a281c..4c1a2af 100644 --- a/src/index.php +++ b/src/index.php @@ -3,10 +3,17 @@ $new_share = NULL; $selected_dir = NULL; +session_start(); + require_once('./common.php'); require_once('./config_sanddir.php'); +if (!checkpw()) +{ + header('Location: /auth.php'); +} + if (isset($_GET['dir'])) { $selected_dir = $_GET['dir']; @@ -34,4 +41,10 @@ else if ($selected_dir) } ?> + +