<?php
	require_once("funciones_generales.php");
	$cc=(isset($_REQUEST['cx']) && trim($_REQUEST['cx'])!='') ? $_REQUEST['cx'] : $_SESSION['per_identidad'];
	$tip=(isset($_REQUEST['cx']) && trim($_REQUEST['cx'])!='') ? 'f':'u';
	$est=split("-",upload($cc,$tip));
	$ac=(isset($_REQUEST['ac']) && trim($_REQUEST['ac'])!='') ? $_REQUEST['ac'] : 0;
	if($est[0]=='success'){
		require_once("MySQL.php");
		$arc=$cc . "." . $est[1] ;

		$sql1="UPDATE `usuarios` SET   `dir_img` = '".$arc."' WHERE `num_identificacion` = '$cc';";
		$personal->instruccion($sql1);
		if($ac!=0){
			$sql1="UPDATE `personas` SET `dir_img` = '$arc' WHERE  CONVERT(`cedula`,SIGNED ) = '$cc';";
			$personal->instruccion($sql1);
		}
		
	}
	
?>