<?php

//require_once("db_conn_class.php");

require_once("webform_class.php");

//creating object of res info class

$app = new app();

/*$dbh = new db_conn();

$dbh->set_conn();*/

//==========================================================================

//retaining the value of the variables

if(isset($_POST['txtname']) && ($_POST['txtname'] != ""))

{

	$app->name = str_replace("'"," ",$_POST['txtname']);

}

if(isset($_POST['email']) && ($_POST['email'] != ""))

{

	$app->email = str_replace("'"," ",$_POST['email']);

}

if(isset($_POST['contact']) && ($_POST['contact'] != ""))

{

	$app->contact = str_replace("'"," ",$_POST['contact']);

}

if(isset($_POST['location']) && ($_POST['location'] != ""))

{

	$app->location = str_replace("'"," ",$_POST['location']);

}

if(isset($_POST['country']) && ($_POST['country'] != ""))

{

	$app->country = str_replace("'"," ",$_POST['country']);

}

if(isset($_POST['cmbCourse']) && ($_POST['cmbCourse'] != ""))

{

	$app->course = str_replace("'"," ",$_POST['cmbCourse']);

}

if(isset($_POST['cmbMode']) && ($_POST['cmbMode'] != ""))

{

	$app->mode = str_replace("'"," ",$_POST['cmbMode']);

}

if(isset($_POST['dob']) && ($_POST['dob'] != ""))

{

	$app->dob = $_POST['dob'];

}

if(isset($_POST['cmbGender']) && ($_POST['cmbGender'] != ""))

{

	$app->gender = $_POST['cmbGender'];

}

if(isset($_POST['qualification']) && ($_POST['qualification'] != ""))

{

	$app->qualification = $_POST['qualification'];

}

if(isset($_POST['occupation']) && ($_POST['occupation'] != ""))

{

	$app->occupation = $_POST['occupation'];

}

if(isset($_POST['besttime']) && ($_POST['besttime'] != ""))

{

	$app->besttime = 'Best Time to Call-'.$_POST['besttime'];

}

if(isset($_POST['comments']) && ($_POST['comments'] != ""))

{

	$app->comments = str_replace("'"," ",$_POST['comments']);

}

//==========================================================================

$flag= 0;

//for Subscribe to our Newsletter! (ACT)

if(isset($_POST['txtAction']) && ($_POST['txtAction'] == "save_data"))

{	

    		

    //saving data into database

	$app->InsertData();	

	

	//for sending mail

	$app->SendMail();

	$app->SendMailToCandidate();

	

	$flag = 1;

	$msg ="Thank you for Application.";

	

	/*echo "<script type='text/javascript'>

        window.open('https://www.asiancollegeofteachers.com/newsletter-images/newsletter.html', '_blank')

    </script>";*/

	@header("Location:thankyou.php");

	

}

//==========================================================================

//for Subscribe to our ACT - TESOL Application India tesolcourseindia.com

if(isset($_POST['txtAction1']) && ($_POST['txtAction1'] == "save_data"))

{	

    		

    //saving data into database

	$app->InsertData1();	

	

	//for sending mail

	$app->SendMail1();

	

	$flag = 1;

	$msg ="Thank you for Application.";

	

	/*echo "<script type='text/javascript'>

        window.open('https://www.asiancollegeofteachers.com/newsletter-images/newsletter.html', '_blank')

    </script>";*/

	@header("Location:http://www.tesolcourseindia.com/thankyou.php");

	

}

//==========================================================================

if(isset($_POST['txtAction2']) && ($_POST['txtAction2'] == "save_data"))

{	

    		

    //saving data into database

	$app->InsertData2();	

	

	//for sending mail

	$app->SendMail2();

	

	$flag = 1;

	$msg ="Thank you for Application.";

	

	/*echo "<script type='text/javascript'>

        window.open('https://www.asiancollegeofteachers.com/newsletter-images/newsletter.html', '_blank')

    </script>";*/

	@header("Location:http://www.tesolcourseindia.com/thankyou.php");

	

}

//==========================================================================

if(isset($_POST['txtAction3']) && ($_POST['txtAction3'] == "save_data"))

{	

    		

    //saving data into database

	$app->InsertData3();	

	

	//for sending mail

	$app->SendMail3();

	

	$flag = 1;

	$msg ="Thank you for Application.";

	

	/*echo "<script type='text/javascript'>

        window.open('https://www.asiancollegeofteachers.com/newsletter-images/newsletter.html', '_blank')

    </script>";*/

	@header("Location:http://www.tesolcourseindia.com/thankyou.php");

	

}

if(isset($_POST['submit_live_online']))
{	
    		
    //saving data into database
	$app->InsertData4();	
	
	//for sending mail
	$app->SendMail4();
	
	@header("Location:thankyou.php");
	
}


if(isset($_POST['submit_inclass_tefl_courses']))
{	
    		
    //saving data into database
	$app->InsertData5();	
	
	//for sending mail
	$app->SendMail5();
	
	@header("Location:thankyou.php");
	
}


if(isset($_POST['submit_inclass_live_online_tefl_courses']))
{	
    		
    //saving data into database
	$app->InsertData6();	
	
	//for sending mail
	$app->SendMail6();
	
	@header("Location:thankyou.php");
	
}

if(isset($_POST['submit_tesol_india_kolkata_courses']))
{	
    		
    //saving data into database
	$app->InsertData7();	
	
	//for sending mail
	$app->SendMail7();
	
	@header("Location:thankyou.php");
	
}

if(isset($_POST['submit_tesol_india_kochi_courses']))
{	
    		
    //saving data into database
	$app->InsertData8();	
	
	//for sending mail
	$app->SendMail8();
	
	@header("Location:thankyou.php");
	
}

if(isset($_POST['submit_tesol_india_bangalore_courses']))
{	
    		
    //saving data into database
	$app->InsertData9();	
	
	//for sending mail
	$app->SendMail9();
	
	@header("Location:thankyou.php");
	
}

if(isset($_POST['submit_live_online_page']))
{	
    		
    //saving data into database
	$app->InsertData10();	
	
	//for sending mail
	$app->SendMail10();
	
	@header("Location:thankyou.php");
	
}


if(isset($_POST['submit_tesol-india_bangkok']))
{	
    		
    //saving data into database
	$app->InsertData11();	
	
	//for sending mail
	$app->SendMail11();
	
	@header("Location:thankyou.php");
	
}


if(isset($_POST['submit_tesol_india_mumbai']))
{	
    		
    //saving data into database
	$app->InsertData12();	
	
	//for sending mail
	$app->SendMail12();
	
	@header("Location:thankyou.php");
	
}


if(isset($_POST['submit_tesol_india_hyderabad']))
{	
    		
    //saving data into database
	$app->InsertData13();	
	
	//for sending mail
	$app->SendMail13();
	
	@header("Location:thankyou.php");
	
}

if(isset($_POST['submit_tesol_india_delhi']))
{	
    		
    //saving data into database
	$app->InsertData14();	
	
	//for sending mail
	$app->SendMail14();
	
	@header("Location:thankyou.php");
	
}

if(isset($_POST['submit_tesol_india_chennai']))
{	
    		
    //saving data into database
	$app->InsertData15();	
	
	//for sending mail
	$app->SendMail15();
	
	@header("Location:thankyou.php");
	
}



if(isset($_POST['submit_tesol_india_pune']))
{	
    		
    //saving data into database
	$app->InsertData16();	
	
	//for sending mail
	$app->SendMail16();
	
	@header("Location:thankyou.php");
	
}



if(isset($_POST['submit_tesol_india_goa']))
{	
    		
    //saving data into database
	$app->InsertData17();	
	
	//for sending mail
	$app->SendMail17();
	
	@header("Location:thankyou.php");
	
}


if(isset($_POST['submit_tesol_india_ahmedabad']))
{	
    		
    //saving data into database
	$app->InsertData18();	
	
	//for sending mail
	$app->SendMail18();
	
	@header("Location:thankyou.php");
	
}

if(isset($_POST['submit_TEFL_Certificate']))
{	
    		
    //saving data into database
	$app->InsertData19();	
	
	//for sending mail
	$app->SendMail19();
	
	@header("Location:thankyou.php");
	
}



if(isset($_POST['submit_Bachelor_of_Education_in_TESOL']))
{	
    		
    //saving data into database
	$app->InsertData20();	
	
	//for sending mail
	$app->SendMail20();
	
	@header("Location:thankyou.php");
	
}


if(isset($_POST['submit_TEFL_YLTT']))
{	
    		
    //saving data into database
	$app->InsertData21();	
	
	//for sending mail
	$app->SendMail21();
	
	@header("Location:thankyou.php");
	
}


if(isset($_POST['submit_international_pg_diploma_TEFL']))
{	
    		
    //saving data into database
	$app->InsertData22();	
	
	//for sending mail
	$app->SendMail22();
	
	@header("Location:thankyou.php");
	
}


if(isset($_POST['submit_TEFL_Diploma']))
{	
    		
    //saving data into database
	$app->InsertData23();	
	
	//for sending mail
	$app->SendMail23();
	
	@header("Location:thankyou.php");
	
}


if(isset($_POST['submit_TEFL-Advanced-Diploma']))
{	
    		
    //saving data into database
	$app->InsertData24();	
	
	//for sending mail
	$app->SendMail24();
	
	@header("Location:thankyou.php");
	
}



if(isset($_POST['submit_TEFL_BETT']))
{	
    		
    //saving data into database
	$app->InsertData25();	
	
	//for sending mail
	$app->SendMail25();
	
	@header("Location:thankyou.php");
	
}



if(isset($_POST['submit_Master_of_Arts_in_Education_with_TESOL']))
{	
    		
    //saving data into database
	$app->InsertData26();	
	
	//for sending mail
	$app->SendMail26();
	
	@header("Location:thankyou.php");
	
}



if(isset($_POST['submit_about_us']))
{	
    		
    //saving data into database
	$app->InsertData27();	
	
	//for sending mail
	$app->SendMail27();
	
	@header("Location:thankyou.php");
	
}


if(isset($_POST['submit_ACT_Hall_of_Fame']))
{	
    		
    //saving data into database
	$app->InsertData28();	
	
	//for sending mail
	$app->SendMail28();
	
	@header("Location:thankyou.php");
	
}

if(isset($_POST['submit_live_online_seminars']))
{	
    		
    //saving data into database
	$app->InsertData29();	
	
	//for sending mail
	$app->SendMail29();
	
	@header("Location:thankyou.php");
	
}


if(isset($_POST['submit_jobs_placement']))
{	
    		
    //saving data into database
	$app->InsertData30();	
	
	//for sending mail
	$app->SendMail30();
	
	@header("Location:thankyou.php");
	
}


if(isset($_POST['submit_accrediations']))
{	
    		
    //saving data into database
	$app->InsertData31();	
	
	//for sending mail
	$app->SendMail31();
	
	@header("Location:thankyou.php");
	
}


if(isset($_POST['submit_tesol_world']))
{	
    		
    //saving data into database
	$app->InsertData32();	
	
	//for sending mail
	$app->SendMail32();
	
	@header("Location:thankyou.php");
	
}


if(isset($_POST['submit_careers']))
{	
    		
    //saving data into database
	$app->InsertData33();	
	
	//for sending mail
	$app->SendMail33();
	
	@header("Location:thankyou.php");
	
}

if(isset($_POST['submit_TEFL_Bachelors']))
{	
    		
    //saving data into database
	$app->InsertData34();	
	
	//for sending mail
	$app->SendMail34();
	
	@header("Location:thankyou.php");
	
}


if(isset($_POST['submit_Professional-Doctorate-in-Education']))
{	
    		
    //saving data into database
	$app->InsertData35();	
	
	//for sending mail
	$app->SendMail35();
	
	@header("Location:thankyou.php");
	
}



if(isset($_POST['500-hours-International-Advanced-PG-Diploma-in-TEFLTESOL']))
{	
    		
    //saving data into database
	$app->InsertData36();	
	
	//for sending mail
	$app->SendMail36();
	
	@header("Location:thankyou.php");
	
}


if(isset($_POST['submit_Master_of_Education_with_TESOL']))
{	
    		
    //saving data into database
	$app->InsertData38();	
	
	//for sending mail
	$app->SendMail38();
	
	@header("Location:thankyou.php");
	
}


if(isset($_POST['phd-in-Education']))
{	
    		
    //saving data into database
	$app->InsertData40();	
	
	//for sending mail
	$app->SendMail40();
	
	@header("Location:thankyou.php");
	
}







//when save button is clicked

//if(isset($_POST['txtAction1']) && ($_POST['txtAction1'] == "save_data"))

//{	

//    		

//    //saving data into database

//	$app->InsertData1();	

//	

//	//for sending mail

//	$app->SendMail1();

//	//$id = $_GET['id'];

//	//echo $id;

//	//return;

//	@header("Location:thankyou.php");

//}

//==========================================================================





?>