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

//	field labels
$fieldLabelsgrupo = array();
if(mlang_getcurrentlang()=="Spanish")
{
	$fieldLabelsgrupo["Spanish"] = array();
	$fieldToolTipsgrupo["Spanish"] = array();
	$fieldLabelsgrupo["Spanish"]["idgrupo"] = "Idgrupo";
	$fieldToolTipsgrupo["Spanish"]["idgrupo"] = "";
	$fieldLabelsgrupo["Spanish"]["nombre"] = "Nombre";
	$fieldToolTipsgrupo["Spanish"]["nombre"] = "";
	if (count($fieldToolTipsgrupo["Spanish"]))
		$tdatagrupo[".isUseToolTips"] = true;
}
	
	
	$tdatagrupo[".NCSearch"] = true;



$tdatagrupo[".shortTableName"] = "grupo";
$tdatagrupo[".nSecOptions"] = 0;
$tdatagrupo[".recsPerRowList"] = 1;
$tdatagrupo[".mainTableOwnerID"] = "";
$tdatagrupo[".moveNext"] = 1;
$tdatagrupo[".nType"] = 0;

$tdatagrupo[".strOriginalTableName"] = "grupo";




$tdatagrupo[".showAddInPopup"] = false;

$tdatagrupo[".showEditInPopup"] = false;

$tdatagrupo[".showViewInPopup"] = false;

$tdatagrupo[".fieldsForRegister"] = array();
	
if (!isMobile())
	$tdatagrupo[".listAjax"] = true;
else 
	$tdatagrupo[".listAjax"] = false;

	$tdatagrupo[".audit"] = false;

	$tdatagrupo[".locking"] = false;

$tdatagrupo[".inlineEdit"] = true;
$tdatagrupo[".inlineAdd"] = true;

$tdatagrupo[".exportTo"] = true;


$tdatagrupo[".delete"] = true;

$tdatagrupo[".showSimpleSearchOptions"] = false;

$tdatagrupo[".showSearchPanel"] = true;

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

$tdatagrupo[".rowHighlite"] = true;

// button handlers file names

$tdatagrupo[".addPageEvents"] = false;

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




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

$tdatagrupo[".allSearchFields"][] = "nombre";

$tdatagrupo[".googleLikeFields"][] = "idgrupo";
$tdatagrupo[".googleLikeFields"][] = "nombre";


$tdatagrupo[".advSearchFields"][] = "nombre";

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

	



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



$tdatagrupo[".pageSize"] = 20;

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

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

$tdatagrupo[".sqlHead"] = "SELECT idgrupo,   nombre";
$tdatagrupo[".sqlFrom"] = "FROM grupo";
$tdatagrupo[".sqlWhereExpr"] = "";
$tdatagrupo[".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;
$tdatagrupo[".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;
$tdatagrupo[".arrGroupsPerPage"] = $arrGPP;

$tableKeysgrupo = array();
$tableKeysgrupo[] = "idgrupo";
$tdatagrupo[".Keys"] = $tableKeysgrupo;

$tdatagrupo[".listFields"] = array();
$tdatagrupo[".listFields"][] = "nombre";

$tdatagrupo[".viewFields"] = array();

$tdatagrupo[".addFields"] = array();

$tdatagrupo[".inlineAddFields"] = array();
$tdatagrupo[".inlineAddFields"][] = "nombre";

$tdatagrupo[".editFields"] = array();

$tdatagrupo[".inlineEditFields"] = array();
$tdatagrupo[".inlineEditFields"][] = "nombre";

$tdatagrupo[".exportFields"] = array();
$tdatagrupo[".exportFields"][] = "nombre";

$tdatagrupo[".printFields"] = array();

//	idgrupo
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 1;
	$fdata["strName"] = "idgrupo";
	$fdata["GoodName"] = "idgrupo";
	$fdata["ownerTable"] = "grupo";
	$fdata["Label"] = "Idgrupo"; 
	$fdata["FieldType"] = 3;
	
		$fdata["AutoInc"] = true;
	
		
		
		
		
		
		
		
		
		
		
		$fdata["strField"] = "idgrupo"; 
		$fdata["FullName"] = "idgrupo";
	
		
		
				
				$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;
	
		
		
	$tdatagrupo["idgrupo"] = $fdata;
//	nombre
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 2;
	$fdata["strName"] = "nombre";
	$fdata["GoodName"] = "nombre";
	$fdata["ownerTable"] = "grupo";
	$fdata["Label"] = "Nombre"; 
	$fdata["FieldType"] = 200;
	
		
		
		$fdata["bListPage"] = true; 
	
		
		$fdata["bInlineAdd"] = true; 
	
		
		$fdata["bInlineEdit"] = true; 
	
		
		$fdata["bAdvancedSearch"] = true; 
	
		
		$fdata["bExportPage"] = true; 
	
		$fdata["strField"] = "nombre"; 
		$fdata["FullName"] = "nombre";
	
		
		
				$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" => "Text field");
	
		
		
	
//	Begin Lookup settings
	//	End Lookup Settings

		
		
		
		
			$edata["acceptFileTypes"] = ".+$";
	
		$edata["maxNumberOfFiles"] = 1;
	
		
		
		
		
		$edata["EditParams"] = "";
			$edata["EditParams"].= " maxlength=45";
	
		
//	Begin validation
	$edata["validateAs"] = array();
		
			//	End validation
	
		
				
		$fdata["EditFormats"]["edit"] = $edata;
//	End Edit Formats
	
		$fdata["isSeparate"] = false;
	
		
		
	$tdatagrupo["nombre"] = $fdata;

	
$tables_data["grupo"]=&$tdatagrupo;
$field_labels["grupo"] = &$fieldLabelsgrupo;
$fieldToolTips["grupo"] = &$fieldToolTipsgrupo;

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

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

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










function createSqlQuery_grupo()
{
$proto0=array();
$proto0["m_strHead"] = "SELECT";
$proto0["m_strFieldList"] = "idgrupo,   nombre";
$proto0["m_strFrom"] = "FROM grupo";
$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" => "idgrupo",
	"m_strTable" => "grupo"
));

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

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

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

$proto0["m_fieldlist"][]=$obj;
$proto0["m_fromlist"] = array();
												$proto9=array();
$proto9["m_link"] = "SQLL_MAIN";
			$proto10=array();
$proto10["m_strName"] = "grupo";
$proto10["m_columns"] = array();
$proto10["m_columns"][] = "idgrupo";
$proto10["m_columns"][] = "nombre";
$obj = new SQLTable($proto10);

$proto9["m_table"] = $obj;
$proto9["m_alias"] = "";
$proto11=array();
$proto11["m_sql"] = "";
$proto11["m_uniontype"] = "SQLL_UNKNOWN";
	$obj = new SQLNonParsed(array(
	"m_sql" => ""
));

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

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

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

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

$tableEvents["grupo"] = new eventsBase;
$tdatagrupo[".hasEvents"] = false;

$cipherer = new RunnerCipherer("grupo");

?>