<?php

require_once("db_conn_class.php");

class app

{

	public $id;

	public $name;

	public $email;

	public $contact;

	public $dob;

	public $gender;

	public $location;

	public $qualification;

	public $occupation;

	public $course;

	public $comment;	

	public $status;

	public $deleted;

	

	//constructor [initialize the value of the variables]

	function _construct()

	{

		$this->id  				= 0;

		$this->name         	= "";

		$this->email     		= "";

		$this->contact  		= "";

		$this->dob		 		= "";

		$this->gender	 		= "";

		$this->location 		= "";

		$this->qualification	= "";

		$this->occupation		= "";

		$this->course	 		= "";

		$this->comment	 		= "";

		$this->status   		= "";

		$this->deleted  		= 0;

	}

    //generate max resume id

	function GenerateDataID()

	{

		$dbh = new db_conn();

		$dbh->set_conn();		

		$sql_max_id = "select max(data_id) from tbl_data_entry";

		$result_max_id = mysqli_query($dbh->link ,$sql_max_id);

		//$result_max_id = mysql_query($sql_max_id,$dbh->link);

		if($result_max_id)

		{

			$row = mysqli_fetch_row($result_max_id);

			//$row = mysql_fetch_row($result_max_id);

			$this->id = $row[0] + 1;

		}

	}

	//insert function

	function InsertData()

	{

		$dbh = new db_conn();

		$dbh->set_conn();

		$this->GenerateDataID();

		date_default_timezone_set('Asia/Kolkata');

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

		//insert data into tbl_data_entry table				

		$insert_sql = "insert into tbl_data_entry values ( ";

		$insert_sql = $insert_sql . $this->id. ",";

		$insert_sql = $insert_sql . "'".$this->name."', ";

		$insert_sql = $insert_sql . "'".$this->course."', ";

		$insert_sql = $insert_sql . "'0', ";

		$insert_sql = $insert_sql . "'0', ";

		$insert_sql = $insert_sql . "'n/a', ";

		$insert_sql = $insert_sql . "'n/a', ";

		$insert_sql = $insert_sql . "'0', ";

		$insert_sql = $insert_sql . "'3', ";

		$insert_sql = $insert_sql . "'Apply For TEFL/TESOL courses in Bangalore', ";

		$insert_sql = $insert_sql . "'".$this->email. "', ";

		$insert_sql = $insert_sql . "'".$this->contact. "', ";

		$insert_sql = $insert_sql . "'n/a', ";

		$insert_sql = $insert_sql . "'24', ";

		$insert_sql = $insert_sql . "'0', ";

		$insert_sql = $insert_sql . "'" .date("Y-m-d H:i:s")."',";

		$insert_sql = $insert_sql . "'" .date("Y-m-d H:i:s")."',";

		$insert_sql = $insert_sql . "'1',";

		$insert_sql = $insert_sql . "'n/a', ";

		$insert_sql = $insert_sql . "'".$this->qualification."', ";

		$insert_sql = $insert_sql . "'n/a', ";

		$insert_sql = $insert_sql . "'ACTIVE', ";

		$insert_sql = $insert_sql . "'0', ";

		$insert_sql = $insert_sql . "'n/a', ";

		$insert_sql = $insert_sql . "'n/a', ";

		$insert_sql = $insert_sql . "'n/a', ";

		$insert_sql = $insert_sql . "'0', ";

		$insert_sql = $insert_sql . "'n/a', ";

		$insert_sql = $insert_sql . "'" .date("Y-m-d h:i:s")."',";

		$insert_sql = $insert_sql . "'0',";

		$insert_sql = $insert_sql . "'0',";

		$insert_sql = $insert_sql . "'0',";

		$insert_sql = $insert_sql . "'".$this->location."', ";

		$insert_sql = $insert_sql . "'',";

		$insert_sql = $insert_sql . "'".$this->comment."', ";

		$insert_sql = $insert_sql . "'n/a',";

		$insert_sql = $insert_sql . "'n/a')";

		

		//echo "insert_sql = ".$insert_sql;

		//return;

		$insert_result = mysqli_query($dbh->link ,$insert_sql);

		//$insert_result = mysql_query($insert_sql,$dbh->link);

		if (!$insert_result)

		{

			$this->msg = "Error: ".mysqli_error($dbh->link);

			//$this->msg = "Error: ".mysql_error($dbh->link);

			return;

		}

		else

		{

			$this->msg = "Thank you for for filling the application form";

		}		

	}	

	function SendMail()

	{

		//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

			//sending application entry mail to 

			

			require 'PHPMailerAutoload.php';

			//if(!$_POST) exit;

			//$email = $this->email;    //$res->email;

			$email = "nikkitefl@gmail.com";

			//$email = "nikita94.act@gmail.com";

			

			$errors = 0;

					

			//Create a new PHPMailer instance

			$mail = new PHPMailer;

			

			//Tell PHPMailer to use SMTP

			$mail->isSMTP();

			

			//Enable SMTP debugging

			// 0 = off (for production use)

			// 1 = client messages

			// 2 = client and server messages

			$mail->SMTPDebug = 0;

			

			//Ask for HTML-friendly debug output

			$mail->Debugoutput = 'html';

			

			//Set the hostname of the mail server

			//$mail->Host = 'smtp.gmail.com';

			$mail->Host = 'vps.teflindia.in';

			

			//Set the SMTP port number - 587 for authenticated TLS, a.k.a. RFC4409 SMTP submission

			$mail->Port = 465;

			

			//Set the encryption system to use - ssl (deprecated) or tls

			$mail->SMTPSecure = 'ssl';

			

			//Whether to use SMTP authentication

			$mail->SMTPAuth = true;

			

			//Username to use for SMTP authentication - use full email address for gmail

			$mail->Username = "applications@teflindia.in";

			//$mail->Username = "admin@teachersjobworld.com";

			

			//Password to use for SMTP authentication

			$mail->Password = "ACTApplications$56";

			//$mail->Password = "tjwportal20!";

			

			//Set who the message is to be sent from

			$mail->setFrom("applications@teflindia.in", "Asian College Of Teachers");

			//mail->setFrom("admin@teachersjobworld.com", "Teachers Job World");

			

			//Set an alternative reply-to address

			//$mail->addReplyTo('replyto@example.com', 'First Last');

			

			//Set who the message is to be sent to

			$mail->addAddress($email);

			$mail->addAddress("asiancollegeapplications@gmail.com");

			//$mail->addAddress("sampade.ati@gmail.com");

			//Set the subject line

			$mail->Subject = "Apply For TEFL/TESOL courses in Bangalore[#".$this->id."]";

			

			//Read an HTML message body from an external file, convert referenced images to embedded,

			//convert HTML into a basic plain-text alternative body

			

			$body = "";

			$body = "<html>

			<head>

			<meta http-equiv='Content-Type' content='text/html; charset=utf-8' />

			<title>Apply For TEFL/TESOL courses in Bangalore</title>

			</head>

			<body>

			 <table>

			<tbody>

			<tr>

			<td><b> Please mention your name </b></td>

			<td>".$this->name."</td>

			</tr>

			<tr>

			<td><b>Please mention your phone number</b></td>

			<td>".$this->contact."</td>

			</tr>

			<tr>

			<td><b>Please mention your E-mail</b></td>

			<td>".$this->email."</td>

			</tr>

			<tr>

			<td><b>State & City</b></td>

			<td>".$this->location."</td>

			</tr>

			<tr>

			<td><b>Please mention your highest educational qualification</b></td>

			<td>".$this->qualification."</td>

			</tr>

			<tr>

			<td><b>Please select your Course</b></td>

			<td>".$this->course."</td>

			</tr>

			<tr>

			<td><b>Any other comments</b></td>

			<td>".$this->comment."</td>

			</tr>

					

			</tbody>

			</table>

			</body>

			</html>";

			$mail->msgHTML($body);

			

			//Replace the plain text body with one created manually

			$mail->AltBody = 'This is a plain-text message body';

			

			//Attach an image file

			//$mail->addAttachment('images/phpmailer_mini.png');

			

			//send the message, check for errors

			if (!$mail->send()) {

				$this->msg = "Sorry! Unable to send Mail";

				return;

			} 

			else

			{

				$this->msg = "Thank you for for filling the application form";

			}	

			

		}

		

		//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

		

		//insert function for Subscribe to our Newsletter! (ACT)

	function InsertData1()

	{

		$dbh = new db_conn();

		$dbh->set_conn();

		$this->GenerateDataID();

		date_default_timezone_set('Asia/Kolkata');

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

		//insert data into tbl_data_entry table				

		$insert_sql = "insert into tbl_data_entry values ( ";

		$insert_sql = $insert_sql . $this->id. ",";

		$insert_sql = $insert_sql . "'".$this->name. "', ";

		$insert_sql = $insert_sql . "'Subscribe to our Newsletter! (acttefl.com)', ";

		$insert_sql = $insert_sql . "'0', ";

		$insert_sql = $insert_sql . "'0', ";

		$insert_sql = $insert_sql . "'n/a', ";

		$insert_sql = $insert_sql . "'n/a', ";

		$insert_sql = $insert_sql . "'0', ";

		$insert_sql = $insert_sql . "'31', ";

		$insert_sql = $insert_sql . "'Subscribe to our Newsletter! (acttefl.com)', ";

		$insert_sql = $insert_sql . "'".$this->email. "', ";

		$insert_sql = $insert_sql . "'".$this->contact. "', ";

		$insert_sql = $insert_sql . "'n/a', ";

		$insert_sql = $insert_sql . "'472', ";

		$insert_sql = $insert_sql . "'0', ";

		$insert_sql = $insert_sql . "'".date("Y-m-d H:i:s")."',";

		$insert_sql = $insert_sql . "'".date("Y-m-d H:i:s")."',";

		$insert_sql = $insert_sql . "'1',";

		$insert_sql = $insert_sql . "'n/a', ";

		$insert_sql = $insert_sql . "'n/a', ";

		$insert_sql = $insert_sql . "'n/a', ";

		$insert_sql = $insert_sql . "'ACTIVE', ";

		$insert_sql = $insert_sql . "'0', ";

		$insert_sql = $insert_sql . "'n/a', ";

		$insert_sql = $insert_sql . "'n/a', ";

		$insert_sql = $insert_sql . "'n/a', ";

		$insert_sql = $insert_sql . "'0', ";

		$insert_sql = $insert_sql . "'n/a', ";

		$insert_sql = $insert_sql . "'".date("Y-m-d h:i:s")."',";

		$insert_sql = $insert_sql . "'0',";

		$insert_sql = $insert_sql . "'0',";

		$insert_sql = $insert_sql . "'0',";

		$insert_sql = $insert_sql . "'".$this->location. "', ";

		$insert_sql = $insert_sql . "'n/a',";

		$insert_sql = $insert_sql . "'n/a', ";

		$insert_sql = $insert_sql . "'n/a',";

		$insert_sql = $insert_sql . "'n/a')";

		

		//echo "insert_sql = ".$insert_sql;

		//return;

		$insert_result = mysqli_query($dbh->link,$insert_sql);

		//$insert_result = mysql_query($insert_sql,$dbh->link);

		if (!$insert_result)

		{

			$this->msg = "Error: ".mysqli_error($dbh->link);

			//$this->msg = "Error: ".mysql_error($dbh->link);

			return;

		}

		else

		{

			$this->msg = "Thank you for filling the application form";

		}		

	}	

	//for Subscribe to our Newsletter! (ACT)

	function SendMail1()

	{

		//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

		//sending application entry mail to 

		

		require 'PHPMailerAutoload.php';

		//if(!$_POST) exit;

		//$email = $this->email;    //$res->email;

			$email = "nikkitefl@gmail.com";

			//$email = "nikita94.act@gmail.com";

			

			$errors = 0;

					

			//Create a new PHPMailer instance

			$mail = new PHPMailer;

			

			//Tell PHPMailer to use SMTP

			$mail->isSMTP();

			

			//Enable SMTP debugging

			// 0 = off (for production use)

			// 1 = client messages

			// 2 = client and server messages

			$mail->SMTPDebug = 0;

			

			//Ask for HTML-friendly debug output

			$mail->Debugoutput = 'html';

			

			//Set the hostname of the mail server

			//$mail->Host = 'smtp.gmail.com';

			$mail->Host = 'vps.teflindia.in';

			

			//Set the SMTP port number - 587 for authenticated TLS, a.k.a. RFC4409 SMTP submission

			$mail->Port = 465;

			

			//Set the encryption system to use - ssl (deprecated) or tls

			$mail->SMTPSecure = 'ssl';

			

			//Whether to use SMTP authentication

			$mail->SMTPAuth = true;

			

			//Username to use for SMTP authentication - use full email address for gmail

			$mail->Username = "applications@teflindia.in";

			//$mail->Username = "admin@teachersjobworld.com";

			

			//Password to use for SMTP authentication

			$mail->Password = "ACTApplications$56";

			//$mail->Password = "tjwportal20!";

			

			//Set who the message is to be sent from

			$mail->setFrom("applications@teflindia.in", "Asian College Of Teachers");

			//mail->setFrom("admin@teachersjobworld.com", "Teachers Job World");

			

			//Set an alternative reply-to address

			//$mail->addReplyTo('replyto@example.com', 'First Last');

			

			//Set who the message is to be sent to

			$mail->addAddress($email);

			$mail->addAddress("asiancollegeapplications@gmail.com");

			//$mail->addAddress("sampade.ati@gmail.com");

			//Set the subject line

			$mail->Subject = "Subscribe to our Newsletter! (acttefl.com)[#".$this->id."]";

		

		//Read an HTML message body from an external file, convert referenced images to embedded,

		//convert HTML into a basic plain-text alternative body

		

		$body = "";

		$body = "<html>

		<head>

		<meta http-equiv='Content-Type' content='text/html; charset=utf-8' />

		<title>Subscribe to our Newsletter! (acttefl.com)</title>

		</head>

		<body>

		 <table>

		<tbody>

		<tr>

		<td><b>Please mention your Name</b></td>

		<td>".$this->name."</td>

		</tr>

		<tr>

		<td><b>Please mention your Email</b></td>

		<td>".$this->email."</td>

		</tr>

		<tr>

		<td><b>Please mention your Phone Number</b></td>

		<td>".$this->contact."</td>

		</tr>

		<tr>

		<td><b>Location </b></td>

		<td>".$this->location."</td>

		</tr>

		

		</tbody>

		</table>

		</body>

		</html>";

		$mail->msgHTML($body);

		

		//Replace the plain text body with one created manually

		$mail->AltBody = 'This is a plain-text message body';

		

		//Attach an image file

		//$mail->addAttachment('images/phpmailer_mini.png');

		

		//send the message, check for errors

		if (!$mail->send()) {

			$this->msg = "Sorry! Unable to send Mail";

			return;

		} 

		else

		{

			$this->msg = "Thank you for filling the application form";

		}	

		

	}

	

	function SendMailToCandidate1()

	{

		//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

			//sending application entry mail to 

			

			//require 'PHPMailerAutoload.php';

			//if(!$_POST) exit;

			$email = $this->email;  

			//$email = "nikkitefl@gmail.com";

			//$email = "nikita94.act@gmail.com";

			

			$errors = 0;

			

			//Create a new PHPMailer instance

				$mail = new PHPMailer;

				

				//Tell PHPMailer to use SMTP

					$mail = new PHPMailer;

			

			//Tell PHPMailer to use SMTP

			$mail->isSMTP();

			

			//Enable SMTP debugging

			// 0 = off (for production use)

			// 1 = client messages

			// 2 = client and server messages

			$mail->SMTPDebug = 0;

			

			//Ask for HTML-friendly debug output

			$mail->Debugoutput = 'html';

			

			//Set the hostname of the mail server

			//$mail->Host = 'smtp.gmail.com';

			$mail->Host = 'vps.teflindia.in';

			

			//Set the SMTP port number - 587 for authenticated TLS, a.k.a. RFC4409 SMTP submission

			$mail->Port = 465;

			

			//Set the encryption system to use - ssl (deprecated) or tls

			$mail->SMTPSecure = 'ssl';

			

			//Whether to use SMTP authentication

			$mail->SMTPAuth = true;

			

			//Username to use for SMTP authentication - use full email address for gmail

			$mail->Username = "applications@teflindia.in";

			//$mail->Username = "admin@teachersjobworld.com";

			

			//Password to use for SMTP authentication

			$mail->Password = "ACTApplications$56";

			//$mail->Password = "tjwportal20!";

			

			//Set who the message is to be sent from

			$mail->setFrom("applications@teflindia.in", "Asian College Of Teachers");

			//mail->setFrom("admin@teachersjobworld.com", "Teachers Job World");

			

			//Set an alternative reply-to address

			//$mail->addReplyTo('replyto@example.com', 'First Last');

			

			//Set who the message is to be sent to

			$mail->addAddress($email);

			$mail->addAddress("asiancollegeapplications@gmail.com");

			//$mail->addAddress("sampade.ati@gmail.com");

			//Set the subject line

			$mail->Subject = "Subscribe to our Newsletter! (acttefl.com)[#".$this->id."]";

				

				//Read an HTML message body from an external file, convert referenced images to embedded,

				//convert HTML into a basic plain-text alternative body

				

				$body = "";

				$body = "<html>

				<head>

				<meta http-equiv='Content-Type' content='text/html; charset=utf-8' />

				<title>Subscribe to our Newsletter! (acttefl.com)</title>

				</head>

				<body>

				<a href='http://asiancollegeofteachers.education/' target='_blank'><img src='http://asiancollegeofteachers.education/admin_act/design/dist/img/logo.png' alt='' width='180' style='border:none;' /></a><br />

				Thank you for signing up for ACT newsletter. Keep up-to-date with the latest information and features on Asian College of Teachers. Learn more about our events, activities and celebrations!<br><br>

Regards,<br />

Asian College of Teachers

<br />

 

				</body>

				</html>";

				$mail->msgHTML($body);

				

				//Replace the plain text body with one created manually

				$mail->AltBody = 'This is a plain-text message body';

				

				//Attach an image file

				//$mail->addAttachment('images/phpmailer_mini.png');

				

				//send the message, check for errors

				if (!$mail->send()) {

					$this->msg = "Sorry! Unable to send Mail";

					return;

				} 

				else

				{

					$this->msg = "Thank you for filling the application form";

				}	

				

			}

	

	function InsertData2()

	{

		$dbh = new db_conn();

		$dbh->set_conn();

		$this->GenerateDataID();

		date_default_timezone_set('Asia/Kolkata');

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

		//insert data into tbl_data_entry table				

		$insert_sql = "insert into tbl_data_entry values ( ";

		$insert_sql = $insert_sql . $this->id. ",";

		$insert_sql = $insert_sql . "'".$this->name. "', ";

		$insert_sql = $insert_sql . "'Application-Form (acttefl.com)', ";

		$insert_sql = $insert_sql . "'0', ";

		$insert_sql = $insert_sql . "'0', ";

		$insert_sql = $insert_sql . "'n/a', ";

		$insert_sql = $insert_sql . "'n/a', ";

		$insert_sql = $insert_sql . "'0', ";

		$insert_sql = $insert_sql . "'3', ";

		$insert_sql = $insert_sql . "'Application-Form (acttefl.com)', ";

		$insert_sql = $insert_sql . "'".$this->email. "', ";

		$insert_sql = $insert_sql . "'".$this->contact. "', ";

		$insert_sql = $insert_sql . "'n/a', ";

		$insert_sql = $insert_sql . "'472', ";

		$insert_sql = $insert_sql . "'0', ";

		$insert_sql = $insert_sql . "'".date("Y-m-d H:i:s")."',";

		$insert_sql = $insert_sql . "'".date("Y-m-d H:i:s")."',";

		$insert_sql = $insert_sql . "'1',";

		$insert_sql = $insert_sql . "'n/a', ";

		$insert_sql = $insert_sql . "'n/a', ";

		$insert_sql = $insert_sql . "'n/a', ";

		$insert_sql = $insert_sql . "'ACTIVE', ";

		$insert_sql = $insert_sql . "'0', ";

		$insert_sql = $insert_sql . "'n/a', ";

		$insert_sql = $insert_sql . "'n/a', ";

		$insert_sql = $insert_sql . "'n/a', ";

		$insert_sql = $insert_sql . "'0', ";

		$insert_sql = $insert_sql . "'n/a', ";

		$insert_sql = $insert_sql . "'".date("Y-m-d h:i:s")."',";

		$insert_sql = $insert_sql . "'0',";

		$insert_sql = $insert_sql . "'0',";

		$insert_sql = $insert_sql . "'0',";

		$insert_sql = $insert_sql . "'".$this->location. "', ";

		$insert_sql = $insert_sql . "'n/a',";

		$insert_sql = $insert_sql . "'n/a', ";

		$insert_sql = $insert_sql . "'n/a',";

		$insert_sql = $insert_sql . "'n/a')";

		

		//echo "insert_sql = ".$insert_sql;

		//return;

		$insert_result = mysqli_query($dbh->link,$insert_sql);

		//$insert_result = mysql_query($insert_sql,$dbh->link);

		if (!$insert_result)

		{

			$this->msg = "Error: ".mysqli_error($dbh->link);

			//$this->msg = "Error: ".mysql_error($dbh->link);

			return;

		}

		else

		{

			$this->msg = "Thank you for filling the application form";

		}		

	}	

	//for Subscribe to our Newsletter! (ACT)

	function SendMail2()

	{

		//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

		//sending application entry mail to 

		

		require 'PHPMailerAutoload.php';

		//if(!$_POST) exit;

		//$email = $this->email;    //$res->email;

			$email = "nikkitefl@gmail.com";

			//$email = "nikita94.act@gmail.com";

			

			$errors = 0;

					

			//Create a new PHPMailer instance

			$mail = new PHPMailer;

			

			//Tell PHPMailer to use SMTP

			$mail->isSMTP();

			

			//Enable SMTP debugging

			// 0 = off (for production use)

			// 1 = client messages

			// 2 = client and server messages

			$mail->SMTPDebug = 0;

			

			//Ask for HTML-friendly debug output

			$mail->Debugoutput = 'html';

			

			//Set the hostname of the mail server

			//$mail->Host = 'smtp.gmail.com';

			$mail->Host = 'vps.teflindia.in';

			

			//Set the SMTP port number - 587 for authenticated TLS, a.k.a. RFC4409 SMTP submission

			$mail->Port = 465;

			

			//Set the encryption system to use - ssl (deprecated) or tls

			$mail->SMTPSecure = 'ssl';

			

			//Whether to use SMTP authentication

			$mail->SMTPAuth = true;

			

			//Username to use for SMTP authentication - use full email address for gmail

			$mail->Username = "applications@teflindia.in";

			//$mail->Username = "admin@teachersjobworld.com";

			

			//Password to use for SMTP authentication

			$mail->Password = "ACTApplications$56";

			//$mail->Password = "tjwportal20!";

			

			//Set who the message is to be sent from

			$mail->setFrom("applications@teflindia.in", "Asian College Of Teachers");

			//mail->setFrom("admin@teachersjobworld.com", "Teachers Job World");

			

			//Set an alternative reply-to address

			//$mail->addReplyTo('replyto@example.com', 'First Last');

			

			//Set who the message is to be sent to

			$mail->addAddress($email);

			$mail->addAddress("asiancollegeapplications@gmail.com");

			//$mail->addAddress("sampade.ati@gmail.com");

			//Set the subject line

			$mail->Subject = "Application-Form (acttefl.com)[#".$this->id."]";

		

		//Read an HTML message body from an external file, convert referenced images to embedded,

		//convert HTML into a basic plain-text alternative body

		

		$body = "";

		$body = "<html>

		<head>

		<meta http-equiv='Content-Type' content='text/html; charset=utf-8' />

		<title>Application-Form (acttefl.com)</title>

		</head>

		<body>

		 <table>

		<tbody>

		<tr>

		<td><b>Please mention your Name</b></td>

		<td>".$this->name."</td>

		</tr>

		<tr>

		<td><b>Please mention your Email</b></td>

		<td>".$this->email."</td>

		</tr>

		<tr>

		<td><b>Please mention your Phone Number</b></td>

		<td>".$this->contact."</td>

		</tr>

		<tr>

		<td><b>Location </b></td>

		<td>".$this->location."</td>

		</tr>

		

		</tbody>

		</table>

		</body>

		</html>";

		$mail->msgHTML($body);

		

		//Replace the plain text body with one created manually

		$mail->AltBody = 'This is a plain-text message body';

		

		//Attach an image file

		//$mail->addAttachment('images/phpmailer_mini.png');

		

		//send the message, check for errors

		if (!$mail->send()) {

			$this->msg = "Sorry! Unable to send Mail";

			return;

		} 

		else

		{

			$this->msg = "Thank you for filling the application form";

		}	

		

	}

	

	

	

	function InsertData3()

	{

		$dbh = new db_conn();

		$dbh->set_conn();

		$this->GenerateDataID();

		date_default_timezone_set('Asia/Kolkata');

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

		//insert data into tbl_data_entry table				

		$insert_sql = "insert into tbl_data_entry values ( ";

		$insert_sql = $insert_sql . $this->id. ",";

		$insert_sql = $insert_sql . "'".$this->name. "', ";

		$insert_sql = $insert_sql . "'Application (acttefl.com/120-hrs-International-tefl-certification-course.php)', ";

		$insert_sql = $insert_sql . "'0', ";

		$insert_sql = $insert_sql . "'0', ";

		$insert_sql = $insert_sql . "'n/a', ";

		$insert_sql = $insert_sql . "'n/a', ";

		$insert_sql = $insert_sql . "'0', ";

		$insert_sql = $insert_sql . "'3', ";

		$insert_sql = $insert_sql . "'Application (acttefl.com/120-hrs-International-tefl-certification-course.php)', ";

		$insert_sql = $insert_sql . "'".$this->email. "', ";

		$insert_sql = $insert_sql . "'".$this->contact. "', ";

		$insert_sql = $insert_sql . "'n/a', ";

		$insert_sql = $insert_sql . "'473', ";

		$insert_sql = $insert_sql . "'0', ";

		$insert_sql = $insert_sql . "'".date("Y-m-d H:i:s")."',";

		$insert_sql = $insert_sql . "'".date("Y-m-d H:i:s")."',";

		$insert_sql = $insert_sql . "'1',";

		$insert_sql = $insert_sql . "'n/a', ";

		$insert_sql = $insert_sql . "'n/a', ";

		$insert_sql = $insert_sql . "'n/a', ";

		$insert_sql = $insert_sql . "'ACTIVE', ";

		$insert_sql = $insert_sql . "'0', ";

		$insert_sql = $insert_sql . "'n/a', ";

		$insert_sql = $insert_sql . "'n/a', ";

		$insert_sql = $insert_sql . "'n/a', ";

		$insert_sql = $insert_sql . "'0', ";

		$insert_sql = $insert_sql . "'n/a', ";

		$insert_sql = $insert_sql . "'".date("Y-m-d h:i:s")."',";

		$insert_sql = $insert_sql . "'0',";

		$insert_sql = $insert_sql . "'0',";

		$insert_sql = $insert_sql . "'0',";

		$insert_sql = $insert_sql . "'".$this->location. "', ";

		$insert_sql = $insert_sql . "'n/a',";

		$insert_sql = $insert_sql . "'n/a', ";

		$insert_sql = $insert_sql . "'n/a',";

		$insert_sql = $insert_sql . "'n/a')";

		

		//echo "insert_sql = ".$insert_sql;

		//return;

		$insert_result = mysqli_query($dbh->link,$insert_sql);

		//$insert_result = mysql_query($insert_sql,$dbh->link);

		if (!$insert_result)

		{

			$this->msg = "Error: ".mysqli_error($dbh->link);

			//$this->msg = "Error: ".mysql_error($dbh->link);

			return;

		}

		else

		{

			$this->msg = "Thank you for filling the application form";

		}		

	}	

	//for Subscribe to our Newsletter! (ACT)

	function SendMail3()

	{

		//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

		//sending application entry mail to 

		

		require 'PHPMailerAutoload.php';

		//if(!$_POST) exit;

		//$email = $this->email;    //$res->email;

			$email = "nikkitefl@gmail.com";

			//$email = "nikita94.act@gmail.com";

			

			$errors = 0;

					

			//Create a new PHPMailer instance

			$mail = new PHPMailer;

			

			//Tell PHPMailer to use SMTP

			$mail->isSMTP();

			

			//Enable SMTP debugging

			// 0 = off (for production use)

			// 1 = client messages

			// 2 = client and server messages

			$mail->SMTPDebug = 0;

			

			//Ask for HTML-friendly debug output

			$mail->Debugoutput = 'html';

			

			//Set the hostname of the mail server

			//$mail->Host = 'smtp.gmail.com';

			$mail->Host = 'vps.teflindia.in';

			

			//Set the SMTP port number - 587 for authenticated TLS, a.k.a. RFC4409 SMTP submission

			$mail->Port = 465;

			

			//Set the encryption system to use - ssl (deprecated) or tls

			$mail->SMTPSecure = 'ssl';

			

			//Whether to use SMTP authentication

			$mail->SMTPAuth = true;

			

			//Username to use for SMTP authentication - use full email address for gmail

			$mail->Username = "applications@teflindia.in";

			//$mail->Username = "admin@teachersjobworld.com";

			

			//Password to use for SMTP authentication

			$mail->Password = "ACTApplications$56";

			//$mail->Password = "tjwportal20!";

			

			//Set who the message is to be sent from

			$mail->setFrom("applications@teflindia.in", "Asian College Of Teachers");

			//mail->setFrom("admin@teachersjobworld.com", "Teachers Job World");

			

			//Set an alternative reply-to address

			//$mail->addReplyTo('replyto@example.com', 'First Last');

			

			//Set who the message is to be sent to

			$mail->addAddress($email);

			$mail->addAddress("asiancollegeapplications@gmail.com");

			//$mail->addAddress("sampade.ati@gmail.com");

			//Set the subject line

			$mail->Subject = "Application (acttefl.com/120-hrs-International-tefl-certification-course.php)[#".$this->id."]";

		

		//Read an HTML message body from an external file, convert referenced images to embedded,

		//convert HTML into a basic plain-text alternative body

		

		$body = "";

		$body = "<html>

		<head>

		<meta http-equiv='Content-Type' content='text/html; charset=utf-8' />

		<title>Application (acttefl.com/120-hrs-International-tefl-certification-course.php)</title>

		</head>

		<body>

		 <table>

		<tbody>

		<tr>

		<td><b>Please mention your Name</b></td>

		<td>".$this->name."</td>

		</tr>

		<tr>

		<td><b>Please mention your Email</b></td>

		<td>".$this->email."</td>

		</tr>

		<tr>

		<td><b>Please mention your Phone Number</b></td>

		<td>".$this->contact."</td>

		</tr>

		<tr>

		<td><b>Location </b></td>

		<td>".$this->location."</td>

		</tr>

		

		</tbody>

		</table>

		</body>

		</html>";

		$mail->msgHTML($body);

		

		//Replace the plain text body with one created manually

		$mail->AltBody = 'This is a plain-text message body';

		

		//Attach an image file

		//$mail->addAttachment('images/phpmailer_mini.png');

		

		//send the message, check for errors

		if (!$mail->send()) {

			$this->msg = "Sorry! Unable to send Mail";

			return;

		} 

		else

		{

			$this->msg = "Thank you for filling the application form";

		}	

		

	}

	

	

	

	function InsertData4()

	{

		$dbh = new db_conn();

		$dbh->set_conn();

		$this->GenerateDataID();

		date_default_timezone_set('Asia/Kolkata');

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

		//insert data into tbl_data_entry table				

		$insert_sql = "insert into tbl_data_entry values ( ";

		$insert_sql = $insert_sql . $this->id. ",";

		$insert_sql = $insert_sql . "'".$this->name. "', ";

		$insert_sql = $insert_sql . "'Application (acttefl.com/220-hour-tefl-diploma.php)', ";

		$insert_sql = $insert_sql . "'0', ";

		$insert_sql = $insert_sql . "'0', ";

		$insert_sql = $insert_sql . "'n/a', ";

		$insert_sql = $insert_sql . "'n/a', ";

		$insert_sql = $insert_sql . "'0', ";

		$insert_sql = $insert_sql . "'3', ";

		$insert_sql = $insert_sql . "'Application (acttefl.com/220-hour-tefl-diploma.php)', ";

		$insert_sql = $insert_sql . "'".$this->email. "', ";

		$insert_sql = $insert_sql . "'".$this->contact. "', ";

		$insert_sql = $insert_sql . "'n/a', ";

		$insert_sql = $insert_sql . "'474', ";

		$insert_sql = $insert_sql . "'0', ";

		$insert_sql = $insert_sql . "'".date("Y-m-d H:i:s")."',";

		$insert_sql = $insert_sql . "'".date("Y-m-d H:i:s")."',";

		$insert_sql = $insert_sql . "'1',";

		$insert_sql = $insert_sql . "'n/a', ";

		$insert_sql = $insert_sql . "'n/a', ";

		$insert_sql = $insert_sql . "'n/a', ";

		$insert_sql = $insert_sql . "'ACTIVE', ";

		$insert_sql = $insert_sql . "'0', ";

		$insert_sql = $insert_sql . "'n/a', ";

		$insert_sql = $insert_sql . "'n/a', ";

		$insert_sql = $insert_sql . "'n/a', ";

		$insert_sql = $insert_sql . "'0', ";

		$insert_sql = $insert_sql . "'n/a', ";

		$insert_sql = $insert_sql . "'".date("Y-m-d h:i:s")."',";

		$insert_sql = $insert_sql . "'0',";

		$insert_sql = $insert_sql . "'0',";

		$insert_sql = $insert_sql . "'0',";

		$insert_sql = $insert_sql . "'".$this->location. "', ";

		$insert_sql = $insert_sql . "'n/a',";

		$insert_sql = $insert_sql . "'n/a', ";

		$insert_sql = $insert_sql . "'n/a',";

		$insert_sql = $insert_sql . "'n/a')";

		

		//echo "insert_sql = ".$insert_sql;

		//return;

		$insert_result = mysqli_query($dbh->link,$insert_sql);

		//$insert_result = mysql_query($insert_sql,$dbh->link);

		if (!$insert_result)

		{

			$this->msg = "Error: ".mysqli_error($dbh->link);

			//$this->msg = "Error: ".mysql_error($dbh->link);

			return;

		}

		else

		{

			$this->msg = "Thank you for filling the application form";

		}		

	}	

	//for Subscribe to our Newsletter! (ACT)

	function SendMail4()

	{

		//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

		//sending application entry mail to 

		

		require 'PHPMailerAutoload.php';

		//if(!$_POST) exit;

		//$email = $this->email;    //$res->email;

			$email = "nikkitefl@gmail.com";

			//$email = "nikita94.act@gmail.com";

			

			$errors = 0;

					

			//Create a new PHPMailer instance

			$mail = new PHPMailer;

			

			//Tell PHPMailer to use SMTP

			$mail->isSMTP();

			

			//Enable SMTP debugging

			// 0 = off (for production use)

			// 1 = client messages

			// 2 = client and server messages

			$mail->SMTPDebug = 0;

			

			//Ask for HTML-friendly debug output

			$mail->Debugoutput = 'html';

			

			//Set the hostname of the mail server

			//$mail->Host = 'smtp.gmail.com';

			$mail->Host = 'vps.teflindia.in';

			

			//Set the SMTP port number - 587 for authenticated TLS, a.k.a. RFC4409 SMTP submission

			$mail->Port = 465;

			

			//Set the encryption system to use - ssl (deprecated) or tls

			$mail->SMTPSecure = 'ssl';

			

			//Whether to use SMTP authentication

			$mail->SMTPAuth = true;

			

			//Username to use for SMTP authentication - use full email address for gmail

			$mail->Username = "applications@teflindia.in";

			//$mail->Username = "admin@teachersjobworld.com";

			

			//Password to use for SMTP authentication

			$mail->Password = "ACTApplications$56";

			//$mail->Password = "tjwportal20!";

			

			//Set who the message is to be sent from

			$mail->setFrom("applications@teflindia.in", "Asian College Of Teachers");

			//mail->setFrom("admin@teachersjobworld.com", "Teachers Job World");

			

			//Set an alternative reply-to address

			//$mail->addReplyTo('replyto@example.com', 'First Last');

			

			//Set who the message is to be sent to

			$mail->addAddress($email);

			$mail->addAddress("asiancollegeapplications@gmail.com");

			//$mail->addAddress("sampade.ati@gmail.com");

			//Set the subject line

			$mail->Subject = "Application (acttefl.com/220-hour-tefl-diploma.php)[#".$this->id."]";

		

		//Read an HTML message body from an external file, convert referenced images to embedded,

		//convert HTML into a basic plain-text alternative body

		

		$body = "";

		$body = "<html>

		<head>

		<meta http-equiv='Content-Type' content='text/html; charset=utf-8' />

		<title>Application (acttefl.com/220-hour-tefl-diploma.php)</title>

		</head>

		<body>

		 <table>

		<tbody>

		<tr>

		<td><b>Please mention your Name</b></td>

		<td>".$this->name."</td>

		</tr>

		<tr>

		<td><b>Please mention your Email</b></td>

		<td>".$this->email."</td>

		</tr>

		<tr>

		<td><b>Please mention your Phone Number</b></td>

		<td>".$this->contact."</td>

		</tr>

		<tr>

		<td><b>Location </b></td>

		<td>".$this->location."</td>

		</tr>

		

		</tbody>

		</table>

		</body>

		</html>";

		$mail->msgHTML($body);

		

		//Replace the plain text body with one created manually

		$mail->AltBody = 'This is a plain-text message body';

		

		//Attach an image file

		//$mail->addAttachment('images/phpmailer_mini.png');

		

		//send the message, check for errors

		if (!$mail->send()) {

			$this->msg = "Sorry! Unable to send Mail";

			return;

		} 

		else

		{

			$this->msg = "Thank you for filling the application form";

		}	

		

	}

	

	

		function InsertData5()

	{

		$dbh = new db_conn();

		$dbh->set_conn();

		$this->GenerateDataID();

		date_default_timezone_set('Asia/Kolkata');

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

		//insert data into tbl_data_entry table				

		$insert_sql = "insert into tbl_data_entry values ( ";

		$insert_sql = $insert_sql . $this->id. ",";

		$insert_sql = $insert_sql . "'".$this->name. "', ";

		$insert_sql = $insert_sql . "'Application (acttefl.com/280-hrs-International-tefl-advanced-diploma-course.php)', ";

		$insert_sql = $insert_sql . "'0', ";

		$insert_sql = $insert_sql . "'0', ";

		$insert_sql = $insert_sql . "'n/a', ";

		$insert_sql = $insert_sql . "'n/a', ";

		$insert_sql = $insert_sql . "'0', ";

		$insert_sql = $insert_sql . "'3', ";

		$insert_sql = $insert_sql . "'Application (acttefl.com/280-hrs-International-tefl-advanced-diploma-course.php)', ";

		$insert_sql = $insert_sql . "'".$this->email. "', ";

		$insert_sql = $insert_sql . "'".$this->contact. "', ";

		$insert_sql = $insert_sql . "'n/a', ";

		$insert_sql = $insert_sql . "'475', ";

		$insert_sql = $insert_sql . "'0', ";

		$insert_sql = $insert_sql . "'".date("Y-m-d H:i:s")."',";

		$insert_sql = $insert_sql . "'".date("Y-m-d H:i:s")."',";

		$insert_sql = $insert_sql . "'1',";

		$insert_sql = $insert_sql . "'n/a', ";

		$insert_sql = $insert_sql . "'n/a', ";

		$insert_sql = $insert_sql . "'n/a', ";

		$insert_sql = $insert_sql . "'ACTIVE', ";

		$insert_sql = $insert_sql . "'0', ";

		$insert_sql = $insert_sql . "'n/a', ";

		$insert_sql = $insert_sql . "'n/a', ";

		$insert_sql = $insert_sql . "'n/a', ";

		$insert_sql = $insert_sql . "'0', ";

		$insert_sql = $insert_sql . "'n/a', ";

		$insert_sql = $insert_sql . "'".date("Y-m-d h:i:s")."',";

		$insert_sql = $insert_sql . "'0',";

		$insert_sql = $insert_sql . "'0',";

		$insert_sql = $insert_sql . "'0',";

		$insert_sql = $insert_sql . "'".$this->location. "', ";

		$insert_sql = $insert_sql . "'n/a',";

		$insert_sql = $insert_sql . "'n/a', ";

		$insert_sql = $insert_sql . "'n/a',";

		$insert_sql = $insert_sql . "'n/a')";

		

		//echo "insert_sql = ".$insert_sql;

		//return;

		$insert_result = mysqli_query($dbh->link,$insert_sql);

		//$insert_result = mysql_query($insert_sql,$dbh->link);

		if (!$insert_result)

		{

			$this->msg = "Error: ".mysqli_error($dbh->link);

			//$this->msg = "Error: ".mysql_error($dbh->link);

			return;

		}

		else

		{

			$this->msg = "Thank you for filling the application form";

		}		

	}	

	//for Subscribe to our Newsletter! (ACT)

	function SendMail5()

	{

		//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

		//sending application entry mail to 

		

		require 'PHPMailerAutoload.php';

		//if(!$_POST) exit;

		//$email = $this->email;    //$res->email;

			$email = "nikkitefl@gmail.com";

			//$email = "nikita94.act@gmail.com";

			

			$errors = 0;

					

			//Create a new PHPMailer instance

			$mail = new PHPMailer;

			

			//Tell PHPMailer to use SMTP

			$mail->isSMTP();

			

			//Enable SMTP debugging

			// 0 = off (for production use)

			// 1 = client messages

			// 2 = client and server messages

			$mail->SMTPDebug = 0;

			

			//Ask for HTML-friendly debug output

			$mail->Debugoutput = 'html';

			

			//Set the hostname of the mail server

			//$mail->Host = 'smtp.gmail.com';

			$mail->Host = 'vps.teflindia.in';

			

			//Set the SMTP port number - 587 for authenticated TLS, a.k.a. RFC4409 SMTP submission

			$mail->Port = 465;

			

			//Set the encryption system to use - ssl (deprecated) or tls

			$mail->SMTPSecure = 'ssl';

			

			//Whether to use SMTP authentication

			$mail->SMTPAuth = true;

			

			//Username to use for SMTP authentication - use full email address for gmail

			$mail->Username = "applications@teflindia.in";

			//$mail->Username = "admin@teachersjobworld.com";

			

			//Password to use for SMTP authentication

			$mail->Password = "ACTApplications$56";

			//$mail->Password = "tjwportal20!";

			

			//Set who the message is to be sent from

			$mail->setFrom("applications@teflindia.in", "Asian College Of Teachers");

			//mail->setFrom("admin@teachersjobworld.com", "Teachers Job World");

			

			//Set an alternative reply-to address

			//$mail->addReplyTo('replyto@example.com', 'First Last');

			

			//Set who the message is to be sent to

			$mail->addAddress($email);

			$mail->addAddress("asiancollegeapplications@gmail.com");

			//$mail->addAddress("sampade.ati@gmail.com");

			//Set the subject line

			$mail->Subject = "Application (acttefl.com/280-hrs-International-tefl-advanced-diploma-course.php)[#".$this->id."]";

		

		//Read an HTML message body from an external file, convert referenced images to embedded,

		//convert HTML into a basic plain-text alternative body

		

		$body = "";

		$body = "<html>

		<head>

		<meta http-equiv='Content-Type' content='text/html; charset=utf-8' />

		<title>Application (acttefl.com/280-hrs-International-tefl-advanced-diploma-course.php)</title>

		</head>

		<body>

		 <table>

		<tbody>

		<tr>

		<td><b>Please mention your Name</b></td>

		<td>".$this->name."</td>

		</tr>

		<tr>

		<td><b>Please mention your Email</b></td>

		<td>".$this->email."</td>

		</tr>

		<tr>

		<td><b>Please mention your Phone Number</b></td>

		<td>".$this->contact."</td>

		</tr>

		<tr>

		<td><b>Location </b></td>

		<td>".$this->location."</td>

		</tr>

		

		</tbody>

		</table>

		</body>

		</html>";

		$mail->msgHTML($body);

		

		//Replace the plain text body with one created manually

		$mail->AltBody = 'This is a plain-text message body';

		

		//Attach an image file

		//$mail->addAttachment('images/phpmailer_mini.png');

		

		//send the message, check for errors

		if (!$mail->send()) {

			$this->msg = "Sorry! Unable to send Mail";

			return;

		} 

		else

		{

			$this->msg = "Thank you for filling the application form";

		}	

		

	}

	

	function InsertData6()

	{

		$dbh = new db_conn();

		$dbh->set_conn();

		$this->GenerateDataID();

		date_default_timezone_set('Asia/Kolkata');

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

		//insert data into tbl_data_entry table				

		$insert_sql = "insert into tbl_data_entry values ( ";

		$insert_sql = $insert_sql . $this->id. ",";

		$insert_sql = $insert_sql . "'".$this->name. "', ";

		$insert_sql = $insert_sql . "'Application (acttefl.com/400-hrs-International-tefl-pg-diploma-course.php)', ";

		$insert_sql = $insert_sql . "'0', ";

		$insert_sql = $insert_sql . "'0', ";

		$insert_sql = $insert_sql . "'n/a', ";

		$insert_sql = $insert_sql . "'n/a', ";

		$insert_sql = $insert_sql . "'0', ";

		$insert_sql = $insert_sql . "'3', ";

		$insert_sql = $insert_sql . "'Application (acttefl.com/400-hrs-International-tefl-pg-diploma-course.php)', ";

		$insert_sql = $insert_sql . "'".$this->email. "', ";

		$insert_sql = $insert_sql . "'".$this->contact. "', ";

		$insert_sql = $insert_sql . "'n/a', ";

		$insert_sql = $insert_sql . "'476', ";

		$insert_sql = $insert_sql . "'0', ";

		$insert_sql = $insert_sql . "'".date("Y-m-d H:i:s")."',";

		$insert_sql = $insert_sql . "'".date("Y-m-d H:i:s")."',";

		$insert_sql = $insert_sql . "'1',";

		$insert_sql = $insert_sql . "'n/a', ";

		$insert_sql = $insert_sql . "'n/a', ";

		$insert_sql = $insert_sql . "'n/a', ";

		$insert_sql = $insert_sql . "'ACTIVE', ";

		$insert_sql = $insert_sql . "'0', ";

		$insert_sql = $insert_sql . "'n/a', ";

		$insert_sql = $insert_sql . "'n/a', ";

		$insert_sql = $insert_sql . "'n/a', ";

		$insert_sql = $insert_sql . "'0', ";

		$insert_sql = $insert_sql . "'n/a', ";

		$insert_sql = $insert_sql . "'".date("Y-m-d h:i:s")."',";

		$insert_sql = $insert_sql . "'0',";

		$insert_sql = $insert_sql . "'0',";

		$insert_sql = $insert_sql . "'0',";

		$insert_sql = $insert_sql . "'".$this->location. "', ";

		$insert_sql = $insert_sql . "'n/a',";

		$insert_sql = $insert_sql . "'n/a', ";

		$insert_sql = $insert_sql . "'n/a',";

		$insert_sql = $insert_sql . "'n/a')";

		

		//echo "insert_sql = ".$insert_sql;

		//return;

		$insert_result = mysqli_query($dbh->link,$insert_sql);

		//$insert_result = mysql_query($insert_sql,$dbh->link);

		if (!$insert_result)

		{

			$this->msg = "Error: ".mysqli_error($dbh->link);

			//$this->msg = "Error: ".mysql_error($dbh->link);

			return;

		}

		else

		{

			$this->msg = "Thank you for filling the application form";

		}		

	}	

	//for Subscribe to our Newsletter! (ACT)

	function SendMail6()

	{

		//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

		//sending application entry mail to 

		

		require 'PHPMailerAutoload.php';

		//if(!$_POST) exit;

		//$email = $this->email;    //$res->email;

			$email = "nikkitefl@gmail.com";

			//$email = "nikita94.act@gmail.com";

			

			$errors = 0;

					

			//Create a new PHPMailer instance

			$mail = new PHPMailer;

			

			//Tell PHPMailer to use SMTP

			$mail->isSMTP();

			

			//Enable SMTP debugging

			// 0 = off (for production use)

			// 1 = client messages

			// 2 = client and server messages

			$mail->SMTPDebug = 0;

			

			//Ask for HTML-friendly debug output

			$mail->Debugoutput = 'html';

			

			//Set the hostname of the mail server

			//$mail->Host = 'smtp.gmail.com';

			$mail->Host = 'vps.teflindia.in';

			

			//Set the SMTP port number - 587 for authenticated TLS, a.k.a. RFC4409 SMTP submission

			$mail->Port = 465;

			

			//Set the encryption system to use - ssl (deprecated) or tls

			$mail->SMTPSecure = 'ssl';

			

			//Whether to use SMTP authentication

			$mail->SMTPAuth = true;

			

			//Username to use for SMTP authentication - use full email address for gmail

			$mail->Username = "applications@teflindia.in";

			//$mail->Username = "admin@teachersjobworld.com";

			

			//Password to use for SMTP authentication

			$mail->Password = "ACTApplications$56";

			//$mail->Password = "tjwportal20!";

			

			//Set who the message is to be sent from

			$mail->setFrom("applications@teflindia.in", "Asian College Of Teachers");

			//mail->setFrom("admin@teachersjobworld.com", "Teachers Job World");

			

			//Set an alternative reply-to address

			//$mail->addReplyTo('replyto@example.com', 'First Last');

			

			//Set who the message is to be sent to

			$mail->addAddress($email);

			$mail->addAddress("asiancollegeapplications@gmail.com");

			//$mail->addAddress("sampade.ati@gmail.com");

			//Set the subject line

			$mail->Subject = "Application (acttefl.com/400-hrs-International-tefl-pg-diploma-course.php)[#".$this->id."]";

		

		//Read an HTML message body from an external file, convert referenced images to embedded,

		//convert HTML into a basic plain-text alternative body

		

		$body = "";

		$body = "<html>

		<head>

		<meta http-equiv='Content-Type' content='text/html; charset=utf-8' />

		<title>Application (acttefl.com/400-hrs-International-tefl-pg-diploma-course.php)</title>

		</head>

		<body>

		 <table>

		<tbody>

		<tr>

		<td><b>Please mention your Name</b></td>

		<td>".$this->name."</td>

		</tr>

		<tr>

		<td><b>Please mention your Email</b></td>

		<td>".$this->email."</td>

		</tr>

		<tr>

		<td><b>Please mention your Phone Number</b></td>

		<td>".$this->contact."</td>

		</tr>

		<tr>

		<td><b>Location </b></td>

		<td>".$this->location."</td>

		</tr>

		

		</tbody>

		</table>

		</body>

		</html>";

		$mail->msgHTML($body);

		

		//Replace the plain text body with one created manually

		$mail->AltBody = 'This is a plain-text message body';

		

		//Attach an image file

		//$mail->addAttachment('images/phpmailer_mini.png');

		

		//send the message, check for errors

		if (!$mail->send()) {

			$this->msg = "Sorry! Unable to send Mail";

			return;

		} 

		else

		{

			$this->msg = "Thank you for filling the application form";

		}	

		

	}

	

	

	

	function InsertData7()

	{

		$dbh = new db_conn();

		$dbh->set_conn();

		$this->GenerateDataID();

		date_default_timezone_set('Asia/Kolkata');

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

		//insert data into tbl_data_entry table				

		$insert_sql = "insert into tbl_data_entry values ( ";

		$insert_sql = $insert_sql . $this->id. ",";

		$insert_sql = $insert_sql . "'".$this->name. "', ";

		$insert_sql = $insert_sql . "'Application (acttefl.com/tefl-live-online.php)', ";

		$insert_sql = $insert_sql . "'0', ";

		$insert_sql = $insert_sql . "'0', ";

		$insert_sql = $insert_sql . "'n/a', ";

		$insert_sql = $insert_sql . "'n/a', ";

		$insert_sql = $insert_sql . "'0', ";

		$insert_sql = $insert_sql . "'3', ";

		$insert_sql = $insert_sql . "'Application (acttefl.com/tefl-live-online.php)', ";

		$insert_sql = $insert_sql . "'".$this->email. "', ";

		$insert_sql = $insert_sql . "'".$this->contact. "', ";

		$insert_sql = $insert_sql . "'n/a', ";

		$insert_sql = $insert_sql . "'478', ";

		$insert_sql = $insert_sql . "'0', ";

		$insert_sql = $insert_sql . "'".date("Y-m-d H:i:s")."',";

		$insert_sql = $insert_sql . "'".date("Y-m-d H:i:s")."',";

		$insert_sql = $insert_sql . "'1',";

		$insert_sql = $insert_sql . "'n/a', ";

		$insert_sql = $insert_sql . "'n/a', ";

		$insert_sql = $insert_sql . "'n/a', ";

		$insert_sql = $insert_sql . "'ACTIVE', ";

		$insert_sql = $insert_sql . "'0', ";

		$insert_sql = $insert_sql . "'n/a', ";

		$insert_sql = $insert_sql . "'n/a', ";

		$insert_sql = $insert_sql . "'n/a', ";

		$insert_sql = $insert_sql . "'0', ";

		$insert_sql = $insert_sql . "'n/a', ";

		$insert_sql = $insert_sql . "'".date("Y-m-d h:i:s")."',";

		$insert_sql = $insert_sql . "'0',";

		$insert_sql = $insert_sql . "'0',";

		$insert_sql = $insert_sql . "'0',";

		$insert_sql = $insert_sql . "'".$this->location. "', ";

		$insert_sql = $insert_sql . "'n/a',";

		$insert_sql = $insert_sql . "'n/a', ";

		$insert_sql = $insert_sql . "'n/a',";

		$insert_sql = $insert_sql . "'n/a')";

		

		//echo "insert_sql = ".$insert_sql;

		//return;

		$insert_result = mysqli_query($dbh->link,$insert_sql);

		//$insert_result = mysql_query($insert_sql,$dbh->link);

		if (!$insert_result)

		{

			$this->msg = "Error: ".mysqli_error($dbh->link);

			//$this->msg = "Error: ".mysql_error($dbh->link);

			return;

		}

		else

		{

			$this->msg = "Thank you for filling the application form";

		}		

	}	

	//for Subscribe to our Newsletter! (ACT)

	function SendMail7()

	{

		//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

		//sending application entry mail to 

		

		require 'PHPMailerAutoload.php';

		//if(!$_POST) exit;

		//$email = $this->email;    //$res->email;

			$email = "nikkitefl@gmail.com";

			//$email = "nikita94.act@gmail.com";

			

			$errors = 0;

					

			//Create a new PHPMailer instance

			$mail = new PHPMailer;

			

			//Tell PHPMailer to use SMTP

			$mail->isSMTP();

			

			//Enable SMTP debugging

			// 0 = off (for production use)

			// 1 = client messages

			// 2 = client and server messages

			$mail->SMTPDebug = 0;

			

			//Ask for HTML-friendly debug output

			$mail->Debugoutput = 'html';

			

			//Set the hostname of the mail server

			//$mail->Host = 'smtp.gmail.com';

			$mail->Host = 'vps.teflindia.in';

			

			//Set the SMTP port number - 587 for authenticated TLS, a.k.a. RFC4409 SMTP submission

			$mail->Port = 465;

			

			//Set the encryption system to use - ssl (deprecated) or tls

			$mail->SMTPSecure = 'ssl';

			

			//Whether to use SMTP authentication

			$mail->SMTPAuth = true;

			

			//Username to use for SMTP authentication - use full email address for gmail

			$mail->Username = "applications@teflindia.in";

			//$mail->Username = "admin@teachersjobworld.com";

			

			//Password to use for SMTP authentication

			$mail->Password = "ACTApplications$56";

			//$mail->Password = "tjwportal20!";

			

			//Set who the message is to be sent from

			$mail->setFrom("applications@teflindia.in", "Asian College Of Teachers");

			//mail->setFrom("admin@teachersjobworld.com", "Teachers Job World");

			

			//Set an alternative reply-to address

			//$mail->addReplyTo('replyto@example.com', 'First Last');

			

			//Set who the message is to be sent to

			$mail->addAddress($email);

			$mail->addAddress("asiancollegeapplications@gmail.com");

			//$mail->addAddress("sampade.ati@gmail.com");

			//Set the subject line

			$mail->Subject = "Application (acttefl.com/tefl-live-online.php)[#".$this->id."]";

		

		//Read an HTML message body from an external file, convert referenced images to embedded,

		//convert HTML into a basic plain-text alternative body

		

		$body = "";

		$body = "<html>

		<head>

		<meta http-equiv='Content-Type' content='text/html; charset=utf-8' />

		<title>Application (acttefl.com/tefl-live-online.php)</title>

		</head>

		<body>

		 <table>

		<tbody>

		<tr>

		<td><b>Please mention your Name</b></td>

		<td>".$this->name."</td>

		</tr>

		<tr>

		<td><b>Please mention your Email</b></td>

		<td>".$this->email."</td>

		</tr>

		<tr>

		<td><b>Please mention your Phone Number</b></td>

		<td>".$this->contact."</td>

		</tr>

		<tr>

		<td><b>Location </b></td>

		<td>".$this->location."</td>

		</tr>

		

		</tbody>

		</table>

		</body>

		</html>";

		$mail->msgHTML($body);

		

		//Replace the plain text body with one created manually

		$mail->AltBody = 'This is a plain-text message body';

		

		//Attach an image file

		//$mail->addAttachment('images/phpmailer_mini.png');

		

		//send the message, check for errors

		if (!$mail->send()) {

			$this->msg = "Sorry! Unable to send Mail";

			return;

		} 

		else

		{

			$this->msg = "Thank you for filling the application form";

		}	

		

	}

	

	function InsertData8()

	{

		$dbh = new db_conn();

		$dbh->set_conn();

		$this->GenerateDataID();

		date_default_timezone_set('Asia/Kolkata');

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

		//insert data into tbl_data_entry table				

		$insert_sql = "insert into tbl_data_entry values ( ";

		$insert_sql = $insert_sql . $this->id. ",";

		$insert_sql = $insert_sql . "'".$this->name. "', ";

		$insert_sql = $insert_sql . "'Application (acttefl.com/diploma-in-teaching.php)', ";

		$insert_sql = $insert_sql . "'0', ";

		$insert_sql = $insert_sql . "'0', ";

		$insert_sql = $insert_sql . "'n/a', ";

		$insert_sql = $insert_sql . "'n/a', ";

		$insert_sql = $insert_sql . "'0', ";

		$insert_sql = $insert_sql . "'3', ";

		$insert_sql = $insert_sql . "'Application (acttefl.com/diploma-in-teaching.php)', ";

		$insert_sql = $insert_sql . "'".$this->email. "', ";

		$insert_sql = $insert_sql . "'".$this->contact. "', ";

		$insert_sql = $insert_sql . "'n/a', ";

		$insert_sql = $insert_sql . "'477', ";

		$insert_sql = $insert_sql . "'0', ";

		$insert_sql = $insert_sql . "'".date("Y-m-d H:i:s")."',";

		$insert_sql = $insert_sql . "'".date("Y-m-d H:i:s")."',";

		$insert_sql = $insert_sql . "'1',";

		$insert_sql = $insert_sql . "'n/a', ";

		$insert_sql = $insert_sql . "'n/a', ";

		$insert_sql = $insert_sql . "'n/a', ";

		$insert_sql = $insert_sql . "'ACTIVE', ";

		$insert_sql = $insert_sql . "'0', ";

		$insert_sql = $insert_sql . "'n/a', ";

		$insert_sql = $insert_sql . "'n/a', ";

		$insert_sql = $insert_sql . "'n/a', ";

		$insert_sql = $insert_sql . "'0', ";

		$insert_sql = $insert_sql . "'n/a', ";

		$insert_sql = $insert_sql . "'".date("Y-m-d h:i:s")."',";

		$insert_sql = $insert_sql . "'0',";

		$insert_sql = $insert_sql . "'0',";

		$insert_sql = $insert_sql . "'0',";

		$insert_sql = $insert_sql . "'".$this->location. "', ";

		$insert_sql = $insert_sql . "'n/a',";

		$insert_sql = $insert_sql . "'n/a', ";

		$insert_sql = $insert_sql . "'n/a',";

		$insert_sql = $insert_sql . "'n/a')";

		

		//echo "insert_sql = ".$insert_sql;

		//return;

		$insert_result = mysqli_query($dbh->link,$insert_sql);

		//$insert_result = mysql_query($insert_sql,$dbh->link);

		if (!$insert_result)

		{

			$this->msg = "Error: ".mysqli_error($dbh->link);

			//$this->msg = "Error: ".mysql_error($dbh->link);

			return;

		}

		else

		{

			$this->msg = "Thank you for filling the application form";

		}		

	}	

	//for Subscribe to our Newsletter! (ACT)

	function SendMail8()

	{

		//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

		//sending application entry mail to 

		

		require 'PHPMailerAutoload.php';

		//if(!$_POST) exit;

		//$email = $this->email;    //$res->email;

			$email = "nikkitefl@gmail.com";

			//$email = "nikita94.act@gmail.com";

			

			$errors = 0;

					

			//Create a new PHPMailer instance

			$mail = new PHPMailer;

			

			//Tell PHPMailer to use SMTP

			$mail->isSMTP();

			

			//Enable SMTP debugging

			// 0 = off (for production use)

			// 1 = client messages

			// 2 = client and server messages

			$mail->SMTPDebug = 0;

			

			//Ask for HTML-friendly debug output

			$mail->Debugoutput = 'html';

			

			//Set the hostname of the mail server

			//$mail->Host = 'smtp.gmail.com';

			$mail->Host = 'vps.teflindia.in';

			

			//Set the SMTP port number - 587 for authenticated TLS, a.k.a. RFC4409 SMTP submission

			$mail->Port = 465;

			

			//Set the encryption system to use - ssl (deprecated) or tls

			$mail->SMTPSecure = 'ssl';

			

			//Whether to use SMTP authentication

			$mail->SMTPAuth = true;

			

			//Username to use for SMTP authentication - use full email address for gmail

			$mail->Username = "applications@teflindia.in";

			//$mail->Username = "admin@teachersjobworld.com";

			

			//Password to use for SMTP authentication

			$mail->Password = "ACTApplications$56";

			//$mail->Password = "tjwportal20!";

			

			//Set who the message is to be sent from

			$mail->setFrom("applications@teflindia.in", "Asian College Of Teachers");

			//mail->setFrom("admin@teachersjobworld.com", "Teachers Job World");

			

			//Set an alternative reply-to address

			//$mail->addReplyTo('replyto@example.com', 'First Last');

			

			//Set who the message is to be sent to

			$mail->addAddress($email);

			$mail->addAddress("asiancollegeapplications@gmail.com");

			//$mail->addAddress("sampade.ati@gmail.com");

			//Set the subject line

			$mail->Subject = "Application (acttefl.com/diploma-in-teaching.php)[#".$this->id."]";

		

		//Read an HTML message body from an external file, convert referenced images to embedded,

		//convert HTML into a basic plain-text alternative body

		

		$body = "";

		$body = "<html>

		<head>

		<meta http-equiv='Content-Type' content='text/html; charset=utf-8' />

		<title>Application (acttefl.com/diploma-in-teaching.php)</title>

		</head>

		<body>

		 <table>

		<tbody>

		<tr>

		<td><b>Please mention your Name</b></td>

		<td>".$this->name."</td>

		</tr>

		<tr>

		<td><b>Please mention your Email</b></td>

		<td>".$this->email."</td>

		</tr>

		<tr>

		<td><b>Please mention your Phone Number</b></td>

		<td>".$this->contact."</td>

		</tr>

		<tr>

		<td><b>Location </b></td>

		<td>".$this->location."</td>

		</tr>

		

		</tbody>

		</table>

		</body>

		</html>";

		$mail->msgHTML($body);

		

		//Replace the plain text body with one created manually

		$mail->AltBody = 'This is a plain-text message body';

		

		//Attach an image file

		//$mail->addAttachment('images/phpmailer_mini.png');

		

		//send the message, check for errors

		if (!$mail->send()) {

			$this->msg = "Sorry! Unable to send Mail";

			return;

		} 

		else

		{

			$this->msg = "Thank you for filling the application form";

		}	

		

	}

	

	

	function InsertData9()

	{

		$dbh = new db_conn();

		$dbh->set_conn();

		$this->GenerateDataID();

		date_default_timezone_set('Asia/Kolkata');

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

		//insert data into tbl_data_entry table				

		$insert_sql = "insert into tbl_data_entry values ( ";

		$insert_sql = $insert_sql . $this->id. ",";

		$insert_sql = $insert_sql . "'".$this->name. "', ";

		$insert_sql = $insert_sql . "'Application (acttefl.com/bachelor-of-education-in-tesol.php)', ";

		$insert_sql = $insert_sql . "'0', ";

		$insert_sql = $insert_sql . "'0', ";

		$insert_sql = $insert_sql . "'n/a', ";

		$insert_sql = $insert_sql . "'n/a', ";

		$insert_sql = $insert_sql . "'0', ";

		$insert_sql = $insert_sql . "'3', ";

		$insert_sql = $insert_sql . "'Application (acttefl.com/bachelor-of-education-in-tesol.php)', ";

		$insert_sql = $insert_sql . "'".$this->email. "', ";

		$insert_sql = $insert_sql . "'".$this->contact. "', ";

		$insert_sql = $insert_sql . "'n/a', ";

		$insert_sql = $insert_sql . "'479', ";

		$insert_sql = $insert_sql . "'0', ";

		$insert_sql = $insert_sql . "'".date("Y-m-d H:i:s")."',";

		$insert_sql = $insert_sql . "'".date("Y-m-d H:i:s")."',";

		$insert_sql = $insert_sql . "'1',";

		$insert_sql = $insert_sql . "'n/a', ";

		$insert_sql = $insert_sql . "'n/a', ";

		$insert_sql = $insert_sql . "'n/a', ";

		$insert_sql = $insert_sql . "'ACTIVE', ";

		$insert_sql = $insert_sql . "'0', ";

		$insert_sql = $insert_sql . "'n/a', ";

		$insert_sql = $insert_sql . "'n/a', ";

		$insert_sql = $insert_sql . "'n/a', ";

		$insert_sql = $insert_sql . "'0', ";

		$insert_sql = $insert_sql . "'n/a', ";

		$insert_sql = $insert_sql . "'".date("Y-m-d h:i:s")."',";

		$insert_sql = $insert_sql . "'0',";

		$insert_sql = $insert_sql . "'0',";

		$insert_sql = $insert_sql . "'0',";

		$insert_sql = $insert_sql . "'".$this->location. "', ";

		$insert_sql = $insert_sql . "'n/a',";

		$insert_sql = $insert_sql . "'n/a', ";

		$insert_sql = $insert_sql . "'n/a',";

		$insert_sql = $insert_sql . "'n/a')";

		

		//echo "insert_sql = ".$insert_sql;

		//return;

		$insert_result = mysqli_query($dbh->link,$insert_sql);

		//$insert_result = mysql_query($insert_sql,$dbh->link);

		if (!$insert_result)

		{

			$this->msg = "Error: ".mysqli_error($dbh->link);

			//$this->msg = "Error: ".mysql_error($dbh->link);

			return;

		}

		else

		{

			$this->msg = "Thank you for filling the application form";

		}		

	}	

	//for Subscribe to our Newsletter! (ACT)

	function SendMail9()

	{

		//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

		//sending application entry mail to 

		

		require 'PHPMailerAutoload.php';

		//if(!$_POST) exit;

		//$email = $this->email;    //$res->email;

			$email = "nikkitefl@gmail.com";

			//$email = "nikita94.act@gmail.com";

			

			$errors = 0;

					

			//Create a new PHPMailer instance

			$mail = new PHPMailer;

			

			//Tell PHPMailer to use SMTP

			$mail->isSMTP();

			

			//Enable SMTP debugging

			// 0 = off (for production use)

			// 1 = client messages

			// 2 = client and server messages

			$mail->SMTPDebug = 0;

			

			//Ask for HTML-friendly debug output

			$mail->Debugoutput = 'html';

			

			//Set the hostname of the mail server

			//$mail->Host = 'smtp.gmail.com';

			$mail->Host = 'vps.teflindia.in';

			

			//Set the SMTP port number - 587 for authenticated TLS, a.k.a. RFC4409 SMTP submission

			$mail->Port = 465;

			

			//Set the encryption system to use - ssl (deprecated) or tls

			$mail->SMTPSecure = 'ssl';

			

			//Whether to use SMTP authentication

			$mail->SMTPAuth = true;

			

			//Username to use for SMTP authentication - use full email address for gmail

			$mail->Username = "applications@teflindia.in";

			//$mail->Username = "admin@teachersjobworld.com";

			

			//Password to use for SMTP authentication

			$mail->Password = "ACTApplications$56";

			//$mail->Password = "tjwportal20!";

			

			//Set who the message is to be sent from

			$mail->setFrom("applications@teflindia.in", "Asian College Of Teachers");

			//mail->setFrom("admin@teachersjobworld.com", "Teachers Job World");

			

			//Set an alternative reply-to address

			//$mail->addReplyTo('replyto@example.com', 'First Last');

			

			//Set who the message is to be sent to

			$mail->addAddress($email);

			$mail->addAddress("asiancollegeapplications@gmail.com");

			//$mail->addAddress("sampade.ati@gmail.com");

			//Set the subject line

			$mail->Subject = "Application (acttefl.com/bachelor-of-education-in-tesol.php)[#".$this->id."]";

		

		//Read an HTML message body from an external file, convert referenced images to embedded,

		//convert HTML into a basic plain-text alternative body

		

		$body = "";

		$body = "<html>

		<head>

		<meta http-equiv='Content-Type' content='text/html; charset=utf-8' />

		<title>Application (acttefl.com/bachelor-of-education-in-tesol.php)</title>

		</head>

		<body>

		 <table>

		<tbody>

		<tr>

		<td><b>Please mention your Name</b></td>

		<td>".$this->name."</td>

		</tr>

		<tr>

		<td><b>Please mention your Email</b></td>

		<td>".$this->email."</td>

		</tr>

		<tr>

		<td><b>Please mention your Phone Number</b></td>

		<td>".$this->contact."</td>

		</tr>

		<tr>

		<td><b>Location </b></td>

		<td>".$this->location."</td>

		</tr>

		

		</tbody>

		</table>

		</body>

		</html>";

		$mail->msgHTML($body);

		

		//Replace the plain text body with one created manually

		$mail->AltBody = 'This is a plain-text message body';

		

		//Attach an image file

		//$mail->addAttachment('images/phpmailer_mini.png');

		

		//send the message, check for errors

		if (!$mail->send()) {

			$this->msg = "Sorry! Unable to send Mail";

			return;

		} 

		else

		{

			$this->msg = "Thank you for filling the application form";

		}	

		

	}

	

	

	

	function InsertData10()

	{

		$dbh = new db_conn();

		$dbh->set_conn();

		$this->GenerateDataID();

		date_default_timezone_set('Asia/Kolkata');

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

		//insert data into tbl_data_entry table				

		$insert_sql = "insert into tbl_data_entry values ( ";

		$insert_sql = $insert_sql . $this->id. ",";

		$insert_sql = $insert_sql . "'".$this->name. "', ";

		$insert_sql = $insert_sql . "'Application (acttefl.com/masters-of-arts-in-education-with-tesol.php)', ";

		$insert_sql = $insert_sql . "'0', ";

		$insert_sql = $insert_sql . "'0', ";

		$insert_sql = $insert_sql . "'n/a', ";

		$insert_sql = $insert_sql . "'n/a', ";

		$insert_sql = $insert_sql . "'0', ";

		$insert_sql = $insert_sql . "'3', ";

		$insert_sql = $insert_sql . "'Application (acttefl.com/masters-of-arts-in-education-with-tesol.php)', ";

		$insert_sql = $insert_sql . "'".$this->email. "', ";

		$insert_sql = $insert_sql . "'".$this->contact. "', ";

		$insert_sql = $insert_sql . "'n/a', ";

		$insert_sql = $insert_sql . "'480', ";

		$insert_sql = $insert_sql . "'0', ";

		$insert_sql = $insert_sql . "'".date("Y-m-d H:i:s")."',";

		$insert_sql = $insert_sql . "'".date("Y-m-d H:i:s")."',";

		$insert_sql = $insert_sql . "'1',";

		$insert_sql = $insert_sql . "'n/a', ";

		$insert_sql = $insert_sql . "'n/a', ";

		$insert_sql = $insert_sql . "'n/a', ";

		$insert_sql = $insert_sql . "'ACTIVE', ";

		$insert_sql = $insert_sql . "'0', ";

		$insert_sql = $insert_sql . "'n/a', ";

		$insert_sql = $insert_sql . "'n/a', ";

		$insert_sql = $insert_sql . "'n/a', ";

		$insert_sql = $insert_sql . "'0', ";

		$insert_sql = $insert_sql . "'n/a', ";

		$insert_sql = $insert_sql . "'".date("Y-m-d h:i:s")."',";

		$insert_sql = $insert_sql . "'0',";

		$insert_sql = $insert_sql . "'0',";

		$insert_sql = $insert_sql . "'0',";

		$insert_sql = $insert_sql . "'".$this->location. "', ";

		$insert_sql = $insert_sql . "'n/a',";

		$insert_sql = $insert_sql . "'n/a', ";

		$insert_sql = $insert_sql . "'n/a',";

		$insert_sql = $insert_sql . "'n/a')";

		

		//echo "insert_sql = ".$insert_sql;

		//return;

		$insert_result = mysqli_query($dbh->link,$insert_sql);

		//$insert_result = mysql_query($insert_sql,$dbh->link);

		if (!$insert_result)

		{

			$this->msg = "Error: ".mysqli_error($dbh->link);

			//$this->msg = "Error: ".mysql_error($dbh->link);

			return;

		}

		else

		{

			$this->msg = "Thank you for filling the application form";

		}		

	}	

	//for Subscribe to our Newsletter! (ACT)

	function SendMail10()

	{

		//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

		//sending application entry mail to 

		

		require 'PHPMailerAutoload.php';

		//if(!$_POST) exit;

		//$email = $this->email;    //$res->email;

			$email = "nikkitefl@gmail.com";

			//$email = "nikita94.act@gmail.com";

			

			$errors = 0;

					

			//Create a new PHPMailer instance

			$mail = new PHPMailer;

			

			//Tell PHPMailer to use SMTP

			$mail->isSMTP();

			

			//Enable SMTP debugging

			// 0 = off (for production use)

			// 1 = client messages

			// 2 = client and server messages

			$mail->SMTPDebug = 0;

			

			//Ask for HTML-friendly debug output

			$mail->Debugoutput = 'html';

			

			//Set the hostname of the mail server

			//$mail->Host = 'smtp.gmail.com';

			$mail->Host = 'vps.teflindia.in';

			

			//Set the SMTP port number - 587 for authenticated TLS, a.k.a. RFC4409 SMTP submission

			$mail->Port = 465;

			

			//Set the encryption system to use - ssl (deprecated) or tls

			$mail->SMTPSecure = 'ssl';

			

			//Whether to use SMTP authentication

			$mail->SMTPAuth = true;

			

			//Username to use for SMTP authentication - use full email address for gmail

			$mail->Username = "applications@teflindia.in";

			//$mail->Username = "admin@teachersjobworld.com";

			

			//Password to use for SMTP authentication

			$mail->Password = "ACTApplications$56";

			//$mail->Password = "tjwportal20!";

			

			//Set who the message is to be sent from

			$mail->setFrom("applications@teflindia.in", "Asian College Of Teachers");

			//mail->setFrom("admin@teachersjobworld.com", "Teachers Job World");

			

			//Set an alternative reply-to address

			//$mail->addReplyTo('replyto@example.com', 'First Last');

			

			//Set who the message is to be sent to

			$mail->addAddress($email);

			$mail->addAddress("asiancollegeapplications@gmail.com");

			//$mail->addAddress("sampade.ati@gmail.com");

			//Set the subject line

			$mail->Subject = "Application (acttefl.com/masters-of-arts-in-education-with-tesol.php)[#".$this->id."]";

		

		//Read an HTML message body from an external file, convert referenced images to embedded,

		//convert HTML into a basic plain-text alternative body

		

		$body = "";

		$body = "<html>

		<head>

		<meta http-equiv='Content-Type' content='text/html; charset=utf-8' />

		<title>Application (acttefl.com/masters-of-arts-in-education-with-tesol.php)</title>

		</head>

		<body>

		 <table>

		<tbody>

		<tr>

		<td><b>Please mention your Name</b></td>

		<td>".$this->name."</td>

		</tr>

		<tr>

		<td><b>Please mention your Email</b></td>

		<td>".$this->email."</td>

		</tr>

		<tr>

		<td><b>Please mention your Phone Number</b></td>

		<td>".$this->contact."</td>

		</tr>

		<tr>

		<td><b>Location </b></td>

		<td>".$this->location."</td>

		</tr>

		

		</tbody>

		</table>

		</body>

		</html>";

		$mail->msgHTML($body);

		

		//Replace the plain text body with one created manually

		$mail->AltBody = 'This is a plain-text message body';

		

		//Attach an image file

		//$mail->addAttachment('images/phpmailer_mini.png');

		

		//send the message, check for errors

		if (!$mail->send()) {

			$this->msg = "Sorry! Unable to send Mail";

			return;

		} 

		else

		{

			$this->msg = "Thank you for filling the application form";

		}	

		

	}

	

	function InsertData11()

	{

		$dbh = new db_conn();

		$dbh->set_conn();

		$this->GenerateDataID();

		date_default_timezone_set('Asia/Kolkata');

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

		//insert data into tbl_data_entry table				

		$insert_sql = "insert into tbl_data_entry values ( ";

		$insert_sql = $insert_sql . $this->id. ",";

		$insert_sql = $insert_sql . "'".$this->name. "', ";

		$insert_sql = $insert_sql . "'Application (acttefl.com/500-hrs-International-tefl-adv-pg-diploma-course.php)', ";

		$insert_sql = $insert_sql . "'0', ";

		$insert_sql = $insert_sql . "'0', ";

		$insert_sql = $insert_sql . "'n/a', ";

		$insert_sql = $insert_sql . "'n/a', ";

		$insert_sql = $insert_sql . "'0', ";

		$insert_sql = $insert_sql . "'3', ";

		$insert_sql = $insert_sql . "'Application (acttefl.com/500-hrs-International-tefl-adv-pg-diploma-course.php)', ";

		$insert_sql = $insert_sql . "'".$this->email. "', ";

		$insert_sql = $insert_sql . "'".$this->contact. "', ";

		$insert_sql = $insert_sql . "'n/a', ";

		$insert_sql = $insert_sql . "'480', ";

		$insert_sql = $insert_sql . "'0', ";

		$insert_sql = $insert_sql . "'".date("Y-m-d H:i:s")."',";

		$insert_sql = $insert_sql . "'".date("Y-m-d H:i:s")."',";

		$insert_sql = $insert_sql . "'1',";

		$insert_sql = $insert_sql . "'n/a', ";

		$insert_sql = $insert_sql . "'n/a', ";

		$insert_sql = $insert_sql . "'n/a', ";

		$insert_sql = $insert_sql . "'ACTIVE', ";

		$insert_sql = $insert_sql . "'0', ";

		$insert_sql = $insert_sql . "'n/a', ";

		$insert_sql = $insert_sql . "'n/a', ";

		$insert_sql = $insert_sql . "'n/a', ";

		$insert_sql = $insert_sql . "'0', ";

		$insert_sql = $insert_sql . "'n/a', ";

		$insert_sql = $insert_sql . "'".date("Y-m-d h:i:s")."',";

		$insert_sql = $insert_sql . "'0',";

		$insert_sql = $insert_sql . "'0',";

		$insert_sql = $insert_sql . "'0',";

		$insert_sql = $insert_sql . "'".$this->location. "', ";

		$insert_sql = $insert_sql . "'n/a',";

		$insert_sql = $insert_sql . "'n/a', ";

		$insert_sql = $insert_sql . "'n/a',";

		$insert_sql = $insert_sql . "'n/a')";

		

		//echo "insert_sql = ".$insert_sql;

		//return;

		$insert_result = mysqli_query($dbh->link,$insert_sql);

		//$insert_result = mysql_query($insert_sql,$dbh->link);

		if (!$insert_result)

		{

			$this->msg = "Error: ".mysqli_error($dbh->link);

			//$this->msg = "Error: ".mysql_error($dbh->link);

			return;

		}

		else

		{

			$this->msg = "Thank you for filling the application form";

		}		

	}	

	//for Subscribe to our Newsletter! (ACT)

	function SendMail11()

	{

		//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

		//sending application entry mail to 

		

		require 'PHPMailerAutoload.php';

		//if(!$_POST) exit;

		//$email = $this->email;    //$res->email;

			$email = "nikkitefl@gmail.com";

			//$email = "nikita94.act@gmail.com";

			

			$errors = 0;

					

			//Create a new PHPMailer instance

			$mail = new PHPMailer;

			

			//Tell PHPMailer to use SMTP

			$mail->isSMTP();

			

			//Enable SMTP debugging

			// 0 = off (for production use)

			// 1 = client messages

			// 2 = client and server messages

			$mail->SMTPDebug = 0;

			

			//Ask for HTML-friendly debug output

			$mail->Debugoutput = 'html';

			

			//Set the hostname of the mail server

			//$mail->Host = 'smtp.gmail.com';

			$mail->Host = 'vps.teflindia.in';

			

			//Set the SMTP port number - 587 for authenticated TLS, a.k.a. RFC4409 SMTP submission

			$mail->Port = 465;

			

			//Set the encryption system to use - ssl (deprecated) or tls

			$mail->SMTPSecure = 'ssl';

			

			//Whether to use SMTP authentication

			$mail->SMTPAuth = true;

			

			//Username to use for SMTP authentication - use full email address for gmail

			$mail->Username = "applications@teflindia.in";

			//$mail->Username = "admin@teachersjobworld.com";

			

			//Password to use for SMTP authentication

			$mail->Password = "ACTApplications$56";

			//$mail->Password = "tjwportal20!";

			

			//Set who the message is to be sent from

			$mail->setFrom("applications@teflindia.in", "Asian College Of Teachers");

			//mail->setFrom("admin@teachersjobworld.com", "Teachers Job World");

			

			//Set an alternative reply-to address

			//$mail->addReplyTo('replyto@example.com', 'First Last');

			

			//Set who the message is to be sent to

			$mail->addAddress($email);

			$mail->addAddress("asiancollegeapplications@gmail.com");

			//$mail->addAddress("sampade.ati@gmail.com");

			//Set the subject line

			$mail->Subject = "Application (acttefl.com/500-hrs-International-tefl-adv-pg-diploma-course.php[#".$this->id."]";

		

		//Read an HTML message body from an external file, convert referenced images to embedded,

		//convert HTML into a basic plain-text alternative body

		

		$body = "";

		$body = "<html>

		<head>

		<meta http-equiv='Content-Type' content='text/html; charset=utf-8' />

		<title>Application (acttefl.com/500-hrs-International-tefl-adv-pg-diploma-course.php)</title>

		</head>

		<body>

		 <table>

		<tbody>

		<tr>

		<td><b>Please mention your Name</b></td>

		<td>".$this->name."</td>

		</tr>

		<tr>

		<td><b>Please mention your Email</b></td>

		<td>".$this->email."</td>

		</tr>

		<tr>

		<td><b>Please mention your Phone Number</b></td>

		<td>".$this->contact."</td>

		</tr>

		<tr>

		<td><b>Location </b></td>

		<td>".$this->location."</td>

		</tr>

		

		</tbody>

		</table>

		</body>

		</html>";

		$mail->msgHTML($body);

		

		//Replace the plain text body with one created manually

		$mail->AltBody = 'This is a plain-text message body';

		

		//Attach an image file

		//$mail->addAttachment('images/phpmailer_mini.png');

		

		//send the message, check for errors

		if (!$mail->send()) {

			$this->msg = "Sorry! Unable to send Mail";

			return;

		} 

		else

		{

			$this->msg = "Thank you for filling the application form";

		}	

		

	}

	

	function InsertData12()

	{

		$dbh = new db_conn();

		$dbh->set_conn();

		$this->GenerateDataID();

		date_default_timezone_set('Asia/Kolkata');

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

		//insert data into tbl_data_entry table				

		$insert_sql = "insert into tbl_data_entry values ( ";

		$insert_sql = $insert_sql . $this->id. ",";

		$insert_sql = $insert_sql . "'".$this->name. "', ";

		$insert_sql = $insert_sql . "'Application (acttefl.com/professional-doctorate-in-education.php)', ";

		$insert_sql = $insert_sql . "'0', ";

		$insert_sql = $insert_sql . "'0', ";

		$insert_sql = $insert_sql . "'n/a', ";

		$insert_sql = $insert_sql . "'n/a', ";

		$insert_sql = $insert_sql . "'0', ";

		$insert_sql = $insert_sql . "'3', ";

		$insert_sql = $insert_sql . "'Application (acttefl.com/professional-doctorate-in-education.php)', ";

		$insert_sql = $insert_sql . "'".$this->email. "', ";

		$insert_sql = $insert_sql . "'".$this->contact. "', ";

		$insert_sql = $insert_sql . "'n/a', ";

		$insert_sql = $insert_sql . "'480', ";

		$insert_sql = $insert_sql . "'0', ";

		$insert_sql = $insert_sql . "'".date("Y-m-d H:i:s")."',";

		$insert_sql = $insert_sql . "'".date("Y-m-d H:i:s")."',";

		$insert_sql = $insert_sql . "'1',";

		$insert_sql = $insert_sql . "'n/a', ";

		$insert_sql = $insert_sql . "'n/a', ";

		$insert_sql = $insert_sql . "'n/a', ";

		$insert_sql = $insert_sql . "'ACTIVE', ";

		$insert_sql = $insert_sql . "'0', ";

		$insert_sql = $insert_sql . "'n/a', ";

		$insert_sql = $insert_sql . "'n/a', ";

		$insert_sql = $insert_sql . "'n/a', ";

		$insert_sql = $insert_sql . "'0', ";

		$insert_sql = $insert_sql . "'n/a', ";

		$insert_sql = $insert_sql . "'".date("Y-m-d h:i:s")."',";

		$insert_sql = $insert_sql . "'0',";

		$insert_sql = $insert_sql . "'0',";

		$insert_sql = $insert_sql . "'0',";

		$insert_sql = $insert_sql . "'".$this->location. "', ";

		$insert_sql = $insert_sql . "'n/a',";

		$insert_sql = $insert_sql . "'n/a', ";

		$insert_sql = $insert_sql . "'n/a',";

		$insert_sql = $insert_sql . "'n/a')";

		

		//echo "insert_sql = ".$insert_sql;

		//return;

		$insert_result = mysqli_query($dbh->link,$insert_sql);

		//$insert_result = mysql_query($insert_sql,$dbh->link);

		if (!$insert_result)

		{

			$this->msg = "Error: ".mysqli_error($dbh->link);

			//$this->msg = "Error: ".mysql_error($dbh->link);

			return;

		}

		else

		{

			$this->msg = "Thank you for filling the application form";

		}		

	}	

	//for PD cOURSE fORM

	function SendMail12()

	{

		//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

		//sending application entry mail to 

		

		require 'PHPMailerAutoload.php';

		//if(!$_POST) exit;

		//$email = $this->email;    //$res->email;

			$email = "nikkitefl@gmail.com";

			//$email = "nikita94.act@gmail.com";

			

			$errors = 0;

					

			//Create a new PHPMailer instance

			$mail = new PHPMailer;

			

			//Tell PHPMailer to use SMTP

			$mail->isSMTP();

			

			//Enable SMTP debugging

			// 0 = off (for production use)

			// 1 = client messages

			// 2 = client and server messages

			$mail->SMTPDebug = 0;

			

			//Ask for HTML-friendly debug output

			$mail->Debugoutput = 'html';

			

			//Set the hostname of the mail server

			//$mail->Host = 'smtp.gmail.com';

			$mail->Host = 'vps.teflindia.in';

			

			//Set the SMTP port number - 587 for authenticated TLS, a.k.a. RFC4409 SMTP submission

			$mail->Port = 465;

			

			//Set the encryption system to use - ssl (deprecated) or tls

			$mail->SMTPSecure = 'ssl';

			

			//Whether to use SMTP authentication

			$mail->SMTPAuth = true;

			

			//Username to use for SMTP authentication - use full email address for gmail

			$mail->Username = "applications@teflindia.in";

			//$mail->Username = "admin@teachersjobworld.com";

			

			//Password to use for SMTP authentication

			$mail->Password = "ACTApplications$56";

			//$mail->Password = "tjwportal20!";

			

			//Set who the message is to be sent from

			$mail->setFrom("applications@teflindia.in", "Asian College Of Teachers");

			//mail->setFrom("admin@teachersjobworld.com", "Teachers Job World");

			

			//Set an alternative reply-to address

			//$mail->addReplyTo('replyto@example.com', 'First Last');

			

			//Set who the message is to be sent to

			$mail->addAddress($email);

			$mail->addAddress("asiancollegeapplications@gmail.com");

			//$mail->addAddress("sampade.ati@gmail.com");

			//Set the subject line

			$mail->Subject = "Application (acttefl.com/professional-doctorate-in-education.php)[#".$this->id."]";

		

		//Read an HTML message body from an external file, convert referenced images to embedded,

		//convert HTML into a basic plain-text alternative body

		

		$body = "";

		$body = "<html>

		<head>

		<meta http-equiv='Content-Type' content='text/html; charset=utf-8' />

		<title>Application (acttefl.com/professional-doctorate-in-education.php)</title>

		</head>

		<body>

		 <table>

		<tbody>

		<tr>

		<td><b>Please mention your Name</b></td>

		<td>".$this->name."</td>

		</tr>

		<tr>

		<td><b>Please mention your Email</b></td>

		<td>".$this->email."</td>

		</tr>

		<tr>

		<td><b>Please mention your Phone Number</b></td>

		<td>".$this->contact."</td>

		</tr>

		<tr>

		<td><b>Location </b></td>

		<td>".$this->location."</td>

		</tr>

		

		</tbody>

		</table>

		</body>

		</html>";

		$mail->msgHTML($body);

		

		//Replace the plain text body with one created manually

		$mail->AltBody = 'This is a plain-text message body';

		

		//Attach an image file

		//$mail->addAttachment('images/phpmailer_mini.png');

		

		//send the message, check for errors

		if (!$mail->send()) {

			$this->msg = "Sorry! Unable to send Mail";

			return;

		} 

		else

		{

			$this->msg = "Thank you for filling the application form";

		}	

		

	}
	
	
	

	

	function InsertData14()

	{

		$dbh = new db_conn();

		$dbh->set_conn();

		$this->GenerateDataID();

		date_default_timezone_set('Asia/Kolkata');

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

		//insert data into tbl_data_entry table				

		$insert_sql = "insert into tbl_data_entry values ( ";

		$insert_sql = $insert_sql . $this->id. ",";

		$insert_sql = $insert_sql . "'".$this->name. "', ";

		$insert_sql = $insert_sql . "'Application (acttefl.com - ofqual_qualification)', ";

		$insert_sql = $insert_sql . "'0', ";

		$insert_sql = $insert_sql . "'0', ";

		$insert_sql = $insert_sql . "'n/a', ";

		$insert_sql = $insert_sql . "'n/a', ";

		$insert_sql = $insert_sql . "'0', ";

		$insert_sql = $insert_sql . "'3', ";

		$insert_sql = $insert_sql . "'Application (acttefl.com - ofqual_qualification)', ";

		$insert_sql = $insert_sql . "'".$this->email. "', ";

		$insert_sql = $insert_sql . "'".$this->contact. "', ";

		$insert_sql = $insert_sql . "'n/a', ";

		$insert_sql = $insert_sql . "'964', ";

		$insert_sql = $insert_sql . "'0', ";

		$insert_sql = $insert_sql . "'".date("Y-m-d H:i:s")."',";

		$insert_sql = $insert_sql . "'".date("Y-m-d H:i:s")."',";

		$insert_sql = $insert_sql . "'1',";

		$insert_sql = $insert_sql . "'n/a', ";

		$insert_sql = $insert_sql . "'n/a', ";

		$insert_sql = $insert_sql . "'n/a', ";

		$insert_sql = $insert_sql . "'ACTIVE', ";

		$insert_sql = $insert_sql . "'0', ";

		$insert_sql = $insert_sql . "'n/a', ";

		$insert_sql = $insert_sql . "'n/a', ";

		$insert_sql = $insert_sql . "'n/a', ";

		$insert_sql = $insert_sql . "'0', ";

		$insert_sql = $insert_sql . "'n/a', ";

		$insert_sql = $insert_sql . "'".date("Y-m-d h:i:s")."',";

		$insert_sql = $insert_sql . "'0',";

		$insert_sql = $insert_sql . "'0',";

		$insert_sql = $insert_sql . "'0',";

		$insert_sql = $insert_sql . "'".$this->location. "', ";

		$insert_sql = $insert_sql . "'n/a',";

		$insert_sql = $insert_sql . "'n/a', ";

		$insert_sql = $insert_sql . "'n/a',";

		$insert_sql = $insert_sql . "'n/a')";

		

		//echo "insert_sql = ".$insert_sql;

		//return;

		$insert_result = mysqli_query($dbh->link,$insert_sql);

		//$insert_result = mysql_query($insert_sql,$dbh->link);

		if (!$insert_result)

		{

			$this->msg = "Error: ".mysqli_error($dbh->link);

			//$this->msg = "Error: ".mysql_error($dbh->link);

			return;

		}

		else

		{

			$this->msg = "Thank you for filling the application form";

		}		

	}	

	//for Subscribe to our Newsletter! (ACT)

	function SendMail14()

	{

		//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

		//sending application entry mail to 

		

		require 'PHPMailerAutoload.php';

		//if(!$_POST) exit;

		//$email = $this->email;    //$res->email;

			$email = "aniruddha.act@gmail.com";

			//$email = "nikita94.act@gmail.com";

			

			$errors = 0;

					

			//Create a new PHPMailer instance

			$mail = new PHPMailer;

			

			//Tell PHPMailer to use SMTP

			$mail->isSMTP();

			

			//Enable SMTP debugging

			// 0 = off (for production use)

			// 1 = client messages

			// 2 = client and server messages

			$mail->SMTPDebug = 0;

			

			//Ask for HTML-friendly debug output

			$mail->Debugoutput = 'html';

			

			//Set the hostname of the mail server

			//$mail->Host = 'smtp.gmail.com';

			$mail->Host = 'vps.teflindia.in';

			

			//Set the SMTP port number - 587 for authenticated TLS, a.k.a. RFC4409 SMTP submission

			$mail->Port = 465;

			

			//Set the encryption system to use - ssl (deprecated) or tls

			$mail->SMTPSecure = 'ssl';

			

			//Whether to use SMTP authentication

			$mail->SMTPAuth = true;

			

			//Username to use for SMTP authentication - use full email address for gmail

			$mail->Username = "applications@teflindia.in";

			//$mail->Username = "admin@teachersjobworld.com";

			

			//Password to use for SMTP authentication

			$mail->Password = "ACTApplications$56";

			//$mail->Password = "tjwportal20!";

			

			//Set who the message is to be sent from

			$mail->setFrom("applications@teflindia.in", "Asian College Of Teachers");

			//mail->setFrom("admin@teachersjobworld.com", "Teachers Job World");

			

			//Set an alternative reply-to address

			//$mail->addReplyTo('replyto@example.com', 'First Last');

			

			//Set who the message is to be sent to

			$mail->addAddress($email);

			$mail->addAddress("asiancollegeapplications@gmail.com");

			//$mail->addAddress("sampade.ati@gmail.com");

			//Set the subject line

			$mail->Subject = "Application (acttefl.com - ofqual_qualification)[#".$this->id."]";

		

		//Read an HTML message body from an external file, convert referenced images to embedded,

		//convert HTML into a basic plain-text alternative body

		

		$body = "";

		$body = "<html>

		<head>

		<meta http-equiv='Content-Type' content='text/html; charset=utf-8' />

		<title>Application (acttefl.com - ofqual_qualification)</title>

		</head>

		<body>

		 <table>

		<tbody>

		<tr>

		<td><b>Please mention your Name</b></td>

		<td>".$this->name."</td>

		</tr>

		<tr>

		<td><b>Please mention your Email</b></td>

		<td>".$this->email."</td>

		</tr>

		<tr>

		<td><b>Please mention your Phone Number</b></td>

		<td>".$this->contact."</td>

		</tr>

		<tr>

		<td><b>Location </b></td>

		<td>".$this->location."</td>

		</tr>

		

		</tbody>

		</table>

		</body>

		</html>";

		$mail->msgHTML($body);

		

		//Replace the plain text body with one created manually

		$mail->AltBody = 'This is a plain-text message body';

		

		//Attach an image file

		//$mail->addAttachment('images/phpmailer_mini.png');

		

		//send the message, check for errors

		if (!$mail->send()) {

			$this->msg = "Sorry! Unable to send Mail";

			return;

		} 

		else

		{

			$this->msg = "Thank you for filling the application form";

		}	

		

	}

	

	function InsertData_apply()

	{

		$dbh = new db_conn();

		$dbh->set_conn();

		$this->GenerateDataID();

		date_default_timezone_set('Asia/Kolkata');

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

		//insert data into tbl_data_entry table				

		$insert_sql = "insert into tbl_data_entry values ( ";

		$insert_sql = $insert_sql . $this->id. ",";

		$insert_sql = $insert_sql . "'".$this->name. "', ";

		$insert_sql = $insert_sql . "'".$this->course. "', ";

		$insert_sql = $insert_sql . "'0', ";

		$insert_sql = $insert_sql . "'0', ";

		$insert_sql = $insert_sql . "'n/a', ";

		$insert_sql = $insert_sql . "'n/a', ";

		$insert_sql = $insert_sql . "'0', ";

		$insert_sql = $insert_sql . "'3', ";

		$insert_sql = $insert_sql . "'Application - Apply (acttefl.com)', ";

		$insert_sql = $insert_sql . "'".$this->email. "', ";

		$insert_sql = $insert_sql . "'".$this->contact. "', ";

		$insert_sql = $insert_sql . "'n/a', ";

		$insert_sql = $insert_sql . "'663', ";

		$insert_sql = $insert_sql . "'0', ";

		$insert_sql = $insert_sql . "'".date("Y-m-d H:i:s")."',";

		$insert_sql = $insert_sql . "'".date("Y-m-d H:i:s")."',";

		$insert_sql = $insert_sql . "'1',";

		$insert_sql = $insert_sql . "'n/a', ";

		$insert_sql = $insert_sql .  "'".$this->qualification. "', ";

		$insert_sql = $insert_sql . "'n/a', ";

		$insert_sql = $insert_sql . "'ACTIVE', ";

		$insert_sql = $insert_sql . "'0', ";

		$insert_sql = $insert_sql .  "'".$this->occupation. "', ";

		$insert_sql = $insert_sql . "'n/a', ";

		$insert_sql = $insert_sql . "'n/a', ";

		$insert_sql = $insert_sql . "'0', ";

		$insert_sql = $insert_sql . "'n/a', ";

		$insert_sql = $insert_sql . "'".date("Y-m-d h:i:s")."',";

		$insert_sql = $insert_sql . "'0',";

		$insert_sql = $insert_sql . "'0',";

		$insert_sql = $insert_sql . "'0',";

		$insert_sql = $insert_sql . "'".$this->location. "', ";

		$insert_sql = $insert_sql . "'n/a',";

		$insert_sql = $insert_sql . "'".$this->comment."', ";

		$insert_sql = $insert_sql . "'n/a',";

		$insert_sql = $insert_sql . "'n/a')";

		

		//echo "insert_sql = ".$insert_sql;

		//return;

		$insert_result = mysqli_query($dbh->link,$insert_sql);

		//$insert_result = mysql_query($insert_sql,$dbh->link);

		if (!$insert_result)

		{

			$this->msg = "Error: ".mysqli_error($dbh->link);

			//$this->msg = "Error: ".mysql_error($dbh->link);

			return;

		}

		else

		{

			$this->msg = "Thank you for filling the application form";

		}		

	}	

	

	//for Subscribe to our Newsletter! (ACT)

	function SendMail_apply()

	{

		//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

		//sending application entry mail to 

		

		require 'PHPMailerAutoload.php';

		//if(!$_POST) exit;

		//$email = $this->email;    //$res->email;

			$email = "nikkitefl@gmail.com";

			//$email = "sulagna.act@gmail.com";

			//$email = "nikita94.act@gmail.com";

			

			$errors = 0;

					

			//Create a new PHPMailer instance

			$mail = new PHPMailer;

			

			//Tell PHPMailer to use SMTP

			$mail->isSMTP();

			

			//Enable SMTP debugging

			// 0 = off (for production use)

			// 1 = client messages

			// 2 = client and server messages

			$mail->SMTPDebug = 0;

			

			//Ask for HTML-friendly debug output

			$mail->Debugoutput = 'html';

			

			//Set the hostname of the mail server

			//$mail->Host = 'smtp.gmail.com';

			$mail->Host = 'vps.teflindia.in';

			

			//Set the SMTP port number - 587 for authenticated TLS, a.k.a. RFC4409 SMTP submission

			$mail->Port = 465;

			

			//Set the encryption system to use - ssl (deprecated) or tls

			$mail->SMTPSecure = 'ssl';

			

			//Whether to use SMTP authentication

			$mail->SMTPAuth = true;

			

			//Username to use for SMTP authentication - use full email address for gmail

			$mail->Username = "applications@teflindia.in";

			//$mail->Username = "admin@teachersjobworld.com";

			

			//Password to use for SMTP authentication

			$mail->Password = "ACTApplications$56";

			//$mail->Password = "tjwportal20!";

			

			//Set who the message is to be sent from

			$mail->setFrom("applications@teflindia.in", "Asian College Of Teachers");

			//mail->setFrom("admin@teachersjobworld.com", "Teachers Job World");

			

			//Set an alternative reply-to address

			//$mail->addReplyTo('replyto@example.com', 'First Last');

			

			//Set who the message is to be sent to

			$mail->addAddress($email);

			$mail->addAddress("asiancollegeapplications@gmail.com");

			//$mail->addAddress("sampade.ati@gmail.com");

			//Set the subject line

			$mail->Subject = "Application - Apply (acttefl.com)[#".$this->id."]";

		

		//Read an HTML message body from an external file, convert referenced images to embedded,

		//convert HTML into a basic plain-text alternative body

		

		$body = "";

		$body = "<html>

		<head>

		<meta http-equiv='Content-Type' content='text/html; charset=utf-8' />

		<title>Application - Apply (acttefl.com)</title>

		</head>

		<body>

		 <table>

		<tbody>

		<tr>

		<td><b>Please mention your Name</b></td>

		<td>".$this->name."</td>

		</tr>

		<tr>

		<td><b>Please mention your Email</b></td>

		<td>".$this->email."</td>

		</tr>

		<tr>

		<td><b>Please mention your Phone Number</b></td>

		<td>".$this->contact."</td>

		</tr>

		<tr>

		<td><b>Country </b></td>

		<td>".$this->location."</td>

		</tr>

		<tr>

		<td><b>Course </b></td>

		<td>".$this->course."</td>

		</tr>

		<tr>

		<td><b>Educational Qualification </b></td>

		<td>".$this->qualification."</td>

		</tr>

		<tr>

		<td><b>Course Location </b></td>

		<td>".$this->occupation."</td>

		</tr>

		<tr>

		<td><b>Remarks ( Why are you interested in this course )</b></td>

		<td>".$this->comment."</td>

		</tr>

		</tbody>

		</table>

		</body>

		</html>";

		$mail->msgHTML($body);

		

		//Replace the plain text body with one created manually

		$mail->AltBody = 'This is a plain-text message body';

		

		//Attach an image file

		//$mail->addAttachment('images/phpmailer_mini.png');

		

		//send the message, check for errors

		if (!$mail->send()) {

			$this->msg = "Sorry! Unable to send Mail";

			return;

		} 

		else

		{

			$this->msg = "Thank you for filling the application form";

		}	

		

	}
	
	
	

}

?>