$newdata['infobox'] = DB::esc(_filtrateHCM(trim($_POST['infobox'])));
 $newdata['public'] = _checkboxLoad('public');
 $newdata['visible'] = _checkboxLoad('visible');
 if (_loginright_adminconfirm || !_loginright_adminneedconfirm && $newdata['author'] == _loginid) {
     $newdata['confirmed'] = _checkboxLoad('confirmed');
 } else {
     $newdata['confirmed'] = $query['confirmed'];
 }
 $newdata['comments'] = _checkboxLoad('comments');
 $newdata['commentslocked'] = _checkboxLoad('commentslocked');
 $newdata['rateon'] = _checkboxLoad('rateon');
 $newdata['showinfo'] = _checkboxLoad('showinfo');
 $newdata['resetrate'] = _checkboxLoad('resetrate');
 $newdata['delcomments'] = _checkboxLoad('delcomments');
 $newdata['resetread'] = _checkboxLoad('resetread');
 $newdata['time'] = _loadTime('time', $query['time']);
 // kontrola promennych
 $error_log = array();
 // titulek
 if ($newdata['title'] == "") {
     $error_log[] = $_lang['admin.content.articles.edit.error1'];
 }
 // kategorie
 $homechecks = array("home1", "home2", "home2");
 foreach ($homechecks as $homecheck) {
     if ($newdata[$homecheck] != -1 or $homecheck == "home1") {
         if (DB::result(DB::query("SELECT COUNT(id) FROM `" . _mysql_prefix . "-root` WHERE type=2 AND id=" . $newdata[$homecheck]), 0) == 0) {
             $error_log[] = $_lang['admin.content.articles.edit.error2'];
         }
     }
 }
    exit;
}
/* ---  priprava  --- */
$message = "";
$infopage = false;
function _admin_boolSelect($name, $type2 = false)
{
    global $_lang;
    return "\n<select name='" . $name . "'>\n<option value='-1'>" . ($type2 == false ? $_lang['admin.content.artfilter.f1.bool.doesntmatter'] : $_lang['global.nochange']) . "</option>\n<option value='1'>" . $_lang['admin.content.artfilter.f1.bool.mustbe'] . "</option>\n<option value='0'>" . $_lang['admin.content.artfilter.f1.bool.mustntbe'] . "</option>\n</select>&nbsp;\n";
}
/* ---  akce  --- */
if (isset($_POST['category'])) {
    // nacteni promennych
    $category = intval($_POST['category']);
    $author = intval($_POST['author']);
    $time = _loadTime('time', time());
    $ba = intval($_POST['ba']);
    $public = intval($_POST['public']);
    $visible = intval($_POST['visible']);
    $confirmed = intval($_POST['confirmed']);
    $comments = intval($_POST['comments']);
    $rateon = intval($_POST['rateon']);
    $showinfo = intval($_POST['showinfo']);
    $new_category = intval($_POST['new_category']);
    $new_author = intval($_POST['new_author']);
    $new_public = intval($_POST['new_public']);
    $new_visible = intval($_POST['new_visible']);
    if (_loginright_adminconfirm) {
        $new_confirmed = intval($_POST['new_confirmed']);
    }
    $new_comments = intval($_POST['new_comments']);