$db->sql_query("update ".$prefix."_encyclopedia set title='$title', description='$description', elanguage='$elanguage', active='$active' where eid='$eid'");
Header("Location: admin.php?op=encyclopedia");
}
function encyclopedia_text_save_edit($tid, $eid, $title, $text) {
global $prefix, $db;
$tid = intval($tid);
$text = stripslashes(FixQuotes($text));
$title = stripslashes(FixQuotes($title));
$db->sql_query("update ".$prefix."_encyclopedia_text set eid='$eid', title='$title', text='$text' WHERE tid='$tid'");
Header("Location: admin.php?op=encyclopedia");
}
function encyclopedia_change_status($eid, $active) {
global $prefix, $db;
$eid = intval($eid);
if ($active == 1) {
$new_active = 0;
} elseif ($active == 0) {
$new_active = 1;
}
$db->sql_query("update ".$prefix."_encyclopedia set active='$new_active' WHERE eid='$eid'");
Header("Location: admin.php?op=encyclopedia");
}
function encyclopedia_delete($eid, $ok=0) {
global $prefix, $db;
$eid = intval($eid);
if ($ok==1) {
$db->sql_query("delete from ".$prefix."_encyclopedia where eid='$eid'");
$db->sql_query("delete from ".$prefix."_encyclopedia_text where eid='$eid'");
Header("Location: admin.php?op=encyclopedia");
} else {
include("header.php");
GraphicAdmin();
title(""._ENCYCLOPEDIAMANAGER."");
$result = $db->sql_query("select title from ".$prefix."_encyclopedia where eid='$eid'");