Revonzy Mini Shell

Revonzy Mini Shell

Şuanki Dizin: /home/wwwdreamtechnolo/public_html/balajimall.com/lib/
Dosya Yükle :
Şuanki Dosya : /home/wwwdreamtechnolo/public_html/balajimall.com/lib/functions.php

<?php
	session_start();
	date_default_timezone_set('Asia/Kolkata');
		class login_function
		{
			private $con;
			
			function __construct()
			{
				//$this->con = new mysqli("localhost","root","","shopinba_barshibazaar");
				
			$this->con	=	new mysqli("localhost","wwwdreamtechnolo_balajimall_admin","1i}};gu=7=}c","wwwdreamtechnolo_balajimall_main");
		      //  $this->con = new mysqli("localhost","root","","book_shop");

			}
			
			function insert_visitor($todays_date)
			{
			    $visit = 1;
			    if($stmt_select = $this->con->prepare("Insert into `visitors`(`visits`,`date`) Values(?,?)"))
				{
				    $stmt_select->bind_param("ss",$visit,$todays_date);
				    
					if($stmt_select->execute())
					{					
						return true;
					}
					return false;
				}
			}
			
			function update_visit_counter($todays_date,$v_count)
			{
			    if($stmt_select = $this->con->prepare("update `visitors` set `visits`=? where `date` = ?"))
				{
				    $stmt_select->bind_param("ss",$v_count,$todays_date);
				    
					if($stmt_select->execute())
					{					
						return true;
					}
					return false;
				}
			}
			
			function get_todays_visitor_count($todays_date)
			{
			    if($stmt_select = $this->con->prepare("Select `visits` from `visitors` where `date` = ?"))
				{
				    $stmt_select->bind_param("s",$todays_date);
				    
				    $stmt_select->bind_result($visits);
				    
					if($stmt_select->execute())
					{					
					    if($stmt_select->fetch())
					    {
    						return $visits;
					    }	
					}
					return false;
				}
			}
			
			function get_visit_counts()
			{
			    if($stmt_select = $this->con->prepare("Select SUM(`visits`) from `visitors`"))
				{
				    $stmt_select->bind_result($visits);
				    
					if($stmt_select->execute())
					{					
					    if($stmt_select->fetch())
					    {
    						return $visits;
					    }	
					}
					return false;
				}
			}
			
			function get_counts_of_exist_item($item_id)
			{
			    if($stmt_select = $this->con->prepare("Select `qty` from `temp_cart` where `id` = ?"))
				{
				    $stmt_select->bind_param("i",$item_id);
				    
				    $stmt_select->bind_result($res_qty);
				    
					if($stmt_select->execute())
					{					
					    if($stmt_select->fetch())
					    {
    						return $res_qty;
					    }	
					}
					return false;
				}
			}
			
			function get_password_from_user_name($email)
			{
				if($stmt_select = $this->con->prepare("Select `password` from `application_users` where `user_id` = ? "))
				{	
					$stmt_select->bind_param("s",$email);
				
					$stmt_select->bind_result($result_password);
				
					if($stmt_select->execute())
					{
						if($stmt_select->fetch())
						{
							return $result_password;
						}
					}
							return false;
				}
			}
			
			function change_user_password($email,$password)
			{ 
				$date = date("Y-m-d");
				$time = date("H:i:s A");
			
				if($stmt_select = $this->con->prepare("update `application_users` set `password`='".$password."' where `user_id` = ?"))
				{
					$stmt_select->bind_param("s",$email);				
				
					if($stmt_select->execute())
					{					
						return true;
					}
						return false;
				}
			}
			function add_seller($shop_name,$owner_name,$address,$contact_no,$licence_no,$seller_email,$password,$confirm_password,$gender,$dob)
			{	
				$status = "Pending";					
				$date = date("Y-m-d");
				$time = date("H-i-s A");
				if($stmt_insert = $this->con->prepare("INSERT INTO `seller`(`shop_name`, `owner_name`, `address`, `contact_no`, `licence_no`, `seller_email`, `password`, `confirm_password`,`gender`, `dob`, `status`, `date`, `time`) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?)"))
				{
					$stmt_insert->bind_param("sssssssssssss",$shop_name,$owner_name,$address,$contact_no,$licence_no,$seller_email,$password,$confirm_password,$gender,$dob,$status,$date,$time);
					
					if($stmt_insert->execute())
					{
						return true;
					}
						return false;
				} 	
			}
			function check_email_id_exist_or_not($email)
			{
				if($stmt_select = $this->con->prepare("Select `id` from `seller` where `seller_email` = ? "))
				{	
					$stmt_select->bind_param("s",$email);
				
					$stmt_select->bind_result($result_password);
				
					if($stmt_select->execute())
					{
						if($stmt_select->fetch())
						{
							return $result_password;
						}
					}
							return false;
				}
			}
			function get_all_pending_seller_info($seller_name,$shop_name,$from_date,$to_date)
			{	
				$from_date = date("Y-m-d" , strtotime($from_date));
				$to_date = date("Y-m-d" , strtotime($to_date));
				if($stmt_insert = $this->con->prepare("SELECT `id`,`shop_name`, `owner_name`, `address`, `contact_no`, `licence_no`, `seller_email`, `password`, `confirm_password`,`gender`, `dob`, `status` FROM `seller` Where `status` = 'Pending' AND `owner_name` LIKE '%$seller_name%' AND `shop_name` LIKE '%$shop_name%' AND `date` BETWEEN '$from_date' AND '$to_date' "))
				{	
					$stmt_insert->bind_result($id,$shop_name,$owner_name,$address,$contact_no,$licence_no,$seller_email,$password,$confirm_password,$gender,$dob,$status);
					
					if($stmt_insert->execute())
					{
							$counter	=	0;
							$details	=	array();
						while($stmt_insert->fetch())
						{
							$details[$counter][0]	=	$id;
							$details[$counter][1]	=	$shop_name;
							$details[$counter][2]	=	$owner_name;
							$details[$counter][3]	=	$address;
							$details[$counter][4]	=	$contact_no;
							$details[$counter][5]	=	$licence_no;
							$details[$counter][6]	=	$seller_email;
							$details[$counter][7]	=	$password;
							$details[$counter][8]	=	$confirm_password;
							$details[$counter][9]	=	$gender;
							$details[$counter][10]	=	$dob;
							$details[$counter][11]	=	$status;						
							$counter++;
						}
						if(!empty($details))	
						{
							return $details;
						}
						return false;
					}	
				}
			}
			
			function get_count_of_all_pending_seller_info()
			{
				if($stmt_insert = $this->con->prepare("SELECT count(`id`) FROM `seller` Where `status` = 'Pending'"))
				{	
					$stmt_insert->bind_result($res_count_id);
					
					if($stmt_insert->execute())
					{
						if($stmt_insert->fetch())
						{
					        return $res_count_id;
						}
						return false;
					}	
				}
			}
			
			function get_count_of_all_pending_dispatch_products()
			{
				if($stmt_insert = $this->con->prepare("SELECT count(`id`) FROM `user_checkout_details` Where `status` = 'Pending'"))
				{	
					$stmt_insert->bind_result($res_count_id);
					
					if($stmt_insert->execute())
					{
						if($stmt_insert->fetch())
						{
					        return $res_count_id;
						}
						return false;
					}	
				}
			}
			function get_count_of_all_dispatch_products()
			{
				if($stmt_insert = $this->con->prepare("SELECT count(`id`) FROM `user_checkout_details` Where `status` = 'Dispatch'"))
				{	
					$stmt_insert->bind_result($res_count_id);
					
					if($stmt_insert->execute())
					{
						if($stmt_insert->fetch())
						{
					        return $res_count_id;
						}
						return false;
					}	
				}
			}
			function get_count_of_all_pending_dispatch_products_by_seller_email($email)
			{
				if($stmt_insert = $this->con->prepare("SELECT count(`id`) FROM `checkout_list` Where `status` = 'Pending' AND `seller_name` = ?"))
				{	
					$stmt_insert->bind_param("s",$email);
					
					$stmt_insert->bind_result($res_count_id);
					
					if($stmt_insert->execute())
					{
						if($stmt_insert->fetch())
						{
					        return $res_count_id;
						}
						return false;
					}	
				}
			}
			
			function delete_seller_info($del_id)
			{
				if($stmt_select = $this->con->prepare("Delete from `seller` where `id`=?"))
				{
					$stmt_select->bind_param("i",$del_id);
				
					if($stmt_select->execute())
					{					
							return true;
					}
						return false;
				}
			}
			function update_seller_status($up_id)
			{				
				$status = "Inactive";
				if($stmt_insert = $this->con->prepare("Update `seller` set `status` = ? Where `id` = ?"))
				{	
					$stmt_insert->bind_param("si",$status,$up_id);
					
					if($stmt_insert->execute())
					{
						return true;
					}
						return false;
				} 	
			}
			function update_seller_pending_status($up_id)
			{				
				$status = "Active";
				if($stmt_insert = $this->con->prepare("Update `seller` set `status` = ? Where `id` = ?"))
				{
					$stmt_insert->bind_param("si",$status,$up_id);
					
					if($stmt_insert->execute())
					{
						return true;
					}
						return false;
				} 	
			}
			function get_all_approve_seller_info($seller_name,$shop_name,$from_date,$to_date)
			{	
				$from_date = date("Y-m-d" , strtotime($from_date));
				$to_date = date("Y-m-d" , strtotime($to_date));
				if($stmt_insert = $this->con->prepare("SELECT `id`,`shop_name`, `owner_name`, `address`, `contact_no`, `licence_no`, `seller_email`, `password`, `confirm_password`,`gender`, `dob`, `status`,`ads_allowed`,`account_date_from`,`account_date_to` FROM `seller` Where `status` != 'Pending' AND `owner_name` LIKE '%$seller_name%' AND `shop_name` LIKE '%$shop_name%' AND `date` BETWEEN '$from_date' AND '$to_date'"))
				{	
					$stmt_insert->bind_result($id,$shop_name,$owner_name,$address,$contact_no,$licence_no,$seller_email,$password,$confirm_password,$gender,$dob,$status,$ads_allowed,$account_date_from,$account_date_to);
					
					if($stmt_insert->execute())
					{
							$counter	=	0;
							$details	=	array();
						while($stmt_insert->fetch())
						{
							$details[$counter][0]	=	$id;
							$details[$counter][1]	=	$shop_name;
							$details[$counter][2]	=	$owner_name;
							$details[$counter][3]	=	$address;
							$details[$counter][4]	=	$contact_no;
							$details[$counter][5]	=	$licence_no;
							$details[$counter][6]	=	$seller_email;
							$details[$counter][7]	=	$password;
							$details[$counter][8]	=	$confirm_password;
							$details[$counter][9]	=	$gender;
							$details[$counter][10]	=	$dob;
							$details[$counter][11]	=	$status;						
							$details[$counter][12]	=	$ads_allowed;
							$details[$counter][13]	=	$account_date_from;
							$details[$counter][14]	=	$account_date_to;
							
							$counter++;
						}
						if(!empty($details))	
						{
							return $details;
						}
						return false;
					}	
				}
			}
			function get_all_seller_info_by_id($up_id)
			{	
				if($stmt_insert = $this->con->prepare("SELECT `id`,`shop_name`, `owner_name`, `address`, `contact_no`, `licence_no`, `seller_email`, `password`, `confirm_password`,`gender`, `dob`, `status`,`ads_allowed`, `account_date_from`, `account_date_to` FROM `seller` Where `id` = ? "))
				{	
					$stmt_insert->bind_param("i",$up_id);
					
					$stmt_insert->bind_result($id,$shop_name,$owner_name,$address,$contact_no,$licence_no,$seller_email,$password,$confirm_password,$gender,$dob,$status,$ads_allowed,$account_date_from,$account_date_to);
					
					if($stmt_insert->execute())
					{
							$counter	=	0;
							$details	=	array();
						while($stmt_insert->fetch())
						{
							$details[$counter][0]	=	$id;
							$details[$counter][1]	=	$shop_name;
							$details[$counter][2]	=	$owner_name;
							$details[$counter][3]	=	$address;
							$details[$counter][4]	=	$contact_no;
							$details[$counter][5]	=	$licence_no;
							$details[$counter][6]	=	$seller_email;
							$details[$counter][7]	=	$password;
							$details[$counter][8]	=	$confirm_password;
							$details[$counter][9]	=	$gender;
							$details[$counter][10]	=	$dob;
							$details[$counter][11]	=	$status;						
							$details[$counter][12]	=	$ads_allowed;
							$details[$counter][13]	=	$account_date_from;
							$details[$counter][14]	=	$account_date_to;
							
							$counter++;
						}
						if(!empty($details))	
						{
							return $details;
						}
						return false;
					}	
				}
			}
			function check_email_id_exist_or_not_for_update($email,$up_id)
			{
				if($stmt_select = $this->con->prepare("Select `id` from `seller` where `seller_email` = ? AND `id` != ? "))
				{	
					$stmt_select->bind_param("si",$email,$up_id);
				
					$stmt_select->bind_result($result_password);
				
					if($stmt_select->execute())
					{
						if($stmt_select->fetch())
						{
							return $result_password;
						}
					}
							return false;
				}
			}
			function update_seller($up_id,$shop_name,$owner_name,$address,$contact_no,$licence_no,$seller_email,$password,$gender,$dob,$allowed_ads,$package_start_date,$package_end_date)
			{	
				if($stmt_insert = $this->con->prepare("Update `seller` set `shop_name` = ?, `owner_name` = ?, `address` = ?, `contact_no` = ?, `licence_no` = ?, `seller_email` = ?, `password` = ?,`gender` = ?, `dob` = ?,`ads_allowed`=?,`account_date_from`=?,`account_date_to`=? Where `id` =?"))
				{
					$stmt_insert->bind_param("ssssssssssssi",$shop_name,$owner_name,$address,$contact_no,$licence_no,$seller_email,$password,$gender,$dob,$allowed_ads,$package_start_date,$package_end_date,$up_id);
					
					if($stmt_insert->execute())
					{
						return true;
					}
						return false;
				} 	
			}
			function add_application($emp_id,$full_name,$a_email,$contact,$address,$designation,$user_id,$password)
			{							
				$date = date("Y-m-d");
				$time = date("H-i-s A");
				if($stmt_insert = $this->con->prepare("INSERT INTO `application_users`(`emp_id`, `name`, `email`, `contact`, `address`, `designation`, `user_id`, `password`, `date`, `time`) VALUES (?,?,?,?,?,?,?,?,?,?)"))
				{
					$stmt_insert->bind_param("ssssssssss",$emp_id,$full_name,$a_email,$contact,$address,$designation,$user_id,$password,$date,$time);
					
					if($stmt_insert->execute())
					{
						return true;
					}
						return false;
				} 	
			}
			function check_application_user_id_exist($user_id)
			{
				if($stmt_select = $this->con->prepare("Select `id` from `application_users` where `user_id` = ? "))
				{	
					$stmt_select->bind_param("s",$user_id);
				
					$stmt_select->bind_result($result_password);
				
					if($stmt_select->execute())
					{
						if($stmt_select->fetch())
						{
							return $result_password;
						}
					}
							return false;
				}
			}
			function check_application_emp_id_exist($emp_id)
			{
				if($stmt_select = $this->con->prepare("Select `id` from `application_users` where `emp_id` = ? "))
				{	
					$stmt_select->bind_param("s",$emp_id);
				
					$stmt_select->bind_result($result_password);
				
					if($stmt_select->execute())
					{
						if($stmt_select->fetch())
						{
							return $result_password;
						}
					}
							return false;
				}
			}
			function get_all_application_info($emp_name,$emp_id,$designation)
			{	
				if($designation == "Select Operator")
				{
					$designation = "";	
				}
				if($stmt_insert = $this->con->prepare("SELECT `id`,`emp_id`, `name`,`email`, `contact`, `address`, `designation`, `user_id`, `password` FROM `application_users` Where `emp_id` LIKE '%$emp_id%' AND `designation` LIKE '%$designation%' AND `name` LIKE '%$emp_name%' "))
				{	
					$stmt_insert->bind_result($id,$emp_id,$emp_name,$email,$contact,$address,$designation,$user_id,$password);
					
					if($stmt_insert->execute())
					{
							$counter	=	0;
							$details	=	array();
						while($stmt_insert->fetch())
						{
							$details[$counter][0]	=	$id;
							$details[$counter][1]	=	$emp_id;
							$details[$counter][2]	=	$emp_name;
							$details[$counter][3]	=	$email;
							$details[$counter][4]	=	$contact;
							$details[$counter][5]	=	$address;
							$details[$counter][6]	=	$designation;
							$details[$counter][7]	=	$user_id;
							$details[$counter][8]	=	$password;
							
							$counter++;
						}
						if(!empty($details))	
						{
							return $details;
						}
						return false;
					}	
				}
			}
			function delete_application_info($del_id)
			{
				if($stmt_select = $this->con->prepare("Delete from `application_users` where `id`=?"))
				{
					$stmt_select->bind_param("i",$del_id);
				
					if($stmt_select->execute())
					{					
							return true;
					}
						return false;
				}
			}
			function get_all_application_info_by_id($up_id)
			{	
				if($stmt_insert = $this->con->prepare("SELECT `id`,`emp_id`, `name`,`email`, `contact`, `address`, `designation`, `user_id`, `password` FROM `application_users` Where `id` = ? "))
				{	
					$stmt_insert->bind_param("i",$up_id);
					
					$stmt_insert->bind_result($id,$emp_id,$emp_name,$email,$contact,$address,$designation,$user_id,$password);
					
					if($stmt_insert->execute())
					{
							$counter	=	0;
							$details	=	array();
						while($stmt_insert->fetch())
						{
							$details[$counter][0]	=	$id;
							$details[$counter][1]	=	$emp_id;
							$details[$counter][2]	=	$emp_name;
							$details[$counter][3]	=	$email;
							$details[$counter][4]	=	$contact;
							$details[$counter][5]	=	$address;
							$details[$counter][6]	=	$designation;
							$details[$counter][7]	=	$user_id;
							$details[$counter][8]	=	$password;
							
							$counter++;
						}
						if(!empty($details))	
						{
							return $details;
						}
						return false;
					}	
				}
			}
			function update_application($up_id,$emp_id,$full_name,$a_email,$contact,$address,$designation,$user_id,$password)
			{							
				$date = date("Y-m-d");
				$time = date("H-i-s A");
				if($stmt_insert = $this->con->prepare("update `application_users` set `emp_id` = ?, `name` = ?, `email` = ?, `contact` = ?, `address` = ?, `designation` = ?, `user_id` = ?, `password` = ? Where `id` =?"))
				{
					$stmt_insert->bind_param("ssssssssi",$emp_id,$full_name,$a_email,$contact,$address,$designation,$user_id,$password,$up_id);
					
					if($stmt_insert->execute())
					{
						return true;
					}
						return false;
				} 	
			}
			function check_application_user_id_for_update($user_id,$up_id)
			{
				if($stmt_select = $this->con->prepare("Select `id` from `application_users` where `user_id` = ? AND `id` != ? "))
				{	
					$stmt_select->bind_param("si",$user_id,$up_id);
				
					$stmt_select->bind_result($result_password);
				
					if($stmt_select->execute())
					{
						if($stmt_select->fetch())
						{
							return $result_password;
						}
					}
							return false;
				}
			}
			function check_application_emp_id_for_update($emp_id,$up_id)
			{
				if($stmt_select = $this->con->prepare("Select `id` from `application_users` where `emp_id` = ? AND `id` != ? "))
				{	
					$stmt_select->bind_param("si",$emp_id,$up_id);
				
					$stmt_select->bind_result($result_password);
				
					if($stmt_select->execute())
					{
						if($stmt_select->fetch())
						{
							return $result_password;
						}
					}
							return false;
				}
			}
			function get_password_from_seller_name($email)
			{
				if($stmt_select = $this->con->prepare("Select `password`,`status` from `seller` where `seller_email` = ? "))
				{	
					$stmt_select->bind_param("s",$email);
				
					$stmt_select->bind_result($result_password,$result_status);
				
					if($stmt_select->execute())
					{
						$data = array();
						if($stmt_select->fetch())
						{
							$data[0] = $result_password;
							$data[1] = $result_status;
							return $data;
						}
					}
							return false;
				}
			}
			function get_password_from_seller_name_for_display($email)
			{
				if($stmt_select = $this->con->prepare("Select `password` from `seller` where `seller_email` = ? "))
				{	
					$stmt_select->bind_param("s",$email);
				
					$stmt_select->bind_result($result_password);
				
					if($stmt_select->execute())
					{
						if($stmt_select->fetch())
						{
							return $result_password;
						}
					}
							return false;
				}
			}
			
			function change_seller_password($email,$password)
			{ 
				$date = date("Y-m-d");
				$time = date("H:i:s A");
			
				if($stmt_select = $this->con->prepare("update `seller` set `password`='".$password."', `confirm_password`='".$password."' where `seller_email` = ?"))
				{
					$stmt_select->bind_param("s",$email);				
				
					if($stmt_select->execute())
					{					
						return true;
					}
						return false;
				}
			}
			function fetch_seller_id_by_email($email)
			{
				if($stmt_select = $this->con->prepare("Select `id` from `seller` where `seller_email` = ? "))
				{	
				
					$stmt_select->bind_param("s",$email);
				
					$stmt_select->bind_result($result_password);
				
					if($stmt_select->execute())
					{
					
						if($stmt_select->fetch())
						{
							return $result_password;
						}
					}
							return false;
				}
			}
			function update_seller_information($result_id,$shop_name,$owner_name,$address,$contact_no,$licence_no,$seller_email,$gender,$dob)
			{	
				if($stmt_insert = $this->con->prepare("Update `seller` set `shop_name` = ?, `owner_name` = ?, `address` = ?, `contact_no` = ?, `licence_no` = ?, `seller_email` = ?, `gender` = ?, `dob` = ? Where `id` =?"))
				{
					$stmt_insert->bind_param("ssssssssi",$shop_name,$owner_name,$address,$contact_no,$licence_no,$seller_email,$gender,$dob,$result_id);
					
					if($stmt_insert->execute())
					{
						return true;
					}
						return false;
				} 	
			}
			function update_profile_field($update_id)
			{		
				$actual_image_name = "";					
				if($stmt_insert = $this->con->prepare("Update `seller` set `profile_image`=? Where `id`=?"))
				{
					$stmt_insert->bind_param("si",$actual_image_name,$update_id);
					
					if($stmt_insert->execute())
					{
						return true;
					}
						return false;
				} 	
			}
			function get_profile_image_name($update_id)
			{
				if($stmt_select = $this->con->prepare("Select `profile_image` from `seller` where `id` = ? "))
				{	
					$stmt_select->bind_param("i",$update_id);
				
					$stmt_select->bind_result($result_image);
				
					if($stmt_select->execute())
					{
						if($stmt_select->fetch())
						{
							return $result_image;
						}
					}
							return false;
				}
			}
			function update_profile_data($update_id,$actual_image_name)
			{							
				if($stmt_insert = $this->con->prepare("Update `seller` set `profile_image`=? Where `id`=?"))
				{
					$stmt_insert->bind_param("si",$actual_image_name,$update_id);
					
					if($stmt_insert->execute())
					{
						return true;
					}
						return false;
				} 	
			}
			function add_product($email,$category,$product_name,$tags,$description,$actual_price,$selling_price,$home_del)
			{							
				$date = date("Y-m-d");
				$time = date("H-i-s A");
				$pending_product	=	"pending";
				
				if($stmt_insert = $this->con->prepare("INSERT INTO `products`(`added_by`,`category`, `product_name`, `tags`, `description`, `actual_price`, `selling_price`, `home_delivery`, `date`, `time`,`status`) VALUES (?,?,?,?,?,?,?,?,?,?,?)"))
				{
					$stmt_insert->bind_param("sssssssssss",$email,$category,$product_name,$tags,$description,$actual_price,$selling_price,$home_del,$date,$time,$pending_product);
					
					if($stmt_insert->execute())
					{
						return $stmt_insert->insert_id;
					}
						return false;
				} 	
			}
			function add_product_image($insert_id,$product)
			{							
				$date = date("Y-m-d");
				$time = date("H-i-s A");
				if($stmt_insert = $this->con->prepare("INSERT INTO `product_image`(`seller_id`, `images`, `date`, `time`) VALUES (?,?,?,?)"))
				{
					$stmt_insert->bind_param("ssss",$insert_id,$product,$date,$time);
					
					if($stmt_insert->execute())
					{
						return $stmt_insert->insert_id;
					}
						return false;
				} 	
			}
			function get_all_product_image_by_id($up_id)
			{	
				if($stmt_insert = $this->con->prepare("SELECT `id`,`images` FROM `product_image` Where `seller_id` = ? "))
				{	
					$stmt_insert->bind_param("s",$up_id);
					
					$stmt_insert->bind_result($id,$images);
					
					if($stmt_insert->execute())
					{
							$counter	=	0;
							$details	=	array();
						while($stmt_insert->fetch())
						{
							$details[$counter][0]	=	$id;
							$details[$counter][1]	=	$images;		
							$counter++;
						}
						if(!empty($details))	
						{
							return $details;
						}
						return false;
					}	
				}
			}
			function delete_product_image_info($del_id)
			{
				if($stmt_select = $this->con->prepare("Delete from `product_image` where `id`=?"))
				{
					$stmt_select->bind_param("i",$del_id);
				
					if($stmt_select->execute())
					{					
							return true;
					}
						return false;
				}
			}
			function get_product_image_name($update_id)
			{
				if($stmt_select = $this->con->prepare("Select `images` from `product_image` where `id` = ? "))
				{	
					$stmt_select->bind_param("i",$update_id);
				
					$stmt_select->bind_result($result_image);
				
					if($stmt_select->execute())
					{
						if($stmt_select->fetch())
						{
							return $result_image;
						}
					}
							return false;
				}
			}
			function get_all_product_info($category,$email)
			{	
				if($category == "Select Category")
				{
					$category = "";
				}
				if($stmt_insert = $this->con->prepare("SELECT `id`,`category`, `product_name`, `tags`, `description`, `actual_price`, `selling_price` FROM `products` Where `category` LIKE '%$category%' AND `added_by` = ?"))
				{	
					$stmt_insert->bind_param("s",$email);
					
					$stmt_insert->bind_result($id,$category,$product_name,$tags,$description,$actual_price,$selling_price);
					
					if($stmt_insert->execute())
					{
							$counter	=	0;
							$details	=	array();
						while($stmt_insert->fetch())
						{
							$details[$counter][0]	=	$id;
							$details[$counter][1]	=	$category;
							$details[$counter][2]	=	$product_name;
							$details[$counter][3]	=	$tags;
							$details[$counter][4]	=	$description;
							$details[$counter][5]	=	$actual_price;
							$details[$counter][6]	=	$selling_price;
												
							$counter++;
						}
						if(!empty($details))	
						{
							return $details;
						}
						return false;
					}	
				}
			}
			
			function get_all_pending_product_info_for_admin()
			{	
				if($stmt_insert = $this->con->prepare("SELECT `id`,`category`, `product_name`, `tags`, `description`, `actual_price`, `selling_price`,`added_by` FROM `products` Where `status` = 'pending'"))
				{	
					$stmt_insert->bind_result($id,$category,$product_name,$tags,$description,$actual_price,$selling_price,$added_by);
					
					if($stmt_insert->execute())
					{
							$counter	=	0;
							$details	=	array();
						while($stmt_insert->fetch())
						{
							$details[$counter][0]	=	$id;
							$details[$counter][1]	=	$category;
							$details[$counter][2]	=	$product_name;
							$details[$counter][3]	=	$tags;
							$details[$counter][4]	=	$description;
							$details[$counter][5]	=	$actual_price;
							$details[$counter][6]	=	$selling_price;
							$details[$counter][7]	=	$added_by;
												
							$counter++;
						}
						if(!empty($details))	
						{
							return $details;
						}
						return false;
					}	
				}
			}
			
			function delete_product_info($del_id)
			{
				if($stmt_select = $this->con->prepare("Delete from `products` where `id`=?"))
				{
					$stmt_select->bind_param("i",$del_id);
				
					if($stmt_select->execute())
					{					
							return true;
					}
						return false;
				}
			}
			function get_all_product_info_by_id($up_id)
			{	
				if($stmt_insert = $this->con->prepare("SELECT `id`,`category`, `product_name`, `tags`, `description`, `actual_price`, `selling_price`, `home_delivery` FROM `products` Where `id` = ?"))
				{	
					$stmt_insert->bind_param("i",$up_id);
					
					$stmt_insert->bind_result($id,$category,$product_name,$tags,$description,$actual_price,$selling_price,$home_delivery);
					
					if($stmt_insert->execute())
					{
							$counter	=	0;
							$details	=	array();
						while($stmt_insert->fetch())
						{
							$details[$counter][0]	=	$id;
							$details[$counter][1]	=	$category;
							$details[$counter][2]	=	$product_name;
							$details[$counter][3]	=	$tags;
							$details[$counter][4]	=	$description;
							$details[$counter][5]	=	$actual_price;
							$details[$counter][6]	=	$selling_price;
							$details[$counter][7]	=	$home_delivery;					
							$counter++;
						}
						if(!empty($details))	
						{
							return $details;
						}
						return false;
					}	
				}
			}
			function update_product($up_id,$category,$product_name,$tags,$description,$actual_price,$selling_price,$home_del)
			{	
				if($stmt_insert = $this->con->prepare("update `products` set `category` = ?, `product_name` = ?, `tags` = ?, `description` = ?, `actual_price` = ?, `selling_price` = ?, `home_delivery` = ? Where `id` =?"))
				{
					$stmt_insert->bind_param("sssssssi",$category,$product_name,$tags,$description,$actual_price,$selling_price,$home_del,$up_id);
					
					if($stmt_insert->execute())
					{
						return true;
					}
						return false;
				} 	
			}
			function get_all_product_info_for_admin($owner_name,$product_id,$category,$product_name)
			{	
				if($category == "Select Category")
				{
					$category = "";
				}
				
				$pro_stmt = "";
				
				if($product_id!="")
				{
					$pro_stmt = " AND `id` = ".$product_id;
				}
				
				if($stmt_insert = $this->con->prepare("SELECT `id`,`category`, `product_name`, `tags`, `description`, `actual_price`, `selling_price`,`added_by` FROM `products` Where `added_by` LIKE '%$owner_name%' AND `category` LIKE '%$category%' AND `product_name` LIKE '%$product_name%' ".$pro_stmt))
				{	
					$stmt_insert->bind_result($id,$category,$product_name,$tags,$description,$actual_price,$selling_price,$added_by);
					
					if($stmt_insert->execute())
					{
							$counter	=	0;
							$details	=	array();
						while($stmt_insert->fetch())
						{
							$details[$counter][0]	=	$id;
							$details[$counter][1]	=	$category;
							$details[$counter][2]	=	$product_name;
							$details[$counter][3]	=	$tags;
							$details[$counter][4]	=	$description;
							$details[$counter][5]	=	$actual_price;
							$details[$counter][6]	=	$selling_price;
							$details[$counter][7]	=	$added_by;
												
							$counter++;
						}
						if(!empty($details))	
						{
							return $details;
						}
						return false;
					}	
				}
			}
			function add_advertisement($category,$title,$advertise_picture,$s_date,$e_date,$p_amount,$r_name,$r_commission)
			{	
				$s_date = date("Y-m-d" , strtotime($s_date));
				$e_date = date("Y-m-d" , strtotime($e_date));
				$date = date("Y-m-d");
				$time = date("H-i-s A");
				if($stmt_insert = $this->con->prepare("INSERT INTO `advertisement`(`category`, `title` , `advertise_image`, `start_date`, `expire_date`, `paid_amount`, `reference_name`, `referral_commission`, `date`,`time`) VALUES (?,?,?,?,?,?,?,?,?,?)"))
				{
					$stmt_insert->bind_param("ssssssssss",$category,$title,$advertise_picture,$s_date,$e_date,$p_amount,$r_name,$r_commission,$date,$time);
					
					if($stmt_insert->execute())
					{
						return true;
					}
						return false;
				} 	
			}
			function get_all_advertise_info($category,$title)
			{	
				$today_date = Date("Y-m-d");
				
				if($category == 'Select Category')
				{
					$category = "";
				}
				if($stmt_insert = $this->con->prepare("SELECT `id`,`category`, `advertise_image`, `start_date`, `expire_date`, `paid_amount`, `reference_name`, `referral_commission`,`title` FROM `advertisement` Where `category` LIKE '%$category%' AND `title` LIKE '%$title%' AND `expire_date` >= '$today_date'"))
				{	
					$stmt_insert->bind_result($id,$category,$advertise_image,$start_date,$expire_date,$paid_amount,$reference_name,$referral_commission,$title);
					
					if($stmt_insert->execute())
					{
							$counter	=	0;
							$details	=	array();
						while($stmt_insert->fetch())
						{
							$details[$counter][0]	=	$id;
							$details[$counter][1]	=	$category;
							$details[$counter][2]	=	$advertise_image;
							$details[$counter][3]	=	$start_date;
							$details[$counter][4]	=	$expire_date;
							$details[$counter][5]	=	$paid_amount;
							$details[$counter][6]	=	$reference_name;
							$details[$counter][7]	=	$referral_commission;
							$details[$counter][8]	=	$title;
							
							$counter++;
						}
						if(!empty($details))	
						{
							return $details;
						}
						return false;
					}	
				}
			}
			function delete_advertise_info($del_id)
			{
				if($stmt_select = $this->con->prepare("Delete from `advertisement` where `id`=?"))
				{
					$stmt_select->bind_param("i",$del_id);
				
					if($stmt_select->execute())
					{					
							return true;
					}
						return false;
				}
			}
			function get_all_advertise_info_by_id($up_id)
			{	
				if($stmt_insert = $this->con->prepare("SELECT `id`,`category`, `advertise_image`, `start_date`, `expire_date`, `paid_amount`, `reference_name`, `referral_commission`,`title` FROM `advertisement` Where `id` = ? "))
				{	
					$stmt_insert->bind_param("i",$up_id);
				
					$stmt_insert->bind_result($id,$category,$advertise_image,$start_date,$expire_date,$paid_amount,$reference_name,$referral_commission,$title);
					
					if($stmt_insert->execute())
					{
							$counter	=	0;
							$details	=	array();
						while($stmt_insert->fetch())
						{
							$details[$counter][0]	=	$id;
							$details[$counter][1]	=	$category;
							$details[$counter][2]	=	$advertise_image;
							$details[$counter][3]	=	$start_date;
							$details[$counter][4]	=	$expire_date;
							$details[$counter][5]	=	$paid_amount;
							$details[$counter][6]	=	$reference_name;
							$details[$counter][7]	=	$referral_commission;
							$details[$counter][8]	=	$title;
							
							$counter++;
						}
						if(!empty($details))	
						{
							return $details;
						}
						return false;
					}	
				}
			}
			function update_advertisement($up_id,$category,$title,$s_date,$e_date,$p_amount,$r_name,$r_commission)
			{	
				$s_date = date("Y-m-d" , strtotime($s_date));
				$e_date = date("Y-m-d" , strtotime($e_date));
				if($stmt_insert = $this->con->prepare("Update `advertisement` set `category` = ?,`title` = ?, `start_date` = ?, `expire_date` = ?, `paid_amount` = ?, `reference_name` = ?, `referral_commission` = ? Where `id` = ?"))
				{
					$stmt_insert->bind_param("sssssssi",$category,$title,$s_date,$e_date,$p_amount,$r_name,$r_commission,$up_id);
					
					if($stmt_insert->execute())
					{
						return true;
					}
						return false;
				} 	
			}
			function update_advertise_image_field($update_id)
			{		
				$actual_image_name = "";					
				if($stmt_insert = $this->con->prepare("Update `advertisement` set `advertise_image`=? Where `id`=?"))
				{
					$stmt_insert->bind_param("si",$actual_image_name,$update_id);
					
					if($stmt_insert->execute())
					{
						return true;
					}
						return false;
				} 	
			}
			function get_advertise_image_name($update_id)
			{
				if($stmt_select = $this->con->prepare("Select `advertise_image` from `advertisement` where `id` = ? "))
				{	
					$stmt_select->bind_param("i",$update_id);
				
					$stmt_select->bind_result($result_image);
				
					if($stmt_select->execute())
					{
						if($stmt_select->fetch())
						{
							return $result_image;
						}
					}
							return false;
				}
			}
			function update_advertise_data($update_id,$actual_image_name)
			{							
				if($stmt_insert = $this->con->prepare("Update `advertisement` set `advertise_image`=? Where `id`=?"))
				{
					$stmt_insert->bind_param("si",$actual_image_name,$update_id);
					
					if($stmt_insert->execute())
					{
						return true;
					}
						return false;
				} 	
			}
			function get_all_expiry_advertise_info($category,$title)
			{	
				 $today_date = Date("Y-m-d");
				if($category == 'Select Category')
				{
					$category = "";
				}
				if($stmt_insert = $this->con->prepare("SELECT `id`,`category`, `advertise_image`, `start_date`, `expire_date`, `paid_amount`, `reference_name`, `referral_commission`,`title` FROM `advertisement` Where `category` LIKE '%$category%' AND `title` LIKE '%$title%' AND `expire_date` <= '$today_date'"))
				{	
					$stmt_insert->bind_result($id,$category,$advertise_image,$start_date,$expire_date,$paid_amount,$reference_name,$referral_commission,$title);
					
					if($stmt_insert->execute())
					{
							$counter	=	0;
							$details	=	array();
						while($stmt_insert->fetch())
						{
							$details[$counter][0]	=	$id;
							$details[$counter][1]	=	$category;
							$details[$counter][2]	=	$advertise_image;
							$details[$counter][3]	=	$start_date;
							$details[$counter][4]	=	$expire_date;
							$details[$counter][5]	=	$paid_amount;
							$details[$counter][6]	=	$reference_name;
							$details[$counter][7]	=	$referral_commission;
							$details[$counter][8]	=	$title;
							
							$counter++;
						}
						if(!empty($details))	
						{
							return $details;
						}
						return false;
					}	
				}
			}
			function fetch_product_by_tags($search)
			{	
				if($stmt_insert = $this->con->prepare("SELECT `id`,`category`, `product_name`, `tags`, `description`, `actual_price`, `selling_price`,`home_delivery` FROM `products` Where `tags` LIKE '%$search%'"))
				{	
					$stmt_insert->bind_result($id,$category,$product_name,$tags,$description,$actual_price,$selling_price,$home_del);
					
					if($stmt_insert->execute())
					{
							$counter	=	0;
							$details	=	array();
						while($stmt_insert->fetch())
						{
							$details[$counter][0]	=	$id;
							$details[$counter][1]	=	$category;
							$details[$counter][2]	=	$product_name;
							$details[$counter][3]	=	$tags;
							$details[$counter][4]	=	$description;
							$details[$counter][5]	=	$actual_price;
							$details[$counter][6]	=	$selling_price;
							$details[$counter][7]	=	$home_del;					
							$counter++;
						}
						if(!empty($details))	
						{
							return $details;
						}
						return false;
					}	
				}
			}
			function fetch_product_images_by_product_id($p_id)
			{
				if($stmt_select = $this->con->prepare("Select `images` from `product_image` where `seller_id` = ? ORDER BY `id` ASC"))
				{	
					$stmt_select->bind_param("s",$p_id);
				
					$stmt_select->bind_result($result_password);
				
					if($stmt_select->execute())
					{
						if($stmt_select->fetch())
						{
							return $result_password;
						}
					}
							return false;
				}
			}
						function fetch_product_all_images_by_product_id($p_id)
				{
				    if ($stmt_select = $this->con->prepare("SELECT `images` FROM `product_image` WHERE `seller_id` = ?"))
				    {
				        $stmt_select->bind_param("i", $p_id); 
				        $stmt_select->bind_result($image_path); 

				        if ($stmt_select->execute())
				        {
				            $image_paths = []; 

				            while ($stmt_select->fetch()) {
				                $image_paths[] = $image_path; 
				            }

				            if (!empty($image_paths)) {
				                return $image_paths; 
				            }
				        }
				    }

				    return false; 
				}

			function track_product_by_id($t_id)
			{	
				if($stmt_insert = $this->con->prepare("SELECT `id`, `category`, `product_name`, `tags`, `description`, `actual_price`, `selling_price`, `added_by`, `home_delivery` FROM `products` Where `id` = ?"))
				{	
					$stmt_insert->bind_param("i",$t_id);
					
					$stmt_insert->bind_result($id,$category,$product_name,$tags,$description,$actual_price,$selling_price,$added_by,$home_del);
					
					if($stmt_insert->execute())
					{
							$counter	=	0;
							$details	=	array();
						while($stmt_insert->fetch())
						{
							$details[$counter][0]	=	$id;
							$details[$counter][1]	=	$category;
							$details[$counter][2]	=	$product_name;
							$details[$counter][3]	=	$tags;
							$details[$counter][4]	=	$description;
							$details[$counter][5]	=	$actual_price;
							$details[$counter][6]	=	$selling_price;
							$details[$counter][7]	=	$added_by;
							$details[$counter][8]	=	$home_del;					
							$counter++;
						}
						if(!empty($details))	
						{
							return $details;
						}
						return false;
					}	
				}
			}
			function track_product_images_by_product_id($p_id)
			{
				if($stmt_select = $this->con->prepare("Select `images` from `product_image` where `seller_id` = ? "))
				{	
					$stmt_select->bind_param("s",$p_id);
				
					$stmt_select->bind_result($result_password);
				
					if($stmt_select->execute())
					{
						if($stmt_select->fetch())
						{
							return $result_password;
						}
					}
							return false;
				}
			}
			function fetch_related_data_by_tag($tags)
			{	
				if($stmt_insert = $this->con->prepare("SELECT `id`,`category`, `product_name`, `tags`, `description`, `actual_price`, `selling_price` FROM `products` Where `tags` = ?"))
				{	
					$stmt_insert->bind_param("s",$tags);
					
					$stmt_insert->bind_result($id,$category,$product_name,$tags,$description,$actual_price,$selling_price);
					
					if($stmt_insert->execute())
					{
							$counter	=	0;
							$details	=	array();
						while($stmt_insert->fetch())
						{
							$details[$counter][0]	=	$id;
							$details[$counter][1]	=	$category;
							$details[$counter][2]	=	$product_name;
							$details[$counter][3]	=	$tags;
							$details[$counter][4]	=	$description;
							$details[$counter][5]	=	$actual_price;
							$details[$counter][6]	=	$selling_price;
												
							$counter++;
						}
						if(!empty($details))	
						{
							return $details;
						}
						return false;
					}	
				}
			}
			function fetch_seller_info_by_email($email)
			{	
				if($stmt_insert = $this->con->prepare("SELECT `id`,`shop_name`, `owner_name`, `address`, `contact_no`, `licence_no`, `seller_email`, `password`, `confirm_password`,`gender`, `dob`, `status` FROM `seller` Where `seller_email` = ? "))
				{	
					$stmt_insert->bind_param("s",$email); 
					
					$stmt_insert->bind_result($id,$shop_name,$owner_name,$address,$contact_no,$licence_no,$seller_email,$password,$confirm_password,$gender,$dob,$status);
					
					if($stmt_insert->execute())
					{
							$counter	=	0;
							$details	=	array();
						while($stmt_insert->fetch())
						{
							$details[0]		=	$id;
							$details[1]		=	$shop_name;
							$details[2]		=	$owner_name;
							$details[3]		=	$address;
							$details[4]		=	$contact_no;
							$details[5]		=	$licence_no;
							$details[6]		=	$seller_email;
							$details[7]		=	$password;
							$details[8]		=	$confirm_password;
							$details[9]		=	$gender;
							$details[10]	=	$dob;
							$details[11]	=	$status;						
						}
						if(!empty($details))	
						{
							return $details;
						}
						return false;
					}	
				}
			}
			function fetch_image_data_by_id($p_id)
			{	
				if($stmt_insert = $this->con->prepare("SELECT `id`, `images` FROM `product_image` Where `seller_id` = ?"))
				{	
					$stmt_insert->bind_param("s",$p_id);
					
					$stmt_insert->bind_result($id,$images);
					
					if($stmt_insert->execute())
					{
							$counter	=	0;
							$details	=	array();
						while($stmt_insert->fetch())
						{
							$details[$counter][0]	=	$id;
							$details[$counter][1]	=	$images;
						
							$counter++;
						}
						if(!empty($details))	
						{
							return $details;
						}
						return false;
					}	
				}
			}
			
			function fetch_search_product_by_search_name($search)
			{
				if($stmt_insert = $this->con->prepare("SELECT `id`,`category`, `product_name`, `tags`, `description`, `actual_price`, `selling_price`,`home_delivery` FROM `products` Where `category` LIKE '%".$search."%' OR `tags` LIKE '%".$search."%' OR `product_name` LIKE '%".$search."%' "))
				{
					$stmt_insert->bind_result($id,$category,$product_name,$tags,$description,$actual_price,$selling_price,$home_del);
					
					if($stmt_insert->execute())
					{
							$counter	=	0;
							$details	=	array();
						while($stmt_insert->fetch())
						{
							$details[$counter][0]	=	$id;
							$details[$counter][1]	=	$category;
							$details[$counter][2]	=	$product_name;
							$details[$counter][3]	=	$tags;
							$details[$counter][4]	=	$description;
							$details[$counter][5]	=	$actual_price;
							$details[$counter][6]	=	$selling_price;
							$details[$counter][7]	=	$home_del;					
							$counter++;
						}
						if(!empty($details))	
						{
							return $details;
						}
						return false;
					}	
				}
			}
			
			function fetch_search_product_by_search_name_parameters($product_name,$shop_name)
			{
				if($stmt_insert = $this->con->prepare("SELECT `id`,`category`, `product_name`, `tags`, `description`, `actual_price`, `selling_price`,`home_delivery` FROM `products` Where `product_name` LIKE '%$product_name%' AND `status` = 'Approved'"))
				{
					$stmt_insert->bind_result($id,$category,$product_name,$tags,$description,$actual_price,$selling_price,$home_del);
					
					if($stmt_insert->execute())
					{
							$counter	=	0;
							$details	=	array();
						while($stmt_insert->fetch())
						{
							$details[$counter][0]	=	$id;
							$details[$counter][1]	=	$category;
							$details[$counter][2]	=	$product_name;
							$details[$counter][3]	=	$tags;
							$details[$counter][4]	=	$description;
							$details[$counter][5]	=	$actual_price;
							$details[$counter][6]	=	$selling_price;
							$details[$counter][7]	=	$home_del;					
							$counter++;
						}
						if(!empty($details))	
						{
							return $details;
						}
						return false;
					}	
				}
			}
			
			function get_all_advertise_info_for_display()
			{	
				$today_date = date('Y-m-d');
				
				if($stmt_insert = $this->con->prepare("SELECT `id`,`category`, `advertise_image`, `start_date`, `expire_date`, `paid_amount`, `reference_name`, `referral_commission`,`title` FROM `advertisement` Where `category` = 'Main Page' AND `start_date` <= '$today_date' AND `expire_date` >= '$today_date'"))
				{	
					$stmt_insert->bind_result($id,$category,$advertise_image,$start_date,$expire_date,$paid_amount,$reference_name,$referral_commission,$title);
					
					if($stmt_insert->execute())
					{
							$counter	=	0;
							$details	=	array();
						while($stmt_insert->fetch())
						{
							$details[$counter][0]	=	$id;
							$details[$counter][1]	=	$category;
							$details[$counter][2]	=	$advertise_image;
							$details[$counter][3]	=	$start_date;
							$details[$counter][4]	=	$expire_date;
							$details[$counter][5]	=	$paid_amount;
							$details[$counter][6]	=	$reference_name;
							$details[$counter][7]	=	$referral_commission;
							$details[$counter][8]	=	$title;
							
							$counter++;
						}
						if(!empty($details))	
						{
							return $details;
						}
						return false;
					}	
				}
			}
			function add_slider_images($links,$advertise_picture)
			{	
				$date = date("Y-m-d");
				$time = date("H-i-s A");
				if($stmt_insert = $this->con->prepare("INSERT INTO `slider_image`(`images`, `links` , `date`,`time`) VALUES (?,?,?,?)"))
				{
					$stmt_insert->bind_param("ssss",$links,$advertise_picture,$date,$time);
					
					if($stmt_insert->execute())
					{
						return true;
					}
						return false;
				} 	
			}
			function get_all_slider_images()
			{	
				if($stmt_insert = $this->con->prepare("SELECT `id`,`images`, `links` FROM `slider_image`"))
				{	
					$stmt_insert->bind_result($id,$images,$links);
					
					if($stmt_insert->execute())
					{
							$counter	=	0;
							$details	=	array();
						while($stmt_insert->fetch())
						{
							$details[$counter][0]	=	$id;
							$details[$counter][1]	=	$images;
							$details[$counter][2]	=	$links;
							
							$counter++;
						}
						if(!empty($details))	
						{
							return $details;
						}
						return false;
					}	
				}
			}
			function delete_slider_info($del_id)
			{
				if($stmt_select = $this->con->prepare("Delete from `slider_image` where `id`=?"))
				{
					$stmt_select->bind_param("i",$del_id);
				
					if($stmt_select->execute())
					{					
							return true;
					}
						return false;
				}
			}
			function add_temp_cart($current_session,$c_id,$qty,$actual_price)
			{	
				$date = date("Y-m-d");
				$time = date("H-i-s A");
				if($stmt_insert = $this->con->prepare("INSERT INTO `temp_cart`(`session_id`, `product_id`, `qty`, `actual_price`, `date`,`time`) VALUES (?,?,?,?,?,?)"))
				{
					$stmt_insert->bind_param("ssssss",$current_session,$c_id,$qty,$actual_price,$date,$time);
					
					if($stmt_insert->execute())
					{
						return true;
					}
						return false;
				} 	
			}
			
			function fetch_all_temp_cart_data($current_session)
			{	
				if($stmt_insert = $this->con->prepare("SELECT `id`,`session_id`, `product_id`, `qty` FROM `temp_cart` Where `session_id` = ? GROUP BY `product_id`"))
				{	
					$stmt_insert->bind_param("s",$current_session);
					
					$stmt_insert->bind_result($id,$session_id,$product_id,$qty);
					
					if($stmt_insert->execute())
					{
							$counter	=	0;
							$details	=	array();
						while($stmt_insert->fetch())
						{
							$details[$counter][0]	=	$id;
							$details[$counter][1]	=	$session_id;
							$details[$counter][2]	=	$product_id;
							$details[$counter][3]	=	$qty;
							$counter++;
						}
						if(!empty($details))	
						{
							return $details;
						}
						return false;
					}	
				}
			}
			
			function delete_temp_cart($current_session,$c_id,$qty,$actual_price)
			{
				if($stmt_select = $this->con->prepare("Delete from `temp_cart` where `session_id`=? AND `product_id` = ?"))
				{
					$stmt_select->bind_param("ss",$current_session,$c_id);
				
					if($stmt_select->execute())
					{					
						return true;
					}
					return false;
				}
			}
			
			function check_product_exist($current_session,$c_id)
			{
				if($stmt_select = $this->con->prepare("Select `qty` from `temp_cart` where `session_id` = ? AND `product_id` = ? "))
				{	
					$stmt_select->bind_param("ss",$current_session,$c_id);
				
					$stmt_select->bind_result($result_data);
				
					if($stmt_select->execute())
					{
						if($stmt_select->fetch())
						{
							return $result_data;
						}
					}
					return false;
				}
			}
			
			function update_cart($current_session,$c_id,$qty,$actual_price)
			{
				if($stmt_insert = $this->con->prepare("Update `temp_cart` set `qty` = `qty` + ?, `actual_price`=`actual_price`+? Where `product_id` = ? AND `session_id` = ?"))
				{
					$stmt_insert->bind_param("ssis",$qty,$actual_price,$c_id,$current_session);
					
					if($stmt_insert->execute())
					{
						return true;
					}
					return false;
				}
			}
			
			function update_less_cart($current_session,$c_id,$qty,$actual_price)
			{
				if($stmt_insert = $this->con->prepare("Update `temp_cart` set `qty` = `qty` - ?, `actual_price`=`actual_price` - ? Where `product_id` = ? AND `session_id` = ?"))
				{
					$stmt_insert->bind_param("ssis",$qty,$actual_price,$c_id,$current_session);
					
					if($stmt_insert->execute())
					{
						return true;
					}
					return false;
				}
			}
			
			function fetch_total_qty($s_id,$p_id)
			{
				if($stmt_select = $this->con->prepare("Select SUM(`qty`) from `temp_cart` where `session_id` = ? AND `product_id` = ? "))
				{	
					$stmt_select->bind_param("ss",$s_id,$p_id);
				
					$stmt_select->bind_result($result_password);
				
					if($stmt_select->execute())
					{
						if($stmt_select->fetch())
						{
							return $result_password;
						}
					}
							return false;
				}
			}
			function get_all_product_info_display_cart($p_id)
			{	
			
				if($stmt_insert = $this->con->prepare("SELECT `id`,`category`, `product_name`, `tags`, `description`, `actual_price`, `selling_price` FROM `products` Where `id` = ?"))
				{	
					$stmt_insert->bind_param("i",$p_id);
					
					$stmt_insert->bind_result($id,$category,$product_name,$tags,$description,$actual_price,$selling_price);
					
					if($stmt_insert->execute())
					{
					
						$details	=	array();
						while($stmt_insert->fetch())
						{
							$details[0]	=	$id;
							$details[1]	=	$category;
							$details[2]	=	$product_name;
							$details[3]	=	$tags;
							$details[4]	=	$description;
							$details[5]	=	$actual_price;
							$details[6]	=	$selling_price;
												
						}
						if(!empty($details))	
						{
							return $details;
						}
						return false;
					}	
				}
			}
			function delete_product_from_temp_cart($del_id)
			{
				if($stmt_select = $this->con->prepare("Delete from `temp_cart` where `id`=?"))
				{
					$stmt_select->bind_param("i",$del_id);
				
					if($stmt_select->execute())
					{					
							return true;
					}
						return false;
				}
			}
			function delete_product_from_temp_cart_by_product_id($del_id)
			{
				if($stmt_select = $this->con->prepare("Delete from `temp_cart` where `session_id`=?"))
				{
					$stmt_select->bind_param("s",$del_id);
				
					if($stmt_select->execute())
					{					
							return true;
					}
						return false;
				}
			}
			function get_count_of_qunatity($session_id)
			{
				if($stmt_select = $this->con->prepare("Select SUM(`qty`) from `temp_cart` where `session_id` = ? "))
				{	
					$stmt_select->bind_param("s",$session_id);
				
					$stmt_select->bind_result($result);
				
					if($stmt_select->execute())
					{
						if($stmt_select->fetch())
						{
							return $result;
						}
					}
							return false;
				}
			}
			function add_user($full_name,$address,$contact_no,$user_email,$password,$confirm_password,$gender,$dob,$wife_name,$wife_dob,$ann_date,$child_name,$child_dob)
			{	
				$status = "Pending";					
				$date = date("Y-m-d");
				$time = date("H-i-s A");
				if($stmt_insert = $this->con->prepare("INSERT INTO `users`(`full_name`, `address`, `contact_no`, `email`, `password`, `confirm_password`,`gender`, `dob`, `wife_name`, `wife_dob`, `anniversary_date`, `child_name`, `child_dob`, `status`, `date`, `time`) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)"))
				{
					$stmt_insert->bind_param("ssssssssssssssss",$full_name,$address,$contact_no,$user_email,$password,$confirm_password,$gender,$dob,$wife_name,$wife_dob,$ann_date,$child_name,$child_dob,$status,$date,$time);
					
					if($stmt_insert->execute())
					{
						return true;
					}
						return false;
				} 	
			}
			function check_user_email_id_exist_or_not($email)
			{
				if($stmt_select = $this->con->prepare("Select `password` from `users` where `email` = ? "))
				{	
					$stmt_select->bind_param("s",$email);
				
					$stmt_select->bind_result($result_password);
				
					if($stmt_select->execute())
					{
						if($stmt_select->fetch())
						{
							return $result_password;
						}
					}
							return false;
				}
			}
			function change_user_panel_password($email,$password)
			{ 
				$date = date("Y-m-d");
				$time = date("H:i:s A");
			
				if($stmt_select = $this->con->prepare("update `users` set `password`='".$password."',`confirm_password`='".$password."' where `email` = ?"))
				{
					$stmt_select->bind_param("s",$email);				
				
					if($stmt_select->execute())
					{					
						return true;
					}
						return false;
				}
			}
			function fetch_total_price_by_session_id($email)
			{
				if($stmt_select = $this->con->prepare("Select SUM(`actual_price`) from `temp_cart` where `session_id` = ? "))
				{	
					$stmt_select->bind_param("s",$email);
				
					$stmt_select->bind_result($result_password);
				
					if($stmt_select->execute())
					{
						if($stmt_select->fetch())
						{
							return $result_password;
						}
					}
							return false;
				}
			}
			function fetch_user_data_by_email_id($email)
			{	
				if($stmt_insert = $this->con->prepare("SELECT `id`,`full_name`, `address`, `contact_no`, `email` FROM `users` Where `email` = ?"))
				{	
					$stmt_insert->bind_param("s",$email);
					
					$stmt_insert->bind_result($id,$full_name,$address,$contact_no,$email);
					
					if($stmt_insert->execute())
					{
							$details	=	array();
						while($stmt_insert->fetch())
						{
							$details[0]	=	$id;
							$details[1]	=	$full_name;
							$details[2]	=	$address;
							$details[3]	=	$contact_no;
							$details[4]	=	$email;
													
						}
						if(!empty($details))	
						{
							return $details;
						}
						return false;
					}	
				}
			}
			function add_record_to_checkout($full_name,$address,$contact_no,$user_email,$total_amount)
			{	
				$date = date("Y-m-d");
				$time = date("H-i-s A");
				$status	="Pending";
				if($stmt_insert = $this->con->prepare("INSERT INTO `user_checkout_details`(`full_name`, `address`, `contact_no`, `email`, `total_amount`, `date`, `time`,`status`) VALUES (?,?,?,?,?,?,?,?)"))
				{
					$stmt_insert->bind_param("ssssssss",$full_name,$address,$contact_no,$user_email,$total_amount,$date,$time,$status);
					
					if($stmt_insert->execute())
					{
						return $stmt_insert->insert_id;
					}
						return false;
				} 	
			}
			function fetch_product_for_checklist($p_id)
			{	
				if($stmt_insert = $this->con->prepare("SELECT `id`,`added_by`, `product_name`, `tags`, `description`, `actual_price`, `selling_price` FROM `products` Where `id` = ?"))
				{	
					$stmt_insert->bind_param("i",$p_id);
					
					$stmt_insert->bind_result($id,$added_by,$product_name,$tags,$description,$actual_price,$selling_price);
					
					if($stmt_insert->execute())
					{
							$details	=	array();
						while($stmt_insert->fetch())
						{
							$details[0]	=	$id;
							$details[1]	=	$added_by;
							$details[2]	=	$product_name;
							$details[3]	=	$tags;
							$details[4]	=	$description;
							$details[5]	=	$actual_price;
							$details[6]	=	$selling_price;
												
						}
						if(!empty($details))	
						{
							return $details;
						}
						return false;
					}	
				}
			}
			function add_items_to_checkout_list($transaction_id,$added_by,$prod_id,$qty,$selling_price)
			{	
				$status = "Pending";					
				$date = date("Y-m-d");
				$time = date("H-i-s A");
				if($stmt_insert = $this->con->prepare("INSERT INTO `checkout_list`(`transaction_id`, `seller_name`, `product_id`, `qty`, `price`, `status`, `date`, `time`) VALUES (?,?,?,?,?,?,?,?)"))
				{
					$stmt_insert->bind_param("ssssssss",$transaction_id,$added_by,$prod_id,$qty,$selling_price,$status,$date,$time);
					
					if($stmt_insert->execute())
					{
						return true;
					}
						return false;
				} 	
			}
			function fetch_all_order_product_info($email)
			{	
				if($stmt_insert = $this->con->prepare("SELECT `id`,`transaction_id`, `seller_name`, `product_id`, `qty`, `price`, `status` FROM `checkout_list` Where `seller_name` = ? AND `status` = 'Pending'"))
				{	
					$stmt_insert->bind_param("s",$email);
					
					$stmt_insert->bind_result($id,$transaction_id,$seller_name,$product_id,$qty,$price,$status);
					
					if($stmt_insert->execute())
					{
							$counter	=	0;
							$details	=	array();
						while($stmt_insert->fetch())
						{
							$details[$counter][0]	=	$id;
							$details[$counter][1]	=	$transaction_id;
							$details[$counter][2]	=	$seller_name;
							$details[$counter][3]	=	$product_id;
							$details[$counter][4]	=	$qty;
							$details[$counter][5]	=	$price;
							$details[$counter][6]	=	$status;
												
							$counter++;
						}
						if(!empty($details))	
						{
							return $details;
						}
						return false;
					}	
				}
			}
			
			
			function fetch_all_order_product_info_from_trnsaction_id($t_id)
			{
				if($stmt_insert = $this->con->prepare("SELECT `id`,`transaction_id`, `seller_name`, `product_id`, `qty`, `price`, `status` FROM `checkout_list` Where `transaction_id` = ?"))
				{	
					$stmt_insert->bind_param("s",$t_id);
					
					$stmt_insert->bind_result($id,$transaction_id,$seller_name,$product_id,$qty,$price,$status);
					
					if($stmt_insert->execute())
					{
							$counter	=	0;
							$details	=	array();
						while($stmt_insert->fetch())
						{
							$details[$counter][0]	=	$id;
							$details[$counter][1]	=	$transaction_id;
							$details[$counter][2]	=	$seller_name;
							$details[$counter][3]	=	$product_id;
							$details[$counter][4]	=	$qty;
							$details[$counter][5]	=	$price;
							$details[$counter][6]	=	$status;
												
							$counter++;
						}
						if(!empty($details))	
						{
							return $details;
						}
						return false;
					}	
				}
			}
			
			
			function fetch_user_checkout_details($id,$from_date,$to_date)
			{	
				$from_date = date("Y-m-d" , strtotime($from_date));
				$to_date = date("Y-m-d" , strtotime($to_date));
				if($stmt_insert = $this->con->prepare("SELECT `id`,`full_name`, `address`, `contact_no`, `email`, `total_amount` FROM `user_checkout_details` Where `id` = ? AND `date` BETWEEN '$from_date' AND '$to_date'"))
				{	
					$stmt_insert->bind_param("i",$id);
					
					$stmt_insert->bind_result($id,$full_name,$address,$contact_no,$email,$total_amount);
					
					if($stmt_insert->execute())
					{
							$counter	=	0;
							$details	=	array();
						while($stmt_insert->fetch())
						{
							$details[$counter][0]	=	$id;
							$details[$counter][1]	=	$full_name;
							$details[$counter][2]	=	$address;
							$details[$counter][3]	=	$contact_no;
							$details[$counter][4]	=	$email;
							$details[$counter][5]	=	$total_amount;
												
							$counter++;
						}
						if(!empty($details))	
						{
							return $details;
						}
						return false;
					}	
				}
			}
			
			
			function fetch_all_main_transaction_data($id)
			{	
				if($stmt_insert = $this->con->prepare("SELECT `id`,`full_name`, `address`, `contact_no`, `email`, `total_amount`,`date` FROM `user_checkout_details` Where `id` = ?"))
				{	
					$stmt_insert->bind_param("i",$id);
					
					$stmt_insert->bind_result($id,$full_name,$address,$contact_no,$email,$total_amount,$date);
					
					if($stmt_insert->execute())
					{
							$counter	=	0;
							$details	=	array();
						while($stmt_insert->fetch())
						{
							$details[$counter][0]	=	$id;
							$details[$counter][1]	=	$full_name;
							$details[$counter][2]	=	$address;
							$details[$counter][3]	=	$contact_no;
							$details[$counter][4]	=	$email;
							$details[$counter][5]	=	$total_amount;
							$details[$counter][6]	=	$date;
												
							$counter++;
						}
						if(!empty($details))	
						{
							return $details;
						}
						return false;
					}	
				}
			}
			
			
			function fetch_product_info_by_product_id($id)
			{	
				if($stmt_insert = $this->con->prepare("SELECT `id`,`category`, `product_name`, `description`, `actual_price`, `selling_price`,`added_by` FROM `products` Where `id` = ?"))
				{	
					$stmt_insert->bind_param("i",$id);
					
					$stmt_insert->bind_result($id,$category,$product_name,$description,$actual_price,$selling_price,$added_by);
					
					if($stmt_insert->execute())
					{
							$counter	=	0;
							$details	=	array();
						while($stmt_insert->fetch())
						{
							$details[$counter][0]	=	$id;
							$details[$counter][1]	=	$category;
							$details[$counter][2]	=	$product_name;
							$details[$counter][3]	=	$description;
							$details[$counter][4]	=	$actual_price;
							$details[$counter][5]	=	$selling_price;
							$details[$counter][6]	=	$added_by;
												
							$counter++;
						}
						if(!empty($details))	
						{
							return $details;
						}
						return false;
					}	
				}
			}
			function update_product_status_dispatch($dispatch_id)
			{	
				$status = "Dispatch";					
				if($stmt_insert = $this->con->prepare("Update `checkout_list` set `status` = ? Where `id` = ?"))
				{
					$stmt_insert->bind_param("si",$status,$dispatch_id);
					
					if($stmt_insert->execute())
					{
						return true;
					}
						return false;
				} 	
			}
			function delete_order_product_info($del_id)
			{
				if($stmt_select = $this->con->prepare("Delete from `checkout_list` where `id`=?"))
				{
					$stmt_select->bind_param("i",$del_id);
				
					if($stmt_select->execute())
					{					
							return true;
					}
						return false;
				}
			}
			
			function delete_pending_approval_product_info($del_id)
			{
				if($stmt_select = $this->con->prepare("Delete from `products` where `id`=?"))
				{
					$stmt_select->bind_param("i",$del_id);
				
					if($stmt_select->execute())
					{					
							return true;
					}
						return false;
				}
			}
			
			function fetch_all_dispatch_product_info($email)
			{	
				if($stmt_insert = $this->con->prepare("SELECT `id`,`transaction_id`, `seller_name`, `product_id`, `qty`, `price`, `status` FROM `checkout_list` Where `seller_name` = ? AND `status` = 'Dispatch'"))
				{	
					$stmt_insert->bind_param("s",$email);
					
					$stmt_insert->bind_result($id,$transaction_id,$seller_name,$product_id,$qty,$price,$status);
					
					if($stmt_insert->execute())
					{
							$counter	=	0;
							$details	=	array();
						while($stmt_insert->fetch())
						{
							$details[$counter][0]	=	$id;
							$details[$counter][1]	=	$transaction_id;
							$details[$counter][2]	=	$seller_name;
							$details[$counter][3]	=	$product_id;
							$details[$counter][4]	=	$qty;
							$details[$counter][5]	=	$price;
							$details[$counter][6]	=	$status;
												
							$counter++;
						}
						if(!empty($details))	
						{
							return $details;
						}
						return false;
					}	
				}
			}
			function update_product_status_pending($dispatch_id)
			{	
				$status = "Pending";					
				if($stmt_insert = $this->con->prepare("Update `checkout_list` set `status` = ? Where `id` = ?"))
				{
					$stmt_insert->bind_param("si",$status,$dispatch_id);
					
					if($stmt_insert->execute())
					{
						return true;
					}
						return false;
				} 	
			}
			function update_product_status_pending_to_approve($approve_id)
			{	
				$status = "Approved";
				
				if($stmt_insert = $this->con->prepare("Update `products` set `status` = ? Where `id` = ?"))
				{
					$stmt_insert->bind_param("si",$status,$approve_id);
					
					if($stmt_insert->execute())
					{
						return true;
					}
						return false;
				} 	
			}
			
			function fetch_all_order_product_info_for_admin($from_date,$to_date)
			{	
				$from_date = date("Y-m-d" , strtotime($from_date));
				$to_date = date("Y-m-d" , strtotime($to_date));
				if($stmt_insert = $this->con->prepare("SELECT `id`,`transaction_id`, `seller_name`, `product_id`, `qty`, `price`, `status` FROM `checkout_list` Where `status` = 'Pending' AND (`date` BETWEEN '$from_date' AND '$to_date')"))
				{		
					$stmt_insert->bind_result($id,$transaction_id,$seller_name,$product_id,$qty,$price,$status);
					
					if($stmt_insert->execute())
					{
							$counter	=	0;
							$details	=	array();
						while($stmt_insert->fetch())
						{
							$details[$counter][0]	=	$id;
							$details[$counter][1]	=	$transaction_id;
							$details[$counter][2]	=	$seller_name;
							$details[$counter][3]	=	$product_id;
							$details[$counter][4]	=	$qty;
							$details[$counter][5]	=	$price;
							$details[$counter][6]	=	$status;
												
							$counter++;
						}
						if(!empty($details))	
						{
							return $details;
						}
						return false;
					}	
				}
			}
			
			function fetch_all_visits_by_date($from_date,$to_date)
			{	
				$from_date = date("Y-m-d" , strtotime($from_date));
				$to_date = date("Y-m-d" , strtotime($to_date));
				if($stmt_insert = $this->con->prepare("SELECT `id`,`visits`, `date` FROM `visitors` Where `date` BETWEEN '$from_date' AND '$to_date'"))
				{		
					$stmt_insert->bind_result($id,$visits,$date);
					
					if($stmt_insert->execute())
					{
							$counter	=	0;
							$details	=	array();
						while($stmt_insert->fetch())
						{
							$details[$counter][0]	=	$id;
							$details[$counter][1]	=	$visits;
							$details[$counter][2]	=	$date;
												
							$counter++;
						}
						if(!empty($details))	
						{
							return $details;
						}
						return false;
					}	
				}
			}
			
			function fetch_all_dispatch_product_info_for_admin($from_date,$to_date)
			{	
				$from_date = date("Y-m-d" , strtotime($from_date));
				$to_date = date("Y-m-d" , strtotime($to_date));
				if($stmt_insert = $this->con->prepare("SELECT `id`,`transaction_id`, `seller_name`, `product_id`, `qty`, `price`, `status` FROM `checkout_list` Where `status` = 'Dispatch' AND `date` BETWEEN '$from_date' AND '$to_date'"))
				{		
					$stmt_insert->bind_result($id,$transaction_id,$seller_name,$product_id,$qty,$price,$status);
					
					if($stmt_insert->execute())
					{
							$counter	=	0;
							$details	=	array();
						while($stmt_insert->fetch())
						{
							$details[$counter][0]	=	$id;
							$details[$counter][1]	=	$transaction_id;
							$details[$counter][2]	=	$seller_name;
							$details[$counter][3]	=	$product_id;
							$details[$counter][4]	=	$qty;
							$details[$counter][5]	=	$price;
							$details[$counter][6]	=	$status;
												
							$counter++;
						}
						if(!empty($details))	
						{
							return $details;
						}
						return false;
					}	
				}
			}
			function fetch_user_product_checkout_details($email,$from_date,$to_date)
			{	
				$from_date = date("Y-m-d" , strtotime($from_date));
				$to_date = date("Y-m-d" , strtotime($to_date));
				if($stmt_insert = $this->con->prepare("SELECT `id`,`full_name`, `address`, `contact_no`, `email`, `total_amount` FROM `user_checkout_details` Where `email` = ? AND `date` BETWEEN '$from_date' AND '$to_date'"))
				{	
					$stmt_insert->bind_param("s",$email);
					
					$stmt_insert->bind_result($id,$full_name,$address,$contact_no,$email,$total_amount);
					
					if($stmt_insert->execute())
					{
							$counter	=	0;
							$details	=	array();
						while($stmt_insert->fetch())
						{
							$details[$counter][0]	=	$id;
							$details[$counter][1]	=	$full_name;
							$details[$counter][2]	=	$address;
							$details[$counter][3]	=	$contact_no;
							$details[$counter][4]	=	$email;
							$details[$counter][5]	=	$total_amount;
												
							$counter++;
						}
						if(!empty($details))	
						{
							return $details;
						}
						return false;
					}	
				}
			}
			function fetch_all_order_product_info_for_user($t_id)
			{	
				if($stmt_insert = $this->con->prepare("SELECT `id`,`transaction_id`, `seller_name`, `product_id`, `qty`, `price`, `status`,`date` FROM `checkout_list` Where `status` = 'Pending' AND `transaction_id`= ? "))
				{		
					$stmt_insert->bind_param("s",$t_id);
					
					$stmt_insert->bind_result($id,$transaction_id,$seller_name,$product_id,$qty,$price,$status,$date);
					
					if($stmt_insert->execute())
					{
							$counter	=	0;
							$details	=	array();
						while($stmt_insert->fetch())
						{
							$details[$counter][0]	=	$id;
							$details[$counter][1]	=	$transaction_id;
							$details[$counter][2]	=	$seller_name;
							$details[$counter][3]	=	$product_id;
							$details[$counter][4]	=	$qty;
							$details[$counter][5]	=	$price;
							$details[$counter][6]	=	$status;
							$details[$counter][7]	=	$date;
												
							$counter++;
						}
						if(!empty($details))	
						{
							return $details;
						}
						return false;
					}	
				}
			}
			function fetch_all_dispatch_product_info_for_user($t_id)
			{	
				if($stmt_insert = $this->con->prepare("SELECT `id`,`transaction_id`, `seller_name`, `product_id`, `qty`, `price`, `status`,`date` FROM `checkout_list` Where `status` = 'Dispatch' AND `transaction_id`= ? "))
				{		
					$stmt_insert->bind_param("s",$t_id);
					
					$stmt_insert->bind_result($id,$transaction_id,$seller_name,$product_id,$qty,$price,$status,$date);
					
					if($stmt_insert->execute())
					{
							$counter	=	0;
							$details	=	array();
						while($stmt_insert->fetch())
						{
							$details[$counter][0]	=	$id;
							$details[$counter][1]	=	$transaction_id;
							$details[$counter][2]	=	$seller_name;
							$details[$counter][3]	=	$product_id;
							$details[$counter][4]	=	$qty;
							$details[$counter][5]	=	$price;
							$details[$counter][6]	=	$status;
							$details[$counter][7]	=	$date;
												
							$counter++;
						}
						if(!empty($details))	
						{
							return $details;
						}
						return false;
					}	
				}
			}
			function add_deal_of_the_day_images($links,$advertise_picture)
			{	
				$date = date("Y-m-d");
				$time = date("H-i-s A");
				if($stmt_insert = $this->con->prepare("update `deal_of_the_day` set `images` = ?, `links` = ? , `date` = ?,`time` = ? "))
				{
					$stmt_insert->bind_param("ssss",$links,$advertise_picture,$date,$time);
					
					if($stmt_insert->execute())
					{
						return true;
					}
						return false;
				} 	
			}
			
			function get_all_deal_of_the_day_images()
			{	
				if($stmt_insert = $this->con->prepare("SELECT `id`,`images`, `links` FROM `deal_of_the_day`"))
				{	
					$stmt_insert->bind_result($id,$images,$links);
					
					if($stmt_insert->execute())
					{
							$counter	=	0;
							$details	=	array();
						while($stmt_insert->fetch())
						{
							$details[$counter][0]	=	$id;
							$details[$counter][1]	=	$images;
							$details[$counter][2]	=	$links;
							
							$counter++;
						}
						if(!empty($details))	
						{
							return $details;
						}
						return false;
					}	
				}
			}
			function add_new_hours_offers($offer_date,$s_time,$e_time,$advertise_picture,$links)
			{	
				$date = date("Y-m-d");
				$time = date("H-i-s A");
				if($stmt_insert = $this->con->prepare("INSERT INTO `offers`(`offer_date`,`s_time`,`e_time`,`images`, `links`,`date`,`time`) VALUES (?,?,?,?,?,?,?)"))
				{
					$stmt_insert->bind_param("sssssss",$offer_date,$s_time,$e_time,$advertise_picture,$links,$date,$time);
					
					if($stmt_insert->execute())
					{
						return true;
					}
						return false;
				} 	
			}
			function update_hours_offers($up_id,$offer_date,$s_time,$e_time,$links)
			{	
				$date = date("Y-m-d");
				$time = date("H-i-s A");
				if($stmt_insert = $this->con->prepare("update `offers` set `offer_date` = ?,`s_time` = ?, `e_time` = ?, `links` = ? Where `id` = ?"))
				{
					$stmt_insert->bind_param("ssssi",$offer_date,$s_time,$e_time,$links,$up_id);
					
					if($stmt_insert->execute())
					{
						return true;
					}
						return false;
				} 	
			}
			
			function get_all_offers()
			{	
				if($stmt_insert = $this->con->prepare("SELECT `id`,`offer_date`,`s_time`,`e_time`,`images`, `links` FROM `offers`"))
				{	
					$stmt_insert->bind_result($id,$offer_date,$s_time,$e_time,$images,$links);
					
					if($stmt_insert->execute())
					{
							$counter	=	0;
							$details	=	array();
						while($stmt_insert->fetch())
						{
							$details[$counter][0]	=	$id;
							$details[$counter][1]	=	$offer_date;
							$details[$counter][2]	=	$s_time;
							$details[$counter][3]	=	$e_time;
							$details[$counter][4]	=	$images;
							$details[$counter][5]	=	$links;
							$counter++;
						}
						if(!empty($details))	
						{
							return $details;
						}
						return false;
					}	
				}
			}
			function get_all_user_info()
			{	
				if($stmt_insert = $this->con->prepare("SELECT `id`,`full_name`, `address`,`contact_no`, `email`, `password`, `confirm_password`, `gender`, `dob`, `status`,`wife_name`,`wife_dob`,`anniversary_date`,`child_name`,`child_dob` FROM `users` "))
				{	
					$stmt_insert->bind_result($id,$full_name,$address,$contact_no,$email,$password,$confirm_password,$gender,$dob,$status,$wife_name,$wife_dob,$anniversary_date,$child_name,$child_dob);
					
					if($stmt_insert->execute())
					{
							$counter	=	0;
							$details	=	array();
						while($stmt_insert->fetch())
						{
							$details[$counter][0]	=	$id;
							$details[$counter][1]	=	$full_name;
							$details[$counter][2]	=	$address;
							$details[$counter][3]	=	$contact_no;
							$details[$counter][4]	=	$email;
							$details[$counter][5]	=	$password;
							$details[$counter][6]	=	$confirm_password;
							$details[$counter][7]	=	$gender;
							$details[$counter][8]	=	$dob;
							$details[$counter][9]	=	$status;
							$details[$counter][10]	=	$wife_name;
							$details[$counter][11]	=	$wife_dob;
							$details[$counter][12]	=	$anniversary_date;
							$details[$counter][13]	=	$child_name;
							$details[$counter][14]	=	$child_dob;
							
							$counter++;
						}
						if(!empty($details))	
						{
							return $details;
						}
						return false;
					}	
				}
			}
			function fetch_big_banner_advertise($ad)
			{
				$today_date = date('Y-m-d');
				
				if($stmt_select = $this->con->prepare("Select `advertise_image` from `advertisement` where `category` = ? AND `start_date` <= '$today_date' AND `expire_date` >= '$today_date'"))
				{	
					$stmt_select->bind_param("s",$ad);
				
					$stmt_select->bind_result($result_password);
				
					if($stmt_select->execute())
					{
						if($stmt_select->fetch())
						{
							return $result_password;
						}
					}
							return false;
				}
			}
		
		function top_advertise($advertise_picture)
			{	
				$date = date("Y-m-d");
				$time = date("H-i-s A");
				if($stmt_insert = $this->con->prepare("update `detail_page_add` set `images` = ?, `date` = ?,`time` = ? "))
				{
					$stmt_insert->bind_param("sss",$advertise_picture,$date,$time);
					
					if($stmt_insert->execute())
					{
						return true;
					}
						return false;
				} 	
			}
			function get_all_top_advertise()
			{	
				if($stmt_insert = $this->con->prepare("SELECT `id`,`images` FROM `detail_page_add`"))
				{	
					$stmt_insert->bind_result($id,$images);
					
					if($stmt_insert->execute())
					{
							$counter	=	0;
							$details	=	array();
						while($stmt_insert->fetch())
						{
							$details[$counter][0]	=	$id;
							$details[$counter][1]	=	$images;
							
							$counter++;
						}
						if(!empty($details))	
						{
							return $details;
						}
						return false;
					}	
				}
			}
			function remove_advertise_image($advertise_picture)
			{	
				$advertise_picture = "";
				if($stmt_insert = $this->con->prepare("update `detail_page_add` set `images` = ?"))
				{
					$stmt_insert->bind_param("s",$advertise_picture);
					
					if($stmt_insert->execute())
					{
						return true;
					}
						return false;
				} 	
			}
			function add_main_category($menubar,$category)
			{	
				$date = date("Y-m-d");
				$time = date("H-i-s A");
				if($stmt_insert = $this->con->prepare("INSERT INTO `main_category`(`menubar`, `category` , `date`,`time`) VALUES (?,?,?,?)"))
				{
					$stmt_insert->bind_param("ssss",$menubar,$category,$date,$time);
					
					if($stmt_insert->execute())
					{
						return true;
					}
						return false;
				} 	
			}
			function get_all_main_category()
			{	
				if($stmt_insert = $this->con->prepare("SELECT `id`,`menubar`, `category` FROM `main_category`"))
				{	
					$stmt_insert->bind_result($id,$images,$links);
					
					if($stmt_insert->execute())
					{
							$counter	=	0;
							$details	=	array();
						while($stmt_insert->fetch())
						{
							$details[$counter][0]	=	$id;
							$details[$counter][1]	=	$images;
							$details[$counter][2]	=	$links;
							
							$counter++;
						}
						if(!empty($details))	
						{
							return $details;
						}
						return false;
					}	
				}
			}
			function delete_main_category($del_id)
			{
				if($stmt_select = $this->con->prepare("Delete from `main_category` where `id`=?"))
				{
					$stmt_select->bind_param("i",$del_id);
				
					if($stmt_select->execute())
					{					
							return true;
					}
						return false;
				}
			}
			function get_all_main_category_by_id($up_id)
			{	
				if($stmt_insert = $this->con->prepare("SELECT `id`,`menubar`, `category` FROM `main_category` Where `id` = ?"))
				{	
					$stmt_insert->bind_param("i",$up_id);
					
					$stmt_insert->bind_result($id,$images,$links);
					
					if($stmt_insert->execute())
					{
							$counter	=	0;
							$details	=	array();
						while($stmt_insert->fetch())
						{
							$details[$counter][0]	=	$id;
							$details[$counter][1]	=	$images;
							$details[$counter][2]	=	$links;
							
							$counter++;
						}
						if(!empty($details))	
						{
							return $details;
						}
						return false;
					}	
				}
			}
			function update_main_category($up_id,$menubar,$category)
			{	
				$date = date("Y-m-d");
				$time = date("H-i-s A");
				if($stmt_insert = $this->con->prepare("Update `main_category` set `menubar` = ?, `category` = ? Where `id` = ?"))
				{
					$stmt_insert->bind_param("ssi",$menubar,$category,$up_id);
					
					if($stmt_insert->execute())
					{
						return true;
					}
						return false;
				} 	
			}
			function get_all_main_category_for_sub_category()
			{	
				if($stmt_insert = $this->con->prepare("SELECT `id`,`menubar`, `category` FROM `main_category` Where `menubar` = 'Top Menubar'"))
				{	
					$stmt_insert->bind_result($id,$images,$links);
					
					if($stmt_insert->execute())
					{
							$counter	=	0;
							$details	=	array();
						while($stmt_insert->fetch())
						{
							$details[$counter][0]	=	$id;
							$details[$counter][1]	=	$images;
							$details[$counter][2]	=	$links;
							
							$counter++;
						}
						if(!empty($details))	
						{
							return $details;
						}
						return false;
					}	
				}
			}
			function add_sub_category($category,$sub_category)
			{	
				$date = date("Y-m-d");
				$time = date("H-i-s A");
				if($stmt_insert = $this->con->prepare("INSERT INTO `sub_category`(`main_category`, `sub_category` , `date`,`time`) VALUES (?,?,?,?)"))
				{
					$stmt_insert->bind_param("ssss",$category,$sub_category,$date,$time);
					
					if($stmt_insert->execute())
					{
						return true;
					}
						return false;
				} 	
			}
			function get_all_sub_category()
			{	
				if($stmt_insert = $this->con->prepare("SELECT `id`,`main_category`, `sub_category` FROM `sub_category`"))
				{	
					$stmt_insert->bind_result($id,$images,$links);
					
					if($stmt_insert->execute())
					{
							$counter	=	0;
							$details	=	array();
						while($stmt_insert->fetch())
						{
							$details[$counter][0]	=	$id;
							$details[$counter][1]	=	$images;
							$details[$counter][2]	=	$links;
							
							$counter++;
						}
						if(!empty($details))	
						{
							return $details;
						}
						return false;
					}	
				}
			}
			function delete_sub_category($del_id)
			{
				if($stmt_select = $this->con->prepare("Delete from `sub_category` where `id`=?"))
				{
					$stmt_select->bind_param("i",$del_id);
				
					if($stmt_select->execute())
					{					
							return true;
					}
						return false;
				}
			}
			function get_all_sub_category_by_id($up_id)
			{	
				if($stmt_insert = $this->con->prepare("SELECT `id`,`main_category`, `sub_category` FROM `sub_category` Where `id` = ?"))
				{	
					$stmt_insert->bind_param("i",$up_id);
					
					$stmt_insert->bind_result($id,$images,$links);
					
					if($stmt_insert->execute())
					{
							$counter	=	0;
							$details	=	array();
						while($stmt_insert->fetch())
						{
							$details[$counter][0]	=	$id;
							$details[$counter][1]	=	$images;
							$details[$counter][2]	=	$links;
							
							$counter++;
						}
						if(!empty($details))	
						{
							return $details;
						}
						return false;
					}	
				}
			}
			function update_sub_category($up_id,$category,$sub_category)
			{	
				$date = date("Y-m-d");
				$time = date("H-i-s A");
				if($stmt_insert = $this->con->prepare("Update `sub_category` set `main_category` = ?, `sub_category`  = ? Where `id` = ?"))
				{
					$stmt_insert->bind_param("ssi",$category,$sub_category,$up_id);
					
					if($stmt_insert->execute())
					{
						return true;
					}
						return false;
				} 	
			}
			function get_all_sub_category_by_main_category($category)
			{	
				if($stmt_insert = $this->con->prepare("SELECT `id`,`main_category`, `sub_category` FROM `sub_category` Where `main_category` = ?"))
				{	
					$stmt_insert->bind_param("s",$category);
					
					$stmt_insert->bind_result($id,$main_category,$sub_category);
					
					if($stmt_insert->execute())
					{
							$counter	=	0;
							$details	=	array();
						while($stmt_insert->fetch())
						{
							$details[$counter][0]	=	$id;
							$details[$counter][1]	=	$main_category;
							$details[$counter][2]	=	$sub_category;
							
							$counter++;
						}
						if(!empty($details))	
						{
							return $details;
						}
						return false;
					}	
				}
			}
			function check_category_exist_or_not($category)
			{
				if($stmt_select = $this->con->prepare("Select `id` from `main_category` where `category` = ? "))
				{	
					$stmt_select->bind_param("s",$category);
				
					$stmt_select->bind_result($result_id);
				
					if($stmt_select->execute())
					{
						if($stmt_select->fetch())
						{
							return $result_id;
						}
					}
							return false;
				}
			}
			function check_sub_category_exist_or_not($category,$sub_category)
			{
				if($stmt_select = $this->con->prepare("Select `id` from `sub_category` where `main_category` = ? AND `sub_category` = ?"))
				{	
					$stmt_select->bind_param("ss",$category,$sub_category);
				
					$stmt_select->bind_result($result_id);
				
					if($stmt_select->execute())
					{
						if($stmt_select->fetch())
						{
							return $result_id;
						}
					}
							return false;
				}
			}
			function get_all_main_category_of_left_panel()
			{	
				if($stmt_insert = $this->con->prepare("SELECT `id`,`menubar`, `category` FROM `main_category` where `menubar` = 'Left Menubar'"))
				{	
					$stmt_insert->bind_result($id,$images,$links);
					
					if($stmt_insert->execute())
					{
							$counter	=	0;
							$details	=	array();
						while($stmt_insert->fetch())
						{
							$details[$counter][0]	=	$id;
							$details[$counter][1]	=	$images;
							$details[$counter][2]	=	$links;
							
							$counter++;
						}
						if(!empty($details))	
						{
							return $details;
						}
						return false;
					}
				}
			}
			
			function get_all_main_category_of_top_panel()
			{	
				if($stmt_insert = $this->con->prepare("SELECT `id`,`menubar`, `category` FROM `main_category` where `menubar` = 'Top Menubar'"))
				{	
					$stmt_insert->bind_result($id,$images,$links);
					
					if($stmt_insert->execute())
					{
							$counter	=	0;
							$details	=	array();
						while($stmt_insert->fetch())
						{
							$details[$counter][0]	=	$id;
							$details[$counter][1]	=	$images;
							$details[$counter][2]	=	$links;
							
							$counter++;
						}
						if(!empty($details))	
						{
							return $details;
						}
						return false;
					}	
				}
			}
			function add_bottom_links($title,$links)
			{	
				$date = date("Y-m-d");
				$time = date("H-i-s A");
				if($stmt_insert = $this->con->prepare("INSERT INTO `bottom_links`(`title`, `links` , `date`,`time`) VALUES (?,?,?,?)"))
				{
					$stmt_insert->bind_param("ssss",$title,$links,$date,$time);
					
					if($stmt_insert->execute())
					{
						return true;
					}
						return false;
				} 	
			}
			function get_all_bottom_links()
			{	
				if($stmt_insert = $this->con->prepare("SELECT `id`,`title`, `links` FROM `bottom_links`"))
				{	
					$stmt_insert->bind_result($id,$images,$links);
					
					if($stmt_insert->execute())
					{
							$counter	=	0;
							$details	=	array();
						while($stmt_insert->fetch())
						{
							$details[$counter][0]	=	$id;
							$details[$counter][1]	=	$images;
							$details[$counter][2]	=	$links;
							
							$counter++;
						}
						if(!empty($details))	
						{
							return $details;
						}
						return false;
					}	
				}
			}
			function get_all_bottom_links_by_id($up_id)
			{	
				if($stmt_insert = $this->con->prepare("SELECT `id`,`title`, `links` FROM `bottom_links` Where `id` = ?"))
				{	
					$stmt_insert->bind_param("i",$up_id);
					
					$stmt_insert->bind_result($id,$images,$links);
					
					if($stmt_insert->execute())
					{
							$counter	=	0;
							$details	=	array();
						while($stmt_insert->fetch())
						{
							$details[$counter][0]	=	$id;
							$details[$counter][1]	=	$images;
							$details[$counter][2]	=	$links;
							
							$counter++;
						}
						if(!empty($details))	
						{
							return $details;
						}
						return false;
					}	
				}
			}
			function update_bottom_links($up_id,$title,$links)
			{	
				if($stmt_insert = $this->con->prepare("Update `bottom_links` set `title` = ?, `links` = ? Where `id` = ?"))
				{
					$stmt_insert->bind_param("sss",$title,$links,$up_id);
					
					if($stmt_insert->execute())
					{
						return true;
					}
						return false;
				} 	
			}
			function delete_bottom_links_info($del_id)
			{
				if($stmt_select = $this->con->prepare("Delete from `bottom_links` where `id`=?"))
				{
					$stmt_select->bind_param("i",$del_id);
				
					if($stmt_select->execute())
					{					
							return true;
					}
						return false;
				}
			}
			function delete_offers_info($del_id)
			{
				if($stmt_select = $this->con->prepare("Delete from `offers` where `id`=?"))
				{
					$stmt_select->bind_param("i",$del_id);
				
					if($stmt_select->execute())
					{					
							return true;
					}
						return false;
				}
			}
			function get_all_offers_by_id($up_id)
			{	
				if($stmt_insert = $this->con->prepare("SELECT `id`,`offer_date`,`s_time`,`e_time`,`images`, `links` FROM `offers` Where `id` = ?"))
				{	
					$stmt_insert->bind_param("i",$up_id);
					
					$stmt_insert->bind_result($id,$offer_date,$s_time,$e_time,$images,$links);
					
					if($stmt_insert->execute())
					{
							$counter	=	0;
							$details	=	array();
						while($stmt_insert->fetch())
						{
							$details[$counter][0]	=	$id;
							$details[$counter][1]	=	$offer_date;
							$details[$counter][2]	=	$s_time;
							$details[$counter][3]	=	$e_time;
							$details[$counter][4]	=	$images;
							$details[$counter][5]	=	$links;
							$counter++;
						}
						if(!empty($details))	
						{
							return $details;
						}
						return false;
					}	
				}
			}
			function update_offers_image($up_id,$advertise_picture)
			{	
				$date = date("Y-m-d");
				$time = date("H-i-s A");
				if($stmt_insert = $this->con->prepare("update `offers` set `images` = ? Where `id` = ?"))
				{
					$stmt_insert->bind_param("si",$advertise_picture,$up_id);
					
					if($stmt_insert->execute())
					{
						return true;
					}
						return false;
				} 	
			}
			function fetch_offerimage_by_id($up_id)
			{
				if($stmt_select = $this->con->prepare("Select `images` from `offers` where `id` = ? "))
				{	
					$stmt_select->bind_param("i",$up_id);
				
					$stmt_select->bind_result($result_password);
				
					if($stmt_select->execute())
					{
						if($stmt_select->fetch())
						{
							return $result_password;
						}
					}
							return false;
				}
			}
			function get_all_offers_for_display()
			{	
				$todays_date = Date('Y-m-d');
				if($stmt_insert = $this->con->prepare("SELECT `id`,`offer_date`,`s_time`,`e_time`,`images`, `links` FROM `offers` Where `offer_date` = '$todays_date' "))
				{	
					$stmt_insert->bind_result($id,$offer_date,$s_time,$e_time,$images,$links);
					
					if($stmt_insert->execute())
					{
							$counter	=	0;
							$details	=	array();
						while($stmt_insert->fetch())
						{
							$details[$counter][0]	=	$id;
							$details[$counter][1]	=	$offer_date;
							$details[$counter][2]	=	$s_time;
							$details[$counter][3]	=	$e_time;
							$details[$counter][4]	=	$images;
							$details[$counter][5]	=	$links;
							$counter++;
						}
						if(!empty($details))	
						{
							return $details;
						}
						return false;
					}	
				}
			}
			function fetch_particular_product_qty($current_session,$id)
			{
				if($stmt_select = $this->con->prepare("Select SUM(`qty`) from `temp_cart` where `session_id` = ? AND `product_id` = ? "))
				{	
					$stmt_select->bind_param("ss",$current_session,$id);
				
					$stmt_select->bind_result($result_password);
				
					if($stmt_select->execute())
					{
						if($stmt_select->fetch())
						{
							return $result_password;
						}
					}
							return false;
				}
			}
			function delete_product_from_temp_cart_for_display($del_id)
			{
				if($stmt_select = $this->con->prepare("Delete from `temp_cart` where `product_id`=? LIMIT 1"))
				{
					$stmt_select->bind_param("s",$del_id);
				
					if($stmt_select->execute())
					{					
							return true;
					}
						return false;
				}
			}
			
			function delete_item_permanent($del_id)
			{
				if($stmt_select = $this->con->prepare("Delete from `temp_cart` where `id`=? LIMIT 1"))
				{
					$stmt_select->bind_param("i",$del_id);
				
					if($stmt_select->execute())
					{					
							return true;
					}
						return false;
				}
			}
			
			function minus_item_quantity($del_id)
			{
				if($stmt_select = $this->con->prepare("Update `temp_cart` Set `qty`=`qty`-1 where `id`=? LIMIT 1"))
				{
					$stmt_select->bind_param("i",$del_id);
				
					if($stmt_select->execute())
					{					
							return true;
					}
						return false;
				}
			}
			
			
			function delete_user_info($del_id)
			{
				if($stmt_select = $this->con->prepare("Delete from `users` where `id`=?"))
				{
					$stmt_select->bind_param("i",$del_id);
				
					if($stmt_select->execute())
					{					
							return true;
					}
						return false;
				}
			}
			function fetch_user_checkout_details_for_admin_side($id)
			{	
				if($stmt_insert = $this->con->prepare("SELECT `id`,`full_name`, `address`, `contact_no`, `email`, `total_amount` FROM `user_checkout_details` Where `id` = ?"))
				{	
					$stmt_insert->bind_param("i",$id);
					
					$stmt_insert->bind_result($id,$full_name,$address,$contact_no,$email,$total_amount);
					
					if($stmt_insert->execute())
					{
							$counter	=	0;
							$details	=	array();
						while($stmt_insert->fetch())
						{
							$details[$counter][0]	=	$id;
							$details[$counter][1]	=	$full_name;
							$details[$counter][2]	=	$address;
							$details[$counter][3]	=	$contact_no;
							$details[$counter][4]	=	$email;
							$details[$counter][5]	=	$total_amount;
												
							$counter++;
						}
						if(!empty($details))	
						{
							return $details;
						}
						return false;
					}	
				}
			}
			function fetch_sum_of_selling_price($transaction_id)
			{
				if($stmt_select = $this->con->prepare("Select SUM(`price`) from `checkout_list` where `transaction_id` = ? "))
				{	
					$stmt_select->bind_param("s",$transaction_id);
				
					$stmt_select->bind_result($result_password);
				
					if($stmt_select->execute())
					{
						if($stmt_select->fetch())
						{
							return $result_password;
						}
					}
							return false;
				}
			}
			
			function get_all_subcategory_data($category)
			{
				if($stmt_insert = $this->con->prepare("SELECT `sub_category` FROM `sub_category` where `main_category` = ?"))
				{
					$stmt_insert->bind_param("s",$category);
					
					$stmt_insert->bind_result($sub_category);
					
					if($stmt_insert->execute())
					{
							$counter	=	0;
							$details	=	array();
						while($stmt_insert->fetch())
						{
							$details[$counter]	=	$sub_category;
							
							$counter++;
						}
						if(!empty($details))	
						{
							return $details;
						}
						return false;
					}	
				}
			}
			
			function get_user_designation($email)
			{
				if($stmt_insert = $this->con->prepare("SELECT `id`,`emp_id`, `name`,`email`, `contact`, `address`, `designation`, `user_id`, `password` FROM `application_users` Where `user_id`=? "))
				{	
					$stmt_insert->bind_param("s",$email);
					
					$stmt_insert->bind_result($id,$emp_id,$emp_name,$email,$contact,$address,$designation,$user_id,$password);
					
					if($stmt_insert->execute())
					{
							$counter	=	0;
							$details	=	array();
						while($stmt_insert->fetch())
						{
							$details[$counter][0]	=	$id;
							$details[$counter][1]	=	$emp_id;
							$details[$counter][2]	=	$emp_name;
							$details[$counter][3]	=	$email;
							$details[$counter][4]	=	$contact;
							$details[$counter][5]	=	$address;
							$details[$counter][6]	=	$designation;
							$details[$counter][7]	=	$user_id;
							$details[$counter][8]	=	$password;
							
							$counter++;
						}
						if(!empty($details))	
						{
							return $details;
						}
						return false;
					}	
				}
			}
			
			function get_seller_info_from_email($email)
			{	
				if($stmt_insert = $this->con->prepare("SELECT `id`,`shop_name`, `owner_name`, `address`, `contact_no`, `licence_no`, `seller_email`, `password`, `confirm_password`,`gender`, `dob`, `status` FROM `seller` Where `seller_email` = ?"))
				{
					$stmt_insert->bind_param("s",$email);
					
					$stmt_insert->bind_result($id,$shop_name,$owner_name,$address,$contact_no,$licence_no,$seller_email,$password,$confirm_password,$gender,$dob,$status);
					
					if($stmt_insert->execute())
					{
							$counter	=	0;
							$details	=	array();
						while($stmt_insert->fetch())
						{
							$details[$counter][0]	=	$id;
							$details[$counter][1]	=	$shop_name;
							$details[$counter][2]	=	$owner_name;
							$details[$counter][3]	=	$address;
							$details[$counter][4]	=	$contact_no;
							$details[$counter][5]	=	$licence_no;
							$details[$counter][6]	=	$seller_email;
							$details[$counter][7]	=	$password;
							$details[$counter][8]	=	$confirm_password;
							$details[$counter][9]	=	$gender;
							$details[$counter][10]	=	$dob;
							$details[$counter][11]	=	$status;						
							$counter++;
						}
						if(!empty($details))	
						{
							return $details;
						}
						return false;
					}	
				}
			}
			
			
			function add_enquiry_data($f_name,$contact)
			{							
				$date = date("Y-m-d");
				$time = date("H-i-s A");
				if($stmt_insert = $this->con->prepare("INSERT INTO `emergency_contact`
				(`title`,`contact_no`, `date`, `time`) VALUES (?,?,?,?)"))
				{
					$stmt_insert->bind_param("ssss",$f_name,$contact,$date,$time);
					
					if($stmt_insert->execute())
					{
						return true;
					}
						return false;
				} 	
			}
			function get_all_enquiry_data()
			{	
				if($stmt_insert = $this->con->prepare("SELECT `id`,
				`title`, `contact_no` FROM `emergency_contact` ORDER BY `id` DESC"))
				{	
					$stmt_insert->bind_result($id,$title,$contact_no);
					
					if($stmt_insert->execute())
					{
							$counter	=	0;
							$details	=	array();
						while($stmt_insert->fetch())
						{
							$details[$counter][0]	=	$id;
							$details[$counter][1]	=	$title;
							$details[$counter][2]	=	$contact_no;
							
							$counter++;
						}
						if(!empty($details))	
						{
							return $details;
						}
						return false;
					}	
				}
			}
			function delete_enquiry_images($del_id)
			{
				if($stmt_select = $this->con->prepare("Delete from `emergency_contact` where `id`=?"))
				{
					$stmt_select->bind_param("i",$del_id);
				
					if($stmt_select->execute())
					{					
							return true;
					}
					return false;
				}
			}
			
			function update_website_contact_details($address,$phone,$email)
			{
			    if($stmt_select = $this->con->prepare("update `Contact Settings` set `address`=?,`phone` = ?,`email_id` = ?"))
				{
				    $stmt_select->bind_param("sss",$address,$phone,$email);
				    
					if($stmt_select->execute())
					{					
						return true;
					}
					return false;
				}    
			}
			
			function get_all_contact_details()
			{
			    if($stmt_select = $this->con->prepare("SELECT `address`, `phone`, `email_id` FROM `contact settings`"))
				{
				    $stmt_select->bind_result($address,$phone,$email_id);
				    
					if($stmt_select->execute())
					{		
					    $data    =   array();
						if($stmt_select->fetch())
						{
						    $data[0]    =   $address;
						    $data[1]    =   $phone;
						    $data[2]    =   $email_id;
						    
						    return $data;
						}
					}
					return false;
				}
			}
			
			function update_social_media($facebook)
			{	
				if($stmt_insert = $this->con->prepare("UPDATE `social_media` set `link` = ? Where `name` = 'facebook' "))
				{
					$stmt_insert->bind_param("s",$facebook);
					
					if($stmt_insert->execute())
					{
						return true;
					}
						return false;
				} 	
			}
			function update_social_media1($twitter)
			{	
				if($stmt_insert = $this->con->prepare("UPDATE `social_media` set `link` = ? Where `name` = 'twitter' "))
				{
					$stmt_insert->bind_param("s",$twitter);
					
					if($stmt_insert->execute())
					{
						return true;
					}
						return false;
				} 	
			}
			function update_social_media2($facebook)
			{	
				if($stmt_insert = $this->con->prepare("UPDATE `social_media` set `link` = ? Where `name` = 'linked in' "))
				{
					$stmt_insert->bind_param("s",$facebook);
					
					if($stmt_insert->execute())
					{
						return true;
					}
						return false;
				} 	
			}
			function update_social_media3($twitter)
			{	
				if($stmt_insert = $this->con->prepare("UPDATE `social_media` set `link` = ? Where `name` = 'google+' "))
				{
					$stmt_insert->bind_param("s",$twitter);
					
					if($stmt_insert->execute())
					{
						return true;
					}
						return false;
				} 	
			}
			function update_social_media4($twitter)
			{	
				if($stmt_insert = $this->con->prepare("UPDATE `social_media` set `link` = ? Where `name` = 'you tube' "))
				{
					$stmt_insert->bind_param("s",$twitter);
					
					if($stmt_insert->execute())
					{
						return true;
					}
						return false;
				} 	
			}
			function update_social_media5($telegram)
			{	
				if($stmt_insert = $this->con->prepare("UPDATE `social_media` set `link` = ? Where `name` = 'telegram' "))
				{
					$stmt_insert->bind_param("s",$telegram);
					
					if($stmt_insert->execute())
					{
						return true;
					}
						return false;
				} 	
			}
			
			function get_facebook_link()
			{
				if($stmt_select = $this->con->prepare("Select `link` from `social_media` where `name` = 'facebook' "))
				{	
					$stmt_select->bind_result($result_link);
				
					if($stmt_select->execute())
					{
						if($stmt_select->fetch())
						{
							return $result_link;
						}
					}
							return false;
				}
			}
			function get_twitter_link()
			{
				if($stmt_select = $this->con->prepare("Select `link` from `social_media` where `name` = 'twitter' "))
				{	
					$stmt_select->bind_result($result_link);
				
					if($stmt_select->execute())
					{
						if($stmt_select->fetch())
						{
							return $result_link;
						}
					}
							return false;
				}
			}
			function get_linked_link()
			{
				if($stmt_select = $this->con->prepare("Select `link` from `social_media` where `name` = 'linked in' "))
				{	
					$stmt_select->bind_result($result_link);
				
					if($stmt_select->execute())
					{
						if($stmt_select->fetch())
						{
							return $result_link;
						}
					}
							return false;
				}
			}
			function get_google_link()
			{
				if($stmt_select = $this->con->prepare("Select `link` from `social_media` where `name` = 'google+' "))
				{	
					$stmt_select->bind_result($result_link);
				
					if($stmt_select->execute())
					{
						if($stmt_select->fetch())
						{
							return $result_link;
						}
					}
							return false;
				}
			}
			function get_youtube_link()
			{
				if($stmt_select = $this->con->prepare("Select `link` from `social_media` where `name` = 'you tube' "))
				{	
					$stmt_select->bind_result($result_link);
				
					if($stmt_select->execute())
					{
						if($stmt_select->fetch())
						{
							return $result_link;
						}
					}
							return false;
				}
			}
			function get_telegram_link()
			{
				if($stmt_select = $this->con->prepare("Select `link` from `social_media` where `name` = 'telegram' "))
				{	
					$stmt_select->bind_result($result_link);
				
					if($stmt_select->execute())
					{
						if($stmt_select->fetch())
						{
							return $result_link;
						}
					}
							return false;
				}
			}
		//
		function fetch_invoice_report_by_category_details_all($from_date,$to_date)
			{	
				$from_date = date("Y-m-d" , strtotime($from_date));
				$to_date = date("Y-m-d" , strtotime($to_date));
				if($stmt_insert = $this->con->prepare("SELECT `id`,`full_name`, `address`, `contact_no`, `email`, `total_amount` FROM `user_checkout_details` Where `date` BETWEEN '$from_date' AND '$to_date' AND `status`='Pending' "))
				{	
					
					
					$stmt_insert->bind_result($id,$full_name,$address,$contact_no,$email,$total_amount);
					
					if($stmt_insert->execute())
					{
							$counter	=	0;
							$details	=	array();
						while($stmt_insert->fetch())
						{
							$details[$counter][0]	=	$id;
							$details[$counter][1]	=	$full_name;
							$details[$counter][2]	=	$address;
							$details[$counter][3]	=	$contact_no;
							$details[$counter][4]	=	$email;
							$details[$counter][5]	=	$total_amount;
												
							$counter++;
						}
						if(!empty($details))	
						{
							return $details;
						}
						return false;
					}	
				}
			}	
			function dispatch_product($d_id)
			{
				if($stmt_insert = $this->con->prepare("UPDATE `user_checkout_details` SET `status`='Dispatch' WHERE `id`=? "))
				{
					$stmt_insert->bind_param("i",$d_id);
					
					if($stmt_insert->execute())
					{
						return true;
					}
						return false;
				} 	
			}
			function pending_product($d_id)
			{
				if($stmt_insert = $this->con->prepare("UPDATE `user_checkout_details` SET `status`='Pending' WHERE `id`=? "))
				{
					$stmt_insert->bind_param("i",$d_id);
					
					if($stmt_insert->execute())
					{
						return true;
					}
						return false;
				} 		
			}
			function fetch_all_dispatch_product_info_by_t_id($t_id)
			{	
				
				if($stmt_insert = $this->con->prepare("SELECT `id`,`transaction_id`, `seller_name`, `product_id`, `qty`, `price`, `status` FROM `checkout_list` Where `transaction_id` = '".$t_id."' "))
				{		
					$stmt_insert->bind_result($id,$transaction_id,$seller_name,$product_id,$qty,$price,$status);
					
					if($stmt_insert->execute())
					{
							$counter	=	0;
							$details	=	array();
						while($stmt_insert->fetch())
						{
							$details[$counter][0]	=	$id;
							$details[$counter][1]	=	$transaction_id;
							$details[$counter][2]	=	$seller_name;
							$details[$counter][3]	=	$product_id;
							$details[$counter][4]	=	$qty;
							$details[$counter][5]	=	$price;
							$details[$counter][6]	=	$status;
												
							$counter++;
						}
						if(!empty($details))	
						{
							return $details;
						}
						return false;
					}	
				}
			}
			function fetch_invoice_report_by_category_details_by_status($from_date,$to_date,$status)
			{	
				$from_date = date("Y-m-d" , strtotime($from_date));
				$to_date = date("Y-m-d" , strtotime($to_date));
				if($stmt_insert = $this->con->prepare("SELECT `id`,`full_name`, `address`, `contact_no`, `email`, `total_amount` FROM `user_checkout_details` Where `date` BETWEEN '$from_date' AND '$to_date' AND `status`='".$status."' "))
				{	
					
					
					$stmt_insert->bind_result($id,$full_name,$address,$contact_no,$email,$total_amount);
					
					if($stmt_insert->execute())
					{
							$counter	=	0;
							$details	=	array();
						while($stmt_insert->fetch())
						{
							$details[$counter][0]	=	$id;
							$details[$counter][1]	=	$full_name;
							$details[$counter][2]	=	$address;
							$details[$counter][3]	=	$contact_no;
							$details[$counter][4]	=	$email;
							$details[$counter][5]	=	$total_amount;
												
							$counter++;
						}
						if(!empty($details))	
						{
							return $details;
						}
						return false;
					}	
				}
			}
			
			//22-1-2021
    function set_contact_data($name,$email_id,$contact_no,$message)
    {
    	$date	=	date("Y-m-d");
    	$time	=	date("H:i:s");
    	if($stmt_set_contact_data = $this->con->prepare("insert into `contact_tbl`(`name`,`email_id`,`contact_no`,`message` ,`date`,`time`) Values(?,?,?,?,?,?)"))
    	{
    		$stmt_set_contact_data->bind_param("ssssss",$name,$email_id,$contact_no,$message,$date,$time);
    		
    		if($stmt_set_contact_data->execute())
    		{
    			return true;
    		}
    		return false;
    	}
    }
    function get_contact_details_all($from_date,$to_date)
    	{	
    	$from_date = date("Y-m-d" , strtotime($from_date));
    	$to_date = date("Y-m-d" , strtotime($to_date));
    	if($stmt_insert = $this->con->prepare("SELECT `id`, `name`, `email_id`, `contact_no`, `message`, `date`, `time` FROM `contact_tbl`  WHERE `date`  BETWEEN '$from_date' AND '$to_date' "))
    	{	
    		
    		
    		$stmt_insert->bind_result($id,$full_name,$email,$contact_no,$message,$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]	=	$email;
    				$details[$counter][3]	=	$contact_no;
    				$details[$counter][4]	=	$message;
    				$details[$counter][5]	=	$date;
    				$details[$counter][6]	=	$time;					
    				$counter++;
    			}
    			if(!empty($details))	
    			{
    				return $details;
    			}
    			return false;
    		}	
    	}
    	}
    
    	function delete_user_contact_record($del_id)
    	{
    		if($stmt_select = $this->con->prepare("Delete from `contact_tbl` where `id`=?"))
    		{
    			$stmt_select->bind_param("i",$del_id);
    		
    			if($stmt_select->execute())
    			{					
    					return true;
    			}
    				return false;
    		}
    	}
    	function add_feedback($name,$description,$feedback)
    	{	
    		$date = date("Y-m-d");
    		$time = date("H-i-s A");
    		if($stmt_insert = $this->con->prepare("INSERT INTO `feedback_tbl`( `name`, `description`, `feedback`, `date`, `time`) VALUES  (?,?,?,?,?)"))
    		{
    			$stmt_insert->bind_param("sssss",$name,$description,$feedback,$date,$time);
    			
    			if($stmt_insert->execute())
    			{
    				return true;
    			}
    				return false;
    		} 	
    	}
    	function get_all_feedback()
    	{	
    		if($stmt_insert = $this->con->prepare("SELECT `id`, `name`, `description`, `feedback`, `date`, `time` FROM `feedback_tbl`"))
    		{	
    			$stmt_insert->bind_result($id,$name,$description,$feedback,$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]	=	$description;
    					$details[$counter][3]	=	$feedback;
    					$details[$counter][4]	=	$date;
    					$details[$counter][5]	=	$time;
    					$counter++;
    				}
    				if(!empty($details))	
    				{
    					return $details;
    				}
    				return false;
    			}	
    		}
    	}
    	function delete_feedback($del_id)
    	{
    		if($stmt_select = $this->con->prepare("Delete from `feedback_tbl` where `id`=?"))
    		{
    			$stmt_select->bind_param("i",$del_id);
    		
    			if($stmt_select->execute())
    			{					
    					return true;
    			}
    				return false;
    		}
    	}
    	function get_all_feedback_details_by_id($up_id)
    	{	
    		if($stmt_insert = $this->con->prepare("SELECT `id`, `name`, `description`, `feedback` FROM `feedback_tbl` WHERE `id`=?"))
    		{	
    			$stmt_insert->bind_param("i",$up_id);
    			
    			$stmt_insert->bind_result($id,$name,$description,$feedback);
    			
    			if($stmt_insert->execute())
    			{
    					$counter	=	0;
    					$details	=	array();
    				while($stmt_insert->fetch())
    				{
    					$details[$counter][0]	=	$id;
    					$details[$counter][1]	=	$name;
    					$details[$counter][2]	=	$description;
    					$details[$counter][3]	=	$feedback;
    					$counter++;
    				}
    				if(!empty($details))	
    				{
    					return $details;
    				}
    				return false;
    			}	
    		}
    	}
    	function update_feedback($name,$description,$feedback,$up_id)
    	{	
    		$date = date("Y-m-d");
    		$time = date("H-i-s A");
    		if($stmt_insert = $this->con->prepare("UPDATE `feedback_tbl` SET `name`=? ,`description`=? ,`feedback`=? WHERE `id`=?"))
    		{
    			$stmt_insert->bind_param("sssi",$name,$description,$feedback,$up_id);
    			
    			if($stmt_insert->execute())
    			{
    				return true;
    			}
    				return false;
    		} 	
    	}
    	//23-1-2020
	function delete_order_product_info_from_user_checklist($del_id)
	{
		if($stmt_select = $this->con->prepare("Delete from `user_checkout_details` where `id`=?"))
		{
			$stmt_select->bind_param("i",$del_id);
		
			if($stmt_select->execute())
			{					
					return true;
			}
				return false;
		}
	}
	function delete_order_product_info_from_checklist($del_id)
	{
		if($stmt_select = $this->con->prepare("Delete from `checkout_list` where `transaction_id`=?"))
		{
			$stmt_select->bind_param("s",$del_id);
		
			if($stmt_select->execute())
			{					
					return true;
			}
				return false;
		}
	}
	//28-1-2020 NEW FUNCTIONS
	function add_what_new_images($advertise_picture)
	{	
		$date = date("Y-m-d");
		$time = date("H-i-s A");
		if($stmt_insert = $this->con->prepare("INSERT INTO `whats_new`(`images`,`date`,`time`) VALUES (?,?,?)"))
		{
			$stmt_insert->bind_param("sss",$advertise_picture,$date,$time);
			
			if($stmt_insert->execute())
			{
				return true;
			}
				return false;
		} 	
	}
	function get_all_what_new_images()
	{	
		if($stmt_insert = $this->con->prepare("SELECT `id`,`images` FROM `whats_new`"))
		{	
			$stmt_insert->bind_result($id,$images);
			
			if($stmt_insert->execute())
			{
					$counter	=	0;
					$details	=	array();
				while($stmt_insert->fetch())
				{
					$details[$counter][0]	=	$id;
					$details[$counter][1]	=	$images;
					
					
					$counter++;
				}
				if(!empty($details))	
				{
					return $details;
				}
				return false;
			}	
		}
	}
	function delete_what_new_images($del_id)
	{
		if($stmt_select = $this->con->prepare("Delete from `whats_new` where `id`=?"))
		{
			$stmt_select->bind_param("i",$del_id);
		
			if($stmt_select->execute())
			{					
					return true;
			}
				return false;
		}
	}
	
	function add_certified_images($links,$advertise_picture)
	{	
		$date = date("Y-m-d");
		$time = date("H-i-s A");
		if($stmt_insert = $this->con->prepare("INSERT INTO `certified`(`images`, `links` , `date`,`time`) VALUES (?,?,?,?)"))
		{
			$stmt_insert->bind_param("ssss",$links,$advertise_picture,$date,$time);
			
			if($stmt_insert->execute())
			{
				return true;
			}
				return false;
		} 	
	}
	function get_all_certified_images()
	{	
		if($stmt_insert = $this->con->prepare("SELECT `id`,`images`, `links` FROM `certified`"))
		{	
			$stmt_insert->bind_result($id,$images,$links);
			
			if($stmt_insert->execute())
			{
					$counter	=	0;
					$details	=	array();
				while($stmt_insert->fetch())
				{
					$details[$counter][0]	=	$id;
					$details[$counter][1]	=	$images;
					$details[$counter][2]	=	$links;
					
					$counter++;
				}
				if(!empty($details))	
				{
					return $details;
				}
				return false;
			}	
		}
	}
	function delete_certified_info($del_id)
	{
		if($stmt_select = $this->con->prepare("Delete from `certified` where `id`=?"))
		{
			$stmt_select->bind_param("i",$del_id);
		
			if($stmt_select->execute())
			{					
					return true;
			}
				return false;
		}
	}
	function update_youtube_video($video_link,$video_message)
	{
		if($stmt_select = $this->con->prepare("update `youtube_video` set `link`=? ,`message` = ?"))
		{
			$stmt_select->bind_param("ss",$video_link,$video_message);
			
			if($stmt_select->execute())
			{					
				return true;
			}
			return false;
		}    
	}
	
	function get_all_youtube_video()
	{
		if($stmt_select = $this->con->prepare("SELECT `link`, `message` FROM `youtube_video`"))
		{
			$stmt_select->bind_result($link,$message);
			
			if($stmt_select->execute())
			{		
				$data    =   array();
				if($stmt_select->fetch())
				{
					$data[0]    =   $link;
					$data[1]    =   $message;
					
					
					return $data;
				}
			}
			return false;
		}
	}

	function insert_user_registrtion($u_name,$email,$gender,$dob,$mobile_no,$pasword)
		{
			$date = date("Y-m-d");
			$time = date("H-i-s A");
			
			if($stmt_insert = $this->con->prepare("INSERT INTO `user_registration`(`u_name`, `email`, `gender`, `dob`, `mobile_no`, `pasword`, `date`, `time`) VALUES (?,?,?,?,?,?,?,?)"))
			{
				$stmt_insert->bind_param("ssssssss",$u_name,$email,$gender,$dob,$mobile_no,$pasword,$date,$time);
				
				if($stmt_insert->execute())
				{
					return true;
				}
					return false;
			} 	
		}


		function get_all_registered_users($u_name,$email,$gender,$dob,$mobile_no,$pasword)
			{	
				
				if($stmt_insert = $this->con->prepare("SELECT `id`, `u_name`, `email`, `gender`, `dob`, `mobile_no`, `pasword`, `date`, `time` FROM `user_registration` "))
				{	
					$stmt_insert->bind_result($id,$u_name,$email,$gender,$dob,$mobile_no,$pasword,$date,$time);
					
					if($stmt_insert->execute())
					{
							$counter	=	0;
							$details	=	array();
						while($stmt_insert->fetch())
						{
							$details[$counter][0]	=	$id;
							$details[$counter][1]	=	$u_name;
							$details[$counter][2]	=	$email;
							$details[$counter][3]	=	$gender;
							$details[$counter][4]	=	$dob;
							$details[$counter][5]	=	$mobile_no;
							$details[$counter][6]	=	$pasword;
							$details[$counter][7]	=	$date;
							$details[$counter][8]	=	$time;
												
							$counter++;
						}
						if(!empty($details))	
						{
							return $details;
						}
						return false;
					}	
				}
			}


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



			function user_login($email,$password)
		{
			$date = date("Y-m-d");
			$time = date("H-i-s A");
			
			if($stmt_insert = $this->con->prepare("INSERT INTO `login_users`(`email`, `password`, `date`, `time`) VALUES (?,?,?,?)"))
			{
				$stmt_insert->bind_param("ssss",$email,$password,$date,$time);
				
				if($stmt_insert->execute())
				{
					return true;
				}
					return false;
			} 	
		}


		function get_user_password($email)
        {
			if ($stmt = $this->con->prepare("SELECT `pasword` from `user_registration` where `email`=? "))
			{
				$stmt->bind_param("s",$email); 

                $stmt->bind_result($password);
				if ($stmt->execute()) 
				{
					if ($stmt->fetch()) 
					{
						return $password;
					}
					else
					{
						return false;
					}
				}
			}
         }

		 function get_password_user_mail($email)
		 {
			 if($stmt_select = $this->con->prepare("Select `pasword` from `user_registration` where `email` = ? "))
			 {	
				 $stmt_select->bind_param("s",$email);
			 
				 $stmt_select->bind_result($result_password);
			 
				 if($stmt_select->execute())
				 {
					 if($stmt_select->fetch())
					 {
						 return $result_password;
					 }
				 }
						 return false;
			 }
		 }



		 function change_password($email,$newpassword)
			{ 
				$date = date("Y-m-d");
				$time = date("H:i:s A");
			echo 11111;
				if($stmt_select = $this->con->prepare("UPDATE `user_registration` SET `pasword`=? WHERE `email`=?"))
				{
					echo 222222;
					$stmt_select->bind_param("ss",$newpassword,$email);				
				
					if($stmt_select->execute())
					{			
							echo 3333;	
						return true;
					}
						return false;
				}
			}


			function order_history($emails)
			{	
				
				if($stmt_insert = $this->con->prepare("SELECT `id`,`full_name`, `address`, `contact_no`, `email`, `total_amount`, `status` FROM `user_checkout_details` Where `email`=?"))
				{	
					$stmt_insert->bind_param("s",$emails);
					
					$stmt_insert->bind_result($id,$full_name,$address,$contact_no,$email,$total_amount,$status);
					
					if($stmt_insert->execute())
					{
							$counter	=	0;
							$details	=	array();
						while($stmt_insert->fetch())
						{
							$details[$counter][0]	=	$id;
							$details[$counter][1]	=	$full_name;
							$details[$counter][2]	=	$address;
							$details[$counter][3]	=	$contact_no;
							$details[$counter][4]	=	$email;
							$details[$counter][5]	=	$total_amount;
							$details[$counter][8]	=	$status;
												
							$counter++;
						}
						if(!empty($details))	
						{
							return $details;
						}
						return false;
					}	
				}
			}

}//end
?>

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