I am having problems with a script that I followed the instruction to a T. However, all that will show up is the top header and the icon for the script. I have played with the header coding and nothing is working. Can someone please take a look and see if the code is wrong.
<?PHP
session_start();
header("Cache-control: private");
$admincheck = $SESSION['suserName'];
if(!$SESSION['loggedIn'])
{
header("Location: login.php");
exit();
}
include "config.php";
include "$incdir/functions.php";
$navSelect = basename ($PHP_SELF, ".php");
?>
<html>
<head>
<title><?PHP echo "$sitename"; ?></title>
<link rel="stylesheet" type="text/css" href="style.css">
<script language="JavaScript">
function openAWindow( pageToLoad, winName, width, height, center)
{ xposition=50; yposition=100;
if ((parseInt(navigator.appVersion) >= 4 ) && (center))
xposition = (screen.width - width) / 2;
yposition = (screen.height - height) / 2;
}
{
args = "width=" + width + ","
+ "height=" + height + ","
+ "location=0,"
+ "menubar=0,"
+ "resizable=yes,"
+ "scrollbars=1,"
+ "status=0,"
+ "titlebar=0,"
+ "toolbar=0,"
+ "hotkeys=0,"
+ "screenx=" + xposition + "," //NN Only
+ "screeny=" + yposition + "," //NN Only
+ "left=" + xposition + "," //IE Only
+ "top=" + yposition; //IE Only
window.open( pageToLoad,winName,args );
}
</script>
<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
function placeFocus() {
if (document.forms.length > 0) {
var field = document.forms[0];
for (i = 0; i < field.length; i++) {
if ((field.elements.type == "text") || (field.elements.type == "textarea") || (field.elements.type.toString().charAt(0) == "s")) {
document.forms[0].elements.focus();
break;
}
}
}
}
// End -->
</script>
<script language="JavaScript" type="text/JavaScript">
<!--
function MM_swapImgRestore() { //v3.0
var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a)&&x.oSrc;i++) x.src=x.oSrc;
}
function MM_preloadImages() { //v3.0
var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
if (a.indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a;}}
}
function MM_findObj(n, d) { //v4.01
var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[n];
for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers.document);
if(!x && d.getElementById) x=d.getElementById(n); return x;
}
function MM_swapImage() { //v3.0
var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
if ((x=MM_findObj(a))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
//-->
</script>
</head>
<?PHP
if( $admincheck != $adminusername )
{
echo"<body bgcolor=\"#FFFFFF\" onLoad=\"MM_preloadImages('images/home-Active.jpg','images/myIvites-Active.jpg','images/myaccount-Active.jpg','images/logout-Active.jpg'),MM_swapImage('$navSelect','','images/$navSelect-Active.jpg',1),placeFocus()\">";
}else{
echo"<body bgcolor=\"#FFFFFF\" onLoad=\"MM_preloadImages('images/home-Active.jpg','images/ivites-Active.jpg','images/addivites-Active.jpg','images/users-Active.jpg','images/myaccount-Active.jpg','images/settings-Active.jpg','images/logout-Active.jpg'),MM_swapImage('$navSelect','','images/$navSelect-Active.jpg',1),placeFocus()\">";
}
?>
<table width="680" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td align="left" valign="top"><img src="images/logo.jpg" hspace="0" vspace="5"></td>
</tr>
</table><br>
<?PHP
if( $admincheck != $adminusername )
{
include "$incdir/usermenu.php";
}
else
{
include "$incdir/adminmenu.php";
}
?>
</td>
</tr>
<tr>
<td>
<table width="100%" border="0" cellpadding="1" cellspacing="0" bgcolor="#848484">
<tr>
<td align="left"><table width="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="#CCCCCC">
<tr>
<td align="left" bgcolor="#eeeeee"><img src="images/nav-fade.jpg" width="688" height="2"></td>
</tr>
<tr>
<td align="center" bgcolor="#eeeeee"><br>
<table width="600" border="0" align="center" cellspacing="0" cellpadding="1">
<tr>
<td align="center" valign="top" bgcolor="#000000">
<table width="600" border="0" cellpadding="5" cellspacing="0" bgcolor="#FFFFFF">
<tr>
<td align="left">
?>