<?php
/**
 * Sage includes
 *
 * The $sage_includes array determines the code library included in your theme.
 * Add or remove files to the array as needed. Supports child theme overrides.
 *
 * Please note that missing files will produce a fatal error.
 *
 * @link https://github.com/roots/sage/pull/1042
 */


$sage_includes = array(
	'lib/assets.php',    // Scripts and stylesheets
	'lib/extras.php',    // Custom functions
	'lib/setup.php',     // Theme setup
	'lib/titles.php',    // Page titles
	'lib/wrapper.php',   // Theme wrapper class
	'lib/customizer.php', // Theme customizer
	'lib/ajax.php',
	'lib/theme-functions.php',
	'lib/acf.php',
	'lib/Class-mosaic.php',
	'lib/class-flexible.php',
);

foreach ( $sage_includes as $file ) {
	if ( ! $filepath = locate_template( $file ) ) {
		trigger_error( sprintf( __( 'Error locating %s for inclusion', 'sage' ), $file ), E_USER_ERROR );
	}

	require_once $filepath;
}
unset( $file, $filepath );

/**
 * Enabling Flexible Conten
 */
if ( is_admin() && isset( $_POST['post_ID'] ) ) {
	$content = new FlexibleContent( $_POST['post_ID'] );
	//przy każdym zapisie wpisu odpalamy funkcję
	add_action( 'acf/save_post', array( $content, 'content_on_save' ), 20 );
}


function annointed_admin_bar_remove() {
global $wp_admin_bar;
/* Remove their stuff */
$wp_admin_bar->remove_menu('wp-logo');
}
add_action('wp_before_admin_bar_render', 'annointed_admin_bar_remove', 0);
// remove yoast meta box from users
function mamaduka_remove_metabox() {
    if ( ! current_user_can( 'edit_others_posts' ) )
        remove_meta_box( 'wpseo_meta', 'doculibrary', 'normal' );
}
add_action( 'add_meta_boxes', 'mamaduka_remove_metabox', 11 );
//disable admin colors
remove_action( 'admin_color_scheme_picker', 'admin_color_scheme_picker' );
//change admin color and leave no change
function update_user_option_admin_color( $color_scheme ) {
    $color_scheme = 'ocean';

    return $color_scheme;
}
add_filter( 'get_user_option_admin_color', 'update_user_option_admin_color', 5 );
//disable admin toolbar
function remove_admin_bar() {
	if (!current_user_can('administrator') && !is_admin()) {
	  show_admin_bar(false);
	}
}
add_action('after_setup_theme', 'remove_admin_bar');
// removes the `profile.php` admin color scheme options
remove_action( 'admin_color_scheme_picker', 'admin_color_scheme_picker' );

/**
 * Solucion Telematica
 *
 * The $sage_includes array determines the code library included in your theme.
 * Add or remove files to the array as needed. Supports child theme overrides.
 *
 * Please note that missing files will produce a fatal error.
 *
 * @link https://github.com/roots/sage/pull/1042
 */

//SEARCH FORMS PARA LOS PROYECTOS DE PPI, USADO EN EL ARCHIVO DE SearchPPI.php
function search_form_ppi() {
    $args = array();
	
	/*$args['wp_query'] = array('post_type' => 'ppi_database', 'posts_per_page' => 10,'orderby' => 'title','order'   => 'ASC','relation' => 'OR');*/
	/*$args['wp_query'] = array('post_type' => 'ppi_database','posts_per_page' => 10,'orderby' => 'reg_date_ppi','order'   => 'DESC','relation' => 'OR','lang' => 'en');*/
	
	//Nuevo requerimiento para administradores todos los status y para los que no son admin solo los 3 que estan filtrandose en el ppi_status
	if(current_user_can( 'administrator' ) ) {
		$args['wp_query'] = array('post_type' => 'ppi_database','posts_per_page' => 10,'relation' => 'AND','lang' => 'en');
	
	}elseif(current_user_can( 'um_usuario-icm' ) ) {
		$args['wp_query'] = array('post_type' => 'ppi_database','posts_per_page' => 10,'relation' => 'AND','lang' => 'en');
	
	} else{
		$args['wp_query'] = array('post_type' => 'ppi_database','posts_per_page' => 10,'relation' => 'AND','lang' => 'en','tax_query' => array(
					'relation' => 'AND',
					array(
						'taxonomy' => 'ppi_status',
						'field'    => 'slug',
						'terms'    => array( 'Completed', 'Ongoing', 'Pipeline'),
					)
				));
	}
	
 	$args['meta_key_relation'] ='OR';
	
	$args['fields'][] = array( 'type' => 'submit',
								'pre_html' => '<div class="lineasearch">',
                               'class' => 'button',
                               'value' => __( 'SEARCH', 'sage' ));

	$args['fields'][] = array( 'type' => 'generic','id'=>'lang','format'=>'hidden','value'=>substr( get_bloginfo ( 'language' ), 0, 2 ));
	$args['fields'][] = array( 'type' => 'reset',
                               'class' => 'button',
                               'value' => __( 'RESET', 'sage' ) );
	$args['fields'][] = array( 'type' => 'reset',
								'post_html' => '</div>',
                               'class' => 'button',
                               'value' => __( 'EXPORT', 'sage' ) );
    
    //$args['fields'][] = array( 'type' => 'submit','id'=>'covidbutton','class'=>'covidbutton','value'=>'','style'=>'background:url("https://clmeplus.org/web/app/themes/clme-theme/covid_icon_ppi.png") no-repeat left center;');
	
	$args['fields'][] = array( 'type' => 'generic','id'=>'searchtext','format'=>'text','label' =>__( 'Search For:', 'sage' ), 'placeholder' =>  __( 'Enter search terms', 'sage' ) ,'relation' => 'OR');
		
	$args['fields'][] = array( 'type' => 'generic', 
                               'format' => 'checkbox', 
                               'label' => __( 'Search In The Following Fields:', 'sage' ), 
                               'values' => array('PPI Name'=>__('Project name', 'sage' ), 
							   					'Acronym'=>__('Acronym', 'sage' ) ,
												  'Objective(s)'=>__('Brief Description', 'sage' ), 
												   'Lead Organization'=>__( 'Lead Organization', 'sage' ), 
												  'Donor'=>__( 'Donor', 'sage' ),
												  'All Fields'=>__( 'All Fields', 'sage' )
												  ),
								'default'=>'All Fields'); 	
	
	 $args['fields'][] = array( 'type' => 'orderby', 
                               'format' => 'select', 
                               'label' => __( 'Order Results:', 'sage' ),  
							   'orderby_values' => array(
													'post_title' => array('label' =>  __( 'Title', 'sage' ),'meta_key' => true,'orderby' => 'meta_value','meta_type'=>'CHAR') , 
													'lead_organization_ppi'=> array('label' =>  __( 'Lead Organization', 'sage' ), 'meta_key' => true,'orderby' => 'meta_value','meta_type'=>'CHAR'),
								   					'grant_us_ppi'=> array('label' =>   __('Grant Value', 'sage' ), 'meta_key' => true,'orderby' => 'meta_value_num','meta_type'=>'NUMERIC'),
								   					'start_date_ppi'=> array('label' =>  __( 'Date of Project Start', 'sage' ), 'meta_key' => true,'orderby' => 'meta_value','meta_type'=>'DATE'),
								   					'reg_date_ppi'=> array('label' => __( 'Date added/updated', 'sage' ), 'meta_key' => true,'orderby' => 'meta_value','meta_type'=>'DATE')
							   						)  ,
							    'default' => 'reg_date_ppi'
							  );
											 
	$args['fields'][] = array( 'type' => 'posts_per_page', 
                               'format' => 'select', 
                               'label' => __( 'Per page:', 'sage' ), 
                               'values' => array(2=>2, 5=>5, 10=>10, 20=>20), 
                               'default' => 10 );	

    $args['fields'][] = array( 'type' => 'order', 
                               'format' => 'radio', 
                               'label' => '', 
                               'values' => array('ASC' => __('↑', 'sage' ), 'DESC' => __( '↓', 'sage' )), 
                               'default' => 'ASC');

	$args['fields'][] =array( 'type' => 'meta_key', 'meta_key' => 'post_title','format' => 'hidden','compare' => 'LIKE','relation' => 'OR');
	$args['fields'][] =array( 'type' => 'meta_key', 'meta_key' => 'post_title_2','format' => 'hidden','compare' => 'LIKE','relation' => 'OR');
	
	
	$args['fields'][] =array( 'type' => 'meta_key', 'meta_key' => 'main_objectives_ppi','format' => 'hidden','compare' => 'LIKE','relation' => 'OR');
	$args['fields'][] =array( 'type' => 'meta_key', 'meta_key' => 'main_objectives_ppi_2','format' => 'hidden','compare' => 'LIKE','relation' => 'OR'); 
	
	
	$args['fields'][] =array( 'type' => 'meta_key', 'meta_key' => 'lead_organization_ppi','format' => 'hidden','compare' => 'LIKE','relation' => 'OR');
	$args['fields'][] =array( 'type' => 'meta_key', 'meta_key' => 'donors_ppi','format' => 'hidden','compare' => 'LIKE','relation' => 'OR');  
	$args['fields'][] =array( 'type' => 'meta_key', 'meta_key' => 'acronym_ppi','format' => 'hidden','compare' => 'LIKE','relation' => 'OR'); 
										  
	
	$args['fields'][] = array( 'type' => 'generic','id'=>'filtertitle','format'=>'text','label' =>__('Filter By:', 'sage' ));
	//Cambio solciictado solo para administradores todos y los usuarios no deben ver el soft pipeline nuevo tax 
	if(current_user_can( 'administrator' ) ) {
		$args['fields'][] = array( 'type' => 'taxonomy', 
                               'format' => 'checkbox', 
                               'label' => __('Status:', 'sage' ), 
                               'default_all' => true,
							   'taxonomy' =>'ppi_status',
							   'term_format' => 'slug',
							   'nested' => 'false',
							   'operator'=>'IN',
							   'term_args' => array('hide_empty' => false, 
                                               'orderby' => 'name', 
                                               'order' => 'ASC') );	

		// 2021, se agrego que usuarios ICM, también puedan ver Softpipeline projects
	 }elseif (current_user_can( 'um_usuario-icm' ) ) {
		
		$args['fields'][] = array( 'type' => 'taxonomy', 
                               'format' => 'checkbox', 
                               'label' => __('Status:', 'sage' ), 
                               'default_all' => true,
							   'taxonomy' =>'ppi_status',
							   'term_format' => 'slug',
							   'nested' => 'false',
							   'operator'=>'IN',
							   'term_args' => array('hide_empty' => false, 
                                               'orderby' => 'name', 
                                               'order' => 'ASC') );	
	 } else{
		 $args['fields'][] = array( 'type' => 'taxonomy', 
                               'format' => 'checkbox', 
                               'label' => __('Status:', 'sage' ), 
                               'default_all' => true,
							   'taxonomy' =>'ppi_status',
							   'term_format' => 'slug',
							   'nested' => 'false',
							   'operator'=>'IN',
							   'terms' => array( 
							   	  '240'=>__('Completed', 'sage' ),
							  	  '206'=>__('Ongoing', 'sage' ),
								  '205'=>__('Pipeline', 'sage' )));
		 
	 }
	$args['fields'][] = array( 'type' => 'taxonomy', 
                               'format' => 'checkbox', 
                               'label' => __('Geographic Scope:', 'sage' ), 
                               'default_all' => false,
							   'taxonomy' =>'ppi_geoscope',
							   'term_format' => 'slug',
							   'nested' => 'false',
							   'operator'=>'IN',
							   'term_args' => array('hide_empty' => false, 
                                               'orderby' => 'name', 
                                               'order' => 'ASC') );	
	$args['fields'][] = array( 'type' => 'generic',
								'id'=>'id_ppi_regcountry',  
                               'format' => 'checkbox', 
                               'label' => __('Geographical/Geopolitical Grouping', 'sage' ), 
 							   'values' => array( 
							   "1"=>__("Wider Caribbean Region (Cartagena Convention)", 'sage' ),
							   "2"=>__("Wider Caribbean Region (IOCARIBE)", 'sage' ),
							   "3"=>__("CLME+ region", 'sage' ),
							   "4"=>__("Caribbean LME", 'sage' ),
							   "5"=>__("North Brazil Shelf LME", 'sage' ),
							   "6"=>__("Gulf of Mexico LME", 'sage' ),
							   "7"=>__("(Continental) North America", 'sage' ),
							   "8"=>__("South America", 'sage' ),
							   "9"=>__("Central America", 'sage' ),
							   "10"=>__("Insular Caribbean", 'sage' ),
							   "24"=>__("West Indies", 'sage' ),
							   "11"=>__("Lesser Antilles", 'sage' ),
							   "12"=>__("Greater Antilles", 'sage' ),
							   "13"=>__("ACS", 'sage' ),
							   "14"=>__("CARICOM", 'sage' ),
							   "15"=>__("OECS", 'sage' ),
							   "16"=>__("SICA", 'sage' ),
							   "17"=>__("SIDS", 'sage' ),
							   "18"=>__("ACP countries", 'sage' ),
							   "19"=>__("Caribbean Biological Corridor (CBC)", 'sage' ),
							   "20"=>__("Mesoamerican region", 'sage' ),
							   "21"=>__("Mesoamerican Reef System", 'sage' ),
							   "22"=>__("Overseas Territories", 'sage' ),
							   "23"=>__("GEF eligible countries", 'sage' )));

	
	$args['fields'][] = array( 'type' => 'taxonomy',
 
                               'format' => 'checkbox', 
                               'label' => __('Filter by Participating Country(s):', 'sage' ), 
                               'default_all' => false,
							   'taxonomy' =>'ppi_countries',
							   'term_format' => 'slug',
							   'nested' => 'false',
							   'operator'=>'IN',
							   
							   //'term_args' => array('hide_empty' => true, 
                               //                'orderby' => 'name', 
                               //                'order' => 'ASC') );
			/*$args['fields'][] = array( 'type' => 'generic', 
                               'format' => 'checkbox', 
							   'id'=>'tax_ppi_countries',  
                               'label' => __('Filter by Participating Country(s):', 'sage' ), 
							   'default_all' => true,	*/					   
								'terms' => array( 
							   '66'=>__('Belize', 'sage' ),
								'67'=>__('Brazil', 'sage' ),
								'68'=>__('Colombia', 'sage' ),
								'69'=>__('Costa Rica', 'sage' ),
								'70'=>__('Guatemala', 'sage' ),
								'71'=>__('Guyana', 'sage' ),
								'72'=>__('Honduras', 'sage' ),
								'73'=>__('Panama', 'sage' ),
								'74'=>__('Mexico', 'sage' ),
								'75'=>__('Nicaragua', 'sage' ),
								'76'=>__('Suriname', 'sage' ),
								'77'=>__('Venezuela', 'sage' ),
								'78'=>__('United States of America', 'sage' ),
								'80'=>__('Bahamas', 'sage' ),
								'81'=>__('Barbados', 'sage' ),
								'82'=>__('Cuba', 'sage' ),
								'83'=>__('Dominica', 'sage' ),
								'84'=>__('Dominican Republic', 'sage' ),
								'85'=>__('Grenada', 'sage' ),
								'86'=>__('Haiti', 'sage' ),
								'87'=>__('Jamaica', 'sage' ),
								'89'=>__('Saint Lucia', 'sage' ),
								'92'=>__('Anguilla', 'sage' ),
								'93'=>__('Aruba', 'sage' ),
								'96'=>__('Cayman Islands', 'sage' ),
								'98'=>__('Guadeloupe', 'sage' ),
								'99'=>__('Montserrat', 'sage' ),
								'100'=>__('Martinique', 'sage' ),
								'101'=>__('Puerto Rico', 'sage' ),
								'102'=>__('Bonaire', 'sage' ),
								'107'=>__('Turks and Caicos Islands', 'sage' ),
								'108'=>__('Virgin Islands (U.S.)', 'sage' ),
								'223'=>__('Trinidad and Tobago', 'sage' ),
								'228'=>__('Antigua and Barbuda', 'sage' ),
								'235'=>__('Saint Kitts and Nevis', 'sage' ),
								'271'=>__('Sint Marteen', 'sage' ),
								'272'=>__('Curaçao', 'sage' ),
								'278'=>__('Saint Vincent and the Grenadines', 'sage' ),
								'310'=>__('French Guiana', 'sage' ),
								'311'=>__('Saint Barthélemy', 'sage' ),
								//'312'=>__('Saint Martin', 'sage' ),
								'313'=>__('Virgin Islands (British)', 'sage' ),
								'313'=>__('Sint Eustatius', 'sage' ),
								'315'=>__('Saba', 'sage' ),
								'317'=>__('Bermuda', 'sage' ),
								'318'=>__('El Salvador', 'sage' )));
								//'368'=>__('Saint Eustatius', 'sage' ),
								//'369'=>__('Saint Maarten', 'sage' )));*/						   
											   	
	$args['fields'][] = array( 'type' => 'generic',
								'id'=>'id_ppi_countries',  
                               'format' => 'checkbox', 
                               'label' => '', 
 							   'values' => array( "ALL"=>__("Select/Unselect All Countries", 'sage' )),
							   'default' => "ALL" );							  
											   
	$args['fields'][] = array( 'type' => 'generic',
								'id'=>'ppi_sap',  
                               'format' => 'checkbox', 
                               'label' => __('CLME+ SAP Strategy(s)', 'sage' ), 
 							   'values' => array( 
							  	"1"=>__("1. Marine environment", 'sage' ),
								"2"=>__("2. Sustainable fisheries ", 'sage' ),
								"3"=>__("3. Integrated ocean governance ", 'sage' ),
								"4"=>__("4. Reef sub-ecosystem ", 'sage' ),
								"4A"=>__("4A. Spiny lobster ", 'sage' ),
								"4B"=>__("4B. Queen conch", 'sage' ),
								"5"=>__("5. Pelagic sub-ecosystem ", 'sage' ),
								"5A"=>__("5A. Flyingfish", 'sage' ),
								"5B"=>__("5B. Large pelagics", 'sage' ),
								"6"=>__("6. Continental shelf sub-ecosystem ", 'sage' )));
	
	
	
	$args['fields'][] =array( 'type' => 'meta_key', 'meta_key' => 'sap_strategy_s1_ppi','format' => 'hidden','compare' => 'LIKE','relation' => 'OR');
	$args['fields'][] =array( 'type' => 'meta_key', 'meta_key' => 'sap_strategy_s2_ppi','format' => 'hidden','compare' => 'LIKE','relation' => 'OR');
	$args['fields'][] =array( 'type' => 'meta_key', 'meta_key' => 'sap_strategy_s3_ppi','format' => 'hidden','compare' => 'LIKE','relation' => 'OR');
	$args['fields'][] =array( 'type' => 'meta_key', 'meta_key' => 'sap_strategy_s4_ppi','format' => 'hidden','compare' => 'LIKE','relation' => 'OR');
	$args['fields'][] =array( 'type' => 'meta_key', 'meta_key' => 'sap_strategy_s4a_ppi','format' => 'hidden','compare' => 'LIKE','relation' => 'OR');
	$args['fields'][] =array( 'type' => 'meta_key', 'meta_key' => 'sap_strategy_s4b_ppi','format' => 'hidden','compare' => 'LIKE','relation' => 'OR');
	$args['fields'][] =array( 'type' => 'meta_key', 'meta_key' => 'sap_strategy_s5_ppi','format' => 'hidden','compare' => 'LIKE','relation' => 'OR');
	$args['fields'][] =array( 'type' => 'meta_key', 'meta_key' => 'sap_strategy_s5a_ppi','format' => 'hidden','compare' => 'LIKE','relation' => 'OR');
	$args['fields'][] =array( 'type' => 'meta_key', 'meta_key' => 'sap_strategy_s5b_ppi','format' => 'hidden','compare' => 'LIKE','relation' => 'OR');
	$args['fields'][] =array( 'type' => 'meta_key', 'meta_key' => 'sap_strategy_s6_ppi','format' => 'hidden','compare' => 'LIKE','relation' => 'OR');
	
	
	$args['fields'][] = array( 'type' => 'taxonomy', 
                               'format' => 'checkbox', 
                               'label' => __('Other Regional and Global Commitments:', 'sage' ), 
                               'default_all' => false,
							   'taxonomy' =>'other_comm',
							   'term_format' => 'slug',
							   'nested' => 'false',
							   'operator'=>'IN',
							   'term_args' => array('hide_empty' => false, 
                                               'orderby' => 'name', 
                                               'order' => 'ASC') );	
                                               
    $args['fields'][] = array( 'type' => 'generic',
								'id'=>'tax_regional_issues',  
                               'format' => 'checkbox', 
                               'label' => __('Regional Emerging Issues', 'sage' ), 
 							   'values' => array( 
							  	"1"=>__("Post-COVID 19 Recovery", 'sage' ),
								"2"=>__("Sargassum", 'sage' ),
								"3"=>__("Plastics and Marine Debris", 'sage' )));
								
	$args['fields'][] =array( 'type' => 'meta_key', 'meta_key' => 'post_covid_ppi','format' => 'hidden','compare' => 'LIKE','relation' => 'OR');
	$args['fields'][] =array( 'type' => 'meta_key', 'meta_key' => 'sargassum_ppi','format' => 'hidden','compare' => 'LIKE','relation' => 'OR');
	$args['fields'][] =array( 'type' => 'meta_key', 'meta_key' => 'marine_litter_ppi','format' => 'hidden','compare' => 'LIKE','relation' => 'OR');

    register_wpas_form('ppi_form', $args); 
}
add_action( 'wp_enqueue_scripts', 'search_form_ppi' );
//SEARCH FORMS PARA LOS DOCUMENTOS, USADO EN EL ARCHIVO DE SearchDocument.php
function search_form_doc() {
    $args = array();
	$args['wp_query'] = array('post_type' => 'doculibrary', 'posts_per_page' => 10,'orderby' => 'title','order'=> 'ASC','relation' => 'OR');
	$args['meta_key_relation'] ='OR';
	$args['debug'] =false;

	$args['fields'][] = array( 'type' => 'submit',
								'pre_html' => '<div class="lineasearch">',
                               'class' => 'button',
                               'value' => __( 'SEARCH', 'sage' ));
 		$args['fields'][] = array( 'type' => 'reset',
								'post_html' => '</div>',
                               'class' => 'button',
                               'value' => __( 'RESET', 'sage' ) );
							   
	$args['fields'][] = array( 'type' => 'generic','id'=>'searchtext','format'=>'text',
	'label' =>'<div style="display: inline-block;white-space: nowrap;">'.__(get_field( 'sfor_tooltip_text', 'options' ).'</div>','sage' ), 
	'placeholder' =>  __( 'Enter search terms', 'sage' ) ,
	'relation' => 'OR',
	'pre_html'=>'',
	'post_html'=>'');
	
	$args['fields'][] = array( 'type' => 'generic', 
                               'format' => 'checkbox', 
                               'label' => __( 'Search In The Following Fields:', 'sage' ), 
                              'values' => array('Initiative'=>__('Project/Initiative', 'sage' ), 
							   					'Organizations'=>__('Organizations', 'sage' ) ,
												  'Title'=>__('Title', 'sage' ), 
												  'Abstract'=>__( 'Abstract', 'sage' ), 
												  'Keywords'=>__( 'Keywords', 'sage' ),
												  'Year of publishing'=>'<div class="tooltipform4">'.__( 'Year of publishing', 'sage' ).'<span class="tooltiptext4">Specify either a single year, a list of years separated by commas or a year range to search by year of publication (e.g.: “2017” or “2015, 2017,” or “2015-2019”)</span></div>',
												  'All Fields'=>__( 'All Fields', 'sage' )
								),
								'default'=>'All Fields'); 
								
	
	 $args['fields'][] = array( 'type' => 'orderby', 
                               'format' => 'select', 
                               'label' => __( 'Order Results:', 'sage' ),  
							   'orderby_values' => array(
													'title' => array('label' => 'Title') , 
													'year_s'=> array('label' => 'Date of Publishing', 
																 'meta_key' => true, 
																 'orderby' => 'meta_value'))  );
							   
							  /* array('dl_yearp' => 'Date of Publishing', 
                                                 'date' => ''),	
								'default' => 'date' );*/
												 						  
	 $args['fields'][] = array( 'type' => 'posts_per_page', 
                               'format' => 'select', 
                               'label' => __( 'Per page:', 'sage' ), 
                               'values' => array(2=>2, 5=>5, 10=>10, 20=>20), 
                               'default' => 10 );	
							   
	$args['fields'][] = array( 'type' => 'order', 
                               'format' => 'radio', 
                               'label' => 'Order', 
							   'values' => array('ASC' => __('↑', 'sage' ), 'DESC' => __( '↓', 'sage' )), 
                               'default' => 'ASC');	
							   				   						  
	$args['fields'][] = array( 'type' => 'generic',
								'id'=>'matadata_document',  
                               'format' => 'radio', 
                               'label' => __( 'Type of search:', 'sage' ),  
 							   'values' => array( "Metadata"=>"Local Library","Document"=>"Partner Library"),
							   'default' => "Metadata" );
	
	$args['fields'][] = array( 'type' => 'generic','id'=>'filtertitle3','format'=>'text','label' =>__( 'Filter by document type and category:', 'sage' ));
	
	
	$args['fields'][] = array( 'type' => 'taxonomy', 
                               'format' => 'checkbox', 
                               'label' => __( 'Governance and Management Tools:', 'sage' ),  
                               'default_all' => false,
							   'taxonomy' =>'dl_type_of_document',
							   'term_format' => 'slug',
							   'nested' => 'true',
							   'operator'=>'IN',
							   'term_args' => array('hide_empty' => false, 
                                               'orderby' => 'name', 
                                               'order' => 'ASC') );		
	$args['fields'][] = array( 'type' => 'generic',
								'id'=>'id_type_of',  
                               'format' => 'checkbox', 
                               'label' => '', 
 							   'values' => array( "All"=>__("All", 'sage' ),"Refresh"=>'<div class="tooltipform3">'.__("Refresh", 'sage' ).'<span class="tooltiptext3">Please click on this button to easily apply the filtering options you selected</span></div>'),
							   'default' => "" );
	
	$args['fields'][] = array( 'type' => 'taxonomy', 
                               'format' => 'checkbox', 
                               'label' => __( 'Meetings & Events:', 'sage' ),  
                               'default_all' => false,
							   'taxonomy' =>'dl_type_of_doc_meet',
							   'term_format' => 'slug',
							   'nested' => 'true',
							   'operator'=>'IN',
							   'term_args' => array('hide_empty' => false, 
                                               'orderby' => 'name', 
                                               'order' => 'ASC') );		
	$args['fields'][] = array( 'type' => 'generic',
								'id'=>'id_type_of_2',  
                               'format' => 'checkbox', 
                               'label' => '', 
 							   'values' => array( "All"=>__("All", 'sage' ),"Refresh"=>'<div class="tooltipform3">'.__("Refresh", 'sage' ).'<span class="tooltiptext3">Please click on this button to easily apply the filtering options you selected</span></div>'),
							   'default' => "" );
	
	
	$args['fields'][] = array( 'type' => 'taxonomy', 
                               'format' => 'checkbox', 
                               'label' => __( 'Projects & Initiatives:', 'sage' ),  
                               'default_all' => false,
							   'taxonomy' =>'dl_type_of_doc_projec',
							   'term_format' => 'slug',
							   'nested' => 'true',
							   'operator'=>'IN',
							   'term_args' => array('hide_empty' => false, 
                                               'orderby' => 'name', 
                                               'order' => 'ASC') );		
	$args['fields'][] = array( 'type' => 'generic',
								'id'=>'id_type_of_3',  
                               'format' => 'checkbox', 
                               'label' => '', 
 							   'values' => array( "All"=>__("All", 'sage' ),"Refresh"=>'<div class="tooltipform3">'.__("Refresh", 'sage' ).'<span class="tooltiptext3">Please click on this button to easily apply the filtering options you selected</span></div>'),
							   'default' => "" );
	
	$args['fields'][] = array( 'type' => 'taxonomy', 
                               'format' => 'checkbox', 
                               'label' => __( 'Technical & Scientific Documents:', 'sage' ),  
                               'default_all' => false,
							   'taxonomy' =>'dl_type_of_doc_tech',
							   'term_format' => 'slug',
							   'nested' => 'true',
							   'operator'=>'IN',
							   'term_args' => array('hide_empty' => false, 
                                               'orderby' => 'name', 
                                               'order' => 'ASC') );		
	$args['fields'][] = array( 'type' => 'generic',
								'id'=>'id_type_of_4',  
                               'format' => 'checkbox', 
                               'label' => '', 
 							   'values' => array( "All"=>__("All", 'sage' ),"Refresh"=>'<div class="tooltipform3">'.__("Refresh", 'sage' ).'<span class="tooltiptext3">Please click on this button to easily apply the filtering options you selected</span></div>'),
							   'default' => "" );
	
	$args['fields'][] = array( 'type' => 'taxonomy', 
                               'format' => 'checkbox', 
                               'label' => __( 'News, Awareness Raising & Advocacy:', 'sage' ),  
                               'default_all' => false,
							   'taxonomy' =>'dl_type_of_doc_news',
							   'term_format' => 'slug',
							   'nested' => 'true',
							   'operator'=>'IN',
							   'term_args' => array('hide_empty' => false, 
                                               'orderby' => 'name', 
                                               'order' => 'ASC') );		
	$args['fields'][] = array( 'type' => 'generic',
								'id'=>'id_type_of_5',  
                               'format' => 'checkbox', 
                               'label' => '', 
 							   'values' => array( "All"=>__("All", 'sage' ),"Refresh"=>'<div class="tooltipform3">'.__("Refresh", 'sage' ).'<span class="tooltiptext3">Please click on this button to easily apply the filtering options you selected</span></div>'),
							   'default' => "" );
							   
	$args['fields'][] = array( 'type' => 'taxonomy', 
                               'format' => 'checkbox', 
                               'label' => __( 'Training & Learning Resources:', 'sage' ),  
                               'default_all' => false,
							   'taxonomy' =>'dl_type_of_doc_train',
							   'term_format' => 'slug',
							   'nested' => 'true',
							   'operator'=>'IN',
							   'term_args' => array('hide_empty' => false, 
                                               'orderby' => 'name', 
                                               'order' => 'ASC') );		
	$args['fields'][] = array( 'type' => 'generic',
								'id'=>'id_type_of_6',  
                               'format' => 'checkbox', 
                               'label' => '', 
 							   'values' => array( "All"=>__("All", 'sage' ),"Refresh"=>'<div class="tooltipform3">'.__("Refresh", 'sage' ).'<span class="tooltiptext3">Please click on this button to easily apply the filtering options you selected</span></div>'),
							   'default' => "" );
							   
	
	
	
	$args['fields'][] = array( 'type' => 'generic','id'=>'filtertitle4','format'=>'text','label' =>get_field( 'document_library_search', 'options' ));
	
	$args['fields'][] = array( 'type' => 'generic','id'=>'filtertitle','format'=>'text','label' =>__('Other filters:', 'sage' ));	
	
							  
	$args['fields'][] = array( 'type' => 'generic',
								'id'=>'dl_organization_name', 
                               'format' => 'radio', 
                               'label' => __( 'Libraries:', 'sage' ),   
                               'values' => array( 
							   "more:clme+_pcu"=>"CLME+ PCU","more:CANARI"=>"CANARI","more:CCAD"=>"CCAD","more:CARICOM"=>"CARICOM","more:CERMES"=>"CERMES","more:CRFM"=>"CRFM","more:FAO WECAFC"=>"FAO WECAFC","more:GCFI"=>"GCFI","more:IOCARIBE"=>"IOCARIBE","more:OSPESCA"=>"OSPESCA","more:UN Environment CEP"=>"UN Environment CEP","more:IW:LEARN"=>"IW:LEARN","All The Former"=>"All The Former"),'default' => "All The Former" );
							   
	$args['fields'][] = array( 'type' => 'generic',
								'id'=>'dl_filetype_name', 
                               'format' => 'radio', 
                               'label' =>  __(  'File Type:', 'sage' ), 
                               'values' => array( 
							   "filetype:pdf"=>"PDF","filetype:doc"=>"Word 2003","filetype:docx"=>"Word 2017","filetype:xls"=>"Excel 2003","filetype:xlsx"=>"Excel 2017","filetype:ppt"=>"Powerpoint 2003","filetype:pptx"=>"Powerpoint 2017","All"=>"All"),'default' => "All" );

	
	
	
	/*$args['fields'][] = array( 'type' => 'generic',
								'id'=>'id_product_of',  
                               'format' => 'checkbox', 
                               'label' => '', 
 							   'values' => array( "ALL"=>"ALL"),
							   'default' => "" );*/
	
	
											   
	/*$args['fields'][] = array( 'type' => 'generic',
								'id'=>'id_product_of',  
                               'format' => 'checkbox', 
                               'label' => '', 
 							   'values' => array( "ALL"=>__("ALL", 'sage' )),
							   'default' => "" );	*/				   
										   
											   
											   
											   				   
	$args['fields'][] = array( 'type' => 'taxonomy', 
                               'format' => 'checkbox', 
                               'label' => __( 'Document Format:', 'sage' ), 
                               'default_all' => false,
							   'taxonomy' =>'dl_format',
							   'term_format' => 'slug',
							   'nested' => 'false',
							   'operator'=>'IN',
							   'term_args' => array('hide_empty' => false, 
                                               'orderby' => 'name', 
                                               'order' => 'ASC') );	
											   
	

	$args['fields'][] = array( 'type' => 'generic',
								'id'=>'id_format_of',  
                               'format' => 'checkbox', 
                               'label' => '', 
 							   'values' => array( "All"=>__("All", 'sage' ),"Refresh"=>'<div class="tooltipform3">'.__("Refresh", 'sage' ).'<span class="tooltiptext3">Please click on this button to easily apply the filtering options you selected</span></div>'),
							   'default' => "",
							   'order' => 'DESC');
							   

	
	$args['fields'][] = array( 'type' => 'taxonomy', 
                               'format' => 'checkbox', 
                               'label' => __( 'Document Language:',  'sage' ),  
                               'default_all' => false,
							   'taxonomy' =>'dl_languages',
							   'term_format' => 'slug',
							   'nested' => 'false',
							   'operator'=>'IN',
							   'term_args' => array('hide_empty' => false, 
                                               'orderby' => 'name', 
                                               'order' => 'ASC') );		
	$args['fields'][] = array( 'type' => 'generic',
								'id'=>'id_language_of',  
                               'format' => 'checkbox', 
                               'label' => '', 
 							   'values' => array( "All"=>__("All", 'sage' ),"Refresh"=>'<div class="tooltipform3">'.__("Refresh", 'sage' ).'<span class="tooltiptext3">Please click on this button to easily apply the filtering options you selected</span></div>'),
							   'default' => "" );	
							   
	$args['fields'][] = array( 'type' => 'taxonomy', 
                               'format' => 'checkbox', 
                               'label' => __( 'Theme:',   'sage' ),  
                               'default_all' => false,
							   'taxonomy' =>'dl_tags_theme',
							   'term_format' => 'slug',
							   'nested' => 'false',
							   'operator'=>'IN',
							   'term_args' => array('hide_empty' => false, 
                                               'orderby' => 'name', 
                                               'order' => 'ASC') );		
	$args['fields'][] = array( 'type' => 'generic',
								'id'=>'id_tags_theme',  
                               'format' => 'checkbox', 
                               'label' => '', 
 							   'values' => array( "All"=>__("All", 'sage' ),"Refresh"=>'<div class="tooltipform3">'.__("Refresh", 'sage' ).'<span class="tooltiptext3">Please click on this button to easily apply the filtering options you selected</span></div>'),
							   'default' => "" );	
							   
	$args['fields'][] = array( 'type' => 'taxonomy', 
                               'format' => 'checkbox', 
                               'label' => __( 'Geographic Scope:',    'sage' ),  
                               'default_all' => false,
							   'taxonomy' =>'dl_geoscope',
							   'term_format' => 'slug',
							   'nested' => 'false',
							   'operator'=>'IN',
							   'term_args' => array('hide_empty' => false, 
                                               'orderby' => 'name', 
                                               'order' => 'ASC') );		
	$args['fields'][] = array( 'type' => 'generic',
								'id'=>'id_tags_geoscope',  
                               'format' => 'checkbox', 
                               'label' => '', 
 							   'values' => array( "All"=>__("All", 'sage' ),"Refresh"=>'<div class="tooltipform3">'.__("Refresh", 'sage' ).'<span class="tooltiptext3">Please click on this button to easily apply the filtering options you selected</span></div>'),
							   'default' => "" );
							   
	$args['fields'][] = array( 'type' => 'taxonomy', 
                               'format' => 'checkbox', 
                               'label' => __( 'Countries:',    'sage' ),  
                               'default_all' => false,
							   'taxonomy' =>'dl_countries',
							   'term_format' => 'slug',
							   'nested' => 'false',
							   'operator'=>'IN',
							   'term_args' => array('hide_empty' => false, 
                                               'orderby' => 'name', 
                                               'order' => 'ASC') );		
	$args['fields'][] = array( 'type' => 'generic',
								'id'=>'id_tags_countries',  
                               'format' => 'checkbox', 
                               'label' => '', 
 							   'values' => array( "All"=>__("All", 'sage' ),"Refresh"=>'<div class="tooltipform3">'.__("Refresh", 'sage' ).'<span class="tooltiptext3">Please click on this button to easily apply the filtering options you selected</span></div>'),
							   'default' => "" );
	
											   
	/*$args['fields'][] = array( 'type' => 'taxonomy', 
                               'format' => 'checkbox', 
                               'label' => __( 'Year of Publishing:',     'sage' ),  
                               'default_all' => false,
							   'taxonomy' =>'dl_yearp',
							   'term_format' => 'slug',
							   'nested' => 'false',
							   'operator'=>'IN',
							   'term_args' => array('hide_empty' => false, 
                                               'orderby' => 'name', 
                                               'order' => 'ASC'));	*/
	/*$args['fields'][] = array( 'type' => 'generic',
								'id'=>'id_tags_yearp',  
                               'format' => 'checkbox', 
                               'label' => '', 
 							   'values' => array( "ALL"=>__("ALL", 'sage' )),
							   'default' => "" );*/
  	$args['fields'][] = array( 'type' => 'generic','id'=>'filtertitle2','format'=>'text','label' =>' <img src="https://clmeplus.org/app/uploads/2020/01/star.png" height="18px" width="18px"/>&nbsp;&nbsp;'.__('Featured Projects and Organizations', 'sage' ).' ');
	
	$args['fields'][] = array( 'type' => 'taxonomy', 
                               'format' => 'checkbox', 
                               'label' =>  __( 'P/I', 'sage' ), 
                               'default_all' => false,
							   'taxonomy' =>'intitivate',
							   'term_format' => 'slug',
							   'nested' => 'false',
							   'operator'=>'IN',
							    'term_args' => array('hide_empty' => false, 
                                               'orderby' => 'name', 
                                               'order' => 'ASC') );	

	
	$args['fields'][] = array( 'type' => 'generic',
								'id'=>'id_project_of',  
                               'format' => 'checkbox', 
                               'label' => '', 
 							   'values' => array( "All"=>__("All", 'sage' ),"Refresh"=>'<div class="tooltipform3">'.__("Refresh", 'sage' ).'<span class="tooltiptext3">Please click on this button to easily apply the filtering options you selected</span></div>'),
							   'default' => "" );
							   					   					   
	$args['fields'][] = array( 'type' => 'taxonomy', 
                               'format' => 'checkbox', 
                               'label' => __( 'Organization', 'sage' ),  
                               'default_all' => false,
							   'taxonomy' =>'dl_product_of',
							   'term_format' => 'slug',
							   'nested' => 'false',
							   'operator'=>'IN',
							    'term_args' => array('hide_empty' => false, 
                                               'orderby' => 'name', 
                                               'order' => 'ASC') );	
	
  
	$args['fields'][] = array( 'type' => 'generic',
								'id'=>'id_product_of',  
                               'format' => 'checkbox', 
                               'label' => '', 
 							   'values' => array( "All"=>__("All", 'sage' ),"Refresh"=>'<div class="tooltipform3">'.__("Refresh", 'sage' ).'<span class="tooltiptext3">Please click on this button to easily apply the filtering options you selected</span></div>'),
							   'default' => "" );
							   
	$args['fields'][] = array( 'type' => 'taxonomy',
								'pre_html' => '<div style="display:none;">',
								'post_html'=> '</div>', 			 
                               'format' => 'checkbox', 
                               'label' =>'', 
                               'default_all' => false,
							   'taxonomy' =>'dl_yearp',
							   'term_format' => 'name',
							   'nested' => 'false',
							   'operator'=>'IN' ,'term_args' => array('hide_empty' => false, 
                                               'orderby' => 'name', 
                                               'order' => 'ASC') );
											   
	//$args['fields'][] = array( 'type' => 'search','format'=>'text','label' =>'', 'placeholder' =>'' ,'relation' => 'OR');										   	
	$args['fields'][] =array( 'type' => 'meta_key', 'meta_key' => 'dl_project_name','format' => 'text','compare' => 'LIKE','relation' => 'OR');
	$args['fields'][] =array( 'type' => 'meta_key', 'meta_key' => 'dl_organization_name','format' => 'text','compare' => 'LIKE','relation' => 'OR');
	$args['fields'][] =array( 'type' => 'meta_key', 'meta_key' => 'title_s','format' => 'text','compare' => 'LIKE','relation' => 'OR');
	$args['fields'][] =array( 'type' => 'meta_key', 'meta_key' => 'content_s','format' => 'text','compare' => 'LIKE','relation' => 'OR');
	$args['fields'][] =array( 'type' => 'meta_key', 'meta_key' => 'dl_keywords','format' => 'text','compare' => 'LIKE','relation' => 'OR');
		
				
    register_wpas_form('doc_form', $args); 
}
add_action( 'wp_enqueue_scripts', 'search_form_doc' );
//SEARCH GENERAL DEL HEADER
function search_form_general() {
    $args = array();
	$args['wp_query'] = array('post_type' => array('post','page','doculibrary','ppi_database'),'posts_per_page' => 10,'orderby' => 'title','order'=> 'ASC','relation' => 'OR');
	$args['fields'][] = array( 'type' => 'search','id'=>'search','format'=>'text',
	'label' =>__('','sage' ), 
	'placeholder' =>  __( 'Enter search terms', 'sage' ) ,
	'relation' => 'OR',
	'pre_html'=>'<div class="lineasearch">',
	'post_html'=>'');
	$args['fields'][] = array( 'type' => 'post_type',
								'id'=>'post_type',  
                               'format' => 'select', 
                               'label' => '', 
 							   'values' => array("any"=>__(get_field( 'name_any', 'options' ),'sage' ),
												 "post"=>__(get_field( 'name_post', 'options' ),'sage' ),
												 "page"=>__(get_field( 'name_page', 'options' ),'sage' ),
												 "doculibrary"=>__(get_field( 'name_doc', 'options' ),'sage' ),
												 "ppi_database"=>__(get_field( 'name_ppi', 'options' ),'sage' )
												),
							   'default' => "",
							   'order' => 'DESC');
	$args['fields'][] = array( 'type' => 'submit',
							'post_html' => '</div>',
                               'class' => 'button',
                               'value' => __( 'SEARCH', 'sage' ));
				
    register_wpas_form('search_form_general', $args); 
}	
add_action( 'wp_enqueue_scripts', 'search_form_general' );
// shortcode: display diy popular posts: [pop_docs]
function display_popular_docs() {
	
	?>
	
	<center><h3>FEATURED DOCUMENTS</h3></center>
	<ul>
		<?php 
		$args['wp_query'] = array('post_type' => 'doculibrary', 'posts_per_page' => 10,'orderby' => 'title','order'   => 'ASC');
		$popular = new WP_Query(array('post_type' => 'doculibrary','posts_per_page' => 2,'orderby' => 'date'));
		while ($popular->have_posts()) : $popular->the_post(); ?>
		<li>
		<p>              
                        						<?php
                        $image = get_field('dl_front_image');
						if( !empty($image) ){
							?>
                            <img src="<?php echo $image['url']; ?>" width="50px" height="75px" style="float: right;" />
                            <?php
						}else{
							?>
                            <img src="<?php bloginfo( 'template_url' ); ?>/dist/images/missingdoc.png" width="50px" height="75px" style="float: right;" />
						<?php
						}
						
                        ?>
                        
                        						<h4> <?php the_title(); ?>    </h4>                    
						<?php 
						 $file = get_field('dl_file');
						 if( $file ){
							 $fileurl = $file['url'];
						 }else{
							 $fileurl = get_field('dl_url_file');
						}
						 if($fileurl!=""){ ?>
                         <b><a href="<?php echo $fileurl; ?>" target="_blank">VIEW FILE ></a></b>
                         <?php
							}else{ ?>
							
							<b><a href="#" target="_blank">NO FILE TO VIEW ></a></b>
						<?php	} 	?>
		
                        </p>
                        </li>
		<?php endwhile; wp_reset_postdata(); ?>
	</ul>
	
<?php }
add_shortcode('pop_docs', 'display_popular_docs');
# Finding handle for your plugins 
function display_script_handles() {
    global $wp_scripts;
	if(current_user_can('manage_options') && ! is_admin()){ # Only load when user is admin
	foreach( $wp_scripts->queue as $handle ) :
         $obj = $wp_scripts->registered [$handle];
         echo $filename = $obj->src;
		 echo ' : <b>Handle for this script is:</b> <span style="color:green"> '.$handle.'</span><br/><br/>';
	endforeach;
	}	
}
//add_action( 'wp_print_scripts', 'display_script_handles' );
function getKeywordFrequency( $url ){
        // Get all the html on a page
        $html = file_get_contents( $url );

        // Get an array of all the words
        $allWordsArray = str_word_count( strip_tags($html), 1);
        $totalAllWordsArray = count($allWordsArray);

        // Get the amount of times a word appears on the page
        $wordCount = array_count_values($allWordsArray);
        arsort($wordCount);

        // Get the top 20 words
        $wordCount = array_splice($wordCount, 0, 20);

        // Loop through all the word count array and work out the percentage of a word appearing on the page
        $percentageCount = array();
        foreach($wordCount as $words => $val)
        {
            $percentageCount[$words] = number_format(($val / $totalAllWordsArray) * 100, 2);
        }

        return $percentageCount;
    }
function getSAPstrategy($id,$valuefield,$number){
	$actual_link = (isset($_SERVER['HTTPS']) ? "https" : "http") . "://$_SERVER[HTTP_HOST]";
	$returntext='';
	if($valuefield <> "" ){//color
		$returntext = "<img src='".$actual_link."/app/themes/clme-theme/dist/images/".$id."_ICON_C.fw.png' width='100px' height='100px' class='imageSAP' onclick='changeSAP(\"$id\",1,$number);' ondblclick='changeSAP(\"$id\",0,$number);'  />";
	}else{
		$returntext = "<img src='".$actual_link."/app/themes/clme-theme/dist/images/".$id."_ICON_BN.fw.png' width='100px' height='100px' class='imageSAP' />";
	}
	return $returntext;
}
function getNameSAPstrategy($valuefield){
		$returntext='';
	$Anames = array(
	"1"=>'1. Enhance the regional governance arrangements for the protection of the marine environment',
	"1.1"=>'1.1. Establish and operationalise a formal agreement for coordinated action with Brazil',
	"1.2"=>'1.2. Establish and strengthen regional institutional coordination and cooperation arrangements',
	"1.3"=>'1.3. Evaluate expansion and strengthening of  the mandate of organizations to effectively address issues relating to habitat degradation and pollution in the marine environment',
	"1.4"=>'1.4. Enhance the compliance and enforcement capacity of the regional, sub-regional and national governance arrangements',
	"1.5"=>'1.5. Establish and/or enhance the capacity of the regional,sub-regional and national governance arrangements for the involvement of civil society in the implementation of the EBM/EAF approach (IGOs,NGOs,CBOs,private sector...)',
	"1.6"=>'1.6. Enhance the capacity within and among arrangements to undertake and mainstream lessons learned and findings from monitoring,science and research in regional, sub-regional and national decision-making',
	"1.7"=>'1.7. Establish and/or enhance the capacity within and among arrangements to undertake and mainstream valuation of ecosystem goods and services in regional, sub-regional and national decision-making and policy development',
	"1.8"=>'1.8. Establish and/or increase the capacity of (sub-)regional organizations and countries for integrating the management of terrestrial drainage basins with the  management of the marine recipient basins and coastal development(CLME and NBSLME)',
	"1.9"=>'1.9. Strengthen the capacity of the regional and  sub-regional arrangements to support countries in becoming parties to relevant international and regional  agreements and complying with their global and regional commitments towards the conservation of the marine environment (including the support to update and harmonize national legislation and regulations)',
	"1.10"=>'1.10. Establish  and/or  enhance  the  data  and  information  quality  and  collection  and  management  capacity  of  the  regional, sub-regional and nationalgovernance arrangements for the protection of the marine environment, including through the establishment of public-private partnerships',
	"1.11"=>'1.11. Establish  and/or  enhance  the  capacity  of  the  regional,  sub  –regional  and  national  governance  arrangements for the monitoring, assessment and reporting on the state of the marine environment',
	"2"=>'2. Enhance the regional governance arrangements for sustainable fisheries',
	"2.1"=>'2.1. Establish  an  interim  arrangement  for  sustainable  fisheries  coordinated  by  FAO-WECAFC  and  including  CRFM;  OSPESCA;  and  OECS ',
	"2.2"=>'2.2. Review, and reform WECAFC as needed to clarify and strengthen its mandate and relationships with Regional Fisheries Bodies such as CRFM, OSPESCA and ICCAT',
	"2.3"=>'2.3. Evaluate  the  needs  and  the  options,  agree  on  the  mandate  &  operationalise  a  Regional  Fisheries  Management  Organisation  (RFMO) or alternative arrangement for the management of shared living marine resources (as applicable*)',
	"2.4"=>'2.4. Establish  and/or  enhance  the  capacity  of  the  regional,  sub-regional  and  national  governance  arrangements  for  the  broader  involvement of society in the implementation of the EBM/EAF approach (IGOs, NGOs, CBOs, private sector...)',
	"2.5"=>'2.5. Establish and/or enhance the capacity of the regional, sub-regional and national fisheries institutions to develop and implement harmonized  management  and  conservation  measures,  with  special  focus  on  Illegal,  Unreported  and  Unregulated  Fishing  (IUU)  and Monitoring, Control & Surveillance (MCS)',
	"2.6"=>'2.6. Coordinate the development and implementation of fisheries-specific initiatives for IUU and MCS ',
	"2.7"=>'2.7. Coordinate  the  development and  implementation  of  regional,  sub-regional  and  national  initiatives  for  sustainable  small  scale  fisheries (including capacity building and pilot initiatives)',
	"2.8"=>'2.8. Coordinate  the  development  and  implementation  of  regional,  sub-regional  and  national  initiatives  to  improve  welfare  and  livelihoods through the provision of Decent Work(including through the development of alternative livelihoods, capacity building and pilot initiatives)',
	"2.9"=>'2.9. Coordinate the development and implementation of regional, sub-regional and national initiatives to enhance safety and reduce risk factors (including at sea) for fishers, with particular focus on risk management',
	"2.10"=>'2.10. Establish and/or enhance  the capacity to manage knowledge and to mainstream findings from monitoring, science and research in regional, sub-regional and national decision-making and policy development for sustainable fisheries ',
	"2.11"=>'2.11. Establish and/or enhance the capacity to undertake and mainstream valuation of ecosystem goods and services in regional, sub-regional and national decision-making and policy development for sustainable fisheries',
	"2.12"=>'2.12. Strengthen the capacity of the regional and sub-regional arrangements to support countries in becoming parties to relevant international and regional agreements and complying with their global and regional commitments towards the sustainable use and conservation of the marine environment and associated living resources (including the support to update and harmonize national legislation and regulations)',
	"2.13"=>'2.13. Establish and/or enhance the data and information quality and collection and management capacity of the regional, sub-regional and national fisheries governance arrangements, including through the establishment of public-private partnerships',
	"2.14"=>'2.14. Establish and/or enhance the capacity of the regional, sub-regional and national fisheries governance arrangements for the monitoring, assessment & reporting on the state of fisheries',
	"3"=>'3. Establish and operationalise a regional policy coordination mechanismfor ocean governance, with initial focus on shared Living Marine Resources ',
	"3.1"=>'3.1. Decide   upon   and   establish   an   interim   coordination   mechanism   amongst   the   regional   sub-arrangementsfor sustainable fisheries and for the protection of the marine environment',
	"3.2"=>'3.2. Evaluate all  options  and  propose  a  permanent  policy  coordination  mechanism  with  a  clear  mandate  which  is    financially  sustainable,  geographically  inclusive  and  politically  acceptable  and  which  takes  into  account  the  principle  of  subsidiarity    (this  may  include  the  identification  of  appropriate reforms)',
	"3.3"=>'3.3. Adopt and operationalise the permanent regional policy coordination mechanism for shared Living Marine Resources (sLMR) governance',
	"3.4"=>'3.4. Develop and adopt a regional policy for data and information harmonization and sharing',
	"3.5"=>'3.5. Develop   and   coordinate   integrated   and   sectoral   research   strategies   in   support   of   the   implementation of broader ocean governance in the region, with a short and medium term focus on sLMR management',
	"3.6"=>'3.6. Develop  and  coordinate  integrated  and  sectoral  sustainable  financing  strategies  for  the  cost-effective  implementation  of  broader  ocean  governance  in  the  region,  with  a  short  and  medium  term focus on sLMR governance',
	"3.7"=>'3.7. Facilitate  the  preparation  of  data  and  information  products  and  the  uptake  of  monitoring  and  research outputs by (sub)regional and national science-policy interfaces',
	"4"=>'4. Enhance the governance arrangements for ecosystem-based management for reefs and associated ecosystems ',
	"4.1"=>'4.1. Strengthen  the  formal  cooperation  between  OSPESCA  and  CCAD  for  implementing  the  EBM/EAF  approach',
	"4.2"=>'4.2. Establish  and/or  enhance  the  cooperation  between  environmental,  fisheries  and  other  relevant  agencies within CARICOM for implementing the EBM/EAF approach',
	"4.3"=>'4.3. Establish, strengthen  and harmonize, (sub-)regional and/or fisheries-specific initiatives to combat IUU   fishing   by   combining   compliance   measures   (Monitoring   Control   and   Surveillance   plus   awareness building among consumers & producers) with the provision of alternative livelihoods',
	"4.4"=>'4.4. Coordinate and enhance (sub-)regional and national efforts for the conservation of the biodiversity of  reef  and  associated  habitats,  including  through  the  strengthening  of  networks  of  marine  protected areas (MPAs), and initiatives for sustainable reef fisheries* such as programmes dealing with alien invasive species',
	"4.5"=>'4.5. Develop    and    implement    initiatives    for    sustainable    livelihoods    by    building    capacity    for    diversification,   fostering   and   facilitating   viable   alternative   sources   of   Decent   Work   and/or   improved incomes, and creating addedvalue (e.g. through marketing and sales)',
	"4.6"=>'4.6. Establish  and/or  enhance  the  institutional  structure  and  capacity  of  (sub-)regional  and  national  arrangements for implementing management and conservation measures for reef ecosystems',
	"4.7"=>'4.7. Strengthen the capacity of Regional Fisheries Bodies to engage and build capacity among member States    to    implement    the    EBM/EAF    approach,    through    National    Action    Plans    (NAPs),    data/information   management   and   analysis,   and   operationalisation   of   national   intersectoral coordination and consultation mechanisms that include science-policy interfaces',
	"4.8"=>'4.8. Operationalise  and  strengthen  interlinked  Decision  Support  Systems  (DSSs)  for  the  protection  of  reefs and associated ecosystems and for the sustainable management of associated living marine resources',
	"4A"=>'4A. Enhance the governance arrangementsfor implementing an ecosystem approach for spiny lobster fisheries',
	"4A.1"=>'4A.1. Establish,  strengthen,  and  coordinate arrangements  between  the  FAO-WECAFC,  OSPESCA,  UNEP-SPAW,   and   CRFM   for   harmonizing   the   spiny   lobster   fishery   governance   and   management   throughout the CLME+region',
	"4A.2"=>'4A.2. Evaluate   and   expand,   as   applicable,the   geographic   scope   of   the   governance   arrangement   operated by OSPESCA, taking into consideration both the perspectives of species range (ecosystem approach) and of common markets',
	"4A.3"=>'4A.3. Strengthen  and  achieve  full  implementation  of  policy  cycles  under  the  existing  sub-regional governance  arrangements  for  the  management  of  the  spiny  lobster  fisheries,  including  linkages  with organizations working on the environmental protection of reefs and associated ecosystems ',
	"4A.4"=>'4A.4. Operationalise  and  strengthen  a  DSS  for  the  spiny  lobster  fisheries  (including  linkages  to  the  DSS  for the protection and sustainable management of reefs and associated living marine resources)',
	"4B"=>'4B. Enhance the governance arrangementsfor implementing an ecosystem approach for queen conch fisheries',
	"4B.1"=>'4B.1. Establish, strengthen and coordinate the arrangements for the management and conservationof  queen  conch  between  all  relevant  organizations  such  as CFMC,FAO-WECAFC,  CRFM,  UNEP-SPAW, OSPESCA and CITES',
	"4B.2"=>'4B.2. Develop  and  adopt  a  regional  framework  and  management  and  conservation  plan  for  the  queen  conch with regional-level harmonized regulations (including trade issues)',
	"4B.3"=>'4B.3. Develop,  adopt  and  implement    the  sub-regional  agreements  for  the  management  of  the  queen  conch resource',
	"4B.4"=>'4B.4. Strengthen  and  achieve  full  implementation  of  policy  cycles  under  the  existing  sub-regional governance  arrangements  for  the  management  of queen  conch  fisheries,  including  linkages  with  organizations working on the environmental protection of reefs and associated ecosystems (EAF)',
	"4B.5"=>'4B.5. Operationalise  and  strengthen  a  DSS  for  the  queen  conch  fisheries  (including  linkages to  the  DSS  for the protection and sustainable management of reefs and associated living marine resources)',
	"5"=>'5. Enhance the governance arrangements for implementing an ecosystem approach for pelagic fisheries',
	"5.1"=>'5.1. Establish  linkages  between  the  sub-regional  governance  arrangements  for  the  different  types  of  pelagic fisheries in order to more fully implement the ecosystem approach (e.g.: prey–predator relationships)',
	"5.2"=>'5.2. Establish,  strengthen  and  harmonise(sub-)regionaland/or  fisheries-specificinitiatives  to  combatIUU  by  combining  compliance  measures  (Monitoring  Control  and  Surveillance  plus  awareness building among consumers andproducers) with the provision of alternative livelihoods',
	"5.3"=>'5.3. Develop    and    implement    initiatives    for    sustainablelivelihoods    by    building    capacity    for    diversification, fostering   and   facilitating   viable   alternative   sources   of   Decent   Work   and/or improved incomes, and creating added value ',
	"5.4"=>'5.4. Establish  and/or  enhance  the  capacity  of  regional, sub-regional  and  national  arrangements  for  implementing  management measures',
	"5.5"=>'5.5. Strengthen the capacity of Regional Fisheries Bodies capacity to  cooperate withand build capacity among member  States  to  implement  the  EBM/EAF  approach,  through  National  Action  Plans  (NAPs),  data/information  management  and  analysis  capacity,  and  operationalisation  of  national  intersectoral coordination and consultation mechanisms(incl. science-policy interfaces)',
	"5.6"=>'5.6. Operationalise and further enhance an integrated, sub-regional decision support system (DSS) for the  pelagic  fisheries  (linking  large  pelagics  and  flyingfish  fisheries,  and  with  additional  linkages  to  DSSs for ecosystem/environmental protection, as relevant)',
	"5A"=>'5A. Enhance the governance arrangements for implementing the ecosystem approach for flyingfish fisheries',
	"5A.1"=>'5A.1. Strengthen   the   FAO-WECAFCand CRFM   sub-regional   arrangement   for   the   assessment   and   management  of  the  flyingfish  fisheries  including  the  establishment  of  a  decision-making  capacity  for management',
	"5A.2"=>'5A.2. Establish   and   operationalise   a   formal   agreement   between   the   CRFM   and   France   on   the   management of the flyingfish fisheries',
	"5A.3"=>'5A.3. Operationaliseand  strengthen  an  integrated,  sub-regional  decision  support  system  (DSS)  for  the  flyingfish  fisheries (in coordination with the large pelagics arrangements)',
	"5A.4"=>'5A.4. Strengthen  the  FAO-WECAFC  and  CRFM  capacity  to  develop,  adopt  and  implement  management and conservation measures for the flyingfish fisheries(full policy cycle implementation)',
	"5A.5"=>'5A.5. Implement  the  CRFM/FAO-WECAFCSub-Regional  Management  Plan  for  flyingfish  fisheries  in  the  Eastern Caribbean',
	"5A.6"=>'5A.6. Develop  and  implement  education  and  awareness  building  initiatives  to  improve  understanding  and  enhanced  stakeholder  commitment  and  particpation  in  planning  and  decision-making  in  the  flyingfish fisheries',
	"5B"=>'5B. Enhance the governance arrangementsfor implementing an ecosystem approach for large pelagics fisheries',
	"5B.1"=>'5B.1. Establish key  agreements  and  operationalise  arrangements  among  organizations  with  a  stake  in  large pelagics   fisheries in order to implement EA',
	"5B.2"=>'5B.2. Strengthen  the  capacity  of  the  (sub-)regional  organizations  and  enhance  thefull implementation of thelarge pelagicsfisheries policy cycle',
	"5B.3"=>'5B.3. Strengthen the Region ́s position in the ICCAT decision making process throughenhanced intra-regional coordination and cooperation',
	"5B.4"=>'5B.4. Operationalise  and  strengthen  an  integrated,  sub-regional  decision  support  system  (DSS)  for  the  large pelagic  fisheries (in coordination with the flyingfish arrangements)',
	"6"=>'6. Implement EBM/EAF of the Guianas-Brazil continental shelf with special reference to the shrimp and groundfish fishery',
	"6.1"=>'6.1. Strengthen    theFAO-WECAFC-CRFM  sub-regional  arrangement  for  the  management  of  the  shrimp  and  groundfish fisheries, and establish a decision-making capacity for policy formulation and management',
	"6.2"=>'6.2. Explore  and  establish  a  sub-regional  arrangement  to  address  both  marine  and  land-based  sources  of  pollution  within  the  context  of  the  expanded  framework  for  the  protection  of  the  marine  environment  built under Strategy 1',
	"6.3"=>'6.3. Explore and establish a sub-regional arrangement to address the issue of coastal habitat degradation and destruction within the context of the expanded framework for the protection of the marine environment built under Strategy 1',
	"6.4"=>'6.4. Explore  and  establish  a  sub-regional  arrangement  to  address  the  issue  of  insecurity  for  fishers  (person  and property) e.g. cases of armed robbery and assault',
	"6.5"=>'6.5. Explore and   establish   the   most   appropriate   mechanism   for   integrating   the   four   sub   regional arrangements',
	"6.6"=>'6.6. Operationalise  and  further  enhance  an  interlinked,  sub-regional  decision  support  systems  (DSS)  for  sustainable fisheries and environmental protection in the Guianas-Brazil continental shelf ',
	"6.7"=>'6.7. Establish and/orthe capacity of sub-regional and national arrangements for implementing management and conservation measures',
	"6.8"=>'6.8. Establish  and/or  the  capacity  of  Regional  Fisheries  Bodies  to    cooperate  withand  build  capacity  among member   States   to   implement   the   EBM/EAF   approach,   through   National   Action   Plans   (NAPs), data/information  management  &  analysis  capacity,  and  operationalisation  of  national  intersectoral  coordination and consultation mechanisms(incl. science-policy interfaces)',
	"6.9"=>'6.9. Establish  and/or  strengthen  and  harmonize  (sub-)regional  initiatives  to  combat  IUU  by  combining  compliance  measures  (Monitoring  Control  and  Surveillance  plus  awareness  building  among  consumers  and producers) with the provision of alternative livelihoods',
	"6.10"=>'6.10. Develop  and  implement  initiatives  for  sustainably  enhancing  livelihoods  by  identifying and  building  capacity  for  diversification,  viable  alternative  sources  of  Decent  Work  and/or  improved  incomes,  and  creating added value for current catches ',
	"6.11"=>'6.11. Develop  and  implement  sub-regional  EAF  management  plans  for  shared  fishery  resources  along  the  Guianas-Brazil Shelf');

	//array_key_exists ( mixed $key , array $array )
	$Atemp = explode(",",str_replace ('|' , ',' , $valuefield));
	foreach ($Atemp as &$value) {
		if (array_key_exists ( $value , $Anames )){
			$returntext=$returntext. "<div style='text-align:justify;text-justify: auto;margin-top:-10px;'>".__( $Anames[$value], 'sage' ).'</div><br>';
		}
	}
return $returntext;
}
function getSDG17($id,$valuefield,$number){
	$actual_link = (isset($_SERVER['HTTPS']) ? "https" : "http") . "://$_SERVER[HTTP_HOST]";
	$returntext='';
	if($valuefield <> "" ){//color
		
		if($id=="14"){
		$returntext = "<img src='".$actual_link."/app/themes/clme-theme/dist/images/sdg17/F_SDG_".$id.".fw.png' width='80px' height='80px' class='imageSDG' onclick='changeSDG(\"$id\",1,$number);' ondblclick='changeSDG(\"$id\",0,$number);'  />";
		}else{
		$returntext = "<img src='".$actual_link."/app/themes/clme-theme/dist/images/sdg17/F_SDG_".$id.".fw.png' width='80px' height='80px' class='imageSDG' />";
		
		}
		
		
	}else{
		$returntext = "<img src='".$actual_link."/app/themes/clme-theme/dist/images/sdg17/F_SDG_".$id."_B.fw.png' width='80px' height='80px' class='imageSDG' />";
	}
	return $returntext;
}
function getNameSDG17($valuefield){
		$returntext='';
	$Anames = array(
	"1"=>'1. End poverty in all its forms everywhere',
	"1.1"=>' 1.1 By 2030, eradicate extreme poverty for all people everywhere, currently measured as people living on less than $1.25 a day',
	"1.2"=>'1.2 By 2030, reduce at least by half the proportion of men, women and children of all ages living in poverty in all its dimensions according to national definitions',
"1.3"=>" 1.3 Implement nationally appropriate social protection systems and measures for all, including floors, and by 2030 achieve substantial coverage of the poor and the vulnerable", 
"1.4"=>"1.4 By 2030, ensure that all men and women, in particular the poor and the vulnerable, have equal rights to economic resources, as well as access to basic services, ownership and control over land and other forms of property, inheritance, natural resources, appropriate new technology and financial services, including microfinance", 
"1.5"=>"1.5 By 2030, build the resilience of the poor and those in vulnerable situations and reduce their exposure and vulnerability to climate-related extreme events and other economic, social and environmental shocks and disasters ",
"1.A"=>"1.A Ensure significant mobilization of resources from a variety of sources, including through enhanced development cooperation, in order to provide adequate and predictable means for developing countries, in particular least developed countries, to implement programmes and policies to end poverty in all its dimensions ",
"1.B"=>"1.B Create sound policy frameworks at the national, regional and international levels, based on pro-poor and gender-sensitive development strategies, to support accelerated investment in poverty eradication actions",
"2"=>"2 End hunger, achieve food security and improved nutrition and promote sustainable agriculture",
"2.1"=>"2.1 By 2030, end hunger and ensure access by all people, in particular the poor and people in vulnerable situations, including infants, to safe, nutritious and sufficient food all year round",
"2.2"=>"2.2 By 2030, end all forms of malnutrition, including achieving, by 2025, the internationally agreed targets on stunting and wasting in children under 5 years of age, and address the nutritional needs of adolescent girls, pregnant and lactating women and older persons", 
"2.3"=>"2.3 By 2030, double the agricultural productivity and incomes of small-scale food producers, in particular women, indigenous peoples, family farmers, pastoralists and fishers, including through secure and equal access to land, other productive resources and inputs, knowledge, financial services, markets and opportunities for value addition and non-farm employment", 
"2.4"=>"2.4 By 2030, ensure sustainable food production systems and implement resilient agricultural practices that increase productivity and production, that help maintain ecosystems, that strengthen capacity for adaptation to climate change, extreme weather, drought, flooding and other disasters and that progressively improve land and soil quality", 
"2.5"=>"2.5 By 2020, maintain the genetic diversity of seeds, cultivated plants and farmed and domesticated animals and their related wild species, including through soundly managed and diversified seed and plant banks at the national, regional and international levels, and promote access to and fair and equitable sharing of benefits arising from the utilization of genetic resources and associated traditional knowledge, as internationally agreed", 
"2.A"=>"2.A Increase investment, including through enhanced international cooperation, in rural infrastructure, agricultural research and extension services, technology development and plant and livestock gene banks in order to enhance agricultural productive capacity in developing countries, in particular least developed countries", 
"2.B"=>"2.B Correct and prevent trade restrictions and distortions in world agricultural markets, including through the parallel elimination of all forms of agricultural export subsidies and all export measures with equivalent effect, in accordance with the mandate of the Doha Development Round", 
"2.C"=>"2.C Adopt measures to ensure the proper functioning of food commodity markets and their derivatives and facilitate timely access to market information, including on food reserves, in order to help limit extreme food price volatility ",
"3"=>"3 Ensure healthy lives and promote well-being for all at all ages ",
"3.1"=>"3.1 By 2030, reduce the global maternal mortality ratio to less than 70 per 100,000 live births ",
"3.2"=>"3.2 By 2030, end preventable deaths of newborns and children under 5 years of age, with all countries aiming to reduce neonatal mortality to at least as low as 12 per 1,000 live births and under-5 mortality to at least as low as 25 per 1,000 live births",
"3.3"=>"3.3 By 2030, end the epidemics of AIDS, tuberculosis, malaria and neglected tropical diseases and combat hepatitis, water-borne diseases and other communicable diseases",
"3.4"=>"3.4 By 2030, reduce by one third premature mortality from non-communicable diseases through prevention and treatment and promote mental health and well-being",
"3.5"=>"3.5 Strengthen the prevention and treatment of substance abuse, including narcotic drug abuse and harmful use of alcohol",
"3.6"=>"3.6 By 2020, halve the number of global deaths and injuries from road traffic accidents", 
"3.7"=>"3.7 By 2030, ensure universal access to sexual and reproductive health-care services, including for family planning, information and education, and the integration of reproductive health into national strategies and programmes ",
"3.8"=>"3.8 Achieve universal health coverage, including financial risk protection, access to quality essential health-care services and access to safe, effective, quality and affordable essential medicines and vaccines for all",
"3.9"=>"3.9 By 2030, substantially reduce the number of deaths and illnesses from hazardous chemicals and air, water and soil pollution and contamination", 
"3.a"=>"3.a Strengthen the implementation of the World Health Organization Framework Convention on Tobacco Control in all countries, as appropriate ",
"3.b"=>"3.b Support the research and development of vaccines and medicines for the communicable and non-communicable diseases that primarily affect developing countries, provide access to affordable essential medicines and vaccines, in accordance with the Doha Declaration on the TRIPS Agreement and Public Health, which affirms the right of developing countries to use to the full the provisions in the Agreement on Trade-Related Aspects of Intellectual Property Rights regarding flexibilities to protect public health, and, in particular, provide access to medicines for all ",
"3.c"=>"3.c Substantially increase health financing and the recruitment, development, training and retention of the health workforce in developing countries, especially in least developed countries and small island developing States ",
"3.d"=>"3.d Strengthen the capacity of all countries, in particular developing countries, for early warning, risk reduction and management of national and global health risks ",
"4"=>"4 Ensure inclusive and equitable quality education and promote lifelong learning opportunities for all 	",
"4.1"=>"4.1 By 2030, ensure that all girls and boys complete free, equitable and quality primary and secondary education leading to relevant and effective learning outcomes ",
"4.2"=>"4.2 By 2030, ensure that all girls and boys have access to quality early childhood development, care and pre-primary education so that they are ready for primary education ",
"4.3"=>"4.3 By 2030, ensure equal access for all women and men to affordable and quality technical, vocational and tertiary education, including university ",
"4.4"=>"4.4 By 2030, substantially increase the number of youth and adults who have relevant skills, including technical and vocational skills, for employment, decent jobs and entrepreneurship ",
"4.5"=>"4.5 By 2030, eliminate gender disparities in education and ensure equal access to all levels of education and vocational training for the vulnerable, including persons with disabilities, indigenous peoples and children in vulnerable situations ",
"4.6"=>"4.6 By 2030, ensure that all youth and a substantial proportion of adults, both men and women, achieve literacy and numeracy ",
"4.7"=>"4.7 By 2030, ensure that all learners acquire the knowledge and skills needed to promote sustainable development, including, among others, through education for sustainable development and sustainable lifestyles, human rights, gender equality, promotion of a culture of peace and non-violence, global citizenship and appreciation of cultural diversity and of culture’s contribution to sustainable development ",
"4.a"=>"4.a Build and upgrade education facilities that are child, disability and gender sensitive and provide safe, non-violent, inclusive and effective learning environments for all", 
"4.b"=>"4.b By 2020, substantially expand globally the number of scholarships available to developing countries, in particular least developed countries, small island developing States and African countries, for enrolment in higher education, including vocational training and information and communications technology, technical, engineering and scientific programmes, in developed countries and other developing countries ",
"4.c"=>"4.c By 2030, substantially increase the supply of qualified teachers, including through international cooperation for teacher training in developing countries, especially least developed countries and small island developing States ",
"5"=>"5 Achieve gender equality and empower all women and girls ",
"5.1"=>"5.1 End all forms of discrimination against all women and girls everywhere ",
"5.2"=>"5.2 Eliminate all forms of violence against all women and girls in the public and private spheres, including trafficking and sexual and other types of exploitation ",
"5.3"=>"5.3 Eliminate all harmful practices, such as child, early and forced marriage and female genital mutilation ",
"5.4"=>"5.4 Recognize and value unpaid care and domestic work through the provision of public services, infrastructure and social protection policies and the promotion of shared responsibility within the household and the family as nationally appropriate ",
"5.5"=>"5.5 Ensure women’s full and effective participation and equal opportunities for leadership at all levels of decision-making in political, economic and public life ",
"5.6"=>"5.6 Ensure universal access to sexual and reproductive health and reproductive rights as agreed in accordance with the Programme of Action of the International Conference on Population and Development and the Beijing Platform for Action and the outcome documents of their review conferences ",
"5.a"=>"5.a Undertake reforms to give women equal rights to economic resources, as well as access to ownership and control over land and other forms of property, financial services, inheritance and natural resources, in accordance with national laws ",
"5.b"=>"5.b Enhance the use of enabling technology, in particular information and communications technology, to promote the empowerment of women ",
"5.c"=>"5.c Adopt and strengthen sound policies and enforceable legislation for the promotion of gender equality and the empowerment of all women and girls at all levels ",
"6"=>"6 Ensure availability and sustainable management of water and sanitation for all",
"6.1"=>"6.1 By 2030, achieve universal and equitable access to safe and affordable drinking water for all ",
"6.2"=>"6.2 By 2030, achieve access to adequate and equitable sanitation and hygiene for all and end open defecation, paying special attention to the needs of women and girls and those in vulnerable situations ",
"6.3"=>"6.3 By 2030, improve water quality by reducing pollution, eliminating dumping and minimizing release of hazardous chemicals and materials, halving the proportion of untreated wastewater and substantially increasing recycling and safe reuse globally ",
"6.4"=>"6.4 By 2030, substantially increase water-use efficiency across all sectors and ensure sustainable withdrawals and supply of freshwater to address water scarcity and substantially reduce the number of people suffering from water scarcity ",
"6.5"=>"6.5 By 2030, implement integrated water resources management at all levels, including through transboundary cooperation as appropriate ",
"6.6"=>"6.6 By 2020, protect and restore water-related ecosystems, including mountains, forests, wetlands, rivers, aquifers and lakes ",
"6.a"=>"6.a By 2030, expand international cooperation and capacity-building support to developing countries in water- and sanitation-related activities and programmes, including water harvesting, desalination, water efficiency, wastewater treatment, recycling and reuse technologies ",
"6.b"=>"6.b Support and strengthen the participation of local communities in improving water and sanitation management ",
"7"=>"7 Ensure access to affordable, reliable, sustainable and modern energy for all ",
"7.1"=>"7.1 By 2030, ensure universal access to affordable, reliable and modern energy services ",
"7.2"=>"7.2 By 2030, increase substantially the share of renewable energy in the global energy mix ",
"7.3"=>"7.3 By 2030, double the global rate of improvement in energy efficiency ",
"7.a"=>"7.a By 2030, enhance international cooperation to facilitate access to clean energy research and technology, including renewable energy, energy efficiency and advanced and cleaner fossil-fuel technology, and promote investment in energy infrastructure and clean energy technology ",
"7.b"=>"7.b By 2030, expand infrastructure and upgrade technology for supplying modern and sustainable energy services for all in developing countries, in particular least developed countries, small island developing States, and land-locked developing countries, in accordance with their respective programmes of support ",
"8"=>"8 Promote sustained, inclusive and sustainable economic growth, full and productive employment and decent work for all",
"8.1"=>"8.1 Sustain per capita economic growth in accordance with national circumstances and, in particular, at least 7 per cent gross domestic product growth per annum in the least developed countries ",
"8.2"=>"8.2 Achieve higher levels of economic productivity through diversification, technological upgrading and innovation, including through a focus on high-value added and labour-intensive sector", 
"8.3"=>"8.3 Promote development-oriented policies that support productive activities, decent job creation, entrepreneurship, creativity and innovation, and encourage the formalization and growth of micro-, small- and medium-sized enterprises, including through access to financial services ",
"8.4"=>"8.4 Improve progressively, through 2030, global resource efficiency in consumption and production and endeavour to decouple economic growth from environmental degradation, in accordance with the 10-year framework of programmes on sustainable consumption and production, with developed countries taking the lead ",
"8.5"=>"8.5 By 2030, achieve full and productive employment and decent work for all women and men, including for young people and persons with disabilities, and equal pay for work of equal value ",
"8.6"=>"8.6 By 2020, substantially reduce the proportion of youth not in employment, education or training ",
"8.7"=>"8.7 Take immediate and effective measures to eradicate forced labour, end modern slavery and human trafficking and secure the prohibition and elimination of the worst forms of child labour, including recruitment and use of child soldiers, and by 2025 end child labour in all its forms ",
"8.8"=>"8.8 Protect labour rights and promote safe and secure working environments for all workers, including migrant workers, in particular women migrants, and those in precarious employment ",
"8.9"=>"8.9 By 2030, devise and implement policies to promote sustainable tourism that creates jobs and promotes local culture and products ",
"8.10"=>"8.10 Strengthen the capacity of domestic financial institutions to encourage and expand access to banking, insurance and financial services for all ",
"8.a"=>"8.a Increase Aid for Trade support for developing countries, in particular least developed countries, including through the Enhanced Integrated Framework for Trade-Related Technical Assistance to Least Developed Countries ",
"8.b"=>"8.b By 2020, develop and operationalize a global strategy for youth employment and implement the Global Jobs Pact of the International Labour Organization ",
"9"=>"9 Build resilient infrastructure, promote inclusive and sustainable industrialization and foster innovation ",
"9.1"=>"9.1 Develop quality, reliable, sustainable and resilient infrastructure, including regional and transborder infrastructure, to support economic development and human well-being, with a focus on affordable and equitable access for all ",
"9.2"=>"9.2 Promote inclusive and sustainable industrialization and, by 2030, significantly raise industry’s share of employment and gross domestic product, in line with national circumstances, and double its share in least developed countries ",
"9.3"=>"9.3 Increase the access of small-scale industrial and other enterprises, in particular in developing countries, to financial services, including affordable credit, and their integration into value chains and markets ",
"9.4"=>"9.4 By 2030, upgrade infrastructure and retrofit industries to make them sustainable, with increased resource-use efficiency and greater adoption of clean and environmentally sound technologies and industrial processes, with all countries taking action in accordance with their respective capabilities ",
"9.5"=>"9.5 Enhance scientific research, upgrade the technological capabilities of industrial sectors in all countries, in particular developing countries, including, by 2030, encouraging innovation and substantially increasing the number of research and development workers per 1 million people and public and private research and development spending ",
"9.a"=>"9.a Facilitate sustainable and resilient infrastructure development in developing countries through enhanced financial, technological and technical support to African countries, least developed countries, landlocked developing countries and small island developing States ",
"9.b"=>"9.b Support domestic technology development, research and innovation in developing countries, including by ensuring a conducive policy environment for, inter alia, industrial diversification and value addition to commodities ",
"9.c"=>"9.c Significantly increase access to information and communications technology and strive to provide universal and affordable access to the Internet in least developed countries by 2020 ",
"10"=>"10 Reduce inequality within and among countries ",
"10.1"=>"10.1 By 2030, progressively achieve and sustain income growth of the bottom 40 per cent of the population at a rate higher than the national average ",
"10.2"=>"10.2 By 2030, empower and promote the social, economic and political inclusion of all, irrespective of age, sex, disability, race, ethnicity, origin, religion or economic or other status", 
"10.3"=>"10.3 Ensure equal opportunity and reduce inequalities of outcome, including by eliminating discriminatory laws, policies and practices and promoting appropriate legislation, policies and action in this regard ",
"10.4"=>"10.4 Adopt policies, especially fiscal, wage and social protection policies, and progressively achieve greater equality ",
"10.5"=>"10.5 Improve the regulation and monitoring of global financial markets and institutions and strengthen the implementation of such regulations ",
"10.6"=>"10.6 Ensure enhanced representation and voice for developing countries in decision-making in global international economic and financial institutions in order to deliver more effective, credible, accountable and legitimate institutions ",
"10.7"=>"10.7 Facilitate orderly, safe, regular and responsible migration and mobility of people, including through the implementation of planned and well-managed migration policies",
"10.a"=>"10.a Implement the principle of special and differential treatment for developing countries, in particular least developed countries, in accordance with World Trade Organization agreements ",
"10.b"=>"10.b Encourage official development assistance and financial flows, including foreign direct investment, to States where the need is greatest, in particular least developed countries, African countries, small island developing States and landlocked developing countries, in accordance with their national plans and programmes ",
"10.c"=>"10.c By 2030, reduce to less than 3 per cent the transaction costs of migrant remittances and eliminate remittance corridors with costs higher than 5 per cent ",
"11"=>"11 Make cities and human settlements inclusive, safe, resilient and sustainable",
"11.1"=>"11.1 By 2030, ensure access for all to adequate, safe and affordable housing and basic services and upgrade slums ",
"11.2"=>"11.2 By 2030, provide access to safe, affordable, accessible and sustainable transport systems for all, improving road safety, notably by expanding public transport, with special attention to the needs of those in vulnerable situations, women, children, persons with disabilities and older persons ",
"11.3"=>"11.3 By 2030, enhance inclusive and sustainable urbanization and capacity for participatory, integrated and sustainable human settlement planning and management in all countries ",
"11.4"=>"11.4 Strengthen efforts to protect and safeguard the world’s cultural and natural heritage ",
"11.5"=>"11.5 By 2030, significantly reduce the number of deaths and the number of people affected and substantially decrease the direct economic losses relative to global gross domestic product caused by disasters, including water-related disasters, with a focus on protecting the poor and people in vulnerable situations ",
"11.6"=>"11.6 By 2030, reduce the adverse per capita environmental impact of cities, including by paying special attention to air quality and municipal and other waste management ",
"11.7"=>"11.7 By 2030, provide universal access to safe, inclusive and accessible, green and public spaces, in particular for women and children, older persons and persons with disabilities ",
"11.a"=>"11.a Support positive economic, social and environmental links between urban, per-urban and rural areas by strengthening national and regional development planning ",
"11.b"=>"11.b By 2020, substantially increase the number of cities and human settlements adopting and implementing integrated policies and plans towards inclusion, resource efficiency, mitigation and adaptation to climate change, resilience to disasters, and develop and implement, in line with the Sendai Framework for Disaster Risk Reduction 2015-2030, holistic disaster risk management at all levels ",
"11.c"=>"11.c Support least developed countries, including through financial and technical assistance, in building sustainable and resilient buildings utilizing local materials ",
"12"=>"12 Ensure sustainable consumption and production patterns",
"12.1"=>"12.1 Implement the 10-year framework of programmes on sustainable consumption and production, all countries taking action, with developed countries taking the lead, taking into account the development and capabilities of developing countries ",
"12.2"=>"12.2 By 2030, achieve the sustainable management and efficient use of natural resources ",
"12.3"=>"12.3 By 2030, halve per capita global food waste at the retail and consumer levels and reduce food losses along production and supply chains, including post-harvest losses ",
"12.4"=>"12.4 By 2020, achieve the environmentally sound management of chemicals and all wastes throughout their life cycle, in accordance with agreed international frameworks, and significantly reduce their release to air, water and soil in order to minimize their adverse impacts on human health and the environment ",
"12.5"=>"12.5 By 2030, substantially reduce waste generation through prevention, reduction, recycling and reuse ",
"12.6"=>"12.6 Encourage companies, especially large and transnational companies, to adopt sustainable practices and to integrate sustainability information into their reporting cycle ",
"12.7"=>"12.7 Promote public procurement practices that are sustainable, in accordance with national policies and priorities ",
"12.8"=>"12.8 By 2030, ensure that people everywhere have the relevant information and awareness for sustainable development and lifestyles in harmony with nature ",
"12.a"=>"12.a Support developing countries to strengthen their scientific and technological capacity to move towards more sustainable patterns of consumption and production ",
"12.b"=>"12.b Develop and implement tools to monitor sustainable development impacts for sustainable tourism that creates jobs and promotes local culture and products ",
"12.c"=>"12.c Rationalize inefficient fossil-fuel subsidies that encourage wasteful consumption by removing market distortions, in accordance with national circumstances, including by restructuring taxation and phasing out those harmful subsidies, where they exist, to reflect their environmental impacts, taking fully into account the specific needs and conditions of developing countries and minimizing the possible adverse impacts on their development in a manner that protects the poor and the affected communities ",
"13"=>"13 Take urgent action to combat climate change and its impacts",
"13.1"=>"13.1 Strengthen resilience and adaptive capacity to climate-related hazards and natural disasters in all countries ",
"13.2"=>"13.2 Integrate climate change measures into national policies, strategies and planning ",
"13.3"=>"13.3 Improve education, awareness-raising and human and institutional capacity on climate change mitigation, adaptation, impact reduction and early warning ",
"13.a"=>"13.a Implement the commitment undertaken by developed-country parties to the United Nations Framework Convention on Climate Change to a goal of mobilizing jointly $100 billion annually by 2020 from all sources to address the needs of developing countries in the context of meaningful mitigation actions and transparency on implementation and fully operationalize the Green Climate Fund through its capitalization as soon as possible ",
"13.b"=>"13.b Promote mechanisms for raising capacity for effective climate change-related planning and management in least developed countries and small island developing States, including focusing on women, youth and local and marginalized communities ",
"14"=>"14 Conserve and sustainably use the oceans, seas and marine resources for sustainable development",
"14.1"=>"14.1 By 2025, prevent and significantly reduce marine pollution of all kinds, in particular from land-based activities, including marine debris and nutrient pollution ",
"14.2"=>"14.2 By 2020, sustainably manage and protect marine and coastal ecosystems to avoid significant adverse impacts, including by strengthening their resilience, and take action for their restoration in order to achieve healthy and productive oceans ",
"14.3"=>"14.3 Minimize and address the impacts of ocean acidification, including through enhanced scientific cooperation at all levels ",
"14.4"=>"14.4 By 2020, effectively regulate harvesting and end overfishing, illegal, unreported and unregulated fishing and destructive fishing practices and implement science-based management plans, in order to restore fish stocks in the shortest time feasible, at least to levels that can produce maximum sustainable yield as determined by their biological characteristics ",
"14.5"=>"14.5 By 2020, conserve at least 10 per cent of coastal and marine areas, consistent with national and international law and based on the best available scientific information", 
"14.6"=>"14.6 By 2020, prohibit certain forms of fisheries subsidies which contribute to overcapacity and overfishing, eliminate subsidies that contribute to illegal, unreported and unregulated fishing and refrain from introducing new such subsidies, recognizing that appropriate and effective special and differential treatment for developing and least developed countries should be an integral part of the World Trade Organization fisheries subsidies negotiation ",
"14.7"=>"14.7 By 2030, increase the economic benefits to Small Island developing States and least developed countries from the sustainable use of marine resources, including through sustainable management of fisheries, aquaculture and tourism ",
"14.a"=>"14.a Increase scientific knowledge, develop research capacity and transfer marine technology, taking into account the Intergovernmental Oceanographic Commission Criteria and Guidelines on the Transfer of Marine Technology, in order to improve ocean health and to enhance the contribution of marine biodiversity to the development of developing countries, in particular small island developing States and least developed countries ",
"14.b"=>"14.b Provide access for small-scale artisanal fishers to marine resources and markets ",
"14.c"=>"14.c Enhance the conservation and sustainable use of oceans and their resources by implementing international law as reflected in UNCLOS, which provides the legal framework for the conservation and sustainable use of oceans and their resources, as recalled in paragraph 158 of The Future We Want ",
"15"=>"15 Protect, restore and promote sustainable use of terrestrial ecosystems, sustainably manage forests, combat desertification, and halt and reverse land degradation and halt biodiversity loss ",
"15.1"=>"15.1 By 2020, ensure the conservation, restoration and sustainable use of terrestrial and inland freshwater ecosystems and their services, in particular forests, wetlands, mountains and drylands, in line with obligations under international agreements ",
"15.2"=>"15.2 By 2020, promote the implementation of sustainable management of all types of forests, halt deforestation, restore degraded forests and substantially increase afforestation and reforestation globally ",
"15.3"=>"15.3 By 2030, combat desertification, restore degraded land and soil, including land affected by desertification, drought and floods, and strive to achieve a land degradation-neutral world ",
"15.4"=>"15.4 By 2030, ensure the conservation of mountain ecosystems, including their biodiversity, in order to enhance their capacity to provide benefits that are essential for sustainable development ",
"15.5"=>"15.5 Take urgent and significant action to reduce the degradation of natural habitats, halt the loss of biodiversity and, by 2020, protect and prevent the extinction of threatened species ",
"15.6"=>"15.6 Promote fair and equitable sharing of the benefits arising from the utilization of genetic resources and promote appropriate access to such resources, as internationally agreed ",
"15.7"=>"15.7 Take urgent action to end poaching and trafficking of protected species of flora and fauna and address both demand and supply of illegal wildlife products ",
"15.8"=>"15.8 By 2020, introduce measures to prevent the introduction and significantly reduce the impact of invasive alien species on land and water ecosystems and control or eradicate the priority species ",
"15.9"=>"15.9 By 2020, integrate ecosystem and biodiversity values into national and local planning, development processes, poverty reduction strategies and accounts ",
"15.a"=>"15.a Mobilize and significantly increase financial resources from all sources to conserve and sustainably use biodiversity and ecosystems ",
"15.b"=>"15.b Mobilize significant resources from all sources and at all levels to finance sustainable forest management and provide adequate incentives to developing countries to advance such management, including for conservation and reforestation ",
"15.c"=>"15.c Enhance global support for efforts to combat poaching and trafficking of protected species, including by increasing the capacity of local communities to pursue sustainable livelihood opportunities ",
"16"=>"16 Promote peaceful and inclusive societies for sustainable development, provide access to justice for all and build effective, accountable and inclusive institutions at all levels ",
"16.1"=>"16.1 Significantly reduce all forms of violence and related death rates everywhere ",
"16.2"=>"16.2 End abuse, exploitation, trafficking and all forms of violence against and torture of children ",
"16.3"=>"16.3 Promote the rule of law at the national and international levels and ensure equal access to justice for all ",
"16.4"=>"16.4 By 2030, significantly reduce illicit financial and arms flows, strengthen the recovery and return of stolen assets and combat all forms of organized crime ",
"16.5"=>"16.5 Substantially reduce corruption and bribery in all their forms ",
"16.6"=>"16.6 Develop effective, accountable and transparent institutions at all levels ",
"16.7"=>"16.7 Ensure responsive, inclusive, participatory and representative decision-making at all levels ",
"16.8"=>"16.8 Broaden and strengthen the participation of developing countries in the institutions of global governance ",
"16.9"=>"16.9 By 2030, provide legal identity for all, including birth registration ",
"16.10"=>"16.10 Ensure public access to information and protect fundamental freedoms, in accordance with national legislation and international agreements ",
"16.a"=>"16.a Strengthen relevant national institutions, including through international cooperation, for building capacity at all levels, in particular in developing countries, to prevent violence and combat terrorism and crime ",
"16.b"=>"16.b Promote and enforce non-discriminatory laws and policies for sustainable development ",
"17"=>"17 Strengthen the means of implementation and revitalize the global partnership for sustainable development ",
"17.1"=>"17.1 Strengthen domestic resource mobilization, including through international support to developing countries, to improve domestic capacity for tax and other revenue collection ",
"17.2"=>"17.2 Developed countries to implement fully their official development assistance commitments, including the commitment by many developed countries to achieve the target of 0.7 per cent of ODA/GNI to developing countries and 0.15 to 0.20 per cent of ODA/GNI to least developed countries; ODA providers are encouraged to consider setting a target to provide at least 0.20 per cent of ODA/GNI to least developed countries ",
"17.3"=>"17.3 Mobilize additional financial resources for developing countries from multiple sources ",
"17.4"=>"17.4 Assist developing countries in attaining long-term debt sustainability through coordinated policies aimed at fostering debt financing, debt relief and debt restructuring, as appropriate, and address the external debt of highly indebted poor countries to reduce debt distress ",
"17.5"=>"17.5 Adopt and implement investment promotion regimes for least developed countries ",
"17.6"=>"17.6 Enhance North-South, South-South and triangular regional and international cooperation on and access to science, technology and innovation and enhance knowledge sharing on mutually agreed terms, including through improved coordination among existing mechanisms, in particular at the United Nations level, and through a global technology facilitation mechanism",
"17.7"=>"17.7 Promote the development, transfer, dissemination and diffusion of environmentally sound technologies to developing countries on favourable terms, including on concessional and preferential terms, as mutually agreed ",
"17.8"=>"17.8 Fully operationalize the technology bank and science, technology and innovation capacity-building mechanism for least developed countries by 2017 and enhance the use of enabling technology, in particular information and communications technology ",
"17.9"=>"17.9 Enhance international support for implementing effective and targeted capacity-building in developing countries to support national plans to implement all the sustainable development goals, including through North-South, South-South and triangular cooperation ",
"17.10"=>"17.10 Promote a universal, rules-based, open, non-discriminatory and equitable multilateral trading system under the World Trade Organization, including through the conclusion of negotiations under its Doha Development Agenda ",
"17.11"=>"17.11 Significantly increase the exports of developing countries, in particular with a view to doubling the least developed countries’ share of global exports by 2020 ",
"17.12"=>"17.12 Realize timely implementation of duty-free and quota-free market access on a lasting basis for all least developed countries, consistent with World Trade Organization decisions, including by ensuring that preferential rules of origin applicable to imports from least developed countries are transparent and simple, and contribute to facilitating market access ",
"17.13"=>"17.13 Enhance global macroeconomic stability, including through policy coordination and policy coherence ",
"17.14"=>"17.14 Enhance policy coherence for sustainable development ",
"17.15"=>"17.15 Respect each country’s policy space and leadership to establish and implement policies for poverty eradication and sustainable development ",
"17.16"=>"17.16 Enhance the global partnership for sustainable development, complemented by multi-stakeholder partnerships that mobilize and share knowledge, expertise, technology and financial resources, to support the achievement of the sustainable development goals in all countries, in particular developing countries ",
"17.17"=>"Encourage and promote effective public, public-private and civil society partnerships, building on the experience and resourcing strategies of partnerships",
"17.18"=>"17.18 By 2020, enhance capacity-building support to developing countries, including for least developed countries and small island developing States, to increase significantly the availability of high-quality, timely and reliable data disaggregated by income, gender, age, race, ethnicity, migratory status, disability, geographic location and other characteristics relevant in national contexts ",
"17.19"=>"17.19 By 2030, build on existing initiatives to develop measurements of progress on sustainable development that complement gross domestic product, and support statistical capacity-building in developing countries ");

	//array_key_exists ( mixed $key , array $array )
	$Atemp = explode(",",str_replace ('|' , ',' , $valuefield));
	foreach ($Atemp as &$value) {
		if (array_key_exists ( $value , $Anames )){
			$returntext=$returntext. "<div style='text-align:justify;text-justify: auto;margin-top:-10px;'>".__( $Anames[$value], 'sage' ).'</div><br>';
		}
	}
return $returntext;
}
function CountryCodetoName($code){
	$isoCountries =  array(
    'AF' => 'Afghanistan',
    'AX' => 'Aland Islands',
    'AL' => 'Albania',
    'DZ' => 'Algeria',
    'AS' => 'American Samoa',
    'AD' => 'Andorra',
    'AO' => 'Angola',
    'AI' => 'Anguilla',
    'AQ' => 'Antarctica',
    'AG' => 'Antigua and Barbuda',
    'AR' => 'Argentina',
    'AM' => 'Armenia',
    'AW' => 'Aruba',
    'AU' => 'Australia',
    'AT' => 'Austria',
    'AZ' => 'Azerbaijan',
    'BS' => 'Bahamas',
    'BH' => 'Bahrain',
    'BD' => 'Bangladesh',
    'BB' => 'Barbados',
    'BY' => 'Belarus',
    'BE' => 'Belgium',
    'BZ' => 'Belize',
    'BJ' => 'Benin',
    'BM' => 'Bermuda',
    'BT' => 'Bhutan',
    'BO' => 'Bolivia',
	'BQ-BO'=>'Bonaire',
    'BA' => 'Bosnia And Herzegovina',
    'BW' => 'Botswana',
    'BV' => 'Bouvet Island',
    'BR' => 'Brazil',
    'IO' => 'British Indian Ocean Territory',
    'BN' => 'Brunei Darussalam',
    'BG' => 'Bulgaria',
    'BF' => 'Burkina Faso',
    'BI' => 'Burundi',
    'KH' => 'Cambodia',
    'CM' => 'Cameroon',
    'CA' => 'Canada',
    'CV' => 'Cape Verde',
    'KY' => 'Cayman Islands',
    'CF' => 'Central African Republic',
    'TD' => 'Chad',
    'CL' => 'Chile',
    'CN' => 'China',
    'CX' => 'Christmas Island',
    'CC' => 'Cocos (Keeling) Islands',
    'CO' => 'Colombia',
    'KM' => 'Comoros',
    'CG' => 'Congo',
    'CD' => 'Congo, Democratic Republic',
    'CK' => 'Cook Islands',
    'CR' => 'Costa Rica',
    'CI' => 'Cote D\'Ivoire',
    'HR' => 'Croatia',
    'CU' => 'Cuba',
	'CW' =>'Curaçao',
	'CW' =>'Curazao',
    'CY' => 'Cyprus',
    'CZ' => 'Czech Republic',
    'DK' => 'Denmark',
    'DJ' => 'Djibouti',
    'DM' => 'Dominica',
    'DO' => 'Dominican Republic',
    'EC' => 'Ecuador',
    'EG' => 'Egypt',
    'SV' => 'El Salvador',
    'GQ' => 'Equatorial Guinea',
    'ER' => 'Eritrea',
    'EE' => 'Estonia',
    'ET' => 'Ethiopia',
    'FK' => 'Falkland Islands (Malvinas)',
    'FO' => 'Faroe Islands',
    'FJ' => 'Fiji',
    'FI' => 'Finland',
    'FR' => 'France',
    'GF' => 'French Guiana',
    'PF' => 'French Polynesia',
    'TF' => 'French Southern Territories',
    'GA' => 'Gabon',
    'GM' => 'Gambia',
    'GE' => 'Georgia',
    'DE' => 'Germany',
    'GH' => 'Ghana',
    'GI' => 'Gibraltar',
    'GR' => 'Greece',
    'GL' => 'Greenland',
    'GD' => 'Grenada',
    'GP' => 'Guadeloupe',
    'GU' => 'Guam',
    'GT' => 'Guatemala',
    'GG' => 'Guernsey',
    'GN' => 'Guinea',
    'GW' => 'Guinea-Bissau',
    'GY' => 'Guyana',
    'HT' => 'Haiti',
    'HM' => 'Heard Island & Mcdonald Islands',
    'VA' => 'Holy See (Vatican City State)',
    'HN' => 'Honduras',
    'HK' => 'Hong Kong',
    'HU' => 'Hungary',
    'IS' => 'Iceland',
    'IN' => 'India',
    'ID' => 'Indonesia',
    'IR' => 'Iran, Islamic Republic Of',
    'IQ' => 'Iraq',
    'IE' => 'Ireland',
    'IM' => 'Isle Of Man',
    'IL' => 'Israel',
    'IT' => 'Italy',
    'JM' => 'Jamaica',
    'JP' => 'Japan',
    'JE' => 'Jersey',
    'JO' => 'Jordan',
    'KZ' => 'Kazakhstan',
    'KE' => 'Kenya',
    'KI' => 'Kiribati',
    'KR' => 'Korea',
    'KW' => 'Kuwait',
    'KG' => 'Kyrgyzstan',
    'LA' => 'Lao People\'s Democratic Republic',
    'LV' => 'Latvia',
    'LB' => 'Lebanon',
    'LS' => 'Lesotho',
    'LR' => 'Liberia',
    'LY' => 'Libyan Arab Jamahiriya',
    'LI' => 'Liechtenstein',
    'LT' => 'Lithuania',
    'LU' => 'Luxembourg',
    'MO' => 'Macao',
    'MK' => 'Macedonia',
    'MG' => 'Madagascar',
    'MW' => 'Malawi',
    'MY' => 'Malaysia',
    'MV' => 'Maldives',
    'ML' => 'Mali',
    'MT' => 'Malta',
    'MH' => 'Marshall Islands',
    'MQ' => 'Martinique',
    'MR' => 'Mauritania',
    'MU' => 'Mauritius',
    'YT' => 'Mayotte',
    'MX' => 'Mexico',
    'FM' => 'Micronesia, Federated States Of',
    'MD' => 'Moldova',
    'MC' => 'Monaco',
    'MN' => 'Mongolia',
    'ME' => 'Montenegro',
    'MS' => 'Montserrat',
    'MA' => 'Morocco',
    'MZ' => 'Mozambique',
    'MM' => 'Myanmar',
    'NA' => 'Namibia',
    'NR' => 'Nauru',
    'NP' => 'Nepal',
    'NL' => 'Netherlands',
    'AN' => 'Netherlands Antilles',
    'NC' => 'New Caledonia',
    'NZ' => 'New Zealand',
    'NI' => 'Nicaragua',
    'NE' => 'Niger',
    'NG' => 'Nigeria',
    'NU' => 'Niue',
    'NF' => 'Norfolk Island',
    'MP' => 'Northern Mariana Islands',
    'NO' => 'Norway',
    'OM' => 'Oman',
    'PK' => 'Pakistan',
    'PW' => 'Palau',
    'PS' => 'Palestinian Territory, Occupied',
    'PA' => 'Panama',
    'PG' => 'Papua New Guinea',
    'PY' => 'Paraguay',
    'PE' => 'Peru',
    'PH' => 'Philippines',
    'PN' => 'Pitcairn',
    'PL' => 'Poland',
    'PT' => 'Portugal',
    'PR' => 'Puerto Rico',
    'QA' => 'Qatar',
    'RE' => 'Reunion',
    'RO' => 'Romania',
    'RU' => 'Russian Federation',
    'RW' => 'Rwanda',
	'BQ-SA'=>'Saba',
    'BL' => 'Saint Barthélemy',
    'SH' => 'Saint Helena',
    'KN' => 'Saint Kitts and Nevis',
    'LC' => 'Saint Lucia',
    'MF' => 'Saint Martin',
    'PM' => 'Saint Pierre And Miquelon',
    'VC' => 'Saint Vincent and the Grenadines',
    'WS' => 'Samoa',
    'SM' => 'San Marino',
    'ST' => 'Sao Tome And Principe',
    'SA' => 'Saudi Arabia',
    'SN' => 'Senegal',
    'RS' => 'Serbia',
    'SC' => 'Seychelles',
    'SL' => 'Sierra Leone',
    'SG' => 'Singapore',
	//'BQ-SE'=>'Sint Eustatius',
	'BQ-SE'=>'Saint Eustatius',
    'SK' => 'Slovakia',
    'SI' => 'Slovenia',
    'SB' => 'Solomon Islands',
    'SO' => 'Somalia',
	'SX' =>'Sint Maarten',
	'SX' =>'Saint Maarten',
    'ZA' => 'South Africa',
    'GS' => 'South Georgia And Sandwich Isl.',
    'ES' => 'Spain',
    'LK' => 'Sri Lanka',
    'SD' => 'Sudan',
    'SR' => 'Suriname',
    'SJ' => 'Svalbard And Jan Mayen',
    'SZ' => 'Swaziland',
    'SE' => 'Sweden',
    'CH' => 'Switzerland',
    'SY' => 'Syrian Arab Republic',
    'TW' => 'Taiwan',
    'TJ' => 'Tajikistan',
    'TZ' => 'Tanzania',
    'TH' => 'Thailand',
    'TL' => 'Timor-Leste',
    'TG' => 'Togo',
    'TK' => 'Tokelau',
    'TO' => 'Tonga',
    'TT' => 'Trinidad and Tobago',
    'TN' => 'Tunisia',
    'TR' => 'Turkey',
    'TM' => 'Turkmenistan',
    'TC' => 'Turks and Caicos Islands',
    'TV' => 'Tuvalu',
    'UG' => 'Uganda',
    'UA' => 'Ukraine',
    'AE' => 'United Arab Emirates',
    'GB' => 'United Kingdom',
    'US' => 'United States of America',
    'UM' => 'United States Outlying Islands',
    'UY' => 'Uruguay',
    'UZ' => 'Uzbekistan',
    'VU' => 'Vanuatu',
    'VE' => 'Venezuela',
    'VN' => 'Viet Nam',
    'VG' => 'Virgin Islands (British)',
    'VI' => 'Virgin Islands (U.S.)',
    'WF' => 'Wallis And Futuna',
    'EH' => 'Western Sahara',
    'YE' => 'Yemen',
    'ZM' => 'Zambia',
    'ZW' => 'Zimbabwe'
);
	if (array_key_exists ( $code,$isoCountries)){
		return $isoCountries[$code];
	}else{
		return "";	
	}

}
function CountryNametoCode($code){
	$isoCountriesR = array('Afghanistan'=> 'AF','Aland Islands'=> 'AX','Albania'=> 'AL','Algeria'=> 'DZ','American Samoa'=> 'AS','Andorra'=> 'AD','Angola'=> 'AO','Anguilla'=> 'AI','Antarctica'=> 'AQ','Antigua and Barbuda'=> 'AG','Argentina'=> 'AR','Armenia'=> 'AM','Aruba'=> 'AW','Australia'=> 'AU','Austria'=> 'AT','Azerbaijan'=> 'AZ','Bahamas'=> 'BS','Bahrain'=> 'BH','Bangladesh'=> 'BD','Barbados'=> 'BB','Belarus'=> 'BY','Belgium'=> 'BE','Belize'=> 'BZ','Benin'=> 'BJ','Bermuda'=> 'BM','Bhutan'=> 'BT','Bolivia'=> 'BO','Bonaire'=>'BQ-BO','Bosnia And Herzegovina'=> 'BA','Botswana'=> 'BW','Bouvet Island'=> 'BV','Brazil'=> 'BR','British Indian Ocean Territory'=> 'IO','Brunei Darussalam'=> 'BN','Bulgaria'=> 'BG','Burkina Faso'=> 'BF','Burundi'=> 'BI','Cambodia'=> 'KH','Cameroon'=> 'CM','Canada'=> 'CA','Cape Verde'=> 'CV','Cayman Islands'=> 'KY','Central African Republic'=> 'CF','Chad'=> 'TD','Chile'=> 'CL','China'=> 'CN','Christmas Island'=> 'CX','Cocos (Keeling) Islands'=> 'CC','Colombia'=> 'CO','Comoros'=> 'KM','Congo'=> 'CG','Congo, Democratic Republic'=> 'CD','Cook Islands'=> 'CK','Costa Rica'=> 'CR','Cote D\'Ivoire'=> 'CI','Croatia'=> 'HR','Cuba'=> 'CU', 'Curaçao'=>'CW','Curazao'=>'CW','Cyprus'=> 'CY','Czech Republic'=> 'CZ','Denmark'=> 'DK','Djibouti'=> 'DJ','Dominica'=> 'DM','Dominican Republic'=> 'DO','Ecuador'=> 'EC','Egypt'=> 'EG','El Salvador'=> 'SV','Equatorial Guinea'=> 'GQ','Eritrea'=> 'ER','Estonia'=> 'EE','Ethiopia'=> 'ET','Falkland Islands'=> 'FK','Faroe Islands'=> 'FO','Fiji'=> 'FJ','Finland'=> 'FI','France'=> 'FR','French Guiana'=> 'GF','French Polynesia'=> 'PF','French Southern Territories'=> 'TF','Gabon'=> 'GA','Gambia'=> 'GM','Georgia'=> 'GE','Germany'=> 'DE','Ghana'=> 'GH','Gibraltar'=> 'GI','Greece'=> 'GR','Greenland'=> 'GL','Grenada'=> 'GD','Guadeloupe'=> 'GP','Guam'=> 'GU','Guatemala'=> 'GT','Guernsey'=> 'GG','Guinea'=> 'GN','Guinea-Bissau'=> 'GW','Guyana'=> 'GY','Haiti'=> 'HT','Heard Island & Mcdonald Islands'=> 'HM','Holy See (Vatican City State)'=> 'VA','Honduras'=> 'HN','Hong Kong'=> 'HK','Hungary'=> 'HU','Iceland'=> 'IS','India'=> 'IN','Indonesia'=> 'ID','Iran, Islamic Republic Of'=> 'IR','Iraq'=> 'IQ','Ireland'=> 'IE','Isle Of Man'=> 'IM','Israel'=> 'IL','Italy'=> 'IT','Jamaica'=> 'JM','Japan'=> 'JP','Jersey'=> 'JE','Jordan'=> 'JO','Kazakhstan'=> 'KZ','Kenya'=> 'KE','Kiribati'=> 'KI','Korea'=> 'KR','Kuwait'=> 'KW','Kyrgyzstan'=> 'KG','Lao People\'s Democratic Republic'=> 'LA','Latvia'=> 'LV','Lebanon'=> 'LB','Lesotho'=> 'LS','Liberia'=> 'LR','Libyan Arab Jamahiriya'=> 'LY','Liechtenstein'=> 'LI','Lithuania'=> 'LT','Luxembourg'=> 'LU','Macao'=> 'MO','Macedonia'=> 'MK','Madagascar'=> 'MG','Malawi'=> 'MW','Malaysia'=> 'MY','Maldives'=> 'MV','Mali'=> 'ML','Malta'=> 'MT','Marshall Islands'=> 'MH','Martinique'=> 'MQ','Mauritania'=> 'MR','Mauritius'=> 'MU','Mayotte'=> 'YT','Mexico'=> 'MX','Micronesia, Federated States Of'=> 'FM','Moldova'=> 'MD','Monaco'=> 'MC','Mongolia'=> 'MN','Montenegro'=> 'ME','Montserrat'=> 'MS','Morocco'=> 'MA','Mozambique'=> 'MZ','Myanmar'=> 'MM','Namibia'=> 'NA','Nauru'=> 'NR','Nepal'=> 'NP','Netherlands'=> 'NL','Netherlands Antilles'=> 'AN','New Caledonia'=> 'NC','New Zealand'=> 'NZ','Nicaragua'=> 'NI','Niger'=> 'NE','Nigeria'=> 'NG','Niue'=> 'NU','Norfolk Island'=> 'NF','Northern Mariana Islands'=> 'MP','Norway'=> 'NO','Oman'=> 'OM','Pakistan'=> 'PK','Palau'=> 'PW','Palestinian Territory, Occupied'=> 'PS','Panama'=> 'PA','Papua New Guinea'=> 'PG','Paraguay'=> 'PY','Peru'=> 'PE','Philippines'=> 'PH','Pitcairn'=> 'PN','Poland'=> 'PL','Portugal'=> 'PT','Puerto Rico'=> 'PR','Qatar'=> 'QA','Reunion'=> 'RE','Romania'=> 'RO','Russian Federation'=> 'RU','Rwanda'=> 'RW','Saba'=>'BQ-SA','Saint Barthélemy'=> 'BL','Saint Helena'=> 'SH','Saint Kitts and Nevis'=> 'KN','Saint Lucia'=> 'LC','Saint Martin'=> 'MF','Saint Pierre And Miquelon'=> 'PM','Saint Vincent and the Grenadines'=> 'VC','Samoa'=> 'WS','San Marino'=> 'SM','Sao Tome And Principe'=> 'ST','Saudi Arabia'=> 'SA','Senegal'=> 'SN','Serbia'=> 'RS','Seychelles'=> 'SC','Sierra Leone'=> 'SL','Singapore'=> 'SG','Sint Eustatius'=>'BQ-SE','Saint Eustatius'=>'BQ-SE','Slovakia'=> 'SK','Slovenia'=> 'SI','Solomon Islands'=> 'SB','Somalia'=> 'SO','South Africa'=> 'ZA','South Georgia And Sandwich Isl.'=> 'GS','Spain'=> 'ES','Sri Lanka'=> 'LK','Sudan'=> 'SD','Suriname'=> 'SR','Svalbard And Jan Mayen'=> 'SJ','Swaziland'=> 'SZ','Sweden'=> 'SE','Sint Maarten'=>'SX','Saint Maarten'=>'SX','Switzerland'=> 'CH','Syrian Arab Republic'=> 'SY','Taiwan'=> 'TW','Tajikistan'=> 'TJ','Tanzania'=> 'TZ','Thailand'=> 'TH','Timor-Leste'=> 'TL','Togo'=> 'TG','Tokelau'=> 'TK','Tonga'=> 'TO','Trinidad and Tobago'=> 'TT','Tunisia'=> 'TN','Turkey'=> 'TR','Turkmenistan'=> 'TM','Turks and Caicos Islands'=> 'TC','Tuvalu'=> 'TV','Uganda'=> 'UG','Ukraine'=> 'UA','United Arab Emirates'=> 'AE','United Kingdom'=> 'GB','United States of America'=> 'US','United States Outlying Islands'=> 'UM','Uruguay'=> 'UY','Uzbekistan'=> 'UZ','Vanuatu'=> 'VU','Venezuela'=> 'VE','Vietnam'=> 'VN','Virgin Islands (British)'=> 'VG','Virgin Islands (U.S.)'=> 'VI','Wallis And Futuna'=> 'WF','Western Sahara'=> 'EH','Yemen'=> 'YE','Zambia'=> 'ZM','Zimbabwe'=> 'ZW');
	if (array_key_exists($code,$isoCountriesR)){

		return $isoCountriesR[$code];
	}else{
		return "";	
	}
}
function CountryLatLong($code){
	$isoCountriesLatLong =  array(
	'AD'=>'42.5,1.5',
'AE'=>'24,54',
'AF'=>'33,65',
'AG'=>'17.05,-61.8',
'AI'=>'18.25,-63.17',
'AL'=>'41,20',
'AM'=>'40,45',
'AN'=>'12.25,-68.75',
'AO'=>'-12.5,18.5',
'AP'=>'35,105',
'AQ'=>'-90,0',
'AR'=>'-34,-64',
'AS'=>'-14.33,-170',
'AT'=>'47.33,13.33',
'AU'=>'-27,133',
'AW'=>'12.5,-69.97',
'AZ'=>'40.5,47.5',
'BA'=>'44,18',
'BB'=>'13.17,-59.53',
'BD'=>'24,90',
'BE'=>'50.83,4',
'BF'=>'13,-2',
'BG'=>'43,25',
'BH'=>'26,50.55',
'BI'=>'-3.5,30',
'BJ'=>'9.5,2.25',
'BM'=>'32.33,-64.75',
'BN'=>'4.5,114.67',
'BO'=>'-17,-65',
'BR'=>'-10,-55,3',
'BS'=>'24.25,-76,5',
'BT'=>'27.5,90.5',
'BV'=>'-54.43,3.4',
'BW'=>'-22,24',
'BY'=>'53,28',
'BZ'=>'17.25,-88.75',
'BQ-BO'=>'12.19,-68.25,7',
'BQ-SA'=>'17.63,-63.23,9',
'CA'=>'60,-95',
'CC'=>'-12.5,96.83',
'CD'=>'0,25',
'CF'=>'7,21',
'CG'=>'-1,15',
'CH'=>'47,8',
'CI'=>'8,-5',
'CK'=>'-21.23,-159.77',
'CL'=>'-30,-71',
'CM'=>'6,12',
'CN'=>'35,105',
'CO'=>'4,-72,5',
'CR'=>'10,-84',
'CU'=>'21.5,-80,5',
'CV'=>'16,-24',
'CX'=>'-10.5,105.67',
'CY'=>'35,33',
'CZ'=>'49.75,15.5',
'CW'=>'12.16,-68.99,9',
'DE'=>'51,9',
'DJ'=>'11.5,43',
'DK'=>'56,10',
'DM'=>'15.42,-61.33,7',
'DO'=>'19,-70.67',
'DZ'=>'28,3',
'EC'=>'-2,-77.5',
'EE'=>'59,26',
'EG'=>'27,30',
'EH'=>'24.5,-13',
'ER'=>'15,39',
'ES'=>'40,-4',
'ET'=>'8,38',
'EU'=>'47,8',
'FI'=>'64,26',
'FJ'=>'-18,175',
'FK'=>'-51.75,-59',
'FM'=>'6.92,158.25',
'FO'=>'62,-7',
'FR'=>'46,2',
'GA'=>'-1,11.75',
'GB'=>'54,-2',
'GD'=>'12.12,-61.67',
'GE'=>'42,43.5',
'GF'=>'4,-53',
'GH'=>'8,-2',
'GI'=>'36.18,-5.37',
'GL'=>'72,-40',
'GM'=>'13.47,-16.57',
'GN'=>'11,-10',
'GP'=>'16.25,-61.58',
'GQ'=>'2,10',
'GR'=>'39,22',
'GS'=>'-54.5,-37',
'GT'=>'15.5,-90.25',
'GU'=>'13.47,144.78',
'GW'=>'12,-15',
'GY'=>'5,-59,5',
'HK'=>'22.25,114.17',
'HM'=>'-53.1,72.52',
'HN'=>'15,-86.5',
'HR'=>'45.17,15.5',
'HT'=>'19,-72.42',
'HU'=>'47,20',
'ID'=>'-5,120',
'IE'=>'53,-8',
'IL'=>'31.5,34.75',
'IN'=>'20,77',
'IO'=>'-6,71.5',
'IQ'=>'33,44',
'IR'=>'32,53',
'IS'=>'65,-18',
'IT'=>'42.83,12.83',
'JM'=>'18.25,-77.5',
'JO'=>'31,36',
'JP'=>'36,138',
'KE'=>'1,38',
'KG'=>'41,75',
'KH'=>'13,105',
'KI'=>'1.42,173',
'KM'=>'-12.17,44.25',
'KN'=>'17.33,-62.75',
'KP'=>'40,127',
'KR'=>'37,127.5',
'KW'=>'29.34,47.66',
'KY'=>'19.5,-80.5',
'KZ'=>'48,68',
'LA'=>'18,105',
'LB'=>'33.83,35.83',
'LC'=>'13.88,-61.13',
'LI'=>'47.17,9.53',
'LK'=>'7,81',
'LR'=>'6.5,-9.5',
'LS'=>'-29.5,28.5',
'LT'=>'56,24',
'LU'=>'49.75,6.17',
'LV'=>'57,25',
'LY'=>'25,17',
'MA'=>'32,-5',
'MC'=>'43.73,7.4',
'MD'=>'47,29',
'ME'=>'42,19',
'MG'=>'-20,47',
'MH'=>'9,168',
'MK'=>'41.83,22',
'ML'=>'17,-4',
'MM'=>'22,98',
'MN'=>'46,105',
'MO'=>'22.17,113.55',
'MP'=>'15.2,145.75',
'MQ'=>'14.67,-61',
'MR'=>'20,-12',
'MS'=>'16.75,-62.2',
'MT'=>'35.83,14.58',
'MU'=>'-20.28,57.55',
'MV'=>'3.25,73',
'MW'=>'-13.5,34',
'MX'=>'23,-102',
'MY'=>'2.5,112.5',
'MZ'=>'-18.25,35',
'NA'=>'-22,17',
'NC'=>'-21.5,165.5',
'NE'=>'16,8',
'NF'=>'-29.03,167.95',
'NG'=>'10,8',
'NI'=>'13,-85,5',
'NL'=>'52.5,5.75',
'NO'=>'62,10',
'NP'=>'28,84',
'NR'=>'-0.53,166.92',
'NU'=>'-19.03,-169.87',
'NZ'=>'-41,174',
'OM'=>'21,57',
'PA'=>'9,-80,5',
'PE'=>'-10,-76',
'PF'=>'-15,-140',
'PG'=>'-6,147',
'PH'=>'13,122',
'PK'=>'30,70',
'PL'=>'52,20',
'PM'=>'46.83,-56.33',
'PR'=>'18.25,-66.5',
'PS'=>'32,35.25',
'PT'=>'39.5,-8',
'PW'=>'7.5,134.5',
'PY'=>'-23,-58',
'QA'=>'25.5,51.25',
'RE'=>'-21.1,55.6',
'RO'=>'46,25',
'RS'=>'44,21',
'RU'=>'60,100',
'RW'=>'-2,30',
'SA'=>'25,45',
'SB'=>'-8,159',
'SC'=>'-4.58,55.67',
'SD'=>'15,30',
'SE'=>'62,15',
'SG'=>'1.37,103.8',
'SH'=>'-15.93,-5.7',
'SI'=>'46,15',
'SJ'=>'78,20',
'SK'=>'48.67,19.5',
'SL'=>'8.5,-11.5',
'SM'=>'43.77,12.42',
'SN'=>'14,-14',
'SO'=>'10,49',
'SR'=>'4,-56,5',
'ST'=>'1,7',
'SV'=>'13.83,-88.92',
'SY'=>'35,38',
'SZ'=>'-26.5,31.5',
'SX' =>'18.03,-63.07,9',
'TC'=>'21.75,-71.58',
'TD'=>'15,19',
'TF'=>'-43,67',
'TG'=>'8,1.17',
'TH'=>'15,100',
'TJ'=>'39,71',
'TK'=>'-9,-172',
'TM'=>'40,60',
'TN'=>'34,9',
'TO'=>'-20,-175',
'TR'=>'39,35',
'TT'=>'11,-61',
'TV'=>'-8,178',
'TW'=>'23.5,121',
'TZ'=>'-6,35',
'UA'=>'49,32',
'UG'=>'1,32',
'UM'=>'19.28,166.6',
'US'=>'38,-97',
'UY'=>'-33,-56',
'UZ'=>'41,64',
'VA'=>'41.9,12.45',
'VC'=>'13.25,-61.2',
'VE'=>'8,-66',
'VG'=>'18.5,-64.5',
'VI'=>'18.33,-64.83',
'VN'=>'16,106',
'VU'=>'-16,167',
'WF'=>'-13.3,-176.2',
'WS'=>'-13.58,-172.33',
'YE'=>'15,48',
'YT'=>'-12.83,45.17',
'ZA'=>'-29,24',
'ZM'=>'-15,30',
'ZW'=>'-20,30',
'BQ-SE'=>'17.48,-62.96,9');
	if (array_key_exists($code,$isoCountriesLatLong)){

		return $isoCountriesLatLong[$code];
	}else{
		return "";	
	}

}
function getFlagCountry($id){
	if($id<>""){
		$actual_link = (isset($_SERVER['HTTPS']) ? "https" : "http") . "://$_SERVER[HTTP_HOST]";
		return "<img src='".$actual_link."/app/themes/clme-theme/dist/images/flags/".$id.".svg' width='10px' height='10px' style='opacity:0.5;' />";
	}else{
		return "";
	}
}
function string_sanitize($s) {
	//$result =addslashes($s);
	$result = sanitize_text_field($s);
	//$result = preg_replace("/[^ \w]+/", "", html_entity_decode($s, ENT_QUOTES));
    return $result;
}
function insert_ppi_database() {

if( 'POST' == $_SERVER['REQUEST_METHOD'] 
		&& !empty( $_POST['action'] ) 
		&& $_POST['post_type'] == 'ppi_database' ) { // Check what the post type is here instead
		
		try {
   if ( !function_exists('wp_handle_upload') ) {
require_once(ABSPATH . 'wp-admin/includes/file.php');
}
         
			$pname = $pname2= $pacronym = $pobjective = $pobjective2 = $pgscope = $pdatestar = $pdateend = $pgstatus = $pleadorg = $pleadcont = $pleadcontemail = $pleadcontphone = $pleadweb = $plogo = $ppartners = $pdonors = $pgrant = $pcountfun = $pcogef = $ppost_covid_ppi = $psargassum_ppi = $pmarine_litter_ppi = $ppost_covid_text_ppi = "";
			
			$pnewppi=0;
			
			
			if (isset ($_POST['pname'])) { $pname =  string_sanitize($_POST['pname']); }
			if (isset ($_POST['pleadcontemail'])) { $pleadcontemail = $_POST['pleadcontemail']; }
			
			if (isset ($_POST['pleadcontemail'])) { $pleadcontemail = $_POST['pleadcontemail']; }
			
			$user_id = username_exists( $pleadcontemail );

			// 2021
			$current_user = wp_get_current_user();
			$nombre_usuario = $current_user->first_name;
			$mail_usuario   = $current_user->user_email;
			
			// configurando status de acuerdo a rol
			if ( user_can( $current_user, "um_usuario-verificado" ) ){
		      // Check user object has not got subscriber role
		        $post_status_new = 'publish';
		        
		    } else if ( user_can( $current_user, "um_usuario-icm" ) ) {
		        $post_status_new = 'publish';

		    }else{

		        $post_status_new = 'pending';
		    }

			
			if($_POST['id']!= ""){
				$post   = get_post( $_POST['id']);
				$post_id = $_POST['id'];
				$pnewppi=0;
			}else{
				
				$post = array(
					'post_title'	=> $pname,
					'post_status'	=> $post_status_new, // Choose: publish, preview, future, etc.
					'post_author'   => $user_id,
					'post_type'		=> 'ppi_database' // Set the post type based on the IF is post_type X
				);
				$post_id = wp_insert_post($post);
				$pnewppi=1;

				
				
			}

			if (isset ($_FILES['pstatusfile']))  {
				$movefile = wp_handle_upload($_FILES['pstatusfile'], array( 'test_form' => false ));
				// If move was successful, insert WordPress attachment
				if ( $movefile && !isset($movefile['error']) ) {
				$wp_upload_dir = wp_upload_dir();
				$attachment = array(
				'guid' => $wp_upload_dir['url'] . '/' . basename($movefile['file']),
				'post_mime_type' => $movefile['type'],
				'post_title' => preg_replace( '/\.[^.]+$/', '', basename($movefile['file']) ),
				'post_content' => '',
				'post_status' => 'inherit'
				);
				$attach_id = wp_insert_attachment($attachment, $movefile['file']);
				// Assign the file as the featured image
				set_post_thumbnail($post_id, $attach_id);
				update_field('status_file_ppi', $attach_id, $post_id);
				//update_field('logo_ppi', $movefile,$post_id  );
				}
			}
			
			if (isset ($_FILES['plogo']))  {
				$movefile = wp_handle_upload($_FILES['plogo'], array( 'test_form' => false ));
				// If move was successful, insert WordPress attachment
				if ( $movefile && !isset($movefile['error']) ) {
				$wp_upload_dir = wp_upload_dir();
				$attachment = array(
				'guid' => $wp_upload_dir['url'] . '/' . basename($movefile['file']),
				'post_mime_type' => $movefile['type'],
				'post_title' => preg_replace( '/\.[^.]+$/', '', basename($movefile['file']) ),
				'post_content' => '',
				'post_status' => 'inherit'
				);
				$attach_id = wp_insert_attachment($attachment, $movefile['file']);
				// Assign the file as the featured image
				set_post_thumbnail($post_id, $attach_id);
				update_field('logo_ppi', $attach_id, $post_id);
				//update_field('logo_ppi', $movefile,$post_id  );
				}
			}
			
			
			wp_set_post_terms( $post_id, implode(",",$_POST['pcountries']), 'ppi_countries' ) ;
			wp_set_post_terms( $post_id, $_POST['pgstatus'], 'ppi_status' ) ;
			wp_set_post_terms( $post_id, $_POST['pgscope'], 'ppi_geoscope'); // 2021
			
			update_field( 'verify_ppi', true, $post_id );
			
			// 2021
			$author_mail = $current_user->user_email;
			update_field( 'author_ppi_mail', $author_mail, $post_id );

			if (isset ($_POST['pname']))  { update_field( 'post_title', string_sanitize($_POST['pname']), $post_id ); }
			if (isset ($_POST['pname2']))  { update_field( 'post_title_2', string_sanitize($_POST['pname2']), $post_id ); }
			if (isset ($_POST['pacronym'])) { update_field( 'acronym_ppi', string_sanitize($_POST['pacronym']), $post_id ); }
			if (isset ($_POST['pobjective'])) { update_field( 'main_objectives_ppi', string_sanitize($_POST['pobjective']), $post_id ); }
			if (isset ($_POST['pobjective2'])) { update_field( 'main_objectives_ppi_2', string_sanitize($_POST['pobjective2']), $post_id ); }
			if (isset ($_POST['pdatestar'])){ update_field( 'start_date_ppi', $_POST['pdatestar'], $post_id ); }
			if (isset ($_POST['pdateend'])) { update_field( 'end_date_ppi', $_POST['pdateend'], $post_id ); }
			if (isset ($_POST['pdonorsID'])) { update_field( 'gef_id_ppi', $_POST['pdonorsID'], $post_id ); }
			if (isset ($_POST['pleadorg'])) { update_field( 'lead_organization_ppi', string_sanitize($_POST['pleadorg']), $post_id ); }
			if (isset ($_POST['pleadcont'])) { update_field( 'lead_contact_ppi', $_POST['pleadcont'], $post_id ); }
			if (isset ($_POST['pleadcontemail'])) { update_field( 'lead_contact_email_ppi', $_POST['pleadcontemail'], $post_id ); }
			if (isset ($_POST['pleadcontphone'])) { update_field( 'lead_contact_phone_number_ppi', $_POST['pleadcontphone'], $post_id ); }
			if (isset ($_POST['pleadweb'])) { update_field( 'lead_contact_website_ppi', $_POST['pleadweb'], $post_id ); }
			
			if (isset ($_POST['ppartners'])) { update_field( 'partners_ppi', string_sanitize($_POST['ppartners']), $post_id ); }
			if (isset ($_POST['pdonors'])) { update_field( 'donors_ppi', string_sanitize($_POST['pdonors']), $post_id ); }
			
			//get and update Post COVID-19 Recovery, Sargassum and Plastics and Marine Debris (ppost_covid_ppi, psargassum_ppi, pmarine_litter_ppi and ppost_covid_text_ppi)
			update_field( 'post_covid_ppi', $_POST['ppost_covid_ppi'], $post_id );
			update_field( 'sargassum_ppi', $_POST['psargassum_ppi'], $post_id );
			update_field( 'marine_litter_ppi', $_POST['pmarine_litter_ppi'], $post_id );
			if (isset ($_POST['ppost_covid_text_ppi'])) { update_field( 'post_covid_text_ppi', string_sanitize($_POST['ppost_covid_text_ppi']), $post_id ); }
			
            
			
			if (isset ($_POST['pgrant'])) { update_field( 'grant_us_ppi', $_POST['pgrant'], $post_id ); }
			if (isset ($_POST['pcountfun'])) { update_field( 'counterpart_funding_us_ppi', $_POST['pcountfun'], $post_id ); }
			if (isset ($_POST['pcogef'])) { update_field( 'commitment_to_gef_ppi', $_POST['pcogef'], $post_id ); }
			
			if (isset ($_POST['pChecksap0'])) { update_field( 'sap_strategy_s1_ppi', implode(",",$_POST['pChecksap0']), $post_id ); }else{update_field( 'sap_strategy_s1_ppi', '', $post_id );}
			if (isset ($_POST['pChecksap1'])) { update_field( 'sap_strategy_s2_ppi', implode(",",$_POST['pChecksap1']), $post_id ); }else{update_field( 'sap_strategy_s2_ppi', '', $post_id );}
			if (isset ($_POST['pChecksap2'])) { update_field( 'sap_strategy_s3_ppi',implode(",", $_POST['pChecksap2']), $post_id ); }else{update_field( 'sap_strategy_s3_ppi', '', $post_id );}
			if (isset ($_POST['pChecksap3'])) { update_field( 'sap_strategy_s4_ppi', implode(",",$_POST['pChecksap3']), $post_id ); }else{update_field( 'sap_strategy_s4_ppi', '', $post_id );}
			if (isset ($_POST['pChecksap4'])) { update_field( 'sap_strategy_s4a_ppi', implode(",",$_POST['pChecksap4']), $post_id ); }else{update_field( 'sap_strategy_s4a_ppi', '', $post_id );}
			if (isset ($_POST['pChecksap5'])) { update_field( 'sap_strategy_s4b_ppi', implode(",",$_POST['pChecksap5']), $post_id ); }else{update_field( 'sap_strategy_s4b_ppi', '', $post_id );}
			if (isset ($_POST['pChecksap6'])) { update_field( 'sap_strategy_s5_ppi', implode(",",$_POST['pChecksap6']), $post_id ); }else{update_field( 'sap_strategy_s5_ppi', '', $post_id );}
			if (isset ($_POST['pChecksap7'])) { update_field( 'sap_strategy_s5a_ppi', implode(",",$_POST['pChecksap7']), $post_id ); }else{update_field( 'sap_strategy_s5a_ppi', '', $post_id );}
			if (isset ($_POST['pChecksap8'])) { update_field( 'sap_strategy_s5b_ppi', implode(",",$_POST['pChecksap8']), $post_id ); }else{update_field( 'sap_strategy_s5b_ppi', '', $post_id );}
			if (isset ($_POST['pChecksap9'])) { update_field( 'sap_strategy_s6_ppi', implode(",",$_POST['pChecksap9']), $post_id ); }else{update_field( 'sap_strategy_s6_ppi', '', $post_id );}
			

			if (isset ($_POST['psapobs'])) { update_field( 'sap_obs_ppi', string_sanitize($_POST['psapobs']), $post_id ); }
			if (isset ($_FILES['psapofile']))  {
				$movefile = wp_handle_upload($_FILES['psapofile'], array( 'test_form' => false ));
				// If move was successful, insert WordPress attachment
				if ( $movefile && !isset($movefile['error']) ) {
				$wp_upload_dir = wp_upload_dir();
				$attachment = array(
				'guid' => $wp_upload_dir['url'] . '/' . basename($movefile['file']),
				'post_mime_type' => $movefile['type'],
				'post_title' => preg_replace( '/\.[^.]+$/', '', basename($movefile['file']) ),
				'post_content' => '',
				'post_status' => 'inherit'
				);
				$attach_id = wp_insert_attachment($attachment, $movefile['file']);
				// Assign the file as the featured image
				set_post_thumbnail($post_id, $attach_id);
				update_field('sap_file_ppi', $attach_id, $post_id);
				//update_field('logo_ppi', $movefile,$post_id  );
				}
			}
			
			$sdgin=array();
			if (isset ($_POST['c_sdg'])) { $sdgin = 	$_POST['c_sdg']; }
			
			//if (isset ($_POST['pChecksdg1'])) { update_field( 'sdg_1_ppi', implode(",",$_POST['pChecksdg1']), $post_id ); }
			if (in_array("1.1", $sdgin)) { update_field( 'sdg_1_ppi', '1.1', $post_id ); }	else{update_field( 'sdg_1_ppi', '', $post_id );}	
			//if (isset ($_POST['pChecksdg2'])) { update_field( 'sdg_2_ppi', implode(",",$_POST['pChecksdg2']), $post_id ); }
			if (in_array("2.1", $sdgin)) { update_field( 'sdg_2_ppi', '2.1', $post_id ); }	else{update_field( 'sdg_2_ppi', '', $post_id );}	
			//if (isset ($_POST['pChecksdg3'])) { update_field( 'sdg_3_ppi', implode(",",$_POST['pChecksdg3']), $post_id ); }
			if (in_array("3.1", $sdgin)) { update_field( 'sdg_3_ppi', '3.1', $post_id ); }	else{update_field( 'sdg_3_ppi', '', $post_id );}	
			//if (isset ($_POST['pChecksdg4'])) { update_field( 'sdg_4_ppi', implode(",",$_POST['pChecksdg4']), $post_id ); }
			if (in_array("4.1", $sdgin)) { update_field( 'sdg_4_ppi', '4.1', $post_id ); }	else{update_field( 'sdg_4_ppi', '', $post_id );}	
			//if (isset ($_POST['pChecksdg5'])) { update_field( 'sdg_5_ppi', implode(",",$_POST['pChecksdg5']), $post_id ); }
			if (in_array("5.1", $sdgin)) { update_field( 'sdg_5_ppi', '5.1', $post_id ); }	else{update_field( 'sdg_5_ppi', '', $post_id );}	
			//if (isset ($_POST['pChecksdg6'])) { update_field( 'sdg_6_ppi', implode(",",$_POST['pChecksdg6']), $post_id ); }
			if (in_array("6.1", $sdgin)) { update_field( 'sdg_6_ppi', '6.1', $post_id ); }	else{update_field( 'sdg_6_ppi', '', $post_id );}	
			//if (isset ($_POST['pChecksdg7'])) { update_field( 'sdg_7_ppi', implode(",",$_POST['pChecksdg7']), $post_id ); }
			if (in_array("7.1", $sdgin)) { update_field( 'sdg_7_ppi', '7.1', $post_id ); }	else{update_field( 'sdg_7_ppi', '', $post_id );}	
			//if (isset ($_POST['pChecksdg8'])) { update_field( 'sdg_8_ppi', implode(",",$_POST['pChecksdg8']), $post_id ); }
			if (in_array("8.1", $sdgin)) { update_field( 'sdg_8_ppi', '8.1', $post_id ); }	else{update_field( 'sdg_8_ppi', '', $post_id );}	
			//if (isset ($_POST['pChecksdg9'])) { update_field( 'sdg_9_ppi', implode(",",$_POST['pChecksdg9']), $post_id ); }
			if (in_array("9.1", $sdgin)) { update_field( 'sdg_9_ppi', '9.1', $post_id ); }	else{update_field( 'sdg_9_ppi', '', $post_id );}	
			//if (isset ($_POST['pChecksdg10'])) { update_field( 'sdg_10_ppi', implode(",",$_POST['pChecksdg10']), $post_id ); }
			if (in_array("10.1", $sdgin)) { update_field( 'sdg_10_ppi', '10.1', $post_id ); }	else{update_field( 'sdg_10_ppi', '', $post_id );}	
			//if (isset ($_POST['pChecksdg11'])) { update_field( 'sdg_11_ppi', implode(",",$_POST['pChecksdg11']), $post_id ); }
			if (in_array("11.1", $sdgin)) { update_field( 'sdg_11_ppi', '11.1', $post_id ); }	else{update_field( 'sdg_11_ppi', '', $post_id );}	
			//if (isset ($_POST['pChecksdg12'])) { update_field( 'sdg_12_ppi', implode(",",$_POST['pChecksdg12']), $post_id ); }
			if (in_array("12.1", $sdgin)) { update_field( 'sdg_12_ppi', '12.1', $post_id ); }	else{update_field( 'sdg_12_ppi', '', $post_id );}	
			//if (isset ($_POST['pChecksdg13'])) { update_field( 'sdg_13_ppi', implode(",",$_POST['pChecksdg13']), $post_id ); }
			if (in_array("13.1", $sdgin)) { update_field( 'sdg_13_ppi', '13.1', $post_id ); }	else{update_field( 'sdg_13_ppi', '', $post_id );}	
			if (isset ($_POST['pChecksdg14'])) { update_field( 'sdg_14_ppi', implode(",",$_POST['pChecksdg14']), $post_id ); }	
			//if (isset ($_POST['pChecksdg15'])) { update_field( 'sdg_15_ppi', implode(",",$_POST['pChecksdg15']), $post_id ); }
			if (in_array("15.1", $sdgin)) { update_field( 'sdg_15_ppi', '15.1', $post_id ); }	else{update_field( 'sdg_15_ppi', '', $post_id );}	
			//if (isset ($_POST['pChecksdg16'])) { update_field( 'sdg_16_ppi', implode(",",$_POST['pChecksdg16']), $post_id ); }
			if (in_array("16.1", $sdgin)) { update_field( 'sdg_16_ppi', '16.1', $post_id ); }	else{update_field( 'sdg_16_ppi', '', $post_id );}	
			//if (isset ($_POST['pChecksdg17'])) {update_field( 'sdg_17_ppi', implode(",",$_POST['pChecksdg17']), $post_id ); }
			if (in_array("17.1", $sdgin)) { update_field( 'sdg_17_ppi', '17.1', $post_id ); }	else{update_field( 'sdg_17_ppi', '', $post_id );}

			if (isset ($_POST['psdgobs'])) { update_field( 'sdg_obs_ppi', string_sanitize($_POST['psdgobs']), $post_id ); }
			if (isset ($_FILES['psdgfile']))  {
				$movefile = wp_handle_upload($_FILES['psdgfile'], array( 'test_form' => false ));
				// If move was successful, insert WordPress attachment
				if ( $movefile && !isset($movefile['error']) ) {
				$wp_upload_dir = wp_upload_dir();
				$attachment = array(
				'guid' => $wp_upload_dir['url'] . '/' . basename($movefile['file']),
				'post_mime_type' => $movefile['type'],
				'post_title' => preg_replace( '/\.[^.]+$/', '', basename($movefile['file']) ),
				'post_content' => '',
				'post_status' => 'inherit'
				);
				$attach_id = wp_insert_attachment($attachment, $movefile['file']);
				// Assign the file as the featured image
				set_post_thumbnail($post_id, $attach_id);
				update_field('sdg_file_ppi', $attach_id, $post_id);
				//update_field('logo_ppi', $movefile,$post_id  );
				}
			}

			//if (isset ($_POST['otherComm'])) { update_field( 'otherscomm', implode(",",$_POST['otherComm']), $post_id ); }
			wp_set_post_terms( $post_id, $_POST['otherComm'], 'other_comm', true ) ;
			if (isset ($_POST['potherobs'])) { update_field( 'other_obs_ppi', string_sanitize($_POST['potherobs']), $post_id ); }
			if (isset ($_FILES['potherfile']))  {
				$movefile = wp_handle_upload($_FILES['potherfile'], array( 'test_form' => false ));
				// If move was successful, insert WordPress attachment
				if ( $movefile && !isset($movefile['error']) ) {
				$wp_upload_dir = wp_upload_dir();
				$attachment = array(
				'guid' => $wp_upload_dir['url'] . '/' . basename($movefile['file']),
				'post_mime_type' => $movefile['type'],
				'post_title' => preg_replace( '/\.[^.]+$/', '', basename($movefile['file']) ),
				'post_content' => '',
				'post_status' => 'inherit'
				);
				$attach_id = wp_insert_attachment($attachment, $movefile['file']);
				// Assign the file as the featured image
				set_post_thumbnail($post_id, $attach_id);
				update_field('other_file_ppi', $attach_id, $post_id);
				//update_field('logo_ppi', $movefile,$post_id  );
				}
			}
			
			if (isset ($_POST['pregionalobs'])) { update_field( 'regional_emerging_obs_ppi', string_sanitize($_POST['pregionalobs']), $post_id ); }
			if (isset ($_FILES['pregionalfile']))  {
				$movefile = wp_handle_upload($_FILES['pregionalfile'], array( 'test_form' => false ));
				// If move was successful, insert WordPress attachment
				if ( $movefile && !isset($movefile['error']) ) {
				$wp_upload_dir = wp_upload_dir();
				$attachment = array(
				'guid' => $wp_upload_dir['url'] . '/' . basename($movefile['file']),
				'post_mime_type' => $movefile['type'],
				'post_title' => preg_replace( '/\.[^.]+$/', '', basename($movefile['file']) ),
				'post_content' => '',
				'post_status' => 'inherit'
				);
				$attach_id = wp_insert_attachment($attachment, $movefile['file']);
				// Assign the file as the featured image
				set_post_thumbnail($post_id, $attach_id);
				update_field('regional_emerging_file_ppi', $attach_id, $post_id);
				//update_field('logo_ppi', $movefile,$post_id  );
				}
			}


			update_field( 'reg_date_ppi', date("m/d/y"), $post_id );
			
			$message='<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html data-editor-version="2" class="sg-campaigns" xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1, maximum-scale=1" /><!--[if !mso]><!-->
    <meta http-equiv="X-UA-Compatible" content="IE=Edge" /><!--<![endif]-->
    <!--[if (gte mso 9)|(IE)]>
    <xml>
    <o:OfficeDocumentSettings>
    <o:AllowPNG/>
    <o:PixelsPerInch>96</o:PixelsPerInch>
    </o:OfficeDocumentSettings>
    </xml>
    <![endif]-->
    <!--[if (gte mso 9)|(IE)]>
    <style type="text/css">
      body {width: 600px;margin: 0 auto;}
      table {border-collapse: collapse;}
      table, td {mso-table-lspace: 0pt;mso-table-rspace: 0pt;}
      img {-ms-interpolation-mode: bicubic;}
    </style>
    <![endif]-->

    <style type="text/css">
      body, p, div {
        font-family: Verdana;
        font-size: 14px;
      }
      body {
        color: #000000;
      }
      body a {
        color: #1188E6;
        text-decoration: none;
      }
      p { margin: 0; padding: 0; }
      table.wrapper {
        width:100% !important;
        table-layout: fixed;
        -webkit-font-smoothing: antialiased;
        -webkit-text-size-adjust: 100%;
        -moz-text-size-adjust: 100%;
        -ms-text-size-adjust: 100%;
      }
      img.max-width {
        max-width: 100% !important;
      }
      .column.of-2 {
        width: 50%;
      }
      .column.of-3 {
        width: 33.333%;
      }
      .column.of-4 {
        width: 25%;
      }
      @media screen and (max-width:480px) {
        .preheader .rightColumnContent,
        .footer .rightColumnContent {
            text-align: left !important;
        }
        .preheader .rightColumnContent div,
        .preheader .rightColumnContent span,
        .footer .rightColumnContent div,
        .footer .rightColumnContent span {
          text-align: left !important;
        }
        .preheader .rightColumnContent,
        .preheader .leftColumnContent {
          font-size: 80% !important;
          padding: 5px 0;
        }
        table.wrapper-mobile {
          width: 100% !important;
          table-layout: fixed;
        }
        img.max-width {
          height: auto !important;
          max-width: 480px !important;
        }
        a.bulletproof-button {
          display: block !important;
          width: auto !important;
          font-size: 80%;
          padding-left: 0 !important;
          padding-right: 0 !important;
        }
        .columns {
          width: 100% !important;
        }
        .column {
          display: block !important;
          width: 100% !important;
          padding-left: 0 !important;
          padding-right: 0 !important;
          margin-left: 0 !important;
          margin-right: 0 !important;
        }
        .covidbutton{
        background:url("https://clmeplus.org/web/app/themes/clme-theme/covid_icon_ppi.png") no-repeat left center;
        }  

      }
    </style>
    <!--user entered Head Start-->
    
     <!--End Head user entered-->
  </head>
<body style="background-color:#FFF;width:1200px">
<table width="800" border="0" cellspacing="0" cellpadding="0">
  <tr style="background-color:#58A7D6;">
    <td width="50">&nbsp;</td>
    <td width="166" align="left"><center><img src="https://clmeplus.org/app/themes/clme-theme/dist/images/mail/clmemailheader.png" width="250" height="217" alt="logo clme" /></center></td>
    <td width="532"><span style="text-align:center;font-size: 50px;"><center> The <b>CLME+</b> Hub</center></span></td>
    <td width="52">&nbsp;</td>
  </tr>
   <tr style="background-color:#58A7D6;">
    <td style="background-color:#58A7D6;">&nbsp;</td>
    <td colspan="2" style="background-color:#58A7D6;">&nbsp;</td>
    <td style="background-color:#58A7D6;">&nbsp;</td>
  </tr>
  <tr>
    <td style="background-color:#58A7D6;">&nbsp;</td>
    <td colspan="2" style="padding:15px; background-color:#FFF;font-size: 20px;"><center><span style="text-align:center;font-size: 30px;"><b>Welcome to the CLME+ Projects database!</b></span></center></td>
    <td style="background-color:#58A7D6;">&nbsp;</td>
  </tr>
   <tr style="background-color:#58A7D6;">
    <td style="background-color:#58A7D6;">&nbsp;</td>
    <td colspan="2" style="background-color:#58A7D6;">&nbsp;</td>
    <td style="background-color:#58A7D6;">&nbsp;</td>
  </tr>
  <tr style="background-color:#58A7D6;">
    <td style="background-color:#58A7D6;">&nbsp;</td>
    <td colspan="2" style="background-color:#58A7D6;">&nbsp;</td>
    <td style="background-color:#58A7D6;">&nbsp;</td>
  </tr>
  <tr>
    <td style="background-color:#58A7D6;">&nbsp;</td>
     <td colspan="2" style="padding:15px; background-color:#FFF;font-size: 20px; text-align:justify;"><p><b>Dear </b>'.$_POST['pleadcont'].'
      </p>
       <p>&nbsp;</p>
    <p><strong>Update on '.$_POST['pname'].' has been processed successfully</strong>. Thank you for your commitment with collaborative work for the Wider Caribbean/CLME+ Region. <strong>We encourage you to keep up the good work on maintaining your Project Profile (s) information as accurate as possible.</strong></p>
    <p>&nbsp;</p>
    <p>Thank you for working collaboratively for a healthier marine environment, and towards enhancing the well-being of the peoples in our region. Always remember that <strong>together we can achieve more!</strong></p>
    
    <p>&nbsp;</p>
    <p>We invite you to further explore the content of our database and the CLME+ HUB (www.clmeplus.org), as this may prove useful for identifying opportunities for synergies and collaboration with other planned and ongoing initiatives.  </p>
    <p>&nbsp;</p>
    <p>Also, please don’t hesitate to share your experiences regarding the use of the database with us. If you have any questions or comments feel free to contact us using the following e-mail:</p>
    <p>&nbsp;</p>
    <p>info@clmeplus.org</p>
    <p>&nbsp;</p>
    <p>Best regards,</p>
    <p>&nbsp;</p>
    <p>&nbsp;</p>
    <p><strong>Patrick Debels</strong></p><p>UNDP/GEF CLME+ Project Coordination Unit</p><p>Secretariat to the CLME+ SAP Interim Coordination Mechanism (ICM)</p></td>
    <td style="background-color:#58A7D6;">&nbsp;</td>
  </tr>
  <tr style="background-color:#58A7D6;">
    <td >&nbsp;</td>
    <td colspan="2">&nbsp;</td>
    <td>&nbsp;</td>
  </tr>
  <tr style="background-color:#58A7D6;">
    <td >&nbsp;</td>
    <td colspan="2">&nbsp;</td>
    <td>&nbsp;</td>
  </tr>
  <tr style="background-color:#58A7D6;">
    <td colspan="4" ><center><img src="https://clmeplus.org/app/themes/clme-theme/dist/images/mail/clmemailfooter.png" width="800px"  height="181px" alt="footer logos" /></center></td>
  </tr>
</table>


</body>
</html>';

			// 2021
			// MENSAJE CUANDO SE ACTUALIZA UN PPI
			
			$mensajeuptate = '<!doctype html>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office">
    <head>
        <!-- NAME: 1 COLUMN -->
        <!--[if gte mso 15]>
        <xml>
            <o:OfficeDocumentSettings>
            <o:AllowPNG/>
            <o:PixelsPerInch>96</o:PixelsPerInch>
            </o:OfficeDocumentSettings>
        </xml>
        <![endif]-->
        <meta charset="UTF-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <meta name="viewport" content="width=device-width, initial-scale=1">
        <title>*|MC:SUBJECT|*</title>
        
    <style type="text/css">
    p{
      margin:10px 0;
      padding:0;
      color: #666;
    }
    table{
      border-collapse:collapse;
    }
    h1,h2,h3,h4,h5,h6{
      display:block;
      margin:0;
      padding:0;
      font-family: Verdana;
      color: #666;
      font-weight: 500;
    }
    img,a img{
      border:0;
      height:auto;
      outline:none;
      text-decoration:none;
    }
    body,#bodyTable,#bodyCell{
      height:100%;
      margin:0;
      padding:0;
      width:100%;
    }
    .mcnPreviewText{
      display:none !important;
    }
    #outlook a{
      padding:0;
    }
    img{
      -ms-interpolation-mode:bicubic;
    }
    table{
      mso-table-lspace:0pt;
      mso-table-rspace:0pt;
    }
    .ReadMsgBody{
      width:100%;
    }
    .ExternalClass{
      width:100%;
    }
    p,a,li,td,blockquote{
      mso-line-height-rule:exactly;
    }
    a[href^=tel],a[href^=sms]{
      color:inherit;
      cursor:default;
      text-decoration:none;
    }
    p,a,li,td,body,table,blockquote{
      -ms-text-size-adjust:100%;
      -webkit-text-size-adjust:100%;
    }
    .ExternalClass,.ExternalClass p,.ExternalClass td,.ExternalClass div,.ExternalClass span,.ExternalClass font{
      line-height:100%;
    }
    a[x-apple-data-detectors]{
      color:inherit !important;
      text-decoration:none !important;
      font-size:inherit !important;
      font-family:inherit !important;
      font-weight:inherit !important;
      line-height:inherit !important;
    }
    #bodyCell{
      padding:10px;
    }
    .templateContainer{
      max-width:600px !important;
    }
    a.mcnButton{
      display:block;
    }
    .mcnImage,.mcnRetinaImage{
      vertical-align:bottom;
    }
    .mcnTextContent{
      word-break:break-word;
    }
    .mcnTextContent img{
      height:auto !important;
    }
    .mcnDividerBlock{
      table-layout:fixed !important;
    }
  
    body,#bodyTable{
      /*@editable*/background-color:#FFFFFF;
    }
  
    #bodyCell{
      /*@editable*/border-top:0;
    }
  
    .templateContainer{
      /*@editable*/border:0;
    }
  /*
  @tab Page
  @section Heading 1
  @tip Set the styling for all first-level headings in your emails. These should be the largest of your headings.
  @style heading 1
  */
    h1{
      /*@editable*/color:#202020;
      /*@editable*/font-family:Helvetica;
      /*@editable*/font-size:26px;
      /*@editable*/font-style:normal;
      /*@editable*/font-weight:bold;
      /*@editable*/line-height:125%;
      /*@editable*/letter-spacing:normal;
      /*@editable*/text-align:left;
    }
  /*
  @tab Page
  @section Heading 2
  @tip Set the styling for all second-level headings in your emails.
  @style heading 2
  */
    h2{
      /*@editable*/color:#202020;
      /*@editable*/font-family:Helvetica;
      /*@editable*/font-size:22px;
      /*@editable*/font-style:normal;
      /*@editable*/font-weight:bold;
      /*@editable*/line-height:125%;
      /*@editable*/letter-spacing:normal;
      /*@editable*/text-align:left;
    }
  /*
  @tab Page
  @section Heading 3
  @tip Set the styling for all third-level headings in your emails.
  @style heading 3
  */
    h3{
      /*@editable*/color:#202020;
      /*@editable*/font-family:Helvetica;
      /*@editable*/font-size:20px;
      /*@editable*/font-style:normal;
      /*@editable*/font-weight:bold;
      /*@editable*/line-height:125%;
      /*@editable*/letter-spacing:normal;
      /*@editable*/text-align:left;
    }
  /*
  @tab Page
  @section Heading 4
  @tip Set the styling for all fourth-level headings in your emails. These should be the smallest of your headings.
  @style heading 4
  */
    h4{
      /*@editable*/color:#202020;
      /*@editable*/font-family:Helvetica;
      /*@editable*/font-size:18px;
      /*@editable*/font-style:normal;
      /*@editable*/font-weight:bold;
      /*@editable*/line-height:125%;
      /*@editable*/letter-spacing:normal;
      /*@editable*/text-align:left;
    }
  
    #templatePreheader{
      /*@editable*/background-color:#FFFFFF;
      /*@editable*/background-image:none;
      /*@editable*/background-repeat:no-repeat;
      /*@editable*/background-position:center;
      /*@editable*/background-size:cover;
      /*@editable*/border-top:0;
      /*@editable*/border-bottom:0;
      /*@editable*/padding-top:9px;
      /*@editable*/padding-bottom:9px;
    }
  
    #templatePreheader .mcnTextContent,#templatePreheader .mcnTextContent p{
      /*@editable*/color:#656565;
      /*@editable*/font-family:Helvetica;
      /*@editable*/font-size:12px;
      /*@editable*/line-height:150%;
      /*@editable*/text-align:left;
    }
  
    #templatePreheader .mcnTextContent a,#templatePreheader .mcnTextContent p a{
      /*@editable*/color:#656565;
      /*@editable*/font-weight:normal;
      /*@editable*/text-decoration:underline;
    }
  
    #templateHeader{
      /*@editable*/background-color:#FFFFFF;
      /*@editable*/background-image:none;
      /*@editable*/background-repeat:no-repeat;
      /*@editable*/background-position:center;
      /*@editable*/background-size:cover;
      /*@editable*/border-top:0;
      /*@editable*/border-bottom:0;
      /*@editable*/padding-top:9px;
      /*@editable*/padding-bottom:0;
    }
  
    #templateHeader .mcnTextContent,#templateHeader .mcnTextContent p{
      /*@editable*/color:#202020;
      /*@editable*/font-family:Helvetica;
      /*@editable*/font-size:16px;
      /*@editable*/line-height:150%;
      /*@editable*/text-align:left;
    }
  
    #templateHeader .mcnTextContent a,#templateHeader .mcnTextContent p a{
      /*@editable*/color:#007C89;
      /*@editable*/font-weight:normal;
      /*@editable*/text-decoration:underline;
    }
  
    #templateBody{
      /*@editable*/background-color:#FFFFFF;
      /*@editable*/background-image:none;
      /*@editable*/background-repeat:no-repeat;
      /*@editable*/background-position:center;
      /*@editable*/background-size:cover;
      /*@editable*/border-top:0;
      /*@editable*/border-bottom:2px solid #EAEAEA;
      /*@editable*/padding-top:0;
      /*@editable*/padding-bottom:9px;
    }
  
    #templateBody .mcnTextContent,#templateBody .mcnTextContent p{
      /*@editable*/color:#202020;
      /*@editable*/font-family:Helvetica;
      /*@editable*/font-size:16px;
      /*@editable*/line-height:150%;
      /*@editable*/text-align:left;
    }
  
    #templateBody .mcnTextContent a,#templateBody .mcnTextContent p a{
      /*@editable*/color:#007C89;
      /*@editable*/font-weight:normal;
      /*@editable*/text-decoration:underline;
    }
  
    #templateFooter{
      /*@editable*/background-color:#FFFFFF;
      /*@editable*/background-image:none;
      /*@editable*/background-repeat:no-repeat;
      /*@editable*/background-position:center;
      /*@editable*/background-size:cover;
      /*@editable*/border-top:0;
      /*@editable*/border-bottom:0;
      /*@editable*/padding-top:9px;
      /*@editable*/padding-bottom:9px;
    }
  
    #templateFooter .mcnTextContent,#templateFooter .mcnTextContent p{
      /*@editable*/color:#656565;
      /*@editable*/font-family:Helvetica;
      /*@editable*/font-size:12px;
      /*@editable*/line-height:150%;
      /*@editable*/text-align:center;
    }
  
    #templateFooter .mcnTextContent a,#templateFooter .mcnTextContent p a{
      /*@editable*/color:#656565;
      /*@editable*/font-weight:normal;
      /*@editable*/text-decoration:underline;
    }
  @media only screen and (min-width:768px){
    .templateContainer{
      width:600px !important;
    }

} @media only screen and (max-width: 480px){
    body,table,td,p,a,li,blockquote{
      -webkit-text-size-adjust:none !important;
    }

} @media only screen and (max-width: 480px){
    body{
      width:100% !important;
      min-width:100% !important;
    }

} @media only screen and (max-width: 480px){
    .mcnRetinaImage{
      max-width:100% !important;
    }

} @media only screen and (max-width: 480px){
    .mcnImage{
      width:100% !important;
    }

} @media only screen and (max-width: 480px){
    .mcnCartContainer,.mcnCaptionTopContent,.mcnRecContentContainer,.mcnCaptionBottomContent,.mcnTextContentContainer,.mcnBoxedTextContentContainer,.mcnImageGroupContentContainer,.mcnCaptionLeftTextContentContainer,.mcnCaptionRightTextContentContainer,.mcnCaptionLeftImageContentContainer,.mcnCaptionRightImageContentContainer,.mcnImageCardLeftTextContentContainer,.mcnImageCardRightTextContentContainer,.mcnImageCardLeftImageContentContainer,.mcnImageCardRightImageContentContainer{
      max-width:100% !important;
      width:100% !important;
    }

} @media only screen and (max-width: 480px){
    .mcnBoxedTextContentContainer{
      min-width:100% !important;
    }

} @media only screen and (max-width: 480px){
    .mcnImageGroupContent{
      padding:9px !important;
    }

} @media only screen and (max-width: 480px){
    .mcnCaptionLeftContentOuter .mcnTextContent,.mcnCaptionRightContentOuter .mcnTextContent{
      padding-top:9px !important;
    }

} @media only screen and (max-width: 480px){
    .mcnImageCardTopImageContent,.mcnCaptionBottomContent:last-child .mcnCaptionBottomImageContent,.mcnCaptionBlockInner .mcnCaptionTopContent:last-child .mcnTextContent{
      padding-top:18px !important;
    }

} @media only screen and (max-width: 480px){
    .mcnImageCardBottomImageContent{
      padding-bottom:9px !important;
    }

} @media only screen and (max-width: 480px){
    .mcnImageGroupBlockInner{
      padding-top:0 !important;
      padding-bottom:0 !important;
    }

} @media only screen and (max-width: 480px){
    .mcnImageGroupBlockOuter{
      padding-top:9px !important;
      padding-bottom:9px !important;
    }

} @media only screen and (max-width: 480px){
    .mcnTextContent,.mcnBoxedTextContentColumn{
      padding-right:18px !important;
      padding-left:18px !important;
    }

} @media only screen and (max-width: 480px){
    .mcnImageCardLeftImageContent,.mcnImageCardRightImageContent{
      padding-right:18px !important;
      padding-bottom:0 !important;
      padding-left:18px !important;
    }

} @media only screen and (max-width: 480px){
    .mcpreview-image-uploader{
      display:none !important;
      width:100% !important;
    }

} @media only screen and (max-width: 480px){
  /*
  @tab Mobile Styles
  @section Heading 1
  @tip Make the first-level headings larger in size for better readability on small screens.
  */
    h1{
      /*@editable*/font-size:22px !important;
      /*@editable*/line-height:125% !important;
    }

} @media only screen and (max-width: 480px){
  /*
  @tab Mobile Styles
  @section Heading 2
  @tip Make the second-level headings larger in size for better readability on small screens.
  */
    h2{
      /*@editable*/font-size:20px !important;
      /*@editable*/line-height:125% !important;
    }

} @media only screen and (max-width: 480px){
  /*
  @tab Mobile Styles
  @section Heading 3
  @tip Make the third-level headings larger in size for better readability on small screens.
  */
    h3{
      /*@editable*/font-size:18px !important;
      /*@editable*/line-height:125% !important;
    }

} @media only screen and (max-width: 480px){
  /*
  @tab Mobile Styles
  @section Heading 4
  @tip Make the fourth-level headings larger in size for better readability on small screens.
  */
    h4{
      /*@editable*/font-size:16px !important;
      /*@editable*/line-height:150% !important;
    }

} @media only screen and (max-width: 480px){
  /*
  @tab Mobile Styles
  @section Boxed Text
  @tip Make the boxed text larger in size for better readability on small screens. We recommend a font size of at least 16px.
  */
    .mcnBoxedTextContentContainer .mcnTextContent,.mcnBoxedTextContentContainer .mcnTextContent p{
      /*@editable*/font-size:14px !important;
      /*@editable*/line-height:150% !important;
    }

} @media only screen and (max-width: 480px){
  
    #templatePreheader{
      /*@editable*/display:block !important;
    }

} @media only screen and (max-width: 480px){
  /*
  @tab Mobile Styles
  @section Preheader Text
  @tip Make the preheader text larger in size for better readability on small screens.
  */
    #templatePreheader .mcnTextContent,#templatePreheader .mcnTextContent p{
      /*@editable*/font-size:14px !important;
      /*@editable*/line-height:150% !important;
    }

} @media only screen and (max-width: 480px){
  /*
  @tab Mobile Styles
  @section Header Text
  @tip Make the header text larger in size for better readability on small screens.
  */
    #templateHeader .mcnTextContent,#templateHeader .mcnTextContent p{
      /*@editable*/font-size:16px !important;
      /*@editable*/line-height:150% !important;
    }

} @media only screen and (max-width: 480px){
  /*
  @tab Mobile Styles
  @section Body Text
  @tip Make the body text larger in size for better readability on small screens. We recommend a font size of at least 16px.
  */
    #templateBody .mcnTextContent,#templateBody .mcnTextContent p{
      /*@editable*/font-size:16px !important;
      /*@editable*/line-height:150% !important;
    }

} @media only screen and (max-width: 480px){
  /*
  @tab Mobile Styles
  @section Footer Text
  @tip Make the footer content text larger in size for better readability on small screens.
  */
    #templateFooter .mcnTextContent,#templateFooter .mcnTextContent p{
      /*@editable*/font-size:14px !important;
      /*@editable*/line-height:150% !important;
    }

}</style></head>
    <body>
        
        <center>
            <table align="center" border="0" cellpadding="0" cellspacing="0" height="100%" width="100%" id="bodyTable">
                <tr>
                    <td align="center" valign="top" id="bodyCell">
                        <!-- BEGIN TEMPLATE // -->
                        <!--[if (gte mso 9)|(IE)]>
                        <table align="center" border="0" cellspacing="0" cellpadding="0" width="600" style="width:600px;">
                        <tr>
                        <td align="center" valign="top" width="600" style="width:600px;">
                        <![endif]-->
                        <table border="0" cellpadding="0" cellspacing="0" width="100%" class="templateContainer">
                            <tr>
                                <td valign="top" id="templatePreheader"></td>
                            </tr>
                            <tr>
                                <td valign="top" id="templateHeader"><table class="mcnImageBlock" style="min-width:100%;" width="100%" cellspacing="0" cellpadding="0" border="0">
    <tbody class="mcnImageBlockOuter">
            <tr>
                <td style="padding:9px" class="mcnImageBlockInner" valign="top">
                    <table class="mcnImageContentContainer" style="min-width:100%;" width="100%" cellspacing="0" cellpadding="0" border="0" align="left">
                        <tbody><tr>
                            <td class="mcnImageContent" style="padding-right: 9px; padding-left: 9px; padding-top: 0; padding-bottom: 0; text-align:center;" valign="top">
                                
                                    
                                        <img alt="" src="https://clmeplus.org/app/uploads/2021/03/logo-clme-1.png" style="max-width:300px; padding-bottom: 0; vertical-align: bottom;" class="mcnImage" width="300" align="middle">
                                    
                                
                            </td>
                        </tr>
                    </tbody></table>
                </td>
            </tr>
    </tbody>
</table><table class="mcnDividerBlock" style="min-width:100%;" width="100%" cellspacing="0" cellpadding="0" border="0">
    <tbody class="mcnDividerBlockOuter">
        <tr>
            <td class="mcnDividerBlockInner" style="min-width:100%; padding:18px;">
                <table class="mcnDividerContent" style="min-width: 100%;border-top: 2px none #EAEAEA;" width="100%" cellspacing="0" cellpadding="0" border="0">
                    <tbody><tr>
                        <td>
                            <span></span>
                        </td>
                    </tr>
                </tbody></table>
<!--            
                <td class="mcnDividerBlockInner" style="padding: 18px;">
                <hr class="mcnDividerContent" style="border-bottom-color:none; border-left-color:none; border-right-color:none; border-bottom-width:0; border-left-width:0; border-right-width:0; margin-top:0; margin-right:0; margin-bottom:0; margin-left:0;" />
-->                 
            </td>
        </tr>
    </tbody>
</table></td>
                            </tr>
                            <tr>
                                <td valign="top" id="templateBody"><table class="mcnTextBlock" style="min-width:100%;" width="100%" cellspacing="0" cellpadding="0" border="0">
    <tbody class="mcnTextBlockOuter">
        <tr>
            <td class="mcnTextBlockInner" style="padding-top:9px;" valign="top">
                <!--[if mso]>
        <table align="left" border="0" cellspacing="0" cellpadding="0" width="100%" style="width:100%;">
        <tr>
        <![endif]-->
          
        <!--[if mso]>
        <td valign="top" width="600" style="width:600px;">
        <![endif]-->
                <table style="max-width:100%; min-width:100%;" class="mcnTextContentContainer" width="100%" cellspacing="0" cellpadding="0" border="0" align="left">
                    <tbody><tr>
                        
                        <td class="mcnTextContent" style="padding: 0px 18px 9px; font-family: Verdana;" valign="top">
                            <div style="padding: 0px 0; font-size: 16px; line-height: 32px; color: #666666; text-align: center;display: block;margin-bottom: 30px;">
                              <center> <br/> <h3 style="color: #5c6670; display: block; text-align: center;font-family: Verdana;">Your project profile has been updated!</h3> </center>
                            </div>          
                            <div style="padding: 0px 0; font-size: 16px; line-height: 32px; color: #666666;"> Dear '. $nombre_usuario .'<br><br>
Update on: ​<b>'. $pname.'</b> has been processed successfully. Thank you for your commitment with collaborative work for the Wider <b>Caribbean/CLME+ Region</b>. We encourage you to keep up the good work on maintaining your Project Profile (s) information as accurate as possible.</div>
                        </td>
                    </tr>
                </tbody></table>
        <!--[if mso]>
        </td>
        <![endif]-->
                
        <!--[if mso]>
        </tr>
        </table>
        <![endif]-->
            </td>
        </tr>
    </tbody>
</table><table class="mcnTextBlock" style="min-width:100%;" width="100%" cellspacing="0" cellpadding="0" border="0">
    <tbody class="mcnTextBlockOuter">
        <tr>
            <td class="mcnTextBlockInner" style="padding-top:9px;" valign="top">
                <!--[if mso]>
        <table align="left" border="0" cellspacing="0" cellpadding="0" width="100%" style="width:100%;">
        <tr>
        <![endif]-->
          
        <!--[if mso]>
        <td valign="top" width="600" style="width:600px;">
        <![endif]-->
                 <table style="max-width:100%; min-width:100%;" class="mcnTextContentContainer" width="100%" cellspacing="0" cellpadding="0" border="0" align="left">
                    <tbody><tr>
                        
                        <td class="mcnTextContent" style="padding: 0px 18px 9px; font-family: Verdana;" valign="top">
                        
                            <div style="padding: 10px 0; font-size: 16px; line-height: 32px; color: #666666;"> Thank you for working collaboratively for a healthier marine environment, and towards enhancing the well-being of the peoples in our region. </div>


                        </td>
                    </tr>
                </tbody></table>
        <!--[if mso]>
        </td>
        <![endif]-->
                
        <!--[if mso]>
        </tr>
        </table>
        <![endif]-->
            </td>
        </tr>
    </tbody>
</table><table class="mcnTextBlock" style="min-width:100%;" width="100%" cellspacing="0" cellpadding="0" border="0">
    <tbody class="mcnTextBlockOuter">
        <tr>
            <td class="mcnTextBlockInner" style="padding-top:9px;" valign="top">
                <!--[if mso]>
        <table align="left" border="0" cellspacing="0" cellpadding="0" width="100%" style="width:100%;">
        <tr>
        <![endif]-->
          
        <!--[if mso]>
        <td valign="top" width="600" style="width:600px;">
        <![endif]-->
                 <table style="max-width:100%; min-width:100%;" class="mcnTextContentContainer" width="100%" cellspacing="0" cellpadding="0" border="0" align="left">
                    <tbody><tr>
                        
                        <td class="mcnTextContent" style="padding: 0px 18px 9px; font-family: Verdana;" valign="top">
                        
                            <div style="padding: 10px 0; font-size: 16px; line-height: 32px; color: #666666;"> We invite you to further explore the content of our database and the CLME+ HUB <b>CLME+ HUB</b>  (<a href="https://clmeplus.org" target="_blank">www.clmeplus.org​</a>), as this may prove useful for identifying opportunities for synergies and collaboration with other planned and ongoing initiatives.</div>


                        </td>
                    </tr>
                </tbody></table>
        <!--[if mso]>
        </td>
        <![endif]-->
                
        <!--[if mso]>
        </tr>
        </table>
        <![endif]-->
            </td>
        </tr>
    </tbody>
</table><table class="mcnTextBlock" style="min-width:100%;" width="100%" cellspacing="0" cellpadding="0" border="0">
    <tbody class="mcnTextBlockOuter">
        <tr>
            <td class="mcnTextBlockInner" style="padding-top:9px;" valign="top">
                <!--[if mso]>
        <table align="left" border="0" cellspacing="0" cellpadding="0" width="100%" style="width:100%;">
        <tr>
        <![endif]-->
          
        <!--[if mso]>
        <td valign="top" width="600" style="width:600px;">
        <![endif]-->
                 <table style="max-width:100%; min-width:100%;" class="mcnTextContentContainer" width="100%" cellspacing="0" cellpadding="0" border="0" align="left">
                    <tbody><tr>
                        
                        <td class="mcnTextContent" style="padding: 0px 18px 9px; font-family: Verdana;" valign="top">
                        
                            <div style="padding: 10px 0; font-size: 16px; line-height: 32px; color: #666666;"> Also, please don’t hesitate to share your experiences regarding the use of the database with us. If you have any questions or comments feel free to contact us using the following e-mail:<br><br><a href="mailto:info@clmeplus.org">info@clmeplus.org</a></div>


                        </td>
                    </tr>
                </tbody></table>
        <!--[if mso]>
        </td>
        <![endif]-->
                
        <!--[if mso]>
        </tr>
        </table>
        <![endif]-->
            </td>
        </tr>
    </tbody>
</table><table class="mcnTextBlock" style="min-width:100%;" width="100%" cellspacing="0" cellpadding="0" border="0">
    <tbody class="mcnTextBlockOuter">
        <tr>
            <td class="mcnTextBlockInner" style="padding-top:9px;" valign="top">
                <!--[if mso]>
        <table align="left" border="0" cellspacing="0" cellpadding="0" width="100%" style="width:100%;">
        <tr>
        <![endif]-->
          
        <!--[if mso]>
        <td valign="top" width="600" style="width:600px;">
        <![endif]-->                
                <table style="max-width:100%; min-width:100%;" class="mcnTextContentContainer" width="100%" cellspacing="0" cellpadding="0" border="0" align="left">
                    <tbody><tr>
                        
                        <td class="mcnTextContent" style="padding: 0px 18px 9px; font-family: Verdana;" valign="top">
                        
                            <div style="padding: 20px 0; font-size: 16px; line-height: 32px; color: #666666;">
                            Best regards,
                            </div>
                        </td>
                    </tr>
                </tbody></table>
        <!--[if mso]>
        </td>
        <![endif]-->
                
        <!--[if mso]>
        </tr>
        </table>
        <![endif]-->
            </td>
        </tr>
    </tbody>
</table><table class="mcnTextBlock" style="min-width:100%;" width="100%" cellspacing="0" cellpadding="0" border="0">
    <tbody class="mcnTextBlockOuter">
        <tr>
            <td class="mcnTextBlockInner" style="padding-top:9px;" valign="top">
                <!--[if mso]>
        <table align="left" border="0" cellspacing="0" cellpadding="0" width="100%" style="width:100%;">
        <tr>
        <![endif]-->
          
        <!--[if mso]>
        <td valign="top" width="600" style="width:600px;">
        <![endif]-->
                

                 <table style="max-width:100%; min-width:100%;" class="mcnTextContentContainer" width="100%" cellspacing="0" cellpadding="0" border="0" align="left">
                    <tbody><tr>
                        
                        <td class="mcnTextContent" style="padding: 0px 18px 9px; font-family: Verdana;" valign="top">
                        
                            <div style="padding: 20px 0; font-size: 15px; line-height: 32px; color: #666666;">  <b>Patrick Debels</b><br>
              UNDP/GEF CLME+ Project Coordination Unit<br>
              Secretariat to the CLME+ Interim Coordination Mechanism<br>
              </div>
                        </td>
                    </tr>
                </tbody></table>
        <!--[if mso]>
        </td>
        <![endif]-->
                
        <!--[if mso]>
        </tr>
        </table>
        <![endif]-->
            </td>
        </tr>
    </tbody>
</table><table class="mcnImageBlock" style="min-width:100%;" width="100%" cellspacing="0" cellpadding="0" border="0">
    <tbody class="mcnImageBlockOuter">
            <tr>
                <td style="padding:9px" class="mcnImageBlockInner" valign="top">
                    <table class="mcnImageContentContainer" style="min-width:100%;" width="100%" cellspacing="0" cellpadding="0" border="0" align="left">
                        <tbody><tr>
                            <td class="mcnImageContent" style="padding-right: 9px; padding-left: 9px; padding-top: 0; padding-bottom: 0; text-align:center;" valign="top">
                                
                                    
                                        <img alt="" src="https://mcusercontent.com/bccdb651bd8a8f943adddbe6c/images/d89e6079-7469-4607-8d2a-ef9d58af832e.png" style="max-width:1000px; padding-bottom: 0; display: inline !important; vertical-align: bottom;" class="mcnImage" width="564" align="middle">
                                    
                                
                            </td>
                        </tr>
                    </tbody></table>
                </td>
            </tr>
    </tbody>
</table></td>
                            </tr>
                            <tr>
                                <td valign="top" id="templateFooter"></td>
                            </tr>
                        </table>
                        <!--[if (gte mso 9)|(IE)]>
                        </td>
                        </tr>
                        </table>
                        <![endif]-->
                        <!-- // END TEMPLATE -->
                    </td>
                </tr>
            </table>
        </center>
    </body>
</html>';


			$headers = array('Content-Type: text/html; charset=UTF-8','From: CLME+ HUB <info@clmeplus.org>');
			
			//$headers = array('Content-Type: text/html; charset=UTF-8','From: UNDP/GEF CLME+ <info@clmeplus.org>');
			if($pnewppi==0){
				
				wp_mail( $mail_usuario, 'Your project profile has been updated!', $mensajeuptate,$headers );
				//wp_mail( 'solutelematica@gmail.com', 'CLME+ HUB PPI', $message,$headers );
				
			}
			if($pnewppi==1){
				$textnewmsg="<br>Nuevo proyecto:".$_POST['pname']."<br><br>Use el link para ir:<a href='https://clmeplus.org/wp/wp-admin/post.php?post=".$post_id."&action=edit&lang=en'>https://clmeplus.org/wp/wp-admin/post.php?post=".$post_id."&action=edit&lang=en</a><br><br>Recuerde aprobarlo para su publicacion.<br><br>Atte, CLME+";
				//wp_mail( 'solutelematica@gmail.com', 'CLME+ HUB PPI', $textnewmsg,$headers );
				wp_mail( 'info@clmeplus.org', 'CLME+ HUB', $textnewmsg,$headers );
			//wp_mail( $_POST['pleadcontemail'], 'CLME+ HUB PPI', $message,$headers );



				//2021
			


			$headers_ppi = array('Content-Type: text/html; charset=UTF-8','From: CLME+ HUB <info@clmeplus.org>');

			$mensaje_ppi_publish = '<!doctype html>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office">
    <head>
        <!-- NAME: 1 COLUMN -->
        <!--[if gte mso 15]>
        <xml>
            <o:OfficeDocumentSettings>
            <o:AllowPNG/>
            <o:PixelsPerInch>96</o:PixelsPerInch>
            </o:OfficeDocumentSettings>
        </xml>
        <![endif]-->
        <meta charset="UTF-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <meta name="viewport" content="width=device-width, initial-scale=1">
        <title>*|MC:SUBJECT|*</title>
        
    <style type="text/css">
    p{
      margin:10px 0;
      padding:0;
      color: #666;
    }
    table{
      border-collapse:collapse;
    }
    h1,h2,h3,h4,h5,h6{
      display:block;
      margin:0;
      padding:0;
      font-family: Verdana;
      color: #666;
      font-weight: 500;
    }
    img,a img{
      border:0;
      height:auto;
      outline:none;
      text-decoration:none;
    }
    body,#bodyTable,#bodyCell{
      height:100%;
      margin:0;
      padding:0;
      width:100%;
    }
    .mcnPreviewText{
      display:none !important;
    }
    #outlook a{
      padding:0;
    }
    img{
      -ms-interpolation-mode:bicubic;
    }
    table{
      mso-table-lspace:0pt;
      mso-table-rspace:0pt;
    }
    .ReadMsgBody{
      width:100%;
    }
    .ExternalClass{
      width:100%;
    }
    p,a,li,td,blockquote{
      mso-line-height-rule:exactly;
    }
    a[href^=tel],a[href^=sms]{
      color:inherit;
      cursor:default;
      text-decoration:none;
    }
    p,a,li,td,body,table,blockquote{
      -ms-text-size-adjust:100%;
      -webkit-text-size-adjust:100%;
    }
    .ExternalClass,.ExternalClass p,.ExternalClass td,.ExternalClass div,.ExternalClass span,.ExternalClass font{
      line-height:100%;
    }
    a[x-apple-data-detectors]{
      color:inherit !important;
      text-decoration:none !important;
      font-size:inherit !important;
      font-family:inherit !important;
      font-weight:inherit !important;
      line-height:inherit !important;
    }
    #bodyCell{
      padding:10px;
    }
    .templateContainer{
      max-width:600px !important;
    }
    a.mcnButton{
      display:block;
    }
    .mcnImage,.mcnRetinaImage{
      vertical-align:bottom;
    }
    .mcnTextContent{
      word-break:break-word;
    }
    .mcnTextContent img{
      height:auto !important;
    }
    .mcnDividerBlock{
      table-layout:fixed !important;
    }
  
    body,#bodyTable{
      /*@editable*/background-color:#FFFFFF;
    }
  
    #bodyCell{
      /*@editable*/border-top:0;
    }
  
    .templateContainer{
      /*@editable*/border:0;
    }
  /*
  @tab Page
  @section Heading 1
  @tip Set the styling for all first-level headings in your emails. These should be the largest of your headings.
  @style heading 1
  */
    h1{
      /*@editable*/color:#202020;
      /*@editable*/font-family:Helvetica;
      /*@editable*/font-size:26px;
      /*@editable*/font-style:normal;
      /*@editable*/font-weight:bold;
      /*@editable*/line-height:125%;
      /*@editable*/letter-spacing:normal;
      /*@editable*/text-align:left;
    }
  /*
  @tab Page
  @section Heading 2
  @tip Set the styling for all second-level headings in your emails.
  @style heading 2
  */
    h2{
      /*@editable*/color:#202020;
      /*@editable*/font-family:Helvetica;
      /*@editable*/font-size:22px;
      /*@editable*/font-style:normal;
      /*@editable*/font-weight:bold;
      /*@editable*/line-height:125%;
      /*@editable*/letter-spacing:normal;
      /*@editable*/text-align:left;
    }
  /*
  @tab Page
  @section Heading 3
  @tip Set the styling for all third-level headings in your emails.
  @style heading 3
  */
    h3{
      /*@editable*/color:#202020;
      /*@editable*/font-family:Helvetica;
      /*@editable*/font-size:20px;
      /*@editable*/font-style:normal;
      /*@editable*/font-weight:bold;
      /*@editable*/line-height:125%;
      /*@editable*/letter-spacing:normal;
      /*@editable*/text-align:left;
    }
  /*
  @tab Page
  @section Heading 4
  @tip Set the styling for all fourth-level headings in your emails. These should be the smallest of your headings.
  @style heading 4
  */
    h4{
      /*@editable*/color:#202020;
      /*@editable*/font-family:Helvetica;
      /*@editable*/font-size:18px;
      /*@editable*/font-style:normal;
      /*@editable*/font-weight:bold;
      /*@editable*/line-height:125%;
      /*@editable*/letter-spacing:normal;
      /*@editable*/text-align:left;
    }
  
    #templatePreheader{
      /*@editable*/background-color:#FFFFFF;
      /*@editable*/background-image:none;
      /*@editable*/background-repeat:no-repeat;
      /*@editable*/background-position:center;
      /*@editable*/background-size:cover;
      /*@editable*/border-top:0;
      /*@editable*/border-bottom:0;
      /*@editable*/padding-top:9px;
      /*@editable*/padding-bottom:9px;
    }
  
    #templatePreheader .mcnTextContent,#templatePreheader .mcnTextContent p{
      /*@editable*/color:#656565;
      /*@editable*/font-family:Helvetica;
      /*@editable*/font-size:12px;
      /*@editable*/line-height:150%;
      /*@editable*/text-align:left;
    }
  
    #templatePreheader .mcnTextContent a,#templatePreheader .mcnTextContent p a{
      /*@editable*/color:#656565;
      /*@editable*/font-weight:normal;
      /*@editable*/text-decoration:underline;
    }
  
    #templateHeader{
      /*@editable*/background-color:#FFFFFF;
      /*@editable*/background-image:none;
      /*@editable*/background-repeat:no-repeat;
      /*@editable*/background-position:center;
      /*@editable*/background-size:cover;
      /*@editable*/border-top:0;
      /*@editable*/border-bottom:0;
      /*@editable*/padding-top:9px;
      /*@editable*/padding-bottom:0;
    }
  
    #templateHeader .mcnTextContent,#templateHeader .mcnTextContent p{
      /*@editable*/color:#202020;
      /*@editable*/font-family:Helvetica;
      /*@editable*/font-size:16px;
      /*@editable*/line-height:150%;
      /*@editable*/text-align:left;
    }
  
    #templateHeader .mcnTextContent a,#templateHeader .mcnTextContent p a{
      /*@editable*/color:#007C89;
      /*@editable*/font-weight:normal;
      /*@editable*/text-decoration:underline;
    }
  
    #templateBody{
      /*@editable*/background-color:#FFFFFF;
      /*@editable*/background-image:none;
      /*@editable*/background-repeat:no-repeat;
      /*@editable*/background-position:center;
      /*@editable*/background-size:cover;
      /*@editable*/border-top:0;
      /*@editable*/border-bottom:2px solid #EAEAEA;
      /*@editable*/padding-top:0;
      /*@editable*/padding-bottom:9px;
    }
  
    #templateBody .mcnTextContent,#templateBody .mcnTextContent p{
      /*@editable*/color:#202020;
      /*@editable*/font-family:Helvetica;
      /*@editable*/font-size:16px;
      /*@editable*/line-height:150%;
      /*@editable*/text-align:left;
    }
  
    #templateBody .mcnTextContent a,#templateBody .mcnTextContent p a{
      /*@editable*/color:#007C89;
      /*@editable*/font-weight:normal;
      /*@editable*/text-decoration:underline;
    }
  
    #templateFooter{
      /*@editable*/background-color:#FFFFFF;
      /*@editable*/background-image:none;
      /*@editable*/background-repeat:no-repeat;
      /*@editable*/background-position:center;
      /*@editable*/background-size:cover;
      /*@editable*/border-top:0;
      /*@editable*/border-bottom:0;
      /*@editable*/padding-top:9px;
      /*@editable*/padding-bottom:9px;
    }
  
    #templateFooter .mcnTextContent,#templateFooter .mcnTextContent p{
      /*@editable*/color:#656565;
      /*@editable*/font-family:Helvetica;
      /*@editable*/font-size:12px;
      /*@editable*/line-height:150%;
      /*@editable*/text-align:center;
    }
  
    #templateFooter .mcnTextContent a,#templateFooter .mcnTextContent p a{
      /*@editable*/color:#656565;
      /*@editable*/font-weight:normal;
      /*@editable*/text-decoration:underline;
    }
  @media only screen and (min-width:768px){
    .templateContainer{
      width:600px !important;
    }

} @media only screen and (max-width: 480px){
    body,table,td,p,a,li,blockquote{
      -webkit-text-size-adjust:none !important;
    }

} @media only screen and (max-width: 480px){
    body{
      width:100% !important;
      min-width:100% !important;
    }

} @media only screen and (max-width: 480px){
    .mcnRetinaImage{
      max-width:100% !important;
    }

} @media only screen and (max-width: 480px){
    .mcnImage{
      width:100% !important;
    }

} @media only screen and (max-width: 480px){
    .mcnCartContainer,.mcnCaptionTopContent,.mcnRecContentContainer,.mcnCaptionBottomContent,.mcnTextContentContainer,.mcnBoxedTextContentContainer,.mcnImageGroupContentContainer,.mcnCaptionLeftTextContentContainer,.mcnCaptionRightTextContentContainer,.mcnCaptionLeftImageContentContainer,.mcnCaptionRightImageContentContainer,.mcnImageCardLeftTextContentContainer,.mcnImageCardRightTextContentContainer,.mcnImageCardLeftImageContentContainer,.mcnImageCardRightImageContentContainer{
      max-width:100% !important;
      width:100% !important;
    }

} @media only screen and (max-width: 480px){
    .mcnBoxedTextContentContainer{
      min-width:100% !important;
    }

} @media only screen and (max-width: 480px){
    .mcnImageGroupContent{
      padding:9px !important;
    }

} @media only screen and (max-width: 480px){
    .mcnCaptionLeftContentOuter .mcnTextContent,.mcnCaptionRightContentOuter .mcnTextContent{
      padding-top:9px !important;
    }

} @media only screen and (max-width: 480px){
    .mcnImageCardTopImageContent,.mcnCaptionBottomContent:last-child .mcnCaptionBottomImageContent,.mcnCaptionBlockInner .mcnCaptionTopContent:last-child .mcnTextContent{
      padding-top:18px !important;
    }

} @media only screen and (max-width: 480px){
    .mcnImageCardBottomImageContent{
      padding-bottom:9px !important;
    }

} @media only screen and (max-width: 480px){
    .mcnImageGroupBlockInner{
      padding-top:0 !important;
      padding-bottom:0 !important;
    }

} @media only screen and (max-width: 480px){
    .mcnImageGroupBlockOuter{
      padding-top:9px !important;
      padding-bottom:9px !important;
    }

} @media only screen and (max-width: 480px){
    .mcnTextContent,.mcnBoxedTextContentColumn{
      padding-right:18px !important;
      padding-left:18px !important;
    }

} @media only screen and (max-width: 480px){
    .mcnImageCardLeftImageContent,.mcnImageCardRightImageContent{
      padding-right:18px !important;
      padding-bottom:0 !important;
      padding-left:18px !important;
    }

} @media only screen and (max-width: 480px){
    .mcpreview-image-uploader{
      display:none !important;
      width:100% !important;
    }

} @media only screen and (max-width: 480px){
  /*
  @tab Mobile Styles
  @section Heading 1
  @tip Make the first-level headings larger in size for better readability on small screens.
  */
    h1{
      /*@editable*/font-size:22px !important;
      /*@editable*/line-height:125% !important;
    }

} @media only screen and (max-width: 480px){
  /*
  @tab Mobile Styles
  @section Heading 2
  @tip Make the second-level headings larger in size for better readability on small screens.
  */
    h2{
      /*@editable*/font-size:20px !important;
      /*@editable*/line-height:125% !important;
    }

} @media only screen and (max-width: 480px){
  /*
  @tab Mobile Styles
  @section Heading 3
  @tip Make the third-level headings larger in size for better readability on small screens.
  */
    h3{
      /*@editable*/font-size:18px !important;
      /*@editable*/line-height:125% !important;
    }

} @media only screen and (max-width: 480px){
  /*
  @tab Mobile Styles
  @section Heading 4
  @tip Make the fourth-level headings larger in size for better readability on small screens.
  */
    h4{
      /*@editable*/font-size:16px !important;
      /*@editable*/line-height:150% !important;
    }

} @media only screen and (max-width: 480px){
  /*
  @tab Mobile Styles
  @section Boxed Text
  @tip Make the boxed text larger in size for better readability on small screens. We recommend a font size of at least 16px.
  */
    .mcnBoxedTextContentContainer .mcnTextContent,.mcnBoxedTextContentContainer .mcnTextContent p{
      /*@editable*/font-size:14px !important;
      /*@editable*/line-height:150% !important;
    }

} @media only screen and (max-width: 480px){
  
    #templatePreheader{
      /*@editable*/display:block !important;
    }

} @media only screen and (max-width: 480px){
  /*
  @tab Mobile Styles
  @section Preheader Text
  @tip Make the preheader text larger in size for better readability on small screens.
  */
    #templatePreheader .mcnTextContent,#templatePreheader .mcnTextContent p{
      /*@editable*/font-size:14px !important;
      /*@editable*/line-height:150% !important;
    }

} @media only screen and (max-width: 480px){
  /*
  @tab Mobile Styles
  @section Header Text
  @tip Make the header text larger in size for better readability on small screens.
  */
    #templateHeader .mcnTextContent,#templateHeader .mcnTextContent p{
      /*@editable*/font-size:16px !important;
      /*@editable*/line-height:150% !important;
    }

} @media only screen and (max-width: 480px){
  /*
  @tab Mobile Styles
  @section Body Text
  @tip Make the body text larger in size for better readability on small screens. We recommend a font size of at least 16px.
  */
    #templateBody .mcnTextContent,#templateBody .mcnTextContent p{
      /*@editable*/font-size:16px !important;
      /*@editable*/line-height:150% !important;
    }

} @media only screen and (max-width: 480px){
  /*
  @tab Mobile Styles
  @section Footer Text
  @tip Make the footer content text larger in size for better readability on small screens.
  */
    #templateFooter .mcnTextContent,#templateFooter .mcnTextContent p{
      /*@editable*/font-size:14px !important;
      /*@editable*/line-height:150% !important;
    }

}</style></head>
    <body>
        
        <center>
            <table align="center" border="0" cellpadding="0" cellspacing="0" height="100%" width="100%" id="bodyTable">
                <tr>
                    <td align="center" valign="top" id="bodyCell">
                        <!-- BEGIN TEMPLATE // -->
                        <!--[if (gte mso 9)|(IE)]>
                        <table align="center" border="0" cellspacing="0" cellpadding="0" width="600" style="width:600px;">
                        <tr>
                        <td align="center" valign="top" width="600" style="width:600px;">
                        <![endif]-->
                        <table border="0" cellpadding="0" cellspacing="0" width="100%" class="templateContainer">
                            <tr>
                                <td valign="top" id="templatePreheader"></td>
                            </tr>
                            <tr>
                                <td valign="top" id="templateHeader"><table class="mcnImageBlock" style="min-width:100%;" width="100%" cellspacing="0" cellpadding="0" border="0">
    <tbody class="mcnImageBlockOuter">
            <tr>
                <td style="padding:9px" class="mcnImageBlockInner" valign="top">
                    <table class="mcnImageContentContainer" style="min-width:100%;" width="100%" cellspacing="0" cellpadding="0" border="0" align="left">
                        <tbody><tr>
                            <td class="mcnImageContent" style="padding-right: 9px; padding-left: 9px; padding-top: 0; padding-bottom: 0; text-align:center;" valign="top">
                                
                                    
                                        <img alt="" src="https://clmeplus.org/app/uploads/2021/03/logo-clme-1.png" style="max-width:300px; padding-bottom: 0; vertical-align: bottom;" class="mcnImage" width="300" align="middle">
                                    
                                
                            </td>
                        </tr>
                    </tbody></table>
                </td>
            </tr>
    </tbody>
</table><table class="mcnDividerBlock" style="min-width:100%;" width="100%" cellspacing="0" cellpadding="0" border="0">
    <tbody class="mcnDividerBlockOuter">
        <tr>
            <td class="mcnDividerBlockInner" style="min-width:100%; padding:18px;">
                <table class="mcnDividerContent" style="min-width: 100%;border-top: 2px none #EAEAEA;" width="100%" cellspacing="0" cellpadding="0" border="0">
                    <tbody><tr>
                        <td>
                            <span></span>
                        </td>
                    </tr>
                </tbody></table>
<!--            
                <td class="mcnDividerBlockInner" style="padding: 18px;">
                <hr class="mcnDividerContent" style="border-bottom-color:none; border-left-color:none; border-right-color:none; border-bottom-width:0; border-left-width:0; border-right-width:0; margin-top:0; margin-right:0; margin-bottom:0; margin-left:0;" />
-->                 
            </td>
        </tr>
    </tbody>
</table></td>
                            </tr>
                            <tr>
                                <td valign="top" id="templateBody"><table class="mcnTextBlock" style="min-width:100%;" width="100%" cellspacing="0" cellpadding="0" border="0">
    <tbody class="mcnTextBlockOuter">
        <tr>
            <td class="mcnTextBlockInner" style="padding-top:9px;" valign="top">
                <!--[if mso]>
        <table align="left" border="0" cellspacing="0" cellpadding="0" width="100%" style="width:100%;">
        <tr>
        <![endif]-->
          
        <!--[if mso]>
        <td valign="top" width="600" style="width:600px;">
        <![endif]-->
                <table style="max-width:100%; min-width:100%;" class="mcnTextContentContainer" width="100%" cellspacing="0" cellpadding="0" border="0" align="left">
                    <tbody><tr>
                        
                        <td class="mcnTextContent" style="padding: 0px 18px 9px; font-family: Verdana;" valign="top">
                            <div style="padding: 0px 0; font-size: 16px; line-height: 32px; color: #666666; text-align: center;display: block;margin-bottom: 30px;">
                              <center> <br/> <h3 style="color: #5c6670; display: block; text-align: center;font-family: Verdana;">Your project profile has been published!</h3> </center>
                            </div>          
                            <div style="padding: 0px 0; font-size: 16px; line-height: 32px; color: #666666;"> Dear '. $nombre_usuario .'<br>
 Thank you very much for using our online form to create a “Project Profile” for your Initiative: '.$pname.'. This profile has been published and will now be included in the <b>"Projects Database” for the Wider Caribbean/CLME+ region​ on the CLME+ HUB.</div>


                        </td>
                    </tr>
                </tbody></table>
        <!--[if mso]>
        </td>
        <![endif]-->
                
        <!--[if mso]>
        </tr>
        </table>
        <![endif]-->
            </td>
        </tr>
    </tbody>
</table><table class="mcnDividerBlock" style="min-width:100%;" width="100%" cellspacing="0" cellpadding="0" border="0">
    <tbody class="mcnDividerBlockOuter">
        <tr>
            <td class="mcnDividerBlockInner" style="min-width: 100%; padding: 15px 18px;">
                <table class="mcnDividerContent" style="min-width: 100%;border-top: 2px none #EAEAEA;" width="100%" cellspacing="0" cellpadding="0" border="0">
                    <tbody><tr>
                        <td>
                            <span></span>
                        </td>
                    </tr>
                </tbody></table>
<!--            
                <td class="mcnDividerBlockInner" style="padding: 18px;">
                <hr class="mcnDividerContent" style="border-bottom-color:none; border-left-color:none; border-right-color:none; border-bottom-width:0; border-left-width:0; border-right-width:0; margin-top:0; margin-right:0; margin-bottom:0; margin-left:0;" />
-->
            </td>
        </tr>
    </tbody>
</table><table class="mcnTextBlock" style="min-width:100%;" width="100%" cellspacing="0" cellpadding="0" border="0">
    <tbody class="mcnTextBlockOuter">
        <tr>
            <td class="mcnTextBlockInner" style="padding-top:9px;" valign="top">
                <!--[if mso]>
        <table align="left" border="0" cellspacing="0" cellpadding="0" width="100%" style="width:100%;">
        <tr>
        <![endif]-->
          
        <!--[if mso]>
        <td valign="top" width="600" style="width:600px;">
        <![endif]-->
                 <table style="max-width:100%; min-width:100%;" class="mcnTextContentContainer" width="100%" cellspacing="0" cellpadding="0" border="0" align="left">
                    <tbody><tr>
                        
                        <td class="mcnTextContent" style="padding: 0px 18px 9px; font-family: Verdana;" valign="top">
                        
                            <div style="padding: 10px 0; font-size: 16px; line-height: 32px; color: #666666;"> We would now also like to invite you to periodically update the content of your Project Profile(s), to make sure that the information available on the CLME+ HUB remains as accurate as possible.</div>


                        </td>
                    </tr>
                </tbody></table>
        <!--[if mso]>
        </td>
        <![endif]-->
                
        <!--[if mso]>
        </tr>
        </table>
        <![endif]-->
            </td>
        </tr>
    </tbody>
</table><table class="mcnTextBlock" style="min-width:100%;" width="100%" cellspacing="0" cellpadding="0" border="0">
    <tbody class="mcnTextBlockOuter">
        <tr>
            <td class="mcnTextBlockInner" style="padding-top:9px;" valign="top">
                <!--[if mso]>
        <table align="left" border="0" cellspacing="0" cellpadding="0" width="100%" style="width:100%;">
        <tr>
        <![endif]-->
          
        <!--[if mso]>
        <td valign="top" width="600" style="width:600px;">
        <![endif]-->
                 <table style="max-width:100%; min-width:100%;" class="mcnTextContentContainer" width="100%" cellspacing="0" cellpadding="0" border="0" align="left">
                    <tbody><tr>
                        
                        <td class="mcnTextContent" style="padding: 0px 18px 9px; font-family: Verdana;" valign="top">
                        
                            <div style="padding: 10px 0; font-size: 16px; line-height: 32px; color: #666666;"> Please note that you will be able to re-gain access to the online form and edit the content of your Project Profile(s) at any time by just login into the Hub.</div>


                        </td>
                    </tr>
                </tbody></table>
        <!--[if mso]>
        </td>
        <![endif]-->
                
        <!--[if mso]>
        </tr>
        </table>
        <![endif]-->
            </td>
        </tr>
    </tbody>
</table><table class="mcnTextBlock" style="min-width:100%;" width="100%" cellspacing="0" cellpadding="0" border="0">
    <tbody class="mcnTextBlockOuter">
        <tr>
            <td class="mcnTextBlockInner" style="padding-top:9px;" valign="top">
                <!--[if mso]>
        <table align="left" border="0" cellspacing="0" cellpadding="0" width="100%" style="width:100%;">
        <tr>
        <![endif]-->
          
        <!--[if mso]>
        <td valign="top" width="600" style="width:600px;">
        <![endif]-->
                 <table style="max-width:100%; min-width:100%;" class="mcnTextContentContainer" width="100%" cellspacing="0" cellpadding="0" border="0" align="left">
                    <tbody><tr>
                        
                        <td class="mcnTextContent" style="padding: 0px 18px 9px; font-family: Verdana;" valign="top">
                        
                            <div style="padding: 10px 0; font-size: 16px; line-height: 32px; color: #666666;"> Thank you for working collaboratively for a healthier marine environment, and towards enhancing the well-being of the peoples in our region.</div>


                        </td>
                    </tr>
                </tbody></table>
        <!--[if mso]>
        </td>
        <![endif]-->
                
        <!--[if mso]>
        </tr>
        </table>
        <![endif]-->
            </td>
        </tr>
    </tbody>
</table><table class="mcnTextBlock" style="min-width:100%;" width="100%" cellspacing="0" cellpadding="0" border="0">
    <tbody class="mcnTextBlockOuter">
        <tr>
            <td class="mcnTextBlockInner" style="padding-top:9px;" valign="top">
                <!--[if mso]>
        <table align="left" border="0" cellspacing="0" cellpadding="0" width="100%" style="width:100%;">
        <tr>
        <![endif]-->
          
        <!--[if mso]>
        <td valign="top" width="600" style="width:600px;">
        <![endif]-->
                 <table style="max-width:100%; min-width:100%;" class="mcnTextContentContainer" width="100%" cellspacing="0" cellpadding="0" border="0" align="left">
                    <tbody><tr>
                        
                        <td class="mcnTextContent" style="padding: 0px 18px 9px; font-family: Verdana;" valign="top">
                        
                            <div style="padding: 10px 0; font-size: 16px; line-height: 32px; color: #666666;"> We encourage you to further explore the content of our database and the ​<b>CLME+ HUB</b> (<a href="http://www.clmeplus.org​" target="_blank">www.clmeplus.org​</a>), as this may prove useful for identifying opportunities for synergies and collaboration with other people in the region.</div>


                        </td>
                    </tr>
                </tbody></table>
        <!--[if mso]>
        </td>
        <![endif]-->
                
        <!--[if mso]>
        </tr>
        </table>
        <![endif]-->
            </td>
        </tr>
    </tbody>
</table><table class="mcnTextBlock" style="min-width:100%;" width="100%" cellspacing="0" cellpadding="0" border="0">
    <tbody class="mcnTextBlockOuter">
        <tr>
            <td class="mcnTextBlockInner" style="padding-top:9px;" valign="top">
                <!--[if mso]>
        <table align="left" border="0" cellspacing="0" cellpadding="0" width="100%" style="width:100%;">
        <tr>
        <![endif]-->
          
        <!--[if mso]>
        <td valign="top" width="600" style="width:600px;">
        <![endif]-->
                 <table style="max-width:100%; min-width:100%;" class="mcnTextContentContainer" width="100%" cellspacing="0" cellpadding="0" border="0" align="left">
                    <tbody><tr>
                        
                        <td class="mcnTextContent" style="padding: 0px 18px 9px; font-family: Verdana;" valign="top">
                        
                            <div style="padding: 10px 0; font-size: 16px; line-height: 32px; color: #666666;"> Also, please don’t hesitate to share your experiences regarding the use of the database with us. If you have any questions or comments feel free to contact us using the following e-mail:<br><br><a href="mailto:info@clmeplus.org">info@clmeplus.org</a></div>


                        </td>
                    </tr>
                </tbody></table>
        <!--[if mso]>
        </td>
        <![endif]-->
                
        <!--[if mso]>
        </tr>
        </table>
        <![endif]-->
            </td>
        </tr>
    </tbody>
</table><table class="mcnTextBlock" style="min-width:100%;" width="100%" cellspacing="0" cellpadding="0" border="0">
    <tbody class="mcnTextBlockOuter">
        <tr>
            <td class="mcnTextBlockInner" style="padding-top:9px;" valign="top">
                <!--[if mso]>
        <table align="left" border="0" cellspacing="0" cellpadding="0" width="100%" style="width:100%;">
        <tr>
        <![endif]-->
          
        <!--[if mso]>
        <td valign="top" width="600" style="width:600px;">
        <![endif]-->                
                <table style="max-width:100%; min-width:100%;" class="mcnTextContentContainer" width="100%" cellspacing="0" cellpadding="0" border="0" align="left">
                    <tbody><tr>
                        
                        <td class="mcnTextContent" style="padding: 0px 18px 9px; font-family: Verdana;" valign="top">
                        
                            <div style="padding: 20px 0; font-size: 16px; line-height: 32px; color: #666666;">
                            Best regards,
                            </div>
                        </td>
                    </tr>
                </tbody></table>
        <!--[if mso]>
        </td>
        <![endif]-->
                
        <!--[if mso]>
        </tr>
        </table>
        <![endif]-->
            </td>
        </tr>
    </tbody>
</table><table class="mcnTextBlock" style="min-width:100%;" width="100%" cellspacing="0" cellpadding="0" border="0">
    <tbody class="mcnTextBlockOuter">
        <tr>
            <td class="mcnTextBlockInner" style="padding-top:9px;" valign="top">
                <!--[if mso]>
        <table align="left" border="0" cellspacing="0" cellpadding="0" width="100%" style="width:100%;">
        <tr>
        <![endif]-->
          
        <!--[if mso]>
        <td valign="top" width="600" style="width:600px;">
        <![endif]-->
                

                 <table style="max-width:100%; min-width:100%;" class="mcnTextContentContainer" width="100%" cellspacing="0" cellpadding="0" border="0" align="left">
                    <tbody><tr>
                        
                        <td class="mcnTextContent" style="padding: 0px 18px 9px; font-family: Verdana;" valign="top">
                        
                            <div style="padding: 20px 0; font-size: 16px; line-height: 32px; color: #666666;">  <b>Patrick Debels</b><br>
              UNDP/GEF CLME+ Project Coordination Unit<br>
              Secretariat to the CLME+ Interim Coordination Mechanism<br>
             </div>
                        </td>
                    </tr>
                </tbody></table>
        <!--[if mso]>
        </td>
        <![endif]-->
                
        <!--[if mso]>
        </tr>
        </table>
        <![endif]-->
            </td>
        </tr>
    </tbody>
</table><table class="mcnImageBlock" style="min-width:100%;" width="100%" cellspacing="0" cellpadding="0" border="0">
    <tbody class="mcnImageBlockOuter">
            <tr>
                <td style="padding:9px" class="mcnImageBlockInner" valign="top">
                    <table class="mcnImageContentContainer" style="min-width:100%;" width="100%" cellspacing="0" cellpadding="0" border="0" align="left">
                        <tbody><tr>
                            <td class="mcnImageContent" style="padding-right: 9px; padding-left: 9px; padding-top: 0; padding-bottom: 0; text-align:center;" valign="top">
                                
                                    
                                        <img alt="" src="https://mcusercontent.com/bccdb651bd8a8f943adddbe6c/images/d89e6079-7469-4607-8d2a-ef9d58af832e.png" style="max-width:1000px; padding-bottom: 0; display: inline !important; vertical-align: bottom;" class="mcnImage" width="564" align="middle">
                                    
                                
                            </td>
                        </tr>
                    </tbody></table>
                </td>
            </tr>
    </tbody>
</table></td>
                            </tr>
                            <tr>
                                <td valign="top" id="templateFooter"></td>
                            </tr>
                        </table>
                        <!--[if (gte mso 9)|(IE)]>
                        </td>
                        </tr>
                        </table>
                        <![endif]-->
                        <!-- // END TEMPLATE -->
                    </td>
                </tr>
            </table>
        </center>
    </body>
</html>';

		    if ( user_can( $current_user, "um_usuario-verificado" ) ){
		      // Check user object has not got subscriber role
		        $post_status_new = 'publish';
		        wp_mail( $mail_usuario, 'Your project profile has been published!', $mensaje_ppi_publish,$headers_ppi );

		    } else if ( user_can( $current_user, "um_usuario-icm" ) ) {
		        $post_status_new = 'publish';

		        wp_mail( $mail_usuario, 'Your project profile has been published!', $mensaje_ppi_publish,$headers_ppi );
				//wp_mail( $author_mail, 'CLME+ HUB PPI', $message_approval,$headers );	

		    }else{

		        $post_status_new = 'pending';
		    }
			


		    // 2121
		    if ($_POST['pleadcontemail'] != $mail_usuario ) {

		    	$leadcontactmail  = $_POST['pleadcontemail'];
		    	$leadcontact_name = $_POST['pleadcont'];
		    	$fecha 			  = date("Y/m/d");

		    	$messagelead = '<!doctype html>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office">
    <head>
        <!-- NAME: 1 COLUMN -->
        <!--[if gte mso 15]>
        <xml>
            <o:OfficeDocumentSettings>
            <o:AllowPNG/>
            <o:PixelsPerInch>96</o:PixelsPerInch>
            </o:OfficeDocumentSettings>
        </xml>
        <![endif]-->
        <meta charset="UTF-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <meta name="viewport" content="width=device-width, initial-scale=1">

        
    <style type="text/css">
    p{
      margin:10px 0;
      padding:0;
      color: #666;
    }
    table{
      border-collapse:collapse;
    }
    h1,h2,h3,h4,h5,h6{
      display:block;
      margin:0;
      padding:0;
      font-family: Verdana;
      color: #666;
      font-weight: 500;
    }
    img,a img{
      border:0;
      height:auto;
      outline:none;
      text-decoration:none;
    }
    body,#bodyTable,#bodyCell{
      height:100%;
      margin:0;
      padding:0;
      width:100%;
    }
    .mcnPreviewText{
      display:none !important;
    }
    #outlook a{
      padding:0;
    }
    img{
      -ms-interpolation-mode:bicubic;
    }
    table{
      mso-table-lspace:0pt;
      mso-table-rspace:0pt;
    }
    .ReadMsgBody{
      width:100%;
    }
    .ExternalClass{
      width:100%;
    }
    p,a,li,td,blockquote{
      mso-line-height-rule:exactly;
    }
    a[href^=tel],a[href^=sms]{
      color:inherit;
      cursor:default;
      text-decoration:none;
    }
    p,a,li,td,body,table,blockquote{
      -ms-text-size-adjust:100%;
      -webkit-text-size-adjust:100%;
    }
    .ExternalClass,.ExternalClass p,.ExternalClass td,.ExternalClass div,.ExternalClass span,.ExternalClass font{
      line-height:100%;
    }
    a[x-apple-data-detectors]{
      color:inherit !important;
      text-decoration:none !important;
      font-size:inherit !important;
      font-family:inherit !important;
      font-weight:inherit !important;
      line-height:inherit !important;
    }
    #bodyCell{
      padding:10px;
    }
    .templateContainer{
      max-width:600px !important;
    }
    a.mcnButton{
      display:block;
    }
    .mcnImage,.mcnRetinaImage{
      vertical-align:bottom;
    }
    .mcnTextContent{
      word-break:break-word;
    }
    .mcnTextContent img{
      height:auto !important;
    }
    .mcnDividerBlock{
      table-layout:fixed !important;
    }
  
    body,#bodyTable{
      /*@editable*/background-color:#FFFFFF;
    }
  
    #bodyCell{
      /*@editable*/border-top:0;
    }
  
    .templateContainer{
      /*@editable*/border:0;
    }
  /*
  @tab Page
  @section Heading 1
  @tip Set the styling for all first-level headings in your emails. These should be the largest of your headings.
  @style heading 1
  */
    h1{
      /*@editable*/color:#202020;
      /*@editable*/font-family:Helvetica;
      /*@editable*/font-size:26px;
      /*@editable*/font-style:normal;
      /*@editable*/font-weight:bold;
      /*@editable*/line-height:125%;
      /*@editable*/letter-spacing:normal;
      /*@editable*/text-align:left;
    }
  /*
  @tab Page
  @section Heading 2
  @tip Set the styling for all second-level headings in your emails.
  @style heading 2
  */
    h2{
      /*@editable*/color:#202020;
      /*@editable*/font-family:Helvetica;
      /*@editable*/font-size:22px;
      /*@editable*/font-style:normal;
      /*@editable*/font-weight:bold;
      /*@editable*/line-height:125%;
      /*@editable*/letter-spacing:normal;
      /*@editable*/text-align:left;
    }
  /*
  @tab Page
  @section Heading 3
  @tip Set the styling for all third-level headings in your emails.
  @style heading 3
  */
    h3{
      /*@editable*/color:#202020;
      /*@editable*/font-family:Helvetica;
      /*@editable*/font-size:20px;
      /*@editable*/font-style:normal;
      /*@editable*/font-weight:bold;
      /*@editable*/line-height:125%;
      /*@editable*/letter-spacing:normal;
      /*@editable*/text-align:left;
    }
  /*
  @tab Page
  @section Heading 4
  @tip Set the styling for all fourth-level headings in your emails. These should be the smallest of your headings.
  @style heading 4
  */
    h4{
      /*@editable*/color:#202020;
      /*@editable*/font-family:Helvetica;
      /*@editable*/font-size:18px;
      /*@editable*/font-style:normal;
      /*@editable*/font-weight:bold;
      /*@editable*/line-height:125%;
      /*@editable*/letter-spacing:normal;
      /*@editable*/text-align:left;
    }
  
    #templatePreheader{
      /*@editable*/background-color:#FFFFFF;
      /*@editable*/background-image:none;
      /*@editable*/background-repeat:no-repeat;
      /*@editable*/background-position:center;
      /*@editable*/background-size:cover;
      /*@editable*/border-top:0;
      /*@editable*/border-bottom:0;
      /*@editable*/padding-top:9px;
      /*@editable*/padding-bottom:9px;
    }
  
    #templatePreheader .mcnTextContent,#templatePreheader .mcnTextContent p{
      /*@editable*/color:#656565;
      /*@editable*/font-family:Helvetica;
      /*@editable*/font-size:12px;
      /*@editable*/line-height:150%;
      /*@editable*/text-align:left;
    }
  
    #templatePreheader .mcnTextContent a,#templatePreheader .mcnTextContent p a{
      /*@editable*/color:#656565;
      /*@editable*/font-weight:normal;
      /*@editable*/text-decoration:underline;
    }
  
    #templateHeader{
      /*@editable*/background-color:#FFFFFF;
      /*@editable*/background-image:none;
      /*@editable*/background-repeat:no-repeat;
      /*@editable*/background-position:center;
      /*@editable*/background-size:cover;
      /*@editable*/border-top:0;
      /*@editable*/border-bottom:0;
      /*@editable*/padding-top:9px;
      /*@editable*/padding-bottom:0;
    }
  
    #templateHeader .mcnTextContent,#templateHeader .mcnTextContent p{
      /*@editable*/color:#202020;
      /*@editable*/font-family:Helvetica;
      /*@editable*/font-size:16px;
      /*@editable*/line-height:150%;
      /*@editable*/text-align:left;
    }
  
    #templateHeader .mcnTextContent a,#templateHeader .mcnTextContent p a{
      /*@editable*/color:#007C89;
      /*@editable*/font-weight:normal;
      /*@editable*/text-decoration:underline;
    }
  
    #templateBody{
      /*@editable*/background-color:#FFFFFF;
      /*@editable*/background-image:none;
      /*@editable*/background-repeat:no-repeat;
      /*@editable*/background-position:center;
      /*@editable*/background-size:cover;
      /*@editable*/border-top:0;
      /*@editable*/border-bottom:2px solid #EAEAEA;
      /*@editable*/padding-top:0;
      /*@editable*/padding-bottom:9px;
    }
  
    #templateBody .mcnTextContent,#templateBody .mcnTextContent p{
      /*@editable*/color:#202020;
      /*@editable*/font-family:Helvetica;
      /*@editable*/font-size:16px;
      /*@editable*/line-height:150%;
      /*@editable*/text-align:left;
    }
  
    #templateBody .mcnTextContent a,#templateBody .mcnTextContent p a{
      /*@editable*/color:#007C89;
      /*@editable*/font-weight:normal;
      /*@editable*/text-decoration:underline;
    }
  
    #templateFooter{
      /*@editable*/background-color:#FFFFFF;
      /*@editable*/background-image:none;
      /*@editable*/background-repeat:no-repeat;
      /*@editable*/background-position:center;
      /*@editable*/background-size:cover;
      /*@editable*/border-top:0;
      /*@editable*/border-bottom:0;
      /*@editable*/padding-top:9px;
      /*@editable*/padding-bottom:9px;
    }
  
    #templateFooter .mcnTextContent,#templateFooter .mcnTextContent p{
      /*@editable*/color:#656565;
      /*@editable*/font-family:Helvetica;
      /*@editable*/font-size:12px;
      /*@editable*/line-height:150%;
      /*@editable*/text-align:center;
    }
  
    #templateFooter .mcnTextContent a,#templateFooter .mcnTextContent p a{
      /*@editable*/color:#656565;
      /*@editable*/font-weight:normal;
      /*@editable*/text-decoration:underline;
    }
  @media only screen and (min-width:768px){
    .templateContainer{
      width:600px !important;
    }

} @media only screen and (max-width: 480px){
    body,table,td,p,a,li,blockquote{
      -webkit-text-size-adjust:none !important;
    }

} @media only screen and (max-width: 480px){
    body{
      width:100% !important;
      min-width:100% !important;
    }

} @media only screen and (max-width: 480px){
    .mcnRetinaImage{
      max-width:100% !important;
    }

} @media only screen and (max-width: 480px){
    .mcnImage{
      width:100% !important;
    }

} @media only screen and (max-width: 480px){
    .mcnCartContainer,.mcnCaptionTopContent,.mcnRecContentContainer,.mcnCaptionBottomContent,.mcnTextContentContainer,.mcnBoxedTextContentContainer,.mcnImageGroupContentContainer,.mcnCaptionLeftTextContentContainer,.mcnCaptionRightTextContentContainer,.mcnCaptionLeftImageContentContainer,.mcnCaptionRightImageContentContainer,.mcnImageCardLeftTextContentContainer,.mcnImageCardRightTextContentContainer,.mcnImageCardLeftImageContentContainer,.mcnImageCardRightImageContentContainer{
      max-width:100% !important;
      width:100% !important;
    }

} @media only screen and (max-width: 480px){
    .mcnBoxedTextContentContainer{
      min-width:100% !important;
    }

} @media only screen and (max-width: 480px){
    .mcnImageGroupContent{
      padding:9px !important;
    }

} @media only screen and (max-width: 480px){
    .mcnCaptionLeftContentOuter .mcnTextContent,.mcnCaptionRightContentOuter .mcnTextContent{
      padding-top:9px !important;
    }

} @media only screen and (max-width: 480px){
    .mcnImageCardTopImageContent,.mcnCaptionBottomContent:last-child .mcnCaptionBottomImageContent,.mcnCaptionBlockInner .mcnCaptionTopContent:last-child .mcnTextContent{
      padding-top:18px !important;
    }

} @media only screen and (max-width: 480px){
    .mcnImageCardBottomImageContent{
      padding-bottom:9px !important;
    }

} @media only screen and (max-width: 480px){
    .mcnImageGroupBlockInner{
      padding-top:0 !important;
      padding-bottom:0 !important;
    }

} @media only screen and (max-width: 480px){
    .mcnImageGroupBlockOuter{
      padding-top:9px !important;
      padding-bottom:9px !important;
    }

} @media only screen and (max-width: 480px){
    .mcnTextContent,.mcnBoxedTextContentColumn{
      padding-right:18px !important;
      padding-left:18px !important;
    }

} @media only screen and (max-width: 480px){
    .mcnImageCardLeftImageContent,.mcnImageCardRightImageContent{
      padding-right:18px !important;
      padding-bottom:0 !important;
      padding-left:18px !important;
    }

} @media only screen and (max-width: 480px){
    .mcpreview-image-uploader{
      display:none !important;
      width:100% !important;
    }

} @media only screen and (max-width: 480px){
  /*
  @tab Mobile Styles
  @section Heading 1
  @tip Make the first-level headings larger in size for better readability on small screens.
  */
    h1{
      /*@editable*/font-size:22px !important;
      /*@editable*/line-height:125% !important;
    }

} @media only screen and (max-width: 480px){
  /*
  @tab Mobile Styles
  @section Heading 2
  @tip Make the second-level headings larger in size for better readability on small screens.
  */
    h2{
      /*@editable*/font-size:20px !important;
      /*@editable*/line-height:125% !important;
    }

} @media only screen and (max-width: 480px){
  /*
  @tab Mobile Styles
  @section Heading 3
  @tip Make the third-level headings larger in size for better readability on small screens.
  */
    h3{
      /*@editable*/font-size:18px !important;
      /*@editable*/line-height:125% !important;
    }

} @media only screen and (max-width: 480px){
  /*
  @tab Mobile Styles
  @section Heading 4
  @tip Make the fourth-level headings larger in size for better readability on small screens.
  */
    h4{
      /*@editable*/font-size:16px !important;
      /*@editable*/line-height:150% !important;
    }

} @media only screen and (max-width: 480px){
  /*
  @tab Mobile Styles
  @section Boxed Text
  @tip Make the boxed text larger in size for better readability on small screens. We recommend a font size of at least 16px.
  */
    .mcnBoxedTextContentContainer .mcnTextContent,.mcnBoxedTextContentContainer .mcnTextContent p{
      /*@editable*/font-size:14px !important;
      /*@editable*/line-height:150% !important;
    }

} @media only screen and (max-width: 480px){
  
    #templatePreheader{
      /*@editable*/display:block !important;
    }

} @media only screen and (max-width: 480px){
  /*
  @tab Mobile Styles
  @section Preheader Text
  @tip Make the preheader text larger in size for better readability on small screens.
  */
    #templatePreheader .mcnTextContent,#templatePreheader .mcnTextContent p{
      /*@editable*/font-size:14px !important;
      /*@editable*/line-height:150% !important;
    }

} @media only screen and (max-width: 480px){
  /*
  @tab Mobile Styles
  @section Header Text
  @tip Make the header text larger in size for better readability on small screens.
  */
    #templateHeader .mcnTextContent,#templateHeader .mcnTextContent p{
      /*@editable*/font-size:16px !important;
      /*@editable*/line-height:150% !important;
    }

} @media only screen and (max-width: 480px){
  /*
  @tab Mobile Styles
  @section Body Text
  @tip Make the body text larger in size for better readability on small screens. We recommend a font size of at least 16px.
  */
    #templateBody .mcnTextContent,#templateBody .mcnTextContent p{
      /*@editable*/font-size:16px !important;
      /*@editable*/line-height:150% !important;
    }

} @media only screen and (max-width: 480px){
  /*
  @tab Mobile Styles
  @section Footer Text
  @tip Make the footer content text larger in size for better readability on small screens.
  */
    #templateFooter .mcnTextContent,#templateFooter .mcnTextContent p{
      /*@editable*/font-size:14px !important;
      /*@editable*/line-height:150% !important;
    }

}</style></head>
    <body>
        
        <center>
            <table align="center" border="0" cellpadding="0" cellspacing="0" height="100%" width="100%" id="bodyTable">
                <tr>
                    <td align="center" valign="top" id="bodyCell">
                        <!-- BEGIN TEMPLATE // -->
                        <!--[if (gte mso 9)|(IE)]>
                        <table align="center" border="0" cellspacing="0" cellpadding="0" width="600" style="width:600px;">
                        <tr>
                        <td align="center" valign="top" width="600" style="width:600px;">
                        <![endif]-->
                        <table border="0" cellpadding="0" cellspacing="0" width="100%" class="templateContainer">
                            <tr>
                                <td valign="top" id="templatePreheader"></td>
                            </tr>
                            <tr>
                                <td valign="top" id="templateHeader"><table class="mcnImageBlock" style="min-width:100%;" width="100%" cellspacing="0" cellpadding="0" border="0">
    <tbody class="mcnImageBlockOuter">
            <tr>
                <td style="padding:9px" class="mcnImageBlockInner" valign="top">
                    <table class="mcnImageContentContainer" style="min-width:100%;" width="100%" cellspacing="0" cellpadding="0" border="0" align="left">
                        <tbody><tr>
                            <td class="mcnImageContent" style="padding-right: 9px; padding-left: 9px; padding-top: 0; padding-bottom: 0; text-align:center;" valign="top">
                                
                                    
                                        <img alt="" src="https://clmeplus.org/app/uploads/2021/03/logo-clme-1.png" style="max-width:300px; padding-bottom: 0; vertical-align: bottom;" class="mcnImage" width="300" align="middle">
                                    
                                
                            </td>
                        </tr>
                    </tbody></table>
                </td>
            </tr>
    </tbody>
</table><table class="mcnDividerBlock" style="min-width:100%;" width="100%" cellspacing="0" cellpadding="0" border="0">
    <tbody class="mcnDividerBlockOuter">
        <tr>
            <td class="mcnDividerBlockInner" style="min-width:100%; padding:18px;">
                <table class="mcnDividerContent" style="min-width: 100%;border-top: 2px none #EAEAEA;" width="100%" cellspacing="0" cellpadding="0" border="0">
                    <tbody><tr>
                        <td>
                            <span></span>
                        </td>
                    </tr>
                </tbody></table>
<!--            
                <td class="mcnDividerBlockInner" style="padding: 18px;">
                <hr class="mcnDividerContent" style="border-bottom-color:none; border-left-color:none; border-right-color:none; border-bottom-width:0; border-left-width:0; border-right-width:0; margin-top:0; margin-right:0; margin-bottom:0; margin-left:0;" />
-->                 
            </td>
        </tr>
    </tbody>
</table></td>
                            </tr>
                            <tr>
                                <td valign="top" id="templateBody"><table class="mcnTextBlock" style="min-width:100%;" width="100%" cellspacing="0" cellpadding="0" border="0">
    <tbody class="mcnTextBlockOuter">
        <tr>
            <td class="mcnTextBlockInner" style="padding-top:9px;" valign="top">
                <!--[if mso]>
        <table align="left" border="0" cellspacing="0" cellpadding="0" width="100%" style="width:100%;">
        <tr>
        <![endif]-->
          
        <!--[if mso]>
        <td valign="top" width="600" style="width:600px;">
        <![endif]-->
                <table style="max-width:100%; min-width:100%;" class="mcnTextContentContainer" width="100%" cellspacing="0" cellpadding="0" border="0" align="left">
                    <tbody><tr>
                        
                        <td class="mcnTextContent" style="padding: 0px 18px 9px; font-family: Verdana;" valign="top">
                            <div style="padding: 0px 0; font-size: 16px; line-height: 32px; color: #666666; text-align: center;display: block;margin-bottom: 30px;">
                              <center> <br/> <h3 style="color: #5c6670; display: block; text-align: center;font-family: Verdana;">You have been assigned as lead contact of a project profile!</h3> </center>
                            </div>          
                            <div style="padding: 0px 0 0px 0; font-size: 16px; line-height: 32px; color: #666666;">Dear '. $leadcontact_name .'<br><br>
A "Project Profile" for your Initiative: ​<b>'. $pname.'</b> was created and published in the <b>"Projects Database"</b> for the Wider Caribbean/CLME+ region on the CLME+ HUB.</div>
<div style="font-family: Verdana; color: #666666; padding: 15px 0 15px 0; font-size: 16px; line-height: 32px;"><br> This profile was created by: </div><div style="font-family: Verdana; color: #666666; padding: 0px 0 15px 0; font-size: 16px; line-height: 32px;">  '. $nombre_usuario .'<br> '. $fecha .'<br><br></div>
<div style="font-family: Verdana; color: #666666; padding: 0px 0 15px 0; font-size: 16px; line-height: 32px;"> If you want to gain access to and edit this profile, please contact the CLME+ Hub administrators at <a href="mailto:info@clmeplus.org">info@clmeplus.org</a> </div>
                        </td>
                    </tr>
                </tbody></table>
        <!--[if mso]>
        </td>
        <![endif]-->
                
        <!--[if mso]>
        </tr>
        </table>
        <![endif]-->
            </td>
        </tr>
    </tbody>
</table><table class="mcnTextBlock" style="min-width:100%;" width="100%" cellspacing="0" cellpadding="0" border="0">
    <tbody class="mcnTextBlockOuter">
        <tr>
            <td class="mcnTextBlockInner" style="padding-top:9px;" valign="top">
                <!--[if mso]>
        <table align="left" border="0" cellspacing="0" cellpadding="0" width="100%" style="width:100%;">
        <tr>
        <![endif]-->
          
        <!--[if mso]>
        <td valign="top" width="600" style="width:600px;">
        <![endif]-->
                 <table style="max-width:100%; min-width:100%;" class="mcnTextContentContainer" width="100%" cellspacing="0" cellpadding="0" border="0" align="left">
                    <tbody><tr>
                        
                        <td class="mcnTextContent" style="padding: 0px 18px 9px; font-family: Verdana;" valign="top">
                        
                            <div style="padding: 10px 0; font-size: 16px; line-height: 32px; color: #666666;"> Thank you for working collaboratively for a healthier marine environment, and towards enhancing the well-being of the peoples in our region. </div>


                        </td>
                    </tr>
                </tbody></table>
        <!--[if mso]>
        </td>
        <![endif]-->
                
        <!--[if mso]>
        </tr>
        </table>
        <![endif]-->
            </td>
        </tr>
    </tbody>
</table><table class="mcnTextBlock" style="min-width:100%;" width="100%" cellspacing="0" cellpadding="0" border="0">
    <tbody class="mcnTextBlockOuter">
        <tr>
            <td class="mcnTextBlockInner" style="padding-top:9px;" valign="top">
                <!--[if mso]>
        <table align="left" border="0" cellspacing="0" cellpadding="0" width="100%" style="width:100%;">
        <tr>
        <![endif]-->
          
        <!--[if mso]>
        <td valign="top" width="600" style="width:600px;">
        <![endif]-->
                 <table style="max-width:100%; min-width:100%;" class="mcnTextContentContainer" width="100%" cellspacing="0" cellpadding="0" border="0" align="left">
                    <tbody><tr>
                        
                        <td class="mcnTextContent" style="padding: 0px 18px 9px; font-family: Verdana;" valign="top">
                        
                            <div style="padding: 10px 0; font-size: 16px; line-height: 32px; color: #666666;"> We encourage you to further explore the content of our database and the ​<b>CLME+ HUB</b>  (<a href="https://clmeplus.org" target="_blank" style="color: #1616ee !important; text-decoration: underline !important;">www.clmeplus.org​</a>), as this may prove useful for identifying opportunities for synergies and collaboration with other planned and ongoing initiatives.</div>


                        </td>
                    </tr>
                </tbody></table>
        <!--[if mso]>
        </td>
        <![endif]-->
                
        <!--[if mso]>
        </tr>
        </table>
        <![endif]-->
            </td>
        </tr>
    </tbody>
</table><table class="mcnTextBlock" style="min-width:100%;" width="100%" cellspacing="0" cellpadding="0" border="0">
    <tbody class="mcnTextBlockOuter">
        <tr>
            <td class="mcnTextBlockInner" style="padding-top:9px;" valign="top">
                <!--[if mso]>
        <table align="left" border="0" cellspacing="0" cellpadding="0" width="100%" style="width:100%;">
        <tr>
        <![endif]-->
          
        <!--[if mso]>
        <td valign="top" width="600" style="width:600px;">
        <![endif]-->
                 <table style="max-width:100%; min-width:100%;" class="mcnTextContentContainer" width="100%" cellspacing="0" cellpadding="0" border="0" align="left">
                    <tbody><tr>
                        
                        <td class="mcnTextContent" style="padding: 0px 18px 9px; font-family: Verdana;" valign="top">
                        
                            <div style="padding: 10px 0; font-size: 16px; line-height: 32px; color: #666666;"> Also, please don’t hesitate to share your experiences regarding the use of the database with us. If you have any questions or comments feel free to contact us using the following e-mail:<br><br><a href="mailto:info@clmeplus.org" style="color: #1616ee !important; text-decoration: underline !important;">info@clmeplus.org</a></div>


                        </td>
                    </tr>
                </tbody></table>
        <!--[if mso]>
        </td>
        <![endif]-->
                
        <!--[if mso]>
        </tr>
        </table>
        <![endif]-->
            </td>
        </tr>
    </tbody>
</table><table class="mcnTextBlock" style="min-width:100%;" width="100%" cellspacing="0" cellpadding="0" border="0">
    <tbody class="mcnTextBlockOuter">
        <tr>
            <td class="mcnTextBlockInner" style="padding-top:9px;" valign="top">
                <!--[if mso]>
        <table align="left" border="0" cellspacing="0" cellpadding="0" width="100%" style="width:100%;">
        <tr>
        <![endif]-->
          
        <!--[if mso]>
        <td valign="top" width="600" style="width:600px;">
        <![endif]-->                
                <table style="max-width:100%; min-width:100%;" class="mcnTextContentContainer" width="100%" cellspacing="0" cellpadding="0" border="0" align="left">
                    <tbody><tr>
                        
                        <td class="mcnTextContent" style="padding: 0px 18px 9px; font-family: Verdana;" valign="top">
                        
                            <div style="padding: 20px 0; font-size: 16px; line-height: 32px; color: #666666;">
                            Best regards,
                            </div>
                        </td>
                    </tr>
                </tbody></table>
        <!--[if mso]>
        </td>
        <![endif]-->
                
        <!--[if mso]>
        </tr>
        </table>
        <![endif]-->
            </td>
        </tr>
    </tbody>
</table><table class="mcnTextBlock" style="min-width:100%;" width="100%" cellspacing="0" cellpadding="0" border="0">
    <tbody class="mcnTextBlockOuter">
        <tr>
            <td class="mcnTextBlockInner" style="padding-top:9px;" valign="top">
                <!--[if mso]>
        <table align="left" border="0" cellspacing="0" cellpadding="0" width="100%" style="width:100%;">
        <tr>
        <![endif]-->
          
        <!--[if mso]>
        <td valign="top" width="600" style="width:600px;">
        <![endif]-->
                

                 <table style="max-width:100%; min-width:100%;" class="mcnTextContentContainer" width="100%" cellspacing="0" cellpadding="0" border="0" align="left">
                    <tbody><tr>
                        
                        <td class="mcnTextContent" style="padding: 0px 18px 9px; font-family: Verdana;" valign="top">
                        
                            <div style="padding: 20px 0; font-size: 14px; line-height: 32px; color: #666666;">  <b>Patrick Debels</b><br>
              UNDP/GEF CLME+ Project Coordination Unit<br>
              Secretariat to the CLME+ Interim Coordination Mechanism<br>
              </div>
                        </td>
                    </tr>
                </tbody></table>
        <!--[if mso]>
        </td>
        <![endif]-->
                
        <!--[if mso]>
        </tr>
        </table>
        <![endif]-->
            </td>
        </tr>
    </tbody>
</table><table class="mcnImageBlock" style="min-width:100%;" width="100%" cellspacing="0" cellpadding="0" border="0">
    <tbody class="mcnImageBlockOuter">
            <tr>
                <td style="padding:9px" class="mcnImageBlockInner" valign="top">
                    <table class="mcnImageContentContainer" style="min-width:100%;" width="100%" cellspacing="0" cellpadding="0" border="0" align="left">
                        <tbody><tr>
                            <td class="mcnImageContent" style="padding-right: 9px; padding-left: 9px; padding-top: 0; padding-bottom: 0; text-align:center;" valign="top">
                                
                                    
                                        <img alt="" src="https://mcusercontent.com/bccdb651bd8a8f943adddbe6c/images/d89e6079-7469-4607-8d2a-ef9d58af832e.png" style="max-width:1000px; padding-bottom: 0; display: inline !important; vertical-align: bottom;" class="mcnImage" width="564" align="middle">
                                    
                                
                            </td>
                        </tr>
                    </tbody></table>
                </td>
            </tr>
    </tbody>
</table></td>
                            </tr>
                            <tr>
                                <td valign="top" id="templateFooter"></td>
                            </tr>
                        </table>
                        <!--[if (gte mso 9)|(IE)]>
                        </td>
                        </tr>
                        </table>
                        <![endif]-->
                        <!-- // END TEMPLATE -->
                    </td>
                </tr>
            </table>
        </center>
    </body>
</html>';
		    	
		    	wp_mail( $leadcontactmail, 'You have been assigned as lead contact of a project profile!', $messagelead,$headers_ppi );
		    	//wp_mail( 'valencia.guzmandaniel@gmail.com', 'You have been assigned as a contact in project profile!', $messagelead,$headers_ppi );

		    }
			}
		 
		} catch (Exception $e) {
			echo 'Excepción capturada: ',  $e->getMessage(), "\n";
			wp_redirect("/form-database-programmes/" . '?saved=0&err='.urlencode($e->getMessage()));
			exit;
		}
		if($pnewppi==1){wp_redirect("/form-database-programmes/" . '?saved=1');}
		if($pnewppi==0){wp_redirect("/form-database-programmes/" . '?saved=2');}
		
		
		exit;

	}

}
function send_mail_publish_ppi($post_id){
	//wp_mail( 'caprubianojunior@hotmail.com' , 'CLME+ HUB PPI','tracert paso',array('Content-Type: text/html; charset=UTF-8','From: UNDP/GEF CLME+ <info@clmeplus.org>') );
	$post   = get_post( $post_id);
	$pleadcontemail = get_field( "lead_contact_email_ppi", $post->ID);
	$contact= get_field( "lead_contact_ppi", $post->ID);
	$random_password=wp_generate_password( $length=12, $include_standard_special_chars=false );
	$new=0;
	$user_id = username_exists( $pleadcontemail );
	if ( email_exists($pleadcontemail) == false ) {
				$user_id = wp_create_user( $pleadcontemail, $random_password, $pleadcontemail );
				$user = new WP_User( $user_id );
				$user->set_role( 'Subscriber' );
				$user->remove_role( 'subscriber' );
    			$user->add_role( 'subscriber' );
				$new=1;
				
	} 
	




	

	
 		
	
	$message='<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
		<html data-editor-version="2" class="sg-campaigns" xmlns="http://www.w3.org/1999/xhtml">
		<head>
		    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		    <meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1, maximum-scale=1" /><!--[if !mso]><!-->
		    <meta http-equiv="X-UA-Compatible" content="IE=Edge" /><!--<![endif]-->
		    <!--[if (gte mso 9)|(IE)]>
		    <xml>
		    <o:OfficeDocumentSettings>
		    <o:AllowPNG/>
		    <o:PixelsPerInch>96</o:PixelsPerInch>
		    </o:OfficeDocumentSettings>
		    </xml>
		    <![endif]-->
		    <!--[if (gte mso 9)|(IE)]>
		    <style type="text/css">
		      body {width: 600px;margin: 0 auto;}
		      table {border-collapse: collapse;}
		      table, td {mso-table-lspace: 0pt;mso-table-rspace: 0pt;}
		      img {-ms-interpolation-mode: bicubic;}
		    </style>
		    <![endif]-->

		    <style type="text/css">
		      body, p, div {
		        font-family: Verdana;
		        font-size: 14px;
		      }
		      body {
		        color: #000000;
		      }
		      body a {
		        color: #1188E6;
		        text-decoration: none;
		      }
		      p { margin: 0; padding: 0; }
		      table.wrapper {
		        width:100% !important;
		        table-layout: fixed;
		        -webkit-font-smoothing: antialiased;
		        -webkit-text-size-adjust: 100%;
		        -moz-text-size-adjust: 100%;
		        -ms-text-size-adjust: 100%;
		      }
		      img.max-width {
		        max-width: 100% !important;
		      }
		      .column.of-2 {
		        width: 50%;
		      }
		      .column.of-3 {
		        width: 33.333%;
		      }
		      .column.of-4 {
		        width: 25%;
		      }
		      @media screen and (max-width:480px) {
		        .preheader .rightColumnContent,
		        .footer .rightColumnContent {
		            text-align: left !important;
		        }
		        .preheader .rightColumnContent div,
		        .preheader .rightColumnContent span,
		        .footer .rightColumnContent div,
		        .footer .rightColumnContent span {
		          text-align: left !important;
		        }
		        .preheader .rightColumnContent,
		        .preheader .leftColumnContent {
		          font-size: 80% !important;
		          padding: 5px 0;
		        }
		        table.wrapper-mobile {
		          width: 100% !important;
		          table-layout: fixed;
		        }
		        img.max-width {
		          height: auto !important;
		          max-width: 480px !important;
		        }
		        a.bulletproof-button {
		          display: block !important;
		          width: auto !important;
		          font-size: 80%;
		          padding-left: 0 !important;
		          padding-right: 0 !important;
		        }
		        .columns {
		          width: 100% !important;
		        }
		        .column {
		          display: block !important;
		          width: 100% !important;
		          padding-left: 0 !important;
		          padding-right: 0 !important;
		          margin-left: 0 !important;
		          margin-right: 0 !important;
		        }
		      }
		    </style>
		    <!--user entered Head Start-->
		    
		     <!--End Head user entered-->
		  </head>
		<body style="background-color:#FFF;width:1200px">
		<table width="800"Your account has been approved border="0" cellspacing="0" cellpadding="0">
		  <tr style="background-color:#58A7D6;">
		    <td width="50">&nbsp;</td>
		    <td width="166" align="left"><center><img src="https://clmeplus.org/app/themes/clme-theme/dist/images/mail/clmemailheader.png" width="250" height="217" alt="logo clme" /></center></td>
		    <td width="532"><span style="text-align:center;font-size: 50px;"><center> The <b>CLME+</b> Hub</center></span></td>
		    <td width="52">&nbsp;</td>
		  </tr>
		   <tr style="background-color:#58A7D6;">
		    <td style="background-color:#58A7D6;">&nbsp;</td>
		    <td colspan="2" style="background-color:#58A7D6;">&nbsp;</td>
		    <td style="background-color:#58A7D6;">&nbsp;</td>
		  </tr>
		  <tr>
		    <td style="background-color:#58A7D6;">&nbsp;</td>
		    <td colspan="2" style="padding:15px; background-color:#FFF;font-size: 20px;"><center><span style="text-align:center;font-size: 30px;"><b>Welcome to the CLME+ Projects database!</b></span></center></td>
		    <td style="background-color:#58A7D6;">&nbsp;</td>
		  </tr>
		   <tr style="background-color:#58A7D6;">
		    <td style="background-color:#58A7D6;">&nbsp;</td>
		    <td colspan="2" style="background-color:#58A7D6;">&nbsp;</td>
		    <td style="background-color:#58A7D6;">&nbsp;</td>
		  </tr>
		  <tr style="background-color:#58A7D6;">
		    <td style="background-color:#58A7D6;">&nbsp;</td>
		    <td colspan="2" style="background-color:#58A7D6;">&nbsp;</td>
		    <td style="background-color:#58A7D6;">&nbsp;</td>
		  </tr>
		  <tr>
		    <td style="background-color:#58A7D6;">&nbsp;</td>
		    <td colspan="2" style="padding:15px; background-color:#FFF;font-size: 20px; text-align:justify;"><p><b>Dear </b>'.$contact.'
		      </p>
			  <p>Thank you very much for using our online form to create a <strong>“Project Profile”</strong> for your <strong>Initiative</strong>: “'.get_field( "post_title", $post->ID).'”. This profile has been approved and will now be included in the <strong>“Projects Database” for the Wider Caribbean/CLME+ region</strong> on the CLME+ HUB.</p>
			  <p>&nbsp;</p>
		    <p><strong>We would now also like to invite you to periodically update the content of your Project Profile(s)</strong>, to make sure that the information available on the CLME+ HUB remains as accurate as possible. </p>
		    <p>&nbsp;</p>
			
			<p><strong>Please note that you will be able to re-gain access to the online form and edit the content of your Project Profile(s)</strong> at any time by following the below steps:</p>
			<p>&nbsp;</p>
		    
		    <p>Go to the "Projects and Initiatives" section on the CLME+ HUB menu and click on "Create/Update a Project Profile". Then, press the button "Already a registered user? Please Log-in":</p>
			 <p><img src="https://clmeplus.org/app/uploads/2020/02/email_screenshot.png" width="600" height="480" /></p>
			<p>&nbsp;</p>
		    <p>Use the following username and password to log in:      </p><p><strong>Username</strong>:'.$pleadcontemail.'</p>';
			if ($new==1){
				$message=$message.'<p><strong>Password</strong>: '.$random_password.'</p>';
			}else{
				$message=$message."<p><strong>Password</strong>: Use your password</p>";
				}
			$message=$message.'<p>&nbsp;</p><p><strong>For New Users Only:</strong></p>	
			<p><strong>The automatic password assigned by the system will expire in the next 48 hour, therefore, we highly recommend to set up a personal, strong and easy-to-remember password</strong>. This will also prevent undesired changes or arbitrary accesses from external users to your Project Profile. Click on the link below to make this modification:</p>
		    <p>&nbsp;</p>
		    <p><a href="https://clmeplus.org/wp/wp-login.php?action=lostpassword">https://clmeplus.org/wp/wp-login.php?action=lostpassword</a></p>
		    <p>&nbsp;</p>

			<p>Thank you for working collaboratively for a healthier marine environment,  and towards enhancing the well-being of the peoples in our region. Always  remember that <strong>together we can achieve more!</strong></p>
			<p><br />
			  We encourage you to further explore the content of our database and the <strong>CLME+  HUB (<a href="http://www.clmeplus.org">www.clmeplus.org</a>)</strong>, as this may  prove useful for identifying opportunities for synergies and collaboration with  other planned and ongoing initiatives. </p>
			<p><br />
			  Also, please don&rsquo;t hesitate to share your experiences regarding the use  of the database with us. If you have any questions or comments feel free to  contact us using the following e-mail:</p>
			<p><br />
			  <a href="mailto:info@clmeplus.org">info@clmeplus.org</a></p>
			<p>&nbsp;</p>
		    <p>Best regards,<br />
		      <strong>Patrick Debels</strong><br />
		      UNDP/GEF CLME+ Project  Coordination Unit<br />
		    Secretariat to the CLME+ SAP  Interim Coordination Mechanism (ICM)</p></td>
		    <td style="background-color:#58A7D6;">&nbsp;</td>
		  </tr>
		  <tr style="background-color:#58A7D6;">
		    <td >&nbsp;</td>
		    <td colspan="2">&nbsp;</td>
		    <td>&nbsp;</td>
		  </tr>
		  <tr style="background-color:#58A7D6;">
		    <td >&nbsp;</td>
		    <td colspan="2">&nbsp;</td>
		    <td>&nbsp;</td>
		  </tr>
		  <tr style="background-color:#58A7D6;">
		    <td colspan="4" ><center><img src="https://clmeplus.org/app/themes/clme-theme/dist/images/mail/clmemailfooter.png" width="800px"  height="181px" alt="footer logos" /></center></td>
		  </tr>
		</table>


		</body>
		</html>';
			$headers = array('Content-Type: text/html; charset=UTF-8','From: CLME + Hub <info@clmeplus.org>');
		   
		   	// 2021
		   	//wp_mail( $pleadcontemail , 'CLME+ HUB PPI', $message,$headers );
			//wp_mail( 'solutelematica@gmail.com', 'CLME+ HUB PPI', $message,$headers );	

			$author_mail  = get_field( "author_ppi_mail", $post->ID);
			$author_name  = get_field( "author_ppi_name", $post->ID);
			$project_name = get_field( "post_title", $post->ID);

			$message_approval = '<!doctype html>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office">
    <head>
        <!-- NAME: 1 COLUMN -->
        <!--[if gte mso 15]>
        <xml>
            <o:OfficeDocumentSettings>
            <o:AllowPNG/>
            <o:PixelsPerInch>96</o:PixelsPerInch>
            </o:OfficeDocumentSettings>
        </xml>
        <![endif]-->
        <meta charset="UTF-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <meta name="viewport" content="width=device-width, initial-scale=1">

        
    <style type="text/css">
    p{
      margin:10px 0;
      padding:0;
      color: #666;
    }
    table{
      border-collapse:collapse;
    }
    h1,h2,h3,h4,h5,h6{
      display:block;
      margin:0;
      padding:0;
      font-family: Verdana;
      color: #666;
      font-weight: 500;
    }
    img,a img{
      border:0;
      height:auto;
      outline:none;
      text-decoration:none;
    }
    body,#bodyTable,#bodyCell{
      height:100%;
      margin:0;
      padding:0;
      width:100%;
    }
    .mcnPreviewText{
      display:none !important;
    }
    #outlook a{
      padding:0;
    }
    img{
      -ms-interpolation-mode:bicubic;
    }
    table{
      mso-table-lspace:0pt;
      mso-table-rspace:0pt;
    }
    .ReadMsgBody{
      width:100%;
    }
    .ExternalClass{
      width:100%;
    }
    p,a,li,td,blockquote{
      mso-line-height-rule:exactly;
    }
    a[href^=tel],a[href^=sms]{
      color:inherit;
      cursor:default;
      text-decoration:none;
    }
    p,a,li,td,body,table,blockquote{
      -ms-text-size-adjust:100%;
      -webkit-text-size-adjust:100%;
    }
    .ExternalClass,.ExternalClass p,.ExternalClass td,.ExternalClass div,.ExternalClass span,.ExternalClass font{
      line-height:100%;
    }
    a[x-apple-data-detectors]{
      color:inherit !important;
      text-decoration:none !important;
      font-size:inherit !important;
      font-family:inherit !important;
      font-weight:inherit !important;
      line-height:inherit !important;
    }
    #bodyCell{
      padding:10px;
    }
    .templateContainer{
      max-width:600px !important;
    }
    a.mcnButton{
      display:block;
    }
    .mcnImage,.mcnRetinaImage{
      vertical-align:bottom;
    }
    .mcnTextContent{
      word-break:break-word;
    }
    .mcnTextContent img{
      height:auto !important;
    }
    .mcnDividerBlock{
      table-layout:fixed !important;
    }
  
    body,#bodyTable{
      /*@editable*/background-color:#FFFFFF;
    }
  
    #bodyCell{
      /*@editable*/border-top:0;
    }
  
    .templateContainer{
      /*@editable*/border:0;
    }
  /*
  @tab Page
  @section Heading 1
  @tip Set the styling for all first-level headings in your emails. These should be the largest of your headings.
  @style heading 1
  */
    h1{
      /*@editable*/color:#202020;
      /*@editable*/font-family:Helvetica;
      /*@editable*/font-size:26px;
      /*@editable*/font-style:normal;
      /*@editable*/font-weight:bold;
      /*@editable*/line-height:125%;
      /*@editable*/letter-spacing:normal;
      /*@editable*/text-align:left;
    }
  /*
  @tab Page
  @section Heading 2
  @tip Set the styling for all second-level headings in your emails.
  @style heading 2
  */
    h2{
      /*@editable*/color:#202020;
      /*@editable*/font-family:Helvetica;
      /*@editable*/font-size:22px;
      /*@editable*/font-style:normal;
      /*@editable*/font-weight:bold;
      /*@editable*/line-height:125%;
      /*@editable*/letter-spacing:normal;
      /*@editable*/text-align:left;
    }
  /*
  @tab Page
  @section Heading 3
  @tip Set the styling for all third-level headings in your emails.
  @style heading 3
  */
    h3{
      /*@editable*/color:#202020;
      /*@editable*/font-family:Helvetica;
      /*@editable*/font-size:20px;
      /*@editable*/font-style:normal;
      /*@editable*/font-weight:bold;
      /*@editable*/line-height:125%;
      /*@editable*/letter-spacing:normal;
      /*@editable*/text-align:left;
    }
  /*
  @tab Page
  @section Heading 4
  @tip Set the styling for all fourth-level headings in your emails. These should be the smallest of your headings.
  @style heading 4
  */
    h4{
      /*@editable*/color:#202020;
      /*@editable*/font-family:Helvetica;
      /*@editable*/font-size:18px;
      /*@editable*/font-style:normal;
      /*@editable*/font-weight:bold;
      /*@editable*/line-height:125%;
      /*@editable*/letter-spacing:normal;
      /*@editable*/text-align:left;
    }
  
    #templatePreheader{
      /*@editable*/background-color:#FFFFFF;
      /*@editable*/background-image:none;
      /*@editable*/background-repeat:no-repeat;
      /*@editable*/background-position:center;
      /*@editable*/background-size:cover;
      /*@editable*/border-top:0;
      /*@editable*/border-bottom:0;
      /*@editable*/padding-top:9px;
      /*@editable*/padding-bottom:9px;
    }
  
    #templatePreheader .mcnTextContent,#templatePreheader .mcnTextContent p{
      /*@editable*/color:#656565;
      /*@editable*/font-family:Helvetica;
      /*@editable*/font-size:12px;
      /*@editable*/line-height:150%;
      /*@editable*/text-align:left;
    }
  
    #templatePreheader .mcnTextContent a,#templatePreheader .mcnTextContent p a{
      /*@editable*/color:#656565;
      /*@editable*/font-weight:normal;
      /*@editable*/text-decoration:underline;
    }
  
    #templateHeader{
      /*@editable*/background-color:#FFFFFF;
      /*@editable*/background-image:none;
      /*@editable*/background-repeat:no-repeat;
      /*@editable*/background-position:center;
      /*@editable*/background-size:cover;
      /*@editable*/border-top:0;
      /*@editable*/border-bottom:0;
      /*@editable*/padding-top:9px;
      /*@editable*/padding-bottom:0;
    }
  
    #templateHeader .mcnTextContent,#templateHeader .mcnTextContent p{
      /*@editable*/color:#202020;
      /*@editable*/font-family:Helvetica;
      /*@editable*/font-size:16px;
      /*@editable*/line-height:150%;
      /*@editable*/text-align:left;
    }
  
    #templateHeader .mcnTextContent a,#templateHeader .mcnTextContent p a{
      /*@editable*/color:#007C89;
      /*@editable*/font-weight:normal;
      /*@editable*/text-decoration:underline;
    }
  
    #templateBody{
      /*@editable*/background-color:#FFFFFF;
      /*@editable*/background-image:none;
      /*@editable*/background-repeat:no-repeat;
      /*@editable*/background-position:center;
      /*@editable*/background-size:cover;
      /*@editable*/border-top:0;
      /*@editable*/border-bottom:2px solid #EAEAEA;
      /*@editable*/padding-top:0;
      /*@editable*/padding-bottom:9px;
    }
  
    #templateBody .mcnTextContent,#templateBody .mcnTextContent p{
      /*@editable*/color:#202020;
      /*@editable*/font-family:Helvetica;
      /*@editable*/font-size:16px;
      /*@editable*/line-height:150%;
      /*@editable*/text-align:left;
    }
  
    #templateBody .mcnTextContent a,#templateBody .mcnTextContent p a{
      /*@editable*/color:#007C89;
      /*@editable*/font-weight:normal;
      /*@editable*/text-decoration:underline;
    }
  
    #templateFooter{
      /*@editable*/background-color:#FFFFFF;
      /*@editable*/background-image:none;
      /*@editable*/background-repeat:no-repeat;
      /*@editable*/background-position:center;
      /*@editable*/background-size:cover;
      /*@editable*/border-top:0;
      /*@editable*/border-bottom:0;
      /*@editable*/padding-top:9px;
      /*@editable*/padding-bottom:9px;
    }
  
    #templateFooter .mcnTextContent,#templateFooter .mcnTextContent p{
      /*@editable*/color:#656565;
      /*@editable*/font-family:Helvetica;
      /*@editable*/font-size:12px;
      /*@editable*/line-height:150%;
      /*@editable*/text-align:center;
    }
  
    #templateFooter .mcnTextContent a,#templateFooter .mcnTextContent p a{
      /*@editable*/color:#656565;
      /*@editable*/font-weight:normal;
      /*@editable*/text-decoration:underline;
    }
  @media only screen and (min-width:768px){
    .templateContainer{
      width:600px !important;
    }

} @media only screen and (max-width: 480px){
    body,table,td,p,a,li,blockquote{
      -webkit-text-size-adjust:none !important;
    }

} @media only screen and (max-width: 480px){
    body{
      width:100% !important;
      min-width:100% !important;
    }

} @media only screen and (max-width: 480px){
    .mcnRetinaImage{
      max-width:100% !important;
    }

} @media only screen and (max-width: 480px){
    .mcnImage{
      width:100% !important;
    }

} @media only screen and (max-width: 480px){
    .mcnCartContainer,.mcnCaptionTopContent,.mcnRecContentContainer,.mcnCaptionBottomContent,.mcnTextContentContainer,.mcnBoxedTextContentContainer,.mcnImageGroupContentContainer,.mcnCaptionLeftTextContentContainer,.mcnCaptionRightTextContentContainer,.mcnCaptionLeftImageContentContainer,.mcnCaptionRightImageContentContainer,.mcnImageCardLeftTextContentContainer,.mcnImageCardRightTextContentContainer,.mcnImageCardLeftImageContentContainer,.mcnImageCardRightImageContentContainer{
      max-width:100% !important;
      width:100% !important;
    }

} @media only screen and (max-width: 480px){
    .mcnBoxedTextContentContainer{
      min-width:100% !important;
    }

} @media only screen and (max-width: 480px){
    .mcnImageGroupContent{
      padding:9px !important;
    }

} @media only screen and (max-width: 480px){
    .mcnCaptionLeftContentOuter .mcnTextContent,.mcnCaptionRightContentOuter .mcnTextContent{
      padding-top:9px !important;
    }

} @media only screen and (max-width: 480px){
    .mcnImageCardTopImageContent,.mcnCaptionBottomContent:last-child .mcnCaptionBottomImageContent,.mcnCaptionBlockInner .mcnCaptionTopContent:last-child .mcnTextContent{
      padding-top:18px !important;
    }

} @media only screen and (max-width: 480px){
    .mcnImageCardBottomImageContent{
      padding-bottom:9px !important;
    }

} @media only screen and (max-width: 480px){
    .mcnImageGroupBlockInner{
      padding-top:0 !important;
      padding-bottom:0 !important;
    }

} @media only screen and (max-width: 480px){
    .mcnImageGroupBlockOuter{
      padding-top:9px !important;
      padding-bottom:9px !important;
    }

} @media only screen and (max-width: 480px){
    .mcnTextContent,.mcnBoxedTextContentColumn{
      padding-right:18px !important;
      padding-left:18px !important;
    }

} @media only screen and (max-width: 480px){
    .mcnImageCardLeftImageContent,.mcnImageCardRightImageContent{
      padding-right:18px !important;
      padding-bottom:0 !important;
      padding-left:18px !important;
    }

} @media only screen and (max-width: 480px){
    .mcpreview-image-uploader{
      display:none !important;
      width:100% !important;
    }

} @media only screen and (max-width: 480px){
  /*
  @tab Mobile Styles
  @section Heading 1
  @tip Make the first-level headings larger in size for better readability on small screens.
  */
    h1{
      /*@editable*/font-size:22px !important;
      /*@editable*/line-height:125% !important;
    }

} @media only screen and (max-width: 480px){
  /*
  @tab Mobile Styles
  @section Heading 2
  @tip Make the second-level headings larger in size for better readability on small screens.
  */
    h2{
      /*@editable*/font-size:20px !important;
      /*@editable*/line-height:125% !important;
    }

} @media only screen and (max-width: 480px){
  /*
  @tab Mobile Styles
  @section Heading 3
  @tip Make the third-level headings larger in size for better readability on small screens.
  */
    h3{
      /*@editable*/font-size:18px !important;
      /*@editable*/line-height:125% !important;
    }

} @media only screen and (max-width: 480px){
  /*
  @tab Mobile Styles
  @section Heading 4
  @tip Make the fourth-level headings larger in size for better readability on small screens.
  */
    h4{
      /*@editable*/font-size:16px !important;
      /*@editable*/line-height:150% !important;
    }

} @media only screen and (max-width: 480px){
  /*
  @tab Mobile Styles
  @section Boxed Text
  @tip Make the boxed text larger in size for better readability on small screens. We recommend a font size of at least 16px.
  */
    .mcnBoxedTextContentContainer .mcnTextContent,.mcnBoxedTextContentContainer .mcnTextContent p{
      /*@editable*/font-size:14px !important;
      /*@editable*/line-height:150% !important;
    }

} @media only screen and (max-width: 480px){
  
    #templatePreheader{
      /*@editable*/display:block !important;
    }

} @media only screen and (max-width: 480px){
  /*
  @tab Mobile Styles
  @section Preheader Text
  @tip Make the preheader text larger in size for better readability on small screens.
  */
    #templatePreheader .mcnTextContent,#templatePreheader .mcnTextContent p{
      /*@editable*/font-size:14px !important;
      /*@editable*/line-height:150% !important;
    }

} @media only screen and (max-width: 480px){
  /*
  @tab Mobile Styles
  @section Header Text
  @tip Make the header text larger in size for better readability on small screens.
  */
    #templateHeader .mcnTextContent,#templateHeader .mcnTextContent p{
      /*@editable*/font-size:16px !important;
      /*@editable*/line-height:150% !important;
    }

} @media only screen and (max-width: 480px){
  /*
  @tab Mobile Styles
  @section Body Text
  @tip Make the body text larger in size for better readability on small screens. We recommend a font size of at least 16px.
  */
    #templateBody .mcnTextContent,#templateBody .mcnTextContent p{
      /*@editable*/font-size:16px !important;
      /*@editable*/line-height:150% !important;
    }

} @media only screen and (max-width: 480px){
  /*
  @tab Mobile Styles
  @section Footer Text
  @tip Make the footer content text larger in size for better readability on small screens.
  */
    #templateFooter .mcnTextContent,#templateFooter .mcnTextContent p{
      /*@editable*/font-size:14px !important;
      /*@editable*/line-height:150% !important;
    }

}</style></head>
    <body>
        
        <center>
            <table align="center" border="0" cellpadding="0" cellspacing="0" height="100%" width="100%" id="bodyTable">
                <tr>
                    <td align="center" valign="top" id="bodyCell">
                        <!-- BEGIN TEMPLATE // -->
                        <!--[if (gte mso 9)|(IE)]>
                        <table align="center" border="0" cellspacing="0" cellpadding="0" width="600" style="width:600px;">
                        <tr>
                        <td align="center" valign="top" width="600" style="width:600px;">
                        <![endif]-->
                        <table border="0" cellpadding="0" cellspacing="0" width="100%" class="templateContainer">
                            <tr>
                                <td valign="top" id="templatePreheader"></td>
                            </tr>
                            <tr>
                                <td valign="top" id="templateHeader"><table class="mcnImageBlock" style="min-width:100%;" width="100%" cellspacing="0" cellpadding="0" border="0">
    <tbody class="mcnImageBlockOuter">
            <tr>
                <td style="padding:9px" class="mcnImageBlockInner" valign="top">
                    <table class="mcnImageContentContainer" style="min-width:100%;" width="100%" cellspacing="0" cellpadding="0" border="0" align="left">
                        <tbody><tr>
                            <td class="mcnImageContent" style="padding-right: 9px; padding-left: 9px; padding-top: 0; padding-bottom: 0; text-align:center;" valign="top">
                                
                                    
                                        <img alt="" src="https://clmeplus.org/app/uploads/2021/03/logo-clme-1.png" style="max-width:300px; padding-bottom: 0; vertical-align: bottom;" class="mcnImage" width="300" align="middle">
                                    
                                
                            </td>
                        </tr>
                    </tbody></table>
                </td>
            </tr>
    </tbody>
</table><table class="mcnDividerBlock" style="min-width:100%;" width="100%" cellspacing="0" cellpadding="0" border="0">
    <tbody class="mcnDividerBlockOuter">
        <tr>
            <td class="mcnDividerBlockInner" style="min-width:100%; padding:18px;">
                <table class="mcnDividerContent" style="min-width: 100%;border-top: 2px none #EAEAEA;" width="100%" cellspacing="0" cellpadding="0" border="0">
                    <tbody><tr>
                        <td>
                            <span></span>
                        </td>
                    </tr>
                </tbody></table>
<!--            
                <td class="mcnDividerBlockInner" style="padding: 18px;">
                <hr class="mcnDividerContent" style="border-bottom-color:none; border-left-color:none; border-right-color:none; border-bottom-width:0; border-left-width:0; border-right-width:0; margin-top:0; margin-right:0; margin-bottom:0; margin-left:0;" />
-->                 
            </td>
        </tr>
    </tbody>
</table></td>
                            </tr>
                            <tr>
                                <td valign="top" id="templateBody"><table class="mcnTextBlock" style="min-width:100%;" width="100%" cellspacing="0" cellpadding="0" border="0">
    <tbody class="mcnTextBlockOuter">
        <tr>
            <td class="mcnTextBlockInner" style="padding-top:9px;" valign="top">
                <!--[if mso]>
        <table align="left" border="0" cellspacing="0" cellpadding="0" width="100%" style="width:100%;">
        <tr>
        <![endif]-->
          
        <!--[if mso]>
        <td valign="top" width="600" style="width:600px;">
        <![endif]-->
                <table style="max-width:100%; min-width:100%;" class="mcnTextContentContainer" width="100%" cellspacing="0" cellpadding="0" border="0" align="left">
                    <tbody><tr>
                        
                        <td class="mcnTextContent" style="padding: 0px 18px 9px; font-family: Verdana;" valign="top">
                            <div style="padding: 0px 0; font-size: 16px; line-height: 32px; color: #666666; text-align: center;display: block;margin-bottom: 30px;">
                              <center> <br/> <h3 style="color: #5c6670; display: block; text-align: center;font-family: Verdana;">Your project profile has been approved and published!</h3> </center>
                            </div>          
                            <div style="padding: 0px 0 0px 0; font-size: 16px; line-height: 32px; color: #666666;">Dear '.$author_name.'<br><br>
Thank you very much for using our online form to create a “Project Profile” for your Initiative: <b>"'.$project_name.'"</b>. This profile has been approved and will now be included in the ​<b>“Projects Database” for the Wider Caribbean/CLME+ region​ on the CLME+ HUB.</b> </div>
                        </td>
                    </tr>
                </tbody></table>
        <!--[if mso]>
        </td>
        <![endif]-->
                
        <!--[if mso]>
        </tr>
        </table>
        <![endif]-->
            </td>
        </tr>
    </tbody>
</table><table class="mcnTextBlock" style="min-width:100%;" width="100%" cellspacing="0" cellpadding="0" border="0">
    <tbody class="mcnTextBlockOuter">
        <tr>
            <td class="mcnTextBlockInner" style="padding-top:9px;" valign="top">
                <!--[if mso]>
        <table align="left" border="0" cellspacing="0" cellpadding="0" width="100%" style="width:100%;">
        <tr>
        <![endif]-->
          
        <!--[if mso]>
        <td valign="top" width="600" style="width:600px;">
        <![endif]-->
                 <table style="max-width:100%; min-width:100%;" class="mcnTextContentContainer" width="100%" cellspacing="0" cellpadding="0" border="0" align="left">
                    <tbody><tr>
                        
                        <td class="mcnTextContent" style="padding: 0px 18px 9px; font-family: Verdana;" valign="top">
                        
                            <div style="padding: 10px 0; font-size: 16px; line-height: 32px; color: #666666;"> We would now also like to invite you to periodically update the content of your Project Profile(s), to make sure that the information available on the CLME+ HUB remains as accurate as possible.<br></div>


                        </td>
                    </tr>
                </tbody></table>
        <!--[if mso]>
        </td>
        <![endif]-->
                
        <!--[if mso]>
        </tr>
        </table>
        <![endif]-->
            </td>
        </tr>
    </tbody>
</table><table class="mcnTextBlock" style="min-width:100%;" width="100%" cellspacing="0" cellpadding="0" border="0">
    <tbody class="mcnTextBlockOuter">
        <tr>
            <td class="mcnTextBlockInner" style="padding-top:9px;" valign="top">
                <!--[if mso]>
        <table align="left" border="0" cellspacing="0" cellpadding="0" width="100%" style="width:100%;">
        <tr>
        <![endif]-->
          
        <!--[if mso]>
        <td valign="top" width="600" style="width:600px;">
        <![endif]-->
                 <table style="max-width:100%; min-width:100%;" class="mcnTextContentContainer" width="100%" cellspacing="0" cellpadding="0" border="0" align="left">
                    <tbody><tr>
                        
                        <td class="mcnTextContent" style="padding: 0px 18px 9px; font-family: Verdana;" valign="top">
                        
                            <div style="padding: 10px 0; font-size: 16px; line-height: 32px; color: #666666;"> Please note that you will be able to re-gain access to the online form and edit the content of your Project Profile(s) at any time by just login into the Hub.<br></div>


                        </td>
                    </tr>
                </tbody></table>
        <!--[if mso]>
        </td>
        <![endif]-->
                
        <!--[if mso]>
        </tr>
        </table>
        <![endif]-->
            </td>
        </tr>
    </tbody>
</table><table class="mcnButtonBlock" style="min-width:100%;" width="100%" cellspacing="0" cellpadding="0" border="0">
    <tbody class="mcnButtonBlockOuter">
        <tr>
            <td style="padding-top:0; padding-right:18px; padding-bottom:18px; padding-left:18px;" class="mcnButtonBlockInner" valign="top" align="center">
                <table class="mcnButtonContentContainer" style="border-collapse: separate !important;border-radius: 4px;background-color: #56C9E8;" cellspacing="0" cellpadding="0" border="0">
                    <tbody>
                        <tr>
                            <td class="mcnButtonContent" style="font-family: Arial; font-size: 14px; padding: 16px;" valign="middle" align="center">
                                <a class="mcnButton " title="Login to our site" href="https://clmeplus.org/login/" target="_blank" style="font-weight: bold;letter-spacing: normal;line-height: 100%;text-align: center;text-decoration: none;color: #FFFFFF;">Login to our site</a>
                            </td>
                        </tr>
                    </tbody>
                </table>
            </td>
        </tr>
    </tbody>
</table><table class="mcnTextBlock" style="min-width:100%;" width="100%" cellspacing="0" cellpadding="0" border="0">
    <tbody class="mcnTextBlockOuter">
        <tr>
            <td class="mcnTextBlockInner" style="padding-top:9px;" valign="top">
                <!--[if mso]>
        <table align="left" border="0" cellspacing="0" cellpadding="0" width="100%" style="width:100%;">
        <tr>
        <![endif]-->
          
        <!--[if mso]>
        <td valign="top" width="600" style="width:600px;">
        <![endif]-->
                 <table style="max-width:100%; min-width:100%;" class="mcnTextContentContainer" width="100%" cellspacing="0" cellpadding="0" border="0" align="left">
                    <tbody><tr>
                        
                        <td class="mcnTextContent" style="padding: 0px 18px 9px; font-family: Verdana;" valign="top">
                        
                            <div style="padding: 10px 0; font-size: 16px; line-height: 32px; color: #666666;"> Thank you for working collaboratively for a healthier marine environment, and towards enhancing the well-being of the peoples in our region.<br></div>


                        </td>
                    </tr>
                </tbody></table>
        <!--[if mso]>
        </td>
        <![endif]-->
                
        <!--[if mso]>
        </tr>
        </table>
        <![endif]-->
            </td>
        </tr>
    </tbody>
</table><table class="mcnTextBlock" style="min-width:100%;" width="100%" cellspacing="0" cellpadding="0" border="0">
    <tbody class="mcnTextBlockOuter">
        <tr>
            <td class="mcnTextBlockInner" style="padding-top:9px;" valign="top">
                <!--[if mso]>
        <table align="left" border="0" cellspacing="0" cellpadding="0" width="100%" style="width:100%;">
        <tr>
        <![endif]-->
          
        <!--[if mso]>
        <td valign="top" width="600" style="width:600px;">
        <![endif]-->
                 <table style="max-width:100%; min-width:100%;" class="mcnTextContentContainer" width="100%" cellspacing="0" cellpadding="0" border="0" align="left">
                    <tbody><tr>
                        
                        <td class="mcnTextContent" style="padding: 0px 18px 9px; font-family: Verdana;" valign="top">
                        
                            <div style="padding: 10px 0; font-size: 16px; line-height: 32px; color: #666666;"> We encourage you to further explore the content of our database and the ​<b>CLME+ HUB</b>  (<a href="https://clmeplus.org" target="_blank" style="color: #1616ee !important; text-decoration: underline !important;">www.clmeplus.org​</a>), as this may prove useful for identifying opportunities for synergies and collaboration with other planned and ongoing initiatives.</div>


                        </td>
                    </tr>
                </tbody></table>
        <!--[if mso]>
        </td>
        <![endif]-->
                
        <!--[if mso]>
        </tr>
        </table>
        <![endif]-->
            </td>
        </tr>
    </tbody>
</table><table class="mcnTextBlock" style="min-width:100%;" width="100%" cellspacing="0" cellpadding="0" border="0">
    <tbody class="mcnTextBlockOuter">
        <tr>
            <td class="mcnTextBlockInner" style="padding-top:9px;" valign="top">
                <!--[if mso]>
        <table align="left" border="0" cellspacing="0" cellpadding="0" width="100%" style="width:100%;">
        <tr>
        <![endif]-->
          
        <!--[if mso]>
        <td valign="top" width="600" style="width:600px;">
        <![endif]-->
                 <table style="max-width:100%; min-width:100%;" class="mcnTextContentContainer" width="100%" cellspacing="0" cellpadding="0" border="0" align="left">
                    <tbody><tr>
                        
                        <td class="mcnTextContent" style="padding: 0px 18px 9px; font-family: Verdana;" valign="top">
                        
                            <div style="padding: 10px 0; font-size: 16px; line-height: 32px; color: #666666;"> Also, please don’t hesitate to share your experiences regarding the use of the database with us. If you have any questions or comments feel free to contact us using the following e-mail:<br><br><a href="mailto:info@clmeplus.org" style="color: #1616ee !important; text-decoration: underline !important;">info@clmeplus.org</a></div>


                        </td>
                    </tr>
                </tbody></table>
        <!--[if mso]>
        </td>
        <![endif]-->
                
        <!--[if mso]>
        </tr>
        </table>
        <![endif]-->
            </td>
        </tr>
    </tbody>
</table><table class="mcnTextBlock" style="min-width:100%;" width="100%" cellspacing="0" cellpadding="0" border="0">
    <tbody class="mcnTextBlockOuter">
        <tr>
            <td class="mcnTextBlockInner" style="padding-top:9px;" valign="top">
                <!--[if mso]>
        <table align="left" border="0" cellspacing="0" cellpadding="0" width="100%" style="width:100%;">
        <tr>
        <![endif]-->
          
        <!--[if mso]>
        <td valign="top" width="600" style="width:600px;">
        <![endif]-->                
                <table style="max-width:100%; min-width:100%;" class="mcnTextContentContainer" width="100%" cellspacing="0" cellpadding="0" border="0" align="left">
                    <tbody><tr>
                        
                        <td class="mcnTextContent" style="padding: 0px 18px 9px; font-family: Verdana;" valign="top">
                        
                            <div style="padding: 20px 0; font-size: 16px; line-height: 32px; color: #666666;">
                            Best regards,
                            </div>
                        </td>
                    </tr>
                </tbody></table>
        <!--[if mso]>
        </td>
        <![endif]-->
                
        <!--[if mso]>
        </tr>
        </table>
        <![endif]-->
            </td>
        </tr>
    </tbody>
</table><table class="mcnTextBlock" style="min-width:100%;" width="100%" cellspacing="0" cellpadding="0" border="0">
    <tbody class="mcnTextBlockOuter">
        <tr>
            <td class="mcnTextBlockInner" style="padding-top:9px;" valign="top">
                <!--[if mso]>
        <table align="left" border="0" cellspacing="0" cellpadding="0" width="100%" style="width:100%;">
        <tr>
        <![endif]-->
          
        <!--[if mso]>
        <td valign="top" width="600" style="width:600px;">
        <![endif]-->
                

                 <table style="max-width:100%; min-width:100%;" class="mcnTextContentContainer" width="100%" cellspacing="0" cellpadding="0" border="0" align="left">
                    <tbody><tr>
                        
                        <td class="mcnTextContent" style="padding: 0px 18px 9px; font-family: Verdana;" valign="top">
                        
                            <div style="padding: 20px 0; font-size: 16px; line-height: 32px; color: #666666;">  <b>Patrick Debels</b><br>
              UNDP/GEF CLME+ Project Coordination Unit<br>
              Secretariat to the CLME+ Interim Coordination Mechanism<br>
              </div>
                        </td>
                    </tr>
                </tbody></table>
        <!--[if mso]>
        </td>
        <![endif]-->
                
        <!--[if mso]>
        </tr>
        </table>
        <![endif]-->
            </td>
        </tr>
    </tbody>
</table><table class="mcnImageBlock" style="min-width:100%;" width="100%" cellspacing="0" cellpadding="0" border="0">
    <tbody class="mcnImageBlockOuter">
            <tr>
                <td style="padding:9px" class="mcnImageBlockInner" valign="top">
                    <table class="mcnImageContentContainer" style="min-width:100%;" width="100%" cellspacing="0" cellpadding="0" border="0" align="left">
                        <tbody><tr>
                            <td class="mcnImageContent" style="padding-right: 9px; padding-left: 9px; padding-top: 0; padding-bottom: 0; text-align:center;" valign="top">
                                
                                    
                                        <img alt="" src="https://mcusercontent.com/bccdb651bd8a8f943adddbe6c/images/d89e6079-7469-4607-8d2a-ef9d58af832e.png" style="max-width:1000px; padding-bottom: 0; display: inline !important; vertical-align: bottom;" class="mcnImage" width="564" align="middle">
                                    
                                
                            </td>
                        </tr>
                    </tbody></table>
                </td>
            </tr>
    </tbody>
</table></td>
                            </tr>
                            <tr>
                                <td valign="top" id="templateFooter"></td>
                            </tr>
                        </table>
                        <!--[if (gte mso 9)|(IE)]>
                        </td>
                        </tr>
                        </table>
                        <![endif]-->
                        <!-- // END TEMPLATE -->
                    </td>
                </tr>
            </table>
        </center>
    </body>
</html>';

			wp_mail( 'valencia.guzmandaniel@gmail.com', 'CLME+ HUB', $message_approval,$headers );
			wp_mail( $author_mail, 'CLME+ HUB PPI', $message_approval,$headers );	
	      
	
}

function on_publish_pending_post( $post ) {
// A function to perform actions when a post is published.
		//if ( "ppi_database" === get_post_type() ) {
			//wp_mail( 'caprubianojunior@hotmail.com' , 'CLME+ HUB PPI','primer paso:'.$post->post_type,array('Content-Type: text/html; charset=UTF-8','From: UNDP/GEF CLME+ <info@clmeplus.org>') );
			if ( "ppi_database" === $post->post_type ) {
				add_action( 'publish_post', 'send_mail_publish_ppi' );
				send_mail_publish_ppi($post->ID);
				
				//wp_mail( 'caprubianojunior@hotmail.com' , 'CLME+ HUB PPI','tercero paso',array('Content-Type: text/html; charset=UTF-8','From: UNDP/GEF CLME+ <info@clmeplus.org>') );
				// 2121
				//wp_mail( 'caprubianojunior@hotmail.com' , 'CLME+ HUB PPI','Cambiaron:'.$post->ID,array('Content-Type: text/html; charset=UTF-8','From: UNDP/GEF CLME+ <info@clmeplus.org>') );
				//wp_mail( 'valencia.guzmandaniel@gmail.com' , 'CLME+ HUB PPI','Cambiaron:'.$post->ID,array('Content-Type: text/html; charset=UTF-8','From: UNDP/GEF CLME+ <info@clmeplus.org>') );

			}

			if ( "doculibrary" === $post->post_type ) {


				global $post;
			    $author_id=$post->post_author;
			    $authormail = get_the_author_meta( 'user_email', $author_id);
			    $username   = get_the_author_meta( 'first_name', $author_id);
			    
			    $title   = $post->post_title;
			    $headers = array('Content-Type: text/html; charset=UTF-8','From: CLME+ HUB <info@clmeplus.org>');


			   	$message_approval = '<!doctype html>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office">
    <head>
        <!-- NAME: 1 COLUMN -->
        <!--[if gte mso 15]>
        <xml>
            <o:OfficeDocumentSettings>
            <o:AllowPNG/>
            <o:PixelsPerInch>96</o:PixelsPerInch>
            </o:OfficeDocumentSettings>
        </xml>
        <![endif]-->
        <meta charset="UTF-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <meta name="viewport" content="width=device-width, initial-scale=1">
        <title>*|MC:SUBJECT|*</title>
        
    <style type="text/css">
    p{
      margin:10px 0;
      padding:0;
      color: #666;
    }
    table{
      border-collapse:collapse;
    }
    h1,h2,h3,h4,h5,h6{
      display:block;
      margin:0;
      padding:0;
      font-family: Verdana;
      color: #666;
      font-weight: 500;
    }
    img,a img{
      border:0;
      height:auto;
      outline:none;
      text-decoration:none;
    }
    body,#bodyTable,#bodyCell{
      height:100%;
      margin:0;
      padding:0;
      width:100%;
    }
    .mcnPreviewText{
      display:none !important;
    }
    #outlook a{
      padding:0;
    }
    img{
      -ms-interpolation-mode:bicubic;
    }
    table{
      mso-table-lspace:0pt;
      mso-table-rspace:0pt;
    }
    .ReadMsgBody{
      width:100%;
    }
    .ExternalClass{
      width:100%;
    }
    p,a,li,td,blockquote{
      mso-line-height-rule:exactly;
    }
    a[href^=tel],a[href^=sms]{
      color:inherit;
      cursor:default;
      text-decoration:none;
    }
    p,a,li,td,body,table,blockquote{
      -ms-text-size-adjust:100%;
      -webkit-text-size-adjust:100%;
    }
    .ExternalClass,.ExternalClass p,.ExternalClass td,.ExternalClass div,.ExternalClass span,.ExternalClass font{
      line-height:100%;
    }
    a[x-apple-data-detectors]{
      color:inherit !important;
      text-decoration:none !important;
      font-size:inherit !important;
      font-family:inherit !important;
      font-weight:inherit !important;
      line-height:inherit !important;
    }
    #bodyCell{
      padding:10px;
    }
    .templateContainer{
      max-width:600px !important;
    }
    a.mcnButton{
      display:block;
    }
    .mcnImage,.mcnRetinaImage{
      vertical-align:bottom;
    }
    .mcnTextContent{
      word-break:break-word;
    }
    .mcnTextContent img{
      height:auto !important;
    }
    .mcnDividerBlock{
      table-layout:fixed !important;
    }
  
    body,#bodyTable{
      /*@editable*/background-color:#FFFFFF;
    }
  
    #bodyCell{
      /*@editable*/border-top:0;
    }
  
    .templateContainer{
      /*@editable*/border:0;
    }
  /*
  @tab Page
  @section Heading 1
  @tip Set the styling for all first-level headings in your emails. These should be the largest of your headings.
  @style heading 1
  */
    h1{
      /*@editable*/color:#202020;
      /*@editable*/font-family:Helvetica;
      /*@editable*/font-size:26px;
      /*@editable*/font-style:normal;
      /*@editable*/font-weight:bold;
      /*@editable*/line-height:125%;
      /*@editable*/letter-spacing:normal;
      /*@editable*/text-align:left;
    }
  /*
  @tab Page
  @section Heading 2
  @tip Set the styling for all second-level headings in your emails.
  @style heading 2
  */
    h2{
      /*@editable*/color:#202020;
      /*@editable*/font-family:Helvetica;
      /*@editable*/font-size:22px;
      /*@editable*/font-style:normal;
      /*@editable*/font-weight:bold;
      /*@editable*/line-height:125%;
      /*@editable*/letter-spacing:normal;
      /*@editable*/text-align:left;
    }
  /*
  @tab Page
  @section Heading 3
  @tip Set the styling for all third-level headings in your emails.
  @style heading 3
  */
    h3{
      /*@editable*/color:#202020;
      /*@editable*/font-family:Helvetica;
      /*@editable*/font-size:20px;
      /*@editable*/font-style:normal;
      /*@editable*/font-weight:bold;
      /*@editable*/line-height:125%;
      /*@editable*/letter-spacing:normal;
      /*@editable*/text-align:left;
    }
  /*
  @tab Page
  @section Heading 4
  @tip Set the styling for all fourth-level headings in your emails. These should be the smallest of your headings.
  @style heading 4
  */
    h4{
      /*@editable*/color:#202020;
      /*@editable*/font-family:Helvetica;
      /*@editable*/font-size:18px;
      /*@editable*/font-style:normal;
      /*@editable*/font-weight:bold;
      /*@editable*/line-height:125%;
      /*@editable*/letter-spacing:normal;
      /*@editable*/text-align:left;
    }
  
    #templatePreheader{
      /*@editable*/background-color:#FFFFFF;
      /*@editable*/background-image:none;
      /*@editable*/background-repeat:no-repeat;
      /*@editable*/background-position:center;
      /*@editable*/background-size:cover;
      /*@editable*/border-top:0;
      /*@editable*/border-bottom:0;
      /*@editable*/padding-top:9px;
      /*@editable*/padding-bottom:9px;
    }
  
    #templatePreheader .mcnTextContent,#templatePreheader .mcnTextContent p{
      /*@editable*/color:#656565;
      /*@editable*/font-family:Helvetica;
      /*@editable*/font-size:12px;
      /*@editable*/line-height:150%;
      /*@editable*/text-align:left;
    }
  
    #templatePreheader .mcnTextContent a,#templatePreheader .mcnTextContent p a{
      /*@editable*/color:#656565;
      /*@editable*/font-weight:normal;
      /*@editable*/text-decoration:underline;
    }
  
    #templateHeader{
      /*@editable*/background-color:#FFFFFF;
      /*@editable*/background-image:none;
      /*@editable*/background-repeat:no-repeat;
      /*@editable*/background-position:center;
      /*@editable*/background-size:cover;
      /*@editable*/border-top:0;
      /*@editable*/border-bottom:0;
      /*@editable*/padding-top:9px;
      /*@editable*/padding-bottom:0;
    }
  
    #templateHeader .mcnTextContent,#templateHeader .mcnTextContent p{
      /*@editable*/color:#202020;
      /*@editable*/font-family:Helvetica;
      /*@editable*/font-size:16px;
      /*@editable*/line-height:150%;
      /*@editable*/text-align:left;
    }
  
    #templateHeader .mcnTextContent a,#templateHeader .mcnTextContent p a{
      /*@editable*/color:#007C89;
      /*@editable*/font-weight:normal;
      /*@editable*/text-decoration:underline;
    }
  
    #templateBody{
      /*@editable*/background-color:#FFFFFF;
      /*@editable*/background-image:none;
      /*@editable*/background-repeat:no-repeat;
      /*@editable*/background-position:center;
      /*@editable*/background-size:cover;
      /*@editable*/border-top:0;
      /*@editable*/border-bottom:2px solid #EAEAEA;
      /*@editable*/padding-top:0;
      /*@editable*/padding-bottom:9px;
    }
  
    #templateBody .mcnTextContent,#templateBody .mcnTextContent p{
      /*@editable*/color:#202020;
      /*@editable*/font-family:Helvetica;
      /*@editable*/font-size:16px;
      /*@editable*/line-height:150%;
      /*@editable*/text-align:left;
    }
  
    #templateBody .mcnTextContent a,#templateBody .mcnTextContent p a{
      /*@editable*/color:#007C89;
      /*@editable*/font-weight:normal;
      /*@editable*/text-decoration:underline;
    }
  
    #templateFooter{
      /*@editable*/background-color:#FFFFFF;
      /*@editable*/background-image:none;
      /*@editable*/background-repeat:no-repeat;
      /*@editable*/background-position:center;
      /*@editable*/background-size:cover;
      /*@editable*/border-top:0;
      /*@editable*/border-bottom:0;
      /*@editable*/padding-top:9px;
      /*@editable*/padding-bottom:9px;
    }
  
    #templateFooter .mcnTextContent,#templateFooter .mcnTextContent p{
      /*@editable*/color:#656565;
      /*@editable*/font-family:Helvetica;
      /*@editable*/font-size:12px;
      /*@editable*/line-height:150%;
      /*@editable*/text-align:center;
    }
  
    #templateFooter .mcnTextContent a,#templateFooter .mcnTextContent p a{
      /*@editable*/color:#656565;
      /*@editable*/font-weight:normal;
      /*@editable*/text-decoration:underline;
    }
  @media only screen and (min-width:768px){
    .templateContainer{
      width:600px !important;
    }

} @media only screen and (max-width: 480px){
    body,table,td,p,a,li,blockquote{
      -webkit-text-size-adjust:none !important;
    }

} @media only screen and (max-width: 480px){
    body{
      width:100% !important;
      min-width:100% !important;
    }

} @media only screen and (max-width: 480px){
    .mcnRetinaImage{
      max-width:100% !important;
    }

} @media only screen and (max-width: 480px){
    .mcnImage{
      width:100% !important;
    }

} @media only screen and (max-width: 480px){
    .mcnCartContainer,.mcnCaptionTopContent,.mcnRecContentContainer,.mcnCaptionBottomContent,.mcnTextContentContainer,.mcnBoxedTextContentContainer,.mcnImageGroupContentContainer,.mcnCaptionLeftTextContentContainer,.mcnCaptionRightTextContentContainer,.mcnCaptionLeftImageContentContainer,.mcnCaptionRightImageContentContainer,.mcnImageCardLeftTextContentContainer,.mcnImageCardRightTextContentContainer,.mcnImageCardLeftImageContentContainer,.mcnImageCardRightImageContentContainer{
      max-width:100% !important;
      width:100% !important;
    }

} @media only screen and (max-width: 480px){
    .mcnBoxedTextContentContainer{
      min-width:100% !important;
    }

} @media only screen and (max-width: 480px){
    .mcnImageGroupContent{
      padding:9px !important;
    }

} @media only screen and (max-width: 480px){
    .mcnCaptionLeftContentOuter .mcnTextContent,.mcnCaptionRightContentOuter .mcnTextContent{
      padding-top:9px !important;
    }

} @media only screen and (max-width: 480px){
    .mcnImageCardTopImageContent,.mcnCaptionBottomContent:last-child .mcnCaptionBottomImageContent,.mcnCaptionBlockInner .mcnCaptionTopContent:last-child .mcnTextContent{
      padding-top:18px !important;
    }

} @media only screen and (max-width: 480px){
    .mcnImageCardBottomImageContent{
      padding-bottom:9px !important;
    }

} @media only screen and (max-width: 480px){
    .mcnImageGroupBlockInner{
      padding-top:0 !important;
      padding-bottom:0 !important;
    }

} @media only screen and (max-width: 480px){
    .mcnImageGroupBlockOuter{
      padding-top:9px !important;
      padding-bottom:9px !important;
    }

} @media only screen and (max-width: 480px){
    .mcnTextContent,.mcnBoxedTextContentColumn{
      padding-right:18px !important;
      padding-left:18px !important;
    }

} @media only screen and (max-width: 480px){
    .mcnImageCardLeftImageContent,.mcnImageCardRightImageContent{
      padding-right:18px !important;
      padding-bottom:0 !important;
      padding-left:18px !important;
    }

} @media only screen and (max-width: 480px){
    .mcpreview-image-uploader{
      display:none !important;
      width:100% !important;
    }

} @media only screen and (max-width: 480px){
  /*
  @tab Mobile Styles
  @section Heading 1
  @tip Make the first-level headings larger in size for better readability on small screens.
  */
    h1{
      /*@editable*/font-size:22px !important;
      /*@editable*/line-height:125% !important;
    }

} @media only screen and (max-width: 480px){
  /*
  @tab Mobile Styles
  @section Heading 2
  @tip Make the second-level headings larger in size for better readability on small screens.
  */
    h2{
      /*@editable*/font-size:20px !important;
      /*@editable*/line-height:125% !important;
    }

} @media only screen and (max-width: 480px){
  /*
  @tab Mobile Styles
  @section Heading 3
  @tip Make the third-level headings larger in size for better readability on small screens.
  */
    h3{
      /*@editable*/font-size:18px !important;
      /*@editable*/line-height:125% !important;
    }

} @media only screen and (max-width: 480px){
  /*
  @tab Mobile Styles
  @section Heading 4
  @tip Make the fourth-level headings larger in size for better readability on small screens.
  */
    h4{
      /*@editable*/font-size:16px !important;
      /*@editable*/line-height:150% !important;
    }

} @media only screen and (max-width: 480px){
  /*
  @tab Mobile Styles
  @section Boxed Text
  @tip Make the boxed text larger in size for better readability on small screens. We recommend a font size of at least 16px.
  */
    .mcnBoxedTextContentContainer .mcnTextContent,.mcnBoxedTextContentContainer .mcnTextContent p{
      /*@editable*/font-size:14px !important;
      /*@editable*/line-height:150% !important;
    }

} @media only screen and (max-width: 480px){
  
    #templatePreheader{
      /*@editable*/display:block !important;
    }

} @media only screen and (max-width: 480px){
  /*
  @tab Mobile Styles
  @section Preheader Text
  @tip Make the preheader text larger in size for better readability on small screens.
  */
    #templatePreheader .mcnTextContent,#templatePreheader .mcnTextContent p{
      /*@editable*/font-size:14px !important;
      /*@editable*/line-height:150% !important;
    }

} @media only screen and (max-width: 480px){
  /*
  @tab Mobile Styles
  @section Header Text
  @tip Make the header text larger in size for better readability on small screens.
  */
    #templateHeader .mcnTextContent,#templateHeader .mcnTextContent p{
      /*@editable*/font-size:16px !important;
      /*@editable*/line-height:150% !important;
    }

} @media only screen and (max-width: 480px){
  /*
  @tab Mobile Styles
  @section Body Text
  @tip Make the body text larger in size for better readability on small screens. We recommend a font size of at least 16px.
  */
    #templateBody .mcnTextContent,#templateBody .mcnTextContent p{
      /*@editable*/font-size:16px !important;
      /*@editable*/line-height:150% !important;
    }

} @media only screen and (max-width: 480px){
  /*
  @tab Mobile Styles
  @section Footer Text
  @tip Make the footer content text larger in size for better readability on small screens.
  */
    #templateFooter .mcnTextContent,#templateFooter .mcnTextContent p{
      /*@editable*/font-size:14px !important;
      /*@editable*/line-height:150% !important;
    }

}</style></head>
    <body>
        
        <center>
            <table align="center" border="0" cellpadding="0" cellspacing="0" height="100%" width="100%" id="bodyTable">
                <tr>
                    <td align="center" valign="top" id="bodyCell">
                        <!-- BEGIN TEMPLATE // -->
                        <!--[if (gte mso 9)|(IE)]>
                        <table align="center" border="0" cellspacing="0" cellpadding="0" width="600" style="width:600px;">
                        <tr>
                        <td align="center" valign="top" width="600" style="width:600px;">
                        <![endif]-->
                        <table border="0" cellpadding="0" cellspacing="0" width="100%" class="templateContainer">
                            <tr>
                                <td valign="top" id="templatePreheader"></td>
                            </tr>
                            <tr>
                                <td valign="top" id="templateHeader"><table class="mcnImageBlock" style="min-width:100%;" width="100%" cellspacing="0" cellpadding="0" border="0">
    <tbody class="mcnImageBlockOuter">
            <tr>
                <td style="padding:9px" class="mcnImageBlockInner" valign="top">
                    <table class="mcnImageContentContainer" style="min-width:100%;" width="100%" cellspacing="0" cellpadding="0" border="0" align="left">
                        <tbody><tr>
                            <td class="mcnImageContent" style="padding-right: 9px; padding-left: 9px; padding-top: 0; padding-bottom: 0; text-align:center;" valign="top">
                                
                                    
                                        <img alt="" src="https://clmeplus.org/app/uploads/2021/03/logo-clme-1.png" style="max-width:300px; padding-bottom: 0; vertical-align: bottom;" class="mcnImage" width="300" align="middle">
                                    
                                
                            </td>
                        </tr>
                    </tbody></table>
                </td>
            </tr>
    </tbody>
</table><table class="mcnDividerBlock" style="min-width:100%;" width="100%" cellspacing="0" cellpadding="0" border="0">
    <tbody class="mcnDividerBlockOuter">
        <tr>
            <td class="mcnDividerBlockInner" style="min-width:100%; padding:18px;">
                <table class="mcnDividerContent" style="min-width: 100%;border-top: 2px none #EAEAEA;" width="100%" cellspacing="0" cellpadding="0" border="0">
                    <tbody><tr>
                        <td>
                            <span></span>
                        </td>
                    </tr>
                </tbody></table>
<!--            
                <td class="mcnDividerBlockInner" style="padding: 18px;">
                <hr class="mcnDividerContent" style="border-bottom-color:none; border-left-color:none; border-right-color:none; border-bottom-width:0; border-left-width:0; border-right-width:0; margin-top:0; margin-right:0; margin-bottom:0; margin-left:0;" />
-->                 
            </td>
        </tr>
    </tbody>
</table></td>
                            </tr>
                            <tr>
                                <td valign="top" id="templateBody"><table class="mcnTextBlock" style="min-width:100%;" width="100%" cellspacing="0" cellpadding="0" border="0">
    <tbody class="mcnTextBlockOuter">
        <tr>
            <td class="mcnTextBlockInner" style="padding-top:9px;" valign="top">
                <!--[if mso]>
        <table align="left" border="0" cellspacing="0" cellpadding="0" width="100%" style="width:100%;">
        <tr>
        <![endif]-->
          
        <!--[if mso]>
        <td valign="top" width="600" style="width:600px;">
        <![endif]-->
                <table style="max-width:100%; min-width:100%;" class="mcnTextContentContainer" width="100%" cellspacing="0" cellpadding="0" border="0" align="left">
                    <tbody><tr>
                        
                        <td class="mcnTextContent" style="padding: 0px 18px 9px; font-family: Verdana;" valign="top">
                            <div style="padding: 0px 0; font-size: 16px; line-height: 32px; color: #666666; text-align: center;display: block;margin-bottom: 30px;">
                              <center> <br/> <h3 style="color: #5c6670; display: block; text-align: center;font-family: Verdana;">Your document has been approved and published!</h3> </center>
                            </div>          
                            <div style="padding: 0px 0; font-size: 16px; line-height: 32px; color: #666666;"> Dear '.$username.'<br><br>
Thank you very much for using our online form to upload the document: ​<b>'.$title.'</b>. This document has been approved and published and will now be included in the ​<b>Document Library for the Wider Caribbean/CLME+ region​ on the CLME+ HUB.</div>
                        </td>
                    </tr>
                </tbody></table>
        <!--[if mso]>
        </td>
        <![endif]-->
                
        <!--[if mso]>
        </tr>
        </table>
        <![endif]-->
            </td>
        </tr>
    </tbody>
</table><table class="mcnTextBlock" style="min-width:100%;" width="100%" cellspacing="0" cellpadding="0" border="0">
    <tbody class="mcnTextBlockOuter">
        <tr>
            <td class="mcnTextBlockInner" style="padding-top:9px;" valign="top">
                <!--[if mso]>
        <table align="left" border="0" cellspacing="0" cellpadding="0" width="100%" style="width:100%;">
        <tr>
        <![endif]-->
          
        <!--[if mso]>
        <td valign="top" width="600" style="width:600px;">
        <![endif]-->
                 <table style="max-width:100%; min-width:100%;" class="mcnTextContentContainer" width="100%" cellspacing="0" cellpadding="0" border="0" align="left">
                    <tbody><tr>
                        
                        <td class="mcnTextContent" style="padding: 0px 18px 9px; font-family: Verdana;" valign="top">
                        
                            <div style="padding: 10px 0; font-size: 16px; line-height: 32px; color: #666666;"> Please note that from now on you will be able to re-gain access to the online form to edit the information of the document and to upload more at any time by just login into the Hub. Since your account has been verified, our team will no longer need to approve your documents, so bear in mind to always upload documents and materials of the interest of the region. </div>


                        </td>
                    </tr>
                </tbody></table>
        <!--[if mso]>
        </td>
        <![endif]-->
                
        <!--[if mso]>
        </tr>
        </table>
        <![endif]-->
            </td>
        </tr>
    </tbody>
</table><table class="mcnTextBlock" style="min-width:100%;" width="100%" cellspacing="0" cellpadding="0" border="0">
    <tbody class="mcnTextBlockOuter">
        <tr>
            <td class="mcnTextBlockInner" style="padding-top:9px;" valign="top">
                <!--[if mso]>
        <table align="left" border="0" cellspacing="0" cellpadding="0" width="100%" style="width:100%;">
        <tr>
        <![endif]-->
          
        <!--[if mso]>
        <td valign="top" width="600" style="width:600px;">
        <![endif]-->
                 <table style="max-width:100%; min-width:100%;" class="mcnTextContentContainer" width="100%" cellspacing="0" cellpadding="0" border="0" align="left">
                    <tbody><tr>
                        
                        <td class="mcnTextContent" style="padding: 0px 18px 9px; font-family: Verdana;" valign="top">
                        
                            <div style="padding: 10px 0; font-size: 16px; line-height: 32px; color: #666666;"> Thank you for working collaboratively for a healthier marine environment, and towards enhancing the well-being of the peoples in our region. </div>


                        </td>
                    </tr>
                </tbody></table>
        <!--[if mso]>
        </td>
        <![endif]-->
                
        <!--[if mso]>
        </tr>
        </table>
        <![endif]-->
            </td>
        </tr>
    </tbody>
</table><table class="mcnTextBlock" style="min-width:100%;" width="100%" cellspacing="0" cellpadding="0" border="0">
    <tbody class="mcnTextBlockOuter">
        <tr>
            <td class="mcnTextBlockInner" style="padding-top:9px;" valign="top">
                <!--[if mso]>
        <table align="left" border="0" cellspacing="0" cellpadding="0" width="100%" style="width:100%;">
        <tr>
        <![endif]-->
          
        <!--[if mso]>
        <td valign="top" width="600" style="width:600px;">
        <![endif]-->
                 <table style="max-width:100%; min-width:100%;" class="mcnTextContentContainer" width="100%" cellspacing="0" cellpadding="0" border="0" align="left">
                    <tbody><tr>
                        
                        <td class="mcnTextContent" style="padding: 0px 18px 9px; font-family: Verdana;" valign="top">
                        
                            <div style="padding: 10px 0; font-size: 16px; line-height: 32px; color: #666666;"> We encourage you to further explore the content of our database and the ​<b>CLME+ HUB</b>  (<a href="https://clmeplus.org" target="_blank">www.clmeplus.org​</a>), as this may prove useful for identifying opportunities for synergies and collaboration with other planned and ongoing initiatives.</div>


                        </td>
                    </tr>
                </tbody></table>
        <!--[if mso]>
        </td>
        <![endif]-->
                
        <!--[if mso]>
        </tr>
        </table>
        <![endif]-->
            </td>
        </tr>
    </tbody>
</table><table class="mcnTextBlock" style="min-width:100%;" width="100%" cellspacing="0" cellpadding="0" border="0">
    <tbody class="mcnTextBlockOuter">
        <tr>
            <td class="mcnTextBlockInner" style="padding-top:9px;" valign="top">
                <!--[if mso]>
        <table align="left" border="0" cellspacing="0" cellpadding="0" width="100%" style="width:100%;">
        <tr>
        <![endif]-->
          
        <!--[if mso]>
        <td valign="top" width="600" style="width:600px;">
        <![endif]-->
                 <table style="max-width:100%; min-width:100%;" class="mcnTextContentContainer" width="100%" cellspacing="0" cellpadding="0" border="0" align="left">
                    <tbody><tr>
                        
                        <td class="mcnTextContent" style="padding: 0px 18px 9px; font-family: Verdana;" valign="top">
                        
                            <div style="padding: 10px 0; font-size: 16px; line-height: 32px; color: #666666;"> Also, please don’t hesitate to share your experiences regarding the use of the database with us. If you have any questions or comments feel free to contact us using the following e-mail:<br><br><a href="mailto:info@clmeplus.org">info@clmeplus.org</a></div>


                        </td>
                    </tr>
                </tbody></table>
        <!--[if mso]>
        </td>
        <![endif]-->
                
        <!--[if mso]>
        </tr>
        </table>
        <![endif]-->
            </td>
        </tr>
    </tbody>
</table><table class="mcnTextBlock" style="min-width:100%;" width="100%" cellspacing="0" cellpadding="0" border="0">
    <tbody class="mcnTextBlockOuter">
        <tr>
            <td class="mcnTextBlockInner" style="padding-top:9px;" valign="top">
                <!--[if mso]>
        <table align="left" border="0" cellspacing="0" cellpadding="0" width="100%" style="width:100%;">
        <tr>
        <![endif]-->
          
        <!--[if mso]>
        <td valign="top" width="600" style="width:600px;">
        <![endif]-->                
                <table style="max-width:100%; min-width:100%;" class="mcnTextContentContainer" width="100%" cellspacing="0" cellpadding="0" border="0" align="left">
                    <tbody><tr>
                        
                        <td class="mcnTextContent" style="padding: 0px 18px 9px; font-family: Verdana;" valign="top">
                        
                            <div style="padding: 20px 0; font-size: 16px; line-height: 32px; color: #666666;">
                            Best regards,
                            </div>
                        </td>
                    </tr>
                </tbody></table>
        <!--[if mso]>
        </td>
        <![endif]-->
                
        <!--[if mso]>
        </tr>
        </table>
        <![endif]-->
            </td>
        </tr>
    </tbody>
</table><table class="mcnTextBlock" style="min-width:100%;" width="100%" cellspacing="0" cellpadding="0" border="0">
    <tbody class="mcnTextBlockOuter">
        <tr>
            <td class="mcnTextBlockInner" style="padding-top:9px;" valign="top">
                <!--[if mso]>
        <table align="left" border="0" cellspacing="0" cellpadding="0" width="100%" style="width:100%;">
        <tr>
        <![endif]-->
          
        <!--[if mso]>
        <td valign="top" width="600" style="width:600px;">
        <![endif]-->
                

                 <table style="max-width:100%; min-width:100%;" class="mcnTextContentContainer" width="100%" cellspacing="0" cellpadding="0" border="0" align="left">
                    <tbody><tr>
                        
                        <td class="mcnTextContent" style="padding: 0px 18px 9px; font-family: Verdana;" valign="top">
                        
                            <div style="padding: 20px 0; font-size: 16px; line-height: 32px; color: #666666;">  <b>Patrick Debels</b><br>
              UNDP/GEF CLME+ Project Coordination Unit<br>
              Secretariat to the CLME+ Interim Coordination Mechanism<br>
              </div>
                        </td>
                    </tr>
                </tbody></table>
        <!--[if mso]>
        </td>
        <![endif]-->
                
        <!--[if mso]>
        </tr>
        </table>
        <![endif]-->
            </td>
        </tr>
    </tbody>
</table><table class="mcnImageBlock" style="min-width:100%;" width="100%" cellspacing="0" cellpadding="0" border="0">
    <tbody class="mcnImageBlockOuter">
            <tr>
                <td style="padding:9px" class="mcnImageBlockInner" valign="top">
                    <table class="mcnImageContentContainer" style="min-width:100%;" width="100%" cellspacing="0" cellpadding="0" border="0" align="left">
                        <tbody><tr>
                            <td class="mcnImageContent" style="padding-right: 9px; padding-left: 9px; padding-top: 0; padding-bottom: 0; text-align:center;" valign="top">
                                
                                    
                                        <img alt="" src="https://mcusercontent.com/bccdb651bd8a8f943adddbe6c/images/d89e6079-7469-4607-8d2a-ef9d58af832e.png" style="max-width:1000px; padding-bottom: 0; display: inline !important; vertical-align: bottom;" class="mcnImage" width="564" align="middle">
                                    
                                
                            </td>
                        </tr>
                    </tbody></table>
                </td>
            </tr>
    </tbody>
</table></td>
                            </tr>
                            <tr>
                                <td valign="top" id="templateFooter"></td>
                            </tr>
                        </table>
                        <!--[if (gte mso 9)|(IE)]>
                        </td>
                        </tr>
                        </table>
                        <![endif]-->
                        <!-- // END TEMPLATE -->
                    </td>
                </tr>
            </table>
        </center>
    </body>
</html>';


				//wp_mail( 'valencia.guzmandaniel@gmail.com' , 'DOCUMEN PUBLICADO DE PENDIENTE ' . $authormail . 'nombre' . $username . 'title' . $title ) ;

				//wp_mail( 'valencia.guzmandaniel@gmail.com', 'CLME+ HUB PPI', $message_approval, $headers );

				wp_mail( $authormail, 'Your document has been approved and published!', $message_approval, $headers );
			}




			if ( "rcd-contact" === $post->post_type ) {


				global $post;
			    $author_id=$post->post_author;
			    $authormail = get_the_author_meta( 'user_email', $author_id);
			    $username   = get_the_author_meta( 'first_name', $author_id);
			    
			    $title   = $post->post_title;
			    $headers = array('Content-Type: text/html; charset=UTF-8','From: CLME+ Hub <info@clmeplus.org>');


			   	$message_approval = '<!doctype html>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office">
    <head>
        <!-- NAME: 1 COLUMN -->
        <!--[if gte mso 15]>
        <xml>
            <o:OfficeDocumentSettings>
            <o:AllowPNG/>
            <o:PixelsPerInch>96</o:PixelsPerInch>
            </o:OfficeDocumentSettings>
        </xml>
        <![endif]-->
        <meta charset="UTF-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <meta name="viewport" content="width=device-width, initial-scale=1">

        
    <style type="text/css">
    p{
      margin:10px 0;
      padding:0;
      color: #666;
    }
    table{
      border-collapse:collapse;
    }
    h1,h2,h3,h4,h5,h6{
      display:block;
      margin:0;
      padding:0;
      font-family: Verdana;
      color: #666;
      font-weight: 500;
    }
    img,a img{
      border:0;
      height:auto;
      outline:none;
      text-decoration:none;
    }
    body,#bodyTable,#bodyCell{
      height:100%;
      margin:0;
      padding:0;
      width:100%;
    }
    .mcnPreviewText{
      display:none !important;
    }
    #outlook a{
      padding:0;
    }
    img{
      -ms-interpolation-mode:bicubic;
    }
    table{
      mso-table-lspace:0pt;
      mso-table-rspace:0pt;
    }
    .ReadMsgBody{
      width:100%;
    }
    .ExternalClass{
      width:100%;
    }
    p,a,li,td,blockquote{
      mso-line-height-rule:exactly;
    }
    a[href^=tel],a[href^=sms]{
      color:inherit;
      cursor:default;
      text-decoration:none;
    }
    p,a,li,td,body,table,blockquote{
      -ms-text-size-adjust:100%;
      -webkit-text-size-adjust:100%;
    }
    .ExternalClass,.ExternalClass p,.ExternalClass td,.ExternalClass div,.ExternalClass span,.ExternalClass font{
      line-height:100%;
    }
    a[x-apple-data-detectors]{
      color:inherit !important;
      text-decoration:none !important;
      font-size:inherit !important;
      font-family:inherit !important;
      font-weight:inherit !important;
      line-height:inherit !important;
    }
    #bodyCell{
      padding:10px;
    }
    .templateContainer{
      max-width:600px !important;
    }
    a.mcnButton{
      display:block;
    }
    .mcnImage,.mcnRetinaImage{
      vertical-align:bottom;
    }
    .mcnTextContent{
      word-break:break-word;
    }
    .mcnTextContent img{
      height:auto !important;
    }
    .mcnDividerBlock{
      table-layout:fixed !important;
    }
  
    body,#bodyTable{
      /*@editable*/background-color:#FFFFFF;
    }
  
    #bodyCell{
      /*@editable*/border-top:0;
    }
  
    .templateContainer{
      /*@editable*/border:0;
    }
  /*
  @tab Page
  @section Heading 1
  @tip Set the styling for all first-level headings in your emails. These should be the largest of your headings.
  @style heading 1
  */
    h1{
      /*@editable*/color:#202020;
      /*@editable*/font-family:Helvetica;
      /*@editable*/font-size:26px;
      /*@editable*/font-style:normal;
      /*@editable*/font-weight:bold;
      /*@editable*/line-height:125%;
      /*@editable*/letter-spacing:normal;
      /*@editable*/text-align:left;
    }
  /*
  @tab Page
  @section Heading 2
  @tip Set the styling for all second-level headings in your emails.
  @style heading 2
  */
    h2{
      /*@editable*/color:#202020;
      /*@editable*/font-family:Helvetica;
      /*@editable*/font-size:22px;
      /*@editable*/font-style:normal;
      /*@editable*/font-weight:bold;
      /*@editable*/line-height:125%;
      /*@editable*/letter-spacing:normal;
      /*@editable*/text-align:left;
    }
  /*
  @tab Page
  @section Heading 3
  @tip Set the styling for all third-level headings in your emails.
  @style heading 3
  */
    h3{
      /*@editable*/color:#202020;
      /*@editable*/font-family:Helvetica;
      /*@editable*/font-size:20px;
      /*@editable*/font-style:normal;
      /*@editable*/font-weight:bold;
      /*@editable*/line-height:125%;
      /*@editable*/letter-spacing:normal;
      /*@editable*/text-align:left;
    }
  /*
  @tab Page
  @section Heading 4
  @tip Set the styling for all fourth-level headings in your emails. These should be the smallest of your headings.
  @style heading 4
  */
    h4{
      /*@editable*/color:#202020;
      /*@editable*/font-family:Helvetica;
      /*@editable*/font-size:18px;
      /*@editable*/font-style:normal;
      /*@editable*/font-weight:bold;
      /*@editable*/line-height:125%;
      /*@editable*/letter-spacing:normal;
      /*@editable*/text-align:left;
    }
  
    #templatePreheader{
      /*@editable*/background-color:#FFFFFF;
      /*@editable*/background-image:none;
      /*@editable*/background-repeat:no-repeat;
      /*@editable*/background-position:center;
      /*@editable*/background-size:cover;
      /*@editable*/border-top:0;
      /*@editable*/border-bottom:0;
      /*@editable*/padding-top:9px;
      /*@editable*/padding-bottom:9px;
    }
  
    #templatePreheader .mcnTextContent,#templatePreheader .mcnTextContent p{
      /*@editable*/color:#656565;
      /*@editable*/font-family:Helvetica;
      /*@editable*/font-size:12px;
      /*@editable*/line-height:150%;
      /*@editable*/text-align:left;
    }
  
    #templatePreheader .mcnTextContent a,#templatePreheader .mcnTextContent p a{
      /*@editable*/color:#656565;
      /*@editable*/font-weight:normal;
      /*@editable*/text-decoration:underline;
    }
  
    #templateHeader{
      /*@editable*/background-color:#FFFFFF;
      /*@editable*/background-image:none;
      /*@editable*/background-repeat:no-repeat;
      /*@editable*/background-position:center;
      /*@editable*/background-size:cover;
      /*@editable*/border-top:0;
      /*@editable*/border-bottom:0;
      /*@editable*/padding-top:9px;
      /*@editable*/padding-bottom:0;
    }
  
    #templateHeader .mcnTextContent,#templateHeader .mcnTextContent p{
      /*@editable*/color:#202020;
      /*@editable*/font-family:Helvetica;
      /*@editable*/font-size:16px;
      /*@editable*/line-height:150%;
      /*@editable*/text-align:left;
    }
  
    #templateHeader .mcnTextContent a,#templateHeader .mcnTextContent p a{
      /*@editable*/color:#007C89;
      /*@editable*/font-weight:normal;
      /*@editable*/text-decoration:underline;
    }
  
    #templateBody{
      /*@editable*/background-color:#FFFFFF;
      /*@editable*/background-image:none;
      /*@editable*/background-repeat:no-repeat;
      /*@editable*/background-position:center;
      /*@editable*/background-size:cover;
      /*@editable*/border-top:0;
      /*@editable*/border-bottom:2px solid #EAEAEA;
      /*@editable*/padding-top:0;
      /*@editable*/padding-bottom:9px;
    }
  
    #templateBody .mcnTextContent,#templateBody .mcnTextContent p{
      /*@editable*/color:#202020;
      /*@editable*/font-family:Helvetica;
      /*@editable*/font-size:16px;
      /*@editable*/line-height:150%;
      /*@editable*/text-align:left;
    }
  
    #templateBody .mcnTextContent a,#templateBody .mcnTextContent p a{
      /*@editable*/color:#007C89;
      /*@editable*/font-weight:normal;
      /*@editable*/text-decoration:underline;
    }
  
    #templateFooter{
      /*@editable*/background-color:#FFFFFF;
      /*@editable*/background-image:none;
      /*@editable*/background-repeat:no-repeat;
      /*@editable*/background-position:center;
      /*@editable*/background-size:cover;
      /*@editable*/border-top:0;
      /*@editable*/border-bottom:0;
      /*@editable*/padding-top:9px;
      /*@editable*/padding-bottom:9px;
    }
  
    #templateFooter .mcnTextContent,#templateFooter .mcnTextContent p{
      /*@editable*/color:#656565;
      /*@editable*/font-family:Helvetica;
      /*@editable*/font-size:12px;
      /*@editable*/line-height:150%;
      /*@editable*/text-align:center;
    }
  
    #templateFooter .mcnTextContent a,#templateFooter .mcnTextContent p a{
      /*@editable*/color:#656565;
      /*@editable*/font-weight:normal;
      /*@editable*/text-decoration:underline;
    }
  @media only screen and (min-width:768px){
    .templateContainer{
      width:600px !important;
    }

} @media only screen and (max-width: 480px){
    body,table,td,p,a,li,blockquote{
      -webkit-text-size-adjust:none !important;
    }

} @media only screen and (max-width: 480px){
    body{
      width:100% !important;
      min-width:100% !important;
    }

} @media only screen and (max-width: 480px){
    .mcnRetinaImage{
      max-width:100% !important;
    }

} @media only screen and (max-width: 480px){
    .mcnImage{
      width:100% !important;
    }

} @media only screen and (max-width: 480px){
    .mcnCartContainer,.mcnCaptionTopContent,.mcnRecContentContainer,.mcnCaptionBottomContent,.mcnTextContentContainer,.mcnBoxedTextContentContainer,.mcnImageGroupContentContainer,.mcnCaptionLeftTextContentContainer,.mcnCaptionRightTextContentContainer,.mcnCaptionLeftImageContentContainer,.mcnCaptionRightImageContentContainer,.mcnImageCardLeftTextContentContainer,.mcnImageCardRightTextContentContainer,.mcnImageCardLeftImageContentContainer,.mcnImageCardRightImageContentContainer{
      max-width:100% !important;
      width:100% !important;
    }

} @media only screen and (max-width: 480px){
    .mcnBoxedTextContentContainer{
      min-width:100% !important;
    }

} @media only screen and (max-width: 480px){
    .mcnImageGroupContent{
      padding:9px !important;
    }

} @media only screen and (max-width: 480px){
    .mcnCaptionLeftContentOuter .mcnTextContent,.mcnCaptionRightContentOuter .mcnTextContent{
      padding-top:9px !important;
    }

} @media only screen and (max-width: 480px){
    .mcnImageCardTopImageContent,.mcnCaptionBottomContent:last-child .mcnCaptionBottomImageContent,.mcnCaptionBlockInner .mcnCaptionTopContent:last-child .mcnTextContent{
      padding-top:18px !important;
    }

} @media only screen and (max-width: 480px){
    .mcnImageCardBottomImageContent{
      padding-bottom:9px !important;
    }

} @media only screen and (max-width: 480px){
    .mcnImageGroupBlockInner{
      padding-top:0 !important;
      padding-bottom:0 !important;
    }

} @media only screen and (max-width: 480px){
    .mcnImageGroupBlockOuter{
      padding-top:9px !important;
      padding-bottom:9px !important;
    }

} @media only screen and (max-width: 480px){
    .mcnTextContent,.mcnBoxedTextContentColumn{
      padding-right:18px !important;
      padding-left:18px !important;
    }

} @media only screen and (max-width: 480px){
    .mcnImageCardLeftImageContent,.mcnImageCardRightImageContent{
      padding-right:18px !important;
      padding-bottom:0 !important;
      padding-left:18px !important;
    }

} @media only screen and (max-width: 480px){
    .mcpreview-image-uploader{
      display:none !important;
      width:100% !important;
    }

} @media only screen and (max-width: 480px){
  /*
  @tab Mobile Styles
  @section Heading 1
  @tip Make the first-level headings larger in size for better readability on small screens.
  */
    h1{
      /*@editable*/font-size:22px !important;
      /*@editable*/line-height:125% !important;
    }

} @media only screen and (max-width: 480px){
  /*
  @tab Mobile Styles
  @section Heading 2
  @tip Make the second-level headings larger in size for better readability on small screens.
  */
    h2{
      /*@editable*/font-size:20px !important;
      /*@editable*/line-height:125% !important;
    }

} @media only screen and (max-width: 480px){
  /*
  @tab Mobile Styles
  @section Heading 3
  @tip Make the third-level headings larger in size for better readability on small screens.
  */
    h3{
      /*@editable*/font-size:18px !important;
      /*@editable*/line-height:125% !important;
    }

} @media only screen and (max-width: 480px){
  /*
  @tab Mobile Styles
  @section Heading 4
  @tip Make the fourth-level headings larger in size for better readability on small screens.
  */
    h4{
      /*@editable*/font-size:16px !important;
      /*@editable*/line-height:150% !important;
    }

} @media only screen and (max-width: 480px){
  /*
  @tab Mobile Styles
  @section Boxed Text
  @tip Make the boxed text larger in size for better readability on small screens. We recommend a font size of at least 16px.
  */
    .mcnBoxedTextContentContainer .mcnTextContent,.mcnBoxedTextContentContainer .mcnTextContent p{
      /*@editable*/font-size:14px !important;
      /*@editable*/line-height:150% !important;
    }

} @media only screen and (max-width: 480px){
  
    #templatePreheader{
      /*@editable*/display:block !important;
    }

} @media only screen and (max-width: 480px){
  /*
  @tab Mobile Styles
  @section Preheader Text
  @tip Make the preheader text larger in size for better readability on small screens.
  */
    #templatePreheader .mcnTextContent,#templatePreheader .mcnTextContent p{
      /*@editable*/font-size:14px !important;
      /*@editable*/line-height:150% !important;
    }

} @media only screen and (max-width: 480px){
  /*
  @tab Mobile Styles
  @section Header Text
  @tip Make the header text larger in size for better readability on small screens.
  */
    #templateHeader .mcnTextContent,#templateHeader .mcnTextContent p{
      /*@editable*/font-size:16px !important;
      /*@editable*/line-height:150% !important;
    }

} @media only screen and (max-width: 480px){
  /*
  @tab Mobile Styles
  @section Body Text
  @tip Make the body text larger in size for better readability on small screens. We recommend a font size of at least 16px.
  */
    #templateBody .mcnTextContent,#templateBody .mcnTextContent p{
      /*@editable*/font-size:16px !important;
      /*@editable*/line-height:150% !important;
    }

} @media only screen and (max-width: 480px){
  /*
  @tab Mobile Styles
  @section Footer Text
  @tip Make the footer content text larger in size for better readability on small screens.
  */
    #templateFooter .mcnTextContent,#templateFooter .mcnTextContent p{
      /*@editable*/font-size:14px !important;
      /*@editable*/line-height:150% !important;
    }

}</style></head>
    <body>
        
        <center>
            <table align="center" border="0" cellpadding="0" cellspacing="0" height="100%" width="100%" id="bodyTable">
                <tr>
                    <td align="center" valign="top" id="bodyCell">
                        <!-- BEGIN TEMPLATE // -->
                        <!--[if (gte mso 9)|(IE)]>
                        <table align="center" border="0" cellspacing="0" cellpadding="0" width="600" style="width:600px;">
                        <tr>
                        <td align="center" valign="top" width="600" style="width:600px;">
                        <![endif]-->
                        <table border="0" cellpadding="0" cellspacing="0" width="100%" class="templateContainer">
                            <tr>
                                <td valign="top" id="templatePreheader"></td>
                            </tr>
                            <tr>
                                <td valign="top" id="templateHeader"><table class="mcnImageBlock" style="min-width:100%;" width="100%" cellspacing="0" cellpadding="0" border="0">
    <tbody class="mcnImageBlockOuter">
            <tr>
                <td style="padding:9px" class="mcnImageBlockInner" valign="top">
                    <table class="mcnImageContentContainer" style="min-width:100%;" width="100%" cellspacing="0" cellpadding="0" border="0" align="left">
                        <tbody><tr>
                            <td class="mcnImageContent" style="padding-right: 9px; padding-left: 9px; padding-top: 0; padding-bottom: 0; text-align:center;" valign="top">
                                
                                    
                                        <img alt="" src="https://clmeplus.org/app/uploads/2021/03/logo-clme-1.png" style="max-width:300px; padding-bottom: 0; vertical-align: bottom;" class="mcnImage" width="300" align="middle">
                                    
                                
                            </td>
                        </tr>
                    </tbody></table>
                </td>
            </tr>
    </tbody>
</table><table class="mcnDividerBlock" style="min-width:100%;" width="100%" cellspacing="0" cellpadding="0" border="0">
    <tbody class="mcnDividerBlockOuter">
        <tr>
            <td class="mcnDividerBlockInner" style="min-width:100%; padding:18px;">
                <table class="mcnDividerContent" style="min-width: 100%;border-top: 2px none #EAEAEA;" width="100%" cellspacing="0" cellpadding="0" border="0">
                    <tbody><tr>
                        <td>
                            <span></span>
                        </td>
                    </tr>
                </tbody></table>
<!--            
                <td class="mcnDividerBlockInner" style="padding: 18px;">
                <hr class="mcnDividerContent" style="border-bottom-color:none; border-left-color:none; border-right-color:none; border-bottom-width:0; border-left-width:0; border-right-width:0; margin-top:0; margin-right:0; margin-bottom:0; margin-left:0;" />
-->                 
            </td>
        </tr>
    </tbody>
</table></td>
                            </tr>
                            <tr>
                                <td valign="top" id="templateBody"><table class="mcnTextBlock" style="min-width:100%;" width="100%" cellspacing="0" cellpadding="0" border="0">
    <tbody class="mcnTextBlockOuter">
        <tr>
            <td class="mcnTextBlockInner" style="padding-top:9px;" valign="top">
                <!--[if mso]>
        <table align="left" border="0" cellspacing="0" cellpadding="0" width="100%" style="width:100%;">
        <tr>
        <![endif]-->
          
        <!--[if mso]>
        <td valign="top" width="600" style="width:600px;">
        <![endif]-->
                <table style="max-width:100%; min-width:100%;" class="mcnTextContentContainer" width="100%" cellspacing="0" cellpadding="0" border="0" align="left">
                    <tbody><tr>
                        
                        <td class="mcnTextContent" style="padding: 0px 18px 9px; font-family: Verdana;" valign="top">
                            <div style="padding: 0px 0; font-size: 16px; line-height: 32px; color: #666666; text-align: center;display: block;margin-bottom: 30px;">
                              <center> <br/> <h3 style="color: #5c6670; display: block; text-align: center;font-family: Verdana;">Your contact profile has been approved and published!</h3> </center>
                            </div>          
                            <div style="padding: 0px 0 0px 0; font-size: 16px; line-height: 32px; color: #666666;">Dear '. $username .'<br><br>
Thank you very much for using our online form to create a contact profile for: ​<b>'. $title.'</b>. This document has been approved and published and will now be included in the ​<b>Contacts Database for the Wider Caribbean/CLME+ region​</b> on the CLME+ HUB.</b> </div>
                        </td>
                    </tr>
                </tbody></table>
        <!--[if mso]>
        </td>
        <![endif]-->
                
        <!--[if mso]>
        </tr>
        </table>
        <![endif]-->
            </td>
        </tr>
    </tbody>
</table><table class="mcnTextBlock" style="min-width:100%;" width="100%" cellspacing="0" cellpadding="0" border="0">
    <tbody class="mcnTextBlockOuter">
        <tr>
            <td class="mcnTextBlockInner" style="padding-top:9px;" valign="top">
                <!--[if mso]>
        <table align="left" border="0" cellspacing="0" cellpadding="0" width="100%" style="width:100%;">
        <tr>
        <![endif]-->
          
        <!--[if mso]>
        <td valign="top" width="600" style="width:600px;">
        <![endif]-->
                 <table style="max-width:100%; min-width:100%;" class="mcnTextContentContainer" width="100%" cellspacing="0" cellpadding="0" border="0" align="left">
                    <tbody><tr>
                        
                        <td class="mcnTextContent" style="padding: 0px 18px 9px; font-family: Verdana;" valign="top">
                        
                            <div style="padding: 10px 0; font-size: 16px; line-height: 32px; color: #666666;"> Please note that from now on you will be able to re-gain access to the online form to edit the information of this contact profile and to upload more at any time by just login into the Hub. Since your account has been verified, our team will no longer need to approve your contacts profiles, so bear in mind to always create contact profiles of the interest of the region.<br></div>


                        </td>
                    </tr>
                </tbody></table>
        <!--[if mso]>
        </td>
        <![endif]-->
                
        <!--[if mso]>
        </tr>
        </table>
        <![endif]-->
            </td>
        </tr>
    </tbody>
</table><table class="mcnTextBlock" style="min-width:100%;" width="100%" cellspacing="0" cellpadding="0" border="0">
    <tbody class="mcnTextBlockOuter">
        <tr>
            <td class="mcnTextBlockInner" style="padding-top:9px;" valign="top">
                <!--[if mso]>
        <table align="left" border="0" cellspacing="0" cellpadding="0" width="100%" style="width:100%;">
        <tr>
        <![endif]-->
          
        <!--[if mso]>
        <td valign="top" width="600" style="width:600px;">
        <![endif]-->
                 <table style="max-width:100%; min-width:100%;" class="mcnTextContentContainer" width="100%" cellspacing="0" cellpadding="0" border="0" align="left">
                    <tbody><tr>
                        
                        <td class="mcnTextContent" style="padding: 0px 18px 9px; font-family: Verdana;" valign="top">
                        
                            <div style="padding: 10px 0; font-size: 16px; line-height: 32px; color: #666666;"> Thank you for working collaboratively for a healthier marine environment, and towards enhancing the well-being of the peoples in our region.<br></div>


                        </td>
                    </tr>
                </tbody></table>
        <!--[if mso]>
        </td>
        <![endif]-->
                
        <!--[if mso]>
        </tr>
        </table>
        <![endif]-->
            </td>
        </tr>
    </tbody>
</table><table class="mcnTextBlock" style="min-width:100%;" width="100%" cellspacing="0" cellpadding="0" border="0">
    <tbody class="mcnTextBlockOuter">
        <tr>
            <td class="mcnTextBlockInner" style="padding-top:9px;" valign="top">
                <!--[if mso]>
        <table align="left" border="0" cellspacing="0" cellpadding="0" width="100%" style="width:100%;">
        <tr>
        <![endif]-->
          
        <!--[if mso]>
        <td valign="top" width="600" style="width:600px;">
        <![endif]-->
                 <table style="max-width:100%; min-width:100%;" class="mcnTextContentContainer" width="100%" cellspacing="0" cellpadding="0" border="0" align="left">
                    <tbody><tr>
                        
                        <td class="mcnTextContent" style="padding: 0px 18px 9px; font-family: Verdana;" valign="top">
                        
                            <div style="padding: 10px 0; font-size: 16px; line-height: 32px; color: #666666;"> We encourage you to further explore the content of our database and the ​<b>CLME+ HUB</b>  (<a href="https://clmeplus.org" target="_blank" style="color: #1616ee !important; text-decoration: underline !important;">www.clmeplus.org​</a>), as this may prove useful for identifying opportunities for synergies and collaboration with other people in the region.</div>


                        </td>
                    </tr>
                </tbody></table>
        <!--[if mso]>
        </td>
        <![endif]-->
                
        <!--[if mso]>
        </tr>
        </table>
        <![endif]-->
            </td>
        </tr>
    </tbody>
</table><table class="mcnTextBlock" style="min-width:100%;" width="100%" cellspacing="0" cellpadding="0" border="0">
    <tbody class="mcnTextBlockOuter">
        <tr>
            <td class="mcnTextBlockInner" style="padding-top:9px;" valign="top">
                <!--[if mso]>
        <table align="left" border="0" cellspacing="0" cellpadding="0" width="100%" style="width:100%;">
        <tr>
        <![endif]-->
          
        <!--[if mso]>
        <td valign="top" width="600" style="width:600px;">
        <![endif]-->
                 <table style="max-width:100%; min-width:100%;" class="mcnTextContentContainer" width="100%" cellspacing="0" cellpadding="0" border="0" align="left">
                    <tbody><tr>
                        
                        <td class="mcnTextContent" style="padding: 0px 18px 9px; font-family: Verdana;" valign="top">
                        
                            <div style="padding: 10px 0; font-size: 16px; line-height: 32px; color: #666666;"> Also, please don’t hesitate to share your experiences regarding the use of the database with us. If you have any questions or comments feel free to contact us using the following e-mail:<br><br><a href="mailto:info@clmeplus.org" style="color: #1616ee !important; text-decoration: underline !important;">info@clmeplus.org</a></div>


                        </td>
                    </tr>
                </tbody></table>
        <!--[if mso]>
        </td>
        <![endif]-->
                
        <!--[if mso]>
        </tr>
        </table>
        <![endif]-->
            </td>
        </tr>
    </tbody>
</table><table class="mcnTextBlock" style="min-width:100%;" width="100%" cellspacing="0" cellpadding="0" border="0">
    <tbody class="mcnTextBlockOuter">
        <tr>
            <td class="mcnTextBlockInner" style="padding-top:9px;" valign="top">
                <!--[if mso]>
        <table align="left" border="0" cellspacing="0" cellpadding="0" width="100%" style="width:100%;">
        <tr>
        <![endif]-->
          
        <!--[if mso]>
        <td valign="top" width="600" style="width:600px;">
        <![endif]-->                
                <table style="max-width:100%; min-width:100%;" class="mcnTextContentContainer" width="100%" cellspacing="0" cellpadding="0" border="0" align="left">
                    <tbody><tr>
                        
                        <td class="mcnTextContent" style="padding: 0px 18px 9px; font-family: Verdana;" valign="top">
                        
                            <div style="padding: 20px 0; font-size: 16px; line-height: 32px; color: #666666;">
                            Best regards,
                            </div>
                        </td>
                    </tr>
                </tbody></table>
        <!--[if mso]>
        </td>
        <![endif]-->
                
        <!--[if mso]>
        </tr>
        </table>
        <![endif]-->
            </td>
        </tr>
    </tbody>
</table><table class="mcnTextBlock" style="min-width:100%;" width="100%" cellspacing="0" cellpadding="0" border="0">
    <tbody class="mcnTextBlockOuter">
        <tr>
            <td class="mcnTextBlockInner" style="padding-top:9px;" valign="top">
                <!--[if mso]>
        <table align="left" border="0" cellspacing="0" cellpadding="0" width="100%" style="width:100%;">
        <tr>
        <![endif]-->
          
        <!--[if mso]>
        <td valign="top" width="600" style="width:600px;">
        <![endif]-->
                

                 <table style="max-width:100%; min-width:100%;" class="mcnTextContentContainer" width="100%" cellspacing="0" cellpadding="0" border="0" align="left">
                    <tbody><tr>
                        
                        <td class="mcnTextContent" style="padding: 0px 18px 9px; font-family: Verdana;" valign="top">
                        
                            <div style="padding: 20px 0; font-size: 16px; line-height: 32px; color: #666666;">  <b>Patrick Debels</b><br>
              UNDP/GEF CLME+ Project Coordination Unit<br>
              Secretariat to the CLME+ Interim Coordination Mechanism<br>
              </div>
                        </td>
                    </tr>
                </tbody></table>
        <!--[if mso]>
        </td>
        <![endif]-->
                
        <!--[if mso]>
        </tr>
        </table>
        <![endif]-->
            </td>
        </tr>
    </tbody>
</table><table class="mcnImageBlock" style="min-width:100%;" width="100%" cellspacing="0" cellpadding="0" border="0">
    <tbody class="mcnImageBlockOuter">
            <tr>
                <td style="padding:9px" class="mcnImageBlockInner" valign="top">
                    <table class="mcnImageContentContainer" style="min-width:100%;" width="100%" cellspacing="0" cellpadding="0" border="0" align="left">
                        <tbody><tr>
                            <td class="mcnImageContent" style="padding-right: 9px; padding-left: 9px; padding-top: 0; padding-bottom: 0; text-align:center;" valign="top">
                                
                                    
                                        <img alt="" src="https://mcusercontent.com/bccdb651bd8a8f943adddbe6c/images/d89e6079-7469-4607-8d2a-ef9d58af832e.png" style="max-width:1000px; padding-bottom: 0; display: inline !important; vertical-align: bottom;" class="mcnImage" width="564" align="middle">
                                    
                                
                            </td>
                        </tr>
                    </tbody></table>
                </td>
            </tr>
    </tbody>
</table></td>
                            </tr>
                            <tr>
                                <td valign="top" id="templateFooter"></td>
                            </tr>
                        </table>
                        <!--[if (gte mso 9)|(IE)]>
                        </td>
                        </tr>
                        </table>
                        <![endif]-->
                        <!-- // END TEMPLATE -->
                    </td>
                </tr>
            </table>
        </center>
    </body>
</html>';


				//wp_mail( 'valencia.guzmandaniel@gmail.com' , 'DOCUMEN PUBLICADO DE PENDIENTE ' . $authormail . 'nombre' . $username . 'title' . $title ) ;

				//wp_mail( 'valencia.guzmandaniel@gmail.com', 'CLME+ HUB PPI', $message_approval, $headers );

				wp_mail( $authormail, 'Your contact profile has been approved and published!', $message_approval, $headers );
				wp_mail( 'valencia.guzmandaniel@gmail.com', 'Your contact profile has been approved and published!', $message_approval, $headers );
			}
			
			//add_action( 'publish_post', 'send_mail_publish_ppi' );	
			//wp_mail( 'caprubianojunior@hotmail.com' , 'CLME+ HUB PPI','fuera',array('Content-Type: text/html; charset=UTF-8','From: UNDP/GEF CLME+ <info@clmeplus.org>') );
		//}
}
add_action( 'admin_post_nopriv_ppi_form', 'insert_ppi_database' );
add_action( 'admin_post_ppi_form', 'insert_ppi_database' );
add_action( "pending_to_publish", "on_publish_pending_post", 10, 1 );
add_action( 'publish_post', 'send_mail_publish_ppi' );
// Envio de correos con alesta en los DL o documentLibrary
function send_mail_alert_dl($post_id,$action,$obs){
	//wp_mail( 'caprubianojunior@hotmail.com' , 'CLME+ HUB PPI','tracert paso',array('Content-Type: text/html; charset=UTF-8','From: UNDP/GEF CLME+ <info@clmeplus.org>') );
	$fileurl='';
	$post   = get_post( $post_id);
	$namepost = $post->post_title; 
	$file = get_field('dl_file',$post_id);
	if( $file ){
			 $fileurl = $file;
			 //var_dump($file);
		 }else{
			 $fileurl = get_field('dl_url_file',$post_id);
		}
	
	$message='<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html data-editor-version="2" class="sg-campaigns" xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1, maximum-scale=1" /><!--[if !mso]><!-->
    <meta http-equiv="X-UA-Compatible" content="IE=Edge" /><!--<![endif]-->
    <!--[if (gte mso 9)|(IE)]>
    <xml>
    <o:OfficeDocumentSettings>
    <o:AllowPNG/>
    <o:PixelsPerInch>96</o:PixelsPerInch>
    </o:OfficeDocumentSettings>
    </xml>
    <![endif]-->
    <!--[if (gte mso 9)|(IE)]>
    <style type="text/css">
      body {width: 600px;margin: 0 auto;}
      table {border-collapse: collapse;}
      table, td {mso-table-lspace: 0pt;mso-table-rspace: 0pt;}
      img {-ms-interpolation-mode: bicubic;}
    </style>
    <![endif]-->

    <style type="text/css">
      body, p, div {
        font-family: Verdana;
        font-size: 14px;
      }
      body {
        color: #000000;
      }
      body a {
        color: #1188E6;
        text-decoration: none;
      }
      p { margin: 0; padding: 0; }
      table.wrapper {
        width:100% !important;
        table-layout: fixed;
        -webkit-font-smoothing: antialiased;
        -webkit-text-size-adjust: 100%;
        -moz-text-size-adjust: 100%;
        -ms-text-size-adjust: 100%;
      }
      img.max-width {
        max-width: 100% !important;
      }
      .column.of-2 {
        width: 50%;
      }
      .column.of-3 {
        width: 33.333%;
      }
      .column.of-4 {
        width: 25%;
      }
      @media screen and (max-width:480px) {
        .preheader .rightColumnContent,
        .footer .rightColumnContent {
            text-align: left !important;
        }
        .preheader .rightColumnContent div,
        .preheader .rightColumnContent span,
        .footer .rightColumnContent div,
        .footer .rightColumnContent span {
          text-align: left !important;
        }
        .preheader .rightColumnContent,
        .preheader .leftColumnContent {
          font-size: 80% !important;
          padding: 5px 0;
        }
        table.wrapper-mobile {
          width: 100% !important;
          table-layout: fixed;
        }
        img.max-width {
          height: auto !important;
          max-width: 480px !important;
        }
        a.bulletproof-button {
          display: block !important;
          width: auto !important;
          font-size: 80%;
          padding-left: 0 !important;
          padding-right: 0 !important;
        }
        .columns {
          width: 100% !important;
        }
        .column {
          display: block !important;
          width: 100% !important;
          padding-left: 0 !important;
          padding-right: 0 !important;
          margin-left: 0 !important;
          margin-right: 0 !important;
        }
      }
    </style>
    <!--user entered Head Start-->
    
     <!--End Head user entered-->
  </head>
<body style="background-color:#FFF;width:1200px">
<table width="800" border="0" cellspacing="0" cellpadding="0">
  <tr style="background-color:#58A7D6;">
    <td width="50">&nbsp;</td>
    <td width="166" align="left"><center><img src="https://clmeplus.org/app/themes/clme-theme/dist/images/mail/clmemailheader.png" width="250" height="217" alt="logo clme" /></center></td>
    <td width="532"><span style="text-align:center;font-size: 50px;"><center> The <b>CLME+</b> Hub</center></span></td>
    <td width="52">&nbsp;</td>
  </tr>
   <tr style="background-color:#58A7D6;">
    <td style="background-color:#58A7D6;">&nbsp;</td>
    <td colspan="2" style="background-color:#58A7D6;">&nbsp;</td>
    <td style="background-color:#58A7D6;">&nbsp;</td>
  </tr>
  <tr>
    <td style="background-color:#58A7D6;">&nbsp;</td>
    <td colspan="2" style="padding:15px; background-color:#FFF;font-size: 20px;"><center><span style="text-align:center;font-size: 30px;"><b>CLME+ Documents Library Alert!</b></span></center></td>
    <td style="background-color:#58A7D6;">&nbsp;</td>
  </tr>
   <tr style="background-color:#58A7D6;">
    <td style="background-color:#58A7D6;">&nbsp;</td>
    <td colspan="2" style="background-color:#58A7D6;">&nbsp;</td>
    <td style="background-color:#58A7D6;">&nbsp;</td>
  </tr>
  <tr style="background-color:#58A7D6;">
    <td style="background-color:#58A7D6;">&nbsp;</td>
    <td colspan="2" style="background-color:#58A7D6;">&nbsp;</td>
    <td style="background-color:#58A7D6;">&nbsp;</td>
  </tr>
  <tr>
    <td style="background-color:#58A7D6;">&nbsp;</td>
    <td colspan="2" style="padding:15px; background-color:#FFF;font-size: 15px; text-align:justify;"><p style="padding:15px; background-color:#FFF;font-size: 15px; text-align:justify;"><b>An user has reported an issue on the Documents Library at the CLME + HUB. Please check and try to find a solution as soon as possible. In case is needed, contact the IT supplier.</b></p>';
	 
	$message=$message.'<p>&nbsp;</p>
    <p style="padding:15px; background-color:#FFF;font-size: 15px; text-align:justify;">The document information is:</p>
	<p>&nbsp;</p>
	<p style="padding:15px; background-color:#FFF;font-size: 15px; text-align:justify;">
	<b>ID:</b>'.$post_id.'<br>
	<b>Name:</b>'.$namepost.'<br>
	<b>Link:</b><a href="'.$fileurl.'">'.$fileurl.'</a><br>
	<b>Observations:</b>'.$obs.'<br>
	</p>
	<p>&nbsp;</p>
	<p>&nbsp;</p>
	<p style="padding:15px; background-color:#FFF;font-size: 15px; text-align:justify;">Thanks for your help and remember that working together we can achieve more!&nbsp;</p>
	
	<p>&nbsp;</p>
    <p style="padding:15px; background-color:#FFF;font-size: 15px; text-align:justify;"><b>Best regards,</b><br />
     <b> UNDP/GEF CLME+ Project  Coordination Unit</b><br />
    <b>Secretariat to the CLME+ SAP  Interim Coordination Mechanism (ICM)</b></p></td>
    <td style="background-color:#58A7D6;">&nbsp;</td>
  </tr>
  <tr style="background-color:#58A7D6;">
    <td >&nbsp;</td>
    <td colspan="2">&nbsp;</td>
    <td>&nbsp;</td>
  </tr>
  <tr style="background-color:#58A7D6;">
    <td >&nbsp;</td>
    <td colspan="2">&nbsp;</td>
    <td>&nbsp;</td>
  </tr>
  <tr style="background-color:#58A7D6;">
    <td colspan="4" ><center><img src="https://clmeplus.org/app/themes/clme-theme/dist/images/mail/clmemailfooter.png" width="800px"  height="181px" alt="footer logos" /></center></td>
  </tr>
</table>


</body>
</html>';
	$headers = array('Content-Type: text/html; charset=UTF-8','From: UNDP/GEF CLME+ <info@clmeplus.org>');
   
   	wp_mail('info@clmeplus.org' , 'ALERT DL BROKEN LINK CLME+ HUB PPI', $message,$headers );
	wp_mail('solutelematica@gmail.com' , 'ALERT DL BROKEN LINK CLME+ HUB PPI', $message,$headers );
   
    
	
}
// COntabilizacion de vistas apra los documentos en el la busqueda
function ClickDocuViews($id){
$dcount_key = 'views';

	
	$args = array(
	// 'post_type' => 'post', // what I used to test
	'post_type' => 'doculibrary', // what you need
	'posts_per_page' => 1,
	'p' =>$id // this would limit the results to ID 254 ONLY - so this is bad
	);
	// Generates the result set
	$loop = new WP_Query($args);
	foreach ($loop->posts as $p){
		
		$dcount=get_field('views',$p->ID);
		$file = get_field('dl_file',$p->ID);
		
		if($dcount==''){
			$dcount = 1;
			update_field( 'views', $dcount, $p->ID ); 
		}else{
			$dcount++;
			update_field( 'views', $dcount, $p->ID); 
		}
		if( $file ){
			 $fileurl = $file;
			 //var_dump($file);
		 }else{
			 $fileurl = get_field('dl_url_file',$p->ID);
		}
		

		//echo 'post_title :'.$p->post_title."<br />\r\n";
		//echo 'post_name :'.$p->post_name."<br />\r\n";
		//echo 'post_content :'.$p->post_content."<br />\r\n";
		//echo 'ID :'.$p->ID."<br />\r\n";
		//echo 'File :'.$fileurl."<br />\r\n";
//echo "<center>Enable Pop-Up Windows</center>";
//echo "<script>";
//echo "window.open('".$fileurl."','newfile');";
		//echo "window.close();";		
//echo "</script>";
		
       
		
		
	}

}
// Modificacion directa para los links del calendario
if ( class_exists( 'Tribe__Events__Main' ) ) {
	class ContinualMonthViewPagination {
	    public function __construct() {
	        add_filter( 'tribe_events_the_next_month_link', array( $this, 'next_month' ) );
	        add_filter( 'tribe_events_the_previous_month_link', array( $this, 'previous_month' ) );
	    }
	    public function next_month() {
	        $url = tribe_get_next_month_link();
	        $text = tribe_get_next_month_text();
	        $date = Tribe__Events__Main::instance()->nextMonth( tribe_get_month_view_date() );
	        return '<a data-month="' . $date . '" href="' . $url . '" rel="next">' . $text . ' <span>&raquo;</span></a>';
	    }
	    public function previous_month() {
	        $url = tribe_get_previous_month_link();
	        $text = tribe_get_previous_month_text();
	        $date = Tribe__Events__Main::instance()->previousMonth( tribe_get_month_view_date() );
	        return '<a data-month="' . $date . '" href="' . $url . '" rel="prev"><span>&laquo;</span> ' . $text . ' </a>';
	    }
	}
	new ContinualMonthViewPagination;
}







function wpse25797_the_archives_link() {
    $archive_page = get_pages(
        array(
            'meta_key' => '_wp_page_template',
            'meta_value' => 'template-archive.php'
        )
    );
    $archive_id = $showcase_page[0]->ID;
    echo get_permalink( $archive_id );
}



function getTplPageURL($TEMPLATE_NAME){
    $url = null;
    $pages = get_pages(array(
        'meta_key' => '_wp_page_template',
        'meta_value' => $TEMPLATE_NAME
    ));
    if(isset($pages[0])) {
        $url = get_page_link($pages[0]->ID);
    }
    return $url;
}




// FUNCIÓN PARA ENVIAR MAIL CUANDO CAMBIAN DE ROLE






add_action( 'personal_options_update', 'notify_admin_on_update' );
add_action( 'edit_user_profile_update','notify_admin_on_update');
function notify_admin_on_update(){
    global $current_user;
    get_currentuserinfo();

    $role_new = 'cero';

    $user = wp_get_current_user();
	if ( in_array( 'Subscriber', (array) $user->roles ) ) {
	    //The user has the "author" role
	    $usuario_viejdo = 'es usuario subscriber';
	}	

	$usuario_correo = $_POST['email'];
	$usuario_nombre = $_POST['first_name'];

	if ($_POST['um-role'] === 'um_usuario-verificado') {
		# code...
		$role_new = 'verificado';

	 	//$message = '<div style="max-width: 560px; padding: 20px; background: #ffffff; border-radius: 5px; margin: 40px auto; font-family: Open Sans,Helvetica,Arial; font-size: 15px; color: #666;"><div style="color: #444444; font-weight: normal;"><div style="text-align: center; font-weight: 600; font-size: 26px; padding: 10px 0; border-bottom: solid 1px #eeeeee;"><img src="https://clmeplus.org/app/uploads/2021/01/logo-clme.png" width="300"/></div><div style="clear: both;"> </div></div><div style="padding: 0 30px 30px 30px; border-bottom: 3px solid #eeeeee;"><center><br><br><h3>Your account has been approved</h3></center><div style="padding: 30px 0; font-size: 16px; line-height: 32px;color: #5c6670;">Dear '. $usuario_nombre .'<br/>Our team has revised and verified your account.<br/>You now have complete access to the tools of the CLME+ Hub. All your content from now on will not need our team`s approval to be published. Therefore, we invite you to always seek for the best interest of our region and upload information that contributes to its development and to a better knowledge exchange among all our organizations and initiatives.</div><div style="padding: 10px 0 50px 0; text-align: center;"><a style="background: #56c9e8; color: #fff; padding: 12px 30px; text-decoration: none; border-radius: 3px; letter-spacing: 0.3px;" href="https://clmeplus.org/login/">Login to our site</a></div><div style="padding: 30px 0; font-size: 16px; line-height: 32px;color: #5c6670;">From now on, you have access to the the following tools:</div><div style="padding: 30px 0; font-size: 16px; line-height: 32px;"><div style="display: inline-block; width: 20%; padding-right: 10px; vertical-align: middle;"><img style="width: 100%; max-width:100px;" style="width: 100%; max-width: 100px;" widht="100"   src="https://clmeplus.org/app/uploads/2021/01/Ppi_database_icon-gray.png"/></div><div style="display: inline-block; width: 70%; padding: 0px 15px 0px 15px; vertical-align: middle;"><h5 style="margin-top: 0px; padding-top: 0px;line-height:1.5em;color: #5c6670;">Create and Update/Edit project profiles for your initiatives contributing to the CLME+ SAP and other regional commitments.</h5></div><hr style="margin: 25px 0px;"/><div style="display: inline-block; width: 20%; padding-right: 10px; vertical-align: middle;"><img style="width: 100%; max-width:100px;" style="width: 100%; max-width: 100px;" widht="100"   src="https://clmeplus.org/app/uploads/2020/04/docs-library-icon-2.png"/></div><div style="display: inline-block; width: 70%; padding: 0px 15px 0px 15px; vertical-align: middle;color: #5c6670;"><h5 style="color: #5c6670;margin-top: 0px; padding-top: 0px;line-height:1.5em;">Upload and update/edit documents from your organizations or initiative and of the region’s interest.</h5></div><hr style="margin: 25px 0px;"/><div style="display: inline-block; width: 20%; padding-right: 10px; vertical-align: middle;color: #5c6670;"><img style="width: 100%; max-width:100px;" style="width: 100%; max-width: 100px;" widht="100"   src="https://clmeplus.org/app/uploads/2020/04/contact-grey.png"/></div><div style="display: inline-block; width: 70%; padding: 0px 15px 0px 15px; vertical-align: middle;"><h5 style="margin-top: 0px; padding-top: 0px;line-height:1.5em;">Create and update/edit your personal contact profile and/or of your organization’s team.</h5></div></div><div style="padding: 30px 0; font-size: 16px; line-height: 32px;color: #5c6670;">Thank you for working collaboratively for a healthier marine environment, and towards enhancing the well-being of the peoples in our region!<br/><br/>Best regards,</div><div style="color: #999; padding: 20px 0px;"><div>Patrick Debels<br/>UNDP/GEF CLME+ Project Coordination Unit<br/>Secretariat to the CLME+ Interim Coordination Mechanism<br/><a href="mailto:info@clmeplus.org">info@clmeplus.org</a></div></div><div style="color: #999; padding: 20px 0px;"><img style="width: 100%;" src="https://clmeplus.org/app/uploads/2021/02/Partners_CLME_ICM_mail-1.png"/></div></div></div>';

	 	$message = '<!doctype html>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office">
    <head>
        <!-- NAME: 1 COLUMN -->
        <!--[if gte mso 15]>
        <xml>
            <o:OfficeDocumentSettings>
            <o:AllowPNG/>
            <o:PixelsPerInch>96</o:PixelsPerInch>
            </o:OfficeDocumentSettings>
        </xml>
        <![endif]-->
        <meta charset="UTF-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <meta name="viewport" content="width=device-width, initial-scale=1">
        <title>*|MC:SUBJECT|*</title>
        
    <style type="text/css">
    p{
      margin:10px 0;
      padding:0;
      font-family: Verdana; 
      color: #666666;
    }
    table{
      border-collapse:collapse;
      font-family: Verdana; 
      color: #666666;
    }
    h1,h2,h3,h4,h5,h6{
      display:block;
      margin:0;
      padding:0;
      font-family: Verdana; 
      color: #666666;
      font-weight: 500;
    }
    img,a img{
      border:0;
      height:auto;
      outline:none;
      text-decoration:none;
    }
    body,#bodyTable,#bodyCell{
      height:100%;
      margin:0;
      padding:0;
      width:100%;
    }
    .mcnPreviewText{
      display:none !important;
    }
    #outlook a{
      padding:0;
    }
    img{
      -ms-interpolation-mode:bicubic;
    }
    table{
      mso-table-lspace:0pt;
      mso-table-rspace:0pt;
    }
    .ReadMsgBody{
      width:100%;
    }
    .ExternalClass{
      width:100%;
    }
    p,a,li,td,blockquote{
      mso-line-height-rule:exactly;
    }
    a[href^=tel],a[href^=sms]{
      color:inherit;
      cursor:default;
      text-decoration:none;
    }
    p,a,li,td,body,table,blockquote{
      -ms-text-size-adjust:100%;
      -webkit-text-size-adjust:100%;
    }
    .ExternalClass,.ExternalClass p,.ExternalClass td,.ExternalClass div,.ExternalClass span,.ExternalClass font{
      line-height:100%;
    }
    a[x-apple-data-detectors]{
      color:inherit !important;
      text-decoration:none !important;
      font-size:inherit !important;
      font-family:inherit !important;
      font-weight:inherit !important;
      line-height:inherit !important;
    }
    #bodyCell{
      padding:10px;
    }
    .templateContainer{
      max-width:600px !important;
    }
    a.mcnButton{
      display:block;
    }
    .mcnImage,.mcnRetinaImage{
      vertical-align:bottom;
    }
    .mcnTextContent{
      word-break:break-word;
    }
    .mcnTextContent img{
      height:auto !important;
    }
    .mcnDividerBlock{
      table-layout:fixed !important;
    }
  
    body,#bodyTable{
      /*@editable*/background-color:#FFFFFF;
    }
  
    #bodyCell{
      /*@editable*/border-top:0;
    }
  
    .templateContainer{
      /*@editable*/border:0;
    }
  
    h1{
      /*@editable*/color:#202020;
      /*@editable*/font-family:Helvetica;
      /*@editable*/font-size:26px;
      /*@editable*/font-style:normal;
      /*@editable*/font-weight:bold;
      /*@editable*/line-height:125%;
      /*@editable*/letter-spacing:normal;
      /*@editable*/text-align:left;
    }
  
    h2{
      /*@editable*/color:#202020;
      /*@editable*/font-family:Helvetica;
      /*@editable*/font-size:22px;
      /*@editable*/font-style:normal;
      /*@editable*/font-weight:bold;
      /*@editable*/line-height:125%;
      /*@editable*/letter-spacing:normal;
      /*@editable*/text-align:left;
    }
  
    h3{
      /*@editable*/color:#202020;
      /*@editable*/font-family:Helvetica;
      /*@editable*/font-size:20px;
      /*@editable*/font-style:normal;
      /*@editable*/font-weight:bold;
      /*@editable*/line-height:125%;
      /*@editable*/letter-spacing:normal;
      /*@editable*/text-align:left;
    }
  
    h4{
      /*@editable*/color:#202020;
      /*@editable*/font-family:Helvetica;
      /*@editable*/font-size:18px;
      /*@editable*/font-style:normal;
      /*@editable*/font-weight:bold;
      /*@editable*/line-height:125%;
      /*@editable*/letter-spacing:normal;
      /*@editable*/text-align:left;
    }
  
    #templatePreheader{
      /*@editable*/background-color:#FFFFFF;
      /*@editable*/background-image:none;
      /*@editable*/background-repeat:no-repeat;
      /*@editable*/background-position:center;
      /*@editable*/background-size:cover;
      /*@editable*/border-top:0;
      /*@editable*/border-bottom:0;
      /*@editable*/padding-top:9px;
      /*@editable*/padding-bottom:9px;
    }
  
    #templatePreheader .mcnTextContent,#templatePreheader .mcnTextContent p{
      /*@editable*/color:#656565;
      /*@editable*/font-family:Helvetica;
      /*@editable*/font-size:12px;
      /*@editable*/line-height:150%;
      /*@editable*/text-align:left;
    }
  
    #templatePreheader .mcnTextContent a,#templatePreheader .mcnTextContent p a{
      /*@editable*/color:#656565;
      /*@editable*/font-weight:normal;
      /*@editable*/text-decoration:underline;
    }
  
    #templateHeader{
      /*@editable*/background-color:#FFFFFF;
      /*@editable*/background-image:none;
      /*@editable*/background-repeat:no-repeat;
      /*@editable*/background-position:center;
      /*@editable*/background-size:cover;
      /*@editable*/border-top:0;
      /*@editable*/border-bottom:0;
      /*@editable*/padding-top:9px;
      /*@editable*/padding-bottom:0;
    }
  
    #templateHeader .mcnTextContent,#templateHeader .mcnTextContent p{
      /*@editable*/color:#202020;
      /*@editable*/font-family:Helvetica;
      /*@editable*/font-size:16px;
      /*@editable*/line-height:150%;
      /*@editable*/text-align:left;
    }
  
    #templateHeader .mcnTextContent a,#templateHeader .mcnTextContent p a{
      /*@editable*/color:#007C89;
      /*@editable*/font-weight:normal;
      /*@editable*/text-decoration:underline;
    }
  
    #templateBody{
      /*@editable*/background-color:#FFFFFF;
      /*@editable*/background-image:none;
      /*@editable*/background-repeat:no-repeat;
      /*@editable*/background-position:center;
      /*@editable*/background-size:cover;
      /*@editable*/border-top:0;
      /*@editable*/border-bottom:2px solid #EAEAEA;
      /*@editable*/padding-top:0;
      /*@editable*/padding-bottom:9px;
    }
  
    #templateBody .mcnTextContent,#templateBody .mcnTextContent p{
      /*@editable*/color:#202020;
      /*@editable*/font-family:Helvetica;
      /*@editable*/font-size:16px;
      /*@editable*/line-height:150%;
      /*@editable*/text-align:left;
    }
  
    #templateBody .mcnTextContent a,#templateBody .mcnTextContent p a{
      /*@editable*/color:#007C89;
      /*@editable*/font-weight:normal;
      /*@editable*/text-decoration:underline;
    }
  
    #templateFooter{
      /*@editable*/background-color:#FFFFFF;
      /*@editable*/background-image:none;
      /*@editable*/background-repeat:no-repeat;
      /*@editable*/background-position:center;
      /*@editable*/background-size:cover;
      /*@editable*/border-top:0;
      /*@editable*/border-bottom:0;
      /*@editable*/padding-top:9px;
      /*@editable*/padding-bottom:9px;
    }
  
    #templateFooter .mcnTextContent,#templateFooter .mcnTextContent p{
      /*@editable*/color:#656565;
      /*@editable*/font-family:Helvetica;
      /*@editable*/font-size:12px;
      /*@editable*/line-height:150%;
      /*@editable*/text-align:center;
    }
  
    #templateFooter .mcnTextContent a,#templateFooter .mcnTextContent p a{
      /*@editable*/color:#656565;
      /*@editable*/font-weight:normal;
      /*@editable*/text-decoration:underline;
    }
  @media only screen and (min-width:768px){
    .templateContainer{
      width:600px !important;
    }

} @media only screen and (max-width: 480px){
    body,table,td,p,a,li,blockquote{
      -webkit-text-size-adjust:none !important;
    }

} @media only screen and (max-width: 480px){
    body{
      width:100% !important;
      min-width:100% !important;
    }

} @media only screen and (max-width: 480px){
    .mcnRetinaImage{
      max-width:100% !important;
    }

} @media only screen and (max-width: 480px){
    .mcnImage{
      width:100% !important;
    }

} @media only screen and (max-width: 480px){
    .mcnCartContainer,.mcnCaptionTopContent,.mcnRecContentContainer,.mcnCaptionBottomContent,.mcnTextContentContainer,.mcnBoxedTextContentContainer,.mcnImageGroupContentContainer,.mcnCaptionLeftTextContentContainer,.mcnCaptionRightTextContentContainer,.mcnCaptionLeftImageContentContainer,.mcnCaptionRightImageContentContainer,.mcnImageCardLeftTextContentContainer,.mcnImageCardRightTextContentContainer,.mcnImageCardLeftImageContentContainer,.mcnImageCardRightImageContentContainer{
      max-width:100% !important;
      width:100% !important;
    }

} @media only screen and (max-width: 480px){
    .mcnBoxedTextContentContainer{
      min-width:100% !important;
    }

} @media only screen and (max-width: 480px){
    .mcnImageGroupContent{
      padding:9px !important;
    }

} @media only screen and (max-width: 480px){
    .mcnCaptionLeftContentOuter .mcnTextContent,.mcnCaptionRightContentOuter .mcnTextContent{
      padding-top:9px !important;
    }

} @media only screen and (max-width: 480px){
    .mcnImageCardTopImageContent,.mcnCaptionBottomContent:last-child .mcnCaptionBottomImageContent,.mcnCaptionBlockInner .mcnCaptionTopContent:last-child .mcnTextContent{
      padding-top:18px !important;
    }

} @media only screen and (max-width: 480px){
    .mcnImageCardBottomImageContent{
      padding-bottom:9px !important;
    }

} @media only screen and (max-width: 480px){
    .mcnImageGroupBlockInner{
      padding-top:0 !important;
      padding-bottom:0 !important;
    }

} @media only screen and (max-width: 480px){
    .mcnImageGroupBlockOuter{
      padding-top:9px !important;
      padding-bottom:9px !important;
    }

} @media only screen and (max-width: 480px){
    .mcnTextContent,.mcnBoxedTextContentColumn{
      padding-right:18px !important;
      padding-left:18px !important;
    }

} @media only screen and (max-width: 480px){
    .mcnImageCardLeftImageContent,.mcnImageCardRightImageContent{
      padding-right:18px !important;
      padding-bottom:0 !important;
      padding-left:18px !important;
    }

} @media only screen and (max-width: 480px){
    .mcpreview-image-uploader{
      display:none !important;
      width:100% !important;
    }

} @media only screen and (max-width: 480px){
  
    h1{
      /*@editable*/font-size:22px !important;
      /*@editable*/line-height:125% !important;
    }

} @media only screen and (max-width: 480px){
  
    h2{
      /*@editable*/font-size:20px !important;
      /*@editable*/line-height:125% !important;
    }

} @media only screen and (max-width: 480px){
  
    h3{
      /*@editable*/font-size:18px !important;
      /*@editable*/line-height:125% !important;
    }

} @media only screen and (max-width: 480px){
  
    h4{
      /*@editable*/font-size:16px !important;
      /*@editable*/line-height:150% !important;
    }

} @media only screen and (max-width: 480px){
  
    .mcnBoxedTextContentContainer .mcnTextContent,.mcnBoxedTextContentContainer .mcnTextContent p{
      /*@editable*/font-size:14px !important;
      /*@editable*/line-height:150% !important;
    }

} @media only screen and (max-width: 480px){
  
    #templatePreheader{
      /*@editable*/display:block !important;
    }

} @media only screen and (max-width: 480px){
  
    #templatePreheader .mcnTextContent,#templatePreheader .mcnTextContent p{
      /*@editable*/font-size:14px !important;
      /*@editable*/line-height:150% !important;
    }

} @media only screen and (max-width: 480px){
  
    #templateHeader .mcnTextContent,#templateHeader .mcnTextContent p{
      /*@editable*/font-size:16px !important;
      /*@editable*/line-height:150% !important;
    }

} @media only screen and (max-width: 480px){
  
    #templateBody .mcnTextContent,#templateBody .mcnTextContent p{
      /*@editable*/font-size:16px !important;
      /*@editable*/line-height:150% !important;
    }

} @media only screen and (max-width: 480px){
  
    #templateFooter .mcnTextContent,#templateFooter .mcnTextContent p{
      /*@editable*/font-size:14px !important;
      /*@editable*/line-height:150% !important;
    }

}</style></head>
    <body>
        
        <center>
            <table align="center" border="0" cellpadding="0" cellspacing="0" height="100%" width="100%" id="bodyTable">
                <tr>
                    <td align="center" valign="top" id="bodyCell">
                        <!-- BEGIN TEMPLATE // -->
                        <!--[if (gte mso 9)|(IE)]>
                        <table align="center" border="0" cellspacing="0" cellpadding="0" width="600" style="width:600px;">
                        <tr>
                        <td align="center" valign="top" width="600" style="width:600px;">
                        <![endif]-->
                        <table border="0" cellpadding="0" cellspacing="0" width="100%" class="templateContainer">
                            <tr>
                                <td valign="top" id="templatePreheader"></td>
                            </tr>
                            <tr>
                                <td valign="top" id="templateHeader"><table class="mcnImageBlock" style="min-width:100%;" width="100%" cellspacing="0" cellpadding="0" border="0">
    <tbody class="mcnImageBlockOuter">
            <tr>
                <td style="padding:9px" class="mcnImageBlockInner" valign="top">
                    <table class="mcnImageContentContainer" style="min-width:100%;" width="100%" cellspacing="0" cellpadding="0" border="0" align="left">
                        <tbody><tr>
                            <td class="mcnImageContent" style="padding-right: 9px; padding-left: 9px; padding-top: 0; padding-bottom: 0; text-align:center;" valign="top">
                                
                                    
                                        <img alt="" src="https://clmeplus.org/app/uploads/2021/03/logo-clme-1.png" style="max-width:300px; padding-bottom: 0; display: inline !important; vertical-align: bottom;" class="mcnImage" width="300" align="middle">
                                    
                                
                            </td>
                        </tr>
                    </tbody></table>
                </td>
            </tr>
    </tbody>
</table><table class="mcnDividerBlock" style="min-width:100%;" width="100%" cellspacing="0" cellpadding="0" border="0">
    <tbody class="mcnDividerBlockOuter">
        <tr>
            <td class="mcnDividerBlockInner" style="min-width:100%; padding:18px;">
                <table class="mcnDividerContent" style="min-width: 100%;border-top: 2px none #EAEAEA;" width="100%" cellspacing="0" cellpadding="0" border="0">
                    <tbody><tr>
                        <td>
                            <span></span>
                        </td>
                    </tr>
                </tbody></table>
<!--            
                <td class="mcnDividerBlockInner" style="padding: 18px;">
                <hr class="mcnDividerContent" style="border-bottom-color:none; border-left-color:none; border-right-color:none; border-bottom-width:0; border-left-width:0; border-right-width:0; margin-top:0; margin-right:0; margin-bottom:0; margin-left:0;" />
-->
            </td>
        </tr>
    </tbody>
</table><table class="mcnTextBlock" style="min-width:100%;" width="100%" cellspacing="0" cellpadding="0" border="0">
    <tbody class="mcnTextBlockOuter">
        <tr>
            <td class="mcnTextBlockInner" style="padding-top:9px;" valign="top">
                <!--[if mso]>
        <table align="left" border="0" cellspacing="0" cellpadding="0" width="100%" style="width:100%;">
        <tr>
        <![endif]-->
          
        <!--[if mso]>
        <td valign="top" width="600" style="width:600px;">
        <![endif]-->
                <table style="max-width:100%; min-width:100%;" class="mcnTextContentContainer" width="100%" cellspacing="0" cellpadding="0" border="0" align="left">
                    <tbody><tr>
                        
                        <td class="mcnTextContent" style="padding-top:0; padding-right:18px; padding-bottom:9px; padding-left:18px;" valign="top">
                        
                            <h3 style="text-align: center; font-family: Verdana; color: #666666;">Your account has been approved</h3>

                        </td>
                    </tr>
                </tbody></table>
        <!--[if mso]>
        </td>
        <![endif]-->
                
        <!--[if mso]>
        </tr>
        </table>
        <![endif]-->
            </td>
        </tr>
    </tbody>
</table><table class="mcnDividerBlock" style="min-width:100%;" width="100%" cellspacing="0" cellpadding="0" border="0">
    <tbody class="mcnDividerBlockOuter">
        <tr>
            <td class="mcnDividerBlockInner" style="min-width:100%; padding:18px;">
                <table class="mcnDividerContent" style="min-width: 100%;border-top: 2px none #EAEAEA;" width="100%" cellspacing="0" cellpadding="0" border="0">
                    <tbody><tr>
                        <td>
                            <span></span>
                        </td>
                    </tr>
                </tbody></table>
<!--            
                <td class="mcnDividerBlockInner" style="padding: 18px;">
                <hr class="mcnDividerContent" style="border-bottom-color:none; border-left-color:none; border-right-color:none; border-bottom-width:0; border-left-width:0; border-right-width:0; margin-top:0; margin-right:0; margin-bottom:0; margin-left:0;" />
-->
            </td>
        </tr>
    </tbody>
</table></td>
                            </tr>
                            <tr>
                                <td valign="top" id="templateBody"><table class="mcnTextBlock" style="min-width:100%;" width="100%" cellspacing="0" cellpadding="0" border="0">
    <tbody class="mcnTextBlockOuter">
        <tr>
            <td class="mcnTextBlockInner" style="padding-top:9px;" valign="top">
                <!--[if mso]>
        <table align="left" border="0" cellspacing="0" cellpadding="0" width="100%" style="width:100%;">
        <tr>
        <![endif]-->
          
        <!--[if mso]>
        <td valign="top" width="600" style="width:600px;">
        <![endif]-->                
                <table style="max-width:100%; min-width:100%;" class="mcnTextContentContainer" width="100%" cellspacing="0" cellpadding="0" border="0" align="left">
                    <tbody><tr>
                        
                        <td class="mcnTextContent" style="padding: 0px 18px 9px; font-family: Verdana; color: #666666;" valign="top">
                        
                            <div style="padding: 30px 0; font-size: 16px; line-height: 32px;color: #666666;"> Dear '. $usuario_nombre .'<br>
            Our team has revised and verified your account.<br>
            You now have complete access to the tools of the CLME+ Hub. All your content from now on will not need our team`s approval to be published. Therefore, we invite you to always seek for the best interest of our region and upload information that contributes to its development and to a better knowledge exchange among all our organizations and initiatives.</div>
                        </td>
                    </tr>
                </tbody></table>
        <!--[if mso]>
        </td>
        <![endif]-->
                
        <!--[if mso]>
        </tr>
        </table>
        <![endif]-->
            </td>
        </tr>
    </tbody>
</table><table class="mcnDividerBlock" style="min-width:100%;" width="100%" cellspacing="0" cellpadding="0" border="0">
    <tbody class="mcnDividerBlockOuter">
        <tr>
            <td class="mcnDividerBlockInner" style="min-width:100%; padding:18px;">
                <table class="mcnDividerContent" style="min-width: 100%;border-top: 2px none #EAEAEA;" width="100%" cellspacing="0" cellpadding="0" border="0">
                    <tbody><tr>
                        <td>
                            <span></span>
                        </td>
                    </tr>
                </tbody></table>
<!--            
                <td class="mcnDividerBlockInner" style="padding: 18px;">
                <hr class="mcnDividerContent" style="border-bottom-color:none; border-left-color:none; border-right-color:none; border-bottom-width:0; border-left-width:0; border-right-width:0; margin-top:0; margin-right:0; margin-bottom:0; margin-left:0;" />
-->
            </td>
        </tr>
    </tbody>
</table><table class="mcnButtonBlock" style="min-width:100%;" width="100%" cellspacing="0" cellpadding="0" border="0">
    <tbody class="mcnButtonBlockOuter">
        <tr>
            <td style="padding-top:0; padding-right:18px; padding-bottom:18px; padding-left:18px;" class="mcnButtonBlockInner" valign="top" align="center">
                <table class="mcnButtonContentContainer" style="border-collapse: separate !important;border-radius: 4px;background-color: #56C9E8;" cellspacing="0" cellpadding="0" border="0">
                    <tbody>
                        <tr>
                            <td class="mcnButtonContent" style="font-family: Arial; font-size: 14px; padding: 16px;" valign="middle" align="center">
                                <a class="mcnButton " title="Login to our site" href="https://clmeplus.org/login/" target="_blank" style="font-weight: bold;letter-spacing: normal;line-height: 100%;text-align: center;text-decoration: none;color: #FFFFFF;">Login to our site</a>
                            </td>
                        </tr>
                    </tbody>
                </table>
            </td>
        </tr>
    </tbody>
</table><table class="mcnDividerBlock" style="min-width:100%;" width="100%" cellspacing="0" cellpadding="0" border="0">
    <tbody class="mcnDividerBlockOuter">
        <tr>
            <td class="mcnDividerBlockInner" style="min-width: 100%; padding: 15px 18px;">
                <table class="mcnDividerContent" style="min-width: 100%;border-top: 2px none #EAEAEA;" width="100%" cellspacing="0" cellpadding="0" border="0">
                    <tbody><tr>
                        <td>
                            <span></span>
                        </td>
                    </tr>
                </tbody></table>
<!--            
                <td class="mcnDividerBlockInner" style="padding: 18px;">
                <hr class="mcnDividerContent" style="border-bottom-color:none; border-left-color:none; border-right-color:none; border-bottom-width:0; border-left-width:0; border-right-width:0; margin-top:0; margin-right:0; margin-bottom:0; margin-left:0;" />
-->
            </td>
        </tr>
    </tbody>
</table><table class="mcnTextBlock" style="min-width:100%;" width="100%" cellspacing="0" cellpadding="0" border="0">
    <tbody class="mcnTextBlockOuter">
        <tr>
            <td class="mcnTextBlockInner" style="padding-top:9px;" valign="top">
                <!--[if mso]>
        <table align="left" border="0" cellspacing="0" cellpadding="0" width="100%" style="width:100%;">
        <tr>
        <![endif]-->
          
        <!--[if mso]>
        <td valign="top" width="600" style="width:600px;">
        <![endif]-->
                <table style="max-width:100%; min-width:100%;" class="mcnTextContentContainer" width="100%" cellspacing="0" cellpadding="0" border="0" align="left">
                    <tbody><tr>
                        
                        <td class="mcnTextContent" style="padding: 0px 18px 9px; font-family: Verdana; color: #666666;" valign="top">
                        
                            <div style="padding: 30px 0; font-size: 16px; line-height: 32px;color: #666666;">From now on, you have access to the the following tools:</div>
                        </td>
                    </tr>
                </tbody></table>
        <!--[if mso]>
        </td>
        <![endif]-->
                
        <!--[if mso]>
        </tr>
        </table>
        <![endif]-->
            </td>
        </tr>
    </tbody>
</table><table class="mcnDividerBlock" style="min-width:100%;" width="100%" cellspacing="0" cellpadding="0" border="0">
    <tbody class="mcnDividerBlockOuter">
        <tr>
            <td class="mcnDividerBlockInner" style="min-width:100%; padding:18px;">
                <table class="mcnDividerContent" style="min-width: 100%;border-top: 2px none #EAEAEA;" width="100%" cellspacing="0" cellpadding="0" border="0">
                    <tbody><tr>
                        <td>
                            <span></span>
                        </td>
                    </tr>
                </tbody></table>
<!--            
                <td class="mcnDividerBlockInner" style="padding: 18px;">
                <hr class="mcnDividerContent" style="border-bottom-color:none; border-left-color:none; border-right-color:none; border-bottom-width:0; border-left-width:0; border-right-width:0; margin-top:0; margin-right:0; margin-bottom:0; margin-left:0;" />
-->
            </td>
        </tr>
    </tbody>
</table><table class="mcnCaptionBlock" width="100%" cellspacing="0" cellpadding="0" border="0">
    <tbody class="mcnCaptionBlockOuter">
        <tr>
            <td class="mcnCaptionBlockInner" style="padding:9px;" valign="top">
                



<table class="mcnCaptionRightContentOuter" width="100%" cellspacing="0" cellpadding="0" border="0">
    <tbody><tr>
        <td class="mcnCaptionRightContentInner" style="padding:0 9px ;" valign="top">
            <table class="mcnCaptionRightImageContentContainer" width="132" cellspacing="0" cellpadding="0" border="0" align="left">
                <tbody><tr>
                    <td class="mcnCaptionRightImageContent" valign="top" align="right">
                    
                        

                        <img alt="" src="https://mcusercontent.com/bccdb651bd8a8f943adddbe6c/images/1eb388d4-8bf3-44a9-86ff-d5238e0753b5.png" style="max-width:100px;" class="mcnImage" width="100">
                        

                    
                    </td>
                </tr>
            </tbody></table>
            <table class="mcnCaptionRightTextContentContainer" width="396" cellspacing="0" cellpadding="0" border="0" align="right">
                <tbody><tr>
                    <td class="mcnTextContent" valign="top">
                        <h5 style="margin-top: 0px; padding-top: 0px;line-height:1.5em;color: #666666;">Create and Update/Edit project profiles for your initiatives contributing to the CLME+ SAP and other regional commitments.</h5>

                    </td>
                </tr>
            </tbody></table>
        </td>
    </tr>
</tbody></table>




            </td>
        </tr>
    </tbody>
</table><table class="mcnDividerBlock" style="min-width:100%;" width="100%" cellspacing="0" cellpadding="0" border="0">
    <tbody class="mcnDividerBlockOuter">
        <tr>
            <td class="mcnDividerBlockInner" style="min-width:100%; padding:18px;">
                <table class="mcnDividerContent" style="min-width: 100%;border-top: 2px solid #EAEAEA;" width="100%" cellspacing="0" cellpadding="0" border="0">
                    <tbody><tr>
                        <td>
                            <span></span>
                        </td>
                    </tr>
                </tbody></table>
<!--            
                <td class="mcnDividerBlockInner" style="padding: 18px;">
                <hr class="mcnDividerContent" style="border-bottom-color:none; border-left-color:none; border-right-color:none; border-bottom-width:0; border-left-width:0; border-right-width:0; margin-top:0; margin-right:0; margin-bottom:0; margin-left:0;" />
-->
            </td>
        </tr>
    </tbody>
</table><table class="mcnCaptionBlock" width="100%" cellspacing="0" cellpadding="0" border="0">
    <tbody class="mcnCaptionBlockOuter">
        <tr>
            <td class="mcnCaptionBlockInner" style="padding:9px;" valign="top">
                



<table class="mcnCaptionRightContentOuter" width="100%" cellspacing="0" cellpadding="0" border="0">
    <tbody><tr>
        <td class="mcnCaptionRightContentInner" style="padding:0 9px ;" valign="top">
            <table class="mcnCaptionRightImageContentContainer" width="132" cellspacing="0" cellpadding="0" border="0" align="left">
                <tbody><tr>
                    <td class="mcnCaptionRightImageContent" valign="top" align="right">
                    
                        

                        <img alt="" src="https://mcusercontent.com/bccdb651bd8a8f943adddbe6c/images/2e1ae345-6b6e-4b5a-a12a-63b839c71691.png" style="max-width:100px;" class="mcnImage" width="100">
                        

                    
                    </td>
                </tr>
            </tbody></table>
            <table class="mcnCaptionRightTextContentContainer" width="396" cellspacing="0" cellpadding="0" border="0" align="right">
                <tbody><tr>
                    <td class="mcnTextContent" valign="top">
                        <h5 style="color: #666666;margin-top: 0px; padding-top: 0px;line-height:1.5em;">Upload and update/edit documents from your organizations or initiative and of the region’s interest.</h5>

                    </td>
                </tr>
            </tbody></table>
        </td>
    </tr>
</tbody></table>




            </td>
        </tr>
    </tbody>
</table><table class="mcnDividerBlock" style="min-width:100%;" width="100%" cellspacing="0" cellpadding="0" border="0">
    <tbody class="mcnDividerBlockOuter">
        <tr>
            <td class="mcnDividerBlockInner" style="min-width:100%; padding:18px;">
                <table class="mcnDividerContent" style="min-width: 100%;border-top: 2px solid #EAEAEA;" width="100%" cellspacing="0" cellpadding="0" border="0">
                    <tbody><tr>
                        <td>
                            <span></span>
                        </td>
                    </tr>
                </tbody></table>
<!--            
                <td class="mcnDividerBlockInner" style="padding: 18px;">
                <hr class="mcnDividerContent" style="border-bottom-color:none; border-left-color:none; border-right-color:none; border-bottom-width:0; border-left-width:0; border-right-width:0; margin-top:0; margin-right:0; margin-bottom:0; margin-left:0;" />
-->
            </td>
        </tr>
    </tbody>
</table><table class="mcnCaptionBlock" width="100%" cellspacing="0" cellpadding="0" border="0">
    <tbody class="mcnCaptionBlockOuter">
        <tr>
            <td class="mcnCaptionBlockInner" style="padding:9px;" valign="top">
                



<table class="mcnCaptionRightContentOuter" width="100%" cellspacing="0" cellpadding="0" border="0">
    <tbody><tr>
        <td class="mcnCaptionRightContentInner" style="padding:0 9px ;" valign="top">
            <table class="mcnCaptionRightImageContentContainer" width="132" cellspacing="0" cellpadding="0" border="0" align="left">
                <tbody><tr>
                    <td class="mcnCaptionRightImageContent" valign="top" align="right">
                    
                        

                        <img alt="" src="https://mcusercontent.com/bccdb651bd8a8f943adddbe6c/images/144e6138-89a3-4813-acd0-0575a566a97d.png" style="max-width:100px;" class="mcnImage" width="100">
                        

                    
                    </td>
                </tr>
            </tbody></table>
            <table class="mcnCaptionRightTextContentContainer" width="396" cellspacing="0" cellpadding="0" border="0" align="right">
                <tbody><tr>
                    <td class="mcnTextContent" valign="top">
                        <h5 style="margin-top: 0px; padding-top: 0px;line-height:1.5em;">Create and update/edit your personal contact profile and/or of your organization’s team.</h5>

                    </td>
                </tr>
            </tbody></table>
        </td>
    </tr>
</tbody></table>




            </td>
        </tr>
    </tbody>
</table><table class="mcnDividerBlock" style="min-width:100%;" width="100%" cellspacing="0" cellpadding="0" border="0">
    <tbody class="mcnDividerBlockOuter">
        <tr>
            <td class="mcnDividerBlockInner" style="min-width:100%; padding:18px;">
                <table class="mcnDividerContent" style="min-width: 100%;border-top: 2px none #EAEAEA;" width="100%" cellspacing="0" cellpadding="0" border="0">
                    <tbody><tr>
                        <td>
                            <span></span>
                        </td>
                    </tr>
                </tbody></table>
<!--            
                <td class="mcnDividerBlockInner" style="padding: 18px;">
                <hr class="mcnDividerContent" style="border-bottom-color:none; border-left-color:none; border-right-color:none; border-bottom-width:0; border-left-width:0; border-right-width:0; margin-top:0; margin-right:0; margin-bottom:0; margin-left:0;" />
-->
            </td>
        </tr>
    </tbody>
</table><table class="mcnTextBlock" style="min-width:100%;" width="100%" cellspacing="0" cellpadding="0" border="0">
    <tbody class="mcnTextBlockOuter">
        <tr>
            <td class="mcnTextBlockInner" style="padding-top:9px;" valign="top">
                <!--[if mso]>
        <table align="left" border="0" cellspacing="0" cellpadding="0" width="100%" style="width:100%;">
        <tr>
        <![endif]-->
          
        <!--[if mso]>
        <td valign="top" width="600" style="width:600px;">
        <![endif]-->
                <table style="max-width:100%; min-width:100%;" class="mcnTextContentContainer" width="100%" cellspacing="0" cellpadding="0" border="0" align="left">
                    <tbody><tr>
                        
                        <td class="mcnTextContent" style="padding: 0px 18px 9px; line-height: 200%; font-family: Verdana; color: #666666;" valign="top">
                        
                            Thank you for working collaboratively for a healthier marine environment, and towards enhancing the well-being of the peoples in our region!
                        </td>
                    </tr>
                </tbody></table>
        <!--[if mso]>
        </td>
        <![endif]-->
                
        <!--[if mso]>
        </tr>
        </table>
        <![endif]-->
            </td>
        </tr>
    </tbody>
</table><table class="mcnDividerBlock" style="min-width:100%;" width="100%" cellspacing="0" cellpadding="0" border="0">
    <tbody class="mcnDividerBlockOuter">
        <tr>
            <td class="mcnDividerBlockInner" style="min-width:100%; padding:18px;">
                <table class="mcnDividerContent" style="min-width: 100%;border-top: 2px none #EAEAEA;" width="100%" cellspacing="0" cellpadding="0" border="0">
                    <tbody><tr>
                        <td>
                            <span></span>
                        </td>
                    </tr>
                </tbody></table>
<!--            
                <td class="mcnDividerBlockInner" style="padding: 18px;">
                <hr class="mcnDividerContent" style="border-bottom-color:none; border-left-color:none; border-right-color:none; border-bottom-width:0; border-left-width:0; border-right-width:0; margin-top:0; margin-right:0; margin-bottom:0; margin-left:0;" />
-->
            </td>
        </tr>
    </tbody>
</table><table class="mcnTextBlock" style="min-width:100%;" width="100%" cellspacing="0" cellpadding="0" border="0">
    <tbody class="mcnTextBlockOuter">
        <tr>
            <td class="mcnTextBlockInner" style="padding-top:9px;" valign="top">
                <!--[if mso]>
        <table align="left" border="0" cellspacing="0" cellpadding="0" width="100%" style="width:100%;">
        <tr>
        <![endif]-->
          
        <!--[if mso]>
        <td valign="top" width="600" style="width:600px;">
        <![endif]-->
                 <table style="max-width:100%; min-width:100%;" class="mcnTextContentContainer" width="100%" cellspacing="0" cellpadding="0" border="0" align="left">
                    <tbody><tr>
                        
                        <td class="mcnTextContent" style="padding: 0px 18px 9px; font-family: Verdana; color: #666666;" valign="top">
                        
                            <div style="padding: 20px 0; font-size: 16px; line-height: 32px; color: #666666;">
                            Best regards,
                            </div>
                        </td>
                    </tr>
                </tbody></table>
        <!--[if mso]>
        </td>
        <![endif]-->
                
        <!--[if mso]>
        </tr>
        </table>
        <![endif]-->
            </td>
        </tr>
    </tbody>
</table><table class="mcnTextBlock" style="min-width:100%;" width="100%" cellspacing="0" cellpadding="0" border="0">
    <tbody class="mcnTextBlockOuter">
        <tr>
            <td class="mcnTextBlockInner" style="padding-top:9px;" valign="top">
                <!--[if mso]>
        <table align="left" border="0" cellspacing="0" cellpadding="0" width="100%" style="width:100%;">
        <tr>
        <![endif]-->
          
        <!--[if mso]>
        <td valign="top" width="600" style="width:600px;">
        <![endif]-->
                <table style="max-width:100%; min-width:100%;" class="mcnTextContentContainer" width="100%" cellspacing="0" cellpadding="0" border="0" align="left">
                    <tbody><tr>
                        
                        <td class="mcnTextContent" style="padding: 0px 18px 9px; font-family: Verdana; color: #666666; font-size: 15px;" valign="top">
                        
                            <b>Patrick Debels</b><br>
UNDP/GEF CLME+ Project Coordination Unit<br>
Secretariat to the CLME+ Interim Coordination Mechanism<br>
<a href="mailto:info@clmeplus.org">info@clmeplus.org</a>
                        </td>
                    </tr>
                </tbody></table>
        <!--[if mso]>
        </td>
        <![endif]-->
                
        <!--[if mso]>
        </tr>
        </table>
        <![endif]-->
            </td>
        </tr>
    </tbody>
</table><table class="mcnImageBlock" style="min-width:100%;" width="100%" cellspacing="0" cellpadding="0" border="0">
    <tbody class="mcnImageBlockOuter">
            <tr>
                <td style="padding:9px" class="mcnImageBlockInner" valign="top">
                    <table class="mcnImageContentContainer" style="min-width:100%;" width="100%" cellspacing="0" cellpadding="0" border="0" align="left">
                        <tbody><tr>
                            <td class="mcnImageContent" style="padding-right: 9px; padding-left: 9px; padding-top: 0; padding-bottom: 0; text-align:center;" valign="top">
                                
                                    
                                        <img alt="" src="https://mcusercontent.com/bccdb651bd8a8f943adddbe6c/images/d89e6079-7469-4607-8d2a-ef9d58af832e.png" style="max-width:1000px; padding-bottom: 0; display: inline !important; vertical-align: bottom;" class="mcnImage" width="564" align="middle">
                                    
                                
                            </td>
                        </tr>
                    </tbody></table>
                </td>
            </tr>
    </tbody>
</table></td>
                            </tr>
                            <tr>
                                <td valign="top" id="templateFooter"></td>
                            </tr>
                        </table>
                        <!--[if (gte mso 9)|(IE)]>
                        </td>
                        </tr>
                        </table>
                        <![endif]-->
                        <!-- // END TEMPLATE -->
                    </td>
                </tr>
            </table>
        </center>
    </body>
</html>
 ';


	 	$to = $usuario_correo;
        $subject = 'CLME + Hub | Your account has been approved ';
        $headers = array('Content-Type: text/html; charset=UTF-8','From: CLME+ HUB <info@clmeplus.org>');
        //$message = "the user : " .$current_user->display_name . " has updated his profile with:" . $role_new;
		
         wp_mail( $to, $subject, $message, $headers);


	}elseif ($_POST['um-role'] === 'um_usuario-icm') {
		# code...
		$role_new = 'icm';

		//$message = '<div style="max-width: 560px; padding: 20px; background: #ffffff; border-radius: 5px; margin: 40px auto; font-family: Open Sans,Helvetica,Arial; font-size: 15px; color: #666;"><div style="color: #444444; font-weight: normal;"><div style="text-align: center; font-weight: 600; font-size: 26px; padding: 10px 0; border-bottom: solid 1px #eeeeee;"><img src="https://clmeplus.org/app/uploads/2021/01/logo-clme.png" width="300"/></div><div style="clear: both;"> </div></div><div style="padding: 0 30px 30px 30px; border-bottom: 3px solid #eeeeee; color: #5c6670;"><center><br><br><h3>Your account has been approved as an ICM member!<br></h3></center><div style="padding: 30px 0; font-size: 16px; line-height: 32px;">Dear '.$usuario_nombre. '<br/>Our team has revised and verified your account as an ICM member.<br>You now have complete access to the tools of the CLME+ Hub. All your content from now on will not need our team`s approval to be published. Therefore, we invite you to always seek for the best interest of our region and upload information that contributes to its development and to a better knowledge exchange among all our organizations and initiatives.</div><div style="padding: 10px 0 50px 0; text-align: center;"><a style="color: #5c6670;background: #56c9e8; color: #fff; padding: 12px 30px; text-decoration: none; border-radius: 3px; letter-spacing: 0.3px;" href="https://clmeplus.org/login/">Login to our site</a></div><div style="padding: 30px 0; font-size: 16px; line-height: 32px;color: #5c6670;">From now on, you have access to the the following tools:</div><div style="padding: 30px 0; font-size: 16px; line-height: 32px;"><div style="display: inline-block; width: 20%; padding-right: 10px; vertical-align: middle;"><img style="width: 100%; max-width:100px;" style="width: 100%; max-width: 100px;" widht="100"  src="https://clmeplus.org/app/uploads/2021/01/Ppi_database_icon-gray.png"/></div><div style="display: inline-block; width: 70%; padding: 0px 15px 0px 15px; vertical-align: middle;"><h5 style="margin-top: 0px; padding-top: 0px;color: #5c6670; line-height:1.2em;">Create and Update/Edit project profiles for your initiatives contributing to the CLME+ SAP and other regional commitments. You can also see soft-pipeline projects from other ICM members.</h5></div><hr style="margin: 25px 0px;"/><div style="display: inline-block; width: 20%; padding-right: 10px; vertical-align: middle;"><img style="width: 100%; max-width:100px;" style="width: 100%; max-width: 100px;" widht="100"  src="https://clmeplus.org/app/uploads/2020/04/docs-library-icon-2.png"/></div><div style="display: inline-block; width: 70%; padding: 0px 15px 0px 15px; vertical-align: middle;"><h5 style="margin-top: 0px; padding-top: 0px;line-height:1.5em;color: #5c6670;">Upload and update/edit documents from your organizations or initiative and of the region’s interest.</h5></div><hr style="margin: 25px 0px;"/><div style="display: inline-block; width: 20%; padding-right: 10px; vertical-align: middle;"><img style="width: 100%; max-width:100px;" style="width: 100%; max-width: 100px;" widht="100"  src="https://clmeplus.org/app/uploads/2020/04/contact-grey.png"/></div><div style="display: inline-block; width: 70%; padding: 0px 15px 0px 15px; vertical-align: middle;"><h5 style="margin-top: 0px; padding-top: 0px;line-height:1.5em;color: #5c6670;">Create and update/edit your personal contact profile and/or of your organization’s team. You can also access restricted contacts, create mailing lists that can copy and paste in your inbox and export a full list of contacts from various organizations, projects, regional agreements, working groups and much more.</h5></div></div><div style="padding: 30px 0; font-size: 16px; line-height: 32px;color: #5c6670;">Thank you for working collaboratively for a healthier marine environment, and towards enhancing the well-being of the peoples in our region.<br/><br/>Best regards,</div><div style="color: #999; padding: 20px 0px;"><div>Patrick Debels<br/>UNDP/GEF CLME+ Project Coordination Unit<br/>Secretariat to the CLME+ Interim Coordination Mechanism<br/><a href="mailto:info@clmeplus.org">info@clmeplus.org</a></div></div><div style="color: #999; padding: 20px 0px;"><img style="width: 100%;" src="https://clmeplus.org/app/uploads/2021/02/Partners_CLME_ICM_mail-1.png"/></div></div></div>';

		$message = '<!doctype html>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office">
    <head>
        <!-- NAME: 1 COLUMN -->
        <!--[if gte mso 15]>
        <xml>
            <o:OfficeDocumentSettings>
            <o:AllowPNG/>
            <o:PixelsPerInch>96</o:PixelsPerInch>
            </o:OfficeDocumentSettings>
        </xml>
        <![endif]-->
        <meta charset="UTF-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <meta name="viewport" content="width=device-width, initial-scale=1">
        <title>*|MC:SUBJECT|*</title>
        
    <style type="text/css">
    p{
      margin:10px 0;
      padding:0;
      font-family: Verdana;
      color:#666;
    }
    table{
      border-collapse:collapse;
      font-family: Verdana;
      color:#666;
    }
    h1,h2,h3,h4,h5,h6{
      display:block;
      margin:0;
      padding:0;
      font-family: Verdana;
      color:#666;
      font-weight: 500;
    }
    img,a img{
      border:0;
      height:auto;
      outline:none;
      text-decoration:none;
    }
    body,#bodyTable,#bodyCell{
      height:100%;
      margin:0;
      padding:0;
      width:100%;
    }
    .mcnPreviewText{
      display:none !important;
    }
    #outlook a{
      padding:0;
    }
    img{
      -ms-interpolation-mode:bicubic;
    }
    table{
      mso-table-lspace:0pt;
      mso-table-rspace:0pt;
    }
    .ReadMsgBody{
      width:100%;
    }
    .ExternalClass{
      width:100%;
    }
    p,a,li,td,blockquote{
      mso-line-height-rule:exactly;
    }
    a[href^=tel],a[href^=sms]{
      color:inherit;
      cursor:default;
      text-decoration:none;
    }
    p,a,li,td,body,table,blockquote{
      -ms-text-size-adjust:100%;
      -webkit-text-size-adjust:100%;
    }
    .ExternalClass,.ExternalClass p,.ExternalClass td,.ExternalClass div,.ExternalClass span,.ExternalClass font{
      line-height:100%;
    }
    a[x-apple-data-detectors]{
      color:inherit !important;
      text-decoration:none !important;
      font-size:inherit !important;
      font-family:inherit !important;
      font-weight:inherit !important;
      line-height:inherit !important;
    }
    #bodyCell{
      padding:10px;
    }
    .templateContainer{
      max-width:600px !important;
    }
    a.mcnButton{
      display:block;
    }
    .mcnImage,.mcnRetinaImage{
      vertical-align:bottom;
    }
    .mcnTextContent{
      word-break:break-word;
    }
    .mcnTextContent img{
      height:auto !important;
    }
    .mcnDividerBlock{
      table-layout:fixed !important;
    }
  
  
    #bodyCell{
      /*@editable*/border-top:0;
    }
    h3{
      /*@editable*/color:#202020;
      /*@editable*/font-family:Helvetica;
      /*@editable*/font-size:20px;
      /*@editable*/font-style:normal;
      /*@editable*/font-weight:bold;
      /*@editable*/line-height:125%;
      /*@editable*/letter-spacing:normal;
      /*@editable*/text-align:left;
    }s
  
    .templateContainer{
      /*@editable*/border:0;
    }
  
    #templatePreheader{
      /*@editable*/background-color:#FFFFFF;
      /*@editable*/background-image:none;
      /*@editable*/background-repeat:no-repeat;
      /*@editable*/background-position:center;
      /*@editable*/background-size:cover;
      /*@editable*/border-top:0;
      /*@editable*/border-bottom:0;
      /*@editable*/padding-top:9px;
      /*@editable*/padding-bottom:9px;
    }
  
    #templatePreheader .mcnTextContent,#templatePreheader .mcnTextContent p{
      /*@editable*/color:#656565;
      /*@editable*/font-family:Helvetica;
      /*@editable*/font-size:12px;
      /*@editable*/line-height:150%;
      /*@editable*/text-align:left;
    }
  
    #templatePreheader .mcnTextContent a,#templatePreheader .mcnTextContent p a{
      /*@editable*/color:#656565;
      /*@editable*/font-weight:normal;
      /*@editable*/text-decoration:underline;
    }
  
    #templateHeader{
      /*@editable*/background-color:#FFFFFF;
      /*@editable*/background-image:none;
      /*@editable*/background-repeat:no-repeat;
      /*@editable*/background-position:center;
      /*@editable*/background-size:cover;
      /*@editable*/border-top:0;
      /*@editable*/border-bottom:0;
      /*@editable*/padding-top:9px;
      /*@editable*/padding-bottom:0;
    }
  
    #templateBody{
      /*@editable*/background-color:#FFFFFF;
      /*@editable*/background-image:none;
      /*@editable*/background-repeat:no-repeat;
      /*@editable*/background-position:center;
      /*@editable*/background-size:cover;
      /*@editable*/border-top:0;
      /*@editable*/border-bottom:2px solid #EAEAEA;
      /*@editable*/padding-top:0;
      /*@editable*/padding-bottom:9px;
    }
  
    #templateBody .mcnTextContent,#templateBody .mcnTextContent p{
      /*@editable*/color:#202020;
      /*@editable*/font-family:Helvetica;
      /*@editable*/font-size:16px;
      /*@editable*/line-height:150%;
      /*@editable*/text-align:left;
    }
  
    #templateBody .mcnTextContent a,#templateBody .mcnTextContent p a{
      /*@editable*/color:#007C89;
      /*@editable*/font-weight:normal;
      /*@editable*/text-decoration:underline;
    }
  
    #templateFooter{
      /*@editable*/background-color:#FFFFFF;
      /*@editable*/background-image:none;
      /*@editable*/background-repeat:no-repeat;
      /*@editable*/background-position:center;
      /*@editable*/background-size:cover;
      /*@editable*/border-top:0;
      /*@editable*/border-bottom:0;
      /*@editable*/padding-top:9px;
      /*@editable*/padding-bottom:9px;
    }
  
    #templateFooter .mcnTextContent,#templateFooter .mcnTextContent p{
      /*@editable*/color:#656565;
      /*@editable*/font-family:Helvetica;
      /*@editable*/font-size:12px;
      /*@editable*/line-height:150%;
      /*@editable*/text-align:center;
    }
  
    #templateFooter .mcnTextContent a,#templateFooter .mcnTextContent p a{
      /*@editable*/color:#656565;
      /*@editable*/font-weight:normal;
      /*@editable*/text-decoration:underline;
    }
  @media only screen and (min-width:768px){
    .templateContainer{
      width:600px !important;
    }

} @media only screen and (max-width: 480px){
    body,table,td,p,a,li,blockquote{
      -webkit-text-size-adjust:none !important;
    }

} @media only screen and (max-width: 480px){
    body{
      width:100% !important;
      min-width:100% !important;
    }

} @media only screen and (max-width: 480px){
    .mcnRetinaImage{
      max-width:100% !important;
    }

} @media only screen and (max-width: 480px){
    .mcnImage{
      width:100% !important;
    }

} @media only screen and (max-width: 480px){
    .mcnCartContainer,.mcnCaptionTopContent,.mcnRecContentContainer,.mcnCaptionBottomContent,.mcnTextContentContainer,.mcnBoxedTextContentContainer,.mcnImageGroupContentContainer,.mcnCaptionLeftTextContentContainer,.mcnCaptionRightTextContentContainer,.mcnCaptionLeftImageContentContainer,.mcnCaptionRightImageContentContainer,.mcnImageCardLeftTextContentContainer,.mcnImageCardRightTextContentContainer,.mcnImageCardLeftImageContentContainer,.mcnImageCardRightImageContentContainer{
      max-width:100% !important;
      width:100% !important;
    }

} @media only screen and (max-width: 480px){
    .mcnBoxedTextContentContainer{
      min-width:100% !important;
    }

} @media only screen and (max-width: 480px){
    .mcnImageGroupContent{
      padding:9px !important;
    }

} @media only screen and (max-width: 480px){
    .mcnCaptionLeftContentOuter .mcnTextContent,.mcnCaptionRightContentOuter .mcnTextContent{
      padding-top:9px !important;
    }

} @media only screen and (max-width: 480px){
    .mcnImageCardTopImageContent,.mcnCaptionBottomContent:last-child .mcnCaptionBottomImageContent,.mcnCaptionBlockInner .mcnCaptionTopContent:last-child .mcnTextContent{
      padding-top:18px !important;
    }

} @media only screen and (max-width: 480px){
    .mcnImageCardBottomImageContent{
      padding-bottom:9px !important;
    }

} @media only screen and (max-width: 480px){
    .mcnImageGroupBlockInner{
      padding-top:0 !important;
      padding-bottom:0 !important;
    }

} @media only screen and (max-width: 480px){
    .mcnImageGroupBlockOuter{
      padding-top:9px !important;
      padding-bottom:9px !important;
    }

} @media only screen and (max-width: 480px){
    .mcnTextContent,.mcnBoxedTextContentColumn{
      padding-right:18px !important;
      padding-left:18px !important;
    }

} @media only screen and (max-width: 480px){
    .mcnImageCardLeftImageContent,.mcnImageCardRightImageContent{
      padding-right:18px !important;
      padding-bottom:0 !important;
      padding-left:18px !important;
    }

} @media only screen and (max-width: 480px){
    .mcpreview-image-uploader{
      display:none !important;
      width:100% !important;
    }

} @media only screen and (max-width: 480px){
  /*
  @tab Mobile Styles
  @section Heading 1
  @tip Make the first-level headings larger in size for better readability on small screens.
  */
    h1{
      /*@editable*/font-size:22px !important;
      /*@editable*/line-height:125% !important;
    }

} @media only screen and (max-width: 480px){
  /*
  @tab Mobile Styles
  @section Heading 2
  @tip Make the second-level headings larger in size for better readability on small screens.
  */
    h2{
      /*@editable*/font-size:20px !important;
      /*@editable*/line-height:125% !important;
    }

} @media only screen and (max-width: 480px){
  /*
  @tab Mobile Styles
  @section Heading 3
  @tip Make the third-level headings larger in size for better readability on small screens.
  */
    h3{
      /*@editable*/font-size:18px !important;
      /*@editable*/line-height:125% !important;
    }

} @media only screen and (max-width: 480px){
  /*
  @tab Mobile Styles
  @section Heading 4
  @tip Make the fourth-level headings larger in size for better readability on small screens.
  */
    h4{
      /*@editable*/font-size:16px !important;
      /*@editable*/line-height:150% !important;
    }

} @media only screen and (max-width: 480px){
  /*
  @tab Mobile Styles
  @section Boxed Text
  @tip Make the boxed text larger in size for better readability on small screens. We recommend a font size of at least 16px.
  */
    .mcnBoxedTextContentContainer .mcnTextContent,.mcnBoxedTextContentContainer .mcnTextContent p{
      /*@editable*/font-size:14px !important;
      /*@editable*/line-height:150% !important;
    }

} @media only screen and (max-width: 480px){
  
    #templatePreheader{
      /*@editable*/display:block !important;
    }

} @media only screen and (max-width: 480px){
  /*
  @tab Mobile Styles
  @section Preheader Text
  @tip Make the preheader text larger in size for better readability on small screens.
  */
    #templatePreheader .mcnTextContent,#templatePreheader .mcnTextContent p{
      /*@editable*/font-size:14px !important;
      /*@editable*/line-height:150% !important;
    }

} @media only screen and (max-width: 480px){
  /*
  @tab Mobile Styles
  @section Header Text
  @tip Make the header text larger in size for better readability on small screens.
  */
    #templateHeader .mcnTextContent,#templateHeader .mcnTextContent p{
      /*@editable*/font-size:16px !important;
      /*@editable*/line-height:150% !important;
    }

} @media only screen and (max-width: 480px){
  /*
  @tab Mobile Styles
  @section Body Text
  @tip Make the body text larger in size for better readability on small screens. We recommend a font size of at least 16px.
  */
    #templateBody .mcnTextContent,#templateBody .mcnTextContent p{
      /*@editable*/font-size:16px !important;
      /*@editable*/line-height:150% !important;
    }

} @media only screen and (max-width: 480px){
  /*
  @tab Mobile Styles
  @section Footer Text
  @tip Make the footer content text larger in size for better readability on small screens.
  */
    #templateFooter .mcnTextContent,#templateFooter .mcnTextContent p{
      /*@editable*/font-size:14px !important;
      /*@editable*/line-height:150% !important;
    }

}</style></head>
    <body>
        
        <center>
            <table align="center" border="0" cellpadding="0" cellspacing="0" height="100%" width="100%" id="bodyTable">
                <tr>
                    <td align="center" valign="top" id="bodyCell">
                        <!-- BEGIN TEMPLATE // -->
                        <!--[if (gte mso 9)|(IE)]>
                        <table align="center" border="0" cellspacing="0" cellpadding="0" width="600" style="width:600px;">
                        <tr>
                        <td align="center" valign="top" width="600" style="width:600px;">
                        <![endif]-->
                        <table border="0" cellpadding="0" cellspacing="0" width="100%" class="templateContainer">
                            <tr>
                                <td valign="top" id="templatePreheader"></td>
                            </tr>
                            <tr>
                                <td valign="top" id="templateHeader"><table class="mcnImageBlock" style="min-width:100%;" width="100%" cellspacing="0" cellpadding="0" border="0">
    <tbody class="mcnImageBlockOuter">
            <tr>
                <td style="padding:9px" class="mcnImageBlockInner" valign="top">
                    <table class="mcnImageContentContainer" style="min-width:100%;" width="100%" cellspacing="0" cellpadding="0" border="0" align="left">
                        <tbody><tr>
                            <td class="mcnImageContent" style="padding-right: 9px; padding-left: 9px; padding-top: 0; padding-bottom: 0; text-align:center;" valign="top">
                                
                                    
                                        <img alt="" src="https://clmeplus.org/app/uploads/2021/03/logo-clme-1.png" style="max-width:300px; padding-bottom: 0; display: inline !important; vertical-align: bottom;" class="mcnImage" width="300" align="middle">
                                    
                                
                            </td>
                        </tr>
                    </tbody></table>
                </td>
            </tr>
    </tbody>
</table><table class="mcnDividerBlock" style="min-width:100%;" width="100%" cellspacing="0" cellpadding="0" border="0">
    <tbody class="mcnDividerBlockOuter">
        <tr>
            <td class="mcnDividerBlockInner" style="min-width:100%; padding:18px;">
                <table class="mcnDividerContent" style="min-width: 100%;border-top: 2px none #EAEAEA;" width="100%" cellspacing="0" cellpadding="0" border="0">
                    <tbody><tr>
                        <td>
                            <span></span>
                        </td>
                    </tr>
                </tbody></table>
<!--            
                <td class="mcnDividerBlockInner" style="padding: 18px;">
                <hr class="mcnDividerContent" style="border-bottom-color:none; border-left-color:none; border-right-color:none; border-bottom-width:0; border-left-width:0; border-right-width:0; margin-top:0; margin-right:0; margin-bottom:0; margin-left:0;" />
-->
            </td>
        </tr>
    </tbody>
</table><table class="mcnTextBlock" style="min-width:100%;" width="100%" cellspacing="0" cellpadding="0" border="0">
    <tbody class="mcnTextBlockOuter">
        <tr>
            <td class="mcnTextBlockInner" style="padding-top:9px;" valign="top">
                <!--[if mso]>
        <table align="left" border="0" cellspacing="0" cellpadding="0" width="100%" style="width:100%;">
        <tr>
        <![endif]-->
          
        <!--[if mso]>
        <td valign="top" width="600" style="width:600px;">
        <![endif]-->
                <table style="max-width:100%; min-width:100%;" class="mcnTextContentContainer" width="100%" cellspacing="0" cellpadding="0" border="0" align="left">
                    <tbody><tr>
                        
                        <td class="mcnTextContent" style="padding-top:0; padding-right:18px; padding-bottom:9px; padding-left:18px;" valign="top">
                        
                            <h3 style="text-align: center; font-family: Verdana; color:#666;">Your account has been approved as an ICM member!</h3>

                        </td>
                    </tr>
                </tbody></table>
        <!--[if mso]>
        </td>
        <![endif]-->
                
        <!--[if mso]>
        </tr>
        </table>
        <![endif]-->
            </td>
        </tr>
    </tbody>
</table><table class="mcnDividerBlock" style="min-width:100%;" width="100%" cellspacing="0" cellpadding="0" border="0">
    <tbody class="mcnDividerBlockOuter">
        <tr>
            <td class="mcnDividerBlockInner" style="min-width:100%; padding:18px;">
                <table class="mcnDividerContent" style="min-width: 100%;border-top: 2px none #EAEAEA;" width="100%" cellspacing="0" cellpadding="0" border="0">
                    <tbody><tr>
                        <td>
                            <span></span>
                        </td>
                    </tr>
                </tbody></table>
<!--            
                <td class="mcnDividerBlockInner" style="padding: 18px;">
                <hr class="mcnDividerContent" style="border-bottom-color:none; border-left-color:none; border-right-color:none; border-bottom-width:0; border-left-width:0; border-right-width:0; margin-top:0; margin-right:0; margin-bottom:0; margin-left:0;" />
-->
            </td>
        </tr>
    </tbody>
</table></td>
                            </tr>
                            <tr>
                                <td valign="top" id="templateBody"><table class="mcnTextBlock" style="min-width:100%;" width="100%" cellspacing="0" cellpadding="0" border="0">
    <tbody class="mcnTextBlockOuter">
        <tr>
            <td class="mcnTextBlockInner" style="padding-top:9px;" valign="top">
                <!--[if mso]>
        <table align="left" border="0" cellspacing="0" cellpadding="0" width="100%" style="width:100%;">
        <tr>
        <![endif]-->
          
        <!--[if mso]>
        <td valign="top" width="600" style="width:600px;">
        <![endif]-->
               
                 <table style="max-width:100%; min-width:100%;" class="mcnTextContentContainer" width="100%" cellspacing="0" cellpadding="0" border="0" align="left">
                    <tbody><tr>
                        
                        <td class="mcnTextContent" style="padding: 0px 18px 9px; font-family: Verdana; color:#666;" valign="top">
                        
                            <div style="padding: 20px 0; font-size: 16px; line-height: 32px;color: #666666;"> Dear '. $usuario_nombre .'<br>
              Our team has revised and verified your account as an ICM member.<br>
              You now have complete access to the tools of the CLME+ Hub. All your content from now on will not need our team`s approval to be published. Therefore, we invite you to always seek for the best interest of our region and upload information that contributes to its development and to a better knowledge exchange among all our organizations and initiatives.</div>

                        </td>
                    </tr>
                </tbody></table>
        <!--[if mso]>
        </td>
        <![endif]-->
                
        <!--[if mso]>
        </tr>
        </table>
        <![endif]-->
            </td>
        </tr>
    </tbody>
</table><table class="mcnDividerBlock" style="min-width:100%;" width="100%" cellspacing="0" cellpadding="0" border="0">
    <tbody class="mcnDividerBlockOuter">
        <tr>
            <td class="mcnDividerBlockInner" style="min-width:100%; padding:18px;">
                <table class="mcnDividerContent" style="min-width: 100%;border-top: 2px none #EAEAEA;" width="100%" cellspacing="0" cellpadding="0" border="0">
                    <tbody><tr>
                        <td>
                            <span></span>
                        </td>
                    </tr>
                </tbody></table>
<!--            
                <td class="mcnDividerBlockInner" style="padding: 18px;">
                <hr class="mcnDividerContent" style="border-bottom-color:none; border-left-color:none; border-right-color:none; border-bottom-width:0; border-left-width:0; border-right-width:0; margin-top:0; margin-right:0; margin-bottom:0; margin-left:0;" />
-->
            </td>
        </tr>
    </tbody>
</table><table class="mcnButtonBlock" style="min-width:100%;" width="100%" cellspacing="0" cellpadding="0" border="0">
    <tbody class="mcnButtonBlockOuter">
        <tr>
            <td style="padding-top:0; padding-right:18px; padding-bottom:18px; padding-left:18px;" class="mcnButtonBlockInner" valign="top" align="center">
                <table class="mcnButtonContentContainer" style="border-collapse: separate !important;border-radius: 4px;background-color: #56C9E8;" cellspacing="0" cellpadding="0" border="0">
                    <tbody>
                        <tr>
                            <td class="mcnButtonContent" style="font-family: Arial; font-size: 14px; padding: 16px;" valign="middle" align="center">
                                <a class="mcnButton " title="Login to our site" href="https://clmeplus.org/login/" target="_blank" style="font-weight: bold;letter-spacing: normal;line-height: 100%;text-align: center;text-decoration: none;color: #FFFFFF;">Login to our site</a>
                            </td>
                        </tr>
                    </tbody>
                </table>
            </td>
        </tr>
    </tbody>
</table><table class="mcnDividerBlock" style="min-width:100%;" width="100%" cellspacing="0" cellpadding="0" border="0">
    <tbody class="mcnDividerBlockOuter">
        <tr>
            <td class="mcnDividerBlockInner" style="min-width: 100%; padding: 15px 18px;">
                <table class="mcnDividerContent" style="min-width: 100%;border-top: 2px none #EAEAEA;" width="100%" cellspacing="0" cellpadding="0" border="0">
                    <tbody><tr>
                        <td>
                            <span></span>
                        </td>
                    </tr>
                </tbody></table>
<!--            
                <td class="mcnDividerBlockInner" style="padding: 18px;">
                <hr class="mcnDividerContent" style="border-bottom-color:none; border-left-color:none; border-right-color:none; border-bottom-width:0; border-left-width:0; border-right-width:0; margin-top:0; margin-right:0; margin-bottom:0; margin-left:0;" />
-->
            </td>
        </tr>
    </tbody>
</table><table class="mcnTextBlock" style="min-width:100%;" width="100%" cellspacing="0" cellpadding="0" border="0">
    <tbody class="mcnTextBlockOuter">
        <tr>
            <td class="mcnTextBlockInner" style="padding-top:9px;" valign="top">
                <!--[if mso]>
        <table align="left" border="0" cellspacing="0" cellpadding="0" width="100%" style="width:100%;">
        <tr>
        <![endif]-->
          
        <!--[if mso]>
        <td valign="top" width="600" style="width:600px;">
        <![endif]-->               
                <table style="max-width:100%; min-width:100%;" class="mcnTextContentContainer" width="100%" cellspacing="0" cellpadding="0" border="0" align="left">
                    <tbody><tr>
                        
                        <td class="mcnTextContent" style="padding: 0px 18px 9px; font-family: Verdana; color:#666;" valign="top">
                        
                            <div style="padding: 20px 0; font-size: 16px; line-height: 32px;color: #666666;">From now on, you have access to the the following tools:</div>

                        </td>
                    </tr>
                </tbody></table>
        <!--[if mso]>
        </td>
        <![endif]-->
                
        <!--[if mso]>
        </tr>
        </table>
        <![endif]-->
            </td>
        </tr>
    </tbody>
</table><table class="mcnDividerBlock" style="min-width:100%;" width="100%" cellspacing="0" cellpadding="0" border="0">
    <tbody class="mcnDividerBlockOuter">
        <tr>
            <td class="mcnDividerBlockInner" style="min-width:100%; padding:18px;">
                <table class="mcnDividerContent" style="min-width: 100%;border-top: 2px none #EAEAEA;" width="100%" cellspacing="0" cellpadding="0" border="0">
                    <tbody><tr>
                        <td>
                            <span></span>
                        </td>
                    </tr>
                </tbody></table>
<!--            
                <td class="mcnDividerBlockInner" style="padding: 18px;">
                <hr class="mcnDividerContent" style="border-bottom-color:none; border-left-color:none; border-right-color:none; border-bottom-width:0; border-left-width:0; border-right-width:0; margin-top:0; margin-right:0; margin-bottom:0; margin-left:0;" />
-->
            </td>
        </tr>
    </tbody>
</table><table class="mcnCaptionBlock" width="100%" cellspacing="0" cellpadding="0" border="0">
    <tbody class="mcnCaptionBlockOuter">
        <tr>
            <td class="mcnCaptionBlockInner" style="padding:9px;" valign="top">
                



<table class="mcnCaptionRightContentOuter" width="100%" cellspacing="0" cellpadding="0" border="0">
    <tbody><tr>
        <td class="mcnCaptionRightContentInner" style="padding:0 9px ;" valign="top">
            <table class="mcnCaptionRightImageContentContainer" width="132" cellspacing="0" cellpadding="0" border="0" align="left">
                <tbody><tr>
                    <td class="mcnCaptionRightImageContent" valign="top" align="right">
                    
                        

                        <img alt="" src="https://mcusercontent.com/bccdb651bd8a8f943adddbe6c/images/1eb388d4-8bf3-44a9-86ff-d5238e0753b5.png" style="max-width:100px;" class="mcnImage" width="100">
                        

                    
                    </td>
                </tr>
            </tbody></table>
            <table class="mcnCaptionRightTextContentContainer" width="396" cellspacing="0" cellpadding="0" border="0" align="right">
                <tbody><tr>
                    <td class="mcnTextContent" valign="top">
                        <h5 style="margin-top: 0px; padding-top: 0px;color: #666666; line-height:1.5em;">Create and Update/Edit project profiles for your initiatives contributing to the CLME+ SAP and other regional commitments. You can also see soft-pipeline projects from other ICM members.</h5>

                    </td>
                </tr>
            </tbody></table>
        </td>
    </tr>
</tbody></table>




            </td>
        </tr>
    </tbody>
</table><table class="mcnDividerBlock" style="min-width:100%;" width="100%" cellspacing="0" cellpadding="0" border="0">
    <tbody class="mcnDividerBlockOuter">
        <tr>
            <td class="mcnDividerBlockInner" style="min-width:100%; padding:18px;">
                <table class="mcnDividerContent" style="min-width: 100%;border-top: 2px solid #EAEAEA;" width="100%" cellspacing="0" cellpadding="0" border="0">
                    <tbody><tr>
                        <td>
                            <span></span>
                        </td>
                    </tr>
                </tbody></table>
<!--            
                <td class="mcnDividerBlockInner" style="padding: 18px;">
                <hr class="mcnDividerContent" style="border-bottom-color:none; border-left-color:none; border-right-color:none; border-bottom-width:0; border-left-width:0; border-right-width:0; margin-top:0; margin-right:0; margin-bottom:0; margin-left:0;" />
-->
            </td>
        </tr>
    </tbody>
</table><table class="mcnCaptionBlock" width="100%" cellspacing="0" cellpadding="0" border="0">
    <tbody class="mcnCaptionBlockOuter">
        <tr>
            <td class="mcnCaptionBlockInner" style="padding:9px;" valign="top">
                



<table class="mcnCaptionRightContentOuter" width="100%" cellspacing="0" cellpadding="0" border="0">
    <tbody><tr>
        <td class="mcnCaptionRightContentInner" style="padding:0 9px ;" valign="top">
            <table class="mcnCaptionRightImageContentContainer" width="132" cellspacing="0" cellpadding="0" border="0" align="left">
                <tbody><tr>
                    <td class="mcnCaptionRightImageContent" valign="top" align="right">
                    
                        

                        <img alt="" src="https://mcusercontent.com/bccdb651bd8a8f943adddbe6c/images/2e1ae345-6b6e-4b5a-a12a-63b839c71691.png" style="max-width:100px;" class="mcnImage" width="100">
                        

                    
                    </td>
                </tr>
            </tbody></table>
            <table class="mcnCaptionRightTextContentContainer" width="396" cellspacing="0" cellpadding="0" border="0" align="right">
                <tbody><tr>
                    <td class="mcnTextContent" valign="top">
                        <h5 style="margin-top: 0px; padding-top: 0px;line-height:1.5em;color: #666666;">Upload and update/edit documents from your organizations or initiative and of the region’s interest.</h5>

                    </td>
                </tr>
            </tbody></table>
        </td>
    </tr>
</tbody></table>




            </td>
        </tr>
    </tbody>
</table><table class="mcnDividerBlock" style="min-width:100%;" width="100%" cellspacing="0" cellpadding="0" border="0">
    <tbody class="mcnDividerBlockOuter">
        <tr>
            <td class="mcnDividerBlockInner" style="min-width:100%; padding:18px;">
                <table class="mcnDividerContent" style="min-width: 100%;border-top: 2px solid #EAEAEA;" width="100%" cellspacing="0" cellpadding="0" border="0">
                    <tbody><tr>
                        <td>
                            <span></span>
                        </td>
                    </tr>
                </tbody></table>
<!--            
                <td class="mcnDividerBlockInner" style="padding: 18px;">
                <hr class="mcnDividerContent" style="border-bottom-color:none; border-left-color:none; border-right-color:none; border-bottom-width:0; border-left-width:0; border-right-width:0; margin-top:0; margin-right:0; margin-bottom:0; margin-left:0;" />
-->
            </td>
        </tr>
    </tbody>
</table><table class="mcnCaptionBlock" width="100%" cellspacing="0" cellpadding="0" border="0">
    <tbody class="mcnCaptionBlockOuter">
        <tr>
            <td class="mcnCaptionBlockInner" style="padding:9px;" valign="top">
                



<table class="mcnCaptionRightContentOuter" width="100%" cellspacing="0" cellpadding="0" border="0">
    <tbody><tr>
        <td class="mcnCaptionRightContentInner" style="padding:0 9px ;" valign="top">
            <table class="mcnCaptionRightImageContentContainer" width="132" cellspacing="0" cellpadding="0" border="0" align="left">
                <tbody><tr>
                    <td class="mcnCaptionRightImageContent" valign="top" align="right">
                    
                        

                        <img alt="" src="https://mcusercontent.com/bccdb651bd8a8f943adddbe6c/images/144e6138-89a3-4813-acd0-0575a566a97d.png" style="max-width:100px;" class="mcnImage" width="100">
                        

                    
                    </td>
                </tr>
            </tbody></table>
            <table class="mcnCaptionRightTextContentContainer" width="396" cellspacing="0" cellpadding="0" border="0" align="right">
                <tbody><tr>
                    <td class="mcnTextContent" valign="top">
                        <h5 style="margin-top: 0px; padding-top: 0px;line-height:1.5em;color: #666666;">Create and update/edit your personal contact profile and/or of your organization’s team. You can also access restricted contacts, create mailing lists that can copy and paste in your inbox and export a full list of contacts from various organizations, projects, regional agreements, working groups and much more.</h5>

                    </td>
                </tr>
            </tbody></table>
        </td>
    </tr>
</tbody></table>




            </td>
        </tr>
    </tbody>
</table><table class="mcnDividerBlock" style="min-width:100%;" width="100%" cellspacing="0" cellpadding="0" border="0">
    <tbody class="mcnDividerBlockOuter">
        <tr>
            <td class="mcnDividerBlockInner" style="min-width:100%; padding:18px;">
                <table class="mcnDividerContent" style="min-width: 100%;border-top: 2px none #EAEAEA;" width="100%" cellspacing="0" cellpadding="0" border="0">
                    <tbody><tr>
                        <td>
                            <span></span>
                        </td>
                    </tr>
                </tbody></table>
<!--            
                <td class="mcnDividerBlockInner" style="padding: 18px;">
                <hr class="mcnDividerContent" style="border-bottom-color:none; border-left-color:none; border-right-color:none; border-bottom-width:0; border-left-width:0; border-right-width:0; margin-top:0; margin-right:0; margin-bottom:0; margin-left:0;" />
-->
            </td>
        </tr>
    </tbody>
</table><table class="mcnTextBlock" style="min-width:100%;" width="100%" cellspacing="0" cellpadding="0" border="0">
    <tbody class="mcnTextBlockOuter">
        <tr>
            <td class="mcnTextBlockInner" style="padding-top:9px;" valign="top">
                <!--[if mso]>
        <table align="left" border="0" cellspacing="0" cellpadding="0" width="100%" style="width:100%;">
        <tr>
        <![endif]-->
          
        <!--[if mso]>
        <td valign="top" width="600" style="width:600px;">
        <![endif]-->               
                <table style="max-width:100%; min-width:100%;" class="mcnTextContentContainer" width="100%" cellspacing="0" cellpadding="0" border="0" align="left">
                    <tbody><tr>
                        
                        <td class="mcnTextContent" style="padding: 0px 18px 9px; font-family: Verdana; color:#666;" valign="top">
                        
                            <div style="padding: 20px 0; font-size: 16px; line-height: 32px; color: #666666;">
                           Thank you for working collaboratively for a healthier marine environment, and towards enhancing the well-being of the peoples in our region.
                            </div>
                        </td>
                    </tr>
                </tbody></table>
        <!--[if mso]>
        </td>
        <![endif]-->
                
        <!--[if mso]>
        </tr>
        </table>
        <![endif]-->
            </td>
        </tr>
    </tbody>
</table><table class="mcnDividerBlock" style="min-width:100%;" width="100%" cellspacing="0" cellpadding="0" border="0">
    <tbody class="mcnDividerBlockOuter">
        <tr>
            <td class="mcnDividerBlockInner" style="min-width:100%; padding:18px;">
                <table class="mcnDividerContent" style="min-width: 100%;border-top: 2px none #EAEAEA;" width="100%" cellspacing="0" cellpadding="0" border="0">
                    <tbody><tr>
                        <td>
                            <span></span>
                        </td>
                    </tr>
                </tbody></table>
<!--            
                <td class="mcnDividerBlockInner" style="padding: 18px;">
                <hr class="mcnDividerContent" style="border-bottom-color:none; border-left-color:none; border-right-color:none; border-bottom-width:0; border-left-width:0; border-right-width:0; margin-top:0; margin-right:0; margin-bottom:0; margin-left:0;" />
-->
            </td>
        </tr>
    </tbody>
</table><table class="mcnTextBlock" style="min-width:100%;" width="100%" cellspacing="0" cellpadding="0" border="0">
    <tbody class="mcnTextBlockOuter">
        <tr>
            <td class="mcnTextBlockInner" style="padding-top:9px;" valign="top">
                <!--[if mso]>
        <table align="left" border="0" cellspacing="0" cellpadding="0" width="100%" style="width:100%;">
        <tr>
        <![endif]-->
          
        <!--[if mso]>
        <td valign="top" width="600" style="width:600px;">
        <![endif]-->
                <table style="max-width:100%; min-width:100%;" class="mcnTextContentContainer" width="100%" cellspacing="0" cellpadding="0" border="0" align="left">
                    <tbody><tr>
                        
                        <td class="mcnTextContent" style="padding: 0px 18px 9px; font-family: Verdana; color:#666;" valign="top">
                        
                            <div style="padding: 20px 0; font-size: 16px; line-height: 32px; color: #666666;">
                            Best regards,
                            </div>
                        </td>
                    </tr>
                </tbody></table>
        <!--[if mso]>
        </td>
        <![endif]-->
                
        <!--[if mso]>
        </tr>
        </table>
        <![endif]-->
            </td>
        </tr>
    </tbody>
</table><table class="mcnTextBlock" style="min-width:100%;" width="100%" cellspacing="0" cellpadding="0" border="0">
    <tbody class="mcnTextBlockOuter">
        <tr>
            <td class="mcnTextBlockInner" style="padding-top:9px;" valign="top">
                <!--[if mso]>
        <table align="left" border="0" cellspacing="0" cellpadding="0" width="100%" style="width:100%;">
        <tr>
        <![endif]-->
          
        <!--[if mso]>
        <td valign="top" width="600" style="width:600px;">
        <![endif]-->
                <table style="max-width:100%; min-width:100%;" class="mcnTextContentContainer" width="100%" cellspacing="0" cellpadding="0" border="0" align="left">
                    <tbody><tr>
                        
                        <td class="mcnTextContent" style="padding: 0px 18px 9px; font-family: Verdana; color:#666;" valign="top">
                        
                            <div style="padding: 20px 0; font-size: 16px; line-height: 32px; color: #666666;"><b>Patrick Debels</b><br>
              UNDP/GEF CLME+ Project Coordination Unit<br>
              Secretariat to the CLME+ Interim Coordination Mechanism<br>
              <a href="mailto:info@clmeplus.org">info@clmeplus.org</a></div>
                        </td>
                    </tr>
                </tbody></table>
        <!--[if mso]>
        </td>
        <![endif]-->
                
        <!--[if mso]>
        </tr>
        </table>
        <![endif]-->
            </td>
        </tr>
    </tbody>
</table><table class="mcnImageBlock" style="min-width:100%;" width="100%" cellspacing="0" cellpadding="0" border="0">
    <tbody class="mcnImageBlockOuter">
            <tr>
                <td style="padding:9px" class="mcnImageBlockInner" valign="top">
                    <table class="mcnImageContentContainer" style="min-width:100%;" width="100%" cellspacing="0" cellpadding="0" border="0" align="left">
                        <tbody><tr>
                            <td class="mcnImageContent" style="padding-right: 9px; padding-left: 9px; padding-top: 0; padding-bottom: 0; text-align:center;" valign="top">
                                
                                    
                                        <img alt="" src="https://mcusercontent.com/bccdb651bd8a8f943adddbe6c/images/d89e6079-7469-4607-8d2a-ef9d58af832e.png" style="max-width:1000px; padding-bottom: 0; display: inline !important; vertical-align: bottom;" class="mcnImage" width="564" align="middle">
                                    
                                
                            </td>
                        </tr>
                    </tbody></table>
                </td>
            </tr>
    </tbody>
</table></td>
                            </tr>
                            <tr>
                                <td valign="top" id="templateFooter"></td>
                            </tr>
                        </table>
                        <!--[if (gte mso 9)|(IE)]>
                        </td>
                        </tr>
                        </table>
                        <![endif]-->
                        <!-- // END TEMPLATE -->
                    </td>
                </tr>
            </table>
        </center>
    </body>
</html>
';

		$to = $usuario_correo;
        $subject = 'CLME + Hub | Your account has been approved as an ICM member!';
        //$headers = 'Content-Type: text/html; charset=UTF-8';
        $headers = array('Content-Type: text/html; charset=UTF-8','From: CLME+ HUB <info@clmeplus.org>');
        
        //$message = "the user : " .$current_user->display_name . " has updated his profile with:" . $role_new;

         wp_mail( $to, $subject, $message, $headers);
	}

   
   /*foreach($_POST as $key => $value){
        $message .= $key . ": ". $value ."\n";
    }

    $to = 'valencia.guzmandaniel@gmail.com';
    $subject = 'CLME + Hub | Your account has been approved as an ICM member!';
    $headers = 'Content-Type: text/html; charset=UTF-8';

    wp_mail( $to, $subject, $message, $headers);*/

    
        


       /* foreach($_POST as $key => $value){
	        $message .= $key . ": ". $value ."\n";
	    }

	    $to = 'valencia.guzmandaniel@gmail.com';
        $subject = 'user updated profile';

        foreach($_POST as $key => $value){
	        $message .= $key . ": ". $value ."\n";
	    }
        //$message = "the user : " .$current_user->display_name . " has updated his profile with:" . $role_new;

         wp_mail( $to, $subject, $message, $headers); */
        
       


 

	
	   
	

}


// auto login after user registration gravity
add_action( 'gform_user_registered', 'wpc_gravity_registration_autologin',  10, 4 );
/**
 * Auto login after registration.
 */
function wpc_gravity_registration_autologin( $user_id, $user_config, $entry, $password ) {
	$user = get_userdata( $user_id );
	$user_login = $user->user_login;
	$user_password = $password;
       $user->set_role(get_option('default_role', 'subscriber'));

    wp_signon( array(
		'user_login' => $user_login,
		'user_password' =>  $user_password,
		'remember' => false

    ) );
}







/**
 * Add User Role Class to Body
 */

add_filter('body_class','add_role_to_body');
function add_role_to_body($classes) {
$current_user = new WP_User(get_current_user_id());
$user_role = array_shift($current_user->roles);
$classes[] = 'role-'. $user_role;
return $classes;
}




/* 2021 */
add_filter( 'wpv_filter_query', 'post_type_filter_func', 10, 3 );
   
function post_type_filter_func( $query_args, $settings, $view_id ) {
    if ( $view_id == 91256 && isset($_GET['wpv-post-type'][0]) && !empty($_GET['wpv-post-type'][0]) ) {
        $query_args['post_type'] = $_GET['wpv-post-type'][0];
    }
    return $query_args;
}


/* 2021 IMAGE */
add_shortcode('get_image_URL_by_ID', 'get_image_URL_by_ID_fn');
function get_image_URL_by_ID_fn( $atts ) {
 
    $data = shortcode_atts( array(
        'field' => ''
    ), $atts );
 
    if(!empty($atts['field'])) {
        $image_ID = do_shortcode('[acf field="'.$atts['field'].'"]');
        $URL = wp_get_attachment_image_src($image_ID, 'full');
        if($URL) {
            return $URL[0];
        }
    }
 
}

/* 2021 ACF FIELD */
add_shortcode('get_file_URL_by_ID', 'get_file_URL_by_ID_fn');
function get_file_URL_by_ID_fn( $atts ) {
 
    $data = shortcode_atts( array(
        'field' => ''
    ), $atts );
 
    if(!empty($atts['field'])) {
        $image_ID = do_shortcode('[acf field="dl_file" post_id="'.$atts['field'].'"] ');
        $URL = wp_get_attachment_url($image_ID, 'full');
        if($URL) {
            return $URL[0];
        }
    }
 
}






/*function user_profile_update( $user_id ) {
    $site_url = get_bloginfo('wpurl');
        $user_info = get_userdata( $user_id );
        $to = $user_info->user_email; 
        $subject = "Profile Updated: ".$site_url."";
        $message = "Hello " .$user_info->display_name . "\nYour profile has been updated!\n\nThank you for visiting\n ".$site_url."";
        wp_mail( $to, $subject, $message);
}
add_action( 'profile_update', 'user_profile_update', 10, 2);*/







function user_role_update( $user_id, $new_role ) {
    $site_url = get_bloginfo('wpurl');
    $user_info = get_userdata( $user_id );


    $user = wp_get_current_user();
	if ( in_array( 'Subscriber', (array) $user->roles ) ) {
	    //The user has the "author" role
	    $usuario_viejo = 'es usuario subscriber';
	}

	$usuario_nombre = $user_info->display_name;
	$usuario_mail   = $user_info->user_email;

	//$headers = array('Content-Type: text/html; charset=UTF-8','From: UNDP/GEF CLME+ <info@clmeplus.org>');
	$headers = array('Content-Type: text/html; charset=UTF-8','From: CLME+ HUB <info@clmeplus.org>');
    $to = $user_info->user_email;
    $subject = "Migrated user CLME+ Hub";
    //$message = "Hello " .$user_info->display_name . " your role has changed on     ".$site_url.", congratulations you are now an " . $new_role .'viejo rol: '. $usuario_viejo;

    

    $message = '<!doctype html>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office">
    <head>
        <!-- NAME: 1 COLUMN -->
        <!--[if gte mso 15]>
        <xml>
            <o:OfficeDocumentSettings>
            <o:AllowPNG/>
            <o:PixelsPerInch>96</o:PixelsPerInch>
            </o:OfficeDocumentSettings>
        </xml>
        <![endif]-->
        <meta charset="UTF-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <meta name="viewport" content="width=device-width, initial-scale=1">
        <title>*|MC:SUBJECT|*</title>
        
    <style type="text/css">
    p{
      margin:10px 0;
      padding:0;
      color: #666;
    }
    table{
      border-collapse:collapse;
    }
    h1,h2,h3,h4,h5,h6{
      display:block;
      margin:0;
      padding:0;
      font-family: Verdana;
      color: #666;
      font-weight: 500;
    }
    img,a img{
      border:0;
      height:auto;
      outline:none;
      text-decoration:none;
    }
    body,#bodyTable,#bodyCell{
      height:100%;
      margin:0;
      padding:0;
      width:100%;
    }
    .mcnPreviewText{
      display:none !important;
    }
    #outlook a{
      padding:0;
    }
    img{
      -ms-interpolation-mode:bicubic;
    }
    table{
      mso-table-lspace:0pt;
      mso-table-rspace:0pt;
    }
    .ReadMsgBody{
      width:100%;
    }
    .ExternalClass{
      width:100%;
    }
    p,a,li,td,blockquote{
      mso-line-height-rule:exactly;
    }
    a[href^=tel],a[href^=sms]{
      color:inherit;
      cursor:default;
      text-decoration:none;
    }
    p,a,li,td,body,table,blockquote{
      -ms-text-size-adjust:100%;
      -webkit-text-size-adjust:100%;
    }
    .ExternalClass,.ExternalClass p,.ExternalClass td,.ExternalClass div,.ExternalClass span,.ExternalClass font{
      line-height:100%;
    }
    a[x-apple-data-detectors]{
      color:inherit !important;
      text-decoration:none !important;
      font-size:inherit !important;
      font-family:inherit !important;
      font-weight:inherit !important;
      line-height:inherit !important;
    }
    #bodyCell{
      padding:10px;
    }
    .templateContainer{
      max-width:600px !important;
    }
    a.mcnButton{
      display:block;
    }
    .mcnImage,.mcnRetinaImage{
      vertical-align:bottom;
    }
    .mcnTextContent{
      word-break:break-word;
    }
    .mcnTextContent img{
      height:auto !important;
    }
    .mcnDividerBlock{
      table-layout:fixed !important;
    }
  
    body,#bodyTable{
      /*@editable*/background-color:#FFFFFF;
    }
  
    #bodyCell{
      /*@editable*/border-top:0;
    }
  
    .templateContainer{
      /*@editable*/border:0;
    }
  /*
  @tab Page
  @section Heading 1
  @tip Set the styling for all first-level headings in your emails. These should be the largest of your headings.
  @style heading 1
  */
    h1{
      /*@editable*/color:#202020;
      /*@editable*/font-family:Helvetica;
      /*@editable*/font-size:26px;
      /*@editable*/font-style:normal;
      /*@editable*/font-weight:bold;
      /*@editable*/line-height:125%;
      /*@editable*/letter-spacing:normal;
      /*@editable*/text-align:left;
    }
  /*
  @tab Page
  @section Heading 2
  @tip Set the styling for all second-level headings in your emails.
  @style heading 2
  */
    h2{
      /*@editable*/color:#202020;
      /*@editable*/font-family:Helvetica;
      /*@editable*/font-size:22px;
      /*@editable*/font-style:normal;
      /*@editable*/font-weight:bold;
      /*@editable*/line-height:125%;
      /*@editable*/letter-spacing:normal;
      /*@editable*/text-align:left;
    }
  /*
  @tab Page
  @section Heading 3
  @tip Set the styling for all third-level headings in your emails.
  @style heading 3
  */
    h3{
      /*@editable*/color:#202020;
      /*@editable*/font-family:Helvetica;
      /*@editable*/font-size:20px;
      /*@editable*/font-style:normal;
      /*@editable*/font-weight:bold;
      /*@editable*/line-height:125%;
      /*@editable*/letter-spacing:normal;
      /*@editable*/text-align:left;
    }
  /*
  @tab Page
  @section Heading 4
  @tip Set the styling for all fourth-level headings in your emails. These should be the smallest of your headings.
  @style heading 4
  */
    h4{
      /*@editable*/color:#202020;
      /*@editable*/font-family:Helvetica;
      /*@editable*/font-size:18px;
      /*@editable*/font-style:normal;
      /*@editable*/font-weight:bold;
      /*@editable*/line-height:125%;
      /*@editable*/letter-spacing:normal;
      /*@editable*/text-align:left;
    }
  
    #templatePreheader{
      /*@editable*/background-color:#FFFFFF;
      /*@editable*/background-image:none;
      /*@editable*/background-repeat:no-repeat;
      /*@editable*/background-position:center;
      /*@editable*/background-size:cover;
      /*@editable*/border-top:0;
      /*@editable*/border-bottom:0;
      /*@editable*/padding-top:9px;
      /*@editable*/padding-bottom:9px;
    }
  
    #templatePreheader .mcnTextContent,#templatePreheader .mcnTextContent p{
      /*@editable*/color:#656565;
      /*@editable*/font-family:Helvetica;
      /*@editable*/font-size:12px;
      /*@editable*/line-height:150%;
      /*@editable*/text-align:left;
    }
  
    #templatePreheader .mcnTextContent a,#templatePreheader .mcnTextContent p a{
      /*@editable*/color:#656565;
      /*@editable*/font-weight:normal;
      /*@editable*/text-decoration:underline;
    }
  
    #templateHeader{
      /*@editable*/background-color:#FFFFFF;
      /*@editable*/background-image:none;
      /*@editable*/background-repeat:no-repeat;
      /*@editable*/background-position:center;
      /*@editable*/background-size:cover;
      /*@editable*/border-top:0;
      /*@editable*/border-bottom:0;
      /*@editable*/padding-top:9px;
      /*@editable*/padding-bottom:0;
    }
  
    #templateHeader .mcnTextContent,#templateHeader .mcnTextContent p{
      /*@editable*/color:#202020;
      /*@editable*/font-family:Helvetica;
      /*@editable*/font-size:16px;
      /*@editable*/line-height:150%;
      /*@editable*/text-align:left;
    }
  
    #templateHeader .mcnTextContent a,#templateHeader .mcnTextContent p a{
      /*@editable*/color:#007C89;
      /*@editable*/font-weight:normal;
      /*@editable*/text-decoration:underline;
    }
  
    #templateBody{
      /*@editable*/background-color:#FFFFFF;
      /*@editable*/background-image:none;
      /*@editable*/background-repeat:no-repeat;
      /*@editable*/background-position:center;
      /*@editable*/background-size:cover;
      /*@editable*/border-top:0;
      /*@editable*/border-bottom:2px solid #EAEAEA;
      /*@editable*/padding-top:0;
      /*@editable*/padding-bottom:9px;
    }
  
    #templateBody .mcnTextContent,#templateBody .mcnTextContent p{
      /*@editable*/color:#202020;
      /*@editable*/font-family:Helvetica;
      /*@editable*/font-size:16px;
      /*@editable*/line-height:150%;
      /*@editable*/text-align:left;
    }
  
    #templateBody .mcnTextContent a,#templateBody .mcnTextContent p a{
      /*@editable*/color:#007C89;
      /*@editable*/font-weight:normal;
      /*@editable*/text-decoration:underline;
    }
  
    #templateFooter{
      /*@editable*/background-color:#FFFFFF;
      /*@editable*/background-image:none;
      /*@editable*/background-repeat:no-repeat;
      /*@editable*/background-position:center;
      /*@editable*/background-size:cover;
      /*@editable*/border-top:0;
      /*@editable*/border-bottom:0;
      /*@editable*/padding-top:9px;
      /*@editable*/padding-bottom:9px;
    }
  
    #templateFooter .mcnTextContent,#templateFooter .mcnTextContent p{
      /*@editable*/color:#656565;
      /*@editable*/font-family:Helvetica;
      /*@editable*/font-size:12px;
      /*@editable*/line-height:150%;
      /*@editable*/text-align:center;
    }
  
    #templateFooter .mcnTextContent a,#templateFooter .mcnTextContent p a{
      /*@editable*/color:#656565;
      /*@editable*/font-weight:normal;
      /*@editable*/text-decoration:underline;
    }
  @media only screen and (min-width:768px){
    .templateContainer{
      width:600px !important;
    }

} @media only screen and (max-width: 480px){
    body,table,td,p,a,li,blockquote{
      -webkit-text-size-adjust:none !important;
    }

} @media only screen and (max-width: 480px){
    body{
      width:100% !important;
      min-width:100% !important;
    }

} @media only screen and (max-width: 480px){
    .mcnRetinaImage{
      max-width:100% !important;
    }

} @media only screen and (max-width: 480px){
    .mcnImage{
      width:100% !important;
    }

} @media only screen and (max-width: 480px){
    .mcnCartContainer,.mcnCaptionTopContent,.mcnRecContentContainer,.mcnCaptionBottomContent,.mcnTextContentContainer,.mcnBoxedTextContentContainer,.mcnImageGroupContentContainer,.mcnCaptionLeftTextContentContainer,.mcnCaptionRightTextContentContainer,.mcnCaptionLeftImageContentContainer,.mcnCaptionRightImageContentContainer,.mcnImageCardLeftTextContentContainer,.mcnImageCardRightTextContentContainer,.mcnImageCardLeftImageContentContainer,.mcnImageCardRightImageContentContainer{
      max-width:100% !important;
      width:100% !important;
    }

} @media only screen and (max-width: 480px){
    .mcnBoxedTextContentContainer{
      min-width:100% !important;
    }

} @media only screen and (max-width: 480px){
    .mcnImageGroupContent{
      padding:9px !important;
    }

} @media only screen and (max-width: 480px){
    .mcnCaptionLeftContentOuter .mcnTextContent,.mcnCaptionRightContentOuter .mcnTextContent{
      padding-top:9px !important;
    }

} @media only screen and (max-width: 480px){
    .mcnImageCardTopImageContent,.mcnCaptionBottomContent:last-child .mcnCaptionBottomImageContent,.mcnCaptionBlockInner .mcnCaptionTopContent:last-child .mcnTextContent{
      padding-top:18px !important;
    }

} @media only screen and (max-width: 480px){
    .mcnImageCardBottomImageContent{
      padding-bottom:9px !important;
    }

} @media only screen and (max-width: 480px){
    .mcnImageGroupBlockInner{
      padding-top:0 !important;
      padding-bottom:0 !important;
    }

} @media only screen and (max-width: 480px){
    .mcnImageGroupBlockOuter{
      padding-top:9px !important;
      padding-bottom:9px !important;
    }

} @media only screen and (max-width: 480px){
    .mcnTextContent,.mcnBoxedTextContentColumn{
      padding-right:18px !important;
      padding-left:18px !important;
    }

} @media only screen and (max-width: 480px){
    .mcnImageCardLeftImageContent,.mcnImageCardRightImageContent{
      padding-right:18px !important;
      padding-bottom:0 !important;
      padding-left:18px !important;
    }

} @media only screen and (max-width: 480px){
    .mcpreview-image-uploader{
      display:none !important;
      width:100% !important;
    }

} @media only screen and (max-width: 480px){
  /*
  @tab Mobile Styles
  @section Heading 1
  @tip Make the first-level headings larger in size for better readability on small screens.
  */
    h1{
      /*@editable*/font-size:22px !important;
      /*@editable*/line-height:125% !important;
    }

} @media only screen and (max-width: 480px){
  /*
  @tab Mobile Styles
  @section Heading 2
  @tip Make the second-level headings larger in size for better readability on small screens.
  */
    h2{
      /*@editable*/font-size:20px !important;
      /*@editable*/line-height:125% !important;
    }

} @media only screen and (max-width: 480px){
  /*
  @tab Mobile Styles
  @section Heading 3
  @tip Make the third-level headings larger in size for better readability on small screens.
  */
    h3{
      /*@editable*/font-size:18px !important;
      /*@editable*/line-height:125% !important;
    }

} @media only screen and (max-width: 480px){
  /*
  @tab Mobile Styles
  @section Heading 4
  @tip Make the fourth-level headings larger in size for better readability on small screens.
  */
    h4{
      /*@editable*/font-size:16px !important;
      /*@editable*/line-height:150% !important;
    }

} @media only screen and (max-width: 480px){
  /*
  @tab Mobile Styles
  @section Boxed Text
  @tip Make the boxed text larger in size for better readability on small screens. We recommend a font size of at least 16px.
  */
    .mcnBoxedTextContentContainer .mcnTextContent,.mcnBoxedTextContentContainer .mcnTextContent p{
      /*@editable*/font-size:14px !important;
      /*@editable*/line-height:150% !important;
    }

} @media only screen and (max-width: 480px){
  
    #templatePreheader{
      /*@editable*/display:block !important;
    }

} @media only screen and (max-width: 480px){
  /*
  @tab Mobile Styles
  @section Preheader Text
  @tip Make the preheader text larger in size for better readability on small screens.
  */
    #templatePreheader .mcnTextContent,#templatePreheader .mcnTextContent p{
      /*@editable*/font-size:14px !important;
      /*@editable*/line-height:150% !important;
    }

} @media only screen and (max-width: 480px){
  /*
  @tab Mobile Styles
  @section Header Text
  @tip Make the header text larger in size for better readability on small screens.
  */
    #templateHeader .mcnTextContent,#templateHeader .mcnTextContent p{
      /*@editable*/font-size:16px !important;
      /*@editable*/line-height:150% !important;
    }

} @media only screen and (max-width: 480px){
  /*
  @tab Mobile Styles
  @section Body Text
  @tip Make the body text larger in size for better readability on small screens. We recommend a font size of at least 16px.
  */
    #templateBody .mcnTextContent,#templateBody .mcnTextContent p{
      /*@editable*/font-size:16px !important;
      /*@editable*/line-height:150% !important;
    }

} @media only screen and (max-width: 480px){
  /*
  @tab Mobile Styles
  @section Footer Text
  @tip Make the footer content text larger in size for better readability on small screens.
  */
    #templateFooter .mcnTextContent,#templateFooter .mcnTextContent p{
      /*@editable*/font-size:14px !important;
      /*@editable*/line-height:150% !important;
    }

}</style></head>
    <body>
        
        <center>
            <table align="center" border="0" cellpadding="0" cellspacing="0" height="100%" width="100%" id="bodyTable">
                <tr>
                    <td align="center" valign="top" id="bodyCell">
                        <!-- BEGIN TEMPLATE // -->
                        <!--[if (gte mso 9)|(IE)]>
                        <table align="center" border="0" cellspacing="0" cellpadding="0" width="600" style="width:600px;">
                        <tr>
                        <td align="center" valign="top" width="600" style="width:600px;">
                        <![endif]-->
                        <table border="0" cellpadding="0" cellspacing="0" width="100%" class="templateContainer">
                            <tr>
                                <td valign="top" id="templatePreheader"></td>
                            </tr>
                            <tr>
                                <td valign="top" id="templateHeader"><table class="mcnImageBlock" style="min-width:100%;" width="100%" cellspacing="0" cellpadding="0" border="0">
    <tbody class="mcnImageBlockOuter">
            <tr>
                <td style="padding:9px" class="mcnImageBlockInner" valign="top">
                    <table class="mcnImageContentContainer" style="min-width:100%;" width="100%" cellspacing="0" cellpadding="0" border="0" align="left">
                        <tbody><tr>
                            <td class="mcnImageContent" style="padding-right: 9px; padding-left: 9px; padding-top: 0; padding-bottom: 0; text-align:center;" valign="top">
                                
                                    
                                        <img alt="" src="https://clmeplus.org/app/uploads/2021/03/logo-clme-1.png" style="max-width:300px; padding-bottom: 0; vertical-align: bottom;" class="mcnImage" width="300" align="middle">
                                    
                                
                            </td>
                        </tr>
                    </tbody></table>
                </td>
            </tr>
    </tbody>
</table><table class="mcnDividerBlock" style="min-width:100%;" width="100%" cellspacing="0" cellpadding="0" border="0">
    <tbody class="mcnDividerBlockOuter">
        <tr>
            <td class="mcnDividerBlockInner" style="min-width:100%; padding:18px;">
                <table class="mcnDividerContent" style="min-width: 100%;border-top: 2px none #EAEAEA;" width="100%" cellspacing="0" cellpadding="0" border="0">
                    <tbody><tr>
                        <td>
                            <span></span>
                        </td>
                    </tr>
                </tbody></table>
<!--            
                <td class="mcnDividerBlockInner" style="padding: 18px;">
                <hr class="mcnDividerContent" style="border-bottom-color:none; border-left-color:none; border-right-color:none; border-bottom-width:0; border-left-width:0; border-right-width:0; margin-top:0; margin-right:0; margin-bottom:0; margin-left:0;" />
-->
            </td>
        </tr>
    </tbody>
</table></td>
                            </tr>
                            <tr>
                                <td valign="top" id="templateBody"><table class="mcnTextBlock" style="min-width:100%;" width="100%" cellspacing="0" cellpadding="0" border="0">
    <tbody class="mcnTextBlockOuter">
        <tr>
            <td class="mcnTextBlockInner" style="padding-top:9px;" valign="top">
                <!--[if mso]>
        <table align="left" border="0" cellspacing="0" cellpadding="0" width="100%" style="width:100%;">
        <tr>
        <![endif]-->
          
        <!--[if mso]>
        <td valign="top" width="600" style="width:600px;">
        <![endif]-->
                <table style="max-width:100%; min-width:100%;" class="mcnTextContentContainer" width="100%" cellspacing="0" cellpadding="0" border="0" align="left">
                    <tbody><tr>
                        
                        <td class="mcnTextContent" style="padding: 0px 18px 9px; font-family: Verdana;" valign="top">
                        
                            <div style="padding: 20px 0; font-size: 16px; line-height: 32px; color: #666666;"> Dear '. $usuario_nombre .'<br>
Using online donor databases, the Secretariat to the CLME+ SAP Interim Coordination Mechanism - CLME+ Project Coordination Unit, created a project profile for one or more initiatives where you act as lead contact at the <a href="https://clmeplus.org/ppi-search/" target="_blank">CLME+ Hub Projects Database</a>. The creation of this profile resulted in the automatic generation of a user with your email address that allows you to access this platform.</div>


                        </td>
                    </tr>
                </tbody></table>
        <!--[if mso]>
        </td>
        <![endif]-->
                
        <!--[if mso]>
        </tr>
        </table>
        <![endif]-->
            </td>
        </tr>
    </tbody>
</table><table class="mcnDividerBlock" style="min-width:100%;" width="100%" cellspacing="0" cellpadding="0" border="0">
    <tbody class="mcnDividerBlockOuter">
        <tr>
            <td class="mcnDividerBlockInner" style="min-width: 100%; padding: 15px 18px;">
                <table class="mcnDividerContent" style="min-width: 100%;border-top: 2px none #EAEAEA;" width="100%" cellspacing="0" cellpadding="0" border="0">
                    <tbody><tr>
                        <td>
                            <span></span>
                        </td>
                    </tr>
                </tbody></table>
<!--            
                <td class="mcnDividerBlockInner" style="padding: 18px;">
                <hr class="mcnDividerContent" style="border-bottom-color:none; border-left-color:none; border-right-color:none; border-bottom-width:0; border-left-width:0; border-right-width:0; margin-top:0; margin-right:0; margin-bottom:0; margin-left:0;" />
-->
            </td>
        </tr>
    </tbody>
</table><table class="mcnTextBlock" style="min-width:100%;" width="100%" cellspacing="0" cellpadding="0" border="0">
    <tbody class="mcnTextBlockOuter">
        <tr>
            <td class="mcnTextBlockInner" style="padding-top:9px;" valign="top">
                <!--[if mso]>
        <table align="left" border="0" cellspacing="0" cellpadding="0" width="100%" style="width:100%;">
        <tr>
        <![endif]-->
          
        <!--[if mso]>
        <td valign="top" width="600" style="width:600px;">
        <![endif]-->
                 <table style="max-width:100%; min-width:100%;" class="mcnTextContentContainer" width="100%" cellspacing="0" cellpadding="0" border="0" align="left">
                    <tbody><tr>
                        
                        <td class="mcnTextContent" style="padding: 0px 18px 9px; font-family: Verdana;" valign="top">
                        
                            <div style="padding: 10px 0; font-size: 16px; line-height: 32px; color: #666666;"> Due to a recent update on the user administration system, we changed the status of your account to “verified account”, giving you full access to the following tools:</div>


                        </td>
                    </tr>
                </tbody></table>
        <!--[if mso]>
        </td>
        <![endif]-->
                
        <!--[if mso]>
        </tr>
        </table>
        <![endif]-->
            </td>
        </tr>
    </tbody>
</table><table class="mcnDividerBlock" style="min-width:100%;" width="100%" cellspacing="0" cellpadding="0" border="0">
    <tbody class="mcnDividerBlockOuter">
        <tr>
            <td class="mcnDividerBlockInner" style="min-width:100%; padding:18px;">
                <table class="mcnDividerContent" style="min-width: 100%;border-top: 2px none #EAEAEA;" width="100%" cellspacing="0" cellpadding="0" border="0">
                    <tbody><tr>
                        <td>
                            <span></span>
                        </td>
                    </tr>
                </tbody></table>
<!--            
                <td class="mcnDividerBlockInner" style="padding: 18px;">
                <hr class="mcnDividerContent" style="border-bottom-color:none; border-left-color:none; border-right-color:none; border-bottom-width:0; border-left-width:0; border-right-width:0; margin-top:0; margin-right:0; margin-bottom:0; margin-left:0;" />
-->
            </td>
        </tr>
    </tbody>
</table><table class="mcnCaptionBlock" width="100%" cellspacing="0" cellpadding="0" border="0">
    <tbody class="mcnCaptionBlockOuter">
        <tr>
            <td class="mcnCaptionBlockInner" style="padding:9px;" valign="top">
                



<table class="mcnCaptionRightContentOuter" width="100%" cellspacing="0" cellpadding="0" border="0">
    <tbody><tr>
        <td class="mcnCaptionRightContentInner" style="padding:0 9px ;" valign="top">
            <table class="mcnCaptionRightImageContentContainer" width="132" cellspacing="0" cellpadding="0" border="0" align="left">
                <tbody><tr>
                    <td class="mcnCaptionRightImageContent" valign="top" align="right">
                    
                        

                        <img alt="" src="https://mcusercontent.com/bccdb651bd8a8f943adddbe6c/images/1eb388d4-8bf3-44a9-86ff-d5238e0753b5.png" style="max-width:100px;" class="mcnImage" width="100">
                        

                    
                    </td>
                </tr>
            </tbody></table>
            <table class="mcnCaptionRightTextContentContainer" width="396" cellspacing="0" cellpadding="0" border="0" align="right">
                <tbody><tr>
                    <td class="mcnTextContent" valign="top">
                        <h5 style="margin-top: 0px; padding-top: 0px; line-height: 1.5em; color: #666666;">Create and Update/Edit project profiles for your initiatives contributing to the CLME+ SAP and other regional commitments.</h5>

                    </td>
                </tr>
            </tbody></table>
        </td>
    </tr>
</tbody></table>




            </td>
        </tr>
    </tbody>
</table><table class="mcnDividerBlock" style="min-width:100%;" width="100%" cellspacing="0" cellpadding="0" border="0">
    <tbody class="mcnDividerBlockOuter">
        <tr>
            <td class="mcnDividerBlockInner" style="min-width:100%; padding:18px;">
                <table class="mcnDividerContent" style="min-width: 100%;border-top: 2px solid #EAEAEA;" width="100%" cellspacing="0" cellpadding="0" border="0">
                    <tbody><tr>
                        <td>
                            <span></span>
                        </td>
                    </tr>
                </tbody></table>
<!--            
                <td class="mcnDividerBlockInner" style="padding: 18px;">
                <hr class="mcnDividerContent" style="border-bottom-color:none; border-left-color:none; border-right-color:none; border-bottom-width:0; border-left-width:0; border-right-width:0; margin-top:0; margin-right:0; margin-bottom:0; margin-left:0;" />
-->
            </td>
        </tr>
    </tbody>
</table><table class="mcnCaptionBlock" width="100%" cellspacing="0" cellpadding="0" border="0">
    <tbody class="mcnCaptionBlockOuter">
        <tr>
            <td class="mcnCaptionBlockInner" style="padding:9px;" valign="top">
                



<table class="mcnCaptionRightContentOuter" width="100%" cellspacing="0" cellpadding="0" border="0">
    <tbody><tr>
        <td class="mcnCaptionRightContentInner" style="padding:0 9px ;" valign="top">
            <table class="mcnCaptionRightImageContentContainer" width="132" cellspacing="0" cellpadding="0" border="0" align="left">
                <tbody><tr>
                    <td class="mcnCaptionRightImageContent" valign="top" align="right">
                    
                        

                        <img alt="" src="https://mcusercontent.com/bccdb651bd8a8f943adddbe6c/images/2e1ae345-6b6e-4b5a-a12a-63b839c71691.png" style="max-width:100px;" class="mcnImage" width="100">
                        

                    
                    </td>
                </tr>
            </tbody></table>
            <table class="mcnCaptionRightTextContentContainer" width="396" cellspacing="0" cellpadding="0" border="0" align="right">
                <tbody><tr>
                    <td class="mcnTextContent" valign="top">
                        <h5 style="color: #666666; margin-top: 0px; padding-top: 0px; line-height: 1.5em;">Upload and update/edit documents from your organizations or initiative and of the region’s interest.</h5>

                    </td>
                </tr>
            </tbody></table>
        </td>
    </tr>
</tbody></table>




            </td>
        </tr>
    </tbody>
</table><table class="mcnDividerBlock" style="min-width:100%;" width="100%" cellspacing="0" cellpadding="0" border="0">
    <tbody class="mcnDividerBlockOuter">
        <tr>
            <td class="mcnDividerBlockInner" style="min-width:100%; padding:18px;">
                <table class="mcnDividerContent" style="min-width: 100%;border-top: 2px solid #EAEAEA;" width="100%" cellspacing="0" cellpadding="0" border="0">
                    <tbody><tr>
                        <td>
                            <span></span>
                        </td>
                    </tr>
                </tbody></table>
<!--            
                <td class="mcnDividerBlockInner" style="padding: 18px;">
                <hr class="mcnDividerContent" style="border-bottom-color:none; border-left-color:none; border-right-color:none; border-bottom-width:0; border-left-width:0; border-right-width:0; margin-top:0; margin-right:0; margin-bottom:0; margin-left:0;" />
-->
            </td>
        </tr>
    </tbody>
</table><table class="mcnCaptionBlock" width="100%" cellspacing="0" cellpadding="0" border="0">
    <tbody class="mcnCaptionBlockOuter">
        <tr>
            <td class="mcnCaptionBlockInner" style="padding:9px;" valign="top">
                



<table class="mcnCaptionRightContentOuter" width="100%" cellspacing="0" cellpadding="0" border="0">
    <tbody><tr>
        <td class="mcnCaptionRightContentInner" style="padding:0 9px ;" valign="top">
            <table class="mcnCaptionRightImageContentContainer" width="132" cellspacing="0" cellpadding="0" border="0" align="left">
                <tbody><tr>
                    <td class="mcnCaptionRightImageContent" valign="top" align="right">
                    
                        

                        <img alt="" src="https://mcusercontent.com/bccdb651bd8a8f943adddbe6c/images/144e6138-89a3-4813-acd0-0575a566a97d.png" style="max-width:100px;" class="mcnImage" width="100">
                        

                    
                    </td>
                </tr>
            </tbody></table>
            <table class="mcnCaptionRightTextContentContainer" width="396" cellspacing="0" cellpadding="0" border="0" align="right">
                <tbody><tr>
                    <td class="mcnTextContent" valign="top">
                        <h5 style="margin-top: 0px; padding-top: 0px; line-height: 1.5em;">Create and update/edit your personal contact profile and/or of your organization’s team.</h5>

                    </td>
                </tr>
            </tbody></table>
        </td>
    </tr>
</tbody></table>




            </td>
        </tr>
    </tbody>
</table><table class="mcnTextBlock" style="min-width:100%;" width="100%" cellspacing="0" cellpadding="0" border="0">
    <tbody class="mcnTextBlockOuter">
        <tr>
            <td class="mcnTextBlockInner" style="padding-top:9px;" valign="top">
                <!--[if mso]>
        <table align="left" border="0" cellspacing="0" cellpadding="0" width="100%" style="width:100%;">
        <tr>
        <![endif]-->
          
        <!--[if mso]>
        <td valign="top" width="600" style="width:600px;">
        <![endif]-->
                
                <table style="max-width:100%; min-width:100%;" class="mcnTextContentContainer" width="100%" cellspacing="0" cellpadding="0" border="0" align="left">
                    <tbody><tr>
                        
                        <td class="mcnTextContent" style="padding: 0px 18px 9px; font-family: Verdana;" valign="top">
                        
                            <div style="text-align: center;color: #666; font-family: Verdana;">To regain access to your account, we would like to kindly ask you to reset your password:<br><br>Your username is: '.$usuario_mail.'<br><br></div>
                        </td>
                    </tr>
                </tbody></table>
        <!--[if mso]>
        </td>
        <![endif]-->
                
        <!--[if mso]>
        </tr>
        </table>
        <![endif]-->
            </td>
        </tr>
    </tbody>
</table><table class="mcnButtonBlock" style="min-width:100%;" width="100%" cellspacing="0" cellpadding="0" border="0">
          <tbody class="mcnButtonBlockOuter">
              <tr>
                  <td style="padding-top:0; padding-right:18px; padding-bottom:18px; padding-left:18px;" class="mcnButtonBlockInner" valign="top" align="center">
                      <table class="mcnButtonContentContainer" style="border-collapse: separate !important;border-radius: 4px;background-color: #56C9E8;" cellspacing="0" cellpadding="0" border="0">
                          <tbody>
                              <tr>
                                  <td class="mcnButtonContent" style="font-family: Arial; font-size: 14px; padding: 16px;" valign="middle" align="center">
                                      <a class="mcnButton " title="Login to our site" href="https://clmeplus.org/password-reset/" target="_blank" style="font-weight: bold;letter-spacing: normal;line-height: 100%;text-align: center;text-decoration: none;color: #FFFFFF;">Reset password</a>
                                  </td>
                              </tr>
                          </tbody>
                      </table>
                  </td>
              </tr>
          </tbody>
      </table><table class="mcnTextBlock" style="min-width:100%;" width="100%" cellspacing="0" cellpadding="0" border="0">
    <tbody class="mcnTextBlockOuter">
        <tr>
            <td class="mcnTextBlockInner" style="padding-top:9px;" valign="top">
                <!--[if mso]>
        <table align="left" border="0" cellspacing="0" cellpadding="0" width="100%" style="width:100%;">
        <tr>
        <![endif]-->
          
        <!--[if mso]>
        <td valign="top" width="600" style="width:600px;">
        <![endif]-->
                <table style="max-width:100%; min-width:100%;" class="mcnTextContentContainer" width="100%" cellspacing="0" cellpadding="0" border="0" align="left">
                    <tbody><tr>
                        
                        <td class="mcnTextContent" style="padding: 0px 18px 9px; font-family: Verdana;" valign="top">
                        
                            <div style="padding: 0px 0; font-size: 16px; line-height: 32px; color: #666666;"><br>After you reset your password, you will be able to log-in to the Hub, edit the project profile linked to your username and use all of our tools. If you have any issues with the log-in process or if you can not edit your project profile please contact us at <a href="mailto:info@clmeplus.org">info@clmeplus.org </a>and <a href="mailto:camiloma@unops.org">camiloma@unops.org</a><br><br></div>
                        </td>
                    </tr>
                    <tr>
                        
                        <td class="mcnTextContent" style="padding: 0px 18px 9px; font-family: Verdana;" valign="top">
                                                    
<div style="padding: 20px 0; font-size: 16px; line-height: 32px; color: #666666;">We encourage you to further explore the content of our databases and tools at the CLME+ HUB (<a>www.clmeplus.org</a>), as this may prove useful for identifying opportunities for synergies and collaboration with other planned and ongoing initiatives.<br><br></div>

                        </td>
                    </tr>
                    <tr>
                        
                        <td class="mcnTextContent" style="padding: 0px 18px 9px; font-family: Verdana;" valign="top">
                        <div style="padding: 20px 0; font-size: 16px; line-height: 32px; color: #666666;">Thank you for working collaboratively for a healthier marine environment, and towards enhancing the well-being of the peoples in our region!</div>

                        </td>
                    </tr>
                </tbody></table>
        <!--[if mso]>
        </td>
        <![endif]-->
                
        <!--[if mso]>
        </tr>
        </table>
        <![endif]-->
            </td>
        </tr>
    </tbody>
</table><table class="mcnTextBlock" style="min-width:100%;" width="100%" cellspacing="0" cellpadding="0" border="0">
    <tbody class="mcnTextBlockOuter">
        <tr>
            <td class="mcnTextBlockInner" style="padding-top:9px;" valign="top">
                <!--[if mso]>
        <table align="left" border="0" cellspacing="0" cellpadding="0" width="100%" style="width:100%;">
        <tr>
        <![endif]-->
          
        <!--[if mso]>
        <td valign="top" width="600" style="width:600px;">
        <![endif]-->                
                <table style="max-width:100%; min-width:100%;" class="mcnTextContentContainer" width="100%" cellspacing="0" cellpadding="0" border="0" align="left">
                    <tbody><tr>
                        
                        <td class="mcnTextContent" style="padding: 0px 18px 9px; font-family: Verdana;" valign="top">
                        
                            <div style="padding: 20px 0; font-size: 16px; line-height: 32px; color: #666666;">
                            Best regards,
                            </div>
                        </td>
                    </tr>
                </tbody></table>
        <!--[if mso]>
        </td>
        <![endif]-->
                
        <!--[if mso]>
        </tr>
        </table>
        <![endif]-->
            </td>
        </tr>
    </tbody>
</table><table class="mcnTextBlock" style="min-width:100%;" width="100%" cellspacing="0" cellpadding="0" border="0">
    <tbody class="mcnTextBlockOuter">
        <tr>
            <td class="mcnTextBlockInner" style="padding-top:9px;" valign="top">
                <!--[if mso]>
        <table align="left" border="0" cellspacing="0" cellpadding="0" width="100%" style="width:100%;">
        <tr>
        <![endif]-->
          
        <!--[if mso]>
        <td valign="top" width="600" style="width:600px;">
        <![endif]-->
                

                 <table style="max-width:100%; min-width:100%;" class="mcnTextContentContainer" width="100%" cellspacing="0" cellpadding="0" border="0" align="left">
                    <tbody><tr>
                        
                        <td class="mcnTextContent" style="padding: 0px 18px 9px; font-family: Verdana;" valign="top">
                        
                            <div style="padding: 20px 0; font-size: 14px; line-height: 32px; color: #666666;">  <b>Patrick Debels</b><br>
              UNDP/GEF CLME+ Project Coordination Unit<br>
              Secretariat to the CLME+ Interim Coordination Mechanism<br>
              <a href="mailto:info@clmeplus.org">info@clmeplus.org</a></div>
                        </td>
                    </tr>
                </tbody></table>
        <!--[if mso]>
        </td>
        <![endif]-->
                
        <!--[if mso]>
        </tr>
        </table>
        <![endif]-->
            </td>
        </tr>
    </tbody>
</table><table class="mcnImageBlock" style="min-width:100%;" width="100%" cellspacing="0" cellpadding="0" border="0">
    <tbody class="mcnImageBlockOuter">
            <tr>
                <td style="padding:9px" class="mcnImageBlockInner" valign="top">
                    <table class="mcnImageContentContainer" style="min-width:100%;" width="100%" cellspacing="0" cellpadding="0" border="0" align="left">
                        <tbody><tr>
                            <td class="mcnImageContent" style="padding-right: 9px; padding-left: 9px; padding-top: 0; padding-bottom: 0; text-align:center;" valign="top">
                                
                                    
                                        <img alt="" src="https://mcusercontent.com/bccdb651bd8a8f943adddbe6c/images/d89e6079-7469-4607-8d2a-ef9d58af832e.png" style="max-width:1000px; padding-bottom: 0; display: inline !important; vertical-align: bottom;" class="mcnImage" width="564" align="middle">
                                    
                                
                            </td>
                        </tr>
                    </tbody></table>
                </td>
            </tr>
    </tbody>
</table></td>
                            </tr>
                            <tr>
                                <td valign="top" id="templateFooter"></td>
                            </tr>
                        </table>
                        <!--[if (gte mso 9)|(IE)]>
                        </td>
                        </tr>
                        </table>
                        <![endif]-->
                        <!-- // END TEMPLATE -->
                    </td>
                </tr>
            </table>
        </center>
    </body>
</html>';



    

    $user = get_user_by('id', $user_id);
	  if (!in_array('um_usuario-cero', $user->roles)) {
	    //$user->add_role('subscriber');
	    wp_mail($to, $subject, $message, $headers);
	  }

}
add_action( 'set_user_role', 'user_role_update', 10, 2);




function login_redirect( $redirect_to, $request, $user ){
    return 'https://clmeplus.org/account/';
}
add_filter( 'login_redirect', 'login_redirect', 10, 3 );



// Disable gutenberg
add_filter('use_block_editor_for_post', '__return_false', 10);




/**/
function allowAuthorEditing()
{
  add_post_type_support( 'doculibrary', 'author' );
}

add_action('init','allowAuthorEditing');



function add_author_support_to_posts() {
   add_post_type_support( 'doculibrary', 'author' ); 
}
add_action( 'init', 'add_author_support_to_posts' );



add_action('wp_dropdown_users_args', 'filter_authors');
function filter_authors( $args ) {
	
		$args['role__in'] = ['administrator', 'um_usuario-icm', 'um_usuario-verificado'];
		
	
	return $args;
}


add_filter('wp_dropdown_users_args', 'display_administrators_and_subscribers_in_author_dropdown', 10, 2);
function display_administrators_and_subscribers_in_author_dropdown($query_args, $r)
{
    if (isset($r['name']) && $r['name'] === 'post_author_override') {
        if (isset($query_args['who'])) {
            unset($query_args['who']);
        }
        $query_args['role__in'] = array('administrator', 'um_usuario-icm', 'um_usuario-verificado');
    }
    return $query_args;
}




/* jquery to admin  */
function my_acf_input_admin_footer() {
	
?>
<script type="text/javascript">
(function($) {
	
	// JS here

	$('body').on('click', '.acf-input', function (){
        console.log('click!');
    });

    acf.add_action('ready', function( $el ){
	
		// $el will be equivalent to $('body')
		
		
		// find a specific field
		var $field = $('#my-wrapper-id');
		
		
		// do something to $field
		$('body').on('click', '.acf-input', function (){
	        console.log('click!');
	    });
		
	});
	
})(jQuery);	
</script>
<?php
		
}

add_action('acf/input/admin_footer', 'my_acf_input_admin_footer');






add_filter( 'wpv_filter_query', 'filter_view_meta_relation', 1000 , 3 );
function filter_view_meta_relation( $query_args, $view_settings ) {
    if ( !is_admin() && ( isset($view_settings['view_id']) && $view_settings['view_id'] ==92581) ) {
        $query_args['meta_query']['relation'] = 'OR';
    }
    return $query_args;
}



add_action('admin_head', 'my_custom_fonts');

function my_custom_fonts() {
  echo '<style>
    #role {
		    pointer-events: none;		    
		    opacity: 0.6;
		} 
  </style>';
}