<?php
require_once(getabspath("classes/cipherer.php"));
$tdatasenuc_descomplica = array();
	$tdatasenuc_descomplica[".NumberOfChars"] = 80; 
	$tdatasenuc_descomplica[".ShortName"] = "senuc_descomplica";
	$tdatasenuc_descomplica[".OwnerID"] = "";
	$tdatasenuc_descomplica[".OriginalTable"] = "senuc_descomplica";

//	field labels
$fieldLabelssenuc_descomplica = array();
if(mlang_getcurrentlang()=="Portuguese(Brazil)")
{
	$fieldLabelssenuc_descomplica["Portuguese(Brazil)"] = array();
	$fieldToolTipssenuc_descomplica["Portuguese(Brazil)"] = array();
	$fieldLabelssenuc_descomplica["Portuguese(Brazil)"]["id"] = "Id";
	$fieldToolTipssenuc_descomplica["Portuguese(Brazil)"]["id"] = "";
	$fieldLabelssenuc_descomplica["Portuguese(Brazil)"]["cpf"] = "Cpf";
	$fieldToolTipssenuc_descomplica["Portuguese(Brazil)"]["cpf"] = "";
	$fieldLabelssenuc_descomplica["Portuguese(Brazil)"]["id_aluno"] = "Aluno";
	$fieldToolTipssenuc_descomplica["Portuguese(Brazil)"]["id_aluno"] = "";
	$fieldLabelssenuc_descomplica["Portuguese(Brazil)"]["login"] = "Login";
	$fieldToolTipssenuc_descomplica["Portuguese(Brazil)"]["login"] = "";
	$fieldLabelssenuc_descomplica["Portuguese(Brazil)"]["id_nucleo"] = "Nucleo";
	$fieldToolTipssenuc_descomplica["Portuguese(Brazil)"]["id_nucleo"] = "";
	$fieldLabelssenuc_descomplica["Portuguese(Brazil)"]["id_regional"] = "Regional";
	$fieldToolTipssenuc_descomplica["Portuguese(Brazil)"]["id_regional"] = "";
	$fieldLabelssenuc_descomplica["Portuguese(Brazil)"]["data"] = "Data";
	$fieldToolTipssenuc_descomplica["Portuguese(Brazil)"]["data"] = "";
	$fieldLabelssenuc_descomplica["Portuguese(Brazil)"]["ultimo_login"] = "Ultimo Login";
	$fieldToolTipssenuc_descomplica["Portuguese(Brazil)"]["ultimo_login"] = "";
	if (count($fieldToolTipssenuc_descomplica["Portuguese(Brazil)"]))
		$tdatasenuc_descomplica[".isUseToolTips"] = true;
}
	
	
	$tdatasenuc_descomplica[".NCSearch"] = true;



$tdatasenuc_descomplica[".shortTableName"] = "senuc_descomplica";
$tdatasenuc_descomplica[".nSecOptions"] = 0;
$tdatasenuc_descomplica[".recsPerRowList"] = 1;
$tdatasenuc_descomplica[".mainTableOwnerID"] = "";
$tdatasenuc_descomplica[".moveNext"] = 1;
$tdatasenuc_descomplica[".nType"] = 0;

$tdatasenuc_descomplica[".strOriginalTableName"] = "senuc_descomplica";




$tdatasenuc_descomplica[".showAddInPopup"] = true;

$tdatasenuc_descomplica[".showEditInPopup"] = true;

$tdatasenuc_descomplica[".showViewInPopup"] = true;

$tdatasenuc_descomplica[".fieldsForRegister"] = array();

$tdatasenuc_descomplica[".listAjax"] = false;

	$tdatasenuc_descomplica[".audit"] = false;

	$tdatasenuc_descomplica[".locking"] = false;

$tdatasenuc_descomplica[".listIcons"] = true;
$tdatasenuc_descomplica[".edit"] = true;
$tdatasenuc_descomplica[".view"] = true;

$tdatasenuc_descomplica[".exportTo"] = true;

$tdatasenuc_descomplica[".printFriendly"] = true;

$tdatasenuc_descomplica[".delete"] = true;

$tdatasenuc_descomplica[".showSimpleSearchOptions"] = false;

$tdatasenuc_descomplica[".showSearchPanel"] = true;

if (isMobile())
	$tdatasenuc_descomplica[".isUseAjaxSuggest"] = false;
else 
	$tdatasenuc_descomplica[".isUseAjaxSuggest"] = true;

$tdatasenuc_descomplica[".rowHighlite"] = true;

// button handlers file names

$tdatasenuc_descomplica[".addPageEvents"] = false;

// use timepicker for search panel
$tdatasenuc_descomplica[".isUseTimeForSearch"] = false;




$tdatasenuc_descomplica[".allSearchFields"] = array();

$tdatasenuc_descomplica[".allSearchFields"][] = "cpf";
$tdatasenuc_descomplica[".allSearchFields"][] = "id_aluno";
$tdatasenuc_descomplica[".allSearchFields"][] = "login";
$tdatasenuc_descomplica[".allSearchFields"][] = "id_nucleo";
$tdatasenuc_descomplica[".allSearchFields"][] = "id_regional";
$tdatasenuc_descomplica[".allSearchFields"][] = "data";
$tdatasenuc_descomplica[".allSearchFields"][] = "ultimo_login";

$tdatasenuc_descomplica[".googleLikeFields"][] = "id";
$tdatasenuc_descomplica[".googleLikeFields"][] = "cpf";
$tdatasenuc_descomplica[".googleLikeFields"][] = "id_aluno";
$tdatasenuc_descomplica[".googleLikeFields"][] = "login";
$tdatasenuc_descomplica[".googleLikeFields"][] = "id_nucleo";
$tdatasenuc_descomplica[".googleLikeFields"][] = "id_regional";
$tdatasenuc_descomplica[".googleLikeFields"][] = "data";
$tdatasenuc_descomplica[".googleLikeFields"][] = "ultimo_login";


$tdatasenuc_descomplica[".advSearchFields"][] = "cpf";
$tdatasenuc_descomplica[".advSearchFields"][] = "id_aluno";
$tdatasenuc_descomplica[".advSearchFields"][] = "login";
$tdatasenuc_descomplica[".advSearchFields"][] = "id_nucleo";
$tdatasenuc_descomplica[".advSearchFields"][] = "id_regional";
$tdatasenuc_descomplica[".advSearchFields"][] = "data";
$tdatasenuc_descomplica[".advSearchFields"][] = "ultimo_login";

$tdatasenuc_descomplica[".isTableType"] = "list";

	



// Access doesn't support subqueries from the same table as main



$tdatasenuc_descomplica[".pageSize"] = 20;

$tstrOrderBy = "";
if(strlen($tstrOrderBy) && strtolower(substr($tstrOrderBy,0,8))!="order by")
	$tstrOrderBy = "order by ".$tstrOrderBy;
$tdatasenuc_descomplica[".strOrderBy"] = $tstrOrderBy;

$tdatasenuc_descomplica[".orderindexes"] = array();

$tdatasenuc_descomplica[".sqlHead"] = "SELECT id,  cpf,  id_aluno,  login,  id_nucleo,  id_regional,  `data`,  IFNULL((select data_hora from senuc_aluno_acessos_descomplica as a where a.id_aluno=b.id_aluno order by data_hora desc limit 1), NULL) AS ultimo_login";
$tdatasenuc_descomplica[".sqlFrom"] = "FROM senuc_descomplica AS b";
$tdatasenuc_descomplica[".sqlWhereExpr"] = "";
$tdatasenuc_descomplica[".sqlTail"] = "";




//fill array of records per page for list and report without group fields
$arrRPP = array();
$arrRPP[] = 10;
$arrRPP[] = 20;
$arrRPP[] = 30;
$arrRPP[] = 50;
$arrRPP[] = 100;
$arrRPP[] = 500;
$arrRPP[] = -1;
$tdatasenuc_descomplica[".arrRecsPerPage"] = $arrRPP;

//fill array of groups per page for report with group fields
$arrGPP = array();
$arrGPP[] = 1;
$arrGPP[] = 3;
$arrGPP[] = 5;
$arrGPP[] = 10;
$arrGPP[] = 50;
$arrGPP[] = 100;
$arrGPP[] = -1;
$tdatasenuc_descomplica[".arrGroupsPerPage"] = $arrGPP;

$tableKeyssenuc_descomplica = array();
$tableKeyssenuc_descomplica[] = "id";
$tdatasenuc_descomplica[".Keys"] = $tableKeyssenuc_descomplica;

$tdatasenuc_descomplica[".listFields"] = array();
$tdatasenuc_descomplica[".listFields"][] = "cpf";
$tdatasenuc_descomplica[".listFields"][] = "id_aluno";
$tdatasenuc_descomplica[".listFields"][] = "login";
$tdatasenuc_descomplica[".listFields"][] = "id_nucleo";
$tdatasenuc_descomplica[".listFields"][] = "id_regional";
$tdatasenuc_descomplica[".listFields"][] = "data";
$tdatasenuc_descomplica[".listFields"][] = "ultimo_login";

$tdatasenuc_descomplica[".viewFields"] = array();
$tdatasenuc_descomplica[".viewFields"][] = "cpf";
$tdatasenuc_descomplica[".viewFields"][] = "id_aluno";
$tdatasenuc_descomplica[".viewFields"][] = "login";
$tdatasenuc_descomplica[".viewFields"][] = "id_nucleo";
$tdatasenuc_descomplica[".viewFields"][] = "id_regional";
$tdatasenuc_descomplica[".viewFields"][] = "data";
$tdatasenuc_descomplica[".viewFields"][] = "ultimo_login";

$tdatasenuc_descomplica[".addFields"] = array();
$tdatasenuc_descomplica[".addFields"][] = "cpf";
$tdatasenuc_descomplica[".addFields"][] = "id_aluno";
$tdatasenuc_descomplica[".addFields"][] = "login";

$tdatasenuc_descomplica[".inlineAddFields"] = array();
$tdatasenuc_descomplica[".inlineAddFields"][] = "cpf";
$tdatasenuc_descomplica[".inlineAddFields"][] = "id_aluno";
$tdatasenuc_descomplica[".inlineAddFields"][] = "login";
$tdatasenuc_descomplica[".inlineAddFields"][] = "id_nucleo";
$tdatasenuc_descomplica[".inlineAddFields"][] = "id_regional";
$tdatasenuc_descomplica[".inlineAddFields"][] = "data";
$tdatasenuc_descomplica[".inlineAddFields"][] = "ultimo_login";

$tdatasenuc_descomplica[".editFields"] = array();
$tdatasenuc_descomplica[".editFields"][] = "cpf";
$tdatasenuc_descomplica[".editFields"][] = "id_aluno";
$tdatasenuc_descomplica[".editFields"][] = "login";

$tdatasenuc_descomplica[".inlineEditFields"] = array();
$tdatasenuc_descomplica[".inlineEditFields"][] = "cpf";
$tdatasenuc_descomplica[".inlineEditFields"][] = "id_aluno";
$tdatasenuc_descomplica[".inlineEditFields"][] = "login";
$tdatasenuc_descomplica[".inlineEditFields"][] = "id_nucleo";
$tdatasenuc_descomplica[".inlineEditFields"][] = "id_regional";
$tdatasenuc_descomplica[".inlineEditFields"][] = "data";
$tdatasenuc_descomplica[".inlineEditFields"][] = "ultimo_login";

$tdatasenuc_descomplica[".exportFields"] = array();
$tdatasenuc_descomplica[".exportFields"][] = "cpf";
$tdatasenuc_descomplica[".exportFields"][] = "id_aluno";
$tdatasenuc_descomplica[".exportFields"][] = "login";
$tdatasenuc_descomplica[".exportFields"][] = "id_nucleo";
$tdatasenuc_descomplica[".exportFields"][] = "id_regional";
$tdatasenuc_descomplica[".exportFields"][] = "data";
$tdatasenuc_descomplica[".exportFields"][] = "ultimo_login";

$tdatasenuc_descomplica[".printFields"] = array();
$tdatasenuc_descomplica[".printFields"][] = "cpf";
$tdatasenuc_descomplica[".printFields"][] = "id_aluno";
$tdatasenuc_descomplica[".printFields"][] = "login";
$tdatasenuc_descomplica[".printFields"][] = "id_nucleo";
$tdatasenuc_descomplica[".printFields"][] = "id_regional";
$tdatasenuc_descomplica[".printFields"][] = "data";
$tdatasenuc_descomplica[".printFields"][] = "ultimo_login";

//	id
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 1;
	$fdata["strName"] = "id";
	$fdata["GoodName"] = "id";
	$fdata["ownerTable"] = "senuc_descomplica";
	$fdata["Label"] = "Id"; 
	$fdata["FieldType"] = 3;
	
		
		
		
		
		
		
		
		
		
		
		
		$fdata["strField"] = "id"; 
		$fdata["FullName"] = "id";
	
		
		
				
				$fdata["UploadFolder"] = "files";
		
//  Begin View Formats
	$fdata["ViewFormats"] = array();
	
	$vdata = array("ViewFormat" => "");
	
		
		
		
			
		
		
		
		
		
		
		$vdata["NeedEncode"] = true;
	
	$fdata["ViewFormats"]["view"] = $vdata;
//  End View Formats

//	Begin Edit Formats 	
	$fdata["EditFormats"] = array();
	
	$edata = array("EditFormat" => "Text field");
	
		
		
	
//	Begin Lookup settings
	//	End Lookup Settings

		$edata["IsRequired"] = true; 
	
		
		
		
			$edata["acceptFileTypes"] = ".+$";
	
		$edata["maxNumberOfFiles"] = 1;
	
		
		
		
		
		$edata["EditParams"] = "";
			
		
//	Begin validation
	$edata["validateAs"] = array();
				$edata["validateAs"]["basicValidate"][] = getJsValidatorName("Number");	
						$edata["validateAs"]["basicValidate"][] = "IsRequired";
	
	//	End validation
	
		
				
		$fdata["EditFormats"]["edit"] = $edata;
//	End Edit Formats
	
		$fdata["isSeparate"] = false;
	
		
		
	$tdatasenuc_descomplica["id"] = $fdata;
//	cpf
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 2;
	$fdata["strName"] = "cpf";
	$fdata["GoodName"] = "cpf";
	$fdata["ownerTable"] = "senuc_descomplica";
	$fdata["Label"] = "Cpf"; 
	$fdata["FieldType"] = 200;
	
		
		
		$fdata["bListPage"] = true; 
	
		$fdata["bAddPage"] = true; 
	
		$fdata["bInlineAdd"] = true; 
	
		$fdata["bEditPage"] = true; 
	
		$fdata["bInlineEdit"] = true; 
	
		$fdata["bViewPage"] = true; 
	
		$fdata["bAdvancedSearch"] = true; 
	
		$fdata["bPrinterPage"] = true; 
	
		$fdata["bExportPage"] = true; 
	
		$fdata["strField"] = "cpf"; 
		$fdata["FullName"] = "cpf";
	
		
		
				$fdata["FieldPermissions"] = true;
	
				$fdata["UploadFolder"] = "files";
		
//  Begin View Formats
	$fdata["ViewFormats"] = array();
	
	$vdata = array("ViewFormat" => "");
	
		
		
		
			
		
		
		
		
		
		
		$vdata["NeedEncode"] = true;
	
	$fdata["ViewFormats"]["view"] = $vdata;
//  End View Formats

//	Begin Edit Formats 	
	$fdata["EditFormats"] = array();
	
	$edata = array("EditFormat" => "Lookup wizard");
	
		
		
	
//	Begin Lookup settings
								$edata["LookupType"] = 2;
	$edata["freeInput"] = 0;
	$edata["autoCompleteFieldsOnEdit"] = 0;
	$edata["autoCompleteFields"] = array();
	$edata["autoCompleteFields"][] = array('masterF'=>"id_aluno", 'lookupF'=>"nome");
				$edata["LCType"] = 1;
			
		
			
	$edata["LinkField"] = "id";
	$edata["LinkFieldType"] = 3;
	$edata["DisplayField"] = "cpf";
	
		
	$edata["LookupTable"] = "senuc_aluno";
	$edata["LookupOrderBy"] = "";
	
		
		
		
		$edata["FastType"] = true; 
	
		
				
			//	dependent dropdowns	
	$edata["DependentLookups"] = array();
	$edata["DependentLookups"][] = "id_aluno";
	
	
	//	End Lookup Settings

		$edata["IsRequired"] = true; 
	
		
		
		
			$edata["acceptFileTypes"] = ".+$";
	
		$edata["maxNumberOfFiles"] = 1;
	
		
		
		
		
		
		
//	Begin validation
	$edata["validateAs"] = array();
						$edata["validateAs"]["basicValidate"][] = "IsRequired";
	
	//	End validation
	
		
				
		$fdata["EditFormats"]["edit"] = $edata;
//	End Edit Formats
	
		$fdata["isSeparate"] = false;
	
		
		
	$tdatasenuc_descomplica["cpf"] = $fdata;
//	id_aluno
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 3;
	$fdata["strName"] = "id_aluno";
	$fdata["GoodName"] = "id_aluno";
	$fdata["ownerTable"] = "senuc_descomplica";
	$fdata["Label"] = "Aluno"; 
	$fdata["FieldType"] = 3;
	
		
		
		$fdata["bListPage"] = true; 
	
		$fdata["bAddPage"] = true; 
	
		$fdata["bInlineAdd"] = true; 
	
		$fdata["bEditPage"] = true; 
	
		$fdata["bInlineEdit"] = true; 
	
		$fdata["bViewPage"] = true; 
	
		$fdata["bAdvancedSearch"] = true; 
	
		$fdata["bPrinterPage"] = true; 
	
		$fdata["bExportPage"] = true; 
	
		$fdata["strField"] = "id_aluno"; 
		$fdata["FullName"] = "id_aluno";
	
		
		
				$fdata["FieldPermissions"] = true;
	
				$fdata["UploadFolder"] = "files";
		
//  Begin View Formats
	$fdata["ViewFormats"] = array();
	
	$vdata = array("ViewFormat" => "");
	
		
		
		
			
		
		
		
		
		
		
		$vdata["NeedEncode"] = true;
	
	$fdata["ViewFormats"]["view"] = $vdata;
	$vdata = array("ViewFormat" => "");
	
		
		
		
			
		
		
		
		
		
		
		$vdata["NeedEncode"] = true;
	
	$fdata["ViewFormats"]["list"] = $vdata;
	$vdata = array("ViewFormat" => "");
	
		
		
		
			
		
		
		
		
		
		
		$vdata["NeedEncode"] = true;
	
	$fdata["ViewFormats"]["print"] = $vdata;
	$vdata = array("ViewFormat" => "");
	
		
		
		
			
		
		
		
		
		
		
		$vdata["NeedEncode"] = true;
	
	$fdata["ViewFormats"]["export"] = $vdata;
//  End View Formats

//	Begin Edit Formats 	
	$fdata["EditFormats"] = array();
	
	$edata = array("EditFormat" => "Lookup wizard");
	
		
		
	
//	Begin Lookup settings
								$edata["LookupType"] = 2;
	$edata["freeInput"] = 0;
	$edata["autoCompleteFieldsOnEdit"] = 0;
	$edata["autoCompleteFields"] = array();
				
		
			
	$edata["LinkField"] = "id";
	$edata["LinkFieldType"] = 3;
	$edata["DisplayField"] = "nome";
	
		
	$edata["LookupTable"] = "senuc_aluno";
	$edata["LookupOrderBy"] = "";
	
		
		
		$edata["UseCategory"] = true; 
	$edata["CategoryControl"] = "cpf"; 
	$edata["CategoryFilter"] = "nome"; 
	
		
		
				
	
	
	//	End Lookup Settings

		$edata["IsRequired"] = true; 
	
		
		
		
			$edata["acceptFileTypes"] = ".+$";
	
		$edata["maxNumberOfFiles"] = 1;
	
		
		
		
		
		
		
//	Begin validation
	$edata["validateAs"] = array();
						$edata["validateAs"]["basicValidate"][] = "IsRequired";
	
	//	End validation
	
		
				
		$fdata["EditFormats"]["edit"] = $edata;
	$edata = array("EditFormat" => "Lookup wizard");
	
		
		
	
//	Begin Lookup settings
								$edata["LookupType"] = 2;
	$edata["freeInput"] = 0;
	$edata["autoCompleteFieldsOnEdit"] = 0;
	$edata["autoCompleteFields"] = array();
				$edata["LCType"] = 1;
			
		
			
	$edata["LinkField"] = "id";
	$edata["LinkFieldType"] = 3;
	$edata["DisplayField"] = "nome";
	
		
	$edata["LookupTable"] = "senuc_aluno";
	$edata["LookupOrderBy"] = "";
	
		
		
		
		$edata["FastType"] = true; 
	
		
				
	
	
	//	End Lookup Settings

		$edata["IsRequired"] = true; 
	
		
		
		
			$edata["acceptFileTypes"] = ".+$";
	
		$edata["maxNumberOfFiles"] = 1;
	
		
		
		
		
		
		$edata["inputStyle"] = " width:260px;";
	$edata["controlWidth"] = 260;
	
//	Begin validation
	$edata["validateAs"] = array();
						$edata["validateAs"]["basicValidate"][] = "IsRequired";
	
	//	End validation
	
		
				
		$fdata["EditFormats"]["add"] = $edata;
	$edata = array("EditFormat" => "Lookup wizard");
	
		
		
	
//	Begin Lookup settings
								$edata["LookupType"] = 2;
	$edata["freeInput"] = 0;
	$edata["autoCompleteFieldsOnEdit"] = 0;
	$edata["autoCompleteFields"] = array();
				$edata["LCType"] = 1;
			
		
			
	$edata["LinkField"] = "id";
	$edata["LinkFieldType"] = 3;
	$edata["DisplayField"] = "nome";
	
		
	$edata["LookupTable"] = "senuc_aluno";
	$edata["LookupOrderBy"] = "";
	
		
		
		
		$edata["FastType"] = true; 
	
		
				
	
	
	//	End Lookup Settings

		$edata["IsRequired"] = true; 
	
		
		
		
			$edata["acceptFileTypes"] = ".+$";
	
		$edata["maxNumberOfFiles"] = 1;
	
		
		
		
		
		
		
//	Begin validation
	$edata["validateAs"] = array();
						$edata["validateAs"]["basicValidate"][] = "IsRequired";
	
	//	End validation
	
		
				
		$fdata["EditFormats"]["search"] = $edata;
//	End Edit Formats
	
		$fdata["isSeparate"] = true;
	
		
		
	$tdatasenuc_descomplica["id_aluno"] = $fdata;
//	login
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 4;
	$fdata["strName"] = "login";
	$fdata["GoodName"] = "login";
	$fdata["ownerTable"] = "senuc_descomplica";
	$fdata["Label"] = "Login"; 
	$fdata["FieldType"] = 200;
	
		
		
		$fdata["bListPage"] = true; 
	
		$fdata["bAddPage"] = true; 
	
		$fdata["bInlineAdd"] = true; 
	
		$fdata["bEditPage"] = true; 
	
		$fdata["bInlineEdit"] = true; 
	
		$fdata["bViewPage"] = true; 
	
		$fdata["bAdvancedSearch"] = true; 
	
		$fdata["bPrinterPage"] = true; 
	
		$fdata["bExportPage"] = true; 
	
		$fdata["strField"] = "login"; 
		$fdata["FullName"] = "login";
	
		
		
				$fdata["FieldPermissions"] = true;
	
				$fdata["UploadFolder"] = "files";
		
//  Begin View Formats
	$fdata["ViewFormats"] = array();
	
	$vdata = array("ViewFormat" => "");
	
		
		
		
			
		
		
		
		
		
		
		$vdata["NeedEncode"] = true;
	
	$fdata["ViewFormats"]["view"] = $vdata;
//  End View Formats

//	Begin Edit Formats 	
	$fdata["EditFormats"] = array();
	
	$edata = array("EditFormat" => "Lookup wizard");
	
		
		
	
//	Begin Lookup settings
								$edata["LookupType"] = 2;
	$edata["freeInput"] = 0;
	$edata["autoCompleteFieldsOnEdit"] = 0;
	$edata["autoCompleteFields"] = array();
				
		
			
	$edata["LinkField"] = "login";
	$edata["LinkFieldType"] = 200;
	$edata["DisplayField"] = "login";
	
		
	$edata["LookupTable"] = "senuc_descomplica_logins";
	$edata["LookupOrderBy"] = "login";
	
		
		
		
		
		
				
	
	
	//	End Lookup Settings

		$edata["IsRequired"] = true; 
	
		
		
		
			$edata["acceptFileTypes"] = ".+$";
	
		$edata["maxNumberOfFiles"] = 1;
	
		
		
		
		
		
		$edata["inputStyle"] = " width:257px;";
	$edata["controlWidth"] = 257;
	
//	Begin validation
	$edata["validateAs"] = array();
						$edata["validateAs"]["basicValidate"][] = "IsRequired";
	
	//	End validation
	
		
				
		$fdata["EditFormats"]["edit"] = $edata;
//	End Edit Formats
	
		$fdata["isSeparate"] = false;
	
		
		
	$tdatasenuc_descomplica["login"] = $fdata;
//	id_nucleo
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 5;
	$fdata["strName"] = "id_nucleo";
	$fdata["GoodName"] = "id_nucleo";
	$fdata["ownerTable"] = "senuc_descomplica";
	$fdata["Label"] = "Nucleo"; 
	$fdata["FieldType"] = 3;
	
		
		
		$fdata["bListPage"] = true; 
	
		
		$fdata["bInlineAdd"] = true; 
	
		
		$fdata["bInlineEdit"] = true; 
	
		$fdata["bViewPage"] = true; 
	
		$fdata["bAdvancedSearch"] = true; 
	
		$fdata["bPrinterPage"] = true; 
	
		$fdata["bExportPage"] = true; 
	
		$fdata["strField"] = "id_nucleo"; 
		$fdata["FullName"] = "id_nucleo";
	
		
		
				$fdata["FieldPermissions"] = true;
	
				$fdata["UploadFolder"] = "files";
		
//  Begin View Formats
	$fdata["ViewFormats"] = array();
	
	$vdata = array("ViewFormat" => "");
	
		
		
		
			
		
		
		
		
		
		
		$vdata["NeedEncode"] = true;
	
	$fdata["ViewFormats"]["view"] = $vdata;
//  End View Formats

//	Begin Edit Formats 	
	$fdata["EditFormats"] = array();
	
	$edata = array("EditFormat" => "Lookup wizard");
	
		
		
	
//	Begin Lookup settings
								$edata["LookupType"] = 2;
	$edata["freeInput"] = 0;
	$edata["autoCompleteFieldsOnEdit"] = 0;
	$edata["autoCompleteFields"] = array();
				
		
			
	$edata["LinkField"] = "id";
	$edata["LinkFieldType"] = 3;
	$edata["DisplayField"] = "nome";
	
		
	$edata["LookupTable"] = "senuc_nucleo";
	$edata["LookupOrderBy"] = "";
	
		
		
		
		
		
				
	
	
	//	End Lookup Settings

		$edata["IsRequired"] = true; 
	
		
		
		
			$edata["acceptFileTypes"] = ".+$";
	
		$edata["maxNumberOfFiles"] = 1;
	
		
		
		
		
		
		
//	Begin validation
	$edata["validateAs"] = array();
						$edata["validateAs"]["basicValidate"][] = "IsRequired";
	
	//	End validation
	
		
				
		$fdata["EditFormats"]["edit"] = $edata;
//	End Edit Formats
	
		$fdata["isSeparate"] = false;
	
		
		
	$tdatasenuc_descomplica["id_nucleo"] = $fdata;
//	id_regional
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 6;
	$fdata["strName"] = "id_regional";
	$fdata["GoodName"] = "id_regional";
	$fdata["ownerTable"] = "senuc_descomplica";
	$fdata["Label"] = "Regional"; 
	$fdata["FieldType"] = 3;
	
		
		
		$fdata["bListPage"] = true; 
	
		
		$fdata["bInlineAdd"] = true; 
	
		
		$fdata["bInlineEdit"] = true; 
	
		$fdata["bViewPage"] = true; 
	
		$fdata["bAdvancedSearch"] = true; 
	
		$fdata["bPrinterPage"] = true; 
	
		$fdata["bExportPage"] = true; 
	
		$fdata["strField"] = "id_regional"; 
		$fdata["FullName"] = "id_regional";
	
		
		
				$fdata["FieldPermissions"] = true;
	
				$fdata["UploadFolder"] = "files";
		
//  Begin View Formats
	$fdata["ViewFormats"] = array();
	
	$vdata = array("ViewFormat" => "");
	
		
		
		
			
		
		
		
		
		
		
		$vdata["NeedEncode"] = true;
	
	$fdata["ViewFormats"]["view"] = $vdata;
//  End View Formats

//	Begin Edit Formats 	
	$fdata["EditFormats"] = array();
	
	$edata = array("EditFormat" => "Lookup wizard");
	
		
		
	
//	Begin Lookup settings
								$edata["LookupType"] = 1;
	$edata["freeInput"] = 0;
	$edata["autoCompleteFieldsOnEdit"] = 0;
	$edata["autoCompleteFields"] = array();
				
		
			
	$edata["LinkField"] = "id";
	$edata["LinkFieldType"] = 3;
	$edata["DisplayField"] = "regional";
	
		
	$edata["LookupTable"] = "regionais";
	$edata["LookupOrderBy"] = "";
	
		
		
		
		
		
		$edata["SimpleAdd"] = true;
			
	
	
	//	End Lookup Settings

		$edata["IsRequired"] = true; 
	
		
		
		
			$edata["acceptFileTypes"] = ".+$";
	
		$edata["maxNumberOfFiles"] = 1;
	
		
		
		
		
		
		
//	Begin validation
	$edata["validateAs"] = array();
						$edata["validateAs"]["basicValidate"][] = "IsRequired";
	
	//	End validation
	
		
				
		$fdata["EditFormats"]["edit"] = $edata;
//	End Edit Formats
	
		$fdata["isSeparate"] = false;
	
		
		
	$tdatasenuc_descomplica["id_regional"] = $fdata;
//	data
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 7;
	$fdata["strName"] = "data";
	$fdata["GoodName"] = "data";
	$fdata["ownerTable"] = "senuc_descomplica";
	$fdata["Label"] = "Data"; 
	$fdata["FieldType"] = 135;
	
		
		
		$fdata["bListPage"] = true; 
	
		
		$fdata["bInlineAdd"] = true; 
	
		
		$fdata["bInlineEdit"] = true; 
	
		$fdata["bViewPage"] = true; 
	
		$fdata["bAdvancedSearch"] = true; 
	
		$fdata["bPrinterPage"] = true; 
	
		$fdata["bExportPage"] = true; 
	
		$fdata["strField"] = "data"; 
		$fdata["FullName"] = "`data`";
	
		
		
				$fdata["FieldPermissions"] = true;
	
				$fdata["UploadFolder"] = "files";
		
//  Begin View Formats
	$fdata["ViewFormats"] = array();
	
	$vdata = array("ViewFormat" => "Short Date");
	
		
		
		
			
		
		
		
		
		
		
		$vdata["NeedEncode"] = true;
	
	$fdata["ViewFormats"]["view"] = $vdata;
//  End View Formats

//	Begin Edit Formats 	
	$fdata["EditFormats"] = array();
	
	$edata = array("EditFormat" => "Date");
	
		
		
	
//	Begin Lookup settings
	//	End Lookup Settings

		$edata["IsRequired"] = true; 
	
		
		
		
			$edata["acceptFileTypes"] = ".+$";
	
		$edata["maxNumberOfFiles"] = 1;
	
		
		
		$edata["DateEditType"] = 13; 
	$edata["InitialYearFactor"] = 100; 
	$edata["LastYearFactor"] = 10; 
	
		
		
		
//	Begin validation
	$edata["validateAs"] = array();
						$edata["validateAs"]["basicValidate"][] = "IsRequired";
	
	//	End validation
	
		
				
		$fdata["EditFormats"]["edit"] = $edata;
//	End Edit Formats
	
		$fdata["isSeparate"] = false;
	
		
		
	$tdatasenuc_descomplica["data"] = $fdata;
//	ultimo_login
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 8;
	$fdata["strName"] = "ultimo_login";
	$fdata["GoodName"] = "ultimo_login";
	$fdata["ownerTable"] = "";
	$fdata["Label"] = "Ultimo Login"; 
	$fdata["FieldType"] = 135;
	
		
		
		$fdata["bListPage"] = true; 
	
		
		$fdata["bInlineAdd"] = true; 
	
		
		$fdata["bInlineEdit"] = true; 
	
		$fdata["bViewPage"] = true; 
	
		$fdata["bAdvancedSearch"] = true; 
	
		$fdata["bPrinterPage"] = true; 
	
		$fdata["bExportPage"] = true; 
	
		$fdata["strField"] = "ultimo_login"; 
		$fdata["FullName"] = "IFNULL((select data_hora from senuc_aluno_acessos_descomplica as a where a.id_aluno=b.id_aluno order by data_hora desc limit 1), NULL)";
	
		
		
				$fdata["FieldPermissions"] = true;
	
				$fdata["UploadFolder"] = "files";
		
//  Begin View Formats
	$fdata["ViewFormats"] = array();
	
	$vdata = array("ViewFormat" => "Short Date");
	
		
		
		
			
		
		
		
		
		
		
		$vdata["NeedEncode"] = true;
	
	$fdata["ViewFormats"]["view"] = $vdata;
//  End View Formats

//	Begin Edit Formats 	
	$fdata["EditFormats"] = array();
	
	$edata = array("EditFormat" => "Date");
	
		
		
	
//	Begin Lookup settings
	//	End Lookup Settings

		
		
		
		
			$edata["acceptFileTypes"] = ".+$";
	
		$edata["maxNumberOfFiles"] = 1;
	
		
		
		$edata["DateEditType"] = 13; 
	$edata["InitialYearFactor"] = 100; 
	$edata["LastYearFactor"] = 10; 
	
		
		
		
//	Begin validation
	$edata["validateAs"] = array();
		
	//	End validation
	
		
				
		$fdata["EditFormats"]["edit"] = $edata;
//	End Edit Formats
	
		$fdata["isSeparate"] = false;
	
		
		
	$tdatasenuc_descomplica["ultimo_login"] = $fdata;

	
$tables_data["senuc_descomplica"]=&$tdatasenuc_descomplica;
$field_labels["senuc_descomplica"] = &$fieldLabelssenuc_descomplica;
$fieldToolTips["senuc_descomplica"] = &$fieldToolTipssenuc_descomplica;

// -----------------start  prepare master-details data arrays ------------------------------//
// tables which are detail tables for current table (master)
$detailsTablesData["senuc_descomplica"] = array();
	
// tables which are master tables for current table (detail)
$masterTablesData["senuc_descomplica"] = array();

$mIndex = 1-1;
			$strOriginalDetailsTable="senuc_aluno";
	$masterParams["mDataSourceTable"]="senuc_aluno";
	$masterParams["mOriginalTable"]= $strOriginalDetailsTable;
	$masterParams["mShortTable"]= "senuc_aluno";
	$masterParams["masterKeys"]= array();
	$masterParams["detailKeys"]= array();
	$masterParams["dispChildCount"]= "1";
	$masterParams["hideChild"]= "1";
	$masterParams["dispInfo"]= "1";
	$masterParams["previewOnList"]= 1;
	$masterParams["previewOnAdd"]= 0;
	$masterParams["previewOnEdit"]= 0;
	$masterParams["previewOnView"]= 0;
	$masterTablesData["senuc_descomplica"][$mIndex] = $masterParams;	
		$masterTablesData["senuc_descomplica"][$mIndex]["masterKeys"][]="id";
		$masterTablesData["senuc_descomplica"][$mIndex]["detailKeys"][]="id_aluno";

$mIndex = 2-1;
			$strOriginalDetailsTable="senuc_nucleo";
	$masterParams["mDataSourceTable"]="senuc_nucleo";
	$masterParams["mOriginalTable"]= $strOriginalDetailsTable;
	$masterParams["mShortTable"]= "senuc_nucleo";
	$masterParams["masterKeys"]= array();
	$masterParams["detailKeys"]= array();
	$masterParams["dispChildCount"]= "1";
	$masterParams["hideChild"]= "0";
	$masterParams["dispInfo"]= "1";
	$masterParams["previewOnList"]= 1;
	$masterParams["previewOnAdd"]= 0;
	$masterParams["previewOnEdit"]= 0;
	$masterParams["previewOnView"]= 0;
	$masterTablesData["senuc_descomplica"][$mIndex] = $masterParams;	
		$masterTablesData["senuc_descomplica"][$mIndex]["masterKeys"][]="id";
		$masterTablesData["senuc_descomplica"][$mIndex]["detailKeys"][]="id_nucleo";

$mIndex = 3-1;
			$strOriginalDetailsTable="senuc_descomplica_logins";
	$masterParams["mDataSourceTable"]="senuc_descomplica_logins";
	$masterParams["mOriginalTable"]= $strOriginalDetailsTable;
	$masterParams["mShortTable"]= "senuc_descomplica_logins";
	$masterParams["masterKeys"]= array();
	$masterParams["detailKeys"]= array();
	$masterParams["dispChildCount"]= "1";
	$masterParams["hideChild"]= "0";
	$masterParams["dispInfo"]= "1";
	$masterParams["previewOnList"]= 1;
	$masterParams["previewOnAdd"]= 0;
	$masterParams["previewOnEdit"]= 0;
	$masterParams["previewOnView"]= 0;
	$masterTablesData["senuc_descomplica"][$mIndex] = $masterParams;	
		$masterTablesData["senuc_descomplica"][$mIndex]["masterKeys"][]="login";
		$masterTablesData["senuc_descomplica"][$mIndex]["detailKeys"][]="login";

// -----------------end  prepare master-details data arrays ------------------------------//

require_once(getabspath("classes/sql.php"));










function createSqlQuery_senuc_descomplica()
{
$proto0=array();
$proto0["m_strHead"] = "SELECT";
$proto0["m_strFieldList"] = "id,  cpf,  id_aluno,  login,  id_nucleo,  id_regional,  `data`,  IFNULL((select data_hora from senuc_aluno_acessos_descomplica as a where a.id_aluno=b.id_aluno order by data_hora desc limit 1), NULL) AS ultimo_login";
$proto0["m_strFrom"] = "FROM senuc_descomplica AS b";
$proto0["m_strWhere"] = "";
$proto0["m_strOrderBy"] = "";
$proto0["m_strTail"] = "";
$proto0["cipherer"] = null;
$proto1=array();
$proto1["m_sql"] = "";
$proto1["m_uniontype"] = "SQLL_UNKNOWN";
	$obj = new SQLNonParsed(array(
	"m_sql" => ""
));

$proto1["m_column"]=$obj;
$proto1["m_contained"] = array();
$proto1["m_strCase"] = "";
$proto1["m_havingmode"] = "0";
$proto1["m_inBrackets"] = "0";
$proto1["m_useAlias"] = "0";
$obj = new SQLLogicalExpr($proto1);

$proto0["m_where"] = $obj;
$proto3=array();
$proto3["m_sql"] = "";
$proto3["m_uniontype"] = "SQLL_UNKNOWN";
	$obj = new SQLNonParsed(array(
	"m_sql" => ""
));

$proto3["m_column"]=$obj;
$proto3["m_contained"] = array();
$proto3["m_strCase"] = "";
$proto3["m_havingmode"] = "0";
$proto3["m_inBrackets"] = "0";
$proto3["m_useAlias"] = "0";
$obj = new SQLLogicalExpr($proto3);

$proto0["m_having"] = $obj;
$proto0["m_fieldlist"] = array();
						$proto5=array();
			$obj = new SQLField(array(
	"m_strName" => "id",
	"m_strTable" => "b"
));

$proto5["m_expr"]=$obj;
$proto5["m_alias"] = "";
$obj = new SQLFieldListItem($proto5);

$proto0["m_fieldlist"][]=$obj;
						$proto7=array();
			$obj = new SQLField(array(
	"m_strName" => "cpf",
	"m_strTable" => "b"
));

$proto7["m_expr"]=$obj;
$proto7["m_alias"] = "";
$obj = new SQLFieldListItem($proto7);

$proto0["m_fieldlist"][]=$obj;
						$proto9=array();
			$obj = new SQLField(array(
	"m_strName" => "id_aluno",
	"m_strTable" => "b"
));

$proto9["m_expr"]=$obj;
$proto9["m_alias"] = "";
$obj = new SQLFieldListItem($proto9);

$proto0["m_fieldlist"][]=$obj;
						$proto11=array();
			$obj = new SQLField(array(
	"m_strName" => "login",
	"m_strTable" => "b"
));

$proto11["m_expr"]=$obj;
$proto11["m_alias"] = "";
$obj = new SQLFieldListItem($proto11);

$proto0["m_fieldlist"][]=$obj;
						$proto13=array();
			$obj = new SQLField(array(
	"m_strName" => "id_nucleo",
	"m_strTable" => "b"
));

$proto13["m_expr"]=$obj;
$proto13["m_alias"] = "";
$obj = new SQLFieldListItem($proto13);

$proto0["m_fieldlist"][]=$obj;
						$proto15=array();
			$obj = new SQLField(array(
	"m_strName" => "id_regional",
	"m_strTable" => "b"
));

$proto15["m_expr"]=$obj;
$proto15["m_alias"] = "";
$obj = new SQLFieldListItem($proto15);

$proto0["m_fieldlist"][]=$obj;
						$proto17=array();
			$obj = new SQLField(array(
	"m_strName" => "data",
	"m_strTable" => "b"
));

$proto17["m_expr"]=$obj;
$proto17["m_alias"] = "";
$obj = new SQLFieldListItem($proto17);

$proto0["m_fieldlist"][]=$obj;
						$proto19=array();
			$proto20=array();
$proto20["m_functiontype"] = "SQLF_CUSTOM";
$proto20["m_arguments"] = array();
						$obj = new SQLNonParsed(array(
	"m_sql" => "(select data_hora from senuc_aluno_acessos_descomplica as a where a.id_aluno=b.id_aluno order by data_hora desc limit 1)"
));

$proto20["m_arguments"][]=$obj;
						$obj = new SQLNonParsed(array(
	"m_sql" => "NULL"
));

$proto20["m_arguments"][]=$obj;
$proto20["m_strFunctionName"] = "IFNULL";
$obj = new SQLFunctionCall($proto20);

$proto19["m_expr"]=$obj;
$proto19["m_alias"] = "ultimo_login";
$obj = new SQLFieldListItem($proto19);

$proto0["m_fieldlist"][]=$obj;
$proto0["m_fromlist"] = array();
												$proto23=array();
$proto23["m_link"] = "SQLL_MAIN";
			$proto24=array();
$proto24["m_strName"] = "senuc_descomplica";
$proto24["m_columns"] = array();
$proto24["m_columns"][] = "id";
$proto24["m_columns"][] = "cpf";
$proto24["m_columns"][] = "id_aluno";
$proto24["m_columns"][] = "login";
$proto24["m_columns"][] = "id_nucleo";
$proto24["m_columns"][] = "id_regional";
$proto24["m_columns"][] = "operador";
$proto24["m_columns"][] = "data";
$obj = new SQLTable($proto24);

$proto23["m_table"] = $obj;
$proto23["m_alias"] = "b";
$proto25=array();
$proto25["m_sql"] = "";
$proto25["m_uniontype"] = "SQLL_UNKNOWN";
	$obj = new SQLNonParsed(array(
	"m_sql" => ""
));

$proto25["m_column"]=$obj;
$proto25["m_contained"] = array();
$proto25["m_strCase"] = "";
$proto25["m_havingmode"] = "0";
$proto25["m_inBrackets"] = "0";
$proto25["m_useAlias"] = "0";
$obj = new SQLLogicalExpr($proto25);

$proto23["m_joinon"] = $obj;
$obj = new SQLFromListItem($proto23);

$proto0["m_fromlist"][]=$obj;
$proto0["m_groupby"] = array();
$proto0["m_orderby"] = array();
$obj = new SQLQuery($proto0);

	return $obj;
}
$queryData_senuc_descomplica = createSqlQuery_senuc_descomplica();
								$tdatasenuc_descomplica[".sqlquery"] = $queryData_senuc_descomplica;
	
if(isset($tdatasenuc_descomplica["field2"])){
	$tdatasenuc_descomplica["field2"]["LookupTable"] = "carscars_view";
	$tdatasenuc_descomplica["field2"]["LookupOrderBy"] = "name";
	$tdatasenuc_descomplica["field2"]["LookupType"] = 4;
	$tdatasenuc_descomplica["field2"]["LinkField"] = "email";
	$tdatasenuc_descomplica["field2"]["DisplayField"] = "name";
	$tdatasenuc_descomplica[".hasCustomViewField"] = true;
}

include_once(getabspath("include/senuc_descomplica_events.php"));
$tableEvents["senuc_descomplica"] = new eventclass_senuc_descomplica;
$tdatasenuc_descomplica[".hasEvents"] = true;

$cipherer = new RunnerCipherer("senuc_descomplica");

?>