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


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

//	field labels
$fieldLabelssub_office = array();
$fieldToolTipssub_office = array();
$pageTitlessub_office = array();
$placeHolderssub_office = array();

if(mlang_getcurrentlang()=="English")
{
	$fieldLabelssub_office["English"] = array();
	$fieldToolTipssub_office["English"] = array();
	$placeHolderssub_office["English"] = array();
	$pageTitlessub_office["English"] = array();
	$fieldLabelssub_office["English"]["id"] = "Id";
	$fieldToolTipssub_office["English"]["id"] = "";
	$placeHolderssub_office["English"]["id"] = "";
	$fieldLabelssub_office["English"]["code"] = "Code";
	$fieldToolTipssub_office["English"]["code"] = "";
	$placeHolderssub_office["English"]["code"] = "";
	$fieldLabelssub_office["English"]["sub_office"] = "Sub Office";
	$fieldToolTipssub_office["English"]["sub_office"] = "";
	$placeHolderssub_office["English"]["sub_office"] = "";
	$fieldLabelssub_office["English"]["address"] = "Address";
	$fieldToolTipssub_office["English"]["address"] = "";
	$placeHolderssub_office["English"]["address"] = "";
	$fieldLabelssub_office["English"]["phone"] = "Phone";
	$fieldToolTipssub_office["English"]["phone"] = "";
	$placeHolderssub_office["English"]["phone"] = "";
	$fieldLabelssub_office["English"]["email"] = "Email";
	$fieldToolTipssub_office["English"]["email"] = "";
	$placeHolderssub_office["English"]["email"] = "";
	$fieldLabelssub_office["English"]["ud"] = "Ud";
	$fieldToolTipssub_office["English"]["ud"] = "";
	$placeHolderssub_office["English"]["ud"] = "";
	if (count($fieldToolTipssub_office["English"]))
		$tdatasub_office[".isUseToolTips"] = true;
}
if(mlang_getcurrentlang()=="sinhala")
{
	$fieldLabelssub_office["sinhala"] = array();
	$fieldToolTipssub_office["sinhala"] = array();
	$placeHolderssub_office["sinhala"] = array();
	$pageTitlessub_office["sinhala"] = array();
	$fieldLabelssub_office["sinhala"]["id"] = "Id";
	$fieldToolTipssub_office["sinhala"]["id"] = "";
	$placeHolderssub_office["sinhala"]["id"] = "";
	$fieldLabelssub_office["sinhala"]["code"] = "Code";
	$fieldToolTipssub_office["sinhala"]["code"] = "";
	$placeHolderssub_office["sinhala"]["code"] = "";
	$fieldLabelssub_office["sinhala"]["sub_office"] = "උප කාර්යාලය";
	$fieldToolTipssub_office["sinhala"]["sub_office"] = "";
	$placeHolderssub_office["sinhala"]["sub_office"] = "";
	$fieldLabelssub_office["sinhala"]["address"] = "ලිපිනය";
	$fieldToolTipssub_office["sinhala"]["address"] = "";
	$placeHolderssub_office["sinhala"]["address"] = "";
	$fieldLabelssub_office["sinhala"]["phone"] = "දුරකතන අංකය";
	$fieldToolTipssub_office["sinhala"]["phone"] = "";
	$placeHolderssub_office["sinhala"]["phone"] = "";
	$fieldLabelssub_office["sinhala"]["email"] = "විද්්‍යුත් ලිපිනය";
	$fieldToolTipssub_office["sinhala"]["email"] = "";
	$placeHolderssub_office["sinhala"]["email"] = "";
	$fieldLabelssub_office["sinhala"]["ud"] = "Ud";
	$fieldToolTipssub_office["sinhala"]["ud"] = "";
	$placeHolderssub_office["sinhala"]["ud"] = "";
	if (count($fieldToolTipssub_office["sinhala"]))
		$tdatasub_office[".isUseToolTips"] = true;
}


	$tdatasub_office[".NCSearch"] = true;



$tdatasub_office[".shortTableName"] = "sub_office";
$tdatasub_office[".nSecOptions"] = 0;

$tdatasub_office[".mainTableOwnerID"] = "";
$tdatasub_office[".entityType"] = 0;
$tdatasub_office[".connId"] = "allo_at_localhost";


$tdatasub_office[".strOriginalTableName"] = "sub_office";

	



$tdatasub_office[".showAddInPopup"] = false;

$tdatasub_office[".showEditInPopup"] = false;

$tdatasub_office[".showViewInPopup"] = false;

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


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

	$tdatasub_office[".audit"] = true;

	$tdatasub_office[".locking"] = true;


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

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

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

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



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




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

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

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

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



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

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

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

$tdatasub_office[".isUseAjaxSuggest"] = true;

$tdatasub_office[".rowHighlite"] = true;



																								

$tdatasub_office[".ajaxCodeSnippetAdded"] = false;

$tdatasub_office[".buttonsAdded"] = false;

$tdatasub_office[".addPageEvents"] = false;

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


$tdatasub_office[".badgeColor"] = "6DA5C8";


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

$tdatasub_office[".googleLikeFields"] = array();
$tdatasub_office[".googleLikeFields"][] = "id";
$tdatasub_office[".googleLikeFields"][] = "code";
$tdatasub_office[".googleLikeFields"][] = "sub_office";
$tdatasub_office[".googleLikeFields"][] = "address";
$tdatasub_office[".googleLikeFields"][] = "phone";
$tdatasub_office[".googleLikeFields"][] = "email";
$tdatasub_office[".googleLikeFields"][] = "ud";



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

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

$tdatasub_office[".nPrinterSplitRecords"] = 40;

$tdatasub_office[".geocodingEnabled"] = false;










$tdatasub_office[".pageSize"] = 30;

$tdatasub_office[".warnLeavingPages"] = true;



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

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


$tdatasub_office[".sqlHead"] = "SELECT id,  	code,  	sub_office,  	address,  	phone,  	email,  	ud";
$tdatasub_office[".sqlFrom"] = "FROM sub_office";
$tdatasub_office[".sqlWhereExpr"] = "";
$tdatasub_office[".sqlTail"] = "";

//fill array of tabs for list page
$arrGridTabs = array();
$arrGridTabs[] = array(
	'tabId' => "",
	'name' => "All data",
	'nameType' => 'Text',
	'where' => "",
	'showRowCount' => 0,
	'hideEmpty' => 0,
);
$tdatasub_office[".arrGridTabs"] = $arrGridTabs;









//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;
$tdatasub_office[".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;
$tdatasub_office[".arrGroupsPerPage"] = $arrGPP;

$tdatasub_office[".highlightSearchResults"] = true;

$tableKeyssub_office = array();
$tableKeyssub_office[] = "id";
$tdatasub_office[".Keys"] = $tableKeyssub_office;


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




//	id
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 1;
	$fdata["strName"] = "id";
	$fdata["GoodName"] = "id";
	$fdata["ownerTable"] = "sub_office";
	$fdata["Label"] = GetFieldLabel("sub_office","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


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

	
	
	
			

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

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

	
	
				$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["EditParams"].= " maxlength=250";

		$edata["controlWidth"] = 200;

//	Begin validation
	$edata["validateAs"] = array();
	$edata["validateAs"]["basicValidate"] = array();
	$edata["validateAs"]["customMessages"] = array();
						$edata["validateAs"]["basicValidate"][] = "IsRequired";
			$edata["validateAs"]["basicValidate"][] = "DenyDuplicated";
	$edata["validateAs"]["customMessages"]["DenyDuplicated"] = array("message" => "Value %value% already exists", "messageType" => "Text");

	
	//	End validation

	
			
	
		$edata["denyDuplicates"] = true;

	
	$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


	$tdatasub_office["code"] = $fdata;
		$tdatasub_office[".searchableFields"][] = "code";
//	sub_office
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 3;
	$fdata["strName"] = "sub_office";
	$fdata["GoodName"] = "sub_office";
	$fdata["ownerTable"] = "sub_office";
	$fdata["Label"] = GetFieldLabel("sub_office","sub_office");
	$fdata["FieldType"] = 200;

	
	
	
			

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

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

	
	
				$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["EditParams"].= " maxlength=250";

		$edata["controlWidth"] = 200;

//	Begin validation
	$edata["validateAs"] = array();
	$edata["validateAs"]["basicValidate"] = array();
	$edata["validateAs"]["customMessages"] = array();
						$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


	$tdatasub_office["sub_office"] = $fdata;
		$tdatasub_office[".searchableFields"][] = "sub_office";
//	address
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 4;
	$fdata["strName"] = "address";
	$fdata["GoodName"] = "address";
	$fdata["ownerTable"] = "sub_office";
	$fdata["Label"] = GetFieldLabel("sub_office","address");
	$fdata["FieldType"] = 200;

	
	
	
			

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

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

	
	
				$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["EditParams"].= " maxlength=250";

		$edata["controlWidth"] = 200;

//	Begin validation
	$edata["validateAs"] = array();
	$edata["validateAs"]["basicValidate"] = array();
	$edata["validateAs"]["customMessages"] = array();
						$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


	$tdatasub_office["address"] = $fdata;
		$tdatasub_office[".searchableFields"][] = "address";
//	phone
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 5;
	$fdata["strName"] = "phone";
	$fdata["GoodName"] = "phone";
	$fdata["ownerTable"] = "sub_office";
	$fdata["Label"] = GetFieldLabel("sub_office","phone");
	$fdata["FieldType"] = 200;

	
	
	
			

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

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

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

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

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

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

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

		$edata["controlWidth"] = 200;

//	Begin validation
	$edata["validateAs"] = array();
	$edata["validateAs"]["basicValidate"] = array();
	$edata["validateAs"]["customMessages"] = array();
				$edata["validateAs"]["basicValidate"][] = getJsValidatorName("Number");
							
	
	//	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


	$tdatasub_office["phone"] = $fdata;
		$tdatasub_office[".searchableFields"][] = "phone";
//	email
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 6;
	$fdata["strName"] = "email";
	$fdata["GoodName"] = "email";
	$fdata["ownerTable"] = "sub_office";
	$fdata["Label"] = GetFieldLabel("sub_office","email");
	$fdata["FieldType"] = 200;

	
	
	
			

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

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

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

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

		$edata["controlWidth"] = 200;

//	Begin validation
	$edata["validateAs"] = array();
	$edata["validateAs"]["basicValidate"] = array();
	$edata["validateAs"]["customMessages"] = array();
				$edata["validateAs"]["basicValidate"][] = getJsValidatorName("Email");
							
	
	//	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


	$tdatasub_office["email"] = $fdata;
		$tdatasub_office[".searchableFields"][] = "email";
//	ud
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 7;
	$fdata["strName"] = "ud";
	$fdata["GoodName"] = "ud";
	$fdata["ownerTable"] = "sub_office";
	$fdata["Label"] = GetFieldLabel("sub_office","ud");
	$fdata["FieldType"] = 200;

	
	
	
			

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

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

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

		$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


	$tdatasub_office["ud"] = $fdata;
		$tdatasub_office[".searchableFields"][] = "ud";


$tables_data["sub_office"]=&$tdatasub_office;
$field_labels["sub_office"] = &$fieldLabelssub_office;
$fieldToolTips["sub_office"] = &$fieldToolTipssub_office;
$placeHolders["sub_office"] = &$placeHolderssub_office;
$page_titles["sub_office"] = &$pageTitlessub_office;

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

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



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



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











function createSqlQuery_sub_office()
{
$proto0=array();
$proto0["m_strHead"] = "SELECT";
$proto0["m_strFieldList"] = "id,  	code,  	sub_office,  	address,  	phone,  	email,  	ud";
$proto0["m_strFrom"] = "FROM sub_office";
$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" => "sub_office",
	"m_srcTableName" => "sub_office"
));

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

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

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

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

$proto10["m_sql"] = "sub_office";
$proto10["m_srcTableName"] = "sub_office";
$proto10["m_expr"]=$obj;
$proto10["m_alias"] = "";
$obj = new SQLFieldListItem($proto10);

$proto0["m_fieldlist"][]=$obj;
						$proto12=array();
			$obj = new SQLField(array(
	"m_strName" => "address",
	"m_strTable" => "sub_office",
	"m_srcTableName" => "sub_office"
));

$proto12["m_sql"] = "address";
$proto12["m_srcTableName"] = "sub_office";
$proto12["m_expr"]=$obj;
$proto12["m_alias"] = "";
$obj = new SQLFieldListItem($proto12);

$proto0["m_fieldlist"][]=$obj;
						$proto14=array();
			$obj = new SQLField(array(
	"m_strName" => "phone",
	"m_strTable" => "sub_office",
	"m_srcTableName" => "sub_office"
));

$proto14["m_sql"] = "phone";
$proto14["m_srcTableName"] = "sub_office";
$proto14["m_expr"]=$obj;
$proto14["m_alias"] = "";
$obj = new SQLFieldListItem($proto14);

$proto0["m_fieldlist"][]=$obj;
						$proto16=array();
			$obj = new SQLField(array(
	"m_strName" => "email",
	"m_strTable" => "sub_office",
	"m_srcTableName" => "sub_office"
));

$proto16["m_sql"] = "email";
$proto16["m_srcTableName"] = "sub_office";
$proto16["m_expr"]=$obj;
$proto16["m_alias"] = "";
$obj = new SQLFieldListItem($proto16);

$proto0["m_fieldlist"][]=$obj;
						$proto18=array();
			$obj = new SQLField(array(
	"m_strName" => "ud",
	"m_strTable" => "sub_office",
	"m_srcTableName" => "sub_office"
));

$proto18["m_sql"] = "ud";
$proto18["m_srcTableName"] = "sub_office";
$proto18["m_expr"]=$obj;
$proto18["m_alias"] = "";
$obj = new SQLFieldListItem($proto18);

$proto0["m_fieldlist"][]=$obj;
$proto0["m_fromlist"] = array();
												$proto20=array();
$proto20["m_link"] = "SQLL_MAIN";
			$proto21=array();
$proto21["m_strName"] = "sub_office";
$proto21["m_srcTableName"] = "sub_office";
$proto21["m_columns"] = array();
$proto21["m_columns"][] = "id";
$proto21["m_columns"][] = "code";
$proto21["m_columns"][] = "sub_office";
$proto21["m_columns"][] = "address";
$proto21["m_columns"][] = "phone";
$proto21["m_columns"][] = "email";
$proto21["m_columns"][] = "ud";
$obj = new SQLTable($proto21);

$proto20["m_table"] = $obj;
$proto20["m_sql"] = "sub_office";
$proto20["m_alias"] = "";
$proto20["m_srcTableName"] = "sub_office";
$proto22=array();
$proto22["m_sql"] = "";
$proto22["m_uniontype"] = "SQLL_UNKNOWN";
	$obj = new SQLNonParsed(array(
	"m_sql" => ""
));

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

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

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

	return $obj;
}
$queryData_sub_office = createSqlQuery_sub_office();


	
		;

							

$tdatasub_office[".sqlquery"] = $queryData_sub_office;



$tableEvents["sub_office"] = new eventsBase;
$tdatasub_office[".hasEvents"] = false;

?>