예제 #1
0
파일: admin.php 프로젝트: NewRoute/glfusion
     exit;
 } else {
     if ($mode == $LANG_MG01['delete'] && !empty($LANG_MG01['delete'])) {
         if (isset($_POST['action']) && isset($_POST['album_id'])) {
             $retval = '';
             $action = COM_applyFilter($_POST['action']);
             $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();
예제 #2
0
 $display = '';
 switch ($action) {
     case 'media':
         require_once $include . 'batch.php';
         $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'] . '/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();