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


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

//	field labels
$fieldLabelscategory = array();
$fieldToolTipscategory = array();
$pageTitlescategory = array();
$placeHolderscategory = array();

if(mlang_getcurrentlang()=="English")
{
	$fieldLabelscategory["English"] = array();
	$fieldToolTipscategory["English"] = array();
	$placeHolderscategory["English"] = array();
	$pageTitlescategory["English"] = array();
	$fieldLabelscategory["English"]["CateID"] = "#";
	$fieldToolTipscategory["English"]["CateID"] = "";
	$placeHolderscategory["English"]["CateID"] = "";
	$fieldLabelscategory["English"]["CateName"] = "ຊື່ປະເພດສີນຄ້າ";
	$fieldToolTipscategory["English"]["CateName"] = "";
	$placeHolderscategory["English"]["CateName"] = "";
	if (count($fieldToolTipscategory["English"]))
		$tdatacategory[".isUseToolTips"] = true;
}


	$tdatacategory[".NCSearch"] = true;



$tdatacategory[".shortTableName"] = "category";
$tdatacategory[".nSecOptions"] = 0;

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


$tdatacategory[".strOriginalTableName"] = "category";

	



$tdatacategory[".showAddInPopup"] = false;

$tdatacategory[".showEditInPopup"] = false;

$tdatacategory[".showViewInPopup"] = false;

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

	$tdatacategory[".audit"] = false;

	$tdatacategory[".locking"] = false;


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

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

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

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



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




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

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

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

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



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

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

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

$tdatacategory[".isUseAjaxSuggest"] = true;



			

$tdatacategory[".ajaxCodeSnippetAdded"] = false;

$tdatacategory[".buttonsAdded"] = false;

$tdatacategory[".addPageEvents"] = false;

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


$tdatacategory[".badgeColor"] = "9ACD32";


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

$tdatacategory[".googleLikeFields"] = array();
$tdatacategory[".googleLikeFields"][] = "CateID";
$tdatacategory[".googleLikeFields"][] = "CateName";



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

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

$tdatacategory[".nPrinterSplitRecords"] = 40;

$tdatacategory[".geocodingEnabled"] = false;










$tdatacategory[".pageSize"] = 20;

$tdatacategory[".warnLeavingPages"] = true;



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

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


$tdatacategory[".sqlHead"] = "SELECT CateID,  	CateName";
$tdatacategory[".sqlFrom"] = "FROM category";
$tdatacategory[".sqlWhereExpr"] = "";
$tdatacategory[".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;
$tdatacategory[".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;
$tdatacategory[".arrGroupsPerPage"] = $arrGPP;

$tdatacategory[".highlightSearchResults"] = true;

$tableKeyscategory = array();
$tableKeyscategory[] = "CateID";
$tdatacategory[".Keys"] = $tableKeyscategory;


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




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


		$fdata["AutoInc"] = true;

	
			

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

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

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

	
	
				$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


	$tdatacategory["CateID"] = $fdata;
		$tdatacategory[".searchableFields"][] = "CateID";
//	CateName
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 2;
	$fdata["strName"] = "CateName";
	$fdata["GoodName"] = "CateName";
	$fdata["ownerTable"] = "category";
	$fdata["Label"] = GetFieldLabel("category","CateName");
	$fdata["FieldType"] = 200;


	
	
			

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

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

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

	
	
				$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=255";

		$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


	$tdatacategory["CateName"] = $fdata;
		$tdatacategory[".searchableFields"][] = "CateName";


$tables_data["category"]=&$tdatacategory;
$field_labels["category"] = &$fieldLabelscategory;
$fieldToolTips["category"] = &$fieldToolTipscategory;
$placeHolders["category"] = &$placeHolderscategory;
$page_titles["category"] = &$pageTitlescategory;


changeTextControlsToDate( "category" );

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

//if !@TABLE.bReportCrossTab

$detailsTablesData["category"] = array();
//	productitem
	
	

		$dIndex = 0;
	$detailsParam = array();
	$detailsParam["dDataSourceTable"]="productitem";
		$detailsParam["dOriginalTable"] = "productitem";



		
		$detailsParam["dType"]=PAGE_LIST;
	$detailsParam["dShortTable"] = "productitem";
	$detailsParam["dCaptionTable"] = GetTableCaption("productitem");
	$detailsParam["masterKeys"] =array();
	$detailsParam["detailKeys"] =array();


		
	$detailsTablesData["category"][$dIndex] = $detailsParam;

	
		$detailsTablesData["category"][$dIndex]["masterKeys"] = array();

	$detailsTablesData["category"][$dIndex]["masterKeys"][]="CateID";

				$detailsTablesData["category"][$dIndex]["detailKeys"] = array();

	$detailsTablesData["category"][$dIndex]["detailKeys"][]="CateID";
//endif

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



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



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











function createSqlQuery_category()
{
$proto0=array();
$proto0["m_strHead"] = "SELECT";
$proto0["m_strFieldList"] = "CateID,  	CateName";
$proto0["m_strFrom"] = "FROM category";
$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" => "CateID",
	"m_strTable" => "category",
	"m_srcTableName" => "category"
));

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

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

$proto8["m_sql"] = "CateName";
$proto8["m_srcTableName"] = "category";
$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"] = "category";
$proto11["m_srcTableName"] = "category";
$proto11["m_columns"] = array();
$proto11["m_columns"][] = "CateID";
$proto11["m_columns"][] = "CateName";
$obj = new SQLTable($proto11);

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

	return $obj;
}
$queryData_category = createSqlQuery_category();


	
		;

		

$tdatacategory[".sqlquery"] = $queryData_category;



$tdatacategory[".hasEvents"] = false;

?>