From 6b0cf3e12380632cd8031ec37a36eb36894bb56f Mon Sep 17 00:00:00 2001 From: Stephen L Johnson <sjohnson@monsters.org> Date: Mon, 16 Oct 2000 20:51:16 +0000 Subject: [PATCH] added back do action. changed <P> align to left. removed extraneous <\br> --- src/wap-spong.pl | 52 ++++++++++++++++++++++++++++++------------------ 1 file changed, 33 insertions(+), 19 deletions(-) diff --git a/src/wap-spong.pl b/src/wap-spong.pl index 0efbf7f..a9d44a2 100644 --- a/src/wap-spong.pl +++ b/src/wap-spong.pl @@ -1,17 +1,17 @@ -#@@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; @@ -38,9 +38,11 @@ $interactive = 0; &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 "" ) { @@ -52,6 +54,8 @@ 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'}; @@ -100,6 +104,7 @@ $interactive = 1; $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"; @@ -487,12 +492,12 @@ sub services { 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"; @@ -533,12 +538,12 @@ sub service { 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(); @@ -560,11 +565,15 @@ sub grp_summary { &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"; @@ -700,10 +709,15 @@ Content-type: text/vnd.wap.wml <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"; } -- 2.30.2