Hi,
I'm using some code to pull out a custom template to display in a page with the vBulletin header (no navbar)....
I'm trying to pass in themplate name with a querystring...
Here is the code
PHP Code:
<?php
// ####################### SET PHP ENVIRONMENT ###########################
error_reporting(E_ALL & ~E_NOTICE);
// ################### PRE-CACHE TEMPLATES AND DATA ######################
// pre-cache templates used by all actions
$reqpage = $_REQUEST['reqpage'];
$globaltemplates = array(
$reqpage,
);
// ######################### REQUIRE BACK-END ############################
require_once('./global.php');
// Static Pages
eval('print_output("' . fetch_template($reqpage) . '");');
?>
For some reason I cant understand, it's not working. My code is prolly wrong anyway, I get this error:-
Warning: Division by zero in /includes/functions.php(4314) : eval()'d code on line 10
I know it's failing on the last line, and I've tried others like:-
PHP Code:
eval('print_output("' . fetch_template(' + $reqpage + ') . '");');
Hopefully someone can see what I'm trying to achieve.... but I just cant get it to work.
What am I doing wrong?
Thanks.