Exemplo n.º 1
0
 function show_menu()
 {
     global $ngg;
     $this->show_upgrade_page();
     // Set installation date
     if (empty($ngg->options['installDate'])) {
         $ngg->options['installDate'] = time();
         update_option('ngg_options', $ngg->options);
     }
     switch ($_GET['page']) {
         case "nggallery-add-gallery":
             include_once dirname(__FILE__) . '/functions.php';
             // admin functions
             include_once dirname(__FILE__) . '/addgallery.php';
             // nggallery_admin_add_gallery
             $ngg->addgallery_page = new nggAddGallery();
             $ngg->addgallery_page->controller();
             break;
         case "nggallery-manage-gallery":
             include_once dirname(__FILE__) . '/functions.php';
             // admin functions
             include_once dirname(__FILE__) . '/manage.php';
             // nggallery_admin_manage_gallery
             // Initate the Manage Gallery page
             $ngg->manage_page = new nggManageGallery();
             // Render the output now, because you cannot access a object during the constructor is not finished
             $ngg->manage_page->controller();
             break;
         case "nggallery-manage-album":
             include_once dirname(__FILE__) . '/album.php';
             // nggallery_admin_manage_album
             $ngg->manage_album = new nggManageAlbum();
             $ngg->manage_album->controller();
             break;
         case "nggallery-options":
             include_once dirname(__FILE__) . '/settings.php';
             // nggallery_admin_options
             $ngg->option_page = new nggOptions();
             $ngg->option_page->show_page();
             break;
         case "nggallery-tags":
             include_once dirname(__FILE__) . '/tags.php';
             // nggallery_admin_tags
             break;
         case "nggallery-style":
             include_once dirname(__FILE__) . '/style.php';
             // nggallery_admin_style
             $ngg->nggallery_style = new NGG_Style();
             $ngg->nggallery_style->controller();
             break;
         case "nggallery-setup":
             include_once dirname(__FILE__) . '/setup.php';
             // nggallery_admin_setup
             nggallery_admin_setup();
             break;
         case "nggallery-roles":
             include_once dirname(__FILE__) . '/roles.php';
             // nggallery_admin_roles
             nggallery_admin_roles();
             break;
         case "nggallery-import":
             include_once dirname(__FILE__) . '/myimport.php';
             // nggallery_admin_import
             nggallery_admin_import();
             break;
         case "nggallery-about":
             include_once dirname(__FILE__) . '/about.php';
             // nggallery_admin_about
             nggallery_admin_about();
             break;
         case "nggallery":
         default:
             include_once dirname(__FILE__) . '/overview.php';
             // nggallery_admin_overview
             nggallery_admin_overview();
             break;
     }
 }
Exemplo n.º 2
0
    function show_menu()
    {
        global $ngg;
        // check for upgrade and show upgrade screen
        if (get_option('ngg_db_version') != NGG_DBVERSION) {
            include_once dirname(__FILE__) . '/functions.php';
            include_once dirname(__FILE__) . '/upgrade.php';
            nggallery_upgrade_page();
            return;
        }
        // Set installation date
        if (empty($ngg->options['installDate'])) {
            $ngg->options['installDate'] = time();
            update_option('ngg_options', $ngg->options);
        }
        // Show donation message only one time.
        if (isset($_GET['hide_donation'])) {
            $ngg->options['hideDonation'] = true;
            update_option('ngg_options', $ngg->options);
        }
        if (!isset($ngg->options['hideDonation']) || $ngg->options['hideDonation'] !== true) {
            if (time() > $ngg->options['installDate'] + 60 * 60 * 24 * 30) {
                ?>
	
				<div id="donator_message">
					<p><?php 
                echo str_replace('%s', 'http://alexrabe.de/donation', __('Thanks for using this plugin, I hope you are satisfied ! If you would like to support the further development, please consider a <strong><a href="%s">donation</a></strong>! If you still need some help, please post your questions <a href="http://wordpress.org/tags/nextgen-gallery?forum_id=10">here</a> .', 'nggallery'));
                ?>
						<span>
							<a href="<?php 
                echo add_query_arg(array('hide_donation' => 'true'));
                ?>
" >
								<small><?php 
                _e('OK, hide this message now !', 'nggallery');
                ?>
</small>
							</a>
						<span>
					</p>
				</div>
			<?php 
            }
        }
        switch ($_GET['page']) {
            case "nggallery-add-gallery":
                include_once dirname(__FILE__) . '/functions.php';
                // admin functions
                include_once dirname(__FILE__) . '/addgallery.php';
                // nggallery_admin_add_gallery
                $ngg->addgallery_page = new nggAddGallery();
                $ngg->addgallery_page->controller();
                break;
            case "nggallery-manage-gallery":
                include_once dirname(__FILE__) . '/functions.php';
                // admin functions
                include_once dirname(__FILE__) . '/manage.php';
                // nggallery_admin_manage_gallery
                // Initate the Manage Gallery page
                $ngg->manage_page = new nggManageGallery();
                // Render the output now, because you cannot access a object during the constructor is not finished
                $ngg->manage_page->controller();
                break;
            case "nggallery-manage-album":
                include_once dirname(__FILE__) . '/album.php';
                // nggallery_admin_manage_album
                $ngg->manage_album = new nggManageAlbum();
                $ngg->manage_album->controller();
                break;
            case "nggallery-options":
                include_once dirname(__FILE__) . '/settings.php';
                // nggallery_admin_options
                $ngg->option_page = new nggOptions();
                $ngg->option_page->controller();
                break;
            case "nggallery-tags":
                include_once dirname(__FILE__) . '/tags.php';
                // nggallery_admin_tags
                break;
            case "nggallery-style":
                include_once dirname(__FILE__) . '/style.php';
                // nggallery_admin_style
                nggallery_admin_style();
                break;
            case "nggallery-setup":
                include_once dirname(__FILE__) . '/setup.php';
                // nggallery_admin_setup
                nggallery_admin_setup();
                break;
            case "nggallery-roles":
                include_once dirname(__FILE__) . '/roles.php';
                // nggallery_admin_roles
                nggallery_admin_roles();
                break;
            case "nggallery-import":
                include_once dirname(__FILE__) . '/myimport.php';
                // nggallery_admin_import
                nggallery_admin_import();
                break;
            case "nggallery-about":
                include_once dirname(__FILE__) . '/about.php';
                // nggallery_admin_about
                nggallery_admin_about();
                break;
            case "nggallery":
            default:
                include_once dirname(__FILE__) . '/overview.php';
                // nggallery_admin_overview
                nggallery_admin_overview();
                break;
        }
    }
Exemplo n.º 3
0
 function show_menu()
 {
     global $ngg;
     // init PluginChecker
     $nggCheck = new CheckPlugin();
     $nggCheck->URL = NGGURL;
     $nggCheck->version = NGGVERSION;
     $nggCheck->name = "ngg";
     // check for upgrade and show upgrade screen
     if (get_option('ngg_db_version') != NGG_DBVERSION) {
         include_once dirname(__FILE__) . '/functions.php';
         include_once dirname(__FILE__) . '/upgrade.php';
         nggallery_upgrade_page();
         return;
     }
     // Show update message
     if ($nggCheck->startCheck() && !IS_WPMU) {
         echo '<div class="plugin-update">' . __('A new version of NextGEN Gallery is available !', 'nggallery') . ' <a href="http://wordpress.org/extend/plugins/nextgen-gallery/download/" target="_blank">' . __('Download here', 'nggallery') . '</a></div>' . "\n";
     }
     switch ($_GET['page']) {
         case "nggallery-add-gallery":
             include_once dirname(__FILE__) . '/functions.php';
             // admin functions
             include_once dirname(__FILE__) . '/addgallery.php';
             // nggallery_admin_add_gallery
             nggallery_admin_add_gallery();
             break;
         case "nggallery-manage-gallery":
             include_once dirname(__FILE__) . '/functions.php';
             // admin functions
             include_once dirname(__FILE__) . '/manage.php';
             // nggallery_admin_manage_gallery
             // Initate the Manage Gallery page
             $ngg->manage_page = new nggManageGallery();
             // Render the output now, because you cannot access a object during the constructor is not finished
             $ngg->manage_page->controller();
             break;
         case "nggallery-manage-album":
             include_once dirname(__FILE__) . '/album.php';
             // nggallery_admin_manage_album
             nggallery_admin_manage_album();
             break;
         case "nggallery-options":
             include_once dirname(__FILE__) . '/settings.php';
             // nggallery_admin_options
             nggallery_admin_options();
             break;
         case "nggallery-tags":
             include_once dirname(__FILE__) . '/tags.php';
             // nggallery_admin_tags
             break;
         case "nggallery-style":
             include_once dirname(__FILE__) . '/style.php';
             // nggallery_admin_style
             nggallery_admin_style();
             break;
         case "nggallery-setup":
             include_once dirname(__FILE__) . '/setup.php';
             // nggallery_admin_setup
             nggallery_admin_setup();
             break;
         case "nggallery-roles":
             include_once dirname(__FILE__) . '/roles.php';
             // nggallery_admin_roles
             nggallery_admin_roles();
             break;
         case "nggallery-import":
             include_once dirname(__FILE__) . '/myimport.php';
             // nggallery_admin_import
             nggallery_admin_import();
             break;
         case "nggallery-about":
             include_once dirname(__FILE__) . '/about.php';
             // nggallery_admin_about
             nggallery_admin_about();
             break;
         case "nggallery-wpmu":
             include_once dirname(__FILE__) . '/style.php';
             include_once dirname(__FILE__) . '/wpmu.php';
             // nggallery_wpmu_admin
             nggallery_wpmu_setup();
             break;
         case "nggallery":
         default:
             include_once dirname(__FILE__) . '/overview.php';
             // nggallery_admin_overview
             nggallery_admin_overview();
             break;
     }
 }
Exemplo n.º 4
0
 function show_menu()
 {
     global $ngg;
     // check for upgrade and show upgrade screen
     if (get_option('ngg_db_version') != NGG_DBVERSION) {
         include_once dirname(__FILE__) . '/functions.php';
         include_once dirname(__FILE__) . '/upgrade.php';
         nggallery_upgrade_page();
         return;
     }
     // Set installation date
     if (empty($ngg->options['installDate'])) {
         $ngg->options['installDate'] = time();
         update_option('ngg_options', $ngg->options);
     }
     // Show donation message only one time.
     if (isset($_GET['hide_donation'])) {
         $ngg->options['hideDonation'] = true;
         update_option('ngg_options', $ngg->options);
     }
     switch ($_GET['page']) {
         case "nggallery-add-gallery":
             include_once dirname(__FILE__) . '/functions.php';
             // admin functions
             include_once dirname(__FILE__) . '/addgallery.php';
             // nggallery_admin_add_gallery
             $ngg->addgallery_page = new nggAddGallery();
             $ngg->addgallery_page->controller();
             break;
         case "nggallery-manage-gallery":
             include_once dirname(__FILE__) . '/functions.php';
             // admin functions
             include_once dirname(__FILE__) . '/manage.php';
             // nggallery_admin_manage_gallery
             // Initate the Manage Gallery page
             $ngg->manage_page = new nggManageGallery();
             // Render the output now, because you cannot access a object during the constructor is not finished
             $ngg->manage_page->controller();
             break;
         case "nggallery-manage-album":
             include_once dirname(__FILE__) . '/album.php';
             // nggallery_admin_manage_album
             $ngg->manage_album = new nggManageAlbum();
             $ngg->manage_album->controller();
             break;
         case "nggallery-options":
             include_once dirname(__FILE__) . '/settings.php';
             // nggallery_admin_options
             $ngg->option_page = new nggOptions();
             $ngg->option_page->controller();
             break;
         case "nggallery-tags":
             include_once dirname(__FILE__) . '/tags.php';
             // nggallery_admin_tags
             break;
         case "nggallery-style":
             include_once dirname(__FILE__) . '/style.php';
             // nggallery_admin_style
             nggallery_admin_style();
             break;
         case "nggallery-setup":
             include_once dirname(__FILE__) . '/setup.php';
             // nggallery_admin_setup
             nggallery_admin_setup();
             break;
         case "nggallery-roles":
             include_once dirname(__FILE__) . '/roles.php';
             // nggallery_admin_roles
             nggallery_admin_roles();
             break;
         case "nggallery-import":
             include_once dirname(__FILE__) . '/myimport.php';
             // nggallery_admin_import
             nggallery_admin_import();
             break;
         case "nggallery-about":
             include_once dirname(__FILE__) . '/about.php';
             // nggallery_admin_about
             nggallery_admin_about();
             break;
         case "nggallery":
         default:
             include_once dirname(__FILE__) . '/overview.php';
             // nggallery_admin_overview
             nggallery_admin_overview();
             break;
     }
 }
Exemplo n.º 5
0
 function show_menu()
 {
     global $ngg;
     // Set installation date
     if (empty($ngg->options['installDate'])) {
         $ngg->options['installDate'] = time();
         update_option('ngg_options', $ngg->options);
     }
     // Show donation message only one time.
     if (isset($_GET['hide_donation'])) {
         $ngg->options['hideDonation'] = true;
         update_option('ngg_options', $ngg->options);
     }
     echo '<div id="ngg_page_content">';
     switch ($_GET['page']) {
         case "nggallery-manage-gallery":
             include_once dirname(__FILE__) . '/functions.php';
             // admin functions
             include_once dirname(__FILE__) . '/manage.php';
             // nggallery_admin_manage_gallery
             // Initate the Manage Gallery page
             $ngg->manage_page = new nggManageGallery();
             // Render the output now, because you cannot access a object during the constructor is not finished
             $ngg->manage_page->controller();
             break;
         case "nggallery-manage-album":
             include_once dirname(__FILE__) . '/album.php';
             // nggallery_admin_manage_album
             $ngg->manage_album = new nggManageAlbum();
             $ngg->manage_album->controller();
             break;
         case "nggallery-options":
             include_once dirname(__FILE__) . '/settings.php';
             // nggallery_admin_options
             $ngg->option_page = new nggOptions();
             $ngg->option_page->controller();
             break;
         case "nggallery-tags":
             include_once dirname(__FILE__) . '/tags.php';
             // nggallery_admin_tags
             break;
         case "nggallery-style":
             include_once dirname(__FILE__) . '/style.php';
             // nggallery_admin_style
             nggallery_admin_style();
             break;
         case "nggallery-setup":
             include_once dirname(__FILE__) . '/setup.php';
             // nggallery_admin_setup
             nggallery_admin_setup();
             break;
         case "nggallery-roles":
             include_once dirname(__FILE__) . '/roles.php';
             // nggallery_admin_roles
             nggallery_admin_roles();
             break;
         case "nggallery-import":
             include_once dirname(__FILE__) . '/myimport.php';
             // nggallery_admin_import
             nggallery_admin_import();
             break;
         case "nggallery-about":
             include_once dirname(__FILE__) . '/about.php';
             // nggallery_admin_about
             nggallery_admin_about();
             break;
         case "nggallery":
         default:
             include_once dirname(__FILE__) . '/overview.php';
             // nggallery_admin_overview
             nggallery_admin_overview();
             break;
     }
     echo "</div>";
 }