+ # Some path information
+
+ $tpl->fillin('SCRIPT_PHYS',encode_html($ENV{'SCRIPT_FILENAME'}));
+ $tpl->fillin('CONFIG_PATH',encode_html($data->{'configfile'}));
+ $tpl->fillin('FILE_ROOT', encode_html($config->{'fileroot'}));
+ $tpl->fillin('HTTP_ROOT', encode_html($config->{'httproot'}));
+
+ # Perl
+
+ $tpl->fillin('PERL_PROG',encode_html($^X));
+ $tpl->fillin('PERL_VER', sprintf('%vd',$^V));
+
+ # Information about the server
+
+ $tpl->fillin('HTTPD',encode_html($ENV{'SERVER_SOFTWARE'}));
+ $tpl->fillin('OS', encode_html($^O));
+ $tpl->fillin('TIME', encode_html(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);
+
+ # IDs 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_html($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_html($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;