<?php
global $czpf_plugin;

function send_error_die($msg){
	die(json_encode(array('R'=>'ERR','MSG'=>$msg)));
}

if(!isset($_REQUEST['czbutton']) ){
	send_error_die('Error in data');
}


add_action( 'init', 'create_post_typess' );	

function create_post_typess(){
	require_once(RHCCZPF_PATH.'inc/class.object_controler.php');
	$czpf_class_object_controler = new czpf_class_object_controler(RHCCZPF_URL);
	$czpf_class_object_controler->check_up_user_id = $_REQUEST['tmp_site_user'];
	
	
	
	
	$tmp_data_1 = '';
	$tmp_data_2 = '';
	
	if($_REQUEST['paged'] == 1){
		$czpf_class_object_controler->extra_generate_list($_REQUEST['czbutton'],'list');
		$tmp_data_1 = $czpf_class_object_controler->tmp_return_data;
	}
	
	die(json_encode(array('R'=>'OK','data1'=>$tmp_data_1,'data2'=>$tmp_data_2,'paged'=>$_REQUEST['paged'],'czbutton'=>$_REQUEST['czbutton'])));
}
?>