require_once('../include/orm.php');
require_once('../include/globals.php');
require_once('../include/util.php');
$_monitor_enform_db_connected = $Link == '';
if($_monitor_enform_db_connected) $Link = connectDb();
?> if( !isset($_x) ) { ?>
} ?>
if( isset($_x) ) {
if( $errors != "" ) $_result["errors"] = $errors;
if( $messages != "" ) $_result["messages"] = $messages;
if( $_x == "" )
$_snapshot = arrayExclude(get_defined_vars(), array("_*", "s_*", "GLOBALS", "Link", "thisname"));
else
$_snapshot = getSomeElements(get_defined_vars(), array("button_monitor", "unnamed1"));
unset($_snapshot["GLOBALS"]);
$_changes = arrayChanges($_snapshot, $_initialvars);
if( !empty($_changes) ) $_result["changes"] = $_changes;
//logToFile("Initial vars: " . print_r($_initialvars, true) );
//logToFile("Snapshot: " . print_r($_snapshot, true) );
//logToFile("Variables changed: " . print_r($_changes, true) );
//logToFile("RESULT TO BROWSER: " . print_r($_result, true));
print(json_encode($_result));
}
?>
if($_monitor_enform_db_connected)
disconnectDb($Link);
?>