set_title("Adding folder"); $page->set_heading("Adding folder"); $page->add_block(new NavBlock()); $html = UL(); foreach ($results as $r) { if (is_a($r, UploadError::class)) { $html->appendChild(LI("{$r->name} failed: {$r->error}")); } else { $html->appendChild(LI("{$r->name} ok")); } } $page->add_block(new Block("Results", $html)); } /* * Add a section to the admin page. This should contain a form which * links to bulk_add with POST[dir] set to the name of a server-side * directory full of images */ public function display_admin_block(): void { global $page; $html = " Add a folder full of images; any subfolders will have their names used as tags for the images within.
Note: this is the folder as seen by the server -- you need to upload via FTP or something first.

".make_form(make_link("bulk_add"))."
Folder
"; $page->add_block(new Block("Bulk Add", $html)); } }