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

//	field labels
$fieldLabelsusuario = array();
if(mlang_getcurrentlang()=="Spanish")
{
	$fieldLabelsusuario["Spanish"] = array();
	$fieldToolTipsusuario["Spanish"] = array();
	$fieldLabelsusuario["Spanish"]["idusuario"] = "Idusuario";
	$fieldToolTipsusuario["Spanish"]["idusuario"] = "";
	$fieldLabelsusuario["Spanish"]["nick"] = "Nick";
	$fieldToolTipsusuario["Spanish"]["nick"] = "";
	$fieldLabelsusuario["Spanish"]["nombres"] = "Nombres";
	$fieldToolTipsusuario["Spanish"]["nombres"] = "";
	$fieldLabelsusuario["Spanish"]["contrasena"] = "Contrasena";
	$fieldToolTipsusuario["Spanish"]["contrasena"] = "";
	$fieldLabelsusuario["Spanish"]["activo"] = "Activo";
	$fieldToolTipsusuario["Spanish"]["activo"] = "";
	$fieldLabelsusuario["Spanish"][""] = "";
	$fieldToolTipsusuario["Spanish"][""] = "";
	$fieldLabelsusuario["Spanish"][""] = "Usuario";
	$fieldToolTipsusuario["Spanish"][""] = "";
	if (count($fieldToolTipsusuario["Spanish"]))
		$tdatausuario[".isUseToolTips"] = true;
}
	
	
	$tdatausuario[".NCSearch"] = true;



$tdatausuario[".shortTableName"] = "usuario";
$tdatausuario[".nSecOptions"] = 0;
$tdatausuario[".recsPerRowList"] = 1;
$tdatausuario[".mainTableOwnerID"] = "";
$tdatausuario[".moveNext"] = 1;
$tdatausuario[".nType"] = 0;

$tdatausuario[".strOriginalTableName"] = "usuario";

$tdatausuario[".hasEncryptedFields"] = true;



$tdatausuario[".showAddInPopup"] = true;

$tdatausuario[".showEditInPopup"] = true;

$tdatausuario[".showViewInPopup"] = false;

$tdatausuario[".fieldsForRegister"] = array();
	//Begin register settings
$tdatausuario[".fieldsForRegister"][] = "nick";
$tdatausuario[".fieldsForRegister"][] = "contrasena";
/*
$tdatausuario[".PasswordField"] = "contrasena";
$tdatausuario[".UserNameField"] = "nick";	
*/
//End register settings	

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

	$tdatausuario[".audit"] = false;

	$tdatausuario[".locking"] = false;

$tdatausuario[".edit"] = true;

$tdatausuario[".exportTo"] = true;


$tdatausuario[".delete"] = true;

$tdatausuario[".showSimpleSearchOptions"] = false;

$tdatausuario[".showSearchPanel"] = true;

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

$tdatausuario[".rowHighlite"] = true;

// button handlers file names

$tdatausuario[".addPageEvents"] = false;

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



$tdatausuario[".useDetailsPreview"] = true;

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

$tdatausuario[".allSearchFields"][] = "nick";
$tdatausuario[".allSearchFields"][] = "nombres";
$tdatausuario[".allSearchFields"][] = "contrasena";
$tdatausuario[".allSearchFields"][] = "activo";

$tdatausuario[".googleLikeFields"][] = "idusuario";
$tdatausuario[".googleLikeFields"][] = "nick";
$tdatausuario[".googleLikeFields"][] = "nombres";
$tdatausuario[".googleLikeFields"][] = "contrasena";
$tdatausuario[".googleLikeFields"][] = "activo";


$tdatausuario[".advSearchFields"][] = "nick";
$tdatausuario[".advSearchFields"][] = "nombres";
$tdatausuario[".advSearchFields"][] = "contrasena";
$tdatausuario[".advSearchFields"][] = "activo";

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

	



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


$tdatausuario[".pageSize"] = 20;

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

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

$tdatausuario[".sqlHead"] = "SELECT idusuario,   nick,   nombres,   contrasena,   activo";
$tdatausuario[".sqlFrom"] = "FROM usuario";
$tdatausuario[".sqlWhereExpr"] = "";
$tdatausuario[".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;
$tdatausuario[".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;
$tdatausuario[".arrGroupsPerPage"] = $arrGPP;

$tableKeysusuario = array();
$tableKeysusuario[] = "idusuario";
$tdatausuario[".Keys"] = $tableKeysusuario;

$tdatausuario[".listFields"] = array();
$tdatausuario[".listFields"][] = "nick";
$tdatausuario[".listFields"][] = "nombres";
$tdatausuario[".listFields"][] = "contrasena";
$tdatausuario[".listFields"][] = "activo";

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

$tdatausuario[".addFields"] = array();
$tdatausuario[".addFields"][] = "nick";
$tdatausuario[".addFields"][] = "nombres";
$tdatausuario[".addFields"][] = "contrasena";

$tdatausuario[".inlineAddFields"] = array();

$tdatausuario[".editFields"] = array();
$tdatausuario[".editFields"][] = "nick";
$tdatausuario[".editFields"][] = "nombres";
$tdatausuario[".editFields"][] = "contrasena";
$tdatausuario[".editFields"][] = "activo";

$tdatausuario[".inlineEditFields"] = array();

$tdatausuario[".exportFields"] = array();
$tdatausuario[".exportFields"][] = "nick";
$tdatausuario[".exportFields"][] = "nombres";
$tdatausuario[".exportFields"][] = "contrasena";
$tdatausuario[".exportFields"][] = "activo";

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

//	idusuario
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 1;
	$fdata["strName"] = "idusuario";
	$fdata["GoodName"] = "idusuario";
	$fdata["ownerTable"] = "usuario";
	$fdata["Label"] = "Idusuario"; 
	$fdata["FieldType"] = 3;
	
		$fdata["AutoInc"] = true;
	
		
		
		
		
		
		
		
		
		
		
		$fdata["strField"] = "idusuario"; 
		$fdata["FullName"] = "idusuario";
	
		
		
				
				$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;
	
		
		
	$tdatausuario["idusuario"] = $fdata;
//	nick
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 2;
	$fdata["strName"] = "nick";
	$fdata["GoodName"] = "nick";
	$fdata["ownerTable"] = "usuario";
	$fdata["Label"] = "Nick"; 
	$fdata["FieldType"] = 200;
	
		
		
		$fdata["bListPage"] = true; 
	
		$fdata["bAddPage"] = true; 
	
		
		$fdata["bEditPage"] = true; 
	
		
		
		$fdata["bAdvancedSearch"] = true; 
	
		
		$fdata["bExportPage"] = true; 
	
		$fdata["strField"] = "nick"; 
		$fdata["FullName"] = "nick";
	
		
		
				$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();
		
							if(count($edata["validateAs"]) && !in_array('IsRequired', $edata["validateAs"]['basicValidate']))
		$edata["validateAs"]['basicValidate'][] = 'IsRequired';
			//	End validation
	
		
				
		$fdata["EditFormats"]["edit"] = $edata;
//	End Edit Formats
	
		$fdata["isSeparate"] = false;
	
		
		
	$tdatausuario["nick"] = $fdata;
//	nombres
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 3;
	$fdata["strName"] = "nombres";
	$fdata["GoodName"] = "nombres";
	$fdata["ownerTable"] = "usuario";
	$fdata["Label"] = "Nombres"; 
	$fdata["FieldType"] = 200;
	
		
		
		$fdata["bListPage"] = true; 
	
		$fdata["bAddPage"] = true; 
	
		
		$fdata["bEditPage"] = true; 
	
		
		
		$fdata["bAdvancedSearch"] = true; 
	
		
		$fdata["bExportPage"] = true; 
	
		$fdata["strField"] = "nombres"; 
		$fdata["FullName"] = "nombres";
	
		
		
				$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;
	
		
		
	$tdatausuario["nombres"] = $fdata;
//	contrasena
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 4;
	$fdata["strName"] = "contrasena";
	$fdata["GoodName"] = "contrasena";
	$fdata["ownerTable"] = "usuario";
	$fdata["Label"] = "Contrasena"; 
	$fdata["FieldType"] = 200;
	
		
		$fdata["bIsEncrypted"] = true; 
	
		$fdata["bListPage"] = true; 
	
		$fdata["bAddPage"] = true; 
	
		
		$fdata["bEditPage"] = true; 
	
		
		
		$fdata["bAdvancedSearch"] = true; 
	
		
		$fdata["bExportPage"] = true; 
	
		$fdata["strField"] = "contrasena"; 
		$fdata["FullName"] = "contrasena";
	
		
		
				$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();
		
							if(count($edata["validateAs"]) && !in_array('IsRequired', $edata["validateAs"]['basicValidate']))
		$edata["validateAs"]['basicValidate'][] = 'IsRequired';
			//	End validation
	
		
				
		$fdata["EditFormats"]["edit"] = $edata;
//	End Edit Formats
	
		$fdata["isSeparate"] = false;
	
		
		
	$tdatausuario["contrasena"] = $fdata;
//	activo
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 5;
	$fdata["strName"] = "activo";
	$fdata["GoodName"] = "activo";
	$fdata["ownerTable"] = "usuario";
	$fdata["Label"] = "Activo"; 
	$fdata["FieldType"] = 200;
	
		
		
		$fdata["bListPage"] = true; 
	
		
		
		$fdata["bEditPage"] = true; 
	
		
		
		$fdata["bAdvancedSearch"] = true; 
	
		
		$fdata["bExportPage"] = true; 
	
		$fdata["strField"] = "activo"; 
		$fdata["FullName"] = "activo";
	
		
		
				$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;
	
		
		
	$tdatausuario["activo"] = $fdata;

	
$tables_data["usuario"]=&$tdatausuario;
$field_labels["usuario"] = &$fieldLabelsusuario;
$fieldToolTips["usuario"] = &$fieldToolTipsusuario;

// -----------------start  prepare master-details data arrays ------------------------------//
// tables which are detail tables for current table (master)
$detailsTablesData["usuario"] = array();
$dIndex = 1-1;
			$strOriginalDetailsTable="movimiento_caja";
	$detailsParam["dDataSourceTable"]="movimiento_caja";
	$detailsParam["dOriginalTable"]=$strOriginalDetailsTable;
	$detailsParam["dShortTable"]="movimiento_caja";
	$detailsParam["masterKeys"]=array();
	$detailsParam["detailKeys"]=array();
	$detailsParam["dispChildCount"]= "1";
	$detailsParam["hideChild"]="0";
	$detailsParam["previewOnList"]= 1;
	$detailsParam["previewOnAdd"]= 1;
	$detailsParam["previewOnEdit"]= 0;
	$detailsParam["previewOnView"]= 0;
		
	$detailsTablesData["usuario"][$dIndex] = $detailsParam;
	
			$detailsTablesData["usuario"][$dIndex]["previewOnAdd"] = false;
	
		$detailsTablesData["usuario"][$dIndex]["masterKeys"][]="idusuario";
		$detailsTablesData["usuario"][$dIndex]["detailKeys"][]="idusuario";

	
// tables which are master tables for current table (detail)
$masterTablesData["usuario"] = array();

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

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










function createSqlQuery_usuario()
{
$proto0=array();
$proto0["m_strHead"] = "SELECT";
$proto0["m_strFieldList"] = "idusuario,   nick,   nombres,   contrasena,   activo";
$proto0["m_strFrom"] = "FROM usuario";
$proto0["m_strWhere"] = "";
$proto0["m_strOrderBy"] = "";
$proto0["m_strTail"] = "";
$proto0["cipherer"] = new RunnerCipherer("usuario");
$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" => "idusuario",
	"m_strTable" => "usuario"
));

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

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

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

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

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

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

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

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

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

$proto0["m_fieldlist"][]=$obj;
$proto0["m_fromlist"] = array();
												$proto15=array();
$proto15["m_link"] = "SQLL_MAIN";
			$proto16=array();
$proto16["m_strName"] = "usuario";
$proto16["m_columns"] = array();
$proto16["m_columns"][] = "idusuario";
$proto16["m_columns"][] = "nick";
$proto16["m_columns"][] = "nombres";
$proto16["m_columns"][] = "contrasena";
$proto16["m_columns"][] = "activo";
$obj = new SQLTable($proto16);

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

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

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

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

	return $obj;
}
$queryData_usuario = createSqlQuery_usuario();
						 $queryData_usuario->m_fieldlist[3]->m_isEncrypted = true;
	$tdatausuario[".sqlquery"] = $queryData_usuario;
	
if(isset($tdatausuario["field2"])){
	$tdatausuario["field2"]["LookupTable"] = "carscars_view";
	$tdatausuario["field2"]["LookupOrderBy"] = "name";
	$tdatausuario["field2"]["LookupType"] = 4;
	$tdatausuario["field2"]["LinkField"] = "email";
	$tdatausuario["field2"]["DisplayField"] = "name";
	$tdatausuario[".hasCustomViewField"] = true;
}

$tableEvents["usuario"] = new eventsBase;
$tdatausuario[".hasEvents"] = false;

$cipherer = new RunnerCipherer("usuario");

?>