+ # Information about the server
+
+ $tpl->fillin('HTTPD',encode_entities($ENV{'SERVER_SOFTWARE'}));
+ $tpl->fillin('OS', encode_entities($^O));
+ $tpl->fillin('TIME', encode_entities(strftime($config->{'timeformat'},($config->{'use_gmt'}) ? gmtime : localtime)));
+
+ $tpl->parse_if_block('gmt',$config->{'use_gmt'});
+
+ # Process information
+
+ $tpl->fillin('PID',$$);
+
+ # The following information is only available on systems supporting
+ # users and groups
+
+ if($users)
+ {
+ # Dev-Editor is running on a system which allows users and groups
+ # So we display the user and the group of our process
+
+ my $uid = POSIX::getuid;
+ my $gid = POSIX::getgid;
+
+ $tpl->parse_if_block('users',1);
+
+ # ID's of user and group
+
+ $tpl->fillin('UID',$uid);
+ $tpl->fillin('GID',$gid);
+
+ # Names of user and group
+
+ if(my $user = getpwuid($uid))
+ {
+ $tpl->fillin('USER',encode_entities($user));
+ $tpl->parse_if_block('user_detected',1);
+ }
+ else
+ {
+ $tpl->parse_if_block('user_detected',0);
+ }
+
+ if(my $group = getgrgid($gid))
+ {
+ $tpl->fillin('GROUP',encode_entities($group));
+ $tpl->parse_if_block('group_detected',1);
+ }
+ else
+ {
+ $tpl->parse_if_block('group_detected',0);
+ }
+
+ # Process umask
+
+ $tpl->fillin('UMASK',sprintf('%04o',umask));
+ }
+ else
+ {
+ $tpl->parse_if_block('users',0);
+ }
+
+ my $output = header(-type => 'text/html');
+ $output .= $tpl->get_template;
+
+ return \$output;