i2-Services, Inc. Forums

Full Version: control panel header and footer php include
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello,

I am modifying the control panel interface files:

interface/html_cp_header.php and
interface/html_cp_footer.php

with the following text respectively:

<html>
<head>
<title>Membership Manager: Control Panel</title>
</head>
<body bgcolor="White" text="#000000" link="#0000CC" vlink="#0000CC" alink="#0000CC" marginwidth=0 marginheight=15 topmargin=15 leftmargin=0>
<?php
include("../layout/pageTemplate.php");
include("../layout/masterHead.php");
include("../layout/navBar.php");
?>

<!--- ------------------------------------------------------------------------>
<!--- Place Any CSS / Javascript code within the {literal} {/literal} Tags --->
<!--- ------------------------------------------------------------------------>

{literal}

<style type="text/css"><!--

td, a, span, input, select { font:13px Arial, Geneva, sans-serif;color:#393939;}
td, span { line-height:15px;}


--></style>
{/literal}

and

<?php
include("../layout/rightBar.php");
include("../layout/masterFooter.php");
?>
</body>
</html>


It seems that these files are not using a php include and the subsequent control_panel.php page source looks like this (php tags not executed). I use these templates to layout my web site page and I would like to include the navigation bars on the control panel page. Please advise on how to do this.

<html>
<head>
<title>Membership Manager: Control Panel</title>
</head>
<body bgcolor="White" text="#000000" link="#0000CC" vlink="#0000CC" alink="#0000CC" marginwidth=0 marginheight=15 topmargin=15 leftmargin=0>
<?php
include("../layout/pageTemplate.php");
include("../layout/masterHead.php");
include("../layout/navBar.php");
?>

<!--- ------------------------------------------------------------------------>
<!--- Place Any CSS / Javascript code within the Tags --->
<!--- ------------------------------------------------------------------------>
.
.
.
. and so on.
Use the following smarty tag for including outside files:

Code:
{include file="../include_folder/filename.php"}

This does include the file but does not use php correctly, refer to the following error:

Fatal error: Smarty error: [in /html/layout/navBar.php line 8]: syntax error: unrecognized tag 'case' (Smarty_Compiler.class.php, line 583) in /html/mm2/libs/Smarty.class.php on line 0

The navBar.php code looks like this (line 8 is: case "myPROFILE";):

<?PHP
require_once("/html/myTOOLS/user-online.php");

print "<TR ALIGN=\"LEFT\" VALIGN=\"TOP\">\n";
print "<TD>\n";
print "<div id=\"navBar\">\n";
switch ($mfw_activity) {
case "myPROFILE";
?>
<img src="../images/turingbig.jpg" width="100" height="100" title="cssbody=[dvbdy1] cssheader=[dvhdr1] header=[<img src='../images/turingbig.jpg' style='vertical-align:middle' width='200' height='200'>] body=[<b>myFace:</b> Define yourself and get Wired!] fade=[on] fadespeed=[0.01]">
<?php
break;
Reference URL's