Files
resatennis_tyroltenn/www/cgi-bin/MachineInfo

75 lines
1.6 KiB
Perl
Executable File

#!/usr/bin/perl
#__________________________________________________________
#
# File: MachineInfo
# By: Matt Ho
# Date: 7/23/95
# Purpose: Display host configuration
#__________________________________________________________
$hostname = `/usr/bsd/hostname -s` ;
open(DATA, "/sbin/hinv |") || &CantGetInfo ;
print <<ENDOFTEXT ;
Content-type: text/html
Pragma: no-cache
<head>
<title>
$hostname
</title>
</head>
<body alink="ff0000" vlink="0000ee" link="0000ee" background="/outbox/images/background.gif" bgcolor="c1c1c1" text="000000">
<TABLE WIDTH=100% CELLPADDING=0 CELLSPACING=0><TR>
<TD ALIGN=LEFT VALIGN=TOP><IMG SRC="/outbox/images/logo.gif" ALT="Powered by Silicon Graphics"></TD>
<TD ALIGN=RIGHT VALIGN=TOP><TABLE CELLPADDING=0 CELLSPACING=0>
<TR>
<TD ALIGN=CENTER><A HREF="/" onMouseOver="window.status=\'Go to the system\\\'s web page\';return true" ><IMG SRC="/outbox/images/machine.gif" WIDTH=34 HEIGHT=32 ALT="System"></A></TD>
<TR>
<TD ALIGN=CENTER><FONT SIZE=-2>System</FONT></TD>
</TABLE></TD>
</TABLE>
<P><BR>
<h1 align=center>$hostname</h1>
<center>
<hr size=3 noshade width=50%>
<table>
ENDOFTEXT
while( <DATA> )
{
($name, $value) = split(':', $_, 2) ;
print <<ENDOFTEXT ;
<tr>
<th align=right>
$name
</th>
<td>
$value
</td>
</tr>
ENDOFTEXT
}
close(DATA) ;
print <<ENDOFTEXT ;
</table>
<hr size=3 noshade width=50%>
</center>
ENDOFTEXT
if( defined $ENV{'HTTP_REFERER'} )
{
$URL = $ENV{'HTTP_REFERER'} ;
print <<ENDOFTEXT ;
<a href="$URL"><IMG SRC="/outbox/images/go-back.gif" WIDTH=34 HEIGHT=32 BORDER=0 ALT="<-"></A>
ENDOFTEXT
}
print "\n</body></html>\n\n" ;