<?php 
header("Access-Control-Allow-Origin: *"); 
header('Content-Type: application/json');
header('Expires: '.gmdate('D, d M Y H:i:s \G\M\T', time() + (60 * 60))); // 1 hour

$modules = array(
	array(
		"title"=>"ACF Items",
		"description"=>"Display a table of advanced custom fields",
		"url"=>"https://elegantmarketplace.com/downloads/advanced-custom-fields-module/?ref=9&campaign=modulemate",
		"url_emp"=>"https://elegantmarketplace.com/downloads/advanced-custom-fields-module/?ref=9&campaign=empmate",
		"price"=>"$12 (inc. 2 more modules)",
		"class"=>"db_module_mate_default"
		), 
	array(
		"title"=>"ACF Repeater Table",
		"description"=>"Display an advanced custom field repeater",
		"url"=>"https://elegantmarketplace.com/downloads/advanced-custom-fields-module/?ref=9&campaign=modulemate",
		"url_emp"=>"https://elegantmarketplace.com/downloads/advanced-custom-fields-module/?ref=9&campaign=empmate",
		"price"=>"$12 (inc. 2 more modules)",
		"class"=>"db_module_mate_default"
	), 
	array(
		"title"=>"ACF Single Item",
		"description"=>"Display a single advanced custom field",
		"url"=>"https://elegantmarketplace.com/downloads/advanced-custom-fields-module/?ref=9&campaign=modulemate",
		"url_emp"=>"https://elegantmarketplace.com/downloads/advanced-custom-fields-module/?ref=9&campaign=empmate",
		"price"=>"$12 (inc. 2 more modules)",
		"class"=>"db_module_mate_default"
	), 
	array(
		"title"=>"ACME Custom Portfolio",
		"description"=>"Portfolio module displaying any post type / taxonomy",
		"url"=>"https://wordpress.org/plugins/acme-divi-modules/",
		"price"=>"Free (inc. 1 more module)",
		"class"=>"db_module_mate_default"
	), 
	array(
		"title"=>"ACME FW Portfolio",
		"description"=>"Portfolio module displaying any post type / taxonomy",
		"url"=>"https://wordpress.org/plugins/acme-divi-modules/",
		"price"=>"Free (inc. 1 more module)",
		"class"=>"db_module_mate_default",
		"fullwidth"=>true
	), 
	array(
		"title"=>"Advanced Text",
		"description"=>"A text module with additional options",
		"url"=>"http://www.sean-barton.co.uk/2016/06/divi-advanced-text-module/",
		"price"=>"Free",
		"class"=>"db_module_mate_default"
	), 
	array(
		"title"=>"All in One Extended",
		"description"=>"CTA, Blurb, Image & Fullwidth Header Extended features in one",
		"url"=>"https://elegantmarketplace.com/downloads/all-in-one-extended-module/?ref=9&campaign=modulemate",
		"url_emp"=>"https://elegantmarketplace.com/downloads/all-in-one-extended-module/?ref=9&campaign=empmate",
		"price"=>"$20",
		"class"=>"db_module_mate_default"
	), 
	array(
		"title"=>"Automatic Testimonials",
		"description"=>"Display user testimonials",
		"url"=>"https://montereypremier.com/product/automatic-divi-testimonials/ref/18/?campaign=modulemate",
		"price"=>"$12",
		"class"=>"db_module_mate_default"
	), 
	array(
		"title"=>"Before and After",
		"description"=>"Before and after images with a sliding reveal",
		"url"=>"https://optimusdivi.com/modules/before-and-after/?ref=1&campaign=modulemate",
		"price"=>"$5",
		"class"=>"db_module_mate_divider_vertical"
	), 
	array(
		"title"=>"Before and After Image Slider",
		"description"=>"Responsive before and after image slider",
		"url"=>"https://elegantmarketplace.com/downloads/before-after-slider-module-for-divi/?ref=9&campaign=modulemate",
		"url_emp"=>"https://elegantmarketplace.com/downloads/before-after-slider-module-for-divi/?ref=9&campaign=empmate",
		"price"=>"$12",
		"class"=>"db_module_mate_default"
	), 
	array(
		"title"=>"Blog - Custom Left",
		"description"=>"Blog layouts with social media icons",
		"url"=>"https://divithemestore.com/theme-store/plugins/divi-custom-modules/ref/3/?campaign=modulemate",
		"price"=>"$14.99",
		"class"=>"db_module_mate_default"
	), 
	array(
		"title"=>"Boxed List",
		"description"=>"Display a list of items with background boxes",
		"url"=>"https://optimusdivi.com/modules/boxed-list-module/?ref=1&campaign=modulemate",
		"price"=>"$4",
		"class"=>"db_module_mate_default"
	), 
	array(
		"title"=>"Caldera Form",
		"description"=>"Add a Caldera form to your Page Builder",
		"url"=>"https://optimusdivi.com/modules/caldera-forms-module/?ref=1&campaign=modulemate",
		"price"=>"Free",
		"class"=>"db_module_mate_default"
	), 
	array(
		"title"=>"Code Snippet",
		"description"=>"Displays syntax highlighted code blocks",
		"url"=>"https://divibooster.com/code-snippet-module-for-divi-builder/?ref=62&campaign=modulemate",
		"price"=>"$9",
		"class"=>"db_module_mate_code_snippet"
	), 
	array(
		"title"=>"CST Contact Form Plus",
		"description"=>"Contact module with extra features and recaptcha",
		"url"=>"https://elegantmarketplace.com/downloads/cst-contact-module-plus/?ref=9&campaign=modulemate",
		"url_emp"=>"https://elegantmarketplace.com/downloads/cst-contact-module-plus/?ref=9&campaign=empmate",
		// also https://cooldivi.com/product/cst-contact-module-plus/
		"price"=>"$10",
		"class"=>"db_module_mate_email"
	),
	array(
		"title"=>"Custom Fullwidth Portfolio",
		"description"=>"Fullwidth portfolio module with advanced styles",
		"url"=>"https://divithemestore.com/theme-store/plugins/custom-fullwidth-portfolio-module/ref/3/?campaign=modulemate",
		"price"=>"$14.99",
		"class"=>"db_module_mate_default",
		"fullwidth"=>true
	),
	array(
		"title"=>"Custom Post Type",
		"description"=>"Blog module for displaying custom post types",
		"url"=>"https://elegantmarketplace.com/downloads/easy-custom-post-type-module/?ref=9&campaign=modulemate",
		"url_emp"=>"https://elegantmarketplace.com/downloads/easy-custom-post-type-module/?ref=9&campaign=empmate",
		"price"=>"$6+",
		"class"=>"db_module_mate_default"
	), 
	array(
		"title"=>"Divi Staff Grid",
		"description"=>"Display your staff members in a grid",
		"url"=>"https://montereypremier.com/product/divi-staff/ref/18/?campaign=modulemate",
		"price"=>"$15 (was $20)",
		"class"=>"db_module_mate_default"
	), 
	array(
		"title"=>"DP Advanced Blurb",
		"description"=>"Blurb module with Font Awesome icons and animations.",
		"url"=>"https://www.diviplugins.com/plugins/advanced-blurbs/?referral=3",
		"price"=>"$10",
		"class"=>"db_module_mate_blurb"
	), 
	array(
		"title"=>"DP Blog Portfolio",
		"description"=>"Display posts in a portfolio",
		"url"=>"https://www.diviplugins.com/plugins/portfolio-posts-pro/?referral=3",
		"price"=>"$15 (inc. 2 more modules)",
		"class"=>"db_module_mate_grid"
	), 
	array(
		"title"=>"DP Filterable Blog",
		"description"=>"Adds a filterable blog module",
		"url"=>"https://www.diviplugins.com/plugins/portfolio-posts-pro/?referral=3",
		"price"=>"$15 (inc. 2 more modules)",
		"class"=>"db_module_mate_grid_filterable"
	), 	
	array(
		"title"=>"DP Fullwidth Blog",
		"description"=>"Adds a fullwidth blog module",
		"url"=>"https://www.diviplugins.com/plugins/portfolio-posts-pro/?referral=3",
		"price"=>"$15 (inc. 2 more modules)",
		"class"=>"db_module_mate_grid",
		"fullwidth"=>true
	), 	
	array(
		"title"=>"DP Indeed Jobs",
		"description"=>"Create custom job searches using Indeed’s Publisher API",
		"url"=>"https://www.diviplugins.com/plugins/indeed-jobs/?referral=3",
		"price"=>"Free",
		"class"=>"db_module_mate_shop"
	), 
	array(
		"title"=>"Fullwidth Breadcrumbs",
		"description"=>"Add a breadcrumb bar to Divi Builder",
		"url"=>"https://optimusdivi.com/modules/breadcrumbs/?ref=1&campaign=modulemate",
		"price"=>"$5",
		"class"=>"db_module_mate_default",
		"fullwidth"=>true
	), 
	array(
		"title"=>"Fullwidth SA SVG",
		"description"=>"Display, style and animate your SVG images",
		"url"=>"https://elegantmarketplace.com/downloads/sa-svg-plugin/?ref=9&campaign=modulemate",
		"url_emp"=>"https://elegantmarketplace.com/downloads/sa-svg-plugin/?ref=9&campaign=empmate",
		"price"=>"$10",
		"class"=>"db_module_mate_default",
		"fullwidth"=>true
	), 
	array(
		"title"=>"Fullwidth Header Extended",
		"description"=>"Fullwidth header module with additional effects",
		"url"=>"https://montereypremier.com/product/fullwidth-header-extended-module/ref/18/?campaign=empmate",
		"price"=>"$12 (inc. 1 more module)",
		"class"=>"db_module_mate_fullwidth_header_extended",
		"fullwidth"=>true
	), 
	array(
		"title"=>"Fullwidth Text Extender",
		"description"=>"Fullwidth text module with additional effects",
		"url"=>"https://montereypremier.com/product/fullwidth-header-extended-module/ref/18/?campaign=empmate",
		"price"=>"$12 (inc. 1 more module)",
		"class"=>"db_module_mate_default",
		"fullwidth"=>true
	), 
	array(
		"title"=>"Heading Rotator",
		"description"=>"Header module with animated text type / delete",
		"url"=>"https://optimusdivi.com/modules/heading-rotator/?ref=1&campaign=modulemate",
		"price"=>"$5",
		"class"=>"db_module_mate_default"
	), 
	array(
		"title"=>"Image Intense",
		"description"=>"Image module with hover and overlay effects",
		"url"=>"https://besuperfly.com/product/image-intense/aff/45/?campaign=modulemate",
		"price"=>"$25",
		"class"=>"db_module_mate_camera"
	), 
	array(
		"title"=>"Image Overlay",
		"description"=>"An image module with support for overlays",
		"url"=>"https://elegantmarketplace.com/downloads/divi-image-module-overlay/?ref=9&campaign=modulemate",
		"url_emp"=>"https://elegantmarketplace.com/downloads/divi-image-module-overlay/?ref=9&campaign=empmate",
		"price"=>"$5",
		"class"=>"db_module_mate_default"
	), 
	array(
		"title"=>"KK Blog",
		"description"=>"Blog module with additional blog index layouts",
		"url"=>"https://elegantmarketplace.com/downloads/kk-modules-plugin/?ref=9&campaign=modulemate",
		"url_emp"=>"https://elegantmarketplace.com/downloads/kk-modules-plugin/?ref=9&campaign=empmate",
		"price"=>"$20 (inc. 13 more modules)",
		"class"=>"db_module_mate_blog"
	), 
	array(
		"title"=>"KK Blog Extended",
		"description"=>"Blog module with additional blog index layouts",
		"url"=>"https://elegantmarketplace.com/downloads/kk-divi-blogger/?ref=9&campaign=modulemate",
		"url_emp"=>"https://elegantmarketplace.com/downloads/kk-divi-blogger/?ref=9&campaign=empmate",
		"price"=>"$10 (inc. 1 more module)",
		"class"=>"db_module_mate_blog"
	), 
	array(
		"title"=>"KK Blog Grid",
		"description"=>"Blog module with additional blog grid layouts",
		"url"=>"https://elegantmarketplace.com/downloads/kk-modules-plugin/?ref=9&campaign=modulemate",
		"url_emp"=>"https://elegantmarketplace.com/downloads/kk-modules-plugin/?ref=9&campaign=empmate",
		"price"=>"$20 (inc. 13 more modules)",
		"class"=>"db_module_mate_grid"
	), 
	array(
		"title"=>"KK Blog Grid Ext",
		"description"=>"Blog module with additional blog grid layouts",
		"url"=>"https://elegantmarketplace.com/downloads/kk-divi-blogger/?ref=9&campaign=modulemate",
		"url_emp"=>"https://elegantmarketplace.com/downloads/kk-divi-blogger/?ref=9&campaign=empmate",
		"price"=>"$10 (inc. 1 more module)",
		"class"=>"db_module_mate_grid"
	), 
	array(
		"title"=>"KK Contact Form",
		"description"=>"Contact form with name, email, subject &amp; message",
		"url"=>"https://elegantmarketplace.com/downloads/kk-modules-plugin/?ref=9&campaign=modulemate",
		"url_emp"=>"https://elegantmarketplace.com/downloads/kk-modules-plugin/?ref=9&campaign=empmate",
		"price"=>"$20 (inc. 13 more modules)",
		"class"=>"db_module_mate_email"
	), 
	array(
		"title"=>"KK Custom Contact Form",
		"description"=>"A drag and drop contact form builder",
		"url"=>"https://elegantmarketplace.com/downloads/kk-modules-plugin/?ref=9&campaign=modulemate",
		"url_emp"=>"https://elegantmarketplace.com/downloads/kk-modules-plugin/?ref=9&campaign=empmate",
		"price"=>"$20 (inc. 13 more modules)",
		"class"=>"db_module_mate_email"
	), 
	array(
		"title"=>"KK Custom Form/CRM",
		"description"=>"Form builder with Flamingo CRM integration",
		"url"=>"https://elegantmarketplace.com/downloads/kk-custom-formcrm/?ref=9&campaign=modulemate",
		"url_emp"=>"https://elegantmarketplace.com/downloads/kk-custom-formcrm/?ref=9&campaign=empmate",
		"price"=>"$15",
		"class"=>"db_module_mate_email"
	), 
	array(
		"title"=>"KK Featured Slider",
		"description"=>"Display recent posts/projects in a slider",
		"url"=>"https://elegantmarketplace.com/downloads/kk-modules-plugin/?ref=9&campaign=modulemate",
		"url_emp"=>"https://elegantmarketplace.com/downloads/kk-modules-plugin/?ref=9&campaign=empmate",
		"price"=>"$20 (inc. 13 more modules)",
		"class"=>"db_module_mate_slider"
	), 	
	array(
		"title"=>"KK Featured Slider with Carousel",
		"description"=>"A featured post slider with carousel navigation",
		"url"=>"https://elegantmarketplace.com/downloads/kk-modules-plugin/?ref=9&campaign=modulemate",
		"url_emp"=>"https://elegantmarketplace.com/downloads/kk-modules-plugin/?ref=9&campaign=empmate",
		"price"=>"$20 (inc. 13 more modules)",
		"class"=>"db_module_mate_slider",
		"fullwidth"=>true
	), 
	array(
		"title"=>"KK Featured Slider with Carousel Nav",
		"description"=>"A featured slider with carousel navigation",
		"url"=>"https://elegantmarketplace.com/downloads/kk-modules-plugin/?ref=9&campaign=modulemate",
		"url_emp"=>"https://elegantmarketplace.com/downloads/kk-modules-plugin/?ref=9&campaign=empmate",
		"price"=>"$20 (inc. 13 more modules)",
		"class"=>"db_module_mate_slider"
	), 
	array(
		"title"=>"KK FullHeader w/Video",
		"description"=>"A fullwidth header with video background",
		"url"=>"https://elegantmarketplace.com/downloads/kk-modules-plugin/?ref=9&campaign=modulemate",
		"url_emp"=>"https://elegantmarketplace.com/downloads/kk-modules-plugin/?ref=9&campaign=empmate",
		"price"=>"$20 (inc. 13 more modules)",
		"class"=>"db_module_mate_header",
		"fullwidth"=>true
	), 
	array(
		"title"=>"KK Fullwidth Slider w/Carousel",
		"description"=>"A fullwidth slider with carousel navigation",
		"url"=>"https://elegantmarketplace.com/downloads/kk-modules-plugin/?ref=9&campaign=modulemate",
		"url_emp"=>"https://elegantmarketplace.com/downloads/kk-modules-plugin/?ref=9&campaign=empmate",
		"price"=>"$20 (inc. 13 more modules)",
		"class"=>"db_module_mate_slider",
		"fullwidth"=>true
	),  
	array(
		"title"=>"KK Horizontal Tabs",
		"description"=>"Horizontal tabs with styles and library integration",
		"url"=>"https://elegantmarketplace.com/downloads/kk-modules-plugin/?ref=9&campaign=modulemate",
		"url_emp"=>"https://elegantmarketplace.com/downloads/kk-modules-plugin/?ref=9&campaign=empmate",
		"price"=>"$20 (inc. 13 more modules)",
		"class"=>"db_module_mate_tabs"
	), 
	array(
		"title"=>"KK Slider with Carousel",
		"description"=>"A standard slider with carousel navigation",
		"url"=>"https://elegantmarketplace.com/downloads/kk-modules-plugin/?ref=9&campaign=modulemate",
		"url_emp"=>"https://elegantmarketplace.com/downloads/kk-modules-plugin/?ref=9&campaign=empmate",
		"price"=>"$20 (inc. 13 more modules)",
		"class"=>"db_module_mate_slider"
	), 
	array(
		"title"=>"KK Vertical Tabs",
		"description"=>"A vertical version of the Divi tabs module",
		"url"=>"https://elegantmarketplace.com/downloads/kk-modules-plugin/?ref=9&campaign=modulemate",
		"url_emp"=>"https://elegantmarketplace.com/downloads/kk-modules-plugin/?ref=9&campaign=empmate",
		"price"=>"$20 (inc. 13 more modules)",
		"class"=>"db_module_mate_tabs_vertical"
	),  
	array(
		"title"=>"KK Vertical Tabs Ext",
		"description"=>"Vertical tabs with styles and library integration",
		"url"=>"https://elegantmarketplace.com/downloads/kk-modules-plugin/?ref=9&campaign=modulemate",
		"url_emp"=>"https://elegantmarketplace.com/downloads/kk-modules-plugin/?ref=9&campaign=empmate",
		"price"=>"$20 (inc. 13 more modules)",
		"class"=>"db_module_mate_tabs_vertical"
	), 
	array(
		"title"=>"Map Extended",
		"description"=>"Map module with custom pins and new layouts",
		"url"=>"https://montereypremier.com/product/map-extended-module/ref/18/?campaign=modulemate",
		"price"=>"$8",
		"class"=>"db_module_mate_map_extended"
	), 
	array(
		"title"=>"Menu",
		"description"=>"Adds a menu to your standard sections",
		"url"=>"https://elegantmarketplace.com/downloads/divi-menu-module-standard-width/?ref=9&campaign=modulemate",
		"url_emp"=>"https://elegantmarketplace.com/downloads/divi-menu-module-standard-width/?ref=9&campaign=empmate",
		"price"=>"$7",
		"class"=>"db_module_mate_default"
	), 
	array(
		"title"=>"Modal Button",
		"description"=>"Show popup content when button clicked",
		"url"=>"https://optimusdivi.com/modules/modal-button/?ref=1&campaign=modulemate",
		"price"=>"$4",
		"class"=>"db_module_mate_default",
	), 
	array(
		"title"=>"Modal/Popup Builder",
		"description"=>"Display popup boxes on various triggers",
		"url"=>"https://elegantmarketplace.com/downloads/divi-popup-modal-module/?ref=9&campaign=modulemate",
		"url_emp"=>"https://elegantmarketplace.com/downloads/divi-popup-modal-module/?ref=9&campaign=empmate",
		"price"=>"$15",
		"class"=>"db_module_mate_default"
	), 
	array(
		"title"=>"Paypal Buy Now",
		"description"=>"Divi-styled Paypal buy now buttons",
		"url"=>"https://optimusdivi.com/modules/paypal-buy-now/?ref=1&campaign=modulemate",
		"price"=>"Free",
		"class"=>"db_module_mate_cart"
	), 
	array(
		"title"=>"Person - Extended",
		"description"=>"Additional phone, email and social accounts",
		"url"=>"https://divi.space/product/person-module-extended/ds/divibooster?campaign=modulemate",
		"price"=>"Free",
		"class"=>"db_module_mate_person"
	), 
	array(
		"title"=>"Popup Trigger CTA",
		"description"=>"Display popups created with 'Popup Maker'",
		"url"=>"https://divi.space/product/divi-popup-maker-extension/ds/divibooster?campaign=modulemate",
		"price"=>"Free",
		"class"=>"db_module_mate_default"
	), 
	array(
		"title"=>"SA SVG",
		"description"=>"Display, style and animate your SVG images",
		"url"=>"https://elegantmarketplace.com/downloads/sa-svg-plugin/?ref=9&campaign=modulemate",
		"url_emp"=>"https://elegantmarketplace.com/downloads/sa-svg-plugin/?ref=9&campaign=empmate",
		"price"=>"$10",
		"class"=>"db_module_mate_default"
	), 
	array(
		"title"=>"SB Slick Slider",
		"description"=>"Add slider / carousel based on jquery's slick",
		"url"=>"https://elegantmarketplace.com/downloads/sb-slick-slider-module/?ref=9&campaign=modulemate",
		"url_emp"=>"https://elegantmarketplace.com/downloads/sb-slick-slider-module/?ref=9&campaign=empmate",
		"price"=>"$10",
		"class"=>"db_module_mate_default"
	), 
	array(
		"title"=>"Testimonial Slider",
		"description"=>"Display customer testimonials in a slider",
		"url"=>"https://montereypremier.com/product/testimonial-slider/ref/18/?campaign=modulemate",
		"price"=>"$40",
		"class"=>"db_module_mate_default"
	),  
	array(
		"title"=>"Tile",
		"description"=>"Create image tiles with a hover effect",
		"url"=>"https://optimusdivi.com/modules/hover-tile-module/?ref=1&campaign=modulemate",
		"price"=>"$5",
		"class"=>"db_module_mate_default"
	),  
	array(
		"title"=>"Timeline - Vertical",
		"description"=>"Add a vertical timeline module to Divi Builder",
		"url"=>"https://elegantmarketplace.com/downloads/divi-timeline-module/?ref=9&campaign=modulemate",
		"url_emp"=>"https://elegantmarketplace.com/downloads/divi-timeline-module/?ref=9&campaign=empmate",
		"price"=>"$10",
		"class"=>"db_module_mate_default"
	),  
	array(
		"title"=>"Timeline 2",
		"description"=>"Add a vertical timeline with thumbnails",
		"url"=>"https://optimusdivi.com/modules/timeline/?ref=1&campaign=modulemate",
		"price"=>"$5",
		"class"=>"db_module_mate_default"
	), 
	array(
		"title"=>"TripAdvisor",
		"description"=>"Display TripAdvisor Reviews",
		"url"=>"https://optimusdivi.com/modules/tripadvisor-reviews-module/?ref=1&campaign=modulemate",
		"price"=>"$4",
		"class"=>"db_module_mate_default"
	), 
	array(
		"title"=>"Video Popup",
		"description"=>"Display videos in a popup box",
		"url"=>"https://optimusdivi.com/modules/video-popup-module/?ref=1&campaign=modulemate",
		"price"=>"$6",
		"class"=>"db_module_mate_default"
	), 
	array(
		"title"=>"VRYN Button",
		"description"=>"Button module with 27 animation effects",
		"url"=>"https://elegantmarketplace.com/downloads/vryn-buttons-plus/?ref=9&campaign=modulemate",
		"url_emp"=>"https://elegantmarketplace.com/downloads/vryn-buttons-plus/?ref=9&campaign=empmate",
		"price"=>"$7+",
		"class"=>"db_module_mate_default"
	), 
	array(
		"title"=>"Woo Commerce Product",
		"description"=>"Add to cart CTA module. Divi Builder plugin only",
		"url"=>"https://wordpress.org/plugins/woo-divi/",
		"price"=>"Free",
		"class"=>"db_module_mate_default"
	)
);

// Modify data
foreach($modules as $k=>$m) {
	
	/* Add EMP Mate class */
	if (!empty($m['class'])) {
		$modules[$k]['class_emp'] = str_replace('db_module_mate', 'empmate', $m['class']);
	}
	
}

// filter modules
$filtered = array();

foreach($modules as $k=>$m) {
	
	$include = true;

	/* fullwidth=true: Filter out standard modules */
	if (isset($_GET['fullwidth']) and $_GET['fullwidth']==='true') {
		if (!(isset($m['fullwidth']) and $m['fullwidth']===true)) {
			$include = false;
		}
	}
	
	/* fullwidth=false: Filter out fullwidth modules */
	if (isset($_GET['fullwidth']) and $_GET['fullwidth']==='false') {
		if (isset($m['fullwidth']) and $m['fullwidth']===true) {
			$include = false;
		}
	}
	
	/* vendor=emp: Filter out non-emp modules */
	if (isset($_GET['vendor']) and $_GET['vendor']==='emp') {
		if (empty($m['url_emp'])) {
			$include = false;
		}
	}
	
	if ($include) {
		$filtered[] = $m;
	}
}


echo json_encode($filtered);