# Free Software Foundation, Inc., # 59 Temple Place, # Suite 330, # Boston, MA 02111-1307 USA # # $Id: save.php,v 1.3 2005/04/18 15:25:24 filetreefrog Exp $ ################################################## if (!defined("PATHOS")) { exit(""); } if (isset($_POST['m']) && isset($_POST['s'])) { $floc = pathos_core_makeLocation($_POST['m'], $_POST['s'], $_POST['i']); if (pathos_permissions_check("configure", $floc)) { $data = null; $data = $db->selectObject("swfitem", "location_data='" . serialize($floc) . "'"); $data = swfitem::update($_POST, $data); $data->location_data = serialize($floc); $directory = "files/swfmodule/"; $filefield = 'swf_name'; if (isset($_FILES[$filefield]) && $_FILES[$filefield]['name'] != "") { if (isset($data->swf_id) && $data->swf_id != 0) { $file = $db->selectObject("file", "id=" . $data->swf_id); file::delete($file); $db->delete("file", "id=" . $file->id); } $file = file::update($filefield, $directory, null); if ($file != null) { $data->swf_id = $db->insertObject($file, "file"); } } $filefield = 'alt_image_name';