#!/bin/ksh
#
#ident	"@(#)start	1.11	05/05/22 SMI"
#
# Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
# Use is subject to license terms.
#
# This is the starting point for HCTS test suite.  It is the first page displayed
# after starting the web browser, pointing at the URL of the machine name under test,
# and accepting the copyright notice page (which is simply index.html in the
# web server root dir).

# variables
hctsdir=SUNWhcts        # base directory
prgdir=prgs             # program directory
act=                    # action to be taken
bname=`basename $0`     # shell name
gotocgi="http://$HTTP_HOST/cgi-bin/$hctsdir/`basename $0`"      # program name
i=0                     # loop counter
mdir=menu               # menu directory
rdir=results            # results directory
hname=                  # test system
option=                 # option selected
technology=		# technology selected
fdir=forms              # forms directory
dname=                  # display system
hdir=help

stfile=/tmp/suite.dat

# functions

# do function
go_fun()
{
        $prgdir/funcs "$*" 2>&1
}

### MAIN ###

# change to base directory
cd `dirname $0`
while [ `basename $PWD` != $hctsdir ]
do
        cd ..
done

# parse input
if [ -n "$CONTENT_LENGTH" ]
then
        eval `$prgdir/pq.p`
        CONTENT_LENGTH=
fi
# option page - Display the starting page, and offer a test program selection buttons.

# by matthew
# if [ -s $stfile ]
# then
#   rm -f $stfile
# fi
	
hname=`hostname`
go_fun bhtml $hname "start"
echo '<TABLE WIDTH="100%"><TR><TD WIDTH="100%" ALIGN="CENTER">'
echo '<FONT SIZE="+2">Start Page</FONT></TD>'
echo "</TR></TABLE>"
echo "Welcome to the Hardware Certification Test Suite.<BR><BR> 

This test suite enables you to certify the Solaris OS on x86 systems<BR>
and with individual controllers on x86 systems.  The test suite enables you<BR>
to choose the level of certification (Level 1 or Level 2) for either your<BR>
system or controllers.<BR><BR>

To start the certification process, select one of the buttons located<BR>
above to start a Controller Certification or a Systems Certification.<BR>
At any time during the certification process, you can select the Review Test<BR>
Status button to see the progress of the tests.<BR><BR> 

If you have questions at any time during the certification process, select<BR> 
the Help button to see help related to the screen that you are on.<BR><BR>

The user guide contains additional information.<BR><BR>
"
echo "<a target=new href='/docs/guides/user_guide.html'>Click here to view the
User's Guide</a><BR><BR>"

echo "<b>Note - </b>If you use a third-party driver, make sure the driver is the
same data model as the kernel. Make sure you have a 32-bit driver if you are
certifying on a 32-bit system. Make sure you have a 64-bit driver if you are
certifying on a 64-bit system."

go_fun ehtml

