$error_message = "Nicht authentifiziert. Fool."; } } elseif ($_POST[action] == "kill") { if ($_SESSION[password] == $PASSWORD) { $headtpl->SetVariable("titel", "Eintrag Löschen"); kill_article($_POST[entry_id]); $error_message = "Eintrag gelöscht"; } else { $error_message = "Nicht authentifiziert. Fool."; } } elseif ($_POST[action] == "edit") { if ($entry = get_article_raw($_POST[entry_id])) { $headtpl->SetVariable("titel", "Eintrag Editieren: {$entry['title']}"); $tpl->loadTemplatefile("edit.tpl.html", true, true); $artikels = array('der', 'die', 'das'); $tpl->SetVariable("text", $entry[text]); $tpl->SetVariable("titel", $entry[title]); $tpl->SetVariable("entry_id", $entry[entry_id]); foreach ($artikels as $art) { $tpl->SetCurrentBlock("artikelchoose"); $tpl->SetVariable("artikel", $art); if ($entry[artikel] == $art) { $tpl->SetVariable("selected", "selected"); } $tpl->ParseCurrentBlock("artikelchoose"); } } } elseif ($_POST[action] == "cacheupdate") { $headtpl->SetVariable("titel", "Cacheentry löschen und somit updaten"); if ($_SESSION[password] == $PASSWORD) { kill_cache($_POST[entry_id]);
<?php require_once "HTML/IT.php"; require_once "inc/funcs.inc.php"; header("Content-type: text/xml"); if ($entries = get_latest_articles()) { $tpl = new IntegratedTemplate("tpl"); $tpl->loadTemplatefile("rss.tpl.html", true, true); foreach ($entries as $entry) { $tpl->SetCurrentBlock("eintrag"); $tpl->SetVariable("title", $entry[title]); #$tpl->SetVariable("text","no more"); $tpl->SetVariable("text", $entry[text]); $tpl->SetVariable("date", $entry[date]); $tpl->SetVariable("link", htmlspecialchars("http://jan.krutisch.de/janzyklopedie/index.php?action=entry&id=" . $entry[entry_id])); $tpl->ParseCurrentBlock("eintrag"); } $tpl->show(); } else { die("Sorry, didn't work out..."); } ?>