Şuanki Dizin: /home/wwwdreamtechnolo/public_html/panel.atsevairag.com/lib/class/ |
Şuanki Dosya : /home/wwwdreamtechnolo/public_html/panel.atsevairag.com/lib/class/functions-old.php |
<?php session_start(); class functions { private $con; function __construct() { $this->con = new mysqli("localhost","atsevair_admin","atoz 7smartap-ps**","atsevair_ag"); //$this->con = new mysqli("localhost","root","","atsevair_ag"); mysqli_set_charset($this->con, 'utf8'); } //function for insert contact_data function set_contact_data($name,$email_id,$contact_no,$message) { $date_time = date("Y-m-d H:i:s"); if($stmt_set_contact_data = $this->con->prepare("insert into `contact_tbl`(`date_time`,`name`,`email_id`,`contact_no`,`message`) Values(?,?,?,?,?)")) { $stmt_set_contact_data->bind_param("sssis",$date_time,$name,$email_id,$contact_no,$message); if($stmt_set_contact_data->execute()) { return true; } return false; } } function set_feedback_data($name,$email_id,$contact_no,$message) { $date_time = date("Y-m-d H:i:s"); if($stmt_set_contact_data = $this->con->prepare("insert into `feedback`(`date_time`,`name`,`email_id`,`contact_no`,`message`) Values(?,?,?,?,?)")) { $stmt_set_contact_data->bind_param("sssis",$date_time,$name,$email_id,$contact_no,$message); if($stmt_set_contact_data->execute()) { return true; } return false; } } function insert_new_record($standard,$madhyam_and_fees,$sirname,$name,$father_name,$mother_name,$contact_number,$principal_details,$school_details,$jilha,$dd_number,$center_name,$result_school_name,$last_seat_number,$student_exam_seat_number,$center_id,$student_dob,$parents_address,$pincode,$full_name) { $date = date("Y-m-d"); $time = date("H:i:s A"); if($stmt_insert = $this->con->prepare("INSERT INTO `registrations`(`standard`, `madhyam_and_fees`, `sirname`, `name`, `father_name`, `mother_name`, `contact_number`, `principal_details`, `school_details`, `jilha`, `dd_number`, `date`, `time`,`center_name`,`school_id`,`exam_seat_number`,`standardwise_seat_number`,`center_id`,`date_of_birth`,`address`,`pincode`,`full_name`) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)")) { $stmt_insert->bind_param("ssssssssssssssssisssss",$standard,$madhyam_and_fees,$sirname,$name,$father_name,$mother_name,$contact_number,$principal_details,$result_school_name,$jilha,$dd_number,$date,$time,$center_name,$school_details,$student_exam_seat_number,$last_seat_number,$center_id,$student_dob,$parents_address,$pincode,$full_name); if($stmt_insert->execute()) { return $stmt_insert->insert_id; } return false; } } function get_user_password($email) { if($stmt_select = $this->con->prepare("SELECT `password` from `admin_panel` where `email_id` = ?")) { $stmt_select->bind_param("s",$email); $stmt_select->bind_result($result_password); if($stmt_select->execute()) { if($stmt_select->fetch()) { return $result_password; } } return false; } } function get_user_password_for_members($userid) { if($stmt_select = $this->con->prepare("SELECT `password` from `memebrs` where `user_id` = ?")) { $stmt_select->bind_param("s",$userid); $stmt_select->bind_result($result_password); if($stmt_select->execute()) { if($stmt_select->fetch()) { return $result_password; } } return false; } } function add_new_centre($centre_name,$address,$contact_number,$fax_no,$email_id,$jilha,$contact_person_name) { $date = date("Y-m-d"); $time = date("H:i:s A"); if($stmt_insert = $this->con->prepare("INSERT INTO `centers`(`center_name`, `address`, `contact_no`, `fax_number`, `email_id`, `jilha`, `date`, `time`, `contact_person_name`) VALUES (?,?,?,?,?,?,?,?,?)")) { $stmt_insert->bind_param("sssssssss",$centre_name,$address,$contact_number,$fax_no,$email_id,$jilha,$date,$time,$contact_person_name); if($stmt_insert->execute()) { return true; } return false; } } function add_new_school($centre_name,$address,$contact_number,$fax_no,$email_id,$jilha,$contact_person_name) { $date = date("Y-m-d"); $time = date("H:i:s A"); if($stmt_insert = $this->con->prepare("INSERT INTO `schools`(`school_name`, `address`, `contact_number`, `fax_number`, `email_id`, `jilha`, `date`, `time`, `contact_person_name`) VALUES (?,?,?,?,?,?,?,?,?)")) { $stmt_insert->bind_param("sssssssss",$centre_name,$address,$contact_number,$fax_no,$email_id,$jilha,$date,$time,$contact_person_name); if($stmt_insert->execute()) { return true; } return false; } } function update_centre_details($centre_name,$address,$contact_number,$fax_no,$email_id,$jilha,$contact_person_name,$center_id) { $date = date("Y-m-d"); $time = date("H:i:s A"); if($stmt_insert = $this->con->prepare("Update `centers` SET `center_name` = ?,`address`=?,`contact_person_name`=?,`contact_no`=?,`fax_number`=?,`email_id`=?,`jilha`=?,`date`=?,`time`=? where `id`=?")) { $stmt_insert->bind_param("sssssssssi",$centre_name,$address,$contact_person_name,$contact_number,$fax_no,$email_id,$jilha,$date,$time,$center_id); if($stmt_insert->execute()) { return true; } return false; } } function update_registration_name_of_centers($current_edt_center_id,$centre_name) { if($stmt_insert = $this->con->prepare("Update `registrations` SET `center_name` = ? where `center_id`=?")) { $stmt_insert->bind_param("si",$centre_name,$current_edt_center_id); if($stmt_insert->execute()) { return true; } return false; } } function update_registration_name_of_school($current_edt_center_id,$centre_name) { if($stmt_insert = $this->con->prepare("Update `registrations` SET `school_details` = ? where `school_id`=?")) { $stmt_insert->bind_param("si",$centre_name,$current_edt_center_id); if($stmt_insert->execute()) { return true; } return false; } } function update_school_details($centre_name,$address,$contact_number,$fax_no,$email_id,$jilha,$contact_person_name,$center_id) { $date = date("Y-m-d"); $time = date("H:i:s A"); if($stmt_insert = $this->con->prepare("Update `schools` SET `school_name` = ?,`address`=?,`contact_person_name`=?,`contact_number`=?,`fax_number`=?,`email_id`=?,`jilha`=?,`date`=?,`time`=? where `id`=?")) { $stmt_insert->bind_param("sssssssssi",$centre_name,$address,$contact_person_name,$contact_number,$fax_no,$email_id,$jilha,$date,$time,$center_id); if($stmt_insert->execute()) { return true; } return false; } } function get_all_added_schools() { if($stmt_select = $this->con->prepare("SELECT `id`, `school_name`, `address`, `contact_number`, `fax_number`, `email_id`, `jilha`, `date`, `time`,`contact_person_name` FROM `schools`")) { $stmt_select->bind_result($id,$center_name,$address,$contact_no,$fax_number,$email_id,$jilha,$date,$time,$contact_person_name); if($stmt_select->execute()) { $data = array(); $count = 0; while($stmt_select->fetch()) { $data[$count][0] = $id; $data[$count][1] = $center_name; $data[$count][2] = $address; $data[$count][3] = $contact_no; $data[$count][4] = $fax_number; $data[$count][5] = $email_id; $data[$count][6] = $jilha; $data[$count][7] = $date; $data[$count][8] = $time; $data[$count][9] = $contact_person_name; $count++; } if(!empty($data)) { return $data; } else { return false; } } } } function get_school_data_for_exist($name,$address) { if($stmt_select = $this->con->prepare("SELECT `id` FROM `schools` where `school_name` = ? AND `address` = ?")) { $stmt_select->bind_param("ss",$name,$address); $stmt_select->bind_result($id); if($stmt_select->execute()) { if($stmt_select->fetch()) { return $id; } return false; } } } function get_all_added_members() { if($stmt_select = $this->con->prepare("SELECT `id`, `member_name`, `address`, `contact_number`, `email_id`, `user_id`, `password`, `date`, `time` FROM `memebrs`")) { $stmt_select->bind_result($id,$member_name,$address,$contact_no,$email_id,$user_id,$password,$date,$time); if($stmt_select->execute()) { $data = array(); $count = 0; while($stmt_select->fetch()) { $data[$count][0] = $id; $data[$count][1] = $member_name; $data[$count][2] = $address; $data[$count][3] = $contact_no; $data[$count][4] = $email_id; $data[$count][5] = $user_id; $data[$count][6] = $password; $data[$count][7] = $date; $data[$count][8] = $time; $count++; } if(!empty($data)) { return $data; } else { return false; } } } } function get_all_added_centres() { if($stmt_select = $this->con->prepare("SELECT `id`, `center_name`, `address`, `contact_no`, `fax_number`, `email_id`, `jilha`, `date`, `time`,`contact_person_name` FROM `centers`")) { $stmt_select->bind_result($id,$center_name,$address,$contact_no,$fax_number,$email_id,$jilha,$date,$time,$contact_person_name); if($stmt_select->execute()) { $data = array(); $count = 0; while($stmt_select->fetch()) { $data[$count][0] = $id; $data[$count][1] = $center_name; $data[$count][2] = $address; $data[$count][3] = $contact_no; $data[$count][4] = $fax_number; $data[$count][5] = $email_id; $data[$count][6] = $jilha; $data[$count][7] = $date; $data[$count][8] = $time; $data[$count][9] = $contact_person_name; $count++; } if(!empty($data)) { return $data; } else { return false; } } } } function get_center_data_from_id($center_id) { if($stmt_select = $this->con->prepare("SELECT `id`, `center_name`, `address`, `contact_no`, `fax_number`, `email_id`, `jilha`, `date`, `time`,`contact_person_name` FROM `centers` where `id` = ?")) { $stmt_select->bind_param("i",$center_id); $stmt_select->bind_result($id,$center_name,$address,$contact_no,$fax_number,$email_id,$jilha,$date,$time,$contact_person_name); if($stmt_select->execute()) { $data = array(); if($stmt_select->fetch()) { $data[0] = $id; $data[1] = $center_name; $data[2] = $address; $data[3] = $contact_no; $data[4] = $fax_number; $data[5] = $email_id; $data[6] = $jilha; $data[7] = $date; $data[8] = $time; $data[9] = $contact_person_name; } if(!empty($data)) { return $data; } else { return false; } } } } function get_school_data_from_id($center_id) { if($stmt_select = $this->con->prepare("SELECT `id`, `school_name`, `address`, `contact_number`, `fax_number`, `email_id`, `jilha`, `date`, `time`,`contact_person_name` FROM `schools` where `id` = ?")) { $stmt_select->bind_param("i",$center_id); $stmt_select->bind_result($id,$center_name,$address,$contact_no,$fax_number,$email_id,$jilha,$date,$time,$contact_person_name); if($stmt_select->execute()) { $data = array(); if($stmt_select->fetch()) { $data[0] = $id; $data[1] = $center_name; $data[2] = $address; $data[3] = $contact_no; $data[4] = $fax_number; $data[5] = $email_id; $data[6] = $jilha; $data[7] = $date; $data[8] = $time; $data[9] = $contact_person_name; } if(!empty($data)) { return $data; } else { return false; } } } } function get_pratinidhi_data_from_id($member_user_id) { if($stmt_select = $this->con->prepare("SELECT `id`, `member_name`, `address`, `contact_number`, `email_id`, `user_id`, `password`, `date`, `time` FROM `memebrs` where `user_id` = ?")) { $stmt_select->bind_param("s",$member_user_id); $stmt_select->bind_result($id,$member_name,$address,$contact_no,$email_id,$user_id,$password,$date,$time); if($stmt_select->execute()) { $data = array(); if($stmt_select->fetch()) { $data[0] = $id; $data[1] = $member_name; $data[2] = $address; $data[3] = $contact_no; $data[4] = $email_id; $data[5] = $user_id; $data[6] = $password; $data[7] = $date; $data[8] = $time; } if(!empty($data)) { return $data; } else { return false; } } } } function get_pratinidhi_data() { if($stmt_select = $this->con->prepare("SELECT `id`, `member_name`, `address`, `contact_number`, `email_id`, `user_id`, `password`, `date`, `time` FROM `memebrs`")) { $stmt_select->bind_result($id,$member_name,$address,$contact_no,$email_id,$user_id,$password,$date,$time); if($stmt_select->execute()) { $data = array(); $counter = 0; while($stmt_select->fetch()) { $data[$counter][0] = $id; $data[$counter][1] = $member_name; $data[$counter][2] = $address; $data[$counter][3] = $contact_no; $data[$counter][4] = $email_id; $data[$counter][5] = $user_id; $data[$counter][6] = $password; $data[$counter][7] = $date; $data[$counter][8] = $time; $counter++; } if(!empty($data)) { return $data; } else { return false; } } } } function delete_center($delete_id) { if($stmt_delete = $this->con->prepare("Delete from `centers` where `id` = ?")) { $stmt_delete->bind_param("i",$delete_id); if($stmt_delete->execute()) { if($stmt_delete->fetch()) { return true; } } return false; } } function delete_school($delete_id) { if($stmt_delete = $this->con->prepare("Delete from `schools` where `id` = ?")) { $stmt_delete->bind_param("i",$delete_id); if($stmt_delete->execute()) { if($stmt_delete->fetch()) { return true; } } return false; } } function add_news_and_event($news) { $date = date("Y-m-d"); $time = date("H:i:s A"); if($stmt_insert = $this->con->prepare("INSERT INTO `news_and_events`(`news`, `date`, `time`) VALUES (?,?,?)")) { $stmt_insert->bind_param("sss",$news,$date,$time); if($stmt_insert->execute()) { return true; } return false; } } function add_news_and_event_for_members($news) { $date = date("Y-m-d"); $time = date("H:i:s A"); if($stmt_insert = $this->con->prepare("INSERT INTO `members_news`(`news`, `date`, `time`) VALUES (?,?,?)")) { $stmt_insert->bind_param("sss",$news,$date,$time); if($stmt_insert->execute()) { return true; } return false; } } function get_all_news_events_for_members() { if($stmt_select = $this->con->prepare("SELECT `id`, `news`,`date`, `time` FROM `members_news` ORDER BY `id` DESC")) { $stmt_select->bind_result($id,$news,$date,$time); if($stmt_select->execute()) { $data = array(); $count = 0; while($stmt_select->fetch()) { $data[$count][0] = $id; $data[$count][1] = $news; $data[$count][2] = $date; $data[$count][3] = $time; $count++; } if(!empty($data)) { return $data; } else { return false; } } } } function get_all_school_added_members() { if($stmt_select = $this->con->prepare("SELECT `id`, `school_id`,`member_user_id`,`date`, `time` FROM `members_added_to_schools`")) { $stmt_select->bind_result($id,$school_id,$member_user_id,$date,$time); if($stmt_select->execute()) { $data = array(); $count = 0; while($stmt_select->fetch()) { $data[$count][0] = $id; $data[$count][1] = $school_id; $data[$count][2] = $member_user_id; $data[$count][3] = $date; $data[$count][4] = $time; $count++; } if(!empty($data)) { return $data; } else { return false; } } } } function get_all_news_events() { if($stmt_select = $this->con->prepare("SELECT `id`, `news`,`date`, `time` FROM `news_and_events`")) { $stmt_select->bind_result($id,$news,$date,$time); if($stmt_select->execute()) { $data = array(); $count = 0; while($stmt_select->fetch()) { $data[$count][0] = $id; $data[$count][1] = $news; $data[$count][2] = $date; $data[$count][3] = $time; $count++; } if(!empty($data)) { return $data; } else { return false; } } } } function delete_news($delete_id) { if($stmt_delete = $this->con->prepare("Delete from `news_and_events` where `id` = ?")) { $stmt_delete->bind_param("i",$delete_id); if($stmt_delete->execute()) { if($stmt_delete->fetch()) { return true; } } return false; } } function delete_news_for_members($delete_id) { if($stmt_delete = $this->con->prepare("Delete from `members_news` where `id` = ?")) { $stmt_delete->bind_param("i",$delete_id); if($stmt_delete->execute()) { if($stmt_delete->fetch()) { return true; } } return false; } } function get_standard_is_available_or_not($standard) { if($stmt_select = $this->con->prepare("SELECT `id` from `exam_fees` where `standard` = ?")) { $stmt_select->bind_param("s",$standard); $stmt_select->bind_result($result_id); if($stmt_select->execute()) { if($stmt_select->fetch()) { return $result_id; } } return false; } } function get_price_is_added_or_not($standard,$price_number) { if($stmt_select = $this->con->prepare("SELECT `id` from `prices` where `standard` = ? AND `price_number` = ?")) { $stmt_select->bind_param("ss",$standard,$price_number); $stmt_select->bind_result($result_id); if($stmt_select->execute()) { if($stmt_select->fetch()) { return $result_id; } } return false; } } function insert_new_fees_standard($standard,$marathi_fees,$semi_fees) { $date = date("Y-m-d"); $time = date("H:i:s A"); if($stmt_insert = $this->con->prepare("INSERT INTO `exam_fees`(`standard`, `marathi_fees`, `semi_fees`, `date`, `time`) VALUES (?,?,?,?,?)")) { $stmt_insert->bind_param("sssss",$standard,$marathi_fees,$semi_fees,$date,$time); if($stmt_insert->execute()) { return true; } return false; } } function insert_new_price($standard,$price_number,$prices_amount,$certificate_material) { $date = date("Y-m-d"); $time = date("H:i:s A"); if($stmt_insert = $this->con->prepare("INSERT INTO `prices`(`standard`, `price_number`, `price_amount`,`certificate_material`, `date`, `time`) VALUES (?,?,?,?,?,?)")) { $stmt_insert->bind_param("ssssss",$standard,$price_number,$prices_amount,$certificate_material,$date,$time); if($stmt_insert->execute()) { return true; } return false; } } function insert_new_main_page_info($text) { $date = date("Y-m-d"); $time = date("H:i:s A"); if($stmt_insert = $this->con->prepare("INSERT INTO `main_page_mahiti`(`info`, `date`, `time`) VALUES (?,?,?)")) { $stmt_insert->bind_param("sss",$text,$date,$time); if($stmt_insert->execute()) { return true; } return false; } } function insert_new_registration_page_mahiti_page_info($text) { $date = date("Y-m-d"); $time = date("H:i:s A"); if($stmt_insert = $this->con->prepare("INSERT INTO `registration_page_mahiti`(`info`, `date`, `time`) VALUES (?,?,?)")) { $stmt_insert->bind_param("sss",$text,$date,$time); if($stmt_insert->execute()) { return true; } return false; } } function update_standard_fees($standard,$marathi_fees,$semi_fees) { $date = date("Y-m-d"); $time = date("H:i:s A"); if($stmt_update = $this->con->prepare("Update `exam_fees` SET `marathi_fees` = ?,`semi_fees` = ?,`date` = ?,`time`=? Where `standard` = ?")) { $stmt_update->bind_param("sssss",$marathi_fees,$semi_fees,$date,$time,$standard); if($stmt_update->execute()) { return true; } return false; } } function update_prices($standard,$price_number,$prices_amount,$certificate_material) { $date = date("Y-m-d"); $time = date("H:i:s A"); if($stmt_update = $this->con->prepare("Update `prices` SET `price_amount` = ?,`certificate_material` = ?,`date` = ?,`time`=? Where `standard` = ? AND `price_number` = ?")) { $stmt_update->bind_param("ssssss",$prices_amount,$certificate_material,$date,$time,$standard,$price_number); if($stmt_update->execute()) { return true; } return false; } } function get_all_fees_details() { if($stmt_select = $this->con->prepare("SELECT `id`, `standard`, `marathi_fees`, `semi_fees`, `date`, `time` FROM `exam_fees`")) { $stmt_select->bind_result($id,$standard,$marathi_fees,$semi_fees,$date,$time); if($stmt_select->execute()) { $data = array(); $count = 0; while($stmt_select->fetch()) { $data[$count][0] = $id; $data[$count][1] = $standard; $data[$count][2] = $marathi_fees; $data[$count][3] = $semi_fees; $data[$count][4] = $date; $data[$count][5] = $time; $count++; } if(!empty($data)) { return $data; } else { return false; } } } } function get_all_prices_details() { if($stmt_select = $this->con->prepare("SELECT `id`, `standard`, `price_number`, `price_amount`,`certificate_material`, `date`, `time` FROM `prices`")) { $stmt_select->bind_result($id,$standard,$price_number,$price_amount,$certificate_material,$date,$time); if($stmt_select->execute()) { $data = array(); $count = 0; while($stmt_select->fetch()) { $data[$count][0] = $id; $data[$count][1] = $standard; $data[$count][2] = $price_number; $data[$count][3] = $price_amount; $data[$count][4] = $certificate_material; $data[$count][5] = $date; $data[$count][6] = $time; $count++; } if(!empty($data)) { return $data; } else { return false; } } } } function get_all_main_page_info() { if($stmt_select = $this->con->prepare("SELECT `id`, `info`, `date`, `time` FROM `main_page_mahiti`")) { $stmt_select->bind_result($id,$info,$date,$time); if($stmt_select->execute()) { $data = array(); $count = 0; while($stmt_select->fetch()) { $data[$count][0] = $id; $data[$count][1] = $info; $data[$count][2] = $date; $data[$count][3] = $time; $count++; } if(!empty($data)) { return $data; } else { return false; } } } } function get_all_registration_page_mahiti() { if($stmt_select = $this->con->prepare("SELECT `id`, `info`, `date`, `time` FROM `registration_page_mahiti`")) { $stmt_select->bind_result($id,$info,$date,$time); if($stmt_select->execute()) { $data = array(); $count = 0; while($stmt_select->fetch()) { $data[$count][0] = $id; $data[$count][1] = $info; $data[$count][2] = $date; $data[$count][3] = $time; $count++; } if(!empty($data)) { return $data; } else { return false; } } } } function delete_fees($delete_id) { if($stmt_delete = $this->con->prepare("DELETE FROM `exam_fees` WHERE `id` = ?")) { $stmt_delete->bind_param("i",$delete_id); if($stmt_delete->execute()) { return true; } return false; } } function delete_price($delete_id) { if($stmt_delete = $this->con->prepare("DELETE FROM `prices` WHERE `id` = ?")) { $stmt_delete->bind_param("i",$delete_id); if($stmt_delete->execute()) { return true; } return false; } } function delete_main_page_info($delete_id) { if($stmt_delete = $this->con->prepare("DELETE FROM `main_page_mahiti` WHERE `id` = ?")) { $stmt_delete->bind_param("i",$delete_id); if($stmt_delete->execute()) { return true; } return false; } } function delete_registration_page_info($delete_id) { if($stmt_delete = $this->con->prepare("DELETE FROM `registration_page_mahiti` WHERE `id` = ?")) { $stmt_delete->bind_param("i",$delete_id); if($stmt_delete->execute()) { return true; } return false; } } function get_fees_by_standard_wise($selected_standard) { if($stmt_select = $this->con->prepare("SELECT `id`, `marathi_fees`, `semi_fees` FROM `exam_fees` where `standard` = ?")) { $stmt_select->bind_param("s",$selected_standard); $stmt_select->bind_result($id,$marathi_fees,$semi_fees); if($stmt_select->execute()) { $data = array(); $count = 0; while($stmt_select->fetch()) { $response = array(); $response['id'] = $id; $response['marathi_fees'] = $marathi_fees; $response['semi_fees'] = $semi_fees; array_push($data,$response); $count++; } if(!empty($data)) { return $data; } else { return false; } } } } function get_registered_students_data($post_center_name,$post_standard,$post_level,$student_name,$school_name,$jilha,$from_date,$to_date) { if($post_center_name=="केंद्र निवडा") { $post_center_name = ""; } if($post_standard=="इयत्ता निवडा") { $post_standard = ""; } if($post_level=="माध्यम आणि फी निवडा") { $post_level = ""; } if($jilha=="जिल्हा निवडा") { $jilha = ""; } /*if($school_name=="शाळा निवडा") { $school_name = ""; }*/ $from_date_stmt = ""; $to_date_stmt = ""; $date_stmt = ""; if($from_date=="" AND $to_date=="") { $date_stmt = ""; } else if($from_date=="" AND $to_date!="") { $from_date = "0000-00-00"; $date_stmt = "AND (`date` BETWEEN $from_date AND $to_date)"; } else if($from_date!="" AND $to_date=="") { $to_date = "4000-12-31"; $date_stmt = "AND (`date` BETWEEN $from_date AND $to_date)"; } else { $date_stmt = "AND (`date` BETWEEN '$from_date' AND '$to_date')"; } $search_complete_stud_name = ""; /*if (count(explode(' ', $student_name)) > 1) { $search_complete_stud_name = explode(' ', $student_name); $str_count = count($search_complete_stud_name); if($str_count==3) { $search_complete_stud_name = " AND `sirname` = ".$search_complete_stud_name[0]." AND `name` = ".$search_complete_stud_name[1]." AND `father_name`= ".$search_complete_stud_name[2]; } else { $search_complete_stud_name = ""; } }*/ if($stmt_select = $this->con->prepare("SELECT `id`, `center_name`, `standard`, `madhyam_and_fees`, `sirname`, `name`, `father_name`, `mother_name`, `contact_number`, `principal_details`, `school_details`, `jilha`, `dd_number`, `date`, `time`, `exam_seat_number`,`bhasha_ganit`, `eng_buddhimatta`, `total_marks`,`shera` FROM `registrations` WHERE `center_name` LIKE '%".$post_center_name."%' AND `standard` LIKE '%".$post_standard."%' AND `madhyam_and_fees` LIKE '%".$post_level."%' AND `full_name` LIKE '%".$student_name."%' AND `school_details` LIKE '%".$school_name."%' AND `jilha` LIKE '%".$jilha."%' ".$date_stmt.$search_complete_stud_name." ORDER BY `full_name` ASC")) { $stmt_select->bind_result($id,$center_name,$standard,$madhyam_and_fees,$sirname,$name,$father_name,$mother_name,$contact_number,$principal_details,$school_details,$jilha,$dd_number,$date,$time,$result_exam_seat_number,$bhasha_ganit,$eng_buddhimatta,$total_marks,$shera); if($stmt_select->execute()) { $data = array(); $count = 0; while($stmt_select->fetch()) { $data[$count]['id'] = $id; $data[$count]['center_name'] = $center_name; $data[$count]['standard'] = $standard; $data[$count]['madhyam_and_fees']= $madhyam_and_fees; $data[$count]['sirname'] = $sirname; $data[$count]['name'] = $name; $data[$count]['father_name'] = $father_name; $data[$count]['mother_name'] = $mother_name; $data[$count]['contact_number'] = $contact_number; $data[$count]['principal_details'] = $principal_details; $data[$count]['school_details'] = $school_details; $data[$count]['jilha'] = $jilha; $data[$count]['dd_number'] = $dd_number; $data[$count]['date'] = $date; $data[$count]['time'] = $time; $data[$count]['exam_seat_no'] = $result_exam_seat_number; $data[$count]['exam_bhasha_ganit'] = $bhasha_ganit; $data[$count]['exam_eng_buddhimatta'] = $eng_buddhimatta; $data[$count]['exam_total_marks'] = $total_marks; $data[$count]['exam_shera'] = $shera; $count++; } if(!empty($data)) { return $data; } else { return false; } } } } function get_registered_students_data_for_sms_sending($post_madhyam,$post_standard,$post_center_name) { if($post_center_name=="केंद्र निवडा") { $post_center_name = ""; } if($post_standard=="ईयत्ता निवडा") { $post_standard = ""; } if($post_madhyam=="माध्यम आणि फी निवडा") { $post_madhyam = ""; } if($stmt_select = $this->con->prepare("SELECT `id`, `center_name`, `standard`, `madhyam_and_fees`, `sirname`, `name`, `father_name`, `mother_name`, `contact_number`, `principal_details`, `school_details`, `jilha`, `dd_number`, `date`, `time`, `exam_seat_number`,`bhasha_ganit`, `eng_buddhimatta`, `total_marks`,`shera` FROM `registrations` WHERE `center_id` =".$post_center_name." AND `standard` LIKE '%".$post_standard."%' AND `madhyam_and_fees` LIKE '%".$post_madhyam."%' ORDER BY `full_name` ASC")) { $stmt_select->bind_result($id,$center_name,$standard,$madhyam_and_fees,$sirname,$name,$father_name,$mother_name,$contact_number,$principal_details,$school_details,$jilha,$dd_number,$date,$time,$result_exam_seat_number,$bhasha_ganit,$eng_buddhimatta,$total_marks,$shera); if($stmt_select->execute()) { $data = array(); $count = 0; while($stmt_select->fetch()) { $data[$count]['id'] = $id; $data[$count]['center_name'] = $center_name; $data[$count]['standard'] = $standard; $data[$count]['madhyam_and_fees']= $madhyam_and_fees; $data[$count]['sirname'] = $sirname; $data[$count]['name'] = $name; $data[$count]['father_name'] = $father_name; $data[$count]['mother_name'] = $mother_name; $data[$count]['contact_number'] = $contact_number; $data[$count]['principal_details'] = $principal_details; $data[$count]['school_details'] = $school_details; $data[$count]['jilha'] = $jilha; $data[$count]['dd_number'] = $dd_number; $data[$count]['date'] = $date; $data[$count]['time'] = $time; $data[$count]['exam_seat_no'] = $result_exam_seat_number; $data[$count]['exam_bhasha_ganit'] = $bhasha_ganit; $data[$count]['exam_eng_buddhimatta'] = $eng_buddhimatta; $data[$count]['exam_total_marks'] = $total_marks; $data[$count]['exam_shera'] = $shera; $count++; } if(!empty($data)) { return $data; } else { return false; } } } } function get_registered_students_data_from_center($post_center_name,$madhyam,$class) { if($stmt_select = $this->con->prepare("SELECT `id` FROM `registrations` where `center_id` = ? AND `madhyam_and_fees` LIKE '%".$madhyam."%' AND `standard`=? ORDER BY `full_name` ASC")) { $stmt_select->bind_param("ss",$post_center_name,$class); $stmt_select->bind_result($id); if($stmt_select->execute()) { $data = array(); $count = 0; while($stmt_select->fetch()) { $data[$count] = $id; $count++; } if(!empty($data)) { return $data; } else { return false; } } } } function get_students_data_for_shera($post_center_name,$madhyam,$class) { if($stmt_select = $this->con->prepare("SELECT `id`,`exam_seat_number`, `standard`, `madhyam_and_fees`, `full_name`, `eng_buddhimatta`, `total_marks`, `shera` FROM `registrations` where `center_id` = ? AND `madhyam_and_fees` LIKE '%".$madhyam."%' AND `standard`=? ORDER BY `total_marks` ASC LIMIT")) { $stmt_select->bind_param("ss",$post_center_name,$class); $stmt_select->bind_result($res_id,$exam_seat_number, $standard, $madhyam_and_fees,$full_name, $eng_buddhimatta, $total_marks,$shera); if($stmt_select->execute()) { $data = array(); $count = 0; while($stmt_select->fetch()) { $data[$count][0] = $res_id; $data[$count][1] = $exam_seat_number; $data[$count][2] = $standard; $data[$count][3] = $madhyam_and_fees; $data[$count][4] = $full_name; $data[$count][5] = $eng_buddhimatta; $data[$count][6] = $total_marks; $data[$count][7] = $shera; $count++; } if(!empty($data)) { return $data; } else { return false; } } } } function get_answer_key_print_details($student_id) { if($stmt_select = $this->con->prepare("SELECT `id`, `center_name`, `standard`, `madhyam_and_fees`, `sirname`, `name`, `father_name`, `mother_name`, `contact_number`, `principal_details`, `school_details`, `jilha`, `dd_number`, `date`, `time`,`exam_seat_number` FROM `registrations` WHERE `id` = ?")) { $stmt_select->bind_param("i",$student_id); $stmt_select->bind_result($id,$center_name,$standard,$madhyam_and_fees,$sirname,$name,$father_name,$mother_name,$contact_number,$principal_details,$school_details,$jilha,$dd_number,$date,$time,$exam_seat_number); if($stmt_select->execute()) { $data = array(); $countr = 0; if($stmt_select->fetch()) { $data[$countr]['id'] = $id; $data[$countr]['center_name'] = $center_name; $data[$countr]['standard'] = $standard; $data[$countr]['madhyam_and_fees']= $madhyam_and_fees; $data[$countr]['sirname'] = $sirname; $data[$countr]['name'] = $name; $data[$countr]['father_name'] = $father_name; $data[$countr]['mother_name'] = $mother_name; $data[$countr]['contact_number'] = $contact_number; $data[$countr]['principal_details'] = $principal_details; $data[$countr]['school_details'] = $school_details; $data[$countr]['jilha'] = $jilha; $data[$countr]['dd_number'] = $dd_number; $data[$countr]['date'] = $date; $data[$countr]['time'] = $time; $data[$countr]['exam_seat_number'] = $exam_seat_number; } if(!empty($data)) { return $data; } else { return false; } } } } function get_answer_key_print_details_by_seat_number($stud_id_from,$stud_id_to) { if($stmt_select = $this->con->prepare("SELECT `id`, `center_name`, `standard`, `madhyam_and_fees`, `sirname`, `name`, `father_name`, `mother_name`, `contact_number`, `principal_details`, `school_details`, `jilha`, `dd_number`, `date`, `time`,`exam_seat_number` FROM `registrations` WHERE `exam_seat_number` BETWEEN ? AND ? ORDER BY `exam_seat_number` ASC")) { $stmt_select->bind_param("ss",$stud_id_from,$stud_id_to); $stmt_select->bind_result($id,$center_name,$standard,$madhyam_and_fees,$sirname,$name,$father_name,$mother_name,$contact_number,$principal_details,$school_details,$jilha,$dd_number,$date,$time,$exam_seat_number); if($stmt_select->execute()) { $data = array(); $countr=0; while($stmt_select->fetch()) { $data[$countr]['id'] = $id; $data[$countr]['center_name'] = $center_name; $data[$countr]['standard'] = $standard; $data[$countr]['madhyam_and_fees']= $madhyam_and_fees; $data[$countr]['sirname'] = $sirname; $data[$countr]['name'] = $name; $data[$countr]['father_name'] = $father_name; $data[$countr]['mother_name'] = $mother_name; $data[$countr]['contact_number'] = $contact_number; $data[$countr]['principal_details'] = $principal_details; $data[$countr]['school_details'] = $school_details; $data[$countr]['jilha'] = $jilha; $data[$countr]['dd_number'] = $dd_number; $data[$countr]['date'] = $date; $data[$countr]['time'] = $time; $data[$countr]['exam_seat_number'] = $exam_seat_number; $countr++; } if(!empty($data)) { return $data; } else { return false; } } } } function get_certificate_print_details_by_seat_number($stud_id_from,$stud_id_to) { if($stmt_select = $this->con->prepare("SELECT `id`, `center_name`, `standard`, `madhyam_and_fees`, `sirname`, `name`, `father_name`, `mother_name`, `contact_number`, `principal_details`, `school_details`, `jilha`, `dd_number`, `date`, `time`,`exam_seat_number`,`bhasha_ganit`,`eng_buddhimatta`,`total_marks`,`shera` FROM `registrations` WHERE `exam_seat_number` BETWEEN ? AND ? ORDER BY `exam_seat_number` ASC")) { $stmt_select->bind_param("ss",$stud_id_from,$stud_id_to); $stmt_select->bind_result($id,$center_name,$standard,$madhyam_and_fees,$sirname,$name,$father_name,$mother_name,$contact_number,$principal_details,$school_details,$jilha,$dd_number,$date,$time,$exam_seat_number,$bhasha_ganit,$eng_buddhimatta,$total_marks,$shera); if($stmt_select->execute()) { $data = array(); $countr=0; while($stmt_select->fetch()) { $data[$countr]['id'] = $id; $data[$countr]['center_name'] = $center_name; $data[$countr]['standard'] = $standard; $data[$countr]['madhyam_and_fees']= $madhyam_and_fees; $data[$countr]['sirname'] = $sirname; $data[$countr]['name'] = $name; $data[$countr]['father_name'] = $father_name; $data[$countr]['mother_name'] = $mother_name; $data[$countr]['contact_number'] = $contact_number; $data[$countr]['principal_details'] = $principal_details; $data[$countr]['school_details'] = $school_details; $data[$countr]['jilha'] = $jilha; $data[$countr]['dd_number'] = $dd_number; $data[$countr]['date'] = $date; $data[$countr]['time'] = $time; $data[$countr]['exam_seat_number'] = $exam_seat_number; $data[$countr]['bhasha_ganit'] = $bhasha_ganit; $data[$countr]['eng_buddhimatta'] = $eng_buddhimatta; $data[$countr]['total_marks'] = $total_marks; $data[$countr]['shera'] = $shera; $countr++; } if(!empty($data)) { return $data; } else { return false; } } } } function get_certificate_print_details_by_single_seat_number($stud_id_from) { if($stmt_select = $this->con->prepare("SELECT `id`, `center_name`, `standard`, `madhyam_and_fees`, `sirname`, `name`, `father_name`, `mother_name`, `contact_number`, `principal_details`, `school_details`, `jilha`, `dd_number`, `date`, `time`,`exam_seat_number`,`bhasha_ganit`,`eng_buddhimatta`,`total_marks`,`shera` FROM `registrations` WHERE `id` = ?")) { $stmt_select->bind_param("s",$stud_id_from); $stmt_select->bind_result($id,$center_name,$standard,$madhyam_and_fees,$sirname,$name,$father_name,$mother_name,$contact_number,$principal_details,$school_details,$jilha,$dd_number,$date,$time,$exam_seat_number,$bhasha_ganit,$eng_buddhimatta,$total_marks,$shera); if($stmt_select->execute()) { $data = array(); $countr=0; while($stmt_select->fetch()) { $data[$countr]['id'] = $id; $data[$countr]['center_name'] = $center_name; $data[$countr]['standard'] = $standard; $data[$countr]['madhyam_and_fees']= $madhyam_and_fees; $data[$countr]['sirname'] = $sirname; $data[$countr]['name'] = $name; $data[$countr]['father_name'] = $father_name; $data[$countr]['mother_name'] = $mother_name; $data[$countr]['contact_number'] = $contact_number; $data[$countr]['principal_details'] = $principal_details; $data[$countr]['school_details'] = $school_details; $data[$countr]['jilha'] = $jilha; $data[$countr]['dd_number'] = $dd_number; $data[$countr]['date'] = $date; $data[$countr]['time'] = $time; $data[$countr]['exam_seat_number'] = $exam_seat_number; $data[$countr]['bhasha_ganit'] = $bhasha_ganit; $data[$countr]['eng_buddhimatta'] = $eng_buddhimatta; $data[$countr]['total_marks'] = $total_marks; $data[$countr]['shera'] = $shera; $countr++; } if(!empty($data)) { return $data; } else { return false; } } } } function insert_slideshow_images($actual_image_name) { $date = date("Y-m-d"); $time = date("H:i:s A"); if($stmt_insert = $this->con->prepare("INSERT INTO `slideshow`(`name`, `date`, `time`) VALUES (?,?,?)")) { $stmt_insert->bind_param("sss",$actual_image_name,$date,$time); if($stmt_insert->execute()) { return true; } return false; } } function insert_gallery_images($actual_image_name) { $date = date("Y-m-d"); $time = date("H:i:s A"); if($stmt_insert = $this->con->prepare("INSERT INTO `gallery`(`gallery_image`, `date`, `time`) VALUES (?,?,?)")) { $stmt_insert->bind_param("sss",$actual_image_name,$date,$time); if($stmt_insert->execute()) { return true; } return false; } } function insert_mahitipatrak_images($actual_image_name) { $date = date("Y-m-d"); $time = date("H:i:s A"); if($stmt_insert = $this->con->prepare("INSERT INTO `mahitipatrak`(`gallery_image`, `date`, `time`) VALUES (?,?,?)")) { $stmt_insert->bind_param("sss",$actual_image_name,$date,$time); if($stmt_insert->execute()) { return true; } return false; } } function insert_uttarsuchi_record($actual_image_name,$title) { $date = date("Y-m-d"); $time = date("H:i:s A"); if($stmt_insert = $this->con->prepare("INSERT INTO `uttarsuchi`(`title`,`gallery_image`, `date`, `time`) VALUES (?,?,?,?)")) { $stmt_insert->bind_param("ssss",$title,$actual_image_name,$date,$time); if($stmt_insert->execute()) { return true; } return false; } } function get_all_slideshow_images() { if($stmt_select = $this->con->prepare("SELECT `id`, `name` FROM `slideshow`")) { $stmt_select->bind_result($res_id,$res_name); if($stmt_select->execute()) { $data = array(); $counter = 0; while($stmt_select->fetch()) { $data[$counter]['id'] = $res_id; $data[$counter]['img_name'] = $res_name; $counter++; } if(!empty($data)) { return $data; } else { return false; } } } } function get_all_merit_students_records() { if($stmt_select = $this->con->prepare("SELECT `id`, `student_name`, `standard`, `jilha`, `merit_status`, `student_image`,`date`,`time` FROM `merit_students` ORDER BY `id` DESC")) { $stmt_select->bind_result($id,$student_name,$standard,$jilha,$merit_status,$student_image,$date,$time); if($stmt_select->execute()) { $data = array(); $counter = 0; while($stmt_select->fetch()) { $data[$counter][0] = $id; $data[$counter][1] = $student_name; $data[$counter][2] = $standard; $data[$counter][3] = $jilha; $data[$counter][4] = $merit_status; $data[$counter][5] = $student_image; $data[$counter][6] = $date; $data[$counter][7] = $time; $counter++; } if(!empty($data)) { return $data; } else { return false; } } } } function get_all_gallery_images() { if($stmt_select = $this->con->prepare("SELECT `id`, `gallery_image` FROM `gallery`")) { $stmt_select->bind_result($res_id,$res_name); if($stmt_select->execute()) { $data = array(); $counter = 0; while($stmt_select->fetch()) { $data[$counter]['id'] = $res_id; $data[$counter]['img_name'] = $res_name; $counter++; } if(!empty($data)) { return $data; } else { return false; } } } } function get_all_mahitipatrak_images() { if($stmt_select = $this->con->prepare("SELECT `id`, `gallery_image` FROM `mahitipatrak`")) { $stmt_select->bind_result($res_id,$res_name); if($stmt_select->execute()) { $data = array(); $counter = 0; while($stmt_select->fetch()) { $data[$counter]['id'] = $res_id; $data[$counter]['img_name'] = $res_name; $counter++; } if(!empty($data)) { return $data; } else { return false; } } } } function get_all_uttarsuchi_records() { if($stmt_select = $this->con->prepare("SELECT `id`,`title`, `gallery_image` FROM `uttarsuchi`")) { $stmt_select->bind_result($res_id,$res_title,$res_name); if($stmt_select->execute()) { $data = array(); $counter = 0; while($stmt_select->fetch()) { $data[$counter]['id'] = $res_id; $data[$counter]['title'] = $res_title; $data[$counter]['img_name'] = $res_name; $counter++; } if(!empty($data)) { return $data; } else { return false; } } } } function delete_slideshow_image($delete_id) { if($stmt_delete_image = $this->con->prepare("Delete from `slideshow` where `id` = ?")) { $stmt_delete_image->bind_param("i",$delete_id); if($stmt_delete_image->execute()) { return true; } return false; } } function delete_merit_student_image($delete_id) { if($stmt_delete_image = $this->con->prepare("Delete from `merit_students` where `id` = ?")) { $stmt_delete_image->bind_param("i",$delete_id); if($stmt_delete_image->execute()) { return true; } return false; } } function delete_gallery_image($delete_id) { if($stmt_delete_image = $this->con->prepare("Delete from `gallery` where `id` = ?")) { $stmt_delete_image->bind_param("i",$delete_id); if($stmt_delete_image->execute()) { return true; } return false; } } function delete_mahitipatrak_image($delete_id) { if($stmt_delete_image = $this->con->prepare("Delete from `mahitipatrak` where `id` = ?")) { $stmt_delete_image->bind_param("i",$delete_id); if($stmt_delete_image->execute()) { return true; } return false; } } function delete_uttarsuchi_image($delete_id) { if($stmt_delete_image = $this->con->prepare("Delete from `uttarsuchi` where `id` = ?")) { $stmt_delete_image->bind_param("i",$delete_id); if($stmt_delete_image->execute()) { return true; } return false; } } function delete_download_file($delete_file_id) { if($stmt_delete_image = $this->con->prepare("Delete from `downloads` where `id` = ?")) { $stmt_delete_image->bind_param("i",$delete_file_id); if($stmt_delete_image->execute()) { return true; } return false; } } function get_image_name_from_id($delete_id) { if($stmt_select = $this->con->prepare("SELECT `name` FROM `slideshow` where `id` = ?")) { $stmt_select->bind_param("i",$delete_id); $stmt_select->bind_result($res_img_name); if($stmt_select->execute()) { if($stmt_select->fetch()) { return $res_img_name; } return false; } } } function get_image_name_from_id_for_merit_stud($delete_id) { if($stmt_select = $this->con->prepare("SELECT `student_image` FROM `merit_students` where `id` = ?")) { $stmt_select->bind_param("i",$delete_id); $stmt_select->bind_result($res_img_name); if($stmt_select->execute()) { if($stmt_select->fetch()) { return $res_img_name; } return false; } } } function get_image_name_from_id_for_mahitipatrak($delete_id) { if($stmt_select = $this->con->prepare("SELECT `gallery_image` FROM `mahitipatrak` where `id` = ?")) { $stmt_select->bind_param("i",$delete_id); $stmt_select->bind_result($res_img_name); if($stmt_select->execute()) { if($stmt_select->fetch()) { return $res_img_name; } return false; } } } function get_image_name_from_id_for_uttarsuchi($uttarsuchi_id) { if($stmt_select = $this->con->prepare("SELECT `gallery_image` FROM `uttarsuchi` where `id` = ?")) { $stmt_select->bind_param("i",$uttarsuchi_id); $stmt_select->bind_result($res_img_name); if($stmt_select->execute()) { if($stmt_select->fetch()) { return $res_img_name; } return false; } } } function get_image_name_from_id_for_gallery($delete_id) { if($stmt_select = $this->con->prepare("SELECT `gallery_image` FROM `gallery` where `id` = ?")) { $stmt_select->bind_param("i",$delete_id); $stmt_select->bind_result($res_img_name); if($stmt_select->execute()) { if($stmt_select->fetch()) { return $res_img_name; } return false; } } } function get_file_name_from_file_id($delete_file_id) { if($stmt_select = $this->con->prepare("SELECT `attachment_title` FROM `downloads` where `id` = ?")) { $stmt_select->bind_param("i",$delete_file_id); $stmt_select->bind_result($attachment_title); if($stmt_select->execute()) { if($stmt_select->fetch()) { return $attachment_title; } return false; } } } function insert_new_file($download_title,$download_file_name) { $date = date("Y-m-d"); $time = date("H:i:s A"); if($stmt_insert = $this->con->prepare("INSERT INTO `downloads`(`download_title`,`attachment_title`, `date`, `time`) VALUES (?,?,?,?)")) { $stmt_insert->bind_param("ssss",$download_title,$download_file_name,$date,$time); if($stmt_insert->execute()) { return true; } return false; } } function get_all_download_files() { if($stmt_select = $this->con->prepare("SELECT `id`, `download_title`, `attachment_title`, `date`, `time` FROM `downloads`")) { $stmt_select->bind_result($id,$download_title,$attachment_title,$date,$time); if($stmt_select->execute()) { $data = array(); $count = 0; while($stmt_select->fetch()) { $data[$count]['id'] = $id; $data[$count]['download_title'] = $download_title; $data[$count]['attachment_title'] = $attachment_title; $data[$count]['date'] = $date; $data[$count]['time'] = $time; $count++; } if(!empty($data)) { return $data; } else { return false; } } } } function add_new_merit_student($student_name,$standard,$jilha,$merit_status,$profile_image) { $date = date("Y-m-d"); $time = date("H:i:s A"); if($stmt_insert = $this->con->prepare("INSERT INTO `merit_students`(`student_name`, `standard`, `jilha`, `merit_status`, `student_image`, `date`, `time`) VALUES (?,?,?,?,?,?,?)")) { $stmt_insert->bind_param("sssssss",$student_name,$standard,$jilha,$merit_status,$profile_image,$date,$time); if($stmt_insert->execute()) { return true; } return false; } } function add_new_member($school_name,$contact_person_name,$address,$contact_number,$email_id,$userid,$password) { $date = date("Y-m-d"); $time = date("H:i:s A"); if($stmt_insert = $this->con->prepare("INSERT INTO `memebrs`(`school_id`, `member_name`, `address`, `contact_number`, `email_id`, `user_id`, `password`, `date`, `time`) VALUES(?,?,?,?,?,?,?,?,?)")) { $stmt_insert->bind_param("sssssssss",$school_name,$contact_person_name,$address,$contact_number,$email_id,$userid,$password,$date,$time); if($stmt_insert->execute()) { return true; } return false; } } function check_userid_exist($userid) { if($stmt_select = $this->con->prepare("SELECT `id` FROM `memebrs` where `user_id` = ?")) { $stmt_select->bind_param("s",$userid); $stmt_select->bind_result($res_id); if($stmt_select->execute()) { if($stmt_select->fetch()) { return $res_id; } return false; } } } function get_result_school_name_school_id($school_id) { if($stmt_select = $this->con->prepare("SELECT `school_name` FROM `schools` where `id` = ?")) { $stmt_select->bind_param("i",$school_id); $stmt_select->bind_result($res_school_name); if($stmt_select->execute()) { if($stmt_select->fetch()) { return $res_school_name; } return false; } } } function get_result_center_name_center_id($center_id) { if($stmt_select = $this->con->prepare("SELECT `center_name` FROM `centers` where `id` = ?")) { $stmt_select->bind_param("i",$center_id); $stmt_select->bind_result($res_center_name); if($stmt_select->execute()) { if($stmt_select->fetch()) { return $res_center_name; } return false; } } } function get_last_seat_number($center_id,$standard,$madhyam_and_fees) { if($stmt_select = $this->con->prepare("SELECT MAX(`standardwise_seat_number`) FROM `registrations` where `center_id` = ? AND `standard` = ? AND `madhyam_and_fees` LIKE '%".$madhyam_and_fees."%' ORDER BY `standardwise_seat_number` DESC")) { $stmt_select->bind_param("ss",$center_id,$standard); $stmt_select->bind_result($res_school_name); if($stmt_select->execute()) { if($stmt_select->fetch()) { return $res_school_name; } return false; } } } function get_member_contact_data($email) { if($stmt_select = $this->con->prepare("SELECT `contact_number`,`email_id` FROM `memebrs` where `user_id` = ?")) { $stmt_select->bind_param("s",$email); $stmt_select->bind_result($contact_number,$email_id); if($stmt_select->execute()) { $data = array(); if($stmt_select->fetch()) { $data[0] = $contact_number; $data[1] = $email_id; return $data; } return false; } } } function get_member_current_school_id($current_member_userid) { if($stmt_select = $this->con->prepare("SELECT `school_id` FROM `members_added_to_schools` WHERE `member_user_id` = ?")) { $stmt_select->bind_param("s",$current_member_userid); $stmt_select->bind_result($result_school_id); if($stmt_select->execute()) { $data = array(); $data_count = 0; while($stmt_select->fetch()) { $data[$data_count] = $result_school_id; $data_count++; } if(!empty($data)) { return $data; } else { return false; } } } } function get_member_current_school_name($current_school_id) { if($stmt_select = $this->con->prepare("SELECT `school_name` FROM `schools` WHERE `id` = ?")) { $stmt_select->bind_param("i",$current_school_id); $stmt_select->bind_result($result_school_name); if($stmt_select->execute()) { if($stmt_select->fetch()) { return $result_school_name; } return false; } } } function get_student_receipt_print_data($current_print_student_id) { if($stmt_select = $this->con->prepare("SELECT `id`, `center_name`, `standard`, `madhyam_and_fees`, `sirname`, `name`, `father_name`, `mother_name`, `contact_number`, `principal_details`, `school_details`, `jilha`, `dd_number`, `date`, `time`, `exam_seat_number`,`date_of_birth`,`address`,`pincode`,`school_id`,`center_id` FROM `registrations` WHERE `id` = ?")) { $stmt_select->bind_param("i",$current_print_student_id); $stmt_select->bind_result($id,$center_name,$standard,$madhyam_and_fees,$sirname,$name,$father_name,$mother_name,$contact_number,$principal_details,$school_details,$jilha,$dd_number,$date,$time,$result_exam_seat_number,$dob,$address,$pincode,$school_id,$center_id); if($stmt_select->execute()) { $data = array(); $counter = 0; if($stmt_select->fetch()) { $data[$counter]['id'] = $id; $data[$counter]['center_name'] = $center_name; $data[$counter]['standard'] = $standard; $data[$counter]['madhyam_and_fees']= $madhyam_and_fees; $data[$counter]['sirname'] = $sirname; $data[$counter]['name'] = $name; $data[$counter]['father_name'] = $father_name; $data[$counter]['mother_name'] = $mother_name; $data[$counter]['contact_number'] = $contact_number; $data[$counter]['principal_details'] = $principal_details; $data[$counter]['school_details'] = $school_details; $data[$counter]['jilha'] = $jilha; $data[$counter]['dd_number'] = $dd_number; $data[$counter]['date'] = $date; $data[$counter]['time'] = $time; $data[$counter]['exam_seat_number'] = $result_exam_seat_number; $data[$counter]['dob'] = $dob; $data[$counter]['address'] = $address; $data[$counter]['pincode'] = $pincode; $data[$counter]['school_id'] = $school_id; $data[$counter]['center_id'] = $center_id; $counter++; } if(!empty($data)) { return $data; } else { return false; } } } } function get_student_receipt_print_data_by_seat_number($stud_id_from,$stud_id_to) { if($stmt_select = $this->con->prepare("SELECT `id`, `center_name`, `standard`, `madhyam_and_fees`, `sirname`, `name`, `father_name`, `mother_name`, `contact_number`, `principal_details`, `school_details`, `jilha`, `dd_number`, `date`, `time`, `exam_seat_number`,`date_of_birth`,`address`,`pincode`,`school_id`,`center_id` FROM `registrations` WHERE `exam_seat_number` BETWEEN ? AND ? ORDER BY `exam_seat_number` ASC")) { $stmt_select->bind_param("ss",$stud_id_from,$stud_id_to); $stmt_select->bind_result($id,$center_name,$standard,$madhyam_and_fees,$sirname,$name,$father_name,$mother_name,$contact_number,$principal_details,$school_details,$jilha,$dd_number,$date,$time,$result_exam_seat_number,$dob,$address,$pincode,$school_id,$center_id); if($stmt_select->execute()) { $data = array(); $counter = 0; while($stmt_select->fetch()) { $data[$counter]['id'] = $id; $data[$counter]['center_name'] = $center_name; $data[$counter]['standard'] = $standard; $data[$counter]['madhyam_and_fees']= $madhyam_and_fees; $data[$counter]['sirname'] = $sirname; $data[$counter]['name'] = $name; $data[$counter]['father_name'] = $father_name; $data[$counter]['mother_name'] = $mother_name; $data[$counter]['contact_number'] = $contact_number; $data[$counter]['principal_details'] = $principal_details; $data[$counter]['school_details'] = $school_details; $data[$counter]['jilha'] = $jilha; $data[$counter]['dd_number'] = $dd_number; $data[$counter]['date'] = $date; $data[$counter]['time'] = $time; $data[$counter]['exam_seat_number'] = $result_exam_seat_number; $data[$counter]['dob'] = $dob; $data[$counter]['address'] = $address; $data[$counter]['pincode'] = $pincode; $data[$counter]['school_id'] = $school_id; $data[$counter]['center_id'] = $center_id; $counter++; } if(!empty($data)) { return $data; } else { return false; } } } } function get_student_result_data_from_standard_for_rajya($rajya_standard) { if($stmt_select = $this->con->prepare("SELECT `id`, `center_name`, `standard`, `madhyam_and_fees`, `sirname`, `name`, `father_name`, `mother_name`, `contact_number`, `principal_details`, `school_details`, `jilha`, `dd_number`, `date`, `time`, `exam_seat_number`,`date_of_birth`,`address`,`pincode`,`school_id`,`center_id`,`bhasha_ganit`, `eng_buddhimatta`, `total_marks`, `shera` FROM `registrations` WHERE `standard` = ? AND `total_marks`!='A' ORDER By `total_marks` DESC ")) { $stmt_select->bind_param("s",$rajya_standard); $stmt_select->bind_result($id,$center_name,$standard,$madhyam_and_fees,$sirname,$name,$father_name,$mother_name,$contact_number,$principal_details,$school_details,$jilha,$dd_number,$date,$time,$result_exam_seat_number,$dob,$address,$pincode,$school_id,$center_id,$bhasha_ganit,$eng_buddhimatta,$total_marks,$shera); if($stmt_select->execute()) { $data = array(); $counter = 0; while($stmt_select->fetch()) { $data[$counter]['id'] = $id; $data[$counter]['center_name'] = $center_name; $data[$counter]['standard'] = $standard; $data[$counter]['madhyam_and_fees']= $madhyam_and_fees; $data[$counter]['sirname'] = $sirname; $data[$counter]['name'] = $name; $data[$counter]['father_name'] = $father_name; $data[$counter]['mother_name'] = $mother_name; $data[$counter]['contact_number'] = $contact_number; $data[$counter]['principal_details'] = $principal_details; $data[$counter]['school_details'] = $school_details; $data[$counter]['jilha'] = $jilha; $data[$counter]['dd_number'] = $dd_number; $data[$counter]['date'] = $date; $data[$counter]['time'] = $time; $data[$counter]['exam_seat_number'] = $result_exam_seat_number; $data[$counter]['dob'] = $dob; $data[$counter]['address'] = $address; $data[$counter]['pincode'] = $pincode; $data[$counter]['school_id'] = $school_id; $data[$counter]['center_id'] = $center_id; $data[$counter]['bhasha_ganit'] = $bhasha_ganit; $data[$counter]['eng_buddhimatta'] = $eng_buddhimatta; $data[$counter]['total_marks'] = $total_marks; $data[$counter]['shera'] = $shera; $counter++; } if(!empty($data)) { return $data; } else { return false; } } } } function get_student_result_data_from_standard_for_jilha($v_standard,$res_jilhastariy_limit,$current_jilha) { if($stmt_select = $this->con->prepare("SELECT `id`, `center_name`, `standard`, `madhyam_and_fees`, `sirname`, `name`, `father_name`, `mother_name`, `contact_number`, `principal_details`, `school_details`, `jilha`, `dd_number`, `date`, `time`, `exam_seat_number`,`date_of_birth`,`address`,`pincode`,`school_id`,`center_id`,`bhasha_ganit`, `eng_buddhimatta`, `total_marks`, `shera` FROM `registrations` WHERE `standard` = ? AND `jilha` = ? AND `total_marks`!='A' AND `shera` NOT LIKE '%राज्यात%' ORDER By `total_marks` DESC")) { $stmt_select->bind_param("ss",$v_standard,$current_jilha); $stmt_select->bind_result($id,$center_name,$standard,$madhyam_and_fees,$sirname,$name,$father_name,$mother_name,$contact_number,$principal_details,$school_details,$jilha,$dd_number,$date,$time,$result_exam_seat_number,$dob,$address,$pincode,$school_id,$center_id,$bhasha_ganit,$eng_buddhimatta,$total_marks,$shera); if($stmt_select->execute()) { $data = array(); $counter = 0; while($stmt_select->fetch()) { $data[$counter]['id'] = $id; $data[$counter]['center_name'] = $center_name; $data[$counter]['standard'] = $standard; $data[$counter]['madhyam_and_fees']= $madhyam_and_fees; $data[$counter]['sirname'] = $sirname; $data[$counter]['name'] = $name; $data[$counter]['father_name'] = $father_name; $data[$counter]['mother_name'] = $mother_name; $data[$counter]['contact_number'] = $contact_number; $data[$counter]['principal_details'] = $principal_details; $data[$counter]['school_details'] = $school_details; $data[$counter]['jilha'] = $jilha; $data[$counter]['dd_number'] = $dd_number; $data[$counter]['date'] = $date; $data[$counter]['time'] = $time; $data[$counter]['exam_seat_number'] = $result_exam_seat_number; $data[$counter]['dob'] = $dob; $data[$counter]['address'] = $address; $data[$counter]['pincode'] = $pincode; $data[$counter]['school_id'] = $school_id; $data[$counter]['center_id'] = $center_id; $data[$counter]['bhasha_ganit'] = $bhasha_ganit; $data[$counter]['eng_buddhimatta'] = $eng_buddhimatta; $data[$counter]['total_marks'] = $total_marks; $data[$counter]['shera'] = $shera; $counter++; } if(!empty($data)) { return $data; } else { return false; } } } } function get_student_result_data_from_standard_for_kendra($v_standard,$res_jilhastariy_limit,$current_jilha,$kendra_center_name) { if($stmt_select = $this->con->prepare("SELECT `id`, `center_name`, `standard`, `madhyam_and_fees`, `sirname`, `name`, `father_name`, `mother_name`, `contact_number`, `principal_details`, `school_details`, `jilha`, `dd_number`, `date`, `time`, `exam_seat_number`,`date_of_birth`,`address`,`pincode`,`school_id`,`center_id`,`bhasha_ganit`, `eng_buddhimatta`, `total_marks`, `shera` FROM `registrations` WHERE `standard` = ? AND `jilha` = ? AND `center_id` = ? AND `total_marks`!='A' AND `shera` NOT LIKE '%राज्यात%' AND `shera` NOT LIKE '%जिल्ह्यात%' ORDER By `total_marks` DESC")) { $stmt_select->bind_param("sss",$v_standard,$current_jilha,$kendra_center_name); $stmt_select->bind_result($id,$center_name,$standard,$madhyam_and_fees,$sirname,$name,$father_name,$mother_name,$contact_number,$principal_details,$school_details,$jilha,$dd_number,$date,$time,$result_exam_seat_number,$dob,$address,$pincode,$school_id,$center_id,$bhasha_ganit,$eng_buddhimatta,$total_marks,$shera); if($stmt_select->execute()) { $data = array(); $counter = 0; while($stmt_select->fetch()) { $data[$counter]['id'] = $id; $data[$counter]['center_name'] = $center_name; $data[$counter]['standard'] = $standard; $data[$counter]['madhyam_and_fees']= $madhyam_and_fees; $data[$counter]['sirname'] = $sirname; $data[$counter]['name'] = $name; $data[$counter]['father_name'] = $father_name; $data[$counter]['mother_name'] = $mother_name; $data[$counter]['contact_number'] = $contact_number; $data[$counter]['principal_details'] = $principal_details; $data[$counter]['school_details'] = $school_details; $data[$counter]['jilha'] = $jilha; $data[$counter]['dd_number'] = $dd_number; $data[$counter]['date'] = $date; $data[$counter]['time'] = $time; $data[$counter]['exam_seat_number'] = $result_exam_seat_number; $data[$counter]['dob'] = $dob; $data[$counter]['address'] = $address; $data[$counter]['pincode'] = $pincode; $data[$counter]['school_id'] = $school_id; $data[$counter]['center_id'] = $center_id; $data[$counter]['bhasha_ganit'] = $bhasha_ganit; $data[$counter]['eng_buddhimatta'] = $eng_buddhimatta; $data[$counter]['total_marks'] = $total_marks; $data[$counter]['shera'] = $shera; $counter++; } if(!empty($data)) { return $data; } else { return false; } } } } function delete_student_record($delete_student_id) { if($stmt_delete = $this->con->prepare("Delete from `registrations` where `id` = ?")) { $stmt_delete->bind_param("i",$delete_student_id); if($stmt_delete->execute()) { return true; } return false; } } function update_student_details($edit_user_id,$sirname,$name,$father_name,$mother_name,$contact_number,$parents_address,$pincode,$principal_details,$jilha,$dd_number,$dob,$school_name,$center_id,$center_name,$standard,$madhyam_fees,$school_id,$full_name,$exam_seat_number) { if($stmt_update = $this->con->prepare("UPDATE `registrations` SET `sirname`=?,`name`=?,`father_name`=?,`mother_name`=?,`contact_number`=?,`address`=?,`pincode`=?,`principal_details`=?,`jilha`=?,`dd_number`=?,`date_of_birth`=?,`school_details`=?,`center_id`=?,`center_name`=?,`standard` = ?,`madhyam_and_fees`=?,`school_id`=?,`full_name`=?,`exam_seat_number`=? WHERE `id` = ?")) { $stmt_update->bind_param("sssssssssssssssssssi",$sirname,$name,$father_name,$mother_name,$contact_number,$parents_address,$pincode,$principal_details,$jilha,$dd_number,$dob,$school_name,$center_id,$center_name,$standard,$madhyam_fees,$school_id,$full_name,$exam_seat_number,$edit_user_id); if($stmt_update->execute()) { return true; } return false; } } function update_seat_number_of_stud($student_id,$seat_no) { if($stmt_update = $this->con->prepare("UPDATE `registrations` SET `exam_seat_number` = ? WHERE `id` = ?")) { $stmt_update->bind_param("si",$seat_no,$student_id); if($stmt_update->execute()) { return true; } return false; } } function update_stud_data_new($stud_id,$full_name) { if($stmt_update = $this->con->prepare("UPDATE `registrations` SET `full_name` = ? WHERE `id` = ?")) { $stmt_update->bind_param("si",$full_name,$stud_id); if($stmt_update->execute()) { return true; } return false; } } function add_new_member_to_school($school_id,$pratinidhi_userid) { $date = date("Y-m-d"); $time = date("H:i:s A"); if($stmt_set_contact_data = $this->con->prepare("insert into `members_added_to_schools`(`school_id`,`member_user_id`,`date`,`time`) Values(?,?,?,?)")) { $stmt_set_contact_data->bind_param("ssss",$school_id,$pratinidhi_userid,$date,$time); if($stmt_set_contact_data->execute()) { return true; } return false; } } function delete_added_member_to_school_data($delete_id) { if($stmt_delete = $this->con->prepare("Delete from `members_added_to_schools` where `id` = ?")) { $stmt_delete->bind_param("i",$delete_id); if($stmt_delete->execute()) { return true; } return false; } } function delete_member_from_data($delete_id) { if($stmt_delete = $this->con->prepare("Delete from `memebrs` where `id` = ?")) { $stmt_delete->bind_param("i",$delete_id); if($stmt_delete->execute()) { return true; } return false; } } function get_admin_password($emailid) { if($stmt_select = $this->con->prepare("SELECT `password` from `admin_panel` where `email_id` = ?")) { $stmt_select->bind_param("s",$emailid); $stmt_select->bind_result($result_password); if($stmt_select->execute()) { if($stmt_select->fetch()) { return $result_password; } } return false; } } function get_center_name_from_center_id($center_id) { if($stmt_select = $this->con->prepare("SELECT `center_name` from `centers` where `id` = ?")) { $stmt_select->bind_param("i",$center_id); $stmt_select->bind_result($result); if($stmt_select->execute()) { if($stmt_select->fetch()) { return $result; } } return false; } } function set_new_admin_password($encrypted_password,$current_login_email) { if($stmt_update = $this->con->prepare("Update `admin_panel` SET `password` = ? where `email_id` = ? ")) { $stmt_update->bind_param("ss",$encrypted_password,$current_login_email); if($stmt_update->execute()) { return true; } return false; } } function set_new_member_password($password,$current_login_email) { if($stmt_update = $this->con->prepare("Update `memebrs` SET `password` = ? where `user_id` = ? ")) { $stmt_update->bind_param("ss",$password,$current_login_email); if($stmt_update->execute()) { return true; } return false; } } function get_student_id_from_seat_no($exam_seat_no) { if($stmt_select = $this->con->prepare("SELECT `id` from `registrations` where `exam_seat_number` = ?")) { $stmt_select->bind_param("s",$exam_seat_no); $stmt_select->bind_result($result_id); if($stmt_select->execute()) { if($stmt_select->fetch()) { return $result_id; } } return false; } } function get_student_id_from_seat_no_single_val_check($reg_number) { if($stmt_select = $this->con->prepare("SELECT `id` from `registrations` where `id` = ?")) { $stmt_select->bind_param("i",$reg_number); $stmt_select->bind_result($result_id); if($stmt_select->execute()) { if($stmt_select->fetch()) { return $result_id; } } return false; } } function check_student_already_exist($standard,$madhyam_fees,$sirname,$name,$father_name,$mother_name,$contact_number,$principal_details,$school_details,$jilha,$dd_number,$center_name,$result_school_name,$center_id,$student_dob,$parents_address,$pincode) { $current_year = date("Y"); /*if($stmt_select = $this->con->prepare("SELECT `id` from `registrations` where `center_id`=?,`center_name`=?,`standard`=?,`madhyam_and_fees`=?,`sirname`=?,`name`=?,`father_name`=?,`mother_name`=?,`date_of_birth`=?,`contact_number`=?,`address`=?,`pincode`=?,`principal_details`=?,`school_details`=?,`school_id`=?,`jilha`=?,`dd_number`=?,`date` LIKE '%$current_year%'")) { $stmt_select->bind_param("ssssssssssssssssss",$center_id,$center_name,$standard,$madhyam_fees,$sirname,$name,$father_name,$mother_name,$student_dob,$contact_number,$parents_address,$pincode,$principal_details,$result_school_name,$school_details,$jilha,$dd_number);*/ if($stmt_select = $this->con->prepare("SELECT `id` from `registrations` where `center_id`=? AND `center_name`=? AND `standard`=? AND `madhyam_and_fees`=? AND `sirname`=? AND `name`=? AND `father_name`=? AND `mother_name`=? AND `date_of_birth`=? AND `contact_number`=? AND `address`=? AND `pincode`=? AND `principal_details`=? AND `school_details`=? AND `school_id`=? AND `jilha`=? AND `dd_number`=? AND `date` LIKE '%$current_year%'")) { $stmt_select->bind_param("sssssssssssssssss",$center_id,$center_name,$standard,$madhyam_fees,$sirname,$name,$father_name,$mother_name,$student_dob,$contact_number,$parents_address,$pincode,$principal_details,$result_school_name,$school_details,$jilha,$dd_number); $stmt_select->bind_result($result_id); if($stmt_select->execute()) { if($stmt_select->fetch()) { return $result_id; } } return false; } } function get_value_of_result_setting() { if($stmt_select = $this->con->prepare("SELECT `id`, `rajyastariy`, `jilhastariy`, `kendrastariy` FROM `nikal_gunvant_settings`")) { $stmt_select->bind_result($res_id,$res_rajyastariy,$res_jilhastariy,$res_kendrastariy); if($stmt_select->execute()) { $data = array(); if($stmt_select->fetch()) { $data['id'] = $res_id; $data['rajya'] = $res_rajyastariy; $data['jilha'] = $res_jilhastariy; $data['kendra'] = $res_kendrastariy; return $data; } } return false; } } function get_value_of_result_setting_from_exam_result($rajya_standard) { $select_section = "State_Result"; if($stmt_select = $this->con->prepare("SELECT `id`, `section`, `student_number` FROM `exam_result` WHERE `standard`=? AND `section`=? ")) { $stmt_select->bind_param("ss", $rajya_standard,$select_section); $stmt_select->bind_result($res_id,$section,$student_number); if($stmt_select->execute()) { $data = array(); if($stmt_select->fetch()) { $data[0] = $res_id; $data[1] = $section; $data[2] = $student_number; return $data; } } return false; } } function get_value_of_result_setting_from_exam_result_jilha($jilha_standard,$current_jilha) { $select_section = "District_Result"; if($stmt_select = $this->con->prepare("SELECT `id`, `section`, `student_number` FROM `exam_result` WHERE `standard`=? AND `district`=? AND `section`=? ")) { $stmt_select->bind_param("sss",$jilha_standard,$current_jilha,$select_section); $stmt_select->bind_result($res_id,$section,$student_number); if($stmt_select->execute()) { $data = array(); if($stmt_select->fetch()) { $data[0] = $res_id; $data[1] = $section; $data[2] = $student_number; return $data; } } return false; } } function get_value_of_result_setting_from_exam_result_kendra($kendra_standard_val,$kendra_jilha,$kendra_center_name) { $select_section = "Center_Result"; if($stmt_select = $this->con->prepare("SELECT `id`, `section`, `student_number` FROM `exam_result` WHERE `standard`=? AND `district`=? AND `center`=? AND `section`=? ")) { $stmt_select->bind_param("ssss",$kendra_standard_val,$kendra_jilha,$kendra_center_name,$select_section); $stmt_select->bind_result($res_id,$section,$student_number); if($stmt_select->execute()) { $data = array(); if($stmt_select->fetch()) { $data[0] = $res_id; $data[1] = $section; $data[2] = $student_number; return $data; } } return false; } } function get_result_all_data() { if($stmt_select = $this->con->prepare("SELECT `reg_no`, `seat_no`, `bhasha_ganit`, `eng_buddhimatta`, `total_marks`, `shera` from `std_9_th`")) { $stmt_select->bind_result($reg_no,$seat_no,$bhasha_ganit,$eng_buddhimatta,$total_marks,$shera); if($stmt_select->execute()) { $data = array(); $counter = 0; while($stmt_select->fetch()) { $data[$counter]['id'] = $reg_no; $data[$counter]['center_name'] = $seat_no; $data[$counter]['standard'] = $bhasha_ganit; $data[$counter]['madhyam_and_fees']= $eng_buddhimatta; $data[$counter]['sirname'] = $total_marks; $data[$counter]['name'] = $shera; $counter++; } if(!empty($data)) { return $data; } else { return false; } } } } function update_records($reg_no,$seat_no,$bhasha_ganit,$eng_buddhimatta,$total_marks,$shera) { if($stmt_insert = $this->con->prepare("Update `registrations` SET `bhasha_ganit` = ?,`eng_buddhimatta`=?,`total_marks`=?,`shera`=? where `id`=? AND `exam_seat_number` = ?")) { $stmt_insert->bind_param("sssssi",$bhasha_ganit,$eng_buddhimatta,$total_marks,$shera,$reg_no,$seat_no); if($stmt_insert->execute()) { return true; } return false; } } function select_shera_display() { if($stmt_select = $this->con->prepare("SELECT `shera` from `registrations` where `id` = 117")) { $stmt_select->bind_result($result_password); if($stmt_select->execute()) { if($stmt_select->fetch()) { return $result_password; } } return false; } } function update_student_marks($reg_no,$seat_no,$bhasha_ganit,$eng_buddhimatta,$total) { if($stmt_insert = $this->con->prepare("Update `registrations` SET `bhasha_ganit` = ?,`eng_buddhimatta`=?,`total_marks`=? where `id`=? AND `exam_seat_number` = ?")) { $stmt_insert->bind_param("ssssis",$bhasha_ganit,$eng_buddhimatta,$total,$reg_no,$seat_no); if($stmt_insert->execute()) { return true; } return false; } } function get_user_marks_data($current_print_student_id) { if($stmt_select = $this->con->prepare("SELECT `id`, `bhasha_ganit`, `eng_buddhimatta`, `total_marks`, `shera` FROM `registrations` WHERE `id` = ?")) { $stmt_select->bind_param("i",$current_print_student_id); $stmt_select->bind_result($id,$bhasha_ganit,$eng_buddhimatta,$total_marks,$shera); if($stmt_select->execute()) { $data = array(); $counter = 0; if($stmt_select->fetch()) { $data[$counter]['id'] = $id; $data[$counter]['bhasha_ganit'] = $bhasha_ganit; $data[$counter]['eng_buddhimatta'] = $eng_buddhimatta; $data[$counter]['total_marks']= $total_marks; $data[$counter]['shera'] = $shera; $counter++; } if(!empty($data)) { return $data; } else { return false; } } } } function update_stud_marks_details($reg_number,$exam_seat_no,$bhasha_ganit,$eng_buddhimatta,$total_marks,$shera) { if($stmt_insert = $this->con->prepare("Update `registrations` SET `bhasha_ganit` = ?,`eng_buddhimatta`=?,`total_marks`=?,`shera`=? where `id`=?")) { $stmt_insert->bind_param("ssssi",$bhasha_ganit,$eng_buddhimatta,$total_marks,$shera,$reg_number); if($stmt_insert->execute()) { return true; } return false; } } function update_stud_marks_details_from_reg_no($reg_number,$shera) { if($stmt_insert = $this->con->prepare("Update `registrations` SET `shera`=? where `id`=?")) { $stmt_insert->bind_param("si",$shera,$reg_number); if($stmt_insert->execute()) { return true; } return false; } } function get_registered_students_result_data($post_center_name,$post_standard,$post_level,$student_name,$school_name,$jilha,$from_date,$to_date) { if($post_center_name=="केंद्र निवडा") { $post_center_name = ""; } if($post_standard=="ईयत्ता निवडा") { $post_standard = ""; } if($post_level=="माध्यम आणि फी निवडा") { $post_level = ""; } if($jilha=="जिल्हा निवडा") { $jilha = ""; } $from_date_stmt = ""; $to_date_stmt = ""; $date_stmt = ""; if($from_date=="" AND $to_date=="") { $date_stmt = ""; } else if($from_date=="" AND $to_date!="") { $from_date = "0000-00-00"; $date_stmt = "AND (`date` BETWEEN $from_date AND $to_date)"; } else if($from_date!="" AND $to_date=="") { $to_date = "4000-12-31"; $date_stmt = "AND (`date` BETWEEN $from_date AND $to_date)"; } else { $date_stmt = "AND (`date` BETWEEN '$from_date' AND '$to_date')"; } if($stmt_select = $this->con->prepare("SELECT `id`, `center_name`, `standard`, `madhyam_and_fees`, `sirname`, `name`, `father_name`, `mother_name`, `contact_number`, `principal_details`, `school_details`, `jilha`, `dd_number`, `date`, `time`, `exam_seat_number`,`bhasha_ganit`,`eng_buddhimatta`,`total_marks`,`shera` FROM `registrations` WHERE `center_name` LIKE '%".$post_center_name."%' AND `standard` LIKE '%".$post_standard."%' AND `madhyam_and_fees` LIKE '%".$post_level."%' AND (`sirname` LIKE '%".$student_name."%' OR `name` LIKE '%".$student_name."%' OR `father_name` LIKE '%".$student_name."%' OR `mother_name` LIKE '%".$student_name."%') AND `school_details` LIKE '%".$school_name."%' AND `jilha` LIKE '%".$jilha."%' ".$date_stmt)) { $stmt_select->bind_result($id,$center_name,$standard,$madhyam_and_fees,$sirname,$name,$father_name,$mother_name,$contact_number,$principal_details,$school_details,$jilha,$dd_number,$date,$time,$result_exam_seat_number,$bhasha_ganit,$eng_buddhimatta,$total_marks,$shera); if($stmt_select->execute()) { $data = array(); $count = 0; while($stmt_select->fetch()) { $data[$count]['id'] = $id; $data[$count]['center_name'] = $center_name; $data[$count]['standard'] = $standard; $data[$count]['madhyam_and_fees']= $madhyam_and_fees; $data[$count]['sirname'] = $sirname; $data[$count]['name'] = $name; $data[$count]['father_name'] = $father_name; $data[$count]['mother_name'] = $mother_name; $data[$count]['contact_number'] = $contact_number; $data[$count]['principal_details'] = $principal_details; $data[$count]['school_details'] = $school_details; $data[$count]['jilha'] = $jilha; $data[$count]['dd_number'] = $dd_number; $data[$count]['date'] = $date; $data[$count]['time'] = $time; $data[$count]['exam_seat_no'] = $result_exam_seat_number; $data[$count]['bhasha_ganit'] = $bhasha_ganit; $data[$count]['eng_buddhimatta'] = $eng_buddhimatta; $data[$count]['total_marks'] = $total_marks; $data[$count]['shera'] = $shera; $count++; } if(!empty($data)) { return $data; } else { return false; } } } } function truncate_students_data() { if($stmt_truncate = $this->con->prepare("truncate table `registrations`")) { if($stmt_truncate->execute()) { return true; } return false; } } function update_member_details($contact_person_name,$address,$contact_no,$email_id,$userid,$password,$current_edt_member_id) { $date = date("Y-m-d"); $time = date("H:i:s A"); if($stmt_insert = $this->con->prepare("UPDATE `memebrs` SET `member_name`= ?,`address`= ?,`contact_number`= ?,`email_id`= ?,`user_id`= ?,`password`= ?,`date`= ?,`time`= ? WHERE `id` = ?")) { $stmt_insert->bind_param("ssssssssi",$contact_person_name,$address,$contact_no,$email_id,$userid,$password,$date,$time,$current_edt_member_id); if($stmt_insert->execute()) { return true; } return false; } } function get_member_data_from_id($current_edt_member_id) { if($stmt_select = $this->con->prepare("SELECT `member_name`, `address`, `contact_number`, `email_id`, `user_id`, `password` FROM `memebrs` WHERE `id` = ?")) { $stmt_select->bind_param("i",$current_edt_member_id); $stmt_select->bind_result($res_member_name,$res_address,$res_cont_no,$res_email_id,$res_user_id,$res_password); if($stmt_select->execute()) { $data = array(); if($stmt_select->fetch()) { $data[0] = $res_member_name; $data[1] = $res_address; $data[2] = $res_cont_no; $data[3] = $res_email_id; $data[4] = $res_user_id; $data[5] = $res_password; } if(!empty($data)) { return $data; } else { return false; } } } } function updates_news_and_event($news,$current_edt_id) { $date = date("Y-m-d"); $time = date("H:i:s A"); if($stmt_insert = $this->con->prepare("UPDATE `news_and_events` SET `news`= ?,`date`= ?,`time`= ? WHERE `id` = ?")) { $stmt_insert->bind_param("sssi",$news,$date,$time,$current_edt_id); if($stmt_insert->execute()) { return true; } return false; } } function get_new_feed_data_from_id($current_edt_id) { if($stmt_select = $this->con->prepare("SELECT `news` FROM `news_and_events` WHERE `id` = ?")) { $stmt_select->bind_param("i",$current_edt_id); $stmt_select->bind_result($res_news); if($stmt_select->execute()) { if($stmt_select->fetch()) { return $res_news; } } return false; } } function update_new_fees_standard($standard,$marathi_fees,$semi_fees,$current_edt_id) { $date = date("Y-m-d"); $time = date("H:i:s A"); if($stmt_insert = $this->con->prepare("UPDATE `exam_fees` SET `standard`= ?,`marathi_fees`= ?,`semi_fees`= ?,`date`= ?,`time`= ? WHERE `id` = ?")) { $stmt_insert->bind_param("sssssi",$standard,$marathi_fees,$semi_fees,$date,$time,$current_edt_id); if($stmt_insert->execute()) { return true; } return false; } } function get_exam_fees_from_id($current_edt_id) { if($stmt_select = $this->con->prepare("SELECT `standard`, `marathi_fees`, `semi_fees` FROM `exam_fees` WHERE `id` = ?")) { $stmt_select->bind_param("i",$current_edt_id); $stmt_select->bind_result($res_standard,$res_marathi_fees,$res_semi_fees); if($stmt_select->execute()) { $data = array(); if($stmt_select->fetch()) { $data[0] = $res_standard; $data[1] = $res_marathi_fees; $data[2] = $res_semi_fees; } if(!empty($data)) { return $data; } else { return false; } } } } function get_home_page_instruction_from_id($current_edt_id) { if($stmt_select = $this->con->prepare("SELECT `info` FROM `main_page_mahiti` WHERE `id` = ?")) { $stmt_select->bind_param("i",$current_edt_id); $stmt_select->bind_result($res_info); if($stmt_select->execute()) { if($stmt_select->fetch()) { return $res_info; } } return false; } } function update_new_main_page_info($text_data,$current_edt_id) { $date = date("Y-m-d"); $time = date("H:i:s A"); if($stmt_insert = $this->con->prepare("UPDATE `main_page_mahiti` SET `info`= ?,`date`= ?,`time`= ? WHERE `id` = ?")) { $stmt_insert->bind_param("sssi",$text_data,$date,$time,$current_edt_id); if($stmt_insert->execute()) { return true; } return false; } } function update_registration_page_mahiti_page_info($text_data,$current_edt_id) { $date = date("Y-m-d"); $time = date("H:i:s A"); if($stmt_insert = $this->con->prepare("UPDATE `registration_page_mahiti` SET `info`= ?,`date`= ?,`time`= ? WHERE `id` = ?")) { $stmt_insert->bind_param("sssi",$text_data,$date,$time,$current_edt_id); if($stmt_insert->execute()) { return true; } return false; } } function get_reg_form_instruction_from_id($current_edt_id) { if($stmt_select = $this->con->prepare("SELECT `info` FROM `registration_page_mahiti` WHERE `id` = ?")) { $stmt_select->bind_param("i",$current_edt_id); $stmt_select->bind_result($res_info); if($stmt_select->execute()) { if($stmt_select->fetch()) { return $res_info; } } return false; } } function updates_news_and_event_for_members($news,$current_edt_id) { $date = date("Y-m-d"); $time = date("H:i:s A"); if($stmt_insert = $this->con->prepare("UPDATE `members_news` SET `news`= ?,`date`= ?,`time`= ? WHERE `id` = ?")) { $stmt_insert->bind_param("sssi",$news,$date,$time,$current_edt_id); if($stmt_insert->execute()) { return true; } return false; } } function get_members_news_feed_from_id($current_edt_id) { if($stmt_select = $this->con->prepare("SELECT `news` FROM `members_news` WHERE `id` = ?")) { $stmt_select->bind_param("i",$current_edt_id); $stmt_select->bind_result($res_news); if($stmt_select->execute()) { if($stmt_select->fetch()) { return $res_news; } } return false; } } function update_prices_from_id($standard,$price_number,$prices_amount,$certificate_material,$current_edt_id) { $date = date("Y-m-d"); $time = date("H:i:s A"); if($stmt_insert = $this->con->prepare("UPDATE `prices` SET `standard`= ?,`price_number`= ?,`price_amount`= ?,`certificate_material`= ?,`date`= ?,`time`= ? WHERE `id` = ?")) { $stmt_insert->bind_param("ssssssi",$standard,$price_number,$prices_amount,$certificate_material,$date,$time,$current_edt_id); if($stmt_insert->execute()) { return true; } return false; } } function get_prices_data_from_id($current_edt_id) { if($stmt_select = $this->con->prepare("SELECT `standard`, `price_number`, `price_amount`, `certificate_material` FROM `prices` WHERE `id` = ?")) { $stmt_select->bind_param("i",$current_edt_id); $stmt_select->bind_result($res_standard,$res_price_no,$res_price_amount,$res_certificate_material); if($stmt_select->execute()) { $data = array(); if($stmt_select->fetch()) { $data[0] = $res_standard; $data[1] = $res_price_no; $data[2] = $res_price_amount; $data[3] = $res_certificate_material; } if(!empty($data)) { return $data; } else { return false; } } } } function get_exam_date_and_time_for_first_and_second() { if($stmt_select = $this->con->prepare("SELECT `sub_maths_time_first_second`,`sub_buddhimatta_english_time_first_second` FROM `settings`")) { $stmt_select->bind_result($res_sub_maths_time_first_second, $res_sub_buddhimatta_english_time_first_second); if($stmt_select->execute()) { $data = array(); if($stmt_select->fetch()) { $data[0] = $res_sub_maths_time_first_second; $data[1] = $res_sub_buddhimatta_english_time_first_second; } if(!empty($data)) { return $data; } else { return false; } } } } function get_pariksha_form_status() { if($stmt_select = $this->con->prepare("SELECT `pariksha_form` FROM `settings`")) { $stmt_select->bind_result($pariksha_form); if($stmt_select->execute()) { if($stmt_select->fetch()) { return $pariksha_form; } return false; } } } function get_hall_ticket_status() { if($stmt_select = $this->con->prepare("SELECT `hall_ticket` FROM `settings`")) { $stmt_select->bind_result($hall_ticket); if($stmt_select->execute()) { if($stmt_select->fetch()) { return $hall_ticket; } return false; } } } function get_result_status() { if($stmt_select = $this->con->prepare("SELECT `result_section` FROM `settings`")) { $stmt_select->bind_result($result_section); if($stmt_select->execute()) { if($stmt_select->fetch()) { return $result_section; } return false; } } } function get_uttarsuchi_status() { if($stmt_select = $this->con->prepare("SELECT `answer_sheet` FROM `settings`")) { $stmt_select->bind_result($answer_sheet); if($stmt_select->execute()) { if($stmt_select->fetch()) { return $answer_sheet; } return false; } } } function get_exam_date_and_time_for_third_to_seventh() { if($stmt_select = $this->con->prepare("SELECT `sub_maths_time_third_to_seventh`,`sub_buddhimatta_english_time_third_to_seventh` FROM `settings`")) { $stmt_select->bind_result($sub_maths_time_third_to_seventh, $sub_buddhimatta_english_time_third_to_seventh); if($stmt_select->execute()) { $data = array(); if($stmt_select->fetch()) { $data[0] = $sub_maths_time_third_to_seventh; $data[1] = $sub_buddhimatta_english_time_third_to_seventh; } if(!empty($data)) { return $data; } else { return false; } } } } function get_exam_date() { if($stmt_select = $this->con->prepare("SELECT `exam_date` FROM `settings`")) { $stmt_select->bind_result($exam_date); if($stmt_select->execute()) { if($stmt_select->fetch()) { return $exam_date; } return false; } } } function get_result_date() { if($stmt_select = $this->con->prepare("SELECT `exam_result_date` FROM `settings`")) { $stmt_select->bind_result($exam_result_date); if($stmt_select->execute()) { if($stmt_select->fetch()) { return $exam_result_date; } return false; } } } function update_settings_record($exam_date,$exam_result_date,$sub_maths_time_first_second,$sub_maths_time_third_to_seventh,$sub_buddhimatta_english_time_first_second,$sub_buddhimatta_english_time_third_to_seventh) { if($stmt_insert = $this->con->prepare("UPDATE `settings` SET `exam_date`=?,`exam_result_date`=?,`sub_maths_time_first_second`=?,`sub_maths_time_third_to_seventh`=?,`sub_buddhimatta_english_time_first_second`=?,`sub_buddhimatta_english_time_third_to_seventh`=?")) { $stmt_insert->bind_param("ssssss",$exam_date,$exam_result_date,$sub_maths_time_first_second,$sub_maths_time_third_to_seventh,$sub_buddhimatta_english_time_first_second,$sub_buddhimatta_english_time_third_to_seventh); if($stmt_insert->execute()) { return true; } return false; } } function update_result_yadi_settings_record($rajya,$jilha,$kendra) { if($stmt_insert = $this->con->prepare("UPDATE `nikal_gunvant_settings` SET `rajyastariy`=?,`jilhastariy`=?,`kendrastariy`=?")) { $stmt_insert->bind_param("sss",$rajya,$jilha,$kendra); if($stmt_insert->execute()) { return true; } return false; } } function set_exam_form_off() { if($stmt_insert = $this->con->prepare("UPDATE `settings` SET `pariksha_form` = 'off'")) { if($stmt_insert->execute()) { return true; } return false; } } function set_exam_form_on() { if($stmt_insert = $this->con->prepare("UPDATE `settings` SET `pariksha_form` = 'on'")) { if($stmt_insert->execute()) { return true; } return false; } } function set_hall_ticket_off() { if($stmt_insert = $this->con->prepare("UPDATE `settings` SET `hall_ticket` = 'off'")) { if($stmt_insert->execute()) { return true; } return false; } } function set_hall_ticket_on() { if($stmt_insert = $this->con->prepare("UPDATE `settings` SET `hall_ticket` = 'on'")) { if($stmt_insert->execute()) { return true; } return false; } } function set_result_section_off() { if($stmt_insert = $this->con->prepare("UPDATE `settings` SET `result_section` = 'off'")) { if($stmt_insert->execute()) { return true; } return false; } } function set_result_section_on() { if($stmt_insert = $this->con->prepare("UPDATE `settings` SET `result_section` = 'on'")) { if($stmt_insert->execute()) { return true; } return false; } } function set_answer_sheet_section_off() { if($stmt_insert = $this->con->prepare("UPDATE `settings` SET `answer_sheet` = 'off'")) { if($stmt_insert->execute()) { return true; } return false; } } function set_answer_sheet_section_on() { if($stmt_insert = $this->con->prepare("UPDATE `settings` SET `answer_sheet` = 'on'")) { if($stmt_insert->execute()) { return true; } return false; } } function get_setting_data() { if($stmt_select = $this->con->prepare("SELECT `id`,`exam_date`, `exam_result_date`, `sub_maths_time_first_second`, `sub_maths_time_third_to_seventh`, `sub_buddhimatta_english_time_first_second`, `sub_buddhimatta_english_time_third_to_seventh` FROM `settings`")) { $stmt_select->bind_result($res_id, $exam_date, $res_exam_result_date, $res_sub_maths_time_first_second, $res_sub_maths_time_third_to_seventh, $res_sub_buddhimatta_english_time_first_second, $res_sub_buddhimatta_english_time_third_to_seventh); if($stmt_select->execute()) { $data = array(); if($stmt_select->fetch()) { $data[0] = $res_id; $data[1] = $exam_date; $data[2] = $res_exam_result_date; $data[3] = $res_sub_maths_time_first_second; $data[4] = $res_sub_maths_time_third_to_seventh; $data[5] = $res_sub_buddhimatta_english_time_first_second; $data[6] = $res_sub_buddhimatta_english_time_third_to_seventh; } if(!empty($data)) { return $data; } else { return false; } } } } function get_result_setting_data() { if($stmt_select = $this->con->prepare("SELECT `id`, `rajyastariy`, `jilhastariy`, `kendrastariy` FROM `nikal_gunvant_settings`")) { $stmt_select->bind_result($res_id, $rajyastariy, $jilhastariy, $kendrastariy); if($stmt_select->execute()) { $data = array(); if($stmt_select->fetch()) { $data[0] = $res_id; $data[1] = $rajyastariy; $data[2] = $jilhastariy; $data[3] = $kendrastariy; } if(!empty($data)) { return $data; } else { return false; } } } } function save_state_result_record($section,$rajy_standard_val,$student_number) { $date = date("Y-m-d"); $time = date("H:i:s A"); if($stmt_insert = $this->con->prepare("INSERT INTO `exam_result`(`section`, `standard`, `student_number`,`date`, `time`) VALUES (?,?,?,?,?)")) { $stmt_insert->bind_param("sssss",$section,$rajy_standard_val,$student_number,$date,$time); if($stmt_insert->execute()) { return true; } return false; } } function save_district_result_record($section,$j_jilha_val,$jilha_standard_val,$student_number) { $date = date("Y-m-d"); $time = date("H:i:s A"); if($stmt_insert = $this->con->prepare("INSERT INTO `exam_result`(`section`, `district`,`standard`, `student_number`,`date`, `time`) VALUES (?,?,?,?,?,?)")) { $stmt_insert->bind_param("ssssss",$section,$j_jilha_val,$jilha_standard_val,$student_number,$date,$time); if($stmt_insert->execute()) { return true; } return false; } } function save_center_result_record($section,$kendra_jilha,$center_id,$kendra_standard_val,$student_number) { $date = date("Y-m-d"); $time = date("H:i:s A"); if($stmt_insert = $this->con->prepare("INSERT INTO `exam_result`(`section`, `district`,`center`,`standard`, `student_number`,`date`, `time`) VALUES (?,?,?,?,?,?,?)")) { $stmt_insert->bind_param("sssssss",$section,$kendra_jilha,$center_id,$kendra_standard_val,$student_number,$date,$time); if($stmt_insert->execute()) { return true; } return false; } } function get_exist_state_result($section,$rajy_standard_val) { if($stmt_select = $this->con->prepare("SELECT `id` FROM `exam_result` WHERE `section`=? AND `standard`=?")) { $stmt_select->bind_param("ss",$section,$rajy_standard_val); $stmt_select->bind_result($result_id); if($stmt_select->execute()) { if($stmt_select->fetch()) { return $result_id; } } return false; } } function update_state_result_record($section,$rajy_standard_val,$student_number,$exist_id) { if($stmt_insert = $this->con->prepare("UPDATE `exam_result` SET `section`=?,`standard`=?,`student_number`=? WHERE `id`=?")) { $stmt_insert->bind_param("ssss",$section,$rajy_standard_val,$student_number,$exist_id); if($stmt_insert->execute()) { return true; } return false; } } function get_exist_district_result($section,$j_jilha_val,$jilha_standard_val) { if($stmt_select = $this->con->prepare("SELECT `id` FROM `exam_result` WHERE `section`=? AND `district`=? AND `standard`=?")) { $stmt_select->bind_param("sss",$section,$j_jilha_val,$jilha_standard_val); $stmt_select->bind_result($result_id); if($stmt_select->execute()) { if($stmt_select->fetch()) { return $result_id; } } return false; } } function update_district_result_record($section,$j_jilha_val,$jilha_standard_val,$student_number,$exist_id) { if($stmt_insert = $this->con->prepare("UPDATE `exam_result` SET `section`=?, `district`=?,`standard`=?,`student_number`=? WHERE `id`=?")) { $stmt_insert->bind_param("sssss",$section,$j_jilha_val,$jilha_standard_val,$student_number,$exist_id); if($stmt_insert->execute()) { return true; } return false; } } function get_exist_center_result($section,$kendra_jilha,$center_id,$kendra_standard_val) { if($stmt_select = $this->con->prepare("SELECT `id` FROM `exam_result` WHERE `section`=? AND `district`=? AND `center`=? AND `standard`=?")) { $stmt_select->bind_param("ssss",$section,$kendra_jilha,$center_id,$kendra_standard_val); $stmt_select->bind_result($result_id); if($stmt_select->execute()) { if($stmt_select->fetch()) { return $result_id; } } return false; } } function update_center_result_record($section,$kendra_jilha,$center_id,$kendra_standard_val,$student_number,$exist_id) { if($stmt_insert = $this->con->prepare("UPDATE `exam_result` SET `section`=?, `district`=?,`center`=? ,`standard`=?,`student_number`=? WHERE `id`=?")) { $stmt_insert->bind_param("ssssss",$section,$kendra_jilha,$center_id,$kendra_standard_val,$student_number,$exist_id); if($stmt_insert->execute()) { return true; } return false; } } function update_student_result_rajya($shera_cntr,$result_exam_seat_number) { if($stmt_insert = $this->con->prepare("UPDATE `registrations` SET `shera`=? WHERE `exam_seat_number`=?")) { $stmt_insert->bind_param("ss",$shera_cntr,$result_exam_seat_number); if($stmt_insert->execute()) { return true; } return false; } } function update_student_result_kendra($shera_cntr,$result_exam_seat_number) { if($stmt_insert = $this->con->prepare("UPDATE `registrations` SET `shera`=? WHERE `exam_seat_number`=?")) { $stmt_insert->bind_param("ss",$shera_cntr,$result_exam_seat_number); if($stmt_insert->execute()) { return true; } return false; } } function update_student_result_jilha($shera_cntr,$result_exam_seat_number) { if($stmt_insert = $this->con->prepare("UPDATE `registrations` SET `shera`=? WHERE `exam_seat_number`=?")) { $stmt_insert->bind_param("ss",$shera_cntr,$result_exam_seat_number); if($stmt_insert->execute()) { return true; } return false; } } function get_center_name_from_district($res_jilha) { if($stmt_select = $this->con->prepare("SELECT `id`, `center_name`, `address`, `contact_no`, `fax_number`, `email_id`, `jilha`, `date`, `time`,`contact_person_name` FROM `centers` WHERE `jilha`=?")) { $stmt_select->bind_param("s",$res_jilha); $stmt_select->bind_result($id,$center_name,$address,$contact_no,$fax_number,$email_id,$jilha,$date,$time,$contact_person_name); if($stmt_select->execute()) { $data = array(); $count = 0; while($stmt_select->fetch()) { $data[$count][0] = $id; $data[$count][1] = $center_name; $data[$count][2] = $address; $data[$count][3] = $contact_no; $data[$count][4] = $fax_number; $data[$count][5] = $email_id; $data[$count][6] = $jilha; $data[$count][7] = $date; $data[$count][8] = $time; $data[$count][9] = $contact_person_name; $count++; } if(!empty($data)) { return $data; } else { return false; } } } } function update_shera($rajy_standard_val,$shera) { if($stmt_insert = $this->con->prepare("UPDATE `registrations` SET `shera`=? WHERE `standard`=?")) { $stmt_insert->bind_param("ss",$shera,$rajy_standard_val); if($stmt_insert->execute()) { return true; } return false; } } function update_district_shera($j_jilha_val,$jilha_standard_val,$shera) { if($stmt_insert = $this->con->prepare("UPDATE `registrations` SET `shera`=? WHERE `standard`=? AND `jilha`=? ")) { $stmt_insert->bind_param("sss",$shera,$jilha_standard_val,$j_jilha_val); if($stmt_insert->execute()) { return true; } return false; } } function update_center_shera($kendra_jilha,$kendra_standard_val,$center_id,$shera) { if($stmt_insert = $this->con->prepare("UPDATE `registrations` SET `shera`=? WHERE `standard`=? AND `jilha`=? AND `center_id`=? ")) { $stmt_insert->bind_param("ssss",$shera,$kendra_standard_val,$kendra_jilha,$center_id); if($stmt_insert->execute()) { return true; } return false; } } function get_marklist_status() { if($stmt_select = $this->con->prepare("SELECT `marklist` FROM `settings`")) { $stmt_select->bind_result($result_section); if($stmt_select->execute()) { if($stmt_select->fetch()) { return $result_section; } return false; } } } function set_nikal_section_off() { if($stmt_insert = $this->con->prepare("UPDATE `settings` SET `marklist` = 'off'")) { if($stmt_insert->execute()) { return true; } return false; } } function set_nikal_section_on() { if($stmt_insert = $this->con->prepare("UPDATE `settings` SET `marklist` = 'on'")) { if($stmt_insert->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