# 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';
# for more details. # # You should have received a copy of the GNU # General Public License along with Exponent; if # not, write to: # # Free Software Foundation, Inc., # 59 Temple Place, # Suite 330, # Boston, MA 02111-1307 USA # # $Id: edit.php,v 1.2 2005/02/19 00:32:37 filetreefrog Exp $ ################################################## if (!defined("PATHOS")) { exit(""); } $data = null; $data = $db->selectObject("swfitem", "location_data='" . serialize($loc) . "'"); if (pathos_permissions_check("configure", $loc)) { $form = swfitem::form($data); $form->location($loc); $form->meta("action", "save"); $form->meta("m", $loc->mod); $form->meta("s", $loc->src); $form->meta("i", $loc->int); $template = new template("swfmodule", "_form_edit", $loc); $template->assign("form_html", $form->toHTML()); $template->output(); } else { echo SITE_403_HTML; }