";
printMLText("adding_default_keywords");
$category = getKeywordCategory($categoryid);
$owner = $category->getOwner();
if (!$user->isAdmin() && $owner->getID() != $user->getID())
die("You're not allowed to add keywords to this category");
$keywords = sanitizeString($keywords);
if ($category->addKeywordList($keywords)) {
printMLText("op_finished");
if ($user->isAdmin())
printGoto(array(array(getMLText("global_default_keywords"), "../out/out.DefaultKeywords.php")));
else
printGoto(array(array(getMLText("personal_default_keywords"), "../out/out.DefaultKeywords.php")));
}
else
{
printMLText("error_occured");
printGoBack();
}
}
//Kategorie bearbeiten: Stichwortliste bearbeiten ----------------------------------------------------------
else if ($action == "editkeywords")
{
printStartBox(getMLText("edit_default_keywords"));
print "
";
printMLText("editing_default_keywords");
$category = getKeywordCategory($categoryid);
$owner = $category->getOwner();
if (!$user->isAdmin() && $owner->getID() != $user->getID())
die("You're not allowed to edit keywords in this category");
$keywords = sanitizeString($keywords);
if (!is_numeric($keywordsid))
die ("invalid keywords id");
if ($category->editKeywordList($keywordsid, $keywords)) {
printMLText("op_finished");
if ($user->isAdmin())
printGoto(array(array(getMLText("global_default_keywords"), "../out/out.DefaultKeywords.php")));
else
printGoto(array(array(getMLText("personal_default_keywords"), "../out/out.DefaultKeywords.php")));
}
else
{
printMLText("error_occured");
printGoBack();
}
}
//Kategorie bearbeiten: Neue Stichwortliste löschen ----------------------------------------------------------
else if ($action == "removekeywords")
{
printStartBox(getMLText("rm_default_keywords"));
print "
";
printMLText("removing_default_keywords");
$category = getKeywordCategory($categoryid);
$owner = $category->getOwner();
if (!$user->isAdmin() && $owner->getID() != $user->getID())
die("You're not allowed to remove keywords from this category");
if (!is_numeric($keywordsid))
die ("invalid keywords id");
if ($category->removeKeywordList($keywordsid)) {
printMLText("op_finished");
if ($user->isAdmin())
printGoto(array(array(getMLText("global_default_keywords"), "../out/out.DefaultKeywords.php")));
else
printGoto(array(array(getMLText("personal_default_keywords"), "../out/out.DefaultKeywords.php")));
}
else
{
printMLText("error_occured");
printGoBack();
}
}
print "
";
printEndBox();
printCenterEnd();
printHTMLFoot();
?>