<?php
// Call WP Load
$wp_include = "../wp-load.php";$i = 0;
while (!file_exists($wp_include) && $i++ < 10) {$wp_include = "../$wp_include";} require($wp_include);
if ( !is_user_logged_in() || !current_user_can('edit_posts') ) 
	wp_die(__("You are not allowed to be here","cloudfw"));
	
	
$id = $_GET["id"];
$operation = $_GET["op"];

if (empty($id)) exit('An Error Has Occurred');
$_opt = getCO(NULL, array(PFIX.'_setup_status'));

if ($id == '__dontshowanymore') {
	cloudfw_update_option( array(PFIX.'_cloudfw_actives' => array('map' => 'FALSE') ) );
	exit;
	
}else{
		
	$_setup_status = $_opt[PFIX."_setup_status"];
	if (empty($_setup_status))
		$_setup_status = array();
	
	if ($operation == 'done'){
		array_push($_setup_status, $id);
	} else {
		foreach($_setup_status as $key => $value) {if ($value == $id) unset($_setup_status[$key]);}
	}
		
	if (!empty($_setup_status))
		array_unique($_setup_status);
	
	update_option(PFIX."_setup_status",$_setup_status);
	$_opt[PFIX."_setup_status"] = $_setup_status;
	$in_ajax = 'TRUE';
	$percent_old =  $_GET["old_val"];
	
	
	require(TMP_ADMIN_PATH . '/inc/fn.guide.php');

}

?>