<?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"));










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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

$tableEvents["calls"] = new eventsBase;

?>
