Ejemplo n.º 1
0
                 $retval .= MG_saveGlobalAlbumAttr();
                 break;
             case 'globalperm':
                 require_once $_CONF['path'] . 'plugins/mediagallery/include/global.php';
                 $retval .= MG_saveGlobalAlbumPerm();
                 CACHE_remove_instance('whatsnew');
                 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_watermarkSave();
                 break;
             case 'wm_upload':
                 require_once $_CONF['path'] . 'plugins/mediagallery/include/lib-upload.php';
                 require_once $_CONF['path'] . 'plugins/mediagallery/include/lib-watermark.php';
                 $retval .= MG_watermarkUploadSave();
                 break;
         }
     } else {
         $retval = MG_invalidRequest();
     }
     $display = MG_siteHeader();
     $display .= $retval;
     $display .= MG_siteFooter();
     echo $display;
     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']);
Ejemplo n.º 2
0
             require_once $include . 'global.php';
             $display .= MG_saveGlobalAlbumAttr();
             break;
         case 'globalperm':
             require_once $include . 'global.php';
             $display .= MG_saveGlobalAlbumPerm();
             break;
         case 'watermark':
             require_once $include . 'lib-upload.php';
             require_once $include . 'lib-watermark.php';
             $display .= MG_watermarkSave();
             break;
         case 'wm_upload':
             require_once $include . 'lib-upload.php';
             require_once $include . 'lib-watermark.php';
             $display .= MG_watermarkUploadSave();
             break;
     }
     $display = MG_createHTMLDocument($display);
     COM_output($display);
 } else {
     if ($mode == $LANG_MG01['delete'] && !empty($LANG_MG01['delete'])) {
         if (!isset($_POST['action']) || !isset($_POST['album_id'])) {
             MG_invalidRequest();
         }
         $action = COM_applyFilter($_POST['action']);
         $album_id = COM_applyFilter($_POST['album_id'], true);
         $display = '';
         switch ($action) {
             case 'media':
                 require_once $include . 'batch.php';