Şuanki Dizin: /home/wwwdreamtechnolo/public_html/b2bflight.com/B2BFlight/project/dashboard/lib/ |
Şuanki Dosya : /home/wwwdreamtechnolo/public_html/b2bflight.com/B2BFlight/project/dashboard/lib/functions1.php |
<?php session_start(); date_default_timezone_set('Asia/Kolkata'); $logo = "aone.png"; $project_name = "A-One Tailors"; class class_functions { private $con; function __construct() { $this->con = new mysqli("localhost","bravemy8_aone_admin","M}6e(ZMQOl*c","bravemy8_aone_taiolrs"); //$this->con = new mysqli("localhost","root","","aone_tailors"); } function get_password_from_user_empcode($emp_code) { if($stmt_select = $this->con->prepare("Select `password` from `software_users` where `employee_code` = ? ")) { $stmt_select->bind_param("s",$emp_code); $stmt_select->bind_result($result_password); if($stmt_select->execute()) { if($stmt_select->fetch()) { return $result_password; } } return false; } } function get_group_name_exist_id($group_name) { if($stmt_select = $this->con->prepare("Select `id` from `groups` where `group_name` = ? ")) { $stmt_select->bind_param("s",$group_name); $stmt_select->bind_result($result_id); if($stmt_select->execute()) { if($stmt_select->fetch()) { return $result_id; } } return false; } } function get_expenses_name_exist_id($expenses_name) { if($stmt_select = $this->con->prepare("Select `id` FROM `expenses_category` where `expenses_name` = ? ")) { $stmt_select->bind_param("s",$expenses_name); $stmt_select->bind_result($result_id); if($stmt_select->execute()) { if($stmt_select->fetch()) { return $result_id; } } return false; } } function get_group_name_from_id($group_name) { if($stmt_select = $this->con->prepare("Select `group_name` from `groups` where `id` = ? ")) { $stmt_select->bind_param("i",$group_name); $stmt_select->bind_result($result_id); if($stmt_select->execute()) { if($stmt_select->fetch()) { return $result_id; } } return false; } } function get_expenses_name_from_id($expenses_name) { if($stmt_select = $this->con->prepare("Select `expenses_name` from `expenses_category` where `id` = ? ")) { $stmt_select->bind_param("i",$expenses_name); $stmt_select->bind_result($result_id); if($stmt_select->execute()) { if($stmt_select->fetch()) { return $result_id; } } return false; } } function get_test_name_from_id($edit_id) { if($stmt_select = $this->con->prepare("SELECT `test_name` FROM `test_master` WHERE `id` = ? ")) { $stmt_select->bind_param("i",$edit_id); $stmt_select->bind_result($result_id); if($stmt_select->execute()) { if($stmt_select->fetch()) { return $result_id; } } return false; } } function get_sample_group_type_from_id($edit_id) { if($stmt_select = $this->con->prepare("Select `group_name`,`sample_type_name` from `sample_types` where `id` = ?")) { $stmt_select->bind_param("i",$edit_id); $stmt_select->bind_result($group_name,$sample_type_name); if($stmt_select->execute()) { $data = array(); if($stmt_select->fetch()) { $data[0] = $group_name; $data[1] = $sample_type_name; return $data; } } return false; } } function get_expenses_type_from_id($edit_id) { if($stmt_select = $this->con->prepare("SELECT `expenses`, `titel`, `expenses_date`, `expenses_amount`, `description`, `date`, `time` FROM `expenses` WHERE `id` = ?")) { $stmt_select->bind_param("i",$edit_id); $stmt_select->bind_result($expenses,$titel,$expenses_date,$expenses_amount,$description,$date,$time); if($stmt_select->execute()) { $data = array(); if($stmt_select->fetch()) { $data[0] = $expenses; $data[1] = $titel; $data[2] = $expenses_date; $data[3] = $expenses_amount; $data[4] = $description; return $data; } } return false; } } function get_standard_title_type_from_id($edit_id) { if($stmt_select = $this->con->prepare("Select `standard_name`,`standard_title` from `standard_master` where `id` = ?")) { $stmt_select->bind_param("i",$edit_id); $stmt_select->bind_result($test_name,$standard_title); if($stmt_select->execute()) { $data = array(); if($stmt_select->fetch()) { $data[0] = $test_name; $data[1] = $standard_title; return $data; } } return false; } } function get_emp_code_exist($emp_code) { if($stmt_select = $this->con->prepare("Select `id` from `software_users` where `employee_code` = ? ")) { $stmt_select->bind_param("s",$emp_code); $stmt_select->bind_result($result_id); if($stmt_select->execute()) { if($stmt_select->fetch()) { return $result_id; } } return false; } } function get_emp_code_exist_from_mobile_no($mobile_no) { if($stmt_select = $this->con->prepare("Select `id` from `customer` where `mobile_no` = ? ")) { $stmt_select->bind_param("s",$mobile_no); $stmt_select->bind_result($result_id); if($stmt_select->execute()) { if($stmt_select->fetch()) { return $result_id; } } return false; } } function get_emp_code_exist_from_worker($mobile_no) { if($stmt_select = $this->con->prepare("Select `id` from `worker` where `mobile_no` = ? ")) { $stmt_select->bind_param("s",$mobile_no); $stmt_select->bind_result($result_id); if($stmt_select->execute()) { if($stmt_select->fetch()) { return $result_id; } } return false; } } function get_emp_code_exist_from_agent($mobile_no) { if($stmt_select = $this->con->prepare("Select `id` from `agent` where `mobile_no` = ? ")) { $stmt_select->bind_param("s",$mobile_no); $stmt_select->bind_result($result_id); if($stmt_select->execute()) { if($stmt_select->fetch()) { return $result_id; } } return false; } } function get_client_exist($client_name,$mobile_no) { if($stmt_select = $this->con->prepare("Select `id` from `clients` where `client_name` = ? AND `mobile_no` = ?")) { $stmt_select->bind_param("ss",$client_name,$mobile_no); $stmt_select->bind_result($result_id); if($stmt_select->execute()) { if($stmt_select->fetch()) { return $result_id; } } return false; } } function get_group_and_sample_name_exist_id($group_name,$sample_title) { if($stmt_select = $this->con->prepare("Select `id` from `sample_types` where `group_name` = ? AND `sample_type_name`=?")) { $stmt_select->bind_param("ss",$group_name,$sample_title); $stmt_select->bind_result($result_id); if($stmt_select->execute()) { if($stmt_select->fetch()) { return $result_id; } } return false; } } function get_add_expenses_exist_id($expenses_category,$tite,$expenses_date,$expenses_amount,$description) { if($stmt_select = $this->con->prepare("Select `id` FROM `expenses` where `expenses_category` = ? ,`titel`=? , `expenses_date`=?, `expenses_amount`=?, `description`=?")) { $stmt_select->bind_param("sssss",$expenses_category,$tite,$expenses_date,$expenses_amount,$description); $stmt_select->bind_result($result_id); if($stmt_select->execute()) { if($stmt_select->fetch()) { return $result_id; } } return false; } } function get_standard_and_standard_name_exist_id($standard_name,$standard_title) { if($stmt_select = $this->con->prepare("SELECT `id` FROM `standard_master`where `standard_name` = ? AND `standard_title`=?")) { $stmt_select->bind_param("ss",$standard_name,$standard_title); $stmt_select->bind_result($result_id); if($stmt_select->execute()) { if($stmt_select->fetch()) { return $result_id; } } return false; } } function get_payment_schedule_exist_id($customer_id,$net_amount,$payment_schedule_date,$payment_amount) { if($stmt_select = $this->con->prepare("SELECT `id` FROM `payment_schedule` where `customer_id` = ? ,`net_amount`=? ,`payment_schedule_date`=? ,`net_amount`=?")) { $stmt_select->bind_param("ssssss",$customer_id,$net_amount,$payment_schedule_date,$payment_amount); $stmt_select->bind_result($result_id); if($stmt_select->execute()) { if($stmt_select->fetch()) { return $result_id; } } return false; } } function insert_payment_schedule($customer_id,$net_amount,$payment_schedule_date,$payment_amount) { $date = date("Y-m-d"); $time = date("H-i-s A"); if($stmt_insert = $this->con->prepare("INSERT INTO `payment_schedule`(`customer_id`, `net_amount`, `payment_schedule_date`, `payment_amount`, `date`, `time`) VALUES (?,?,?,?,?,?)")) { $stmt_insert->bind_param("ssssss",$customer_id,$net_amount,$payment_schedule_date,$payment_amount,$date,$time); if($stmt_insert->execute()) { return true; } return false; } } function insert_new_standard_name($standard_name,$standard_title) { $date = date("Y-m-d"); $time = date("H-i-s A"); if($stmt_insert = $this->con->prepare("INSERT INTO `standard_master`(`standard_name`, `standard_title`, `date`, `time`) VALUES (?,?,?,?)")) { $stmt_insert->bind_param("ssss",$standard_name,$standard_title,$date,$time); if($stmt_insert->execute()) { return true; } return false; } } function delete_standard_master_name($del_id) { if($stmt_select = $this->con->prepare("DELETE FROM `standard_master` WHERE `id`=?")) { $stmt_select->bind_param("i",$del_id); if($stmt_select->execute()) { return true; } return false; } } function delete_payment_schedule($del_id) { if($stmt_select = $this->con->prepare("DELETE FROM `payment_schedule` WHERE`id`=?")) { $stmt_select->bind_param("i",$del_id); if($stmt_select->execute()) { return true; } return false; } } function get_title_name_from_id($group_id) { if($stmt_select = $this->con->prepare("Select `group_name` from `groups` where `id` = ?")) { $stmt_select->bind_param("i",$group_id); $stmt_select->bind_result($result_name); if($stmt_select->execute()) { if($stmt_select->fetch()) { return $result_name; } } return false; } } function get_standar_master_from_id($group_id) { if($stmt_select = $this->con->prepare("Select `group_name` from `groups` where `id` = ?")) { $stmt_select->bind_param("i",$group_id); $stmt_select->bind_result($result_name); if($stmt_select->execute()) { if($stmt_select->fetch()) { return $result_name; } } return false; } } function get_payment_schedule_from_id($customer_id) { if($stmt_select = $this->con->prepare("SELECT `id`, `customer_id`, `net_amount`, `payment_schedule_date`, `payment_amount`, `date`, `time` FROM `payment_schedule` `id` = ?")) { $stmt_select->bind_param($customer_id); $stmt_select->bind_result($result_name); if($stmt_select->execute()) { if($stmt_select->fetch()) { return $result_name; } } return false; } } function insert_new_group_name($group_name) { $date = date("Y-m-d"); $time = date("H-i-s A"); if($stmt_insert = $this->con->prepare("INSERT INTO `groups`(`group_name`, `date`, `time`) VALUES (?,?,?)")) { $stmt_insert->bind_param("sss",$group_name,$date,$time); if($stmt_insert->execute()) { return true; } return false; } } function insert_new_expenses_name($expenses_name) { $date = date("Y-m-d"); $time = date("H-i-s A"); if($stmt_insert = $this->con->prepare("INSERT INTO `expenses_category`( `expenses_name`, `date`, `time`) VALUES (?,?,?)")) { $stmt_insert->bind_param("sss",$expenses_name,$date,$time); if($stmt_insert->execute()) { return true; } return false; } } function insert_new_test_name($test_name) {echo 11; $date = date("Y-m-d"); $time = date("H-i-s A"); if($stmt_insert = $this->con->prepare("INSERT INTO `test_master`(`test_name`, `date`, `time`) VALUES (?,?,?)")) { echo 22; $stmt_insert->bind_param("sss",$test_name,$date,$time); if($stmt_insert->execute()) { echo 33; return true; } return false; } } function get_test_name_exist_id($test_name) { if($stmt_select = $this->con->prepare("SELECT `id`, `test_name`, `date`, `time` FROM `test_master` = ? ")) { $stmt_select->bind_param("s",$test_name); $stmt_select->bind_result($result_id); if($stmt_select->execute()) { if($stmt_select->fetch()) { return $result_id; } } return false; } } function delete_test_name($del_id) { if($stmt_select = $this->con->prepare("DELETE FROM `test_master` WHERE `id`=?")) { $stmt_select->bind_param("i",$del_id); if($stmt_select->execute()) { return true; } return false; } } function update_group_name($group_name,$edit_id) { $date = date("Y-m-d"); $time = date("H-i-s A"); if($stmt_insert = $this->con->prepare("UPDATE `groups` SET `group_name`=? WHERE `id`=?")) { $stmt_insert->bind_param("si",$group_name,$edit_id); if($stmt_insert->execute()) { return true; } return false; } } function update_expenses_name($expenses_name,$edit_id) { $date = date("Y-m-d"); $time = date("H-i-s A"); if($stmt_insert = $this->con->prepare("UPDATE `expenses_category` SET `expenses_name`=? WHERE `id`=?")) { $stmt_insert->bind_param("si",$expenses_name,$edit_id); if($stmt_insert->execute()) { return true; } return false; } } function update_group_type_name($group_name,$sample_title,$edit_id) { $date = date("Y-m-d"); $time = date("H-i-s A"); if($stmt_insert = $this->con->prepare("UPDATE `sample_types` SET `group_name`=?,`sample_type_name`=?,`date`=?,`time`=? WHERE `id`=?")) { $stmt_insert->bind_param("ssssi",$group_name,$sample_title,$date,$time,$edit_id); if($stmt_insert->execute()) { return true; } return false; } } function update_expenses_type_name($expenses,$titel,$expenses_date,$expenses_amount,$description,$edit_id) { $date = date("Y-m-d"); $time = date("H-i-s A"); if($stmt_insert = $this->con->prepare("UPDATE `expenses` SET `expenses`=?,`titel`=?,`expenses_date`=?,`expenses_amount`=?,`description`=?,`date`=?,`time`=? WHERE `id`=?")) { $stmt_insert->bind_param("sssssssi",$expenses,$titel,$expenses_date,$expenses_amount,$description,$date,$time,$edit_id); if($stmt_insert->execute()) { return true; } return false; } } function update_standard_master_name($standard_name,$standard_title,$edit_id) { $date = date("Y-m-d"); $time = date("H-i-s A"); if($stmt_insert = $this->con->prepare("UPDATE `standard_master` SET `standard_name`=?,`standard_title`=?,`date`=?,`time`=? WHERE `id`=?")) { $stmt_insert->bind_param("ssssi",$standard_name,$standard_title,$date,$time,$edit_id); if($stmt_insert->execute()) { return true; } return false; } } function update_test_name($test_name,$edit_id) { $date = date("Y-m-d"); $time = date("H-i-s A"); if($stmt_insert = $this->con->prepare("UPDATE `test_master` SET `test_name`=? WHERE `id`=?")) { $stmt_insert->bind_param("si",$test_name,$edit_id); if($stmt_insert->execute()) { return true; } return false; } } function get_all_test_names() { if($stmt_insert = $this->con->prepare("SELECT `id`, `test_name`, `date`, `time` FROM `test_master`")) { $stmt_insert->bind_result($id,$test_name,$date,$time); if($stmt_insert->execute()) { $counter = 0; $details = array(); while($stmt_insert->fetch()) { $details[$counter][0] = $id; $details[$counter][1] = $test_name; $details[$counter][2] = $date; $details[$counter][3] = $time; $counter++; } if(!empty($details)) { return $details; } return false; } } } function get_title_from_category_id($category_id) { if($stmt_insert = $this->con->prepare("SELECT `title` FROM `tailor_master` WHERE `id`=?")) { $stmt_insert->bind_param("i",$category_id); $stmt_insert->bind_result($res_title); if($stmt_insert->execute()) { if($stmt_insert->fetch()) { return $res_title; } return false; } } } function get_name_from_worker_id($workers) { if($stmt_insert = $this->con->prepare("SELECT `name` FROM `worker` WHERE `id`=?")) { $stmt_insert->bind_param("i",$workers); $stmt_insert->bind_result($workers_name); if($stmt_insert->execute()) { if($stmt_insert->fetch()) { return $workers_name; } return false; } } } function get_all_payment_schedule_names() { if($stmt_insert = $this->con->prepare("SELECT `id`, `customer_id`, `net_amount`, `payment_schedule_date`, `payment_amount`, `date`, `time` FROM `payment_schedule`")) { $stmt_insert->bind_result($id,$customer_id,$net_amount,$payment_schedule_date,$payment_amount,$date,$time); if($stmt_insert->execute()) { $counter = 0; $details = array(); while($stmt_insert->fetch()) { $details[$counter][0] = $id; $details[$counter][1] = $customer_id; $details[$counter][2] = $net_amount; $details[$counter][3] = $payment_schedule_date; $details[$counter][4] = $payment_amount; $details[$counter][5] = $date; $details[$counter][6] = $time; $counter++; } if(!empty($details)) { return $details; } return false; } } } function insert_new_employee($emp_code,$full_name,$email_id,$mobile_no,$designation,$password) { $date = date("Y-m-d"); $time = date("H-i-s A"); $account_status = "Active"; if($stmt_insert = $this->con->prepare("INSERT INTO `software_users`(`employee_code`, `full_name`, `email_id`, `mobile_no`, `designation`, `password`, `account_status`, `date`, `time`) VALUES (?,?,?,?,?,?,?,?,?)")) { $stmt_insert->bind_param("sssssssss",$emp_code,$full_name,$email_id,$mobile_no,$designation,$password,$account_status,$date,$time); if($stmt_insert->execute()) { return true; } return false; } } function insert_new_agent($emp_code,$full_name,$email_id,$mobile_no,$address,$password) { $date = date("Y-m-d"); $time = date("H-i-s A"); $account_status = "Active"; if($stmt_insert = $this->con->prepare("INSERT INTO `agent`( `employee_code`, `full_name`, `email_id`, `mobile_no`, `address`, `password`, `date`, `time`) VALUES (?,?,?,?,?,?,?,?)")) { $stmt_insert->bind_param("ssssssss",$emp_code,$full_name,$email_id,$mobile_no,$address,$password,$date,$time); if($stmt_insert->execute()) { return true; } return false; } } function insert_new_customer($name,$address,$mobile_no,$opening_balance,$joining_date,$photo,$city) { $date = date("Y-m-d"); $time = date("H-i-s A"); $account_status = "Active"; if($stmt_insert = $this->con->prepare("INSERT INTO `customer`( `name`, `address`, `mobile_no`, `opening_balance`, `joining_date`, `photo`, `city`, `date`, `time`) VALUES (?,?,?,?,?,?,?,?,?)")) { $stmt_insert->bind_param("sssssssss",$name,$address,$mobile_no,$opening_balance,$joining_date,$photo,$city,$date,$time); if($stmt_insert->execute()) { return true; } return false; } } function insert_new_worker($name,$address,$mobile_no,$opening_balance,$joining_date,$photo,$city) { $date = date("Y-m-d"); $time = date("H-i-s A"); $account_status = "Active"; if($stmt_insert = $this->con->prepare("INSERT INTO `worker`( `name`, `address`, `mobile_no`, `opening_balance`, `joining_date`, `photo`, `city`, `date`, `time`) VALUES (?,?,?,?,?,?,?,?,?)")) { $stmt_insert->bind_param("sssssssss",$name,$address,$mobile_no,$opening_balance,$joining_date,$photo,$city,$date,$time); if($stmt_insert->execute()) { return true; } return false; } } function insert_new_client($client_name,$company_name,$email,$mobile_no,$address,$contact_person_name,$contact_mobile_no1,$contact_mobile_no2,$project_location,$remarks) { $date = date("Y-m-d"); $time = date("H-i-s A"); $account_status = "Active"; if($stmt_insert = $this->con->prepare("INSERT INTO `clients`(`client_name`, `company_name`, `email`, `mobile_no`, `address`, `contact_person_name`, `contact_mobile_no1`, `contact_mobile_no2`, `project_location`, `remarks`, `date`, `time`) VALUES (?,?,?,?,?,?,?,?,?,?,?,?)")) { $stmt_insert->bind_param("ssssssssssss",$client_name,$company_name,$email,$mobile_no,$address,$contact_person_name,$contact_mobile_no1,$contact_mobile_no2,$project_location,$remarks,$date,$time); if($stmt_insert->execute()) { return true; } return false; } } function insert_new_inward_entry($lab_type,$location,$lab_ref_no,$entry_date,$client_name,$project_name,$source_of_sample,$group_of_sample,$type_of_sample,$quantity_of_sample,$quality_of_sample,$acceptance_criteria,$sample_receive_by,$remarks) { $date = date("Y-m-d"); $time = date("H-i-s A"); if($stmt_insert = $this->con->prepare("INSERT INTO `inward`(`lab_type`, `location`, `lab_ref_no`, `entry_date`, `client_name`, `project_name`, `source_of_sample`, `group_of_sample`, `type_of_sample`, `quantity_of_sample`, `quality_of_sample`, `acceptance_criteria`, `sample_receive_by`, `remarks`, `date`, `time`) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)")) { $stmt_insert->bind_param("ssssssssssssssss",$lab_type,$location,$lab_ref_no,$entry_date,$client_name,$project_name,$source_of_sample,$group_of_sample,$type_of_sample,$quantity_of_sample,$quality_of_sample,$acceptance_criteria,$sample_receive_by,$remarks,$date,$time); if($stmt_insert->execute()) { return true; } return false; } } function insert_add_project_entry($project_name,$project_address,$registration_no,$location,$project_type,$project_current_status,$project_layout,$project_logo,$image1,$image2,$image3,$image4,$image5,$image6,$image7,$image8,$image9,$image10,$video,$no_of_towers,$project_selling_status,$latitude,$longitude,$added,$project_facilities,$description) { $date = date("Y-m-d"); $time = date("H-i-s A"); $added = date(""); if($stmt_insert = $this->con->prepare("INSERT INTO `projects`( `project_name`, `project_address`, `registration_no`, `location`, `project_type`, `project_current_status`, `project_layout`, `project_logo`, `image1`, `image2`, `image3`, `image4`, `image5`, `image6`, `image7`, `image8`, `image9`, `image10`, `video`, `no_of_towers`, `project_selling_status`, `latitude`, `longitude`, `added`, `project_facilities`, `description`, `date`, `time`) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)")) { $stmt_insert->bind_param("ssssssssssssssssssssssssssss",$project_name,$project_address,$registration_no,$location,$project_type,$project_current_status,$project_layout,$project_logo,$image1,$image2,$image3,$image4,$image5,$image6,$image7,$image8,$image9,$image10,$video,$no_of_towers,$project_selling_status,$latitude,$longitude,$added,$project_facilities,$description,$date,$time); if($stmt_insert->execute()) { return true; } return false; } } function insert_add_measurement_entry($measurement_for,$customer_name,$shirt1,$shirt2,$shirt3,$shirt4,$shirt5,$shirt6,$shirt7,$shirt8,$shirt9,$shirt10,$shirt11,$shirt12,$shirt13,$shirt14,$shirt15,$shirt16,$shirt17,$shirt18,$cup_size,$cup_style,$shirt_style,$shirt_size,$patti,$shirt_design,$shirt_remark,$pant1,$pant2,$pant3,$pant4,$pant5,$pant6,$pant7,$pant8,$pant9,$pant10,$pant11,$pant12,$pocket_size,$back_pocket,$watch_pocket,$mobile_pocket,$bottom_style,$plate,$pocket,$iron,$stiching,$pant_remark,$mobile_number,$delivery_date,$delivery_status,$payment_method) { $date = date("Y-m-d"); $time = date("H-i-s A"); if($stmt_insert = $this->con->prepare("INSERT INTO `shirt_measurement`( `measurement_for`, `customer_name`, `shirt1`, `shirt2`, `shirt3`, `shirt4`, `shirt5`, `shirt6`, `shirt7`, `shirt8`, `shirt9`, `shirt10`, `shirt11`, `shirt12`, `shirt13`, `shirt14`, `shirt15`, `shirt16`, `shirt17`, `shirt18`, `cup_size`, `cup_style`, `shirt_style`, `shirt_size`, `patti`, `shirt_design`, `shirt_remark`, `pant1`, `pant2`, `pant3`, `pant4`, `pant5`, `pant6`, `pant7`, `pant8`, `pant9`, `pant10`, `pant11`, `pant12`, `pocket_size`, `back_pocket`, `watch_pocket`, `mobile_pocket`, `bottom_style`, `plate`, `pocket`, `iron`, `stiching`, `pant_remark`, `mobile_number`, `delivery_date`, `delivery_status`,`payment_method`, `date`, `time`) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)")) { $stmt_insert->bind_param("sssssssssssssssssssssssssssssssssssssssssssssssssssssss",$measurement_for,$customer_name,$shirt1,$shirt2,$shirt3,$shirt4,$shirt5,$shirt6,$shirt7,$shirt8,$shirt9,$shirt10,$shirt11,$shirt12,$shirt13,$shirt14,$shirt15,$shirt16,$shirt17,$shirt18,$cup_size,$cup_style,$shirt_style,$shirt_size,$patti,$shirt_design,$shirt_remark,$pant1,$pant2,$pant3,$pant4,$pant5,$pant6,$pant7,$pant8,$pant9,$pant10,$pant11,$pant12,$pocket_size,$back_pocket,$watch_pocket,$mobile_pocket,$bottom_style,$plate,$pocket,$iron,$stiching,$pant_remark,$mobile_number,$delivery_date,$delivery_status,$payment_method,$date,$time); if($stmt_insert->execute()) { return $stmt_insert->insert_id; } return false; } } function insert_user_payment_entry($receipt_id,$shirt_price,$pant_price,$total_amount,$discount_amount,$payable_amount,$paid_amount,$balance_amount,$delivery_status) { $date = date("Y-m-d"); $time = date("H-i-s A"); if($stmt_insert = $this->con->prepare("INSERT INTO `user_payment`(`receipt_id`, `shirt_price`, `pant_price`, `total_amount`, `discount_amount`, `payable_amount`, `paid_amount`, `balance_amount`, `delivery_status`, `date`, `time`) VALUES (?,?,?,?,?,?,?,?,?,?,?)")) { $stmt_insert->bind_param("sssssssssss",$receipt_id,$shirt_price,$pant_price,$total_amount,$discount_amount,$payable_amount,$paid_amount,$balance_amount,$delivery_status,$date,$time); if($stmt_insert->execute()) { return $stmt_insert->insert_id; } return false; } } function add_plot_entry($project_id,$plot_owener,$enter_floor_no,$unit_no,$unit_label,$sq_mtr,$sq_ft,$lambi,$rundi,$carpet_area,$bulit_up_area,$saleable_area,$facing,$approximate_rate_per_sq_ft,$latitude,$longitude,$phase,$plot_status,$unit_type,$select_bhk,$image1,$image2,$image3,$image4,$image5) { $date = date("Y-m-d"); $time = date("H-i-s A"); $added = date(""); if($stmt_insert = $this->con->prepare("INSERT INTO `plot_project`(`project_id`, `plot_owener`, `enter_floor_no`, `unit_no`, `unit_label`, `sq_mtr`, `sq_ft`, `lambi`, `rundi`, `plot_status`, `unit_type`, `select_bhk`, `carpet_area`, `bulit_up_area`, `saleable_area`, `facing`, `approximate_rate_per_sq_ft`, `latitude`, `longitude`, `phase`, `image1`, `image2`, `image3`, `image4`, `image5`, `date`, `time`) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)")) { $stmt_insert->bind_param("sssssssssssssssssssssssssss",$project_id,$plot_owener,$enter_floor_no,$unit_no,$unit_label,$sq_mtr,$sq_ft,$lambi,$rundi,$carpet_area,$bulit_up_area,$saleable_area,$facing,$approximate_rate_per_sq_ft,$latitude,$longitude,$phase,$plot_status,$unit_type,$select_bhk,$image1,$image2,$image3,$image4,$image5,$date,$time); if($stmt_insert->execute()) { return true; } return false; } } function add_booking_entry($booking_date,$select_project,$unit_no,$size_sq_ft,$rate_sq_ft,$total_amount,$discount,$rate_after_discount,$round_off,$net_amount,$load_from_leads_data,$mobile_no,$custamer_name,$email_id,$address,$pincode,$dob,$nominee,$age_of_nominee,$payment_type,$adhar_number,$PAN_card,$adhar_card_image,$PAN_card_image,$customer_photo_adhar_card,$cash_receipt_PAN_card_image,$customer_image,$cash_receipt,$sold_by,$commission,$plat_status,$remark) { $date = date("Y-m-d"); $time = date("H-i-s A"); if($stmt_insert = $this->con->prepare("INSERT INTO `bookings`( `booking_date`, `select_project`, `unit_no`, `size_sq_ft`, `rate_sq_ft`, `total_amount`, `discount`, `rate_after_discount`, `round_off`, `net_amount`, `load_from_leads_data`, `mobile_no`, `custamer_name`, `email_id`, `address`, `pincode`, `dob`, `nominee`, `age_of_nominee`, `payment_type`, `adhar_number`, `PAN_card`, `adhar_card_image`, `PAN_card_image`, `customer_photo_adhar_card`, `cash_receipt_PAN_card_image`, `customer_image`, `cash_receipt`, `sold_by`, `commission`, `plat_status`, `remark`, `date`, `time`) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)")) { $stmt_insert->bind_param("ssssssssssssssssssssssssssssssssss",$booking_date,$select_project,$unit_no,$size_sq_ft,$rate_sq_ft,$total_amount,$discount,$rate_after_discount,$round_off,$net_amount,$load_from_leads_data,$mobile_no,$custamer_name,$email_id,$address,$pincode,$dob,$nominee,$age_of_nominee,$payment_type,$adhar_number,$PAN_card,$adhar_card_image,$PAN_card_image,$customer_photo_adhar_card,$cash_receipt_PAN_card_image,$customer_image,$cash_receipt,$sold_by,$commission,$plat_status,$remark,$date,$time); if($stmt_insert->execute()) { return true; } return false; } } function add_payment_entry($received_date,$receipt_no,$manual_receipt_no,$type_of_payment,$payment_mode,$amount,$remark) { $date = date("Y-m-d"); $time = date("H-i-s A"); if($stmt_insert = $this->con->prepare("INSERT INTO `payment`( `received_date`, `receipt_no`, `manual_receipt_no`, `type_of_payment`, `payment_mode`, `amount`, `remark`, `date`, `time`) VALUES (?,?,?,?,?,?,?,?,?)")) { $stmt_insert->bind_param("sssssssss",$received_date,$receipt_no,$manual_receipt_no,$type_of_payment,$payment_mode,$amount,$remark,$date,$time); if($stmt_insert->execute()) { return true; } return false; } } function add_enquiry_entry($project_id,$plot_no,$full_name,$dob,$mobile_no1,$mobile_no2,$email,$address,$occupation,$resource,$property_space,$property_type,$description,$status) { $date = date("Y-m-d"); $time = date("H-i-s A"); if($stmt_insert = $this->con->prepare("INSERT INTO `enquiry_form`(`project_id`, `plot_no`, `full_name`, `dob`, `mobile_no1`, `mobile_no2`, `email`, `address`, `occupation`, `resource`, `property_space`, `property_type`, `description`, `status`, `date`, `time`) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)")) { $stmt_insert->bind_param("ssssssssssssssss", $project_id, $plot_no, $full_name, $dob, $mobile_no1, $mobile_no2, $email, $address, $occupation, $resource, $property_space, $property_type, $description, $status, $date, $time); if($stmt_insert->execute()) { return true; } return false; } } function add_work_entry($workers,$delivery_date,$remark) { $date = date("Y-m-d"); $time = date("H-i-s A"); if($stmt_insert = $this->con->prepare("INSERT INTO `assigned_work`(`workers`, `delivery_date`, `remark`, `date`, `time`) VALUES (?,?,?,?,?)")) { $stmt_insert->bind_param("sssss", $workers,$delivery_date,$remark, $date, $time); if($stmt_insert->execute()) { return true; } return false; } } function add_worker_payment($workers,$amount,$payment_method,$remark) { $date = date("Y-m-d"); $time = date("H-i-s A"); if($stmt_insert = $this->con->prepare("INSERT INTO `worker-payment`(`name`, `amount`, `payment_method`, `remark`, `date`, `time`) VALUES (?,?,?,?,?,?)")) { $stmt_insert->bind_param("ssssss", $workers,$amount,$payment_method,$remark, $date, $time); if($stmt_insert->execute()) { return true; } return false; } } function payment_schedule_entry($customer_id,$net_amount,$payment_schedule_date,$payment_amount) { $date = date("Y-m-d"); $time = date("H-i-s A"); if($stmt_insert = $this->con->prepare("INSERT INTO `payment_schedule`( `customer_id`, `net_amount`, `payment_schedule_date`, `payment_amount`, `date`, `time`) VALUES (?,?,?,?,?,?)")) { $stmt_insert->bind_param("ssssss",$customer_id,$net_amount,$payment_schedule_date,$payment_amount,$date,$time); if($stmt_insert->execute()) { return true; } return false; } } function add_job_number_entry($department,$enter_reference,$company_name,$company_initials,$client_name,$sub_contractor,$project_name,$location,$job_number,$references,$remark) { $date = date("Y-m-d"); $time = date("H-i-s A"); if($stmt_insert = $this->con->prepare("INSERT INTO `job_number`( `department`, `enter_reference`, `company_name`, `company_initials`, `client_name`, `sub_contractor`, `project_name`, `location`, `job_numbar`, `references`, `remark`, `date`, `time`) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?)")) { $stmt_insert->bind_param("sssssssssssss",$department,$enter_reference,$company_name,$company_initials,$client_name,$sub_contractor,$project_name,$location,$job_number,$references,$remark,$date,$time); if($stmt_insert->execute()) { return true; } return false; } } function insert_new_sample_type_name($group_name,$sample_type_name) { $date = date("Y-m-d"); $time = date("H-i-s A"); if($stmt_insert = $this->con->prepare("INSERT INTO `sample_types`(`group_name`,`sample_type_name`, `date`, `time`) VALUES (?,?,?,?)")) { $stmt_insert->bind_param("ssss",$group_name,$sample_type_name,$date,$time); if($stmt_insert->execute()) { return true; } return false; } } function new_expenses_type_name($expenses_category,$tite,$expenses_date,$expenses_amount,$description) { $date = date("Y-m-d"); $time = date("H-i-s A"); if($stmt_insert = $this->con->prepare("INSERT INTO `expenses`( `expenses`, `titel`, `expenses_date`, `expenses_amount`, `description`, `date`, `time`) VALUES (?,?,?,?,?,?,?)")) { $stmt_insert->bind_param("sssssss",$expenses_category,$tite,$expenses_date,$expenses_amount,$description,$date,$time); if($stmt_insert->execute()) { return true; } return false; } } function get_all_group_names() { if($stmt_insert = $this->con->prepare("SELECT `id`, `group_name`, `date`, `time` FROM `groups`")) { $stmt_insert->bind_result($id,$group_name,$date,$time); if($stmt_insert->execute()) { $counter = 0; $details = array(); while($stmt_insert->fetch()) { $details[$counter][0] = $id; $details[$counter][1] = $group_name; $details[$counter][2] = $date; $details[$counter][3] = $time; $counter++; } if(!empty($details)) { return $details; } return false; } } } function get_all_expenses_data() { if($stmt_insert = $this->con->prepare("SELECT `id`, `group_name`, `date`, `time` FROM `groups`")) { $stmt_insert->bind_result($id,$group_name,$date,$time); if($stmt_insert->execute()) { $counter = 0; $details = array(); while($stmt_insert->fetch()) { $details[$counter][0] = $id; $details[$counter][1] = $group_name; $details[$counter][2] = $date; $details[$counter][3] = $time; $counter++; } if(!empty($details)) { return $details; } return false; } } } function get_all_expenses() { if($stmt_insert = $this->con->prepare("SELECT `id`, `expenses_category`, `titel`, `expenses_date`, `expenses_amount`, `description`, `date`, `time` FROM `expenses`")) { $stmt_insert->bind_result($id,$expenses_category,$titel,$expenses_date,$expenses_amount,$description,$date,$time); if($stmt_insert->execute()) { $counter = 0; $details = array(); while($stmt_insert->fetch()) { $details[$counter][0] = $id; $details[$counter][1] = $expenses_category; $details[$counter][2] = $titel; $details[$counter][3] = $expenses_date; $details[$counter][4] = $expenses_amount; $details[$counter][5] = $description; $details[$counter][6] = $date; $details[$counter][7] = $time; $counter++; } if(!empty($details)) { return $details; } return false; } } } function get_all_expenses_names() { if($stmt_insert = $this->con->prepare("SELECT `id`, `expenses_name`, `date`, `time` FROM `expenses_category`")) { $stmt_insert->bind_result($id,$expenses_name,$date,$time); if($stmt_insert->execute()) { $counter = 0; $details = array(); while($stmt_insert->fetch()) { $details[$counter][0] = $id; $details[$counter][1] = $expenses_name; $details[$counter][2] = $date; $details[$counter][3] = $time; $counter++; } if(!empty($details)) { return $details; } return false; } } } function get_all_standard_title() { if($stmt_insert = $this->con->prepare("SELECT `id`, `standard_name`, `standard_title`, `date`, `time` FROM `standard_master`")) { $stmt_insert->bind_result($id,$res_standard_name,$standard_title,$date,$time); if($stmt_insert->execute()) { $counter = 0; $details = array(); while($stmt_insert->fetch()) { $details[$counter][0] = $id; $details[$counter][1] = $res_standard_name; $details[$counter][2] = $date; $details[$counter][3] = $time; $counter++; } if(!empty($details)) { return $details; } return false; } } } function get_all_software_users_data() { if($stmt_insert = $this->con->prepare("SELECT `id`, `employee_code`, `full_name`, `email_id`, `mobile_no`, `designation`, `password`, `account_status`, `date`, `time` FROM `software_users`")) { $stmt_insert->bind_result($id,$employee_code,$full_name,$email_id,$mobile_no,$designation,$password,$account_status,$date,$time); if($stmt_insert->execute()) { $counter = 0; $details = array(); while($stmt_insert->fetch()) { $details[$counter][0] = $id; $details[$counter][1] = $employee_code; $details[$counter][2] = $full_name; $details[$counter][3] = $email_id; $details[$counter][4] = $mobile_no; $details[$counter][5] = $designation; $details[$counter][6] = $account_status; $details[$counter][7] = $date; $details[$counter][8] = $time; $counter++; } if(!empty($details)) { return $details; } return false; } } } function get_all_agent_data() { if($stmt_insert = $this->con->prepare("SELECT `id`, `employee_code`, `full_name`, `email_id`, `mobile_no`, `address`, `password`, `date`, `time` FROM `agent`")) { $stmt_insert->bind_result($id,$employee_code,$full_name,$email_id,$mobile_no,$address,$password,$date,$time); if($stmt_insert->execute()) { $counter = 0; $details = array(); while($stmt_insert->fetch()) { $details[$counter][0] = $id; $details[$counter][1] = $employee_code; $details[$counter][2] = $full_name; $details[$counter][3] = $email_id; $details[$counter][4] = $mobile_no; $details[$counter][5] = $address; $details[$counter][6] = $date; $details[$counter][7] = $time; $counter++; } if(!empty($details)) { return $details; } return false; } } } function get_all_customer_data() { if($stmt_insert = $this->con->prepare("SELECT `id`, `name`, `address`, `mobile_no`, `opening_balance`, `joining_date`, `photo`, `city`, `date`, `time` FROM `customer`")) { $stmt_insert->bind_result($id,$name,$address,$mobile_no,$opening_balance,$joining_date,$photo,$city,$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] = $address; $details[$counter][3] = $mobile_no; $details[$counter][4] = $opening_balance; $details[$counter][5] = $joining_date; $details[$counter][6] = $photo; $details[$counter][7] = $city; $details[$counter][8] = $date; $details[$counter][9] = $time; $counter++; } if(!empty($details)) { return $details; } return false; } } } function get_all_worker_data() { if($stmt_insert = $this->con->prepare("SELECT `id`, `name`, `address`, `mobile_no`, `opening_balance`, `joining_date`, `photo`, `city`, `date`, `time` FROM `worker`")) { $stmt_insert->bind_result($id,$name,$address,$mobile_no,$opening_balance,$joining_date,$photo,$city,$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] = $address; $details[$counter][3] = $mobile_no; $details[$counter][4] = $opening_balance; $details[$counter][5] = $joining_date; $details[$counter][6] = $photo; $details[$counter][7] = $city; $details[$counter][8] = $date; $details[$counter][9] = $time; $counter++; } if(!empty($details)) { return $details; } return false; } } } function get_all_clients_data() { if($stmt_insert = $this->con->prepare("SELECT `id`, `client_name`, `company_name`, `email`, `mobile_no`, `address`, `contact_person_name`, `contact_mobile_no1`, `contact_mobile_no2`, `project_location`, `remarks`, `date`, `time` FROM `clients`")) { $stmt_insert->bind_result($id,$client_name,$company_name,$email,$mobile_no,$address,$contact_person_name,$contact_mobile_no1,$contact_mobile_no2,$project_location,$remarks,$date,$time); if($stmt_insert->execute()) { $counter = 0; $details = array(); while($stmt_insert->fetch()) { $details[$counter][0] = $id; $details[$counter][1] = $client_name; $details[$counter][2] = $company_name; $details[$counter][3] = $email; $details[$counter][4] = $mobile_no; $details[$counter][5] = $address; $details[$counter][6] = $contact_person_name; $details[$counter][7] = $contact_mobile_no1; $details[$counter][8] = $contact_mobile_no2; $details[$counter][9] = $project_location; $details[$counter][10] = $remarks; $details[$counter][11] = $date; $details[$counter][12] = $time; $counter++; } if(!empty($details)) { return $details; } return false; } } } function get_all_inward_data() { if($stmt_insert = $this->con->prepare("SELECT `id`, `lab_type`, `location`, `lab_ref_no`, `entry_date`, `client_name`, `project_name`, `source_of_sample`, `group_of_sample`, `type_of_sample`, `quantity_of_sample`, `quality_of_sample`, `acceptance_criteria`, `sample_receive_by`, `remarks`, `date`, `time` FROM `inward`")) { $stmt_insert->bind_result($id,$lab_type,$location,$lab_ref_no,$entry_date,$client_name,$project_name,$source_of_sample,$group_of_sample,$type_of_sample,$quantity_of_sample,$quality_of_sample,$acceptance_criteria,$sample_receive_by,$remarks,$date,$time); if($stmt_insert->execute()) { $counter = 0; $details = array(); while($stmt_insert->fetch()) { $details[$counter][0] = $id; $details[$counter][1] = $lab_type; $details[$counter][2] = $location; $details[$counter][3] = $lab_ref_no; $details[$counter][4] = $entry_date; $details[$counter][5] = $client_name; $details[$counter][6] = $project_name; $details[$counter][7] = $source_of_sample; $details[$counter][8] = $group_of_sample; $details[$counter][9] = $type_of_sample; $details[$counter][10] = $quantity_of_sample; $details[$counter][11] = $quality_of_sample; $details[$counter][12] = $acceptance_criteria; $details[$counter][13] = $sample_receive_by; $details[$counter][14] = $remarks; $details[$counter][15] = $date; $details[$counter][16] = $time; $counter++; } if(!empty($details)) { return $details; } return false; } } } function get_all_add_project() { if($stmt_insert = $this->con->prepare("SELECT `id`, `project_name`, `project_address`, `registration_no`, `location`, `project_type`, `project_current_status`, `project_layout`, `project_logo`, `image1`, `image2`, `image3`, `image4`, `image5`, `image6`, `image7`, `image8`, `image9`, `image10`, `video`, `no_of_towers`, `project_selling_status`, `latitude`, `longitude`, `added`, `project_facilities`, `description`, `date`, `time` FROM `projects`")) { $stmt_insert->bind_result($id,$project_name,$project_address,$registration_no,$location,$project_type,$project_current_status,$project_layout,$project_logo,$image1,$image2,$image3,$image4,$image5,$image6,$image7,$image8,$image9,$image10,$video,$no_of_towers,$project_selling_status,$latitude,$longitude,$added,$project_facilities,$description,$date,$time); if($stmt_insert->execute()) { $counter = 0; $details = array(); while($stmt_insert->fetch()) { $details[$counter][0] = $id; $details[$counter][1] = $project_name; $details[$counter][2] = $project_address; $details[$counter][3] = $registration_no; $details[$counter][4] = $location; $details[$counter][5] = $project_type; $details[$counter][6] = $project_current_status; $details[$counter][7] = $project_layout; $details[$counter][8] = $project_logo; $details[$counter][9] = $image1; $details[$counter][10] = $image2; $details[$counter][11] = $image3; $details[$counter][12] = $image4; $details[$counter][13] = $image5; $details[$counter][14] = $image6; $details[$counter][15] = $image7; $details[$counter][16] = $image8; $details[$counter][17] = $image9; $details[$counter][18] = $image10; $details[$counter][19] = $video; $details[$counter][20] = $no_of_towers; $details[$counter][21] = $project_selling_status; $details[$counter][22] = $latitude; $details[$counter][23] = $longitude; $details[$counter][24] = $added; $details[$counter][25] = $project_facilities; $details[$counter][26] = $description; $details[$counter][27] = $date; $details[$counter][28] = $time; $counter++; } if(!empty($details)) { return $details; } return false; } } } // function get_all_add_measurement() // { // if($stmt_insert = $this->con->prepare("SELECT `id`, `measurement_for`, `customer_name`, `shirt1`, `shirt2`, `shirt3`, `shirt4`, `shirt5`, `shirt6`, `shirt7`, `shirt8`, `shirt9`, `shirt10`, `shirt11`, `shirt12`, `shirt13`, `shirt14`, `shirt15`, `shirt16`, `shirt17`, `shirt18`, `cup_size`, `cup_style`, `shirt_style`, `shirt_size`, `patti`, `shirt_design`, `shirt_remark`, `pant1`, `pant2`, `pant3`, `pant4`, `pant5`, `pant6`, `pant7`, `pant8`, `pant9`, `pant10`, `pant11`, `pant12`, `pocket_size`, `back_pocket`, `watch_pocket`, `mobile_pocket`, `bottom_style`, `plate`, `pocket`, `iron`, `stiching`, `pant_remark`, `date`, `time` FROM `shirt_measurement` order by id ASC")) // { // $stmt_insert->bind_result($id,$measurement_for,$customer_name,$shirt1,$shirt2,$shirt3,$shirt4,$shirt5,$shirt6,$shirt7,$shirt8,$shirt9,$shirt10,$shirt11,$shirt12,$shirt13,$shirt14,$shirt15,$shirt16,$shirt17,$shirt18,$cup_size,$cup_style,$shirt_style,$shirt_size,$patti,$shirt_design,$shirt_remark,$pant1,$pant2,$pant3,$pant4,$pant5,$pant6,$pant7,$pant8,$pant9,$pant10,$pant11,$pant12,$pocket_size,$back_pocket,$watch_pocket,$mobile_pocket,$bottom_style,$plate,$pocket,$iron,$stiching,$pant_remark,$date,$time); // if($stmt_insert->execute()) // { // $counter = 0; // $details = array(); // while($stmt_insert->fetch()) // { // $details[$counter][0] = $id; // $details[$counter][1] = $measurement_for; // $details[$counter][2] = $customer_name; // $details[$counter][3] = $shirt1; // $details[$counter][4] = $shirt2; // $details[$counter][5] = $shirt3; // $details[$counter][6] = $shirt4; // $details[$counter][7] = $shirt5; // $details[$counter][8] = $shirt6; // $details[$counter][9] = $shirt7; // $details[$counter][10] = $shirt8; // $details[$counter][11] = $shirt9; // $details[$counter][12] = $shirt10; // $details[$counter][13] = $shirt11; // $details[$counter][14] = $shirt12; // $details[$counter][15] = $shirt13; // $details[$counter][16] = $shirt14; // $details[$counter][17] = $shirt15; // $details[$counter][18] = $shirt16; // $details[$counter][19] = $shirt17; // $details[$counter][20] = $shirt18; // $details[$counter][21] = $cup_size; // $details[$counter][22] = $cup_style; // $details[$counter][23] = $shirt_style; // $details[$counter][24] = $shirt_size; // $details[$counter][25] = $patti; // $details[$counter][26] = $shirt_design; // $details[$counter][27] = $shirt_remark; // $details[$counter][28] = $pant1; // $details[$counter][29] = $pant2; // $details[$counter][30] = $pant3; // $details[$counter][31] = $pant4; // $details[$counter][32] = $pant5; // $details[$counter][33] = $pant6; // $details[$counter][34] = $pant7; // $details[$counter][35] = $pant8; // $details[$counter][36] = $pant9; // $details[$counter][37] = $pant10; // $details[$counter][38] = $pant11; // $details[$counter][39] = $pant12; // $details[$counter][40] = $pocket_size; // $details[$counter][41] = $back_pocket; // $details[$counter][42] = $watch_pocket; // $details[$counter][43] = $mobile_pocket; // $details[$counter][44] = $bottom_style; // $details[$counter][45] = $plate; // $details[$counter][46] = $pocket; // $details[$counter][47] = $iron; // $details[$counter][48] = $stiching; // $details[$counter][49] = $pant_remark; // $details[$counter][50] = $date; // $details[$counter][51] = $time; // $counter++; // } // if(!empty($details)) // { // return $details; // } // return false; // } // } // } function get_all_add_measurements() { if($stmt_insert = $this->con->prepare("SELECT id, measurement_for, customer_name, shirt1, shirt2, shirt3, shirt4, shirt5, shirt6, shirt7, shirt8, shirt9, shirt10, shirt11, shirt12, shirt13, shirt14, shirt15, shirt16, shirt17, shirt18, cup_size, cup_style, shirt_style, shirt_size, patti, shirt_design, shirt_remark, pant1, pant2, pant3, pant4, pant5, pant6, pant7, pant8, pant9, pant10, pant11, pant12, pocket_size, back_pocket, watch_pocket, mobile_pocket, bottom_style, plate, pocket, iron, stiching, pant_remark, mobile_number, delivery_date, total_amount, discount, payable_amount, paid_amount, balance_amount, delivery_status, payment_method, date, time FROM shirt_measurement order by id ASC")) { $stmt_insert->bind_result($id,$measurement_for,$customer_name,$shirt1,$shirt2,$shirt3,$shirt4,$shirt5,$shirt6,$shirt7,$shirt8,$shirt9,$shirt10,$shirt11,$shirt12,$shirt13,$shirt14,$shirt15,$shirt16,$shirt17,$shirt18,$cup_size,$cup_style,$shirt_style,$shirt_size,$patti,$shirt_design,$shirt_remark,$pant1,$pant2,$pant3,$pant4,$pant5,$pant6,$pant7,$pant8,$pant9,$pant10,$pant11,$pant12,$pocket_size,$back_pocket,$watch_pocket,$mobile_pocket,$bottom_style,$plate,$pocket,$iron,$stiching,$pant_remark,$mobile_number,$delivery_date,$total_amount,$discount,$payable_amount,$paid_amount,$balance_amount,$delivery_status,$payment_method,$date,$time); if($stmt_insert->execute()) { $counter = 0; $details = array(); while($stmt_insert->fetch()) { $details[$counter][0] = $id; $details[$counter][1] = $measurement_for; $details[$counter][2] = $customer_name; $details[$counter][3] = $shirt1; $details[$counter][4] = $shirt2; $details[$counter][5] = $shirt3; $details[$counter][6] = $shirt4; $details[$counter][7] = $shirt5; $details[$counter][8] = $shirt6; $details[$counter][9] = $shirt7; $details[$counter][10] = $shirt8; $details[$counter][11] = $shirt9; $details[$counter][12] = $shirt10; $details[$counter][13] = $shirt11; $details[$counter][14] = $shirt12; $details[$counter][15] = $shirt13; $details[$counter][16] = $shirt14; $details[$counter][17] = $shirt15; $details[$counter][18] = $shirt16; $details[$counter][19] = $shirt17; $details[$counter][20] = $shirt18; $details[$counter][21] = $cup_size; $details[$counter][22] = $cup_style; $details[$counter][23] = $shirt_style; $details[$counter][24] = $shirt_size; $details[$counter][25] = $patti; $details[$counter][26] = $shirt_design; $details[$counter][27] = $shirt_remark; $details[$counter][28] = $pant1; $details[$counter][29] = $pant2; $details[$counter][30] = $pant3; $details[$counter][31] = $pant4; $details[$counter][32] = $pant5; $details[$counter][33] = $pant6; $details[$counter][34] = $pant7; $details[$counter][35] = $pant8; $details[$counter][36] = $pant9; $details[$counter][37] = $pant10; $details[$counter][38] = $pant11; $details[$counter][39] = $pant12; $details[$counter][40] = $pocket_size; $details[$counter][41] = $back_pocket; $details[$counter][42] = $watch_pocket; $details[$counter][43] = $mobile_pocket; $details[$counter][44] = $bottom_style; $details[$counter][45] = $plate; $details[$counter][46] = $pocket; $details[$counter][47] = $iron; $details[$counter][48] = $stiching; $details[$counter][49] = $pant_remark; $details[$counter][50] = $mobile_number; $details[$counter][51] = $delivery_date; $details[$counter][52] = $total_amount; $details[$counter][53] = $discount; $details[$counter][54] = $payable_amount; $details[$counter][55] = $paid_amount; $details[$counter][56] = $balance_amount; $details[$counter][57] = $delivery_status; $details[$counter][58] = $payment_method; $details[$counter][59] = $date; $details[$counter][60] = $time; $counter++; } if(!empty($details)) { return $details; } return false; } } } function get_all_user_payment_entry() { if($stmt_insert = $this->con->prepare("SELECT `id`, `receipt_id`, `shirt_price`, `pant_price`, `total_amount`, `discount_amount`, `payable_amount`, `paid_amount`, `balance_amount`, `date`, `time` FROM `user_payment`")) { $stmt_insert->bind_result($id,$receipt_id,$shirt_price,$pant_price,$total_amount,$discount_amount,$payable_amount,$paid_amount,$balance_amount,$date,$time); if($stmt_insert->execute()) { $counter = 0; $details = array(); while($stmt_insert->fetch()) { $details[$counter][0] = $id; $details[$counter][1] = $receipt_id; $details[$counter][2] = $shirt_price; $details[$counter][3] = $pant_price; $details[$counter][4] = $total_amount; $details[$counter][5] = $discount_amount; $details[$counter][6] = $payable_amount; $details[$counter][7] = $paid_amount; $details[$counter][8] = $balance_amount; $details[$counter][9] = $date; $details[$counter][10] = $time; $counter++; } if(!empty($details)) { return $details; } return false; } } } function get_all_tailor_master_records($master_category) { if($stmt_insert = $this->con->prepare("SELECT `id`, `category`, `title`, `date`, `time` FROM `tailor_master` WHERE `category`='$master_category ' ")) { $stmt_insert->bind_result($id,$master_category,$title,$date,$time); if($stmt_insert->execute()) { $counter = 0; $details = array(); while($stmt_insert->fetch()) { $details[$counter][0] = $id; $details[$counter][1] = $master_category; $details[$counter][2] = $title; $details[$counter][3] = $date; $details[$counter][4] = $time; $counter++; } if(!empty($details)) { return $details; } return false; } } } function get_all_plot_project() { if($stmt_insert = $this->con->prepare("SELECT `id`, `project_id`, `plot_owener`, `enter_floor_no`, `unit_no`, `unit_label`, `sq_mtr`, `sq_ft`, `lambi`, `rundi`, `plot_status`, `unit_type`, `select_bhk`, `carpet_area`, `bulit_up_area`, `saleable_area`, `facing`, `approximate_rate_per_sq_ft`, `latitude`, `longitude`, `phase`, `image1`, `image2`, `image3`, `image4`, `image5`, `date`, `time` FROM `plot_project`")) { $stmt_insert->bind_result($id,$project_id,$plot_owener,$enter_floor_no,$unit_no,$unit_label,$sq_mtr,$sq_ft,$lambi,$rundi,$carpet_area,$bulit_up_area,$saleable_area,$facing,$approximate_rate_per_sq_ft,$latitude,$longitude,$phase,$plot_status,$unit_type,$select_bhk,$image1,$image2,$image3,$image4,$image5,$date,$time); if($stmt_insert->execute()) { $counter = 0; $details = array(); while($stmt_insert->fetch()) { $details[$counter][0] = $id; $details[$counter][1] = $project_id; $details[$counter][2] = $plot_owener; $details[$counter][3] = $enter_floor_no; $details[$counter][4] = $unit_no; $details[$counter][5] = $unit_label; $details[$counter][6] = $sq_mtr; $details[$counter][7] = $sq_ft; $details[$counter][8] = $lambi; $details[$counter][9] = $rundi; $details[$counter][10] = $plot_status; $details[$counter][11] = $unit_type; $details[$counter][12] = $select_bhk; $details[$counter][13] = $carpet_area; $details[$counter][14] = $bulit_up_area; $details[$counter][15] = $saleable_area; $details[$counter][16] = $facing; $details[$counter][17] = $approximate_rate_per_sq_ft; $details[$counter][18] = $latitude; $details[$counter][19] = $longitude; $details[$counter][20] = $phase; $details[$counter][21] = $image1; $details[$counter][22] = $image2; $details[$counter][23] = $image3; $details[$counter][24] = $image4; $details[$counter][25] = $image5; $details[$counter][26] = $date; $details[$counter][27] = $time; $counter++; } if(!empty($details)) { return $details; } return false; } } } function get_all_booking_project() { if($stmt_insert = $this->con->prepare("SELECT `id`, `booking_date`, `select_project`, `unit_no`, `size_sq_ft`, `rate_sq_ft`, `total_amount`, `discount`, `rate_after_discount`, `round_off`, `net_amount`, `load_from_leads_data`, `mobile_no`, `custamer_name`, `email_id`, `address`, `pincode`, `dob`, `nominee`, `age_of_nominee`, `payment_type`, `adhar_number`, `PAN_card`, `adhar_card_image`, `PAN_card_image`, `customer_photo_adhar_card`, `cash_receipt_PAN_card_image`, `customer_image`, `cash_receipt`, `sold_by`, `commission`, `plat_status`, `remark`, `date`, `time` FROM `bookings`")) { $stmt_insert->bind_result($res_id,$booking_date,$select_project,$unit_no,$size_sq_ft,$rate_sq_ft,$total_amount,$discount,$rate_after_discount,$round_off,$net_amount,$load_from_leads_data,$mobile_no,$custamer_name,$email_id,$address,$pincode,$dob,$nominee,$age_of_nominee,$payment_type,$adhar_number,$PAN_card,$adhar_card_image,$PAN_card_image,$customer_photo_adhar_card,$cash_receipt_PAN_card_image,$customer_image,$cash_receipt,$sold_by,$commission,$plat_status,$remark,$date,$time); if($stmt_insert->execute()) { $counter = 0; $details = array(); while($stmt_insert->fetch()) { $details[$counter][0] = $res_id; $details[$counter][1] = $booking_date; $details[$counter][2] = $select_project; $details[$counter][3] = $unit_no; $details[$counter][4] = $size_sq_ft; $details[$counter][5] = $rate_sq_ft; $details[$counter][6] = $total_amount; $details[$counter][7] = $discount; $details[$counter][8] = $rate_after_discount; $details[$counter][9] = $round_off; $details[$counter][10] = $net_amount; $details[$counter][11] = $load_from_leads_data; $details[$counter][12] = $mobile_no; $details[$counter][13] = $custamer_name; $details[$counter][14] = $email_id; $details[$counter][15] = $address; $details[$counter][16] = $pincode; $details[$counter][17] = $dob; $details[$counter][18] = $nominee; $details[$counter][19] = $age_of_nominee; $details[$counter][20] = $payment_type; $details[$counter][21] = $adhar_number; $details[$counter][22] = $PAN_card; $details[$counter][23] = $adhar_card_image; $details[$counter][24] = $PAN_card_image; $details[$counter][25] = $customer_photo_adhar_card; $details[$counter][26] = $cash_receipt_PAN_card_image; $details[$counter][27] = $customer_image; $details[$counter][28] = $cash_receipt; $details[$counter][29] = $sold_by; $details[$counter][30] = $commission; $details[$counter][31] = $plat_status; $details[$counter][32] = $remark; $details[$counter][33] = $date; $details[$counter][34] = $time; $counter++; } if(!empty($details)) { return $details; } return false; } } } function get_all_payment_project() { if($stmt_insert = $this->con->prepare("SELECT `id`, `received_date`, `receipt_no`, `manual_receipt_no`, `type_of_payment`, `payment_mode`, `amount`, `remark`, `date`, `time` FROM `payment`")) { $stmt_insert->bind_result($id,$received_date,$receipt_no,$manual_receipt_no,$type_of_payment,$payment_mode,$amount,$remark,$date,$time); if($stmt_insert->execute()) { $counter = 0; $details = array(); while($stmt_insert->fetch()) { $details[$counter][0] = $id; $details[$counter][1] = $received_date; $details[$counter][2] = $receipt_no; $details[$counter][3] = $manual_receipt_no; $details[$counter][4] = $type_of_payment; $details[$counter][5] = $payment_mode; $details[$counter][6] = $amount; $details[$counter][7] = $remark; $details[$counter][8] = $date; $details[$counter][9] = $time; $counter++; } if(!empty($details)) { return $details; } return false; } } } function get_all_enquiry_project() { if($stmt_insert = $this->con->prepare("SELECT `id`, `project_id`, `plot_no`, `full_name`, `dob`, `mobile_no1`, `mobile_no2`, `email`, `address`, `occupation`, `resource`, `property_space`, `property_type`, `description`, `status`, `date`, `time` FROM `enquiry_form`")) { $stmt_insert->bind_result($res_id,$project_id,$plot_no,$full_name,$dob,$mobile_no1,$mobile_no2,$email,$address,$occupation,$resource,$property_space,$property_type,$description,$status,$date,$time); if($stmt_insert->execute()) { $counter = 0; $details = array(); while($stmt_insert->fetch()) { $details[$counter][0] = $res_id; $details[$counter][1] = $project_id; $details[$counter][2] = $plot_no; $details[$counter][3] = $full_name; $details[$counter][4] = $dob; $details[$counter][5] = $mobile_no1; $details[$counter][6] = $mobile_no2; $details[$counter][7] = $email; $details[$counter][8] = $address; $details[$counter][9] = $occupation; $details[$counter][10] = $resource; $details[$counter][11] = $property_space; $details[$counter][12] = $property_type; $details[$counter][13] = $description; $details[$counter][14] = $status; $details[$counter][15] = $date; $details[$counter][16] = $time; $counter++; } if(!empty($details)) { return $details; } return false; } } } function get_all_workers_work() { if($stmt_insert = $this->con->prepare("SELECT `id`, `workers`, `delivery_date`, `remark`, `date`, `time` FROM `assigned_work`")) { $stmt_insert->bind_result($res_id,$workers,$delivery_date,$remark,$date,$time); if($stmt_insert->execute()) { $counter = 0; $details = array(); while($stmt_insert->fetch()) { $details[$counter][0] = $res_id; $details[$counter][1] = $workers; $details[$counter][2] = $delivery_date; $details[$counter][3] = $remark; $details[$counter][4] = $date; $details[$counter][5] = $time; $counter++; } if(!empty($details)) { return $details; } return false; } } } function get_all_workers_payment() { if($stmt_insert = $this->con->prepare("SELECT `id`, `name`, `amount`, `payment_method`, `remark`, `date`, `time` FROM `worker-payment`")) { $stmt_insert->bind_result($res_id,$workers,$amount,$payment_method,$remark,$date,$time); if($stmt_insert->execute()) { $counter = 0; $details = array(); while($stmt_insert->fetch()) { $details[$counter][0] = $res_id; $details[$counter][1] = $workers; $details[$counter][2] = $amount; $details[$counter][3] = $payment_method; $details[$counter][4] = $remark; $details[$counter][5] = $date; $details[$counter][6] = $time; $counter++; } if(!empty($details)) { return $details; } return false; } } } function get_all_payment_schedule() { if($stmt_insert = $this->con->prepare("SELECT `id`, `customer_id`, `net_amount`, `payment_schedule_date`, `payment_amount`, `date`, `time` FROM `payment_schedule`")) { $stmt_insert->bind_result($id,$customer_id,$net_amount,$payment_schedule_date,$payment_amount,$date,$time); if($stmt_insert->execute()) { $counter = 0; $details = array(); while($stmt_insert->fetch()) { $details[$counter][0] = $id; $details[$counter][1] = $customer_id; $details[$counter][2] = $net_amount; $details[$counter][3] = $payment_schedule_date; $details[$counter][4] = $payment_amount; $details[$counter][5] = $date; $details[$counter][6] = $time; $counter++; } if(!empty($details)) { return $details; } return false; } } } function get_all_sample_type_group_names() { if($stmt_insert = $this->con->prepare("SELECT `id`, `group_name`, `date`, `time`, `sample_type_name` FROM `sample_types`")) { $stmt_insert->bind_result($id,$group_name,$date,$time,$sample_type_name); if($stmt_insert->execute()) { $counter = 0; $details = array(); while($stmt_insert->fetch()) { $details[$counter][0] = $id; $details[$counter][1] = $group_name; $details[$counter][2] = $date; $details[$counter][3] = $time; $details[$counter][4] = $sample_type_name; $counter++; } if(!empty($details)) { return $details; } return false; } } } function get_all_expenses_group_names() { if($stmt_insert = $this->con->prepare("SELECT `id`, `expenses`, `titel`, `expenses_date`, `expenses_amount`, `description`, `date`, `time` FROM `expenses`")) { $stmt_insert->bind_result($id,$expenses_category,$titel,$expenses_date,$expenses_amount,$description,$date,$time); if($stmt_insert->execute()) { $counter = 0; $details = array(); while($stmt_insert->fetch()) { $details[$counter][0] = $id; $details[$counter][1] = $expenses_category; $details[$counter][2] = $titel; $details[$counter][3] = $expenses_date; $details[$counter][4] = $expenses_amount; $details[$counter][5] = $description; $details[$counter][6] = $date; $details[$counter][7] = $time; $counter++; } if(!empty($details)) { return $details; } return false; } } } function get_all_standard_master_names() { if($stmt_insert = $this->con->prepare("SELECT `id`, `standard_name`, `standard_title`, `date`, `time` FROM `standard_master`")) { $stmt_insert->bind_result($id,$test_name,$standard_title,$date,$time); if($stmt_insert->execute()) { $counter = 0; $details = array(); while($stmt_insert->fetch()) { $details[$counter][0] = $id; $details[$counter][1] = $test_name; $details[$counter][2] = $date; $details[$counter][3] = $time; $details[$counter][4] = $standard_title; $counter++; } if(!empty($details)) { return $details; } return false; } } } function get_all_payment_schedules() { if($stmt_insert = $this->con->prepare("SELECT `id`, `customer_id`, `net_amount`, `payment_schedule_date`, `payment_amount`, `date`, `time` FROM `payment_schedule`")) { $stmt_insert->bind_result($id,$customer_id,$net_amount,$payment_schedule_date,$payment_amount,$date,$time); if($stmt_insert->execute()) { $counter = 0; $details = array(); while($stmt_insert->fetch()) { $details[$counter][0] = $id; $details[$counter][1] = $customer_id; $details[$counter][2] = $net_amount; $details[$counter][3] = $payment_schedule_date; $details[$counter][4] = $payment_amount; $details[$counter][5] = $date; $details[$counter][6] = $time; $counter++; } if(!empty($details)) { return $details; } return false; } } } function get_user_profile_data($current_login_emp_code) { if($stmt_insert = $this->con->prepare("SELECT `id`, `employee_code`, `full_name`, `email_id`, `mobile_no`, `designation`, `password`, `account_status`, `date`, `time` FROM `software_users` WHERE `employee_code`=?")) { $stmt_insert->bind_param("s",$current_login_emp_code); $stmt_insert->bind_result($id,$employee_code,$full_name,$email_id,$mobile_no,$designation,$password,$account_status,$date,$time); if($stmt_insert->execute()) { $details = array(); if($stmt_insert->fetch()) { $details[0] = $id; $details[1] = $employee_code; $details[2] = $full_name; $details[3] = $email_id; $details[4] = $mobile_no; $details[5] = $designation; $details[6] = $password; $details[7] = $account_status; $details[8] = $date; $details[9] = $time; } if(!empty($details)) { return $details; } return false; } } } function delete_group_name($del_id) { if($stmt_select = $this->con->prepare("Delete from `groups` where `id`=?")) { $stmt_select->bind_param("i",$del_id); if($stmt_select->execute()) { return true; } return false; } } function delete_expenses_name($del_id) { if($stmt_select = $this->con->prepare("DELETE FROM `expenses_category` WHERE `id`=?")) { $stmt_select->bind_param("i",$del_id); if($stmt_select->execute()) { return true; } return false; } } function delete_test_master($del_id) { if($stmt_select = $this->con->prepare("DELETE FROM `test_master` WHERE `id`=?")) { $stmt_select->bind_param("i",$del_id); if($stmt_select->execute()) { return true; } return false; } } function delete_software_user($del_id) { if($stmt_select = $this->con->prepare("Delete from `software_users` where `id`=?")) { $stmt_select->bind_param("i",$del_id); if($stmt_select->execute()) { return true; } return false; } } function delete_agent_user($del_id) { if($stmt_select = $this->con->prepare("DELETE FROM `agent` WHERE `id`=?")) { $stmt_select->bind_param("i",$del_id); if($stmt_select->execute()) { return true; } return false; } } function delete_customer_record($del_id) { if($stmt_select = $this->con->prepare("DELETE FROM `customer` WHERE `id`=?")) { $stmt_select->bind_param("i",$del_id); if($stmt_select->execute()) { return true; } return false; } } function delete_worker_record($del_id) { if($stmt_select = $this->con->prepare("DELETE FROM `worker` WHERE`id`=?")) { $stmt_select->bind_param("i",$del_id); if($stmt_select->execute()) { return true; } return false; } } function delete_client_details($del_id) { if($stmt_select = $this->con->prepare("Delete from `clients` where `id`=?")) { $stmt_select->bind_param("i",$del_id); if($stmt_select->execute()) { return true; } return false; } } function delete_inward_details($del_id) { if($stmt_select = $this->con->prepare("Delete from `inward` where `id`=?")) { $stmt_select->bind_param("i",$del_id); if($stmt_select->execute()) { return true; } return false; } } function delete_add_project($del_id) { if($stmt_select = $this->con->prepare("DELETE FROM `projects` WHERE `id`=?")) { $stmt_select->bind_param("i",$del_id); if($stmt_select->execute()) { return true; } return false; } } function delete_add_measurement($del_id) { if($stmt_select = $this->con->prepare("DELETE FROM `shirt_measurement` WHERE `id`=?")) { $stmt_select->bind_param("i",$del_id); if($stmt_select->execute()) { return true; } return false; } } function delete_tailor_master_title($del_id) { if($stmt_select = $this->con->prepare("DELETE FROM `tailor_master` WHERE `id`=?")) { $stmt_select->bind_param("i",$del_id); if($stmt_select->execute()) { return true; } return false; } } function delete_plot_record($del_id) { if($stmt_select = $this->con->prepare("DELETE FROM `plot_project` WHERE `id`=?")) { $stmt_select->bind_param("i",$del_id); if($stmt_select->execute()) { return true; } return false; } } function delete_booking_record($del_id) { if($stmt_select = $this->con->prepare("DELETE FROM `bookings` WHERE`id`=?")) { $stmt_select->bind_param("i",$del_id); if($stmt_select->execute()) { return true; } return false; } } function delete_payment_record($del_id) { if($stmt_select = $this->con->prepare("DELETE FROM `payment` WHERE`id`=?")) { $stmt_select->bind_param("i",$del_id); if($stmt_select->execute()) { return true; } return false; } } function delete_enquiry_record($del_id) { if($stmt_select = $this->con->prepare("DELETE FROM `enquiry_form` WHERE`id`=?")) { $stmt_select->bind_param("i",$del_id); if($stmt_select->execute()) { return true; } return false; } } function delete_work_record($del_id) { if($stmt_select = $this->con->prepare("DELETE FROM `assigned_work` WHERE`id`=?")) { $stmt_select->bind_param("i",$del_id); if($stmt_select->execute()) { return true; } return false; } } function delete_worker_payment_record($del_id) { if($stmt_select = $this->con->prepare("DELETE FROM `worker-payment` WHERE`id`=?")) { $stmt_select->bind_param("i",$del_id); if($stmt_select->execute()) { return true; } return false; } } function delete_payment_schedule_record($del_id) { if($stmt_select = $this->con->prepare("SELECT * FROM `payment_schedule` WHERE`id`=?")) { $stmt_select->bind_param("i",$del_id); if($stmt_select->execute()) { return true; } return false; } } function delete_sample_type_name($del_id) { if($stmt_select = $this->con->prepare("Delete from `sample_types` where `id`=?")) { $stmt_select->bind_param("i",$del_id); if($stmt_select->execute()) { return true; } return false; } } function delete_expenses($delete_id) { if($stmt_select = $this->con->prepare("DELETE FROM `expenses` WHERE `id`=?")) { $stmt_select->bind_param("i",$delete_id); if($stmt_select->execute()) { return true; } return false; } } function insert_sample_entry($var_LRN,$var_project_name,$var_client_name,$var_location,$var_sample_date,$var_bore_hole_type,$var_bh_no,$var_chainage_no,$var_sr_no,$var_type_of_sample,$var_sample_no,$var_sample_length_in_cm,$var_test_on_sample,$var_prepared_by,$var_approved_by,$var_bh_depth_m,$var_depth_m) { $current_date = date("Y-m-d"); $current_time = date("H-i-s"); if($stmt = $this->con->prepare("INSERT INTO `sample_list`(`LRN`, `project_name`, `client_name`, `location`, `sample_date`, `bore_hole_type`, `bh_no`, `chainage_no`, `sr_no`, `type_of_sample`, `sample_no`, `sample_length_in_cm`, `test_on_sample`, `prepared_by`, `approved_by`, `bh_depth_m`, `depth_m`, `date`, `time`) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)")) { $stmt->bind_param("sssssssssssssssssss",$var_LRN,$var_project_name,$var_client_name,$var_location,$var_sample_date,$var_bore_hole_type,$var_bh_no,$var_chainage_no,$var_sr_no,$var_type_of_sample,$var_sample_no,$var_sample_length_in_cm,$var_test_on_sample,$var_prepared_by,$var_approved_by,$var_bh_depth_m,$var_depth_m,$current_date,$current_time); if($stmt->execute()) { return true; } else { return false; } } } function get_sample_data () { if($stmt = $this->con->prepare("SELECT `id`, `LRN`, `project_name`, `client_name`, `location`, `sample_date`, `bore_hole_type`, `bh_no`, `chainage_no`, `sr_no`, `type_of_sample`, `sample_no`, `sample_length_in_cm`, `test_on_sample`, `prepared_by`, `approved_by`,`bh_depth_m`,`depth_m`,`date`, `time` FROM `sample_list` ")) { $stmt->bind_result($res_id,$res_LRN,$res_project_name,$res_client_name,$res_location,$res_sample_date,$res_bore_hole_type,$res_bh_no,$res_chainage_no,$res_sr_no,$res_type_of_sample,$res_sample_no,$res_sample_length_in_cm,$res_test_on_sample,$res_prepared_by,$res_approved_by,$res_bh_depth_m,$res_depth_m,$res_date,$res_time); if($stmt->execute()) { $users_data = array(); $counter = 0; } while($stmt->fetch()) { $users_data[$counter]['id'] = $res_id; $users_data[$counter]['LRN'] = $res_LRN; $users_data[$counter]['project_name'] = $res_project_name; $users_data[$counter]['client_name'] = $res_client_name; $users_data[$counter]['location'] = $res_location; $users_data[$counter]['sample_date'] = $res_sample_date; $users_data[$counter]['bore_hole_type'] = $res_bore_hole_type; $users_data[$counter]['bh_no'] = $res_bh_no; $users_data[$counter]['chainage_no'] = $res_chainage_no; $users_data[$counter]['sr_no'] = $res_sr_no; $users_data[$counter]['type_of_sample'] = $res_type_of_sample; $users_data[$counter]['sample_no'] = $res_sample_no; $users_data[$counter]['sample_length_in_cm'] = $res_sample_length_in_cm; $users_data[$counter]['test_on_sample'] = $res_test_on_sample; $users_data[$counter]['prepared_by'] = $res_prepared_by; $users_data[$counter]['approved_by'] = $res_approved_by; $users_data[$counter]['bh_depth_m'] = $res_bh_depth_m; $users_data[$counter]['depth_m'] = $res_depth_m; $users_data[$counter]['date'] = $res_date; $users_data[$counter]['time'] = $res_time; $counter++; } if(!empty($users_data)) { return $users_data; } else { return false; } } } function delete_sample_record($del_id) { if($stmt = $this->con->prepare("DELETE FROM `sample_list` where `id`=?")) { $stmt->bind_param("i",$del_id); if($stmt->execute()) { return true; } else { return false; } } } function insert_client_request_entry($var_job_number,$var_client_entry_date,$var_lab_reference_number,$var_customer_name,$var_address,$var_project_name,$var_contact_person,$var_mobile_no,$var_GST_number,$var_PAN,$var_report_dispatch_mode,$var_sample_material,$var_quantity,$var_sr_no,$var_type_of_sample,$var_tests,$var_ref_standards,$var_statement_of_confirmity_required,$var_remarks,$var_sample_adequacy,$var_test_person_available,$var_test_with_NABL_scope,$var_source_adequacy,$var_condition_of_sample,$var_sample_inward_by,$var_instructions_from_customers,$var_test_contract_verified_by) { $current_date = date("Y-m-d"); $current_time = date("H-i-s"); if($stmt = $this->con->prepare("INSERT INTO `client_request`(`job_number`, `client_entry_date`, `lab_reference_number`, `customer_name`, `address`, `project_name`, `contact_person`, `mobile_no`, `GST_number`, `PAN`, `report_dispatch_mode`, `sample_material`, `quantity`, `sr_no`, `type_of_sample`, `tests`, `ref_standards`, `statement_of_confirmity_required`, `remarks`, `sample_adequacy`, `test_person_available`, `test_with_NABL_scope`, `source_adequacy`, `condition_of_sample`, `sample_inward_by`, `instructions_from_customers`, `test_contract_verified_by`, `date`, `time`, `sample_id_bh_no_trial_pit_no`, `location_chainage_no`, `depth_m`) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)")) { $stmt->bind_param("sssssssssssssssssssssssssssss",$var_job_number,$var_client_entry_date,$var_lab_reference_number,$var_customer_name,$var_address,$var_project_name,$var_contact_person,$var_mobile_no,$var_GST_number,$var_PAN,$var_report_dispatch_mode,$var_sample_material,$var_quantity,$var_sr_no,$var_type_of_sample,$var_tests,$var_ref_standards,$var_statement_of_confirmity_required,$var_remarks,$var_sample_adequacy,$var_test_person_available,$var_test_with_NABL_scope,$var_source_adequacy,$var_condition_of_sample,$var_sample_inward_by,$var_instructions_from_customers,$var_test_contract_verified_by,$current_date,$current_time); if($stmt->execute()) { return true; } else { return false; } } } function get_user_data() { if($stmt = $this->con->prepare("SELECT `id`, `job_number`, `client_entry_date`, `lab_reference_number`, `customer_name`, `address`, `project_name`, `contact_person`, `mobile_no`, `GST_number`, `PAN`, `report_dispatch_mode`, `sample_material`, `quantity`, `sr_no`, `type_of_sample`, `tests`, `ref_standards`, `statement_of_confirmity_required`, `remarks`, `sample_adequacy`, `test_person_available`, `test_with_NABL_scope`, `source_adequacy`, `condition_of_sample`, `sample_inward_by`, `instructions_from_customers`, `test_contract_verified_by`, `date`, `time` FROM `client_request` ")) { $stmt->bind_result($res_id,$res_job_number,$res_client_entry_date,$res_lab_reference_number,$res_customer_name,$res_address,$res_project_name,$res_contact_person,$res_mobile_no,$res_GST_number,$res_PAN,$res_report_dispatch_mode,$res_sample_material,$res_quantity,$res_sr_no,$res_type_of_sample,$res_tests,$res_ref_standards,$res_statement_of_confirmity_required,$res_remarks,$res_sample_adequacy,$res_test_person_available,$res_test_with_NABL_scope,$res_source_adequacy,$res_condition_of_sample,$res_sample_inward_by,$res_instructions_from_customers,$res_test_contract_verified_by,$res_date,$res_time); if($stmt->execute()) { $users_data = array(); $counter = 0; } while($stmt->fetch()) { $users_data[$counter]['id'] = $res_id; $users_data[$counter]['job_number'] = $res_job_number; $users_data[$counter]['client_entry_date'] = $res_client_entry_date; $users_data[$counter]['lab_reference_number'] = $res_lab_reference_number; $users_data[$counter]['customer_name'] = $res_customer_name; $users_data[$counter]['address'] = $res_address; $users_data[$counter]['project_name'] = $res_project_name; $users_data[$counter]['contact_person'] = $res_contact_person; $users_data[$counter]['mobile_no'] = $res_mobile_no; $users_data[$counter]['GST_number'] = $res_GST_number; $users_data[$counter]['PAN'] = $res_PAN; $users_data[$counter]['report_dispatch_mode'] = $res_report_dispatch_mode; $users_data[$counter]['sample_material'] = $res_sample_material; $users_data[$counter]['quantity'] = $res_quantity; $users_data[$counter]['sr_no'] = $res_sr_no; $users_data[$counter]['type_of_sample'] = $res_type_of_sample; $users_data[$counter]['tests'] = $res_tests; $users_data[$counter]['ref_standards'] = $res_ref_standards; $users_data[$counter]['statement_of_confirmity_required'] = $res_statement_of_confirmity_required; $users_data[$counter]['remarks'] = $res_remarks; $users_data[$counter]['sample_adequacy'] = $res_sample_adequacy; $users_data[$counter]['test_person_available'] = $res_test_person_available; $users_data[$counter]['test_with_NABL_scope'] = $res_test_with_NABL_scope; $users_data[$counter]['source_adequacy'] = $res_source_adequacy; $users_data[$counter]['condition_of_sample'] = $res_condition_of_sample; $users_data[$counter]['sample_inward_by'] = $res_sample_inward_by; $users_data[$counter]['instructions_from_customers'] = $res_instructions_from_customers; $users_data[$counter]['test_contract_verified_by'] = $res_test_contract_verified_by; $users_data[$counter]['date'] = $res_date; $users_data[$counter]['time'] = $res_time; $counter++; } if(!empty($users_data)) { return $users_data; } else { return false; } } } function delete_client_request_record($del_id) { if($stmt = $this->con->prepare("DELETE FROM `client_request` WHERE `id`=?")) { $stmt->bind_param("i",$del_id); if($stmt->execute()) { return true; } else { return false; } } } function update_user_measurement($measurement_for,$customer_name,$shirt1,$shirt2,$shirt3,$shirt4,$shirt5,$shirt6,$shirt7,$shirt8,$shirt9,$shirt10,$shirt11,$shirt12,$shirt13,$shirt14,$shirt15,$shirt16,$shirt17,$shirt18,$cup_size,$cup_style,$shirt_style,$shirt_size,$patti,$shirt_design,$shirt_remark,$pant1,$pant2,$pant3,$pant4,$pant5,$pant6,$pant7,$pant8,$pant9,$pant10,$pant11,$pant12,$pocket_size,$back_pocket,$watch_pocket,$mobile_pocket,$bottom_style,$plate,$pocket,$iron,$stiching,$pant_remark,$mobile_number,$delivery_date,$res_edit_id) { $date = date("Y-m-d"); $time = date("H-i-s A"); if($stmt_insert = $this->con->prepare("UPDATE `shirt_measurement` SET `measurement_for`=?,`customer_name`=?,`shirt1`=?,`shirt2`=?,`shirt3`=?,`shirt4`=?,`shirt5`=?,`shirt6`=?,`shirt7`=?,`shirt8`=?,`shirt9`=?,`shirt10`=?,`shirt11`=?,`shirt12`=?,`shirt13`=?,`shirt14`=?,`shirt15`=?,`shirt16`=?,`shirt17`=?,`shirt18`=?,`cup_size`=?,`cup_style`=?,`shirt_style`=?,`shirt_size`=?,`patti`=?,`shirt_design`=?,`shirt_remark`=?,`pant1`=?,`pant2`=?,`pant3`=?,`pant4`=?,`pant5`=?,`pant6`=?,`pant7`=?,`pant8`=?,`pant9`=?,`pant10`=?,`pant11`=?,`pant12`=?,`pocket_size`=?,`back_pocket`=?,`watch_pocket`=?,`mobile_pocket`=?,`bottom_style`=?,`plate`=?,`pocket`=?,`iron`=?,`stiching`=?,`pant_remark`=?,`mobile_number`=?,`delivery_date`=?,`date`=?,`time`=? WHERE `id`= ?")) { $stmt_insert->bind_param("sssssssssssssssssssssssssssssssssssssssssssssssssssssi",$measurement_for,$customer_name,$shirt1,$shirt2,$shirt3,$shirt4,$shirt5,$shirt6,$shirt7,$shirt8,$shirt9,$shirt10,$shirt11,$shirt12,$shirt13,$shirt14,$shirt15,$shirt16,$shirt17,$shirt18,$cup_size,$cup_style,$shirt_style,$shirt_size,$patti,$shirt_design,$shirt_remark,$pant1,$pant2,$pant3,$pant4,$pant5,$pant6,$pant7,$pant8,$pant9,$pant10,$pant11,$pant12,$pocket_size,$back_pocket,$watch_pocket,$mobile_pocket,$bottom_style,$plate,$pocket,$iron,$stiching,$pant_remark,$mobile_number,$delivery_date,$date,$time,$res_edit_id); if($stmt_insert->execute()) { return true; } return false; } } function update_customer_record($name,$address,$mobile_no,$opening_balance,$joining_date,$photo,$city,$res_edit_id) { $date = date("Y-m-d"); $time = date("H-i-s A"); if($stmt_insert = $this->con->prepare("UPDATE `customer` SET `name`=?,`address`=?,`mobile_no`=?,`opening_balance`=?,`joining_date`=?,`photo`=?,`city`=?,`date`=?,`time`=? WHERE`id`= ?")) { $stmt_insert->bind_param("sssssssssi",$name,$address,$mobile_no,$opening_balance,$joining_date,$photo,$city,$date,$time,$res_edit_id); if($stmt_insert->execute()) { return true; } return false; } } function update_agent_record($emp_code,$full_name,$email_id,$mobile_no,$address,$password,$res_edit_id) { $date = date("Y-m-d"); $time = date("H-i-s A"); if($stmt_insert = $this->con->prepare("UPDATE `agent` SET `employee_code`=?,`full_name`=?,`email_id`=?,`mobile_no`=?,`address`=?,`password`=?,`date`=?,`time`=? WHERE `id`= ?")) { $stmt_insert->bind_param("ssssssi",$emp_code,$full_name,$email_id,$mobile_no,$address,$password,$date,$time,$res_edit_id); if($stmt_insert->execute()) { return true; } return false; } } function update_worker_record($name,$address,$mobile_no,$opening_balance,$joining_date,$photo,$city,$res_edit_id) { $date = date("Y-m-d"); $time = date("H-i-s A"); if($stmt_insert = $this->con->prepare("UPDATE `worker` SET `name`=?,`address`=?,`mobile_no`=?,`opening_balance`=?,`joining_date`=?,`photo`=?,`city`=?,`date`=?,`time`=? WHERE`id`= ?")) { $stmt_insert->bind_param("sssssssssi",$name,$address,$mobile_no,$opening_balance,$joining_date,$photo,$city,$date,$time,$res_edit_id); if($stmt_insert->execute()) { return true; } return false; } } function update_booking($booking_date,$select_project,$unit_no,$size_sq_ft,$rate_sq_ft,$total_amount,$discount,$rate_after_discount,$round_off,$net_amount,$load_from_leads_data,$mobile_no,$custamer_name,$email_id,$address,$pincode,$dob,$nominee,$age_of_nominee,$payment_type,$adhar_number,$PAN_card,$adhar_card_image,$PAN_card_image,$customer_photo_adhar_card,$cash_receipt_PAN_card_image,$customer_image,$cash_receipt,$sold_by,$commission,$plat_status,$remark,$res_edit_id) { $date = date("Y-m-d"); $time = date("H-i-s A"); if($stmt_insert = $this->con->prepare("UPDATE `bookings` SET `booking_date`=?,`select_project`=?,`unit_no`=?,`size_sq_ft`=?,`rate_sq_ft`=?,`total_amount`=?,`discount`=?,`rate_after_discount`=?,`round_off`=?,`net_amount`=?,`load_from_leads_data`=?,`mobile_no`=?,`custamer_name`=?,`email_id`=?,`address`=?,`pincode`=?,`dob`=?,`nominee`=?,`age_of_nominee`=?,`payment_type`=?,`adhar_number`=?,`PAN_card`=?,`adhar_card_image`=?,`PAN_card_image`=?,`customer_photo_adhar_card`=?,`cash_receipt_PAN_card_image`=?,`customer_image`=?,`cash_receipt`=?,`sold_by`=?,`commission`=?,`plat_status`=?,`remark`=?,`date`=?,`time`=? WHERE `id`= ?")) { $stmt_insert->bind_param("ssssssssssssssssssssssssssssssssssi",$booking_date,$select_project,$unit_no,$size_sq_ft,$rate_sq_ft,$total_amount,$discount,$rate_after_discount,$round_off,$net_amount,$load_from_leads_data,$mobile_no,$custamer_name,$email_id,$address,$pincode,$dob,$nominee,$age_of_nominee,$payment_type,$adhar_number,$PAN_card,$adhar_card_image,$PAN_card_image,$customer_photo_adhar_card,$cash_receipt_PAN_card_image,$customer_image,$cash_receipt,$sold_by,$commission,$plat_status,$remark,$date,$time,$res_edit_id); if($stmt_insert->execute()) { return true; } return false; } } function update_payment_data($received_date,$receipt_no,$manual_receipt_no,$type_of_payment,$payment_mode,$amount,$remark,$res_edit_id) { $date = date("Y-m-d"); $time = date("H-i-s A"); if($stmt_insert = $this->con->prepare("UPDATE `payment` SET `received_date`=?,`receipt_no`=?,`manual_receipt_no`=?,`type_of_payment`=?,`payment_mode`=?,`amount`=?,`remark`=?,`date`=?,`time`=? WHERE `id`= ?")) { $stmt_insert->bind_param("sssssssssi",$received_date,$receipt_no,$manual_receipt_no,$type_of_payment,$payment_mode,$amount,$remark,$date,$time,$res_edit_id); if($stmt_insert->execute()) { return true; } return false; } } function update_enquiry_data($project_id,$plot_no,$full_name,$dob,$mobile_no1,$mobile_no2,$email,$address,$occupation,$resource,$property_space,$property_type,$description,$status,$res_edit_id) { $date = date("Y-m-d"); $time = date("H-i-s A"); if($stmt_insert = $this->con->prepare("UPDATE `enquiry_form` SET `project_id`=?,`plot_no`=?,`full_name`=?,`dob`=?,`mobile_no1`=?,`mobile_no2`=?,`email`=?,`address`=?,`occupation`=?,`resource`=?,`property_space`=?,`property_type`=?,`description`=?,`status`=?,`date`=?,`time`=? WHERE `id` = ?")) { $stmt_insert->bind_param("ssssssssssssssssi",$project_id,$plot_no,$full_name,$dob,$mobile_no1,$mobile_no2,$email,$address,$occupation,$resource,$property_space,$property_type,$description,$status,$date,$time,$res_edit_id); if($stmt_insert->execute()) { return true; } return false; } } function update_work_data($workers,$delivery_date,$remark,$res_edit_id) { $date = date("Y-m-d"); $time = date("H-i-s A"); if($stmt_insert = $this->con->prepare("UPDATE `assigned_work` SET `workers`=?,`delivery_date`=?,`remark`=?,`date`=?,`time`=? WHERE `id` = ?")) { $stmt_insert->bind_param("sssssi",$workers,$delivery_date,$remark,$date,$time,$res_edit_id); if($stmt_insert->execute()) { return true; } return false; } } function update_worker_payment($workers,$amount,$payment_method,$remark,$res_edit_id) { $date = date("Y-m-d"); $time = date("H-i-s A"); if($stmt_insert = $this->con->prepare("UPDATE `worker-payment` SET `name`=?,`amount`=?,`payment_method`=?,`remark`=?,`date`=?,`time`=? WHERE `id` = ?")) { $stmt_insert->bind_param("ssssssi",$workers,$amount,$payment_method,$remark,$date,$time,$res_edit_id); if($stmt_insert->execute()) { return true; } return false; } } function get_measurement_data_from_id($res_edit_id) { if($stmt = $this->con->prepare("SELECT `id`, `measurement_for`, `customer_name`, `shirt1`, `shirt2`, `shirt3`, `shirt4`, `shirt5`, `shirt6`, `shirt7`, `shirt8`, `shirt9`, `shirt10`, `shirt11`, `shirt12`, `shirt13`, `shirt14`, `shirt15`, `shirt16`, `shirt17`, `shirt18`, `cup_size`, `cup_style`, `shirt_style`, `shirt_size`, `patti`, `shirt_design`, `shirt_remark`, `pant1`, `pant2`, `pant3`, `pant4`, `pant5`, `pant6`, `pant7`, `pant8`, `pant9`, `pant10`, `pant11`, `pant12`, `pocket_size`, `back_pocket`, `watch_pocket`, `mobile_pocket`, `bottom_style`, `plate`, `pocket`, `iron`, `stiching`, `pant_remark`, `mobile_number`, `delivery_date`,`date`, `time` FROM `shirt_measurement` WHERE `id`=?")) { $stmt->bind_param("i",$res_edit_id); $stmt->bind_result($res_id,$measurement_for,$customer_name,$shirt1,$shirt2,$shirt3,$shirt4,$shirt5,$shirt6,$shirt7,$shirt8,$shirt9,$shirt10,$shirt11,$shirt12,$shirt13,$shirt14,$shirt15,$shirt16,$shirt17,$shirt18,$cup_size,$cup_style,$shirt_style,$shirt_size,$patti,$shirt_design,$shirt_remark,$pant1,$pant2,$pant3,$pant4,$pant5,$pant6,$pant7,$pant8,$pant9,$pant10,$pant11,$pant12,$pocket_size,$back_pocket,$watch_pocket,$mobile_pocket,$bottom_style,$plate,$pocket,$iron,$stiching,$pant_remark,$mobile_number,$delivery_date,$date,$time); if($stmt->execute()) { $users_data = array(); $counter = 0; } while($stmt->fetch()) { $users_data['id'] = $res_id; $users_data['measurement_for'] = $measurement_for; $users_data['customer_name'] = $customer_name; $users_data['shirt1'] = $shirt1; $users_data['shirt2'] = $shirt2; $users_data['shirt3'] = $shirt3; $users_data['shirt4'] = $shirt4; $users_data['shirt5'] = $shirt5; $users_data['shirt6'] = $shirt6; $users_data['shirt7'] = $shirt7; $users_data['shirt8'] = $shirt8; $users_data['shirt9'] = $shirt9; $users_data['shirt10'] = $shirt10; $users_data['shirt11'] = $shirt11; $users_data['shirt12'] = $shirt12; $users_data['shirt13'] = $shirt13; $users_data['shirt14'] = $shirt14; $users_data['shirt15'] = $shirt15; $users_data['shirt16'] = $shirt16; $users_data['shirt17'] = $shirt17; $users_data['shirt18'] = $shirt18; $users_data['cup_size'] = $cup_size; $users_data['cup_style'] = $cup_style; $users_data['shirt_style'] = $shirt_style; $users_data['shirt_size'] = $shirt_size; $users_data['patti'] = $patti; $users_data['shirt_design'] = $shirt_design; $users_data['shirt_remark'] = $shirt_remark; $users_data['pant1'] = $pant1; $users_data['pant2'] = $pant2; $users_data['pant3'] = $pant3; $users_data['pant4'] = $pant4; $users_data['pant5'] = $pant5; $users_data['pant6'] = $pant6; $users_data['pant7'] = $pant7; $users_data['pant8'] = $pant8; $users_data['pant9'] = $pant9; $users_data['pant10'] = $pant10; $users_data['pant11'] = $pant11; $users_data['pant12'] = $pant12; $users_data['pocket_size'] = $pocket_size; $users_data['back_pocket'] = $back_pocket; $users_data['watch_pocket'] = $watch_pocket; $users_data['mobile_pocket'] = $mobile_pocket; $users_data['bottom_style'] = $bottom_style; $users_data['plate'] = $plate; $users_data['pocket'] = $pocket; $users_data['iron'] = $iron; $users_data['stiching'] = $stiching; $users_data['pant_remark'] = $pant_remark; $users_data['mobile_number'] = $mobile_number; $users_data['delivery_date'] = $delivery_date; $users_data['date'] = $date; $users_data['time'] = $time; } if(!empty($users_data)) { return $users_data; } else { return false; } } } function get_user_payment_entry_data_from_id($receipt_id) { if($stmt = $this->con->prepare("SELECT `id`, `receipt_id`, `shirt_price`, `pant_price`, `total_amount`, `discount_amount`, `payable_amount`, `paid_amount`, `balance_amount`, `date`, `time` FROM `user_payment` Where `receipt_id`='".$receipt_id."'")) { $stmt->bind_result($res_id,$receipt_id,$shirt_price,$pant_price,$total_amount,$discount_amount,$payable_amount,$paid_amount,$balance_amount,$date,$time); if($stmt->execute()) { $users_data = array(); $counter = 0; while($stmt->fetch()) { $users_data[$counter][0] = $res_id; $users_data[$counter][1] = $receipt_id; $users_data[$counter][2] = $shirt_price; $users_data[$counter][3] = $pant_price; $users_data[$counter][4] = $total_amount; $users_data[$counter][5] = $discount_amount; $users_data[$counter][6] = $payable_amount; $users_data[$counter][7] = $paid_amount; $users_data[$counter][8] = $balance_amount; $users_data[$counter][9] = $date; $users_data[$counter][10] = $time; $counter++; } if(!empty($users_data)) { return $users_data; } else { return false; } } } } function get_customer_data_from_id($res_edit_id) { if($stmt = $this->con->prepare("SELECT `id`, `name`, `address`, `mobile_no`, `opening_balance`, `joining_date`, `photo`, `city`, `date`, `time` FROM `customer` WHERE `id`=?")) { $stmt->bind_param("i",$res_edit_id); $stmt->bind_result($res_id,$name,$address,$mobile_no,$opening_balance,$joining_date,$photo,$city,$date,$time); if($stmt->execute()) { $users_data = array(); $counter = 0; } while($stmt->fetch()) { $users_data['id'] = $res_id; $users_data['name'] = $name; $users_data['address'] = $address; $users_data['mobile_no'] = $mobile_no; $users_data['opening_balance'] = $opening_balance; $users_data['joining_date'] = $joining_date; $users_data['photo'] = $photo; $users_data['city'] = $city; $users_data['date'] = $date; $users_data['time'] = $time; } if(!empty($users_data)) { return $users_data; } else { return false; } } } function get_agent_data_from_id($res_edit_id) { if($stmt = $this->con->prepare("SELECT `id`, `employee_code`, `full_name`, `email_id`, `mobile_no`, `address`, `password`, `date`, `time` FROM `agent` WHERE `id`=?")) { $stmt->bind_param("i",$res_edit_id); $stmt->bind_result($res_id,$emp_code,$full_name,$email_id,$mobile_no,$address,$password,$date,$time); if($stmt->execute()) { $users_data = array(); $counter = 0; } while($stmt->fetch()) { $users_data['id'] = $res_id; $users_data['emp_code'] = $emp_code; $users_data['full_name'] = $full_name; $users_data['email_id'] = $email_id; $users_data['mobile_no'] = $mobile_no; $users_data['address'] = $address; $users_data['password'] = $password; $users_data['date'] = $date; $users_data['time'] = $time; } if(!empty($users_data)) { return $users_data; } else { return false; } } } function get_worker_data_from_id($res_edit_id) { if($stmt = $this->con->prepare("SELECT `id`, `name`, `address`, `mobile_no`, `opening_balance`, `joining_date`, `photo`, `city`, `date`, `time` FROM `worker` WHERE `id`=?")) { $stmt->bind_param("i",$res_edit_id); $stmt->bind_result($res_id,$name,$address,$mobile_no,$opening_balance,$joining_date,$photo,$city,$date,$time); if($stmt->execute()) { $users_data = array(); $counter = 0; } while($stmt->fetch()) { $users_data['id'] = $res_id; $users_data['name'] = $name; $users_data['address'] = $address; $users_data['mobile_no'] = $mobile_no; $users_data['opening_balance'] = $opening_balance; $users_data['joining_date'] = $joining_date; $users_data['photo'] = $photo; $users_data['city'] = $city; $users_data['date'] = $date; $users_data['time'] = $time; } if(!empty($users_data)) { return $users_data; } else { return false; } } } function get_booking_data_from_id($res_edit_id) { if($stmt = $this->con->prepare("SELECT `id`, `booking_date`, `select_project`, `unit_no`, `size_sq_ft`, `rate_sq_ft`, `total_amount`, `discount`, `rate_after_discount`, `round_off`, `net_amount`, `load_from_leads_data`, `mobile_no`, `custamer_name`, `email_id`, `address`, `pincode`, `dob`, `nominee`, `age_of_nominee`, `payment_type`, `adhar_number`, `PAN_card`, `adhar_card_image`, `PAN_card_image`, `customer_photo_adhar_card`, `cash_receipt_PAN_card_image`, `customer_image`, `cash_receipt`, `sold_by`, `commission`, `plat_status`, `remark`, `date`, `time` FROM `bookings` WHERE `id`=?")) { $stmt->bind_param("i",$res_edit_id); $stmt->bind_result($res_id,$booking_date,$select_project,$unit_no,$size_sq_ft,$rate_sq_ft,$total_amount,$discount,$rate_after_discount,$round_off,$net_amount,$load_from_leads_data,$mobile_no,$custamer_name,$email_id,$address,$pincode,$dob,$nominee,$age_of_nominee,$payment_type,$adhar_number,$PAN_card,$adhar_card_image,$PAN_card_image,$customer_photo_adhar_card,$cash_receipt_PAN_card_image,$customer_image,$cash_receipt,$sold_by,$commission,$plat_status,$remark,$date,$time); if($stmt->execute()) { $users_data = array(); $counter = 0; } while($stmt->fetch()) { $users_data['res_id'] = $res_id; $users_data['booking_date'] = $booking_date; $users_data['select_project'] = $select_project; $users_data['unit_no'] = $unit_no; $users_data['size_sq_ft'] = $size_sq_ft; $users_data['rate_sq_ft'] = $rate_sq_ft; $users_data['total_amount'] = $total_amount; $users_data['discount'] = $discount; $users_data['rate_after_discount'] = $rate_after_discount; $users_data['round_off'] = $round_off; $users_data['net_amount'] = $net_amount; $users_data['load_from_leads_data'] = $load_from_leads_data; $users_data['mobile_no'] = $mobile_no; $users_data['custamer_name'] = $custamer_name; $users_data['email_id'] = $email_id; $users_data['address'] = $address; $users_data['pincode'] = $pincode; $users_data['dob'] = $dob; $users_data['nominee'] = $nominee; $users_data['age_of_nominee'] = $age_of_nominee; $users_data['payment_type'] = $payment_type; $users_data['adhar_number'] = $adhar_number; $users_data['PAN_card'] = $PAN_card; $users_data['adhar_card_image'] = $adhar_card_image; $users_data['PAN_card_image'] = $PAN_card_image; $users_data['customer_photo_adhar_card'] = $customer_photo_adhar_card; $users_data['cash_receipt_PAN_card_image'] = $cash_receipt_PAN_card_image; $users_data['customer_image'] = $customer_image; $users_data['cash_receipt'] = $cash_receipt; $users_data['sold_by'] = $sold_by; $users_data['commission'] = $commission; $users_data['plat_status'] = $plat_status; $users_data['remark'] = $remark; $users_data['date'] = $date; $users_data['time'] = $time; } if(!empty($users_data)) { return $users_data; } else { return false; } } } function get_payment_data_from_id($res_edit_id) { if($stmt = $this->con->prepare("SELECT `id`, `received_date`, `receipt_no`, `manual_receipt_no`, `type_of_payment`, `payment_mode`, `amount`, `remark`, `date`, `time` FROM `payment` WHERE `id`=?")) { $stmt->bind_param("i",$res_edit_id); $stmt->bind_result($res_id,$received_date,$receipt_no,$manual_receipt_no,$type_of_payment,$payment_mode,$amount,$remark,$date,$time); if($stmt->execute()) { $users_data = array(); $counter = 0; } while($stmt->fetch()) { $users_data['res_id'] = $res_id; $users_data['received_date'] = $received_date; $users_data['receipt_no'] = $receipt_no; $users_data['manual_receipt_no'] = $manual_receipt_no; $users_data['type_of_payment'] = $type_of_payment; $users_data['payment_mode'] = $payment_mode; $users_data['amount'] = $amount; $users_data['remark'] = $remark; $users_data['date'] = $date; $users_data['time'] = $time; } if(!empty($users_data)) { return $users_data; } else { return false; } } } function get_enquiry_data_from_id($res_edit_id) { if($stmt = $this->con->prepare("SELECT `id`, `project_id`,`plot_no`, `full_name`, `dob`, `mobile_no1`, `mobile_no2`, `email`, `address`, `occupation`, `resource`, `property_space`, `property_type`, `description`, `status`, `date`, `time` FROM `enquiry_form` WHERE `id`=?")) { $stmt->bind_param("i",$res_edit_id); $stmt->bind_result($res_id,$project_id,$plot_no,$full_name,$dob,$mobile_no1,$mobile_no2,$email,$address,$occupation,$resource,$property_space,$property_type,$description,$status,$date,$time); if($stmt->execute()) { $users_data = array(); $counter = 0; } while($stmt->fetch()) { $users_data['res_id'] = $res_id; $users_data['project_id'] = $project_id; $users_data['plot_no'] = $plot_no; $users_data['full_name'] = $full_name; $users_data['dob'] = $dob; $users_data['mobile_no1'] = $mobile_no1; $users_data['mobile_no2'] = $mobile_no2; $users_data['email'] = $email; $users_data['address'] = $address; $users_data['occupation'] = $occupation; $users_data['resource'] = $resource; $users_data['property_space'] = $property_space; $users_data['property_type'] = $property_type; $users_data['description'] = $description; $users_data['status'] = $status; $users_data['date'] = $date; $users_data['time'] = $time; } if(!empty($users_data)) { return $users_data; } else { return false; } } } function get_work_data_from_id($res_edit_id) { if($stmt = $this->con->prepare("SELECT `id`, `workers`, `delivery_date`, `remark`, `date`, `time` FROM `assigned_work` WHERE `id`=?")) { $stmt->bind_param("i",$res_edit_id); $stmt->bind_result($res_id,$workers,$delivery_date,$remark,$date,$time); if($stmt->execute()) { $users_data = array(); $counter = 0; } while($stmt->fetch()) { $users_data['res_id'] = $res_id; $users_data['workers'] = $workers; $users_data['delivery_date'] = $delivery_date; $users_data['remark'] = $remark; $users_data['date'] = $date; $users_data['time'] = $time; } if(!empty($users_data)) { return $users_data; } else { return false; } } } function get_worker_payment_from_id($res_edit_id) { if($stmt = $this->con->prepare("SELECT `id`, `name`, `amount`, `payment_method`, `remark`, `date`, `time` FROM `worker-payment` WHERE `id`=?")) { $stmt->bind_param("i",$res_edit_id); $stmt->bind_result($res_id,$workers,$amount,$payment_method,$remark,$date,$time); if($stmt->execute()) { $users_data = array(); $counter = 0; } while($stmt->fetch()) { $users_data['res_id'] = $res_id; $users_data['workers'] = $workers; $users_data['amount'] = $amount; $users_data['payment_method'] = $payment_method; $users_data['remark'] = $remark; $users_data['date'] = $date; $users_data['time'] = $time; } if(!empty($users_data)) { return $users_data; } else { return false; } } } function insert_master_categor_title($master_category,$title) { $date = date("Y-m-d"); $time = date("H-i-s A"); if($stmt_insert = $this->con->prepare("INSERT INTO `tailor_master`( `category`, `title`, `date`, `time`) VALUES (?,?,?,?)")) { $stmt_insert->bind_param("ssss",$master_category,$title,$date,$time); if($stmt_insert->execute()) { return true; } return false; } } function get_project_count_from_projects() { if($stmt_select = $this->con->prepare("SELECT COUNT(`id`) FROM `projects`")); { $stmt_select->bind_result($result_count); if($stmt_select->execute()) { if($stmt_select->fetch()) { return $result_count; } } return false; } } function get_booking_count_from_bookings() { if($stmt_select = $this->con->prepare("SELECT COUNT(`id`) FROM `bookings`")); { $stmt_select->bind_result($result_count); if($stmt_select->execute()) { if($stmt_select->fetch()) { return $result_count; } } return false; } } function get_agent_password($var_mobile_no) { if($stmt=$this->con->prepare("SELECT `password` from `agent` WHERE `mobile_no` =? ")) { $stmt->bind_param("s",$var_mobile_no); $stmt->bind_result($var_password); if($stmt->execute()) { if($stmt->fetch()) { return $var_password; } else { return false; } } } } function get_project_details_from_id($res_edit_id) { if($stmt = $this->con->prepare("SELECT `id`, `project_name`, `project_address`, `registration_no`, `location`, `project_type`, `project_current_status`, `project_layout`, `project_logo`, `image1`, `image2`, `image3`, `image4`, `image5`, `image6`, `image7`, `image8`, `image9`, `image10`, `video`, `no_of_towers`, `project_selling_status`, `latitude`, `longitude`, `added`, `project_facilities`, `description`, `date`, `time` FROM `projects` WHERE `id`=?")) { $stmt->bind_param("i",$res_edit_id); $stmt->bind_result($res_id,$project_name,$project_address,$registration_no,$location,$project_type,$project_current_status,$project_layout,$project_logo,$image1,$image2,$image3,$image4,$image5,$image6,$image7,$image8,$image9,$image10,$video,$no_of_towers,$project_selling_status,$latitude,$longitude,$added,$project_facilities,$description,$date,$time); if($stmt->execute()) { $details=array(); if($stmt->fetch()) { $details['id'] = $res_id; $details['project_name'] = $project_name; $details['project_address'] = $project_address; $details['registration_no'] = $registration_no; $details['location'] = $location; $details['project_type'] = $project_type; $details['project_current_status'] = $project_current_status; $details['project_layout'] = $project_layout; $details['project_logo'] = $project_logo; $details['image1'] = $image1; $details['image2'] = $image2; $details['image3'] = $image3; $details['image4'] = $image4; $details['image5'] = $image5; $details['image6'] = $image6; $details['image7'] = $image7; $details['image8'] = $image8; $details['image9'] = $image9; $details['image10'] = $image10; $details['video'] = $video; $details['no_of_towers'] = $no_of_towers; $details['project_selling_status'] = $project_selling_status; $details['latitude'] = $latitude; $details['longitude'] = $longitude; $details['added'] = $added; $details['project_facilities'] = $project_facilities; $details['description'] = $description; $details['date'] = $date; $details['time'] = $time; } if(!empty($details)) { return $details; } return false; } } } function get_all_plot_project_from_projectid($res_edit_id) { if($stmt_insert = $this->con->prepare("SELECT `id`, `project_id`, `plot_owener`, `enter_floor_no`, `unit_no`, `unit_label`, `sq_mtr`, `sq_ft`, `lambi`, `rundi`, `plot_status`, `unit_type`, `select_bhk`, `carpet_area`, `bulit_up_area`, `saleable_area`, `facing`, `approximate_rate_per_sq_ft`, `latitude`, `longitude`, `phase`, `image1`, `image2`, `image3`, `image4`, `image5`, `date`, `time` FROM `plot_project`")) { $stmt_insert->bind_result($id,$project_id,$plot_owener,$enter_floor_no,$unit_no,$unit_label,$sq_mtr,$sq_ft,$lambi,$rundi,$carpet_area,$bulit_up_area,$saleable_area,$facing,$approximate_rate_per_sq_ft,$latitude,$longitude,$phase,$plot_status,$unit_type,$select_bhk,$image1,$image2,$image3,$image4,$image5,$date,$time); if($stmt_insert->execute()) { $counter = 0; $details = array(); while($stmt_insert->fetch()) { $details[$counter][0] = $id; $details[$counter][1] = $project_id; $details[$counter][2] = $plot_owener; $details[$counter][3] = $enter_floor_no; $details[$counter][4] = $unit_no; $details[$counter][5] = $unit_label; $details[$counter][6] = $sq_mtr; $details[$counter][7] = $sq_ft; $details[$counter][8] = $lambi; $details[$counter][9] = $rundi; $details[$counter][10] = $plot_status; $details[$counter][11] = $unit_type; $details[$counter][12] = $select_bhk; $details[$counter][13] = $carpet_area; $details[$counter][14] = $bulit_up_area; $details[$counter][15] = $saleable_area; $details[$counter][16] = $facing; $details[$counter][17] = $approximate_rate_per_sq_ft; $details[$counter][18] = $latitude; $details[$counter][19] = $longitude; $details[$counter][20] = $phase; $details[$counter][21] = $image1; $details[$counter][22] = $image2; $details[$counter][23] = $image3; $details[$counter][24] = $image4; $details[$counter][25] = $image5; $details[$counter][26] = $date; $details[$counter][27] = $time; $counter++; } if(!empty($details)) { return $details; } return false; } } } }//End Of Class ?>
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