예제 #1
0
파일: index.php 프로젝트: NazarK/sqp
        case 5:
            $content = $appropriate_function($parts[$i + 1], $parts[$i + 2], $parts[$i + 3], $parts[$i + 4], $parts[$i + 5]);
            break;
        case 6:
            $content = $appropriate_function($parts[$i + 1], $parts[$i + 2], $parts[$i + 3], $parts[$i + 4], $parts[$i + 5], $parts[$i + 6]);
            break;
        case 7:
            $content = $appropriate_function($parts[$i + 1], $parts[$i + 2], $parts[$i + 3], $parts[$i + 4], $parts[$i + 5], $parts[$i + 6], $parts[$i + 7]);
            break;
        default:
            log_message("Too many parameters");
            $content = $appropriate_function($parts[$i + 1], $parts[$i + 2], $parts[$i + 3]);
            break;
    }
}
$content = script_uses_head() . $content;
if (function_exists("before_content_post")) {
    before_content_post($content);
}
$pagename = $_GET['q'];
$pagename = str_replace(".", "", $pagename);
if (!$content && !$appropriate_function) {
    $content = "<h1>ERROR:<br> Can't render '" . $_GET['q'] . "'</h1>";
}
if (isset($GLOBALS['layout'])) {
    $layout = template($GLOBALS['layout']);
} elseif (!isset($template)) {
    $layout = template("main");
}
//used in admin
translate_parse($layout);
예제 #2
0
파일: bios.php 프로젝트: NazarK/sqp
function die_def_template($o)
{
    global $def_template;
    if (file_exists("uses/{$def_template}.html")) {
        $html = template($def_template, "content", $o);
    } else {
        $html = $o;
    }
    nice_urls($html);
    global $base_url;
    $html = "<base href='{$base_url}'/>" . script_uses_head() . $html;
    die($html);
}