const ADMIN = 9;
const DELETE = 4;
const WRITE = 3;
- const VIEW = 1;
+ const READ = 1;
public $perm = self::ADMIN;
public $perms = [ # keys in lowercase !!!!
'admin' => self::ADMIN,
'delete' => self::DELETE,
'write' => self::WRITE,
-# NB 27.07.17 'view' => self::VIEW,
- 'read' => self::VIEW,
+# NB 27.07.17 'view' => self::READ,
+ 'read' => self::READ,
];
public $title = 'Dbq';
public function table_rw() {
return (1
- and ($this->perm >= self::VIEW)
+ and ($this->perm >= self::READ)
and !empty($this->table)
and ( strpos('table view',$this->table->type()) !== false )
);
if (empty($_SERVER['SERVER_PROTOCOL'])) $_SERVER['SERVER_PROTOCOL'] = 'HTTP/1.0';
header($_SERVER['SERVER_PROTOCOL'].' '.$msg);
echo "$msg\n";
- if (!empty($admin_msg) and $this->perm >= self::VIEW) echo "$admin_msg\n";
+ if (!empty($admin_msg) and $this->perm >= self::READ) echo "$admin_msg\n";
exit;
}