<?php
function pr($arr){
	echo '<pre>';
	print_r($arr);
}

function prx($arr){
	echo '<pre>';
	print_r($arr);
	die();
}

function get_safe_value($con,$str){
	if($str!=''){
		$str=trim($str);
		return mysqli_real_escape_string($con,$str);
	}
}
function isAdmin(){
	if($_SESSION['AGEN_ROLE']==1){
		header("location:index.php");
	?>
		<script>
		window.location.href='../backend/login.php';
		</script>
		<?php
	}
	if($_SESSION['AGEN_ROLE']==1){
		?>
		<script>
		window.location.href='logout.php';
		</script>
		<?php
	}
}
?>