mikeyzc
07-21-2003, 09:04 AM
I'm new to php and our old web programmer who wrote this code is nolonger with the company, so I have to learn php in 24 hours. Below is my code, I understand the concept of what it is doing, but I can't figure out what the 98 in the "index.php?show=98" is supposed to be displaying or where it pulls the 98 from.
<%
include ( 'includes/reports.inc' );
include ( 'includes/functions.inc' );
$glbl_err = rawurldecode($glbl_err);
// Added the "sleep" since currentUser was turning up "not set"
// This seems to have solved the problem.
if ( !session_is_registered ( "currentUser" ) ||
!isbitset ( LAB_REPORT, $currentUser->menumask ))
{
if ( !session_is_registered ( "currentUser" ))
{
$webname = $base_host . '/index.php?show=98';
header ( "Location: " . $webname );
exit;
}
else
{
print("<html><header>\n<meta http-equiv=\"Content-Type\" content=\"text/html; charset=iso-8859-1\">\n");
print("<meta http-equiv=\"Cache-Control\" content=\"max-age=0\">\n");
print("<meta http-equiv=\"Content-Style-Type\" content=\"text/css\">\n");
print("<link href=\"/mednexus.css\" rel=\"stylesheet\" type=\"text/css\">\n");
print("<title>MedNexus Lab Menu</title>\n<body class=\"mednexus\">");
$section = cSECT_LAB_MAIN;
include( 'includes/header.inc');
print ( "<p class=\"announce\">\n" );
print ( "DAQReports is a billable service.<br>\n" );
print ( "Please have your administrator sign you up for this service or<br>\n" );
print ( "for more details contact Antek's Sales department 1.800.359.0911 x3<br>\n" );
print ( "</p>\n" );
print ( "</body></html>");
}
}
else
{
include ( '/includes/daqreport.inc' );
}
%>
<%
include ( 'includes/reports.inc' );
include ( 'includes/functions.inc' );
$glbl_err = rawurldecode($glbl_err);
// Added the "sleep" since currentUser was turning up "not set"
// This seems to have solved the problem.
if ( !session_is_registered ( "currentUser" ) ||
!isbitset ( LAB_REPORT, $currentUser->menumask ))
{
if ( !session_is_registered ( "currentUser" ))
{
$webname = $base_host . '/index.php?show=98';
header ( "Location: " . $webname );
exit;
}
else
{
print("<html><header>\n<meta http-equiv=\"Content-Type\" content=\"text/html; charset=iso-8859-1\">\n");
print("<meta http-equiv=\"Cache-Control\" content=\"max-age=0\">\n");
print("<meta http-equiv=\"Content-Style-Type\" content=\"text/css\">\n");
print("<link href=\"/mednexus.css\" rel=\"stylesheet\" type=\"text/css\">\n");
print("<title>MedNexus Lab Menu</title>\n<body class=\"mednexus\">");
$section = cSECT_LAB_MAIN;
include( 'includes/header.inc');
print ( "<p class=\"announce\">\n" );
print ( "DAQReports is a billable service.<br>\n" );
print ( "Please have your administrator sign you up for this service or<br>\n" );
print ( "for more details contact Antek's Sales department 1.800.359.0911 x3<br>\n" );
print ( "</p>\n" );
print ( "</body></html>");
}
}
else
{
include ( '/includes/daqreport.inc' );
}
%>