$lpass = get_config('login_pass');
+$rw = true;
+$ro = false;
+if(isset($_SESSION['logged_in']) && ($_SESSION['logged_in'] == "ro")) {
+ $rw = false;
+ $ro = true;
+}
+
if(!is_null($lpass)&&$lpass!="") {
- if(!isset($_SESSION['logged_in'])||!$_SESSION['logged_in']) {
+ if(!isset($_SESSION['logged_in'])||!$_SESSION['logged_in'] || ($need_rw && !$rw)) {
if(!isset($no_require_login)) {
header("Location: login.php");
echo "Wrong password";
}
}
+
function get_config($name, $default = null) {
global $config;
if(isset($config->$name)) {