<?php
//-------------------------	
	$StrCmd=V($_POST['TxtAc']);
	if($StrCmd=="RESET"){
		//echo "NO DISPONIBLE";
		//return;
		ejt("DELETE FROM ges_empresas WHERE id_emp>0");
		ejt("DELETE FROM ges_invoice");
		ejt("DELETE FROM ges_invoice_det");	
		ejt("DELETE FROM ges_invoice_det_t");
		//ejt("DELETE FROM ges_periodos");
		ejt("DELETE FROM ges_productos WHERE id_pro>0");
		ejt("DELETE FROM ges_productos_referencias");
		ejt("DELETE FROM ges_proveedores WHERE id_prv>0");
		ejt("DELETE FROM ges_puertos WHERE id_pto>0");
		ejt("DELETE FROM ges_unidades WHERE id_und>0");		
		//
		$LStrMsg="Los datos han sido borrados satisfactoriamente";
		$LStrFoc="document.getElementById('CmdG').focus();";						
		$StrGT="S";			
		JsDir("login.php");	return;
	}
	if($StrGT=="S"){
		if(strlen($LStrMsg)>0){
			if(strlen($LStrFoc)==0){
				$LStrMsg="onload=\"alert('$LStrMsg');\"";
			}else{
				$LStrMsg="onload=\"alert('$LStrMsg');$LStrFoc;\"";
			}
		}else{
			if(strlen($LStrFoc)>0){
				$LStrMsg="onload=\"$LStrFoc;\"";
			}
		}
	}
?>
