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


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

//	field labels
$fieldLabelscategories = array();
$fieldToolTipscategories = array();
$pageTitlescategories = array();
$placeHolderscategories = array();

if(mlang_getcurrentlang()=="English")
{
	$fieldLabelscategories["English"] = array();
	$fieldToolTipscategories["English"] = array();
	$placeHolderscategories["English"] = array();
	$pageTitlescategories["English"] = array();
	$fieldLabelscategories["English"]["ORDER_NBR"] = "ORDER NBR";
	$fieldToolTipscategories["English"]["ORDER_NBR"] = "";
	$placeHolderscategories["English"]["ORDER_NBR"] = "";
	$fieldLabelscategories["English"]["CATEG_NAME"] = "CATEGORY NAME";
	$fieldToolTipscategories["English"]["CATEG_NAME"] = "";
	$placeHolderscategories["English"]["CATEG_NAME"] = "";
	if (count($fieldToolTipscategories["English"]))
		$tdatacategories[".isUseToolTips"] = true;
}


	$tdatacategories[".NCSearch"] = true;



$tdatacategories[".shortTableName"] = "categories";
$tdatacategories[".nSecOptions"] = 0;

$tdatacategories[".mainTableOwnerID"] = "";
$tdatacategories[".entityType"] = 0;
$tdatacategories[".connId"] = "acmc_db_at_localhost";


$tdatacategories[".strOriginalTableName"] = "categories";

	



$tdatacategories[".showAddInPopup"] = false;

$tdatacategories[".showEditInPopup"] = false;

$tdatacategories[".showViewInPopup"] = false;

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


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

	$tdatacategories[".audit"] = false;

	$tdatacategories[".locking"] = false;


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

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

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

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



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




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

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

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

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



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

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

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

$tdatacategories[".isUseAjaxSuggest"] = true;

$tdatacategories[".rowHighlite"] = true;



												

$tdatacategories[".ajaxCodeSnippetAdded"] = false;

$tdatacategories[".buttonsAdded"] = false;

$tdatacategories[".addPageEvents"] = false;

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


$tdatacategories[".badgeColor"] = "D2AF80";


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

$tdatacategories[".googleLikeFields"] = array();
$tdatacategories[".googleLikeFields"][] = "ORDER_NBR";
$tdatacategories[".googleLikeFields"][] = "CATEG_NAME";



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

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

$tdatacategories[".nPrinterSplitRecords"] = 40;

$tdatacategories[".geocodingEnabled"] = false;










$tdatacategories[".pageSize"] = 10;

$tdatacategories[".warnLeavingPages"] = true;



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

$tdatacategories[".orderindexes"] = array();
	$tdatacategories[".orderindexes"][] = array(1, (1 ? "ASC" : "DESC"), "ORDER_NBR");



$tdatacategories[".sqlHead"] = "SELECT ORDER_NBR,  CATEG_NAME";
$tdatacategories[".sqlFrom"] = "FROM categories";
$tdatacategories[".sqlWhereExpr"] = "";
$tdatacategories[".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;
$tdatacategories[".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;
$tdatacategories[".arrGroupsPerPage"] = $arrGPP;

$tdatacategories[".highlightSearchResults"] = true;

$tableKeyscategories = array();
$tableKeyscategories[] = "ORDER_NBR";
$tdatacategories[".Keys"] = $tableKeyscategories;


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




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

	
	
	
			

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

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

	
	
				$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


	$tdatacategories["ORDER_NBR"] = $fdata;
		$tdatacategories[".searchableFields"][] = "ORDER_NBR";
//	CATEG_NAME
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 2;
	$fdata["strName"] = "CATEG_NAME";
	$fdata["GoodName"] = "CATEG_NAME";
	$fdata["ownerTable"] = "categories";
	$fdata["Label"] = GetFieldLabel("categories","CATEG_NAME");
	$fdata["FieldType"] = 200;

	
	
	
			

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

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

	
	
				$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


	$tdatacategories["CATEG_NAME"] = $fdata;
		$tdatacategories[".searchableFields"][] = "CATEG_NAME";


$tables_data["categories"]=&$tdatacategories;
$field_labels["categories"] = &$fieldLabelscategories;
$fieldToolTips["categories"] = &$fieldToolTipscategories;
$placeHolders["categories"] = &$placeHolderscategories;
$page_titles["categories"] = &$pageTitlescategories;

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

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



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



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











function createSqlQuery_categories()
{
$proto0=array();
$proto0["m_strHead"] = "SELECT";
$proto0["m_strFieldList"] = "ORDER_NBR,  CATEG_NAME";
$proto0["m_strFrom"] = "FROM categories";
$proto0["m_strWhere"] = "";
$proto0["m_strOrderBy"] = "ORDER BY ORDER_NBR";
	
		;
			$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" => "ORDER_NBR",
	"m_strTable" => "categories",
	"m_srcTableName" => "categories"
));

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

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

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

$proto10["m_table"] = $obj;
$proto10["m_sql"] = "categories";
$proto10["m_alias"] = "";
$proto10["m_srcTableName"] = "categories";
$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();
												$proto14=array();
						$obj = new SQLField(array(
	"m_strName" => "ORDER_NBR",
	"m_strTable" => "categories",
	"m_srcTableName" => "categories"
));

$proto14["m_column"]=$obj;
$proto14["m_bAsc"] = 1;
$proto14["m_nColumn"] = 0;
$obj = new SQLOrderByItem($proto14);

$proto0["m_orderby"][]=$obj;					
$proto0["m_srcTableName"]="categories";		
$obj = new SQLQuery($proto0);

	return $obj;
}
$queryData_categories = createSqlQuery_categories();


	
		;

		

$tdatacategories[".sqlquery"] = $queryData_categories;



$tableEvents["categories"] = new eventsBase;
$tdatacategories[".hasEvents"] = false;

?>