<?php
//Public Function to Generate Uss and Pass *************
function GeneraPW($Uss_Name, $Uss_Apellidos, $Uss_CI){
	$UssP = substr($Uss_Apellidos,0,1);
	$UssN = substr($Uss_Name,0,1);

	$apmaterno = explode(' ',$Uss_Apellidos);
	if(empty($apmaterno[1]))
		$Generado = $UssP.$UssN.$Uss_CI;
	else{
		$mat = substr($apmaterno[1],0,1);
		$Generado = $UssP.$mat.$UssN.$Uss_CI;
	}		
		

 return $Generado;
}
?>