hasRight('bericht', 'read')) bericht_ajax_fail('Permission denied', 403); $berichtid = (int) (GETPOSTINT('berichtid')); if (!$berichtid) bericht_ajax_fail('berichtid fehlt'); $pages = BerichtPage::fetchAllForBericht($db, $berichtid); $out = array(); foreach ($pages as $p) { $out[] = array( 'id' => (int) $p->id, 'page_order' => (int) $p->page_order, 'source_type'=> $p->source_type, 'layout' => $p->layout, ); } bericht_ajax_ok(array('pages' => $out, 'count' => count($out)));