function controller() { global $gmCore, $gmProcessor; switch ($gmProcessor->page) { case 'GrandMedia_AddMedia': include_once dirname(__FILE__) . '/addmedia.php'; gmedia_AddMedia(); break; case 'GrandMedia_Terms': include_once dirname(__FILE__) . '/terms.php'; if (isset($_GET['edit_album'])) { gmediaAlbumEdit(); } elseif (isset($_GET['edit_filter'])) { gmediaFilterEdit(); } else { gmediaTerms(); } break; case 'GrandMedia_Galleries': include_once dirname(__FILE__) . '/galleries.php'; if (isset($_GET['gallery_module']) || isset($_GET['edit_gallery'])) { gmediaGalleryEdit(); } else { gmediaGalleries(); } break; case 'GrandMedia_Modules': include_once dirname(__FILE__) . '/modules.php'; gmediaModules(); break; case 'GrandMedia_Settings': include_once dirname(__FILE__) . '/settings.php'; gmSettings(); break; case 'GrandMedia_App': include_once dirname(__FILE__) . '/app.php'; gmediaApp(); break; case 'GrandMedia_WordpressLibrary': include_once dirname(__FILE__) . '/wpmedia.php'; grandWPMedia(); break; case 'GrandMedia': default: include_once dirname(__FILE__) . '/gmedia.php'; gmediaLib(); break; } }
function controller() { global $gmProcessor; switch ($gmProcessor->page) { case 'GrandMedia_AddMedia': include_once dirname(__FILE__) . '/pages/addmedia/addmedia.php'; break; case 'GrandMedia_Albums': if (isset($_GET['edit_term'])) { include_once dirname(__FILE__) . '/pages/terms/edit-term.php'; } else { include_once dirname(__FILE__) . '/pages/terms/terms.php'; } break; case 'GrandMedia_Categories': if (isset($_GET['edit_term'])) { include_once dirname(__FILE__) . '/pages/terms/edit-term.php'; } else { include_once dirname(__FILE__) . '/pages/terms/terms.php'; } break; case 'GrandMedia_Tags': include_once dirname(__FILE__) . '/pages/terms/terms.php'; break; case 'GrandMedia_Galleries': if (isset($_GET['gallery_module']) || isset($_GET['edit_term'])) { include_once dirname(__FILE__) . '/pages/galleries/edit-gallery.php'; } else { include_once dirname(__FILE__) . '/pages/galleries/galleries.php'; } break; case 'GrandMedia_Modules': if (isset($_GET['preset_module']) || isset($_GET['preset'])) { include_once dirname(__FILE__) . '/pages/modules/edit-preset.php'; } else { include_once dirname(__FILE__) . '/pages/modules/modules.php'; } break; case 'GrandMedia_Settings': include_once dirname(__FILE__) . '/pages/settings/settings.php'; break; case 'GrandMedia_App': include_once dirname(__FILE__) . '/app.php'; gmediaApp(); break; case 'GrandMedia_WordpressLibrary': include_once dirname(__FILE__) . '/wpmedia.php'; grandWPMedia(); break; case 'GrandMedia_Update': include_once GMEDIA_ABSPATH . 'config/update.php'; gmedia_upgrade_progress_panel(); break; case 'GrandMedia': default: include_once dirname(__FILE__) . '/pages/library/library.php'; break; } }