-#@@PERL@@
-
-# $Id: wap-spong.pl,v 1.1 2000/09/25 20:53:33 sljohnson Exp $
+#!@@PERL@@
 
 #
 # This program is used to display information collected by the spong server to
-# people using WAP enabled clients.  This provides the same type of interface to
+# people using web based clients.  This provides the same type of interface to
 # the data as the text based client does.  You can run this program as a CGI
 # program to provide an interactive experience, or you can use it from a cron
 # job, or some other automated process to just generate static web pages.
 #
-
-# !!!!! This is a very beta program. Not all of the WAP display options
-#       are present. The old HTML code is present in several cases.
+# History:
+# (1) Ported mkbb.* scripts to perl. (Ed Hill, Mar 1, 1997)
+# (2) Re-did in a more generic and OO way (Ed Hill, May 9, 1997)
+# (3) Re-did as a client which gets info from the spong-server (07/24/1997)
+# (4) Did a whole bunch of stuff (Ed Hill, 06/18/1998)
 
 use Sys::Hostname;
 use Getopt::Long;
  
 &load_config_files();  # Loads the user specified configuration information
 
+$main::WWW_DEFAULT_VIEW = "HOST" unless $main::WWW_DEFAULT_VIEW;
+
 # Check to see if I am being run as a command line program (in which case I
-# just generate static WML documents), or a CGI program (in which case I 
-# present back an interactive WAP interface).  The command line arguments are
+# just generate static HTML documents), or a CGI program (in which case I 
+# present back an interactive web interface).  The command line arguments are
 # the same as the text based spong program, and produce similar results
 
 if( $ENV{'SCRIPT_NAME'} eq "" ) {
                    "histservice=s", "grp-summary:s", "grp-problems",
                   "brief", "standard", "full" );
 
+   $actionbar = 0;
+
    if( ! GetOptions( \%opt, @options )) {warn "Incorrect usage:\n\n"; &help();}
 
    &help if defined $opt{'help'};
 $cmd = $ENV{'PATH_INFO'};
 
 # Commands that are more applicable to spong running in interactive mode.  
+# These commands control the frame interface, etc...
 
 if( $cmd eq "" || $cmd eq "/" )   {
    $view = "brief";
 
   header(1);
 
-   print "<p align=\"center\">\n";
+   print "<p align=\"left\">\n";
    print "<anchor title=\"Summary\">Summary";
    print "<go href=\"$main::WAPSPONG/brief/grp-summary/ALL\"/></anchor><br/>\n";
    print POSIX::strftime($DATETIMEFMT,localtime()),"<br/><br/></p>\n";
-   print "<p align=\"center\">\n";
-   print "<b> $host </b><br/><br/>\n";
+   print "<p align=\"left\">\n";
+   print "<b> $host </b><br/>\n";
    print &query( $SPONGSERVER, "services", $host, "wml", $view ); 
    print "</p>\n";
 
 
    header(1);
 
-   print "<p align=\"center\">\n";
+   print "<p align=\"left\">\n";
    print "<anchor title=\"Host\">Host";
    print "<go href=\"$main::WAPSPONG/services/$host\"/></anchor><br/>\n";
    print POSIX::strftime($DATETIMEFMT,localtime()),"<br/><br/></p>\n";
-   print "<p align=\"center\">\n";
-   print "<b> $host </b><br/>\n";
+   print "<p align=\"left\">\n";
+   print "<b> $host </b>\n";
    print &query( $SPONGSERVER, "service", $host, "wml", $view, $service );
    print "</p>\n";
    &footer();
 
    &header(1);
 
-   print "<p align=\"center\">\n";
-   print "<anchor title=\"GrpSum\">Grp Summary";
-   print "<go href=\"$main::WAPSPONG/\"/></anchor><br/>\n";
+#   print "<do type=\"prev\" label=\"Back\">\n";
+#   print "<prev/>\n</do>\n";
+
+#   print "<p align=\"right\">\n";
+#   print "<anchor title=\"GrpSum\">Grp Summary";
+#   print "<go href=\"$main::WAPSPONG/\"/></anchor><br/>\n";
+   print "<p align=\"left\">";
    print POSIX::strftime($DATETIMEFMT,localtime()),"</p>\n";
-   print "<p align=\"center\" mode=\"nowrap\"><br/>\n";
+   print "<p align=\"left\" mode=\"nowrap\"><br/>\n";
    print &query( $SPONGSERVER, "grpsummary", '', "wml", $view, $other);
    print "</p>\n";
 
 <meta http-equiv="Cache-Control" content="max-age=0"/>
 </head>
 <card id="card1" title="Spong">
+<do type="prev" label="back">
+<prev/>
+</do>
 HEADER
 ;
 
 
+#   print "<do type=\"prev\" label=\"Back\">\n";
+#   print "<prev/>\n</do>\n";
 #   &show( "header", 1 ) if -f "$main::WWWHTML/header.html"; 
 
 }