#!/usr/local/bin/php $g['captiveportal_element_sizelimit']) { $input_errors[] = "The total size of all files uploaded may not exceed " . format_bytes($g['captiveportal_element_sizelimit']) . "."; } if (!$input_errors) { $element = array(); $element['name'] = $name; $element['size'] = $size; $element['content'] = base64_encode(file_get_contents($_FILES['new']['tmp_name'])); $a_element[] = $element; write_config(); captiveportal_write_elements(); header("Location: services_captiveportal_filemanager.php"); exit; } } foreach ($_POST as $pn => $pv) { if (preg_match("/^del_(\d+)_x$/", $pn, $matches)) { $id = $matches[1]; unset($a_element[$id]); write_config(); captiveportal_write_elements(); header("Location: services_captiveportal_filemanager.php"); exit; } } } ?>