Şuanki Dizin: /home/wwwdreamtechnolo/www/spmsolapur.org/mis_software/bkp/lib/ |
Şuanki Dosya : /home/wwwdreamtechnolo/www/spmsolapur.org/mis_software/bkp/lib/functions.php |
<?php header( 'Content-Type: text/html; charset=utf-8'); session_start(); $application_title = "SPM MIS SOFTWARE"; class db_functions { private $con; function __construct() { $this->con = new mysqli("localhost","root","","spm_mis_software"); //$this->con = new mysqli("localhost","eaglegro_shanti","eaglegro_shanti**7711","eaglegro_shanti"); mysqli_set_charset($this->con, 'utf8'); } function get_admin_password($email,$type) { if($stmt = $this->con->prepare("SELECT `password` FROM `admin` WHERE `user_id` = ? AND `type`=?")) { $stmt->bind_param("ss",$email,$type); $stmt->bind_result($res_password); if($stmt->execute()) { if($stmt->fetch()) { return $res_password; } return False; } } } function get_stud_contact_data($current_stud) { if($stmt = $this->con->prepare("SELECT `stud_cont_no`, `father_cont_no`, `mother_cont_no` FROM `student_details` WHERE `id`=?")) { $stmt->bind_param("i",$current_stud); $stmt->bind_result($stud_cont_no,$father_cont_no,$mother_cont_no); if($stmt->execute()) { $data = array(); if($stmt->fetch()) { $data[0] = $stud_cont_no; $data[1] = $father_cont_no; $data[2] = $mother_cont_no; return $data; } return False; } } } function update_new_password($new_password,$email_id) { if($stmt = $this->con->prepare("UPDATE `admin` SET `password`= ? WHERE `user_id` = ?")) { $stmt->bind_param("ss",$new_password,$email_id); if($stmt->execute()) { return true; } return False; } } function update_ss_data($class,$div,$medium,$stud_roll_no,$value,$col) { if($stmt = $this->con->prepare("UPDATE `student_details` SET `$col`= ? WHERE `class` = ? AND `medium`=? AND `division` = ? AND `roll_no` = ?")) { $stmt->bind_param("sssss",$value,$class,$medium,$div,$stud_roll_no); if($stmt->execute()) { return true; } return False; } } function get_division_master_id_from_title($division) { if($stmt = $this->con->prepare("SELECT `id` FROM `division_master` WHERE `division` = ?")) { $stmt->bind_param("s",$division); $stmt->bind_result($res_id); if($stmt->execute()) { if($stmt->fetch()) { return $res_id; } return False; } } } function save_division_master_details($division) { $date = date("Y-m-d"); $time = date("H:i:s t"); if($stmt = $this->con->prepare("INSERT INTO `division_master`(`division`, `date`, `time`) VALUES (?,?,?)")) { $stmt->bind_param("sss",$division,$date,$time); if($stmt->execute()) { return true; } return false; } } function delete_division_master_data($delete_id) { if($stmt = $this->con->prepare("DELETE FROM `division_master` WHERE `id` = ?")) { $stmt->bind_param("i",$delete_id); if($stmt->execute()) { return true; } return False; } } function get_all_division_master_data() { if($stmt = $this->con->prepare("SELECT `id`, `division`, `date` FROM `division_master`")) { $stmt->bind_result($res_id,$res_division,$res_date); if($stmt->execute()) { $data = array(); $row_counter = 0; while($stmt->fetch()) { $data[$row_counter][0] = $res_id; $data[$row_counter][1] = $res_division; $data[$row_counter][2] = $res_date; $row_counter++; } if(!empty($data)) { return $data; } else { return false; } } } } function get_student_id($class,$medium,$division,$surname,$stud_name,$father_name,$father_contact,$g_r_no,$acd_year) { if($stmt = $this->con->prepare("SELECT `id` FROM `student_details` WHERE `class`=? AND `medium`=? AND `division`=? AND `surname`=? AND `student_name`=? AND `father_name`=? AND `father_cont_no`=? AND `g-r-no`=? AND `academic_year`=?")) { $stmt->bind_param("sssssssss",$class,$medium,$division,$surname,$stud_name,$father_name,$father_contact,$g_r_no,$acd_year); $stmt->bind_result($res_id); if($stmt->execute()) { if($stmt->fetch()) { return $res_id; } return False; } } } function get_student_gr_id($class,$medium,$division,$surname,$stud_name,$father_name,$father_contact,$no_of_pupil) { if($stmt = $this->con->prepare("SELECT `no_of_pupil` FROM `student_details` WHERE `class`=? AND `medium`=? AND `division`=? AND `surname`=? AND `student_name`=? AND `father_name`=? AND `father_cont_no`=? AND `no_of_pupil`=?")) { $stmt->bind_param("ssssssss",$class,$medium,$division,$surname,$stud_name,$father_name,$father_contact,$no_of_pupil); $stmt->bind_result($res_id); if($stmt->execute()) { if($stmt->fetch()) { return $res_id; } return False; } } } function save_student_record($class,$medium,$division,$roll_no,$surname,$stud_name,$father_name,$mother_name,$stud_contact,$father_contact,$mother_contact,$residential_no,$address,$cor_address,$child_desc,$email,$aadhar_number,$religion,$caste,$category,$mother_tongue,$nationality,$birth_place,$birth_date,$gender,$last_school,$admission_date,$blood_group,$height,$weight,$actual_image_name,$actual_image_name1,$actual_image_name2,$advertising_board,$news_paper,$teachers,$friends,$ex_students,$pre_class,$other,$remarks,$no_of_pupil,$stud_id_for_lc,$g_r_no,$qualification,$occupation,$monthly_income,$office_add,$residential_add,$mother_qualifi,$mother_occupation,$mother_income,$mother_office_add,$mother_resident_add,$birth_district,$birth_state,$birth_country,$acd_year,$sub_caste,$progress,$student_conduct,$leaving_date,$leaving_standard,$leaving_reason,$certificate_no) { $date = date("Y-m-d"); $time = date("H:i:s t"); if($stmt = $this->con->prepare("INSERT INTO `student_details`(`class`, `medium`, `division`, `roll_no`, `surname`, `student_name`, `father_name`, `mother_name`, `stud_cont_no`, `father_cont_no`, `mother_cont_no`, `residential_no`, `address`, `corres_address`, `child_desc`, `email`, `aadhar_number`, `religion`, `caste`, `category`, `mother_tongue`, `nationality`, `place_of_birth`, `birth_date`, `gender`, `last_school`, `admission_date`, `blood_group`, `height`, `weight`, `student_image`, `birth_certificate`, `caste_certificate`, `advertising_board`, `news_paper`, `teachers`, `friends`, `ex_students`, `pre_class_student`, `other`, `remarks`, `no_of_pupil`, `stud_id_for_lc`, `g-r-no`, `father_qualification`, `father_occupation`, `father_monthly_income`, `father_office_add`, `father_resident_add`, `mother_qualifi`, `mother_occupation`, `mother_income`, `mother_office_add`, `mother_resident_add`, `date`, `time`, `birth_district`, `birth_state`, `birth_country`,`academic_year`,`sub_caste`,`progress`, `conduct`, `leaving_school_date`,`standard_sinse_when`, `leaving_school_reason`,`certificate_no`) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)")) { $stmt->bind_param("sssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss",$class,$medium,$division,$roll_no,$surname,$stud_name,$father_name,$mother_name,$stud_contact,$father_contact,$mother_contact,$residential_no,$address,$cor_address,$child_desc,$email,$aadhar_number,$religion,$caste,$category,$mother_tongue,$nationality,$birth_place,$birth_date,$gender,$last_school,$admission_date,$blood_group,$height,$weight,$actual_image_name,$actual_image_name1,$actual_image_name2,$advertising_board,$news_paper,$teachers,$friends,$ex_students,$pre_class,$other,$remarks,$no_of_pupil,$stud_id_for_lc,$g_r_no,$qualification,$occupation,$monthly_income,$office_add,$residential_add,$mother_qualifi,$mother_occupation,$mother_income,$mother_office_add,$mother_resident_add,$date,$time,$birth_district,$birth_state,$birth_country,$acd_year,$sub_caste,$progress,$student_conduct,$leaving_date,$leaving_standard,$leaving_reason,$certificate_no); if($stmt->execute()) { return true; } return false; } } /*------*/ function save_student_detail($class,$medium,$division,$roll_no,$surname,$stud_name,$father_name,$mother_name,$acd_year) { $date = date("Y-m-d"); $time = date("H:i:s t"); if($stmt = $this->con->prepare("INSERT INTO `student_details`(`class`, `medium`, `division`, `roll_no`, `surname`, `student_name`, `father_name`, `mother_name`, `date`, `time`,`academic_year`) VALUES (?,?,?,?,?,?,?,?,?,?,?)")) { $stmt->bind_param("sssssssssss",$class,$medium,$division,$roll_no,$surname,$stud_name,$father_name,$mother_name,$date,$time,$acd_year); if($stmt->execute()) { return $stmt->insert_id; } return false; } } /*----*/ function update_student_data1($stud_contact,$father_contact,$mother_contact,$residential_no,$address,$cor_address,$child_desc,$email,$aadhar_number,$religion,$caste,$category,$mother_tongue,$nationality,$inserted_id) { if($stmt = $this->con->prepare("UPDATE `student_details` SET`stud_cont_no`=?,`father_cont_no`=?,`mother_cont_no`=?,`residential_no`=?,`address`=?,`corres_address`=?,`child_desc`=?,`email`=?,`aadhar_number`=?,`religion`=?,`caste`=?,`category`=?,`mother_tongue`=?,`nationality`=? WHERE `id`=?")) { $stmt->bind_param("sssssssssssssss",$stud_contact,$father_contact,$mother_contact,$residential_no,$address,$cor_address,$child_desc,$email,$aadhar_number,$religion,$caste,$category,$mother_tongue,$nationality,$inserted_id); if($stmt->execute()) { return true; } return False; } } function update_student_data2($birth_place,$birth_district,$birth_states,$birth_country,$birth_date,$gender,$last_school,$admission_date,$remarks,$no_of_pupil,$stud_id_for_lc,$inserted_id) { if($stmt = $this->con->prepare("UPDATE `student_details` SET `place_of_birth`=?,`birth_district`=?,`birth_state`=?,`birth_country`=?,`birth_date`=?,`gender`=?,`last_school`=?,`admission_date`=?,`remarks`=?,`no_of_pupil`=?,`stud_id_for_lc`=? WHERE `id`=?")) { $stmt->bind_param("ssssssssssss",$birth_place,$birth_district,$birth_states,$birth_country,$birth_date,$gender,$last_school,$admission_date,$remarks,$no_of_pupil,$stud_id_for_lc,$inserted_id); if($stmt->execute()) { return true; } return False; } } function update_student_data3($certificate_no,$progress,$conduct,$leaving_school_date,$standard_sinse_when,$leaving_school_reason,$inserted_id,$sub_caste) { if($stmt = $this->con->prepare("UPDATE `student_details` SET `certificate_no`=?,`progress`=?,`conduct`=?,`leaving_school_date`=?,`standard_sinse_when`=?,`leaving_school_reason`=?,`sub_caste`=? WHERE `id`=? ")) { $stmt->bind_param("ssssssss",$certificate_no,$progress,$conduct,$leaving_school_date,$standard_sinse_when,$leaving_school_reason,$sub_caste,$inserted_id); if($stmt->execute()) { return true; } return False; } } function get_all_student_data($acd_year) { if($stmt = $this->con->prepare("SELECT `id`, `class`, `medium`, `division`, `roll_no`, `surname`, `student_name`, `father_name`, `mother_name`, `stud_cont_no`, `father_cont_no`, `mother_cont_no`, `residential_no`, `address`, `corres_address`, `child_desc`, `email`, `aadhar_number`, `religion`, `caste`, `category`, `mother_tongue`, `nationality`, `place_of_birth`, `birth_date`, `gender`, `last_school`, `admission_date`, `blood_group`, `height`, `weight`, `student_image`, `birth_certificate`, `caste_certificate`, `advertising_board`, `news_paper`, `teachers`, `friends`, `ex_students`, `pre_class_student`, `other`, `remarks`, `no_of_pupil`, `stud_id_for_lc`, `g-r-no`, `father_qualification`, `father_occupation`, `father_monthly_income`, `father_office_add`, `father_resident_add`, `mother_qualifi`, `mother_occupation`, `mother_income`, `mother_office_add`, `mother_resident_add`, `date` FROM `student_details` WHERE `status`!= 'Cancelled' AND `academic_year`=?")) { $stmt->bind_param("s",$acd_year); $stmt->bind_result($res_id,$res_class,$res_medium,$res_division,$res_roll_no,$res_surname,$res_stud_name,$res_father_name,$res_mother_name,$res_stud_cont,$res_father_cont,$res_mother_cont,$res_residential_no,$res_address,$res_corres_add,$res_child_desc,$res_email,$res_aadhar_no,$res_religion,$res_caste,$res_category,$res_mother_tongue,$res_nationality,$res_birth_palce,$res_birth_date,$res_gender,$res_last_school,$res_admission_date,$res_blood_group,$res_height,$res_weight,$res_student_image,$res_birth_certi,$res_caste_certi,$res_adv_board,$res_news_paper,$res_teachers,$res_friends,$res_ex_students,$res_pre_class,$res_other,$res_remarks,$res_no_of_pupil,$res_stud_id_for_lc,$res_gr_no,$res_father_quali,$res_father_occu,$res_father_income,$res_father_office_add,$res_father_resident_add,$res_mother_qualifi,$res_mother_occupa,$res_mother_income,$res_mother_office_add,$res_mother_resident_add,$res_date); if($stmt->execute()) { $data = array(); $row_counter = 0; while($stmt->fetch()) { $data[$row_counter][0] = $res_id; $data[$row_counter][1] = $res_class; $data[$row_counter][2] = $res_medium; $data[$row_counter][3] = $res_division; $data[$row_counter][4] = $res_roll_no; $data[$row_counter][5] = $res_surname; $data[$row_counter][6] = $res_stud_name; $data[$row_counter][7] = $res_father_name; $data[$row_counter][8] = $res_mother_name; $data[$row_counter][9] = $res_stud_cont; $data[$row_counter][10] = $res_father_cont; $data[$row_counter][11] = $res_mother_cont; $data[$row_counter][12] = $res_residential_no; $data[$row_counter][13] = $res_address; $data[$row_counter][14] = $res_corres_add; $data[$row_counter][15] = $res_child_desc; $data[$row_counter][16] = $res_email; $data[$row_counter][17] = $res_aadhar_no; $data[$row_counter][18] = $res_religion; $data[$row_counter][19] = $res_caste; $data[$row_counter][20] = $res_category; $data[$row_counter][21] = $res_mother_tongue; $data[$row_counter][22] = $res_nationality; $data[$row_counter][23] = $res_birth_palce; $data[$row_counter][24] = $res_birth_date; $data[$row_counter][25] = $res_gender; $data[$row_counter][26] = $res_last_school; $data[$row_counter][27] = $res_admission_date; $data[$row_counter][28] = $res_blood_group; $data[$row_counter][29] = $res_height; $data[$row_counter][30] = $res_weight; $data[$row_counter][31] = $res_student_image; $data[$row_counter][32] = $res_birth_certi; $data[$row_counter][33] = $res_caste_certi; $data[$row_counter][34] = $res_remarks; $data[$row_counter][35] = $res_no_of_pupil; $data[$row_counter][36] = $res_stud_id_for_lc; $data[$row_counter][37] = $res_father_quali; $data[$row_counter][38] = $res_father_occu; $data[$row_counter][39] = $res_father_income; $data[$row_counter][40] = $res_father_office_add; $data[$row_counter][41] = $res_father_resident_add; $data[$row_counter][42] = $res_mother_qualifi; $data[$row_counter][43] = $res_mother_occupa; $data[$row_counter][44] = $res_mother_income; $data[$row_counter][45] = $res_mother_office_add; $data[$row_counter][46] = $res_mother_resident_add; $data[$row_counter][47] = $res_date; $data[$row_counter][48] = $res_adv_board; $data[$row_counter][49] = $res_news_paper; $data[$row_counter][50] = $res_teachers; $data[$row_counter][51] = $res_friends; $data[$row_counter][52] = $res_ex_students; $data[$row_counter][53] = $res_pre_class; $data[$row_counter][54] = $res_other; $data[$row_counter][55] = $res_gr_no; $row_counter++; } if(!empty($data)) { return $data; } else { return false; } } } } function get_student_record_from_date1($from_date,$to_date,$class,$medium,$division,$gr_no,$stud_name,$acd_year) { if($stmt = $this->con->prepare("SELECT `id`, `class`, `medium`, `division`, `roll_no`, `surname`, `student_name`, `father_name`, `mother_name`, `stud_cont_no`, `father_cont_no`, `mother_cont_no`, `residential_no`, `address`, `corres_address`, `child_desc`, `email`, `aadhar_number`, `religion`, `caste`, `category`, `mother_tongue`, `nationality`, `place_of_birth`, `birth_date`, `gender`, `last_school`, `admission_date`, `blood_group`, `height`, `weight`, `student_image`, `birth_certificate`, `caste_certificate`, `advertising_board`, `news_paper`, `teachers`, `friends`, `ex_students`, `pre_class_student`, `other`, `remarks`, `no_of_pupil`, `stud_id_for_lc`, `g-r-no`, `father_qualification`, `father_occupation`, `father_monthly_income`, `father_office_add`, `father_resident_add`, `mother_qualifi`, `mother_occupation`, `mother_income`, `mother_office_add`, `mother_resident_add`, `date` FROM `student_details` WHERE `class`=? AND `academic_year` LIKE '%".$acd_year."%' AND `medium` LIKE '%".$medium."%' AND `division` LIKE '%".$division."%' AND `no_of_pupil` LIKE '%".$gr_no."%' AND (`surname` LIKE '%".$stud_name."%' Or `student_name` LIKE '%".$stud_name."%' Or `father_name` LIKE '%".$stud_name."%') AND`status`!= 'yes' ")) { $stmt->bind_result($res_id,$res_class,$res_medium,$res_division,$res_roll_no,$res_surname,$res_stud_name,$res_father_name,$res_mother_name,$res_stud_cont,$res_father_cont,$res_mother_cont,$res_residential_no,$res_address,$res_corres_add,$res_child_desc,$res_email,$res_aadhar_no,$res_religion,$res_caste,$res_category,$res_mother_tongue,$res_nationality,$res_birth_palce,$res_birth_date,$res_gender,$res_last_school,$res_admission_date,$res_blood_group,$res_height,$res_weight,$res_student_image,$res_birth_certi,$res_caste_certi,$res_adv_board,$res_news_paper,$res_teachers,$res_friends,$res_ex_students,$res_pre_class,$res_other,$res_remarks,$res_no_of_pupil,$res_stud_id_for_lc,$res_gr_no,$res_father_quali,$res_father_occu,$res_father_income,$res_father_office_add,$res_father_resident_add,$res_mother_qualifi,$res_mother_occupa,$res_mother_income,$res_mother_office_add,$res_mother_resident_add,$res_date); $stmt->bind_param("s",$class); if($stmt->execute()) { $data = array(); $row_counter = 0; while($stmt->fetch()) { $data[$row_counter][0] = $res_id; $data[$row_counter][1] = $res_class; $data[$row_counter][2] = $res_medium; $data[$row_counter][3] = $res_division; $data[$row_counter][4] = $res_roll_no; $data[$row_counter][5] = $res_surname; $data[$row_counter][6] = $res_stud_name; $data[$row_counter][7] = $res_father_name; $data[$row_counter][8] = $res_mother_name; $data[$row_counter][9] = $res_stud_cont; $data[$row_counter][10] = $res_father_cont; $data[$row_counter][11] = $res_mother_cont; $data[$row_counter][12] = $res_residential_no; $data[$row_counter][13] = $res_address; $data[$row_counter][14] = $res_corres_add; $data[$row_counter][15] = $res_child_desc; $data[$row_counter][16] = $res_email; $data[$row_counter][17] = $res_aadhar_no; $data[$row_counter][18] = $res_religion; $data[$row_counter][19] = $res_caste; $data[$row_counter][20] = $res_category; $data[$row_counter][21] = $res_mother_tongue; $data[$row_counter][22] = $res_nationality; $data[$row_counter][23] = $res_birth_palce; $data[$row_counter][24] = $res_birth_date; $data[$row_counter][25] = $res_gender; $data[$row_counter][26] = $res_last_school; $data[$row_counter][27] = $res_admission_date; $data[$row_counter][28] = $res_blood_group; $data[$row_counter][29] = $res_height; $data[$row_counter][30] = $res_weight; $data[$row_counter][31] = $res_student_image; $data[$row_counter][32] = $res_birth_certi; $data[$row_counter][33] = $res_caste_certi; $data[$row_counter][34] = $res_remarks; $data[$row_counter][35] = $res_no_of_pupil; $data[$row_counter][36] = $res_stud_id_for_lc; $data[$row_counter][37] = $res_father_quali; $data[$row_counter][38] = $res_father_occu; $data[$row_counter][39] = $res_father_income; $data[$row_counter][40] = $res_father_office_add; $data[$row_counter][41] = $res_father_resident_add; $data[$row_counter][42] = $res_mother_qualifi; $data[$row_counter][43] = $res_mother_occupa; $data[$row_counter][44] = $res_mother_income; $data[$row_counter][45] = $res_mother_office_add; $data[$row_counter][46] = $res_mother_resident_add; $data[$row_counter][47] = $res_date; $data[$row_counter][48] = $res_adv_board; $data[$row_counter][49] = $res_news_paper; $data[$row_counter][50] = $res_teachers; $data[$row_counter][51] = $res_friends; $data[$row_counter][52] = $res_ex_students; $data[$row_counter][53] = $res_pre_class; $data[$row_counter][54] = $res_other; $data[$row_counter][55] = $res_gr_no; $row_counter++; } if(!empty($data)) { return $data; } else { return false; } } } } function delete_student_record($del_id) { if($stmt = $this->con->prepare("DELETE FROM `student_details` WHERE `id` = ?")) { $stmt->bind_param("i",$del_id); if($stmt->execute()) { return true; } return False; } } function set_student_image_blank($delete_id) { if($stmt = $this->con->prepare("UPDATE `student_details` SET `student_image`= '' WHERE `id` = ?")) { $stmt->bind_param("i",$delete_id); if($stmt->execute()) { return true; } return False; } } function set_birth_certificate_blank($delete_id) { if($stmt = $this->con->prepare("UPDATE `student_details` SET `birth_certificate`= '' WHERE `id` = ?")) { $stmt->bind_param("i",$delete_id); if($stmt->execute()) { return true; } return False; } } function set_caste_certificate_blank($delete_id) { if($stmt = $this->con->prepare("UPDATE `student_details` SET `caste_certificate`= '' WHERE `id` = ?")) { $stmt->bind_param("i",$delete_id); if($stmt->execute()) { return true; } return False; } } function update_student_information($class,$medium,$division,$roll_no,$surname,$stud_name,$father_name,$mother_name,$stud_contact,$father_contact,$mother_contact,$residential_no,$address,$cor_address,$child_desc,$email,$aadhar_number,$religion,$caste,$category,$mother_tongue,$nationality,$birth_place,$birth_date,$gender,$last_school,$admission_date,$blood_group,$height,$weight,$advertising_board,$news_paper,$teachers,$friends,$ex_students,$pre_class,$other,$remarks,$no_of_pupil,$stud_id_for_lc,$g_r_no,$tc_status,$qualification,$occupation,$monthly_income,$office_add,$residential_add,$mother_qualifi,$mother_occupation,$mother_income,$mother_office_add,$mother_resident_add,$certifi_no,$progress,$conduct,$leaving_school_date,$standard_sinse_when,$leaving_school_reason,$birth_district,$birth_state,$birth_country,$sub_caste,$edit_id) { $date = date("Y-m-d"); $time = date("H:i:s A"); if($stmt_select = $this->con->prepare("UPDATE `student_details` SET `class`=?,`medium`=?,`division`=?,`roll_no`=?,`surname`=?,`student_name`=?,`father_name`=?,`mother_name`=?,`stud_cont_no`=?,`father_cont_no`=?,`mother_cont_no`=?,`residential_no`=?,`address`=?,`corres_address`=?,`child_desc`=?,`email`=?,`aadhar_number`=?,`religion`=?,`caste`=?,`category`=?,`mother_tongue`=?,`nationality`=?,`place_of_birth`=?,`birth_date`=?,`gender`=?,`last_school`=?,`admission_date`=?,`blood_group`=?,`height`=?,`weight`=?,`advertising_board`=?,`news_paper`=?,`teachers`=?,`friends`=?,`ex_students`=?,`pre_class_student`=?,`other`=?,`remarks`=?,`no_of_pupil`=?,`stud_id_for_lc`=?,`g-r-no`=?,`status`=?,`father_qualification`=?,`father_occupation`=?,`father_monthly_income`=?,`father_office_add`=?,`father_resident_add`=?,`mother_qualifi`=?,`mother_occupation`=?,`mother_income`=?,`mother_office_add`=?,`mother_resident_add`=?,`certificate_no`=?,`progress`=?,`conduct`=?,`leaving_school_date`=?,`standard_sinse_when`=?,`leaving_school_reason`=?,`birth_district`=?,`birth_state`=?,`birth_country`=?,`date`=?,`time`=? ,`sub_caste`=? WHERE `id`=?")) { $stmt_select->bind_param("ssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssi",$class,$medium,$division,$roll_no,$surname,$stud_name,$father_name,$mother_name,$stud_contact,$father_contact,$mother_contact,$residential_no,$address,$cor_address,$child_desc,$email,$aadhar_number,$religion,$caste,$category,$mother_tongue,$nationality,$birth_place,$birth_date,$gender,$last_school,$admission_date,$blood_group,$height,$weight,$advertising_board,$news_paper,$teachers,$friends,$ex_students,$pre_class,$other,$remarks,$no_of_pupil,$stud_id_for_lc,$g_r_no,$tc_status,$qualification,$occupation,$monthly_income,$office_add,$residential_add,$mother_qualifi,$mother_occupation,$mother_income,$mother_office_add,$mother_resident_add,$certifi_no,$progress,$conduct,$leaving_school_date,$standard_sinse_when,$leaving_school_reason,$birth_district,$birth_state,$birth_country,$date,$time,$sub_caste,$edit_id); if($stmt_select->execute()) { return true; } return false; } } function get_student_image_icon($edit_id) { if($stmt = $this->con->prepare("SELECT `student_image` FROM `student_details` WHERE `id` = ?")) { $stmt->bind_param("i",$edit_id); $stmt->bind_result($res_image); if($stmt->execute()) { $data = array(); if($stmt->fetch()) { return $res_image; } return false; } } } function update_student_image($actual_image_name,$edit_id) { if($stmt = $this->con->prepare("UPDATE `student_details` SET `student_image`= ? WHERE `id` = ?")) { $stmt->bind_param("si",$actual_image_name,$edit_id); if($stmt->execute()) { return true; } return False; } } function get_birth_certificate_image($edit_id) { if($stmt = $this->con->prepare("SELECT `birth_certificate` FROM `student_details` WHERE `id` = ?")) { $stmt->bind_param("i",$edit_id); $stmt->bind_result($res_image); if($stmt->execute()) { $data = array(); if($stmt->fetch()) { return $res_image; } return false; } } } function update_birth_certificate_image($actual_image_name1,$edit_id) { if($stmt = $this->con->prepare("UPDATE `student_details` SET `birth_certificate`= ? WHERE `id` = ?")) { $stmt->bind_param("si",$actual_image_name1,$edit_id); if($stmt->execute()) { return true; } return False; } } function get_caste_certificate_image($edit_id) { if($stmt = $this->con->prepare("SELECT `caste_certificate` FROM `student_details` WHERE `id` = ?")) { $stmt->bind_param("i",$edit_id); $stmt->bind_result($res_image); if($stmt->execute()) { $data = array(); if($stmt->fetch()) { return $res_image; } return false; } } } function update_caste_certificate_image($actual_image_name2,$edit_id) { if($stmt = $this->con->prepare("UPDATE `student_details` SET `caste_certificate`= ? WHERE `id` = ?")) { $stmt->bind_param("si",$actual_image_name2,$edit_id); if($stmt->execute()) { return true; } return False; } } function get_all_student_info($edit_id) { if($stmt = $this->con->prepare("SELECT `id`, `class`, `medium`, `division`, `roll_no`, `surname`, `student_name`, `father_name`, `mother_name`, `stud_cont_no`, `father_cont_no`, `mother_cont_no`, `residential_no`, `address`, `corres_address`, `child_desc`, `email`, `aadhar_number`, `religion`, `caste`, `category`, `mother_tongue`, `nationality`, `place_of_birth`, `birth_date`, `gender`, `last_school`, `admission_date`, `blood_group`, `height`, `weight`, `student_image`, `birth_certificate`, `caste_certificate`, `advertising_board`, `news_paper`, `teachers`, `friends`, `ex_students`, `pre_class_student`, `other`, `remarks`, `no_of_pupil`, `stud_id_for_lc`, `g-r-no`,`status`, `father_qualification`, `father_occupation`, `father_monthly_income`, `father_office_add`, `father_resident_add`, `mother_qualifi`, `mother_occupation`, `mother_income`, `mother_office_add`, `mother_resident_add`, `certificate_no`, `progress`, `conduct`, `leaving_school_date`, `standard_sinse_when`, `leaving_school_reason`,`date`, `time`,`birth_district`, `birth_state`, `birth_country`,`academic_year`,`sub_caste` FROM `student_details` WHERE `id`=?")) { $stmt->bind_param("i",$edit_id); $stmt->bind_result($res_id,$res_class,$res_medium,$res_division,$res_roll_no,$res_surname,$res_stud_name,$res_father_name,$res_mother_name,$res_stud_cont,$res_father_cont,$res_mother_cont,$res_residential_no,$res_address,$res_corres_add,$res_child_desc,$res_email,$res_aadhar_no,$res_religion,$res_caste,$res_category,$res_mother_tongue,$res_nationality,$res_birth_palce,$res_birth_date,$res_gender,$res_last_school,$res_admission_date,$res_blood_group,$res_height,$res_weight,$res_student_image,$res_birth_certi,$res_caste_certi,$res_adv_board,$res_news_paper,$res_teachers,$res_friends,$res_ex_students,$res_pre_class,$res_other,$res_remarks,$res_no_of_pupil,$res_stud_id_for_lc,$res_gr_no,$rest_tc_status,$res_father_quali,$res_father_occu,$res_father_income,$res_father_office_add,$res_father_resident_add,$res_mother_qualifi,$res_mother_occupa,$res_mother_income,$res_mother_office_add,$res_mother_resident_add,$res_certifi_no,$res_progress,$res_conduct,$res_leaving_school_date,$res_standard_sinse_when,$res_leaving_school_reason,$res_date,$res_time,$res_birth_district,$res_birth_state,$res_birth_country,$res_acd_year,$sub_caste); if($stmt->execute()) { $data = array(); while($stmt->fetch()) { $data[0] = $res_id; $data[1] = $res_class; $data[2] = $res_medium; $data[3] = $res_division; $data[4] = $res_roll_no; $data[5] = $res_surname; $data[6] = $res_stud_name; $data[7] = $res_father_name; $data[8] = $res_mother_name; $data[9] = $res_stud_cont; $data[10] = $res_father_cont; $data[11] = $res_mother_cont; $data[12] = $res_residential_no; $data[13] = $res_address; $data[14] = $res_corres_add; $data[15] = $res_child_desc; $data[16] = $res_email; $data[17] = $res_aadhar_no; $data[18] = $res_religion; $data[19] = $res_caste; $data[20] = $res_category; $data[21] = $res_mother_tongue; $data[22] = $res_nationality; $data[23] = $res_birth_palce; $data[24] = $res_birth_date; $data[25] = $res_gender; $data[26] = $res_last_school; $data[27] = $res_admission_date; $data[28] = $res_blood_group; $data[29] = $res_height; $data[30] = $res_weight; $data[31] = $res_student_image; $data[32] = $res_birth_certi; $data[33] = $res_caste_certi; $data[34] = $res_adv_board; $data[35] = $res_news_paper; $data[36] = $res_teachers; $data[37] = $res_friends; $data[38] = $res_ex_students; $data[39] = $res_pre_class; $data[40] = $res_other; $data[41] = $res_remarks; $data[42] = $res_no_of_pupil; $data[43] = $res_stud_id_for_lc; $data[44] = $res_father_quali; $data[45] = $res_father_occu; $data[46] = $res_father_income; $data[47] = $res_father_office_add; $data[48] = $res_father_resident_add; $data[49] = $res_mother_qualifi; $data[50] = $res_mother_occupa; $data[51] = $res_mother_income; $data[52] = $res_mother_office_add; $data[53] = $res_mother_resident_add; $data[54] = $res_certifi_no; $data[55] = $res_progress; $data[56] = $res_conduct; $data[57] = $res_leaving_school_date ; $data[58] = $res_standard_sinse_when; $data[59] = $res_leaving_school_reason; $data[60] = $res_date; $data[61] = $res_time; $data[62] = $res_gr_no; $data[63] = $rest_tc_status; $data[64] = $res_birth_district; $data[65] = $res_birth_state; $data[66] = $res_birth_country; $data[67] = $res_acd_year; $data[68] = $sub_caste; } if(!empty($data)) { return $data; } else { return false; } } } } function get_all_student_info_for_certificate($res_id) { if($stmt = $this->con->prepare("SELECT `id`, `class`, `medium`, `division`, `roll_no`, `surname`, `student_name`, `father_name`, `mother_name`, `stud_cont_no`, `father_cont_no`, `mother_cont_no`, `residential_no`, `address`, `corres_address`, `child_desc`, `email`, `aadhar_number`, `religion`, `caste`, `category`, `mother_tongue`, `nationality`, `place_of_birth`, `birth_date`, `gender`, `last_school`, `admission_date`, `student_image`, `remarks`, `no_of_pupil`, `stud_id_for_lc`, `g-r-no`, `certificate_no`, `progress`, `conduct`, `leaving_school_date`, `standard_sinse_when`, `leaving_school_reason`, `date`,`birth_district`, `birth_state`, `birth_country`, `promoted_details`, `class_details`, `school_reopen_details`,`sub_caste` FROM `student_details` WHERE `id`=?")) { $stmt->bind_param("i",$res_id); $stmt->bind_result($res_id,$res_class,$res_medium,$res_division,$res_roll_no,$res_surname,$res_stud_name,$res_father_name,$res_mother_name,$res_stud_cont,$res_father_cont,$res_mother_cont,$res_residential_no,$res_address,$res_corres_add,$res_child_desc,$res_email,$res_aadhar_no,$res_religion,$res_caste,$res_category,$res_mother_tongue,$res_nationality,$res_birth_palce,$res_birth_date,$res_gender,$res_last_school,$res_admission_date,$res_student_image,$res_remarks,$res_no_of_pupil,$res_stud_id_for_lc,$res_gr_no,$res_certifi_no,$res_progress,$res_conduct,$res_leaving_school_date,$res_standard_sinse_when,$res_leaving_school_reason,$res_date,$res_birth_district,$res_birth_state,$res_birth_country,$promoted_details,$class_details,$school_reopen_details,$sub_caste); if($stmt->execute()) { $data = array(); while($stmt->fetch()) { $data[0] = $res_id; $data[1] = $res_class; $data[2] = $res_medium; $data[3] = $res_division; $data[4] = $res_roll_no; $data[5] = $res_surname; $data[6] = $res_stud_name; $data[7] = $res_father_name; $data[8] = $res_mother_name; $data[9] = $res_stud_cont; $data[10] = $res_father_cont; $data[11] = $res_mother_cont; $data[12] = $res_residential_no; $data[13] = $res_address; $data[14] = $res_corres_add; $data[15] = $res_child_desc; $data[16] = $res_email; $data[17] = $res_aadhar_no; $data[18] = $res_religion; $data[19] = $res_caste; $data[20] = $res_category; $data[21] = $res_mother_tongue; $data[22] = $res_nationality; $data[23] = $res_birth_palce; $data[24] = $res_birth_date; $data[25] = $res_gender; $data[26] = $res_last_school; $data[27] = $res_admission_date; $data[28] = $res_student_image; $data[29] = $res_remarks; $data[30] = $res_no_of_pupil; $data[31] = $res_stud_id_for_lc; $data[32] = $res_gr_no; $data[33] = $res_certifi_no; $data[34] = $res_progress; $data[35] = $res_conduct; $data[36] = $res_leaving_school_date; $data[37] = $res_standard_sinse_when; $data[38] = $res_leaving_school_reason; $data[39] = $res_date; $data[40] = $res_birth_district; $data[41] = $res_birth_state; $data[42] = $res_birth_country; $data[43] = $promoted_details; $data[44] = $class_details; $data[45] = $school_reopen_details; $data[46] = $sub_caste; } if(!empty($data)) { return $data; } else { return false; } } } } function get_all_student_data_for_certificates() { if($stmt = $this->con->prepare("SELECT `id`, `class`, `medium`, `division`, `roll_no`, `surname`, `student_name`, `father_name`, `email`, `aadhar_number`,`admission_date`, `student_image`, `no_of_pupil`, `stud_id_for_lc`, `g-r-no`, `date` FROM `student_details` WHERE `status`!= 'Cancelled'")) { $stmt->bind_result($res_id,$res_class,$res_medium,$res_division,$res_roll_no,$res_surname,$res_stud_name,$res_father_name,$res_email,$res_aadhar_no,$res_admission_date,$res_student_image,$res_no_of_pupil,$res_stud_id_for_lc,$res_gr_no,$res_date); if($stmt->execute()) { $data = array(); $row_counter = 0; while($stmt->fetch()) { $data[$row_counter][0] = $res_id; $data[$row_counter][1] = $res_class; $data[$row_counter][2] = $res_medium; $data[$row_counter][3] = $res_division; $data[$row_counter][4] = $res_roll_no; $data[$row_counter][5] = $res_surname; $data[$row_counter][6] = $res_stud_name; $data[$row_counter][7] = $res_father_name; $data[$row_counter][8] = $res_email; $data[$row_counter][9] = $res_aadhar_no; $data[$row_counter][10] = $res_admission_date; $data[$row_counter][11] = $res_no_of_pupil; $data[$row_counter][12] = $res_stud_id_for_lc; $data[$row_counter][13] = $res_gr_no; $data[$row_counter][14] = $res_date; $data[$row_counter][15] = $res_student_image; $row_counter++; } if(!empty($data)) { return $data; } else { return false; } } } } function get_all_student_data_for_certificates1($class,$medium,$division,$gr_no,$stud_name,$acd_year,$tc_status) { if(($tc_status=="Select TC") OR ($tc_status=="no") OR ($tc_status=="Select TC STATUS")) { $tc_status=""; } if($stmt = $this->con->prepare("SELECT `id`, `class`, `medium`, `division`, `roll_no`, `surname`, `student_name`, `father_name`, `email`, `aadhar_number`,`admission_date`, `student_image`, `no_of_pupil`, `stud_id_for_lc`, `g-r-no`, `date` FROM `student_details` WHERE `class` =? AND `academic_year` LIKE '%".$acd_year."%' AND `medium` LIKE '%".$medium."%' AND `division` LIKE '%".$division."%' AND `no_of_pupil` LIKE '%".$gr_no."%' AND (`surname` LIKE '%".$stud_name."%' Or `student_name` LIKE '%".$stud_name."%' Or `father_name` LIKE '%".$stud_name."%') AND`status`=?")) { $stmt->bind_param("ss",$class,$tc_status); $stmt->bind_result($res_id,$res_class,$res_medium,$res_division,$res_roll_no,$res_surname,$res_stud_name,$res_father_name,$res_email,$res_aadhar_no,$res_admission_date,$res_student_image,$res_no_of_pupil,$res_stud_id_for_lc,$res_gr_no,$res_date); if($stmt->execute()) { $data = array(); $row_counter = 0; while($stmt->fetch()) { $data[$row_counter][0] = $res_id; $data[$row_counter][1] = $res_class; $data[$row_counter][2] = $res_medium; $data[$row_counter][3] = $res_division; $data[$row_counter][4] = $res_roll_no; $data[$row_counter][5] = $res_surname; $data[$row_counter][6] = $res_stud_name; $data[$row_counter][7] = $res_father_name; $data[$row_counter][8] = $res_email; $data[$row_counter][9] = $res_aadhar_no; $data[$row_counter][10] = $res_admission_date; $data[$row_counter][11] = $res_no_of_pupil; $data[$row_counter][12] = $res_stud_id_for_lc; $data[$row_counter][13] = $res_gr_no; $data[$row_counter][14] = $res_date; $data[$row_counter][15] = $res_student_image; $row_counter++; } if(!empty($data)) { return $data; } else { return false; } } } } function get_all_settings_data() { if($stmt = $this->con->prepare("SELECT `id`, `sanstha_center`, `school_clg_name`, `address`, `phone_no`, `email_id`, `recognition_no`, `udise_no`, `board`, `medium`, `index_no`, `clg_logo`, `date`,`college_name`,`logo` FROM `setting`")) { $stmt->bind_result($res_id,$res_sanstha_center,$res_school_clg_name,$res_address,$res_phone_no,$res_email_id,$res_recognition_no,$res_udise_no,$res_board,$res_medium,$res_index_no,$res_clg_logo,$res_date,$res_college_name,$logo); if($stmt->execute()) { $data = array(); $row_counter = 0; while($stmt->fetch()) { $data[$row_counter][0] = $res_id; $data[$row_counter][1] = $res_sanstha_center; $data[$row_counter][2] = $res_school_clg_name; $data[$row_counter][3] = $res_address; $data[$row_counter][4] = $res_phone_no; $data[$row_counter][5] = $res_email_id; $data[$row_counter][6] = $res_recognition_no; $data[$row_counter][7] = $res_udise_no; $data[$row_counter][8] = $res_board; $data[$row_counter][9] = $res_medium; $data[$row_counter][10] = $res_index_no; $data[$row_counter][11] = $res_clg_logo; $data[$row_counter][12] = $res_date; $data[$row_counter][13] = $res_college_name; $data[$row_counter][14] = $logo; $row_counter++; } if(!empty($data)) { return $data; } else { return false; } } } } function update_setting_details($sanstha_center,$school_clg_name,$address,$phone_no,$email_id,$recognition_no,$udise_no,$board,$index_no,$medium,$college_name) { $date = date("Y-m-d"); $time = date("H:i:s t"); if($stmt = $this->con->prepare("UPDATE `setting` SET `sanstha_center`=?,`school_clg_name`=?,`address`=?,`phone_no`=?,`email_id`=?,`recognition_no`=?,`udise_no`=?,`board`=?,`medium`=?,`index_no`=?,`date`=?,`time`=?,`college_name`=?")) { $stmt->bind_param("sssssssssssss",$sanstha_center,$school_clg_name,$address,$phone_no,$email_id,$recognition_no,$udise_no,$board,$medium,$index_no,$date,$time,$college_name); if($stmt->execute()) { return true; } { return $stmt->error; } } } function update_clg_logo($actual_image_name) { if($stmt = $this->con->prepare("UPDATE `setting` SET `clg_logo`= ?")) { $stmt->bind_param("s",$actual_image_name); if($stmt->execute()) { return true; } return False; } } function update_logo($actual_image_name) { if($stmt = $this->con->prepare("UPDATE `setting` SET `logo`= ?")) { $stmt->bind_param("s",$actual_image_name); if($stmt->execute()) { return true; } return False; } } function set_clg_logo_name_blank($delete_id) { if($stmt = $this->con->prepare("UPDATE `setting` SET `clg_logo`= '' WHERE `id` = ?")) { $stmt->bind_param("i",$delete_id); if($stmt->execute()) { return true; } return False; } } function get_clg_logo_icon($res_id) { if($stmt = $this->con->prepare("SELECT `clg_logo` FROM `setting` WHERE `id` = ?")) { $stmt->bind_param("i",$res_id); $stmt->bind_result($res_image); if($stmt->execute()) { $data = array(); if($stmt->fetch()) { return $res_image; } return false; } } } function get_fees_title_id_from_title($fee_title) { if($stmt = $this->con->prepare("SELECT `id` FROM `fees_title_master` WHERE `fee_title`=?")) { $stmt->bind_param("s",$fee_title); $stmt->bind_result($res_id); if($stmt->execute()) { if($stmt->fetch()) { return $res_id; } return False; } } } function save_fees_title_master_details($fee_title) { $date = date("Y-m-d"); $time = date("H:i:s t"); if($stmt = $this->con->prepare("INSERT INTO `fees_title_master`(`fee_title`, `date`, `time`) VALUES (?,?,?)")) { $stmt->bind_param("sss",$fee_title,$date,$time); if($stmt->execute()) { return true; } return false; } } function get_all_fee_title_master_data() { if($stmt = $this->con->prepare("SELECT `id`, `fee_title`, `date` FROM `fees_title_master`")) { $stmt->bind_result($res_id,$res_fee_title,$res_date); if($stmt->execute()) { $data = array(); $row_counter = 0; while($stmt->fetch()) { $data[$row_counter][0] = $res_id; $data[$row_counter][1] = $res_fee_title; $data[$row_counter][2] = $res_date; $row_counter++; } if(!empty($data)) { return $data; } else { return false; } } } } function delete_fee_title_master_data($delete_id) { if($stmt = $this->con->prepare("DELETE FROM `fees_title_master` WHERE `id`=?")) { $stmt->bind_param("i",$delete_id); if($stmt->execute()) { return true; } return False; } } function update_fees_title_master_details($fee_title,$edit_id) { $date = date("Y-m-d"); $time = date("H:i:s t"); if($stmt = $this->con->prepare("UPDATE `fees_title_master` SET `fee_title`=?,`date`=?,`time`=? WHERE `id`=?")) { $stmt->bind_param("sssi",$fee_title,$date,$time,$edit_id); if($stmt->execute()) { return true; } return False; } } function get_fee_title_master_details($edit_id) { if($stmt = $this->con->prepare("SELECT `id`, `fee_title`, `date` FROM `fees_title_master` WHERE `id`=?")) { $stmt->bind_param("i",$edit_id); $stmt->bind_result($res_id,$res_fee_title,$res_date); if($stmt->execute()) { $data = array(); $row_counter = 0; if($stmt->fetch()) { $data[0] = $res_id; $data[1] = $res_fee_title; $data[2] = $res_date; $row_counter++; } if(!empty($data)) { return $data; } else { return false; } } } } function update_division_master_details($division,$edit_id) { $date = date("Y-m-d"); $time = date("H:i:s t"); if($stmt = $this->con->prepare("UPDATE `division_master` SET `division`=?,`date`=?,`time`=? WHERE `id`=?")) { $stmt->bind_param("sssi",$division,$date,$time,$edit_id); if($stmt->execute()) { return true; } return False; } } function get_division_master_details($edit_id) { if($stmt = $this->con->prepare("SELECT `id`, `division`, `date` FROM `division_master` WHERE `id`=?")) { $stmt->bind_param("i",$edit_id); $stmt->bind_result($res_id,$res_division,$res_date); if($stmt->execute()) { $data = array(); $row_counter = 0; if($stmt->fetch()) { $data[0] = $res_id; $data[1] = $res_division; $data[2] = $res_date; $row_counter++; } if(!empty($data)) { return $data; } else { return false; } } } } function get_fee_attribute_id_from_title($fee_type,$title) { if($stmt = $this->con->prepare("SELECT `id` FROM `fee_attributes` WHERE `fee_type`=? AND `title`=?")) { $stmt->bind_param("ss",$fee_type,$title); $stmt->bind_result($res_id); if($stmt->execute()) { if($stmt->fetch()) { return $res_id; } return False; } } } function save_fee_attributes($fee_type,$title,$amount) { $date = date("Y-m-d"); $time = date("H:i:s t"); if($stmt = $this->con->prepare("INSERT INTO `fee_attributes`(`fee_type`, `title`, `amount`, `date`, `time`) VALUES (?,?,?,?,?)")) { $stmt->bind_param("sssss",$fee_type,$title,$amount,$date,$time); if($stmt->execute()) { return true; } return false; } } function get_all_fee_attribute_data() { if($stmt = $this->con->prepare("SELECT `id`, `fee_type`, `title`, `amount`, `date` FROM `fee_attributes`")) { $stmt->bind_result($res_id,$res_fee_type,$res_title,$res_amount,$res_date); if($stmt->execute()) { $data = array(); $row_counter = 0; while($stmt->fetch()) { $data[$row_counter][0] = $res_id; $data[$row_counter][1] = $res_fee_type; $data[$row_counter][2] = $res_title; $data[$row_counter][3] = $res_amount; $data[$row_counter][4] = $res_date; $row_counter++; } if(!empty($data)) { return $data; } else { return false; } } } } function delete_fee_attribution_record($delete_id) { if($stmt = $this->con->prepare("DELETE FROM `fee_attributes` WHERE `id`=?")) { $stmt->bind_param("i",$delete_id); if($stmt->execute()) { return true; } return False; } } function update_fee_attribution_record($fee_type,$title,$amount,$edit_id) { $date = date("Y-m-d"); $time = date("H:i:s t"); if($stmt = $this->con->prepare("UPDATE `fee_attributes` SET `fee_type`=?,`title`=?,`amount`=?,`date`=?,`time`=? WHERE `id`=?")) { $stmt->bind_param("sssssi",$fee_type,$title,$amount,$date,$time,$edit_id); if($stmt->execute()) { return true; } return False; } } function get_fee_attribute_data_from_id($edit_id) { if($stmt = $this->con->prepare("SELECT `fee_type`, `title`, `amount`, `date` FROM `fee_attributes` WHERE `id`=?")) { $stmt->bind_param("i",$edit_id); $stmt->bind_result($res_fee_type,$res_title,$res_amount,$res_date); if($stmt->execute()) { $data = array(); if($stmt->fetch()) { $data[0] = $res_fee_type; $data[1] = $res_title; $data[2] = $res_amount; $data[3] = $res_date; return $data; } return false; } } } function get_student_name_from_id($stud_id) { if($stmt = $this->con->prepare("SELECT `student_name` FROM `student_details` WHERE `id`=?")) { $stmt->bind_param("i",$stud_id); $stmt->bind_result($res_stud_name); if($stmt->execute()) { if($stmt->fetch()) { return $res_stud_name; } return False; } } } function get_fee_receipt_data($fee_type) { if($stmt = $this->con->prepare("SELECT `title`, `amount` FROM `fee_attributes` WHERE `fee_type`=?")) { $stmt->bind_param("s",$fee_type); $stmt->bind_result($res_title,$res_amount); if($stmt->execute()) { $data = array(); $row_counter = 0; while($stmt->fetch()) { $data[$row_counter][0] = $res_title; $data[$row_counter][1] = $res_amount; $row_counter++; } if(!empty($data)) { return $data; } else { return false; } } } } function save_receipt_data($fee_type,$student_insert_id,$paid_amount,$balance_amount,$receipt_no) { $date = date("Y-m-d"); $time = date("H:i:s t"); if($stmt = $this->con->prepare("INSERT INTO `receipt`(`fee_type`, `stud_id`, `paid_amount`, `balance_amount`, `receipt_id`, `date`, `time`) VALUES (?,?,?,?,?,?,?)")) { $stmt->bind_param("sssssss",$fee_type,$student_insert_id,$paid_amount,$balance_amount,$receipt_no,$date,$time); if($stmt->execute()) { return $stmt->insert_id; } return false; } } function get_student_record_from_class_and_division($stud_inserted_class,$stud_inserted_division,$acd_year) { if($stmt = $this->con->prepare("SELECT `id`, `class`, `medium`, `division`, `roll_no`, `surname`, `student_name`, `father_name`, `mother_name`, `stud_cont_no`, `father_cont_no`, `address`, `student_image` FROM `student_details` WHERE `class`=? AND `division`=? AND `academic_year`=? ")) { $stmt->bind_param("sss",$stud_inserted_class,$stud_inserted_division,$acd_year); $stmt->bind_result($res_id,$res_class,$res_medium,$res_division,$res_roll_no,$res_surname,$res_stud_name,$res_father_name,$res_mother_name,$res_stud_cont,$res_father_cont,$res_address,$res_student_image); if($stmt->execute()) { $data = array(); $row_counter = 0; while($stmt->fetch()) { $data[$row_counter][0] = $res_id; $data[$row_counter][1] = $res_class; $data[$row_counter][2] = $res_medium; $data[$row_counter][3] = $res_division; $data[$row_counter][4] = $res_roll_no; $data[$row_counter][5] = $res_surname; $data[$row_counter][6] = $res_stud_name; $data[$row_counter][7] = $res_father_name; $data[$row_counter][8] = $res_mother_name; $data[$row_counter][9] = $res_stud_cont; $data[$row_counter][10] = $res_father_cont; $data[$row_counter][11] = $res_address; $data[$row_counter][12] = $res_student_image; $row_counter++; } if(!empty($data)) { return $data; } else { return false; } } } } function get_student_record_from_id($admission_receipt_id) { if($stmt = $this->con->prepare("SELECT `paid_amount`, `balance_amount`, `receipt_id`, `date` FROM `receipt` WHERE `id`=?")) { $stmt->bind_param("i",$admission_receipt_id); $stmt->bind_result($res_paid_amount,$res_balance_amount,$res_receipt_no,$date); if($stmt->execute()) { $data = array(); if($stmt->fetch()) { $data[1] = $res_paid_amount; $data[2] = $res_balance_amount; $data[3] = $res_receipt_no; $data[4] = $date; return $data; } return false; } } } function get_previous_paid_fees($admission_repay_receipt_id,$res_stud_id) { if($stmt = $this->con->prepare("SELECT SUM(`paid_amount`) FROM `receipt` WHERE `stud_id` = ? AND `id`!=?")) { $stmt->bind_param("si",$res_stud_id,$admission_repay_receipt_id); $stmt->bind_result($res_paid_amount); if($stmt->execute()) { if($stmt->fetch()) { return $res_paid_amount; } return False; } } } function get_receipt_no_from_fee_type($fee_type) { if($stmt = $this->con->prepare("SELECT `receipt_id` FROM `receipt` WHERE `fee_type`=? order by `id` DESC")) { $stmt->bind_param("s",$fee_type); $stmt->bind_result($res_receipt_id); if($stmt->execute()) { if($stmt->fetch()) { return $res_receipt_id; } return False; } } } function get_fee_receipt_data_from_date($from_date,$to_date,$searched_fee_type) { if($stmt = $this->con->prepare("SELECT A.`id`, A.`fee_type`, A.`stud_id`, A.`paid_amount`, A.`balance_amount`, A.`date`, A.`time` FROM `receipt` AS A INNER JOIN `student_details` AS B ON A.`stud_id`= B.`id` where A.`id` IN (Select MAX(`id`) from `receipt` GROUP BY `stud_id`) AND (A.`date` BETWEEN ? AND ?) AND A.`fee_type` LIKE '%$searched_fee_type%' AND A.`status` != 'Cancelled' ")) { $stmt->bind_param("ss",$from_date,$to_date); $stmt->bind_result($res_id,$res_fee_type,$res_stud_id,$res_paid_amount,$res_balance_amount,$res_date,$res_time); if($stmt->execute()) { $data = array(); $row_counter = 0; while($stmt->fetch()) { $data[$row_counter][0] = $res_id; $data[$row_counter][1] = $res_fee_type; $data[$row_counter][2] = $res_stud_id; $data[$row_counter][3] = $res_paid_amount; $data[$row_counter][4] = $res_balance_amount; $data[$row_counter][5] = $res_date; $data[$row_counter][6] = $res_time; $row_counter++; } if(!empty($data)) { return $data; } else { return false; } } } } function get_receipt_data() { if($stmt = $this->con->prepare("SELECT `id`, `fee_type`, `stud_id`, `paid_amount`, `balance_amount`, `date`, `time` FROM `receipt` where `status` != 'Cancelled'")) { $stmt->bind_result($res_id,$res_fee_type,$res_stud_id,$res_paid_amount,$res_balance_amount,$res_date,$res_time); if($stmt->execute()) { $data = array(); $row_counter = 0; while($stmt->fetch()) { $data[$row_counter][0] = $res_id; $data[$row_counter][1] = $res_fee_type; $data[$row_counter][2] = $res_stud_id; $data[$row_counter][3] = $res_paid_amount; $data[$row_counter][4] = $res_balance_amount; $data[$row_counter][5] = $res_date; $data[$row_counter][6] = $res_time; $row_counter++; } if(!empty($data)) { return $data; } else { return false; } } } } function get_student_data_from_id($res_stud_id) { if($stmt = $this->con->prepare("SELECT `class`, `medium`, `division`, `roll_no`, `surname`, `student_name`, `father_name`, `student_image` FROM `student_details` WHERE `id`=?")) { $stmt->bind_param("i",$res_stud_id); $stmt->bind_result($res_class,$res_medium,$res_division,$res_roll_no,$res_surname,$res_stud_name,$res_father_name,$res_stud_img); if($stmt->execute()) { $data = array(); if($stmt->fetch()) { $data[0] = $res_class; $data[1] = $res_medium; $data[2] = $res_division; $data[3] = $res_roll_no; $data[4] = $res_surname; $data[5] = $res_stud_name; $data[6] = $res_father_name; $data[7] = $res_stud_img; return $data; } return false; } } } function get_receipt_data_from_id($edit_id) { if($stmt = $this->con->prepare("SELECT `fee_type`, `stud_id`, `paid_amount`, `balance_amount`, `receipt_id`, `date` FROM `receipt` WHERE `id`=?")) { $stmt->bind_param("i",$edit_id); $stmt->bind_result($res_fee_type,$res_stud_id,$res_paid_amount,$res_balance_amount,$res_receipt,$res_date); if($stmt->execute()) { $data = array(); if($stmt->fetch()) { $data[0] = $res_fee_type; $data[1] = $res_stud_id; $data[2] = $res_paid_amount; $data[3] = $res_balance_amount; $data[4] = $res_receipt; $data[5] = $res_date; return $data; } return false; } } } function update_fee_receipt_data($paid_amount,$balance_amount,$edit_id) { if($stmt = $this->con->prepare("UPDATE `receipt` SET `paid_amount`=?,`balance_amount`=? WHERE `id`=?")) { $stmt->bind_param("ssi",$paid_amount,$balance_amount,$edit_id); if($stmt->execute()) { return true; } return False; } } function update_fee_receipt_status($cancel_id,$cancel_fee_type) { if($stmt = $this->con->prepare("UPDATE `receipt` SET `status`= 'Cancelled' WHERE `stud_id` = ? AND `fee_type`=?")) { $stmt->bind_param("ss",$cancel_id,$cancel_fee_type); if($stmt->execute()) { return true; } return False; } } function get_admisssion_balance_data_from_date($from_date,$to_date,$searched_fee_type,$searched_class,$searched_medium,$searched_division) { if($stmt = $this->con->prepare("SELECT A.`id`, A.`fee_type`, A.`stud_id`, A.`paid_amount`, A.`balance_amount`, A.`date`, A.`time` FROM `receipt` AS A INNER JOIN `student_details` AS B ON A.`stud_id`= B.`id` WHERE A.`balance_amount` > 0 AND (A.`date` BETWEEN ? AND ?) AND A.`fee_type` LIKE '%$searched_fee_type%' AND B.`class` LIKE '%$searched_class%' AND B.`medium` LIKE '%$searched_medium%' AND B.`division` LIKE '%$searched_division%' AND A.`id` IN(Select MAX(`id`) FROM `receipt` GROUP BY `stud_id`) AND A.`status` != 'Cancelled'")) { $stmt->bind_param("ss",$from_date,$to_date); $stmt->bind_result($res_id,$res_fee_type,$res_stud_id,$res_paid_amount,$res_balance_amount,$res_date,$res_time); if($stmt->execute()) { $data = array(); $row_counter = 0; while($stmt->fetch()) { $data[$row_counter][0] = $res_id; $data[$row_counter][1] = $res_fee_type; $data[$row_counter][2] = $res_stud_id; $data[$row_counter][3] = $res_paid_amount; $data[$row_counter][4] = $res_balance_amount; $data[$row_counter][5] = $res_date; $data[$row_counter][6] = $res_time; $row_counter++; } if(!empty($data)) { return $data; } else { return false; } } } } function get_admisssion_balance_data() { if($stmt = $this->con->prepare("SELECT `id`, `fee_type`, `stud_id`, `paid_amount`, `balance_amount`, `date`, `time` FROM `receipt` WHERE `balance_amount` > 0 AND `id` IN (Select MAX(`id`) from `receipt` GROUP BY `stud_id`)")) { $stmt->bind_result($res_id,$res_fee_type,$res_stud_id,$res_paid_amount,$res_balance_amount,$res_date,$res_time); if($stmt->execute()) { $data = array(); $row_counter = 0; while($stmt->fetch()) { $data[$row_counter][0] = $res_id; $data[$row_counter][1] = $res_fee_type; $data[$row_counter][2] = $res_stud_id; $data[$row_counter][3] = $res_paid_amount; $data[$row_counter][4] = $res_balance_amount; $data[$row_counter][5] = $res_date; $data[$row_counter][6] = $res_time; $row_counter++; } if(!empty($data)) { return $data; } else { return false; } } } } function get_admission_data_from_id($repay_id) { if($stmt = $this->con->prepare("SELECT `fee_type`, `stud_id`, `paid_amount`, `balance_amount`, `date` FROM `receipt` WHERE `id`=? AND `status`!='Cancelled' ORDER By `id` DESC")) { $stmt->bind_param("i",$repay_id); $stmt->bind_result($res_fee_type,$res_stud_id,$res_paid_amount,$res_balance_amount,$res_date); if($stmt->execute()) { $data = array(); if($stmt->fetch()) { $data[0] = $res_fee_type; $data[1] = $res_stud_id; $data[2] = $res_paid_amount; $data[3] = $res_balance_amount; $data[4] = $res_date; return $data; } return false; } } } function get_sum_of_total_paid_amount($res_stud_id) { if($stmt = $this->con->prepare("SELECT SUM(`paid_amount`) FROM `receipt` WHERE `stud_id`=?")) { $stmt->bind_param("s",$res_stud_id); $stmt->bind_result($res_paid_amount); if($stmt->execute()) { if($stmt->fetch()) { return $res_paid_amount; } return False; } } } function get_all_admission_cancelled_receipts() { if($stmt = $this->con->prepare("SELECT A.`id`, A.`fee_type`, A.`stud_id`, A.`paid_amount`, A.`balance_amount`, A.`returned_amount`, A.`kept_amount`, A.`date` FROM `receipt` AS A INNER JOIN `student_details` AS B ON A.`stud_id`= B.`id` where A.`status` = 'Cancelled' AND A.`id` IN (Select MAX(`id`) from `receipt` GROUP BY `stud_id`)")) { $stmt->bind_result($res_id,$res_fee_type,$res_stud_id,$res_paid_amount,$res_balance_amount,$res_returned_amount,$res_kept_amount,$res_date); if($stmt->execute()) { $data = array(); $row_counter = 0; while($stmt->fetch()) { $data[$row_counter][0] = $res_id; $data[$row_counter][1] = $res_stud_id; $data[$row_counter][2] = $res_paid_amount; $data[$row_counter][3] = $res_balance_amount; $data[$row_counter][4] = $res_returned_amount; $data[$row_counter][5] = $res_kept_amount; $data[$row_counter][6] = $res_date; $data[$row_counter][7] = $res_fee_type; $row_counter++; } if(!empty($data)) { return $data; } else { return false; } } } } function get_admission_cancelled_receipts($searched_fee_type,$searched_class,$searched_medium,$searched_division) { if($stmt = $this->con->prepare("SELECT A.`id`, A.`fee_type`, A.`stud_id`, A.`paid_amount`, A.`balance_amount`, A.`returned_amount`, A.`kept_amount`, A.`date` FROM `receipt` AS A INNER JOIN `student_details` AS B ON A.`stud_id`= B.`id` where A.`status` = 'Cancelled' AND A.`fee_type` LIKE '%$searched_fee_type%' AND B.`class` LIKE '%$searched_class%' AND B.`medium` LIKE '%$searched_medium%' AND B.`division` LIKE '%$searched_division%' AND A.`id` IN (Select MAX(`id`) from `receipt` GROUP BY `stud_id`)")) { $stmt->bind_result($res_id,$res_fee_type,$res_stud_id,$res_paid_amount,$res_balance_amount,$res_returned_amount,$res_kept_amount,$res_date); if($stmt->execute()) { $data = array(); $row_counter = 0; while($stmt->fetch()) { $data[$row_counter][0] = $res_id; $data[$row_counter][1] = $res_stud_id; $data[$row_counter][2] = $res_paid_amount; $data[$row_counter][3] = $res_balance_amount; $data[$row_counter][4] = $res_returned_amount; $data[$row_counter][5] = $res_kept_amount; $data[$row_counter][6] = $res_date; $data[$row_counter][7] = $res_fee_type; $row_counter++; } if(!empty($data)) { return $data; } else { return false; } } } } function get_admission_cancelled_receipts_details_from_id($cancelled_admission_id) { if($stmt = $this->con->prepare("SELECT `id`, `fee_type`, `stud_id`, SUM(`paid_amount`), `balance_amount` FROM `receipt` WHERE `stud_id`=?")) { $stmt->bind_param("i",$cancelled_admission_id); $stmt->bind_result($res_id,$res_fee_type,$res_stud_id,$res_paid_amount,$res_balance_amount); if($stmt->execute()) { $data = array(); if($stmt->fetch()) { $data[0] = $res_id; $data[1] = $res_fee_type; $data[2] = $res_stud_id; $data[3] = $res_paid_amount; $data[4] = $res_balance_amount; return $data; } return false; } } } function update_cancel_fee_attributes($retuned_amount,$kept_amount,$cancelled_admission_id) { $date = date("Y-m-d"); $time = date("H:i:s t"); if($stmt = $this->con->prepare("UPDATE `receipt` SET `returned_amount`=?,`kept_amount`=?,`date`=?,`time`=? WHERE `stud_id`=?")) { $stmt->bind_param("ssssi",$retuned_amount,$kept_amount,$date,$time,$cancelled_admission_id); if($stmt->execute()) { return true; } return False; } } function get_cancelled_adms_receipt_data_from_id($res_id) { if($stmt = $this->con->prepare("SELECT A.`id`, A.`fee_type`, A.`stud_id`, A.`paid_amount`, A.`balance_amount`, A.`receipt_id`, A.`returned_amount`, A.`kept_amount`, A.`date` FROM `receipt` AS A INNER JOIN `student_details` AS B ON A.`stud_id`= B.`id` where A.`status` = 'Cancelled' AND A.`id` = ? AND A.`id` IN (Select MAX(`id`) from `receipt` GROUP BY `stud_id`)")) { $stmt->bind_param("i",$res_id); $stmt->bind_result($res_id,$res_fee_type,$res_stud_id,$res_paid_amount,$res_balance_amount,$res_receipt,$res_returned_amount,$res_kept_amount,$res_date); if($stmt->execute()) { $data = array(); if($stmt->fetch()) { $data[0] = $res_id; $data[1] = $res_fee_type; $data[2] = $res_stud_id; $data[3] = $res_paid_amount; $data[4] = $res_balance_amount; $data[5] = $res_returned_amount; $data[6] = $res_kept_amount; $data[7] = $res_date; $data[8] = $res_receipt; } if(!empty($data)) { return $data; } else { return false; } } } } function update_student_status($cancel_id) { if($stmt = $this->con->prepare("UPDATE `student_details` SET `status`='Cancelled' WHERE `id`=?")) { $stmt->bind_param("i",$cancel_id); if($stmt->execute()) { return true; } return False; } } function get_type_master_id_from_title($type) { if($stmt = $this->con->prepare("SELECT `id` FROM `type_master` WHERE `title`=?")) { $stmt->bind_param("s",$type); $stmt->bind_result($res_id); if($stmt->execute()) { if($stmt->fetch()) { return $res_id; } return False; } } } function save_type_master_details($type) { $date = date("Y-m-d"); $time = date("H:i:s t"); if($stmt = $this->con->prepare("INSERT INTO `type_master`(`title`, `date`, `time`) VALUES (?,?,?)")) { $stmt->bind_param("sss",$type,$date,$time); if($stmt->execute()) { return true; } return false; } } function delete_type_master_data($delete_id) { if($stmt = $this->con->prepare("DELETE FROM `type_master` WHERE `id`=?")) { $stmt->bind_param("i",$delete_id); if($stmt->execute()) { return true; } return False; } } function get_all_type_master_data() { if($stmt = $this->con->prepare("SELECT `id`, `title`, `date` FROM `type_master`")) { $stmt->bind_result($res_id,$res_title,$res_date); if($stmt->execute()) { $data = array(); $row_counter = 0; while($stmt->fetch()) { $data[$row_counter][0] = $res_id; $data[$row_counter][1] = $res_title; $data[$row_counter][2] = $res_date; $row_counter++; } if(!empty($data)) { return $data; } else { return false; } } } } function update_type_master_details($type,$edit_id) { $date = date("Y-m-d"); $time = date("H:i:s t"); if($stmt = $this->con->prepare("UPDATE `type_master` SET `title`=?,`date`=?,`time`=? WHERE `id`=?")) { $stmt->bind_param("sssi",$type,$date,$time,$edit_id); if($stmt->execute()) { return true; } return False; } } function get_type_master_details($edit_id) { if($stmt = $this->con->prepare("SELECT `id`, `title`, `date` FROM `type_master` WHERE `id`=?")) { $stmt->bind_param("i",$edit_id); $stmt->bind_result($res_id,$res_title,$res_date); if($stmt->execute()) { $data = array(); $row_counter = 0; if($stmt->fetch()) { $data[0] = $res_id; $data[1] = $res_title; $data[2] = $res_date; $row_counter++; } if(!empty($data)) { return $data; } else { return false; } } } } function get_language_master_id_from_title($language) { if($stmt = $this->con->prepare("SELECT `id` FROM `language_master` WHERE `title`=?")) { $stmt->bind_param("s",$language); $stmt->bind_result($res_id); if($stmt->execute()) { if($stmt->fetch()) { return $res_id; } return False; } } } function save_language_master_details($language) { $date = date("Y-m-d"); $time = date("H:i:s t"); if($stmt = $this->con->prepare("INSERT INTO `language_master`(`title`, `date`, `time`) VALUES (?,?,?)")) { $stmt->bind_param("sss",$language,$date,$time); if($stmt->execute()) { return true; } return false; } } function delete_language_master_data($delete_id) { if($stmt = $this->con->prepare("DELETE FROM `language_master` WHERE `id`=?")) { $stmt->bind_param("i",$delete_id); if($stmt->execute()) { return true; } return False; } } function get_all_language_master_data() { if($stmt = $this->con->prepare("SELECT `id`, `title`, `date` FROM `language_master`")) { $stmt->bind_result($res_id,$res_title,$res_date); if($stmt->execute()) { $data = array(); $row_counter = 0; while($stmt->fetch()) { $data[$row_counter][0] = $res_id; $data[$row_counter][1] = $res_title; $data[$row_counter][2] = $res_date; $row_counter++; } if(!empty($data)) { return $data; } else { return false; } } } } function update_language_master_details($language,$edit_id) { $date = date("Y-m-d"); $time = date("H:i:s t"); if($stmt = $this->con->prepare("UPDATE `language_master` SET `title`=?,`date`=?,`time`=? WHERE `id`=?")) { $stmt->bind_param("sssi",$language,$date,$time,$edit_id); if($stmt->execute()) { return true; } return False; } } function get_language_master_details($edit_id) { if($stmt = $this->con->prepare("SELECT `id`, `title`, `date` FROM `language_master` WHERE `id`=?")) { $stmt->bind_param("i",$edit_id); $stmt->bind_result($res_id,$res_title,$res_date); if($stmt->execute()) { $data = array(); $row_counter = 0; if($stmt->fetch()) { $data[0] = $res_id; $data[1] = $res_title; $data[2] = $res_date; $row_counter++; } if(!empty($data)) { return $data; } else { return false; } } } } function save_book_details_tmp($language,$book_isbn,$book_title,$book_type,$author_name,$edition,$quantity,$purchase_date,$price,$pages,$publisher,$res_id) { $date = date("Y-m-d"); $time = date("H:i:s t"); if($stmt = $this->con->prepare("INSERT INTO `tmp_book_details`(`language`, `isbn_no`, `book_title`, `book_type`, `author_name`, `edition`, `publisher`, `quantity`, `price`, `pages`, `purchase_date`, `date`, `time`, `book_id`) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?)")) { $stmt->bind_param("ssssssssssssss",$language,$book_isbn,$book_title,$book_type,$author_name,$edition,$publisher,$quantity,$price,$pages,$purchase_date,$date,$time,$res_id); if($stmt->execute()) { return $stmt->insert_id; } return false; } } function get_book_details_from_permanent($language,$book_isbn,$book_title,$book_type,$author_name,$edition,$publisher) { if($stmt = $this->con->prepare("SELECT `id`, `total_quantity` FROM `book_details` WHERE `language`=? AND `isbn_no`=? AND `book_title`=? AND `book_type`=? AND `author_name`=? AND `edition`=? AND `publisher`=?")) { $stmt->bind_param("sssssss",$language,$book_isbn,$book_title,$book_type,$author_name,$edition,$publisher); $stmt->bind_result($res_id,$res_quantity); if($stmt->execute()) { $data = array(); $row_counter = 0; if($stmt->fetch()) { $data[0] = $res_id; $data[1] = $res_quantity; $row_counter++; } if(!empty($data)) { return $data; } else { return false; } } } } function save_book_details_into_permanent($language,$book_isbn,$book_title,$book_type,$author_name,$edition,$publisher,$total_quantity,$issued_quantity) { $date = date("Y-m-d"); $time = date("H:i:s t"); if($stmt = $this->con->prepare("INSERT INTO `book_details`(`language`, `isbn_no`, `book_title`, `book_type`, `author_name`, `edition`, `publisher`, `total_quantity`, `issued_book`, `date`, `time`) VALUES (?,?,?,?,?,?,?,?,?,?,?)")) { $stmt->bind_param("sssssssssss",$language,$book_isbn,$book_title,$book_type,$author_name,$edition,$publisher,$total_quantity,$issued_quantity,$date,$time); if($stmt->execute()) { return $stmt->insert_id; } return false; } } function updates_book_details_into_permanent($language,$book_isbn,$book_title,$book_type,$author_name,$edition,$publisher,$total_quantity,$issued_quantity,$res_id) { $date = date("Y-m-d"); $time = date("H:i:s t"); if($stmt = $this->con->prepare("UPDATE `book_details` SET `language`=?,`isbn_no`=?,`book_title`=?,`book_type`=?,`author_name`=?,`edition`=?,`publisher`=?,`total_quantity`=?,`issued_book`=?,`date`=?,`time`=? WHERE `id`=?")) { $stmt->bind_param("sssssssssssi",$language,$book_isbn,$book_title,$book_type,$author_name,$edition,$publisher,$total_quantity,$issued_quantity,$date,$time,$res_id); if($stmt->execute()) { return true; } return False; } } function get_all_book_details_form_permanent() { if($stmt = $this->con->prepare("SELECT `id`, `language`, `isbn_no`, `book_title`, `book_type`, `author_name`, `edition`, `publisher`, `total_quantity`, `issued_book`, `date` FROM `book_details`")) { $stmt->bind_result($res_id,$res_language,$res_isbn_no,$res_book_title,$res_book_type,$res_anthor_name,$res_edition,$res_publisher,$res_total_quantity,$res_issued_book,$res_date); if($stmt->execute()) { $data = array(); $row_counter = 0; while($stmt->fetch()) { $data[$row_counter][0] = $res_id; $data[$row_counter][1] = $res_language; $data[$row_counter][2] = $res_isbn_no; $data[$row_counter][3] = $res_book_title; $data[$row_counter][4] = $res_book_type; $data[$row_counter][5] = $res_anthor_name; $data[$row_counter][6] = $res_edition; $data[$row_counter][7] = $res_publisher; $data[$row_counter][8] = $res_total_quantity; $data[$row_counter][9] = $res_issued_book; $data[$row_counter][10] = $res_date; $row_counter++; } if(!empty($data)) { return $data; } else { return false; } } } } function get_all_book_details_form_temp() { if($stmt = $this->con->prepare("SELECT `id`, `language`, `isbn_no`, `book_title`, `book_type`, `author_name`, `edition`, `publisher`, `quantity`, `price`, `pages`, `purchase_date`, `date`, `book_id` FROM `tmp_book_details`")) { $stmt->bind_result($res_id,$res_language,$res_isbn_no,$res_book_title,$res_book_type,$res_anthor_name,$res_edition,$res_publisher,$res_quantity,$res_price,$res_pages,$res_purchase_date,$res_date,$res_book_id); if($stmt->execute()) { $data = array(); $row_counter = 0; while($stmt->fetch()) { $data[$row_counter][0] = $res_id; $data[$row_counter][1] = $res_language; $data[$row_counter][2] = $res_isbn_no; $data[$row_counter][3] = $res_book_title; $data[$row_counter][4] = $res_book_type; $data[$row_counter][5] = $res_anthor_name; $data[$row_counter][6] = $res_edition; $data[$row_counter][7] = $res_publisher; $data[$row_counter][8] = $res_quantity; $data[$row_counter][9] = $res_price; $data[$row_counter][10] = $res_pages; $data[$row_counter][11] = $res_purchase_date; $data[$row_counter][12] = $res_date; $data[$row_counter][13] = $res_book_id; $row_counter++; } if(!empty($data)) { return $data; } else { return false; } } } } function delete_book_details_record_from_temp($delete_id) { if($stmt = $this->con->prepare("DELETE FROM `tmp_book_details` WHERE `id`=?")) { $stmt->bind_param("i",$delete_id); if($stmt->execute()) { return true; } return False; } } function upadate_book_details_into_tmp($inserted_id,$tmp_insert_id) { $date = date("Y-m-d"); $time = date("H:i:s t"); if($stmt = $this->con->prepare("UPDATE `tmp_book_details` SET `book_id`=? WHERE `id`=?")) { $stmt->bind_param("si",$inserted_id,$tmp_insert_id); if($stmt->execute()) { return true; } return False; } } function get_book_deleted_quantity_from_tmp($delete_id) { if($stmt = $this->con->prepare("SELECT `quantity` FROM `tmp_book_details` WHERE `id`=?")) { $stmt->bind_param("i",$delete_id); $stmt->bind_result($res_quantity); if($stmt->execute()) { if($stmt->fetch()) { return $res_quantity; } return False; } } } function update_book_quantity_into_permanent($current_quantity,$book_id) { $date = date("Y-m-d"); $time = date("H:i:s t"); if($stmt = $this->con->prepare("UPDATE `book_details` SET `total_quantity`=`total_quantity` - '$current_quantity' WHERE `id`=?")) { $stmt->bind_param("i",$book_id); if($stmt->execute()) { return true; } return False; } } function save_magazine_master_title_details($language,$type,$name) { $date = date("Y-m-d"); $time = date("H:i:s t"); if($stmt = $this->con->prepare("INSERT INTO `magazine-master`( `language`, `type`, `name`, `date`, `time`) VALUES (?,?,?,?,?)")) { $stmt->bind_param("sssss",$language,$type,$name,$date,$time); if($stmt->execute()) { return true; } return false; } } function delete_magazine_master_data($delete_id) { if($stmt = $this->con->prepare("DELETE FROM `magazine-master` WHERE `id`=?")) { $stmt->bind_param("i",$delete_id); if($stmt->execute()) { return true; } return False; } } function get_all_magazine_master_data() { if($stmt = $this->con->prepare("SELECT `id`, `language`, `type`, `name`, `date` FROM `magazine-master`")) { $stmt->bind_result($res_id,$language,$type,$name,$res_date); if($stmt->execute()) { $data = array(); $row_counter = 0; while($stmt->fetch()) { $data[$row_counter][0] = $res_id; $data[$row_counter][1] = $language; $data[$row_counter][2] = $type; $data[$row_counter][3] = $name; $data[$row_counter][4] = $res_date; $row_counter++; } if(!empty($data)) { return $data; } else { return false; } } } } function save_magazine_details($m_n_id,$dateofreceipt,$publishdate,$publisher,$pages,$price,$quantity) { $date = date("Y-m-d"); $time = date("H:i:s t"); if($stmt = $this->con->prepare("INSERT INTO `magazine`(`m_n_id`, `dateofreceipt`, `publishdate`, `publisher`, `pages`, `price`, `quantity`, `date`, `time`) VALUES (?,?,?,?,?,?,?,?,?)")) { $stmt->bind_param("sssssssss",$m_n_id,$dateofreceipt,$publishdate,$publisher,$pages,$price,$quantity,$date,$time); if($stmt->execute()) { return true; } return false; } } function delete_magazine_data($delete_id) { if($stmt = $this->con->prepare("DELETE FROM `magazine` WHERE `id`=?")) { $stmt->bind_param("i",$delete_id); if($stmt->execute()) { return true; } return False; } } function get_all_magazine_data() { if($stmt = $this->con->prepare("SELECT `id`, `m_n_id`, `dateofreceipt`, `publishdate`, `publisher`, `pages`, `price`, `quantity`, `date` FROM `magazine`")) { $stmt->bind_result($res_id,$m_n_id,$dateofreceipt,$publishdate,$publisher,$pages,$price,$quantity,$res_date); if($stmt->execute()) { $data = array(); $row_counter = 0; while($stmt->fetch()) { $data[$row_counter][0] = $res_id; $data[$row_counter][1] = $m_n_id; $data[$row_counter][2] = $dateofreceipt; $data[$row_counter][3] = $publishdate; $data[$row_counter][4] = $publisher; $data[$row_counter][5] = $pages; $data[$row_counter][6] = $price; $data[$row_counter][7] = $quantity; $data[$row_counter][8] = $res_date; $row_counter++; } if(!empty($data)) { return $data; } else { return false; } } } } function update_magazine_master_details($language,$type,$name,$edit_id) { $date = date("Y-m-d"); $time = date("H:i:s t"); if($stmt = $this->con->prepare("UPDATE `magazine-master` SET `language`=?,`type`=?,`name`=?,`date`=?,`time`=? WHERE `id`=?")) { $stmt->bind_param("sssssi",$language,$type,$name,$date,$time,$edit_id); if($stmt->execute()) { return true; } return False; } } function get_magazine_master_details($edit_id) { if($stmt = $this->con->prepare("SELECT `id`, `language`, `type`, `name`, `date` FROM `magazine-master` WHERE `id`=?")) { $stmt->bind_param("i",$edit_id); $stmt->bind_result($res_id,$language,$type,$name,$res_date); if($stmt->execute()) { $data = array(); $row_counter = 0; if($stmt->fetch()) { $data[0] = $res_id; $data[1] = $language; $data[2] = $type; $data[3] = $name; $data[4] = $res_date; $row_counter++; } if(!empty($data)) { return $data; } else { return false; } } } } function update_magazine_details($m_n_id,$dateofreceipt,$publishdate,$publisher,$pages,$price,$quantity,$edit_id) { $date = date("Y-m-d"); $time = date("H:i:s t"); if($stmt = $this->con->prepare("UPDATE `magazine` SET `m_n_id`=?,`dateofreceipt`=?,`publishdate`=?,`publisher`=?,`pages`=?,`price`=?,`quantity`=?,`date`=?,`time`=? WHERE `id`=?")) { $stmt->bind_param("sssssssssi",$m_n_id,$dateofreceipt,$publishdate,$publisher,$pages,$price,$quantity,$date,$time,$edit_id); if($stmt->execute()) { return true; } return False; } } function get_magazine_details($edit_id) { if($stmt = $this->con->prepare("SELECT `id`, `m_n_id`, `dateofreceipt`, `publishdate`, `publisher`, `pages`, `price`, `quantity`, `date` FROM `magazine` WHERE `id`=?")) { $stmt->bind_param("i",$edit_id); $stmt->bind_result($res_id,$m_n_id,$dateofreceipt,$publishdate,$publisher,$pages,$price,$quantity,$res_date); if($stmt->execute()) { $data = array(); $row_counter = 0; if($stmt->fetch()) { $data[0] = $res_id; $data[1] = $m_n_id; $data[2] = $dateofreceipt; $data[3] = $publishdate; $data[4] = $publisher; $data[5] = $pages; $data[6] = $price; $data[7] = $quantity; $data[8] = $res_date; $row_counter++; } if(!empty($data)) { return $data; } else { return false; } } } } function save_newspaper_master_title_details($language,$type,$name) { $date = date("Y-m-d"); $time = date("H:i:s t"); if($stmt = $this->con->prepare("INSERT INTO `newspaper-master`(`language`, `type`, `name`, `date`, `time`) VALUES (?,?,?,?,?)")) { $stmt->bind_param("sssss",$language,$type,$name,$date,$time); if($stmt->execute()) { return true; } return false; } } function delete_newspaper_master_data($delete_id) { if($stmt = $this->con->prepare("DELETE FROM `newspaper-master` WHERE `id`=?")) { $stmt->bind_param("i",$delete_id); if($stmt->execute()) { return true; } return False; } } function get_all_newspaper_master_data() { if($stmt = $this->con->prepare("SELECT `id`, `language`, `type`, `name`, `date` FROM `newspaper-master`")) { $stmt->bind_result($res_id,$res_language,$res_type,$res_name,$res_date); if($stmt->execute()) { $data = array(); $row_counter = 0; while($stmt->fetch()) { $data[$row_counter][0] = $res_id; $data[$row_counter][1] = $res_language; $data[$row_counter][2] = $res_type; $data[$row_counter][3] = $res_name; $data[$row_counter][4] = $res_date; $row_counter++; } if(!empty($data)) { return $data; } else { return false; } } } } function update_newspaper_master_details($language,$type,$name,$edit_id) { $date = date("Y-m-d"); $time = date("H:i:s t"); if($stmt = $this->con->prepare("UPDATE `newspaper-master` SET `language`=?,`type`=?,`name`=?,`date`=?,`time`=? WHERE `id`=?")) { $stmt->bind_param("sssssi",$language,$type,$name,$date,$time,$edit_id); if($stmt->execute()) { return true; } return False; } } function get_newspaper_master_details($edit_id) { if($stmt = $this->con->prepare("SELECT `id`, `language`, `type`, `name`, `date` FROM `newspaper-master` WHERE `id`=?")) { $stmt->bind_param("i",$edit_id); $stmt->bind_result($res_id,$res_language,$res_type,$res_name,$res_date); if($stmt->execute()) { $data = array(); $row_counter = 0; if($stmt->fetch()) { $data[0] = $res_id; $data[1] = $res_language; $data[2] = $res_type; $data[3] = $res_name; $data[4] = $res_date; $row_counter++; } if(!empty($data)) { return $data; } else { return false; } } } } function save_news_paper_details($newspaper_id,$date_of_receipt,$published_date,$publisher,$pages,$price,$quantity) { $date = date("Y-m-d"); $time = date("H:i:s t"); if($stmt = $this->con->prepare("INSERT INTO `newspaper_details`(`newspaper_id`, `date_of_receipt`, `publish_date`, `publisher`, `pages`, `price`, `quantity`, `date`, `time`) VALUES (?,?,?,?,?,?,?,?,?)")) { $stmt->bind_param("sssssssss",$newspaper_id,$date_of_receipt,$published_date,$publisher,$pages,$price,$quantity,$date,$time); if($stmt->execute()) { return true; } return false; } } function get_all_newspaper_details_data() { if($stmt = $this->con->prepare("SELECT `id`, `newspaper_id`, `date_of_receipt`, `publish_date`, `publisher`, `pages`, `price`, `quantity`, `date` FROM `newspaper_details`")) { $stmt->bind_result($res_id,$newspaper_id,$date_of_receipt,$publish_date,$publisher,$pages,$price,$quantity,$res_date); if($stmt->execute()) { $data = array(); $row_counter = 0; while($stmt->fetch()) { $data[$row_counter][0] = $res_id; $data[$row_counter][1] = $newspaper_id; $data[$row_counter][2] = $date_of_receipt; $data[$row_counter][3] = $publish_date; $data[$row_counter][4] = $publisher; $data[$row_counter][5] = $pages; $data[$row_counter][6] = $price; $data[$row_counter][7] = $quantity; $data[$row_counter][8] = $res_date; $row_counter++; } if(!empty($data)) { return $data; } else { return false; } } } } function update_newspaper_details($newspaper_id,$date_of_receipt,$published_date,$publisher,$pages,$price,$quantity,$edit_id) { $date = date("Y-m-d"); $time = date("H:i:s t"); if($stmt = $this->con->prepare("UPDATE `newspaper_details` SET `newspaper_id`=?,`date_of_receipt`=?,`publish_date`=?,`publisher`=?,`pages`=?,`price`=?,`quantity`=?,`date`=?,`time`=? WHERE `id`=?")) { $stmt->bind_param("sssssssssi",$newspaper_id,$date_of_receipt,$published_date,$publisher,$pages,$price,$quantity,$date,$time,$edit_id); if($stmt->execute()) { return true; } return False; } } function get_newspaper_details($edit_id) { if($stmt = $this->con->prepare("SELECT `id`, `newspaper_id`, `date_of_receipt`, `publish_date`, `publisher`, `pages`, `price`, `quantity`, `date` FROM `newspaper_details` WHERE `id`=?")) { $stmt->bind_param("i",$edit_id); $stmt->bind_result($res_id,$newspaper_id,$date_of_receipt,$publish_date,$publisher,$pages,$price,$quantity,$res_date); if($stmt->execute()) { $data = array(); $row_counter = 0; if($stmt->fetch()) { $data[0] = $res_id; $data[1] = $newspaper_id; $data[2] = $date_of_receipt; $data[3] = $publish_date; $data[4] = $publisher; $data[5] = $pages; $data[6] = $price; $data[7] = $quantity; $data[8] = $res_date; $row_counter++; } if(!empty($data)) { return $data; } else { return false; } } } } function get_all_Book_details_from_permanent_table($select_book_id) { if($stmt = $this->con->prepare("SELECT `id`, `language`, `isbn_no`, `book_title`, `book_type`, `author_name`, `edition`, `publisher`, `total_quantity`, `issued_book`, `date` FROM `book_details` WHERE `id`=?")) { $stmt->bind_param("i",$select_book_id); $stmt->bind_result($res_id,$res_language,$res_isbn_no,$res_book_title,$res_book_type,$res_author_name,$edition,$publisher,$res_total_quantity,$res_issued_book,$res_date); if($stmt->execute()) { $data = array(); $row_counter = 0; if($stmt->fetch()) { $data[0] = $res_id; $data[1] = $res_language; $data[2] = $res_isbn_no; $data[3] = $res_book_title; $data[4] = $res_book_type; $data[5] = $res_author_name; $data[6] = $edition; $data[7] = $publisher; $data[8] = $res_total_quantity; $data[9] = $res_issued_book; $data[10] = $res_date; $row_counter++; } if(!empty($data)) { return $data; } else { return false; } } } } function save_issued_record($select_stud_id,$select_book_id,$issue_date,$return_date,$quantity) { $date = date("Y-m-d"); $time = date("H:i:s t"); $status = "Issued"; if($stmt = $this->con->prepare("INSERT INTO `issued_record`(`stud_id`, `book_id`, `issued_date`, `returned_date`, `issued_quantity`, `status`, `date`, `time`) VALUES (?,?,?,?,?,?,?,?)")) { $stmt->bind_param("ssssssss",$select_stud_id,$select_book_id,$issue_date,$return_date,$quantity,$status,$date,$time); if($stmt->execute()) { return true; } return false; } } function updates_book_issued_details_into_permanent($quantity,$select_book_id) { $date = date("Y-m-d"); $time = date("H:i:s t"); if($stmt = $this->con->prepare("UPDATE `book_details` SET `issued_book`= `issued_book` + '$quantity',`date`=?,`time`=? WHERE `id`=?")) { $stmt->bind_param("ssi",$date,$time,$select_book_id); if($stmt->execute()) { return true; } return False; } } function get_all_issued_book_details() { if($stmt = $this->con->prepare("SELECT `id`, `stud_id`, `book_id`, `issued_date`, `returned_date`, `issued_quantity`, `date` FROM `issued_record` WHERE `status`='Issued'")) { $stmt->bind_result($res_id,$res_stud_id,$res_book_id,$res_issued_date,$res_returned_date,$res_issued_quantity,$res_date); if($stmt->execute()) { $data = array(); $row_counter = 0; while($stmt->fetch()) { $data[$row_counter][0] = $res_id; $data[$row_counter][1] = $res_stud_id; $data[$row_counter][2] = $res_book_id; $data[$row_counter][3] = $res_issued_date; $data[$row_counter][4] = $res_returned_date; $data[$row_counter][5] = $res_issued_quantity; $data[$row_counter][6] = $res_date; $row_counter++; } if(!empty($data)) { return $data; } else { return false; } } } } function get_issued_book_details($issued_book_id) { if($stmt = $this->con->prepare("SELECT `id`, `stud_id`, `book_id`, `issued_date`, `returned_date`, `issued_quantity` FROM `issued_record` WHERE `id`=?")) { $stmt->bind_param("i",$issued_book_id); $stmt->bind_result($res_id,$stud_id,$book_id,$issued_date,$returned_date,$issued_quantity); if($stmt->execute()) { $data = array(); $row_counter = 0; if($stmt->fetch()) { $data[0] = $res_id; $data[1] = $stud_id; $data[2] = $book_id; $data[3] = $issued_date; $data[4] = $returned_date; $data[5] = $issued_quantity; $row_counter++; } if(!empty($data)) { return $data; } else { return false; } } } } function update_returned_book_record($return_date,$fine,$issued_book_id) { $date = date("Y-m-d"); $time = date("H:i:s t"); $status = "Returned"; if($stmt = $this->con->prepare("UPDATE `issued_record` SET `book_returned_date`=?,`fine`=?,`status`=?,`date`=?,`time`=? WHERE `id`=?")) { $stmt->bind_param("sssssi",$return_date,$fine,$status,$date,$time,$issued_book_id); if($stmt->execute()) { return true; } return False; } } function updates_book_returned_details_into_permanent($quantity,$book_id) { $date = date("Y-m-d"); $time = date("H:i:s t"); if($stmt = $this->con->prepare("UPDATE `book_details` SET `issued_book`= `issued_book` - '$quantity',`date`=?,`time`=? WHERE `id`=?")) { $stmt->bind_param("ssi",$date,$time,$book_id); if($stmt->execute()) { return true; } return False; } } function delete_issued_book_data($delete_id) { if($stmt = $this->con->prepare("DELETE FROM `issued_record` WHERE `id`=?")) { $stmt->bind_param("i",$delete_id); if($stmt->execute()) { return true; } return False; } } function updates_book_deleted_details_into_permanent($issued_quantity,$book_id) { $date = date("Y-m-d"); $time = date("H:i:s t"); if($stmt = $this->con->prepare("UPDATE `book_details` SET `issued_book`= `issued_book` - '$issued_quantity',`date`=?,`time`=? WHERE `id`=?")) { $stmt->bind_param("ssi",$date,$time,$book_id); if($stmt->execute()) { return true; } return False; } } function get_all_student_transaction_history_details($from_date,$to_date) { if($stmt = $this->con->prepare("SELECT `id`, `stud_id`, `book_id`, `issued_date`, `returned_date`, `issued_quantity`, `book_returned_date`, `fine`, `date` FROM `issued_record` WHERE `status`='Returned' AND `date` BETWEEN ? AND ?")) { $stmt->bind_param("ss",$from_date,$to_date); $stmt->bind_result($res_id,$res_stud_id,$res_book_id,$res_issued_date,$res_returned_date,$res_issued_quantity,$res_book_returned_date,$res_fine,$res_date); if($stmt->execute()) { $data = array(); $row_counter = 0; while($stmt->fetch()) { $data[$row_counter][0] = $res_id; $data[$row_counter][1] = $res_stud_id; $data[$row_counter][2] = $res_book_id; $data[$row_counter][3] = $res_issued_date; $data[$row_counter][4] = $res_returned_date; $data[$row_counter][5] = $res_issued_quantity; $data[$row_counter][6] = $res_book_returned_date; $data[$row_counter][7] = $res_fine; $data[$row_counter][8] = $res_date; $row_counter++; } if(!empty($data)) { return $data; } else { return false; } } } } function get_all_student_overdue_book_details() { $current_date = date("Y-m-d"); if($stmt = $this->con->prepare("SELECT `id`, `stud_id`, `book_id`, `issued_date`, `returned_date`, `issued_quantity`, `book_returned_date`, `fine`, `date` FROM `issued_record` WHERE `status`='Issued' AND `returned_date`< '$current_date'")) { $stmt->bind_result($res_id,$res_stud_id,$res_book_id,$res_issued_date,$res_returned_date,$res_issued_quantity,$res_book_returned_date,$res_fine,$res_date); if($stmt->execute()) { $data = array(); $row_counter = 0; while($stmt->fetch()) { $data[$row_counter][0] = $res_id; $data[$row_counter][1] = $res_stud_id; $data[$row_counter][2] = $res_book_id; $data[$row_counter][3] = $res_issued_date; $data[$row_counter][4] = $res_returned_date; $data[$row_counter][5] = $res_issued_quantity; $data[$row_counter][6] = $res_book_returned_date; $data[$row_counter][7] = $res_fine; $data[$row_counter][8] = $res_date; $row_counter++; } if(!empty($data)) { return $data; } else { return false; } } } } function get_main_title_id_from_title($main_title) { if($stmt = $this->con->prepare("SELECT `id` FROM `remark_main_title_master` WHERE `title`=?")) { $stmt->bind_param("s",$main_title); $stmt->bind_result($res_id); if($stmt->execute()) { if($stmt->fetch()) { return $res_id; } return False; } } } function save_remark_main_title_master_details($main_title) { $date = date("Y-m-d"); $time = date("H:i:s t"); if($stmt = $this->con->prepare("INSERT INTO `remark_main_title_master`(`title`, `date`, `time`) VALUES (?,?,?)")) { $stmt->bind_param("sss",$main_title,$date,$time); if($stmt->execute()) { return true; } return false; } } function get_all_remark_main_title_master_data() { if($stmt = $this->con->prepare("SELECT `id`, `title`, `date` FROM `remark_main_title_master`")) { $stmt->bind_result($res_id,$res_main_title,$res_date); if($stmt->execute()) { $data = array(); $row_counter = 0; while($stmt->fetch()) { $data[$row_counter][0] = $res_id; $data[$row_counter][1] = $res_main_title; $data[$row_counter][2] = $res_date; $row_counter++; } if(!empty($data)) { return $data; } else { return false; } } } } function delete_remark_main_title_master_data($delete_id) { if($stmt = $this->con->prepare("DELETE FROM `remark_main_title_master` WHERE `id`=?")) { $stmt->bind_param("i",$delete_id); if($stmt->execute()) { return true; } return False; } } function get_remark_main_title_master_details($edit_id) { if($stmt = $this->con->prepare("SELECT `id`, `title`, `date` FROM `remark_main_title_master` WHERE `id`=?")) { $stmt->bind_param("i",$edit_id); $stmt->bind_result($res_id,$res_main_title,$res_date); if($stmt->execute()) { $data = array(); $row_counter = 0; if($stmt->fetch()) { $data[0] = $res_id; $data[1] = $res_main_title; $data[2] = $res_date; $row_counter++; } if(!empty($data)) { return $data; } else { return false; } } } } function update_remark_main_title_master_details($main_title,$edit_id) { $date = date("Y-m-d"); $time = date("H:i:s t"); if($stmt = $this->con->prepare("UPDATE `remark_main_title_master` SET `title`=?,`date`=?,`time`=? WHERE `id`=?")) { $stmt->bind_param("sssi",$main_title,$date,$time,$edit_id); if($stmt->execute()) { return true; } return False; } } function get_sub_title_id_from_title($main_title,$sub_title) { if($stmt = $this->con->prepare("SELECT `id` FROM `remark_sub_title_master` WHERE `main_title`=? AND `sub_title`=?")) { $stmt->bind_param("ss",$main_title,$sub_title); $stmt->bind_result($res_id); if($stmt->execute()) { if($stmt->fetch()) { return $res_id; } return False; } } } function save_remark_sub_title_master_details($main_title,$sub_title) { $date = date("Y-m-d"); $time = date("H:i:s t"); if($stmt = $this->con->prepare("INSERT INTO `remark_sub_title_master`(`main_title`, `sub_title`, `date`, `time`) VALUES (?,?,?,?)")) { $stmt->bind_param("ssss",$main_title,$sub_title,$date,$time); if($stmt->execute()) { return true; } return false; } } function get_all_remark_sub_title_master_data() { if($stmt = $this->con->prepare("SELECT `id`, `main_title`, `sub_title`, `date` FROM `remark_sub_title_master`")) { $stmt->bind_result($res_id,$res_main_title,$res_sub_title,$res_date); if($stmt->execute()) { $data = array(); $row_counter = 0; while($stmt->fetch()) { $data[$row_counter][0] = $res_id; $data[$row_counter][1] = $res_main_title; $data[$row_counter][2] = $res_sub_title; $data[$row_counter][3] = $res_date; $row_counter++; } if(!empty($data)) { return $data; } else { return false; } } } } function delete_remark_sub_title_master_data($delete_id) { if($stmt = $this->con->prepare("DELETE FROM `remark_sub_title_master` WHERE `id`=?")) { $stmt->bind_param("i",$delete_id); if($stmt->execute()) { return true; } return False; } } function get_remark_sub_title_master_details($edit_id) { if($stmt = $this->con->prepare("SELECT `id`, `main_title`, `sub_title`, `date` FROM `remark_sub_title_master` WHERE `id`=?")) { $stmt->bind_param("i",$edit_id); $stmt->bind_result($res_id,$res_main_title,$res_sub_title,$res_date); if($stmt->execute()) { $data = array(); $row_counter = 0; if($stmt->fetch()) { $data[0] = $res_id; $data[1] = $res_main_title; $data[2] = $res_sub_title; $data[3] = $res_date; $row_counter++; } if(!empty($data)) { return $data; } else { return false; } } } } function update_remark_sub_title_master_details($main_title,$sub_title,$edit_id) { $date = date("Y-m-d"); $time = date("H:i:s t"); if($stmt = $this->con->prepare("UPDATE `remark_sub_title_master` SET `main_title`=?,`sub_title`=?,`date`=?,`time`=? WHERE `id`=?")) { $stmt->bind_param("ssssi",$main_title,$sub_title,$date,$time,$edit_id); if($stmt->execute()) { return true; } return False; } } function get_remark_title_id_from_title($main_title,$sub_title,$remark_code) { if($stmt = $this->con->prepare("SELECT `id` FROM `remark_master` WHERE `main_title`=? AND `sub_title`=? AND `remark_code`=?")) { $stmt->bind_param("sss",$main_title,$sub_title,$remark_code); $stmt->bind_result($res_id); if($stmt->execute()) { if($stmt->fetch()) { return $res_id; } return False; } } } function save_remark_title_master_details($main_title,$sub_title,$remark,$remark_code) { $date = date("Y-m-d"); $time = date("H:i:s t"); if($stmt = $this->con->prepare("INSERT INTO `remark_master`(`main_title`, `sub_title`, `remark`, `remark_code`, `date`, `time`) VALUES (?,?,?,?,?,?)")) { $stmt->bind_param("ssssss",$main_title,$sub_title,$remark,$remark_code,$date,$time); if($stmt->execute()) { return true; } return false; } } function get_all_remark_title_master_data() { if($stmt = $this->con->prepare("SELECT `id`, `main_title`, `sub_title`, `remark`, `remark_code`, `date` FROM `remark_master`")) { $stmt->bind_result($res_id,$res_main_title,$res_sub_title,$res_remark,$res_remark_code,$res_date); if($stmt->execute()) { $data = array(); $row_counter = 0; while($stmt->fetch()) { $data[$row_counter][0] = $res_id; $data[$row_counter][1] = $res_main_title; $data[$row_counter][2] = $res_sub_title; $data[$row_counter][3] = $res_remark; $data[$row_counter][4] = $res_date; $data[$row_counter][5] = $res_remark_code; $row_counter++; } if(!empty($data)) { return $data; } else { return false; } } } } function delete_remark_title_master_data($delete_id) { if($stmt = $this->con->prepare("DELETE FROM `remark_master` WHERE `id`=?")) { $stmt->bind_param("i",$delete_id); if($stmt->execute()) { return true; } return False; } } function get_remark_title_master_details($edit_id) { if($stmt = $this->con->prepare("SELECT `id`, `main_title`, `sub_title`, `remark`, `remark_code`, `date` FROM `remark_master` WHERE `id`=?")) { $stmt->bind_param("i",$edit_id); $stmt->bind_result($res_id,$res_main_title,$res_sub_title,$res_remark,$res_remark_code,$res_date); if($stmt->execute()) { $data = array(); $row_counter = 0; if($stmt->fetch()) { $data[0] = $res_id; $data[1] = $res_main_title; $data[2] = $res_sub_title; $data[3] = $res_remark; $data[4] = $res_date; $data[5] = $res_remark_code; $row_counter++; } if(!empty($data)) { return $data; } else { return false; } } } } function update_remark_title_master_details($main_title,$sub_title,$remark,$remark_code,$edit_id) { $date = date("Y-m-d"); $time = date("H:i:s t"); if($stmt = $this->con->prepare("UPDATE `remark_master` SET `main_title`=?,`sub_title`=?,`remark`=?,`remark_code`=?,`date`=?,`time`=? WHERE `id`=?")) { $stmt->bind_param("ssssssi",$main_title,$sub_title,$remark,$remark_code,$date,$time,$edit_id); if($stmt->execute()) { return true; } return False; } } function get_remark_title_id($main_title,$sub_title,$remark_code,$edit_id) { if($stmt = $this->con->prepare("SELECT `id` FROM `remark_master` WHERE `main_title`=? AND `sub_title`=? AND `remark_code`=? AND `id`!=?")) { $stmt->bind_param("sssi",$main_title,$sub_title,$remark_code,$edit_id); $stmt->bind_result($res_id); if($stmt->execute()) { if($stmt->fetch()) { return $res_id; } return False; } } } function get_sub_title_id($main_title,$sub_title,$edit_id) { if($stmt = $this->con->prepare("SELECT `id` FROM `remark_sub_title_master` WHERE `main_title`=? AND `sub_title`=? AND `id`!=?")) { $stmt->bind_param("ssi",$main_title,$sub_title,$edit_id); $stmt->bind_result($res_id); if($stmt->execute()) { if($stmt->fetch()) { return $res_id; } return False; } } } function get_subject_title_id_from_title($sub_title) { if($stmt = $this->con->prepare("SELECT `id` FROM `subject_master` WHERE `sub_title`=?")) { $stmt->bind_param("s",$sub_title); $stmt->bind_result($res_id); if($stmt->execute()) { if($stmt->fetch()) { return $res_id; } return False; } } } function save_subject_title_master_details($sub_title) { $date = date("Y-m-d"); $time = date("H:i:s t"); if($stmt = $this->con->prepare("INSERT INTO `subject_master`(`sub_title`, `date`, `time`) VALUES (?,?,?)")) { $stmt->bind_param("sss",$sub_title,$date,$time); if($stmt->execute()) { return true; } return false; } } function get_all_subject_title_master_data() { if($stmt = $this->con->prepare("SELECT `id`, `sub_title`, `date` FROM `subject_master`")) { $stmt->bind_result($res_id,$res_sub_title,$res_date); if($stmt->execute()) { $data = array(); $row_counter = 0; while($stmt->fetch()) { $data[$row_counter][0] = $res_id; $data[$row_counter][1] = $res_sub_title; $data[$row_counter][2] = $res_date; $row_counter++; } if(!empty($data)) { return $data; } else { return false; } } } } function delete_subject_title_master_data($delete_id) { if($stmt = $this->con->prepare("DELETE FROM `subject_master` WHERE `id`=?")) { $stmt->bind_param("i",$delete_id); if($stmt->execute()) { return true; } return False; } } function get_subject_title_master_details($edit_id) { if($stmt = $this->con->prepare("SELECT `id`, `sub_title`, `date` FROM `subject_master` WHERE `id`=?")) { $stmt->bind_param("i",$edit_id); $stmt->bind_result($res_id,$res_sub_title,$res_date); if($stmt->execute()) { $data = array(); $row_counter = 0; if($stmt->fetch()) { $data[0] = $res_id; $data[1] = $res_sub_title; $data[2] = $res_date; $row_counter++; } if(!empty($data)) { return $data; } else { return false; } } } } function get_subject_title_master_details1($edit_id) { if($stmt = $this->con->prepare("SELECT `id`, `sub_title`, `date` FROM `subject_master` WHERE `id`=?")) { $stmt->bind_param("i",$edit_id); $stmt->bind_result($res_id,$res_sub_title,$res_date); if($stmt->execute()) { $data = array(); $row_counter = 0; if($stmt->fetch()) { $data[0] = $res_id; $data[1] = $res_sub_title; $data[2] = $res_date; $row_counter++; } if(!empty($data)) { return $data; } else { return false; } } } } function update_subject_title_master_details($sub_title,$edit_id) { $date = date("Y-m-d"); $time = date("H:i:s t"); if($stmt = $this->con->prepare("UPDATE `subject_master` SET `sub_title`=?,`date`=?,`time`=? WHERE `id`=?")) { $stmt->bind_param("sssi",$sub_title,$date,$time,$edit_id); if($stmt->execute()) { return true; } return False; } } function get_class_id_from_title($class_title) { if($stmt = $this->con->prepare("SELECT `id` FROM `class_master` WHERE `class_title`=?")) { $stmt->bind_param("s",$class_title); $stmt->bind_result($res_id); if($stmt->execute()) { if($stmt->fetch()) { return $res_id; } return False; } } } function save_class_title_master_details($class_title) { $date = date("Y-m-d"); $time = date("H:i:s t"); if($stmt = $this->con->prepare("INSERT INTO `class_master`(`class_title`, `date`, `time`) VALUES (?,?,?)")) { $stmt->bind_param("sss",$class_title,$date,$time); if($stmt->execute()) { return true; } return false; } } function get_all_class_title_master_data() { if($stmt = $this->con->prepare("SELECT `id`, `class_title`, `date` FROM `class_master`")) { $stmt->bind_result($res_id,$res_class_title,$res_date); if($stmt->execute()) { $data = array(); $row_counter = 0; while($stmt->fetch()) { $data[$row_counter][0] = $res_id; $data[$row_counter][1] = $res_class_title; $data[$row_counter][2] = $res_date; $row_counter++; } if(!empty($data)) { return $data; } else { return false; } } } } function delete_class_title_master_data($delete_id) { if($stmt = $this->con->prepare("DELETE FROM `class_master` WHERE `id`=?")) { $stmt->bind_param("i",$delete_id); if($stmt->execute()) { return true; } return False; } } function get_class_title_master_details($edit_id) { if($stmt = $this->con->prepare("SELECT `id`, `class_title`, `date` FROM `class_master` WHERE `id`=?")) { $stmt->bind_param("i",$edit_id); $stmt->bind_result($res_id,$res_class_title,$res_date); if($stmt->execute()) { $data = array(); $row_counter = 0; if($stmt->fetch()) { $data[0] = $res_id; $data[1] = $res_class_title; $data[2] = $res_date; $row_counter++; } if(!empty($data)) { return $data; } else { return false; } } } } function update_class_title_master_details($class_title,$edit_id) { $date = date("Y-m-d"); $time = date("H:i:s t"); if($stmt = $this->con->prepare("UPDATE `class_master` SET `class_title`=?,`date`=?,`time`=? WHERE `id`=?")) { $stmt->bind_param("sssi",$class_title,$date,$time,$edit_id); if($stmt->execute()) { return true; } return False; } } function get_subject_allocation_record($subject,$class) { if($stmt = $this->con->prepare("SELECT `id` FROM `subject_allocation` WHERE `class`=? AND `subject`=?")) { $stmt->bind_param("ss",$class,$subject); $stmt->bind_result($res_id); if($stmt->execute()) { if($stmt->fetch()) { return $res_id; } return False; } } } function insert_new_subject_allocation_record($class,$subject) { $date = date("Y-m-d"); $time = date("H:i:s t"); if($stmt = $this->con->prepare("INSERT INTO `subject_allocation`(`class`, `subject`, `date`, `time`) VALUES (?,?,?,?)")) { $stmt->bind_param("ssss",$class,$subject,$date,$time); if($stmt->execute()) { return true; } return false; } } function update_subject_allocation_record($class,$subject) { $date = date("Y-m-d"); $time = date("H:i:s t"); if($stmt = $this->con->prepare("UPDATE `subject_allocation` SET `class`=?,`subject`=?,`date`=?,`time`=? WHERE `class`=? AND `subject`=?")) { $stmt->bind_param("ssssss",$class,$subject,$date,$time,$class,$subject); if($stmt->execute()) { return true; } return False; } } function update_subject_sequence_record($sub_sequence_no,$sequence_id) { if($stmt = $this->con->prepare("UPDATE `subject_allocation` SET `sequence`=? WHERE `id` = ?")) { $stmt->bind_param("ii",$sub_sequence_no,$sequence_id); if($stmt->execute()) { return true; } return False; } } function get_all_subject_allocation_master_data() { if($stmt = $this->con->prepare("SELECT `id`, `class`, `subject`, `date` FROM `subject_allocation` ORDER BY `sequence` ASC")) { $stmt->bind_result($res_id,$res_class_title,$res_subject,$res_date); if($stmt->execute()) { $data = array(); $row_counter = 0; while($stmt->fetch()) { $data[$row_counter][0] = $res_id; $data[$row_counter][1] = $res_class_title; $data[$row_counter][2] = $res_subject; $data[$row_counter][3] = $res_date; $row_counter++; } if(!empty($data)) { return $data; } else { return false; } } } } function get_all_subject_allocation_master_data_classwise($selected_class) { if($stmt = $this->con->prepare("SELECT `id`, `class`, `subject`, `date`,`sequence` FROM `subject_allocation` Where `class`=? ORDER BY `sequence` ASC")) { $stmt->bind_param("s",$selected_class); $stmt->bind_result($res_id,$res_class_title,$res_subject,$res_date,$sequence); if($stmt->execute()) { $data = array(); $row_counter = 0; while($stmt->fetch()) { $data[$row_counter][0] = $res_id; $data[$row_counter][1] = $res_class_title; $data[$row_counter][2] = $res_subject; $data[$row_counter][3] = $res_date; $data[$row_counter][4] = $sequence; $row_counter++; } if(!empty($data)) { return $data; } else { return false; } } } } function delete_subject_allocation_master_data($delete_id) { if($stmt = $this->con->prepare("DELETE FROM `subject_allocation` WHERE `id`=?")) { $stmt->bind_param("i",$delete_id); if($stmt->execute()) { return true; } return False; } } function get_subject_from_class($class) { if($stmt = $this->con->prepare("SELECT `subject` FROM `subject_allocation` WHERE `class`=?")) { $stmt->bind_param("s",$class); $stmt->bind_result($res_subject); if($stmt->execute()) { $data = array(); $row_counter = 0; while($stmt->fetch()) { $data[$row_counter][0] = $res_subject; $row_counter++; } if(!empty($data)) { return $data; } else { return false; } } } } function save_marks_allocation_scheme_data($class,$semester,$subject,$formative_oral,$formative_practical,$formative_activity,$formative_project,$formative_open_book,$formative_surprise,$summative_written,$summative_oral) { $date = date("Y-m-d"); $time = date("H:i:s t"); if($stmt = $this->con->prepare("INSERT INTO `first-to-eight-marking-scheme`(`class`, `semester`, `subject`, `formative_oral`, `formative_practical`, `formative_activity`, `formative_project`, `formative_open_book_test`, `formative_surprise_test`, `summative_written`, `summative_oral`, `date`, `time`) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?)")) { $stmt->bind_param("sssssssssssss",$class,$semester,$subject,$formative_oral,$formative_practical,$formative_activity,$formative_project,$formative_open_book,$formative_surprise,$summative_written,$summative_oral,$date,$time); if($stmt->execute()) { return true; } return false; } } function get_all_1st_to_8th_marks_allocation_data($class,$semester) { if($stmt = $this->con->prepare("SELECT `id`, `class`, `semester`, `subject`, `formative_oral`, `formative_practical`, `formative_activity`, `formative_project`, `formative_open_book_test`, `formative_surprise_test`, `summative_written`, `summative_oral`, `date`, `time` FROM `first-to-eight-marking-scheme` WHERE `class`=? AND `semester`=?")) { $stmt->bind_param("ss",$class,$semester); $stmt->bind_result($res_id,$res_class,$res_semester,$res_subject,$formative_oral,$formative_practical,$formative_activity,$formative_project,$formative_open_book,$formative_surprise,$summative_written,$summative_oral,$res_date,$res_time); if($stmt->execute()) { $data = array(); $row_counter = 0; while($stmt->fetch()) { $data[$row_counter][0] = $res_id; $data[$row_counter][1] = $res_class; $data[$row_counter][2] = $res_semester; $data[$row_counter][3] = $res_subject; $data[$row_counter][4] = $formative_oral; $data[$row_counter][5] = $formative_practical; $data[$row_counter][6] = $formative_activity; $data[$row_counter][7] = $formative_project; $data[$row_counter][8] = $formative_open_book; $data[$row_counter][9] = $formative_surprise; $data[$row_counter][10] = $summative_written; $data[$row_counter][11] = $summative_oral; $data[$row_counter][12] = $res_date; $data[$row_counter][13] = $res_time; $row_counter++; } if(!empty($data)) { return $data; } else { return false; } } } } function get_first_to_eight_std_mark_scheme_data($edit_id) { if($stmt = $this->con->prepare("SELECT `id`, `class`, `semester`, `subject`, `formative_oral`, `formative_practical`, `formative_activity`, `formative_project`, `formative_open_book_test`, `formative_surprise_test`, `summative_written`, `summative_oral`, `date`, `time` FROM `first-to-eight-marking-scheme` WHERE `id`=?")) { $stmt->bind_param("i",$edit_id); $stmt->bind_result($res_id,$res_class,$res_semester,$res_subject,$formative_oral,$formative_practical,$formative_activity,$formative_project,$formative_open_book,$formative_surprise,$summative_written,$summative_oral,$res_date,$res_time); if($stmt->execute()) { $data = array(); while($stmt->fetch()) { $data[0] = $res_id; $data[1] = $res_class; $data[2] = $res_semester; $data[3] = $res_subject; $data[4] = $formative_oral; $data[5] = $formative_practical; $data[6] = $formative_activity; $data[7] = $formative_project; $data[8] = $formative_open_book; $data[9] = $formative_surprise; $data[10] = $summative_written; $data[11] = $summative_oral; $data[12] = $res_date; $data[13] = $res_time; } if(!empty($data)) { return $data; } else { return false; } } } } function get_id_from_class_sem_sub($class,$semester,$subject,$edit_id) { if($stmt = $this->con->prepare("SELECT `id` FROM `first-to-eight-marking-scheme` WHERE `class`=? AND `semester`=? AND `subject`=? AND `id`!=?")) { $stmt->bind_param("sssi",$class,$semester,$subject,$edit_id); $stmt->bind_result($res_id); if($stmt->execute()) { if($stmt->fetch()) { return $res_id; } return False; } } } function update_first_to_eight_std_marks_scheme_details($class,$semester,$subject,$formative_oral,$formative_practical,$formative_activity,$formative_project,$formative_open_book,$formative_surprise,$summative_written,$summative_oral,$edit_id) { $date = date("Y-m-d"); $time = date("H:i:s t"); if($stmt = $this->con->prepare("UPDATE `first-to-eight-marking-scheme` SET `class`=?,`semester`=?,`subject`=?,`formative_oral`=?,`formative_practical`=?,`formative_activity`=?,`formative_project`=?,`formative_open_book_test`=?,`formative_surprise_test`=?,`summative_written`=?,`summative_oral`=?,`date`=?,`time`=? WHERE `id`=?")) { $stmt->bind_param("sssssssssssssi",$class,$semester,$subject,$formative_oral,$formative_practical,$formative_activity,$formative_project,$formative_open_book,$formative_surprise,$summative_written,$summative_oral,$date,$time,$edit_id); if($stmt->execute()) { return true; } return false; } } function delete_first_to_eight_std_marks_allocation_scheme_data($delete_id) { if($stmt = $this->con->prepare("DELETE FROM `first-to-eight-marking-scheme` WHERE `id`=?")) { $stmt->bind_param("i",$delete_id); if($stmt->execute()) { return true; } return False; } } function get_all_stud_data_from_class_medium_division($class,$medium,$division,$acd_year) { if($stmt = $this->con->prepare("SELECT `id`, `surname`, `student_name`, `father_name`, `student_image`,`roll_no` FROM `student_details` WHERE `class`=? AND `medium`=? AND `division`=? AND `academic_year`=? ORDER BY `roll_no` ASC ")) { $stmt->bind_param("ssss",$class,$medium,$division,$acd_year); $stmt->bind_result($res_stud_id,$stud_surname,$stud_name,$stud_father_name,$stud_img,$roll_no); if($stmt->execute()) { $data = array(); $row_counter = 0; while($stmt->fetch()) { $data[$row_counter][0] = $res_stud_id; $data[$row_counter][1] = $stud_surname; $data[$row_counter][2] = $stud_name; $data[$row_counter][3] = $stud_father_name; $data[$row_counter][4] = $stud_img; $data[$row_counter][5] = $roll_no; $row_counter++; } if(!empty($data)) { return $data; } else { return false; } } } } function get_student_marks_allocation_id($class,$semester,$subject,$stud_id) { if($stmt = $this->con->prepare("SELECT `id` FROM `marks_allocation_first_to_eight_std` WHERE `class`=? AND `semester`=? AND `subject`=? AND `stud_id`=?")) { $stmt->bind_param("ssss",$class,$semester,$subject,$stud_id); $stmt->bind_result($res_id); if($stmt->execute()) { if($stmt->fetch()) { return $res_id; } return False; } } } function save_student_marks_allocation_data($class,$semester,$subject,$stud_id,$exam_type_marks,$exam_type) { $date = date("Y-m-d"); $time = date("H:i:s t"); if($stmt = $this->con->prepare("INSERT INTO `marks_allocation_first_to_eight_std`(`stud_id`, `class`, `semester`, `subject`, `$exam_type`, `date`, `time`) VALUES (?,?,?,?,?,?,?)")) { $stmt->bind_param("sssssss",$stud_id,$class,$semester,$subject,$exam_type_marks,$date,$time); if($stmt->execute()) { return true; } return false; } } function get_all_student_marks_allocation_data($class,$semester,$subject) { if($stmt = $this->con->prepare("SELECT `id`, `stud_id`, `class`, `semester`, `subject`, `formative_oral`, `formative_practical`, `formative_activity`, `formative_project`, `formative_open_book_test`, `formative_surprise_test`, `summative_written`, `summative_oral`, `date`, `time` FROM `marks_allocation_first_to_eight_std` WHERE `class`=? AND `semester`=? AND `subject`=?")) { $stmt->bind_param("sss",$class,$semester,$subject); $stmt->bind_result($res_id,$stud_id,$res_class,$res_semester,$res_subject,$formative_oral,$formative_practical,$formative_activity,$formative_project,$formative_open_book,$formative_surprise,$summative_written,$summative_oral,$res_date,$res_time); if($stmt->execute()) { $data = array(); $row_counter = 0; while($stmt->fetch()) { $data[$row_counter][0] = $res_id; $data[$row_counter][1] = $res_class; $data[$row_counter][2] = $res_semester; $data[$row_counter][3] = $res_subject; $data[$row_counter][4] = $formative_oral; $data[$row_counter][5] = $formative_practical; $data[$row_counter][6] = $formative_activity; $data[$row_counter][7] = $formative_project; $data[$row_counter][8] = $formative_open_book; $data[$row_counter][9] = $formative_surprise; $data[$row_counter][10] = $summative_written; $data[$row_counter][11] = $summative_oral; $data[$row_counter][12] = $res_date; $data[$row_counter][13] = $res_time; $data[$row_counter][14] = $stud_id; $row_counter++; } if(!empty($data)) { return $data; } else { return false; } } } } function delete_student_marks_allocation_data($delete_id) { if($stmt = $this->con->prepare("DELETE FROM `marks_allocation_first_to_eight_std` WHERE `id`=?")) { $stmt->bind_param("i",$delete_id); if($stmt->execute()) { return true; } return False; } } function get_all_student_marks_allocation_data_from_id($edit_id) { if($stmt = $this->con->prepare("SELECT `id`, `stud_id`, `class`, `semester`, `subject`, `formative_oral`, `formative_practical`, `formative_activity`, `formative_project`, `formative_open_book_test`, `formative_surprise_test`, `summative_written`, `summative_oral`, `date`, `time` FROM `marks_allocation_first_to_eight_std` WHERE `id`=?")) { $stmt->bind_param("i",$edit_id); $stmt->bind_result($res_id,$stud_id,$res_class,$res_semester,$res_subject,$formative_oral,$formative_practical,$formative_activity,$formative_project,$formative_open_book,$formative_surprise,$summative_written,$summative_oral,$res_date,$res_time); if($stmt->execute()) { $data = array(); while($stmt->fetch()) { $data[0] = $res_id; $data[1] = $res_class; $data[2] = $res_semester; $data[3] = $res_subject; $data[4] = $formative_oral; $data[5] = $formative_practical; $data[6] = $formative_activity; $data[7] = $formative_project; $data[8] = $formative_open_book; $data[9] = $formative_surprise; $data[10] = $summative_written; $data[11] = $summative_oral; $data[12] = $res_date; $data[13] = $res_time; $data[14] = $stud_id; } if(!empty($data)) { return $data; } else { return false; } } } } function get_student_marks_allocation_id_exist_or_not($class,$semester,$subject,$stud_id,$edit_id) { if($stmt = $this->con->prepare("SELECT `id` FROM `marks_allocation_first_to_eight_std` WHERE `class`=? AND `semester`=? AND `subject`=? AND `stud_id`=? AND `id`!=?")) { $stmt->bind_param("ssssi",$class,$semester,$subject,$stud_id,$edit_id); $stmt->bind_result($res_id); if($stmt->execute()) { if($stmt->fetch()) { return $res_id; } return False; } } } function update_student_marks_allocation_details($stud_id,$class,$semester,$subject,$formative_oral,$formative_practical,$formative_activity,$formative_project,$formative_open_book,$formative_surprise,$summative_written,$summative_oral,$edit_id) { $date = date("Y-m-d"); $time = date("H:i:s t"); if($stmt = $this->con->prepare("UPDATE `marks_allocation_first_to_eight_std` SET `stud_id`=?,`class`=?,`semester`=?,`subject`=?,`formative_oral`=?,`formative_practical`=?,`formative_activity`=?,`formative_project`=?,`formative_open_book_test`=?,`formative_surprise_test`=?,`summative_written`=?,`summative_oral`=?,`date`=?,`time`=? WHERE `id`=?")) { $stmt->bind_param("ssssssssssssssi",$stud_id,$class,$semester,$subject,$formative_oral,$formative_practical,$formative_activity,$formative_project,$formative_open_book,$formative_surprise,$summative_written,$summative_oral,$date,$time,$edit_id); if($stmt->execute()) { return true; } return false; } } function get_attendance_setting_data_from_class_medium($class,$medium) { if($stmt = $this->con->prepare("SELECT `id`, `class`, `medium`, `june`, `july`, `aug`, `sep`, `oct`, `nov`, `dec`, `jan`, `feb`, `mar`, `apr`, `date` FROM `attendance_settings` WHERE `class`=? AND `medium`=?")) { $stmt->bind_param("ss",$class,$medium); $stmt->bind_result($res_id,$res_class,$res_medium,$res_june,$res_july,$res_aug,$res_sep,$res_oct,$res_nov,$res_dec,$res_jan,$res_feb,$res_mar,$res_apr,$res_date); if($stmt->execute()) { $data = array(); while($stmt->fetch()) { $data[0] = $res_id; $data[1] = $res_class; $data[2] = $res_medium; $data[3] = $res_june; $data[4] = $res_july; $data[5] = $res_aug; $data[6] = $res_sep; $data[7] = $res_oct; $data[8] = $res_nov; $data[9] = $res_dec; $data[10] = $res_jan; $data[11] = $res_feb; $data[12] = $res_mar; $data[13] = $res_apr; $data[14] = $res_date; } if(!empty($data)) { return $data; } else { return false; } } } } function check_attendance_setting_id_exist_or_not($class,$medium) { if($stmt = $this->con->prepare("SELECT `id` FROM `attendance_settings` WHERE `class`=? AND `medium`=?")) { $stmt->bind_param("ss",$class,$medium); $stmt->bind_result($res_id); if($stmt->execute()) { if($stmt->fetch()) { return $res_id; } return False; } } } function save_attendace_settings_record($class,$medium,$june,$july,$august,$september,$october,$november,$december,$january,$february,$march,$april) { $date = date("Y-m-d"); $time = date("H:i:s t"); if($stmt = $this->con->prepare("INSERT INTO `attendance_settings`(`class`, `medium`, `june`, `july`, `aug`, `sep`, `oct`, `nov`, `dec`, `jan`, `feb`, `mar`, `apr`, `date`, `time`) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)")) { $stmt->bind_param("sssssssssssssss",$class,$medium,$june,$july,$august,$september,$october,$november,$december,$january,$february,$march,$april,$date,$time); if($stmt->execute()) { return true; } return false; } } function update_attendace_settings_record($class,$medium,$june,$july,$august,$september,$october,$november,$december,$january,$february,$march,$april,$exist_id) { $date = date("Y-m-d"); $time = date("H:i:s t"); if($stmt = $this->con->prepare("UPDATE `attendance_settings` SET `class`=?,`medium`=?,`june`=?,`july`=?,`aug`=?,`sep`=?,`oct`=?,`nov`=?,`dec`=?,`jan`=?,`feb`=?,`mar`=?,`apr`=?,`date`=?,`time`=? WHERE `id`=?")) { $stmt->bind_param("sssssssssssssssi",$class,$medium,$june,$july,$august,$september,$october,$november,$december,$january,$february,$march,$april,$date,$time,$exist_id); if($stmt->execute()) { return true; } return false; } } function check_student_record_exist_or_not($stud_id) { if($stmt = $this->con->prepare("SELECT `id` FROM `set_student_attendance` WHERE `stud_id`=?")) { $stmt->bind_param("s",$stud_id); $stmt->bind_result($res_id); if($stmt->execute()) { if($stmt->fetch()) { return $res_id; } return False; } } } function save_student_attendance_data($month,$stud_id,$att_month) { $date = date("Y-m-d"); $time = date("H:i:s t"); if($stmt = $this->con->prepare("INSERT INTO `set_student_attendance`(`stud_id`, `$month`, `date`, `time`) VALUES (?,?,?,?)")) { $stmt->bind_param("ssss",$stud_id,$att_month,$date,$time); if($stmt->execute()) { return true; } return false; } } function update_student_attendance_data($month,$stud_id,$att_month,$exist_id) { $date = date("Y-m-d"); $time = date("H:i:s t"); if($stmt = $this->con->prepare("UPDATE `set_student_attendance` SET `stud_id`=?,`$month`=?,`date`=?,`time`=? WHERE `id`=?")) { $stmt->bind_param("ssssi",$stud_id,$att_month,$date,$time,$exist_id); if($stmt->execute()) { return true; } return false; } } function get_student_attendance_record_from_stud_id($stud_id) { if($stmt = $this->con->prepare("SELECT `id`, `stud_id`, `june`, `july`, `aug`, `sep`, `oct`, `nov`, `dec`, `jan`, `feb`, `mar`, `apr`, `date` FROM `set_student_attendance` WHERE `stud_id`=?")) { $stmt->bind_param("s",$stud_id); $stmt->bind_result($res_id,$res_stud_id,$res_june,$res_july,$res_aug,$res_sep,$res_oct,$res_nov,$res_dec,$res_jan,$res_feb,$res_mar,$res_apr,$res_date); if($stmt->execute()) { $data = array(); while($stmt->fetch()) { $data[0] = $res_id; $data[1] = $res_stud_id; $data[2] = $res_june; $data[3] = $res_july; $data[4] = $res_aug; $data[5] = $res_sep; $data[6] = $res_oct; $data[7] = $res_nov; $data[8] = $res_dec; $data[9] = $res_jan; $data[10] = $res_feb; $data[11] = $res_mar; $data[12] = $res_apr; $data[13] = $res_date; } if(!empty($data)) { return $data; } else { return false; } } } } function get_all_student_attendance_data() { if($stmt = $this->con->prepare("SELECT `id`, `stud_id`, `june`, `july`, `aug`, `sep`, `oct`, `nov`, `dec`, `jan`, `feb`, `mar`, `apr`, `date` FROM `set_student_attendance`")) { $stmt->bind_result($res_id,$stud_id,$res_june,$res_july,$res_aug,$res_sep,$res_oct,$res_nov,$res_dec,$res_jan,$res_feb,$res_mar,$res_apr,$res_date); if($stmt->execute()) { $data = array(); $row_counter = 0; while($stmt->fetch()) { $data[$row_counter][0] = $res_id; $data[$row_counter][1] = $stud_id; $data[$row_counter][2] = $res_june; $data[$row_counter][3] = $res_july; $data[$row_counter][4] = $res_aug; $data[$row_counter][5] = $res_sep; $data[$row_counter][6] = $res_oct; $data[$row_counter][7] = $res_nov; $data[$row_counter][8] = $res_dec; $data[$row_counter][9] = $res_jan; $data[$row_counter][10] = $res_feb; $data[$row_counter][11] = $res_mar; $data[$row_counter][12] = $res_apr; $data[$row_counter][13] = $res_date; $row_counter++; } if(!empty($data)) { return $data; } else { return false; } } } } function get_sub_list_from_selected_class($stud_class) { if($stmt = $this->con->prepare("SELECT `id`, `class`, `subject`, `date` FROM `subject_allocation` WHERE `class`=? ORDER BY `sequence` ASC")) { $stmt->bind_param("s",$stud_class); $stmt->bind_result($res_id,$res_class,$res_subject,$res_date); if($stmt->execute()) { $data = array(); $row_counter = 0; while($stmt->fetch()) { $data[$row_counter][0] = $res_id; $data[$row_counter][1] = $res_class; $data[$row_counter][2] = $res_subject; $data[$row_counter][3] = $res_date; $row_counter++; } if(!empty($data)) { return $data; } else { return false; } } } } function get_sub_list_from_selected_class1($stud_class) { if($stmt = $this->con->prepare("SELECT `id`, `class`, `subject`, `date` FROM `subject_allocation` WHERE `class`=? ORDER BY `sequence` ASC")) { $stmt->bind_param("s",$stud_class); $stmt->bind_result($res_id,$res_class,$res_subject,$res_date); if($stmt->execute()) { $data = array(); $row_counter = 0; while($stmt->fetch()) { $data[$row_counter][0] = $res_id; $data[$row_counter][1] = $res_class; $data[$row_counter][2] = $res_subject; $data[$row_counter][3] = $res_date; $row_counter++; } if(!empty($data)) { return $data; } else { return false; } } } } function get_first_sem_students_marks_from_subject($res_stud_id,$stud_class,$res_subject) { $semester = "I"; if($stmt = $this->con->prepare("SELECT `id`, `stud_id`, `class`, `semester`, `subject`, `formative_oral`, `formative_practical`, `formative_activity`, `formative_project`, `formative_open_book_test`, `formative_surprise_test`, `summative_written`, `summative_oral`, `date`, `time` FROM `marks_allocation_first_to_eight_std` WHERE `stud_id`=? AND `class`=? AND `semester`=? AND `subject`=?")) { $stmt->bind_param("ssss",$res_stud_id,$stud_class,$semester,$res_subject); $stmt->bind_result($res_id,$stud_id,$res_class,$res_semester,$res_subject,$formative_oral,$formative_practical,$formative_activity,$formative_project,$formative_open_book,$formative_surprise,$summative_written,$summative_oral,$res_date,$res_time); if($stmt->execute()) { $data = array(); while($stmt->fetch()) { $data[0] = $res_id; $data[1] = $res_class; $data[2] = $res_semester; $data[3] = $res_subject; $data[4] = $formative_oral; $data[5] = $formative_practical; $data[6] = $formative_activity; $data[7] = $formative_project; $data[8] = $formative_open_book; $data[9] = $formative_surprise; $data[10] = $summative_written; $data[11] = $summative_oral; $data[12] = $res_date; $data[13] = $res_time; $data[14] = $stud_id; } if(!empty($data)) { return $data; } else { return false; } } } } function get_first_sem_marking_scheme_from_subject($stud_class,$res_subject) { $semester = "I"; if($stmt = $this->con->prepare("SELECT `id`, `class`, `semester`, `subject`, `formative_oral`, `formative_practical`, `formative_activity`, `formative_project`, `formative_open_book_test`, `formative_surprise_test`, `summative_written`, `summative_oral`, `date`, `time` FROM `first-to-eight-marking-scheme` WHERE `class`=? AND `semester`=? AND `subject`=?")) { $stmt->bind_param("sss",$stud_class,$semester,$res_subject); $stmt->bind_result($res_id,$res_class,$res_semester,$res_subject,$formative_oral,$formative_practical,$formative_activity,$formative_project,$formative_open_book,$formative_surprise,$summative_written,$summative_oral,$res_date,$res_time); if($stmt->execute()) { $data = array(); while($stmt->fetch()) { $data[0] = $res_id; $data[1] = $res_class; $data[2] = $res_semester; $data[3] = $res_subject; $data[4] = $formative_oral; $data[5] = $formative_practical; $data[6] = $formative_activity; $data[7] = $formative_project; $data[8] = $formative_open_book; $data[9] = $formative_surprise; $data[10] = $summative_written; $data[11] = $summative_oral; $data[12] = $res_date; $data[13] = $res_time; } if(!empty($data)) { return $data; } else { return false; } } } } function get_second_sem_marking_scheme_from_subject($stud_class,$res_subject) { $semester = "II"; if($stmt = $this->con->prepare("SELECT `id`, `class`, `semester`, `subject`, `formative_oral`, `formative_practical`, `formative_activity`, `formative_project`, `formative_open_book_test`, `formative_surprise_test`, `summative_written`, `summative_oral`, `date`, `time` FROM `first-to-eight-marking-scheme` WHERE `class`=? AND `semester`=? AND `subject`=?")) { $stmt->bind_param("sss",$stud_class,$semester,$res_subject); $stmt->bind_result($res_id,$res_class,$res_semester,$res_subject,$formative_oral,$formative_practical,$formative_activity,$formative_project,$formative_open_book,$formative_surprise,$summative_written,$summative_oral,$res_date,$res_time); if($stmt->execute()) { $data = array(); while($stmt->fetch()) { $data[0] = $res_id; $data[1] = $res_class; $data[2] = $res_semester; $data[3] = $res_subject; $data[4] = $formative_oral; $data[5] = $formative_practical; $data[6] = $formative_activity; $data[7] = $formative_project; $data[8] = $formative_open_book; $data[9] = $formative_surprise; $data[10] = $summative_written; $data[11] = $summative_oral; $data[12] = $res_date; $data[13] = $res_time; } if(!empty($data)) { return $data; } else { return false; } } } } function get_second_sem_students_marks_from_subject($res_stud_id,$stud_class,$res_subject) { $semester = "II"; if($stmt = $this->con->prepare("SELECT `id`, `stud_id`, `class`, `semester`, `subject`, `formative_oral`, `formative_practical`, `formative_activity`, `formative_project`, `formative_open_book_test`, `formative_surprise_test`, `summative_written`, `summative_oral`, `date`, `time` FROM `marks_allocation_first_to_eight_std` WHERE `stud_id`=? AND `class`=? AND `semester`=? AND `subject`=?")) { $stmt->bind_param("ssss",$res_stud_id,$stud_class,$semester,$res_subject); $stmt->bind_result($res_id,$stud_id,$res_class,$res_semester,$res_subject,$formative_oral,$formative_practical,$formative_activity,$formative_project,$formative_open_book,$formative_surprise,$summative_written,$summative_oral,$res_date,$res_time); if($stmt->execute()) { $data = array(); while($stmt->fetch()) { $data[0] = $res_id; $data[1] = $res_class; $data[2] = $res_semester; $data[3] = $res_subject; $data[4] = $formative_oral; $data[5] = $formative_practical; $data[6] = $formative_activity; $data[7] = $formative_project; $data[8] = $formative_open_book; $data[9] = $formative_surprise; $data[10] = $summative_written; $data[11] = $summative_oral; $data[12] = $res_date; $data[13] = $res_time; $data[14] = $stud_id; } if(!empty($data)) { return $data; } else { return false; } } } } function get_all_stud_from_class_medium_division_for_progress_card($stud_inserted_class,$stud_inserted_medium,$stud_inserted_division,$acd_year) { if($stmt = $this->con->prepare("SELECT `id`, `class`, `medium`, `division`, `roll_no`, `surname`, `student_name`, `father_name`, `mother_name`, `birth_date`, `no_of_pupil`,`stud_id_for_lc`,`category`,`gender`,`promoted_details`, `class_details`, `school_reopen_details` FROM `student_details` WHERE `class`=? AND `medium`=? AND `division`=? AND `academic_year`=? ORDER BY `roll_no` ASC")) { $stmt->bind_param("ssss",$stud_inserted_class,$stud_inserted_medium,$stud_inserted_division,$acd_year); $stmt->bind_result($res_stud_id,$stud_class,$stud_medium,$stud_division,$stud_roll_no,$stud_surname,$stud_name,$stud_father_name,$stud_mother_name,$stud_dob,$stud_gr_no,$Student_Id_for_LC,$category,$gender,$promoted_details,$class_details,$school_reopen_details); if($stmt->execute()) { $data = array(); $row_counter = 0; while($stmt->fetch()) { $data[$row_counter][0] = $res_stud_id; $data[$row_counter][1] = $stud_class; $data[$row_counter][2] = $stud_medium; $data[$row_counter][3] = $stud_division; $data[$row_counter][4] = $stud_roll_no; $data[$row_counter][5] = $stud_surname; $data[$row_counter][6] = $stud_name; $data[$row_counter][7] = $stud_father_name; $data[$row_counter][8] = $stud_mother_name; $data[$row_counter][9] = $stud_dob; $data[$row_counter][10] = $stud_gr_no; $data[$row_counter][11] = $Student_Id_for_LC; $data[$row_counter][12] = $category; $data[$row_counter][13] = $gender; $data[$row_counter][14] = $promoted_details; $data[$row_counter][15] = $class_details; $data[$row_counter][16] = $school_reopen_details; $row_counter++; } if(!empty($data)) { return $data; } else { return false; } } } } function get_subjectwise_marks_from_stud_id($res_stud_id,$class,$semester,$subject) { if($stmt = $this->con->prepare("SELECT `id`, `stud_id`, `class`, `semester`, `subject`, `formative_oral`, `formative_practical`, `formative_activity`, `formative_project`, `formative_open_book_test`, `formative_surprise_test`, `summative_written`, `summative_oral`, `date`, `time` FROM `marks_allocation_first_to_eight_std` WHERE `stud_id`=? AND `class`=? AND `semester`=? AND `subject`=?")) { $stmt->bind_param("ssss",$res_stud_id,$class,$semester,$subject); $stmt->bind_result($res_id,$stud_id,$res_class,$res_semester,$res_subject,$formative_oral,$formative_practical,$formative_activity,$formative_project,$formative_open_book,$formative_surprise,$summative_written,$summative_oral,$res_date,$res_time); if($stmt->execute()) { $data = array(); while($stmt->fetch()) { $data[0] = $res_id; $data[1] = $res_class; $data[2] = $res_semester; $data[3] = $res_subject; $data[4] = $formative_oral; $data[5] = $formative_practical; $data[6] = $formative_activity; $data[7] = $formative_project; $data[8] = $formative_open_book; $data[9] = $formative_surprise; $data[10] = $summative_written; $data[11] = $summative_oral; $data[12] = $res_date; $data[13] = $res_time; $data[14] = $stud_id; } if(!empty($data)) { return $data; } else { return false; } } } } function get_remarks_sub_title_from_main_title($main_title) { if($stmt = $this->con->prepare("SELECT `id`, `main_title`, `sub_title`, `date` FROM `remark_sub_title_master` WHERE `main_title`=?")) { $stmt->bind_param("s",$main_title); $stmt->bind_result($res_id,$res_main_title,$res_sub_title,$res_date); if($stmt->execute()) { $data = array(); $row_counter = 0; while($stmt->fetch()) { $data[$row_counter][0] = $res_id; $data[$row_counter][1] = $res_main_title; $data[$row_counter][2] = $res_sub_title; $data[$row_counter][3] = $res_date; $row_counter++; } if(!empty($data)) { return $data; } else { return false; } } } } function get_all_remark_data_from_main_title($res_main_title,$sub_title_id) { if($stmt = $this->con->prepare("SELECT `id`, `main_title`, `sub_title`, `remark`, `date` FROM `remark_master` WHERE `main_title`=? AND `sub_title`=?")) { $stmt->bind_param("ss",$res_main_title,$sub_title_id); $stmt->bind_result($res_id,$res_main_title,$res_sub_title,$res_remark,$res_date); if($stmt->execute()) { $data = array(); $row_counter = 0; while($stmt->fetch()) { $data[$row_counter][0] = $res_id; $data[$row_counter][1] = $res_main_title; $data[$row_counter][2] = $res_sub_title; $data[$row_counter][3] = $res_remark; $data[$row_counter][4] = $res_date; $row_counter++; } if(!empty($data)) { return $data; } else { return false; } } } } function check_student_remark_id_exist_or_not($stud_id,$semester,$main_remark,$sub_remark) { if($stmt = $this->con->prepare("SELECT `id` FROM `set_student_remark` WHERE `stud_id`=? AND `semester`=? AND `main_remark`=? AND `sub_remark`=?")) { $stmt->bind_param("ssss",$stud_id,$semester,$main_remark,$sub_remark); $stmt->bind_result($res_id); if($stmt->execute()) { if($stmt->fetch()) { return $res_id; } return false; } } } function save_student_remark_data($student,$semester,$main_remark,$sub_remark,$remark) { $date = date("Y-m-d"); $time = date("H:i:s t"); if($stmt = $this->con->prepare("INSERT INTO `set_student_remark`(`stud_id`, `semester`, `main_remark`, `sub_remark`, `remark`, `date`, `time`) VALUES (?,?,?,?,?,?,?)")) { $stmt->bind_param("sssssss",$student,$semester,$main_remark,$sub_remark,$remark,$date,$time); if($stmt->execute()) { return true; } return false; } } function update_student_remark_data($stud_id,$semester,$main_remark,$sub_remark,$extra_ordinary,$db_id) { $date = date("Y-m-d"); $time = date("H:i:s t"); if($stmt = $this->con->prepare("UPDATE `set_student_remark` SET `stud_id`=?,`semester`=?,`main_remark`=?,`sub_remark`=?,`remark`=?,`date`=?,`time`=? WHERE `id`=?")) { $stmt->bind_param("sssssssi",$stud_id,$semester,$main_remark,$sub_remark,$extra_ordinary,$date,$time,$db_id); if($stmt->execute()) { return true; } return false; } } function get_student_remark_data_from_stud_id_sem($res_stud_id,$semester) { if($stmt = $this->con->prepare("SELECT `id`, `stud_id`, `semester`, `sub_remark`, `remark`, `date` FROM `set_student_remark` WHERE `stud_id`=? AND `semester`=?")) { $stmt->bind_param("ss",$res_stud_id,$semester); $stmt->bind_result($res_id,$res_stud_id,$res_semester,$res_sub_remark,$res_remark,$res_date); if($stmt->execute()) { $data = array(); $row_counter = 0; while($stmt->fetch()) { $data[$row_counter][0] = $res_id; $data[$row_counter][1] = $res_stud_id; $data[$row_counter][2] = $res_semester; $data[$row_counter][3] = $res_remark; $data[$row_counter][4] = $res_date; $data[$row_counter][5] = $res_sub_remark; $row_counter++; } if(!empty($data)) { return $data; } else { return false; } } } } function get_remark_title_from_remark_id($res_remark) { if($stmt = $this->con->prepare("SELECT `remark` FROM `remark_master` WHERE `id`=?")) { $stmt->bind_param("i",$res_remark); $stmt->bind_result($res_id); if($stmt->execute()) { if($stmt->fetch()) { return $res_id; } return False; } } } function get_sub_remark_title_from_sub_remark_id($res_sub_remark) { if($stmt = $this->con->prepare("SELECT `sub_title` FROM `remark_sub_title_master` WHERE `id`=?")) { $stmt->bind_param("i",$res_sub_remark); $stmt->bind_result($res_id); if($stmt->execute()) { if($stmt->fetch()) { return $res_id; } return False; } } } function get_acd_year_name($acd_year) { if($stmt = $this->con->prepare("SELECT `year`FROM `academic_year` WHERE `id`=?")) { $stmt->bind_param("i",$acd_year); $stmt->bind_result($res_id); if($stmt->execute()) { if($stmt->fetch()) { return $res_id; } return False; } } } function delete_student_remark_from_remark_id($delete_id) { if($stmt = $this->con->prepare("DELETE FROM `set_student_remark` WHERE `id`=?")) { $stmt->bind_param("i",$delete_id); if($stmt->execute()) { return true; } return False; } } function get_student_sub_remark_data_by_sem($res_stud_id,$semester) { if($stmt = $this->con->prepare("SELECT DISTINCT `sub_remark` FROM `set_student_remark` WHERE `stud_id`=? AND `semester`=? ORDER BY FIELD(`sub_remark`,'1','3','2')")) { $stmt->bind_param("ss",$res_stud_id,$semester); $stmt->bind_result($res_sub_remark); if($stmt->execute()) { $data = array(); $row_counter = 0; while($stmt->fetch()) { $data[$row_counter][0] = $res_sub_remark; $row_counter++; } if(!empty($data)) { return $data; } else { return false; } } } } function get_sub_remark_data_from_remaek_id($remark_id) { if($stmt = $this->con->prepare("SELECT `id`, `main_title`, `sub_title`, `remark`, `date` FROM `remark_master` WHERE `id`=?")) { $stmt->bind_param("i",$remark_id); $stmt->bind_result($res_id,$res_main_title,$res_sub_title,$res_remark,$res_date); if($stmt->execute()) { $data = array(); if($stmt->fetch()) { $data[0] = $res_id; $data[1] = $res_main_title; $data[2] = $res_sub_title; $data[3] = $res_remark; $data[4] = $res_date; } if(!empty($data)) { return $data; } else { return false; } } } } /*function get_student_remark_data_for_semII($res_stud_id,$semester,$res_sub_remark) { if($stmt = $this->con->prepare("SELECT `id`, `stud_id`, `semester`, `remark` FROM `set_student_remark` WHERE `stud_id`=? AND `semester`=? AND `sub_remark`=? ORDER BY FIELD(`sub_remark`,'1','3','2')")) { $stmt->bind_param("sss",$res_stud_id,$semester,$res_sub_remark); $stmt->bind_result($res_id,$res_stud_id,$res_semester,$res_remark); if($stmt->execute()) { $data = array(); $row_counter = 0; while($stmt->fetch()) { $data[$row_counter][0] = $res_id; $data[$row_counter][1] = $res_stud_id; $data[$row_counter][2] = $res_semester; $data[$row_counter][3] = $res_remark; $row_counter++; } if(!empty($data)) { return $data; } else { return false; } } } }*/ function get_student_remark_data_for_semII($res_stud_id,$semester,$res_sub_remark,$main_title) { if($stmt = $this->con->prepare("SELECT `id`, `stud_id`, `semester`, `remark` FROM `set_student_remark` WHERE `stud_id`=? AND `semester`=? AND `main_remark`=? AND `sub_remark`=? ORDER BY FIELD(`sub_remark`,'1','3','2')")) { $stmt->bind_param("ssss",$res_stud_id,$semester,$main_title,$res_sub_remark); $stmt->bind_result($res_id,$res_stud_id,$res_semester,$res_remark); if($stmt->execute()) { $data = array(); $row_counter = 0; while($stmt->fetch()) { $data[$row_counter][0] = $res_id; $data[$row_counter][1] = $res_stud_id; $data[$row_counter][2] = $res_semester; $data[$row_counter][3] = $res_remark; $row_counter++; } if(!empty($data)) { return $data; } else { return false; } } } } function get_subjectwise_marks_scheme_data_from_stud_id($class,$semester,$res_subject) { if($stmt = $this->con->prepare("SELECT `id`, `class`, `semester`, `subject`, `formative_oral`, `formative_practical`, `formative_activity`, `formative_project`, `formative_open_book_test`, `formative_surprise_test`, `summative_written`, `summative_oral`, `date`, `time` FROM `first-to-eight-marking-scheme` WHERE `class`=? AND `semester`=? AND `subject`=?")) { $stmt->bind_param("sss",$class,$semester,$res_subject); $stmt->bind_result($res_id,$res_class,$res_semester,$res_subject,$formative_oral,$formative_practical,$formative_activity,$formative_project,$formative_open_book,$formative_surprise,$summative_written,$summative_oral,$res_date,$res_time); if($stmt->execute()) { $data = array(); while($stmt->fetch()) { $data[0] = $res_id; $data[1] = $res_class; $data[2] = $res_semester; $data[3] = $res_subject; $data[4] = $formative_oral; $data[5] = $formative_practical; $data[6] = $formative_activity; $data[7] = $formative_project; $data[8] = $formative_open_book; $data[9] = $formative_surprise; $data[10] = $summative_written; $data[11] = $summative_oral; $data[12] = $res_date; $data[13] = $res_time; } if(!empty($data)) { return $data; } else { return false; } } } } function get_marks_allocation_scheme_id($class,$semester,$subject) { if($stmt = $this->con->prepare("SELECT `id` FROM `first-to-eight-marking-scheme` WHERE `class`=? AND `semester`=? AND `subject`=?")) { $stmt->bind_param("sss",$class,$semester,$subject); $stmt->bind_result($res_id); if($stmt->execute()) { if($stmt->fetch()) { return $res_id; } return False; } } } function get_student_remark_record_from_stud_id($res_stud_id) { if($stmt = $this->con->prepare("SELECT `stud_id`, `semester`, `main_remark`, `sub_remark`, `remark`, `date` FROM `set_student_remark` WHERE `stud_id`=?")) { $stmt->bind_param("s",$res_stud_id); $stmt->bind_result($stud_id,$res_class,$res_semester,$res_subject,$formative_oral,$formative_practical,$formative_activity,$formative_project,$formative_open_book,$formative_surprise,$summative_written,$summative_oral,$res_date,$res_time); if($stmt->execute()) { $data = array(); while($stmt->fetch()) { $data[0] = $res_id; $data[1] = $res_class; $data[2] = $res_semester; $data[3] = $res_subject; $data[4] = $formative_oral; $data[5] = $formative_practical; $data[6] = $formative_activity; $data[7] = $formative_project; $data[8] = $formative_open_book; $data[9] = $formative_surprise; $data[10] = $summative_written; $data[11] = $summative_oral; $data[12] = $res_date; $data[13] = $res_time; $data[14] = $stud_id; } if(!empty($data)) { return $data; } else { return false; } } } } function get_student_remark_from_stud_id($res_stud_id,$semester,$main_remark,$sub_remark) { if($stmt = $this->con->prepare("SELECT `remark` FROM `set_student_remark` WHERE `stud_id`=? AND `semester`=? AND `main_remark`=? AND `sub_remark`=?")) { $stmt->bind_param("ssss",$res_stud_id,$semester,$main_remark,$sub_remark); $stmt->bind_result($res_remark); if($stmt->execute()) { if($stmt->fetch()) { return $res_remark; } return false; } } } function get_student_attendance_record_from_stud_id_month($res_stud_id,$month) { if($stmt = $this->con->prepare("SELECT `id`, `stud_id`, `$month`, `date` FROM `set_student_attendance` WHERE `stud_id`=?")) { $stmt->bind_param("s",$res_stud_id); $stmt->bind_result($res_id,$res_stud_id,$res_value,$res_date); if($stmt->execute()) { $data = array(); while($stmt->fetch()) { $data[0] = $res_id; $data[1] = $res_stud_id; $data[2] = $res_value; $data[3] = $res_date; } if(!empty($data)) { return $data; } else { return false; } } } } function get_subjectwise_marks_from_stud_id_exam_type($res_stud_id,$class,$semester,$subject,$exam_type) { if($stmt = $this->con->prepare("SELECT `id`, `stud_id`, `class`, `semester`, `subject`, `$exam_type`, `date`, `time` FROM `marks_allocation_first_to_eight_std` WHERE `stud_id`=? AND `class`=? AND `semester`=? AND `subject`=?")) { $stmt->bind_param("ssss",$res_stud_id,$class,$semester,$subject); $stmt->bind_result($res_id,$stud_id,$res_class,$res_semester,$res_subject,$res_exam_marks,$res_date,$res_time); if($stmt->execute()) { $data = array(); while($stmt->fetch()) { $data[0] = $res_id; $data[1] = $res_class; $data[2] = $res_semester; $data[3] = $res_subject; $data[4] = $res_exam_marks; $data[5] = $res_date; $data[6] = $res_time; $data[7] = $stud_id; } if(!empty($data)) { return $data; } else { return false; } } } } function update_student_marks_allocation_details_new($stud_id,$class,$semester,$subject,$exam_type_marks,$exam_type,$db_id) { $date = date("Y-m-d"); $time = date("H:i:s t"); if($stmt = $this->con->prepare("UPDATE `marks_allocation_first_to_eight_std` SET `stud_id`=?,`class`=?,`semester`=?,`subject`=?,`$exam_type`=?,`date`=?,`time`=? WHERE `id`=?")) { $stmt->bind_param("sssssssi",$stud_id,$class,$semester,$subject,$exam_type_marks,$date,$time,$db_id); if($stmt->execute()) { return true; } return false; } } function get_subjectwise_marks_scheme_data_for_marks_allocation($class,$semester,$subject,$exam_type) { if($stmt = $this->con->prepare("SELECT `id`, `class`, `semester`, `subject`, `exam_type`, `date`, `time` FROM `first-to-eight-marking-scheme` WHERE `class`=? AND `semester`=? AND `subject`=?")) { $stmt->bind_param("sss",$class,$semester,$subject); $stmt->bind_result($res_id,$res_class,$res_semester,$res_subject,$res_outoff_marks,$res_date,$res_time); if($stmt->execute()) { $data = array(); while($stmt->fetch()) { $data[0] = $res_id; $data[1] = $res_class; $data[2] = $res_semester; $data[3] = $res_subject; $data[4] = $res_outoff_marks; $data[5] = $res_date; $data[6] = $res_time; } if(!empty($data)) { return $data; } else { return false; } } } } function get_remark_title_from_sub_remark($res_remark,$res_sub_remark,$main_title_id) { if($stmt = $this->con->prepare("SELECT `remark` FROM `remark_master` WHERE `main_title`=? AND `sub_title`=? AND `remark_code`=?")) { $stmt->bind_param("sss",$main_title_id,$res_sub_remark,$res_remark); $stmt->bind_result($res_remark); if($stmt->execute()) { if($stmt->fetch()) { return $res_remark; } return False; } } } function get_student_data_temp() { if($stmt = $this->con->prepare("SELECT `Class`, `Medium`, `Division`, `Roll_no`, `Surname`, `Student_name`, `Father_name`, `Mother_name`, `Father_contact_no`, `Mother_Contant_no`, `Aadhar_number`, `Religion`, `Caste`, `Category`, `Mother_tongue`, `Nationality`, `Place_of_Birth`, `District_of_Birth`, `State_of_Birth`, `Country`, `Birth_date`, `Gender`, `Date_Of_Admission`, `Gen_Reg_No_of_Pupil`, `Student_Id_for_LC` FROM `v_th_pt`")) { $stmt->bind_result($Class,$Medium,$Division,$Roll_no,$Surname,$Student_name,$Father_name,$Mother_name,$Father_contact_no,$Mother_Contact_no,$Aadhar_number,$Religion,$Caste,$Category,$Mother_tongue,$Nationality,$Place_of_Birth,$District_of_Birth,$State_of_Birth,$Country,$Birth_date,$Gender,$Date_of_Admission,$Gen_Reg_No_of_Pupil,$Student_Id_for_LC); if($stmt->execute()) { $data = array(); $cntr = 0; while($stmt->fetch()) { $data[$cntr][0] = $Class; $data[$cntr][1] = $Medium; $data[$cntr][2] = $Division; $data[$cntr][3] = $Roll_no; $data[$cntr][4] = $Surname; $data[$cntr][5] = $Student_name; $data[$cntr][6] = $Father_name; $data[$cntr][7] = $Mother_name; $data[$cntr][8] = $Father_contact_no; $data[$cntr][9] = $Mother_Contact_no; $data[$cntr][10] = $Aadhar_number; $data[$cntr][11] = $Religion; $data[$cntr][12] = $Caste; $data[$cntr][13] = $Category; $data[$cntr][14] = $Mother_tongue; $data[$cntr][15] = $Nationality; $data[$cntr][16] = $Place_of_Birth; $data[$cntr][17] = $District_of_Birth; $data[$cntr][18] = $State_of_Birth; $data[$cntr][19] = $Country; $data[$cntr][20] = $Birth_date; $data[$cntr][21] = $Gender; $data[$cntr][22] = $Date_of_Admission; $data[$cntr][23] = $Gen_Reg_No_of_Pupil; $data[$cntr][24] = $Student_Id_for_LC; $cntr++; } } if(!empty($data)) { return $data; } else{ return false; } } } function insert_new_record_of_std($Class,$Medium,$Division,$Roll_no,$Surname,$Student_name,$Father_name,$Mother_name,$Father_contact_no,$Mother_Contact_no,$Aadhar_number,$Religion,$Caste,$Category,$Mother_tongue,$Nationality,$Place_of_Birth,$District_of_Birth,$State_of_Birth,$Country,$Birth_date,$Gender,$Date_of_Admission,$Gen_Reg_No_of_Pupil,$Student_Id_for_LC) { if($stmt = $this->con->prepare("INSERT INTO `student_details`(`class`, `medium`, `division`, `roll_no`, `surname`, `student_name`, `father_name`, `mother_name`, `father_cont_no`, `mother_cont_no`, `aadhar_number`, `religion`, `caste`, `category`, `mother_tongue`, `nationality`, `place_of_birth`, `birth_district`, `birth_state`, `birth_country`, `birth_date`, `gender`, `admission_date`,`no_of_pupil`, `stud_id_for_lc`) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)")) { $stmt->bind_param("sssssssssssssssssssssssss",$Class,$Medium,$Division,$Roll_no,$Surname,$Student_name,$Father_name,$Mother_name,$Father_contact_no,$Mother_Contact_no,$Aadhar_number,$Religion,$Caste,$Category,$Mother_tongue,$Nationality,$Place_of_Birth,$District_of_Birth,$State_of_Birth,$Country,$Birth_date,$Gender,$Date_of_Admission,$Gen_Reg_No_of_Pupil,$Student_Id_for_LC); if($stmt->execute()) { return true; } } return false; } function save_software_user_record($user_name,$contact_no,$address,$designation,$user_id,$password,$student,$add_student,$use1,$ievd,$er,$sr,$cs,$micp,$pcg,$spc,$rmtm,$rm,$sam,$seam,$csma,$masc,$sma,$smar,$as1,$ssa,$ssr,$srts,$srr,$gspc,$gmpc,$eed,$lirary,$lm,$ab,$bo,$btr,$mtm,$am,$mr,$ntm,$an,$nr,$bi,$ibr,$bsth,$obr,$setting,$ss,$dm,$sm,$cm,$ftm,$afa,$far,$fp,$cp,$sms_panel,$software_users,$batabase_bkp,$type_master) { $date = date("Y-m-d"); $time = date("H:i:s t"); if($stmt = $this->con->prepare("INSERT INTO `software_users`(`user_name`, `contact_no`, `address`, `designation`, `user_id`, `password`, `date`, `time`, `student`, `add_student`, `use1`, `ievd`, `er`, `sr`, `cs`, `micp`, `pcg`, `spc`, `cmtm`, `rm`, `sam`, `seam`, `csma`, `masc`, `sma`, `smar`, `as1`, `ssa`, `ssr`, `srts`, `srr`, `gspc`, `gmpc`, `eed`, `library`, `lm`, `ab`, `bo`, `btr`, `mtm`, `am`, `mr`, `ntm`, `an`, `nr`, `bi`, `ibr`, `bsth`, `obr`, `setting`, `ss`, `dm`, `sm`, `cm`, `ftm`, `afa`, `far`, `fp`, `cp`, `sms_panel`, `software_user`, `db_bkp`, `type_master`) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)")) { $stmt->bind_param("sssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss",$user_name,$contact_no,$address,$designation,$user_id,$password,$date,$time,$student,$add_student,$use1,$ievd,$er,$sr,$cs,$micp,$pcg,$spc,$rmtm,$rm,$sam,$seam,$csma,$masc,$sma,$smar,$as1,$ssa,$ssr,$srts,$srr,$gspc,$gmpc,$eed,$lirary,$lm,$ab,$bo,$btr,$mtm,$am,$mr,$ntm,$an,$nr,$bi,$ibr,$bsth,$obr,$setting,$ss,$dm,$sm,$cm,$ftm,$afa,$far,$fp,$cp,$sms_panel,$software_users,$batabase_bkp,$type_master); if($stmt->execute()) { return true; } return false; } } function get_user_id($user_id) { if($stmt = $this->con->prepare("SELECT `password` FROM `software_users` WHERE `user_id` = ?")) { $stmt->bind_param("s",$user_id); $stmt->bind_result($res_password); if($stmt->execute()) { if($stmt->fetch()) { return $res_password; } return False; } } } function get_user_record() { if($stmt = $this->con->prepare("SELECT `id`, `user_name`, `contact_no`, `address`, `designation`, `user_id`, `password` FROM `software_users` ")) { $stmt->bind_result($res_id,$user_name,$contact_no,$address,$designation,$user_id,$password); if($stmt->execute()) { $data = array(); $cntr = 0; while($stmt->fetch()) { $data[$cntr][0] = $res_id; $data[$cntr][1] = $user_name; $data[$cntr][2] = $contact_no; $data[$cntr][3] = $address; $data[$cntr][4] = $designation; $data[$cntr][5] = $user_id; $data[$cntr][6] = $password; $cntr++; } } if(!empty($data)) { return $data; } else { return false; } } } function delete_user_record($del_id) { if($stmt = $this->con->prepare("DELETE FROM `software_users` WHERE `id` = ?")) { $stmt->bind_param("i",$del_id); if($stmt->execute()) { return true; } return False; } } function update_software_user_record($user_name,$contact_no,$address,$designation,$user_id,$password,$student,$add_student,$use1,$ievd,$er,$sr,$cs,$micp,$pcg,$spc,$rmtm,$rm,$sam,$seam,$csma,$masc,$sma,$smar,$as1,$ssa,$ssr,$srts,$srr,$gspc,$gmpc,$eed,$lirary,$lm,$ab,$bo,$btr,$mtm,$am,$mr,$ntm,$an,$nr,$bi,$ibr,$bsth,$obr,$setting,$ss,$dm,$sm,$cm,$ftm,$afa,$far,$fp,$cp,$sms_panel,$software_users,$batabase_bkp,$type_master,$edit_id) { $date = date("Y-m-d"); $time = date("H:i:s t"); if($stmt = $this->con->prepare("UPDATE `software_users` SET `user_name`=?,`contact_no`=?,`address`=?,`designation`=?,`user_id`=?,`password`=?,`student`=?,`add_student`=?,`use1`=?,`ievd`=?,`er`=?,`sr`=?,`cs`=?,`micp`=?,`pcg`=?,`spc`=?,`cmtm`=?,`rm`=?,`sam`=?,`seam`=?,`csma`=?,`masc`=?,`sma`=?,`smar`=?,`as1`=?,`ssa`=?,`ssr`=?,`srts`=?,`srr`=?,`gspc`=?,`gmpc`=?,`eed`=?,`library`=?,`lm`=?,`ab`=?,`bo`=?,`btr`=?,`mtm`=?,`am`=?,`mr`=?,`ntm`=?,`an`=?,`nr`=?,`bi`=?,`ibr`=?,`bsth`=?,`obr`=?,`setting`=?,`ss`=?,`dm`=?,`sm`=?,`cm`=?,`ftm`=?,`afa`=?,`far`=?,`fp`=?,`cp`=?,`sms_panel`=?,`software_user`=?,`db_bkp`=?,`type_master`=? WHERE `id`=?")) { $stmt->bind_param("sssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssi",$user_name,$contact_no,$address,$designation,$user_id,$password,$student,$add_student,$use1,$ievd,$er,$sr,$cs,$micp,$pcg,$spc,$rmtm,$rm,$sam,$seam,$csma,$masc,$sma,$smar,$as1,$ssa,$ssr,$srts,$srr,$gspc,$gmpc,$eed,$lirary,$lm,$ab,$bo,$btr,$mtm,$am,$mr,$ntm,$an,$nr,$bi,$ibr,$bsth,$obr,$setting,$ss,$dm,$sm,$cm,$ftm,$afa,$far,$fp,$cp,$sms_panel,$software_users,$batabase_bkp,$type_master,$edit_id); if($stmt->execute()) { return true; } return False; } } function get_all_user_info($edit_id) { if($stmt = $this->con->prepare("SELECT `id`, `user_name`, `contact_no`, `address`, `designation`, `user_id`, `password`, `date`, `time`, `student`, `add_student`, `use1`, `ievd`, `er`, `sr`, `cs`, `micp`, `pcg`, `spc`, `cmtm`, `rm`, `sam`, `seam`, `csma`, `masc`, `sma`, `smar`, `as1`, `ssa`, `ssr`, `srts`, `srr`, `gspc`, `gmpc`, `eed`, `library`, `lm`, `ab`, `bo`, `btr`, `mtm`, `am`, `mr`, `ntm`, `an`, `nr`, `bi`, `ibr`, `bsth`, `obr`, `setting`, `ss`, `dm`, `sm`, `cm`, `ftm`, `afa`, `far`, `fp`, `cp`, `sms_panel`, `software_user`, `db_bkp`, `type_master` FROM `software_users` WHERE `id`=?")) { $stmt->bind_param("i",$edit_id); $stmt->bind_result($res_id,$user_name,$contact_no,$address,$designation,$user_id,$password,$date,$time,$student,$add_student,$use1,$ievd,$er,$sr,$cs,$micp,$pcg,$spc,$rmtm,$rm,$sam,$seam,$csma,$masc,$sma,$smar,$as1,$ssa,$ssr,$srts,$srr,$gspc,$gmpc,$eed,$lirary,$lm,$ab,$bo,$btr,$mtm,$am,$mr,$ntm,$an,$nr,$bi,$ibr,$bsth,$obr,$setting,$ss,$dm,$sm,$cm,$ftm,$afa,$far,$fp,$cp,$sms_panel,$software_users,$batabase_bkp,$type_master); if($stmt->execute()) { $data = array(); if($stmt->fetch()) { $data[0] = $res_id; $data[1] = $user_name; $data[2] = $contact_no; $data[3] = $address; $data[4] = $designation; $data[5] = $user_id; $data[6] = $password; $data[7] = $date; $data[8] = $time; $data[9] = $student; $data[10] = $add_student; $data[11] = $use1; $data[12] = $ievd; $data[13] = $er; $data[14] = $sr; $data[15] = $cs; $data[16] = $micp; $data[17] = $pcg; $data[18] = $spc; $data[19] = $rmtm; $data[20] = $rm; $data[21] = $sam; $data[22] = $seam; $data[23] = $csma; $data[24] = $masc; $data[25] = $sma; $data[26] = $smar; $data[27] = $as1; $data[28] = $ssa; $data[29] = $ssr; $data[30] = $srts; $data[31] = $srr; $data[32] = $gspc; $data[33] = $gmpc; $data[34] = $eed; $data[35] = $lirary; $data[36] = $lm; $data[37] = $ab; $data[38] = $bo; $data[39] = $btr; $data[40] = $mtm; $data[41] = $am; $data[42] = $mr; $data[43] = $ntm; $data[44] = $an; $data[45] = $nr; $data[46] = $bi; $data[47] = $ibr; $data[48] = $bsth; $data[49] = $obr; $data[50] = $setting; $data[51] = $ss; $data[52] = $dm; $data[53] = $sm; $data[54] = $cm; $data[55] = $ftm; $data[56] = $afa; $data[57] = $far; $data[58] = $fp; $data[59] = $cp; $data[60] = $sms_panel; $data[61] = $software_users; $data[62] = $batabase_bkp; $data[63] = $type_master; return $data; } return False; } } } function get_all_user_info_with_user_id($login_user) { if($stmt = $this->con->prepare("SELECT `id`, `user_name`, `contact_no`, `address`, `designation`, `user_id`, `password`, `date`, `time`, `student`, `add_student`, `use1`, `ievd`, `er`, `sr`, `cs`, `micp`, `pcg`, `spc`, `cmtm`, `rm`, `sam`, `seam`, `csma`, `masc`, `sma`, `smar`, `as1`, `ssa`, `ssr`, `srts`, `srr`, `gspc`, `gmpc`, `eed`, `library`, `lm`, `ab`, `bo`, `btr`, `mtm`, `am`, `mr`, `ntm`, `an`, `nr`, `bi`, `ibr`, `bsth`, `obr`, `setting`, `ss`, `dm`, `sm`, `cm`, `ftm`, `afa`, `far`, `fp`, `cp`, `sms_panel`, `software_user`, `db_bkp`, `type_master` FROM `software_users` WHERE `user_id`=?")) { $stmt->bind_param("s",$login_user); $stmt->bind_result($res_id,$user_name,$contact_no,$address,$designation,$user_id,$password,$date,$time,$student,$add_student,$use1,$ievd,$er,$sr,$cs,$micp,$pcg,$spc,$rmtm,$rm,$sam,$seam,$csma,$masc,$sma,$smar,$as1,$ssa,$ssr,$srts,$srr,$gspc,$gmpc,$eed,$lirary,$lm,$ab,$bo,$btr,$mtm,$am,$mr,$ntm,$an,$nr,$bi,$ibr,$bsth,$obr,$setting,$ss,$dm,$sm,$cm,$ftm,$afa,$far,$fp,$cp,$sms_panel,$software_users,$batabase_bkp,$type_master); if($stmt->execute()) { $data = array(); if($stmt->fetch()) { $data[0] = $res_id; $data[1] = $user_name; $data[2] = $contact_no; $data[3] = $address; $data[4] = $designation; $data[5] = $user_id; $data[6] = $password; $data[7] = $date; $data[8] = $time; $data[9] = $student; $data[10] = $add_student; $data[11] = $use1; $data[12] = $ievd; $data[13] = $er; $data[14] = $sr; $data[15] = $cs; $data[16] = $micp; $data[17] = $pcg; $data[18] = $spc; $data[19] = $rmtm; $data[20] = $rm; $data[21] = $sam; $data[22] = $seam; $data[23] = $csma; $data[24] = $masc; $data[25] = $sma; $data[26] = $smar; $data[27] = $as1; $data[28] = $ssa; $data[29] = $ssr; $data[30] = $srts; $data[31] = $srr; $data[32] = $gspc; $data[33] = $gmpc; $data[34] = $eed; $data[35] = $lirary; $data[36] = $lm; $data[37] = $ab; $data[38] = $bo; $data[39] = $btr; $data[40] = $mtm; $data[41] = $am; $data[42] = $mr; $data[43] = $ntm; $data[44] = $an; $data[45] = $nr; $data[46] = $bi; $data[47] = $ibr; $data[48] = $bsth; $data[49] = $obr; $data[50] = $setting; $data[51] = $ss; $data[52] = $dm; $data[53] = $sm; $data[54] = $cm; $data[55] = $ftm; $data[56] = $afa; $data[57] = $far; $data[58] = $fp; $data[59] = $cp; $data[60] = $sms_panel; $data[61] = $software_users; $data[62] = $batabase_bkp; $data[63] = $type_master; return $data; } return False; } } } function get_user_password($email) { if($stmt = $this->con->prepare("SELECT `password` FROM `software_users` WHERE `user_id` = ?")) { $stmt->bind_param("s",$email); $stmt->bind_result($res_password); if($stmt->execute()) { if($stmt->fetch()) { return $res_password; } return False; } } } function get_subjectwise_marks_scheme_data_from_stud_id1($class,$res_subject) { if($stmt = $this->con->prepare("SELECT `id`, `class`, `subject`, `unit1`, `semester1`, `unit2`, `semester2`, `date`, `time` FROM `nineth_standard_marking_scheme` WHERE `class`=? AND `subject`=?")) { $stmt->bind_param("ss",$class,$res_subject); $stmt->bind_result($res_id,$res_class,$res_subject,$res_unit1,$res_sem1,$res_unit2,$res_sem2,$res_date,$res_time); if($stmt->execute()) { $data = array(); while($stmt->fetch()) { $data[0] = $res_id; $data[1] = $res_class; $data[3] = $res_subject; $data[4] = $res_unit1; $data[5] = $res_sem1; $data[6] = $res_unit2; $data[7] = $res_sem2; $data[8] = $res_date; $data[9] = $res_time; } if(!empty($data)) { return $data; } else { return false; } } } } function get_marks_allocation_scheme_id_nineth($class,$subject) { if($stmt = $this->con->prepare("SELECT `id` FROM `nineth_standard_marking_scheme` WHERE `class`=? AND `subject`=?")) { $stmt->bind_param("ss",$class,$subject); $stmt->bind_result($res_id); if($stmt->execute()) { if($stmt->fetch()) { return $res_id; } return False; } } } function save_marks_allocation_scheme_data_nineth_standard($class,$subject,$unit1,$semester1,$unit2,$semester2) { $date = date("Y-m-d"); $time = date("H:i:s t"); if($stmt = $this->con->prepare("INSERT INTO `nineth_standard_marking_scheme`( `class`, `subject`, `unit1`, `semester1`, `unit2`, `semester2`, `date`, `time`) VALUES (?,?,?,?,?,?,?,?)")) { $stmt->bind_param("ssssssss",$class,$subject,$unit1,$semester1,$unit2,$semester2,$date,$time); if($stmt->execute()) { return true; } return false; } } function update_nineth_std_marks_scheme_details($class,$subject,$unit1,$semester1,$unit2,$semester2,$exist_id) { $date = date("Y-m-d"); $time = date("H:i:s t"); if($stmt = $this->con->prepare("UPDATE `nineth_standard_marking_scheme` SET `class`=?,`subject`=?,`unit1`=?,`semester1`=?,`unit2`=?,`semester2`=?,`date`=?,`time`=? WHERE `id`=?")) { $stmt->bind_param("ssssssssi",$class,$subject,$unit1,$semester1,$unit2,$semester2,$date,$time,$exist_id); if($stmt->execute()) { return true; } return false; } } function get_nineth_marks_allocation_data($class) { if($stmt = $this->con->prepare("SELECT `id`, `class`, `subject`, `unit1`, `semester1`, `unit2`, `semester2`, `date`, `time` FROM `nineth_standard_marking_scheme` WHERE `class`=?")) { $stmt->bind_param("s",$class); $stmt->bind_result($res_id,$class,$subject,$unit1,$semester1,$unit2,$semester2,$date,$time); if($stmt->execute()) { $data = array(); $row_counter = 0; while($stmt->fetch()) { $data[$row_counter][0] = $res_id; $data[$row_counter][1] = $class; $data[$row_counter][2] = $subject; $data[$row_counter][3] = $unit1; $data[$row_counter][4] = $semester1; $data[$row_counter][5] = $unit2; $data[$row_counter][6] = $semester2; $data[$row_counter][7] = $date; $data[$row_counter][8] = $time; $row_counter++; } if(!empty($data)) { return $data; } else { return false; } } } } function delete_nineth_allocation_scheme_data($delete_id) { if($stmt = $this->con->prepare("DELETE FROM `nineth_standard_marking_scheme` WHERE `id`=?")) { $stmt->bind_param("i",$delete_id); if($stmt->execute()) { return true; } return False; } } function update_nineth_std_marks_scheme_details_with_edit_id($class,$subject,$unit1,$semester1,$unit2,$semester2,$edit_id) { $date = date("Y-m-d"); $time = date("H:i:s t"); if($stmt = $this->con->prepare("UPDATE `nineth_standard_marking_scheme` SET `class`=?,`subject`=?,`unit1`=?,`semester1`=?,`unit2`=?,`semester2`=?,`date`=?,`time`=? WHERE `id`=?")) { $stmt->bind_param("ssssssssi",$class,$subject,$unit1,$semester1,$unit2,$semester2,$date,$time,$edit_id); if($stmt->execute()) { return true; } return false; } } function get_nineth_std_mark_scheme_data($edit_id) { if($stmt = $this->con->prepare("SELECT `id`, `class`, `subject`, `unit1`, `semester1`, `unit2`, `semester2`, `date`, `time` FROM `nineth_standard_marking_scheme` WHERE `id`=?")) { $stmt->bind_param("i",$edit_id); $stmt->bind_result($res_id,$res_class,$res_subject,$unit1,$semester1,$unit2,$semester2,$date,$time); if($stmt->execute()) { $data = array(); while($stmt->fetch()) { $data[0] = $res_id; $data[1] = $res_class; $data[2] = $res_subject; $data[3] = $unit1; $data[4] = $semester1; $data[5] = $unit2; $data[6] = $semester2; $data[7] = $date; $data[8] = $time; } if(!empty($data)) { return $data; } else { return false; } } } } function get_nineth_student_marks_allocation_id($class,$subject,$stud_id) { if($stmt = $this->con->prepare("SELECT `id` FROM `marks_allocation_nineth-standard` WHERE `class`=? AND `subject`=? AND `stud_id`=?")) { $stmt->bind_param("sss",$class,$subject,$stud_id); $stmt->bind_result($res_id); if($stmt->execute()) { if($stmt->fetch()) { return $res_id; } return False; } } } function save_nineth_student_marks_allocation_data($class,$subject,$stud_id,$exam_type_marks,$exam_type) { $date = date("Y-m-d"); $time = date("H:i:s t"); if($stmt = $this->con->prepare("INSERT INTO `marks_allocation_nineth-standard`(`stud_id`, `class`,`subject`, `$exam_type`, `date`, `time`) VALUES (?,?,?,?,?,?)")) { $stmt->bind_param("ssssss",$stud_id,$class,$subject,$exam_type_marks,$date,$time); if($stmt->execute()) { return true; } return false; } } function update_nineth_student_marks_allocation_details_new($stud_id,$class,$subject,$exam_type_marks,$exam_type,$db_id) { $date = date("Y-m-d"); $time = date("H:i:s t"); if($stmt = $this->con->prepare("UPDATE `marks_allocation_nineth-standard` SET `stud_id`=?,`class`=?,`subject`=?,`$exam_type`=?,`date`=?,`time`=? WHERE `id`=?")) { $stmt->bind_param("ssssssi",$stud_id,$class,$subject,$exam_type_marks,$date,$time,$db_id); if($stmt->execute()) { return true; } return false; } } function get_subjectwise_marks_scheme_data_for_marks_allocation_nineth_std($class,$subject,$exam_type) { if($stmt = $this->con->prepare("SELECT `id`, `class`,`subject`, `exam_type`, `date`, `time` FROM `nineth_standard_marking_scheme` WHERE `class`=? AND `subject`=?")) { $stmt->bind_param("ss",$class,$subject); $stmt->bind_result($res_id,$res_class,$res_subject,$res_outoff_marks,$res_date,$res_time); if($stmt->execute()) { $data = array(); while($stmt->fetch()) { $data[0] = $res_id; $data[1] = $res_class; $data[2] = $res_subject; $data[3] = $res_outoff_marks; $data[4] = $res_date; $data[5] = $res_time; } if(!empty($data)) { return $data; } else { return false; } } } } function get_subjectwise_marks_from_stud_id_exam_type_nineth_std($res_stud_id,$class,$subject,$exam_type) { if($stmt = $this->con->prepare("SELECT `id`, `stud_id`, `class`,`subject`, `$exam_type`, `date`, `time` FROM `marks_allocation_nineth-standard` WHERE `stud_id`=? AND `class`=? AND `subject`=?")) { $stmt->bind_param("sss",$res_stud_id,$class,$subject); $stmt->bind_result($res_id,$stud_id,$res_class,$res_subject,$res_exam_marks,$res_date,$res_time); if($stmt->execute()) { $data = array(); while($stmt->fetch()) { $data[0] = $res_id; $data[1] = $res_class; $data[2] = $res_subject; $data[3] = $res_exam_marks; $data[4] = $res_date; $data[5] = $res_time; $data[6] = $stud_id; } if(!empty($data)) { return $data; } else { return false; } } } } function delete_student_marks_allocation_data_nineth_std($delete_id) { if($stmt = $this->con->prepare("DELETE FROM `marks_allocation_nineth-standard` WHERE `id`=?")) { $stmt->bind_param("i",$delete_id); if($stmt->execute()) { return true; } return False; } } function get_all_student_marks_allocation_data_nineth_standard($class,$subject) { if($stmt = $this->con->prepare("SELECT `id`, `stud_id`, `class`, `subject`, `unit1`, `semester1`, `unit2`, `semester2`, `date`, `time` FROM `marks_allocation_nineth-standard` WHERE `class`=? AND `subject`=?")) { $stmt->bind_param("ss",$class,$subject); $stmt->bind_result($res_id,$stud_id,$res_class,$res_subject,$unit1,$semester1,$unit2,$semester2,$res_date,$res_time); if($stmt->execute()) { $data = array(); $row_counter = 0; while($stmt->fetch()) { $data[$row_counter][0] = $res_id; $data[$row_counter][1] = $res_class; $data[$row_counter][2] = $res_subject; $data[$row_counter][3] = $unit1; $data[$row_counter][4] = $semester1; $data[$row_counter][5] = $unit2; $data[$row_counter][6] = $semester2; $data[$row_counter][7] = $res_date; $data[$row_counter][8] = $res_time; $data[$row_counter][9] = $stud_id; $row_counter++; } if(!empty($data)) { return $data; } else { return false; } } } } function get_student_marks_allocation_id_exist_or_not_nineth_std($class,$subject,$stud_id,$edit_id) { if($stmt = $this->con->prepare("SELECT `id` FROM `marks_allocation_first_to_eight_std` WHERE `class`=? AND `semester`=? AND `subject`=? AND `stud_id`=? AND `id`!=?")) { $stmt->bind_param("ssssi",$class,$semester,$subject,$stud_id,$edit_id); $stmt->bind_result($res_id); if($stmt->execute()) { if($stmt->fetch()) { return $res_id; } return False; } } } function update_student_marks_allocation_details_nineth_std($stud_id,$class,$subject,$unit1,$semester1,$unit2,$semester2,$edit_id) { $date = date("Y-m-d"); $time = date("H:i:s t"); if($stmt = $this->con->prepare("UPDATE `marks_allocation_nineth-standard` SET `stud_id`=?,`class`=?,`subject`=?,`unit1`=?,`semester1`=?,`unit2`=?,`semester2`=?,`date`=?,`time`=? WHERE `id`=?")) { $stmt->bind_param("sssssssssi",$stud_id,$class,$subject,$unit1,$semester1,$unit2,$semester2,$date,$time,$edit_id); if($stmt->execute()) { return true; } return false; } } function get_all_student_marks_allocation_data_from_id_nineth_std($edit_id) { if($stmt = $this->con->prepare("SELECT `id`, `stud_id`, `class`, `subject`, `unit1`, `semester1`, `unit2`, `semester2`, `date`, `time` FROM `marks_allocation_nineth-standard` WHERE `id`=?")) { $stmt->bind_param("i",$edit_id); $stmt->bind_result($res_id,$stud_id,$res_class,$res_subject,$unit1,$semester1,$unit2,$semester2,$res_date,$res_time); if($stmt->execute()) { $data = array(); while($stmt->fetch()) { $data[0] = $res_id; $data[1] = $res_class; $data[2] = $res_subject; $data[3] = $unit1; $data[4] = $semester1; $data[5] = $unit2; $data[6] = $semester2; $data[7] = $res_date; $data[8] = $res_time; $data[9] = $stud_id; } if(!empty($data)) { return $data; } else { return false; } } } } function get_marking_scheme_from_subject_nineth_std($stud_class,$res_subject) { if($stmt = $this->con->prepare("SELECT `id`, `class`, `subject`, `unit1`, `semester1`, `unit2`, `semester2`, `date`, `time` FROM `nineth_standard_marking_scheme` WHERE `class`=? AND `subject`=?")) { $stmt->bind_param("ss",$stud_class,$res_subject); $stmt->bind_result($res_id,$res_class,$res_subject,$unit1,$semester1,$unit2,$semester2,$res_date,$res_time); if($stmt->execute()) { $data = array(); $counter = 0; if($stmt->fetch()) { $data[0] = $res_id; $data[1] = $res_class; $data[2] = $res_subject; $data[3] = $unit1; $data[4] = $semester1; $data[5] = $unit2; $data[6] = $semester2; $data[7] = $res_date; $data[8] = $res_time; return $data; } else { return false; } } } } function get_first_sem_students_marks_from_subject_nineth_std($res_stud_id,$stud_class,$res_subject) { if($stmt = $this->con->prepare("SELECT `id`, `stud_id`, `class`, `subject`, `unit1`, `semester1`, `date`, `time` FROM `marks_allocation_nineth-standard` WHERE `stud_id`=? AND `class`=? AND `subject`=?")) { $stmt->bind_param("sss",$res_stud_id,$stud_class,$res_subject); $stmt->bind_result($res_id,$stud_id,$res_class,$res_subject,$unit1,$semester1,$res_date,$res_time); if($stmt->execute()) { $data = array(); while($stmt->fetch()) { $data[0] = $res_id; $data[1] = $res_class; $data[2] = $res_subject; $data[3] = $unit1; $data[4] = $semester1; $data[5] = $res_date; $data[6] = $res_time; $data[7] = $stud_id; } if(!empty($data)) { return $data; } else { return false; } } } } function get_second_sem_students_marks_from_subject_nineth_std($res_stud_id,$stud_class,$res_subject) { if($stmt = $this->con->prepare("SELECT `id`, `stud_id`, `class`, `subject`, `unit2`, `semester2`, `date`, `time` FROM `marks_allocation_nineth-standard` WHERE `stud_id`=? AND `class`=? AND `subject`=?")) { $stmt->bind_param("sss",$res_stud_id,$stud_class,$res_subject); $stmt->bind_result($res_id,$stud_id,$res_class,$res_subject,$unit2,$semester2,$res_date,$res_time); if($stmt->execute()) { $data = array(); while($stmt->fetch()) { $data[0] = $res_id; $data[1] = $res_class; $data[2] = $res_subject; $data[3] = $unit2; $data[4] = $semester2; $data[5] = $res_date; $data[6] = $res_time; $data[7] = $stud_id; } if(!empty($data)) { return $data; } else { return false; } } } } function update_student_data_with_gr_no($gr_no,$column,$class,$acd_year) { if($stmt = $this->con->prepare(" UPDATE `student_details` SET `$column`=? WHERE `no_of_pupil`=? AND `academic_year`=? ")) { $stmt->bind_param("sss",$class,$gr_no,$acd_year); if($stmt->execute()) { return true; } return False; } } function get_class_name($res_class) { if($stmt = $this->con->prepare("SELECT `class_title` FROM `class_master` WHERE `id`=?")) { $stmt->bind_param("i",$res_class); $stmt->bind_result($res_class); if($stmt->execute()) { if($stmt->fetch()) { return $res_class; } return False; } } } function get_subjectwise_marks_scheme_data_preprimary($class,$semester,$res_subject) { if($stmt = $this->con->prepare("SELECT `id`, `class`, `semester`, `subject`, `unit1`, `unit2`, `semester1`, `unit3`, `unit4`, `semester2`, `date`, `time` FROM `pre_primary_marking_scheme` WHERE `class`=? AND `semester`=? AND `subject`=?")) { $stmt->bind_param("sss",$class,$semester,$res_subject); $stmt->bind_result($res_id,$res_class,$res_semester,$res_subject,$unit1,$unit2,$semester1,$unit3,$unit4,$semester2,$res_date,$res_time); if($stmt->execute()) { $data = array(); while($stmt->fetch()) { $data[0] = $res_id; $data[1] = $res_class; $data[2] = $res_semester; $data[3] = $res_subject; $data[4] = $unit1; $data[5] = $unit2; $data[6] = $semester1; $data[7] = $unit3; $data[8] = $unit4; $data[9] = $semester2; $data[10] = $res_date; $data[11] = $res_time; } if(!empty($data)) { return $data; } else { return false; } } } } function get_marks_allocation_scheme_id_preprimary($class,$semester,$subject) { if($stmt = $this->con->prepare("SELECT `id` FROM `pre_primary_marking_scheme` WHERE `class`=? AND `semester`=? AND `subject`=?")) { $stmt->bind_param("sss",$class,$semester,$subject); $stmt->bind_result($res_id); if($stmt->execute()) { if($stmt->fetch()) { return $res_id; } return False; } } } function save_marks_allocation_scheme_data_preprimary($class,$semester,$subject,$unit1,$unit2,$semester1,$unit3,$unit4,$semester2) { $date = date("Y-m-d"); $time = date("H:i:s t"); if($stmt = $this->con->prepare("INSERT INTO `pre_primary_marking_scheme`(`class`, `semester`, `subject`, `unit1`, `unit2`, `semester1`, `unit3`, `unit4`, `semester2`, `date`, `time`) VALUES (?,?,?,?,?,?,?,?,?,?,?)")) { $stmt->bind_param("sssssssssss",$class,$semester,$subject,$unit1,$unit2,$semester1,$unit3,$unit4,$semester2,$date,$time); if($stmt->execute()) { return true; } return false; } } function update_preprimary_marks_scheme_details($class,$semester,$subject,$unit1,$unit2,$semester1,$unit3,$unit4,$semester2,$exist_id) { $date = date("Y-m-d"); $time = date("H:i:s t"); if($stmt = $this->con->prepare("UPDATE `pre_primary_marking_scheme` SET `class`=?,`semester`=?,`subject`=?,`unit1`=?,`unit2`=?,`semester1`=?,`unit3`=?,`unit4`=?,`semester2`=?,`date`=?,`time`=? WHERE `id`=?")) { $stmt->bind_param("sssssssssi",$class,$semester,$subject,$unit1,$unit2,$semester1,$unit3,$unit4,$semester2,$exist_id); if($stmt->execute()) { return true; } return false; } } function get_student_marks_allocation_id_primary($class,$semester,$subject,$stud_id) { if($stmt = $this->con->prepare("SELECT `id` FROM `mark_allocation_pre_primary` WHERE `class`=? AND `semester`=? AND `subject`=? AND `stud_id`=?")) { $stmt->bind_param("ssss",$class,$semester,$subject,$stud_id); $stmt->bind_result($res_id); if($stmt->execute()) { if($stmt->fetch()) { return $res_id; } return False; } } } function save_student_marks_allocation_data_primary($class,$semester,$subject,$stud_id,$exam_type_marks,$exam_type) { $date = date("Y-m-d"); $time = date("H:i:s t"); if($stmt = $this->con->prepare("INSERT INTO `mark_allocation_pre_primary`(`stud_id`, `class`, `semester`, `subject`, `$exam_type`, `date`, `time`) VALUES (?,?,?,?,?,?,?)")) { $stmt->bind_param("sssssss",$stud_id,$class,$semester,$subject,$exam_type_marks,$date,$time); if($stmt->execute()) { return true; } return false; } } function update_student_marks_allocation_details_primary($stud_id,$class,$semester,$subject,$exam_type_marks,$exam_type,$db_id) { $date = date("Y-m-d"); $time = date("H:i:s t"); if($stmt = $this->con->prepare("UPDATE `mark_allocation_pre_primary` SET `stud_id`=?,`class`=?,`semester`=?,`subject`=?,`$exam_type`=?,`date`=?,`time`=? WHERE `id`=?")) { $stmt->bind_param("sssssssi",$stud_id,$class,$semester,$subject,$exam_type_marks,$date,$time,$db_id); if($stmt->execute()) { return true; } return false; } } function get_subjectwise_marks_scheme_data_for_marks_allocation_primary($class,$semester,$subject,$exam_type) { if($stmt = $this->con->prepare("SELECT `id`, `class`, `semester`, `subject`, `$exam_type`, `date`, `time` FROM `pre_primary_marking_scheme` WHERE `class`=? AND `semester`=? AND `subject`=?")) { $stmt->bind_param("sss",$class,$semester,$subject); $stmt->bind_result($res_id,$res_class,$res_semester,$res_subject,$res_outoff_marks,$res_date,$res_time); if($stmt->execute()) { $data = array(); while($stmt->fetch()) { $data[0] = $res_id; $data[1] = $res_class; $data[2] = $res_semester; $data[3] = $res_subject; $data[4] = $res_outoff_marks; $data[5] = $res_date; $data[6] = $res_time; } if(!empty($data)) { return $data; } else { return false; } } } } function get_subjectwise_marks_from_stud_id_exam_type_primary($res_stud_id,$class,$semester,$subject,$exam_type) { if($stmt = $this->con->prepare("SELECT `id`, `stud_id`, `class`, `semester`, `subject`, `$exam_type`, `date`, `time` FROM `mark_allocation_pre_primary` WHERE `stud_id`=? AND `class`=? AND `semester`=? AND `subject`=?")) { $stmt->bind_param("ssss",$res_stud_id,$class,$semester,$subject); $stmt->bind_result($res_id,$stud_id,$res_class,$res_semester,$res_subject,$res_exam_marks,$res_date,$res_time); if($stmt->execute()) { $data = array(); while($stmt->fetch()) { $data[0] = $res_id; $data[1] = $res_class; $data[2] = $res_semester; $data[3] = $res_subject; $data[4] = $res_exam_marks; $data[5] = $res_date; $data[6] = $res_time; $data[7] = $stud_id; } if(!empty($data)) { return $data; } else { return false; } } } } function get_first_sem_marking_scheme_from_subject_preprimary($stud_class,$res_subject) { $semester = "I"; if($stmt = $this->con->prepare("SELECT `id`, `class`, `semester`, `subject`, `unit1`, `unit2`, `semester1`, `unit3`, `unit4`, `semester2`, `date`, `time` FROM `pre_primary_marking_scheme` WHERE `class`=? AND `semester`=? AND `subject`=?")) { $stmt->bind_param("sss",$stud_class,$semester,$res_subject); $stmt->bind_result($res_id,$res_class,$res_semester,$res_subject,$unit1,$unit2,$semester1,$unit3,$unit4,$semester2,$res_date,$res_time); if($stmt->execute()) { $data = array(); while($stmt->fetch()) { $data[0] = $res_id; $data[1] = $res_class; $data[2] = $res_semester; $data[3] = $res_subject; $data[4] = $unit1; $data[5] = $unit2; $data[6] = $semester1; $data[7] = $unit3; $data[8] = $unit4; $data[9] = $semester2; $data[10] = $res_date; $data[11] = $res_time; } if(!empty($data)) { return $data; } else { return false; } } } } function get_first_sem_students_marks_from_subject_preprimary($res_stud_id,$stud_class,$res_subject) { $semester = "I"; if($stmt = $this->con->prepare("SELECT `id`, `stud_id`, `class`, `semester`, `subject`, `unit1`, `unit2`, `semester1`, `unit3`, `unit4`, `semester2`, `date`, `time` FROM `mark_allocation_pre_primary` WHERE `stud_id`=? AND `class`=? AND `semester`=? AND `subject`=?")) { $stmt->bind_param("ssss",$res_stud_id,$stud_class,$semester,$res_subject); $stmt->bind_result($res_id,$stud_id,$res_class,$res_semester,$res_subject,$unit1,$unit2,$semester1,$unit3,$unit4,$semester2,$res_date,$res_time); if($stmt->execute()) { $data = array(); if($stmt->fetch()) { $data[0] = $res_id; $data[1] = $res_class; $data[2] = $res_semester; $data[3] = $res_subject; $data[4] = $unit1; $data[5] = $unit2; $data[6] = $semester1; $data[7] = $unit3; $data[8] = $unit4; $data[9] = $semester2; $data[10] = $res_date; $data[11] = $res_time; $data[12] = $stud_id; return $data; } else { return false; } } } } function get_second_sem_marking_scheme_from_subject_preprimary($stud_class,$res_subject) { $semester = "II"; if($stmt = $this->con->prepare("SELECT `id`, `class`, `semester`, `subject`, `unit1`, `unit2`, `semester1`, `unit3`, `unit4`, `semester2`, `date`, `time` FROM `pre_primary_marking_scheme` WHERE `class`=? AND `semester`=? AND `subject`=?")) { $stmt->bind_param("sss",$stud_class,$semester,$res_subject); $stmt->bind_result($res_id,$res_class,$res_semester,$res_subject,$unit1,$unit2,$semester1,$unit3,$unit4,$semester2,$res_date,$res_time); if($stmt->execute()) { $data = array(); while($stmt->fetch()) { $data[0] = $res_id; $data[1] = $res_class; $data[2] = $res_semester; $data[3] = $res_subject; $data[4] = $unit1; $data[5] = $unit2; $data[6] = $semester1; $data[7] = $unit3; $data[8] = $unit4; $data[9] = $semester2; $data[10] = $res_date; $data[11] = $res_time; } if(!empty($data)) { return $data; } else { return false; } } } } function get_second_sem_students_marks_from_subject_preprimary($res_stud_id,$stud_class,$res_subject) { $semester = "II"; if($stmt = $this->con->prepare("SELECT `id`, `stud_id`, `class`, `semester`, `subject`, `unit1`, `unit2`, `semester1`, `unit3`, `unit4`, `semester2`, `date`, `time` FROM `mark_allocation_pre_primary` WHERE `stud_id`=? AND `class`=? AND `semester`=? AND `subject`=?")) { $stmt->bind_param("ssss",$res_stud_id,$stud_class,$semester,$res_subject); $stmt->bind_result($res_id,$stud_id,$res_class,$res_semester,$res_subject,$unit1,$unit2,$semester1,$unit3,$unit4,$semester2,$res_date,$res_time); if($stmt->execute()) { $data = array(); while($stmt->fetch()) { $data[0] = $res_id; $data[1] = $res_class; $data[2] = $res_semester; $data[3] = $res_subject; $data[4] = $unit1; $data[5] = $unit2; $data[6] = $semester1; $data[7] = $unit3; $data[8] = $unit4; $data[9] = $semester2; $data[10] = $res_date; $data[11] = $res_time; $data[12] = $stud_id; } if(!empty($data)) { return $data; } else { return false; } } } } function update_student_data4($promoted_details,$class_details,$school_reopen_details,$inserted_id) { if($stmt = $this->con->prepare("UPDATE `student_details` SET `promoted_details`=?,`class_details`=?,`school_reopen_details`=? WHERE `id`=? ")) { $stmt->bind_param("sssi",$promoted_details,$class_details,$school_reopen_details,$inserted_id); if($stmt->execute()) { return true; } return False; } } function get_marks_allocation_scheme_id_eleventh($class,$subject) { if($stmt = $this->con->prepare("SELECT `id` FROM `eleventh_std_marking_scheme` WHERE `class`=? AND `subject`=?")) { $stmt->bind_param("ss",$class,$subject); $stmt->bind_result($res_id); if($stmt->execute()) { if($stmt->fetch()) { return $res_id; } return False; } } } function save_marks_allocation_scheme_data_eleventh_standard($class,$subject,$tutorial1,$unit1,$semester1,$tutorial2,$unit2,$oral,$written) { $date = date("Y-m-d"); $time = date("H:i:s t"); if($stmt = $this->con->prepare("INSERT INTO `eleventh_std_marking_scheme`(`class`, `subject`, `tutorial1`, `unit1`, `semester1`, `tutorial2`, `unit2`, `oral`, `written`, `date`, `time`) VALUES (?,?,?,?,?,?,?,?,?,?,?)")) { $stmt->bind_param("sssssssssss",$class,$subject,$tutorial1,$unit1,$semester1,$tutorial2,$unit2,$oral,$written,$date,$time); if($stmt->execute()) { return true; } return false; } } function update_eleventh_std_marks_scheme_details($class,$subject,$tutorial1,$unit1,$semester1,$tutorial2,$unit2,$oral,$written,$exist_id) { $date = date("Y-m-d"); $time = date("H:i:s t"); if($stmt = $this->con->prepare("UPDATE `eleventh_std_marking_scheme` SET `class`=?,`subject`=?,`tutorial1`=?,`unit1`=?,`semester1`=?,`tutorial2`=?,`unit2`=?,`oral`=?,`written`=? WHERE `id`=?")) { $stmt->bind_param("sssssssssi",$class,$subject,$tutorial1,$unit1,$semester1,$tutorial2,$unit2,$oral,$written,$exist_id); if($stmt->execute()) { return true; } return false; } } function get_subjectwise_marks_scheme_data_from_marking_scheme_eleventh($class,$res_subject) { if($stmt = $this->con->prepare("SELECT `id`, `class`, `subject`, `tutorial1`, `unit1`, `semester1`, `tutorial2`, `unit2`, `oral`, `written`, `date`, `time` FROM `eleventh_std_marking_scheme` WHERE `class`=? AND `subject`=?")) { $stmt->bind_param("ss",$class,$res_subject); $stmt->bind_result($res_id,$res_class,$res_subject,$tutorial1,$res_unit1,$res_sem1,$tutorial2,$res_unit2,$oral,$written,$res_date,$res_time); if($stmt->execute()) { $data = array(); while($stmt->fetch()) { $data[0] = $res_id; $data[1] = $res_class; $data[3] = $res_subject; $data[4] = $tutorial1; $data[5] = $res_unit1; $data[6] = $res_sem1; $data[7] = $tutorial2; $data[8] = $res_unit2; $data[9] = $oral; $data[10] = $written; $data[11] = $res_date; $data[12] = $res_time; } if(!empty($data)) { return $data; } else { return false; } } } } function get_eleventh_student_marks_allocation_id($class,$subject,$stud_id) { if($stmt = $this->con->prepare("SELECT `id` FROM `mark_allocation_eleventh_standard` WHERE `class`=? AND `subject`=? AND `stud_id`=?")) { $stmt->bind_param("sss",$class,$subject,$stud_id); $stmt->bind_result($res_id); if($stmt->execute()) { if($stmt->fetch()) { return $res_id; } return False; } } } function save_eleventh_student_marks_allocation_data($class,$subject,$stud_id,$exam_type_marks,$exam_type) { $date = date("Y-m-d"); $time = date("H:i:s t"); if($stmt = $this->con->prepare("INSERT INTO `mark_allocation_eleventh_standard`(`stud_id`, `class`,`subject`, `$exam_type`, `date`, `time`) VALUES (?,?,?,?,?,?)")) { $stmt->bind_param("ssssss",$stud_id,$class,$subject,$exam_type_marks,$date,$time); if($stmt->execute()) { return true; } return false; } } function update_eleventh_student_marks_allocation_details_new($stud_id,$class,$subject,$exam_type_marks,$exam_type,$db_id) { $date = date("Y-m-d"); $time = date("H:i:s t"); if($stmt = $this->con->prepare("UPDATE `mark_allocation_eleventh_standard` SET `stud_id`=?,`class`=?,`subject`=?,`$exam_type`=?,`date`=?,`time`=? WHERE `id`=?")) { $stmt->bind_param("ssssssi",$stud_id,$class,$subject,$exam_type_marks,$date,$time,$db_id); if($stmt->execute()) { return true; } return false; } } function get_subjectwise_marks_scheme_data_for_marks_allocation_eleventh_std($class,$subject,$exam_type) { if($stmt = $this->con->prepare("SELECT `id`, `class`,`subject`, `exam_type`, `date`, `time` FROM `eleventh_std_marking_scheme` WHERE `class`=? AND `subject`=?")) { $stmt->bind_param("ss",$class,$subject); $stmt->bind_result($res_id,$res_class,$res_subject,$res_outoff_marks,$res_date,$res_time); if($stmt->execute()) { $data = array(); while($stmt->fetch()) { $data[0] = $res_id; $data[1] = $res_class; $data[2] = $res_subject; $data[3] = $res_outoff_marks; $data[4] = $res_date; $data[5] = $res_time; } if(!empty($data)) { return $data; } else { return false; } } } } function get_subjectwise_marks_from_stud_id_exam_type_eleventh_std($res_stud_id,$class,$subject,$exam_type) { if($stmt = $this->con->prepare("SELECT `id`, `stud_id`, `class`,`subject`, `$exam_type`, `date`, `time` FROM `mark_allocation_eleventh_standard` WHERE `stud_id`=? AND `class`=? AND `subject`=?")) { $stmt->bind_param("sss",$res_stud_id,$class,$subject); $stmt->bind_result($res_id,$stud_id,$res_class,$res_subject,$res_exam_marks,$res_date,$res_time); if($stmt->execute()) { $data = array(); while($stmt->fetch()) { $data[0] = $res_id; $data[1] = $res_class; $data[2] = $res_subject; $data[3] = $res_exam_marks; $data[4] = $res_date; $data[5] = $res_time; $data[6] = $stud_id; } if(!empty($data)) { return $data; } else { return false; } } } } function get_all_stud_data_from_class_medium_division1($class,$division,$acd_year) { if($stmt = $this->con->prepare("SELECT `id`, `surname`, `student_name`, `father_name`, `student_image`,`roll_no` FROM `student_details` WHERE `class`=? AND `division`=? AND `academic_year`=? ORDER BY `roll_no` ASC ")) { $stmt->bind_param("sss",$class,$division,$acd_year); $stmt->bind_result($res_stud_id,$stud_surname,$stud_name,$stud_father_name,$stud_img,$roll_no); if($stmt->execute()) { $data = array(); $row_counter = 0; while($stmt->fetch()) { $data[$row_counter][0] = $res_stud_id; $data[$row_counter][1] = $stud_surname; $data[$row_counter][2] = $stud_name; $data[$row_counter][3] = $stud_father_name; $data[$row_counter][4] = $stud_img; $data[$row_counter][5] = $roll_no; $row_counter++; } if(!empty($data)) { return $data; } else { return false; } } } } function get_marking_scheme_from_subject_ele_std($stud_class,$res_subject) { if($stmt = $this->con->prepare("SELECT `id`, `class`, `subject`, `tutorial1`, `unit1`, `semester1`, `tutorial2`, `unit2`, `oral`, `written`, `date`, `time` FROM `eleventh_std_marking_scheme` WHERE `class`=? AND `subject`=?")) { $stmt->bind_param("ss",$stud_class,$res_subject); $stmt->bind_result($res_id,$res_class,$res_subject,$tutorial1,$unit1,$semester1,$tutorial2,$unit2,$oral,$written,$res_date,$res_time); if($stmt->execute()) { $data = array(); $counter = 0; if($stmt->fetch()) { $data[0] = $res_id; $data[1] = $res_class; $data[2] = $res_subject; $data[3] = $tutorial1; $data[4] = $unit1; $data[5] = $semester1; $data[6] = $tutorial2; $data[7] = $unit2; $data[8] = $oral; $data[9] = $written; $data[10] = $res_date; $data[11] = $res_time; return $data; } else { return false; } } } } function get_marking_scheme_ele_std_second_sem($res_stud_id,$stud_class,$res_subject) { if($stmt = $this->con->prepare("SELECT `id`, `stud_id`, `class`, `subject`, `tutorial1`, `unit1`, `semester1`, `tutorial2`, `unit2`, `oral`, `written`, `date`, `time` FROM `mark_allocation_eleventh_standard` WHERE `stud_id`=? AND `class`=? AND `subject`=?")) { $stmt->bind_param("sss",$res_stud_id,$stud_class,$res_subject); $stmt->bind_result($res_id,$stud_id,$res_class,$res_subject,$tutorial1,$unit1,$semester1,$tutorial2,$unit2,$oral,$written,$res_date,$res_time); if($stmt->execute()) { $data = array(); while($stmt->fetch()) { $data[0] = $res_id; $data[1] = $res_class; $data[2] = $res_subject; $data[3] = $tutorial1; $data[4] = $unit1; $data[5] = $semester1; $data[6] = $tutorial2; $data[7] = $unit2; $data[8] = $oral; $data[9] = $written; $data[10] = $res_date; $data[11] = $res_time; $data[12] = $stud_id; } if(!empty($data)) { return $data; } else { return false; } } } } function get_year_id($acd_year) { if($stmt = $this->con->prepare("SELECT `id` FROM `academic_year` WHERE `year`=?")) { $stmt->bind_param("i",$acd_year); $stmt->bind_result($res_id); if($stmt->execute()) { if($stmt->fetch()) { return $res_id; } return False; } } } function save_acd_year_master_details($acd_year) { $date = date("Y-m-d"); $time = date("H:i:s t"); if($stmt = $this->con->prepare("INSERT INTO `academic_year`(`year`, `date`, `time`) VALUES (?,?,?)")) { $stmt->bind_param("sss",$acd_year,$date,$time); if($stmt->execute()) { return true; } return false; } } function get_all_acd_year_master_data() { if($stmt = $this->con->prepare("SELECT `id`,`year`,`date` FROM `academic_year`")) { $stmt->bind_result($res_id,$res_acd_year,$res_date); if($stmt->execute()) { $data = array(); $row_counter = 0; while($stmt->fetch()) { $data[$row_counter][0] = $res_id; $data[$row_counter][1] = $res_acd_year; $data[$row_counter][2] = $res_date; $row_counter++; } if(!empty($data)) { return $data; } else { return false; } } } } function update_year_master_details($acd_year,$edit_id) { $date = date("Y-m-d"); $time = date("H:i:s t"); if($stmt = $this->con->prepare("UPDATE `academic_year` SET `year`=?,`date`=?,`time`=? WHERE `id`=?")) { $stmt->bind_param("sssi",$acd_year,$date,$time,$edit_id); if($stmt->execute()) { return true; } return False; } } function get_acd_year_master_details($edit_id) { if($stmt = $this->con->prepare("SELECT `id`, `year`, `date` FROM `academic_year` WHERE `id`=?")) { $stmt->bind_param("i",$edit_id); $stmt->bind_result($res_id,$res_acd_year,$res_date); if($stmt->execute()) { $data = array(); $row_counter = 0; if($stmt->fetch()) { $data[0] = $res_id; $data[1] = $res_acd_year; $data[2] = $res_date; $row_counter++; } if(!empty($data)) { return $data; } else { return false; } } } } function delete_acd_year_master_data($delete_id) { if($stmt = $this->con->prepare("DELETE FROM `academic_year` WHERE `id`=?")) { $stmt->bind_param("i",$delete_id); if($stmt->execute()) { return true; } return False; } } function save_passed_student_record ($to_class,$to_medium,$to_division,$res_roll_no,$res_surname,$res_stud_name,$res_father_name,$res_mother_name,$res_stud_cont,$res_father_cont,$res_mother_cont,$res_residential_no,$res_address,$res_corres_add,$res_child_desc,$res_email,$res_aadhar_no,$res_religion,$res_caste,$res_category,$res_mother_tongue,$res_nationality,$res_birth_palce,$res_birth_date,$res_gender,$res_last_school,$res_admission_date,$res_blood_group,$res_height,$res_weight,$res_student_image,$res_birth_certi,$res_caste_certi,$res_adv_board,$res_news_paper,$res_teachers,$res_friends,$res_ex_students,$res_pre_class,$res_other,$res_remarks,$res_no_of_pupil,$res_stud_id_for_lc,$res_father_quali,$res_father_occu,$res_father_income,$res_father_office_add,$res_father_resident_add,$res_mother_qualifi,$res_mother_occupa,$res_mother_income,$res_mother_office_add,$res_mother_resident_add,$certifi_no,$progress,$conduct,$leaving_school_date,$standard_sinse_when,$leaving_school_reason,$res_date,$res_time,$res_gr_no,$res_tc_status,$res_birth_district,$res_birth_state,$res_birth_country,$to_year,$sub_caste) { $date = date("Y-m-d"); $time = date("H:i:s t"); if($stmt = $this->con->prepare("INSERT INTO `student_details`(`class`, `medium`, `division`, `roll_no`, `surname`, `student_name`, `father_name`, `mother_name`, `stud_cont_no`, `father_cont_no`, `mother_cont_no`, `residential_no`, `address`, `corres_address`, `child_desc`, `email`, `aadhar_number`, `religion`, `caste`, `category`, `mother_tongue`, `nationality`, `place_of_birth`, `birth_date`, `gender`, `last_school`, `admission_date`, `blood_group`, `height`, `weight`, `student_image`, `birth_certificate`, `caste_certificate`, `advertising_board`, `news_paper`, `teachers`, `friends`, `ex_students`, `pre_class_student`, `other`, `remarks`, `no_of_pupil`, `stud_id_for_lc`,`father_qualification`, `father_occupation`, `father_monthly_income`, `father_office_add`, `father_resident_add`, `mother_qualifi`, `mother_occupation`, `mother_income`, `mother_office_add`, `mother_resident_add`,`certificate_no`, `progress`, `conduct`, `leaving_school_date`, `standard_sinse_when`, `leaving_school_reason`, `date`,`time`,`g-r-no`,`status`,`birth_district`, `birth_state`, `birth_country`, `academic_year`,`sub_caste`) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)")) { $stmt-> bind_param("ssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss", $to_class,$to_medium,$to_division, $res_roll_no, $res_surname, $res_stud_name, $res_father_name, $res_mother_name, $res_stud_cont, $res_father_cont, $res_mother_cont, $res_residential_no, $res_address, $res_corres_add, $res_child_desc, $res_email, $res_aadhar_no, $res_religion, $res_caste, $res_category, $res_mother_tongue, $res_nationality, $res_birth_palce, $res_birth_date, $res_gender, $res_last_school, $res_admission_date, $res_blood_group, $res_height, $res_weight, $res_student_image,$res_birth_certi, $res_caste_certi, $res_adv_board, $res_news_paper, $res_teachers, $res_friends, $res_ex_students, $res_pre_class, $res_other, $res_remarks, $res_no_of_pupil, $res_stud_id_for_lc,$res_father_quali, $res_father_occu, $res_father_income,$res_father_office_add, $res_father_resident_add,$res_mother_qualifi,$res_mother_occupa,$res_mother_income, $res_mother_office_add,$res_mother_resident_add,$certifi_no,$progress,$conduct,$leaving_school_date,$standard_sinse_when,$leaving_school_reason,$res_date,$res_time,$res_gr_no,$res_tc_status, $res_birth_district,$res_birth_state, $res_birth_country,$to_year,$sub_caste); if($stmt->execute()) { return true; } else { return false; } } } function update_forward_student_class($to_class,$to_medium,$to_division,$to_year,$count) { if($stmt = $this->con->prepare("UPDATE `student_details` SET `class`=?,`medium`=?,`division`=?,`academic_year`=? WHERE `id`=?")) { $stmt->bind_param("ssssi",$to_class,$to_medium,$to_division,$to_year,$count); if($stmt->execute()) { return true; } return False; } } function get_student_existid($to_year,$res_no_of_pupil) { if($stmt = $this->con->prepare("SELECT `id` FROM `student_details` WHERE `academic_year`=? AND `no_of_pupil`=?")) { $stmt->bind_param("ss",$to_year,$res_no_of_pupil); $stmt->bind_result($res_id); if($stmt->execute()) { if($stmt->fetch()) { return $res_id; } return False; } } } function update_passed_student_record($to_class,$to_medium,$to_division,$res_roll_no,$res_surname,$res_stud_name,$res_father_name,$res_mother_name,$res_stud_cont,$res_father_cont,$res_mother_cont,$res_residential_no,$res_address,$res_corres_add,$res_child_desc,$res_email,$res_aadhar_no,$res_religion,$res_caste,$res_category,$res_mother_tongue,$res_nationality,$res_birth_palce,$res_birth_date,$res_gender,$res_last_school,$res_admission_date,$res_blood_group,$res_height,$res_weight,$res_student_image,$res_birth_certi,$res_caste_certi,$res_adv_board,$res_news_paper,$res_teachers,$res_friends,$res_ex_students,$res_pre_class,$res_other,$res_remarks,$res_no_of_pupil,$res_stud_id_for_lc,$res_father_quali,$res_father_occu,$res_father_income,$res_father_office_add,$res_father_resident_add,$res_mother_qualifi,$res_mother_occupa,$res_mother_income,$res_mother_office_add,$res_mother_resident_add,$certifi_no,$progress,$conduct,$leaving_school_date,$standard_sinse_when,$leaving_school_reason,$res_date,$res_time,$res_gr_no,$res_tc_status,$res_birth_district,$res_birth_state,$res_birth_country,$to_year,$exist_id,$sub_caste) { if($stmt = $this->con->prepare("UPDATE `student_details` SET `class`=?, `medium`=?, `division`=?, `roll_no`=?, `surname`=?, `student_name`=?, `father_name`=?, `mother_name`=?, `stud_cont_no`=?, `father_cont_no`=?, `mother_cont_no`=?, `residential_no`=?, `address`=?, `corres_address`=?, `child_desc`=?, `email`=?, `aadhar_number`=?, `religion`=?, `caste`=?, `category`=?, `mother_tongue`=?, `nationality`=?, `place_of_birth`=?, `birth_date`=?, `gender`=?, `last_school`=?, `admission_date`=?, `blood_group`=?, `height`=?, `weight`=?, `student_image`=?, `birth_certificate`=?, `caste_certificate`=?, `advertising_board`=?, `news_paper`=?, `teachers`=?, `friends`=?, `ex_students`=?, `pre_class_student`=?, `other`=?, `remarks`=?, `no_of_pupil`=?, `stud_id_for_lc`=?,`father_qualification`=?, `father_occupation`=?, `father_monthly_income`=?, `father_office_add`=?, `father_resident_add`=?, `mother_qualifi`=?, `mother_occupation`=?, `mother_income`=?, `mother_office_add`=?, `mother_resident_add`=?, `certificate_no`=?, `progress`=?, `conduct`=?, `leaving_school_date`=?, `standard_sinse_when`=?, `leaving_school_reason`=?, `date`=?,`time`=?,`g-r-no`=?, `status`=?,`birth_district`=?, `birth_state`=?, `birth_country`=?, `academic_year`=? , `sub_caste`=? WHERE `id`=?")) { $stmt->bind_param("ssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssi",$to_class,$to_medium,$to_division,$res_roll_no,$res_surname,$res_stud_name,$res_father_name,$res_mother_name,$res_stud_cont,$res_father_cont,$res_mother_cont,$res_residential_no,$res_address,$res_corres_add,$res_child_desc,$res_email,$res_aadhar_no,$res_religion,$res_caste,$res_category,$res_mother_tongue,$res_nationality,$res_birth_palce,$res_birth_date,$res_gender,$res_last_school,$res_admission_date,$res_blood_group,$res_height,$res_weight,$res_student_image,$res_birth_certi,$res_caste_certi,$res_adv_board,$res_news_paper,$res_teachers,$res_friends,$res_ex_students,$res_pre_class,$res_other,$res_remarks,$res_no_of_pupil,$res_stud_id_for_lc,$res_father_quali,$res_father_occu,$res_father_income,$res_father_office_add,$res_father_resident_add,$res_mother_qualifi,$res_mother_occupa,$res_mother_income,$res_mother_office_add,$res_mother_resident_add,$certifi_no,$progress,$conduct,$leaving_school_date,$standard_sinse_when,$leaving_school_reason,$res_date,$res_time,$res_gr_no,$res_tc_status,$res_birth_district,$res_birth_state,$res_birth_country,$to_year,$sub_caste,$exist_id); if($stmt->execute()) { return true; } return False; } } function get_student_record_from_date($acd_year) { if($stmt = $this->con->prepare("SELECT `id`, `class`, `medium`, `division`, `roll_no`, `surname`, `student_name`, `father_name`, `mother_name`, `stud_cont_no`, `father_cont_no`, `mother_cont_no`, `residential_no`, `address`, `corres_address`, `child_desc`, `email`, `aadhar_number`, `religion`, `caste`, `category`, `mother_tongue`, `nationality`, `place_of_birth`, `birth_date`, `gender`, `last_school`, `admission_date`, `blood_group`, `height`, `weight`, `student_image`, `birth_certificate`, `caste_certificate`, `advertising_board`, `news_paper`, `teachers`, `friends`, `ex_students`, `pre_class_student`, `other`, `remarks`, `no_of_pupil`, `stud_id_for_lc`, `g-r-no`, `father_qualification`, `father_occupation`, `father_monthly_income`, `father_office_add`, `father_resident_add`, `mother_qualifi`, `mother_occupation`, `mother_income`, `mother_office_add`, `mother_resident_add`, `date` FROM `student_details` WHERE `academic_year` LIKE '%".$acd_year."%' AND `status`!= 'Cancelled' ORDER BY `roll_no` ASC ")) { $stmt->bind_result($res_id,$res_class,$res_medium,$res_division,$res_roll_no,$res_surname,$res_stud_name,$res_father_name,$res_mother_name,$res_stud_cont,$res_father_cont,$res_mother_cont,$res_residential_no,$res_address,$res_corres_add,$res_child_desc,$res_email,$res_aadhar_no,$res_religion,$res_caste,$res_category,$res_mother_tongue,$res_nationality,$res_birth_palce,$res_birth_date,$res_gender,$res_last_school,$res_admission_date,$res_blood_group,$res_height,$res_weight,$res_student_image,$res_birth_certi,$res_caste_certi,$res_adv_board,$res_news_paper,$res_teachers,$res_friends,$res_ex_students,$res_pre_class,$res_other,$res_remarks,$res_no_of_pupil,$res_stud_id_for_lc,$res_gr_no,$res_father_quali,$res_father_occu,$res_father_income,$res_father_office_add,$res_father_resident_add,$res_mother_qualifi,$res_mother_occupa,$res_mother_income,$res_mother_office_add,$res_mother_resident_add,$res_date); if($stmt->execute()) { $data = array(); $row_counter = 0; while($stmt->fetch()) { $data[$row_counter][0] = $res_id; $data[$row_counter][1] = $res_class; $data[$row_counter][2] = $res_medium; $data[$row_counter][3] = $res_division; $data[$row_counter][4] = $res_roll_no; $data[$row_counter][5] = $res_surname; $data[$row_counter][6] = $res_stud_name; $data[$row_counter][7] = $res_father_name; $data[$row_counter][8] = $res_mother_name; $data[$row_counter][9] = $res_stud_cont; $data[$row_counter][10] = $res_father_cont; $data[$row_counter][11] = $res_mother_cont; $data[$row_counter][12] = $res_residential_no; $data[$row_counter][13] = $res_address; $data[$row_counter][14] = $res_corres_add; $data[$row_counter][15] = $res_child_desc; $data[$row_counter][16] = $res_email; $data[$row_counter][17] = $res_aadhar_no; $data[$row_counter][18] = $res_religion; $data[$row_counter][19] = $res_caste; $data[$row_counter][20] = $res_category; $data[$row_counter][21] = $res_mother_tongue; $data[$row_counter][22] = $res_nationality; $data[$row_counter][23] = $res_birth_palce; $data[$row_counter][24] = $res_birth_date; $data[$row_counter][25] = $res_gender; $data[$row_counter][26] = $res_last_school; $data[$row_counter][27] = $res_admission_date; $data[$row_counter][28] = $res_blood_group; $data[$row_counter][29] = $res_height; $data[$row_counter][30] = $res_weight; $data[$row_counter][31] = $res_student_image; $data[$row_counter][32] = $res_birth_certi; $data[$row_counter][33] = $res_caste_certi; $data[$row_counter][34] = $res_remarks; $data[$row_counter][35] = $res_no_of_pupil; $data[$row_counter][36] = $res_stud_id_for_lc; $data[$row_counter][37] = $res_father_quali; $data[$row_counter][38] = $res_father_occu; $data[$row_counter][39] = $res_father_income; $data[$row_counter][40] = $res_father_office_add; $data[$row_counter][41] = $res_father_resident_add; $data[$row_counter][42] = $res_mother_qualifi; $data[$row_counter][43] = $res_mother_occupa; $data[$row_counter][44] = $res_mother_income; $data[$row_counter][45] = $res_mother_office_add; $data[$row_counter][46] = $res_mother_resident_add; $data[$row_counter][47] = $res_date; $data[$row_counter][48] = $res_adv_board; $data[$row_counter][49] = $res_news_paper; $data[$row_counter][50] = $res_teachers; $data[$row_counter][51] = $res_friends; $data[$row_counter][52] = $res_ex_students; $data[$row_counter][53] = $res_pre_class; $data[$row_counter][54] = $res_other; $data[$row_counter][55] = $res_gr_no; $row_counter++; } if(!empty($data)) { return $data; } else { return false; } } } } function get_student_formative_marks_allocation_id($stud_id,$class,$semester,$subject) { if($stmt = $this->con->prepare("SELECT `id` FROM `set_student_formative_remarks` WHERE `stud_id`=?AND`class`=? AND `semester`=? AND `subject`=? AND `exam_type`=? AND `remark`=?")) { $stmt->bind_param("ssssss",$stud_id,$class,$semester,$subject,$exam_type,$exam_type_marks); $stmt->bind_result($res_id); if($stmt->execute()) { if($stmt->fetch()) { return $res_id; } return false; } } } function save_student_formative_marks_allocation_data($stud_id,$class,$semester,$subject,$exam_type,$exam_type_marks) { $date = date("Y-m-d"); $time = date("H:i:s t"); if($stmt = $this->con->prepare("INSERT INTO `set_student_formative_remarks`(`stud_id`, `class`, `semester`, `subject`, `exam_type`, `remark`, `date`, `time`) VALUES (?,?,?,?,?,?,?,?)")) { $stmt->bind_param("ssssssss",$stud_id,$class,$semester,$subject,$exam_type,$exam_type_marks,$date,$time); if($stmt->execute()) { return true; } return false; } } function update_student_formative_marks_allocation_details($stud_id,$class,$semester,$subject,$exam_type,$formative_oral,$db_id) { $date = date("Y-m-d"); $time = date("H:i:s t"); if($stmt = $this->con->prepare("UPDATE `set_student_formative_remarks` SET `stud_id`=?,`class`=?,`semester`=?,`subject`=?,`exam_type`=?,`remark`=?,`date`=?,`time`=? WHERE `id`=?")) { $stmt->bind_param("ssssssssi",$stud_id,$class,$semester,$subject,$exam_type,$exam_type_marks,$date,$time,$db_id); if($stmt->execute()) { return true; } return false; } } function update_student_formative_marks_allocation_details_new($stud_id,$class,$semester,$subject,$exam_type,$exam_type_marks,$db_id) { $date = date("Y-m-d"); $time = date("H:i:s t"); if($stmt = $this->con->prepare("UPDATE `set_student_formative_remarks` SET `stud_id`=?,`class`=?,`semester`=?,`subject`=?,`exam_type`=?,`remark`=?,`date`=?,`time`=? WHERE `id`=?")) { $stmt->bind_param("ssssssssi",$stud_id,$class,$semester,$subject,$exam_type,$exam_type_marks,$date,$time,$db_id); if($stmt->execute()) { return true; } return false; } } function get_student_formative_remark_from_stud_id($res_stud_id,$class,$semester,$subject,$exam_type) { if($stmt = $this->con->prepare("SELECT `remark` FROM `set_student_formative_remarks` WHERE `stud_id`=? AND `class`=? AND `semester`=? AND `subject`=? AND `exam_type`=?")) { $stmt->bind_param("sssss",$res_stud_id,$class,$semester,$subject,$exam_type); $stmt->bind_result($res_remark); if($stmt->execute()) { if($stmt->fetch()) { return $res_remark; } return false; } } } function check_student_formative_remark_id_exist_or_not($stud_id,$class,$semester,$subject,$exam_type) { if($stmt = $this->con->prepare("SELECT `id` FROM `set_student_formative_remarks` WHERE `stud_id`=? AND `class`=? AND `semester`=? AND `subject`=? AND `exam_type`=?")) { $stmt->bind_param("sssss",$stud_id,$class,$semester,$subject,$exam_type); $stmt->bind_result($res_id); if($stmt->execute()) { if($stmt->fetch()) { return $res_id; } return false; } } } function get_formative_main_title_id($main_title) { if($stmt = $this->con->prepare("SELECT `id` FROM `remark_exam_type_title_master` WHERE `title`=?")) { $stmt->bind_param("s",$main_title); $stmt->bind_result($res_id); if($stmt->execute()) { if($stmt->fetch()) { return $res_id; } return false; } } } function save_formative_remark_main_title($main_title) { $date = date("Y-m-d"); $time = date("H:i:s t"); if($stmt = $this->con->prepare("INSERT INTO `remark_exam_type_title_master`(`title`, `date`, `time`) VALUES (?,?,?)")) { $stmt->bind_param("sss",$main_title,$date,$time); if($stmt->execute()) { return true; } return false; } } function delete_formative_remark_main_title($delete_id) { if($stmt = $this->con->prepare("DELETE FROM `remark_exam_type_title_master` WHERE `id`=?")) { $stmt->bind_param("i",$delete_id); if($stmt->execute()) { return true; } return False; } } function get_formative_remark_title($main_title,$remark,$remark_code) { if($stmt = $this->con->prepare("SELECT `id` FROM `formative_remark_master` WHERE `exam_type`=? AND `remark`=? AND `remark_code`=?")) { $stmt->bind_param("sss",$exam_type,$remark,$remark_code); $stmt->bind_result($res_id); if($stmt->execute()) { if($stmt->fetch()) { return $res_id; } return False; } } } function save_formative_remark_details($student,$class,$semester,$subject,$exam_type,$remark) { $date = date("Y-m-d"); $time = date("H:i:s t"); if($stmt = $this->con->prepare("INSERT INTO `set_student_formative_remarks`(`stud_id`, `class`, `semester`, `subject`, `exam_type`, `remark`, `date`, `time`) VALUES (?,?,?,?,?,?,?,?)")) { $stmt->bind_param("ssssssss",$student,$class,$semester,$subject,$exam_type,$remark,$date,$time); if($stmt->execute()) { return true; } return false; } } function save_formative_remark_details_data($main_title,$remark,$remark_code) { $date = date("Y-m-d"); $time = date("H:i:s t"); if($stmt = $this->con->prepare("INSERT INTO `formative_remark_master`(`exam_type`,`remark`,`remark_code`,`date`,`time`) VALUES (?,?,?,?,?)")) { $stmt->bind_param("sssss",$main_title,$remark,$remark_code,$date,$time); if($stmt->execute()) { return true; } return false; } } function delete_formative_remark_title_master($delete_id) { if($stmt = $this->con->prepare("DELETE FROM `formative_remark_master` WHERE `id`=?")) { $stmt->bind_param("i",$delete_id); if($stmt->execute()) { return true; } return False; } } function get_all_formative_remark_master_data() { if($stmt = $this->con->prepare("SELECT `id`, `title`, `date` FROM `remark_exam_type_title_master`")) { $stmt->bind_result($res_id,$res_main_title,$res_date); if($stmt->execute()) { $data = array(); $row_counter = 0; while($stmt->fetch()) { $data[$row_counter][0] = $res_id; $data[$row_counter][1] = $res_main_title; $data[$row_counter][2] = $res_date; $row_counter++; } if(!empty($data)) { return $data; } else { return false; } } } } function get_formative_remark_main_title_master_details($edit_id) { if($stmt = $this->con->prepare("SELECT `id`, `title`, `date` FROM `remark_exam_type_title_master` WHERE `id`=?")) { $stmt->bind_param("i",$edit_id); $stmt->bind_result($res_id,$res_main_title,$res_date); if($stmt->execute()) { $data = array(); $row_counter = 0; if($stmt->fetch()) { $data[0] = $res_id; $data[1] = $res_main_title; $data[2] = $res_date; $row_counter++; } if(!empty($data)) { return $data; } else { return false; } } } } function get_all_formative_remark_title_master_data() { if($stmt = $this->con->prepare("SELECT `id`, `exam_type`, `remark_code`,`remark`,`date` FROM `formative_remark_master`")) { $stmt->bind_result($res_id,$res_main_title,$res_remark_code,$res_remark,$res_date); if($stmt->execute()) { $data = array(); $row_counter = 0; while($stmt->fetch()) { $data[$row_counter][0] = $res_id; $data[$row_counter][1] = $res_main_title; $data[$row_counter][2] = $res_remark_code; $data[$row_counter][3] = $res_remark; $data[$row_counter][4] = $res_date; $row_counter++; } if(!empty($data)) { return $data; } else { return false; } } } } function get_formative_remarks_from_stud_id_exam_type($res_stud_id,$class,$semester,$subject,$exam_type,$exam_marks) { if($stmt = $this->con->prepare("SELECT `id`, `stud_id`, `class`, `semester`, `subject`, `exam_type`,`remark`,`date`, `time` FROM `set_student_formative_remarks` WHERE `stud_id`=? AND `class`=? AND `semester`=? AND `subject`=? AND `exam_type`=?")) { $stmt->bind_param("sssss",$res_stud_id,$class,$semester,$subject,$exam_type); $stmt->bind_result($res_id,$stud_id,$res_class,$res_semester,$res_subject,$res_exam_type,$res_exam_marks,$res_date,$res_time); if($stmt->execute()) { $data = array(); while($stmt->fetch()) { $data[0] = $res_id; $data[1] = $stud_id; $data[2] = $res_class; $data[3] = $res_semester; $data[4] = $res_subject; $data[5] = $res_exam_type; $data[6] = $res_exam_marks; $data[7] = $res_date; $data[8] = $res_time; } if(!empty($data)) { return $data; } else { return false; } } } } function delete_student_formative_marks_allocation_data($delete_id) { if($stmt = $this->con->prepare("DELETE FROM `set_student_formative_remarks` WHERE `id`=?")) { $stmt->bind_param("i",$delete_id); if($stmt->execute()) { return true; } return False; } } function get_all_student_formative_marks_allocation_data($class,$semester,$subject) { if($stmt = $this->con->prepare("SELECT `id`, `stud_id`, `class`, `semester`, `subject`, `formative_oral`, `formative_practical`, `formative_activity`, `formative_project`, `formative_open_book_test`, `formative_surprise_test`, `summative_written`, `summative_oral`, `date`, `time` FROM `set_student_formative_remarks` WHERE `class`=? AND `semester`=? AND `subject`=?")) { $stmt->bind_param("sss",$class,$semester,$subject); $stmt->bind_result($res_id,$stud_id,$res_class,$res_semester,$res_subject,$formative_oral,$formative_practical,$formative_activity,$formative_project,$formative_open_book,$formative_surprise,$summative_written,$summative_oral,$res_date,$res_time); if($stmt->execute()) { $data = array(); $row_counter = 0; while($stmt->fetch()) { $data[$row_counter][0] = $res_id; $data[$row_counter][1] = $res_class; $data[$row_counter][2] = $res_semester; $data[$row_counter][3] = $res_subject; $data[$row_counter][4] = $formative_oral; $data[$row_counter][5] = $formative_practical; $data[$row_counter][6] = $formative_activity; $data[$row_counter][7] = $formative_project; $data[$row_counter][8] = $formative_open_book; $data[$row_counter][9] = $formative_surprise; $data[$row_counter][10] = $summative_written; $data[$row_counter][11] = $summative_oral; $data[$row_counter][12] = $res_date; $data[$row_counter][13] = $res_time; $data[$row_counter][14] = $stud_id; $row_counter++; } if(!empty($data)) { return $data; } else { return false; } } } } function get_formative_remark_title_from_remark_id($res_exam_type,$res_remark) { if($stmt = $this->con->prepare("SELECT `remark` FROM `formative_remark_master` WHERE `exam_type`= ? AND `remark_code`=?")) { $stmt->bind_param("ss",$res_exam_type,$res_remark); $stmt->bind_result($res_id); if($stmt->execute()) { if($stmt->fetch()) { return $res_id; } return False; } } } function get_formative_examtype_remark_title($res_exam_type) { if($stmt = $this->con->prepare("SELECT `title` FROM `formative_remark_master` WHERE `id`=?")) { $stmt->bind_param("i",$res_exam_type); $stmt->bind_result($res_id); if($stmt->execute()) { if($stmt->fetch()) { return $res_id; } return False; } } } function get_student_formative_remark_data_from_stud_id_sem($res_stud_id,$class,$semester,$subject) { if($stmt = $this->con->prepare("SELECT `id`, `stud_id`, `class`, `semester`,`subject`,`exam_type`,`remark`, `date` FROM `set_student_formative_remarks` WHERE `stud_id`=? AND `class`=? AND `semester`=? AND `subject`=? ")) { $stmt->bind_param("ssss",$res_stud_id,$class,$semester,$subject); $stmt->bind_result($res_id,$res_stud_id,$res_class,$res_semester,$res_subject,$res_exam_type,$res_remark,$res_date); if($stmt->execute()) { $data = array(); $row_counter = 0; while($stmt->fetch()) { $data[$row_counter][0] = $res_id; $data[$row_counter][1] = $res_stud_id; $data[$row_counter][2] = $res_class; $data[$row_counter][3] = $res_semester; $data[$row_counter][4] = $res_subject; $data[$row_counter][5] = $res_exam_type; $data[$row_counter][6] = $res_remark; $data[$row_counter][7] = $res_date; $row_counter++; } if(!empty($data)) { return $data; } else { return false; } } } } function get_current_remark_final($res_stud_id,$class,$semester,$subject,$exam_type) { if($stmt = $this->con->prepare("SELECT `remark` FROM `set_student_formative_remarks` WHERE `stud_id`=? AND `class`=? AND `semester`=? AND `subject`=? AND `exam_type` = ?")) { $stmt->bind_param("sssss",$res_stud_id,$class,$semester,$subject,$exam_type); $stmt->bind_result($res_remark); if($stmt->execute()) { $data = array(); $row_counter = 0; if($stmt->fetch()) { return $res_remark; } return false; } } } function get_student_formative_marks_allocation_id_details($class,$semester,$subject,$exam_type,$stud_id) { if($stmt = $this->con->prepare("SELECT `id` FROM `set_student_formative_remarks` WHERE `class`=? AND `semester`=? AND `subject`=? AND `exam_type`=? AND`stud_id`=?")) { $stmt->bind_param("sssss",$class,$semester,$subject,$exam_type,$stud_id); $stmt->bind_result($res_id); if($stmt->execute()) { if($stmt->fetch()) { return $res_id; } return False; } } } function save_student_formative_marks_allocation_data_master($stud_id,$class,$semester,$subject,$exam_type,$exam_type_marks) { $date = date("Y-m-d"); $time = date("H:i:s t"); if($stmt = $this->con->prepare("INSERT INTO `set_student_formative_remarks`(`stud_id`, `class`,`semester`, `subject`, `exam_type`,`remark`,`date`, `time`) VALUES (?,?,?,?,?,?,?,?)")) { $stmt->bind_param("ssssssss",$stud_id,$class,$semester,$subject,$exam_type,$exam_type_marks,$date,$time); if($stmt->execute()) { return true; } return false; } } function update_student_formative_marks_allocation_details_master($stud_id,$class,$semester,$subject,$exam_type,$exam_type_marks,$db_id) { $date = date("Y-m-d"); $time = date("H:i:s t"); if($stmt = $this->con->prepare("UPDATE `set_student_formative_remarks` SET `stud_id`=?,`class`=?,`semester`=?,`subject`=?,`exam_type`=?,`remark`=?,`date`=?,`time`=? WHERE `id`=?")) { $stmt->bind_param("ssssssssi",$stud_id,$class,$semester,$subject,$exam_type,$exam_type_marks,$date,$time,$db_id); if($stmt->execute()) { return true; } return false; } } function get_all_student_formative_marks_allocation_data_master($class,$semester,$subject) { if($stmt = $this->con->prepare("SELECT `id`, `stud_id`, `class`, `semester`, `subject`, `exam_type`, `remark`, `date`, `time` FROM `set_student_formative_remarks` WHERE `class`=? AND `semester`=? AND `subject`=?")) { $stmt->bind_param("sss",$class,$semester,$subject); $stmt->bind_result($res_id,$stud_id,$res_class,$res_semester,$res_subject,$res_exam_type,$res_remark,$res_date,$res_time); if($stmt->execute()) { $data = array(); $row_counter = 0; while($stmt->fetch()) { $data[$row_counter][0] = $res_id; $data[$row_counter][1] = $res_class; $data[$row_counter][2] = $res_semester; $data[$row_counter][3] = $res_subject; $data[$row_counter][4] = $res_exam_type; $data[$row_counter][5] = $res_remark; $data[$row_counter][6] = $res_date; $data[$row_counter][7] = $res_time; $data[$row_counter][8] = $stud_id; $row_counter++; } if(!empty($data)) { return $data; } else { return false; } } } } function update_formative_remark_main_title_master_details($main_title,$edit_id) { $date = date("Y-m-d"); $time = date("H:i:s t"); if($stmt = $this->con->prepare("UPDATE `remark_exam_type_title_master` SET `title`=?,`date`=?,`time`=? WHERE `id`=?")) { $stmt->bind_param("sssi",$main_title,$date,$time,$edit_id); if($stmt->execute()) { return true; } return False; } } function get_formative_remark_title_id($main_title,$remark_code,$edit_id) { if($stmt = $this->con->prepare("SELECT `id` FROM `formative_remark_master` WHERE `main_title`=? AND `remark_code`=? AND `id`!=?")) { $stmt->bind_param("sssi",$main_title,$remark_code,$edit_id); $stmt->bind_result($res_id); if($stmt->execute()) { if($stmt->fetch()) { return $res_id; } return False; } } } function update_formative_remark_title_master_details($main_title,$remark,$remark_code,$edit_id) { $date = date("Y-m-d"); $time = date("H:i:s t"); if($stmt = $this->con->prepare("UPDATE `formative_remark_master` SET `exam_type`=?,`remark`=?,`remark_code`=?,`date`=?,`time`=? WHERE `id`=?")) { $stmt->bind_param("sssssi",$main_title,$remark,$remark_code,$date,$time,$edit_id); if($stmt->execute()) { return true; } return False; } } function get_formative_remark_title_master_details($edit_id) { if($stmt = $this->con->prepare("SELECT `id`, `exam_type`, `remark`, `remark_code`, `date` FROM `formative_remark_master` WHERE `id`=?")) { $stmt->bind_param("i",$edit_id); $stmt->bind_result($res_id,$res_main_title,$res_remark,$res_remark_code,$res_date); if($stmt->execute()) { $data = array(); $row_counter = 0; if($stmt->fetch()) { $data[0] = $res_id; $data[1] = $res_main_title; $data[2] = $res_remark; $data[3] = $res_remark_code; $data[4] = $res_date; $row_counter++; } if(!empty($data)) { return $data; } else { return false; } } } } function get_all_formative_remark_main_title_master_data() { if($stmt = $this->con->prepare("SELECT `id`, `title`, `date` FROM `remark_exam_type_title_master`")) { $stmt->bind_result($res_id,$res_main_title,$res_date); if($stmt->execute()) { $data = array(); $row_counter = 0; while($stmt->fetch()) { $data[$row_counter][0] = $res_id; $data[$row_counter][1] = $res_main_title; $data[$row_counter][2] = $res_date; $row_counter++; } if(!empty($data)) { return $data; } else { return false; } } } } function get_formative_remark_title_master_data($edit_id) { if($stmt = $this->con->prepare("SELECT `id`, `title`, `date` FROM `remark_exam_type_title_master` WHERE `id`=?")) { $stmt->bind_param("i",$edit_id); $stmt->bind_result($res_id,$res_main_title,$res_date); if($stmt->execute()) { $data = array(); $row_counter = 0; if($stmt->fetch()) { $data[0] = $res_id; $data[1] = $res_main_title; $data[2] = $res_date; $row_counter++; } if(!empty($data)) { return $data; } else { return false; } } } } function get_examtype_remark_title_master_details($edit_id) { if($stmt = $this->con->prepare("SELECT `id`, `title`, `date` FROM `remark_exam_type_title_master` WHERE `id`=?")) { $stmt->bind_param("i",$edit_id); $stmt->bind_result($res_id,$res_exam_title,$res_date); if($stmt->execute()) { $data = array(); $row_counter = 0; if($stmt->fetch()) { $data[0] = $res_id; $data[1] = $res_exam_title; $data[2] = $res_date; $row_counter++; } if(!empty($data)) { return $data; } else { return false; } } } } function get_all_examtype_title_master_data() { if($stmt = $this->con->prepare("SELECT `id`, `title`, `date` FROM `remark_exam_type_title_master`")) { $stmt->bind_result($res_id,$res_exam_title,$res_date); if($stmt->execute()) { $data = array(); $row_counter = 0; while($stmt->fetch()) { $data[$row_counter][0] = $res_id; $data[$row_counter][1] = $res_exam_title; $data[$row_counter][2] = $res_date; $row_counter++; } if(!empty($data)) { return $data; } else { return false; } } } } function get_all_stud_data_from_class($class,$medium,$division,$acd_year,$gr_no,$stud_name) { if($stmt = $this->con->prepare("SELECT `id`,`surname`, `student_name`, `father_name`,`class`,`medium`, `division`,`roll_no`,`g-r-no` FROM `student_details` WHERE `class`=? AND `medium`=? AND `division`=? AND `academic_year` LIKE '%".$acd_year."%' AND `g-r-no` LIKE '%".$gr_no."%' AND (`surname` LIKE '%".$stud_name."%' Or `student_name` LIKE '%".$stud_name."%' Or `father_name` LIKE '%".$stud_name."%')ORDER BY `roll_no` ASC ")) { $stmt->bind_param("sss",$class,$medium,$division); $stmt->bind_result($res_stud_id,$stud_surname,$stud_name,$stud_father_name,$res_class,$res_medium,$res_division,$roll_no,$gr_no); if($stmt->execute()) { $data = array(); $row_counter = 0; while($stmt->fetch()) { $data[$row_counter][0] = $res_stud_id; $data[$row_counter][1] = $stud_surname; $data[$row_counter][2] = $stud_name; $data[$row_counter][3] = $stud_father_name; $data[$row_counter][4] = $res_class; $data[$row_counter][5] = $res_medium; $data[$row_counter][6] = $res_division; $data[$row_counter][7] = $roll_no; $data[$row_counter][8] = $gr_no; $row_counter++; } if(!empty($data)) { return $data; } else { return false; } } } } function get_all_student_date_birth_info1() { if($stmt = $this->con->prepare("SELECT `id`,`birth_date`,`academic_year`,`no_of_pupil`,`admission_date`,`class` FROM `student_details` WHERE `id`<=5000")) { $stmt->bind_result($res_id,$res_birth_date,$res_acd_year,$res_no_of_pupil,$res_admission_date,$res_class); if($stmt->execute()) { $data = array(); $row_counter=0; while($stmt->fetch()) { $data[$row_counter][0] = $res_id; $data[$row_counter][1] = $res_birth_date; $data[$row_counter][2] = $res_acd_year; $data[$row_counter][3] = $res_no_of_pupil; $data[$row_counter][4] = $res_admission_date; $data[$row_counter][5] = $res_class; $row_counter++; } if(!empty($data)) { return $data; } else { return false; } } } } //11-01-2020 function get_all_stud_attendance_from_class_medium_division($class,$medium,$division,$acd_year) { if($stmt = $this->con->prepare("SELECT `id`, `surname`, `student_name`, `father_name`, `student_image`,`roll_no`,`no_of_pupil`,`class`, `medium`, `division` FROM `student_details` WHERE `class`=? AND `medium`=? AND `division`=? AND `academic_year`=? ORDER BY `roll_no` ASC ")) { $stmt->bind_param("ssss",$class,$medium,$division,$acd_year); $stmt->bind_result($res_stud_id,$stud_surname,$stud_name,$stud_father_name,$stud_img,$roll_no,$no_of_pupil,$class,$medium,$division); if($stmt->execute()) { $data = array(); $row_counter = 0; while($stmt->fetch()) { $data[$row_counter][0] = $res_stud_id; $data[$row_counter][1] = $stud_surname; $data[$row_counter][2] = $stud_name; $data[$row_counter][3] = $stud_father_name; $data[$row_counter][4] = $stud_img; $data[$row_counter][5] = $roll_no; $data[$row_counter][6] = $no_of_pupil; $data[$row_counter][7] = $class; $data[$row_counter][8] = $medium; $data[$row_counter][9] = $division; $row_counter++; } if(!empty($data)) { return $data; } else { return false; } } } } function get_student_attendances_id($gre_no,$stud_id) { $date = date("Y-m-d"); if($stmt = $this->con->prepare("SELECT `id` FROM `student_attendances` WHERE `gre_no`=? AND `student_id`=? AND `date`=?")) { $stmt->bind_param("sss",$gre_no,$stud_id,$date); $stmt->bind_result($res_id); if($stmt->execute()) { if($stmt->fetch()) { return $res_id; } return false; } } } function save_student_attendances($gre_no,$student_id,$class_id,$medium,$division_id,$attendances,$acd_year) { $date = date("Y-m-d"); $time = date("H:i:s t"); if($stmt = $this->con->prepare("INSERT INTO `student_attendances`(`gre_no`, `student_id`, `class_id`, `medium`, `division_id`, `attendance`, `date`, `time`,`acd_year`) VALUES (?,?,?,?,?,?,?,?,?)")) { $stmt->bind_param("sssssssss",$gre_no,$student_id,$class_id,$medium,$division_id,$attendances,$date,$time,$acd_year); if($stmt->execute()) { return true; } { return $stmt->error; } } } function get_student_attendances_records($from_date,$to_date,$class,$medium,$division,$gr_no,$stud_name,$attendances,$acd_year) { $query = ""; if($attendances=="All") { $query="AND `attendance` LIKE '%%'"; } else { $query="AND `attendance`='".$attendances."'"; } if($stmt = $this->con->prepare("SELECT `id`, `gre_no`, `student_id`, `class_id`, `medium`, `division_id`, `attendance`, `date`, `acd_year` FROM `student_attendances` WHERE (`date` BETWEEN ? AND ?) AND `class_id`=? AND `medium` LIKE '%".$medium."%' AND `division_id` LIKE '%".$division."%' AND `gre_no` LIKE '%".$gr_no."%' AND `student_id` LIKE '%".$stud_name."%' AND `acd_year` LIKE '%".$acd_year."%'" .$query)) { $stmt->bind_param("sss",$from_date,$to_date,$class); $stmt->bind_result($res_id,$res_gre_no,$res_student_id,$res_class_id,$res_medium,$res_division_id,$res_attendances,$res_date,$res_acd_year); if($stmt->execute()) { $data = array(); $row_counter = 0; while($stmt->fetch()) { $data[$row_counter][0] = $res_id; $data[$row_counter][1] = $res_gre_no; $data[$row_counter][2] = $res_student_id; $data[$row_counter][3] = $res_class_id; $data[$row_counter][4] = $res_medium; $data[$row_counter][5] = $res_division_id; $data[$row_counter][6] = $res_attendances; $data[$row_counter][7] = $res_date; $data[$row_counter][8] = $res_acd_year; $row_counter++; } if(!empty($data)) { return $data; } else { return false; } } } } function delete_student_attendances($del_id) { if($stmt = $this->con->prepare("DELETE FROM `student_attendances` WHERE `id` = ?")) { $stmt->bind_param("i",$del_id); if($stmt->execute()) { return true; } return False; } } function get_student_attendance_details_by_id($edit_id) { if($stmt = $this->con->prepare("SELECT `id`, `gre_no`, `student_id`, `class_id`, `medium`, `division_id`, `attendance`, `date`, `acd_year` FROM `student_attendances` WHERE `id`=?")) { $stmt->bind_param("i",$edit_id); $stmt->bind_result($res_id,$res_gre_no,$res_student_id,$res_class_id,$res_medium,$res_division_id,$res_attendances,$res_date,$res_acd_year); if($stmt->execute()) { $data = array(); $row_counter = 0; if($stmt->fetch()) { $data[0] = $res_id; $data[1] = $res_gre_no; $data[2] = $res_student_id; $data[3] = $res_class_id; $data[4] = $res_medium; $data[5] = $res_division_id; $data[6] = $res_attendances; $data[7] = $res_date; $data[8] = $res_acd_year; $row_counter++; } if(!empty($data)) { return $data; } else { return false; } } } } function update_student_attendances($attendances,$edit_id) { $date = date("Y-m-d"); $time = date("H:i:s t"); if($stmt = $this->con->prepare("UPDATE `student_attendances` SET `attendance`=?,`date`=?,`time`=? WHERE `id`=?")) { $stmt->bind_param("sssi",$attendances,$date,$time,$edit_id); if($stmt->execute()) { return true; } return false; } } function get_division_title($division_id) { if($stmt = $this->con->prepare("SELECT `division` FROM `division_master` WHERE `id` = ?")) { $stmt->bind_param("i",$division_id); $stmt->bind_result($res_division); if($stmt->execute()) { if($stmt->fetch()) { return $res_division; } return False; } } } function get_student_full_name_by_id($stud_id) { if($stmt = $this->con->prepare("SELECT `id`, `class`, `subject`, `tutorial1`, `unit1`, `semester1`, `tutorial2`, `unit2`, `oral`, `written`, `date`, `time` FROM `eleventh_std_marking_scheme` WHERE `class`=? AND `subject`=?")) { $stmt->bind_param("ss",$stud_class,$res_subject); $stmt->bind_result($res_id,$res_class,$res_subject,$tutorial1,$unit1,$semester1,$tutorial2,$unit2,$oral,$written,$res_date,$res_time); if($stmt->execute()) { $data = array(); $counter = 0; if($stmt->fetch()) { $data[0] = $res_id; $data[1] = $res_class; $data[2] = $res_subject; $data[3] = $tutorial1; $data[4] = $unit1; $data[5] = $semester1; $data[6] = $tutorial2; $data[7] = $unit2; $data[8] = $oral; $data[9] = $written; $data[10] = $res_date; $data[11] = $res_time; return $data; } else { return false; } } } } //16-1-2020 function get_total_presenty_of_student_semester1($res_no_of_pupil,$res_class_id,$res_medium,$res_division_id,$sem1_year,$acd_year) { $from_date=$sem1_year."-06-01"; $to_date=$sem1_year."-10-31"; if($stmt = $this->con->prepare("SELECT COUNT(`id`) FROM `student_attendances` WHERE `attendance`='Present' AND `gre_no`=? AND `class_id`=? AND `medium`=? AND `division_id`=? AND `acd_year`=? AND `date` BETWEEN ? AND ?")) { $stmt->bind_param("sssssss",$res_no_of_pupil,$res_class_id,$res_medium,$res_division_id,$acd_year,$from_date,$to_date); $stmt->bind_result($res_count); if($stmt->execute()) { if($stmt->fetch()) { return $res_count; } return False; } } } function get_total_presenty_of_student_semester2($res_no_of_pupil,$res_class_id,$res_medium,$res_division_id,$sem1_year,$acd_year,$sem2_year) { $from_date=$sem1_year."-11-01"; $to_date=$sem2_year."-04-30"; if($stmt = $this->con->prepare("SELECT COUNT(`id`) FROM `student_attendances` WHERE `attendance`='Present' AND `gre_no`=? AND `class_id`=? AND `medium`=? AND `division_id`=? AND `acd_year`=? AND `date` BETWEEN ? AND ?")) { $stmt->bind_param("sssssss",$res_no_of_pupil,$res_class_id,$res_medium,$res_division_id,$acd_year,$from_date,$to_date); $stmt->bind_result($res_count); if($stmt->execute()) { if($stmt->fetch()) { return $res_count; } return False; } } } function get_total_presenty_of_student_annual($res_no_of_pupil,$res_class_id,$res_medium,$res_division_id,$sem1_year,$acd_year,$sem2_year) { $from_date=$sem1_year."-06-01"; $to_date=$sem2_year."-04-30"; if($stmt = $this->con->prepare("SELECT COUNT(`id`) FROM `student_attendances` WHERE `attendance`='Present' AND `gre_no`=? AND `class_id`=? AND `medium`=? AND `division_id`=? AND `acd_year`=? AND `date` BETWEEN ? AND ?")) { $stmt->bind_param("sssssss",$res_no_of_pupil,$res_class_id,$res_medium,$res_division_id,$acd_year,$from_date,$to_date); $stmt->bind_result($res_count); if($stmt->execute()) { if($stmt->fetch()) { return $res_count; } return False; } } } function get_student_full_name_from_gr_no($res_gre_no) { if($stmt = $this->con->prepare("SELECT `surname`, `student_name`, `father_name` FROM `student_details` WHERE `no_of_pupil`=?")) { $stmt->bind_param("s",$res_gre_no); $stmt->bind_result($surname,$student_name,$father_name); if($stmt->execute()) { $data = array(); $counter = 0; if($stmt->fetch()) { $data[0] = $surname; $data[1] = $student_name; $data[2] = $father_name; return $data; } else { return false; } } } } function get_total_presenty_of_student_month_wise($student_id,$acd_year,$from_date,$to_date) { if($stmt = $this->con->prepare("SELECT COUNT(`id`) FROM `student_attendances` WHERE `attendance`='Present' AND `student_id`=? AND `acd_year`=? AND `date` BETWEEN ? AND ?")) { $stmt->bind_param("ssss",$student_id,$acd_year,$from_date,$to_date); $stmt->bind_result($res_count); if($stmt->execute()) { if($stmt->fetch()) { return $res_count; } return False; } } } function get_student_record_from_class_and_division_and_year($stud_inserted_class,$stud_inserted_division,$acd_year,$year) { if($stmt = $this->con->prepare("SELECT `id`, `class`, `medium`, `division`, `roll_no`, `surname`, `student_name`, `father_name`, `mother_name`, `stud_cont_no`, `father_cont_no`, `address`, `student_image` FROM `student_details` WHERE `class`=? AND `division`=? AND `academic_year`=? AND `medium`=? ")) { $stmt->bind_param("ssss",$stud_inserted_class,$stud_inserted_division,$acd_year,$year); $stmt->bind_result($res_id,$res_class,$res_medium,$res_division,$res_roll_no,$res_surname,$res_stud_name,$res_father_name,$res_mother_name,$res_stud_cont,$res_father_cont,$res_address,$res_student_image); if($stmt->execute()) { $data = array(); $row_counter = 0; while($stmt->fetch()) { $data[$row_counter][0] = $res_id; $data[$row_counter][1] = $res_class; $data[$row_counter][2] = $res_medium; $data[$row_counter][3] = $res_division; $data[$row_counter][4] = $res_roll_no; $data[$row_counter][5] = $res_surname; $data[$row_counter][6] = $res_stud_name; $data[$row_counter][7] = $res_father_name; $data[$row_counter][8] = $res_mother_name; $data[$row_counter][9] = $res_stud_cont; $data[$row_counter][10] = $res_father_cont; $data[$row_counter][11] = $res_address; $data[$row_counter][12] = $res_student_image; $row_counter++; } if(!empty($data)) { return $data; } else { return false; } } } } //27-2-2020 function get_student_exist_id($gr_no) { if($stmt = $this->con->prepare("SELECT `id` FROM `student_details` WHERE `no_of_pupil`=? ")) { $stmt->bind_param("s",$gr_no); $stmt->bind_result($res_id); if($stmt->execute()) { if($stmt->fetch()) { return $res_id; } return False; } } } function save_student_detail_sample_excel($roll_no,$no_of_pupil,$enroll_no,$surname,$stud_name,$father_name,$department,$course,$divisiion,$acd_year) { if($stmt = $this->con->prepare("INSERT INTO `student_details`(`roll_no`, `no_of_pupil`, `stud_id_for_lc`, `surname`, `student_name`, `father_name`, `class`, `medium`, `division`, `academic_year`) VALUES (?,?,?,?,?,?,?,?,?,?)")) { $stmt->bind_param("isssssssss",$roll_no,$no_of_pupil,$enroll_no,$surname,$stud_name,$father_name,$department,$course,$divisiion,$acd_year); if($stmt->execute()) { return true;; } else { return $stmt->error; } } } //3-3-2019 new function save_certificate_history($print_lc,$print_type,$certificate_name) { $date = date("Y-m-d"); $time = date("H:i:s t"); if($stmt = $this->con->prepare("INSERT INTO `certificate_history`(`student_id`, `type`, `certificate_name`, `date`, `time`) VALUES (?,?,?,?,?)")) { $stmt->bind_param("sssss",$print_lc,$print_type,$certificate_name,$date,$time); if($stmt->execute()) { return true;; } else { return $stmt->error; } } } function get_certificate_count($type,$res_id) { if($stmt = $this->con->prepare(" SELECT COUNT(`id`) FROM `certificate_history` WHERE `student_id`=? AND `type`=?")) { $stmt->bind_param("ss",$res_id,$type); $stmt->bind_result($res_count); if($stmt->execute()) { if($stmt->fetch()) { return $res_count; } return False; } } } //ASH (3-3-2020) function save_books_records($accession_no,$author,$title,$edition,$place_publisher,$year,$pages,$volume,$book_date,$type,$acd_year,$barcode_no) { $date = date("Y-m-d"); $time = date("H:i:s t"); if($stmt = $this->con->prepare("INSERT INTO `add_books`(`accession_no`, `author`, `title`, `edition`, `place_publisher`, `year`, `page`, `volume`, `book_date`,`type`, `date`, `time`,`acd_year`,`barcode_no`) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?)")) { $stmt->bind_param("ssssssssssssss",$accession_no,$author,$title,$edition,$place_publisher,$year,$pages,$volume,$book_date,$type,$date,$time,$acd_year,$barcode_no); if($stmt->execute()) { return true;; } else { return $stmt->error; } } } function get_books_record($acd_year) { if($stmt = $this->con->prepare("SELECT `id`, `accession_no`, `author`, `title`, `edition`, `place_publisher`, `year`, `page`, `volume`, `book_date`,`type`, `date`, `time`,`barcode_no` FROM `add_books` WHERE `acd_year`=?")) { $stmt->bind_param("s",$acd_year); $stmt->bind_result($res_id,$accession_no,$author,$title,$edition,$place_publisher,$year,$pages,$volume,$book_date,$type,$date,$time,$barcode_no); if($stmt->execute()) { $data = array(); $row_counter = 0; while($stmt->fetch()) { $data[$row_counter][0] = $res_id; $data[$row_counter][1] = $accession_no; $data[$row_counter][2] = $author; $data[$row_counter][3] = $title; $data[$row_counter][4] = $edition; $data[$row_counter][5] = $place_publisher; $data[$row_counter][6] = $year; $data[$row_counter][7] = $pages; $data[$row_counter][8] = $volume; $data[$row_counter][9] = $book_date; $data[$row_counter][10] = $type; $data[$row_counter][11] = $date; $data[$row_counter][12] = $time; $data[$row_counter][13] = $barcode_no; $row_counter++; } if(!empty($data)) { return $data; } else { return false; } } } } function delete_book_record($del_id) { if($stmt = $this->con->prepare("DELETE FROM `add_books` WHERE `id` = ?")) { $stmt->bind_param("i",$del_id); if($stmt->execute()) { return true; } return False; } } function get_all_books_info_by_id($edit_id,$acd_year) { if($stmt = $this->con->prepare("SELECT `id`, `accession_no`, `author`, `title`, `edition`, `place_publisher`, `year`, `page`, `volume`, `book_date`, `type`, `date`, `time`,`barcode_no` FROM `add_books` WHERE `id`=? AND `acd_year`=?")) { $stmt->bind_param("is",$edit_id,$acd_year); $stmt->bind_result($res_id,$accession_no,$author,$title,$edition,$place_publisher,$year,$pages,$volume,$book_date,$type,$date,$time,$barcode_no); if($stmt->execute()) { $data = array(); $row_counter = 0; if($stmt->fetch()) { $data[0] = $res_id; $data[1] = $accession_no; $data[2] = $author; $data[3] = $title; $data[4] = $edition; $data[5] = $place_publisher; $data[6] = $year; $data[7] = $pages; $data[8] = $volume; $data[9] = $book_date; $data[10] = $type; $data[11] = $date; $data[12] = $time; $data[13] = $barcode_no; return $data; } } } } function update_books_records($accession_no,$author,$title,$edition,$place_publisher,$year,$pages,$volume,$book_date,$type,$barcode_no,$edit_id) { $date = date("Y-m-d"); $time = date("H:i:s t"); if($stmt = $this->con->prepare("UPDATE `add_books` SET `accession_no`=?,`author`=?,`title`=?,`edition`=?,`place_publisher`=?,`year`=?,`page`=?,`volume`=?,`book_date`=?,`type`=?,`date`=?,`time`=?,`barcode_no`=? WHERE `id`=?")) { $stmt->bind_param("sssssssssssssi",$accession_no,$author,$title,$edition,$place_publisher,$year,$pages,$volume,$book_date,$type,$date,$time,$barcode_no,$edit_id); if($stmt->execute()) { return true; } return false; } } function save_books_quantity_details($add_volume,$source,$bill_no,$brought_date,$cost,$call_class_no,$call_book_no,$acd_year,$edit_id) { $date = date("Y-m-d"); $time = date("H:i:s t"); if($stmt = $this->con->prepare("INSERT INTO `add_books_quantity_details`(`add_volume`, `source`, `bill_no`,`brought_date`, `cost`,`call_class_no`, `call_book_no`, `date`, `time`,`acd_year`,`book_id`) VALUES (?,?,?,?,?,?,?,?,?,?,?)")) { $stmt->bind_param("sssssssssss",$add_volume,$source,$bill_no,$brought_date,$cost,$call_class_no,$call_book_no,$date,$time,$acd_year,$edit_id); if($stmt->execute()) { return true;; } else { return $stmt->error; } } } function update_volume_details_in_master($add_volume,$edit_id) { if($stmt = $this->con->prepare("UPDATE `add_books` SET `volume`=`volume`+".$add_volume." WHERE `id`=?")) { $stmt->bind_param("i",$edit_id); if($stmt->execute()) { return true; } return false; } } function get_books_details($acd_year) { if($stmt = $this->con->prepare("SELECT `id`, `add_volume`, `source`, `bill_no`, `brought_date`, `cost`, `call_class_no`, `call_book_no`, `date`, `time`, `acd_year`, `book_id` FROM `add_books_quantity_details` WHERE `acd_year`=?")) { $stmt->bind_param("s",$acd_year); $stmt->bind_result($res_id,$add_volume,$source,$bill_no,$brought_date,$cost,$call_class_no,$call_book_no,$date,$time,$acd_year,$book_id); if($stmt->execute()) { $data = array(); $row_counter = 0; while($stmt->fetch()) { $data[$row_counter][0] = $res_id; $data[$row_counter][1] = $add_volume; $data[$row_counter][2] = $source; $data[$row_counter][3] = $bill_no; $data[$row_counter][4] = $brought_date; $data[$row_counter][5] = $cost; $data[$row_counter][6] = $call_class_no; $data[$row_counter][7] = $call_book_no; $data[$row_counter][8] = $date; $data[$row_counter][9] = $time; $data[$row_counter][10] = $acd_year; $data[$row_counter][11] = $book_id; $row_counter++; } if(!empty($data)) { return $data; } else { return false; } } } } function delete_book_details($del_id) { if($stmt = $this->con->prepare("DELETE FROM `add_books_quantity_details` WHERE `id` = ?")) { $stmt->bind_param("i",$del_id); if($stmt->execute()) { return true; } return False; } } function get_all_books_details_by_id($edit_id,$book_id,$acd_year) { if($stmt = $this->con->prepare("SELECT `id`, `add_volume`, `source`, `bill_no`, `brought_date`, `cost`, `call_class_no`, `call_book_no`, `date`, `time`, `acd_year`, `book_id` FROM `add_books_quantity_details` WHERE `id`=? AND `book_id`=? AND `acd_year`=?")) { $stmt->bind_param("iss",$edit_id,$book_id,$acd_year); $stmt->bind_result($res_id,$add_volume,$source,$bill_no,$brought_date,$cost,$call_class_no,$call_book_no,$date,$time,$acd_year,$book_id); if($stmt->execute()) { $data = array(); $row_counter = 0; if($stmt->fetch()) { $data[0] = $res_id; $data[1] = $add_volume; $data[2] = $source; $data[3] = $bill_no; $data[4] = $brought_date; $data[5] = $cost; $data[6] = $call_class_no; $data[7] = $call_book_no; $data[8] = $date; $data[9] = $time; $data[10] = $acd_year; $data[11] = $book_id; return $data; } } } } function update_books_quantity_details($add_volume,$source,$bill_no,$brought_date,$cost,$call_class_no,$call_book_no,$edit_id,$book_id,$acd_year) { $date = date("Y-m-d"); $time = date("H:i:s t"); if($stmt = $this->con->prepare("UPDATE `add_books_quantity_details` SET `add_volume`=?,`source`=?,`bill_no`=?,`brought_date`=?,`cost`=?,`call_class_no`=?,`call_book_no`=?,`date`=?,`time`=? WHERE `id`=? AND `book_id`=? AND `acd_year`=?")) { $stmt->bind_param("sssssssssiss",$add_volume,$source,$bill_no,$brought_date,$cost,$call_class_no,$call_book_no,$date,$time,$edit_id,$book_id,$acd_year); if($stmt->execute()) { return true; } return false; } } function get_student_details_by_grno($gr_barcode_no) { if($stmt = $this->con->prepare("SELECT `id`, `class`, `medium`, `division`, `roll_no`, `surname`, `student_name`, `father_name`, `student_image`,`stud_cont_no` FROM `student_details` WHERE `no_of_pupil`=?")) { $stmt->bind_param("s",$gr_barcode_no); $stmt->bind_result($res_id,$class,$medium,$division,$roll_no,$surname,$student_name,$father_name,$student_image,$student_contact_no); if($stmt->execute()) { $data = array(); $row_counter = 0; if($stmt->fetch()) { $data[0] = $res_id; $data[1] = $class; $data[2] = $medium; $data[3] = $division; $data[4] = $roll_no; $data[5] = $surname; $data[6] = $student_name; $data[7] = $father_name; $data[8] = $student_image; $data[9] = $student_contact_no; return $data; } } } } function get_book_details_by_grno($book_barcode_no) { if($stmt = $this->con->prepare("SELECT `id`, `accession_no`, `author`, `title`, `edition` FROM `add_books` WHERE `barcode_no`=?")) { $stmt->bind_param("s",$book_barcode_no); $stmt->bind_result($res_id,$accession_no,$author,$title,$edition); if($stmt->execute()) { $data = array(); $row_counter = 0; if($stmt->fetch()) { $data[0] = $res_id; $data[1] = $accession_no; $data[2] = $author; $data[3] = $title; $data[4] = $edition; return $data; } } } } function save_issued_book_details($res_stud_id,$res_book_id,$return_date,$status,$acd_year) { $date = date("Y-m-d"); $time = date("H:i:s t"); if($stmt = $this->con->prepare("INSERT INTO `issue_book`(`student_id`, `book_id`, `return_date`, `status`, `date`, `time`,`acd_year`) VALUES (?,?,?,?,?,?,?)")) { $stmt->bind_param("sssssss",$res_stud_id,$res_book_id,$return_date,$status,$date,$time,$acd_year); if($stmt->execute()) { return true;; } else { return $stmt->error; } } } function get_all_issued_books_details($acd_year) { if($stmt = $this->con->prepare("SELECT `id`, `student_id`, `book_id`, `return_date`, `status`, `date`, `time`, `acd_year` FROM `issue_book` WHERE `acd_year`=? ORDER BY `id` DESC")) { $stmt->bind_param("s",$acd_year); $stmt->bind_result($res_id,$res_stud_id,$res_book_id,$return_date,$status,$date,$time,$res_acd_year); if($stmt->execute()) { $data = array(); $row_counter = 0; while($stmt->fetch()) { $data[$row_counter][0] = $res_id; $data[$row_counter][1] = $res_stud_id; $data[$row_counter][2] = $res_book_id; $data[$row_counter][3] = $return_date; $data[$row_counter][4] = $status; $data[$row_counter][5] = $date; $data[$row_counter][6] = $time; $data[$row_counter][7] = $res_acd_year; $row_counter++; } if(!empty($data)) { return $data; } else { return false; } } } } function get_all_student_info_by_id($res_stud_id,$res_acd_year) { if($stmt = $this->con->prepare("SELECT `id`, `class`, `medium`, `division`, `roll_no`, `surname`, `student_name`, `father_name`, `stud_cont_no`, `student_image` FROM `student_details` WHERE `id`=? AND `academic_year`=?")) { $stmt->bind_param("is",$res_stud_id,$res_acd_year); $stmt->bind_result($res_id,$class,$medium,$division,$roll_no,$surname,$student_name,$father_name,$stud_contact_no,$student_image); if($stmt->execute()) { $data = array(); $row_counter = 0; if($stmt->fetch()) { $data[0] = $res_id; $data[1] = $class; $data[2] = $medium; $data[3] = $division; $data[4] = $roll_no; $data[5] = $surname; $data[6] = $student_name; $data[7] = $father_name; $data[8] = $stud_contact_no; $data[9] = $student_image; return $data; } } } } function update_returned_status($st_returned) { if($stmt_select = $this->con->prepare("UPDATE `issue_book` SET `status`='Returned' WHERE `id`=?")) { $stmt_select->bind_param("i",$st_returned); if($stmt_select->execute()) { return true; } return false; } } function update_issued_status($st_issued) { if($stmt_select = $this->con->prepare("UPDATE `issue_book` SET `status`='Issued' WHERE `id`=?")) { $stmt_select->bind_param("i",$st_issued); if($stmt_select->execute()) { return true; } return false; } } function get_all_returned_books_details($from_date,$to_date,$acd_year) { if($stmt = $this->con->prepare("SELECT `id`, `student_id`, `book_id`, `return_date`, `status`, `date`, `time`, `acd_year` FROM `issue_book` WHERE `status`='Returned' AND (`date` BETWEEN ? AND ?) AND `acd_year`=? ORDER BY `id` DESC")) { $stmt->bind_param("sss",$from_date,$to_date,$acd_year); $stmt->bind_result($res_id,$res_stud_id,$res_book_id,$return_date,$status,$date,$time,$res_acd_year); if($stmt->execute()) { $data = array(); $row_counter = 0; while($stmt->fetch()) { $data[$row_counter][0] = $res_id; $data[$row_counter][1] = $res_stud_id; $data[$row_counter][2] = $res_book_id; $data[$row_counter][3] = $return_date; $data[$row_counter][4] = $status; $data[$row_counter][5] = $date; $data[$row_counter][6] = $time; $data[$row_counter][7] = $res_acd_year; $row_counter++; } if(!empty($data)) { return $data; } else { return false; } } } } function delete_book_issued_details($del_id) { if($stmt = $this->con->prepare("DELETE FROM `issue_book` WHERE `id` = ?")) { $stmt->bind_param("i",$del_id); if($stmt->execute()) { return true; } return False; } } function get_all_books_issued_by_id($acd_year,$edit_id) { echo $acd_year,$edit_id; if($stmt = $this->con->prepare("SELECT `id`, `student_id`, `book_id`, `return_date`, `status`, `date`, `time` FROM `issue_book` WHERE `acd_year`=? AND `id`=?")) { $stmt->bind_param("si",$acd_year,$edit_id); $stmt->bind_result($res_id,$res_stud_id,$res_book_id,$return_date,$res_status,$date,$time); if($stmt->execute()) { $data = array(); $row_counter = 0; if($stmt->fetch()) { $data[0] = $res_id; $data[1] = $res_stud_id; $data[2] = $res_book_id; $data[3] = $return_date; $data[4] = $res_status; $data[5] = $date; $data[6] = $time; return $data; } } } } function get_stud_gr_no_by_id($res_stud_id) { if($stmt = $this->con->prepare("SELECT `g-r-no` FROM `student_details` WHERE `id`=?")) { $stmt->bind_param("i",$res_stud_id); $stmt->bind_result($res_gr_no); if($stmt->execute()) { if($stmt->fetch()) { return $res_gr_no; } return False; } } } function get_book_barcode_no_by_id($res_book_id) { if($stmt = $this->con->prepare("SELECT `barcode_no` FROM `add_books` WHERE `id`=?")) { $stmt->bind_param("i",$res_book_id); $stmt->bind_result($res_barcode_no); if($stmt->execute()) { if($stmt->fetch()) { return $res_barcode_no; } return False; } } } function update_issued_book_date($return_date,$acd_year,$edit_id) { if($stmt_select = $this->con->prepare("UPDATE `issue_book` SET `return_date`=? WHERE `acd_year`=? AND `id`=?")) { $stmt_select->bind_param("ssi",$return_date,$acd_year,$edit_id); if($stmt_select->execute()) { return true; } return false; } } }//End 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