HEX
Server: Apache/2
System: Linux server-80-13-140-150.da.direct 5.14.0-362.24.1.el9_3.0.1.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Apr 4 22:31:43 UTC 2024 x86_64
User: cpt (1004)
PHP: 8.1.24
Disabled: exec,system,passthru,shell_exec,proc_close,proc_open,dl,popen,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname
Upload Files
File: /home/cpt/public_html/wp-content/plugins/events-manager/admin/em-ms-locations.php
<?php
/**
 * Looks at the request values, saves/updates and then displays the right menu in the admin
 * @return null
 */
function em_admin_ms_locations() {  
	//TODO EM_Location is globalized, use it fully here
	global $EM_Location;
	//Take actions
	if( !empty($_REQUEST['action']) && ($_REQUEST['action'] == "edit" || $_REQUEST['action'] == "location_save")) { 
		em_admin_location();
	} else { 
		// no action, just a locations list
		em_admin_locations();
  	}
}  

function em_admin_locations($message='', $fill_fields = false) {
	global $current_site;
	?>
		<div class='wrap'>
			<div id='icon-edit' class='icon32'>
				<br/>
			</div>
 	 		<h2>
 	 			<?php _e('Locations', 'events-manager'); ?>
 	 		</h2>   
			<?php em_locations_admin(array('url' => $_SERVER['REQUEST_URI'])); ?>
		</div>
  	<?php 
}

function em_admin_location($message = "") {
	global $EM_Location;
	if( empty($EM_Location) || !is_object($EM_Location) ){
		$title = __('Add location', 'events-manager');
		$EM_Location = new EM_Location();
	}else{
		$title = __('Edit location', 'events-manager');
	}
	?>
	<div class='wrap'>
		<div id='icon-edit' class='icon32'>
			<br/>
		</div>
		<h2><?php echo $title ?></h2>
		<?php em_location_form(); ?>
	</div>
	<?php	
}

?>