case UPLOAD_ERR_PARTIAL: $post['_formError'] = "The file was only partially uploaded."; break; case UPLOAD_ERR_NO_FILE: $post['_formError'] = "No file was uploaded."; break; default: $post['_formError'] = "A strange internal error has occured. Please contact the Exponent Developers."; break; } pathos_sessions_set("last_POST", $post); header("Location: " . $_SERVER['HTTP_REFERER']); exit(""); } } $listing = listing::update($_POST, $listing); $listing->location_data = serialize($loc); if ($file != null) { $listing->file_id = $db->insertObject($file, 'file'); } else { if (!isset($listing->id)) { $listing->file_id = 0; } } if (isset($listing->id)) { $db->updateObject($listing, "listing"); } else { $db->insertObject($listing, "listing"); } pathos_flow_redirect(); } else {