Ejemplo n.º 1
0
function loadTemplate($page)
{
    global $SkinDir;
    if (shouldDisplayMain($page)) {
        // No need to include this stuff for every page load; include it here
        include_once 'cookbook/mainpage.php';
        // Load and generate the HTML code for upcoming UPL events
        $GLOBALS['QuoteHtml'] = '';
        // loadQuote(); // Temporarily disable the quote
        $GLOBALS['ProjectsHtml'] = generateProjectsHtml(loadProjects());
        $GLOBALS['EventsHtml'] = generateEventsHtml(loadEvents());
        $GLOBALS['PageContents'] = getIncludeContents("{$SkinDir}/mainpage.tmpl.php");
    } else {
        $GLOBALS['PageContents'] = '</div>';
    }
    LoadPageTemplate($page, "{$SkinDir}/upl.tmpl");
}
Ejemplo n.º 2
0
<?php

require_once 'config.php';
require_once DIR_APP . 'projects.php';
$term = trim(strip_tags($_GET['term']));
//retrieve the search term that autocomplete sends
loadProjects($term);