1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
|
if ($action == "edit") {
$result_news = $db->query("SELECT title, news, id FROM bb".$n."_news WHERE id='".$_REQUEST[id]."'");
while($row = $db->fetch_array($result_news)) {
$newsinhalt = $row['news'];
$titleinhalt = $row['title'];
$id = $row['id'];
}
if (isSet($_POST['send'])) {
$db->unbuffered_query("UPDATE bb".$n."_news SET title='$title', news='$news' WHERE id='$id'", 1);
header("Location: news.php?action=view&sid=$session[hash]");
exit;
}
eval("\$tpl->output(\"".$tpl->get("news_edit", 1)."\",1);");
} |