if (isset($_POST['action'])) { $action = htmlspecialchars($_POST['action']); if ($action == "lesscontrast") { $image_controller->contrastImage(false, $path); } else { if ($action == "morecontrast") { $image_controller->contrastImage(true, $path); } else { if ($action == "lessluminosity") { $image_controller->brightnessImage(false, $path); } else { if ($action == "moreluminosity") { $image_controller->brightnessImage(true, $path); } else { if ($action == "sepia") { $image_controller->sepiaImage($path); } else { if ($action == "gray") { $image_controller->grayImage($path); } else { if ($action == "blur") { $image_controller->gaussianImage($path); } else { if ($action == "noise") { $image_controller->countourImage($path); } } } } } }