<?php
class get_post {
	private $_post;
	private $_get;
	
	public function __construct() {
		$this->_post = $_POST;
		$this->_get = $_GET;
		//$_GET = array();
		//$_POST = array();
	}
	
	public function is_key($key, $type = "get") {
		if($type == "get") {
			if(isset($this->_get[$key])) return 1;
			else return 0;
		}
		elseif($type == "post") {
			if(isset($this->_post[$key])) return 1;
			else return 0;
		}
		else return -1;
	}
	
	public function get_key($key, $type = "get" ) {
		if($type == "get") {
			return $this->_get[$key];
		}
		elseif($type == "post") {
			return $this->_post[$key];
		}
		else return -1;
	}
	
	public function get_all_keys($type = "get") {
		if($type == "get") {
			return $this->_get;
		}
		elseif($type == "post") {
			return $this->_post;
		}
		else return -1;
	}
}
?>