function run_template2($word, $t, $arg, $ignore = NULL) { if (!$ignore) { $ignore = []; } if ($word !== NULL and $t !== NULL) { run_template($word, "", $t, $arg, $ignore, [], FALSE); } }
function run_template2($word, $t, $arg, $definition) { if (!$ignore) { $ignore = []; } if ($word !== NULL and $definition) { $d = DEFINITION(defaultDB(), NULL, $word); $d->set_lang("en"); $d->set_value($definition); $d = $word->add_definition($d); } if ($word !== NULL and $t !== NULL) { run_template($word, "", $t, $arg, [], [], FALSE); } }
/*--- jongeren inspiratiedag . nl --- jong mens (lode) november 2008 ---*/ /*--- process ---*/ /* startup * safety first * get url params * go to module * process module * load page * template * load template * merge content in tpl * save cache * show page */ /*--- startup ---*/ require_once './startup.php'; /*--- go to module ---*/ require_once './page.php'; /*--- template ---*/ if (!isset($html)) { require_once './template.php'; $html = run_template($request, $page); } /*--- show page ---*/ if (LOG) { $html .= '<!--' . $log . '-->'; } header("content-type: text/html; charset=utf-8"); echo $html; die;
function serve_404() { @header($_SERVER['SERVER_PROTOCOL'] . ' 404 Not Found'); if (is_file('template-404.php')) { echo run_template('template-404.php'); } exit(3); }
$t = $t->only_with_attr(ATTR("template", "true")); $t = $t->all(); //error_log(var_export(array_map(function($a){return$a->id();},$t),1)); if (count($t) === 0) { exit("Could not find template with name: " . $template); } elseif (count($t) !== 1) { exit("Ambiguous template name (please remove duplicate template(s))"); } if ($path === "common") { if (($s = run_template($w, PATH($w, "feminine"), $t[0], $forms, $ignore, $changes, FALSE)) === NULL) { if (($s = run_template($w, PATH($w, "masculine"), $t[0], $forms, $ignore, $changes, FALSE)) === NULL) { exit("success"); } else { exit("Template did not run successfully: {$s}"); } } else { exit("Template did not run successfully: {$s}"); } } else { if (($s = run_template($w, PATH($w, $path), $t[0], $forms, $ignore, $changes, FALSE)) === NULL) { exit("success"); } else { exit("Template did not run successfully: {$s}"); } } } exit("Could not find word"); } else { exit("Bad \$_GET"); } }
/* show the work template if the parameter starts with "object/" */ $name = get_name_from_url(substr($tmp[0], 7)); if ($name === false) { /* url doesn't exist, show a 404 */ serve_404(); } echo generate_work($name); } else { if ($tmp[0] === 'browse') { /* show the browse template if the parameter is "browse" */ echo generate_browse(); } else { if (is_file('template-' . $tmp[0] . '.php')) { /* show any other static file (template) if it exists */ echo run_template('template-' . $tmp[0] . '.php'); } else { if (empty($tmp[0])) { /* if no parameter is given, show either the intro or browse */ /* depending on a configuration setting */ if (config('show_intro', true)) { echo run_template('template-intro.php'); } else { echo generate_browse(); } } else { /* unknown parameter, show a 404 */ serve_404(); } } } }
if (array_key_exists("overwrite", $_GET)) { $overwrite = TRUE; } else { $overwrite = FALSE; } // Word as passed by id $w = WORD(defaultDB(), intval($_GET["id"])); // Path as passed as string $p = PATH($w, safe_get("path", $_GET)); // Template: passed by name, spart from word, attr template=true $t = defaultDB()->searcher(); $t = $t->spart($w->speechpart()); $t = $t->name($_GET["template"]); $t = $t->only_with_attr(ATTR("template", "true")); $t = $t->all(); if (count($t) === 0) { echo "Could not find template with name: " . $_GET["template"]; } elseif (count($t) !== 1) { echo "Ambiguous template name (please remove duplicate template(s))"; } else { $t = $t[0]; if (($s = run_template($w, $p, $t, $arg, $ignore, $change, $overwrite)) === NULL) { exit("success"); } else { exit("Template did not run successfully: {$s}"); } } } else { exit("\$_GET was invalid (" . var_export($_GET, 1) . ")"); } }
<?php echo do_display_hook('notices_top'); ?> <?php echo $pd->print_notices($pd->dsp_page); ?> <?php echo do_display_hook('notices_bottom'); ?> </div> <!-- jump to the page specific template --> <?php run_template(); ?> <?php echo do_display_hook('content_bottom'); ?> </div> <b class="rbottom"><b class="r4"> </b><b class="r3"> </b> <b class="r2"> </b><b class="r1"> </b></b> </div> <!-- close additional tags if we are showing the folder list --> <?php if (isset($pd->pd['settings']['show_folder_list']) && !$pd->new_window && $pd->pd['settings']['show_folder_list']) { echo '<complex-' . $page_id . '>';
<? include "global.php" ; run_template('page_head'); $qr = db_query("select title,id from songs_news order by id DESC limit 20"); print " <marquee onmouseover=\"this.stop()\" onmouseout=\"this.start()\" scrollAmount=\"5\" scrollDelay=\"0\" direction=right width=\"100%\">" ; while($data = db_fetch($qr)) { print "     <a href='news_view_{$data['id']}.html' target='_blank'>$data[title]</a>     ** "; } print "</marquee>"; ?>
<? require("global.php"); $data = db_qr_fetch("select url from members_files where id='".$id."'"); $url = $data['url']; run_template('song_listen');