<?php
$tdatacalls=array();
	$tdatacalls[".NumberOfChars"]=80; 
	$tdatacalls[".ShortName"]="calls";
	$tdatacalls[".OwnerID"]="Executive Name";
	$tdatacalls[".OriginalTable"]="calls";


	
//	field labels
$fieldLabelscalls = array();
if(mlang_getcurrentlang()=="English")
{
	$fieldLabelscalls["English"]=array();
	$fieldToolTipscalls["English"]=array();
	$fieldLabelscalls["English"]["idCalls"] = "Id Calls";
	$fieldToolTipscalls["English"]["idCalls"] = "";
	$fieldLabelscalls["English"]["Date"] = "Date";
	$fieldToolTipscalls["English"]["Date"] = "";
	$fieldLabelscalls["English"]["Call_Details"] = "Call Details";
	$fieldToolTipscalls["English"]["Call Details"] = "";
	$fieldLabelscalls["English"]["Executive_Name"] = "Executive Name";
	$fieldToolTipscalls["English"]["Executive Name"] = "";
	$fieldLabelscalls["English"]["Customer_Name"] = "Customer Name";
	$fieldToolTipscalls["English"]["Customer Name"] = "";
	if (count($fieldToolTipscalls["English"])){
		$tdatacalls[".isUseToolTips"]=true;
	}
}


	
	$tdatacalls[".NCSearch"]=true;

	

$tdatacalls[".shortTableName"] = "calls";
$tdatacalls[".nSecOptions"] = 2;
$tdatacalls[".recsPerRowList"] = 1;	
$tdatacalls[".tableGroupBy"] = "0";
$tdatacalls[".mainTableOwnerID"] = "Executive Name";
$tdatacalls[".moveNext"] = 1;




$tdatacalls[".showAddInPopup"] = false;

$tdatacalls[".showEditInPopup"] = false;

$tdatacalls[".showViewInPopup"] = false;


$tdatacalls[".fieldsForRegister"] = array();

$tdatacalls[".listAjax"] = false;

	$tdatacalls[".audit"] = false;

	$tdatacalls[".locking"] = false;
	
$tdatacalls[".listIcons"] = true;
$tdatacalls[".inlineEdit"] = true;
$tdatacalls[".view"] = true;




$tdatacalls[".showSimpleSearchOptions"] = false;

$tdatacalls[".showSearchPanel"] = true;


$tdatacalls[".isUseAjaxSuggest"] = true;

$tdatacalls[".rowHighlite"] = true;


// button handlers file names

$tdatacalls[".addPageEvents"] = false;

$tdatacalls[".arrKeyFields"][] = "idCalls";

// use datepicker for search panel
$tdatacalls[".isUseCalendarForSearch"] = true;

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

$tdatacalls[".isUseiBox"] = false;



$tdatacalls[".isUseInlineAdd"] = true;

$tdatacalls[".isUseInlineEdit"] = true;
$tdatacalls[".isUseInlineJs"] = $tdatacalls[".isUseInlineAdd"] || $tdatacalls[".isUseInlineEdit"];

$tdatacalls[".allSearchFields"] = array();



$tdatacalls[".googleLikeFields"][] = "idCalls";
$tdatacalls[".googleLikeFields"][] = "Date";
$tdatacalls[".googleLikeFields"][] = "Call Details";
$tdatacalls[".googleLikeFields"][] = "Executive Name";
$tdatacalls[".googleLikeFields"][] = "Customer Name";



$tdatacalls[".advSearchFields"][] = "idCalls";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("idCalls", $tdatacalls[".allSearchFields"])) 
{
	$tdatacalls[".allSearchFields"][] = "idCalls";	
}
$tdatacalls[".advSearchFields"][] = "Date";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("Date", $tdatacalls[".allSearchFields"])) 
{
	$tdatacalls[".allSearchFields"][] = "Date";	
}
$tdatacalls[".advSearchFields"][] = "Call Details";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("Call Details", $tdatacalls[".allSearchFields"])) 
{
	$tdatacalls[".allSearchFields"][] = "Call Details";	
}
$tdatacalls[".advSearchFields"][] = "Executive Name";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("Executive Name", $tdatacalls[".allSearchFields"])) 
{
	$tdatacalls[".allSearchFields"][] = "Executive Name";	
}
$tdatacalls[".advSearchFields"][] = "Customer Name";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("Customer Name", $tdatacalls[".allSearchFields"])) 
{
	$tdatacalls[".allSearchFields"][] = "Customer Name";	
}

$tdatacalls[".isTableType"] = "list";


	

$tdatacalls[".isDisplayLoading"] = true;

$tdatacalls[".isResizeColumns"] = false;





$tdatacalls[".pageSize"] = 20;

$gstrOrderBy = "ORDER BY idCalls DESC";
if(strlen($gstrOrderBy) && strtolower(substr($gstrOrderBy,0,8))!="order by")
	$gstrOrderBy = "order by ".$gstrOrderBy;
$tdatacalls[".strOrderBy"] = $gstrOrderBy;
	
$tdatacalls[".orderindexes"] = array();
$tdatacalls[".orderindexes"][] = array(1, (0 ? "ASC" : "DESC"), "idCalls");

$tdatacalls[".sqlHead"] = "SELECT idCalls,  `Date`,  `Call Details`,  `Executive Name`,  `Customer Name`";
$tdatacalls[".sqlFrom"] = "FROM calls";
$tdatacalls[".sqlWhereExpr"] = "";
$tdatacalls[".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;
$tdatacalls[".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;
$tdatacalls[".arrGroupsPerPage"] = $arrGPP;

	$tableKeys = array();
	$tableKeys[] = "idCalls";
	$tdatacalls[".Keys"] = $tableKeys;

//	idCalls
	$fdata = array();
	$fdata["strName"] = "idCalls";
	$fdata["ownerTable"] = "calls";
		$fdata["Label"]="Id Calls"; 
	
		
		
	$fdata["FieldType"]= 3;
	
		$fdata["AutoInc"]=true;
	
			$fdata["UseiBox"] = false;
	
	$fdata["EditFormat"]= "Text field";
	$fdata["ViewFormat"]= "";
	
		
		
		
		
		$fdata["NeedEncode"]=true;
	
	$fdata["GoodName"]= "idCalls";
	
		$fdata["FullName"]= "idCalls";
	
		$fdata["IsRequired"]=true; 
	
		
		
		
		
				$fdata["Index"]= 1;
				$fdata["EditParams"]="";
			
		$fdata["bListPage"]=true; 
	
		
		
		
		
		$fdata["bViewPage"]=true; 
	
		
		
		
	//Begin validation
	$fdata["validateAs"] = array();
				$fdata["validateAs"]["basicValidate"][] = getJsValidatorName("Number");	
						$fdata["validateAs"]["basicValidate"][] = "IsRequired";
	
		//End validation
	
				$fdata["FieldPermissions"]=true;
	
		
				
		
		
		
			$tdatacalls["idCalls"]=$fdata;
//	Date
	$fdata = array();
	$fdata["strName"] = "Date";
	$fdata["ownerTable"] = "calls";
		
		
		
	$fdata["FieldType"]= 135;
	
		
			$fdata["UseiBox"] = false;
	
	$fdata["EditFormat"]= "Date";
	$fdata["ViewFormat"]= "Datetime";
	
		$fdata["ShowTime"]=true; 
	
		
		
		
		$fdata["NeedEncode"]=true;
	
	$fdata["GoodName"]= "Date";
	
		$fdata["FullName"]= "`Date`";
	
		$fdata["IsRequired"]=true; 
	
		
		
		
		
				$fdata["Index"]= 2;
		$fdata["DateEditType"] = 11; 
	$fdata["InitialYearFactor"] = 100; 
	$fdata["LastYearFactor"] = 10; 
			
		$fdata["bListPage"]=true; 
	
		$fdata["bAddPage"]=true; 
	
		$fdata["bInlineAdd"]=true; 
	
		
		$fdata["bInlineEdit"]=true; 
	
		$fdata["bViewPage"]=true; 
	
		
		
		
	//Begin validation
	$fdata["validateAs"] = array();
						$fdata["validateAs"]["basicValidate"][] = "IsRequired";
	
		//End validation
	
				$fdata["FieldPermissions"]=true;
	
		
				
		
		
		
			$tdatacalls["Date"]=$fdata;
//	Call Details
	$fdata = array();
	$fdata["strName"] = "Call Details";
	$fdata["ownerTable"] = "calls";
		
		
		
	$fdata["FieldType"]= 200;
	
		
			$fdata["UseiBox"] = false;
	
	$fdata["EditFormat"]= "Text area";
	$fdata["ViewFormat"]= "";
	
		
		
		
		
		$fdata["NeedEncode"]=true;
	
	$fdata["GoodName"]= "Call_Details";
	
		$fdata["FullName"]= "`Call Details`";
	
		$fdata["IsRequired"]=true; 
	
		
		
		
		
				$fdata["Index"]= 3;
			$fdata["EditParams"] = "";
			$fdata["EditParams"].= " rows=100";
		$fdata["nRows"] = 100;
			$fdata["EditParams"].= " cols=200";
		$fdata["nCols"] = 200;
		
		$fdata["bListPage"]=true; 
	
		$fdata["bAddPage"]=true; 
	
		$fdata["bInlineAdd"]=true; 
	
		
		$fdata["bInlineEdit"]=true; 
	
		$fdata["bViewPage"]=true; 
	
		
		
		
	//Begin validation
	$fdata["validateAs"] = array();
						$fdata["validateAs"]["basicValidate"][] = "IsRequired";
	
		//End validation
	
				$fdata["FieldPermissions"]=true;
	
		
				
		
		
		
			$tdatacalls["Call Details"]=$fdata;
//	Executive Name
	$fdata = array();
	$fdata["strName"] = "Executive Name";
	$fdata["ownerTable"] = "calls";
		
		
		
	$fdata["FieldType"]= 200;
	
		
			$fdata["UseiBox"] = false;
	
	$fdata["EditFormat"]= "Text field";
	$fdata["ViewFormat"]= "";
	
		
		
		
		
		$fdata["NeedEncode"]=true;
	
	$fdata["GoodName"]= "Executive_Name";
	
		$fdata["FullName"]= "`Executive Name`";
	
		$fdata["IsRequired"]=true; 
	
		
		
		
		
				$fdata["Index"]= 4;
				$fdata["EditParams"]="";
			$fdata["EditParams"].= " maxlength=45";
		
		$fdata["bListPage"]=true; 
	
		$fdata["bAddPage"]=true; 
	
		
		
		$fdata["bInlineEdit"]=true; 
	
		$fdata["bViewPage"]=true; 
	
		
		
		
	//Begin validation
	$fdata["validateAs"] = array();
						$fdata["validateAs"]["basicValidate"][] = "IsRequired";
	
		//End validation
	
				$fdata["FieldPermissions"]=true;
	
		
				
		
		
		
			$tdatacalls["Executive Name"]=$fdata;
//	Customer Name
	$fdata = array();
	$fdata["strName"] = "Customer Name";
	$fdata["ownerTable"] = "calls";
		
		
		
	$fdata["FieldType"]= 200;
	
		
			$fdata["UseiBox"] = false;
	
	$fdata["EditFormat"]= "Text field";
	$fdata["ViewFormat"]= "";
	
		
		
		
		
		$fdata["NeedEncode"]=true;
	
	$fdata["GoodName"]= "Customer_Name";
	
		$fdata["FullName"]= "`Customer Name`";
	
		
		
		
		
		
				$fdata["Index"]= 5;
				$fdata["EditParams"]="";
			$fdata["EditParams"].= " maxlength=100";
		
		$fdata["bListPage"]=true; 
	
		$fdata["bAddPage"]=true; 
	
		$fdata["bInlineAdd"]=true; 
	
		
		$fdata["bInlineEdit"]=true; 
	
		$fdata["bViewPage"]=true; 
	
		
		
		
	//Begin validation
	$fdata["validateAs"] = array();
		
		//End validation
	
				$fdata["FieldPermissions"]=true;
	
		
				
		
		
		
			$tdatacalls["Customer Name"]=$fdata;

	
$tables_data["calls"]=&$tdatacalls;
$field_labels["calls"] = &$fieldLabelscalls;
$fieldToolTips["calls"] = &$fieldToolTipscalls;

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

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

$mIndex = 1-1;
			$strOriginalDetailsTable="customer_list";
	$masterTablesData["calls"][$mIndex] = array(
		  "mDataSourceTable"=>"Pending Customers"
		, "mOriginalTable" => $strOriginalDetailsTable
		, "mShortTable" => "Pending_Customers"
		, "masterKeys" => array()
		, "detailKeys" => array()
		, "dispChildCount" => "1"
		, "hideChild" => "0"	
		, "dispInfo" => "1"								
		, "previewOnList" => 1
		, "previewOnAdd" => 0
		, "previewOnEdit" => 1
		, "previewOnView" => 1
	);	
		$masterTablesData["calls"][$mIndex]["masterKeys"][]="Customer Name";
		$masterTablesData["calls"][$mIndex]["detailKeys"][]="Customer Name";

$mIndex = 2-1;
			$strOriginalDetailsTable="customer_list";
	$masterTablesData["calls"][$mIndex] = array(
		  "mDataSourceTable"=>"Review List"
		, "mOriginalTable" => $strOriginalDetailsTable
		, "mShortTable" => "Review_List"
		, "masterKeys" => array()
		, "detailKeys" => array()
		, "dispChildCount" => "1"
		, "hideChild" => "0"	
		, "dispInfo" => "1"								
		, "previewOnList" => 1
		, "previewOnAdd" => 0
		, "previewOnEdit" => 1
		, "previewOnView" => 1
	);	
		$masterTablesData["calls"][$mIndex]["masterKeys"][]="Customer Name";
		$masterTablesData["calls"][$mIndex]["detailKeys"][]="Customer Name";

$mIndex = 3-1;
			$strOriginalDetailsTable="customer_list";
	$masterTablesData["calls"][$mIndex] = array(
		  "mDataSourceTable"=>"Inactive customer_list"
		, "mOriginalTable" => $strOriginalDetailsTable
		, "mShortTable" => "Inactive_customer_list"
		, "masterKeys" => array()
		, "detailKeys" => array()
		, "dispChildCount" => "1"
		, "hideChild" => "0"	
		, "dispInfo" => "1"								
		, "previewOnList" => 0
		, "previewOnAdd" => 0
		, "previewOnEdit" => 0
		, "previewOnView" => 1
	);	
		$masterTablesData["calls"][$mIndex]["masterKeys"][]="Customer Name";
		$masterTablesData["calls"][$mIndex]["detailKeys"][]="Customer Name";

$mIndex = 4-1;
			$strOriginalDetailsTable="customer_list";
	$masterTablesData["calls"][$mIndex] = array(
		  "mDataSourceTable"=>"Short-Listed Customers"
		, "mOriginalTable" => $strOriginalDetailsTable
		, "mShortTable" => "Short_Listed_Customers"
		, "masterKeys" => array()
		, "detailKeys" => array()
		, "dispChildCount" => "1"
		, "hideChild" => "0"	
		, "dispInfo" => "1"								
		, "previewOnList" => 0
		, "previewOnAdd" => 0
		, "previewOnEdit" => 1
		, "previewOnView" => 1
	);	
		$masterTablesData["calls"][$mIndex]["masterKeys"][]="Customer Name";
		$masterTablesData["calls"][$mIndex]["detailKeys"][]="Customer Name";

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

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










$proto772=array();
$proto772["m_strHead"] = "SELECT";
$proto772["m_strFieldList"] = "idCalls,  `Date`,  `Call Details`,  `Executive Name`,  `Customer Name`";
$proto772["m_strFrom"] = "FROM calls";
$proto772["m_strWhere"] = "";
$proto772["m_strOrderBy"] = "ORDER BY idCalls DESC";
$proto772["m_strTail"] = "";
$proto773=array();
$proto773["m_sql"] = "";
$proto773["m_uniontype"] = "SQLL_UNKNOWN";
	$obj = new SQLNonParsed(array(
	"m_sql" => ""
));

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

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

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

$proto772["m_having"] = $obj;
$proto772["m_fieldlist"] = array();
						$proto777=array();
			$obj = new SQLField(array(
	"m_strName" => "idCalls",
	"m_strTable" => "calls"
));

$proto777["m_expr"]=$obj;
$proto777["m_alias"] = "";
$obj = new SQLFieldListItem($proto777);

$proto772["m_fieldlist"][]=$obj;
						$proto779=array();
			$obj = new SQLField(array(
	"m_strName" => "Date",
	"m_strTable" => "calls"
));

$proto779["m_expr"]=$obj;
$proto779["m_alias"] = "";
$obj = new SQLFieldListItem($proto779);

$proto772["m_fieldlist"][]=$obj;
						$proto781=array();
			$obj = new SQLField(array(
	"m_strName" => "Call Details",
	"m_strTable" => "calls"
));

$proto781["m_expr"]=$obj;
$proto781["m_alias"] = "";
$obj = new SQLFieldListItem($proto781);

$proto772["m_fieldlist"][]=$obj;
						$proto783=array();
			$obj = new SQLField(array(
	"m_strName" => "Executive Name",
	"m_strTable" => "calls"
));

$proto783["m_expr"]=$obj;
$proto783["m_alias"] = "";
$obj = new SQLFieldListItem($proto783);

$proto772["m_fieldlist"][]=$obj;
						$proto785=array();
			$obj = new SQLField(array(
	"m_strName" => "Customer Name",
	"m_strTable" => "calls"
));

$proto785["m_expr"]=$obj;
$proto785["m_alias"] = "";
$obj = new SQLFieldListItem($proto785);

$proto772["m_fieldlist"][]=$obj;
$proto772["m_fromlist"] = array();
												$proto787=array();
$proto787["m_link"] = "SQLL_MAIN";
			$proto788=array();
$proto788["m_strName"] = "calls";
$proto788["m_columns"] = array();
$proto788["m_columns"][] = "idCalls";
$proto788["m_columns"][] = "Date";
$proto788["m_columns"][] = "Call Details";
$proto788["m_columns"][] = "Executive Name";
$proto788["m_columns"][] = "Customer Name";
$obj = new SQLTable($proto788);

$proto787["m_table"] = $obj;
$proto787["m_alias"] = "";
$proto789=array();
$proto789["m_sql"] = "";
$proto789["m_uniontype"] = "SQLL_UNKNOWN";
	$obj = new SQLNonParsed(array(
	"m_sql" => ""
));

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

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

$proto772["m_fromlist"][]=$obj;
$proto772["m_groupby"] = array();
$proto772["m_orderby"] = array();
												$proto791=array();
						$obj = new SQLField(array(
	"m_strName" => "idCalls",
	"m_strTable" => "calls"
));

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

$proto772["m_orderby"][]=$obj;					
$obj = new SQLQuery($proto772);

$queryData_calls = $obj;
$tdatacalls[".sqlquery"] = $queryData_calls;

$tableEvents["calls"] = new eventsBase;

?>
