require_once('../include/orm.php'); require_once('../include/globals.php'); require_once('../include/util.php'); $_onboarding_index_db_connected = $Link == ''; if($_onboarding_index_db_connected) $Link = connectDb(); define('DBCONNECTED', 1); debugstartpage(); if( isset($_x) ) { //if( $_x != '' ) { $_x = $_x == '' ? array() : StringTokenize($_x, ","); $_result = array(); $_result['version'] = array('actual' => 303); $_result['visibility'] = array(); $_initialvars = arrayExclude(get_defined_vars(), array("_*", "form_*", "s_*", "GLOBALS", "Link", "thisname")); } // isbasewindow: // PHP Vars while( ($__action == "" or $__action == "executedonopen") and isset($_GET['_x']) and empty($_x) ) { $__row0 = array(); $__row0['__registerfiduciante__1'] = $_id ; $__row0['__registerfiduciante__2'] = $id == '0' ? 'Nuevo ' : '' ; $__row0['__tituloselecttipo__1'] = $tituloselecttipo ; $__row0['__numdoccliente__1'] = $numdoccliente ; $__row0['__emailcliente__1'] = $emailcliente ; $_result['morevars'] = $__row0; break; } if( has($_x, 'pdf') or has($_x, 'pdfprint') or has($_x, 'pdfprint2') ) { require_once('../include/fpdfreport.php'); $_pdf = new PDF((isset($_orientation) ? $_orientation : 'P'),'pt', (isset($_size) ? $_size : 'A4' )); $_pdf->initialPage = ($_page != '' ? $_page : 1); //$_pdf->SetAutoPageBreak(true); $_pdf->title = "Registro del Fiduciante"; $_pdf->SetTopMargin(50); $_pdf->AliasNbPages(); $_pdf->AddPage(); } if( has($_x, 'pdf') or has($_x, 'pdfprint') or has($_x, 'pdfprint2') ) { $_pdf->title = "Bienvenido al registro de Fiduciante"; //$_pdf->drawText("Bienvenido al registro de Fiduciante",'Arial','',14); } // aca iba session get, uofr y load/saveobject while( has($_x, 'registerfiduciante_init') ) { $_result['registerfiduciante'] = $registerfiduciante->toarray(false); break; } while( has($_x, 'registerfiduciante') ) { //if( $errors == "" ) // validateregisterfiduciante(); if( $errors == "" ) { if( $_redirect != "" ) redirect($_redirect); sessionset('form_index_registerfiduciante' . $_id, $registerfiduciante); if( $_result['redirect'] == '' ) redirect("?id=$id"); } break; } while( has($_x, 'registerfiduciante__delete') ) { //if( $errors == "" ) // validateregisterfiduciante(); if( $errors == "" ) { if( $_redirect != "" ) redirect($_redirect); sessionset('form_index_registerfiduciante' . $_id, null); if( $_result['redirect'] == '' ) { $_result['redirect'] = "?message=Bienvenido al registro de Fiduciante eliminado"; } } break; } while( has($_x, 'registerfiduciante_unload') ) { // Not used break; } if( has($_x, 'tipocliente') ) { $_result['tipocliente'] = sqltoarray($Link, "empresa,persona Empresa,Persona ", array("id", "text")); } if( has($_x, 'tipodoccliente_select') ) { /** * DNI,CI,LC,PAS,CUIT DNI,CI,LC,PAS,CUIT */ $_result['tipodoccliente_select'] = [["DNI","DNI"],["CI","CI"],["LC","LC"],["PAS","PAS"],["CUIT","CUIT"]]; } while( has($_x,'botoncontinuar') ) { /** CODIGO ORIGINAL ONCLICK $onclick **/ $idcliente = ''; $__tempresult = sqlexec($Link, "select id from cmcont where tipodoc = '" . mysql_escape($tipodoccliente) . "' and numdoc = '" . mysql_escape($numdoccliente) . "' and mail = '" . mysql_escape($emailcliente) . "'"); while( $__temprow = mysql_fetch_array($__tempresult)) { $idcliente = $__temprow[0]; } if( $idcliente != '' ) { sessionset("s_idcliente", $idcliente); error("datoscliente.php?id=$idcliente"); redirect("datoscliente.php?id=$idcliente"); } else { error("Los datos ingresados son inválidos"); } // Si puso header location para ir a otra pagina cierra el script if( !isset($_x) and $__exiting ) { disconnectDb($Link); exit(0); } if( $errors == "" ) redirect("datoscliente.php", ""); break; } //$registerfiduciante -> ['changes'] if( isormObject($registerfiduciante) ) $registerfiduciante->makeglobals(); if( has($_x, 'pdf') or has($_x, 'pdfprint') or has($_x, 'pdfprint2') ) { $_pdf->Output(); } ?> if( !isset($_x) ) { ?> if( isset($_export) ) { ?> header("Content-type: application/vnd.ms-excel"); header("Content-Disposition: attachment; filename=index.xls"); //echo(''); //echo(''); echo(''); ?> } else { ?>