Jump to content

include not working the way its ment to be.


Death_Octimus

Recommended Posts

menu.php

<?php
import_request_variables("cgp","a");
if (! $aname )
{
header('location:index.php');
}
require_once('include/conf.inc.php');
//module header start
if(!$apage)
{
include('modules/menu/menu_header.php');
}else{
$headpath = "modules/".$apage."/".$apage."_header.php";
include($headpath);
}
//theme start!
echo T_HEADER;
echo T_BODYHEAD;
echo T_TITLEBAR;
echo T_TABLESTART;
echo $report;
// module body start
if(!$apage)
{
include('modules/menu/menu.php');
}else{
$bodypath = "modules/".$apage."/".$apage.".php";
include($bodypath);
}
// theme footer
echo T_TABLEEND;
echo T_FOOTER;
?>

 

the above code is not behaving the way its ment to be when I call menu?m=1

 

which is from a switch in the header file it other wise works by sending the switch but the body include is dumped at top!! :shrug:

i'm stumped any ideas?

 

menu_header.php

<?php
$loc = "Main Menu"; 
$loclink = "- <a href=\"menu.php\">Main Menu</a>"; 

switch ( $am )
{
case "1":
$report = "<tr><td colspan =\"2\" align =\"center\" class=\"red\">Your settings have been updated.</td></tr>";
break;
case "2":
$report = "<tr><td colspan =\"2\" align =\"center\" class=\"red\">Please go change <a href=\"userpass.php\">your password</a></td></tr>";
break;
case "3":
$report = "<tr><td colspan =\"2\" align =\"center\" class=\"red\">Your password has been updated.</td></tr>";
break;
case "4":
$report = "<tr><td colspan =\"2\" align =\"center\" class=\"red\">User has been added!</td></tr>";
break;
case "5":
$report = "<tr><td colspan =\"2\" align =\"center\" class=\"red\">The Email has been sent!</td></tr>";
break;
default:
$report = null;
break;
}

?>

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.