<?php
$tdataunit = array();
$tdataunit[".searchableFields"] = array();
$tdataunit[".ShortName"] = "unit";
$tdataunit[".OwnerID"] = "";
$tdataunit[".OriginalTable"] = "unit";


$tdataunit[".pagesByType"] = my_json_decode( "{\"add\":[\"add\"],\"edit\":[\"edit\"],\"export\":[\"export\"],\"import\":[\"import\"],\"list\":[\"list\"],\"print\":[\"print\"],\"search\":[\"search\"],\"view\":[\"view\"]}" );
$tdataunit[".originalPagesByType"] = $tdataunit[".pagesByType"];
$tdataunit[".pages"] = types2pages( my_json_decode( "{\"add\":[\"add\"],\"edit\":[\"edit\"],\"export\":[\"export\"],\"import\":[\"import\"],\"list\":[\"list\"],\"print\":[\"print\"],\"search\":[\"search\"],\"view\":[\"view\"]}" ) );
$tdataunit[".originalPages"] = $tdataunit[".pages"];
$tdataunit[".defaultPages"] = my_json_decode( "{\"add\":\"add\",\"edit\":\"edit\",\"export\":\"export\",\"import\":\"import\",\"list\":\"list\",\"print\":\"print\",\"search\":\"search\",\"view\":\"view\"}" );
$tdataunit[".originalDefaultPages"] = $tdataunit[".defaultPages"];

//	field labels
$fieldLabelsunit = array();
$fieldToolTipsunit = array();
$pageTitlesunit = array();
$placeHoldersunit = array();

if(mlang_getcurrentlang()=="English")
{
	$fieldLabelsunit["English"] = array();
	$fieldToolTipsunit["English"] = array();
	$placeHoldersunit["English"] = array();
	$pageTitlesunit["English"] = array();
	$fieldLabelsunit["English"]["id"] = "Id";
	$fieldToolTipsunit["English"]["id"] = "";
	$placeHoldersunit["English"]["id"] = "";
	$fieldLabelsunit["English"]["unit"] = "Unit";
	$fieldToolTipsunit["English"]["unit"] = "";
	$placeHoldersunit["English"]["unit"] = "";
	if (count($fieldToolTipsunit["English"]))
		$tdataunit[".isUseToolTips"] = true;
}


	$tdataunit[".NCSearch"] = true;



$tdataunit[".shortTableName"] = "unit";
$tdataunit[".nSecOptions"] = 0;

$tdataunit[".mainTableOwnerID"] = "";
$tdataunit[".entityType"] = 0;
$tdataunit[".connId"] = "new_lakmini_at_localhost";


$tdataunit[".strOriginalTableName"] = "unit";

	



$tdataunit[".showAddInPopup"] = false;

$tdataunit[".showEditInPopup"] = false;

$tdataunit[".showViewInPopup"] = false;

//page's base css files names
$popupPagesLayoutNames = array();
$tdataunit[".popupPagesLayoutNames"] = $popupPagesLayoutNames;


$tdataunit[".listAjax"] = false;
//	temporary
$tdataunit[".listAjax"] = false;

	$tdataunit[".audit"] = false;

	$tdataunit[".locking"] = false;


$pages = $tdataunit[".defaultPages"];

if( $pages[PAGE_EDIT] ) {
	$tdataunit[".edit"] = true;
	$tdataunit[".afterEditAction"] = 1;
	$tdataunit[".closePopupAfterEdit"] = 1;
	$tdataunit[".afterEditActionDetTable"] = "";
}

if( $pages[PAGE_ADD] ) {
$tdataunit[".add"] = true;
$tdataunit[".afterAddAction"] = 1;
$tdataunit[".closePopupAfterAdd"] = 1;
$tdataunit[".afterAddActionDetTable"] = "";
}

if( $pages[PAGE_LIST] ) {
	$tdataunit[".list"] = true;
}



$tdataunit[".strSortControlSettingsJSON"] = "";




if( $pages[PAGE_VIEW] ) {
$tdataunit[".view"] = true;
}

if( $pages[PAGE_IMPORT] ) {
$tdataunit[".import"] = true;
}

if( $pages[PAGE_EXPORT] ) {
$tdataunit[".exportTo"] = true;
}

if( $pages[PAGE_PRINT] ) {
$tdataunit[".printFriendly"] = true;
}



$tdataunit[".showSimpleSearchOptions"] = true; // temp fix #13449

// Allow Show/Hide Fields in GRID
$tdataunit[".allowShowHideFields"] = true; // temp fix #13449
//

// Allow Fields Reordering in GRID
$tdataunit[".allowFieldsReordering"] = true; // temp fix #13449
//

$tdataunit[".isUseAjaxSuggest"] = true;

$tdataunit[".rowHighlite"] = true;



			

$tdataunit[".ajaxCodeSnippetAdded"] = false;

$tdataunit[".buttonsAdded"] = false;

$tdataunit[".addPageEvents"] = false;

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


$tdataunit[".badgeColor"] = "EDCA00";


$tdataunit[".allSearchFields"] = array();
$tdataunit[".filterFields"] = array();
$tdataunit[".requiredSearchFields"] = array();

$tdataunit[".googleLikeFields"] = array();
$tdataunit[".googleLikeFields"][] = "id";
$tdataunit[".googleLikeFields"][] = "unit";



$tdataunit[".tableType"] = "list";

$tdataunit[".printerPageOrientation"] = 0;
$tdataunit[".nPrinterPageScale"] = 100;

$tdataunit[".nPrinterSplitRecords"] = 40;

$tdataunit[".geocodingEnabled"] = false;










$tdataunit[".pageSize"] = 20;

$tdataunit[".warnLeavingPages"] = true;



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

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


$tdataunit[".sqlHead"] = "SELECT id,  	unit";
$tdataunit[".sqlFrom"] = "FROM unit";
$tdataunit[".sqlWhereExpr"] = "";
$tdataunit[".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;
$tdataunit[".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;
$tdataunit[".arrGroupsPerPage"] = $arrGPP;

$tdataunit[".highlightSearchResults"] = true;

$tableKeysunit = array();
$tableKeysunit[] = "id";
$tdataunit[".Keys"] = $tableKeysunit;


$tdataunit[".hideMobileList"] = array();




//	id
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 1;
	$fdata["strName"] = "id";
	$fdata["GoodName"] = "id";
	$fdata["ownerTable"] = "unit";
	$fdata["Label"] = GetFieldLabel("unit","id");
	$fdata["FieldType"] = 3;

	
		$fdata["AutoInc"] = true;

	
			

		$fdata["strField"] = "id";

	
		$fdata["isSQLExpression"] = true;
	$fdata["FullName"] = "id";

	
	
				$fdata["UploadFolder"] = "files";

//  Begin View Formats
	$fdata["ViewFormats"] = array();

	$vdata = array("ViewFormat" => "");

	
	
	
	
	
	
	
	
	
	
	
		
	
		$vdata["NeedEncode"] = true;

	
		$vdata["truncateText"] = true;
	$vdata["NumberOfChars"] = 80;

	$fdata["ViewFormats"]["view"] = $vdata;
//  End View Formats

//	Begin Edit Formats
	$fdata["EditFormats"] = array();

	$edata = array("EditFormat" => "Text field");

	
		$edata["weekdayMessage"] = array("message" => "", "messageType" => "Text");
	$edata["weekdays"] = "[]";


	
	



		$edata["IsRequired"] = true;

	
	
	
			$edata["acceptFileTypes"] = ".+$";
		$edata["acceptFileTypesHtml"] = "";

		$edata["maxNumberOfFiles"] = 1;

	
	
	
	
			$edata["HTML5InuptType"] = "text";

		$edata["EditParams"] = "";
		
		$edata["controlWidth"] = 200;

//	Begin validation
	$edata["validateAs"] = array();
	$edata["validateAs"]["basicValidate"] = array();
	$edata["validateAs"]["customMessages"] = array();
				$edata["validateAs"]["basicValidate"][] = getJsValidatorName("Number");
						$edata["validateAs"]["basicValidate"][] = "IsRequired";
		
	
	//	End validation

	
			
	
	
	
	$fdata["EditFormats"]["edit"] = $edata;
//	End Edit Formats


	$fdata["isSeparate"] = false;




// the field's search options settings
		$fdata["defaultSearchOption"] = "Contains";

			// the default search options list
				$fdata["searchOptionsList"] = array("Contains", "Equals", "Starts with", "More than", "Less than", "Between", "Empty", NOT_EMPTY);
// the end of search options settings


//Filters settings
	$fdata["filterTotals"] = 0;
		$fdata["filterMultiSelect"] = 0;
			$fdata["filterFormat"] = "Values list";
		$fdata["showCollapsed"] = false;

		$fdata["sortValueType"] = 0;
		$fdata["numberOfVisibleItems"] = 10;

		$fdata["filterBy"] = 0;

	

	
	
//end of Filters settings


	$tdataunit["id"] = $fdata;
		$tdataunit[".searchableFields"][] = "id";
//	unit
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 2;
	$fdata["strName"] = "unit";
	$fdata["GoodName"] = "unit";
	$fdata["ownerTable"] = "unit";
	$fdata["Label"] = GetFieldLabel("unit","unit");
	$fdata["FieldType"] = 200;

	
	
	
			

		$fdata["strField"] = "unit";

	
		$fdata["isSQLExpression"] = true;
	$fdata["FullName"] = "unit";

	
	
				$fdata["UploadFolder"] = "files";

//  Begin View Formats
	$fdata["ViewFormats"] = array();

	$vdata = array("ViewFormat" => "");

	
	
	
	
	
	
	
	
	
	
	
		
	
		$vdata["NeedEncode"] = true;

	
		$vdata["truncateText"] = true;
	$vdata["NumberOfChars"] = 80;

	$fdata["ViewFormats"]["view"] = $vdata;
//  End View Formats

//	Begin Edit Formats
	$fdata["EditFormats"] = array();

	$edata = array("EditFormat" => "Text field");

	
		$edata["weekdayMessage"] = array("message" => "", "messageType" => "Text");
	$edata["weekdays"] = "[]";


	
	



	
	
	
	
			$edata["acceptFileTypes"] = ".+$";
		$edata["acceptFileTypesHtml"] = "";

		$edata["maxNumberOfFiles"] = 1;

	
	
	
	
			$edata["HTML5InuptType"] = "text";

		$edata["EditParams"] = "";
			$edata["EditParams"].= " maxlength=50";

		$edata["controlWidth"] = 200;

//	Begin validation
	$edata["validateAs"] = array();
	$edata["validateAs"]["basicValidate"] = array();
	$edata["validateAs"]["customMessages"] = array();
	
	
	//	End validation

	
			
	
	
	
	$fdata["EditFormats"]["edit"] = $edata;
//	End Edit Formats


	$fdata["isSeparate"] = false;




// the field's search options settings
		$fdata["defaultSearchOption"] = "Contains";

			// the default search options list
				$fdata["searchOptionsList"] = array("Contains", "Equals", "Starts with", "More than", "Less than", "Between", "Empty", NOT_EMPTY);
// the end of search options settings


//Filters settings
	$fdata["filterTotals"] = 0;
		$fdata["filterMultiSelect"] = 0;
			$fdata["filterFormat"] = "Values list";
		$fdata["showCollapsed"] = false;

		$fdata["sortValueType"] = 0;
		$fdata["numberOfVisibleItems"] = 10;

		$fdata["filterBy"] = 0;

	

	
	
//end of Filters settings


	$tdataunit["unit"] = $fdata;
		$tdataunit[".searchableFields"][] = "unit";


$tables_data["unit"]=&$tdataunit;
$field_labels["unit"] = &$fieldLabelsunit;
$fieldToolTips["unit"] = &$fieldToolTipsunit;
$placeHolders["unit"] = &$placeHoldersunit;
$page_titles["unit"] = &$pageTitlesunit;

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

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



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



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











function createSqlQuery_unit()
{
$proto0=array();
$proto0["m_strHead"] = "SELECT";
$proto0["m_strFieldList"] = "id,  	unit";
$proto0["m_strFrom"] = "FROM unit";
$proto0["m_strWhere"] = "";
$proto0["m_strOrderBy"] = "";
	
		;
			$proto0["cipherer"] = null;
$proto2=array();
$proto2["m_sql"] = "";
$proto2["m_uniontype"] = "SQLL_UNKNOWN";
	$obj = new SQLNonParsed(array(
	"m_sql" => ""
));

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

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

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

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

$proto6["m_sql"] = "id";
$proto6["m_srcTableName"] = "unit";
$proto6["m_expr"]=$obj;
$proto6["m_alias"] = "";
$obj = new SQLFieldListItem($proto6);

$proto0["m_fieldlist"][]=$obj;
						$proto8=array();
			$obj = new SQLField(array(
	"m_strName" => "unit",
	"m_strTable" => "unit",
	"m_srcTableName" => "unit"
));

$proto8["m_sql"] = "unit";
$proto8["m_srcTableName"] = "unit";
$proto8["m_expr"]=$obj;
$proto8["m_alias"] = "";
$obj = new SQLFieldListItem($proto8);

$proto0["m_fieldlist"][]=$obj;
$proto0["m_fromlist"] = array();
												$proto10=array();
$proto10["m_link"] = "SQLL_MAIN";
			$proto11=array();
$proto11["m_strName"] = "unit";
$proto11["m_srcTableName"] = "unit";
$proto11["m_columns"] = array();
$proto11["m_columns"][] = "id";
$proto11["m_columns"][] = "unit";
$obj = new SQLTable($proto11);

$proto10["m_table"] = $obj;
$proto10["m_sql"] = "unit";
$proto10["m_alias"] = "";
$proto10["m_srcTableName"] = "unit";
$proto12=array();
$proto12["m_sql"] = "";
$proto12["m_uniontype"] = "SQLL_UNKNOWN";
	$obj = new SQLNonParsed(array(
	"m_sql" => ""
));

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

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

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

	return $obj;
}
$queryData_unit = createSqlQuery_unit();


	
		;

		

$tdataunit[".sqlquery"] = $queryData_unit;



$tableEvents["unit"] = new eventsBase;
$tdataunit[".hasEvents"] = false;

?>