Click to See Complete Forum and Search --> : index.php?show=98


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' );
}
%>

Da Warriah
07-21-2003, 09:15 AM
what the query string (inside the URL) is loads index.php and also sets the variable $show to 98....it looks like he probably uses the variable number somewhere else if hes sending the user somewhere...check index.php to see what he uses the 98 for:D

mikeyzc
07-21-2003, 09:20 AM
<%
include ( 'includes/config.inc' );

$x = 0;
while ( list ( $name, $value ) = each ($HTTP_GET_VARS ))
{
$parms .= sprintf ( "%s", $x++ == 0 ? "" : "&" );
$parms .= sprintf ( "%s=%s", $name, rawurlencode($value) );
}
$url = sprintf ( "%s/index2.php%s",
$base_host, $parms == null ? "" : "?" . $parms );
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<meta HTTP-EQUIV="expires" CONTENT="0">
<meta name="DESCRIPTION" content="Frames Test">
<meta name="ROBOTS" content="all">
<META HTTP-EQUIV="Pragma" CONTENT="no-cache">
<meta name="REVISIT-AFTER" content="2 days">
<title>MEDnexus</title>
</head>

<!-- frames -->
<frameset rows="*," frameborder="0" border=0 framespacing="0">
<frame name="login" src="<% print ( $url ); %>" marginwidth="0" marginheight="0" scrolling="auto">
</frameset>
</html>

I see no mention of it, but it looks liek it bounces to index2.php, which the only reference in there for 98 is

case 98:
include ( '/includes/loginmsg.inc' );
break;