<?php
defined('BASEPATH') OR exit('No direct script access allowed');


function game_code_decision($game_provider_code = NULL,$game_type_code = NULL,$game_real_code = NULL)
{
	switch($game_provider_code)
	{
		case "WM": (!empty($game_real_code) ? $result = wm_game_code_decision($game_type_code,$game_real_code) : $result = "-");break;
		case "SA": (!empty($game_real_code) ? $result = sa_game_code_decision($game_type_code,$game_real_code) : $result = "-");break;
		case "DG": (!empty($game_real_code) ? $result = dg_game_code_decision($game_type_code,$game_real_code) : $result = "-");break;
		default:$result = "-";break;
	}
	return $result;
}

function bet_code_decision($game_provider_code = NULL,$game_type_code = NULL,$game_real_code = NULL, $bet_code = NULL)
{
	switch($game_provider_code)
	{
		case "WM": (!empty($bet_code) ? $result = wm_bet_code_decision($game_type_code,$game_real_code,$bet_code) : $result = "-");break;
		case "SA": $result = sa_bet_code_decision($game_type_code,$game_real_code,$bet_code);break;
		case "DG": $result = dg_bet_code_decision($game_type_code,$game_real_code,$bet_code);break;
		default:$result = "-";break;
	}
	return $result;
}

function game_result_decision($game_provider_code = NULL,$game_type_code = NULL,$game_real_code = NULL, $game_result = NULL)
{
	switch($game_provider_code)
	{
		case "WM": (!empty($game_result) ? $result = wm_game_result_decision($game_type_code,$game_real_code,$game_result) : $result = "-");break;
		case "SA": (!empty($game_result) ? $result = sa_game_result_decision($game_type_code,$game_real_code,$game_result) : $result = "-");break;
		case "DG": (!empty($game_result) ? $result = dg_game_result_decision($game_type_code,$game_real_code,$game_result) : $result = "-");break;
		default:$result = "-";break;
	}
	return $result;
}

/*WM*/
function wm_game_code_decision($game_type_code = NULL,$game_real_code = NULL){
	$obj =& get_instance();
	switch($game_real_code)
	{
		case 101: $result = $obj->lang->line('all_game_code_baccarat'); break;
		case 102: $result = $obj->lang->line('all_game_code_dragon_tiger'); break;
		case 103: $result = $obj->lang->line('all_game_code_roulette'); break;
		case 104: $result = $obj->lang->line('all_game_code_sicbo'); break;
		case 105: $result = $obj->lang->line('all_game_code_bull_bull'); break;
		case 106: $result = $obj->lang->line('all_game_code_sam_gong'); break;
		case 107: $result = $obj->lang->line('all_game_code_fan_tan'); break;
		case 108: $result = $obj->lang->line('all_game_code_se_die'); break;
		case 110: $result = $obj->lang->line('all_game_code_fish_prawn_crab'); break;
		default: $result = "-"; break;
	}
	return $result;
}

function wm_bet_code_decision($game_type_code = NULL,$game_real_code = NULL, $bet_code = NULL){
	$obj =& get_instance();
	if($game_real_code == 101){
		switch($bet_code)
		{
			case "Banker": $result = $obj->lang->line('all_bet_code_banker'); break;
			case "Player": $result = $obj->lang->line('all_bet_code_player'); break;
			case "Tie": $result = $obj->lang->line('all_bet_code_tie'); break;
			case "BPair": $result = $obj->lang->line('all_bet_code_banker_pair'); break;
			case "PPair": $result = $obj->lang->line('all_bet_code_player_pair'); break;
			default: $result = "-"; break;
		}
	}else if($game_real_code == 102){
		switch($bet_code)
		{
			case "Dragon": $result = $obj->lang->line('all_bet_code_dragon'); break;
			case "Tiger": $result = $obj->lang->line('all_bet_code_tiger'); break;
			case "Tie": $result = $obj->lang->line('all_bet_code_tie'); break;
			default: $result = "-"; break;
		}
	}else if($game_real_code == 103){
		if(strpos($bet_code, 'Num') !== false){
			//number
			$number = str_replace("Num","",$bet_code);
			if(strpos($number, '_') !== false){
				$result = $obj->lang->line('all_bet_code_multiple_number')." : ".str_replace("_",",",$number);
			}else{
				$result = $obj->lang->line('all_bet_code_straight_number')." : ".$number;
			}
		}else if(strpos($bet_code, 'Column') !== false){
			$number = str_replace("Column","",$bet_code);
			$result = $obj->lang->line('all_bet_code_column')." : ".$number;
		}else if(strpos($bet_code, 'Dozen') !== false){
			$number = str_replace("Dozen","",$bet_code);
			$result = $obj->lang->line('all_bet_code_dozen')." : ".str_replace("_"," ".$obj->lang->line('all_bet_code_until')." ",$number);
		}else{
			switch($bet_code)
			{
				case "Red": $result = $obj->lang->line('all_bet_code_red'); break;
				case "Black": $result = $obj->lang->line('all_bet_code_black'); break;
				case "Odd": $result = $obj->lang->line('all_bet_code_odd'); break;
				case "Even": $result = $obj->lang->line('all_bet_code_even'); break;
				case "Big": $result = $obj->lang->line('all_bet_code_big'); break;
				case "Small": $result = $obj->lang->line('all_bet_code_small'); break;
				default: $result = "-"; break;
			}
		}
	}else if($game_real_code == 104){
		if(strpos($bet_code, 'Sum') !== false){
			//number
			$number = str_replace("Sum","",$bet_code);
			$result = $obj->lang->line('all_bet_code_sum_number')." : ".$number;
		}else if(strpos($bet_code, 'OneDice') !== false){
			//number
			$number = str_replace("OneDice","",$bet_code);
			$result = $obj->lang->line('all_bet_code_one_dice')." : ".$number;
		}else if(strpos($bet_code, 'TwoDice') !== false){
			//number
			$number = str_replace("TwoDice","",$bet_code);
			$result = $obj->lang->line('all_bet_code_two_dice')." : ".implode(',',str_split($number));
		}else if(strpos($bet_code, 'DoubleDice') !== false){
			//number
			$number = str_replace("DoubleDice","",$bet_code);
			$result = $obj->lang->line('all_bet_code_double_dice')." : ".$number;
		}else if(strpos($bet_code, 'AllLeopard') !== false){
			//number
			$result = $obj->lang->line('all_bet_code_any_triples');
		}else if(strpos($bet_code, 'Leopard') !== false){
			//number
			$number = str_replace("Leopard","",$bet_code);
			$result = $obj->lang->line('all_bet_code_specific_triples')." : ".$number;
		}else if(strpos($bet_code, 'Dice') !== false){
			//number
			$number = str_replace("Dice","",$bet_code);
			$result = $obj->lang->line('all_bet_code_dice')." : ".implode(',',str_split($number));
		}else{
			switch($bet_code)
			{
				case "Odd": $result = $obj->lang->line('all_bet_code_odd'); break;
				case "Even": $result = $obj->lang->line('all_bet_code_even'); break;
				case "Big": $result = $obj->lang->line('all_bet_code_big'); break;
				case "Small": $result = $obj->lang->line('all_bet_code_small'); break;
				default: $result = "-"; break;
			}
		}
	}else if($game_real_code == 105){
		switch($bet_code)
		{
			case "Player1Equal": $result = $obj->lang->line('all_bet_code_player_one_equal'); break;
			case "Player1Double": $result = $obj->lang->line('all_bet_code_player_one_double'); break;
			case "Player2Equal": $result = $obj->lang->line('all_bet_code_player_two_equal'); break;
			case "Player2Double": $result = $obj->lang->line('all_bet_code_player_two_double'); break;
			case "Player3Equal": $result = $obj->lang->line('all_bet_code_player_three_equal'); break;
			case "Player3Double": $result = $obj->lang->line('all_bet_code_player_three_double'); break;
			default: $result = "-"; break;
		}
	}else if($game_real_code == 106){
		switch($bet_code)
		{
			case "BankerPairPlus": $result = $obj->lang->line('all_bet_code_banker_pair_plus'); break;
			case "Player1Win": $result = $obj->lang->line('all_bet_code_player_one_win'); break;
			case "Player1Lose": $result = $obj->lang->line('all_bet_code_player_one_lose'); break;
			case "Player1Tie": $result = $obj->lang->line('all_bet_code_player_one_tie'); break;
			case "Player1ThreeFace": $result = $obj->lang->line('all_bet_code_player_one_three_face'); break;
			case "Player1PairPlus": $result = $obj->lang->line('all_bet_code_player_one_pair_plus'); break;
			case "Player2Win": $result = $obj->lang->line('all_bet_code_player_two_win'); break;
			case "Player2Lose": $result = $obj->lang->line('all_bet_code_player_two_lose'); break;
			case "Player2Tie": $result = $obj->lang->line('all_bet_code_player_two_tie'); break;
			case "Player2ThreeFace": $result = $obj->lang->line('all_bet_code_player_two_three_face'); break;
			case "Player2PairPlus": $result = $obj->lang->line('all_bet_code_player_two_pair_plus'); break;
			case "Player3Win": $result = $obj->lang->line('all_bet_code_player_three_win'); break;
			case "Player3Lose": $result = $obj->lang->line('all_bet_code_player_three_lose'); break;
			case "Player3Tie": $result = $obj->lang->line('all_bet_code_player_three_tie'); break;
			case "Player3ThreeFace": $result = $obj->lang->line('all_bet_code_player_three_three_face'); break;
			case "Player3PairPlus": $result = $obj->lang->line('all_bet_code_player_three_pair_plus'); break;
			default: $result = "-"; break;
		}
	}else if($game_real_code == 107){
		if(strpos($bet_code, 'Nim') !== false){
			//number
			$number = str_replace("Nim","",$bet_code);
			$number_array = str_split($number);
			$result = $number_array[0] ." ". $obj->lang->line('all_bet_code_nim_number') . " " . $number_array[1];
		}else if(strpos($bet_code, 'Kwok') !== false){
			//number
			$number = str_replace("Kwok","",$bet_code);
			$result = $number.$obj->lang->line('all_bet_code_kwok_number');
		}else if(strpos($bet_code, 'Nga') !== false){
			//number
			$number = str_replace("Nga","",$bet_code);
			$number_array = str_split($number);
			switch($number_array[2])
			{
				case 2: $temporary_number = $obj->lang->line('all_bet_code_two'); break;
				case 3: $temporary_number = $obj->lang->line('all_bet_code_three'); break;
				case 4: $temporary_number = $obj->lang->line('all_bet_code_four'); break;
				default: $temporary_number = $obj->lang->line('all_bet_code_one'); break;
			}
			$result = $number_array[0].$number_array[1]." ".$temporary_number.$obj->lang->line('all_bet_code_nga_number');
		}else if(strpos($bet_code, 'Ssh') !== false){
			//number
			$number = str_replace("Ssh","",$bet_code);
			$result = $obj->lang->line('all_bet_code_ssh_number').$number;
		}else{
			switch($bet_code)
			{
				case "Odd": $result = $obj->lang->line('all_bet_code_odd'); break;
				case "Even": $result = $obj->lang->line('all_bet_code_even'); break;
				case "Big": $result = $obj->lang->line('all_bet_code_big'); break;
				case "Small": $result = $obj->lang->line('all_bet_code_small'); break;
				case "Fan1": $result = $obj->lang->line('all_bet_code_fan_one'); break;
				case "Fan2": $result = $obj->lang->line('all_bet_code_fan_two'); break;
				case "Fan3": $result = $obj->lang->line('all_bet_code_fan_three'); break;
				case "Fan4": $result = $obj->lang->line('all_bet_code_fan_four'); break;
				default: $result = "-"; break;
			}
		}
	}else if($game_real_code == 108){
		switch($bet_code)
		{
			case "Odd": $result = $obj->lang->line('all_bet_code_odd'); break;
			case "Even": $result = $obj->lang->line('all_bet_code_even'); break;
			case "Big": $result = $obj->lang->line('all_bet_code_big'); break;
			case "Small": $result = $obj->lang->line('all_bet_code_small'); break;
			case "R4": $result = $obj->lang->line('all_bet_code_four_red'); break;
			case "W4": $result = $obj->lang->line('all_bet_code_four_white'); break;
			case "R3W1": $result = $obj->lang->line('all_bet_code_three_red_one_white'); break;
			case "W3R1": $result = $obj->lang->line('all_bet_code_three_white_one_red'); break;
			default: $result = "-"; break;
		}
	}else if($game_real_code == 110){
		if(strpos($bet_code, 'Sum') !== false){
			//number
			$number = str_replace("Sum","",$bet_code);
			$result = $obj->lang->line('all_bet_code_sum_number')." : ".$number;
		}else{
			switch($bet_code)
			{
				case "Odd": $result = $obj->lang->line('all_bet_code_odd'); break;
				case "Even": $result = $obj->lang->line('all_bet_code_even'); break;
				case "Big": $result = $obj->lang->line('all_bet_code_big'); break;
				case "Small": $result = $obj->lang->line('all_bet_code_small'); break;
				case "Triples1": $result = $obj->lang->line('all_bet_code_specific_triples_fish'); break;
				case "Triples2": $result = $obj->lang->line('all_bet_code_specific_triples_prawn'); break;
				case "Triples3": $result = $obj->lang->line('all_bet_code_specific_triples_calabash'); break;
				case "Triples4": $result = $obj->lang->line('all_bet_code_specific_triples_coin'); break;
				case "Triples5": $result = $obj->lang->line('all_bet_code_specific_triples_crab'); break;
				case "Triples6": $result = $obj->lang->line('all_bet_code_specific_triples_chicken'); break;
				case "Anytriples": $result = $obj->lang->line('all_bet_code_any_specific_triples'); break;
				case "Dice1": $result = $obj->lang->line('all_bet_code_one_of_a_kind_fish'); break;
				case "Dice2": $result = $obj->lang->line('all_bet_code_one_of_a_kind_prawn'); break;
				case "Dice3": $result = $obj->lang->line('all_bet_code_one_of_a_kind_calabash'); break;
				case "Dice4": $result = $obj->lang->line('all_bet_code_one_of_a_kind_coin'); break;
				case "Dice5": $result = $obj->lang->line('all_bet_code_one_of_a_kind_crab'); break;
				case "Dice6": $result = $obj->lang->line('all_bet_code_one_of_a_kind_chicken'); break;
				default: $result = "-"; break;
			}
		}
	}else{
		$result = "-";
	}
	
	return $result;
}

function wm_game_result_decision($game_type_code = NULL,$game_real_code = NULL, $game_result = NULL){
	$obj =& get_instance();
	$result = "";
	if($game_real_code == 101){
		$game_result_data = explode(' ', $game_result);
		if(sizeof($game_result_data)>0){
			foreach($game_result_data as $game_result_data_row){
				if(!empty($result)){
					$result .= "<br/>";
				}
				if(strpos($game_result_data_row, 'Banker:') !== false){
					$number_result = str_replace("Banker:","",$game_result_data_row);
					$result .= $obj->lang->line('all_bet_code_banker')." : ";
				}else if(strpos($game_result_data_row, 'Player:') !== false){
					$number_result = str_replace("Player:","",$game_result_data_row);
					$result .= $obj->lang->line('all_bet_code_player')." : ";
				}else{
					$number_result = "";
				}
				if(!empty($number_result)){
					$number_result_text = json_encode($number_result,true);
					$number_result_array = array_values(array_filter(explode('\u', str_replace('"','',$number_result_text))));
					if(sizeof($number_result_array)>0){
						foreach($number_result_array as $number_result_row){
							if(strpos($number_result_row, '2666') !== false){
								$suit = "spades";
								$rank = strtoupper(str_replace("2666","",$number_result_row));
							}else if(strpos($number_result_row, '2665') !== false){
								$suit = "hearts";
								$rank = strtoupper(str_replace("2665","",$number_result_row));
							}else if(strpos($number_result_row, '2663') !== false){
								$suit = "clubs";
								$rank = strtoupper(str_replace("2663","",$number_result_row));
							}else if(strpos($number_result_row, '2660') !== false){
								$suit = "diams";
								$rank = strtoupper(str_replace("2660","",$number_result_row));
							}else{
								$suit = "";
							}

							if(!empty($suit)){
								$result .= '<div class="playingCards fourColours inText" style="display:inline-block;">';
									$result .= '<div class="card rank-'.$rank.' '.$suit.'">';
										$result .= '<span class="rank">'.$rank.'</span>';
										$result .= '<span class="suit">&'.$suit.';</span>';
									$result .= '</div>';
								$result .= '</div>';
							}
						}
					}
				}
			}
		}
	}else if($game_real_code == 102){
		$game_result_data = explode(' ', $game_result);
		if(sizeof($game_result_data)>0){
			foreach($game_result_data as $game_result_data_row){
				if(!empty($result)){
					$result .= "<br/>";
				}
				if(strpos($game_result_data_row, 'Dragon:') !== false){
					$number_result = str_replace("Dragon:","",$game_result_data_row);
					$result .= $obj->lang->line('all_bet_code_dragon')." : ";
				}else if(strpos($game_result_data_row, 'Tiger:') !== false){
					$number_result = str_replace("Tiger:","",$game_result_data_row);
					$result .= $obj->lang->line('all_bet_code_tiger')." : ";
				}else{
					$number_result = "";
				}
				if(!empty($number_result)){
					$number_result_text = json_encode($number_result,true);
					$number_result_array = array_values(array_filter(explode('\u', str_replace('"','',$number_result_text))));
					if(sizeof($number_result_array)>0){
						foreach($number_result_array as $number_result_row){
							if(strpos($number_result_row, '2666') !== false){
								$suit = "spades";
								$rank = strtoupper(str_replace("2666","",$number_result_row));
							}else if(strpos($number_result_row, '2665') !== false){
								$suit = "hearts";
								$rank = strtoupper(str_replace("2665","",$number_result_row));
							}else if(strpos($number_result_row, '2663') !== false){
								$suit = "clubs";
								$rank = strtoupper(str_replace("2663","",$number_result_row));
							}else if(strpos($number_result_row, '2660') !== false){
								$suit = "diams";
								$rank = strtoupper(str_replace("2660","",$number_result_row));
							}else{
								$suit = "";
							}

							if(!empty($suit)){
								$result .= '<div class="playingCards fourColours inText" style="display:inline-block;">';
									$result .= '<div class="card rank-'.$rank.' '.$suit.'">';
										$result .= '<span class="rank">'.$rank.'</span>';
										$result .= '<span class="suit">&'.$suit.';</span>';
									$result .= '</div>';
								$result .= '</div>';
							}
						}
					}
				}
			}
		}
	}else if($game_real_code == 103){
		$result = $game_result;
	}else if($game_real_code == 104){
		$game_result_data = explode(',', $game_result);
		if(sizeof($game_result_data)>0){
			foreach($game_result_data as $game_result_data_row){
				$result .= '<span class="dice dice-'.$game_result_data_row.'" title="'.$obj->lang->line('all_bet_code_dice').' : '.$game_result_data_row.'"></span>';
			}
		}
	}else if($game_real_code == 105){
		$game_result_data = explode(' ', $game_result);
		if(sizeof($game_result_data)>0){
			foreach($game_result_data as $game_result_data_row){
				if(!empty($result)){
					$result .= "<br/>";
				}
				if(strpos($game_result_data_row, 'Banker:') !== false){
					$number_result = str_replace("Banker:","",$game_result_data_row);
					$result .= $obj->lang->line('all_bet_code_banker')." : ";
				}else if(strpos($game_result_data_row, 'Player1:') !== false){
					$number_result = str_replace("Player1:","",$game_result_data_row);
					$result .= $obj->lang->line('all_bet_code_player_one')." : ";
				}else if(strpos($game_result_data_row, 'Player2:') !== false){
					$number_result = str_replace("Player2:","",$game_result_data_row);
					$result .= $obj->lang->line('all_bet_code_player_two')." : ";
				}else if(strpos($game_result_data_row, 'Player3:') !== false){
					$number_result = str_replace("Player3:","",$game_result_data_row);
					$result .= $obj->lang->line('all_bet_code_player_three')." : ";
				}else{
					$number_result = "";
				}
				if(!empty($number_result)){
					$number_result_text = json_encode($number_result,true);
					$number_result_array = array_values(array_filter(explode('\u', str_replace('"','',str_replace(',','',$number_result_text)))));
					if(sizeof($number_result_array)>0){
						foreach($number_result_array as $number_result_row){
							if(strpos($number_result_row, '2666') !== false){
								$suit = "spades";
								$rank = strtoupper(str_replace("2666","",$number_result_row));
							}else if(strpos($number_result_row, '2665') !== false){
								$suit = "hearts";
								$rank = strtoupper(str_replace("2665","",$number_result_row));
							}else if(strpos($number_result_row, '2663') !== false){
								$suit = "clubs";
								$rank = strtoupper(str_replace("2663","",$number_result_row));
							}else if(strpos($number_result_row, '2660') !== false){
								$suit = "diams";
								$rank = strtoupper(str_replace("2660","",$number_result_row));
							}else{
								$suit = "";
							}

							if(!empty($suit)){
								$result .= '<div class="playingCards fourColours inText" style="display:inline-block;">';
									$result .= '<div class="card rank-'.$rank.' '.$suit.'">';
										$result .= '<span class="rank">'.$rank.'</span>';
										$result .= '<span class="suit">&'.$suit.';</span>';
									$result .= '</div>';
								$result .= '</div>';
							}
						}
					}
				}
			}
		}
	}else if($game_real_code == 106){
		$game_result_data = explode(' ', $game_result);
		if(sizeof($game_result_data)>0){
			foreach($game_result_data as $game_result_data_row){
				if(!empty($result)){
					$result .= "<br/>";
				}
				if(strpos($game_result_data_row, 'Banker:') !== false){
					$number_result = str_replace("Banker:","",$game_result_data_row);
					$result .= $obj->lang->line('all_bet_code_banker')." : ";
				}else if(strpos($game_result_data_row, 'Player1:') !== false){
					$number_result = str_replace("Player1:","",$game_result_data_row);
					$result .= $obj->lang->line('all_bet_code_player_one')." : ";
				}else if(strpos($game_result_data_row, 'Player2:') !== false){
					$number_result = str_replace("Player2:","",$game_result_data_row);
					$result .= $obj->lang->line('all_bet_code_player_two')." : ";
				}else if(strpos($game_result_data_row, 'Player3:') !== false){
					$number_result = str_replace("Player3:","",$game_result_data_row);
					$result .= $obj->lang->line('all_bet_code_player_three')." : ";
				}else{
					$number_result = "";
				}
				if(!empty($number_result)){
					$number_result_text = json_encode($number_result,true);
					$number_result_array = array_values(array_filter(explode('\u', str_replace('"','',$number_result_text))));
					if(sizeof($number_result_array)>0){
						foreach($number_result_array as $number_result_row){
							if(strpos($number_result_row, '2666') !== false){
								$suit = "spades";
								$rank = strtoupper(str_replace("2666","",$number_result_row));
							}else if(strpos($number_result_row, '2665') !== false){
								$suit = "hearts";
								$rank = strtoupper(str_replace("2665","",$number_result_row));
							}else if(strpos($number_result_row, '2663') !== false){
								$suit = "clubs";
								$rank = strtoupper(str_replace("2663","",$number_result_row));
							}else if(strpos($number_result_row, '2660') !== false){
								$suit = "diams";
								$rank = strtoupper(str_replace("2660","",$number_result_row));
							}else{
								$suit = "";
							}

							if(!empty($suit)){
								$result .= '<div class="playingCards fourColours inText" style="display:inline-block;">';
									$result .= '<div class="card rank-'.$rank.' '.$suit.'">';
										$result .= '<span class="rank">'.$rank.'</span>';
										$result .= '<span class="suit">&'.$suit.';</span>';
									$result .= '</div>';
								$result .= '</div>';
							}
						}
					}
				}
			}
		}
	}else if($game_real_code == 107){
		$result = $game_result;
	}else if($game_real_code == 108){
		switch($game_result)
		{
			case "4Red": $result = $obj->lang->line('all_bet_code_four_red'); break;
			case "4White": $result = $obj->lang->line('all_bet_code_four_white'); break;
			case "3White1Red": $result = $obj->lang->line('all_bet_code_three_red_one_white'); break;
			case "3Red1White": $result = $obj->lang->line('all_bet_code_three_white_one_red'); break;
			case "2White2Red": $result = $obj->lang->line('all_bet_code_two_white_two_red'); break;
			case "2Red2White": $result = $obj->lang->line('all_bet_code_two_red_two_white'); break;
			default: $result = "-"; break;
		}
	}else if($game_real_code == 110){
		$game_result_data = explode(',', $game_result);
		if(sizeof($game_result_data)>0){
			foreach($game_result_data as $game_result_data_row){
				switch($game_result_data_row)
				{
					case 1: $dice_type = "fish"; $dice_name = $obj->lang->line('all_bet_code_fish'); break;
					case 2: $dice_type = "prawn"; $dice_name = $obj->lang->line('all_bet_code_prawn'); break;
					case 3: $dice_type = "calabash"; $dice_name = $obj->lang->line('all_bet_code_calabash'); break;
					case 4: $dice_type = "money"; $dice_name = $obj->lang->line('all_bet_code_coin'); break;
					case 5: $dice_type = "crab"; $dice_name = $obj->lang->line('all_bet_code_crab'); break;
					case 6: $dice_type = "chicken"; $dice_name = $obj->lang->line('all_bet_code_chicken'); break;
					default: $dice_type = ""; $dice_name = ""; break;
				}
				if(!empty($dice_type)){
					$result .= '<span class="dice dice-'.$dice_type.'" title="'.$obj->lang->line('all_bet_code_dice').' : '.$dice_name.'"></span>';
				}
			}
		}
	}else{
		$result = "-";
	}

	return $result;
}

/*SA*/
function sa_game_code_decision($game_type_code = NULL,$game_real_code = NULL){
	$obj =& get_instance();
	switch($game_real_code)
	{
		case "bac": $result = $obj->lang->line('all_game_code_baccarat'); break;
		case "dtx": $result = $obj->lang->line('all_game_code_dragon_tiger'); break;
		case "sicbo": $result = $obj->lang->line('all_game_code_sicbo'); break;
		case "ftan": $result = $obj->lang->line('all_game_code_fan_tan'); break;
		case "rot": $result = $obj->lang->line('all_game_code_roulette'); break;
		case "moneywheel": $result = $obj->lang->line('all_game_code_moneywheel'); break;
		case "tip": $result = $obj->lang->line('all_game_code_tip'); break;
		default: $result = "-"; break;
	}
	return $result;
}

function sa_bet_code_decision($game_type_code = NULL,$game_real_code = NULL, $bet_code = NULL){
	$obj =& get_instance();
	if($game_real_code == "bac"){
		switch($bet_code)
		{
			case 0: $result = $obj->lang->line('all_bet_code_tie'); break;
			case 1: $result = $obj->lang->line('all_bet_code_player'); break;
			case 2: $result = $obj->lang->line('all_bet_code_banker'); break;
			case 3: $result = $obj->lang->line('all_bet_code_player_pair'); break;
			case 4: $result = $obj->lang->line('all_bet_code_banker_pair'); break;
			case 54: $result = $obj->lang->line('all_bet_code_lucky_six'); break;
			case 25: $result = $obj->lang->line('all_bet_code_no_commission_tie'); break;
			case 26: $result = $obj->lang->line('all_bet_code_no_commission_player'); break;
			case 27: $result = $obj->lang->line('all_bet_code_no_commission_banker'); break;
			case 28: $result = $obj->lang->line('all_bet_code_no_commission_player_pair'); break;
			case 29: $result = $obj->lang->line('all_bet_code_no_commission_banker_pair'); break;
			case 53: $result = $obj->lang->line('all_bet_code_no_commission_lucky_six'); break;
			case 30: $result = $obj->lang->line('all_bet_code_super_six'); break;
			case 36: $result = $obj->lang->line('all_bet_code_player_natural'); break;
			case 37: $result = $obj->lang->line('all_bet_code_banker_natural'); break;
			case 40: $result = $obj->lang->line('all_bet_code_no_commission_player_natural'); break;
			case 41: $result = $obj->lang->line('all_bet_code_no_commission_banker_natural'); break;
			case 42: $result = $obj->lang->line('all_bet_code_bull_bull_player'); break;
			case 43: $result = $obj->lang->line('all_bet_code_bull_bull_banker'); break;
			case 44: $result = $obj->lang->line('all_bet_code_bull_bull_tie'); break;
			default: $result = "-"; break;
		}
	}else if($game_real_code == "dtx"){
		switch($bet_code)
		{
			case 0: $result = $obj->lang->line('all_bet_code_tie'); break;
			case 1: $result = $obj->lang->line('all_bet_code_dragon'); break;
			case 2: $result = $obj->lang->line('all_bet_code_tiger'); break;
			default: $result = "-"; break;
		}
	}else if($game_real_code == "sicbo"){
		switch($bet_code)
		{
			case 0: $result = $obj->lang->line('all_bet_code_small'); break;
			case 1: $result = $obj->lang->line('all_bet_code_big'); break;
			case 2: $result = $obj->lang->line('all_bet_code_odd'); break;
			case 3: $result = $obj->lang->line('all_bet_code_even'); break;
			case 4: $result = $obj->lang->line('all_bet_code_one_of_a_kind')." : 1"; break;
			case 5: $result = $obj->lang->line('all_bet_code_one_of_a_kind')." : 2"; break;
			case 6: $result = $obj->lang->line('all_bet_code_one_of_a_kind')." : 3"; break;
			case 7: $result = $obj->lang->line('all_bet_code_one_of_a_kind')." : 4"; break;
			case 8: $result = $obj->lang->line('all_bet_code_one_of_a_kind')." : 5"; break;
			case 9: $result = $obj->lang->line('all_bet_code_one_of_a_kind')." : 6"; break;
			case 10: $result = $obj->lang->line('all_bet_code_specific_triples')." : 1"; break;
			case 11: $result = $obj->lang->line('all_bet_code_specific_triples')." : 2"; break;
			case 12: $result = $obj->lang->line('all_bet_code_specific_triples')." : 3"; break;
			case 13: $result = $obj->lang->line('all_bet_code_specific_triples')." : 4"; break;
			case 14: $result = $obj->lang->line('all_bet_code_specific_triples')." : 5"; break;
			case 15: $result = $obj->lang->line('all_bet_code_specific_triples')." : 6"; break;
			case 16: $result = $obj->lang->line('all_bet_code_any_specific_triples'); break;
			case 17: $result = $obj->lang->line('all_bet_code_sum_number')." : 4"; break;
			case 18: $result = $obj->lang->line('all_bet_code_sum_number')." : 5"; break;
			case 19: $result = $obj->lang->line('all_bet_code_sum_number')." : 6"; break;
			case 20: $result = $obj->lang->line('all_bet_code_sum_number')." : 7"; break;
			case 21: $result = $obj->lang->line('all_bet_code_sum_number')." : 8"; break;
			case 22: $result = $obj->lang->line('all_bet_code_sum_number')." : 9"; break;
			case 23: $result = $obj->lang->line('all_bet_code_sum_number')." : 10"; break;
			case 24: $result = $obj->lang->line('all_bet_code_sum_number')." : 11"; break;
			case 25: $result = $obj->lang->line('all_bet_code_sum_number')." : 12"; break;
			case 26: $result = $obj->lang->line('all_bet_code_sum_number')." : 13"; break;
			case 27: $result = $obj->lang->line('all_bet_code_sum_number')." : 14"; break;
			case 28: $result = $obj->lang->line('all_bet_code_sum_number')." : 15"; break;
			case 29: $result = $obj->lang->line('all_bet_code_sum_number')." : 16"; break;
			case 30: $result = $obj->lang->line('all_bet_code_sum_number')." : 17"; break;
			case 31: $result = $obj->lang->line('all_bet_code_specific_double')." : 1, 2"; break;
			case 32: $result = $obj->lang->line('all_bet_code_specific_double')." : 1, 3"; break;
			case 33: $result = $obj->lang->line('all_bet_code_specific_double')." : 1, 4"; break;
			case 34: $result = $obj->lang->line('all_bet_code_specific_double')." : 1, 5"; break;
			case 35: $result = $obj->lang->line('all_bet_code_specific_double')." : 1, 6"; break;
			case 36: $result = $obj->lang->line('all_bet_code_specific_double')." : 2, 3"; break;
			case 37: $result = $obj->lang->line('all_bet_code_specific_double')." : 2, 4"; break;
			case 38: $result = $obj->lang->line('all_bet_code_specific_double')." : 2, 5"; break;
			case 39: $result = $obj->lang->line('all_bet_code_specific_double')." : 2, 6"; break;
			case 40: $result = $obj->lang->line('all_bet_code_specific_double')." : 3, 4"; break;
			case 41: $result = $obj->lang->line('all_bet_code_specific_double')." : 3, 5"; break;
			case 42: $result = $obj->lang->line('all_bet_code_specific_double')." : 3, 6"; break;
			case 43: $result = $obj->lang->line('all_bet_code_specific_double')." : 4, 5"; break;
			case 44: $result = $obj->lang->line('all_bet_code_specific_double')." : 4, 6"; break;
			case 45: $result = $obj->lang->line('all_bet_code_specific_double')." : 5, 6"; break;
			case 46: $result = $obj->lang->line('all_bet_code_pair')." : 1"; break;
			case 47: $result = $obj->lang->line('all_bet_code_pair')." : 2"; break;
			case 48: $result = $obj->lang->line('all_bet_code_pair')." : 3"; break;
			case 49: $result = $obj->lang->line('all_bet_code_pair')." : 4"; break;
			case 50: $result = $obj->lang->line('all_bet_code_pair')." : 5"; break;
			case 51: $result = $obj->lang->line('all_bet_code_pair')." : 6"; break;
			case 52: $result = $obj->lang->line('all_bet_code_three_odd'); break;
			case 53: $result = $obj->lang->line('all_bet_code_two_odd_one_even'); break;
			case 54: $result = $obj->lang->line('all_bet_code_two_even_one_odd'); break;
			case 55: $result = $obj->lang->line('all_bet_code_three_even'); break;
			case 56: $result = $obj->lang->line('all_bet_code_dice') . " : 1, 2, 3, 4"; break;
			case 57: $result = $obj->lang->line('all_bet_code_dice') . " : 2, 3, 4, 5"; break;
			case 58: $result = $obj->lang->line('all_bet_code_dice') . " : 2, 3, 5 ,6"; break;
			case 59: $result = $obj->lang->line('all_bet_code_dice') . " : 3, 4, 5 ,6"; break;
			case 60: $result = $obj->lang->line('all_bet_code_dice') . " : 1, 1, 2"; break;
			case 61: $result = $obj->lang->line('all_bet_code_dice') . " : 1, 1, 3"; break;
			case 62: $result = $obj->lang->line('all_bet_code_dice') . " : 1, 1, 4"; break;
			case 63: $result = $obj->lang->line('all_bet_code_dice') . " : 1, 1, 5"; break;
			case 64: $result = $obj->lang->line('all_bet_code_dice') . " : 1, 1, 6"; break;
			case 65: $result = $obj->lang->line('all_bet_code_dice') . " : 2, 2, 1"; break;
			case 66: $result = $obj->lang->line('all_bet_code_dice') . " : 2, 2, 3"; break;
			case 67: $result = $obj->lang->line('all_bet_code_dice') . " : 2, 2, 4"; break;
			case 68: $result = $obj->lang->line('all_bet_code_dice') . " : 2, 2, 5"; break;
			case 69: $result = $obj->lang->line('all_bet_code_dice') . " : 2, 2, 6"; break;
			case 70: $result = $obj->lang->line('all_bet_code_dice') . " : 3, 3, 1"; break;
			case 71: $result = $obj->lang->line('all_bet_code_dice') . " : 3, 3, 2"; break;
			case 72: $result = $obj->lang->line('all_bet_code_dice') . " : 3, 3, 4"; break;
			case 73: $result = $obj->lang->line('all_bet_code_dice') . " : 3, 3, 5"; break;
			case 74: $result = $obj->lang->line('all_bet_code_dice') . " : 3, 3, 6"; break;
			case 75: $result = $obj->lang->line('all_bet_code_dice') . " : 4, 4, 1"; break;
			case 76: $result = $obj->lang->line('all_bet_code_dice') . " : 4, 4, 2"; break;
			case 77: $result = $obj->lang->line('all_bet_code_dice') . " : 4, 4, 3"; break;
			case 78: $result = $obj->lang->line('all_bet_code_dice') . " : 4, 4, 5"; break;
			case 79: $result = $obj->lang->line('all_bet_code_dice') . " : 4, 4, 6"; break;
			case 80: $result = $obj->lang->line('all_bet_code_dice') . " : 5, 5, 1"; break;
			case 81: $result = $obj->lang->line('all_bet_code_dice') . " : 5, 5, 2"; break;
			case 82: $result = $obj->lang->line('all_bet_code_dice') . " : 5, 5, 3"; break;
			case 83: $result = $obj->lang->line('all_bet_code_dice') . " : 5, 5, 4"; break;
			case 84: $result = $obj->lang->line('all_bet_code_dice') . " : 5, 5, 6"; break;
			case 85: $result = $obj->lang->line('all_bet_code_dice') . " : 6, 6, 1"; break;
			case 86: $result = $obj->lang->line('all_bet_code_dice') . " : 6, 6, 2"; break;
			case 87: $result = $obj->lang->line('all_bet_code_dice') . " : 6, 6, 3"; break;
			case 88: $result = $obj->lang->line('all_bet_code_dice') . " : 6, 6, 4"; break;
			case 89: $result = $obj->lang->line('all_bet_code_dice') . " : 6, 6, 5"; break;
			case 90: $result = $obj->lang->line('all_bet_code_dice') . " : 1, 2, 6"; break;
			case 91: $result = $obj->lang->line('all_bet_code_dice') . " : 1, 3, 5"; break;
			case 92: $result = $obj->lang->line('all_bet_code_dice') . " : 2, 3, 4"; break;
			case 93: $result = $obj->lang->line('all_bet_code_dice') . " : 2, 5, 6"; break;
			case 94: $result = $obj->lang->line('all_bet_code_dice') . " : 3, 4, 6"; break;
			case 95: $result = $obj->lang->line('all_bet_code_dice') . " : 1, 2, 3"; break;
			case 96: $result = $obj->lang->line('all_bet_code_dice') . " : 1, 3, 6"; break;
			case 97: $result = $obj->lang->line('all_bet_code_dice') . " : 1, 4, 5"; break;
			case 98: $result = $obj->lang->line('all_bet_code_dice') . " : 2, 3, 5"; break;
			case 99: $result = $obj->lang->line('all_bet_code_dice') . " : 3, 5, 6"; break;
			case 100: $result = $obj->lang->line('all_bet_code_dice') . " : 1, 2, 4"; break;
			default: $result = "-"; break;
		}
	}else if($game_real_code == "ftan"){
		switch($bet_code)
		{
			case 0: $result = $obj->lang->line('all_bet_code_odd'); break;
			case 1: $result = $obj->lang->line('all_bet_code_even'); break;
			case 2: $result = '1 '.$obj->lang->line('all_bet_code_zheng'); break;
			case 3: $result = '2 '.$obj->lang->line('all_bet_code_zheng'); break;
			case 4: $result = '3 '.$obj->lang->line('all_bet_code_zheng'); break;
			case 5: $result = '4 '.$obj->lang->line('all_bet_code_zheng'); break;
			case 6: $result = '1 '.$obj->lang->line('all_bet_code_fan'); break;
			case 7: $result = '2 '.$obj->lang->line('all_bet_code_fan'); break;
			case 8: $result = '3 '.$obj->lang->line('all_bet_code_fan'); break;
			case 9: $result = '4 '.$obj->lang->line('all_bet_code_fan'); break;
			case 10: $result = '1 '.$obj->lang->line('all_bet_code_nim_number')." 2"; break;
			case 11: $result = '1 '.$obj->lang->line('all_bet_code_nim_number')." 3"; break;
			case 12: $result = '1 '.$obj->lang->line('all_bet_code_nim_number')." 4"; break;
			case 13: $result = '2 '.$obj->lang->line('all_bet_code_nim_number')." 1"; break;
			case 14: $result = '2 '.$obj->lang->line('all_bet_code_nim_number')." 3"; break;
			case 15: $result = '2 '.$obj->lang->line('all_bet_code_nim_number')." 4"; break;
			case 16: $result = '3 '.$obj->lang->line('all_bet_code_nim_number')." 1"; break;
			case 17: $result = '3 '.$obj->lang->line('all_bet_code_nim_number')." 2"; break;
			case 18: $result = '3 '.$obj->lang->line('all_bet_code_nim_number')." 4"; break;
			case 19: $result = '4 '.$obj->lang->line('all_bet_code_nim_number')." 1"; break;
			case 20: $result = '4 '.$obj->lang->line('all_bet_code_nim_number')." 2"; break;
			case 21: $result = '4 '.$obj->lang->line('all_bet_code_nim_number')." 3"; break;
			case 22: $result = '12 '.$obj->lang->line('all_bet_code_kwok_number'); break;
			case 23: $result = '41 '.$obj->lang->line('all_bet_code_kwok_number'); break;
			case 24: $result = '23 '.$obj->lang->line('all_bet_code_kwok_number'); break;
			case 25: $result = '34 '.$obj->lang->line('all_bet_code_kwok_number'); break;
			case 26: $result = '23 '.$obj->lang->line('all_bet_code_one').$obj->lang->line('all_bet_code_nga_number'); break;
			case 27: $result = '24 '.$obj->lang->line('all_bet_code_one').$obj->lang->line('all_bet_code_nga_number'); break;
			case 28: $result = '34 '.$obj->lang->line('all_bet_code_one').$obj->lang->line('all_bet_code_nga_number'); break;
			case 29: $result = '13 '.$obj->lang->line('all_bet_code_two').$obj->lang->line('all_bet_code_nga_number'); break;
			case 30: $result = '14 '.$obj->lang->line('all_bet_code_two').$obj->lang->line('all_bet_code_nga_number'); break;
			case 31: $result = '34 '.$obj->lang->line('all_bet_code_two').$obj->lang->line('all_bet_code_nga_number'); break;
			case 32: $result = '12 '.$obj->lang->line('all_bet_code_three').$obj->lang->line('all_bet_code_nga_number'); break;
			case 33: $result = '14 '.$obj->lang->line('all_bet_code_three').$obj->lang->line('all_bet_code_nga_number'); break;
			case 34: $result = '24 '.$obj->lang->line('all_bet_code_three').$obj->lang->line('all_bet_code_nga_number'); break;
			case 35: $result = '12 '.$obj->lang->line('all_bet_code_four').$obj->lang->line('all_bet_code_nga_number'); break;
			case 36: $result = '13 '.$obj->lang->line('all_bet_code_four').$obj->lang->line('all_bet_code_nga_number'); break;
			case 37: $result = '23 '.$obj->lang->line('all_bet_code_four').$obj->lang->line('all_bet_code_nga_number'); break;
			case 38: $result = '123 '.$obj->lang->line('all_bet_code_chun'); break;
			case 39: $result = '124 '.$obj->lang->line('all_bet_code_chun'); break;
			case 40: $result = '134 '.$obj->lang->line('all_bet_code_chun'); break;
			case 41: $result = '234 '.$obj->lang->line('all_bet_code_chun'); break;
			default: $result = "-"; break;
		}
	}else if($game_real_code == "rot"){
		switch($bet_code)
		{
			case 0: $result = $obj->lang->line('all_bet_code_straight_number')." : 0"; break;
			case 1: $result = $obj->lang->line('all_bet_code_straight_number')." : 1"; break;
			case 2: $result = $obj->lang->line('all_bet_code_straight_number')." : 2"; break;
			case 3: $result = $obj->lang->line('all_bet_code_straight_number')." : 3"; break;
			case 4: $result = $obj->lang->line('all_bet_code_straight_number')." : 4"; break;
			case 5: $result = $obj->lang->line('all_bet_code_straight_number')." : 5"; break;
			case 6: $result = $obj->lang->line('all_bet_code_straight_number')." : 6"; break;
			case 7: $result = $obj->lang->line('all_bet_code_straight_number')." : 7"; break;
			case 8: $result = $obj->lang->line('all_bet_code_straight_number')." : 8"; break;
			case 9: $result = $obj->lang->line('all_bet_code_straight_number')." : 9"; break;
			case 10: $result = $obj->lang->line('all_bet_code_straight_number')." : 10"; break;
			case 11: $result = $obj->lang->line('all_bet_code_straight_number')." : 11"; break;
			case 12: $result = $obj->lang->line('all_bet_code_straight_number')." : 12"; break;
			case 13: $result = $obj->lang->line('all_bet_code_straight_number')." : 13"; break;
			case 14: $result = $obj->lang->line('all_bet_code_straight_number')." : 14"; break;
			case 15: $result = $obj->lang->line('all_bet_code_straight_number')." : 15"; break;
			case 16: $result = $obj->lang->line('all_bet_code_straight_number')." : 16"; break;
			case 17: $result = $obj->lang->line('all_bet_code_straight_number')." : 17"; break;
			case 18: $result = $obj->lang->line('all_bet_code_straight_number')." : 18"; break;
			case 19: $result = $obj->lang->line('all_bet_code_straight_number')." : 19"; break;
			case 20: $result = $obj->lang->line('all_bet_code_straight_number')." : 20"; break;
			case 21: $result = $obj->lang->line('all_bet_code_straight_number')." : 21"; break;
			case 22: $result = $obj->lang->line('all_bet_code_straight_number')." : 22"; break;
			case 23: $result = $obj->lang->line('all_bet_code_straight_number')." : 23"; break;
			case 24: $result = $obj->lang->line('all_bet_code_straight_number')." : 24"; break;
			case 25: $result = $obj->lang->line('all_bet_code_straight_number')." : 25"; break;
			case 26: $result = $obj->lang->line('all_bet_code_straight_number')." : 26"; break;
			case 27: $result = $obj->lang->line('all_bet_code_straight_number')." : 27"; break;
			case 28: $result = $obj->lang->line('all_bet_code_straight_number')." : 28"; break;
			case 29: $result = $obj->lang->line('all_bet_code_straight_number')." : 29"; break;
			case 30: $result = $obj->lang->line('all_bet_code_straight_number')." : 30"; break;
			case 31: $result = $obj->lang->line('all_bet_code_straight_number')." : 31"; break;
			case 32: $result = $obj->lang->line('all_bet_code_straight_number')." : 32"; break;
			case 33: $result = $obj->lang->line('all_bet_code_straight_number')." : 33"; break;
			case 34: $result = $obj->lang->line('all_bet_code_straight_number')." : 34"; break;
			case 35: $result = $obj->lang->line('all_bet_code_straight_number')." : 35"; break;
			case 36: $result = $obj->lang->line('all_bet_code_straight_number')." : 36"; break;
			case 37: $result = $obj->lang->line('all_bet_code_multiple_number')." : 0, 1"; break;
			case 38: $result = $obj->lang->line('all_bet_code_multiple_number')." : 0, 2"; break;
			case 39: $result = $obj->lang->line('all_bet_code_multiple_number')." : 0, 3"; break;
			case 40: $result = $obj->lang->line('all_bet_code_multiple_number')." : 1, 2"; break;
			case 41: $result = $obj->lang->line('all_bet_code_multiple_number')." : 1, 4"; break;
			case 42: $result = $obj->lang->line('all_bet_code_multiple_number')." : 2, 3"; break;
			case 43: $result = $obj->lang->line('all_bet_code_multiple_number')." : 2, 5"; break;
			case 44: $result = $obj->lang->line('all_bet_code_multiple_number')." : 3, 6"; break;
			case 45: $result = $obj->lang->line('all_bet_code_multiple_number')." : 4, 5"; break;
			case 46: $result = $obj->lang->line('all_bet_code_multiple_number')." : 4, 7"; break;
			case 47: $result = $obj->lang->line('all_bet_code_multiple_number')." : 5, 6"; break;
			case 48: $result = $obj->lang->line('all_bet_code_multiple_number')." : 5, 8"; break;
			case 49: $result = $obj->lang->line('all_bet_code_multiple_number')." : 6, 9"; break;
			case 50: $result = $obj->lang->line('all_bet_code_multiple_number')." : 7, 8"; break;
			case 51: $result = $obj->lang->line('all_bet_code_multiple_number')." : 7, 10"; break;
			case 52: $result = $obj->lang->line('all_bet_code_multiple_number')." : 8, 9"; break;
			case 53: $result = $obj->lang->line('all_bet_code_multiple_number')." : 8, 11"; break;
			case 54: $result = $obj->lang->line('all_bet_code_multiple_number')." : 9, 12"; break;
			case 55: $result = $obj->lang->line('all_bet_code_multiple_number')." : 10, 11"; break;
			case 56: $result = $obj->lang->line('all_bet_code_multiple_number')." : 10, 13"; break;
			case 57: $result = $obj->lang->line('all_bet_code_multiple_number')." : 11, 12"; break;
			case 58: $result = $obj->lang->line('all_bet_code_multiple_number')." : 11, 14"; break;
			case 59: $result = $obj->lang->line('all_bet_code_multiple_number')." : 12, 15"; break;
			case 60: $result = $obj->lang->line('all_bet_code_multiple_number')." : 13, 14"; break;
			case 61: $result = $obj->lang->line('all_bet_code_multiple_number')." : 13, 16"; break;
			case 62: $result = $obj->lang->line('all_bet_code_multiple_number')." : 14, 15"; break;
			case 63: $result = $obj->lang->line('all_bet_code_multiple_number')." : 14, 17"; break;
			case 64: $result = $obj->lang->line('all_bet_code_multiple_number')." : 15, 18"; break;
			case 65: $result = $obj->lang->line('all_bet_code_multiple_number')." : 16, 17"; break;
			case 66: $result = $obj->lang->line('all_bet_code_multiple_number')." : 16, 19"; break;
			case 67: $result = $obj->lang->line('all_bet_code_multiple_number')." : 17, 18"; break;
			case 68: $result = $obj->lang->line('all_bet_code_multiple_number')." : 17, 20"; break;
			case 69: $result = $obj->lang->line('all_bet_code_multiple_number')." : 18, 21"; break;
			case 70: $result = $obj->lang->line('all_bet_code_multiple_number')." : 19, 20"; break;
			case 71: $result = $obj->lang->line('all_bet_code_multiple_number')." : 19, 22"; break;
			case 72: $result = $obj->lang->line('all_bet_code_multiple_number')." : 20, 21"; break;
			case 73: $result = $obj->lang->line('all_bet_code_multiple_number')." : 20, 23"; break;
			case 74: $result = $obj->lang->line('all_bet_code_multiple_number')." : 21, 24"; break;
			case 75: $result = $obj->lang->line('all_bet_code_multiple_number')." : 22, 23"; break;
			case 76: $result = $obj->lang->line('all_bet_code_multiple_number')." : 22, 25"; break;
			case 77: $result = $obj->lang->line('all_bet_code_multiple_number')." : 23, 24"; break;
			case 78: $result = $obj->lang->line('all_bet_code_multiple_number')." : 23, 26"; break;
			case 79: $result = $obj->lang->line('all_bet_code_multiple_number')." : 24, 27"; break;
			case 80: $result = $obj->lang->line('all_bet_code_multiple_number')." : 25, 26"; break;
			case 81: $result = $obj->lang->line('all_bet_code_multiple_number')." : 25, 28"; break;
			case 82: $result = $obj->lang->line('all_bet_code_multiple_number')." : 26, 27"; break;
			case 83: $result = $obj->lang->line('all_bet_code_multiple_number')." : 26, 29"; break;
			case 84: $result = $obj->lang->line('all_bet_code_multiple_number')." : 27, 30"; break;
			case 85: $result = $obj->lang->line('all_bet_code_multiple_number')." : 28, 29"; break;
			case 86: $result = $obj->lang->line('all_bet_code_multiple_number')." : 28, 31"; break;
			case 87: $result = $obj->lang->line('all_bet_code_multiple_number')." : 29, 30"; break;
			case 88: $result = $obj->lang->line('all_bet_code_multiple_number')." : 29, 32"; break;
			case 89: $result = $obj->lang->line('all_bet_code_multiple_number')." : 30, 33"; break;
			case 90: $result = $obj->lang->line('all_bet_code_multiple_number')." : 31, 32"; break;
			case 91: $result = $obj->lang->line('all_bet_code_multiple_number')." : 31, 34"; break;
			case 92: $result = $obj->lang->line('all_bet_code_multiple_number')." : 32, 33"; break;
			case 93: $result = $obj->lang->line('all_bet_code_multiple_number')." : 32, 35"; break;
			case 94: $result = $obj->lang->line('all_bet_code_multiple_number')." : 33, 36"; break;
			case 95: $result = $obj->lang->line('all_bet_code_multiple_number')." : 34, 35"; break;
			case 96: $result = $obj->lang->line('all_bet_code_multiple_number')." : 35, 36"; break;
			case 97: $result = $obj->lang->line('all_bet_code_multiple_number')." : 0, 1, 2"; break;
			case 98: $result = $obj->lang->line('all_bet_code_multiple_number')." : 0, 2, 3"; break;
			case 99: $result = $obj->lang->line('all_bet_code_multiple_number')." : 1, 2, 3"; break;
			case 100: $result = $obj->lang->line('all_bet_code_multiple_number')." : 4, 5, 6"; break;
			case 101: $result = $obj->lang->line('all_bet_code_multiple_number')." : 7, 8, 9"; break;
			case 102: $result = $obj->lang->line('all_bet_code_multiple_number')." : 10, 11, 121"; break;
			case 103: $result = $obj->lang->line('all_bet_code_multiple_number')." : 13, 14, 15"; break;
			case 104: $result = $obj->lang->line('all_bet_code_multiple_number')." : 16, 17, 18"; break;
			case 105: $result = $obj->lang->line('all_bet_code_multiple_number')." : 19, 20, 21"; break;
			case 106: $result = $obj->lang->line('all_bet_code_multiple_number')." : 22, 23, 24"; break;
			case 107: $result = $obj->lang->line('all_bet_code_multiple_number')." : 25, 26, 27"; break;
			case 108: $result = $obj->lang->line('all_bet_code_multiple_number')." : 28, 29, 30"; break;
			case 109: $result = $obj->lang->line('all_bet_code_multiple_number')." : 31, 32, 33"; break;
			case 110: $result = $obj->lang->line('all_bet_code_multiple_number')." : 34, 35, 36"; break;
			case 111: $result = $obj->lang->line('all_bet_code_multiple_number')." : 1, 2, 4, 5"; break;
			case 112: $result = $obj->lang->line('all_bet_code_multiple_number')." : 2, 3, 5, 6"; break;
			case 113: $result = $obj->lang->line('all_bet_code_multiple_number')." : 4, 5, 7, 8"; break;
			case 114: $result = $obj->lang->line('all_bet_code_multiple_number')." : 5, 6, 8, 9"; break;
			case 115: $result = $obj->lang->line('all_bet_code_multiple_number')." : 7, 8, 10, 11"; break;
			case 116: $result = $obj->lang->line('all_bet_code_multiple_number')." : 8, 9, 11, 12"; break;
			case 117: $result = $obj->lang->line('all_bet_code_multiple_number')." : 10, 11, 13, 14"; break;
			case 118: $result = $obj->lang->line('all_bet_code_multiple_number')." : 11, 12, 14, 15"; break;
			case 119: $result = $obj->lang->line('all_bet_code_multiple_number')." : 13, 14, 16, 17"; break;
			case 120: $result = $obj->lang->line('all_bet_code_multiple_number')." : 14, 15, 17, 18"; break;
			case 121: $result = $obj->lang->line('all_bet_code_multiple_number')." : 16, 17, 19, 20"; break;
			case 122: $result = $obj->lang->line('all_bet_code_multiple_number')." : 17, 18, 20, 21"; break;
			case 123: $result = $obj->lang->line('all_bet_code_multiple_number')." : 19, 20, 22, 23"; break;
			case 124: $result = $obj->lang->line('all_bet_code_multiple_number')." : 20, 21, 23, 24"; break;
			case 125: $result = $obj->lang->line('all_bet_code_multiple_number')." : 22, 23, 25, 26"; break;
			case 126: $result = $obj->lang->line('all_bet_code_multiple_number')." : 23, 24, 26, 27"; break;
			case 127: $result = $obj->lang->line('all_bet_code_multiple_number')." : 25, 26, 28, 29"; break;
			case 128: $result = $obj->lang->line('all_bet_code_multiple_number')." : 26, 27, 29, 30"; break;
			case 129: $result = $obj->lang->line('all_bet_code_multiple_number')." : 28, 29, 31, 32"; break;
			case 130: $result = $obj->lang->line('all_bet_code_multiple_number')." : 29, 30, 32, 33"; break;
			case 131: $result = $obj->lang->line('all_bet_code_multiple_number')." : 31, 32, 34, 35"; break;
			case 132: $result = $obj->lang->line('all_bet_code_multiple_number')." : 32, 33, 35, 36"; break;
			case 133: $result = $obj->lang->line('all_bet_code_multiple_number')." : 1, 2, 3, 4, 5, 6"; break;
			case 134: $result = $obj->lang->line('all_bet_code_multiple_number')." : 4, 5, 6, 7, 8, 9"; break;
			case 135: $result = $obj->lang->line('all_bet_code_multiple_number')." : 7, 8, 9, 10, 11, 12"; break;
			case 136: $result = $obj->lang->line('all_bet_code_multiple_number')." : 10, 11, 12, 13, 14, 15"; break;
			case 137: $result = $obj->lang->line('all_bet_code_multiple_number')." : 13, 14, 15, 16, 17, 18"; break;
			case 138: $result = $obj->lang->line('all_bet_code_multiple_number')." : 16, 17, 18, 19, 20, 21"; break;
			case 139: $result = $obj->lang->line('all_bet_code_multiple_number')." : 19, 20, 21, 22, 23, 24"; break;
			case 140: $result = $obj->lang->line('all_bet_code_multiple_number')." : 22, 23, 24, 25, 26, 27"; break;
			case 141: $result = $obj->lang->line('all_bet_code_multiple_number')." : 25, 26, 27, 28, 29, 30"; break;
			case 142: $result = $obj->lang->line('all_bet_code_multiple_number')." : 28, 29, 30, 31, 32, 33"; break;
			case 143: $result = $obj->lang->line('all_bet_code_multiple_number')." : 31, 32, 33, 34, 35, 36"; break;
			case 144: $result = $obj->lang->line('all_bet_code_first_twelve'); break;
			case 145: $result = $obj->lang->line('all_bet_code_second_twelve'); break;
			case 146: $result = $obj->lang->line('all_bet_code_third_twelve'); break;
			case 147: $result = $obj->lang->line('all_bet_code_first_row'); break;
			case 148: $result = $obj->lang->line('all_bet_code_second_row'); break;
			case 149: $result = $obj->lang->line('all_bet_code_third_row'); break;
			case 150: $result = $obj->lang->line('all_bet_code_small_eighteen'); break;
			case 151: $result = $obj->lang->line('all_bet_code_big_eighteen'); break;
			case 152: $result = $obj->lang->line('all_bet_code_odd'); break;
			case 153: $result = $obj->lang->line('all_bet_code_even'); break;
			case 154: $result = $obj->lang->line('all_bet_code_red'); break;
			case 155: $result = $obj->lang->line('all_bet_code_black'); break;
			case 156: $result = $obj->lang->line('all_bet_code_multiple_number')." : 0, 1, 2, 3"; break;
			default: $result = "-"; break;
		}
	}else if($game_real_code == "moneywheel"){
		switch($bet_code)
		{
			case 0: $result = "1"; break;
			case 1: $result = "2"; break;
			case 2: $result = "9"; break;
			case 3: $result = "16"; break;
			case 4: $result = "24"; break;
			case 5: $result = $obj->lang->line('all_bet_code_fifty_gold'); break;
			case 6: $result = $obj->lang->line('all_bet_code_fifty_black'); break;
			case 7: $result = $obj->lang->line('all_bet_code_fish'); break;
			case 8: $result = $obj->lang->line('all_bet_code_prawn'); break;
			case 9: $result = $obj->lang->line('all_bet_code_crab'); break;
			case 10: $result = $obj->lang->line('all_bet_code_coin'); break;
			case 11: $result = $obj->lang->line('all_bet_code_calabash'); break;
			case 12: $result = $obj->lang->line('all_bet_code_chicken'); break;
			default: $result = "-"; break;
		}
	}else if($game_real_code == "tip"){
		switch($bet_code)
		{
			case 830: $result = $obj->lang->line('all_bet_code_e_roulette'); break;
			case 831: $result = $obj->lang->line('all_bet_code_baccarat_e01'); break;
			case 832: $result = $obj->lang->line('all_bet_code_baccarat_e02'); break;
			case 833: $result = $obj->lang->line('all_bet_code_baccarat_e03'); break;
			case 834: $result = $obj->lang->line('all_bet_code_baccarat_e04'); break;
			case 835: $result = $obj->lang->line('all_bet_code_baccarat_e05'); break;
			case 836: $result = $obj->lang->line('all_bet_code_baccarat_e06'); break;
			case 837: $result = $obj->lang->line('all_bet_code_baccarat_e07'); break;
			case 838: $result = $obj->lang->line('all_bet_code_baccarat_e08'); break;
			case 839: $result = $obj->lang->line('all_bet_code_baccarat_e09'); break;
			case 841: $result = $obj->lang->line('all_bet_code_baccarat_e10'); break;
			case 842: $result = $obj->lang->line('all_bet_code_e_sicbo'); break;
			case 843: $result = $obj->lang->line('all_bet_code_e_dragon_tiger'); break;
			case 850: $result = $obj->lang->line('all_bet_code_p_dragon_tiger'); break;
			case 851: $result = $obj->lang->line('all_bet_code_baccarat_p01'); break;
			case 852: $result = $obj->lang->line('all_bet_code_baccarat_p02'); break;
			case 853: $result = $obj->lang->line('all_bet_code_baccarat_p03'); break;
			case 854: $result = $obj->lang->line('all_bet_code_baccarat_p04'); break;
			case 855: $result = $obj->lang->line('all_bet_code_baccarat_p05'); break;
			case 856: $result = $obj->lang->line('all_bet_code_baccarat_p06'); break;
			case 857: $result = $obj->lang->line('all_bet_code_baccarat_p07'); break;
			case 858: $result = $obj->lang->line('all_bet_code_baccarat_p08'); break;
			default: $result = "-"; break;
		}
	}else{
		$result = "-";
	}
	return $result;
}

function sa_game_result_decision($game_type_code = NULL,$game_real_code = NULL, $game_result = NULL){
	$obj =& get_instance();
	$result = "-";
	if($game_real_code == "bac"){
		$game_result_array = json_decode($game_result,true);
		if(!empty($game_result_array)){
			if(isset($game_result_array['BaccaratResult']) && !empty($game_result_array['BaccaratResult'])){
				$result = "";
				$player_result = "";
				$banker_result = "";
				foreach($game_result_array['BaccaratResult'] as $key => $value) {
					$suit = "";
					$rank = "";
					if(strpos($key, 'PlayerCard') !== false){
						if(isset($value['Suit']) && isset($value['Rank'])){
							switch($value['Suit'])
							{
								case "1": $suit = "spades"; break;
								case "2": $suit = "hearts"; break;
								case "3": $suit = "clubs"; break;
								case "4": $suit = "diams"; break;
								default: $suit = ""; break;
							}
							switch($value['Rank'])
							{
								case "1": $rank = "A"; break;
								case "2": $rank = "2"; break;
								case "3": $rank = "3"; break;
								case "4": $rank = "4"; break;
								case "5": $rank = "5"; break;
								case "6": $rank = "6"; break;
								case "7": $rank = "7"; break;
								case "8": $rank = "8"; break;
								case "9": $rank = "9"; break;
								case "10": $rank = "10"; break;
								case "11": $rank = "J"; break;
								case "12": $rank = "Q"; break;
								case "13": $rank = "K"; break;
								default: $rank = ""; break;
							}
							if(!empty($suit) && !empty($rank)){
								if(empty($player_result)){
									$player_result .= $obj->lang->line('all_bet_code_player')." : ";
								}
								$player_result .= '<div class="playingCards fourColours inText" style="display:inline-block;">';
									$player_result .= '<div class="card rank-'.$rank.' '.$suit.'">';
										$player_result .= '<span class="rank">'.$rank.'</span>';
										$player_result .= '<span class="suit">&'.$suit.';</span>';
									$player_result .= '</div>';
								$player_result .= '</div>';
							}
						}
					}else if(strpos($key, 'BankerCard') !== false){
						if(isset($value['Suit']) && isset($value['Rank'])){
							switch($value['Suit'])
							{
								case "1": $suit = "spades"; break;
								case "2": $suit = "hearts"; break;
								case "3": $suit = "clubs"; break;
								case "4": $suit = "diams"; break;
								default: $suit = ""; break;
							}
							switch($value['Rank'])
							{
								case "1": $rank = "A"; break;
								case "2": $rank = "2"; break;
								case "3": $rank = "3"; break;
								case "4": $rank = "4"; break;
								case "5": $rank = "5"; break;
								case "6": $rank = "6"; break;
								case "7": $rank = "7"; break;
								case "8": $rank = "8"; break;
								case "9": $rank = "9"; break;
								case "10": $rank = "10"; break;
								case "11": $rank = "J"; break;
								case "12": $rank = "Q"; break;
								case "13": $rank = "K"; break;
								default: $rank = ""; break;
							}
							if(!empty($suit) && !empty($rank)){
								if(empty($banker_result)){
									$banker_result .= $obj->lang->line('all_bet_code_banker')." : ";
								}
								$banker_result .= '<div class="playingCards fourColours inText" style="display:inline-block;">';
									$banker_result .= '<div class="card rank-'.$rank.' '.$suit.'">';
										$banker_result .= '<span class="rank">'.$rank.'</span>';
										$banker_result .= '<span class="suit">&'.$suit.';</span>';
									$banker_result .= '</div>';
								$banker_result .= '</div>';
							}
						}
					}else{

					}
				}
				$result .= $banker_result;
				if(!empty($player_result)){
					if(!empty($result)){
						$result .= "<br/>";
					}
					$result .= $player_result;
				}
			}
		} 
	}else if($game_real_code == "dtx"){
		$game_result_array = json_decode($game_result,true);
		if(!empty($game_result_array)){
			if(isset($game_result_array['DragonTigerResult']) && !empty($game_result_array['DragonTigerResult'])){
				$result = "";
				$dragon_result = "";
				$tiger_result = "";
				foreach($game_result_array['DragonTigerResult'] as $key => $value) {
					$suit = "";
					$rank = "";
					if(strpos($key, 'DragonCard') !== false){
						if(isset($value['Suit']) && isset($value['Rank'])){
							switch($value['Suit'])
							{
								case "1": $suit = "spades"; break;
								case "2": $suit = "hearts"; break;
								case "3": $suit = "clubs"; break;
								case "4": $suit = "diams"; break;
								default: $suit = ""; break;
							}
							switch($value['Rank'])
							{
								case "1": $rank = "A"; break;
								case "2": $rank = "2"; break;
								case "3": $rank = "3"; break;
								case "4": $rank = "4"; break;
								case "5": $rank = "5"; break;
								case "6": $rank = "6"; break;
								case "7": $rank = "7"; break;
								case "8": $rank = "8"; break;
								case "9": $rank = "9"; break;
								case "10": $rank = "10"; break;
								case "11": $rank = "J"; break;
								case "12": $rank = "Q"; break;
								case "13": $rank = "K"; break;
								default: $rank = ""; break;
							}
							if(!empty($suit) && !empty($rank)){
								if(empty($dragon_result)){
									$dragon_result .= $obj->lang->line('all_bet_code_dragon')." : ";
								}
								$dragon_result .= '<div class="playingCards fourColours inText" style="display:inline-block;">';
									$dragon_result .= '<div class="card rank-'.$rank.' '.$suit.'">';
										$dragon_result .= '<span class="rank">'.$rank.'</span>';
										$dragon_result .= '<span class="suit">&'.$suit.';</span>';
									$dragon_result .= '</div>';
								$dragon_result .= '</div>';
							}
						}
					}else if(strpos($key, 'TigerCard') !== false){
						if(isset($value['Suit']) && isset($value['Rank'])){
							switch($value['Suit'])
							{
								case "1": $suit = "spades"; break;
								case "2": $suit = "hearts"; break;
								case "3": $suit = "clubs"; break;
								case "4": $suit = "diams"; break;
								default: $suit = ""; break;
							}
							switch($value['Rank'])
							{
								case "1": $rank = "A"; break;
								case "2": $rank = "2"; break;
								case "3": $rank = "3"; break;
								case "4": $rank = "4"; break;
								case "5": $rank = "5"; break;
								case "6": $rank = "6"; break;
								case "7": $rank = "7"; break;
								case "8": $rank = "8"; break;
								case "9": $rank = "9"; break;
								case "10": $rank = "10"; break;
								case "11": $rank = "J"; break;
								case "12": $rank = "Q"; break;
								case "13": $rank = "K"; break;
								default: $rank = ""; break;
							}
							if(!empty($suit) && !empty($rank)){
								if(empty($tiger_result)){
									$tiger_result .= $obj->lang->line('all_bet_code_tiger')." : ";
								}
								$tiger_result .= '<div class="playingCards fourColours inText" style="display:inline-block;">';
									$tiger_result .= '<div class="card rank-'.$rank.' '.$suit.'">';
										$tiger_result .= '<span class="rank">'.$rank.'</span>';
										$tiger_result .= '<span class="suit">&'.$suit.';</span>';
									$tiger_result .= '</div>';
								$tiger_result .= '</div>';
							}
						}
					}else{

					}
				}
				$result .= $dragon_result;
				if(!empty($tiger_result)){
					if(!empty($result)){
						$result .= "<br/>";
					}
					$result .= $tiger_result;
				}
			}
		}
	}else if($game_real_code == "sicbo"){
		$game_result_array = json_decode($game_result,true);
		if(!empty($game_result_array)){
			if(isset($game_result_array['SicboResult']) && !empty($game_result_array['SicboResult'])){
				$result = "";
				foreach($game_result_array['SicboResult'] as $key => $value) {
					if(strpos($key, 'Dice') !== false){
						$result .= '<span class="dice dice-'.$value.'" title="'.$obj->lang->line('all_bet_code_dice').' : '.$value.'"></span>';
					}
				}
			}
		}
	}else if($game_real_code == "ftan"){
		$game_result_array = json_decode($game_result,true);
		if(!empty($game_result_array)){
			if(isset($game_result_array['FantanResult']) && !empty($game_result_array['FantanResult'])){
				if(isset($game_result_array['FantanResult']['Point'])){
					$result = $game_result_array['FantanResult']['Point'];
				}
			}
		}
	}else if($game_real_code == "rot"){
		$game_result_array = json_decode($game_result,true);
		if(!empty($game_result_array)){
			if(isset($game_result_array['RouletteResult']) && !empty($game_result_array['RouletteResult'])){
				if(isset($game_result_array['RouletteResult']['Point'])){
					$result = $game_result_array['RouletteResult']['Point'];
				}
			}
		}
	}else if($game_real_code == "moneywheel"){
		$game_result_array = json_decode($game_result,true);
		if(!empty($game_result_array)){
			if(isset($game_result_array['MoneyWheelResult']) && !empty($game_result_array['MoneyWheelResult'])){
				$result = "";
				$main_result = "";
				$side_result = "";
				$dice_type = "";
				$dice_name = "";
				if(isset($game_result_array['MoneyWheelResult']['Main'])){
					switch($game_result_array['MoneyWheelResult']['Main'])
					{
						case 0: $main_result = "1"; break;
						case 1: $main_result = "2"; break;
						case 2: $main_result = "9"; break;
						case 3: $main_result = "16"; break;
						case 4: $main_result = "24"; break;
						case 5: $main_result = $obj->lang->line('all_bet_code_fifty_gold'); break;
						case 6: $main_result = $obj->lang->line('all_bet_code_fifty_black'); break;
						default: $main_result = ""; break;
					}
				}
				if(!empty($main_result)){
					$result .= $obj->lang->line('all_bet_code_multiplier').' : '.$main_result;
				}
				if(isset($game_result_array['MoneyWheelResult']['Side'])){
					switch($game_result_array['MoneyWheelResult']['Side'])
					{
						case 7: $dice_type = "fish"; $dice_name = $obj->lang->line('all_bet_code_fish'); break;
						case 8: $dice_type = "prawn"; $dice_name = $obj->lang->line('all_bet_code_prawn'); break;
						case 9: $dice_type = "crab"; $dice_name = $obj->lang->line('all_bet_code_crab'); break;
						case 10: $dice_type = "money"; $dice_name = $obj->lang->line('all_bet_code_coin'); break;
						case 11: $dice_type = "calabash"; $dice_name = $obj->lang->line('all_bet_code_calabash'); break;
						case 12: $dice_type = "chicken"; $dice_name = $obj->lang->line('all_bet_code_chicken'); break;
						default: $dice_type = ""; break;
					}
					if(!empty($dice_type)){
						$side_result .= $obj->lang->line('all_bet_code_side_bet').' : ';
						$side_result .= '<span class="dice dice-'.$dice_type.'" title="'.$obj->lang->line('all_bet_code_dice').' : '.$dice_name.'"></span>';
					}
				}
				if(!empty($side_result)){	
					if(!empty($result)){
						$result .= "<br/>";
					}
					$result .= $side_result;
				}
			}
		}
	}else if($game_real_code == "tip"){
		$result = "-";
	}else{
		$result = "-";
	}
	return $result;
}

/*DG*/
function dg_game_code_decision($game_type_code = NULL,$game_real_code = NULL){
	$result = "-";
	if($game_type_code == GAME_LIVE_CASINO){
		$obj =& get_instance();
		switch($game_real_code)
		{
			case 1: $result = $obj->lang->line('all_game_code_baccarat'); break;
			case 2: $result = $obj->lang->line('all_game_code_insurance_baccarat'); break;
			case 3: $result = $obj->lang->line('all_game_code_dragon_tiger'); break;
			case 4: $result = $obj->lang->line('all_game_code_roulette'); break;
			case 5: $result = $obj->lang->line('all_game_code_sicbo'); break;
			case 6: $result = $obj->lang->line('all_game_code_fan_tan'); break;
			case 7: $result = $obj->lang->line('all_game_code_bull_bull'); break;
			case 8: $result = $obj->lang->line('all_game_code_baccarat'); break;
			case 11: $result = $obj->lang->line('all_game_code_three_card'); break;
			case 12: $result = $obj->lang->line('all_game_code_sicbo'); break;
			case 14: $result = $obj->lang->line('all_game_code_se_die'); break;
			case 15: $result = $obj->lang->line('all_game_code_fish_prawn_crab'); break;
			case 16: $result = $obj->lang->line('all_game_code_sam_gong'); break;
			case 51: $result = $obj->lang->line('all_game_code_live_lucky_five'); break;
			case 52: $result = $obj->lang->line('all_game_code_live_lucky_ten'); break;
			default: $result = "-"; break;
		}
	}else if($game_type_code == GAME_OTHERS){
		$obj =& get_instance();
		switch($game_real_code)
		{
			case 1: $result = $obj->lang->line('all_game_code_member_send_gift'); break;
			case 1: $result = $obj->lang->line('all_game_code_member_get_gift'); break;
			case 1: $result = $obj->lang->line('all_game_code_anchor_send_tips'); break;
			case 1: $result = $obj->lang->line('all_game_code_company_send_gift'); break;
			case 1: $result = $obj->lang->line('all_game_code_bo_bing'); break;
			case 1: $result = $obj->lang->line('all_game_code_croupier_send_tips'); break;
			default: $result = "-"; break;
		}					
	}
	return $result;
}

function dg_bet_code_decision($game_type_code = NULL,$game_real_code = NULL, $bet_code = NULL){
	$obj =& get_instance();
	$result = "-";
	$result_temp = "";
	$temp_string = "";
	if($game_type_code == GAME_LIVE_CASINO){
		$bet_code_array = json_decode($bet_code,true);
		if(!empty($bet_code_array)){
			if($game_real_code == "1"){
				foreach($bet_code_array as $bet_code_row_key => $bet_code_row_val){
					switch($bet_code_row_key)
					{
						case "banker": $result_temp .= $obj->lang->line('all_bet_code_banker')." : ".$bet_code_row_val."<br/>"; break;
						case "banker6": $result_temp .= $obj->lang->line('all_bet_code_no_commission_banker')." : ".$bet_code_row_val."<br/>"; break;
						case "player": $result_temp .= $obj->lang->line('all_bet_code_player')." : ".$bet_code_row_val."<br/>"; break;
						case "tie": $result_temp .= $obj->lang->line('all_bet_code_tie')." : ".$bet_code_row_val."<br/>"; break;
						case "bPair": $result_temp .= $obj->lang->line('all_bet_code_banker_pair')." : ".$bet_code_row_val."<br/>"; break;
						case "pPair": $result_temp .= $obj->lang->line('all_bet_code_player_pair')." : ".$bet_code_row_val."<br/>"; break;
						case "big": $result_temp .= $obj->lang->line('all_bet_code_big')." : ".$bet_code_row_val."<br/>"; break;
						case "small": $result_temp .= $obj->lang->line('all_bet_code_small')." : ".$bet_code_row_val."<br/>"; break;
						case "bBX": $result_temp .= $obj->lang->line('all_bet_code_commission_banker')." : ".$bet_code_row_val."<br/>"; break;
						case "pBX": $result_temp .= $obj->lang->line('all_bet_code_commission_player')." : ".$bet_code_row_val."<br/>"; break;
						case "super6": $result_temp .= $obj->lang->line('all_bet_code_commission_lucky_six')." : ".$bet_code_row_val."<br/>"; break;
						case "anyPair": $result_temp .= $obj->lang->line('all_bet_code_pair')." : ".$bet_code_row_val."<br/>"; break;
						case "perfectPair": $result_temp .= $obj->lang->line('all_bet_code_perfect_pair')." : ".$bet_code_row_val."<br/>"; break;
						case "bBonus": $result_temp .= $obj->lang->line('all_bet_code_banker_dragon_bonus')." : ".$bet_code_row_val."<br/>"; break;
						case "pBonus": $result_temp .= $obj->lang->line('all_bet_code_player_dragon_bonus')." : ".$bet_code_row_val."<br/>"; break;
						default: $result_temp .= ""; break;
					}
				}
			}
			else if($game_real_code == "41"){
				foreach($bet_code_array as $bet_code_row_key => $bet_code_row_val){
					switch($bet_code_row_key)
					{
						case "banker": $result_temp .= $obj->lang->line('all_bet_code_banker')." : ".$bet_code_row_val."<br/>"; break;
						case "banker6": $result_temp .= $obj->lang->line('all_bet_code_no_commission_banker')." : ".$bet_code_row_val."<br/>"; break;
						case "player": $result_temp .= $obj->lang->line('all_bet_code_player')." : ".$bet_code_row_val."<br/>"; break;
						case "tie": $result_temp .= $obj->lang->line('all_bet_code_tie')." : ".$bet_code_row_val."<br/>"; break;
						case "bPair": $result_temp .= $obj->lang->line('all_bet_code_banker_pair')." : ".$bet_code_row_val."<br/>"; break;
						case "pPair": $result_temp .= $obj->lang->line('all_bet_code_player_pair')." : ".$bet_code_row_val."<br/>"; break;
						case "big": $result_temp .= $obj->lang->line('all_bet_code_big')." : ".$bet_code_row_val."<br/>"; break;
						case "small": $result_temp .= $obj->lang->line('all_bet_code_small')." : ".$bet_code_row_val."<br/>"; break;
						case "bBX": $result_temp .= $obj->lang->line('all_bet_code_commission_banker')." : ".$bet_code_row_val."<br/>"; break;
						case "pBX": $result_temp .= $obj->lang->line('all_bet_code_commission_player')." : ".$bet_code_row_val."<br/>"; break;
						case "super6": $result_temp .= $obj->lang->line('all_bet_code_commission_lucky_six')." : ".$bet_code_row_val."<br/>"; break;
						case "anyPair": $result_temp .= $obj->lang->line('all_bet_code_pair')." : ".$bet_code_row_val."<br/>"; break;
						case "perfectPair": $result_temp .= $obj->lang->line('all_bet_code_perfect_pair')." : ".$bet_code_row_val."<br/>"; break;
						case "bBonus": $result_temp .= $obj->lang->line('all_bet_code_banker_dragon_bonus')." : ".$bet_code_row_val."<br/>"; break;
						case "pBonus": $result_temp .= $obj->lang->line('all_bet_code_player_dragon_bonus')." : ".$bet_code_row_val."<br/>"; break;
						default: $result_temp .= ""; break;
					}
				}
			}
			else if($game_real_code == "2"){
				foreach($bet_code_array as $bet_code_row_key => $bet_code_row_val){
					switch($bet_code_row_key)
					{
						case "banker": $result_temp .= $obj->lang->line('all_bet_code_banker')." : ".$bet_code_row_val."<br/>"; break;
						case "player": $result_temp .= $obj->lang->line('all_bet_code_player')." : ".$bet_code_row_val."<br/>"; break;
						case "tie": $result_temp .= $obj->lang->line('all_bet_code_tie')." : ".$bet_code_row_val."<br/>"; break;
						case "bPair": $result_temp .= $obj->lang->line('all_bet_code_banker_pair')." : ".$bet_code_row_val."<br/>"; break;
						case "pPair": $result_temp .= $obj->lang->line('all_bet_code_player_pair')." : ".$bet_code_row_val."<br/>"; break;
						case "bBX": $result_temp .= $obj->lang->line('all_bet_code_commission_banker')." : ".$bet_code_row_val."<br/>"; break;
						case "pBX": $result_temp .= $obj->lang->line('all_bet_code_commission_player')." : ".$bet_code_row_val."<br/>"; break;
						default: $result_temp .= ""; break;
					}
				}
			}else if($game_real_code == "3"){
				foreach($bet_code_array as $bet_code_row_key => $bet_code_row_val){
					switch($bet_code_row_key)
					{
						case "dragon": $result_temp .= $obj->lang->line('all_bet_code_dragon')." : ".$bet_code_row_val."<br/>"; break;
						case "tiger": $result_temp .= $obj->lang->line('all_bet_code_tiger')." : ".$bet_code_row_val."<br/>"; break;
						case "tie": $result_temp .= $obj->lang->line('all_bet_code_tie')." : ".$bet_code_row_val."<br/>"; break;
						case "dragonRed": $result_temp .= $obj->lang->line('all_bet_code_dragon_red')." : ".$bet_code_row_val."<br/>"; break;
						case "dragonBlack": $result_temp .= $obj->lang->line('all_bet_code_dragon_black')." : ".$bet_code_row_val."<br/>"; break;
						case "tigerRed": $result_temp .= $obj->lang->line('all_bet_code_tiger_red')." : ".$bet_code_row_val."<br/>"; break;
						case "tigerBlack": $result_temp .= $obj->lang->line('all_bet_code_tiger_black')." : ".$bet_code_row_val."<br/>"; break;
						case "dragonOdd": $result_temp .= $obj->lang->line('all_bet_code_dragon_odd')." : ".$bet_code_row_val."<br/>"; break;
						case "tigerOdd": $result_temp .= $obj->lang->line('all_bet_code_tiger_odd')." : ".$bet_code_row_val."<br/>"; break;
						case "dragonEven": $result_temp .= $obj->lang->line('all_bet_code_dragon_even')." : ".$bet_code_row_val."<br/>"; break;
						case "tigerEven": $result_temp .= $obj->lang->line('all_bet_code_tiger_even')." : ".$bet_code_row_val."<br/>"; break;
						default: $result_temp .= ""; break;
					}
				}
			}else if($game_real_code == "4"){
				foreach($bet_code_array as $bet_code_row_key => $bet_code_row_val){
					if($bet_code_row_key == "direct"){
						$result_temp .= $obj->lang->line('all_bet_code_direct')."<br />";
						if(!empty($bet_code_row_val)){
							foreach($bet_code_row_val as $bet_code_row_val_key => $bet_code_row_val_val){
								$result_temp .= $bet_code_row_val_key . " : ".$bet_code_row_val_val."<br />";
							}
						}
						$result_temp .= "<br />";
					}else if($bet_code_row_key == "separate"){
						$result_temp .= $obj->lang->line('all_bet_code_separate')."<br />";
						if(!empty($bet_code_row_val)){
							foreach($bet_code_row_val as $bet_code_row_val_key => $bet_code_row_val_val){
								$result_temp .= substr($bet_code_row_val_key,0,2).",".substr($bet_code_row_val_key,2) . " : ".$bet_code_row_val_val."<br />";
							}
						}
						$result_temp .= "<br />";
					}else if($bet_code_row_key == "street"){
						$result_temp .= $obj->lang->line('all_bet_code_street')."<br />";
						if(!empty($bet_code_row_val)){
							foreach($bet_code_row_val as $bet_code_row_val_key => $bet_code_row_val_val){
								$result_temp .= substr($bet_code_row_val_key,0,2).",".substr($bet_code_row_val_key,2,2).",".substr($bet_code_row_val_key,4,2) . " : ".$bet_code_row_val_val."<br />";
							}
						}
						$result_temp .= "<br />";
					}else if($bet_code_row_key == "angle"){
						$result_temp .= $obj->lang->line('all_bet_code_angle')."<br />";
						if(!empty($bet_code_row_val)){
							foreach($bet_code_row_val as $bet_code_row_val_key => $bet_code_row_val_val){
								$result_temp .= substr($bet_code_row_val_key,0,2).",".substr($bet_code_row_val_key,2,2).",".substr($bet_code_row_val_key,4,2).",".substr($bet_code_row_val_key,6,2) . " : ".$bet_code_row_val_val."<br />";
							}
						}
						$result_temp .= "<br />";
					}else if($bet_code_row_key == "line"){
						$result_temp .= $obj->lang->line('all_bet_code_angle')."<br />";
						if(!empty($bet_code_row_val)){
							foreach($bet_code_row_val as $bet_code_row_val_key => $bet_code_row_val_val){
								$result_temp .= substr($bet_code_row_val_key,0,2).",".substr($bet_code_row_val_key,2,2).",".substr($bet_code_row_val_key,4,2).",".substr($bet_code_row_val_key,6,2).",".substr($bet_code_row_val_key,8,2).",".substr($bet_code_row_val_key,10,2) . " : ".$bet_code_row_val_val."<br />";
							}
						}
						$result_temp .= "<br />";
					}else if($bet_code_row_key == "three"){
						$result_temp .= $obj->lang->line('all_bet_code_street')."<br />";
						if(!empty($bet_code_row_val)){
							foreach($bet_code_row_val as $bet_code_row_val_key => $bet_code_row_val_val){
								$result_temp .= substr($bet_code_row_val_key,0,2).",".substr($bet_code_row_val_key,2,2).",".substr($bet_code_row_val_key,4,2) . " : ".$bet_code_row_val_val."<br />";
							}
						}
						$result_temp .= "<br />";
					}else if($bet_code_row_key == "four"){
						$result_temp .= $obj->lang->line('all_bet_code_four_number')."<br />";
						$result_temp .= "0,1,2,3 : ".$bet_code_row_val."<br /><br />";
					}else{
						switch($bet_code_row_key)
						{
							case "firstRow": $result_temp .= $obj->lang->line('all_bet_code_first_row')." : ".$bet_code_row_val."<br/>"; break;
							case "sndRow": $result_temp .= $obj->lang->line('all_bet_code_second_row')." : ".$bet_code_row_val."<br/>"; break;
							case "thrRow": $result_temp .= $obj->lang->line('all_bet_code_third_row')." : ".$bet_code_row_val."<br/>"; break;
							case "firstCol": $result_temp .= $obj->lang->line('all_bet_code_first_twelve')." : ".$bet_code_row_val."<br/>"; break;
							case "sndCol": $result_temp .= $obj->lang->line('all_bet_code_second_twelve')." : ".$bet_code_row_val."<br/>"; break;
							case "thrCol": $result_temp .= $obj->lang->line('all_bet_code_third_twelve')." : ".$bet_code_row_val."<br/>"; break;
							case "red": $result_temp .= $obj->lang->line('all_bet_code_red')." : ".$bet_code_row_val."<br/>"; break;
							case "black": $result_temp .= $obj->lang->line('all_bet_code_black')." : ".$bet_code_row_val."<br/>"; break;
							case "odd": $result_temp .= $obj->lang->line('all_bet_code_odd')." : ".$bet_code_row_val."<br/>"; break;
							case "even": $result_temp .= $obj->lang->line('all_bet_code_even')." : ".$bet_code_row_val."<br/>"; break;
							case "low": $result_temp .= $obj->lang->line('all_bet_code_small_eighteen')." : ".$bet_code_row_val."<br/>"; break;
							case "high": $result_temp .= $obj->lang->line('all_bet_code_big_eighteen')." : ".$bet_code_row_val."<br/>"; break;
							default: $result_temp .= ""; break;
						}
					}
				}
			}else if($game_real_code == "5"){
				foreach($bet_code_array as $bet_code_row_key => $bet_code_row_val){
					if($bet_code_row_key == "threeForces"){
						$result_temp .= $obj->lang->line('all_bet_code_one_of_a_kind')."<br />";
						if(!empty($bet_code_row_val)){
							foreach($bet_code_row_val as $bet_code_row_val_key => $bet_code_row_val_val){
								$result_temp .= $bet_code_row_val_key . " : ".$bet_code_row_val_val."<br />";
							}
						}
						$result_temp .= "<br />";
					}else if($bet_code_row_key == "nineWayGards"){
						$result_temp .= $obj->lang->line('all_bet_code_pair')."<br />";
						if(!empty($bet_code_row_val)){
							foreach($bet_code_row_val as $bet_code_row_val_key => $bet_code_row_val_val){
								$result_temp .= substr($bet_code_row_val_key,0,1).",".substr($bet_code_row_val_key,1,1) . " : ".$bet_code_row_val_val."<br />";
							}
						}
						$result_temp .= "<br />";
					}else if($bet_code_row_key == "pairs"){
						$result_temp .= $obj->lang->line('all_bet_code_specific_double')."<br />";
						if(!empty($bet_code_row_val)){
							foreach($bet_code_row_val as $bet_code_row_val_key => $bet_code_row_val_val){
								$result_temp .= substr($bet_code_row_val_key,0,1) . " : ".$bet_code_row_val_val."<br />";
							}
						}
						$result_temp .= "<br />";
					}else if($bet_code_row_key == "surroundDices"){
						$result_temp .= $obj->lang->line('all_bet_code_specific_triples')."<br />";
						if(!empty($bet_code_row_val)){
							foreach($bet_code_row_val as $bet_code_row_val_key => $bet_code_row_val_val){
								$result_temp .= substr($bet_code_row_val_key,0,1) . " : ".$bet_code_row_val_val."<br />";
							}
						}
						$result_temp .= "<br />";
					}else if($bet_code_row_key == "points"){
						$result_temp .= $obj->lang->line('all_bet_code_sum_number')."<br />";
						if(!empty($bet_code_row_val)){
							foreach($bet_code_row_val as $bet_code_row_val_key => $bet_code_row_val_val){
								$result_temp .= $bet_code_row_val_key . " : ".$bet_code_row_val_val."<br />";
							}
						}
						$result_temp .= "<br />";
					}else{
						switch($bet_code_row_key)
						{
							case "big": $result_temp .= $obj->lang->line('all_bet_code_big')." : ".$bet_code_row_val."<br/>"; break;
							case "small": $result_temp .= $obj->lang->line('all_bet_code_small')." : ".$bet_code_row_val."<br/>"; break;
							case "odd": $result_temp .= $obj->lang->line('all_bet_code_odd')." : ".$bet_code_row_val."<br/>"; break;
							case "even": $result_temp .= $obj->lang->line('all_bet_code_even')." : ".$bet_code_row_val."<br/>"; break;
							case "allDices": $result_temp .= $obj->lang->line('all_bet_code_any_specific_triples')." : ".$bet_code_row_val."<br/>"; break;
							default: $result_temp .= ""; break;
						}
					}
				}
			}else if($game_real_code == "6"){
				foreach($bet_code_array as $bet_code_row_key => $bet_code_row_val){
					if($bet_code_row_key == "fan"){
						$result_temp .= $obj->lang->line('all_bet_code_fan')."<br />";
						if(!empty($bet_code_row_val)){
							foreach($bet_code_row_val as $bet_code_row_val_key => $bet_code_row_val_val){
								$result_temp .= $bet_code_row_val_key.$obj->lang->line('all_bet_code_fan') . " : ".$bet_code_row_val_val."<br />";
							}
						}
						$result_temp .= "<br />";
					}else if($bet_code_row_key == "jiao"){
						$result_temp .= $obj->lang->line('all_bet_code_kwok_number')."<br />";
						if(!empty($bet_code_row_val)){
							foreach($bet_code_row_val as $bet_code_row_val_key => $bet_code_row_val_val){
								$result_temp .= $bet_code_row_val_key.$obj->lang->line('all_bet_code_kwok_number') . " : ".$bet_code_row_val_val."<br />";
							}
						}
						$result_temp .= "<br />";
					}else if($bet_code_row_key == "nian"){
						$result_temp .= $obj->lang->line('all_bet_code_nim_number')."<br />";
						if(!empty($bet_code_row_val)){
							foreach($bet_code_row_val as $bet_code_row_val_key => $bet_code_row_val_val){
								$result_temp .= substr($bet_code_row_val_key,0,1).$obj->lang->line('all_bet_code_nim_number').substr($bet_code_row_val_key,1,1). " : ".$bet_code_row_val_val."<br />";
							}
						}
						$result_temp .= "<br />";
					}else if($bet_code_row_key == "tong"){
						$result_temp .= $obj->lang->line('all_bet_code_nga_number')."<br />";
						if(!empty($bet_code_row_val)){
							foreach($bet_code_row_val as $bet_code_row_val_key => $bet_code_row_val_val){
								switch($bet_code_row_val_key){
									case "123": $result_temp .= "12 ".$obj->lang->line('all_bet_code_four').$obj->lang->line('all_bet_code_nga_number')." : ".$bet_code_row_val_val."<br/>"; break;
									case "124": $result_temp .= "12 ".$obj->lang->line('all_bet_code_three').$obj->lang->line('all_bet_code_nga_number')." : ".$bet_code_row_val_val."<br/>"; break;
									case "132": $result_temp .= "13 ".$obj->lang->line('all_bet_code_four').$obj->lang->line('all_bet_code_nga_number')." : ".$bet_code_row_val_val."<br/>"; break;
									case "134": $result_temp .= "13 ".$obj->lang->line('all_bet_code_two').$obj->lang->line('all_bet_code_nga_number')." : ".$bet_code_row_val_val."<br/>"; break;
									case "142": $result_temp .= "14 ".$obj->lang->line('all_bet_code_three').$obj->lang->line('all_bet_code_nga_number')." : ".$bet_code_row_val_val."<br/>"; break;
									case "143": $result_temp .= "14 ".$obj->lang->line('all_bet_code_two').$obj->lang->line('all_bet_code_nga_number')." : ".$bet_code_row_val_val."<br/>"; break;
									case "231": $result_temp .= "23 ".$obj->lang->line('all_bet_code_four').$obj->lang->line('all_bet_code_nga_number')." : ".$bet_code_row_val_val."<br/>"; break;
									case "234": $result_temp .= "23 ".$obj->lang->line('all_bet_code_one').$obj->lang->line('all_bet_code_nga_number')." : ".$bet_code_row_val_val."<br/>"; break;
									case "341": $result_temp .= "34 ".$obj->lang->line('all_bet_code_two').$obj->lang->line('all_bet_code_nga_number')." : ".$bet_code_row_val_val."<br/>"; break;
									case "342": $result_temp .= "34 ".$obj->lang->line('all_bet_code_one').$obj->lang->line('all_bet_code_nga_number')." : ".$bet_code_row_val_val."<br/>"; break;
									case "241": $result_temp .= "24 ".$obj->lang->line('all_bet_code_three').$obj->lang->line('all_bet_code_nga_number')." : ".$bet_code_row_val_val."<br/>"; break;
									case "243": $result_temp .= "24 ".$obj->lang->line('all_bet_code_one').$obj->lang->line('all_bet_code_nga_number')." : ".$bet_code_row_val_val."<br/>"; break;
									default: $result_temp .= "-"; break;
								}
							}
						}
						$result_temp .= "<br />";
					}else if($bet_code_row_key == "sanmen"){
						$result_temp .= $obj->lang->line('all_bet_code_sanmen')."<br />";
						if(!empty($bet_code_row_val)){
							foreach($bet_code_row_val as $bet_code_row_val_key => $bet_code_row_val_val){
								$result_temp .= $bet_code_row_val_key . " : ".$bet_code_row_val_val."<br />";
							}
						}
						$result_temp .= "<br />";
					}else{
						switch($bet_code_row_key)
						{
							case "odd": $result_temp .= $obj->lang->line('all_bet_code_odd')." : ".$bet_code_row_val."<br/>"; break;
							case "even": $result_temp .= $obj->lang->line('all_bet_code_even')." : ".$bet_code_row_val."<br/>"; break;
							default: $result_temp .= ""; break;
						}
					}
				}
			}else if($game_real_code == "7"){
				foreach($bet_code_array as $bet_code_row_key => $bet_code_row_val){
					switch($bet_code_row_key)
					{
						case "player1Double": $result_temp .= $obj->lang->line('all_bet_code_player_one_double')." : ".$bet_code_row_val."<br/>"; break;
						case "player2Double": $result_temp .= $obj->lang->line('all_bet_code_player_two_double')." : ".$bet_code_row_val."<br/>"; break;
						case "player3Double": $result_temp .= $obj->lang->line('all_bet_code_player_three_double')." : ".$bet_code_row_val."<br/>"; break;
						case "player1Equal": $result_temp .= $obj->lang->line('all_bet_code_player_one_equal')." : ".$bet_code_row_val."<br/>"; break;
						case "player2Equal": $result_temp .= $obj->lang->line('all_bet_code_player_two_equal')." : ".$bet_code_row_val."<br/>"; break;
						case "player3Equal": $result_temp .= $obj->lang->line('all_bet_code_player_three_equal')." : ".$bet_code_row_val."<br/>"; break;
						case "player1Many": $result_temp .= $obj->lang->line('all_bet_code_player_one_many')." : ".$bet_code_row_val."<br/>"; break;
						case "player2Many": $result_temp .= $obj->lang->line('all_bet_code_player_two_many')." : ".$bet_code_row_val."<br/>"; break;
						case "player3Many": $result_temp .= $obj->lang->line('all_bet_code_player_three_many')." : ".$bet_code_row_val."<br/>"; break;
						case "banker1Double": $result_temp .= $obj->lang->line('all_bet_code_banker_one_double')." : ".$bet_code_row_val."<br/>"; break;
						case "banker2Double": $result_temp .= $obj->lang->line('all_bet_code_banker_two_double')." : ".$bet_code_row_val."<br/>"; break;
						case "banker3Double": $result_temp .= $obj->lang->line('all_bet_code_banker_three_double')." : ".$bet_code_row_val."<br/>"; break;
						case "banker1Equal": $result_temp .= $obj->lang->line('all_bet_code_banker_one_equal')." : ".$bet_code_row_val."<br/>"; break;
						case "banker2Equal": $result_temp .= $obj->lang->line('all_bet_code_banker_two_equal')." : ".$bet_code_row_val."<br/>"; break;
						case "banker3Equal": $result_temp .= $obj->lang->line('all_bet_code_banker_three_equal')." : ".$bet_code_row_val."<br/>"; break;
						case "banker1Many": $result_temp .= $obj->lang->line('all_bet_code_banker_one_many')." : ".$bet_code_row_val."<br/>"; break;
						case "banker2Many": $result_temp .= $obj->lang->line('all_bet_code_banker_two_many')." : ".$bet_code_row_val."<br/>"; break;
						case "banker3Many": $result_temp .= $obj->lang->line('all_bet_code_banker_three_many')." : ".$bet_code_row_val."<br/>"; break;
						default: $result_temp .= ""; break;
					}
				}
			}else if($game_real_code == "8"){
				foreach($bet_code_array as $bet_code_row_key => $bet_code_row_val){
					switch($bet_code_row_key)
					{
						case "banker": $result_temp .= $obj->lang->line('all_bet_code_banker')." : ".$bet_code_row_val."<br/>"; break;
						case "banker6": $result_temp .= $obj->lang->line('all_bet_code_no_commission_banker')." : ".$bet_code_row_val."<br/>"; break;
						case "player": $result_temp .= $obj->lang->line('all_bet_code_player')." : ".$bet_code_row_val."<br/>"; break;
						case "tie": $result_temp .= $obj->lang->line('all_bet_code_tie')." : ".$bet_code_row_val."<br/>"; break;
						case "bPair": $result_temp .= $obj->lang->line('all_bet_code_banker_pair')." : ".$bet_code_row_val."<br/>"; break;
						case "pPair": $result_temp .= $obj->lang->line('all_bet_code_player_pair')." : ".$bet_code_row_val."<br/>"; break;
						case "big": $result_temp .= $obj->lang->line('all_bet_code_big')." : ".$bet_code_row_val."<br/>"; break;
						case "small": $result_temp .= $obj->lang->line('all_bet_code_small')." : ".$bet_code_row_val."<br/>"; break;
						case "bBX": $result_temp .= $obj->lang->line('all_bet_code_commission_banker')." : ".$bet_code_row_val."<br/>"; break;
						case "pBX": $result_temp .= $obj->lang->line('all_bet_code_commission_player')." : ".$bet_code_row_val."<br/>"; break;
						case "super6": $result_temp .= $obj->lang->line('all_bet_code_commission_lucky_six')." : ".$bet_code_row_val."<br/>"; break;
						case "anyPair": $result_temp .= $obj->lang->line('all_bet_code_pair')." : ".$bet_code_row_val."<br/>"; break;
						case "perfectPair": $result_temp .= $obj->lang->line('all_bet_code_perfect_pair')." : ".$bet_code_row_val."<br/>"; break;
						case "bBonus": $result_temp .= $obj->lang->line('all_bet_code_banker_dragon_bonus')." : ".$bet_code_row_val."<br/>"; break;
						case "pBonus": $result_temp .= $obj->lang->line('all_bet_code_player_dragon_bonus')." : ".$bet_code_row_val."<br/>"; break;
						default: $result_temp .= ""; break;
					}
				}
			}else if($game_real_code == "11"){
				foreach($bet_code_array as $bet_code_row_key => $bet_code_row_val){
					switch($bet_code_row_key)
					{
						case "red": $result_temp .= $obj->lang->line('all_bet_code_red')." : ".$bet_code_row_val."<br/>"; break;
						case "black": $result_temp .= $obj->lang->line('all_bet_code_black')." : ".$bet_code_row_val."<br/>"; break;
						case "luck": $result_temp .= $obj->lang->line('all_bet_code_luck')." : ".$bet_code_row_val."<br/>"; break;
						default: $result_temp .= ""; break;
					}
				}
			}else if($game_real_code == "12"){
				foreach($bet_code_array as $bet_code_row_key => $bet_code_row_val){
					if($bet_code_row_key == "threeForces"){
						$result_temp .= $obj->lang->line('all_bet_code_one_of_a_kind')."<br />";
						if(!empty($bet_code_row_val)){
							foreach($bet_code_row_val as $bet_code_row_val_key => $bet_code_row_val_val){
								$result_temp .= $bet_code_row_val_key . " : ".$bet_code_row_val_val."<br />";
							}
						}
						$result_temp .= "<br />";
					}else if($bet_code_row_key == "nineWayGards"){
						$result_temp .= $obj->lang->line('all_bet_code_pair')."<br />";
						if(!empty($bet_code_row_val)){
							foreach($bet_code_row_val as $bet_code_row_val_key => $bet_code_row_val_val){
								$result_temp .= substr($bet_code_row_val_key,0,1).",".substr($bet_code_row_val_key,1,1) . " : ".$bet_code_row_val_val."<br />";
							}
						}
						$result_temp .= "<br />";
					}else if($bet_code_row_key == "pairs"){
						$result_temp .= $obj->lang->line('all_bet_code_specific_double')."<br />";
						if(!empty($bet_code_row_val)){
							foreach($bet_code_row_val as $bet_code_row_val_key => $bet_code_row_val_val){
								$result_temp .= substr($bet_code_row_val_key,0,1) . " : ".$bet_code_row_val_val."<br />";
							}
						}
						$result_temp .= "<br />";
					}else if($bet_code_row_key == "surroundDices"){
						$result_temp .= $obj->lang->line('all_bet_code_specific_triples')."<br />";
						if(!empty($bet_code_row_val)){
							foreach($bet_code_row_val as $bet_code_row_val_key => $bet_code_row_val_val){
								$result_temp .= substr($bet_code_row_val_key,0,1) . " : ".$bet_code_row_val_val."<br />";
							}
						}
						$result_temp .= "<br />";
					}else if($bet_code_row_key == "points"){
						$result_temp .= $obj->lang->line('all_bet_code_sum_number')."<br />";
						if(!empty($bet_code_row_val)){
							foreach($bet_code_row_val as $bet_code_row_val_key => $bet_code_row_val_val){
								$result_temp .= $bet_code_row_val_key . " : ".$bet_code_row_val_val."<br />";
							}
						}
						$result_temp .= "<br />";
					}else{
						switch($bet_code_row_key)
						{
							case "big": $result_temp .= $obj->lang->line('all_bet_code_big')." : ".$bet_code_row_val."<br/>"; break;
							case "small": $result_temp .= $obj->lang->line('all_bet_code_small')." : ".$bet_code_row_val."<br/>"; break;
							case "odd": $result_temp .= $obj->lang->line('all_bet_code_odd')." : ".$bet_code_row_val."<br/>"; break;
							case "even": $result_temp .= $obj->lang->line('all_bet_code_even')." : ".$bet_code_row_val."<br/>"; break;
							case "allDices": $result_temp .= $obj->lang->line('all_bet_code_any_specific_triples')." : ".$bet_code_row_val."<br/>"; break;
							default: $result_temp .= ""; break;
						}
					}
				}
			}else if($game_real_code == "14"){
				foreach($bet_code_array as $bet_code_row_key => $bet_code_row_val){
					switch($bet_code_row_key)
					{
						case "zero": $result_temp .= $obj->lang->line('all_bet_code_four_white')." : ".$bet_code_row_val."<br/>"; break;
						case "one": $result_temp .= $obj->lang->line('all_bet_code_three_white_one_red')." : ".$bet_code_row_val."<br/>"; break;
						case "three": $result_temp .= $obj->lang->line('all_bet_code_three_red_one_white')." : ".$bet_code_row_val."<br/>"; break;
						case "four": $result_temp .= $obj->lang->line('all_bet_code_four_red')." : ".$bet_code_row_val."<br/>"; break;
						case "odd": $result_temp .= $obj->lang->line('all_bet_code_odd')." : ".$bet_code_row_val."<br/>"; break;
						case "even": $result_temp .= $obj->lang->line('all_bet_code_even')." : ".$bet_code_row_val."<br/>"; break;
						default: $result_temp .= ""; break;
					}
				}
			}else if($game_real_code == "15"){
				
			}else if($game_real_code == "16"){
				foreach($bet_code_array as $bet_code_row_key => $bet_code_row_val){
					switch($bet_code_row_key)
					{
						case "banker1": $result_temp .= $obj->lang->line('all_bet_code_player_one_lose')." : ".$bet_code_row_val."<br/>"; break;
						case "banker2": $result_temp .= $obj->lang->line('all_bet_code_player_two_lose')." : ".$bet_code_row_val."<br/>"; break;
						case "banker3": $result_temp .= $obj->lang->line('all_bet_code_player_three_lose')." : ".$bet_code_row_val."<br/>"; break;
						case "player1": $result_temp .= $obj->lang->line('all_bet_code_player_one_win')." : ".$bet_code_row_val."<br/>"; break;
						case "player2": $result_temp .= $obj->lang->line('all_bet_code_player_two_win')." : ".$bet_code_row_val."<br/>"; break;
						case "player3": $result_temp .= $obj->lang->line('all_bet_code_player_three_win')." : ".$bet_code_row_val."<br/>"; break;
						case "tie1": $result_temp .= $obj->lang->line('all_bet_code_player_one_tie')." : ".$bet_code_row_val."<br/>"; break;
						case "tie2": $result_temp .= $obj->lang->line('all_bet_code_player_two_tie')." : ".$bet_code_row_val."<br/>"; break;
						case "tie3": $result_temp .= $obj->lang->line('all_bet_code_player_three_tie')." : ".$bet_code_row_val."<br/>"; break;
						case "tp1": $result_temp .= $obj->lang->line('all_bet_code_player_one_three_face')." : ".$bet_code_row_val."<br/>"; break;
						case "tp2": $result_temp .= $obj->lang->line('all_bet_code_player_two_three_face')." : ".$bet_code_row_val."<br/>"; break;
						case "tp3": $result_temp .= $obj->lang->line('all_bet_code_player_three_three_face')." : ".$bet_code_row_val."<br/>"; break;
						case "pair1": $result_temp .= $obj->lang->line('all_bet_code_player_one_pair_plus')." : ".$bet_code_row_val."<br/>"; break;
						case "pair2": $result_temp .= $obj->lang->line('all_bet_code_player_two_pair_plus')." : ".$bet_code_row_val."<br/>"; break;
						case "pair3": $result_temp .= $obj->lang->line('all_bet_code_player_three_pair_plus')." : ".$bet_code_row_val."<br/>"; break;
						case "bankerPair": $result_temp .= $obj->lang->line('all_bet_code_banker_pair_all')." : ".$bet_code_row_val."<br/>"; break;
						case "bankerTp": $result_temp .= $obj->lang->line('all_bet_code_banker_pair_plus')." : ".$bet_code_row_val."<br/>"; break;
						default: $result_temp .= ""; break;
					}
				}
			}else if($game_real_code == "51"){
				foreach($bet_code_array as $bet_code_row_key => $bet_code_row_val){
					switch($bet_code_row_key)
					{
						case "big": $result_temp .= $obj->lang->line('all_bet_code_big')." : ".$bet_code_row_val."<br/>"; break;
						case "small": $result_temp .= $obj->lang->line('all_bet_code_small')." : ".$bet_code_row_val."<br/>"; break;
						case "odd": $result_temp .= $obj->lang->line('all_bet_code_odd')." : ".$bet_code_row_val."<br/>"; break;
						case "even": $result_temp .= $obj->lang->line('all_bet_code_even')." : ".$bet_code_row_val."<br/>"; break;
						case "dragon": $result_temp .= $obj->lang->line('all_bet_code_dragon')." : ".$bet_code_row_val."<br/>"; break;
						case "tiger": $result_temp .= $obj->lang->line('all_bet_code_tiger')." : ".$bet_code_row_val."<br/>"; break;
						case "tie": $result_temp .= $obj->lang->line('all_bet_code_tie')." : ".$bet_code_row_val."<br/>"; break;
						default: $result_temp .= ""; break;
					}
				}
			}else if($game_real_code == "52"){
				foreach($bet_code_array as $bet_code_row_key => $bet_code_row_val){
					switch($bet_code_row_key)
					{
						case "big": $result_temp .= $obj->lang->line('all_bet_code_big')." : ".$bet_code_row_val."<br/>"; break;
						case "small": $result_temp .= $obj->lang->line('all_bet_code_small')." : ".$bet_code_row_val."<br/>"; break;
						case "odd": $result_temp .= $obj->lang->line('all_bet_code_odd')." : ".$bet_code_row_val."<br/>"; break;
						case "even": $result_temp .= $obj->lang->line('all_bet_code_even')." : ".$bet_code_row_val."<br/>"; break;
						default: $result_temp .= ""; break;
					}
				}
			}else{
				$result_temp = "";
			}
		}
	}else if($game_type_code == GAME_OTHERS){
	}

	if(!empty($result_temp)){
		$result = $result_temp;
	}
	return $result;
}

function dg_game_result_decision($game_type_code = NULL,$game_real_code = NULL, $game_result = NULL){
	$obj =& get_instance();
	$result = "-";
	$result_temp = "";
	$banker_result = "";
	$player_result = "";
	$player2_result = "";
	$player3_result = "";
	$winning_seperator_result_arary = array();
	$winning_result_arary = array();
	$banker_result_arary = array();
	$player_result_arary = array();
	$suit = "";
	$rank = "";
	$temp_string = "";
	if($game_type_code == GAME_LIVE_CASINO){
		$game_result_array = json_decode($game_result,true);
		if(!empty($game_result_array)){
			if($game_real_code == "1"){
				if(!empty($game_result_array['result'])){
					$winning_result_arary = explode(',',$game_result_array['result']);
					if(!empty($winning_result_arary)){
						switch($winning_result_arary[0]){
							case "1": $result_temp .= $obj->lang->line('all_winning_result')." : ".$obj->lang->line('all_result_banker_win')."<br />"; break;
							case "2": $result_temp .= $obj->lang->line('all_winning_result')." : ".$obj->lang->line('all_result_banker_win_banker_pair')."<br />"; break;
							case "3": $result_temp .= $obj->lang->line('all_winning_result')." : ".$obj->lang->line('all_result_banker_win_player_pair')."<br />"; break;
							case "4": $result_temp .= $obj->lang->line('all_winning_result')." : ".$obj->lang->line('all_result_banker_win_banker_pair_player_pair')."<br />"; break;
							case "5": $result_temp .= $obj->lang->line('all_winning_result')." : ".$obj->lang->line('all_result_player_win')."<br />"; break;
							case "6": $result_temp .= $obj->lang->line('all_winning_result')." : ".$obj->lang->line('all_result_player_win_banker_pair')."<br />"; break;
							case "7": $result_temp .= $obj->lang->line('all_winning_result')." : ".$obj->lang->line('all_result_player_win_player_pair')."<br />"; break;
							case "8": $result_temp .= $obj->lang->line('all_winning_result')." : ".$obj->lang->line('all_result_player_win_banker_pair_player_pair')."<br />"; break;
							case "9": $result_temp .= $obj->lang->line('all_winning_result')." : ".$obj->lang->line('all_result_tie_win')."<br />"; break;
							case "10": $result_temp .= $obj->lang->line('all_winning_result')." : ".$obj->lang->line('all_result_tie_win_banker_pair')."<br />"; break;
							case "11": $result_temp .= $obj->lang->line('all_winning_result')." : ".$obj->lang->line('all_result_tie_win_player_pair')."<br />"; break;
							case "12": $result_temp .= $obj->lang->line('all_winning_result')." : ".$obj->lang->line('all_result_tie_win_banker_pair_player_pair')."<br />"; break;
							default: $result_temp .= ""; break;
						}

						switch($winning_result_arary[1]){
							case "-1": $result_temp .= $obj->lang->line('all_winning_card')." : ".$obj->lang->line('all_result_no_card')."<br />"; break;
							case "1": $result_temp .= $obj->lang->line('all_winning_card')." : ".$obj->lang->line('all_bet_code_big')."<br />"; break;
							case "2": $result_temp .= $obj->lang->line('all_winning_card')." : ".$obj->lang->line('all_bet_code_small')."<br />"; break;
							default: $result_temp .= ""; break;
						}

						$result_temp .= $obj->lang->line('all_winning_point')." : ".$winning_result_arary[2]."<br />";
					}
				}

				if(!empty($result_temp)){
					$result_temp .= "<br/>";
				}

				if(!empty($game_result_array['poker']['banker'])){
					$banker_result_arary = explode('-',$game_result_array['poker']['banker']);
					if(!empty($banker_result_arary)){
						$banker_result .= $obj->lang->line('all_bet_code_banker')." : ";
						foreach($banker_result_arary as $banker_result_arary_row){
							if($banker_result_arary_row > 0){
								$suit = "";
								$rank = "";
								if($banker_result_arary_row >= 1 && $banker_result_arary_row <= 13){
									$suit = "spades";
								}else if($banker_result_arary_row >= 14 && $banker_result_arary_row <= 26){
									$suit = "hearts";
								}else if($banker_result_arary_row >= 27 && $banker_result_arary_row <= 39){
									$suit = "clubs";
								}else if($banker_result_arary_row >= 40 && $banker_result_arary_row <= 52){
									$suit = "diams";
								}else{
									$suit = "";
								}
								if(!empty($suit)){
									switch($banker_result_arary_row % 13)
									{
										case "1": $rank = "A"; break;
										case "2": $rank = "2"; break;
										case "3": $rank = "3"; break;
										case "4": $rank = "4"; break;
										case "5": $rank = "5"; break;
										case "6": $rank = "6"; break;
										case "7": $rank = "7"; break;
										case "8": $rank = "8"; break;
										case "9": $rank = "9"; break;
										case "10": $rank = "10"; break;
										case "11": $rank = "J"; break;
										case "12": $rank = "Q"; break;
										case "0": $rank = "K"; break;
										default: $rank = ""; break;
									}

									$banker_result .= '<div class="playingCards fourColours inText" style="display:inline-block;">';
										$banker_result .= '<div class="card rank-'.$rank.' '.$suit.'">';
											$banker_result .= '<span class="rank">'.$rank.'</span>';
											$banker_result .= '<span class="suit">&'.$suit.';</span>';
										$banker_result .= '</div>';
									$banker_result .= '</div>';
								}
							}
						}
					}
				}
				if(!empty($game_result_array['poker']['player'])){
					$player_result_arary = explode('-',$game_result_array['poker']['player']);
					if(!empty($player_result_arary)){
						$player_result .= $obj->lang->line('all_bet_code_player')." : ";
						foreach($player_result_arary as $player_result_arary_row){
							if($player_result_arary_row > 0){
								$suit = "";
								$rank = "";
								if($player_result_arary_row >= 1 && $player_result_arary_row <= 13){
									$suit = "spades";
								}else if($player_result_arary_row >= 14 && $player_result_arary_row <= 26){
									$suit = "hearts";
								}else if($player_result_arary_row >= 27 && $player_result_arary_row <= 39){
									$suit = "clubs";
								}else if($player_result_arary_row >= 40 && $player_result_arary_row <= 52){
									$suit = "diams";
								}else{
									$suit = "";
								}
								if(!empty($suit)){
									switch($player_result_arary_row % 13)
									{
										case "1": $rank = "A"; break;
										case "2": $rank = "2"; break;
										case "3": $rank = "3"; break;
										case "4": $rank = "4"; break;
										case "5": $rank = "5"; break;
										case "6": $rank = "6"; break;
										case "7": $rank = "7"; break;
										case "8": $rank = "8"; break;
										case "9": $rank = "9"; break;
										case "10": $rank = "10"; break;
										case "11": $rank = "J"; break;
										case "12": $rank = "Q"; break;
										case "0": $rank = "K"; break;
										default: $rank = ""; break;
									}

									$player_result .= '<div class="playingCards fourColours inText" style="display:inline-block;">';
										$player_result .= '<div class="card rank-'.$rank.' '.$suit.'">';
											$player_result .= '<span class="rank">'.$rank.'</span>';
											$player_result .= '<span class="suit">&'.$suit.';</span>';
										$player_result .= '</div>';
									$player_result .= '</div>';
								}
							}
						}
					}
				}

				$result_temp .= $banker_result;
				if(!empty($player_result)){
					if(!empty($result_temp)){
						$result_temp .= "<br/>";
					}
					$result_temp .= $player_result;
				}
			}else if($game_real_code == "41"){
				if(!empty($game_result_array['result'])){
					$winning_result_arary = explode(',',$game_result_array['result']);
					if(!empty($winning_result_arary)){
						switch($winning_result_arary[0]){
							case "1": $result_temp .= $obj->lang->line('all_winning_result')." : ".$obj->lang->line('all_result_banker_win')."<br />"; break;
							case "2": $result_temp .= $obj->lang->line('all_winning_result')." : ".$obj->lang->line('all_result_banker_win_banker_pair')."<br />"; break;
							case "3": $result_temp .= $obj->lang->line('all_winning_result')." : ".$obj->lang->line('all_result_banker_win_player_pair')."<br />"; break;
							case "4": $result_temp .= $obj->lang->line('all_winning_result')." : ".$obj->lang->line('all_result_banker_win_banker_pair_player_pair')."<br />"; break;
							case "5": $result_temp .= $obj->lang->line('all_winning_result')." : ".$obj->lang->line('all_result_player_win')."<br />"; break;
							case "6": $result_temp .= $obj->lang->line('all_winning_result')." : ".$obj->lang->line('all_result_player_win_banker_pair')."<br />"; break;
							case "7": $result_temp .= $obj->lang->line('all_winning_result')." : ".$obj->lang->line('all_result_player_win_player_pair')."<br />"; break;
							case "8": $result_temp .= $obj->lang->line('all_winning_result')." : ".$obj->lang->line('all_result_player_win_banker_pair_player_pair')."<br />"; break;
							case "9": $result_temp .= $obj->lang->line('all_winning_result')." : ".$obj->lang->line('all_result_tie_win')."<br />"; break;
							case "10": $result_temp .= $obj->lang->line('all_winning_result')." : ".$obj->lang->line('all_result_tie_win_banker_pair')."<br />"; break;
							case "11": $result_temp .= $obj->lang->line('all_winning_result')." : ".$obj->lang->line('all_result_tie_win_player_pair')."<br />"; break;
							case "12": $result_temp .= $obj->lang->line('all_winning_result')." : ".$obj->lang->line('all_result_tie_win_banker_pair_player_pair')."<br />"; break;
							default: $result_temp .= ""; break;
						}

						switch($winning_result_arary[1]){
							case "-1": $result_temp .= $obj->lang->line('all_winning_card')." : ".$obj->lang->line('all_result_no_card')."<br />"; break;
							case "1": $result_temp .= $obj->lang->line('all_winning_card')." : ".$obj->lang->line('all_bet_code_big')."<br />"; break;
							case "2": $result_temp .= $obj->lang->line('all_winning_card')." : ".$obj->lang->line('all_bet_code_small')."<br />"; break;
							default: $result_temp .= ""; break;
						}

						$result_temp .= $obj->lang->line('all_winning_point')." : ".$winning_result_arary[2]."<br />";
					}
				}

				if(!empty($result_temp)){
					$result_temp .= "<br/>";
				}

				if(!empty($game_result_array['poker']['banker'])){
					$banker_result_arary = explode('-',$game_result_array['poker']['banker']);
					if(!empty($banker_result_arary)){
						$banker_result .= $obj->lang->line('all_bet_code_banker')." : ";
						foreach($banker_result_arary as $banker_result_arary_row){
							if($banker_result_arary_row > 0){
								$suit = "";
								$rank = "";
								if($banker_result_arary_row >= 1 && $banker_result_arary_row <= 13){
									$suit = "spades";
								}else if($banker_result_arary_row >= 14 && $banker_result_arary_row <= 26){
									$suit = "hearts";
								}else if($banker_result_arary_row >= 27 && $banker_result_arary_row <= 39){
									$suit = "clubs";
								}else if($banker_result_arary_row >= 40 && $banker_result_arary_row <= 52){
									$suit = "diams";
								}else{
									$suit = "";
								}
								if(!empty($suit)){
									switch($banker_result_arary_row % 13)
									{
										case "1": $rank = "A"; break;
										case "2": $rank = "2"; break;
										case "3": $rank = "3"; break;
										case "4": $rank = "4"; break;
										case "5": $rank = "5"; break;
										case "6": $rank = "6"; break;
										case "7": $rank = "7"; break;
										case "8": $rank = "8"; break;
										case "9": $rank = "9"; break;
										case "10": $rank = "10"; break;
										case "11": $rank = "J"; break;
										case "12": $rank = "Q"; break;
										case "0": $rank = "K"; break;
										default: $rank = ""; break;
									}

									$banker_result .= '<div class="playingCards fourColours inText" style="display:inline-block;">';
										$banker_result .= '<div class="card rank-'.$rank.' '.$suit.'">';
											$banker_result .= '<span class="rank">'.$rank.'</span>';
											$banker_result .= '<span class="suit">&'.$suit.';</span>';
										$banker_result .= '</div>';
									$banker_result .= '</div>';
								}
							}
						}
					}
				}
				if(!empty($game_result_array['poker']['player'])){
					$player_result_arary = explode('-',$game_result_array['poker']['player']);
					if(!empty($player_result_arary)){
						$player_result .= $obj->lang->line('all_bet_code_player')." : ";
						foreach($player_result_arary as $player_result_arary_row){
							if($player_result_arary_row > 0){
								$suit = "";
								$rank = "";
								if($player_result_arary_row >= 1 && $player_result_arary_row <= 13){
									$suit = "spades";
								}else if($player_result_arary_row >= 14 && $player_result_arary_row <= 26){
									$suit = "hearts";
								}else if($player_result_arary_row >= 27 && $player_result_arary_row <= 39){
									$suit = "clubs";
								}else if($player_result_arary_row >= 40 && $player_result_arary_row <= 52){
									$suit = "diams";
								}else{
									$suit = "";
								}
								if(!empty($suit)){
									switch($player_result_arary_row % 13)
									{
										case "1": $rank = "A"; break;
										case "2": $rank = "2"; break;
										case "3": $rank = "3"; break;
										case "4": $rank = "4"; break;
										case "5": $rank = "5"; break;
										case "6": $rank = "6"; break;
										case "7": $rank = "7"; break;
										case "8": $rank = "8"; break;
										case "9": $rank = "9"; break;
										case "10": $rank = "10"; break;
										case "11": $rank = "J"; break;
										case "12": $rank = "Q"; break;
										case "0": $rank = "K"; break;
										default: $rank = ""; break;
									}

									$player_result .= '<div class="playingCards fourColours inText" style="display:inline-block;">';
										$player_result .= '<div class="card rank-'.$rank.' '.$suit.'">';
											$player_result .= '<span class="rank">'.$rank.'</span>';
											$player_result .= '<span class="suit">&'.$suit.';</span>';
										$player_result .= '</div>';
									$player_result .= '</div>';
								}
							}
						}
					}
				}

				$result_temp .= $banker_result;
				if(!empty($player_result)){
					if(!empty($result_temp)){
						$result_temp .= "<br/>";
					}
					$result_temp .= $player_result;
				}
			}
			else if($game_real_code == "2"){
				if(!empty($game_result_array['result'])){
					$winning_result_arary = explode(',',$game_result_array['result']);
					if(!empty($winning_result_arary)){
						switch($winning_result_arary[0]){
							case "1": $result_temp .= $obj->lang->line('all_winning_result')." : ".$obj->lang->line('all_result_banker_win')."<br />"; break;
							case "2": $result_temp .= $obj->lang->line('all_winning_result')." : ".$obj->lang->line('all_result_banker_win_banker_pair')."<br />"; break;
							case "3": $result_temp .= $obj->lang->line('all_winning_result')." : ".$obj->lang->line('all_result_banker_win_player_pair')."<br />"; break;
							case "4": $result_temp .= $obj->lang->line('all_winning_result')." : ".$obj->lang->line('all_result_banker_win_banker_pair_player_pair')."<br />"; break;
							case "5": $result_temp .= $obj->lang->line('all_winning_result')." : ".$obj->lang->line('all_result_player_win')."<br />"; break;
							case "6": $result_temp .= $obj->lang->line('all_winning_result')." : ".$obj->lang->line('all_result_player_win_banker_pair')."<br />"; break;
							case "7": $result_temp .= $obj->lang->line('all_winning_result')." : ".$obj->lang->line('all_result_player_win_player_pair')."<br />"; break;
							case "8": $result_temp .= $obj->lang->line('all_winning_result')." : ".$obj->lang->line('all_result_player_win_banker_pair_player_pair')."<br />"; break;
							case "9": $result_temp .= $obj->lang->line('all_winning_result')." : ".$obj->lang->line('all_result_tie_win')."<br />"; break;
							case "10": $result_temp .= $obj->lang->line('all_winning_result')." : ".$obj->lang->line('all_result_tie_win_banker_pair')."<br />"; break;
							case "11": $result_temp .= $obj->lang->line('all_winning_result')." : ".$obj->lang->line('all_result_tie_win_player_pair')."<br />"; break;
							case "12": $result_temp .= $obj->lang->line('all_winning_result')." : ".$obj->lang->line('all_result_tie_win_banker_pair_player_pair')."<br />"; break;
							default: $result_temp .= ""; break;
						}

						switch($winning_result_arary[1]){
							case "-1": $result_temp .= $obj->lang->line('all_winning_card')." : ".$obj->lang->line('all_result_no_card')."<br />"; break;
							case "1": $result_temp .= $obj->lang->line('all_winning_card')." : ".$obj->lang->line('all_bet_code_big')."<br />"; break;
							case "2": $result_temp .= $obj->lang->line('all_winning_card')." : ".$obj->lang->line('all_bet_code_small')."<br />"; break;
							default: $result_temp .= ""; break;
						}

						$result_temp .= $obj->lang->line('all_winning_point')." : ".$winning_result_arary[2]."<br />";
					}
				}

				if(!empty($result_temp)){
					$result_temp .= "<br/>";
				}

				if(!empty($game_result_array['poker']['banker'])){
					$banker_result_arary = explode('-',$game_result_array['poker']['banker']);
					if(!empty($banker_result_arary)){
						$banker_result .= $obj->lang->line('all_bet_code_banker')." : ";
						foreach($banker_result_arary as $banker_result_arary_row){
							if($banker_result_arary_row > 0){
								$suit = "";
								$rank = "";
								if($banker_result_arary_row >= 1 && $banker_result_arary_row <= 13){
									$suit = "spades";
								}else if($banker_result_arary_row >= 14 && $banker_result_arary_row <= 26){
									$suit = "hearts";
								}else if($banker_result_arary_row >= 27 && $banker_result_arary_row <= 39){
									$suit = "clubs";
								}else if($banker_result_arary_row >= 40 && $banker_result_arary_row <= 52){
									$suit = "diams";
								}else{
									$suit = "";
								}
								if(!empty($suit)){
									switch($banker_result_arary_row % 13)
									{
										case "1": $rank = "A"; break;
										case "2": $rank = "2"; break;
										case "3": $rank = "3"; break;
										case "4": $rank = "4"; break;
										case "5": $rank = "5"; break;
										case "6": $rank = "6"; break;
										case "7": $rank = "7"; break;
										case "8": $rank = "8"; break;
										case "9": $rank = "9"; break;
										case "10": $rank = "10"; break;
										case "11": $rank = "J"; break;
										case "12": $rank = "Q"; break;
										case "0": $rank = "K"; break;
										default: $rank = ""; break;
									}

									$banker_result .= '<div class="playingCards fourColours inText" style="display:inline-block;">';
										$banker_result .= '<div class="card rank-'.$rank.' '.$suit.'">';
											$banker_result .= '<span class="rank">'.$rank.'</span>';
											$banker_result .= '<span class="suit">&'.$suit.';</span>';
										$banker_result .= '</div>';
									$banker_result .= '</div>';
								}
							}
						}
					}
				}
				if(!empty($game_result_array['poker']['player'])){
					$player_result_arary = explode('-',$game_result_array['poker']['player']);
					if(!empty($player_result_arary)){
						$player_result .= $obj->lang->line('all_bet_code_player')." : ";
						foreach($player_result_arary as $player_result_arary_row){
							if($player_result_arary_row > 0){
								$suit = "";
								$rank = "";
								if($player_result_arary_row >= 1 && $player_result_arary_row <= 13){
									$suit = "spades";
								}else if($player_result_arary_row >= 14 && $player_result_arary_row <= 26){
									$suit = "hearts";
								}else if($player_result_arary_row >= 27 && $player_result_arary_row <= 39){
									$suit = "clubs";
								}else if($player_result_arary_row >= 40 && $player_result_arary_row <= 52){
									$suit = "diams";
								}else{
									$suit = "";
								}
								if(!empty($suit)){
									switch($player_result_arary_row % 13)
									{
										case "1": $rank = "A"; break;
										case "2": $rank = "2"; break;
										case "3": $rank = "3"; break;
										case "4": $rank = "4"; break;
										case "5": $rank = "5"; break;
										case "6": $rank = "6"; break;
										case "7": $rank = "7"; break;
										case "8": $rank = "8"; break;
										case "9": $rank = "9"; break;
										case "10": $rank = "10"; break;
										case "11": $rank = "J"; break;
										case "12": $rank = "Q"; break;
										case "0": $rank = "K"; break;
										default: $rank = ""; break;
									}

									$player_result .= '<div class="playingCards fourColours inText" style="display:inline-block;">';
										$player_result .= '<div class="card rank-'.$rank.' '.$suit.'">';
											$player_result .= '<span class="rank">'.$rank.'</span>';
											$player_result .= '<span class="suit">&'.$suit.';</span>';
										$player_result .= '</div>';
									$player_result .= '</div>';
								}
							}
						}
					}
				}

				$result_temp .= $banker_result;
				if(!empty($player_result)){
					if(!empty($result_temp)){
						$result_temp .= "<br/>";
					}
					$result_temp .= $player_result;
				}
			}else if($game_real_code == "3"){
				if(!empty($game_result_array['result'])){
					$winning_result_arary = explode(',',$game_result_array['result']);
					if(!empty($winning_result_arary)){
						switch($winning_result_arary[0]){
							case "-1": $result_temp .= $obj->lang->line('all_winning_result')." : ".$obj->lang->line('all_result_no_card')."<br />"; break;
							case "1": $result_temp .= $obj->lang->line('all_winning_result')." : ".$obj->lang->line('all_result_dragon_win')."<br />"; break;
							case "2": $result_temp .= $obj->lang->line('all_winning_result')." : ".$obj->lang->line('all_result_tiger_win')."<br />"; break;
							case "3": $result_temp .= $obj->lang->line('all_winning_result')." : ".$obj->lang->line('all_result_draw_win')."<br />"; break;
							default: $result_temp .= ""; break;
						}

						$result_temp .= $obj->lang->line('all_winning_point')." : ".$winning_result_arary[1]."<br />";
					}
				}

				if(!empty($result_temp)){
					$result_temp .= "<br/>";
				}

				if(!empty($game_result_array['poker']['dragon'])){
					$banker_result_arary = explode('-',$game_result_array['poker']['dragon']);
					if(!empty($banker_result_arary)){
						$banker_result .= $obj->lang->line('all_bet_code_dragon')." : ";
						foreach($banker_result_arary as $banker_result_arary_row){
							if($banker_result_arary_row > 0){
								$suit = "";
								$rank = "";
								if($banker_result_arary_row >= 1 && $banker_result_arary_row <= 13){
									$suit = "spades";
								}else if($banker_result_arary_row >= 14 && $banker_result_arary_row <= 26){
									$suit = "hearts";
								}else if($banker_result_arary_row >= 27 && $banker_result_arary_row <= 39){
									$suit = "clubs";
								}else if($banker_result_arary_row >= 40 && $banker_result_arary_row <= 52){
									$suit = "diams";
								}else{
									$suit = "";
								}
								if(!empty($suit)){
									switch($banker_result_arary_row % 13)
									{
										case "1": $rank = "A"; break;
										case "2": $rank = "2"; break;
										case "3": $rank = "3"; break;
										case "4": $rank = "4"; break;
										case "5": $rank = "5"; break;
										case "6": $rank = "6"; break;
										case "7": $rank = "7"; break;
										case "8": $rank = "8"; break;
										case "9": $rank = "9"; break;
										case "10": $rank = "10"; break;
										case "11": $rank = "J"; break;
										case "12": $rank = "Q"; break;
										case "0": $rank = "K"; break;
										default: $rank = ""; break;
									}

									$banker_result .= '<div class="playingCards fourColours inText" style="display:inline-block;">';
										$banker_result .= '<div class="card rank-'.$rank.' '.$suit.'">';
											$banker_result .= '<span class="rank">'.$rank.'</span>';
											$banker_result .= '<span class="suit">&'.$suit.';</span>';
										$banker_result .= '</div>';
									$banker_result .= '</div>';
								}
							}
						}
					}
				}
				if(!empty($game_result_array['poker']['tiger'])){
					$player_result_arary = explode('-',$game_result_array['poker']['tiger']);
					if(!empty($player_result_arary)){
						$player_result .= $obj->lang->line('all_bet_code_tiger')." : ";
						foreach($player_result_arary as $player_result_arary_row){
							if($player_result_arary_row > 0){
								$suit = "";
								$rank = "";
								if($player_result_arary_row >= 1 && $player_result_arary_row <= 13){
									$suit = "spades";
								}else if($player_result_arary_row >= 14 && $player_result_arary_row <= 26){
									$suit = "hearts";
								}else if($player_result_arary_row >= 27 && $player_result_arary_row <= 39){
									$suit = "clubs";
								}else if($player_result_arary_row >= 40 && $player_result_arary_row <= 52){
									$suit = "diams";
								}else{
									$suit = "";
								}
								if(!empty($suit)){
									switch($player_result_arary_row % 13)
									{
										case "1": $rank = "A"; break;
										case "2": $rank = "2"; break;
										case "3": $rank = "3"; break;
										case "4": $rank = "4"; break;
										case "5": $rank = "5"; break;
										case "6": $rank = "6"; break;
										case "7": $rank = "7"; break;
										case "8": $rank = "8"; break;
										case "9": $rank = "9"; break;
										case "10": $rank = "10"; break;
										case "11": $rank = "J"; break;
										case "12": $rank = "Q"; break;
										case "0": $rank = "K"; break;
										default: $rank = ""; break;
									}

									$player_result .= '<div class="playingCards fourColours inText" style="display:inline-block;">';
										$player_result .= '<div class="card rank-'.$rank.' '.$suit.'">';
											$player_result .= '<span class="rank">'.$rank.'</span>';
											$player_result .= '<span class="suit">&'.$suit.';</span>';
										$player_result .= '</div>';
									$player_result .= '</div>';
								}
							}
						}
					}
				}

				$result_temp .= $banker_result;
				if(!empty($player_result)){
					if(!empty($result_temp)){
						$result_temp .= "<br/>";
					}
					$result_temp .= $player_result;
				}
			}else if($game_real_code == "4"){
				if(isset($game_result_array['result'])){
					$result_temp = $game_result_array['result'];
				}
			}else if($game_real_code == "5"){
				if(isset($game_result_array['result'])){
					$dice_one = substr($game_result_array['result'],0,1);
					$dice_two = substr($game_result_array['result'],1,1);
					$dice_three = substr($game_result_array['result'],2,1);

					$result_temp .= '<span class="dice dice-'.$dice_one.'" title="'.$obj->lang->line('all_bet_code_dice').' : '.$dice_one.'"></span>';
					$result_temp .= '<span class="dice dice-'.$dice_two.'" title="'.$obj->lang->line('all_bet_code_dice').' : '.$dice_two.'"></span>';
					$result_temp .= '<span class="dice dice-'.$dice_three.'" title="'.$obj->lang->line('all_bet_code_dice').' : '.$dice_three.'"></span>';
				}
			}else if($game_real_code == "6"){
				if(isset($game_result_array['result'])){
					$result_temp = $game_result_array['result'];
				}
			}else if($game_real_code == "7"){
				if(!empty($game_result_array['result'])){
					$winning_seperator_result_arary = explode('|',$game_result_array['result']);
					if(!empty($winning_seperator_result_arary)){
						$winning_result_arary = explode(',',$winning_seperator_result_arary[0]);
						if(!empty($winning_result_arary)){
							$result_temp .= $obj->lang->line('all_result_banker_point')." : ".$winning_result_arary[0]."<br />";
							$result_temp .= $obj->lang->line('all_result_player_one_point')." : ".$winning_result_arary[1]."<br />";
							$result_temp .= $obj->lang->line('all_result_player_two_point')." : ".$winning_result_arary[2]."<br />";
							$result_temp .= $obj->lang->line('all_result_player_three_point')." : ".$winning_result_arary[3]."<br />";
						}
						if(!empty($result_temp)){
							$result_temp .= "<br/>";
						}
						$winning_result_arary = explode(',',$winning_seperator_result_arary[1]);
						if($winning_result_arary[0]){
							$result_temp .= $obj->lang->line('all_bet_code_player_one_win')."<br />";
						}else{
							$result_temp .= $obj->lang->line('all_bet_code_player_one_lose')."<br />";
						}
						if($winning_result_arary[1]){
							$result_temp .= $obj->lang->line('all_bet_code_player_two_win')."<br />";
						}else{
							$result_temp .= $obj->lang->line('all_bet_code_player_two_lose')."<br />";
						}
						if($winning_result_arary[2]){
							$result_temp .= $obj->lang->line('all_bet_code_player_three_win')."<br />";
						}else{
							$result_temp .= $obj->lang->line('all_bet_code_player_three_lose')."<br />";
						}

						if(!empty($result_temp)){
							$result_temp .= "<br/>";
						}

						if(!empty($game_result_array['poker']['firstcard'])){
							$result_temp .= $obj->lang->line('all_result_first_card')." : ";

							if($game_result_array['poker']['firstcard'] >= 1 && $game_result_array['poker']['firstcard'] <= 13){
								$suit = "spades";
							}else if($game_result_array['poker']['firstcard'] >= 14 && $game_result_array['poker']['firstcard'] <= 26){
								$suit = "hearts";
							}else if($game_result_array['poker']['firstcard'] >= 27 && $game_result_array['poker']['firstcard'] <= 39){
								$suit = "clubs";
							}else if($game_result_array['poker']['firstcard'] >= 40 && $game_result_array['poker']['firstcard'] <= 52){
								$suit = "diams";
							}else{
								$suit = "";
							}

							if(!empty($suit)){
								switch($game_result_array['poker']['firstcard'] % 13)
								{
									case "1": $rank = "A"; break;
									case "2": $rank = "2"; break;
									case "3": $rank = "3"; break;
									case "4": $rank = "4"; break;
									case "5": $rank = "5"; break;
									case "6": $rank = "6"; break;
									case "7": $rank = "7"; break;
									case "8": $rank = "8"; break;
									case "9": $rank = "9"; break;
									case "10": $rank = "10"; break;
									case "11": $rank = "J"; break;
									case "12": $rank = "Q"; break;
									case "0": $rank = "K"; break;
									default: $rank = ""; break;
								}

								$result_temp .= '<div class="playingCards fourColours inText" style="display:inline-block;">';
									$result_temp .= '<div class="card rank-'.$rank.' '.$suit.'">';
										$result_temp .= '<span class="rank">'.$rank.'</span>';
										$result_temp .= '<span class="suit">&'.$suit.';</span>';
									$result_temp .= '</div>';
								$result_temp .= '</div>';
							}
						}
						
					}
				}

				if(!empty($result_temp)){
					$result_temp .= "<br/>";
				}
				if(!empty($game_result_array['poker']['banker'])){
					$banker_result_arary = explode('-',$game_result_array['poker']['banker']);
					if(!empty($banker_result_arary)){
						$banker_result .= $obj->lang->line('all_bet_code_banker')." : ";
						foreach($banker_result_arary as $banker_result_arary_row){
							if($banker_result_arary_row > 0){
								$suit = "";
								$rank = "";
								if($banker_result_arary_row >= 1 && $banker_result_arary_row <= 13){
									$suit = "spades";
								}else if($banker_result_arary_row >= 14 && $banker_result_arary_row <= 26){
									$suit = "hearts";
								}else if($banker_result_arary_row >= 27 && $banker_result_arary_row <= 39){
									$suit = "clubs";
								}else if($banker_result_arary_row >= 40 && $banker_result_arary_row <= 52){
									$suit = "diams";
								}else{
									$suit = "";
								}
								if(!empty($suit)){
									switch($banker_result_arary_row % 13)
									{
										case "1": $rank = "A"; break;
										case "2": $rank = "2"; break;
										case "3": $rank = "3"; break;
										case "4": $rank = "4"; break;
										case "5": $rank = "5"; break;
										case "6": $rank = "6"; break;
										case "7": $rank = "7"; break;
										case "8": $rank = "8"; break;
										case "9": $rank = "9"; break;
										case "10": $rank = "10"; break;
										case "11": $rank = "J"; break;
										case "12": $rank = "Q"; break;
										case "0": $rank = "K"; break;
										default: $rank = ""; break;
									}

									$banker_result .= '<div class="playingCards fourColours inText" style="display:inline-block;">';
										$banker_result .= '<div class="card rank-'.$rank.' '.$suit.'">';
											$banker_result .= '<span class="rank">'.$rank.'</span>';
											$banker_result .= '<span class="suit">&'.$suit.';</span>';
										$banker_result .= '</div>';
									$banker_result .= '</div>';
								}
							}
						}
					}
				}

				if(!empty($game_result_array['poker']['player1'])){
					$player_result_arary = explode('-',$game_result_array['poker']['player1']);
					if(!empty($player_result_arary)){
						$player_result .= $obj->lang->line('all_bet_code_player_one')." : ";
						foreach($player_result_arary as $player_result_arary_row){
							if($player_result_arary_row > 0){
								$suit = "";
								$rank = "";
								if($player_result_arary_row >= 1 && $player_result_arary_row <= 13){
									$suit = "spades";
								}else if($player_result_arary_row >= 14 && $player_result_arary_row <= 26){
									$suit = "hearts";
								}else if($player_result_arary_row >= 27 && $player_result_arary_row <= 39){
									$suit = "clubs";
								}else if($player_result_arary_row >= 40 && $player_result_arary_row <= 52){
									$suit = "diams";
								}else{
									$suit = "";
								}
								if(!empty($suit)){
									switch($player_result_arary_row % 13)
									{
										case "1": $rank = "A"; break;
										case "2": $rank = "2"; break;
										case "3": $rank = "3"; break;
										case "4": $rank = "4"; break;
										case "5": $rank = "5"; break;
										case "6": $rank = "6"; break;
										case "7": $rank = "7"; break;
										case "8": $rank = "8"; break;
										case "9": $rank = "9"; break;
										case "10": $rank = "10"; break;
										case "11": $rank = "J"; break;
										case "12": $rank = "Q"; break;
										case "0": $rank = "K"; break;
										default: $rank = ""; break;
									}

									$player_result .= '<div class="playingCards fourColours inText" style="display:inline-block;">';
										$player_result .= '<div class="card rank-'.$rank.' '.$suit.'">';
											$player_result .= '<span class="rank">'.$rank.'</span>';
											$player_result .= '<span class="suit">&'.$suit.';</span>';
										$player_result .= '</div>';
									$player_result .= '</div>';
								}
							}
						}
					}
				}

				if(!empty($game_result_array['poker']['player2'])){
					$player_result_arary = explode('-',$game_result_array['poker']['player2']);
					if(!empty($player_result_arary)){
						$player2_result .= $obj->lang->line('all_bet_code_player_two')." : ";
						foreach($player_result_arary as $player_result_arary_row){
							if($player_result_arary_row > 0){
								$suit = "";
								$rank = "";
								if($player_result_arary_row >= 1 && $player_result_arary_row <= 13){
									$suit = "spades";
								}else if($player_result_arary_row >= 14 && $player_result_arary_row <= 26){
									$suit = "hearts";
								}else if($player_result_arary_row >= 27 && $player_result_arary_row <= 39){
									$suit = "clubs";
								}else if($player_result_arary_row >= 40 && $player_result_arary_row <= 52){
									$suit = "diams";
								}else{
									$suit = "";
								}
								if(!empty($suit)){
									switch($player_result_arary_row % 13)
									{
										case "1": $rank = "A"; break;
										case "2": $rank = "2"; break;
										case "3": $rank = "3"; break;
										case "4": $rank = "4"; break;
										case "5": $rank = "5"; break;
										case "6": $rank = "6"; break;
										case "7": $rank = "7"; break;
										case "8": $rank = "8"; break;
										case "9": $rank = "9"; break;
										case "10": $rank = "10"; break;
										case "11": $rank = "J"; break;
										case "12": $rank = "Q"; break;
										case "0": $rank = "K"; break;
										default: $rank = ""; break;
									}

									$player2_result .= '<div class="playingCards fourColours inText" style="display:inline-block;">';
										$player2_result .= '<div class="card rank-'.$rank.' '.$suit.'">';
											$player2_result .= '<span class="rank">'.$rank.'</span>';
											$player2_result .= '<span class="suit">&'.$suit.';</span>';
										$player2_result .= '</div>';
									$player2_result .= '</div>';
								}
							}
						}
					}
				}

				if(!empty($game_result_array['poker']['player3'])){
					$player_result_arary = explode('-',$game_result_array['poker']['player3']);
					if(!empty($player_result_arary)){
						$player3_result .= $obj->lang->line('all_bet_code_player_three')." : ";
						foreach($player_result_arary as $player_result_arary_row){
							if($player_result_arary_row > 0){
								$suit = "";
								$rank = "";
								if($player_result_arary_row >= 1 && $player_result_arary_row <= 13){
									$suit = "spades";
								}else if($player_result_arary_row >= 14 && $player_result_arary_row <= 26){
									$suit = "hearts";
								}else if($player_result_arary_row >= 27 && $player_result_arary_row <= 39){
									$suit = "clubs";
								}else if($player_result_arary_row >= 40 && $player_result_arary_row <= 52){
									$suit = "diams";
								}else{
									$suit = "";
								}
								if(!empty($suit)){
									switch($player_result_arary_row % 13)
									{
										case "1": $rank = "A"; break;
										case "2": $rank = "2"; break;
										case "3": $rank = "3"; break;
										case "4": $rank = "4"; break;
										case "5": $rank = "5"; break;
										case "6": $rank = "6"; break;
										case "7": $rank = "7"; break;
										case "8": $rank = "8"; break;
										case "9": $rank = "9"; break;
										case "10": $rank = "10"; break;
										case "11": $rank = "J"; break;
										case "12": $rank = "Q"; break;
										case "0": $rank = "K"; break;
										default: $rank = ""; break;
									}

									$player3_result .= '<div class="playingCards fourColours inText" style="display:inline-block;">';
										$player3_result .= '<div class="card rank-'.$rank.' '.$suit.'">';
											$player3_result .= '<span class="rank">'.$rank.'</span>';
											$player3_result .= '<span class="suit">&'.$suit.';</span>';
										$player3_result .= '</div>';
									$player3_result .= '</div>';
								}
							}
						}
					}
				}

				$result_temp .= $banker_result;
				if(!empty($player_result)){
					if(!empty($result_temp)){
						$result_temp .= "<br/>";
					}
					$result_temp .= $player_result;
				}
				if(!empty($player2_result)){
					if(!empty($result_temp)){
						$result_temp .= "<br/>";
					}
					$result_temp .= $player2_result;
				}
				if(!empty($player3_result)){
					if(!empty($result_temp)){
						$result_temp .= "<br/>";
					}
					$result_temp .= $player3_result;
				}
			}else if($game_real_code == "8"){
				if(!empty($game_result_array['result'])){
					$winning_result_arary = explode(',',$game_result_array['result']);
					if(!empty($winning_result_arary)){
						switch($winning_result_arary[0]){
							case "1": $result_temp .= $obj->lang->line('all_winning_result')." : ".$obj->lang->line('all_result_banker_win')."<br />"; break;
							case "2": $result_temp .= $obj->lang->line('all_winning_result')." : ".$obj->lang->line('all_result_banker_win_banker_pair')."<br />"; break;
							case "3": $result_temp .= $obj->lang->line('all_winning_result')." : ".$obj->lang->line('all_result_banker_win_player_pair')."<br />"; break;
							case "4": $result_temp .= $obj->lang->line('all_winning_result')." : ".$obj->lang->line('all_result_banker_win_banker_pair_player_pair')."<br />"; break;
							case "5": $result_temp .= $obj->lang->line('all_winning_result')." : ".$obj->lang->line('all_result_player_win')."<br />"; break;
							case "6": $result_temp .= $obj->lang->line('all_winning_result')." : ".$obj->lang->line('all_result_player_win_banker_pair')."<br />"; break;
							case "7": $result_temp .= $obj->lang->line('all_winning_result')." : ".$obj->lang->line('all_result_player_win_player_pair')."<br />"; break;
							case "8": $result_temp .= $obj->lang->line('all_winning_result')." : ".$obj->lang->line('all_result_player_win_banker_pair_player_pair')."<br />"; break;
							case "9": $result_temp .= $obj->lang->line('all_winning_result')." : ".$obj->lang->line('all_result_tie_win')."<br />"; break;
							case "10": $result_temp .= $obj->lang->line('all_winning_result')." : ".$obj->lang->line('all_result_tie_win_banker_pair')."<br />"; break;
							case "11": $result_temp .= $obj->lang->line('all_winning_result')." : ".$obj->lang->line('all_result_tie_win_player_pair')."<br />"; break;
							case "12": $result_temp .= $obj->lang->line('all_winning_result')." : ".$obj->lang->line('all_result_tie_win_banker_pair_player_pair')."<br />"; break;
							default: $result_temp .= ""; break;
						}

						switch($winning_result_arary[1]){
							case "-1": $result_temp .= $obj->lang->line('all_winning_card')." : ".$obj->lang->line('all_result_no_card')."<br />"; break;
							case "1": $result_temp .= $obj->lang->line('all_winning_card')." : ".$obj->lang->line('all_bet_code_big')."<br />"; break;
							case "2": $result_temp .= $obj->lang->line('all_winning_card')." : ".$obj->lang->line('all_bet_code_small')."<br />"; break;
							default: $result_temp .= ""; break;
						}

						$result_temp .= $obj->lang->line('all_winning_point')." : ".$winning_result_arary[2]."<br />";
					}
				}

				if(!empty($result_temp)){
					$result_temp .= "<br/>";
				}

				if(!empty($game_result_array['poker']['banker'])){
					$banker_result_arary = explode('-',$game_result_array['poker']['banker']);
					if(!empty($banker_result_arary)){
						$banker_result .= $obj->lang->line('all_bet_code_banker')." : ";
						foreach($banker_result_arary as $banker_result_arary_row){
							if($banker_result_arary_row > 0){
								$suit = "";
								$rank = "";
								if($banker_result_arary_row >= 1 && $banker_result_arary_row <= 13){
									$suit = "spades";
								}else if($banker_result_arary_row >= 14 && $banker_result_arary_row <= 26){
									$suit = "hearts";
								}else if($banker_result_arary_row >= 27 && $banker_result_arary_row <= 39){
									$suit = "clubs";
								}else if($banker_result_arary_row >= 40 && $banker_result_arary_row <= 52){
									$suit = "diams";
								}else{
									$suit = "";
								}
								if(!empty($suit)){
									switch($banker_result_arary_row % 13)
									{
										case "1": $rank = "A"; break;
										case "2": $rank = "2"; break;
										case "3": $rank = "3"; break;
										case "4": $rank = "4"; break;
										case "5": $rank = "5"; break;
										case "6": $rank = "6"; break;
										case "7": $rank = "7"; break;
										case "8": $rank = "8"; break;
										case "9": $rank = "9"; break;
										case "10": $rank = "10"; break;
										case "11": $rank = "J"; break;
										case "12": $rank = "Q"; break;
										case "0": $rank = "K"; break;
										default: $rank = ""; break;
									}

									$banker_result .= '<div class="playingCards fourColours inText" style="display:inline-block;">';
										$banker_result .= '<div class="card rank-'.$rank.' '.$suit.'">';
											$banker_result .= '<span class="rank">'.$rank.'</span>';
											$banker_result .= '<span class="suit">&'.$suit.';</span>';
										$banker_result .= '</div>';
									$banker_result .= '</div>';
								}
							}
						}
					}
				}
				if(!empty($game_result_array['poker']['player'])){
					$player_result_arary = explode('-',$game_result_array['poker']['player']);
					if(!empty($player_result_arary)){
						$player_result .= $obj->lang->line('all_bet_code_player')." : ";
						foreach($player_result_arary as $player_result_arary_row){
							if($player_result_arary_row > 0){
								$suit = "";
								$rank = "";
								if($player_result_arary_row >= 1 && $player_result_arary_row <= 13){
									$suit = "spades";
								}else if($player_result_arary_row >= 14 && $player_result_arary_row <= 26){
									$suit = "hearts";
								}else if($player_result_arary_row >= 27 && $player_result_arary_row <= 39){
									$suit = "clubs";
								}else if($player_result_arary_row >= 40 && $player_result_arary_row <= 52){
									$suit = "diams";
								}else{
									$suit = "";
								}
								if(!empty($suit)){
									switch($player_result_arary_row % 13)
									{
										case "1": $rank = "A"; break;
										case "2": $rank = "2"; break;
										case "3": $rank = "3"; break;
										case "4": $rank = "4"; break;
										case "5": $rank = "5"; break;
										case "6": $rank = "6"; break;
										case "7": $rank = "7"; break;
										case "8": $rank = "8"; break;
										case "9": $rank = "9"; break;
										case "10": $rank = "10"; break;
										case "11": $rank = "J"; break;
										case "12": $rank = "Q"; break;
										case "0": $rank = "K"; break;
										default: $rank = ""; break;
									}

									$player_result .= '<div class="playingCards fourColours inText" style="display:inline-block;">';
										$player_result .= '<div class="card rank-'.$rank.' '.$suit.'">';
											$player_result .= '<span class="rank">'.$rank.'</span>';
											$player_result .= '<span class="suit">&'.$suit.';</span>';
										$player_result .= '</div>';
									$player_result .= '</div>';
								}
							}
						}
					}
				}

				$result_temp .= $banker_result;
				if(!empty($player_result)){
					if(!empty($result_temp)){
						$result_temp .= "<br/>";
					}
					$result_temp .= $player_result;
				}
			}else if($game_real_code == "11"){
				if(!empty($game_result_array['result'])){
					$winning_result_arary = explode(',',$game_result_array['result']);
					if(!empty($winning_result_arary)){
						switch($winning_result_arary[0]){
							case "1": $result_temp .= $obj->lang->line('all_winning_result')." : ".$obj->lang->line('all_result_black_win')."<br />"; break;
							case "2": $result_temp .= $obj->lang->line('all_winning_result')." : ".$obj->lang->line('all_result_red_win')."<br />"; break;
							case "3": $result_temp .= $obj->lang->line('all_winning_result')." : ".$obj->lang->line('all_bet_code_tie')."<br />"; break;
							default: $result_temp .= ""; break;
						}

						switch($winning_result_arary[1]){
							case "0": $result_temp .= $obj->lang->line('all_bet_code_black')." : ".$obj->lang->line('all_result_three_face_tie')."<br />"; break;
							case "1": $result_temp .= $obj->lang->line('all_bet_code_black')." : ".$obj->lang->line('all_result_three_face_high_card')."<br />"; break;
							case "2": $result_temp .= $obj->lang->line('all_bet_code_black')." : ".$obj->lang->line('all_result_three_face_pair')."<br />"; break;
							case "3": $result_temp .= $obj->lang->line('all_bet_code_black')." : ".$obj->lang->line('all_result_three_face_straight')."<br />"; break;
							case "4": $result_temp .= $obj->lang->line('all_bet_code_black')." : ".$obj->lang->line('all_result_three_face_flush')."<br />"; break;
							case "5": $result_temp .= $obj->lang->line('all_bet_code_black')." : ".$obj->lang->line('all_result_three_face_straight_flush')."<br />"; break;
							case "6": $result_temp .= $obj->lang->line('all_bet_code_black')." : ".$obj->lang->line('all_result_three_face_leopard')."<br />"; break;
							case "7": $result_temp .= $obj->lang->line('all_bet_code_black')." : ".$obj->lang->line('all_result_three_face_leopard_killer')."<br />"; break;
							default: $result_temp .= ""; break;
						}

						switch($winning_result_arary[2]){
							case "0": $result_temp .= $obj->lang->line('all_bet_code_red')." : ".$obj->lang->line('all_result_three_face_tie')."<br />"; break;
							case "1": $result_temp .= $obj->lang->line('all_bet_code_red')." : ".$obj->lang->line('all_result_three_face_high_card')."<br />"; break;
							case "2": $result_temp .= $obj->lang->line('all_bet_code_red')." : ".$obj->lang->line('all_result_three_face_pair')."<br />"; break;
							case "3": $result_temp .= $obj->lang->line('all_bet_code_red')." : ".$obj->lang->line('all_result_three_face_straight')."<br />"; break;
							case "4": $result_temp .= $obj->lang->line('all_bet_code_red')." : ".$obj->lang->line('all_result_three_face_flush')."<br />"; break;
							case "5": $result_temp .= $obj->lang->line('all_bet_code_red')." : ".$obj->lang->line('all_result_three_face_straight_flush')."<br />"; break;
							case "6": $result_temp .= $obj->lang->line('all_bet_code_red')." : ".$obj->lang->line('all_result_three_face_leopard')."<br />"; break;
							case "7": $result_temp .= $obj->lang->line('all_bet_code_red')." : ".$obj->lang->line('all_result_three_face_leopard_killer')."<br />"; break;
							default: $result_temp .= ""; break;
						}

						switch($winning_result_arary[3]){
							case "2": $result_temp .= $obj->lang->line('all_result_black_max')." : 2<br />"; break;
							case "3": $result_temp .= $obj->lang->line('all_result_black_max')." : 3<br />"; break;
							case "4": $result_temp .= $obj->lang->line('all_result_black_max')." : 4<br />"; break;
							case "5": $result_temp .= $obj->lang->line('all_result_black_max')." : 5<br />"; break;
							case "6": $result_temp .= $obj->lang->line('all_result_black_max')." : 6<br />"; break;
							case "7": $result_temp .= $obj->lang->line('all_result_black_max')." : 7<br />"; break;
							case "8": $result_temp .= $obj->lang->line('all_result_black_max')." : 8<br />"; break;
							case "9": $result_temp .= $obj->lang->line('all_result_black_max')." : 9<br />"; break;
							case "10": $result_temp .= $obj->lang->line('all_result_black_max')." : 10<br />"; break;
							case "11": $result_temp .= $obj->lang->line('all_result_black_max')." : J<br />"; break;
							case "12": $result_temp .= $obj->lang->line('all_result_black_max')." : Q<br />"; break;
							case "13": $result_temp .= $obj->lang->line('all_result_black_max')." : K<br />"; break;
							case "14": $result_temp .= $obj->lang->line('all_result_black_max')." : A<br />"; break;
							default: $result_temp .= ""; break;
						}

						switch($winning_result_arary[4]){
							case "2": $result_temp .= $obj->lang->line('all_result_red_max')." : 2<br />"; break;
							case "3": $result_temp .= $obj->lang->line('all_result_red_max')." : 3<br />"; break;
							case "4": $result_temp .= $obj->lang->line('all_result_red_max')." : 4<br />"; break;
							case "5": $result_temp .= $obj->lang->line('all_result_red_max')." : 5<br />"; break;
							case "6": $result_temp .= $obj->lang->line('all_result_red_max')." : 6<br />"; break;
							case "7": $result_temp .= $obj->lang->line('all_result_red_max')." : 7<br />"; break;
							case "8": $result_temp .= $obj->lang->line('all_result_red_max')." : 8<br />"; break;
							case "9": $result_temp .= $obj->lang->line('all_result_red_max')." : 9<br />"; break;
							case "10": $result_temp .= $obj->lang->line('all_result_red_max')." : 10<br />"; break;
							case "11": $result_temp .= $obj->lang->line('all_result_red_max')." : J<br />"; break;
							case "12": $result_temp .= $obj->lang->line('all_result_red_max')." : Q<br />"; break;
							case "13": $result_temp .= $obj->lang->line('all_result_red_max')." : K<br />"; break;
							case "14": $result_temp .= $obj->lang->line('all_result_red_max')." : A<br />"; break;
							default: $result_temp .= ""; break;
						}


						switch($winning_result_arary[5]){
							case "0": $result_temp .= $obj->lang->line('all_winning_result')." : ".$obj->lang->line('all_result_three_face_tie')."<br />"; break;
							case "1": $result_temp .= $obj->lang->line('all_winning_result')." : ".$obj->lang->line('all_result_three_face_high_card')."<br />"; break;
							case "2": $result_temp .= $obj->lang->line('all_winning_result')." : ".$obj->lang->line('all_result_three_face_pair')."<br />"; break;
							case "3": $result_temp .= $obj->lang->line('all_winning_result')." : ".$obj->lang->line('all_result_three_face_straight')."<br />"; break;
							case "4": $result_temp .= $obj->lang->line('all_winning_result')." : ".$obj->lang->line('all_result_three_face_flush')."<br />"; break;
							case "5": $result_temp .= $obj->lang->line('all_winning_result')." : ".$obj->lang->line('all_result_three_face_straight_flush')."<br />"; break;
							case "6": $result_temp .= $obj->lang->line('all_winning_result')." : ".$obj->lang->line('all_result_three_face_leopard')."<br />"; break;
							case "7": $result_temp .= $obj->lang->line('all_winning_result')." : ".$obj->lang->line('all_result_three_face_leopard_killer')."<br />"; break;
							default: $result_temp .= ""; break;
						}
					}
				}

				if(!empty($result_temp)){
					$result_temp .= "<br/>";
				}

				if(!empty($game_result_array['poker']['black'])){
					$banker_result_arary = explode('-',$game_result_array['poker']['black']);
					if(!empty($banker_result_arary)){
						$banker_result .= $obj->lang->line('all_bet_code_black')." : ";
						foreach($banker_result_arary as $banker_result_arary_row){
							if($banker_result_arary_row > 0){
								$suit = "";
								$rank = "";
								if($banker_result_arary_row >= 1 && $banker_result_arary_row <= 13){
									$suit = "spades";
								}else if($banker_result_arary_row >= 14 && $banker_result_arary_row <= 26){
									$suit = "hearts";
								}else if($banker_result_arary_row >= 27 && $banker_result_arary_row <= 39){
									$suit = "clubs";
								}else if($banker_result_arary_row >= 40 && $banker_result_arary_row <= 52){
									$suit = "diams";
								}else{
									$suit = "";
								}
								if(!empty($suit)){
									switch($banker_result_arary_row % 13)
									{
										case "1": $rank = "A"; break;
										case "2": $rank = "2"; break;
										case "3": $rank = "3"; break;
										case "4": $rank = "4"; break;
										case "5": $rank = "5"; break;
										case "6": $rank = "6"; break;
										case "7": $rank = "7"; break;
										case "8": $rank = "8"; break;
										case "9": $rank = "9"; break;
										case "10": $rank = "10"; break;
										case "11": $rank = "J"; break;
										case "12": $rank = "Q"; break;
										case "0": $rank = "K"; break;
										default: $rank = ""; break;
									}

									$banker_result .= '<div class="playingCards fourColours inText" style="display:inline-block;">';
										$banker_result .= '<div class="card rank-'.$rank.' '.$suit.'">';
											$banker_result .= '<span class="rank">'.$rank.'</span>';
											$banker_result .= '<span class="suit">&'.$suit.';</span>';
										$banker_result .= '</div>';
									$banker_result .= '</div>';
								}
							}
						}
					}
				}
				if(!empty($game_result_array['poker']['red'])){
					$player_result_arary = explode('-',$game_result_array['poker']['red']);
					if(!empty($player_result_arary)){
						$player_result .= $obj->lang->line('all_bet_code_red')." : ";
						foreach($player_result_arary as $player_result_arary_row){
							if($player_result_arary_row > 0){
								$suit = "";
								$rank = "";
								if($player_result_arary_row >= 1 && $player_result_arary_row <= 13){
									$suit = "spades";
								}else if($player_result_arary_row >= 14 && $player_result_arary_row <= 26){
									$suit = "hearts";
								}else if($player_result_arary_row >= 27 && $player_result_arary_row <= 39){
									$suit = "clubs";
								}else if($player_result_arary_row >= 40 && $player_result_arary_row <= 52){
									$suit = "diams";
								}else{
									$suit = "";
								}
								if(!empty($suit)){
									switch($player_result_arary_row % 13)
									{
										case "1": $rank = "A"; break;
										case "2": $rank = "2"; break;
										case "3": $rank = "3"; break;
										case "4": $rank = "4"; break;
										case "5": $rank = "5"; break;
										case "6": $rank = "6"; break;
										case "7": $rank = "7"; break;
										case "8": $rank = "8"; break;
										case "9": $rank = "9"; break;
										case "10": $rank = "10"; break;
										case "11": $rank = "J"; break;
										case "12": $rank = "Q"; break;
										case "0": $rank = "K"; break;
										default: $rank = ""; break;
									}

									$player_result .= '<div class="playingCards fourColours inText" style="display:inline-block;">';
										$player_result .= '<div class="card rank-'.$rank.' '.$suit.'">';
											$player_result .= '<span class="rank">'.$rank.'</span>';
											$player_result .= '<span class="suit">&'.$suit.';</span>';
										$player_result .= '</div>';
									$player_result .= '</div>';
								}
							}
						}
					}
				}

				$result_temp .= $banker_result;
				if(!empty($player_result)){
					if(!empty($result_temp)){
						$result_temp .= "<br/>";
					}
					$result_temp .= $player_result;
				}
			}else if($game_real_code == "12"){
				if(isset($game_result_array['result'])){
					$result_temp = $game_result_array['result'];
				}
			}else if($game_real_code == "14"){
				if(isset($game_result_array['result'])){
					switch($game_result_array['result'])
					{
						case "0": $result_temp .= $obj->lang->line('all_bet_code_four_white')." : ".$bet_code_row_val."<br/>"; break;
						case "1": $result_temp .= $obj->lang->line('all_bet_code_three_white_one_red')." : ".$bet_code_row_val."<br/>"; break;
						case "2": $result_temp .= $obj->lang->line('all_bet_code_two_red_two_white')." : ".$bet_code_row_val."<br/>"; break;
						case "3": $result_temp .= $obj->lang->line('all_bet_code_three_red_one_white')." : ".$bet_code_row_val."<br/>"; break;
						case "4": $result_temp .= $obj->lang->line('all_bet_code_four_red')." : ".$bet_code_row_val."<br/>"; break;
						case "single": $result_temp .= $obj->lang->line('all_bet_code_odd')." : ".$bet_code_row_val."<br/>"; break;
						case "double": $result_temp .= $obj->lang->line('all_bet_code_even')." : ".$bet_code_row_val."<br/>"; break;
						default: $result_temp .= ""; break;
					}
				}
			}else if($game_real_code == "15"){
				$result_temp .= "";
			}else if($game_real_code == "16"){
				if(!empty($game_result_array['result'])){
					$winning_seperator_result_arary = explode('|',$game_result_array['result']);
					if(!empty($winning_seperator_result_arary)){
						$winning_result_arary = explode(',',$winning_seperator_result_arary[0]);
						if(!empty($winning_result_arary)){
							switch($winning_result_arary[0])
							{
								case "1P1": $result_temp .= $obj->lang->line('all_result_banker_point')." : ".$obj->lang->line('all_result_single_face')."<br />"; break;
								case "3P0": $result_temp .= $obj->lang->line('all_result_banker_point')." : ".$obj->lang->line('all_result_three_face')."<br />"; break;
								default: $result_temp .= $obj->lang->line('all_result_banker_point')." : ".$winning_result_arary[0]."<br />"; break;
							}

							switch($winning_result_arary[1])
							{
								case "1P1": $result_temp .= $obj->lang->line('all_result_player_one_point')." : ".$obj->lang->line('all_result_single_face')."<br />"; break;
								case "3P0": $result_temp .= $obj->lang->line('all_result_player_one_point')." : ".$obj->lang->line('all_result_three_face')."<br />"; break;
								default: $result_temp .= $obj->lang->line('all_result_player_one_point')." : ".$winning_result_arary[1]."<br />"; break;
							}

							switch($winning_result_arary[2])
							{
								case "1P1": $result_temp .= $obj->lang->line('all_result_player_two_point')." : ".$obj->lang->line('all_result_single_face')."<br />"; break;
								case "3P0": $result_temp .= $obj->lang->line('all_result_player_two_point')." : ".$obj->lang->line('all_result_three_face')."<br />"; break;
								default: $result_temp .= $obj->lang->line('all_result_player_two_point')." : ".$winning_result_arary[2]."<br />"; break;
							}

							switch($winning_result_arary[3])
							{
								case "1P1": $result_temp .= $obj->lang->line('all_result_player_three_point')." : ".$obj->lang->line('all_result_single_face')."<br />"; break;
								case "3P0": $result_temp .= $obj->lang->line('all_result_player_three_point')." : ".$obj->lang->line('all_result_three_face')."<br />"; break;
								default: $result_temp .= $obj->lang->line('all_result_player_three_point')." : ".$winning_result_arary[3]."<br />"; break;
							}
						}
						if(!empty($result_temp)){
							$result_temp .= "<br/>";
						}
						$winning_result_arary = explode(',',$winning_seperator_result_arary[1]);
						if($winning_result_arary[0]){
							$result_temp .= $obj->lang->line('all_bet_code_player_one_win')."<br />";
						}else{
							$result_temp .= $obj->lang->line('all_bet_code_player_one_lose')."<br />";
						}
						if($winning_result_arary[1]){
							$result_temp .= $obj->lang->line('all_bet_code_player_two_win')."<br />";
						}else{
							$result_temp .= $obj->lang->line('all_bet_code_player_two_lose')."<br />";
						}
						if($winning_result_arary[2]){
							$result_temp .= $obj->lang->line('all_bet_code_player_three_win')."<br />";
						}else{
							$result_temp .= $obj->lang->line('all_bet_code_player_three_lose')."<br />";
						}

						if(!empty($result_temp)){
							$result_temp .= "<br/>";
						}

						if(!empty($game_result_array['poker']['firstcard'])){
							$result_temp .= $obj->lang->line('all_result_first_card')." : ";

							if($game_result_array['poker']['firstcard'] >= 1 && $game_result_array['poker']['firstcard'] <= 13){
								$suit = "spades";
							}else if($game_result_array['poker']['firstcard'] >= 14 && $game_result_array['poker']['firstcard'] <= 26){
								$suit = "hearts";
							}else if($game_result_array['poker']['firstcard'] >= 27 && $game_result_array['poker']['firstcard'] <= 39){
								$suit = "clubs";
							}else if($game_result_array['poker']['firstcard'] >= 40 && $game_result_array['poker']['firstcard'] <= 52){
								$suit = "diams";
							}else{
								$suit = "";
							}

							if(!empty($suit)){
								switch($game_result_array['poker']['firstcard'] % 13)
								{
									case "1": $rank = "A"; break;
									case "2": $rank = "2"; break;
									case "3": $rank = "3"; break;
									case "4": $rank = "4"; break;
									case "5": $rank = "5"; break;
									case "6": $rank = "6"; break;
									case "7": $rank = "7"; break;
									case "8": $rank = "8"; break;
									case "9": $rank = "9"; break;
									case "10": $rank = "10"; break;
									case "11": $rank = "J"; break;
									case "12": $rank = "Q"; break;
									case "0": $rank = "K"; break;
									default: $rank = ""; break;
								}

								$result_temp .= '<div class="playingCards fourColours inText" style="display:inline-block;">';
									$result_temp .= '<div class="card rank-'.$rank.' '.$suit.'">';
										$result_temp .= '<span class="rank">'.$rank.'</span>';
										$result_temp .= '<span class="suit">&'.$suit.';</span>';
									$result_temp .= '</div>';
								$result_temp .= '</div>';
							}
						}
						
					}
				}

				if(!empty($result_temp)){
					$result_temp .= "<br/>";
				}
				if(!empty($game_result_array['poker']['banker'])){
					$banker_result_arary = explode('-',$game_result_array['poker']['banker']);
					if(!empty($banker_result_arary)){
						$banker_result .= $obj->lang->line('all_bet_code_banker')." : ";
						foreach($banker_result_arary as $banker_result_arary_row){
							if($banker_result_arary_row > 0){
								$suit = "";
								$rank = "";
								if($banker_result_arary_row >= 1 && $banker_result_arary_row <= 13){
									$suit = "spades";
								}else if($banker_result_arary_row >= 14 && $banker_result_arary_row <= 26){
									$suit = "hearts";
								}else if($banker_result_arary_row >= 27 && $banker_result_arary_row <= 39){
									$suit = "clubs";
								}else if($banker_result_arary_row >= 40 && $banker_result_arary_row <= 52){
									$suit = "diams";
								}else{
									$suit = "";
								}
								if(!empty($suit)){
									switch($banker_result_arary_row % 13)
									{
										case "1": $rank = "A"; break;
										case "2": $rank = "2"; break;
										case "3": $rank = "3"; break;
										case "4": $rank = "4"; break;
										case "5": $rank = "5"; break;
										case "6": $rank = "6"; break;
										case "7": $rank = "7"; break;
										case "8": $rank = "8"; break;
										case "9": $rank = "9"; break;
										case "10": $rank = "10"; break;
										case "11": $rank = "J"; break;
										case "12": $rank = "Q"; break;
										case "0": $rank = "K"; break;
										default: $rank = ""; break;
									}

									$banker_result .= '<div class="playingCards fourColours inText" style="display:inline-block;">';
										$banker_result .= '<div class="card rank-'.$rank.' '.$suit.'">';
											$banker_result .= '<span class="rank">'.$rank.'</span>';
											$banker_result .= '<span class="suit">&'.$suit.';</span>';
										$banker_result .= '</div>';
									$banker_result .= '</div>';
								}
							}
						}
					}
				}

				if(!empty($game_result_array['poker']['player1'])){
					$player_result_arary = explode('-',$game_result_array['poker']['player1']);
					if(!empty($player_result_arary)){
						$player_result .= $obj->lang->line('all_bet_code_player_one')." : ";
						foreach($player_result_arary as $player_result_arary_row){
							if($player_result_arary_row > 0){
								$suit = "";
								$rank = "";
								if($player_result_arary_row >= 1 && $player_result_arary_row <= 13){
									$suit = "spades";
								}else if($player_result_arary_row >= 14 && $player_result_arary_row <= 26){
									$suit = "hearts";
								}else if($player_result_arary_row >= 27 && $player_result_arary_row <= 39){
									$suit = "clubs";
								}else if($player_result_arary_row >= 40 && $player_result_arary_row <= 52){
									$suit = "diams";
								}else{
									$suit = "";
								}
								if(!empty($suit)){
									switch($player_result_arary_row % 13)
									{
										case "1": $rank = "A"; break;
										case "2": $rank = "2"; break;
										case "3": $rank = "3"; break;
										case "4": $rank = "4"; break;
										case "5": $rank = "5"; break;
										case "6": $rank = "6"; break;
										case "7": $rank = "7"; break;
										case "8": $rank = "8"; break;
										case "9": $rank = "9"; break;
										case "10": $rank = "10"; break;
										case "11": $rank = "J"; break;
										case "12": $rank = "Q"; break;
										case "0": $rank = "K"; break;
										default: $rank = ""; break;
									}

									$player_result .= '<div class="playingCards fourColours inText" style="display:inline-block;">';
										$player_result .= '<div class="card rank-'.$rank.' '.$suit.'">';
											$player_result .= '<span class="rank">'.$rank.'</span>';
											$player_result .= '<span class="suit">&'.$suit.';</span>';
										$player_result .= '</div>';
									$player_result .= '</div>';
								}
							}
						}
					}
				}

				if(!empty($game_result_array['poker']['player2'])){
					$player_result_arary = explode('-',$game_result_array['poker']['player2']);
					if(!empty($player_result_arary)){
						$player2_result .= $obj->lang->line('all_bet_code_player_two')." : ";
						foreach($player_result_arary as $player_result_arary_row){
							if($player_result_arary_row > 0){
								$suit = "";
								$rank = "";
								if($player_result_arary_row >= 1 && $player_result_arary_row <= 13){
									$suit = "spades";
								}else if($player_result_arary_row >= 14 && $player_result_arary_row <= 26){
									$suit = "hearts";
								}else if($player_result_arary_row >= 27 && $player_result_arary_row <= 39){
									$suit = "clubs";
								}else if($player_result_arary_row >= 40 && $player_result_arary_row <= 52){
									$suit = "diams";
								}else{
									$suit = "";
								}
								if(!empty($suit)){
									switch($player_result_arary_row % 13)
									{
										case "1": $rank = "A"; break;
										case "2": $rank = "2"; break;
										case "3": $rank = "3"; break;
										case "4": $rank = "4"; break;
										case "5": $rank = "5"; break;
										case "6": $rank = "6"; break;
										case "7": $rank = "7"; break;
										case "8": $rank = "8"; break;
										case "9": $rank = "9"; break;
										case "10": $rank = "10"; break;
										case "11": $rank = "J"; break;
										case "12": $rank = "Q"; break;
										case "0": $rank = "K"; break;
										default: $rank = ""; break;
									}

									$player2_result .= '<div class="playingCards fourColours inText" style="display:inline-block;">';
										$player2_result .= '<div class="card rank-'.$rank.' '.$suit.'">';
											$player2_result .= '<span class="rank">'.$rank.'</span>';
											$player2_result .= '<span class="suit">&'.$suit.';</span>';
										$player2_result .= '</div>';
									$player2_result .= '</div>';
								}
							}
						}
					}
				}

				if(!empty($game_result_array['poker']['player3'])){
					$player_result_arary = explode('-',$game_result_array['poker']['player3']);
					if(!empty($player_result_arary)){
						$player3_result .= $obj->lang->line('all_bet_code_player_three')." : ";
						foreach($player_result_arary as $player_result_arary_row){
							if($player_result_arary_row > 0){
								$suit = "";
								$rank = "";
								if($player_result_arary_row >= 1 && $player_result_arary_row <= 13){
									$suit = "spades";
								}else if($player_result_arary_row >= 14 && $player_result_arary_row <= 26){
									$suit = "hearts";
								}else if($player_result_arary_row >= 27 && $player_result_arary_row <= 39){
									$suit = "clubs";
								}else if($player_result_arary_row >= 40 && $player_result_arary_row <= 52){
									$suit = "diams";
								}else{
									$suit = "";
								}
								if(!empty($suit)){
									switch($player_result_arary_row % 13)
									{
										case "1": $rank = "A"; break;
										case "2": $rank = "2"; break;
										case "3": $rank = "3"; break;
										case "4": $rank = "4"; break;
										case "5": $rank = "5"; break;
										case "6": $rank = "6"; break;
										case "7": $rank = "7"; break;
										case "8": $rank = "8"; break;
										case "9": $rank = "9"; break;
										case "10": $rank = "10"; break;
										case "11": $rank = "J"; break;
										case "12": $rank = "Q"; break;
										case "0": $rank = "K"; break;
										default: $rank = ""; break;
									}

									$player3_result .= '<div class="playingCards fourColours inText" style="display:inline-block;">';
										$player3_result .= '<div class="card rank-'.$rank.' '.$suit.'">';
											$player3_result .= '<span class="rank">'.$rank.'</span>';
											$player3_result .= '<span class="suit">&'.$suit.';</span>';
										$player3_result .= '</div>';
									$player3_result .= '</div>';
								}
							}
						}
					}
				}

				$result_temp .= $banker_result;
				if(!empty($player_result)){
					if(!empty($result_temp)){
						$result_temp .= "<br/>";
					}
					$result_temp .= $player_result;
				}
				if(!empty($player2_result)){
					if(!empty($result_temp)){
						$result_temp .= "<br/>";
					}
					$result_temp .= $player2_result;
				}
				if(!empty($player3_result)){
					if(!empty($result_temp)){
						$result_temp .= "<br/>";
					}
					$result_temp .= $player3_result;
				}
			}else if($game_real_code == "51"){
				if(isset($game_result_array['result'])){
					$result_temp .= $game_result_array['result'];
				}
			}else if($game_real_code == "52"){
				if(isset($game_result_array['result'])){
					$result_temp .= $game_result_array['result'];
				}
			}else{
				$result_temp = "";
			}
		}
	}else if($game_type_code == GAME_OTHERS){
	}

	if(!empty($result_temp)){
		$result = $result_temp;
	}
	return $result;
}