exit; } else { $retval .= MG_invalidRequest(); } $display = MG_siteHeader(); $display .= $retval; $display .= MG_siteFooter(); echo $display; exit; } else { if ($mode == $LANG_MG01['batch_process'] && !empty($LANG_MG01['batch_process'])) { if (isset($_POST['album_id'])) { require_once $_CONF['path'] . 'plugins/mediagallery/include/batch.php'; $album_id = COM_applyFilter($_POST['album_id'], true); $action = COM_applyFilter($_POST['batchOption']); MG_batchProcess($album_id, $action, $_MG_CONF['site_url'] . '/admin.php?mode=media&album_id=' . $album_id); } else { $display = MG_siteHeader(); $display .= MG_invalidRequest(); } $display .= MG_siteFooter(); echo $display; } else { if ($mode == $LANG_MG01['move'] && !empty($LANG_MG01['move'])) { $retval = ''; if (isset($_POST['album_id'])) { require_once $_CONF['path'] . 'plugins/mediagallery/include/batch.php'; $album_id = COM_applyFilter($_POST['album_id'], true); $retval .= MG_batchMoveMedia($album_id, $_MG_CONF['site_url'] . '/album.php?aid=' . $album_id); } else { $retval .= MG_invalidRequest();
COM_output($display); } else { if ($mode == $LANG_MG01['batch_process'] && !empty($LANG_MG01['batch_process'])) { if (!isset($_POST['album_id'])) { MG_invalidRequest(); } require_once $include . 'batch.php'; $album_id = COM_applyFilter($_POST['album_id'], true); $action = COM_applyFilter($_POST['batchOption']); $media_id_array = array(); $numItems = count($_POST['sel']); for ($i = 0; $i < $numItems; $i++) { $media_id_array[] = COM_applyFilter($_POST['sel'][$i]); } $actionURL = $_MG_CONF['site_url'] . '/admin.php?mode=media&album_id=' . $album_id; MG_batchProcess($album_id, $media_id_array, $action, $actionURL); exit; } else { if ($mode == $LANG_MG01['move'] && !empty($LANG_MG01['move'])) { if (!isset($_POST['album_id'])) { MG_invalidRequest(); } require_once $include . 'batch.php'; $album_id = COM_applyFilter($_POST['album_id'], true); $destination = COM_applyFilter($_POST['album'], true); $actionURL = $_MG_CONF['site_url'] . '/album.php?aid=' . $album_id; if ($destination == 0) { // deny move to the root album echo COM_refresh($actionURL); exit; }