Ejemplo n.º 1
0
admin_securityChecks(ZENPAGE_NEWS_RIGHTS, currentRelativeURL(__FILE__));
$reports = array();
if (isset($_POST['processcheckeditems'])) {
    XSRFdefender('checkeditems');
    processZenpageBulkActions('Category', $reports);
    updateItemSortorder('categories', $reports);
}
if (isset($_GET['delete'])) {
    XSRFdefender('delete_category');
    $reports[] = deleteCategory($_GET['delete']);
}
if (isset($_GET['hitcounter'])) {
    XSRFdefender('hitcounter');
    $x = $_zp_zenpage->getCategory(sanitize_numeric($_GET['id']));
    $obj = new ZenpageCategory($x['titlelink']);
    $obj->set('hitcounter', 0);
    $obj->save();
}
if (isset($_GET['publish'])) {
    XSRFdefender('update');
    $obj = new ZenpageCategory(sanitize($_GET['titlelink']));
    $obj->setShow(sanitize_numeric($_GET['publish']));
    $obj->save();
}
if (isset($_GET['save'])) {
    XSRFdefender('save_categories');
    addCategory($reports);
}
if (isset($_GET['id'])) {
    $x = $_zp_zenpage->getCategory(sanitize_numeric($_GET['id']));
    $result = new ZenpageCategory($x['titlelink']);