/**
 * Shows Migration main screen
 * It shows detected gallerysystem and offers a migration option
 */
function showMigration()
{
    require_once JPATH_RSGALLERY2_ADMIN . '/includes/install.class.php';
    //Initialize new install instance
    $rsgInstall = new rsgInstall();
    if (isset($_REQUEST['type'])) {
        $type = mosGetParam($_REQUEST, 'type', '');
    } else {
        $type = NULL;
    }
    if ($type == '') {
        $rsgInstall->showMigrationOptions();
    } else {
        $result = $rsgInstall->doMigration($type);
        if ($result !== true) {
            echo $result;
            HTML_RSGallery::showCP();
        } else {
            echo JText::_('migration successful');
            HTML_RSGallery::showCP();
        }
    }
}
Exemple #2
0
* RSGallery is Free Software
*/
// no direct access
defined('_JEXEC') or die('Restricted access');
require_once $rsgOptions_path . 'images.html.php';
require_once $rsgOptions_path . 'images.class.php';
require_once JPATH_RSGALLERY2_ADMIN . '/admin.rsgallery2.html.php';
$cid = JRequest::getVar("cid", array(), 'default', 'array');
switch ($task) {
    case 'new':
        editImage($option, 0);
        break;
    case 'batchupload':
        HTML_RSGallery::RSGalleryHeader('', JText::_('Upload ZIP-file'));
        batchupload($option);
        HTML_RSGallery::RSGalleryFooter();
        break;
    case 'save_batchupload':
        save_batchupload();
        break;
    case 'upload':
        uploadImage($option);
        break;
    case 'save_upload':
        saveUploadedImage($option);
        break;
    case 'edit':
        editImage($option, $cid[0]);
        break;
    case 'editA':
        editImage($option, $id);