Ejemplo n.º 1
0
     $album_id = COM_applyFilter($_POST['album_id'], true);
     switch ($action) {
         case 'media':
             require_once $_CONF['path'] . 'plugins/mediagallery/include/batch.php';
             $retval .= MG_batchDeleteMedia($album_id, $_MG_CONF['site_url'] . '/album.php?aid=' . $album_id);
             CACHE_remove_instance('whatsnew');
             break;
         case 'album':
             require_once $_CONF['path'] . 'plugins/mediagallery/include/batch.php';
             $retval .= MG_deleteAlbumConfirm($album_id, $_MG_CONF['site_url'] . '/admin.php');
             break;
         case 'confalbum':
             if (isset($_POST['target'])) {
                 require_once $_CONF['path'] . 'plugins/mediagallery/include/batch.php';
                 $target_id = COM_applyFilter($_POST['target'], true);
                 $retval .= MG_deleteAlbum($album_id, $target_id, $_MG_CONF['site_url'] . '/index.php');
                 CACHE_remove_instance('whatsnew');
             } else {
                 $retval .= MG_errorHandler($LANG_MG02['no_target_album']);
             }
             break;
         case 'watermark':
             require_once $_CONF['path'] . 'plugins/mediagallery/include/lib-upload.php';
             require_once $_CONF['path'] . 'plugins/mediagallery/include/lib-watermark.php';
             $retval .= MG_watermarkDelete();
             break;
     }
 } else {
     $retval .= MG_invalidRequest();
 }
 $display = MG_siteHeader();
Ejemplo n.º 2
0
         $media_id_array[] = COM_applyFilter($_POST['sel'][$i]);
     }
     $actionURL = $_MG_CONF['site_url'] . '/album.php?aid=' . $album_id;
     $display .= MG_batchDeleteMedia($album_id, $media_id_array, $actionURL);
     break;
 case 'album':
     require_once $include . 'batch.php';
     $actionURL = $_MG_CONF['site_url'] . '/admin.php';
     $display .= MG_deleteAlbumConfirm($album_id, $actionURL);
     break;
 case 'confalbum':
     if (isset($_POST['target'])) {
         require_once $include . 'batch.php';
         $target_id = COM_applyFilter($_POST['target'], true);
         $actionURL = $_MG_CONF['site_url'] . '/index.php';
         $display .= MG_deleteAlbum($album_id, $target_id, $actionURL);
     } else {
         $display .= COM_showMessageText($LANG_MG02['no_target_album'] . '  [ <a href=\'javascript:history.go(-1)\'>' . $LANG_MG02['go_back'] . '</a> ]');
     }
     break;
 case 'savemedia':
     require_once $include . 'batch.php';
     if (!isset($_POST['mid'])) {
         MG_invalidRequest();
     }
     $mid = COM_applyFilter($_POST['mid']);
     $media_id_array = array($mid);
     $actionURL = $_MG_CONF['site_url'] . '/album.php?aid=' . $album_id;
     $display .= MG_batchDeleteMedia($album_id, $media_id_array, $actionURL);
     break;
 case 'watermark':