HEX
Server: Apache
System: Linux p3plzcpnl489526.prod.phx3.secureserver.net 4.18.0-553.54.1.lve.el8.x86_64 #1 SMP Wed Jun 4 13:01:13 UTC 2025 x86_64
User: vmasmheia229 (9244908)
PHP: 7.4.33
Disabled: NONE
Upload Files
File: /home/vmasmheia229/domains/overtoneband.com/html/wp-content/plugins/nextgen-gallery/xml/ajax.php
<?php
// see http://codex.wordpress.org/AJAX_in_Plugins

// check if we have all needed parameter
if ( !defined('ABSPATH') || (!isset($_GET['galleryid']) || !is_numeric($_GET['galleryid'])) || (!isset($_GET['p']) || !is_numeric($_GET['p'])) || !isset($_GET['type'])){
    // if it's not ajax request, back to main page
    if($_SERVER['HTTP_X_REQUESTED_WITH'] != 'XMLHttpRequest')
        header('Location: http://'. $_SERVER['HTTP_HOST']);
    die();    
}

switch ($_GET['type']) {
	case 'gallery':
	
		// get the navigation page
		set_query_var('nggpage', intval($_GET['nggpage']));
		
		// get the current page/post id
		set_query_var('pageid', intval($_GET['p']));
		set_query_var('show', 'gallery');
		$GLOBALS['id'] = intval($_GET['p']);
		
		echo nggShowGallery( intval($_GET['galleryid']) );
		
		break;
	case 'browser':
	
		// which image should be shown ?
		set_query_var('pid', intval($_GET['pid']));
		
		// get the current page/post id
		set_query_var('pageid', intval($_GET['p']));
		$GLOBALS['id'] = intval($_GET['p']);
			
		echo nggShowImageBrowser( intval($_GET['galleryid']) );
		
		break;
	default:
		echo 'Wrong request type specified.';
}