Exemple #1
0
    } else {
        if ($item['categories']) {
            foreach ($item['categories'] as $c) {
                $_POST['category'][] = end($c);
            }
        } else {
            $_POST['category'] = 0;
        }
    }
}
$allCategories = $categoriesClass->getAllWithChilds(0, " `visible` = 'true' ");
$categoriesSelect = $categoriesClass->generateSelect($allCategories, $_POST['category'], $first_category);
abr('categoriesSelect', $categoriesSelect);
/////////////////////
#检查作品更新队列
if ($itemsClass->isInUpdateQueue($itemID)) {
    abr('inUpdateQueue', 'yes');
}
if (isset($_POST['save'])) {
    $s = $itemsClass->edit($itemID);
    if ($s === true) {
        refresh('/' . $languageURL . 'items/' . $itemID . '/', $langArray['complete_update_item'], 'complete');
    } else {
        $message = '<ul>';
        foreach ($s as $e) {
            $message .= '<li>' . $e . '</li>';
        }
        $message .= '</ul>';
        addErrorMessage($message, '', 'error');
    }
} elseif (isset($_POST['upload'])) {