OK I basically started over did all of the code from scratch, but now I have a new problem. I created the file and tested it by directly accessing the file via
http://mysite/file.php. It ran perfect. Now I have pulled it in as a module, and after updating the directory to global.php to make it work I figured I would be fine. Now, however, it appears that my query is no longer pulling the value needed.
FYI...I am using CMPS as my index page which is where I am trying to create the module. The code is below.
PHP Code:
<?php
// ####################### SET PHP ENVIRONMENT ###########################
error_reporting(E_ALL & ~E_NOTICE);
// #################### DEFINE IMPORTANT CONSTANTS #######################
define('THIS_SCRIPT', 'adv_index');
// ######################### REQUIRE BACK-END ############################
require_once(DIR . '/global.php');
$vbulletin->input->clean_array_gpc('r', array(
'teamname' => TYPE_STR,
'logolink' => TYPE_STR,
'teamid' => TYPE_STR,
'title' => TYPE_STR,
));
$scheduleid = $db->query_first_slave("
SELECT *
FROM " . TABLE_PREFIX . "fbschedule AS fbschedule
INNER JOIN " . TABLE_PREFIX . "style
WHERE fbschedule.teamname = '$style[title]'
");
echo '<link type="text/css" rel="stylesheet" href="fbschedule_style.css"/>';
$remote_schedule_file = file_get_contents("http://www.site-with-PHP-xml.php?id={$scheduleid[teamid]}");
$xml = new SimpleXMLElement($remote_schedule_file);
?>