$files_form->display(); if ($fileid != 0) { smartsection_close_collapsable('editfile', 'editfileicon'); } else { smartsection_close_collapsable('addfile', 'addfileicon'); } } $false = false; /* -- Available operations -- */ switch ($op) { case "uploadfile": smartsection_upload_file(false, true, $false); exit; break; case "uploadanother": smartsection_upload_file(true, true, $false); exit; break; case "mod": global $smartsection_file_handler; $fileid = isset($_GET['fileid']) ? $_GET['fileid'] : 0; $itemid = isset($_GET['itemid']) ? $_GET['itemid'] : 0; if ($fileid == 0 && $itemid == 0) { redirect_header("javascript:history.go(-1)", 3, _AM_SSECTION_NOITEMSELECTED); exit; } smartsection_xoops_cp_header(); include_once XOOPS_ROOT_PATH . "/class/xoopsformloader.php"; editfile(true, $fileid, $itemid); break; case "modify":
$error_msg = _AM_SSECTION_ITEMNOTUPDATED; } else { $error_msg = _AM_SSECTION_ITEMNOTCREATED; } $redirect_msg = _AM_SSECTION_ITEM_REJECTED; break; } $itemObj->setVar('status', $new_status); // Storing the item if (!$itemObj->store()) { redirect_header("javascript:history.go(-1)", 3, $error_msg . smartsection_formatErrors($itemObj->getErrors())); exit; } // attach file if any if ($_FILES['userfile']['name'] != "") { $file_upload_result = smartsection_upload_file(false, false, $itemObj); if ($file_upload_result !== true) { redirect_header("javascript:history.go(-1)", 3, $file_upload_result); exit; } } // Send notifications if (!empty($notifToDo)) { $itemObj->sendNotifications($notifToDo); } redirect_header("item.php", 2, $redirect_msg); break; case "del": global $xoopsUser, $xoopsUser, $xoopsConfig, $xoopsDB, $_GET; $module_id = $xoopsModule->getVar('mid'); $gperm_handler =& xoops_gethandler('groupperm');