<?php
$tdatadocumenttype1 = array();
$tdatadocumenttype1[".searchableFields"] = array();
$tdatadocumenttype1[".ShortName"] = "documenttype1";
$tdatadocumenttype1[".OwnerID"] = "";
$tdatadocumenttype1[".OriginalTable"] = "documentType";


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

//	field labels
$fieldLabelsdocumenttype1 = array();
$fieldToolTipsdocumenttype1 = array();
$pageTitlesdocumenttype1 = array();
$placeHoldersdocumenttype1 = array();

if(mlang_getcurrentlang()=="English")
{
	$fieldLabelsdocumenttype1["English"] = array();
	$fieldToolTipsdocumenttype1["English"] = array();
	$placeHoldersdocumenttype1["English"] = array();
	$pageTitlesdocumenttype1["English"] = array();
	$fieldLabelsdocumenttype1["English"]["documentID"] = "#";
	$fieldToolTipsdocumenttype1["English"]["documentID"] = "";
	$placeHoldersdocumenttype1["English"]["documentID"] = "";
	$fieldLabelsdocumenttype1["English"]["DocumentTypeName"] = "ປະເພດເອກະສານ";
	$fieldToolTipsdocumenttype1["English"]["DocumentTypeName"] = "";
	$placeHoldersdocumenttype1["English"]["DocumentTypeName"] = "";
	if (count($fieldToolTipsdocumenttype1["English"]))
		$tdatadocumenttype1[".isUseToolTips"] = true;
}


	$tdatadocumenttype1[".NCSearch"] = true;



$tdatadocumenttype1[".shortTableName"] = "documenttype1";
$tdatadocumenttype1[".nSecOptions"] = 0;

$tdatadocumenttype1[".mainTableOwnerID"] = "";
$tdatadocumenttype1[".entityType"] = 0;
$tdatadocumenttype1[".connId"] = "eflejob_at_localhost";


$tdatadocumenttype1[".strOriginalTableName"] = "documentType";

	



$tdatadocumenttype1[".showAddInPopup"] = false;

$tdatadocumenttype1[".showEditInPopup"] = false;

$tdatadocumenttype1[".showViewInPopup"] = false;

	$tdatadocumenttype1[".listAjax"] = true;
//	temporary
//$tdatadocumenttype1[".listAjax"] = false;

	$tdatadocumenttype1[".audit"] = false;

	$tdatadocumenttype1[".locking"] = false;


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

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

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

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



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




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

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

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

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



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

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

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

$tdatadocumenttype1[".isUseAjaxSuggest"] = true;



			

$tdatadocumenttype1[".ajaxCodeSnippetAdded"] = false;

$tdatadocumenttype1[".buttonsAdded"] = false;

$tdatadocumenttype1[".addPageEvents"] = false;

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


$tdatadocumenttype1[".badgeColor"] = "1E90FF";


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

$tdatadocumenttype1[".googleLikeFields"] = array();
$tdatadocumenttype1[".googleLikeFields"][] = "documentID";
$tdatadocumenttype1[".googleLikeFields"][] = "DocumentTypeName";



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

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

$tdatadocumenttype1[".nPrinterSplitRecords"] = 40;

$tdatadocumenttype1[".geocodingEnabled"] = false;










$tdatadocumenttype1[".pageSize"] = 20;

$tdatadocumenttype1[".warnLeavingPages"] = true;



$tstrOrderBy = "";
$tdatadocumenttype1[".strOrderBy"] = $tstrOrderBy;

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


$tdatadocumenttype1[".sqlHead"] = "SELECT documentID,  	DocumentTypeName";
$tdatadocumenttype1[".sqlFrom"] = "FROM documentType";
$tdatadocumenttype1[".sqlWhereExpr"] = "";
$tdatadocumenttype1[".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;
$tdatadocumenttype1[".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;
$tdatadocumenttype1[".arrGroupsPerPage"] = $arrGPP;

$tdatadocumenttype1[".highlightSearchResults"] = true;

$tableKeysdocumenttype1 = array();
$tableKeysdocumenttype1[] = "documentID";
$tdatadocumenttype1[".Keys"] = $tableKeysdocumenttype1;


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




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


		$fdata["AutoInc"] = true;

	
			

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

		$fdata["sourceSingle"] = "documentID";

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

	
	
				$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["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


	$tdatadocumenttype1["documentID"] = $fdata;
		$tdatadocumenttype1[".searchableFields"][] = "documentID";
//	DocumentTypeName
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 2;
	$fdata["strName"] = "DocumentTypeName";
	$fdata["GoodName"] = "DocumentTypeName";
	$fdata["ownerTable"] = "documenttype";
	$fdata["Label"] = GetFieldLabel("documentType","DocumentTypeName");
	$fdata["FieldType"] = 200;


	
	
			

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

		$fdata["sourceSingle"] = "DocumentTypeName";

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

	
	
				$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["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


	$tdatadocumenttype1["DocumentTypeName"] = $fdata;
		$tdatadocumenttype1[".searchableFields"][] = "DocumentTypeName";


$tables_data["documentType"]=&$tdatadocumenttype1;
$field_labels["documentType"] = &$fieldLabelsdocumenttype1;
$fieldToolTips["documentType"] = &$fieldToolTipsdocumenttype1;
$placeHolders["documentType"] = &$placeHoldersdocumenttype1;
$page_titles["documentType"] = &$pageTitlesdocumenttype1;


changeTextControlsToDate( "documentType" );

// -----------------start  prepare master-details data arrays ------------------------------//
// tables which are detail tables for current table (master)

//if !@TABLE.bReportCrossTab

$detailsTablesData["documentType"] = array();
//endif

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



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



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











function createSqlQuery_documenttype1()
{
$proto0=array();
$proto0["m_strHead"] = "SELECT";
$proto0["m_strFieldList"] = "documentID,  	DocumentTypeName";
$proto0["m_strFrom"] = "FROM documentType";
$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" => "documentID",
	"m_strTable" => "documenttype",
	"m_srcTableName" => "documentType"
));

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

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

$proto8["m_sql"] = "DocumentTypeName";
$proto8["m_srcTableName"] = "documentType";
$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"] = "documenttype";
$proto11["m_srcTableName"] = "documentType";
$proto11["m_columns"] = array();
$proto11["m_columns"][] = "documentID";
$proto11["m_columns"][] = "DocumentTypeName";
$obj = new SQLTable($proto11);

$proto10["m_table"] = $obj;
$proto10["m_sql"] = "documentType";
$proto10["m_alias"] = "";
$proto10["m_srcTableName"] = "documentType";
$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"]="documentType";		
$obj = new SQLQuery($proto0);

	return $obj;
}
$queryData_documenttype1 = createSqlQuery_documenttype1();


	
		;

		

$tdatadocumenttype1[".sqlquery"] = $queryData_documenttype1;



$tdatadocumenttype1[".hasEvents"] = false;

?>