#!/usr/local/bin/perl5_8 use CGI; use CGI ':standard'; use CGI::Carp qw(fatalsToBrowser); use vars qw($CGI); use Sybase::CTlib; $CGI = new CGI(); # Get parameters based on login, etc. &get_parms($CGI); # When global employee id ($g_empid) is blank, # initialization routines are bypassed and you drop out. if ( $g_empid eq "" ) { &valid_user; } # Clear the STDOUT buffers so MIME can get out; print html headers $|=1; print "content-type: text/html\n\n"; # Display Campus Main Menu and begin main processing &main_process; #### sub valid_user() { # INITIALIZATION STEP 1: # Check system availability &set_db_env; $get_results=0; $sql = "select STATUS , MESSAGE FROM $g_pfsec_db.dbo.NC_PF_STATUS "; $db_avail= new Sybase::CTlib $g_pfsecid,$g_pfsecpw,$g_pfsecsrv; $db_avail->ct_execute($sql) ; <====THIS IS LINE 3717 while ( $db_avail->ct_results($restype) == CS_SUCCEED ) { next unless $db_avail->ct_fetchable($restype); while ( ($dbf_STATUS, $dbf_MESSAGE) = $db_avail->ct_fetch ) { $get_results++; $app_status = "$dbf_STATUS"; if ( $dbf_STATUS eq "U" ) { $|=1; print "content-type: text/html\n\n"; &top_hdrs; &display_msg($dbf_MESSAGE); exit; } }