<?php
namespace App\Traits;
define("BASEURL",'https://www.coalmint.com/');
use DB;
trait ReferenceData
{
	 function getReferenceData($resourceType='app', $itemType='', $section='', $place='', $otherCondition='', $deviceType, $app_type='SM')
	{
		
		/* $activePackages = DB::table('tbl_region_commodity_situations as si')
					->select('si.f_platform', 'si.f_name', 'si.level_selection_level_except_steel_commodity', 'si.level_selection_level_for_steel_commodity', 'si.level_selection_level_except_india_china__region', 'si.level_selection_level_for_india_china__region', 's.section', 'm.ID', 'm.itemType', 'm.itemName', 'm.parentID', 'm.grandParentID', 'm.back_ground_image')
					->leftJoin('tbl_region_commodity_sections as s', 'si.f_section', '=', 's.section')					->leftJoin('tbl_region_commodity_master as m', 's.master_id', '=', 'm.ID')
					->where('tbl_region_commodity_sections.section' , '<>' , '')
					->orderBy('tbl_region_commodity_sections.master_id' , 'asc')
					->first(); */			
		$_cond=" AND f_platform='$resourceType' ";
		if($section!=''){
			$_cond .= " AND si.f_section='$section' ";
		}
		
		$_cond .= " AND si.forCompany='$app_type' ";
		
		if($itemType!=''){
			$_cond .= " AND m.itemType='$itemType' ";
		}
		
		if($place!=''){
			$_cond .= " AND si.f_name='$place' ";
		}
		
		if($otherCondition!=''){
			$_cond .= $otherCondition;
		}
		
		$sql= "SELECT si.f_platform, si.f_name, si.level_selection_level_except_steel_commodity, si.level_selection_level_for_steel_commodity,si.level_selection_level_except_india_china__region, si.level_selection_level_for_india_china__region			,s.section,m.ID,m.itemType,m.itemName,m.parentID, m.grandParentID, m.index_folder_image, m.back_ground_image, si.txt_selection_level_for_india_china_region			, m.web_url
		FROM `tbl_region_commodity_situations` as si 			LEFT OUTER JOIN `tbl_region_commodity_sections` as s			ON si.f_section=s.section			LEFT OUTER JOIN `tbl_region_commodity_master` as m 			ON s.master_id=m.ID  			WHERE section<>''	$_cond	
		ORDER BY `si`.`f_platform` ASC, f_name, s.section, m.f_order_by";	
		//ORDER BY `si`.`f_platform` ASC, f_name, s.section, m.parentID, m.grandParentID, m.orderBy";		
		$referenceData = DB::select($sql);	
		
		//print_r($referenceData);
		
		$itemID=array();
		$parentID=array();
		$grandParentID=array();
		foreach($referenceData as $data){
			
			if($data['itemType']=='commodity'){
				if($data['ID']==413 || $data['parentID']==413 || $data['grandParentID']==413)
					$isSelectableLevel = $data['level_selection_level_for_steel_commodity'];
				else
					$isSelectableLevel = $data['level_selection_level_except_steel_commodity'];
				
				//$sub["sub_commodity"] = array();
				$key_type = "sub_commodity";
				
			}elseif($data['itemType']=='region'){
				/* if($data['ID']==413 || $data['parentID']==413 || $data['grandParentID']==413)
					$isSelectableLevel = $data['level_selection_level_for_india_china__region'];
				else */if(strpos($data['txt_selection_level_for_india_china_region'],$data['itemName']) !== false)
					$isSelectableLevel = $data['level_selection_level_for_india_china__region'];
				else
					$isSelectableLevel = $data['level_selection_level_except_india_china__region'];
				
				//$sub["sub_region"] = array();
				$key_type = "sub_region";
			}
			
			if(strtolower($app_type) == 'cm' && $data['index_folder_image']!='')
				$data['index_folder_image'] =str_replace("https://www.coalmint.com/events_steelmintgroup/images","https://www.coalmint.com/events_steelmintgroup/images/coalmint", $data['index_folder_image']);
			
			if(strtolower($app_type) == 'cm' && $data['back_ground_image']!='')
				$data['back_ground_image'] =str_replace("https://www.coalmint.com/events_steelmintgroup/images","https://www.coalmint.com/events_steelmintgroup/images/coalmint", $data['back_ground_image']);
			//if($data['itemType']=='region')
			//	echo '-<Br>'.$data['parentID'];
			if($data['parentID']==0){
				$level = 1;
				$itemID[$data['f_name']][$data['section']][$data['itemType']][$data['ID']] =  array(
						"id" => $data['ID'],
						"name" => $data['itemName'],						
						//$sub,
						"isSelectable" => $isSelectableLevel==1 || strtolower($data['itemName'])=="all"?"y":'n',
						"bgImage"	=>	(($data['section']=='index' || $data['f_name']=='WEB_INDEX_PRE') && $data['index_folder_image']!='')?$data['index_folder_image']:$data['back_ground_image'],
						"web_url"	=>	strtolower($data['f_platform'])=='web'?$data['web_url']:'',
						$key_type => array()
					);//BASEURL ."api/public/assets/app/iron_ore_1.png",
			}else{
				if($data['grandParentID']==0){
					$level = 2;
					if($isSelectableLevel==2){
						$parentID[$data['f_name']][$data['section']][$data['itemType']][$data['parentID']][] =  array(
							"id" => $data['ID'],
							"name" => $data['itemName'],
							"isSelectable" => $isSelectableLevel==2?"y":'n',
							"bgImage"	=>	$data['back_ground_image'],
							"web_url"	=>	strtolower($data['f_platform'])=='web'?$data['web_url']:''
						);
					}
				}else{
					$level = 3;
					if($isSelectableLevel==3){ 
						$grandParentID[$data['f_name']][$data['section']][$data['itemType']][$data['grandParentID']][$data['parentID']][] =  array(
							"id" => $data['ID'],
							"name" => $data['itemName'],
							"isSelectable" => $isSelectableLevel==3?"y":'n',
							"bgImage"	=>	$data['back_ground_image'],
							"web_url"	=>	strtolower($data['f_platform'])=='web'?$data['web_url']:''
						);
					}
				}
			}
			
			$all[$data['f_name']][$data['section']][$data['itemType']][$data['ID']] =  array(
						"id" => $data['ID'],
						"name" => $data['itemName'],
						"isSelectable" => $isSelectableLevel==$level?"y":'n',
						"bgImage"	=>	(($data['section']=='index' || $data['f_name']=='WEB_INDEX_PRE') && $data['index_folder_image']!='')?$data['index_folder_image']:$data['back_ground_image'],
						"web_url"	=>	strtolower($data['f_platform'])=='web'?$data['web_url']:''
					);
		}
		
		$referenceArr=array();
		$grandParentIDArr=array();
		foreach($itemID as $f_name=>$f_name_items){//$ID
			$referenceArr[$f_name] = array();
			foreach($f_name_items as $section=>$sections){
				$referenceArr[$f_name][$section] = array();
				foreach($sections as $itemType=>$itemTypes){
					$referenceArr[$f_name][$section][$itemType] = array();
					foreach($itemTypes as $ID=>$items){
						if(isset($grandParentID[$f_name][$section][$itemType][$ID])){//$ID=>grandParentID
							$grandParentIDArr[] = $ID;
							$referenceArr[$f_name][$section][$itemType][$ID] = $all[$f_name][$section][$itemType][$ID];
							$i=0;
							foreach($grandParentID[$f_name][$section][$itemType][$ID] as $PID=>$parent_items){///$i=>$PID
								$referenceArr[$f_name][$section][$itemType][$ID]['sub_'.$itemType][$i] = $all[$f_name][$section][$itemType][$PID];
								$referenceArr[$f_name][$section][$itemType][$ID]['sub_'.$itemType][$i]['sub_commodity'] = $parent_items;
								$i++;
							}
						}elseif(isset($parentID[$f_name][$section][$itemType][$ID])){//$ID=>ParentID
							$referenceArr[$f_name][$section][$itemType][$ID] = $all[$f_name][$section][$itemType][$ID];
							$referenceArr[$f_name][$section][$itemType][$ID]['sub_'.$itemType] = $parentID[$f_name][$section][$itemType][$ID];
						}else{
							$referenceArr[$f_name][$section][$itemType][$ID] = $items;
						}
					}
				}
			}
		}
		
		$grandParentIDArr = array_unique($grandParentIDArr);
		$finalResult=array();
		$finalResult1=array();
		foreach($referenceArr as $kname=>$arr_name){
			foreach($arr_name as $ksection=>$arr_section){
				foreach($arr_section as $itemType=>$arr_itemType){
					//$finalResult[$kname][$ksection][$itemType] = array_values($arr_itemType);
					$finalResult[$kname][$itemType] = array_values($arr_itemType);
					
					/* foreach($arr_itemType as $pid=> $arr){
						//$finalResult[$kname][$ksection][$itemType][]= $pid;						
						if(in_array($pid, $grandParentIDArr)){
							foreach($arr as $pid=> $arr1){
								
							}
						}else{
							$finalResult[$kname][$ksection][$itemType][] = $arr;
							//$finalResult[$kname][$ksection][$itemType] = array_values($arr_itemType);
						}
					} */
					/*$finalResult1[$kname][$ksection][$itemType] = array_values($finalResult[$kname][$ksection][$itemType]); */
				}
			}
		}
		if($otherCondition==''){
			$dbresult = DB::table('tbl_companytype')
					->select('id','short_comptype as name' )				
					->get();
			foreach($dbresult as $cType){
				$finalResult['companyType'][$cType["id"]] = $cType["name"];
			}
		}
		
		if($otherCondition==''){
			
			$dbresult = DB::table('tbl_country')
					->select('currency_code','currency_symbol', 'section', 'country' )
					->where('section','<>',"")
					->groupBy("currency_code")
					->orderByRaw(
						 "CASE 
							WHEN currency_code='USD' THEN 1
							WHEN currency_code='INR' THEN 2
							WHEN currency_code='JPY' THEN 3
							WHEN currency_code='CNY' THEN 4
							WHEN currency_code='EUR' THEN 5
							WHEN currency_code='GBP' THEN 6
							WHEN currency_code='RUB' THEN 7
							WHEN currency_code='IDR' THEN 8						 
							ELSE 99 
						 END")
					->get();
					
			foreach($dbresult as $cType){
				if(strpos($cType["section"],'package') !== false){
					$finalResult['currencyConvertor']['packages'][] = array(
						"name" => $cType["country"],
						"code" => $cType["currency_code"],
						"symbol" => $cType["currency_symbol"],
					);
				}
				
				if(strpos($cType["section"],'price') !== false){
					$finalResult['currencyConvertor']['prices'][] = array(
						"name" => $cType["country"],
						"code" => $cType["currency_code"],
						"symbol" => $cType["currency_symbol"],
					);
				}
			}
			
			/*$finalResult['currencyConvertor'] = array(
				'packages'=>array(
					array(
						"name" => "INDIA",
						"code" => 'INR',
						"symbol" => '20B9'
					),
					array(
						"name" => "Doller",
						"code" => 'USD',
						"symbol" => '0024'
					),
					array(
						"name" => "Japanese Yen",
						"code" => 'YEN',
						"symbol" => '00A5'
					),
					array(
						"name" => "Russian ruble",
						"code" => 'RUB',
						"symbol" => '20BD'
					),
					array(
						"name" => "Renminbi, Chinese Yuan",
						"code" => 'RMB',
						"symbol" => '00A5'
					),
					array(
						"name" => "Indonesian Rupiah",
						"code" => 'IDR',
						"symbol" => '0052,0070'
					)
				),
				'prices'=>array(
					array(
						"name" => "INDIA",
						"code" => 'INR',
						"symbol" => '20B9'
					),
					array(
						"name" => "Doller",
						"code" => 'USD',
						"symbol" => '0024'
					),
					array(
						"name" => "EURO",
						"code" => 'EUR',
						"symbol" => '20AC'
					),
					array(
						"name" => "Japanese Yen",
						"code" => 'YEN',
						"symbol" => '00A5'
					),
					array(
						"name" => "Russian ruble",
						"code" => 'RUB',
						"symbol" => '20BD'
					),
					array(
						"name" => "Renminbi, Chinese Yuan",
						"code" => 'RMB',
						"symbol" => '00A5'
					),
					array(
						"name" => "Indonesian Rupiah",
						"code" => 'IDR',
						"symbol" => '0052,0070'
					)
				)				
			);*/
			
			if( ($deviceType == '' || $deviceType == 'android' || strtolower($app_type) == 'cm') && $deviceType != 'ios' ){
				$finalResult['tradeType']=array(
						""=>"All",
						"export"=>"Export",
						"import"=>"Import",
						"domestic"=>"Regional"
					);
				$finalResult['timeLine']=array(
						""=>"All",
						"2d"=>"Two Days Ago",
						"1w"=>"One week Ago",
						"2w"=>"Two week Ago"
					);
				
			} else {
				$finalResult['tradeType']=array(
						array("key" => ''	, "value"				=>			"All"),
						array("key" => 'export'	, "value"				=>			"Export"),
						array("key" => 'import'	, "value"				=>			"Import"),
						array("key" => 'domestic'	, "value"				=>			"Regional")
					);
				$finalResult['timeLine']=array(
						array("key" => ''	, "value"				=>			"All"),
						array("key" => '2d'	, "value"				=>			"Two Days Ago"),
						array("key" => '1w'	, "value"				=>			"One week Ago"),
						array("key" => '2w'	, "value"				=>			"Two week Ago")
					);
			}
			$finalResult['dataType']=array(
					""=>"All",
					"prices"=>"Prices",
					"insight"=>"Insight",
					"tenders"=>"Tenders",
					"reports"=>"Reports",
					"statistics"=>"Statistics",
					"events"=>"Events"
				);
			$finalResult['reportType']=array(
					""=>"All",
					"special"=>"Special",
					"regular"=>"Regular",
					"knowledge"=>"Knowledge"
				);
			$finalResult['eventType']=array(
					"upcoming"=>"Upcoming",
					"archieved"=>"Archieved"
				);
			$finalResult['packageTenure']=array(
					"3m"=>"3 Months",
					"6m"=>"6 Months",
					"9m"=>"9 Months",
					"1y"=>"1 Year"
				);
			/*YKV 14 August 2021
			$finalResult['staticPagesLink']=array(
					"termsNCondition"=>"https://www.coalmint.com/termConditions?mobile=1",
					"privacyPolicy"=>"https://www.coalmint.com/privacyPolicy?mobile=1",
					"aboutUs"=>"https://www.coalmint.com/aboutUs?mobile=1",
					"methodology"=>"http://www.coalmint.com/methodology?mobile=1", 
					"logistics"=>"http://www.coalmint.com/logistics?mobile=1",
					"videoTutorialUrl"=>"https://www.youtube.com/watch?reload=9&v=X5W_3LELrAs",
					"logisticsSectionStatus"=>"active"*/
					/* "termsNCondition"=>"https://www.coalmint.com/app_static_pages/app_t_n_c.php",
					"privacyPolicy"=>"https://www.coalmint.com/app_static_pages/app_privacy_policy.php",
					"aboutUs"=>"https://www.coalmint.com/app_static_pages/app_about_us.html",
					"methodology"=>"http://www.coalmint.com/nw/methodology?mobile=1", 
					"logistics"=>"http://www.coalmint.com/nw/logistics?mobile=1",
					"videoTutorialUrl"=>"https://www.youtube.com/watch?reload=9&v=X5W_3LELrAs",
					"logisticsSectionStatus"=>"active" */ //used in ios to show upgrade button below webview / dont show any button below webview if logsiticssection is accessible to him
			/*YKV 14 August 2021*/
			if(strtolower($app_type) == 'cm'){
				$finalResult['staticPagesLink']=array(
					"termsNCondition"=>"https://www.coalmint.com/termConditions?mobile=1",
					"privacyPolicy"=>"https://www.coalmint.com/privacyPolicy?mobile=1",
					"aboutUs"=>"https://www.coalmint.com/aboutUs?mobile=1",
					"methodology"=>"http://www.coalmint.com/methodology?mobile=1", 
					"logistics"=>"http://www.coalmint.com/logistics?mobile=1",
					"videoTutorialUrl"=>"https://www.youtube.com/watch?reload=9&v=X5W_3LELrAs",
					"logisticsSectionStatus"=>"active"
				);	
			}else{
				$finalResult['staticPagesLink']=array(
					"termsNCondition"=>"https://www.coalmint.com/termConditions?mobile=1",
					"privacyPolicy"=>"https://www.coalmint.com/privacyPolicy?mobile=1",
					"aboutUs"=>"https://www.coalmint.com/aboutUs?mobile=1",
					"methodology"=>"http://www.coalmint.com/methodology?mobile=1", 
					"logistics"=>"http://www.coalmint.com/logistics?mobile=1",
					"videoTutorialUrl"=>"https://www.youtube.com/watch?reload=9&v=X5W_3LELrAs",
					"logisticsSectionStatus"=>"active"
					
				);
				
			}		
				//);	
			if(strtolower($app_type) == 'cm'){
				$finalResult['exploreBookmarks']=array(
					array(
					    "section"=>"Insights",
					    "bgImage"=>BASEURL ."api/public/assets/app/exploreBookmarks/coalmint/Insight.jpg"
					),
					array(
					    "section"=>"Tenders",
					    "bgImage"=>BASEURL ."api/public/assets/app/exploreBookmarks/coalmint/Tender.jpg"
					),
					array(
					    "section"=>"Reports",
					    "bgImage"=>BASEURL ."api/public/assets/app/exploreBookmarks/coalmint/Report.jpg"
					),
					array(
					    "section"=>"Events",
					    "bgImage"=>BASEURL ."api/public/assets/app/exploreBookmarks/coalmint/Ironore.jpg"
					)
					/*,YKV 14 August 2021
					array(
					    "section"=>"360 Magazine",
					    "bgImage"=>BASEURL ."api/public/assets/app/exploreBookmarks/coalmint/Steel360.jpg"
					)*/
				);
			}else{
				
				$finalResult['exploreBookmarks']=array(
					array(
					    "section"=>"Insights",
					    "bgImage"=>BASEURL ."api/public/assets/app/exploreBookmarks/Insight.jpg"
					),
					array(
					    "section"=>"Tenders",
					    "bgImage"=>BASEURL ."api/public/assets/app/exploreBookmarks/Tender.jpg"
					),
					array(
					    "section"=>"Reports",
					    "bgImage"=>BASEURL ."api/public/assets/app/exploreBookmarks/Report.jpg"
					),
					array(
					    "section"=>"Events",
					    "bgImage"=>BASEURL ."api/public/assets/app/exploreBookmarks/Ironore.jpg"
					)
					,
					array(
					    "section"=>"360 Magazine",
					    "bgImage"=>BASEURL ."api/public/assets/app/exploreBookmarks/Steel360.jpg"
					)
				);
				
			}
				if( $app_type == 'SM' )
				    $comm = "iron ore";
				else    
				    $comm = "coal";
				
				$finalResult['preLoginStatsInputs']=array(
					"resourceType"	=> "web",
					"region"	=> "india",
					"dataType"	=> "production",//"capacity",
					"commodity"	=> $comm,//"Ferro Silicon",
					"columnNameOfRegion"	=> "country",
					"columnNameOfCommodity"	=> "commodity_new"//"subCommodity",
				);
				
				$finalResult['ExplorePricesOption']=array(
				    
					array("key" => 'Spot_Prices',       "value"				=>			"Spot Prices"),
					array("key" => 'Future_Prices',     "value"				=>			"Future Prices"),
					array("key" => 'Indices_Prices',    "value"				=>			"Indices"),
					array("key" => 'Currency',          "value"				=>			"Forex")
					
				);
		}
		return $finalResult;
	}
		
	function getReferenceDataFilter($resourceType='web', $itemType='', $section='', $place='', $otherCondition='')
	{
		$sql = "SELECT * FROM `tbl_region_commodity_master` WHERE itemType<>'' ";
		if($resourceType=='web'){
			if($place=='footer'){
				$sql.= " AND parentID=0 AND ((itemType='commodity' and index_folder_image<>'') OR itemType='region')";
			}
			
			if($itemType=='region'){
				$sql.= " AND parentID=0 ";
			}
			
			if($itemType!=''){
				$sql.= " AND itemType='$itemType'";
			}else{
				$sql.= " AND itemType in ('region', 'commodity')";
			}				
		}		
		
		$sql.=" Order By itemType, parentID desc, itemName";
		$referenceData = DB::select($sql);
		//dd(DB::getQueryLog());	
		//print_r($referenceData);
		$result = array();
		$resultChild = array();
		foreach($referenceData as $data){
			
			
			if($data['parentID']==0){
				$result[$data["itemType"]][] = array(
						"id" => $data['ID'],
						"name" => $data['itemName'],
						//"isSelectable" => $isSelectableLevel==$level?"y":'n',
						"bgImage"	=>	$data['index_folder_image']!=''?$data['index_folder_image']:$data['back_ground_image'],
						"sub_".$data["itemType"].""	=>	$resultChild[$data['ID']]
					);
			}elseif($data['parentID']!=413){
				$parentID  = $data['parentID'];
				if($data['grandParentID']==413){
					$parentID  = $data['grandParentID'];
				}
				
				$resultChild[$parentID][] = array(
						"id" => $data['ID'],
						"name" => $data['itemName'],
						//"isSelectable" => $isSelectableLevel==$level?"y":'n',
						"bgImage"	=>	$data['index_folder_image']!=''?$data['index_folder_image']:$data['back_ground_image']
					);
			}
		}	
		
		return $result;
	}
	
	public $referenceDataArr = array(
		'home'=>array(
			"commodity" => array(
				array(
					"id" => 1,
					"name" => "Iron Ore",
					"sub_commodity" => array(),
					"isSelectable" => "y",
					"bgImage"	=>	BASEURL ."api/public/assets/app/iron_ore_1.png"
				),
				array(
					"id" => 2,
					"name" => "Coal",
					"sub_commodity" => array(),
					"isSelectable" => "y",
					"bgImage"	=>	BASEURL ."api/public/assets/app/coal_1.png"
				),
				array(
					"id" => 3,
					"name" => "Scrap & Metallics",
					"sub_commodity" => array(),
					"isSelectable" => "y",
					"bgImage"	=>	BASEURL ."api/public/assets/app/scraps_1.png"
				),
				array(
					"id" => 4,
					"name" => "Steel",
					"sub_commodity" => array(),
					"isSelectable" => "y",
					"bgImage"	=>	BASEURL ."api/public/assets/app/steel_1.png"
				),
				array(
					"id" => 5,
					"name" => "Ferro Alloy",
					"sub_commodity" => array(),
					"isSelectable" => "y",
					"bgImage"	=>	BASEURL ."api/public/assets/app/ferro_alloy_1.png"
				),
				array(
					"id" => 6,
					"name" => "Logistics",
					"sub_commodity" => array(),
					"isSelectable" => "y",
					"bgImage"	=>	BASEURL ."api/public/assets/app/steel_1.png"
				),
				array(
					"id" => 7,
					"name" => "Ship Breaking",
					"sub_commodity" => array(),
					"isSelectable" => "y",
					"bgImage"	=>	BASEURL ."api/public/assets/app/ship_breakings_1.png"
				)
),
"region"=>array(
				array(
					"id" => 1,
					"name" => "Americas",
					"sub_region" => array(),
					"isSelectable" => "y",
					"bgImage"	=>	"https://public-v2links.adobecc.com/6ac9b0eb-50df-4ac9-73b0-75f755ebd66c/component?params=component_id:3078006e-a353-4e2d-a9b7-f82d472c83bd&params=version:0&token=1561694501_da39a3ee_e2c49f341799157df98ae5cc6b712f302fef7955&api_key=CometServer1"
				),
				array(
					"id" => 2,
					"name" => "UK, Europe",
					"sub_region" => array(),
					"isSelectable" => "y",
					"bgImage"	=>	"https://public-v2links.adobecc.com/6ac9b0eb-50df-4ac9-73b0-75f755ebd66c/component?params=component_id:88b4078f-959f-4be3-a5f0-84b9a8684c57&params=version:0&token=1561694501_da39a3ee_e2c49f341799157df98ae5cc6b712f302fef7955&api_key=CometServer1"
				),
				array(
					"id" => 3,
					"name" => "South East Asia",
					"sub_region" => array(),
					"isSelectable" => "y",
					"bgImage"	=>	"https://public-v2links.adobecc.com/6ac9b0eb-50df-4ac9-73b0-75f755ebd66c/component?params=component_id:3078006e-a353-4e2d-a9b7-f82d472c83bd&params=version:0&token=1561694501_da39a3ee_e2c49f341799157df98ae5cc6b712f302fef7955&api_key=CometServer1"
				),
				array(
					"id" => 4,
					"name" => "South Asia",
					"sub_region" => array(),
					"isSelectable" => "y",
					"bgImage"	=>	"https://public-v2links.adobecc.com/6ac9b0eb-50df-4ac9-73b0-75f755ebd66c/component?params=component_id:88b4078f-959f-4be3-a5f0-84b9a8684c57&params=version:0&token=1561694501_da39a3ee_e2c49f341799157df98ae5cc6b712f302fef7955&api_key=CometServer1"
				),
				array(
					"id" => 5,
					"name" => "MEA (Middle East Africa)",
					"sub_region" => array(),
					"isSelectable" => "y",
					"bgImage"	=>	"https://public-v2links.adobecc.com/6ac9b0eb-50df-4ac9-73b0-75f755ebd66c/component?params=component_id:3078006e-a353-4e2d-a9b7-f82d472c83bd&params=version:0&token=1561694501_da39a3ee_e2c49f341799157df98ae5cc6b712f302fef7955&api_key=CometServer1"
				),
				array(
					"id" => 6,
					"name" => "Far East Aisa",
					"sub_region" => array(),
					"isSelectable" => "y",
					"bgImage"	=>	"https://public-v2links.adobecc.com/6ac9b0eb-50df-4ac9-73b0-75f755ebd66c/component?params=component_id:3078006e-a353-4e2d-a9b7-f82d472c83bd&params=version:0&token=1561694501_da39a3ee_e2c49f341799157df98ae5cc6b712f302fef7955&api_key=CometServer1"
				),
				array(
					"id" => 7,
					"name" => "CIS Nations",
					"sub_region" => array(),
					"isSelectable" => "y",
					"bgImage"	=>	"https://public-v2links.adobecc.com/6ac9b0eb-50df-4ac9-73b0-75f755ebd66c/component?params=component_id:3078006e-a353-4e2d-a9b7-f82d472c83bd&params=version:0&token=1561694501_da39a3ee_e2c49f341799157df98ae5cc6b712f302fef7955&api_key=CometServer1"
				),
				array(
					"id" => 8,
					"name" => "Ocenia",
					"sub_region" => array(),
					"isSelectable" => "y",
					"bgImage"	=>	"https://public-v2links.adobecc.com/6ac9b0eb-50df-4ac9-73b0-75f755ebd66c/component?params=component_id:3078006e-a353-4e2d-a9b7-f82d472c83bd&params=version:0&token=1561694501_da39a3ee_e2c49f341799157df98ae5cc6b712f302fef7955&api_key=CometServer1"
				),
				array(
					"id" => 9,
					"name" => "India",
					"sub_region" => array(),
					"isSelectable" => "y",
					"bgImage"	=>	"https://public-v2links.adobecc.com/6ac9b0eb-50df-4ac9-73b0-75f755ebd66c/component?params=component_id:88b4078f-959f-4be3-a5f0-84b9a8684c57&params=version:0&token=1561694501_da39a3ee_e2c49f341799157df98ae5cc6b712f302fef7955&api_key=CometServer1"
				),
				array(
					"id" => 10,
					"name" => "China",
					"sub_region" => array(),
					"isSelectable" => "y",
					"bgImage"	=>	"https://public-v2links.adobecc.com/6ac9b0eb-50df-4ac9-73b0-75f755ebd66c/component?params=component_id:9a814cd4-8120-4b69-8763-299ab2b691fb&params=version:0&token=1561694501_da39a3ee_e2c49f341799157df98ae5cc6b712f302fef7955&api_key=CometServer1"
				)
)
						),
						'insights' =>	array(
"commodity" => array(
				array(
					"id" => 1,
					"name" => "Iron Ore",
					"sub_commodity" => array(
						array(
							"id" => 11,
							"name" => "Fines, Lumps",
							"sub_commodity" => array(),
							"isSelectable" => "y"
						),
						array(
							"id" => 12,
							"name" => "Pellets",
							"sub_commodity" => array(),
							"isSelectable" => "y"
						)
					),
					"isSelectable" => "n"
				),
				array(
					"id" => 2,
					"name" => "Coal",
					"sub_commodity" => array(
						array(
							"id" => 21,
							"name" => "Coking coal",
							"sub_commodity" => array(),
							"isSelectable" => "y"
						),
						array(
							"id" => 22,
							"name" => "Met Coke",
							"sub_commodity" => array(),
							"isSelectable" => "y"
						),
						array(
							"id" => 23,
							"name" => "Non Coking coal",
							"sub_commodity" => array(),
							"isSelectable" => "y"
						),
						array(
							"id" => 24,
							"name" => "Pet Coke",
							"sub_commodity" => array(),
							"isSelectable" => "y"
						)
					),
					"isSelectable" => "y"
				),
				array(
					"id" => 3,
					"name" => "Scrap & Metallics",
					"sub_commodity" => array(
						array(
							"id" => 31,
							"name" => "Melting Scrap",
							"sub_commodity" => array(),
							"isSelectable" => "y"
						),
						array(
							"id" => 32,
							"name" => "Mill Scale",
							"sub_commodity" => array(),
							"isSelectable" => "y"
						),
						array(
							"id" => 33,
							"name" => "Pig Iron",
							"sub_commodity" => array(),
							"isSelectable" => "y"
						),
						array(
							"id" => 34,
							"name" => "Sponge Iron",
							"sub_commodity" => array(),
							"isSelectable" => "y"
						)
					),
					"isSelectable" => "y"
				),
				array(
					"id" => 4,
					"name" => "Steel",
					"sub_commodity" => array(
						array(
							"id" => 41,
							"name" => "Semi Finished",
							"sub_commodity" => array(
								array(
									"id" => 411,
									"name" => "Billet, Ingot, Slabs",
									"sub_commodity" => array(),
									"isSelectable" => "y"
								)
							),
							"isSelectable" => "y"
						),
						array(
							"id" => 42,
							"name" => "Finish Long",
							"sub_commodity" => array(
								array(
									"id" => 421,
									"name" => "Rebar",
									"sub_commodity" => array(),
									"isSelectable" => "y"
								),
								array(
									"id" => 422,
									"name" => "Pipes",
									"sub_commodity" => array(),
									"isSelectable" => "y"
								),
								array(
									"id" => 423,
									"name" => "Structure",
									"sub_commodity" => array(),
									"isSelectable" => "y"
								),
								array(
									"id" => 424,
									"name" => "Wire Rod",
									"sub_commodity" => array(),
									"isSelectable" => "y"
								)
							),
							"isSelectable" => "y"
						),
						array(
							"id" => 43,
							"name" => "Finish Flat",
							"sub_commodity" => array(
								array(
									"id" => 431,
									"name" => "HRC",
									"sub_commodity" => array(),
									"isSelectable" => "y"
								),
								array(
									"id" => 432,
									"name" => "CRC",
									"sub_commodity" => array(),
									"isSelectable" => "y"
								),
								array(
									"id" => 433,
									"name" => "HR Plate",
									"sub_commodity" => array(),
									"isSelectable" => "y"
								),
								array(
									"id" => 434,
									"name" => "GP",
									"sub_commodity" => array(),
									"isSelectable" => "y"
								),
								array(
									"id" => 435,
									"name" => "PPGI",
									"sub_commodity" => array(),
									"isSelectable" => "y"
								)
							),
							"isSelectable" => "y"
						)
					),
					"isSelectable" => "y"
				),
				array(
					"id" => 5,
					"name" => "Ferro Alloy",
					"sub_commodity" => array(
						array(
							"id" => 51,
							"name" => "Silico Manganese",
							"sub_commodity" => array(),
							"isSelectable" => "y"
						),
						array(
							"id" => 52,
							"name" => "Ferro Manganese",
							"sub_commodity" => array(),
							"isSelectable" => "y"
						),
						array(
							"id" => 53,
							"name" => "Ferro Chrome",
							"sub_commodity" => array(),
							"isSelectable" => "y"
						),
						array(
							"id" => 54,
							"name" => "Ferro Silicon",
							"sub_commodity" => array(),
							"isSelectable" => "y"
						),
						array(
							"id" => 55,
							"name" => "Manganese Ore",
							"sub_commodity" => array(),
							"isSelectable" => "y"
						),
						array(
							"id" => 56,
							"name" => "Chrome Ore",
							"sub_commodity" => array(),
							"isSelectable" => "y"
						)
					),
					"isSelectable" => "y"
				),
				array(
					"id" => 6,
					"name" => "Logistics",
					"sub_commodity" => array(),
					"isSelectable" => "y"
				),
				array(
					"id" => 7,
					"name" => "Ship Breaking",
					"sub_commodity" => array(),
					"isSelectable" => "y"
				)
),
"region"=>array(
				array(
					"id" => 1,
					"name" => "Americas",
					"sub_region" => array(
						array(
							"id" => 11,
							"name" => "United states of america",
							"sub_region" => array(),
							"isSelectable" => "y"
						),
						array(
							"id" => 12,
							"name" => "Canada",
							"sub_region" => array(),
							"isSelectable" => "y"
						),
						array(
							"id" => 13,
							"name" => "Brazil",
							"sub_region" => array(),
							"isSelectable" => "y"
						),
						array(
							"id" => 14,
							"name" => "Colombia",
							"sub_region" => array(),
							"isSelectable" => "y"
						)
					),
					"isSelectable" => "n"
				),
				array(
					"id" => 2,
					"name" => "UK, Europe",
					"sub_region" => array(
						array(
							"id" => 21,
							"name" => "United kingdom",
							"sub_region" => array(),
							"isSelectable" => "y"
						),
						array(
							"id" => 22,
							"name" => "Sweden",
							"sub_region" => array(),
							"isSelectable" => "y"
						),
						array(
							"id" => 23,
							"name" => "Czech Republic",
							"sub_region" => array(),
							"isSelectable" => "y"
						),
						array(
							"id" => 24,
							"name" => "Italy",
							"sub_region" => array(),
							"isSelectable" => "y"
						)
					),
					"isSelectable" => "y"
				),
				array(
					"id" => 3,
					"name" => "South East Asia",
					"sub_region" => array(
						array(
							"id" => 31,
							"name" => "Thailand",
							"sub_region" => array(),
							"isSelectable" => "y"
						),
						array(
							"id" => 32,
							"name" => "Philippines",
							"sub_region" => array(),
							"isSelectable" => "y"
						),
						array(
							"id" => 33,
							"name" => "Indonesia",
							"sub_region" => array(),
							"isSelectable" => "y"
						),
						array(
							"id" => 34,
							"name" => "Vietnam",
							"sub_region" => array(),
							"isSelectable" => "y"
						),
						array(
							"id" => 35,
							"name" => "Singapore",
							"sub_region" => array(),
							"isSelectable" => "y"
						)
					),
					"isSelectable" => "y"
				),
				array(
					"id" => 4,
					"name" => "South Asia",
					"sub_region" => array(
						array(
							"id" => 41,
							"name" => "Nepal",
							"sub_region" => array(),
							"isSelectable" => "y"
						),
						array(
							"id" => 42,
							"name" => "Sri Lanka",
							"sub_region" => array(),
							"isSelectable" => "y"
						),
						array(
							"id" => 43,
							"name" => "Bangladesh",
							"sub_region" => array(),
							"isSelectable" => "y"
						),
						array(
							"id" => 44,
							"name" => "Pakistan",
							"sub_region" => array(),
							"isSelectable" => "y"
						)						
					),
					"isSelectable" => "y"
				),
				array(
					"id" => 5,
					"name" => "MEA (Middle East Africa)",
					"sub_region" => array(
						array(
							"id" => 51,
							"name" => "South Africa",
							"sub_region" => array(),
							"isSelectable" => "y"
						),
						array(
							"id" => 52,
							"name" => "Iran",
							"sub_region" => array(),
							"isSelectable" => "y"
						),
						array(
							"id" => 53,
							"name" => "Bahrain",
							"sub_region" => array(),
							"isSelectable" => "y"
						),
						array(
							"id" => 54,
							"name" => "Dubai",
							"sub_region" => array(),
							"isSelectable" => "y"
						),
						array(
							"id" => 55,
							"name" => "UAE",
							"sub_region" => array(),
							"isSelectable" => "y"
						),
						array(
							"id" => 56,
							"name" => "Saudi Arabia",
							"sub_region" => array(),
							"isSelectable" => "y"
						),
						array(
							"id" => 57,
							"name" => "Kazakhstan",
							"sub_region" => array(),
							"isSelectable" => "y"
						)
					),
					"isSelectable" => "y"
				),
				array(
					"id" => 6,
					"name" => "Far East Aisa",
					"sub_region" => array(
						array(
							"id" => 61,
							"name" => "Japan",
							"sub_region" => array(),
							"isSelectable" => "y"
						),
						array(
							"id" => 62,
							"name" => "Korea (south korea)",
							"sub_region" => array(),
							"isSelectable" => "y"
						),
						array(
							"id" => 63,
							"name" => "Taiwan",
							"sub_region" => array(),
							"isSelectable" => "y"
						)
					),
					"isSelectable" => "y"
				),
				array(
					"id" => 7,
					"name" => "CIS Nations",
					"sub_region" => array(
						array(
							"id" => 71,
							"name" => "Ukraine",
							"sub_region" => array(),
							"isSelectable" => "y"
						),
						array(
							"id" => 72,
							"name" => "Turkey",
							"sub_region" => array(),
							"isSelectable" => "y"
						),
						array(
							"id" => 73,
							"name" => "Russia",
							"sub_region" => array(),
							"isSelectable" => "y"
						),
						array(
							"id" => 74,
							"name" => "Mongolia",
							"sub_region" => array(),
							"isSelectable" => "y"
						)
					),
					"isSelectable" => "y"
				),
				array(
					"id" => 8,
					"name" => "Ocenia",
					"sub_region" => array(
						array(
							"id" => 81,
							"name" => "Australia",
							"sub_region" => array(),
							"isSelectable" => "y"
						),
						array(
							"id" => 82,
							"name" => "Newzealand",
							"sub_region" => array(),
							"isSelectable" => "y"
						)
					),
					"isSelectable" => "y"
				),
				array(
					"id" => 9,
					"name" => "India",
					"sub_region" => array(),
					"isSelectable" => "y"
				),
				array(
					"id" => 10,
					"name" => "China",
					"sub_region" => array(),
					"isSelectable" => "y"
				)
)
						),
						'tenders' => array(
"commodity" => array(
				array(
					"id" => 1,
					"name" => "Iron Ore",
					"sub_commodity" => array(
						array(
							"id" => 11,
							"name" => "Fines, Lumps",
							"sub_commodity" => array(),
							"isSelectable" => "y"
						),
						array(
							"id" => 12,
							"name" => "Pellets",
							"sub_commodity" => array(),
							"isSelectable" => "y"
						)
					),
					"isSelectable" => "n"
				),
				array(
					"id" => 2,
					"name" => "Coal",
					"sub_commodity" => array(
						array(
							"id" => 21,
							"name" => "Coking coal",
							"sub_commodity" => array(),
							"isSelectable" => "y"
						),
						array(
							"id" => 22,
							"name" => "Met Coke",
							"sub_commodity" => array(),
							"isSelectable" => "y"
						),
						array(
							"id" => 23,
							"name" => "Non Coking coal",
							"sub_commodity" => array(),
							"isSelectable" => "y"
						),
						array(
							"id" => 24,
							"name" => "Pet Coke",
							"sub_commodity" => array(),
							"isSelectable" => "y"
						)
					),
					"isSelectable" => "y"
				),
				array(
					"id" => 3,
					"name" => "Scrap & Metallics",
					"sub_commodity" => array(
						array(
							"id" => 31,
							"name" => "Melting Scrap",
							"sub_commodity" => array(),
							"isSelectable" => "y"
						),
						array(
							"id" => 32,
							"name" => "Mill Scale",
							"sub_commodity" => array(),
							"isSelectable" => "y"
						),
						array(
							"id" => 33,
							"name" => "Pig Iron",
							"sub_commodity" => array(),
							"isSelectable" => "y"
						),
						array(
							"id" => 34,
							"name" => "Sponge Iron",
							"sub_commodity" => array(),
							"isSelectable" => "y"
						)
					),
					"isSelectable" => "y"
				),
				array(
					"id" => 4,
					"name" => "Steel",
					"sub_commodity" => array(
						array(
							"id" => 41,
							"name" => "Semi Finished",
							"sub_commodity" => array(
								array(
									"id" => 411,
									"name" => "Billet, Ingot, Slabs",
									"sub_commodity" => array(),
									"isSelectable" => "y"
								)
							),
							"isSelectable" => "y"
						),
						array(
							"id" => 42,
							"name" => "Finish Long",
							"sub_commodity" => array(
								array(
									"id" => 421,
									"name" => "Rebar",
									"sub_commodity" => array(),
									"isSelectable" => "y"
								),
								array(
									"id" => 422,
									"name" => "Pipes",
									"sub_commodity" => array(),
									"isSelectable" => "y"
								),
								array(
									"id" => 423,
									"name" => "Structure",
									"sub_commodity" => array(),
									"isSelectable" => "y"
								),
								array(
									"id" => 424,
									"name" => "Wire Rod",
									"sub_commodity" => array(),
									"isSelectable" => "y"
								)
							),
							"isSelectable" => "y"
						),
						array(
							"id" => 43,
							"name" => "Finish Flat",
							"sub_commodity" => array(
								array(
									"id" => 431,
									"name" => "HRC",
									"sub_commodity" => array(),
									"isSelectable" => "y"
								),
								array(
									"id" => 432,
									"name" => "CRC",
									"sub_commodity" => array(),
									"isSelectable" => "y"
								),
								array(
									"id" => 433,
									"name" => "HR Plate",
									"sub_commodity" => array(),
									"isSelectable" => "y"
								),
								array(
									"id" => 434,
									"name" => "GP",
									"sub_commodity" => array(),
									"isSelectable" => "y"
								),
								array(
									"id" => 435,
									"name" => "PPGI",
									"sub_commodity" => array(),
									"isSelectable" => "y"
								)
							),
							"isSelectable" => "y"
						)
					),
					"isSelectable" => "y"
				),
				array(
					"id" => 5,
					"name" => "Ferro Alloy",
					"sub_commodity" => array(
						array(
							"id" => 51,
							"name" => "Silico Manganese",
							"sub_commodity" => array(),
							"isSelectable" => "y"
						),
						array(
							"id" => 52,
							"name" => "Ferro Manganese",
							"sub_commodity" => array(),
							"isSelectable" => "y"
						),
						array(
							"id" => 53,
							"name" => "Ferro Chrome",
							"sub_commodity" => array(),
							"isSelectable" => "y"
						),
						array(
							"id" => 54,
							"name" => "Ferro Silicon",
							"sub_commodity" => array(),
							"isSelectable" => "y"
						),
						array(
							"id" => 55,
							"name" => "Manganese Ore",
							"sub_commodity" => array(),
							"isSelectable" => "y"
						),
						array(
							"id" => 56,
							"name" => "Chrome Ore",
							"sub_commodity" => array(),
							"isSelectable" => "y"
						)
					),
					"isSelectable" => "y"
				),
				array(
					"id" => 6,
					"name" => "Logistics",
					"sub_commodity" => array(),
					"isSelectable" => "y"
				),
				array(
					"id" => 7,
					"name" => "Ship Breaking",
					"sub_commodity" => array(),
					"isSelectable" => "y"
				)
),
"region"=>array(
				array(
					"id" => 1,
					"name" => "Americas",
					"sub_region" => array(
						array(
							"id" => 11,
							"name" => "United states of america",
							"sub_region" => array(),
							"isSelectable" => "y"
						),
						array(
							"id" => 12,
							"name" => "Canada",
							"sub_region" => array(),
							"isSelectable" => "y"
						),
						array(
							"id" => 13,
							"name" => "Brazil",
							"sub_region" => array(),
							"isSelectable" => "y"
						),
						array(
							"id" => 14,
							"name" => "Colombia",
							"sub_region" => array(),
							"isSelectable" => "y"
						)
					),
					"isSelectable" => "n"
				),
				array(
					"id" => 2,
					"name" => "UK, Europe",
					"sub_region" => array(
						array(
							"id" => 21,
							"name" => "United kingdom",
							"sub_region" => array(),
							"isSelectable" => "y"
						),
						array(
							"id" => 22,
							"name" => "Sweden",
							"sub_region" => array(),
							"isSelectable" => "y"
						),
						array(
							"id" => 23,
							"name" => "Czech Republic",
							"sub_region" => array(),
							"isSelectable" => "y"
						),
						array(
							"id" => 24,
							"name" => "Italy",
							"sub_region" => array(),
							"isSelectable" => "y"
						)
					),
					"isSelectable" => "y"
				),
				array(
					"id" => 3,
					"name" => "South East Asia",
					"sub_region" => array(
						array(
							"id" => 31,
							"name" => "Thailand",
							"sub_region" => array(),
							"isSelectable" => "y"
						),
						array(
							"id" => 32,
							"name" => "Philippines",
							"sub_region" => array(),
							"isSelectable" => "y"
						),
						array(
							"id" => 33,
							"name" => "Indonesia",
							"sub_region" => array(),
							"isSelectable" => "y"
						),
						array(
							"id" => 34,
							"name" => "Vietnam",
							"sub_region" => array(),
							"isSelectable" => "y"
						),
						array(
							"id" => 35,
							"name" => "Singapore",
							"sub_region" => array(),
							"isSelectable" => "y"
						)
					),
					"isSelectable" => "y"
				),
				array(
					"id" => 4,
					"name" => "South Asia",
					"sub_region" => array(
						array(
							"id" => 41,
							"name" => "Nepal",
							"sub_region" => array(),
							"isSelectable" => "y"
						),
						array(
							"id" => 42,
							"name" => "Sri Lanka",
							"sub_region" => array(),
							"isSelectable" => "y"
						),
						array(
							"id" => 43,
							"name" => "Bangladesh",
							"sub_region" => array(),
							"isSelectable" => "y"
						),
						array(
							"id" => 44,
							"name" => "Pakistan",
							"sub_region" => array(),
							"isSelectable" => "y"
						)						
					),
					"isSelectable" => "y"
				),
				array(
					"id" => 5,
					"name" => "MEA (Middle East Africa)",
					"sub_region" => array(
						array(
							"id" => 51,
							"name" => "South Africa",
							"sub_region" => array(),
							"isSelectable" => "y"
						),
						array(
							"id" => 52,
							"name" => "Iran",
							"sub_region" => array(),
							"isSelectable" => "y"
						),
						array(
							"id" => 53,
							"name" => "Bahrain",
							"sub_region" => array(),
							"isSelectable" => "y"
						),
						array(
							"id" => 54,
							"name" => "Dubai",
							"sub_region" => array(),
							"isSelectable" => "y"
						),
						array(
							"id" => 55,
							"name" => "UAE",
							"sub_region" => array(),
							"isSelectable" => "y"
						),
						array(
							"id" => 56,
							"name" => "Saudi Arabia",
							"sub_region" => array(),
							"isSelectable" => "y"
						),
						array(
							"id" => 57,
							"name" => "Kazakhstan",
							"sub_region" => array(),
							"isSelectable" => "y"
						)
					),
					"isSelectable" => "y"
				),
				array(
					"id" => 6,
					"name" => "Far East Aisa",
					"sub_region" => array(
						array(
							"id" => 61,
							"name" => "Japan",
							"sub_region" => array(),
							"isSelectable" => "y"
						),
						array(
							"id" => 62,
							"name" => "Korea (south korea)",
							"sub_region" => array(),
							"isSelectable" => "y"
						),
						array(
							"id" => 63,
							"name" => "Taiwan",
							"sub_region" => array(),
							"isSelectable" => "y"
						)
					),
					"isSelectable" => "y"
				),
				array(
					"id" => 7,
					"name" => "CIS Nations",
					"sub_region" => array(
						array(
							"id" => 71,
							"name" => "Ukraine",
							"sub_region" => array(),
							"isSelectable" => "y"
						),
						array(
							"id" => 72,
							"name" => "Turkey",
							"sub_region" => array(),
							"isSelectable" => "y"
						),
						array(
							"id" => 73,
							"name" => "Russia",
							"sub_region" => array(),
							"isSelectable" => "y"
						),
						array(
							"id" => 74,
							"name" => "Mongolia",
							"sub_region" => array(),
							"isSelectable" => "y"
						)
					),
					"isSelectable" => "y"
				),
				array(
					"id" => 8,
					"name" => "Ocenia",
					"sub_region" => array(
						array(
							"id" => 81,
							"name" => "Australia",
							"sub_region" => array(),
							"isSelectable" => "y"
						),
						array(
							"id" => 82,
							"name" => "Newzealand",
							"sub_region" => array(),
							"isSelectable" => "y"
						)
					),
					"isSelectable" => "y"
				),
				array(
					"id" => 9,
					"name" => "India",
					"sub_region" => array(),
					"isSelectable" => "y"
				),
				array(
					"id" => 10,
					"name" => "China",
					"sub_region" => array(),
					"isSelectable" => "y"
				)
)
						),
						'prices' => array(
"commodity" => array(
				array(
					"id" => 1,
					"name" => "Iron Ore",
					"sub_commodity" => array(
						array(
							"id" => 11,
							"name" => "Fines, Lumps",
							"sub_commodity" => array(),
							"isSelectable" => "y"
						),
						array(
							"id" => 12,
							"name" => "Pellets",
							"sub_commodity" => array(),
							"isSelectable" => "y"
						)
					),
					"isSelectable" => "n"
				),
				array(
					"id" => 2,
					"name" => "Coal",
					"sub_commodity" => array(
						array(
							"id" => 21,
							"name" => "Coking coal",
							"sub_commodity" => array(),
							"isSelectable" => "y"
						),
						array(
							"id" => 22,
							"name" => "Met Coke",
							"sub_commodity" => array(),
							"isSelectable" => "y"
						),
						array(
							"id" => 23,
							"name" => "Non Coking coal",
							"sub_commodity" => array(),
							"isSelectable" => "y"
						),
						array(
							"id" => 24,
							"name" => "Pet Coke",
							"sub_commodity" => array(),
							"isSelectable" => "y"
						)
					),
					"isSelectable" => "y"
				),
				array(
					"id" => 3,
					"name" => "Scrap & Metallics",
					"sub_commodity" => array(
						array(
							"id" => 31,
							"name" => "Melting Scrap",
							"sub_commodity" => array(),
							"isSelectable" => "y"
						),
						array(
							"id" => 32,
							"name" => "Mill Scale",
							"sub_commodity" => array(),
							"isSelectable" => "y"
						),
						array(
							"id" => 33,
							"name" => "Pig Iron",
							"sub_commodity" => array(),
							"isSelectable" => "y"
						),
						array(
							"id" => 34,
							"name" => "Sponge Iron",
							"sub_commodity" => array(),
							"isSelectable" => "y"
						)
					),
					"isSelectable" => "y"
				),
				array(
					"id" => 4,
					"name" => "Steel",
					"sub_commodity" => array(
						array(
							"id" => 41,
							"name" => "Semi Finished",
							"sub_commodity" => array(
								array(
									"id" => 411,
									"name" => "Billet, Ingot, Slabs",
									"sub_commodity" => array(),
									"isSelectable" => "y"
								)
							),
							"isSelectable" => "y"
						),
						array(
							"id" => 42,
							"name" => "Finish Long",
							"sub_commodity" => array(
								array(
									"id" => 421,
									"name" => "Rebar",
									"sub_commodity" => array(),
									"isSelectable" => "y"
								),
								array(
									"id" => 422,
									"name" => "Pipes",
									"sub_commodity" => array(),
									"isSelectable" => "y"
								),
								array(
									"id" => 423,
									"name" => "Structure",
									"sub_commodity" => array(),
									"isSelectable" => "y"
								),
								array(
									"id" => 424,
									"name" => "Wire Rod",
									"sub_commodity" => array(),
									"isSelectable" => "y"
								)
							),
							"isSelectable" => "y"
						),
						array(
							"id" => 43,
							"name" => "Finish Flat",
							"sub_commodity" => array(
								array(
									"id" => 431,
									"name" => "HRC",
									"sub_commodity" => array(),
									"isSelectable" => "y"
								),
								array(
									"id" => 432,
									"name" => "CRC",
									"sub_commodity" => array(),
									"isSelectable" => "y"
								),
								array(
									"id" => 433,
									"name" => "HR Plate",
									"sub_commodity" => array(),
									"isSelectable" => "y"
								),
								array(
									"id" => 434,
									"name" => "GP",
									"sub_commodity" => array(),
									"isSelectable" => "y"
								),
								array(
									"id" => 435,
									"name" => "PPGI",
									"sub_commodity" => array(),
									"isSelectable" => "y"
								)
							),
							"isSelectable" => "y"
						)
					),
					"isSelectable" => "y"
				),
				array(
					"id" => 5,
					"name" => "Ferro Alloy",
					"sub_commodity" => array(
						array(
							"id" => 51,
							"name" => "Silico Manganese",
							"sub_commodity" => array(),
							"isSelectable" => "y"
						),
						array(
							"id" => 52,
							"name" => "Ferro Manganese",
							"sub_commodity" => array(),
							"isSelectable" => "y"
						),
						array(
							"id" => 53,
							"name" => "Ferro Chrome",
							"sub_commodity" => array(),
							"isSelectable" => "y"
						),
						array(
							"id" => 54,
							"name" => "Ferro Silicon",
							"sub_commodity" => array(),
							"isSelectable" => "y"
						),
						array(
							"id" => 55,
							"name" => "Manganese Ore",
							"sub_commodity" => array(),
							"isSelectable" => "y"
						),
						array(
							"id" => 56,
							"name" => "Chrome Ore",
							"sub_commodity" => array(),
							"isSelectable" => "y"
						)
					),
					"isSelectable" => "y"
				),
				array(
					"id" => 6,
					"name" => "Logistics",
					"sub_commodity" => array(),
					"isSelectable" => "y"
				),
				array(
					"id" => 7,
					"name" => "Ship Breaking",
					"sub_commodity" => array(),
					"isSelectable" => "y"
				)
),
"region"=>array(
				array(
					"id" => 1,
					"name" => "Americas",
					"sub_region" => array(
						array(
							"id" => 11,
							"name" => "United states of america",
							"sub_region" => array(),
							"isSelectable" => "y"
						),
						array(
							"id" => 12,
							"name" => "Canada",
							"sub_region" => array(),
							"isSelectable" => "y"
						),
						array(
							"id" => 13,
							"name" => "Brazil",
							"sub_region" => array(),
							"isSelectable" => "y"
						),
						array(
							"id" => 14,
							"name" => "Colombia",
							"sub_region" => array(),
							"isSelectable" => "y"
						)
					),
					"isSelectable" => "n"
				),
				array(
					"id" => 2,
					"name" => "UK, Europe",
					"sub_region" => array(
						array(
							"id" => 21,
							"name" => "United kingdom",
							"sub_region" => array(),
							"isSelectable" => "y"
						),
						array(
							"id" => 22,
							"name" => "Sweden",
							"sub_region" => array(),
							"isSelectable" => "y"
						),
						array(
							"id" => 23,
							"name" => "Czech Republic",
							"sub_region" => array(),
							"isSelectable" => "y"
						),
						array(
							"id" => 24,
							"name" => "Italy",
							"sub_region" => array(),
							"isSelectable" => "y"
						)
					),
					"isSelectable" => "y"
				),
				array(
					"id" => 3,
					"name" => "South East Asia",
					"sub_region" => array(
						array(
							"id" => 31,
							"name" => "Thailand",
							"sub_region" => array(),
							"isSelectable" => "y"
						),
						array(
							"id" => 32,
							"name" => "Philippines",
							"sub_region" => array(),
							"isSelectable" => "y"
						),
						array(
							"id" => 33,
							"name" => "Indonesia",
							"sub_region" => array(),
							"isSelectable" => "y"
						),
						array(
							"id" => 34,
							"name" => "Vietnam",
							"sub_region" => array(),
							"isSelectable" => "y"
						),
						array(
							"id" => 35,
							"name" => "Singapore",
							"sub_region" => array(),
							"isSelectable" => "y"
						)
					),
					"isSelectable" => "y"
				),
				array(
					"id" => 4,
					"name" => "South Asia",
					"sub_region" => array(
						array(
							"id" => 41,
							"name" => "Nepal",
							"sub_region" => array(),
							"isSelectable" => "y"
						),
						array(
							"id" => 42,
							"name" => "Sri Lanka",
							"sub_region" => array(),
							"isSelectable" => "y"
						),
						array(
							"id" => 43,
							"name" => "Bangladesh",
							"sub_region" => array(),
							"isSelectable" => "y"
						),
						array(
							"id" => 44,
							"name" => "Pakistan",
							"sub_region" => array(),
							"isSelectable" => "y"
						)						
					),
					"isSelectable" => "y"
				),
				array(
					"id" => 5,
					"name" => "MEA (Middle East Africa)",
					"sub_region" => array(
						array(
							"id" => 51,
							"name" => "South Africa",
							"sub_region" => array(),
							"isSelectable" => "y"
						),
						array(
							"id" => 52,
							"name" => "Iran",
							"sub_region" => array(),
							"isSelectable" => "y"
						),
						array(
							"id" => 53,
							"name" => "Bahrain",
							"sub_region" => array(),
							"isSelectable" => "y"
						),
						array(
							"id" => 54,
							"name" => "Dubai",
							"sub_region" => array(),
							"isSelectable" => "y"
						),
						array(
							"id" => 55,
							"name" => "UAE",
							"sub_region" => array(),
							"isSelectable" => "y"
						),
						array(
							"id" => 56,
							"name" => "Saudi Arabia",
							"sub_region" => array(),
							"isSelectable" => "y"
						),
						array(
							"id" => 57,
							"name" => "Kazakhstan",
							"sub_region" => array(),
							"isSelectable" => "y"
						)
					),
					"isSelectable" => "y"
				),
				array(
					"id" => 6,
					"name" => "Far East Aisa",
					"sub_region" => array(
						array(
							"id" => 61,
							"name" => "Japan",
							"sub_region" => array(),
							"isSelectable" => "y"
						),
						array(
							"id" => 62,
							"name" => "Korea (south korea)",
							"sub_region" => array(),
							"isSelectable" => "y"
						),
						array(
							"id" => 63,
							"name" => "Taiwan",
							"sub_region" => array(),
							"isSelectable" => "y"
						)
					),
					"isSelectable" => "y"
				),
				array(
					"id" => 7,
					"name" => "CIS Nations",
					"sub_region" => array(
						array(
							"id" => 71,
							"name" => "Ukraine",
							"sub_region" => array(),
							"isSelectable" => "y"
						),
						array(
							"id" => 72,
							"name" => "Turkey",
							"sub_region" => array(),
							"isSelectable" => "y"
						),
						array(
							"id" => 73,
							"name" => "Russia",
							"sub_region" => array(),
							"isSelectable" => "y"
						),
						array(
							"id" => 74,
							"name" => "Mongolia",
							"sub_region" => array(),
							"isSelectable" => "y"
						)
					),
					"isSelectable" => "y"
				),
				array(
					"id" => 8,
					"name" => "Ocenia",
					"sub_region" => array(
						array(
							"id" => 81,
							"name" => "Australia",
							"sub_region" => array(),
							"isSelectable" => "y"
						),
						array(
							"id" => 82,
							"name" => "Newzealand",
							"sub_region" => array(),
							"isSelectable" => "y"
						)
					),
					"isSelectable" => "y"
				),
				array(
					"id" => 9,
					"name" => "India",
					"sub_region" => array(),
					"isSelectable" => "y"
				),
				array(
					"id" => 10,
					"name" => "China",
					"sub_region" => array(),
					"isSelectable" => "y"
				)
)
						),
				'currencyConvertor'=>array(
					array(
					"name" => "INDIA",
					"code" => 'INR',
					"symbol" => 'u\20B9'
					),
					array(
					"name" => "Doller",
					"code" => 'EUR',
					"symbol" => 'u\0024'
					),
					array(
					"name" => "Japanese Yen",
					"code" => 'YEN',
					"symbol" => 'u\00A5'
					),
					array(
					"name" => "Russian ruble",
					"code" => 'RUB',
					"symbol" => 'u\20BD'
					),
					array(
					"name" => "Renminbi, Chinese Yuan",
					"code" => 'RMB',
					"symbol" => 'u\00A5'
					),
					array(
					"name" => "Indonesian Rupiah",
					"code" => 'IDR',
					"symbol" => 'u\0052,u\0070'
					)
				),
				'tradeType'=>array(
					"all"=>"All",
					"domestic"=>"Domestic",
					"import"=>"Import",
					"export"=>"Export"
				),
				'timeLine'=>array(
					""=>"All",
					"2d"=>"Two Days Ago",
					"1w"=>"One week Ago",
					"2w"=>"Two week Ago"
				),
				'dataType'=>array(
					"all"=>"All",
					"prices"=>"Prices",
					"insight"=>"Insight",
					"tenders"=>"Tenders",
					"reports"=>"Reports",
					"statistics"=>"Statistics",
					"events"=>"Events"
				),
				'reportType'=>array(
					"all"=>"All",
					"special"=>"Special",
					"regular"=>"Regular",
					"knowledge"=>"Knowledge"
				),
				'packageTenure'=>array(
					"3m"=>"3 Months",
					"6m"=>"6 Months",
					"9m"=>"9 Months",
					"1y"=>"1 Year"
				),
	);
}
