$landscape = isset($_POST['landscape']) ? $_POST['landscape'] : '';
 $portrait = isset($_POST['portrait']) ? $_POST['portrait'] : '';
 $dimension = isset($_POST['dimension']) ? $_POST['dimension'] : '';
 $status = isset($_POST['status']) ? $_POST['status'] : '';
 $style = isset($_POST['style']) ? $_POST['style'] : '';
 $offset = 0;
 $alienated_array_counter = 0;
 $split = explode(' x ', $dimension);
 $width = $split[0];
 $height = $split[1];
 // If given a landscape image, scale and upload it,
 // as cover preview landscape image.
 if ($landscape) {
     $landscape = substr($landscape, stripos($landscape, 'images'));
     $landscape_temp_url = dpsbridge_helper_scale_img($landscape, $width, $height, 'landscape');
     $fp->uploadCover($folio_id, 'landscape', $landscape_temp_url);
     unlink($landscape_temp_url);
 }
 // If given a portrait image, scale and upload it,
 // as cover preview portrait image.
 if ($portrait) {
     $portrait = substr($portrait, stripos($portrait, 'images'));
     $portrait_temp_url = dpsbridge_helper_scale_img($portrait, $height, $width, 'portrait');
     $fp->uploadCover($folio_id, 'portrait', $portrait_temp_url);
     unlink($portrait_temp_url);
 }
 // Attempts to upload the HTML Resources zip file.
 $response = $fp->uploadHTMLResources($folio_id, 'styles/' . $style . '/HTMLResources.zip');
 if ($response['status'] === 'ok') {
     echo ' - Success: HTMLResource<br/>';
 } else {