require_once('../include/orm.php'); require_once('../include/globals.php'); require_once('../include/util.php'); require_once("../include/easyflexa.php"); $_procesos_controlestado_db_connected = $Link == ''; if($_procesos_controlestado_db_connected) $Link = connectDb(); define('DBCONNECTED', 1); debugstartpage(); if( isset($_x) ) { $_x = StringTokenize($_x, ","); $_result = array(); $_initialvars = arrayExclude(get_defined_vars(), array("_*", "form_*", "s_*", "GLOBALS", "Link", "thisname")); } // isbasewindow: // On Open while( ($__action == "" or $__action == "executedonopen") and $_x == '' ) { $__action = "executedonopen"; $__tempresult = sqlexec($Link, "select dbtable from ddform where concat(module, '.', name) = '" . mysql_escape($form) . "';"); while( $__temprow = mysql_fetch_array($__tempresult)) { $dbtable = $__temprow[0]; } $__tempresult = sqlexec($Link, "select status from " . mysql_escape($dbtable) . " where id = " . mysql_escape($id) . ";"); while( $__temprow = mysql_fetch_array($__tempresult)) { $status = $__temprow[0]; } $__tempresult = sqlexec($Link, "select usuario from emresp where form = '" . mysql_escape($form) . "' and objeto = " . mysql_escape($id) . " and estado = '" . mysql_escape($status) . "';"); while( $__temprow = mysql_fetch_array($__tempresult)) { $responsable = $__temprow[0]; } if( $responsable != '' and $responsable != $s_idusuario ) { die("ERROR. Usted no es el responsable de este documento para $status"); } $__tempresult = sqlexec($Link, "select condicioncontrol, textocontrol from estados where form = '" . mysql_escape($form) . "' and descripcion = '" . mysql_escape($estado) . "';"); while( $__temprow = mysql_fetch_array($__tempresult)) { $condicioncontrol = $__temprow[0]; $textocontrol = $__temprow[1]; } if( trim($condicioncontrol) != '' ) { $object = loadObject($Link, $form, $id); $tres = checkconditioneasyflexa($condicioncontrol, $object); if( !$tres) { die("ERROR. ". $textocontrol ); } } die("OK"); // Si puso header location para ir a otra pagina cierra el script if( !isset($_x) and $__exiting ) { disconnectDb($Link); exit(0); } ; break; } ?> // isbasewidnow!: if( !isset($_x) ) { ?>
if( !isset($_popup) ) { ?> } ?> class="popup" } ?> >