<?php
$tdataMy_Leads=array();
	$tdataMy_Leads[".NumberOfChars"]=80; 
	$tdataMy_Leads[".ShortName"]="My_Leads";
	$tdataMy_Leads[".OwnerID"]="Employee Name";
	$tdataMy_Leads[".OriginalTable"]="lead_table";


	
//	field labels
$fieldLabelsMy_Leads = array();
if(mlang_getcurrentlang()=="English")
{
	$fieldLabelsMy_Leads["English"]=array();
	$fieldToolTipsMy_Leads["English"]=array();
	$fieldLabelsMy_Leads["English"]["Leadid"] = "Leadid";
	$fieldToolTipsMy_Leads["English"]["Leadid"] = "";
	$fieldLabelsMy_Leads["English"]["Customer_Name"] = "Customer Name";
	$fieldToolTipsMy_Leads["English"]["Customer Name"] = "";
	$fieldLabelsMy_Leads["English"]["Contact_Person"] = "Contact Person";
	$fieldToolTipsMy_Leads["English"]["Contact Person"] = "";
	$fieldLabelsMy_Leads["English"]["Lead_Details"] = "Lead Details";
	$fieldToolTipsMy_Leads["English"]["Lead Details"] = "";
	$fieldLabelsMy_Leads["English"]["Approx_Closure_Date"] = "Approx Closure Date";
	$fieldToolTipsMy_Leads["English"]["Approx Closure Date"] = "";
	$fieldLabelsMy_Leads["English"]["Lead_Status"] = "Lead Status";
	$fieldToolTipsMy_Leads["English"]["Lead Status"] = "";
	$fieldLabelsMy_Leads["English"]["WIN___Lost_Analysis"] = "WIN / Lost Analysis";
	$fieldToolTipsMy_Leads["English"]["WIN / Lost Analysis"] = "";
	$fieldLabelsMy_Leads["English"]["Employee_Name"] = "Employee Name";
	$fieldToolTipsMy_Leads["English"]["Employee Name"] = "";
	if (count($fieldToolTipsMy_Leads["English"])){
		$tdataMy_Leads[".isUseToolTips"]=true;
	}
}


	
	$tdataMy_Leads[".NCSearch"]=true;

	

$tdataMy_Leads[".shortTableName"] = "My_Leads";
$tdataMy_Leads[".nSecOptions"] = 1;
$tdataMy_Leads[".recsPerRowList"] = 1;	
$tdataMy_Leads[".tableGroupBy"] = "0";
$tdataMy_Leads[".mainTableOwnerID"] = "Employee Name";
$tdataMy_Leads[".moveNext"] = 1;




$tdataMy_Leads[".showAddInPopup"] = false;

$tdataMy_Leads[".showEditInPopup"] = false;

$tdataMy_Leads[".showViewInPopup"] = false;


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

$tdataMy_Leads[".listAjax"] = false;

	$tdataMy_Leads[".audit"] = false;

	$tdataMy_Leads[".locking"] = false;
	
$tdataMy_Leads[".listIcons"] = true;




$tdataMy_Leads[".showSimpleSearchOptions"] = false;

$tdataMy_Leads[".showSearchPanel"] = true;


$tdataMy_Leads[".isUseAjaxSuggest"] = true;

$tdataMy_Leads[".rowHighlite"] = true;


// button handlers file names

$tdataMy_Leads[".addPageEvents"] = false;

$tdataMy_Leads[".arrKeyFields"][] = "Leadid";

// use datepicker for search panel
$tdataMy_Leads[".isUseCalendarForSearch"] = false;

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

$tdataMy_Leads[".isUseiBox"] = false;




$tdataMy_Leads[".isUseInlineJs"] = $tdataMy_Leads[".isUseInlineAdd"] || $tdataMy_Leads[".isUseInlineEdit"];

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

$tdataMy_Leads[".globSearchFields"][] = "Leadid";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("Leadid", $tdataMy_Leads[".allSearchFields"]))
{
	$tdataMy_Leads[".allSearchFields"][] = "Leadid";	
}
$tdataMy_Leads[".globSearchFields"][] = "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", $tdataMy_Leads[".allSearchFields"]))
{
	$tdataMy_Leads[".allSearchFields"][] = "Customer Name";	
}
$tdataMy_Leads[".globSearchFields"][] = "Contact Person";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("Contact Person", $tdataMy_Leads[".allSearchFields"]))
{
	$tdataMy_Leads[".allSearchFields"][] = "Contact Person";	
}
$tdataMy_Leads[".globSearchFields"][] = "Lead 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("Lead Details", $tdataMy_Leads[".allSearchFields"]))
{
	$tdataMy_Leads[".allSearchFields"][] = "Lead Details";	
}
$tdataMy_Leads[".globSearchFields"][] = "Approx Closure 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("Approx Closure Date", $tdataMy_Leads[".allSearchFields"]))
{
	$tdataMy_Leads[".allSearchFields"][] = "Approx Closure Date";	
}
$tdataMy_Leads[".globSearchFields"][] = "Lead Status";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("Lead Status", $tdataMy_Leads[".allSearchFields"]))
{
	$tdataMy_Leads[".allSearchFields"][] = "Lead Status";	
}
$tdataMy_Leads[".globSearchFields"][] = "WIN / Lost Analysis";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("WIN / Lost Analysis", $tdataMy_Leads[".allSearchFields"]))
{
	$tdataMy_Leads[".allSearchFields"][] = "WIN / Lost Analysis";	
}


$tdataMy_Leads[".googleLikeFields"][] = "Leadid";
$tdataMy_Leads[".googleLikeFields"][] = "Customer Name";
$tdataMy_Leads[".googleLikeFields"][] = "Contact Person";
$tdataMy_Leads[".googleLikeFields"][] = "Lead Details";
$tdataMy_Leads[".googleLikeFields"][] = "Approx Closure Date";
$tdataMy_Leads[".googleLikeFields"][] = "Lead Status";
$tdataMy_Leads[".googleLikeFields"][] = "WIN / Lost Analysis";
$tdataMy_Leads[".googleLikeFields"][] = "Employee Name";



$tdataMy_Leads[".advSearchFields"][] = "Leadid";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("Leadid", $tdataMy_Leads[".allSearchFields"])) 
{
	$tdataMy_Leads[".allSearchFields"][] = "Leadid";	
}
$tdataMy_Leads[".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", $tdataMy_Leads[".allSearchFields"])) 
{
	$tdataMy_Leads[".allSearchFields"][] = "Customer Name";	
}
$tdataMy_Leads[".advSearchFields"][] = "Contact Person";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("Contact Person", $tdataMy_Leads[".allSearchFields"])) 
{
	$tdataMy_Leads[".allSearchFields"][] = "Contact Person";	
}
$tdataMy_Leads[".advSearchFields"][] = "Lead 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("Lead Details", $tdataMy_Leads[".allSearchFields"])) 
{
	$tdataMy_Leads[".allSearchFields"][] = "Lead Details";	
}
$tdataMy_Leads[".advSearchFields"][] = "Approx Closure 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("Approx Closure Date", $tdataMy_Leads[".allSearchFields"])) 
{
	$tdataMy_Leads[".allSearchFields"][] = "Approx Closure Date";	
}
$tdataMy_Leads[".advSearchFields"][] = "Lead Status";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("Lead Status", $tdataMy_Leads[".allSearchFields"])) 
{
	$tdataMy_Leads[".allSearchFields"][] = "Lead Status";	
}
$tdataMy_Leads[".advSearchFields"][] = "WIN / Lost Analysis";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("WIN / Lost Analysis", $tdataMy_Leads[".allSearchFields"])) 
{
	$tdataMy_Leads[".allSearchFields"][] = "WIN / Lost Analysis";	
}
$tdataMy_Leads[".advSearchFields"][] = "Employee 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("Employee Name", $tdataMy_Leads[".allSearchFields"])) 
{
	$tdataMy_Leads[".allSearchFields"][] = "Employee Name";	
}

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


	

$tdataMy_Leads[".isDisplayLoading"] = true;

$tdataMy_Leads[".isResizeColumns"] = false;





$tdataMy_Leads[".pageSize"] = 5;

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

$tdataMy_Leads[".sqlHead"] = "SELECT Leadid,  `Customer Name`,  `Contact Person`,  `Lead Details`,  `Approx Closure Date`,  `Lead Status`,  `WIN / Lost Analysis`,  `Employee Name`";
$tdataMy_Leads[".sqlFrom"] = "FROM lead_table";
$tdataMy_Leads[".sqlWhereExpr"] = "`Lead Status` = \"Suspect\" OR `Lead Status` =\"Prospect\" OR `Lead Status` =\"review\" OR `Lead Status` =\"Hot\" OR `Lead Status` =\"Commit\"";
$tdataMy_Leads[".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;
$tdataMy_Leads[".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;
$tdataMy_Leads[".arrGroupsPerPage"] = $arrGPP;

	$tableKeys = array();
	$tableKeys[] = "Leadid";
	$tdataMy_Leads[".Keys"] = $tableKeys;

//	Leadid
	$fdata = array();
	$fdata["strName"] = "Leadid";
	$fdata["ownerTable"] = "lead_table";
		
		
		
	$fdata["FieldType"]= 3;
	
		$fdata["AutoInc"]=true;
	
			$fdata["UseiBox"] = false;
	
	$fdata["EditFormat"]= "Text field";
	$fdata["ViewFormat"]= "";
	
		
		
		
		
		$fdata["NeedEncode"]=true;
	
	$fdata["GoodName"]= "Leadid";
	
		$fdata["FullName"]= "Leadid";
	
		$fdata["IsRequired"]=true; 
	
		
		
		
		
				$fdata["Index"]= 1;
				$fdata["EditParams"]="";
			
		$fdata["bListPage"]=true; 
	
		
		
		
		
		
		$fdata["bAdvancedSearch"]=true; 
	
		
		
	//Begin validation
	$fdata["validateAs"] = array();
				$fdata["validateAs"]["basicValidate"][] = getJsValidatorName("Number");	
						$fdata["validateAs"]["basicValidate"][] = "IsRequired";
	
		//End validation
	
				$fdata["FieldPermissions"]=true;
	
		
				
		
		
		
			$tdataMy_Leads["Leadid"]=$fdata;
//	Customer Name
	$fdata = array();
	$fdata["strName"] = "Customer Name";
	$fdata["ownerTable"] = "lead_table";
		
		
		
	$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"]= 2;
				$fdata["EditParams"]="";
			$fdata["EditParams"].= " maxlength=100";
		
		$fdata["bListPage"]=true; 
	
		
		
		
		
		
		$fdata["bAdvancedSearch"]=true; 
	
		
		
	//Begin validation
	$fdata["validateAs"] = array();
		
		//End validation
	
				$fdata["FieldPermissions"]=true;
	
		
				
		
		
		
			$tdataMy_Leads["Customer Name"]=$fdata;
//	Contact Person
	$fdata = array();
	$fdata["strName"] = "Contact Person";
	$fdata["ownerTable"] = "lead_table";
		
		
		
	$fdata["FieldType"]= 200;
	
		
			$fdata["UseiBox"] = false;
	
	$fdata["EditFormat"]= "Text field";
	$fdata["ViewFormat"]= "";
	
		
		
		
		
		$fdata["NeedEncode"]=true;
	
	$fdata["GoodName"]= "Contact_Person";
	
		$fdata["FullName"]= "`Contact Person`";
	
		
		
		
		
		
				$fdata["Index"]= 3;
				$fdata["EditParams"]="";
			$fdata["EditParams"].= " maxlength=45";
		
		$fdata["bListPage"]=true; 
	
		
		
		
		
		
		$fdata["bAdvancedSearch"]=true; 
	
		
		
	//Begin validation
	$fdata["validateAs"] = array();
		
		//End validation
	
				$fdata["FieldPermissions"]=true;
	
		
				
		
		
		
			$tdataMy_Leads["Contact Person"]=$fdata;
//	Lead Details
	$fdata = array();
	$fdata["strName"] = "Lead Details";
	$fdata["ownerTable"] = "lead_table";
		
		
		
	$fdata["FieldType"]= 200;
	
		
			$fdata["UseiBox"] = false;
	
	$fdata["EditFormat"]= "Text field";
	$fdata["ViewFormat"]= "";
	
		
		
		
		
		$fdata["NeedEncode"]=true;
	
	$fdata["GoodName"]= "Lead_Details";
	
		$fdata["FullName"]= "`Lead Details`";
	
		
		
		
		
		
				$fdata["Index"]= 4;
				$fdata["EditParams"]="";
			$fdata["EditParams"].= " maxlength=250";
		
		$fdata["bListPage"]=true; 
	
		
		
		
		
		
		$fdata["bAdvancedSearch"]=true; 
	
		
		
	//Begin validation
	$fdata["validateAs"] = array();
		
		//End validation
	
				$fdata["FieldPermissions"]=true;
	
		
				
		
		
		
			$tdataMy_Leads["Lead Details"]=$fdata;
//	Approx Closure Date
	$fdata = array();
	$fdata["strName"] = "Approx Closure Date";
	$fdata["ownerTable"] = "lead_table";
		
		
		
	$fdata["FieldType"]= 200;
	
		
			$fdata["UseiBox"] = false;
	
	$fdata["EditFormat"]= "Text field";
	$fdata["ViewFormat"]= "";
	
		
		
		
		
		$fdata["NeedEncode"]=true;
	
	$fdata["GoodName"]= "Approx_Closure_Date";
	
		$fdata["FullName"]= "`Approx Closure Date`";
	
		
		
		
		
		
				$fdata["Index"]= 5;
				$fdata["EditParams"]="";
			$fdata["EditParams"].= " maxlength=20";
		
		$fdata["bListPage"]=true; 
	
		
		
		
		
		
		$fdata["bAdvancedSearch"]=true; 
	
		
		
	//Begin validation
	$fdata["validateAs"] = array();
		
		//End validation
	
				$fdata["FieldPermissions"]=true;
	
		
				
		
		
		
			$tdataMy_Leads["Approx Closure Date"]=$fdata;
//	Lead Status
	$fdata = array();
	$fdata["strName"] = "Lead Status";
	$fdata["ownerTable"] = "lead_table";
		
		
		
	$fdata["FieldType"]= 200;
	
		
			$fdata["UseiBox"] = false;
	
	$fdata["EditFormat"]= "Text field";
	$fdata["ViewFormat"]= "";
	
		
		
		
		
		$fdata["NeedEncode"]=true;
	
	$fdata["GoodName"]= "Lead_Status";
	
		$fdata["FullName"]= "`Lead Status`";
	
		
		
		
		
		
				$fdata["Index"]= 6;
				$fdata["EditParams"]="";
			$fdata["EditParams"].= " maxlength=45";
		
		$fdata["bListPage"]=true; 
	
		
		
		
		
		
		$fdata["bAdvancedSearch"]=true; 
	
		
		
	//Begin validation
	$fdata["validateAs"] = array();
		
		//End validation
	
				$fdata["FieldPermissions"]=true;
	
		
				
		
		
		
			$tdataMy_Leads["Lead Status"]=$fdata;
//	WIN / Lost Analysis
	$fdata = array();
	$fdata["strName"] = "WIN / Lost Analysis";
	$fdata["ownerTable"] = "lead_table";
		
		
		
	$fdata["FieldType"]= 200;
	
		
			$fdata["UseiBox"] = false;
	
	$fdata["EditFormat"]= "Text field";
	$fdata["ViewFormat"]= "";
	
		
		
		
		
		$fdata["NeedEncode"]=true;
	
	$fdata["GoodName"]= "WIN___Lost_Analysis";
	
		$fdata["FullName"]= "`WIN / Lost Analysis`";
	
		
		
		
		
		
				$fdata["Index"]= 7;
				$fdata["EditParams"]="";
			$fdata["EditParams"].= " maxlength=250";
		
		$fdata["bListPage"]=true; 
	
		
		
		
		
		
		$fdata["bAdvancedSearch"]=true; 
	
		
		
	//Begin validation
	$fdata["validateAs"] = array();
		
		//End validation
	
				$fdata["FieldPermissions"]=true;
	
		
				
		
		
		
			$tdataMy_Leads["WIN / Lost Analysis"]=$fdata;
//	Employee Name
	$fdata = array();
	$fdata["strName"] = "Employee Name";
	$fdata["ownerTable"] = "lead_table";
		
		
		
	$fdata["FieldType"]= 200;
	
		
			$fdata["UseiBox"] = false;
	
	$fdata["EditFormat"]= "Text field";
	$fdata["ViewFormat"]= "";
	
		
		
		
		
		$fdata["NeedEncode"]=true;
	
	$fdata["GoodName"]= "Employee_Name";
	
		$fdata["FullName"]= "`Employee Name`";
	
		
		
		
		
		
				$fdata["Index"]= 8;
				$fdata["EditParams"]="";
			
		
		
		
		
		
		
		
		
		
	//Begin validation
	$fdata["validateAs"] = array();
		
		//End validation
	
				
		
				
		
		
		
			$tdataMy_Leads["Employee Name"]=$fdata;

	
$tables_data["My Leads"]=&$tdataMy_Leads;
$field_labels["My_Leads"] = &$fieldLabelsMy_Leads;
$fieldToolTips["My Leads"] = &$fieldToolTipsMy_Leads;

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

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

$mIndex = 1-1;
			$strOriginalDetailsTable="employee_list";
	$masterTablesData["My Leads"][$mIndex] = array(
		  "mDataSourceTable"=>"My Home"
		, "mOriginalTable" => $strOriginalDetailsTable
		, "mShortTable" => "My_Home"
		, "masterKeys" => array()
		, "detailKeys" => array()
		, "dispChildCount" => "1"
		, "hideChild" => "0"	
		, "dispInfo" => "1"								
		, "previewOnList" => 1
		, "previewOnAdd" => 0
		, "previewOnEdit" => 0
		, "previewOnView" => 1
	);	
		$masterTablesData["My Leads"][$mIndex]["masterKeys"][]="username";
		$masterTablesData["My Leads"][$mIndex]["detailKeys"][]="Employee Name";

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

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










$proto166=array();
$proto166["m_strHead"] = "SELECT";
$proto166["m_strFieldList"] = "Leadid,  `Customer Name`,  `Contact Person`,  `Lead Details`,  `Approx Closure Date`,  `Lead Status`,  `WIN / Lost Analysis`,  `Employee Name`";
$proto166["m_strFrom"] = "FROM lead_table";
$proto166["m_strWhere"] = "`Lead Status` = \"Suspect\" OR `Lead Status` =\"Prospect\" OR `Lead Status` =\"review\" OR `Lead Status` =\"Hot\" OR `Lead Status` =\"Commit\"";
$proto166["m_strOrderBy"] = "ORDER BY `Lead Status`";
$proto166["m_strTail"] = "";
$proto167=array();
$proto167["m_sql"] = "`Lead Status` = \"Suspect\" OR `Lead Status` =\"Prospect\" OR `Lead Status` =\"review\" OR `Lead Status` =\"Hot\" OR `Lead Status` =\"Commit\"";
$proto167["m_uniontype"] = "SQLL_OR";
	$obj = new SQLNonParsed(array(
	"m_sql" => "`Lead Status` = \"Suspect\" OR `Lead Status` =\"Prospect\" OR `Lead Status` =\"review\" OR `Lead Status` =\"Hot\" OR `Lead Status` =\"Commit\""
));

$proto167["m_column"]=$obj;
$proto167["m_contained"] = array();
						$proto169=array();
$proto169["m_sql"] = "`Lead Status` = \"Suspect\"";
$proto169["m_uniontype"] = "SQLL_UNKNOWN";
						$obj = new SQLField(array(
	"m_strName" => "Lead Status",
	"m_strTable" => "lead_table"
));

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

			$proto167["m_contained"][]=$obj;
						$proto171=array();
$proto171["m_sql"] = "`Lead Status` =\"Prospect\"";
$proto171["m_uniontype"] = "SQLL_UNKNOWN";
						$obj = new SQLField(array(
	"m_strName" => "Lead Status",
	"m_strTable" => "lead_table"
));

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

			$proto167["m_contained"][]=$obj;
						$proto173=array();
$proto173["m_sql"] = "`Lead Status` =\"review\"";
$proto173["m_uniontype"] = "SQLL_UNKNOWN";
						$obj = new SQLField(array(
	"m_strName" => "Lead Status",
	"m_strTable" => "lead_table"
));

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

			$proto167["m_contained"][]=$obj;
						$proto175=array();
$proto175["m_sql"] = "`Lead Status` =\"Hot\"";
$proto175["m_uniontype"] = "SQLL_UNKNOWN";
						$obj = new SQLField(array(
	"m_strName" => "Lead Status",
	"m_strTable" => "lead_table"
));

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

			$proto167["m_contained"][]=$obj;
						$proto177=array();
$proto177["m_sql"] = "`Lead Status` =\"Commit\"";
$proto177["m_uniontype"] = "SQLL_UNKNOWN";
						$obj = new SQLField(array(
	"m_strName" => "Lead Status",
	"m_strTable" => "lead_table"
));

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

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

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

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

$proto166["m_having"] = $obj;
$proto166["m_fieldlist"] = array();
						$proto181=array();
			$obj = new SQLField(array(
	"m_strName" => "Leadid",
	"m_strTable" => "lead_table"
));

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

$proto166["m_fieldlist"][]=$obj;
						$proto183=array();
			$obj = new SQLField(array(
	"m_strName" => "Customer Name",
	"m_strTable" => "lead_table"
));

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

$proto166["m_fieldlist"][]=$obj;
						$proto185=array();
			$obj = new SQLField(array(
	"m_strName" => "Contact Person",
	"m_strTable" => "lead_table"
));

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

$proto166["m_fieldlist"][]=$obj;
						$proto187=array();
			$obj = new SQLField(array(
	"m_strName" => "Lead Details",
	"m_strTable" => "lead_table"
));

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

$proto166["m_fieldlist"][]=$obj;
						$proto189=array();
			$obj = new SQLField(array(
	"m_strName" => "Approx Closure Date",
	"m_strTable" => "lead_table"
));

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

$proto166["m_fieldlist"][]=$obj;
						$proto191=array();
			$obj = new SQLField(array(
	"m_strName" => "Lead Status",
	"m_strTable" => "lead_table"
));

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

$proto166["m_fieldlist"][]=$obj;
						$proto193=array();
			$obj = new SQLField(array(
	"m_strName" => "WIN / Lost Analysis",
	"m_strTable" => "lead_table"
));

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

$proto166["m_fieldlist"][]=$obj;
						$proto195=array();
			$obj = new SQLField(array(
	"m_strName" => "Employee Name",
	"m_strTable" => "lead_table"
));

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

$proto166["m_fieldlist"][]=$obj;
$proto166["m_fromlist"] = array();
												$proto197=array();
$proto197["m_link"] = "SQLL_MAIN";
			$proto198=array();
$proto198["m_strName"] = "lead_table";
$proto198["m_columns"] = array();
$proto198["m_columns"][] = "Leadid";
$proto198["m_columns"][] = "Region";
$proto198["m_columns"][] = "Customer Name";
$proto198["m_columns"][] = "Contact Person";
$proto198["m_columns"][] = "Lead Details";
$proto198["m_columns"][] = "Employee Name";
$proto198["m_columns"][] = "Approx Closure Date";
$proto198["m_columns"][] = "Lead Status";
$proto198["m_columns"][] = "Manager Name";
$proto198["m_columns"][] = "Manager Remarks";
$proto198["m_columns"][] = "Sales Call Status";
$proto198["m_columns"][] = "Lead Level";
$proto198["m_columns"][] = "Requirement Details";
$proto198["m_columns"][] = "Approx Value";
$proto198["m_columns"][] = "First Quote Remarks";
$proto198["m_columns"][] = "Proposed Closure Date";
$proto198["m_columns"][] = "Projected Closure QTR";
$proto198["m_columns"][] = "Proposed Solution Details";
$proto198["m_columns"][] = "Quoted Price";
$proto198["m_columns"][] = "Final Quote Remarks";
$proto198["m_columns"][] = "Discussion Highlights";
$proto198["m_columns"][] = "WIN / Lost Analysis";
$obj = new SQLTable($proto198);

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

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

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

$proto166["m_fromlist"][]=$obj;
$proto166["m_groupby"] = array();
$proto166["m_orderby"] = array();
												$proto201=array();
						$obj = new SQLField(array(
	"m_strName" => "Lead Status",
	"m_strTable" => "lead_table"
));

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

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

$queryData_My_Leads = $obj;
$tdataMy_Leads[".sqlquery"] = $queryData_My_Leads;

$tableEvents["My Leads"] = new eventsBase;

?>
