"Welcome to Fucking Fipamo", "status" => false, ]; $html = $view->fetch($template, $pageOptions); $location = "../content/test.html"; if (!is_file($location)) { file_put_contents($location, $html); } else { ($new = fopen($location, "w")) or die("Unable to open file!"); fwrite($new, $html); fclose($new); } */ $result = [ "message" => "Items sorted. GOOD EFFORT", "type" => "TASK_NONE", ]; break; case "add-avatar": $result = ImagesAPI::uploadImage($request, "avatar"); break; case "add-feature-background": $result = ImagesAPI::uploadImage($request, "background"); break; case "sync": Settings::sync($body); $result = [ "message" => "Settings Synced. You're doing great!", "type" => "settingsUpdated", ]; break; case "nav-sync": Settings::navSync($body); $result = [ "message" => "Navigation updated. Very slick!", "type" => "menuUpdated", ]; break; default: $result = [ "message" => "Hm, no task. That's unfortunate", "type" => "TASK_NONE", ]; break; } return $result; } }