-elseif (!empty($User['admin'])) {
- $staticpage = (file_exists("$Page/template.html") ? "$Page/template.html" : 'template.html');
+elseif ($User and $User->admin("edit $Page$Args")) {
+ $staticpage = (file_exists("$Page/template.inc.html") ? "$Page/template.inc.html" : 'template.inc.html');