Chat with us, powered by LiveChat
Categories
Pages
'; //$Arr_Date = $_GET["Arr_Date"]; //$Time = $_GET["time"]; //$Number_Of_Golfers = $_GET["NOG"]; //$Location = $_GET["location"]; //$Remark = $_GET["textarea"]; //$Golf_Course_ID = $_GET["Golf_Course_ID2"]; //$Golf_Course_Name = $_GET["Golf_Course_Name"]; //$NONgolfer = $_GET["NONgolfer"]; $Time = $_POST['time']; $Arr_Date = $_POST["Arr_Date"]; $Number_Of_Golfers = $_POST["NOG"]; $Location = $_POST["location"]; $Remark = $_POST["textarea2"]; $Golf_Course_ID = $_POST["Golf_Course_ID2"]; $Golf_Course_Name = $_POST["Golf_Course_Name2"]; $NONgolfer = $_POST["NONgolfer"]; $transferArrange = $_POST["transferArrange"]; $Test_Date = substr($Arr_Date, 11, 1); //$Total_Price = $_POST["total_price"]; //$Golf_Course_URL = $_POST["Golf_Course_URL"]; //echo '555'.$_POST['Golf_Course_ID']; if ($Number_Of_Golfers == "0") echo "

You must choose number of golfers!

"; elseif (empty($Location)) { echo "

You must choose the pick up location!

"; } elseif (empty($Time)) { echo "

You must choose Tee-Off time

"; } else { $q_jlist = "SELECT * FROM golf_tee_time_data WHERE Golf_Course_ID = '$Golf_Course_ID'"; $r_jlist = mysql_query($q_jlist); $a_jlist = mysql_fetch_array($r_jlist); $SQLstring = "SELECT g.Chiangmai_URL,g.Chiangmai_Url, g.Golf_Course_Name FROM golf_course_data g WHERE g.Golf_Course_ID = '$Golf_Course_ID'"; $QueryResult = mysql_query($SQLstring); $Result = mysql_fetch_array($QueryResult); $Golf_Course_URL = $Result["Chiangmai_Url"]; $Tee_A_Start_Year = $a_jlist["Tee_A_Start_Year"]; $Tee_A_Start_Month = $a_jlist["Tee_A_Start_Month"]; $Tee_A_Start_Day = $a_jlist["Tee_A_Start_Day"]; $Tee_A_End_Year = $a_jlist["Tee_A_End_Year"]; $Tee_A_End_Month = $a_jlist["Tee_A_End_Month"]; $Tee_A_End_Day = $a_jlist["Tee_A_End_Day"]; $Tee_B_Start_Year = $a_jlist["Tee_B_Start_Year"]; $Tee_B_Start_Month = $a_jlist["Tee_B_Start_Month"]; $Tee_B_Start_Day = $a_jlist["Tee_B_Start_Day"]; $Tee_B_End_Year = $a_jlist["Tee_B_End_Year"]; $Tee_B_End_Month = $a_jlist["Tee_B_End_Month"]; $Tee_B_End_Day = $a_jlist["Tee_B_End_Day"]; $Tee_C_Start_Year = $a_jlist["Tee_C_Start_Year"]; $Tee_C_Start_Month = $a_jlist["Tee_C_Start_Month"]; $Tee_C_Start_Day = $a_jlist["Tee_C_Start_Day"]; $Tee_C_End_Year = $a_jlist["Tee_C_End_Year"]; $Tee_C_End_Month = $a_jlist["Tee_C_End_Month"]; $Tee_C_End_Day = $a_jlist["Tee_C_End_Day"]; if ((substr($Arr_Date, 0, 4) >= $Tee_A_Start_Year) && (substr($Arr_Date, 5, 2) >= $Tee_A_Start_Month) && (substr($Arr_Date, 8, 2) >= $Tee_A_Start_Day) && (substr($Arr_Date, 0, 4) <= $Tee_A_End_Year) && (substr($Arr_Date, 5, 2) <= $Tee_A_End_Month) && (substr($Arr_Date, 8, 2) <= $Tee_A_End_Day)) { if ($Test_Date == "S") { switch ($Number_Of_Golfers) { case "1": $Price = "THB ". number_format($a_jlist["Tee_A_1G_WE"]); break; case "2": $Price = "THB ". number_format($a_jlist["Tee_A_2G_WE"] * 2); break; case "3": $Price = "THB ". number_format($a_jlist["Tee_A_3G_WE"] * 3); break; case "4": $Price = "THB ". number_format($a_jlist["Tee_A_4G_WE"] * 4); break; case "5": $Price = "THB ". number_format($a_jlist["Tee_A_4G_WE"] * 5); break; case "6": $Price = "THB ". number_format($a_jlist["Tee_A_4G_WE"] * 6); break; case "7": $Price = "THB ". number_format($a_jlist["Tee_A_4G_WE"] * 7); break; case "8": $Price = "THB ". number_format($a_jlist["Tee_A_4G_WE"] * 8); break; case "9": $Price = "THB ". number_format($a_jlist["Tee_A_4G_WE"] * 9); break; case "10": $Price = "THB ". number_format($a_jlist["Tee_A_4G_WE"] * 10); break; case "11": $Price = "THB ". number_format($a_jlist["Tee_A_4G_WE"] * 11); break; case "12": $Price = "THB ". number_format($a_jlist["Tee_A_4G_WE"] * 12); break; case "13": $Price = "THB ". number_format($a_jlist["Tee_A_4G_WE"] * 13); break; case "14": $Price = "THB ". number_format($a_jlist["Tee_A_4G_WE"] * 14); break; case "15": $Price = "THB ". number_format($a_jlist["Tee_A_4G_WE"] * 15); break; case "16": $Price = "THB ". number_format($a_jlist["Tee_A_4G_WE"] * 16); break; case "17": $Price = "THB ". number_format($a_jlist["Tee_A_4G_WE"] * 17); break; case "18": $Price = "THB ". number_format($a_jlist["Tee_A_4G_WE"] * 18); break; case "19": $Price = "THB ". number_format($a_jlist["Tee_A_4G_WE"] * 19); break; case "20": $Price = "THB ". number_format($a_jlist["Tee_A_4G_WE"] * 20); break; } } else { switch ($Number_Of_Golfers) { case "1": $Price = "THB ". number_format($a_jlist["Tee_A_1G_WD"]); break; case "2": $Price = "THB ". number_format($a_jlist["Tee_A_2G_WD"] * 2); break; case "3": $Price = "THB ". number_format($a_jlist["Tee_A_3G_WD"] * 3); break; case "4": $Price = "THB ". number_format($a_jlist["Tee_A_4G_WD"] * 4); break; case "5": $Price = "THB ". number_format($a_jlist["Tee_A_4G_WD"] * 5); break; case "6": $Price = "THB ". number_format($a_jlist["Tee_A_4G_WD"] * 6); break; case "7": $Price = "THB ". number_format($a_jlist["Tee_A_4G_WD"] * 7); break; case "8": $Price = "THB ". number_format($a_jlist["Tee_A_4G_WD"] * 8); break; case "9": $Price = "THB ". number_format($a_jlist["Tee_A_4G_WD"] * 9); break; case "10": $Price = "THB ". number_format($a_jlist["Tee_A_4G_WD"] * 10); break; case "11": $Price = "THB ". number_format($a_jlist["Tee_A_4G_WD"] * 11); break; case "12": $Price = "THB ". number_format($a_jlist["Tee_A_4G_WD"] * 12); break; case "13": $Price = "THB ". number_format($a_jlist["Tee_A_4G_WD"] * 13); break; case "14": $Price = "THB ". number_format($a_jlist["Tee_A_4G_WD"] * 14); break; case "15": $Price = "THB ". number_format($a_jlist["Tee_A_4G_WD"] * 15); break; case "16": $Price = "THB ". number_format($a_jlist["Tee_A_4G_WD"] * 16); break; case "17": $Price = "THB ". number_format($a_jlist["Tee_A_4G_WD"] * 17); break; case "18": $Price = "THB ". number_format($a_jlist["Tee_A_4G_WD"] * 18); break; case "19": $Price = "THB ". number_format($a_jlist["Tee_A_4G_WD"] * 19); break; case "20": $Price = "THB ". number_format($a_jlist["Tee_A_4G_WD"] * 20); break; } } } elseif ((substr($Arr_Date, 0, 4) >= $Tee_B_Start_Year) && (substr($Arr_Date, 5, 2) >= $Tee_B_Start_Month) && (substr($Arr_Date, 8, 2) >= $Tee_B_Start_Day) && (substr($Arr_Date, 0, 4) <= $Tee_B_End_Year) && (substr($Arr_Date, 5, 2) <= $Tee_B_End_Month) && (substr($Arr_Date, 8, 2) <= $Tee_B_End_Day)) { if ($Test_Date == "S") { switch ($Number_Of_Golfers) { case "1": $Price = "THB ". number_format($a_jlist["Tee_B_1G_WE"]); break; case "2": $Price = "THB ". number_format($a_jlist["Tee_B_2G_WE"] * 2); break; case "3": $Price = "THB ". number_format($a_jlist["Tee_B_3G_WE"] * 3); break; case "4": $Price = "THB ". number_format($a_jlist["Tee_B_4G_WE"] * 4); break; case "5": $Price = "THB ". number_format($a_jlist["Tee_B_4G_WE"] * 5); break; case "6": $Price = "THB ". number_format($a_jlist["Tee_B_4G_WE"] * 6); break; case "7": $Price = "THB ". number_format($a_jlist["Tee_B_4G_WE"] * 7); break; case "8": $Price = "THB ". number_format($a_jlist["Tee_B_4G_WE"] * 8); break; case "9": $Price = "THB ". number_format($a_jlist["Tee_B_4G_WE"] * 9); break; case "10": $Price = "THB ". number_format($a_jlist["Tee_B_4G_WE"] * 10); break; case "11": $Price = "THB ". number_format($a_jlist["Tee_B_4G_WE"] * 11); break; case "12": $Price = "THB ". number_format($a_jlist["Tee_B_4G_WE"] * 12); break; case "13": $Price = "THB ". number_format($a_jlist["Tee_B_4G_WE"] * 13); break; case "14": $Price = "THB ". number_format($a_jlist["Tee_B_4G_WE"] * 14); break; case "15": $Price = "THB ". number_format($a_jlist["Tee_B_4G_WE"] * 15); break; case "16": $Price = "THB ". number_format($a_jlist["Tee_B_4G_WE"] * 16); break; case "17": $Price = "THB ". number_format($a_jlist["Tee_B_4G_WE"] * 17); break; case "18": $Price = "THB ". number_format($a_jlist["Tee_B_4G_WE"] * 18); break; case "19": $Price = "THB ". number_format($a_jlist["Tee_B_4G_WE"] * 19); break; case "20": $Price = "THB ". number_format($a_jlist["Tee_B_4G_WE"] * 20); break; } } else { switch ($Number_Of_Golfers) { case "1": $Price = "THB ". number_format($a_jlist["Tee_B_1G_WD"]); break; case "2": $Price = "THB ". number_format($a_jlist["Tee_B_2G_WD"] * 2); break; case "3": $Price = "THB ". number_format($a_jlist["Tee_B_3G_WD"] * 3); break; case "4": $Price = "THB ". number_format($a_jlist["Tee_B_4G_WD"] * 4); break; case "5": $Price = "THB ". number_format($a_jlist["Tee_B_4G_WD"] * 5); break; case "6": $Price = "THB ". number_format($a_jlist["Tee_B_4G_WD"] * 6); break; case "7": $Price = "THB ". number_format($a_jlist["Tee_B_4G_WD"] * 7); break; case "8": $Price = "THB ". number_format($a_jlist["Tee_B_4G_WD"] * 8); break; case "9": $Price = "THB ". number_format($a_jlist["Tee_B_4G_WD"] * 9); break; case "10": $Price = "THB ". number_format($a_jlist["Tee_B_4G_WD"] * 10); break; case "11": $Price = "THB ". number_format($a_jlist["Tee_B_4G_WD"] * 11); break; case "12": $Price = "THB ". number_format($a_jlist["Tee_B_4G_WD"] * 12); break; case "13": $Price = "THB ". number_format($a_jlist["Tee_B_4G_WD"] * 13); break; case "14": $Price = "THB ". number_format($a_jlist["Tee_B_4G_WD"] * 14); break; case "15": $Price = "THB ". number_format($a_jlist["Tee_B_4G_WD"] * 15); break; case "16": $Price = "THB ". number_format($a_jlist["Tee_B_4G_WD"] * 16); break; case "17": $Price = "THB ". number_format($a_jlist["Tee_B_4G_WD"] * 17); break; case "18": $Price = "THB ". number_format($a_jlist["Tee_B_4G_WD"] * 18); break; case "19": $Price = "THB ". number_format($a_jlist["Tee_B_4G_WD"] * 19); break; case "20": $Price = "THB ". number_format($a_jlist["Tee_B_4G_WD"] * 20); break; } } } elseif ((substr($Arr_Date, 0, 4) >= $Tee_C_Start_Year) && (substr($Arr_Date, 5, 2) >= $Tee_C_Start_Month) && (substr($Arr_Date, 8, 2) >= $Tee_C_Start_Day) && (substr($Arr_Date, 0, 4) <= $Tee_C_End_Year) && (substr($Arr_Date, 5, 2) <= $Tee_C_End_Month) && (substr($Arr_Date, 8, 2) <= $Tee_C_End_Day)) { if ($Test_Date == "S") { switch ($Number_Of_Golfers) { case "1": $Price = "THB ". number_format($a_jlist["Tee_C_1G_WE"]); break; case "2": $Price = "THB ". number_format($a_jlist["Tee_C_2G_WE"] * 2); break; case "3": $Price = "THB ". number_format($a_jlist["Tee_C_3G_WE"] * 3); break; case "4": $Price = "THB ". number_format($a_jlist["Tee_C_4G_WE"] * 4); break; case "5": $Price = "THB ". number_format($a_jlist["Tee_C_4G_WE"] * 5); break; case "6": $Price = "THB ". number_format($a_jlist["Tee_C_4G_WE"] * 6); break; case "7": $Price = "THB ". number_format($a_jlist["Tee_C_4G_WE"] * 7); break; case "8": $Price = "THB ". number_format($a_jlist["Tee_C_4G_WE"] * 8); break; case "9": $Price = "THB ". number_format($a_jlist["Tee_C_4G_WE"] * 9); break; case "10": $Price = "THB ". number_format($a_jlist["Tee_C_4G_WE"] * 10); break; case "11": $Price = "THB ". number_format($a_jlist["Tee_C_4G_WE"] * 11); break; case "12": $Price = "THB ". number_format($a_jlist["Tee_C_4G_WE"] * 12); break; case "13": $Price = "THB ". number_format($a_jlist["Tee_C_4G_WE"] * 13); break; case "14": $Price = "THB ". number_format($a_jlist["Tee_C_4G_WE"] * 14); break; case "15": $Price = "THB ". number_format($a_jlist["Tee_C_4G_WE"] * 15); break; case "16": $Price = "THB ". number_format($a_jlist["Tee_C_4G_WE"] * 16); break; case "17": $Price = "THB ". number_format($a_jlist["Tee_C_4G_WE"] * 17); break; case "18": $Price = "THB ". number_format($a_jlist["Tee_C_4G_WE"] * 18); break; case "19": $Price = "THB ". number_format($a_jlist["Tee_C_4G_WE"] * 19); break; case "20": $Price = "THB ". number_format($a_jlist["Tee_C_4G_WE"] * 20); break; } } else { switch ($Number_Of_Golfers) { case "1": $Price = "THB ". number_format($a_jlist["Tee_C_1G_WD"]); break; case "2": $Price = "THB ". number_format($a_jlist["Tee_C_2G_WD"] * 2); break; case "3": $Price = "THB ". number_format($a_jlist["Tee_C_3G_WD"] * 3); break; case "4": $Price = "THB ". number_format($a_jlist["Tee_C_4G_WD"] * 4); break; case "5": $Price = "THB ". number_format($a_jlist["Tee_C_4G_WD"] * 5); break; case "6": $Price = "THB ". number_format($a_jlist["Tee_C_4G_WD"] * 6); break; case "7": $Price = "THB ". number_format($a_jlist["Tee_C_4G_WD"] * 7); break; case "8": $Price = "THB ". number_format($a_jlist["Tee_C_4G_WD"] * 8); break; case "9": $Price = "THB ". number_format($a_jlist["Tee_C_4G_WD"] * 9); break; case "10": $Price = "THB ". number_format($a_jlist["Tee_C_4G_WD"] * 10); break; case "11": $Price = "THB ". number_format($a_jlist["Tee_C_4G_WD"] * 11); break; case "12": $Price = "THB ". number_format($a_jlist["Tee_C_4G_WD"] * 12); break; case "13": $Price = "THB ". number_format($a_jlist["Tee_C_4G_WD"] * 13); break; case "14": $Price = "THB ". number_format($a_jlist["Tee_C_4G_WD"] * 14); break; case "15": $Price = "THB ". number_format($a_jlist["Tee_C_4G_WD"] * 15); break; case "16": $Price = "THB ". number_format($a_jlist["Tee_C_4G_WD"] * 16); break; case "17": $Price = "THB ". number_format($a_jlist["Tee_C_4G_WD"] * 17); break; case "18": $Price = "THB ". number_format($a_jlist["Tee_C_4G_WD"] * 18); break; case "19": $Price = "THB ". number_format($a_jlist["Tee_C_4G_WD"] * 19); break; case "20": $Price = "THB ". number_format($a_jlist["Tee_C_4G_WD"] * 20); break; } } } //echo '
- '.substr($Arr_Date, 0, 4); //echo '
- '.substr($Arr_Date, 5, 2); //echo '
- '.substr($Arr_Date, 8, 2); //echo '
- '.substr($Arr_Date, 0, 4); //echo '
- '.substr($Arr_Date, 5, 2); //echo '
- '.substr($Arr_Date, 8, 2); //echo '------------------------------------'; //echo '
- '.$Tee_C_Start_Year; //echo '
- '.$Tee_C_Start_Month; //echo '
- '.$Tee_C_Start_Day; //echo '
- '.$Tee_C_End_Year; //echo '
- '.$Tee_C_End_Month; //echo '
- '.$Tee_C_End_Day; // //echo '
- '.'test + '.$Price.' = '.$Test_Date.'
'; //
echo "

$Golf_Course_Name

    Please, review the tee-off reservation details below:
     
Tee-Off Date:     $Arr_Date
Tee-Off Time:     $Time:00
Number of Golfers:     $Number_Of_Golfers golfer
Number of non Golfers:     $NONgolfer golfer
Pick up at:     $Location
Round-trip transfers arrange:     $transferArrange
Remarks:     $Remark
     
    Click here to make any changes to the above tee-off reservation
 
If the above details are correct, please fill out the form to complete your tee-off reservation.
 

General Information:

      Fields marked with an asterix (*) are required.
 
 
 
 
 

Your Contact Details:

 
 
 
 
 
Thank you for your time & interest!
"; } /* $add_log = ''; $add_log .= '$Arr_Date = ['.$Arr_Date .']'.CHR(13); $add_log .= '$Time = ['.$Time .']'.CHR(13); $add_log .= '$Number_Of_Golfers = ['.$Number_Of_Golfers.']'.CHR(13); $add_log .= '$Location = ['.$Location .']'.CHR(13); $add_log .= '$Remark = ['.$Remark .']'.CHR(13); $add_log .= '$Golf_Course_ID = ['.$Golf_Course_ID .']'.CHR(13); $add_log .= '$Golf_Course_Name = ['.$Golf_Course_Name .']'.CHR(13); $add_log .= '$NONgolfer = ['.$NONgolfer .']'.CHR(13); $add_log .= '$transferArrange = ['.$transferArrange .']'.CHR(13); $HTTP_REFERER = $_SERVER['HTTP_REFERER']; $sql_NEW1 = " INSERT INTO log_nt_debug ".CHR(13). " SET text = 'chiangmai-confirm-tee-off.php page referer is [".$HTTP_REFERER."] and passing value is ".$add_log."' ".CHR(13); mysql_query($sql_NEW1 ,$link) or die(mysql_error()); */ ?>