.php (no leading underscore - * files starting with "_" are skipped by the registry). * 2. Edit the docblock above. That IS the menu entry: Title, Icon * (Font Awesome 4.7 class), Group and Order. Nothing else to register. * 3. Write your logic and markup below. Available to you already: * * $config, $user_data, $session_user_id, $version from engine/init.php * h(), intv() escaping helpers * acp_url(), acp_site(), acp_redirect() links and redirects * acp_csrf_field() CSRF token input * acp_flash_success/error/info() messages across redirects * acp_card_open/close(), acp_empty(), acp_stat() layout blocks * db()->fetchOne/fetchAll($sql, $params) prepared SELECT, use ? placeholders * db()->execute($sql, $params) prepared INSERT/UPDATE/DELETE * db()->transaction(function ($db) { ... }) several writes, all or nothing * * Notes: * - The working directory is the project root, so 'engine/cache/x' and * other engine-relative paths work exactly as they do on a normal page. * - Links to the public site need acp_site(): acp_site('index.php'). * - Do NOT include init.php, the header or the footer - index.php does that. * - POST requests are CSRF-checked centrally, so every form needs * or it will be rejected with a 400. * - Redirect after a successful POST with acp_redirect('') so a * refresh does not resubmit. * - To give the menu entry a counter bubble, add a function named * acp_badge_() to admin/bootstrap.php returning an int. */ if (!defined('ACP_ROOT')) { http_response_code(403); die('Direct access denied.'); } if ($_SERVER['REQUEST_METHOD'] === 'POST') { // ... do the work ... acp_flash_success('Saved.'); acp_redirect('_template'); } ?>

Example form

Delete everything below and write your own