EWGF
04-05-2009, 11:12 AM
Stuggling to insert a whole page into the php page instead of referring to templates. I got the $legend working, but the $copy won't get parsed.
I'm guessing $copy cannot be parsed inside $legend, but I'm quite new on this. Can someone explain what's wrong with this and give a solution for this. Thanks :)
<?php
// ####################### SET PHP ENVIRONMENT ###########################
error_reporting(E_ALL & ~E_NOTICE);
// #################### DEFINE IMPORTANT CONSTANTS #######################
define('NO_REGISTER_GLOBALS', 1);
define('THIS_SCRIPT', 'legend');
// ######################### REQUIRE BACK-END ############################
$curdir = getcwd();
chdir('/home/**********/htdocs/www/forum');
require_once('./global.php');
chdir($curdir);
// ######################## START MAIN SCRIPT ############################
$copy = $vbulletin->options['homeurl'];
$legend .= '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="nl">
<head>
<title>Legend</title>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
</head>
<body>
<table class="table" cellpadding="0" cellspacing="0" border="0">
<tr><td class="title" style="padding:6px">Controll</td></tr>
<tr><td class="controll"></td></tr>
</table>
<div>$copy</div>
</body>
</html>';
eval('print_output("$legend");');
?>
I'm guessing $copy cannot be parsed inside $legend, but I'm quite new on this. Can someone explain what's wrong with this and give a solution for this. Thanks :)
<?php
// ####################### SET PHP ENVIRONMENT ###########################
error_reporting(E_ALL & ~E_NOTICE);
// #################### DEFINE IMPORTANT CONSTANTS #######################
define('NO_REGISTER_GLOBALS', 1);
define('THIS_SCRIPT', 'legend');
// ######################### REQUIRE BACK-END ############################
$curdir = getcwd();
chdir('/home/**********/htdocs/www/forum');
require_once('./global.php');
chdir($curdir);
// ######################## START MAIN SCRIPT ############################
$copy = $vbulletin->options['homeurl'];
$legend .= '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="nl">
<head>
<title>Legend</title>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
</head>
<body>
<table class="table" cellpadding="0" cellspacing="0" border="0">
<tr><td class="title" style="padding:6px">Controll</td></tr>
<tr><td class="controll"></td></tr>
</table>
<div>$copy</div>
</body>
</html>';
eval('print_output("$legend");');
?>