Ejemplo n.º 1
0
     break;
 case 'albumsort':
     require_once $include . 'sort.php';
     $actionURL = $_MG_CONF['site_url'] . '/index.php';
     $display .= MG_saveAlbumSort($album_id, $actionURL);
     break;
 case 'staticsort':
     require_once $include . 'sort.php';
     $actionURL = $_MG_CONF['site_url'] . '/album.php?aid=' . $album_id;
     $display .= MG_saveStaticSortMedia($album_id, $actionURL);
     break;
 case 'savemedia':
     require_once $include . 'mediamanage.php';
     $media_id = $_POST['mid'];
     $actionURL = $_MG_CONF['site_url'] . '/admin.php?mode=media&album_id=' . $album_id;
     $display .= MG_saveMediaEdit($album_id, $media_id, $actionURL);
     break;
 case 'globalattr':
     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':
Ejemplo n.º 2
0
     require_once $_CONF['path'] . 'plugins/mediagallery/include/mediamanage.php';
     $retval .= MG_saveMedia($album_id, $_MG_CONF['site_url'] . '/album.php?aid=' . $album_id);
     CACHE_remove_instance('whatsnew');
     break;
 case 'albumsort':
     require_once $_CONF['path'] . 'plugins/mediagallery/include/sort.php';
     $retval .= MG_saveAlbumSort($album_id, $_MG_CONF['site_url'] . '/index.php');
     break;
 case 'staticsort':
     require_once $_CONF['path'] . 'plugins/mediagallery/include/sort.php';
     $retval .= MG_saveStaticSortMedia($album_id, $_MG_CONF['site_url'] . '/album.php?aid=' . $album_id);
     break;
 case 'savemedia':
     require_once $_CONF['path'] . 'plugins/mediagallery/include/mediamanage.php';
     $media_id = $_POST['mid'];
     $retval = MG_saveMediaEdit($album_id, $media_id, $_MG_CONF['site_url'] . '/admin.php?mode=media&album_id=' . $album_id);
     break;
 case 'globalattr':
     require_once $_CONF['path'] . 'plugins/mediagallery/include/global.php';
     $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;
Ejemplo n.º 3
0
    }
    require_once $_CONF['path'] . 'plugins/mediagallery/include/mediamanage.php';
    $actionURL = $_CONF['site_url'] . '/admin/plugins/mediagallery/index.php?mode=savemedia';
    $display = MG_mediaEdit($album_id, $media_id, $actionURL, 1);
    $display = COM_createHTMLDocument($display);
    COM_output($display);
    exit;
} else {
    if ($mode == 'savemedia') {
        $post_mode = COM_applyFilter($_POST['mode']);
        if (!empty($LANG_MG01['save']) && $post_mode == $LANG_MG01['save']) {
            $album_id = COM_applyFilter($_POST['album_id'], true);
            $media_id = COM_applyFilter($_POST['mid']);
            if (!empty($media_id) && !empty($album_id)) {
                require_once $_CONF['path'] . 'plugins/mediagallery/include/mediamanage.php';
                MG_saveMediaEdit($album_id, $media_id, $home_url);
            }
        }
        echo COM_refresh($home_url);
        exit;
    }
}
$display = COM_startBlock($LANG_MG00['admin'], '', COM_getBlockTemplate('_admin_block', 'header'));
$display .= MG_showAdminMenu($sub_menu);
if ($msg > 0) {
    $display .= COM_showMessageText($LANG_MG09[$msg]);
}
$display .= COM_endBlock(COM_getBlockTemplate('_admin_block', 'footer'));
if (empty($sub_menu)) {
    $display .= plugin_showstats_mediagallery(0);
}