Esempio n. 1
0
function evaltags($php)
{
    global $_SGLOBAL;
    $_SGLOBAL['i']++;
    $search = "<!--EVAL_TAG_{$_SGLOBAL['i']}-->";
    $_SGLOBAL['block_search'][$_SGLOBAL['i']] = $search;
    $_SGLOBAL['block_replace'][$_SGLOBAL['i']] = "<?php " . stripvtags($php) . " ?>";
    return $search;
}
function stripvtemplate($tpl, $sub)
{
    $vars = explode(':', $tpl);
    $templateid = 0;
    $tpldir = '';
    if (count($vars) == 2) {
        list($templateid, $tpl) = $vars;
        $tpldir = './plugins/' . $templateid . '/templates';
    }
    if ($sub) {
        return loadsubtemplate($tpl, $templateid, $tpldir);
    } else {
        return stripvtags("<? include template('{$tpl}', '{$templateid}', '{$tpldir}'); ?>", '');
    }
}