Revonzy Mini Shell

Revonzy Mini Shell

Şuanki Dizin: /home/wwwdreamtechnolo/public_html/vsacademysolapur.in/admin/lib/
Dosya Yükle :
Şuanki Dosya : /home/wwwdreamtechnolo/public_html/vsacademysolapur.in/admin/lib/functions.php

<?php

date_default_timezone_set("Asia/Kolkata");

session_start();

class login_function
{
   private $con;
   
	function __construct()
	{
		//$this->con = new mysqli("localhost","root","","bird_group_presents");
// 		$this->con = new mysqli("localhost","root","","vs_academy");

// $this->con	=	new mysqli("localhost","wwwvsacademysola_vsacademy_admin","pd[9$~g#{3mu","wwwvsacademysola_vsacademy");
$this->con	=	new mysqli("localhost","wwwdreamtechnolo_vsacademy_admin","wcuy~#t2[51n","wwwdreamtechnolo_vsacademy_main");

		mysqli_set_charset($this->con, 'utf8');
	}
	
		function get_password_from_user_name($mobile_no)
	{
		if($stmt_select = $this->con->prepare("Select `password` from `admin` where `admin_name` = ? "))
		{	
			$stmt_select->bind_param("s",$mobile_no);
		
			$stmt_select->bind_result($result_password);
		
			if($stmt_select->execute())
			{
				if($stmt_select->fetch())
				{
					return $result_password;
				}
			}
					return false;
		}
	}


function get_travaller_name($id)
	{
		if($stmt_select = $this->con->prepare("Select `traveller_name` from `assign_vehicle` where `vehicle_name` = ? "))
		{	
			$stmt_select->bind_param("i",$id);
		
			$stmt_select->bind_result($res_vehicle);
		
			if($stmt_select->execute())
			{
				if($stmt_select->fetch())
				{
					return $res_vehicle;
				}
			}
					return false;
		}
	}

	function get_vehicle_name($id)
	{
		if($stmt_select = $this->con->prepare("Select `traveller_name` from `assign_vehicle` where `vehicle_name` = ? "))
		{	
			$stmt_select->bind_param("i",$id);
		
			$stmt_select->bind_result($res_vehicle);
		
			if($stmt_select->execute())
			{
				if($stmt_select->fetch())
				{
					return $res_vehicle;
				}
			}
					return false;
		}
	}

	function add_company_details($company_name,$name1,$address,$contact_1,$contact_2,$contact_3,$contact_4,$photo,$company_address,$GST_no,$phone_no1,$contact_person1,$phone_no2,$contact_person2,$phone_no3,$contact_person3,$phone_no4,$contact_person4,$other1)
		{

			$date = date("Y-m-d");
			$time = date("h:i:s A");

			if($stmt_insert = $this->con->prepare("INSERT INTO `add_company_details`(`company_name`, `name`, `address`, `contact1`, `contact2`, `contact3`, `contact4`, `profile_image`, `company_address`, `gst_no`, `phone_no1`, `contact_person1`, `phone_no2`, `contact_person2`, `phone_no3`, `contact_person3`, `phone_no4`, `contact_person4`, `other`, `date`, `time`) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)"))
			{
				$stmt_insert->bind_param("sssssssssssssssssssss",$company_name,$name1,$address,$contact_1,$contact_2,$contact_3,$contact_4,$photo,$company_address,$GST_no,$phone_no1,$contact_person1,$phone_no2,$contact_person2,$phone_no3,$contact_person3,$phone_no4,$contact_person4,$other1,$date,$time);

				if($stmt_insert->execute())
				{
					return true;
				}
			   return false;
			} 	
		}

		function get_company_data()
		{
			$date = date("Y-m-d");
			$time = date("h:i:s A");
		

			if($stmt = $this->con->prepare("SELECT `id`, `company_name`, `name`, `address`, `contact1`, `contact2`, `contact3`, `contact4`, `profile_image`, `company_address`, `gst_no`, `phone_no1`, `contact_person1`, `phone_no2`, `contact_person2`, `phone_no3`, `contact_person3`, `phone_no4`, `contact_person4`, `other`, `date`, `time` FROM `add_company_details`"))
			{	
			
				$stmt->bind_result($id,$company_name,$name1,$address,$contact_1,$contact_2,$contact_3,$contact_4,$photo,$company_address,$GST_no,$phone_no1,$contact_person1,$phone_no2,$contact_person2,$phone_no3,$contact_person3,$phone_no4,$contact_person4,$other1,$date,$time);
				
				if($stmt->execute())
				{
					$row	=	0;
					$details	=	array();
					while($stmt->fetch())
					{
						
						
						$details[$row][0]	=	$id;                     
						$details[$row][1]	=	$company_name;	        
						$details[$row][2]	=	$name1;		            
						$details[$row][3]	=	$address;  	           
						$details[$row][4]	=	$contact_1;	            
						$details[$row][5]	=	$contact_2;		      
						$details[$row][6]	=	$contact_3;		        
						$details[$row][7]	=	$contact_4;
						$details[$row][8]	=	$photo;	
						$details[$row][9]	=	$company_address; 	
						$details[$row][10]	=	$GST_no;		            
						$details[$row][11]	=	$phone_no1;		        
						$details[$row][12]	=	$contact_person1;		
						$details[$row][13]	=	$phone_no2;		        
						$details[$row][14]	=	$contact_person2;		
						$details[$row][15]	=	$phone_no3;		        
						$details[$row][16]	=	$contact_person3;		
						$details[$row][17]	=	$phone_no4;		        
						$details[$row][18]	=	$contact_person4;		
						$details[$row][19]	=	$other1;		            
						$details[$row][20]	=	$date;
						$details[$row][21]	=	$time;		            

						$row ++;
					}
					if(!empty($details))	
					{	
						return $details;
					}
					return false;
				}
			}	
		}

		function delete_company_data($delete_id)
			{
				if($stmt_select = $this->con->prepare("Delete from `add_company_details` where `id`=?"))
				{
					$stmt_select->bind_param("i",$delete_id);
				
					if($stmt_select->execute())
					{					
							return true;
					}
						return false;
				}
			}
		
			function update_commpany_details($company_name,$name1,$address,$contact_1,$contact_2,$contact_3,$contact_4,$company_address,$GST_no,$phone_no1,$contact_person1,$phone_no2,$contact_person2,$phone_no3,$contact_person3,$phone_no4,$contact_person4,$other1,$edit_id)
		{
			$date = date("Y-m-d");
			$time = date("h:i:s A");

			if($stmt = $this->con->prepare("UPDATE `add_company_details` SET `company_name`=?,`name`=?,`address`=?,`contact1`=?,`contact2`=?,`contact3`=?,`contact4`=?,`profile_image`=?,`company_address`=?,`gst_no`=?,`phone_no1`=?,`contact_person1`=?,`phone_no2`=?,`contact_person2`=?,`phone_no3`=?,`contact_person3`=?,`phone_no4`=?,`contact_person4`=?,`other`=?,`date`=?,`time`=? WHERE `id`=?"))
			{
				$stmt->bind_param("sssssssssssssssssssssi",$company_name,$name1,$address,$contact_1,$contact_2,$contact_3,$contact_4,$photo,$company_address,$GST_no,$phone_no1,$contact_person1,$phone_no2,$contact_person2,$phone_no3,$contact_person3,$phone_no4,$contact_person4,$other1,$date,$time,$edit_id);
				
				if($stmt->execute())
				{
					return true;
				}
			   return false;
			} 	
		}
		function get_company_detals_from_id($edit_id)
		{
			if($stmt_select = $this->con->prepare("SELECT `id`, `company_name`, `name`, `address`, `contact1`, `contact2`, `contact3`, `contact4`, `profile_image`, `company_address`, `gst_no`, `phone_no1`, `contact_person1`, `phone_no2`, `contact_person2`, `phone_no3`, `contact_person3`, `phone_no4`, `contact_person4`, `other`, `date`, `time` FROM `add_company_details` where `id` = ? "))
			{
				$stmt_select->bind_param("i",$edit_id);
			
				$stmt_select->bind_result($id,$company_name,$name1,$address,$contact_1,$contact_2,$contact_3,$contact_4,$photo,$company_address,$GST_no,$phone_no1,$contact_person1,$phone_no2,$contact_person2,$phone_no3,$contact_person3,$phone_no4,$contact_person4,$other1,$date,$time);
			
				if($stmt_select->execute())
				{
					$details = array();
				}
					while($stmt_select->fetch())
					{
						
						
						$details[0]		=	$id;                     
						$details[1]		=	$company_name;	        
						$details[2]		=	$name1;		            
						$details[3]		=	$address;  	            
						$details[4]		=	$contact_1;	            
						$details[5]		=	$contact_2;		        
						$details[6]		=	$contact_3;		        
						$details[7]		=	$contact_4;				
						$details[8]		=	$photo;                  
						$details[9]		=	$company_address; 		
						$details[10]		=	$GST_no;		           
						$details[11]		=	$phone_no1;		        
						$details[12]		=	$contact_person1;		
						$details[13]		=	$phone_no2;		        
						$details[14]		=	$contact_person2;		
						$details[15]		=	$phone_no3;		        
						$details[16]		=	$contact_person3;		
						$details[17]		=	$phone_no4;		        
						$details[18]		=	$contact_person4;		
						$details[19]		=	$other1;		            
						$details[20]		=	$date;		            
						$details[21]		=	$time;		            
					}
		
					if(!empty($details))
					{
						return $details;
					}
					else
					{
						return false;
					}
			}
		}

		function add_vehicle_details($vehicle_name,$number_of_seats,$rate_per_km_non_AC,$rate_per_km_with_AC,$description)
		{

			$date = date("Y-m-d");
			$time = date("h:i:s A");

			if($stmt_insert = $this->con->prepare("INSERT INTO `vehicle_details`(`vehicle_name`, `no_of_seats`, `reate_per_km_non_AC`, `reate_per_km_with_AC`, `description`, `date`, `time`) VALUES (?,?,?,?,?,?,?)"))
			{
				$stmt_insert->bind_param("sssssss",$vehicle_name,$number_of_seats,$rate_per_km_non_AC,$rate_per_km_with_AC,$description,$date,$time);

				if($stmt_insert->execute())
				{
					return true;
				}
			   return false;
			} 	
		}

		function get_vehicle_details()
		{
			$date = date("Y-m-d");
			$time = date("h:i:s A");
		

			if($stmt = $this->con->prepare("SELECT `id`, `vehicle_name`, `no_of_seats`, `reate_per_km_non_AC`, `reate_per_km_with_AC`, `description`, `date`, `time` FROM `vehicle_details`"))
			{	
			
				$stmt->bind_result($id,$vehicle_name,$number_of_seats,$rate_per_km_non_AC,$rate_per_km_with_AC,$description,$date,$time);
				
				if($stmt->execute())
				{
					$row	=	0;
					$details	=	array();
					while($stmt->fetch())
					{
						
						
						$details[$row][0]	=	$id;                     
						$details[$row][1]	=	$vehicle_name;	        
						$details[$row][2]	=	$number_of_seats;		            
						$details[$row][3]	=	$rate_per_km_non_AC;  	           
						$details[$row][4]	=	$rate_per_km_with_AC;	            
						$details[$row][5]	=	$description;		                  
						$details[$row][6]	=	$date;
						$details[$row][7]	=	$time;		            

						$row ++;
					}
					if(!empty($details))	
					{	
						return $details;
					}
					return false;
				}
			}	
		}

		function delete_vehicle_data($delete_id)
			{
				if($stmt_select = $this->con->prepare("Delete from `vehicle_details` where `id`=?"))
				{
					$stmt_select->bind_param("i",$delete_id);
				
					if($stmt_select->execute())
					{					
							return true;
					}
						return false;
				}
			}

			function update_vehicle_master_details($vehicle_name,$number_of_seats,$rate_per_km_non_AC,$rate_per_km_with_AC,$description,$edit_id)
		{
			$date = date("Y-m-d");
			$time = date("h:i:s A");

			if($stmt = $this->con->prepare("UPDATE `vehicle_details` SET `vehicle_name`=?,`no_of_seats`=?,`reate_per_km_non_AC`=?,`reate_per_km_with_AC`=?,`description`=?,`date`=?,`time`=? WHERE `id`=?"))
			{
				$stmt->bind_param("sssssssi",$vehicle_name,$number_of_seats,$rate_per_km_non_AC,$rate_per_km_with_AC,$description,$date,$time,$edit_id);
				
				if($stmt->execute())
				{
					return true;
				}
			   return false;
			} 	
		}

		function get_vehicle_master_detals_from_id($edit_id)
		{
			if($stmt_select = $this->con->prepare("SELECT `id`, `vehicle_name`, `no_of_seats`, `reate_per_km_non_AC`, `reate_per_km_with_AC`, `description`, `date`, `time` FROM `vehicle_details` where `id` = ? "))
			{
				$stmt_select->bind_param("i",$edit_id);
			
				$stmt_select->bind_result($id,$vehicle_name,$number_of_seats,$rate_per_km_non_AC,$rate_per_km_with_AC,$description,$date,$time);
			
				if($stmt_select->execute())
				{
					$details = array();
				}
					while($stmt_select->fetch())
					{
						
						
						$details[0]		=	$id;                     
						$details[1]		=	$vehicle_name;	        
						$details[2]		=	$number_of_seats;		            
						$details[3]		=	$rate_per_km_non_AC;  	            
						$details[4]		=	$rate_per_km_with_AC;	            
						$details[5]		=	$description;		          
						$details[6]		=	$date;		            
						$details[7]		=	$time;		            
					}
		
					if(!empty($details))
					{
						return $details;
					}
					else
					{
						return false;
					}
			}
		}

		// function save_details($vehicle_name,$company_name)
		// {

		// 	$date = date("Y-m-d");
		// 	$time = date("h:i:s A");

		// 	if($stmt_insert = $this->con->prepare("INSERT INTO `assign_vehicle`(`traveller_name`, `vehicle_name`, `date`, `time`) VALUES (?,?,?,?)"))
		// 	{
		// 		$stmt_insert->bind_param("ssss",$vehicle_name,$company_name,$date,$time);

		// 		if($stmt_insert->execute())
		// 		{
		// 			return true;
		// 		}
		// 	   return false;
		// 	} 	
		// }
		
function save_details($traveller_name, $selected_vehicles)
{
    $date = date("Y-m-d");
    $time = date("h:i:s A");

    if ($stmt_insert = $this->con->prepare("INSERT INTO `assign_vehicle`(`traveller_name`, `vehicle_name`, `date`, `time`) VALUES (?, ?, ?, ?)"))
    {
        $stmt_insert->bind_param("ssss", $traveller_name, $vehicle_name, $date, $time);

        $success = true;

        foreach ($selected_vehicles as $vehicle_name)
        {
            if (!$stmt_insert->execute())
            {
                $success = false;
                break; 
            }
        }

        $stmt_insert->close();

        return $success;
    }

    return false;
}

function get_assign_vehicles_details()
		{
			$date = date("Y-m-d");
			$time = date("h:i:s A");
		

			if($stmt = $this->con->prepare("SELECT `id`, `traveller_name`, `vehicle_name`, `date`, `time` FROM `assign_vehicle`"))
			{	
			
				$stmt->bind_result($id,$traveller_name,$selected_vehicles,$date,$time);
				
				if($stmt->execute())
				{
					$row	=	0;
					$details	=	array();
					while($stmt->fetch())
					{
						$details[$row][0]	=	$id;                     
						$details[$row][1]	=	$traveller_name;	        
						$details[$row][2]	=	$selected_vehicles;		                            
						$details[$row][3]	=	$date;
						$details[$row][4]	=	$time;		            

						$row ++;
					}
					if(!empty($details))	
					{	
						return $details;
					}
					return false;
				}
			}	
		}
		function get_assign_vehicles_for_search($vvehicle_name)
		{
			$vehicle_name_statement = "";

			if($vvehicle_name!="Select" AND $vvehicle_name!="")
			{
				$vehicle_name_statement = "  `vehicle_name`= '".$vvehicle_name."'";
			}
			if($stmt = $this->con->prepare("SELECT `id`, `traveller_name`, `vehicle_name`, `date`, `time` FROM `assign_vehicle` where".$vehicle_name_statement))
			{	
				$stmt->bind_result($id,$traveller_name,$selected_vehicles,$date,$time);
				
				if($stmt->execute())
				{
					$row	=	0;
					$details	=	array();
					while($stmt->fetch())
					{
						
						
						$details[$row][0]	=	$id;                     
						$details[$row][1]	=	$traveller_name;	        
						$details[$row][2]	=	$selected_vehicles;		                            
						$details[$row][3]	=	$date;
						$details[$row][4]	=	$time;		            

						$row ++;
					}
					if(!empty($details))	
					{	
						return $details;
					}
					return false;
				}
			}	
		}

		function delete_assign_vehicle_data($delete_id)
			{
				if($stmt_select = $this->con->prepare("Delete from `assign_vehicle` where `id`=?"))
				{
					$stmt_select->bind_param("i",$delete_id);
				
					if($stmt_select->execute())
					{					
							return true;
					}
						return false;
				}
			}

			function get_vehicle_name_by_id($id)
		{
			if($stmt_select = $this->con->prepare("SELECT `id`, `traveller_name`, `vehicle_name`, `date`, `time` FROM `assign_vehicle` where `id` = ? "))
			{
				$stmt_select->bind_param("i",$id);
			
				$stmt_select->bind_result($id,$traveller_name,$selected_vehicles,$date,$time);
			
				if($stmt_select->execute())
				{
					$details = array();
				}
					while($stmt_select->fetch())
					{
						
						
						$details[0]		=	$id;                     
						$details[1]		=	$traveller_name;	        
						$details[2]		=	$selected_vehicles;		                  
						$details[3]		=	$date;		            
						$details[4]		=	$time;		            
					}
		
					if(!empty($details))
					{
						return $details;
					}
					else
					{
						return false;
					}
			}
		}

		function get_select_traveller_name_from_id($traveller_name)
		{
			
			if($stmt_insert = $this->con->prepare("SELECT `name` FROM `add_company_details` WHERE `id`=?"))
			{	
				$stmt_insert->bind_param("i",$traveller_name);
				
				$stmt_insert->bind_result($res_select_project);
				
				if($stmt_insert->execute())
				{
					if($stmt_insert->fetch())
					{
						return $res_select_project;
					}
					return false;
				}	
			}
		}

		function get_var_selected_vehicles_name_from_id($selected_vehicles)
		{
			
			if($stmt_insert = $this->con->prepare("SELECT `vehicle_name` FROM `vehicle_details` WHERE `id`=?"))
			{	
				$stmt_insert->bind_param("i",$selected_vehicles);
				
				$stmt_insert->bind_result($res_select_project);
				
				if($stmt_insert->execute())
				{
					if($stmt_insert->fetch())
					{
						return $res_select_project;
					}
					return false;
				}	
			}
		}

		function get_company_data_search($company_name,$name1,$GST_no)
		{
			$company_name_statement = "";

			if($company_name!="")
			{
				$company_name_statement = " AND `company_name` LIKE '%".$company_name."%'";
			}

			$name1_statement = "";

			if($name1!="")
			{
				$name1_statement = " AND `name` LIKE '%".$name1."%'";
			}


			$gst_no_statement = "";

			if($GST_no!="")
			{
				$gst_no_statement = " AND `gst_no` LIKE '%".$GST_no."%'";
			}

			if($stmt = $this->con->prepare("SELECT `id`, `company_name`, `name`, `address`, `contact1`, `contact2`, `contact3`, `contact4`, `profile_image`, `company_address`, `gst_no`, `phone_no1`, `contact_person1`, `phone_no2`, `contact_person2`, `phone_no3`, `contact_person3`, `phone_no4`, `contact_person4`, `other`, `date`, `time` FROM `add_company_details` where 1".$company_name_statement.$name1_statement.$gst_no_statement))
			{	
			
				$stmt->bind_result($id,$company_name,$name1,$address,$contact_1,$contact_2,$contact_3,$contact_4,$photo,$company_address,$GST_no,$phone_no1,$contact_person1,$phone_no2,$contact_person2,$phone_no3,$contact_person3,$phone_no4,$contact_person4,$other1,$date,$time);
				
				if($stmt->execute())
				{
					$row	=	0;
					$details	=	array();
					while($stmt->fetch())
					{
						
						
						$details[$row][0]	=	$id;                     
						$details[$row][1]	=	$company_name;	        
						$details[$row][2]	=	$name1;		            
						$details[$row][3]	=	$address;  	           
						$details[$row][4]	=	$contact_1;	            
						$details[$row][5]	=	$contact_2;		      
						$details[$row][6]	=	$contact_3;		        
						$details[$row][7]	=	$contact_4;
						$details[$row][8]	=	$photo;	
						$details[$row][9]	=	$company_address; 	
						$details[$row][10]	=	$GST_no;		            
						$details[$row][11]	=	$phone_no1;		        
						$details[$row][12]	=	$contact_person1;		
						$details[$row][13]	=	$phone_no2;		        
						$details[$row][14]	=	$contact_person2;		
						$details[$row][15]	=	$phone_no3;		        
						$details[$row][16]	=	$contact_person3;		
						$details[$row][17]	=	$phone_no4;		        
						$details[$row][18]	=	$contact_person4;		
						$details[$row][19]	=	$other1;		            
						$details[$row][20]	=	$date;
						$details[$row][21]	=	$time;		            

						$row ++;
					}
					if(!empty($details))	
					{	
						return $details;
					}
					return false;
				}
			}	
		}

		function get_vehicle_details_search($vehicle_name,$number_of_seats,$description)
		{
			$vehicle_name_statement = "";

			if($vehicle_name!="")
			{
				$vehicle_name_statement = " AND `vehicle_name` LIKE '%".$vehicle_name."%'";
			}

			$no_of_seats_statement = "";

			if($number_of_seats!="")
			{
				$no_of_seats_statement = " AND `no_of_seats` LIKE '%".$number_of_seats."%'";
			}


			$description_statement = "";

			if($description!="")
			{
				$description_statement = " AND `description` LIKE '%".$description."%'";
			}
		

			if($stmt = $this->con->prepare("SELECT `id`, `vehicle_name`, `no_of_seats`, `reate_per_km_non_AC`, `reate_per_km_with_AC`, `description`, `date`, `time` FROM `vehicle_details` where 1".$vehicle_name_statement.$no_of_seats_statement.$description_statement))
			{	
			
				$stmt->bind_result($id,$vehicle_name,$number_of_seats,$rate_per_km_non_AC,$rate_per_km_with_AC,$description,$date,$time);
				
				if($stmt->execute())
				{
					$row	=	0;
					$details	=	array();
					while($stmt->fetch())
					{
						
						
						$details[$row][0]	=	$id;                     
						$details[$row][1]	=	$vehicle_name;	        
						$details[$row][2]	=	$number_of_seats;		            
						$details[$row][3]	=	$rate_per_km_non_AC;  	           
						$details[$row][4]	=	$rate_per_km_with_AC;	            
						$details[$row][5]	=	$description;		                  
						$details[$row][6]	=	$date;
						$details[$row][7]	=	$time;		            

						$row ++;
					}
					if(!empty($details))	
					{	
						return $details;
					}
					return false;
				}
			}	
		}

		function get_assign_vehicles_details_search($var_traveller_name,$var_selected_vehicles)
		{

			$traveller_name_statement = "";

			if($var_traveller_name!="Select" AND $var_traveller_name!="")
			{
				$traveller_name_statement = " AND `traveller_name`= '".$var_traveller_name."'";
			}

			$vehicle_name_statement = "";

			if($var_selected_vehicles!="Select" AND $var_selected_vehicles!="")
			{
				$vehicle_name_statement = " AND `vehicle_name`= '".$var_selected_vehicles."'";
			}


			// $var_traveller_name_statement = "";

			// if($var_traveller_name!="")
			// {
			// 	$var_traveller_name_statement = "  `traveller_name` LIKE '%".$var_traveller_name."%'";
			// }

			// $var_selected_vehicles_statement = "";

			// if($var_selected_vehicles!="")
			// {
			// 	$var_selected_vehicles_statement = " AND `vehicle_name` LIKE '%".$var_selected_vehicles."%'";
			// }


			if($stmt = $this->con->prepare("SELECT `id`, `traveller_name`, `vehicle_name`, `date`, `time` FROM `assign_vehicle` where 1".$traveller_name_statement.$vehicle_name_statement))
			{	
			
				$stmt->bind_result($id,$traveller_name,$selected_vehicles,$date,$time);
				
				if($stmt->execute())
				{
					$row	=	0;
					$details	=	array();
					while($stmt->fetch())
					{
						
						
						$details[$row][0]	=	$id;                     
						$details[$row][1]	=	$traveller_name;	        
						$details[$row][2]	=	$selected_vehicles;		                            
						$details[$row][3]	=	$date;
						$details[$row][4]	=	$time;		            

						$row ++;
					}
					if(!empty($details))	
					{	
						return $details;
					}
					return false;
				}
			}	
		}
	
		function add_enquiry_details($name,$contact,$message)
		{

			$date = date("Y-m-d");
			$time = date("h:i:s A");

			if($stmt_insert = $this->con->prepare("INSERT INTO `enquiry`(`name`, `contact`, `mssage`, `date`, `time`) VALUES (?,?,?,?,?)"))
			{
				$stmt_insert->bind_param("sssss",$name,$contact,$message,$date,$time);

				if($stmt_insert->execute())
				{
					return true;
				}
			   return false;
			} 	
		}

		function get_enquiry_data()
		{
			$date = date("Y-m-d");
			$time = date("h:i:s A");
		

			if($stmt = $this->con->prepare("SELECT `id`, `name`, `contact`, `mssage`, `date`, `time` FROM `enquiry`"))
			{	
			
				$stmt->bind_result($id,$name,$contact,$mssage,$date,$time);
				
				if($stmt->execute())
				{
					$row	=	0;
					$details	=	array();
					while($stmt->fetch())
					{
						
						
						$details[$row][0]	=	$id;                     
						$details[$row][1]	=	$name;	        
						$details[$row][2]	=	$contact;		            
						$details[$row][3]	=	$mssage;  	           		            
						$details[$row][4]	=	$date;
						$details[$row][5]	=	$time;		            

						$row ++;
					}
					if(!empty($details))	
					{	 
						return $details;
					}
					return false;
				}
			}	
		}

		function get_labour_detils_search($aadhar_no,$pan_no,$contact_no)
		{
			$aadhar_no_statement = "";

			if($aadhar_no!="")
			{
				$aadhar_no_statement = "  `aadhar_no` LIKE '%".$aadhar_no."%'";
			}

			$pan_no_statement = "";

			if($pan_no!="")
			{
				$pan_no_statement = " AND `pan_no` LIKE '%".$pan_no."%'";
			}


			$contact_no_statement = "";

			if($contact_no!="")
			{
				$contact_no_statement = " AND `contact_no` LIKE '%".$contact_no."%'";
			}
			

			if($stmt = $this->con->prepare("SELECT `id`, `card_no`, `expiry_date`, `labour_dob`, `address`, `aadhar_no`, `pan_no`, `bank_name`, `bank_account_no`, `rashan_card`, `contact_no`, `photo`, `date`, `time` FROM `labour_details` where ".$aadhar_no_statement.$pan_no_statement.$contact_no_statement))
			{	
			
				$stmt->bind_result($id,$card_no,$expiry_date,$labour_dob,$address,$aadhar_no,$pan_no,$bank_name,$bank_account_no,$rashan_card,$contact_no,$photo,$date,$time);
				
				if($stmt->execute())
				{
					$row	=	0;
					$details	=	array();
					while($stmt->fetch())
					{
						
						
						$details[$row][0]	=	$id;                     
						$details[$row][1]	=	$card_no;	        
						$details[$row][2]	=	$expiry_date;		            
						$details[$row][3]	=	$labour_dob;  	           
						$details[$row][4]	=	$address;	            
						$details[$row][5]	=	$aadhar_no;		      
						$details[$row][6]	=	$pan_no;		        
						$details[$row][7]	=	$bank_name;
						$details[$row][8]	=	$bank_account_no;	
						$details[$row][9]	=	$rashan_card; 	
						$details[$row][10]	=	$contact_no;		            
						$details[$row][11]	=	$photo;		        		            
						$details[$row][12]	=	$date;
						$details[$row][13]	=	$time;		            

						$row ++;
					}
					if(!empty($details))	
					{	
						return $details;
					}
					return false;
				}
			}	
		}
		
function get_vehicle_search_page($vehicle_name,$number_of_seats,$description,$rate_per_km_non_AC,$rate_per_km_with_AC)
		{
			
			$vehicle_name_statement = "";

			if($vehicle_name!="Select" AND $vehicle_name!="")
			{
				$vehicle_name_statement = " AND `id`= '".$vehicle_name."'";
			}

			// $vehicle_name_statement = "";

			// if($vehicle_name!="")
			// {
			// 	$vehicle_name_statement = " AND `id` LIKE '%".$vehicle_name."%'";
			// }

			$no_of_seats_statement = "";

			if($number_of_seats!="")
			{
				$no_of_seats_statement = " AND `no_of_seats` LIKE '%".$number_of_seats."%'";
			}


			$description_statement = "";

			if($description!="")
			{
				$description_statement = " AND `description` LIKE '%".$description."%'";
			}

			$rate_per_km_non_AC_statement = "";

			if($rate_per_km_non_AC!="")
			{
				$rate_per_km_non_AC_statement = " AND `reate_per_km_non_AC` LIKE '%".$rate_per_km_non_AC."%'";
			}


			$reate_per_km_with_AC_statement = "";

			if($rate_per_km_with_AC!="")
			{
				$reate_per_km_with_AC_statement = " AND `reate_per_km_with_AC` LIKE '%".$rate_per_km_with_AC."%'";
			}
		

			if($stmt = $this->con->prepare("SELECT `id`, `vehicle_name`, `no_of_seats`, `reate_per_km_non_AC`, `reate_per_km_with_AC`, `description`, `date`, `time` FROM `vehicle_details` where 1".$vehicle_name_statement.$no_of_seats_statement.$description_statement.$rate_per_km_non_AC_statement.$reate_per_km_with_AC_statement))
			{	
			
				$stmt->bind_result($id,$vehicle_name,$number_of_seats,$rate_per_km_non_AC,$rate_per_km_with_AC,$description,$date,$time);
				
				if($stmt->execute())
				{
					$row	=	0;
					$details	=	array();
					while($stmt->fetch())
					{
						
						
						$details[$row][0]	=	$id;                     
						$details[$row][1]	=	$vehicle_name;	        
						$details[$row][2]	=	$number_of_seats;		            
						$details[$row][3]	=	$rate_per_km_non_AC;  	           
						$details[$row][4]	=	$rate_per_km_with_AC;	            
						$details[$row][5]	=	$description;		                  
						$details[$row][6]	=	$date;
						$details[$row][7]	=	$time;		            

						$row ++;
					}
					if(!empty($details))	
					{	
						return $details;
					}
					return false;
				}
			}	
		}

			
		function add_feedback_detils($full_name,$phone_no,$email_id,$feedback_msg,$photo)
			{							
				$date = date("Y-m-d");
				$time = date("H-i-s A");
				if($stmt_insert = $this->con->prepare("INSERT INTO `feedback_details`(`full_name`, `phone_no`, `email_id`, `feedback_msg`, `photo`, `date`, `time`) VALUES (?,?,?,?,?,?,?)"))
				{
					$stmt_insert->bind_param("sssssss",$full_name,$phone_no,$email_id,$feedback_msg,$photo,$date,$time);
					
					if($stmt_insert->execute())
					{
						return true;
					}
						return false;
				} 	
			}
			
			
			
			function get_feedback_detils($pfrom_date,$pto_date,$pfull_name,$aphone_no)
		{
					$stmt_of_full_name = "";  
					
					if($pfull_name!="")
					{
						$stmt_of_full_name = " AND `full_name` LIKE '%".$pfull_name."%'";
					}
					  
			$stmt_of_pphone_no ="";  
					
					if($aphone_no!="")
					{
						$stmt_of_pphone_no = " AND `phone_no` LIKE '%".$aphone_no."%'";
					}
			if($stmt = $this->con->prepare("SELECT `id`, `full_name`, `phone_no`, `email_id`, `feedback_msg`, `photo`, `date`, `time` FROM `feedback_details` WHERE(`date` between ? AND ? )".$stmt_of_full_name.$stmt_of_pphone_no))
			{	
				$stmt->bind_param("ss",$pfrom_date,$pto_date);
				$stmt->bind_result($id,$full_name,$phone_no,$email_id,$feedback_msg,$photo,$date,$time);
				
				if($stmt->execute())
				{
					$row	=	0;
					$details	=	array();
					while($stmt->fetch())
					{
						
						$details[$row][0]	=	$id;                     
						$details[$row][1]	=	$full_name;	        
						$details[$row][2]	=	$phone_no;		            
						$details[$row][3]	=	$email_id;  	           
						$details[$row][4]	=	$feedback_msg;	            		            		            
						$details[$row][5]	=	$photo;		        		            
						$details[$row][6]	=	$date;
						$details[$row][7]	=	$time;		            

						$row ++;
					}
					if(!empty($details))	
					{	
						return $details;
					}
					return false;
				}
			}	
		}
		
		function get_feedback_detils_for_user()
		{
				
			if($stmt = $this->con->prepare("SELECT `id`, `full_name`, `phone_no`, `email_id`, `feedback_msg`, `photo`, `date`, `time` FROM `feedback_details` "))
			{	

				$stmt->bind_result($id,$full_name,$phone_no,$email_id,$feedback_msg,$photo,$date,$time);
				
				if($stmt->execute())
				{
					$row	=	0;
					$details	=	array();
					while($stmt->fetch())
					{
						
						$details[$row][0]	=	$id;                     
						$details[$row][1]	=	$full_name;	        
						$details[$row][2]	=	$phone_no;		            
						$details[$row][3]	=	$email_id;  	           
						$details[$row][4]	=	$feedback_msg;	            		            		            
						$details[$row][5]	=	$photo;		        		            
						$details[$row][6]	=	$date;
						$details[$row][7]	=	$time;		            

						$row ++;
					}
					if(!empty($details))	
					{	
						return $details;
					}
					return false;
				}
			}	
		}
		
		
		function delete_feedback_detils($del_id)
			{
				if($stmt_select = $this->con->prepare("DELETE FROM `feedback_details` WHERE id=?"))
				{
					$stmt_select->bind_param("i",$del_id);
				
					if($stmt_select->execute())
					{					
							return true;
					}
						return false;
				}
			}
			
			
			function update_feedback_detils($full_name,$phone_no,$email_id,$feedback_msg,$edit_id)
			{							
				$date = date("Y-m-d");
				$time = date("H-i-s A");
				
				if($stmt_insert = $this->con->prepare("UPDATE `feedback_details` SET `full_name`=?,`phone_no`=?,`email_id`=?,`feedback_msg`=?,`date`=?,`time`=? WHERE`id`=?"))
				{
					$stmt_insert->bind_param("ssssssi",$full_name,$phone_no,$email_id,$feedback_msg,$date,$time,$edit_id);
					
					if($stmt_insert->execute())
					{
						return true;
					}
						return false;
				} 	
			}
			
			
			function get_all_feedback_detils($edit_id)
			{
				if($stmt_insert = $this->con->prepare("SELECT `id`, `full_name`, `phone_no`, `email_id`, `feedback_msg`,`date`, `time` FROM `feedback_details` WHERE `id`=?"))
				{
					$stmt_insert->bind_param('s',$edit_id);
					$stmt_insert->bind_result($id,$full_name,$phone_no,$email_id,$feedback_msg,$date,$time);
					if($stmt_insert->execute())
					{
						$counter	=	0;
						$details	=	array();
						while($stmt_insert->fetch())
						{
							$details[$counter][0] = $id;
							$details[$counter][1] = $full_name;
							$details[$counter][2] = $phone_no;
							$details[$counter][3] = $email_id;
							$details[$counter][4] = $feedback_msg;
							$details[$counter][5] = $date;
							$details[$counter][6] = $time;
							$counter++;
						}
						if(!empty($details))
						{
							return $details;
						}
						return false;
					}
				}
			}
			function add_blog_post_details($title,$place,$description,$attachment1,$attachment2,$attachment3,$attachment4)
		{

			$date = date("Y-m-d");
			$time = date("h:i:s A");

			if($stmt_insert = $this->con->prepare("INSERT INTO `add_blog_post`(`title`, `place`, `description1`, `attachment1`, `attachment2`, `attachment3`, `attachment4`, `date`, `time`) VALUES (?,?,?,?,?,?,?,?,?)"))
			{
				$stmt_insert->bind_param("sssssssss",$title,$place,$description,$attachment1,$attachment2,$attachment3,$attachment4,$date,$time);

				if($stmt_insert->execute())
				{
					return true;
				}
			   return false;
			} 	
		}

		function get_blog_post_data()
		{
			$date = date("Y-m-d");
			$time = date("h:i:s A");
		

			if($stmt = $this->con->prepare("SELECT `id`, `title`, `place`, `description1`, `attachment1`, `attachment2`, `attachment3`, `attachment4`, `date`, `time` FROM `add_blog_post`"))
			{	
			
				$stmt->bind_result($id,$title,$place,$description,$attachment1,$attachment2,$attachment3,$attachment4,$date,$time);
				
				if($stmt->execute())
				{
					$row	=	0;
					$details	=	array();
					while($stmt->fetch())
					{
						
						
						$details[$row][0]	=	$id;                     
						$details[$row][1]	=	$title;	        
						$details[$row][2]	=	$place;		            
						$details[$row][3]	=	$description;  	           
						$details[$row][4]	=	$attachment1;	            
						$details[$row][5]	=	$attachment2;
						$details[$row][6]	=	$attachment3;	            
						$details[$row][7]	=	$attachment4;			                  
						$details[$row][8]	=	$date;
						$details[$row][9]	=	$time;		            

						$row ++;
					}
					if(!empty($details))	
					{	
						return $details;
					}
					return false;
				}
			}	
		}

		function delete_blog_post_data($delete_id)
			{
				if($stmt_select = $this->con->prepare("Delete from `add_blog_post` where `id`=?"))
				{
					$stmt_select->bind_param("i",$delete_id);
				
					if($stmt_select->execute())
					{					
							return true;
					}
						return false;
				}
			}

			function update_blog_post($title,$place,$description,$edit_id)
		{
			$date = date("Y-m-d");
			$time = date("h:i:s A");

			if($stmt = $this->con->prepare("UPDATE `add_blog_post` SET `title`=?,`place`=?,`description1`=?,`attachment1`=?,`attachment2`=?,`attachment3`=?,`attachment4`=?,`date`=?,`time`=? WHERE `id`=?"))
			{
				$stmt->bind_param("sssssssssi",$title,$place,$description,$attachment1,$attachment2,$attachment3,$attachment4,$date,$time,$edit_id);
				
				if($stmt->execute())
				{
					return true;
				}
			   return false;
			} 	
		}

		function get_blog_post_details_from_id($edit_id)
		{
			if($stmt_select = $this->con->prepare("SELECT `id`, `title`, `place`, `description1`, `attachment1`, `attachment2`, `attachment3`, `attachment4`, `date`, `time` FROM `add_blog_post` where `id` = ? "))
			{
				$stmt_select->bind_param("i",$edit_id);
			
				$stmt_select->bind_result($id,$title,$place,$description,$attachment1,$attachment2,$attachment3,$attachment4,$date,$time);
			
				if($stmt_select->execute())
				{
					$details = array();
				}
					while($stmt_select->fetch())
					{
						
						
						$details[0]		=	$id;                     
						$details[1]		=	$title;	        
						$details[2]		=	$place;		            
						$details[3]		=	$description;  	            
						$details[4]		=	$attachment1;	            
						$details[5]		=	$attachment2;
						$details[6]		=	$attachment3;	            
						$details[7]		=	$attachment4;		  		          
						$details[8]		=	$date;		            
						$details[9]		=	$time;		            
					}
		
					if(!empty($details))
					{
						return $details;
					}
					else
					{
						return false;
					}
			}
		}

function get_blog_post_data_search($title,$place,$description)
		{
			$title_statement = "";

			if($title!="")
			{
				$title_statement = " AND `title` LIKE '%".$title."%'";
			}

			$place_statement = "";

			if($place!="")
			{
				$place_statement = " AND `place` LIKE '%".$place."%'";
			}


			$description_name_statement = "";

			if($description!="")
			{
				$description_name_statement = " AND  `description1` LIKE '%".$description."%'";
			}

			if($stmt = $this->con->prepare("SELECT `id`, `title`, `place`, `description1`, `attachment1`, `attachment2`, `attachment3`, `attachment4`, `date`, `time` FROM `add_blog_post` where 1".$title_statement.$place_statement.$description_name_statement))
			{	
			
				$stmt->bind_result($id,$title,$place,$description,$attachment1,$attachment2,$attachment3,$attachment4,$date,$time);
				
				if($stmt->execute())
				{
					$row	=	0;
					$details	=	array();
					while($stmt->fetch())
					{
						
						
						$details[$row][0]	=	$id;                     
						$details[$row][1]	=	$title;	        
						$details[$row][2]	=	$place;		            
						$details[$row][3]	=	$description;  	           
						$details[$row][4]	=	$attachment1;	            
						$details[$row][5]	=	$attachment2;
						$details[$row][6]	=	$attachment3;	            
						$details[$row][7]	=	$attachment4;			                  
						$details[$row][8]	=	$date;
						$details[$row][9]	=	$time;		            

						$row ++;
					}
					if(!empty($details))	
					{	
						return $details;
					}
					return false;
				}
			}	
		}
		function get_blog_post_data_for_user()
		{
			
			if($stmt = $this->con->prepare("SELECT `id`, `title`, `place`, `description1`, `attachment1`, `attachment2`, `attachment3`, `attachment4`, `date`, `time` FROM `add_blog_post` "))
			{	
			
				$stmt->bind_result($id,$title,$place,$description,$attachment1,$attachment2,$attachment3,$attachment4,$date,$time);
				
				if($stmt->execute())
				{
					$row	=	0;
					$details	=	array();
					while($stmt->fetch())
					{
						
						
						$details[$row][0]	=	$id;                     
						$details[$row][1]	=	$title;	        
						$details[$row][2]	=	$place;		            
						$details[$row][3]	=	$description;  	           
						$details[$row][4]	=	$attachment1;	            
						$details[$row][5]	=	$attachment2;
						$details[$row][6]	=	$attachment3;	            
						$details[$row][7]	=	$attachment4;			                  
						$details[$row][8]	=	$date;
						$details[$row][9]	=	$time;		            

						$row ++;
					}
					if(!empty($details))	
					{	
						return $details;
					}
					return false;
				}
			}	
		}

		function get_blog_post_data_search_to_get()
		{
			

			if($stmt = $this->con->prepare("SELECT `id`, `title`, `place`, `description1`, `attachment1`, `attachment2`, `attachment3`, `attachment4`, `date`, `time` FROM `add_blog_post` where "))
			{	
			
				$stmt->bind_result($id,$title,$place,$description,$attachment1,$attachment2,$attachment3,$attachment4,$date,$time);
				
				if($stmt->execute())
				{
					$row	=	0;
					$details	=	array();
					while($stmt->fetch())
					{
						
						
						$details[$row][0]	=	$id;                     
						$details[$row][1]	=	$title;	        
						$details[$row][2]	=	$place;		            
						$details[$row][3]	=	$description;  	           
						$details[$row][4]	=	$attachment1;	            
						$details[$row][5]	=	$attachment2;
						$details[$row][6]	=	$attachment3;	            
						$details[$row][7]	=	$attachment4;			                  
						$details[$row][8]	=	$date;
						$details[$row][9]	=	$time;		            

						$row ++;
					}
					if(!empty($details))	
					{	
						return $details;
					}
					return false;
				}
			}	
		}

		function get_all_slider_images()
			{	
				if($stmt_insert = $this->con->prepare("SELECT `id`,`title`,`images` FROM `slider_images`"))
				{	
					$stmt_insert->bind_result($id,$title,$images);
					
					if($stmt_insert->execute())
					{
							$counter	=	0;
							$details	=	array();
						while($stmt_insert->fetch())
						{
							$details[$counter][0]	=	$id;
							$details[$counter][1]	=	$title;
							$details[$counter][2]	=	$images;
						
							$counter++;
						}
						if(!empty($details))	
						{
							return $details;
						}
						return false;
					}	
				}
			}
			
			function new_slider_images($title,$actual_image_name)
			{							
				$date = date("Y-m-d");
				$time = date("H-i-s A");
				if($stmt_insert = $this->con->prepare("INSERT INTO `slider_images`(`title`, `images`, `date`, `time`) VALUES (?,?,?,?)"))
				{
					$stmt_insert->bind_param("ssss",$title,$actual_image_name,$date,$time);
					
					if($stmt_insert->execute())
					{
						return true;
					}
						return false;
				} 	
			}
			
			function delete_slider_images($del_id)
			{
				if($stmt_select = $this->con->prepare("Delete from `slider_images` where `id`=?"))
				{
					$stmt_select->bind_param("i",$del_id);
				
					if($stmt_select->execute())
					{					
							return true;
					}
						return false;
				}
			}
			
			function gallary($title1,$actual_image_name)
			{							
				$date = date("Y-m-d");
				$time = date("H:i:s A");
				if($stmt_insert = $this->con->prepare("INSERT INTO `gallary`(`title`, `image`, `date`, `time`) VALUES (?,?,?,?)"))
				{
					$stmt_insert->bind_param("ssss",$title1,$actual_image_name,$date,$time);
					
					if($stmt_insert->execute())
					{
						return true;
					}
						return false;
				} 	
			}


			function delete_gallery($del_id)
			{
				if($stmt_select = $this->con->prepare("Delete from `gallary` where `id`=?"))
				{
					$stmt_select->bind_param("i",$del_id);
				
					if($stmt_select->execute())
					{					
							return true;
					}
						return false;
				}
			}
			
			function get_all_gallery()
			{	
				if($stmt_insert = $this->con->prepare("SELECT `id`,`title`,`image` FROM `gallary`"))
				{	
					$stmt_insert->bind_result($id,$title1,$images);
					
					if($stmt_insert->execute())
					{
							$counter	=	0;
							$details	=	array();
						while($stmt_insert->fetch())
						{
							$details[$counter][0]	=	$id;
							$details[$counter][1]	=	$title1;
							$details[$counter][2]	=	$images;
						
							$counter++;
						}
						if(!empty($details))	
						{
							return $details;
						}
						return false;
					}	
				}
			}
		function video_gallary($title1,$video)
			{							
				$date = date("Y-m-d");
				$time = date("H:i:s A");
				if($stmt_insert = $this->con->prepare("INSERT INTO `video_gallary`(`title`, `images`, `date`, `time`) VALUES (?,?,?,?)"))
				{
					$stmt_insert->bind_param("ssss",$title1,$video,$date,$time);
					
					if($stmt_insert->execute())
					{
						return true;
					}
						return false;
				} 	
			}
			function get_all_video_gallery()
			{	
				if($stmt_insert = $this->con->prepare("SELECT `id`,`title`,`images` FROM `video_gallary`"))
				{	
					$stmt_insert->bind_result($id,$title1,$images);
					
					if($stmt_insert->execute())
					{
							$counter	=	0;
							$details	=	array();
						while($stmt_insert->fetch())
						{
							$details[$counter][0]	=	$id;
							$details[$counter][1]	=	$title1;
							$details[$counter][2]	=	$images;
						
							$counter++;
						}
						if(!empty($details))	
						{
							return $details;
						}
						return false;
					}	
				}
			}
				function delete_video_gallery($del_id)
			{
				if($stmt_select = $this->con->prepare("Delete from `video_gallary` where `id`=?"))
				{
					$stmt_select->bind_param("i",$del_id);
				
					if($stmt_select->execute())
					{					
							return true;
					}
						return false;
				}
			}


function add_undertaking_Form($full_name,$mobile_no,$y_to_admission,$other,$status,$undertaking_form_no )
		{

			$date = date("Y-m-d");
			$time = date("h:i:s A");

			if($stmt_insert = $this->con->prepare("INSERT INTO `udertakig`(`full_name`, `mobile_no`, `admission_to_year`, `other`, `status`, `undertaking_form_no`, `date`, `time`) VALUES (?,?,?,?,?,?,?,?)"))
			{
				$stmt_insert->bind_param("ssssssss",$full_name,$mobile_no,$y_to_admission,$other,$status,$undertaking_form_no,$date,$time);

				if($stmt_insert->execute())
				{
					return true;
				}
			   return false;
			} 	
		}

	function add_contact_details($name,$email,$subject,$message)
		{

			$date = date("Y-m-d");
			$time = date("h:i:s A");

			if($stmt_insert = $this->con->prepare("INSERT INTO `contact`(`name`, `email`, `subject`, `message`, `date`, `time`) VALUES (?,?,?,?,?,?)"))
			{
				$stmt_insert->bind_param("ssssss",$name,$email,$subject,$message,$date,$time);

				if($stmt_insert->execute())
				{
					return true;
				}
			   return false;
			} 	
		}

			function get_contact_details()
			{	
				if($stmt_insert = $this->con->prepare("SELECT `id`, `name`, `email`, `subject`, `message`, `date`, `time` FROM `contact`"))
				{	
					$stmt_insert->bind_result($id,$name,$email,$subject,$message,$date,$time);
					
					if($stmt_insert->execute())
					{
							$counter	=	0;
							$details	=	array();
						while($stmt_insert->fetch())
						{
							$details[$counter][0]	=	$id;
							$details[$counter][1]	=	$name;
							$details[$counter][2]	=	$email;
							$details[$counter][3]	=	$subject;
							$details[$counter][4]	=	$message;
							$details[$counter][5]	=	$date;
							$details[$counter][6]	=	$time;
						
							$counter++;
						}
						if(!empty($details))	
						{
							return $details;
						}
						return false;
					}	
				}
			}

		function delete_contact($delete_id)
			{
				if($stmt_select = $this->con->prepare("Delete from `contact` where `id`=?"))
				{
					$stmt_select->bind_param("i",$delete_id);
				
					if($stmt_select->execute())
					{					
							return true;
					}
						return false;
				}
			}


function add_student_details($full_name, $number, $qualification, $b_name, $city, $address, $email, $hashed_password) {
        
        $date = date("Y-m-d");
        $time = date("h:i:s A");

        if ($stmt_insert = $this->con->prepare("INSERT INTO stud_regitration (full_name, number, qualification, b_name, city, address, email, password, date, time) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)")) {
           
            $stmt_insert->bind_param("ssssssssss", $full_name, $number, $qualification, $b_name, $city, $address, $email, $hashed_password, $date, $time);

            if ($stmt_insert->execute()) {
                return true;
            }
            return false;
        }
        return false;
    }


    function get_student_password($var_mobile_no)
	{
	   // echo $var_mobile_no,$user_type;
	    
		if($stmt=$this->con->prepare("SELECT `password` from `student_addmission` WHERE `parants_mobile_no` =? "))
        {
            $stmt->bind_param("s",$var_mobile_no);
            
            $stmt->bind_result($var_password);
            if($stmt->execute())
            {
                if($stmt->fetch())
                {
                    return $var_password;
                }
                else
                {
                    return false;
                }
            }
        }
	}

function get_student_details() {    
        if ($stmt_select = $this->con->prepare("SELECT `id`, `full_name`, `number`, `qualification`, `b_name`, `city`, `address`, `email`, `password`, `date`, `time` FROM `stud_regitration` ")) {    
            $stmt_select->bind_result($id, $full_name, $number, $qualification, $college_name, $city, $address, $email, $password, $reg_date, $reg_time);
            
            if ($stmt_select->execute()) {
                $counter = 0;
                $details = array();
                while ($stmt_select->fetch()) {
                    $details[$counter][0] = $id;
                    $details[$counter][1] = $full_name;
                    $details[$counter][2] = $number;
                    $details[$counter][3] = $qualification;
                    $details[$counter][4] = $college_name;
                    $details[$counter][5] = $city;
                    $details[$counter][6] = $address;
                    $details[$counter][7] = $email;
                    $details[$counter][8] = $password; 
                    $details[$counter][9] = $reg_date;
                    $details[$counter][10] = $reg_time;
                    $counter++;
                }
                if (!empty($details)) {    
                    return $details;
                }
                return false;
            }    
        }
        return false;
    }

function delete_student($del_id)
            {
                if($stmt_select = $this->con->prepare("Delete from `stud_regitration` where `id`=?"))
                {
                    $stmt_select->bind_param("i",$del_id);
                
                    if($stmt_select->execute())
                    {                   
                            return true;
                    }
                        return false;
                }
            }

         function add_feedback_details($full_name, $email, $class, $college_name, $batch, $photo, $testimonial)
			{
			    $date = date("Y-m-d");
			    $time = date("h:i:s A");

			    if ($stmt_insert = $this->con->prepare("INSERT INTO `feedback` (`full_name`, `email`, `class`, `college_name`, `batch`, `photo`, `testimonial`, `date`, `time`) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)")) 
			    {
			        $stmt_insert->bind_param("sssssssss", $full_name, $email, $class, $college_name, $batch, $photo, $testimonial, $date, $time);

			        if ($stmt_insert->execute()) 
			        {
			            return true; 
			        }
			        return false; 
			    }
			    return false; 
			}

	function get_feedback_details() {    
    if ($stmt_select = $this->con->prepare("SELECT `id`, `full_name`, `email`, `class`, `college_name`, `batch`, `photo`, `testimonial`, `date`, `time` FROM `feedback`")) {    
        $stmt_select->bind_result($id, $full_name, $email, $class, $college_name, $batch, $photo, $testimonial, $date, $time);
        
        if ($stmt_select->execute()) {
            $counter = 0;
            $details = array();
            
            while ($stmt_select->fetch()) {
                $details[$counter][0] = $id;
                $details[$counter][1] = $full_name;
                $details[$counter][2] = $email;
                $details[$counter][3] = $class;
                $details[$counter][4] = $college_name;
                $details[$counter][5] = $batch;
                $details[$counter][6] = $photo;
                $details[$counter][7] = $testimonial;
                $details[$counter][8] = $date;
                $details[$counter][9] = $time;
                $counter++;
            }
            
            if (!empty($details)) {    
                return $details;
            }
            return false;
        }    
    }
    return false;
}

function delete_feedback($del_id)
            {
                if($stmt_select = $this->con->prepare("Delete from `feedback` where `id`=?"))
                {
                    $stmt_select->bind_param("i",$del_id);
                
                    if($stmt_select->execute())
                    {                   
                            return true;
                    }
                        return false;
                }
            }

			function add_student_addmission($candidate_full_name,$parent_full_name,$mother_name,$permant_address,$school_name,$select_school_type,$select_school_medium,$last_year_per,$adhar_no,$date_of_brith,$parants_mobile_no,$gender,$photo,$marshit,$laguage_for_exam,$signature,$password,$standard,$signature_student) {
        
				$date = date("Y-m-d");
				$time = date("h:i:s A");
		
				if ($stmt_insert = $this->con->prepare("INSERT INTO `student_addmission`(`candidate_full_name`, `parent_full_name`, `mother_name`, `permant_address`, `school_name`, `select_school_type`, `select_school_medium`, `last_year_per`, `adhar_no`, `date_of_brith`, `parants_mobile_no`,`gender`, `photo`, `marshit`, `laguage_for_exam`, `signature`, `date`, `time`,`password`, `standard`, `signature_student`) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)")) {
				   
					$stmt_insert->bind_param("sssssssssssssssssssss", $candidate_full_name,$parent_full_name,$mother_name,$permant_address,$school_name,$select_school_type,$select_school_medium,$last_year_per,$adhar_no,$date_of_brith,$parants_mobile_no,$gender,$photo,$marshit,$laguage_for_exam,$signature,$date,$time,$password,$standard,$signature_student);
		
					if ($stmt_insert->execute()) {
						return true;
					}
					return false;
				}
				return false;
			}

			function get_student_addmission_details() {    
				if ($stmt_select = $this->con->prepare("SELECT `id`, `candidate_full_name`, `parent_full_name`, `mother_name`, `permant_address`, `school_name`, `select_school_type`, `select_school_medium`, `last_year_per`, `adhar_no`, `date_of_brith`, `parants_mobile_no`,`gender`, `photo`, `marshit`, `laguage_for_exam`, `signature`, `date`, `time`, `standard`, `signature_student` FROM `student_addmission`")) {    
					$stmt_select->bind_result($id, $candidate_full_name,$parent_full_name,$mother_name,$permant_address,$school_name,$select_school_type,$select_school_medium,$last_year_per,$adhar_no,$date_of_brith,$parants_mobile_no,$gender,$photo,$marshit,$laguage_for_exam,$signature,$date,$time,$standard,$signature_student);
					
					if ($stmt_select->execute()) {
						$counter = 0;
						$details = array();
						while ($stmt_select->fetch()) {
							$details[$counter][0] = $id;
							$details[$counter][1] = $candidate_full_name;
							$details[$counter][2] = $parent_full_name;
							$details[$counter][3] = $mother_name;
							$details[$counter][4] = $permant_address;
							$details[$counter][5] = $school_name;
							$details[$counter][6] = $select_school_type;
							$details[$counter][7] = $select_school_medium;
							$details[$counter][8] = $last_year_per; 
							$details[$counter][9] = $adhar_no;
							$details[$counter][10] = $date_of_brith;
							$details[$counter][11] = $parants_mobile_no;
							$details[$counter][12] = $gender;
							$details[$counter][13] = $photo;
							$details[$counter][14] = $marshit;
							$details[$counter][15] = $laguage_for_exam;
							$details[$counter][16] = $signature;
							$details[$counter][17] = $date; 
							$details[$counter][18] = $time;
							$details[$counter][19] = $standard; 
							$details[$counter][20] = $signature_student;
		
							$counter++;
						}
						if (!empty($details)) {    
							return $details;
						}
						return false;
					}    
				}
				return false;
			}

			function delete_student_addmission_details($del_id)
            {
                if($stmt_select = $this->con->prepare("Delete from `student_addmission` where `id`=?"))
                {
                    $stmt_select->bind_param("i",$del_id);
                
                    if($stmt_select->execute())
                    {                   
                            return true;
                    }
                        return false;
                }
            }

			function update_student_addmission($candidate_full_name,$parent_full_name,$mother_name,$permant_address,$school_name,$select_school_type,$select_school_medium,$last_year_per,$adhar_no,$date_of_brith,$parants_mobile_no,$gender,$laguage_for_exam,$standard,$edit_id)
				{
					$date = date("Y-m-d");
					$time = date("h:i:s A");

					if($stmt = $this->con->prepare("UPDATE `student_addmission` SET `candidate_full_name`=?,`parent_full_name`=?,`mother_name`=?,`permant_address`=?,`school_name`=?,`select_school_type`=?,`select_school_medium`=?,`last_year_per`=?,`adhar_no`=?,`date_of_brith`=?,`parants_mobile_no`=?,`gender`=?,`photo`=?,`marshit`=?,`laguage_for_exam`=?,`standard`=? WHERE `id`=?"))
					{
						$stmt->bind_param("ssssssssssssssssi",$candidate_full_name,$parent_full_name,$mother_name,$permant_address,$school_name,$select_school_type,$select_school_medium,$last_year_per,$adhar_no,$date_of_brith,$parants_mobile_no,$gender,$photo,$marshit,$laguage_for_exam,$standard,$edit_id);
						
						if($stmt->execute())
						{
							return true;
						}
					   return false;
					} 	
				}

		function get_student_addmission_from_id($edit_id)
		{
			if($stmt_select = $this->con->prepare("SELECT `id`, `candidate_full_name`, `parent_full_name`, `mother_name`, `permant_address`, `school_name`, `select_school_type`, `select_school_medium`, `last_year_per`, `adhar_no`,`date_of_brith`,`parants_mobile_no`,`gender`,`photo`,`marshit`,`laguage_for_exam`,`date`,`time`,`standard` FROM `student_addmission`  where `id` = ? "))
			{
				$stmt_select->bind_param("i",$edit_id);
			
				$stmt_select->bind_result($id,$candidate_full_name,$parent_full_name,$mother_name,$permant_address,$school_name,$select_school_type,$select_school_medium,$last_year_per,$adhar_no,$date_of_brith,$parants_mobile_no,$gender,$photo,$marshit,$laguage_for_exam,$date,$time,$standard);
			
				if($stmt_select->execute())
				{
					$details = array();
				}
					while($stmt_select->fetch())
					{
						
						
						$details[0]		=	$id;                     
						$details[1]		=	$candidate_full_name;	        
						$details[2]		=	$parent_full_name;		            
						$details[3]		=	$mother_name;  	            
						$details[4]		=	$permant_address;	            
						$details[5]		=	$school_name;
						$details[6]		=	$select_school_type;	        
						$details[7]		=	$select_school_medium;		            
						$details[8]		=	$last_year_per;  	            
						$details[9]		=	$adhar_no;	            
						$details[10]	=	$date_of_brith;		          
						$details[11]	=	$parants_mobile_no;	
						$details[12]	=	$gender;	
						$details[13]	=	$laguage_for_exam;		         		          
						$details[14]	=	$date;		            
						$details[15]	=	$time;	
						$details[16]	=	$standard;		            
					}
		
					if(!empty($details))
					{
						return $details;
					}
					else
					{
						return false;
					}
			}
		}

		function add_center_details($center_name,$center_address,$contact_person_name,$contact_no,$facs_no,$email_id,$jilha)
		{

			$date = date("Y-m-d");
			$time = date("h:i:s A");

			if($stmt_insert = $this->con->prepare("INSERT INTO `center_register`(`center_name`, `center_address`, `contact_person_name`, `contact_no`, `facs_no`, `email_id`, `jilha`, `date`, `time`) VALUES (?,?,?,?,?,?,?,?,?)"))
			{
				$stmt_insert->bind_param("sssssssss",$center_name,$center_address,$contact_person_name,$contact_no,$facs_no,$email_id,$jilha,$date,$time);

				if($stmt_insert->execute())
				{
					return true;
				}
			   return false;
			} 	
		}
	
		function get_center_details() {    
			if ($stmt_select = $this->con->prepare("SELECT  `id`, `center_name`, `center_address`, `contact_person_name`, `contact_no`, `facs_no`, `email_id`, `jilha`, `date`, `time` FROM `center_register`")) {  

				$stmt_select->bind_result($id,$center_name,$center_address,$contact_person_name,$contact_no,$facs_no,$email_id,$jilha,$date,$time);
				
				if ($stmt_select->execute()) {
					$counter = 0;
					$details = array();
					while ($stmt_select->fetch()) {
						$details[$counter][0] = $id;
						$details[$counter][1] = $center_name;
						$details[$counter][2] = $center_address;
						$details[$counter][3] = $contact_person_name;
						$details[$counter][4] = $contact_no;
						$details[$counter][5] = $facs_no;
						$details[$counter][6] = $email_id;
						$details[$counter][7] = $jilha;
						$details[$counter][8] = $date; 
						$details[$counter][9] = $time;
	
						$counter++;
					}
					if (!empty($details)) {    
						return $details;
					}
					return false;
				}    
			}
			return false;
		}

		function delete_center_details($del_id)
            {
                if($stmt_select = $this->con->prepare("Delete from `center_register` where `id`=?"))
                {
                    $stmt_select->bind_param("i",$del_id);
                
                    if($stmt_select->execute())
                    {                   
                            return true;
                    }
                        return false;
                }
            }

			function update_center_details($center_name,$center_address,$contact_person_name,$contact_no,$facs_no,$email_id,$jilha,$edit_id)
		{
			$date = date("Y-m-d");
			$time = date("h:i:s A");

			if($stmt = $this->con->prepare("UPDATE `center_register` SET `center_name`=?,`center_address`=?,`contact_person_name`=?,`contact_no`=?,`facs_no`=?,`email_id`=?,`jilha`=? WHERE `id`=?"))
			{
				$stmt->bind_param("sssssssi",$center_name,$center_address,$contact_person_name,$contact_no,$facs_no,$email_id,$jilha,$edit_id);
				
				if($stmt->execute())
				{
					return true;
				}
			   return false;
			} 	
		}

		function get_center_details_from_id($edit_id)
		{
			if($stmt_select = $this->con->prepare("SELECT `id`, `center_name`, `center_address`, `contact_person_name`, `contact_no`, `facs_no`, `email_id`, `jilha`, `date`, `time` FROM `center_register`  where `id` = ? "))
			{
				$stmt_select->bind_param("i",$edit_id);
			
				$stmt_select->bind_result($id,$center_name,$center_address,$contact_person_name,$contact_no,$facs_no,$email_id,$jilha,$date,$time);
			
				if($stmt_select->execute())
				{
					$details = array();
				}
					while($stmt_select->fetch())
					{
						
						
						$details[0]		=	$id;                     
						$details[1]		=	$center_name;	        
						$details[2]		=	$center_address;		            
						$details[3]		=	$contact_person_name;  	            
						$details[4]		=	$contact_no;	            
						$details[5]		=	$facs_no;
						$details[6]		=	$email_id;	        
						$details[7]		=	$jilha;		                    		          
						$details[8]		=	$date;		            
						$details[9]		=	$time;		            
					}
		
					if(!empty($details))
					{
						return $details;
					}
					else
					{
						return false;
					}
			}
		}
		
		function add_exam_details($exam_name,$subject,$instruction,$other_des,$total_marks,$exam_date,$exam_time,$start_time,$end_time,$status,$amount,$reporting_time,$gate_closure_time,$exam_desc)
		{

			$date = date("Y-m-d");
			$time = date("h:i:s A");

			if($stmt_insert = $this->con->prepare("INSERT INTO `create_exam`(`exam_name`, `subject`, `instruction`, `other_des`, `total_marks`, `exam_date`, `exam_time`, `start_time`, `end_time`,`status`, `date`, `time`,`amount`, `reporting_time`, `gate_closure_time`,`exam_desc`) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)"))
			{
				$stmt_insert->bind_param("ssssssssssssssss",$exam_name,$subject,$instruction,$other_des,$total_marks,$exam_date,$exam_time,$start_time,$end_time,$status,$date,$time,$amount,$reporting_time,$gate_closure_time,$exam_desc);

				if($stmt_insert->execute())
				{
					return true;
				}
			   return false;
			} 	
		}

		function get_exam_details() {    
			if ($stmt_select = $this->con->prepare("SELECT `id`, `exam_name`, `subject`, `instruction`, `other_des`, `total_marks`, `exam_date`, `exam_time`, `start_time`, `end_time`, `status`, `date`, `time`,`amount`, `reporting_time`, `gate_closure_time`,`exam_desc` FROM `create_exam` ORDER BY `id` DESC")) {  

				$stmt_select->bind_result($id,$exam_name,$subject,$instruction,$other_des,$total_marks,$exam_date,$exam_time,$start_time,$end_time,$status,$date,$time,$amount,$reporting_time,$gate_closure_time,$exam_desc);
				
				if ($stmt_select->execute()) {
					$counter = 0;
					$details = array();
					while ($stmt_select->fetch()) {
						$details[$counter][0] = $id;
						$details[$counter][1] = $exam_name;
						$details[$counter][2] = $subject;
						$details[$counter][3] = $instruction;
						$details[$counter][4] = $other_des;
						$details[$counter][5] = $total_marks;
						$details[$counter][6] = $exam_date;
						$details[$counter][7] = $exam_time;
						$details[$counter][8] = $start_time;
						$details[$counter][9] = $end_time;
						$details[$counter][10] = $status;
						$details[$counter][11] = $date; 
						$details[$counter][12] = $time;
						$details[$counter][13] = $amount;
						$details[$counter][14] = $reporting_time;
						$details[$counter][15] = $gate_closure_time;
						$details[$counter][16] = $exam_desc;
						$counter++;
					}
					if (!empty($details)) {    
						return $details;
					}
					return false;
				}    
			}
			return false;
		}

		function delete_exam_details($del_id)
            {
                if($stmt_select = $this->con->prepare("Delete from `create_exam` where `id`=?"))
                {
                    $stmt_select->bind_param("i",$del_id);
                
                    if($stmt_select->execute())
                    {                   
                            return true;
                    }
                        return false;
                }
            
			}


		function update_exam_details($exam_name,$subject,$instruction,$other_des,$total_marks,$exam_date,$exam_time,$start_time,$end_time,$status,$amount,$reporting_time,$gate_closure_time,$exam_desc,$edit_id)
		{
			$date = date("Y-m-d");
			$time = date("h:i:s A");

			if($stmt = $this->con->prepare("UPDATE `create_exam` SET `exam_name`=?,`subject`=?,`instruction`=?,`other_des`=?,`total_marks`=?,`exam_date`=?,`exam_time`=?,`start_time`=?,`end_time`=?,`status`=? ,`amount`=?,`reporting_time`=?,`gate_closure_time`=? ,`exam_desc`=? WHERE `id`=?"))
			{
				$stmt->bind_param("ssssssssssssssi",$exam_name,$subject,$instruction,$other_des,$total_marks,$exam_date,$exam_time,$start_time,$end_time,$status,$amount,$reporting_time,$gate_closure_time,$exam_desc,$edit_id);
				
				if($stmt->execute())
				{
					return true;
				}
			   return false;
			} 	
		}

		// function get_create_exam_details_from_id1($edit_id)
		// {
		// 	if($stmt_select = $this->con->prepare("SELECT `id`, `exam_name`, `subject`, `instruction`, `other_des`, `total_marks`, `exam_date`, `exam_time`, `start_time`, `end_time`, `status`, `date`, `time` FROM `create_exam`  where `id` = ? "))
		// 	{
		// 		$stmt_select->bind_param("i",$edit_id);
			
		// 		$stmt_select->bind_result($id,$exam_name,$subject,$instruction,$other_des,$total_marks,$exam_date,$exam_time,$start_time,$end_time,$status,$date,$time);
			
		// 		if($stmt_select->execute())
		// 		{
		// 			$details = array();
		// 		}
		// 			while($stmt_select->fetch())
		// 			{
						
						
		// 				$details[0]		=	$id;                     
		// 				$details[1]		=	$exam_name;	        
		// 				$details[2]		=	$subject;		            
		// 				$details[3]		=	$instruction;  	            
		// 				$details[4]		=	$other_des;	            
		// 				$details[5]		=	$total_marks;
		// 				$details[6]		=	$exam_date;	        
		// 				$details[7]		=	$exam_time;
		// 				$details[8]		=	$start_time;
		// 				$details[9]		=	$end_time;	        
		// 				$details[10]	=	$status;			                    		          
		// 				$details[11]	=	$date;		            
		// 				$details[12]	=	$time;		            
		// 			}
		
		// 			if(!empty($details))
		// 			{
		// 				return $details;
		// 			}
		// 			else
		// 			{
		// 				return false;
		// 			}
		// 	}
		// }

		function get_exam_details_from_id($edit_id)
		{
			if($stmt_select = $this->con->prepare("SELECT `id`, `exam_name`, `subject`, `instruction`, `other_des`, `total_marks`, `exam_date`, `exam_time`, `start_time`, `end_time`, `status`, `date`, `time`,`amount`, `reporting_time`, `gate_closure_time`,`exam_desc` FROM `create_exam`  where `id` = ? "))
			{
				$stmt_select->bind_param("i",$edit_id);
			
				$stmt_select->bind_result($id,$exam_name,$subject,$instruction,$other_des,$total_marks,$exam_date,$exam_time,$start_time,$end_time,$status,$date,$time,$amount,$reporting_time,$gate_closure_time,$exam_desc);
			
				if($stmt_select->execute())
				{
					$details = array();
				}
					while($stmt_select->fetch())
					{
							
						
						$details[0]		=	$id;                     
						$details[1]		=	$exam_name;	        
						$details[2]		=	$subject;		            
						$details[3]		=	$instruction;  	            
						$details[4]		=	$other_des;	            
						$details[5]		=	$total_marks;
						$details[6]		=	$exam_date;	        
						$details[7]		=	$exam_time;
						$details[8]		=	$start_time;
						$details[9]		=	$end_time;	        
						$details[10]	=	$status;			                    		          
						$details[11]	=	$date;		            
						$details[12]	=	$time;
						$details[13]	=	$amount;
						$details[14]	=	$reporting_time;
						$details[15]	=	$gate_closure_time;		
						
						$details[16]	=	$exam_desc;		

					}
		
					if(!empty($details))
					{
						return $details;
					}
					else
					{
						return false;
					}
			}
		}









function add_team_details($team_name, $education, $experience, $qualification, $team_photo, $select_subject,$select_role) {
    $date = date("Y-m-d");
    $time = date("h:i:s A");

    if ($stmt_insert = $this->con->prepare("INSERT INTO `create_team` (`name`, `education`, `experience`, `qualification`, `team_photo`, `select_subject`, `date`, `time`,`select_role`) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)")) {
        $stmt_insert->bind_param("sssssssss", $team_name, $education, $experience, $qualification, $team_photo, $select_subject, $date, $time, $select_role);

        if ($stmt_insert->execute()) {
            return true;
        } else {
            // Log or display error
            error_log("Execute failed: " . $stmt_insert->error);
            return false;
        }
    } else {
        // Log or display error
        error_log("Prepare failed: " . $this->con->error);
        return false;
    }
}


		function get_team_details() {    
			if ($stmt_select = $this->con->prepare("SELECT `id`, `name`, `education`, `experience`, `qualification`, `team_photo`, `select_subject`, `date`, `time`,`select_role` FROM `create_team`")) {  

				$stmt_select->bind_result($id,$team_name,$education,$experience,$qualification,$team_photo,$select_subject,$date,$time,$select_role);
				
				if ($stmt_select->execute()) {
					$counter = 0;
					$details = array();
					while ($stmt_select->fetch()) {
						$details[$counter][0] = $id;
						$details[$counter][1] = $team_name;
						$details[$counter][2] = $education;
						$details[$counter][3] = $experience;
						$details[$counter][4] = $qualification;
						$details[$counter][5] = $team_photo;
						$details[$counter][6] = $select_subject;
						$details[$counter][7] = $date; 
						$details[$counter][8] = $time;
						$details[$counter][9] = $select_role;
	
						$counter++;
					}
					if (!empty($details)) {    
						return $details;
					}
					return false;
				}    
			}
			return false;
		}

		function delete_team_details($del_id)
            {
                if($stmt_select = $this->con->prepare("Delete from `create_team` where `id`=?"))
                {
                    $stmt_select->bind_param("i",$del_id);
                
                    if($stmt_select->execute())
                    {                   
                            return true;
                    }
                        return false;
                }
            
			}


			function update_team_details($team_name,$education,$experience,$qualification,$select_subject,$edit_id)
		{
			$date = date("Y-m-d");
			$time = date("h:i:s A");

			if($stmt = $this->con->prepare("UPDATE `create_team` SET `name`=?,`education`=?,`experience`=?,`qualification`=?,`select_subject`=? WHERE `id`=?"))
			{
				$stmt->bind_param("sssssi",$team_name,$education,$experience,$qualification,$select_subject,$edit_id);
				
				if($stmt->execute())
				{
					return true;
				}
			   return false;
			} 	
		}

		function get_team_details_from_id($edit_id)
		{
			if($stmt_select = $this->con->prepare("SELECT `id`, `name`, `education`, `experience`, `qualification`,`select_subject`, `date`, `time` FROM `create_team`  where `id` = ? "))
			{
				$stmt_select->bind_param("i",$edit_id);
			
				$stmt_select->bind_result($id,$team_name,$education,$experience,$qualification,$select_subject,$date,$time);
			
				if($stmt_select->execute())
				{
					$details = array();
				}
					while($stmt_select->fetch())
					{
							
						
						$details[0]		=	$id;                     
						$details[1]		=	$team_name;	        
						$details[2]		=	$education;		            
						$details[3]		=	$experience;  	            
						$details[4]		=	$qualification;	            
						$details[5]		=	$select_subject;		                    		          
						$details[6]		=	$date;		            
						$details[7]		=	$time;	
					}
		
					if(!empty($details))
					{
						return $details;
					}
					else
					{
						return false;
					}
			}
		}
		function add_exam_details_form($exam_id1,$student_id1,$payment_status,$payment_amount) {
		        
		        $date = date("Y-m-d");
		        $time = date("h:i:s A");
		        $description="";
		        $center_id="";

		        if ($stmt_insert = $this->con->prepare("INSERT INTO `exam_register_students`( `exam_id`, `student_id`, `payment_status`,`payment_amount`,`description`,`date`,`time`,`center_id`) VALUES (?,?,?,?,?,?,?,?)")) {
		           
		            $stmt_insert->bind_param("ssssssss",$exam_id1,$student_id1,$payment_status,$payment_amount,$description,$date,$time,$center_id);

		            if ($stmt_insert->execute()) {
		                return true;
		            }
		            return false;
		        }
		        return false;
		    }
    
    	function get_exam_amount($exam_id1)
		{
			if($stmt_select = $this->con->prepare("Select `amount` from `create_exam` where `id` = ? "))
			{	
				$stmt_select->bind_param("s",$exam_id1);
			
				$stmt_select->bind_result($result_id);
			
				if($stmt_select->execute())
				{
					if($stmt_select->fetch())
					{
						return $result_id;
					}
				}
						return false;
			}
		}
		
	function get_student_addmission_for_hall_ticket($student_id)
		{
			if($stmt_select = $this->con->prepare("SELECT `id`, `candidate_full_name`, `parent_full_name`, `mother_name`, `permant_address`, `school_name`, `select_school_type`, `select_school_medium`, `last_year_per`, `adhar_no`,`date_of_brith`,`parants_mobile_no`,`gender`,`photo`,`marshit`,`laguage_for_exam`,`date`,`time` FROM `student_addmission`  where `parants_mobile_no` = ? "))
			{

				$stmt_select->bind_param("s",$student_id);
			
				$stmt_select->bind_result($id,$candidate_full_name,$parent_full_name,$mother_name,$permant_address,$school_name,$select_school_type,$select_school_medium,$last_year_per,$adhar_no,$date_of_brith,$parants_mobile_no,$gender,$photo,$marshit,$laguage_for_exam,$date,$time);
			
				if($stmt_select->execute())
				{
					$details = array();
				}
					while($stmt_select->fetch())
					{
						
						
						$details[0]		=	$id;                     
						$details[1]		=	$candidate_full_name;	        
						$details[2]		=	$parent_full_name;		            
						$details[3]		=	$mother_name;  	            
						$details[4]		=	$permant_address;	            
						$details[5]		=	$school_name;
						$details[6]		=	$select_school_type;	        
						$details[7]		=	$select_school_medium;		            
						$details[8]		=	$last_year_per;  	            
						$details[9]		=	$adhar_no;	            
						$details[10]	=	$date_of_brith;		          
						$details[11]	=	$parants_mobile_no;	
						$details[12]	=	$gender;	
						$details[13]	=	$laguage_for_exam;		         		          
						$details[14]	=	$date;		            
						$details[15]	=	$time;		            
					}
		
					if(!empty($details))
					{
						return $details;
					}
					else
					{
						return false;
					}
			}
		}

	function get_exam_name($exam_id1)
		{
			if($stmt_select = $this->con->prepare("Select `exam_name` from `create_exam` where `id` = ? "))
			{	
				$stmt_select->bind_param("s",$exam_id1);
			
				$stmt_select->bind_result($result_id);
			
				if($stmt_select->execute())
				{
					if($stmt_select->fetch())
					{
						return $result_id;
					}
				}
						return false;
			}
		}
		
		
function get_student_addmission_for_hall_ticket1($student_id)
		{
			if($stmt_select = $this->con->prepare("SELECT `id`, `candidate_full_name`, `parent_full_name`, `mother_name`, `permant_address`, `school_name`, `select_school_type`, `select_school_medium`, `last_year_per`, `adhar_no`, `date_of_brith`, `parants_mobile_no`, `gender`, `photo`, `marshit`, `laguage_for_exam`, `signature`, `date`, `time`, `standard`, `signature_student` FROM `student_addmission`  where `parants_mobile_no` = ? "))
			{

				$stmt_select->bind_param("s",$student_id);
			
				$stmt_select->bind_result($id,$candidate_full_name,$parent_full_name,$mother_name,$permant_address,$school_name,$select_school_type,$select_school_medium,$last_year_per,$adhar_no,$date_of_brith,$parants_mobile_no,$gender,$photo,$marshit,$laguage_for_exam,$signature_parent,$date,$time,$standard,$signature_student);
			
				if($stmt_select->execute())
				{
					$details = array();
				}
					while($stmt_select->fetch())
					{
						
						
						$details[0]		=	$id;                     
						$details[1]		=	$candidate_full_name;	        
						$details[2]		=	$parent_full_name;		            
						$details[3]		=	$mother_name;  	            
						$details[4]		=	$permant_address;	            
						$details[5]		=	$school_name;
						$details[6]		=	$select_school_type;	        
						$details[7]		=	$select_school_medium;		            
						$details[8]		=	$last_year_per;  	            
						$details[9]		=	$adhar_no;	            
						$details[10]	=	$date_of_brith;		          
						$details[11]	=	$parants_mobile_no;	
						$details[12]	=	$gender;	
						$details[13]	=	$photo;	
						$details[14]	=	$marshit;	
						$details[15]	=	$laguage_for_exam;		         		          
						$details[16]	=	$signature_parent;		         		          
						$details[17]	=	$date;		            
						$details[18]	=	$time;
						$details[19]	=	$standard;		         		          
						$details[20]	=	$signature_student;		         		          

					}
		
					if(!empty($details))
					{
						return $details;
					}
					else
					{
						return false;
					}
			}
		}

			function get_exam_details_for_payment($exam_id1) {    
			if ($stmt_select = $this->con->prepare("SELECT `id`, `exam_name`, `subject`, `instruction`, `other_des`, `total_marks`, `exam_date`, `exam_time`, `start_time`, `end_time`, `status`, `date`, `time`,`amount`, `reporting_time`, `gate_closure_time`,`exam_desc` FROM `create_exam` where `id`=?")) 
			{  
				$stmt_select->bind_param("i",$exam_id1);	
				$stmt_select->bind_result($id,$exam_name,$subject,$instruction,$other_des,$total_marks,$exam_date,$exam_time,$start_time,$end_time,$status,$date,$time,$amount,$reporting_time,$gate_closure_time,$exam_desc);
				
				if ($stmt_select->execute()) {
					$counter = 0;
					$details = array();
					while ($stmt_select->fetch()) {
						$details[$counter][0] = $id;
						$details[$counter][1] = $exam_name;
						$details[$counter][2] = $subject;
						$details[$counter][3] = $instruction;
						$details[$counter][4] = $other_des;
						$details[$counter][5] = $total_marks;
						$details[$counter][6] = $exam_date;
						$details[$counter][7] = $exam_time;
						$details[$counter][8] = $start_time;
						$details[$counter][9] = $end_time;
						$details[$counter][10] = $status;
						$details[$counter][11] = $date; 
						$details[$counter][12] = $time;
						$details[$counter][13] = $amount;
						$details[$counter][14] = $reporting_time;
						$details[$counter][15] = $gate_closure_time;
						$details[$counter][16] = $exam_desc;
						$counter++;
					}
					if (!empty($details)) {    
						return $details;
					}
					return false;
				}    
			}
			return false;
		}

	function get_student_details_enrolled($exam_id) 
	{    
			if ($stmt_select = $this->con->prepare("SELECT `id`, `exam_id`, `student_id`, `payment_status`, `payment_amount`, `description`, `date`, `time` FROM `exam_register_students` WHERE `exam_id`=? AND `payment_status`='Approve'")) 
			{  
				$stmt_select->bind_param("s",$exam_id);
				$stmt_select->bind_result($id,$exam_id,$student_id,$payment_status,$payment_amount,$description,$date,$time);
				if ($stmt_select->execute()) {
					$counter = 0;
					$details = array();
					while ($stmt_select->fetch()) {
						$details[$counter][0] = $id;
						$details[$counter][1] = $exam_id;
						$details[$counter][2] = $student_id;
						$details[$counter][3] = $payment_status;
						$details[$counter][4] = $payment_amount;
						$details[$counter][5] = $description;
						$details[$counter][6] = $date;
						$details[$counter][7] = $time;
						$counter++;
					}
					if (!empty($details)) {    
						return $details;
					}
					return false;
				}    
			}
			return false;
		}

		function get_student_details_enrolled_pending($exam_id) 
	{    
			if ($stmt_select = $this->con->prepare("SELECT `id`, `exam_id`, `student_id`, `payment_status`, `payment_amount`, `description`, `date`, `time` FROM `exam_register_students` WHERE `exam_id`=? AND `payment_status`='Pending'")) 
			{  
				$stmt_select->bind_param("s",$exam_id);
				$stmt_select->bind_result($id,$exam_id,$student_id,$payment_status,$payment_amount,$description,$date,$time);
				if ($stmt_select->execute()) {
					$counter = 0;
					$details = array();
					while ($stmt_select->fetch()) {
						$details[$counter][0] = $id;
						$details[$counter][1] = $exam_id;
						$details[$counter][2] = $student_id;
						$details[$counter][3] = $payment_status;
						$details[$counter][4] = $payment_amount;
						$details[$counter][5] = $description;
						$details[$counter][6] = $date;
						$details[$counter][7] = $time;
						$counter++;
					}
					if (!empty($details)) {    
						return $details;
					}
					return false;
				}    
			}
			return false;
		}
			function get_exam_name_by_id($exam_id)
			{
				
				if($stmt_insert = $this->con->prepare("SELECT `exam_name` FROM `create_exam` WHERE `id`=?"))
				{	
					$stmt_insert->bind_param("i",$exam_id);
					
					$stmt_insert->bind_result($exam_name);
					
					if($stmt_insert->execute())
					{
						if($stmt_insert->fetch())
						{
							return $exam_name;
						}
						return false;
					}	
				}
			}
			
			
				function get_exam_date_by_id($exam_id)
			{
				
				if($stmt_insert = $this->con->prepare("SELECT `exam_date` FROM `create_exam` WHERE `id`=?"))
				{	
					$stmt_insert->bind_param("i",$exam_id);
					
					$stmt_insert->bind_result($exam_name);
					
					if($stmt_insert->execute())
					{
						if($stmt_insert->fetch())
						{
							return $exam_name;
						}
						return false;
					}	
				}
			}
			function get_student_name_by__id($student_id)
			{
				
				if($stmt_insert = $this->con->prepare("SELECT `candidate_full_name` FROM `student_addmission` WHERE `parants_mobile_no`=?"))
				{	
					$stmt_insert->bind_param("i",$student_id);
					
					$stmt_insert->bind_result($stud_name);
					
					if($stmt_insert->execute())
					{
						if($stmt_insert->fetch())
						{
							return $stud_name;
						}
						return false;
					}	
				}
			}
			function get_student_mobile_by__id($student_id)
			{
				
				if($stmt_insert = $this->con->prepare("SELECT `parants_mobile_no` FROM `student_addmission` WHERE `parants_mobile_no`=?"))
				{	
					$stmt_insert->bind_param("i",$student_id);
					
					$stmt_insert->bind_result($stud_name);
					
					if($stmt_insert->execute())
					{
						if($stmt_insert->fetch())
						{
							return $stud_name;
						}
						return false;
					}	
				}
			}

			function set_request_status_block($exam_id,$student_id,$status) 
				{
		        if ($stmt = $this->con->prepare("UPDATE exam_register_students SET payment_status = '$status' WHERE `exam_id` = ? AND `student_id`=?")) {
		            $stmt->bind_param('ss', $exam_id,$student_id);

		            if ($stmt->execute()) {
		                $stmt->close();
		                return true;
		            } else {
		                $stmt->close();
		                return false;
		            }
		        }
		        return false;
		    }

		function get_exam_register($exam_id1, $student_id1) 
		{
 
		    if ($stmt_select = $this->con->prepare("SELECT `exam_id`, `student_id` FROM `exam_register_students` WHERE `exam_id` = ? AND `student_id` = ?")) {
		        
		      
		        $stmt_select->bind_param("ii", $exam_id1, $student_id1);

		     
		        $stmt_select->bind_result($result_exam_id, $result_student_id);

		      
		        if ($stmt_select->execute()) {
		            
		          
		            if ($stmt_select->fetch()) {
		                return [
		                    'exam_id' => $result_exam_id,
		                    'student_id' => $result_student_id
		                ];
		            } else {
		              
		                return false;
		            }
		        } else {
		            
		            return false;
		        }
		    } else {
		        
		        return false;
		    }
		}

			function get_student_password1($current_login_student) 
				{
					if($stmt_select = $this->con->prepare("SELECT `password` FROM `student_addmission` WHERE `parants_mobile_no` = ?")) {	
						$stmt_select->bind_param("s",$current_login_student);
						$stmt_select->bind_result($password);
						
						if($stmt_select->execute()) {
							if($stmt_select->fetch()) {
								 return $password;
							}
						}
						return false;
					}
				}


			function update_password_student($new_pass,$current_login_student)
				{
					if($stmt_insert = $this->con->prepare("UPDATE `student_addmission` SET `password` = ? WHERE `parants_mobile_no`=?"))
					{
					  $stmt_insert->bind_param("ss",$new_pass,$current_login_student);
					
					  if($stmt_insert->execute())
					  { 
						return true;
					  }
						return false;
					}
				}



		function get_student_addmission_data_for_profile($current_login_student)
		{
			if($stmt_select = $this->con->prepare("SELECT `id`, `candidate_full_name`, `parent_full_name`, `mother_name`, `permant_address`, `school_name`, `select_school_type`, `select_school_medium`, `last_year_per`, `adhar_no`,`date_of_brith`,`parants_mobile_no`,`gender`,`photo`,`marshit`,`laguage_for_exam`,`date`,`time`,`standard` FROM `student_addmission`  where `parants_mobile_no` = ? "))
			{
				$stmt_select->bind_param("s",$current_login_student);
			
				$stmt_select->bind_result($id,$candidate_full_name,$parent_full_name,$mother_name,$permant_address,$school_name,$select_school_type,$select_school_medium,$last_year_per,$adhar_no,$date_of_brith,$parants_mobile_no,$gender,$photo,$marshit,$laguage_for_exam,$date,$time,$standard);
			
				if($stmt_select->execute())
				{
					$details = array();
				}
					while($stmt_select->fetch())
					{
						
						
						$details[0]		=	$id;                     
						$details[1]		=	$candidate_full_name;	        
						$details[2]		=	$parent_full_name;		            
						$details[3]		=	$mother_name;  	            
						$details[4]		=	$permant_address;	            
						$details[5]		=	$school_name;
						$details[6]		=	$select_school_type;	        
						$details[7]		=	$select_school_medium;		            
						$details[8]		=	$last_year_per;  	            
						$details[9]		=	$adhar_no;	            
						$details[10]	=	$date_of_brith;		          
						$details[11]	=	$parants_mobile_no;	
						$details[12]	=	$gender;	
						$details[13]	=	$laguage_for_exam;		         		          
						$details[14]	=	$date;		            
						$details[15]	=	$time;	
						$details[16]	=	$standard;		            
					}
		
					if(!empty($details))
					{
						return $details;
					}
					else
					{
						return false;
					}
			}
		}

		function update_student_addmission1($candidate_full_name,$parent_full_name,$mother_name,$permant_address,$school_name,$select_school_type,$select_school_medium,$last_year_per,$adhar_no,$date_of_brith,$parants_mobile_no,$gender,$laguage_for_exam,$standard,$current_login_student)
				{
					$date = date("Y-m-d");
					$time = date("h:i:s A");

					if($stmt = $this->con->prepare("UPDATE `student_addmission` SET `candidate_full_name`=?,`parent_full_name`=?,`mother_name`=?,`permant_address`=?,`school_name`=?,`select_school_type`=?,`select_school_medium`=?,`last_year_per`=?,`adhar_no`=?,`date_of_brith`=?,`parants_mobile_no`=?,`gender`=?,`laguage_for_exam`=?,`standard`=? WHERE `parants_mobile_no`=?"))
					{
						$stmt->bind_param("sssssssssssssss",$candidate_full_name,$parent_full_name,$mother_name,$permant_address,$school_name,$select_school_type,$select_school_medium,$last_year_per,$adhar_no,$date_of_brith,$parants_mobile_no,$gender,$laguage_for_exam,$standard,$current_login_student);
						
						if($stmt->execute())
						{
							return true;
						}
					   return false;
					} 	
				}


		function change_status($status)
		{
			$date = date("Y-m-d");
			$time = date("h:i:s A");

		 if ($stmt_insert = $this->con->prepare("UPDATE `hall_ticket_setting` SET `status`=?, `date`=?, `time`=?"))
		  	{
						$stmt_insert->bind_param("sss",$status,$date,$time);

						if($stmt_insert->execute())
						{
							return true;
						}
					   return false;
					} 	
				}


		function get_status()
			{
				if($stmt_select = $this->con->prepare("SELECT `id`, `status` , `date`, `time` FROM `hall_ticket_setting`"))
				{
					$stmt_select->bind_result($id,$status,$date,$time);
				
					if($stmt_select->execute())
					{
						$details = array();
					}
						while($stmt_select->fetch())
						{
							
							$details[0]		=	$id;                     
							$details[1]		=	$status;	        
							$details[2]		=	$date;		            
							$details[3]		=	$time;  	           
						}
			
						if(!empty($details))
						{
							return $details;
						}
						else
						{
							return false;
						}
				}
			}

			

				function get_status_for_hall_ticket()
				{
					if($stmt_select = $this->con->prepare("Select `status` from `hall_ticket_setting` "))
					{	;
					
						$stmt_select->bind_result($result_status);
					
						if($stmt_select->execute())
						{
							if($stmt_select->fetch())
							{
								return $result_status;
							}
						}
								return false;
					}
				}
				
				function get_payment_status_for_hall_ticket($id,$current_login_students)
				{
					if($stmt_select = $this->con->prepare("Select `payment_status` from `exam_register_students` where `exam_id`=? AND `student_id`=? "))
					{	
					   
						$stmt_select->bind_param("ss",$id,$current_login_students);
					
						$stmt_select->bind_result($result_status);
					
						if($stmt_select->execute())
						{
							if($stmt_select->fetch())
							{
								return $result_status;
							}
						}
								return false;
					}
				}
				
				function get_exist_status_for_hall_ticket($exam_id,$current_login_students)
				{
					if($stmt_select = $this->con->prepare("Select `id` from `exam_register_students` where `exam_id`=? AND `student_id`=? "))
					{	
					   
						$stmt_select->bind_param("ss",$exam_id,$current_login_students);
					
						$stmt_select->bind_result($result_status);
					
						if($stmt_select->execute())
						{
							if($stmt_select->fetch())
							{
								return $result_status;
							}
						}
								return false;
					}
				}

		function get_student_details_enrolled_for_hall_ticket($exam_id) 
		{    
				if ($stmt_select = $this->con->prepare("SELECT `id`, `exam_id`, `student_id`, `payment_status`, `payment_amount`, `description`, `date`, `time` FROM `exam_register_students` WHERE `exam_id`=? ")) 
				{  
					$stmt_select->bind_param("s",$exam_id);
					$stmt_select->bind_result($id,$exam_id,$student_id,$payment_status,$payment_amount,$description,$date,$time);
					if ($stmt_select->execute()) {
						$counter = 0;
						$details = array();
						while ($stmt_select->fetch()) {
							$details[$counter][0] = $id;
							$details[$counter][1] = $exam_id;
							$details[$counter][2] = $student_id;
							$details[$counter][3] = $payment_status;
							$details[$counter][4] = $payment_amount;
							$details[$counter][5] = $description;
							$details[$counter][6] = $date;
							$details[$counter][7] = $time;
							$counter++;
						}
						if (!empty($details)) {    
							return $details;
						}
						return false;
					}    
				}
				return false;
			}
			
	
	function get_all_donwloads_images()
			{	
				if($stmt_insert = $this->con->prepare("SELECT `id`,`title`,`images`,`description`,`date`,`time` FROM `downloads`"))
				{	
					$stmt_insert->bind_result($id,$title,$images,$description,$date,$time);
					
					if($stmt_insert->execute())
					{
							$counter	=	0;
							$details	=	array();
						while($stmt_insert->fetch())
						{
							$details[$counter][0]	=	$id;
							$details[$counter][1]	=	$title;
							$details[$counter][2]	=	$images;
							$details[$counter][3]	=	$description;
							$details[$counter][4]	=	$date;
							$details[$counter][5]	=	$time;
						
							$counter++;
						}
						if(!empty($details))	
						{
							return $details;
						}
						return false;
					}	
				}
			}
			
			function new_donwloads_images($title,$actual_image_name,$description)
			{							
				$date = date("Y-m-d");
				$time = date("H-i-s A");
				if($stmt_insert = $this->con->prepare("INSERT INTO `downloads`(`title`,`images`,`description` ,`date`, `time`) VALUES (?,?,?,?,?)"))
				{
					$stmt_insert->bind_param("sssss",$title,$actual_image_name,$description,$date,$time);
					
					if($stmt_insert->execute())
					{
						return true;
					}
						return false;
				} 	
			}
			
			function delete_donwloads_images($del_id)
			{
				if($stmt_select = $this->con->prepare("Delete from `downloads` where `id`=?"))
				{
					$stmt_select->bind_param("i",$del_id);
				
					if($stmt_select->execute())
					{					
							return true;
					}
						return false;
				}
			}
			
			function get_exam_register_student($exam_id1, $student_id1) 
			{
				if ($stmt_select = $this->con->prepare("SELECT `center_id` FROM `exam_register_students` WHERE `exam_id` = ? AND `student_id` = ?")) 
				{	
					
					$stmt_select->bind_param("ss",$exam_id1,$student_id1);
				
					$stmt_select->bind_result($res_center);
				
					if($stmt_select->execute())
					{
						if($stmt_select->fetch())
						{
							return $res_center;
						}
					}
							return false;
				}
			}
			function get_enter_name($recorded_data2) 
			{
			    if ($stmt_select = $this->con->prepare("SELECT `center_name` FROM `center_register` WHERE `id` = ?")) 
			    {    
			        $stmt_select->bind_param("s", $recorded_data2);
			    
			        $stmt_select->bind_result($res_center);
			    
			        if ($stmt_select->execute())
			        {
			            if ($stmt_select->fetch())
			            {
			                return $res_center;
			            }
			        }
			        
			        return false;
			    }
			    
			    return false;
			}

			function get_assigned_student_Exist($exam_id,$student_id)
			{
				if($stmt_select = $this->con->prepare("Select `center_id` from `exam_register_students` where `exam_id` = ? AND `student_id`=? "))
				{
					$stmt_select->bind_param("ss",$exam_id,$student_id);
				
					$stmt_select->bind_result($result_id);
				
					if($stmt_select->execute())
					{
						if($stmt_select->fetch())
						{
							return $result_id;
						}
					}
					return false;
				}
			}
			function add_multiple_center_data($center_id, $exam_id, $student_id) 
    		{
     
    		    if ($stmt = $this->con->prepare("UPDATE exam_register_students SET center_id = ? WHERE exam_id = ? AND student_id = ?")) {
    		        $stmt->bind_param("sss", $center_id, $exam_id, $student_id);
    
    		        if ($stmt->execute()) {
    		            $stmt->close(); 
    		            return true;    
    		        } else {
    		            $stmt->close(); 
    		            return false;   
    		        }
    		    } else {
    		        return false; 
    		    }
    		}
    		
    		function get_exist_assigned_user($exam_id,$student_id)
    		{
    					if($stmt_select = $this->con->prepare("SELECT `center_id` from `exam_register_students` where `exam_id`=? and `student_id`=? "))
    					{
    						$stmt_select->bind_param("ss",$exam_id,$student_id);
    					
    						$stmt_select->bind_result($res_id);
    					
    						if($stmt_select->execute())
    						{
    							if($stmt_select->fetch())
    							{
    								return $res_id;
    							}
    						}
    						return false;
    					}
    		   }
    		   
    		  function get_center_name_by__id($exam_id,$student_id)
			{
				
				if($stmt_insert = $this->con->prepare("SELECT `center_id` FROM `exam_register_students` WHERE `exam_id`=? and `student_id`=?"))
				{	
					$stmt_insert->bind_param("ss",$exam_id,$student_id);
					
					$stmt_insert->bind_result($exam_name);
					
					if($stmt_insert->execute())
					{
						if($stmt_insert->fetch())
						{
							return $exam_name;
						}
						return false;
					}	
				}
			}
			
			
			function get_login_password($mobile_number)
        	{
        		if($stmt= $this->con->prepare("SELECT `password` FROM `student_addmission` WHERE `parants_mobile_no`=?"))
        		{
        			$stmt->bind_param("s",$mobile_number);
        			
        			$stmt->bind_result($password);
        			if($stmt->execute())
        			{
        				if($stmt->fetch())
        				{
        					return $password;
        				}
        				else
        				{
        					return false;
        				}
        			}
        			
        		}
        		
        	}





}//end of class
?>

EliteHackz.ORG
Revonzy Mini Shell
root@revonzy.com

Linux 65-254-81-4.cprapid.com 5.14.0-284.11.1.el9_2.x86_64 #1 SMP PREEMPT_DYNAMIC Tue May 9 05:49:00 EDT 2023 x86_64
Apache
65.254.81.4