Şuanki Dizin: /home/wwwdreamtechnolo/public_html/pdpczare.com/879_dfdf7_sdddadmin/lib/ |
Şuanki Dosya : /home/wwwdreamtechnolo/public_html/pdpczare.com/879_dfdf7_sdddadmin/lib/functions2.php |
<?php session_start(); //date_default_timezone_set('Asia/Kolkata'); class login_function { private $con; function __construct() { $this->con = new mysqli("localhost","rpcollege_admin_db","YdV?QK#3Rtjg","rpcollege_rp_college_main"); //$this->con = new mysqli("localhost","root","","rpcollege_rp_college_main"); } function get_unique_qualitative_quantitative_details() { if($stmt=$this->con->prepare("SELECT DISTINCT(`year`) FROM `panel`")) { $stmt->bind_result($year); if($stmt->execute()) { $data=array(); $counter=0; while($stmt->fetch()) { $data[$counter] = $year; $counter ++; } if(!empty($data)) { return $data; } } else { return false; } } } function get_unique_dvv_year_details() { if($stmt=$this->con->prepare("SELECT DISTINCT(`year`) FROM `dvv_docs`")) { $stmt->bind_result($year); if($stmt->execute()) { $data=array(); $counter=0; while($stmt->fetch()) { $data[$counter] = $year; $counter ++; } if(!empty($data)) { return $data; } } else { return false; } } } function get_stud_data_from_email_new($email) { if($stmt_insert = $this->con->prepare("SELECT `first_name`, `last_name`, `roll_no` FROM `student_data` Where `email` = ?")) { $stmt_insert->bind_param("s",$email); $stmt_insert->bind_result($first_name,$last_name,$roll_no); if($stmt_insert->execute()) { $counter = 0; $details = array(); while($stmt_insert->fetch()) { $details[0] = $first_name." ".$last_name; $details[1] = $roll_no; $counter++; } if(!empty($details)) { return $details; } return false; } } } function get_all_attendance_data_of_student_for_panel($department,$semster,$division,$batch,$s_name,$subject_type,$u_email,$from_date,$to_date) { if($department=="Select Department") { $department = ""; } if($semster=="Select Semester") { $semster = ""; } if($division=="Select Division") { $division = ""; } if($batch=="Select Batch") { $batch = ""; } if($s_name=="Select Subject Name") { $s_name = ""; } if($subject_type=="Select Subject Type") { $subject_type = ""; } if($stmt_insert = $this->con->prepare("SELECT `student_email`,`attendance_date`, `attendance` FROM `student_attendance` WHERE `department` LIKE '%$department%' AND `semester` LIKE '%$semster%' AND `division` LIKE '%$division%' AND `batch` LIKE '%$batch%' AND `class_type` LIKE '%$subject_type%' AND `subject` LIKE '%$s_name%' AND `student_email` LIKE '%$u_email%' AND (`attendance_date` BETWEEN '$from_date' AND '$to_date')")) { $stmt_insert->bind_result($student_email,$attendance_date,$attendance); if($stmt_insert->execute()) { $counter = 0; $details = array(); while($stmt_insert->fetch()) { $details[$counter][0] = $student_email; $details[$counter][1] = $attendance_date; $details[$counter][2] = $attendance; $counter++; } if(!empty($details)) { return $details; } return false; } } } function get_student_email_from_roll_no($roll_no) { if($stmt_select = $this->con->prepare("Select `email` from `student_data` where `roll_no` = ? ")) { $stmt_select->bind_param("s",$roll_no); $stmt_select->bind_result($result_password); if($stmt_select->execute()) { if($stmt_select->fetch()) { return $result_password; } } return false; } } function check_email_exist_or_not_in_staff_for_import($email) { if($stmt_select = $this->con->prepare("Select `id` from `staff_data` 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_password_from_user_name($email) { if($stmt_select = $this->con->prepare("Select `password` from `admin` where `admin_name` = ? ")) { $stmt_select->bind_param("s",$email); $stmt_select->bind_result($result_password); if($stmt_select->execute()) { if($stmt_select->fetch()) { return $result_password; } } return false; } } function change_user_password($email,$password) { $date = date("Y-m-d"); $time = date("H:i:s A"); if($stmt_select = $this->con->prepare("update `admin` set `password`='".$password."' where `admin_name` = ?")) { $stmt_select->bind_param("s",$email); if($stmt_select->execute()) { return true; } return false; } } function new_slider_images($actual_image_name) { $date = date("Y-m-d"); $time = date("H-i-s A"); if($stmt_insert = $this->con->prepare("INSERT INTO `slider_images`(`images`, `date`, `time`) VALUES (?,?,?)")) { $stmt_insert->bind_param("sss",$actual_image_name,$date,$time); if($stmt_insert->execute()) { return true; } return false; } } function add_user_feedback($name,$class,$roll_no,$aademic_year,$suggestions_any,$option1,$option2,$option3,$option4,$option5,$option6,$option7,$option8,$option9,$option10,$option11,$option12,$option13,$option14,$option15,$option16,$option17,$option18,$option19,$option20,$option21,$option22,$option23,$option24) { $date = date("Y-m-d"); $time = date("H-i-s A"); if($stmt_insert = $this->con->prepare("INSERT INTO `feedback`(`name`, `class`, `roll_no`, `academic_year`, `suggestions`, `option1`, `option2`, `option3`, `option4`, `option5`, `option6`, `option7`, `option8`, `option9`, `option10`, `option11`, `option12`, `option13`, `option14`, `option15`, `option16`, `option17`, `option18`, `option19`, `option20`, `option21`, `option22`, `option23`, `option24`, `date`, `time`) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)")) { $stmt_insert->bind_param("sssssssssssssssssssssssssssssss",$name,$class,$roll_no,$aademic_year,$suggestions_any,$option1,$option2,$option3,$option4,$option5,$option6,$option7,$option8,$option9,$option10,$option11,$option12,$option13,$option14,$option15,$option16,$option17,$option18,$option19,$option20,$option21,$option22,$option23,$option24,$date,$time); if($stmt_insert->execute()) { return true; } return false; } } function get_all_slider_images() { if($stmt_insert = $this->con->prepare("SELECT `id`,`images` FROM `slider_images`")) { $stmt_insert->bind_result($id,$images); if($stmt_insert->execute()) { $counter = 0; $details = array(); while($stmt_insert->fetch()) { $details[$counter][0] = $id; $details[$counter][1] = $images; $counter++; } if(!empty($details)) { return $details; } return false; } } } function delete_slider_images($del_id) { if($stmt_select = $this->con->prepare("Delete from `slider_images` where `id`=?")) { $stmt_select->bind_param("i",$del_id); if($stmt_select->execute()) { return true; } return false; } } function add_faculty($full_name,$designation,$qualification,$subject,$experience,$email,$department,$staff,$actual_image_name,$link) { $date = date("Y-m-d"); $time = date("H-i-s A"); if($stmt_insert = $this->con->prepare("INSERT INTO `faculty_information`(`full_name`,`designation`,`qualification`,`subject`,`experience`,`email`,`department`,`staff`,`profile`,`link`, `date`, `time`) VALUES (?,?,?,?,?,?,?,?,?,?,?,?)")) { $stmt_insert->bind_param("ssssssssssss",$full_name,$designation,$qualification,$subject,$experience,$email,$department,$staff,$actual_image_name,$link,$date,$time); if($stmt_insert->execute()) { return true; } return false; } } function get_all_faculty_info() { if($stmt_insert = $this->con->prepare("SELECT `id`,`full_name`,`designation`,`qualification`,`subject`,`experience`,`email`,`department`,`staff`,`profile`,`link` FROM `faculty_information`")) { $stmt_insert->bind_result($id,$full_name,$designation,$qualification,$subject,$experience,$email,$department,$staff,$profile,$link); if($stmt_insert->execute()) { $counter = 0; $details = array(); while($stmt_insert->fetch()) { $details[$counter][0] = $id; $details[$counter][1] = $full_name; $details[$counter][2] = $designation; $details[$counter][3] = $qualification; $details[$counter][4] = $subject; $details[$counter][5] = $experience; $details[$counter][6] = $email; $details[$counter][7] = $department; $details[$counter][8] = $staff; $details[$counter][9] = $profile; $details[$counter][10] = $profile; $counter++; } if(!empty($details)) { return $details; } return false; } } } function delete_faculty_info($del_id) { if($stmt_select = $this->con->prepare("Delete from `faculty_information` where `id`=?")) { $stmt_select->bind_param("i",$del_id); if($stmt_select->execute()) { return true; } return false; } } function get_all_faculty_info_by_id($up_id) { if($stmt_insert = $this->con->prepare("SELECT `id`,`full_name`,`designation`,`qualification`,`subject`,`experience`,`email`,`department`,`staff`,`profile` ,`link` FROM `faculty_information` Where `id` = ?")) { $stmt_insert->bind_param("i",$up_id); $stmt_insert->bind_result($id,$full_name,$designation,$qualification,$subject,$experience,$email,$department,$staff,$profile,$link); if($stmt_insert->execute()) { $counter = 0; $details = array(); while($stmt_insert->fetch()) { $details[$counter][0] = $id; $details[$counter][1] = $full_name; $details[$counter][2] = $designation; $details[$counter][3] = $qualification; $details[$counter][4] = $subject; $details[$counter][5] = $experience; $details[$counter][6] = $email; $details[$counter][7] = $department; $details[$counter][8] = $staff; $details[$counter][9] = $profile; $details[$counter][10] = $link; $counter++; } if(!empty($details)) { return $details; } return false; } } } function update_faculty_profile($up_id) { $actual_image_name=""; if($stmt_insert = $this->con->prepare("UPDATE `faculty_information` set `profile` = ? Where `id`=?")) { $stmt_insert->bind_param("si",$actual_image_name,$up_id); if($stmt_insert->execute()) { return true; } return false; } } function get_faculty_image_name_by_id($id) { if($stmt_select = $this->con->prepare("Select `profile` from `faculty_information` where `id` = ? ")) { $stmt_select->bind_param("i",$id); $stmt_select->bind_result($result_password); if($stmt_select->execute()) { if($stmt_select->fetch()) { return $result_password; } } return false; } } function update_faculty_image_info($up_id,$image) { if($stmt_insert = $this->con->prepare("UPDATE `faculty_information` set `profile` = ? Where `id`=?")) { $stmt_insert->bind_param("si",$image,$up_id); if($stmt_insert->execute()) { return true; } return false; } } function update_faculty($up_id,$full_name,$designation,$qualification,$subject,$experience,$email,$department,$staff,$actual_image_name,$web_link) { echo $web_link; $date = date("Y-m-d"); $time = date("H-i-s A"); if($stmt_insert = $this->con->prepare("UPDATE `faculty_information` set `full_name`=?,`designation`=?,`qualification`=?,`subject`=?,`experience`=?,`email`=?,`department`=?,`staff`=?,`link` = ? Where `id`=?")) { $stmt_insert->bind_param("sssssssssi",$full_name,$designation,$qualification,$subject,$experience,$email,$department,$staff,$web_link,$up_id); if($stmt_insert->execute()) { return true; } return false; } } function get_facebook_link() { if($stmt_select = $this->con->prepare("Select `link` from `social_media` where `name` = 'facebook' ")) { $stmt_select->bind_result($result_link); if($stmt_select->execute()) { if($stmt_select->fetch()) { return $result_link; } } return false; } } function get_twitter_link() { if($stmt_select = $this->con->prepare("Select `link` from `social_media` where `name` = 'twitter' ")) { $stmt_select->bind_result($result_link); if($stmt_select->execute()) { if($stmt_select->fetch()) { return $result_link; } } return false; } } function get_linked_link() { if($stmt_select = $this->con->prepare("Select `link` from `social_media` where `name` = 'linked in' ")) { $stmt_select->bind_result($result_link); if($stmt_select->execute()) { if($stmt_select->fetch()) { return $result_link; } } return false; } } function get_google_link() { if($stmt_select = $this->con->prepare("Select `link` from `social_media` where `name` = 'google+' ")) { $stmt_select->bind_result($result_link); if($stmt_select->execute()) { if($stmt_select->fetch()) { return $result_link; } } return false; } } function update_social_media($facebook) { if($stmt_insert = $this->con->prepare("UPDATE `social_media` set `link` = ? Where `name` = 'facebook' ")) { $stmt_insert->bind_param("s",$facebook); if($stmt_insert->execute()) { return true; } return false; } } function update_social_media1($twitter) { if($stmt_insert = $this->con->prepare("UPDATE `social_media` set `link` = ? Where `name` = 'twitter' ")) { $stmt_insert->bind_param("s",$twitter); if($stmt_insert->execute()) { return true; } return false; } } function update_social_media2($facebook) { if($stmt_insert = $this->con->prepare("UPDATE `social_media` set `link` = ? Where `name` = 'linked in' ")) { $stmt_insert->bind_param("s",$facebook); if($stmt_insert->execute()) { return true; } return false; } } function update_social_media3($twitter) { if($stmt_insert = $this->con->prepare("UPDATE `social_media` set `link` = ? Where `name` = 'google+' ")) { $stmt_insert->bind_param("s",$twitter); if($stmt_insert->execute()) { return true; } return false; } } function update_visitor($counter) { if($stmt_insert = $this->con->prepare("UPDATE `visitors` set `total_counter` = ? ")) { $stmt_insert->bind_param("s",$counter); if($stmt_insert->execute()) { return true; } return false; } } function get_counter() { if($stmt_select = $this->con->prepare("Select `total_counter` from `visitors` ")) { $stmt_select->bind_result($result); if($stmt_select->execute()) { if($stmt_select->fetch()) { return $result; } } return false; } } function get_all_faculty_info_deptwise($department,$staffwise) { if($stmt_insert = $this->con->prepare("SELECT `id`,`full_name`,`designation`,`qualification`,`subject`,`experience`,`email`,`department`,`staff`,`profile` ,`link` FROM `faculty_information` Where `department` = ? AND `staff` = ?")) { $stmt_insert->bind_param("ss",$department,$staffwise); $stmt_insert->bind_result($id,$full_name,$designation,$qualification,$subject,$experience,$email,$department,$staff,$profile,$link); if($stmt_insert->execute()) { $counter = 0; $details = array(); while($stmt_insert->fetch()) { $details[$counter][0] = $id; $details[$counter][1] = $full_name; $details[$counter][2] = $designation; $details[$counter][3] = $qualification; $details[$counter][4] = $subject; $details[$counter][5] = $experience; $details[$counter][6] = $email; $details[$counter][7] = $department; $details[$counter][8] = $staff; $details[$counter][9] = $profile; $details[$counter][10] = $link; $counter++; } if(!empty($details)) { return $details; } return false; } } } function new_scholarship($actual_image_name) { $date = date("Y-m-d"); $time = date("H-i-s A"); if($stmt_insert = $this->con->prepare("INSERT INTO `scholarships`(`images`, `date`, `time`) VALUES (?,?,?)")) { $stmt_insert->bind_param("sss",$actual_image_name,$date,$time); if($stmt_insert->execute()) { return true; } return false; } } function delete_scholarship($del_id) { if($stmt_select = $this->con->prepare("Delete from `scholarships` where `id`=?")) { $stmt_select->bind_param("i",$del_id); if($stmt_select->execute()) { return true; } return false; } } function get_all_scholarship() { if($stmt_insert = $this->con->prepare("SELECT `id`,`images` FROM `scholarships`")) { $stmt_insert->bind_result($id,$images); if($stmt_insert->execute()) { $counter = 0; $details = array(); while($stmt_insert->fetch()) { $details[$counter][0] = $id; $details[$counter][1] = $images; $counter++; } if(!empty($details)) { return $details; } return false; } } } function new_governing_body($actual_image_name) { $date = date("Y-m-d"); $time = date("H-i-s A"); if($stmt_insert = $this->con->prepare("INSERT INTO `governing_body`(`images`, `date`, `time`) VALUES (?,?,?)")) { $stmt_insert->bind_param("sss",$actual_image_name,$date,$time); if($stmt_insert->execute()) { return true; } return false; } } function delete_governing_body($del_id) { if($stmt_select = $this->con->prepare("Delete from `governing_body` where `id`=?")) { $stmt_select->bind_param("i",$del_id); if($stmt_select->execute()) { return true; } return false; } } function get_all_governing_body() { if($stmt_insert = $this->con->prepare("SELECT `id`,`images` FROM `governing_body` ORDER BY `id` DESC")) { $stmt_insert->bind_result($id,$images); if($stmt_insert->execute()) { $counter = 0; $details = array(); while($stmt_insert->fetch()) { $details[$counter][0] = $id; $details[$counter][1] = $images; $counter++; } if(!empty($details)) { return $details; } return false; } } } function new_local_managing_body($actual_image_name) { $date = date("Y-m-d"); $time = date("H-i-s A"); if($stmt_insert = $this->con->prepare("INSERT INTO `local_managing_body`(`images`, `date`, `time`) VALUES (?,?,?)")) { $stmt_insert->bind_param("sss",$actual_image_name,$date,$time); if($stmt_insert->execute()) { return true; } return false; } } function delete_local_managing_body($del_id) { if($stmt_select = $this->con->prepare("Delete from `local_managing_body` where `id`=?")) { $stmt_select->bind_param("i",$del_id); if($stmt_select->execute()) { return true; } return false; } } function get_all_local_managing() { if($stmt_insert = $this->con->prepare("SELECT `id`,`images` FROM `local_managing_body` ORDER BY `id` DESC")) { $stmt_insert->bind_result($id,$images); if($stmt_insert->execute()) { $counter = 0; $details = array(); while($stmt_insert->fetch()) { $details[$counter][0] = $id; $details[$counter][1] = $images; $counter++; } if(!empty($details)) { return $details; } return false; } } } function new_core_values($actual_image_name) { $date = date("Y-m-d"); $time = date("H-i-s A"); if($stmt_insert = $this->con->prepare("INSERT INTO `core_values`(`images`, `date`, `time`) VALUES (?,?,?)")) { $stmt_insert->bind_param("sss",$actual_image_name,$date,$time); if($stmt_insert->execute()) { return true; } return false; } } function delete_core_values($del_id) { if($stmt_select = $this->con->prepare("Delete from `core_values` where `id`=?")) { $stmt_select->bind_param("i",$del_id); if($stmt_select->execute()) { return true; } return false; } } function get_all_core_values() { if($stmt_insert = $this->con->prepare("SELECT `id`,`images` FROM `core_values` ORDER BY `id` DESC")) { $stmt_insert->bind_result($id,$images); if($stmt_insert->execute()) { $counter = 0; $details = array(); while($stmt_insert->fetch()) { $details[$counter][0] = $id; $details[$counter][1] = $images; $counter++; } if(!empty($details)) { return $details; } return false; } } } function new_news_and_events_images($title,$actual_image_name) { $date = date("Y-m-d"); $time = date("H-i-s A"); if($stmt_insert = $this->con->prepare("INSERT INTO `news_events`(`title`,`attachment`, `date`, `time`) VALUES (?,?,?,?)")) { $stmt_insert->bind_param("ssss",$title,$actual_image_name,$date,$time); if($stmt_insert->execute()) { return true; } return false; } } function new_our_achievements($title,$actual_image_name) { $date = date("Y-m-d"); $time = date("H-i-s A"); if($stmt_insert = $this->con->prepare("INSERT INTO `our_achievements`(`title`,`attachment`, `date`, `time`) VALUES (?,?,?,?)")) { $stmt_insert->bind_param("ssss",$title,$actual_image_name,$date,$time); if($stmt_insert->execute()) { return true; } return false; } } function new_downloads($title,$actual_image_name) { $date = date("Y-m-d"); $time = date("H-i-s A"); if($stmt_insert = $this->con->prepare("INSERT INTO `downloads`(`title`,`attachment`, `date`, `time`) VALUES (?,?,?,?)")) { $stmt_insert->bind_param("ssss",$title,$actual_image_name,$date,$time); if($stmt_insert->execute()) { return true; } return false; } } function delete_new_and_events_images($del_id) { if($stmt_select = $this->con->prepare("Delete from `news_events` where `id`=?")) { $stmt_select->bind_param("i",$del_id); if($stmt_select->execute()) { return true; } return false; } } function delete_achievements($del_id) { if($stmt_select = $this->con->prepare("Delete from `our_achievements` where `id`=?")) { $stmt_select->bind_param("i",$del_id); if($stmt_select->execute()) { return true; } return false; } } function delete_downloads($del_id) { if($stmt_select = $this->con->prepare("Delete from `downloads` where `id`=?")) { $stmt_select->bind_param("i",$del_id); if($stmt_select->execute()) { return true; } return false; } } function get_all_new_and_events_images() { if($stmt_insert = $this->con->prepare("SELECT `id`,`title`,`attachment` FROM `news_events` ORDER BY `id` DESC")) { $stmt_insert->bind_result($id,$title,$images); if($stmt_insert->execute()) { $counter = 0; $details = array(); while($stmt_insert->fetch()) { $details[$counter][0] = $id; $details[$counter][1] = $title; $details[$counter][2] = $images; $counter++; } if(!empty($details)) { return $details; } return false; } } } function get_all_our_achievements() { if($stmt_insert = $this->con->prepare("SELECT `id`,`title`,`attachment` FROM `our_achievements` ORDER BY `id` DESC")) { $stmt_insert->bind_result($id,$title,$images); if($stmt_insert->execute()) { $counter = 0; $details = array(); while($stmt_insert->fetch()) { $details[$counter][0] = $id; $details[$counter][1] = $title; $details[$counter][2] = $images; $counter++; } if(!empty($details)) { return $details; } return false; } } } function get_all_our_downloads() { if($stmt_insert = $this->con->prepare("SELECT `id`,`title`,`attachment` FROM `downloads` ORDER BY `id` DESC")) { $stmt_insert->bind_result($id,$title,$images); if($stmt_insert->execute()) { $counter = 0; $details = array(); while($stmt_insert->fetch()) { $details[$counter][0] = $id; $details[$counter][1] = $title; $details[$counter][2] = $images; $counter++; } if(!empty($details)) { return $details; } return false; } } } function update_news_and_events_images($up_id,$title) { if($stmt_insert = $this->con->prepare("update `news_events` set `title` = ? Where `id`=?")) { $stmt_insert->bind_param("si",$title,$up_id); if($stmt_insert->execute()) { return true; } return false; } } function get_all_new_and_events_images_by_id($up_id) { if($stmt_insert = $this->con->prepare("SELECT `id`,`title`,`attachment` FROM `news_events` Where `id` = ?")) { $stmt_insert->bind_param("i",$up_id); $stmt_insert->bind_result($id,$title,$images); if($stmt_insert->execute()) { $counter = 0; $details = array(); while($stmt_insert->fetch()) { $details[$counter][0] = $id; $details[$counter][1] = $title; $details[$counter][2] = $images; $counter++; } if(!empty($details)) { return $details; } return false; } } } function update_news_attachments($up_id) { $actual_image_name=""; if($stmt_insert = $this->con->prepare("UPDATE `news_events` set `attachment` = ? Where `id`=?")) { $stmt_insert->bind_param("si",$actual_image_name,$up_id); if($stmt_insert->execute()) { return true; } return false; } } function get_news_image_name_by_id($id) { if($stmt_select = $this->con->prepare("Select `attachment` from `news_events` where `id` = ? ")) { $stmt_select->bind_param("i",$id); $stmt_select->bind_result($result_password); if($stmt_select->execute()) { if($stmt_select->fetch()) { return $result_password; } } return false; } } function update_news_image_info($up_id,$image) { if($stmt_insert = $this->con->prepare("UPDATE `news_events` set `attachment` = ? Where `id`=?")) { $stmt_insert->bind_param("si",$image,$up_id); if($stmt_insert->execute()) { return true; } return false; } } function new_important_links($title,$url,$actual_image_name) { $date = date("Y-m-d"); $time = date("H-i-s A"); if($stmt_insert = $this->con->prepare("INSERT INTO `important_links`(`title`,`attachment`,`image`, `date`, `time`) VALUES (?,?,?,?,?)")) { $stmt_insert->bind_param("sssss",$title,$url,$actual_image_name,$date,$time); if($stmt_insert->execute()) { return true; } return false; } } function get_all_important_links() { if($stmt_insert = $this->con->prepare("SELECT `id`,`title`,`attachment`,`image` FROM `important_links` ORDER BY `id` DESC")) { $stmt_insert->bind_result($id,$title,$url,$image); if($stmt_insert->execute()) { $counter = 0; $details = array(); while($stmt_insert->fetch()) { $details[$counter][0] = $id; $details[$counter][1] = $title; $details[$counter][2] = $url; $details[$counter][3] = $image; $counter++; } if(!empty($details)) { return $details; } return false; } } } function delete_important_links($del_id) { if($stmt_select = $this->con->prepare("Delete from `important_links` where `id`=?")) { $stmt_select->bind_param("i",$del_id); if($stmt_select->execute()) { return true; } return false; } } function new_activity($title,$actual_image_name) { $date = date("Y-m-d"); $time = date("H-i-s A"); if($stmt_insert = $this->con->prepare("INSERT INTO `activities`(`title`,`attachment`,`date`, `time`) VALUES (?,?,?,?)")) { $stmt_insert->bind_param("ssss",$title,$actual_image_name,$date,$time); if($stmt_insert->execute()) { return true; } return false; } } function delete_activity($del_id) { if($stmt_select = $this->con->prepare("Delete from `activities` where `id`=?")) { $stmt_select->bind_param("i",$del_id); if($stmt_select->execute()) { return true; } return false; } } function get_all_activity() { if($stmt_insert = $this->con->prepare("SELECT `id`,`title`,`attachment` FROM `activities` ORDER BY `id` DESC")) { $stmt_insert->bind_result($id,$title,$images); if($stmt_insert->execute()) { $counter = 0; $details = array(); while($stmt_insert->fetch()) { $details[$counter][0] = $id; $details[$counter][1] = $title; $details[$counter][2] = $images; $counter++; } if(!empty($details)) { return $details; } return false; } } } function new_committee_info($title,$attachment) { $date = date("Y-m-d"); $time = date("H-i-s A"); if($stmt_insert = $this->con->prepare("INSERT INTO `committee_info`(`title`,`attachment`, `date`, `time`) VALUES (?,?,?,?)")) { $stmt_insert->bind_param("ssss",$title,$attachment,$date,$time); if($stmt_insert->execute()) { return true; } return false; } } function get_all_committee_info() { if($stmt_insert = $this->con->prepare("SELECT `id`,`title`,`attachment` FROM `committee_info` ORDER BY `id` DESC")) { $stmt_insert->bind_result($id,$title,$attachment); if($stmt_insert->execute()) { $counter = 0; $details = array(); while($stmt_insert->fetch()) { $details[$counter][0] = $id; $details[$counter][1] = $title; $details[$counter][2] = $attachment; $counter++; } if(!empty($details)) { return $details; } return false; } } } function delete_committee_info($del_id) { if($stmt_select = $this->con->prepare("Delete from `committee_info` where `id`=?")) { $stmt_select->bind_param("i",$del_id); if($stmt_select->execute()) { return true; } return false; } } function new_naac($actual_image_name) { $date = date("Y-m-d"); $time = date("H-i-s A"); if($stmt_insert = $this->con->prepare("INSERT INTO `naac`(`images`, `date`, `time`) VALUES (?,?,?)")) { $stmt_insert->bind_param("sss",$actual_image_name,$date,$time); if($stmt_insert->execute()) { return true; } return false; } } function delete_naac($del_id) { if($stmt_select = $this->con->prepare("Delete from `naac` where `id`=?")) { $stmt_select->bind_param("i",$del_id); if($stmt_select->execute()) { return true; } return false; } } function get_all_naac() { if($stmt_insert = $this->con->prepare("SELECT `id`,`images` FROM `naac`")) { $stmt_insert->bind_result($id,$images); if($stmt_insert->execute()) { $counter = 0; $details = array(); while($stmt_insert->fetch()) { $details[$counter][0] = $id; $details[$counter][1] = $images; $counter++; } if(!empty($details)) { return $details; } return false; } } } function new_transportation($actual_image_name) { $date = date("Y-m-d"); $time = date("H-i-s A"); if($stmt_insert = $this->con->prepare("INSERT INTO `transportation`(`images`, `date`, `time`) VALUES (?,?,?)")) { $stmt_insert->bind_param("sss",$actual_image_name,$date,$time); if($stmt_insert->execute()) { return true; } return false; } } function delete_transportation($del_id) { if($stmt_select = $this->con->prepare("Delete from `transportation` where `id`=?")) { $stmt_select->bind_param("i",$del_id); if($stmt_select->execute()) { return true; } return false; } } function get_all_transportation() { if($stmt_insert = $this->con->prepare("SELECT `id`,`images` FROM `transportation`")) { $stmt_insert->bind_result($id,$images); if($stmt_insert->execute()) { $counter = 0; $details = array(); while($stmt_insert->fetch()) { $details[$counter][0] = $id; $details[$counter][1] = $images; $counter++; } if(!empty($details)) { return $details; } return false; } } } function add_student_data($prn,$full_name,$last_name,$department,$semster,$division,$email_id,$roll_no,$gender,$address,$dob,$contact_no,$actual_image_name,$password,$batch) { $date = date("Y-m-d"); $time = date("H-i-s A"); if($stmt_insert = $this->con->prepare("INSERT INTO `student_data`(`prn`, `first_name`, `last_name`, `department`, `semester`, `division`, `roll_no`, `email`, `gender`, `address`, `dob`, `contact_no`, `profile_picture`,`password`, `date`, `time`,`batch`) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)")) { $stmt_insert->bind_param("sssssssssssssssss",$prn,$full_name,$last_name,$department,$semster,$division,$email_id,$roll_no,$gender,$address,$dob,$contact_no,$actual_image_name,$password,$date,$time,$batch); if($stmt_insert->execute()) { return true; } return false; } } function get_all_student_info($department,$semester) { if($department == "Select Department") { $department = ""; } if($semester == "Select Semester") { $semester = ""; } if($stmt_insert = $this->con->prepare("SELECT `id`,`prn`, `first_name`, `last_name`, `department`, `semester`, `division`, `roll_no`, `email`, `gender`, `address`, `dob`, `contact_no`, `profile_picture`,`password` FROM `student_data` Where `department` LIKE '%$department%' AND `semester` LIKE '%$semester%' ")) { $stmt_insert->bind_result($id,$prn,$full_name,$last_name,$department,$semster,$division,$email_id,$roll_no,$gender,$address,$dob,$contact_no,$actual_image_name,$res_password); if($stmt_insert->execute()) { $counter = 0; $details = array(); while($stmt_insert->fetch()) { $details[$counter][0] = $id; $details[$counter][1] = $prn; $details[$counter][2] = $full_name; $details[$counter][3] = $last_name; $details[$counter][4] = $department; $details[$counter][5] = $semster; $details[$counter][6] = $division; $details[$counter][7] = $email_id; $details[$counter][8] = $roll_no; $details[$counter][9] = $gender; $details[$counter][10] = $address; $details[$counter][11] = $dob; $details[$counter][12] = $contact_no; $details[$counter][13] = $actual_image_name; $details[$counter][14] = $res_password; $counter++; } if(!empty($details)) { return $details; } return false; } } } function delete_student_data_info($del_id) { if($stmt_select = $this->con->prepare("Delete from `student_data` where `id`=?")) { $stmt_select->bind_param("i",$del_id); if($stmt_select->execute()) { return true; } return false; } } function add_staff_data($full_name,$last_name,$department,$gender,$address,$dob,$contact_no,$email_id,$password,$actual_image_name,$designation,$staff_type,$qualification,$sequance_no,$appionement_date,$actual_profile) { $date = date("Y-m-d"); $time = date("H-i-s A"); if($stmt_insert = $this->con->prepare("INSERT INTO `staff_data`( `first_name`, `last_name`, `department`, `gender`, `address`, `dob`, `contact_no`, `email_id`, `password`, `profile`, `date`, `time`,`designation`,`staff_type`,`qualification`,`sequence`,`appionement_date`,`staff_profile`) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)")) { $stmt_insert->bind_param("ssssssssssssssssss",$full_name,$last_name,$department,$gender,$address,$dob,$contact_no,$email_id,$password,$actual_image_name,$date,$time,$designation,$staff_type,$qualification,$sequance_no,$appionement_date,$actual_profile); if($stmt_insert->execute()) { return true; } return false; } } function get_all_staff_info($department) { if($department == "Select Department") { $department = ""; } if($stmt_insert = $this->con->prepare("SELECT `id`,`first_name`, `last_name`, `department`, `gender`, `address`, `dob`, `contact_no`, `email_id`, `password`, `profile`,`staff_profile` FROM `staff_data` Where `department` LIKE '%$department%'")) { $stmt_insert->bind_result($id,$full_name,$last_name,$department,$gender,$address,$dob,$contact_no,$email_id,$password,$actual_image_name,$staff_profile); if($stmt_insert->execute()) { $counter = 0; $details = array(); while($stmt_insert->fetch()) { $details[$counter][0] = $id; $details[$counter][1] = $full_name; $details[$counter][2] = $last_name; $details[$counter][3] = $department; $details[$counter][4] = $gender; $details[$counter][5] = $address; $details[$counter][6] = $dob; $details[$counter][7] = $contact_no; $details[$counter][8] = $email_id; $details[$counter][9] = $password; $details[$counter][10] = $actual_image_name; $details[$counter][11] = $staff_profile; $counter++; } if(!empty($details)) { return $details; } return false; } } } function get_all_staff_info_by_type($type) { if($stmt_insert = $this->con->prepare("SELECT `id`,`first_name`, `last_name`, `department`, `gender`, `address`, `dob`, `contact_no`, `email_id`, `password`, `profile`,`qualification`,`designation`,`appionement_date`,`staff_profile` FROM `staff_data` Where `staff_type` = '$type' ORDER BY `sequence` ASC")) { $stmt_insert->bind_result($id,$full_name,$last_name,$department,$gender,$address,$dob,$contact_no,$email_id,$password,$actual_image_name,$qualification,$designation,$appionement_date,$staff_profile); if($stmt_insert->execute()) { $counter = 0; $details = array(); while($stmt_insert->fetch()) { $details[$counter][0] = $id; $details[$counter][1] = $full_name; $details[$counter][2] = $last_name; $details[$counter][3] = $department; $details[$counter][4] = $gender; $details[$counter][5] = $address; $details[$counter][6] = $dob; $details[$counter][7] = $contact_no; $details[$counter][8] = $email_id; $details[$counter][9] = $password; $details[$counter][10] = $actual_image_name; $details[$counter][11] = $qualification; $details[$counter][12] = $designation; $details[$counter][13] = $appionement_date; $details[$counter][14] = $staff_profile; $counter++; } if(!empty($details)) { return $details; } return false; } } } function delete_staff_data_info($del_id) { if($stmt_select = $this->con->prepare("Delete from `staff_data` where `id`=?")) { $stmt_select->bind_param("i",$del_id); if($stmt_select->execute()) { return true; } return false; } } function new_circular_notice($department,$semester,$title,$actual_image_name) { $date = date("Y-m-d"); $time = date("H-i-s A"); if($stmt_insert = $this->con->prepare("INSERT INTO `circulars_notices`(`department`,`semester`,`title`,`description`, `date`, `time`) VALUES (?,?,?,?,?,?)")) { $stmt_insert->bind_param("ssssss",$department,$semester,$title,$actual_image_name,$date,$time); if($stmt_insert->execute()) { return true; } return false; } } function delete_notice($del_id) { if($stmt_select = $this->con->prepare("Delete from `circulars_notices` where `id`=?")) { $stmt_select->bind_param("i",$del_id); if($stmt_select->execute()) { return true; } return false; } } function get_all_notice($department,$semester) { if($department == "Select Department") { $department = ""; } if($semester == "Select Semester") { $semester = ""; } if($stmt_insert = $this->con->prepare("SELECT `id`,`department`,`semester`,`title`,`description` FROM `circulars_notices` Where `department` LIKE '%$department%' AND `semester` LIKE '%$semester%' ORDER BY `id` DESC")) { $stmt_insert->bind_result($id,$department,$semester,$title,$images); if($stmt_insert->execute()) { $counter = 0; $details = array(); while($stmt_insert->fetch()) { $details[$counter][0] = $id; $details[$counter][1] = $department; $details[$counter][2] = $semester; $details[$counter][3] = $title; $details[$counter][4] = $images; $counter++; } if(!empty($details)) { return $details; } return false; } } } function add_class_work($department,$semester,$division,$s_date,$description) { $date = date("Y-m-d"); $time = date("H-i-s A"); if($stmt_insert = $this->con->prepare("INSERT INTO `class_work`(`department`, `semester`, `division`, `news_date`, `description`, `date`, `time`) VALUES (?,?,?,?,?,?,?)")) { $stmt_insert->bind_param("sssssss",$department,$semester,$division,$s_date,$description,$date,$time); if($stmt_insert->execute()) { return true; } return false; } } function delete_class_work($del_id) { if($stmt_select = $this->con->prepare("Delete from `class_work` where `id`=?")) { $stmt_select->bind_param("i",$del_id); if($stmt_select->execute()) { return true; } return false; } } function get_all_class_work($department,$semester) { if($department == "Select Department") { $department = ""; } if($semester == "Select Semester") { $semester = ""; } if($stmt_insert = $this->con->prepare("SELECT `id`,`department`,`semester`,`division`,`news_date`,`description` FROM `class_work` Where `department` LIKE '%$department%' AND `semester` LIKE '%$semester%' ORDER BY `id` DESC")) { $stmt_insert->bind_result($id,$department,$semester,$division,$selected_date,$description); if($stmt_insert->execute()) { $counter = 0; $details = array(); while($stmt_insert->fetch()) { $details[$counter][0] = $id; $details[$counter][1] = $department; $details[$counter][2] = $semester; $details[$counter][3] = $division; $details[$counter][4] = $selected_date; $details[$counter][5] = $description; $counter++; } if(!empty($details)) { return $details; } return false; } } } function add_home_work($department,$semester,$division,$s_date,$description) { $date = date("Y-m-d"); $time = date("H-i-s A"); if($stmt_insert = $this->con->prepare("INSERT INTO `home_work`(`department`, `semester`, `division`, `selected_date`, `description`, `date`, `time`) VALUES (?,?,?,?,?,?,?)")) { $stmt_insert->bind_param("sssssss",$department,$semester,$division,$s_date,$description,$date,$time); if($stmt_insert->execute()) { return true; } return false; } } function delete_home_work($del_id) { if($stmt_select = $this->con->prepare("Delete from `home_work` where `id`=?")) { $stmt_select->bind_param("i",$del_id); if($stmt_select->execute()) { return true; } return false; } } function get_all_home_work($department,$semester) { if($department == "Select Department") { $department = ""; } if($semester == "Select Semester") { $semester = ""; } if($stmt_insert = $this->con->prepare("SELECT `id`,`department`,`semester`,`division`,`selected_date`,`description` FROM `home_work` Where `department` LIKE '%$department%' AND `semester` LIKE '%$semester%' ORDER BY `id` DESC")) { $stmt_insert->bind_result($id,$department,$semester,$division,$selected_date,$description); if($stmt_insert->execute()) { $counter = 0; $details = array(); while($stmt_insert->fetch()) { $details[$counter][0] = $id; $details[$counter][1] = $department; $details[$counter][2] = $semester; $details[$counter][3] = $division; $details[$counter][4] = $selected_date; $details[$counter][5] = $description; $counter++; } if(!empty($details)) { return $details; } return false; } } } function add_category($depart,$category,$actual_image_name) { $date = date("Y-m-d"); $time = date("H-i-s A"); if($stmt_insert = $this->con->prepare("INSERT INTO `category`(`department`,`category`,`icons`, `date`, `time`) VALUES (?,?,?,?,?)")) { $stmt_insert->bind_param("sssss",$depart,$category,$actual_image_name,$date,$time); if($stmt_insert->execute()) { return true; } return false; } } function get_all_category_info() { if($stmt_insert = $this->con->prepare("SELECT `id`,`department`,`category`,`icons` FROM `category` ORDER BY `id` DESC")) { $stmt_insert->bind_result($id,$department,$category,$attachment); if($stmt_insert->execute()) { $counter = 0; $details = array(); while($stmt_insert->fetch()) { $details[$counter][0] = $id; $details[$counter][1] = $department; $details[$counter][2] = $category; $details[$counter][3] = $attachment; $counter++; } if(!empty($details)) { return $details; } return false; } } } function delete_category($del_id) { if($stmt_select = $this->con->prepare("Delete from `category` where `id`=?")) { $stmt_select->bind_param("i",$del_id); if($stmt_select->execute()) { return true; } return false; } } function get_all_category_info_by_id($up_id) { if($stmt_insert = $this->con->prepare("SELECT `id`,`department`,`category`,`icons` FROM `category` Where `id` = ?")) { $stmt_insert->bind_param("i",$up_id); $stmt_insert->bind_result($id,$department,$category,$attachment); if($stmt_insert->execute()) { $counter = 0; $details = array(); while($stmt_insert->fetch()) { $details[$counter][0] = $id; $details[$counter][1] = $department; $details[$counter][2] = $category; $details[$counter][3] = $attachment; $counter++; } if(!empty($details)) { return $details; } return false; } } } function check_category_exist_or_not($category,$depart) { if($stmt_select = $this->con->prepare("Select `id` from `category` where `category` = ? And `department` = ? ")) { $stmt_select->bind_param("ss",$category,$depart); $stmt_select->bind_result($result_password); if($stmt_select->execute()) { if($stmt_select->fetch()) { return $result_password; } } return false; } } function check_category_exist_or_not_for_update($category,$depart,$up_id) { if($stmt_select = $this->con->prepare("Select `id` from `category` where `category` = ? And `department` = ? AND `id` != ?")) { $stmt_select->bind_param("ssi",$category,$depart,$up_id); $stmt_select->bind_result($result_password); if($stmt_select->execute()) { if($stmt_select->fetch()) { return $result_password; } } return false; } } function update_category($up_id,$depart,$category) { if($stmt_insert = $this->con->prepare("UPDATE `category` set `department` = ?,`category` = ? Where `id` = ?")) { $stmt_insert->bind_param("ssi",$depart,$category,$up_id); if($stmt_insert->execute()) { return true; } return false; } } function update_category_icons($up_id) { $actual_image_name=""; if($stmt_insert = $this->con->prepare("UPDATE `category` set `icons` = ? Where `id`=?")) { $stmt_insert->bind_param("si",$actual_image_name,$up_id); if($stmt_insert->execute()) { return true; } return false; } } function get_category_icons($id) { if($stmt_select = $this->con->prepare("Select `icons` from `category` where `id` = ? ")) { $stmt_select->bind_param("i",$id); $stmt_select->bind_result($result_password); if($stmt_select->execute()) { if($stmt_select->fetch()) { return $result_password; } } return false; } } function update_category_icons_info($up_id,$image) { if($stmt_insert = $this->con->prepare("UPDATE `category` set `icons` = ? Where `id`=?")) { $stmt_insert->bind_param("si",$image,$up_id); if($stmt_insert->execute()) { return true; } return false; } } function get_all_department_categorywise($c_id) { if($stmt_insert = $this->con->prepare("SELECT `id`,`department`,`category`,`icons` FROM `category` Where `id` = ?")) { $stmt_insert->bind_param("i",$c_id); $stmt_insert->bind_result($id,$department,$category,$attachment); if($stmt_insert->execute()) { $counter = 0; $details = array(); while($stmt_insert->fetch()) { $details[$counter][0] = $id; $details[$counter][1] = $department; $details[$counter][2] = $category; $details[$counter][3] = $attachment; $counter++; } if(!empty($details)) { return $details; } return false; } } } function get_all_feedback_data() { if($stmt_insert = $this->con->prepare("SELECT `id`, `name`, `class`, `roll_no`, `academic_year`, `suggestions`, `option1`, `option2`, `option3`, `option4`, `option5`, `option6`, `option7`, `option8`, `option9`, `option10`, `option11`, `option12`, `option13`, `option14`, `option15`, `option16`, `option17`, `option18`, `option19`, `option20`, `option21`, `option22`, `option23`, `option24`, `date`, `time` FROM `feedback`")) { $stmt_insert->bind_result($id,$name, $class, $roll_no, $academic_year, $suggestions, $option1, $option2, $option3, $option4, $option5, $option6, $option7, $option8, $option9, $option10, $option11, $option12, $option13, $option14, $option15, $option16, $option17, $option18, $option19, $option20, $option21, $option22, $option23, $option24, $date, $time); if($stmt_insert->execute()) { $counter = 0; $details = array(); while($stmt_insert->fetch()) { $details[$counter][0] = $id; $details[$counter][1] = $name; $details[$counter][2] = $class; $details[$counter][3] = $roll_no; $details[$counter][4] = $academic_year; $details[$counter][5] = $suggestions; $details[$counter][6] = $option1; $details[$counter][7] = $option2; $details[$counter][8] = $option3; $details[$counter][9] = $option4; $details[$counter][10] = $option5; $details[$counter][11] = $option6; $details[$counter][12] = $option7; $details[$counter][13] = $option8; $details[$counter][14] = $option9; $details[$counter][15] = $option10; $details[$counter][16] = $option11; $details[$counter][17] = $option12; $details[$counter][18] = $option13; $details[$counter][19] = $option14; $details[$counter][20] = $option15; $details[$counter][21] = $option16; $details[$counter][22] = $option17; $details[$counter][23] = $option18; $details[$counter][24] = $option19; $details[$counter][25] = $option20; $details[$counter][26] = $option21; $details[$counter][27] = $option22; $details[$counter][28] = $option23; $details[$counter][29] = $option24; $details[$counter][30] = $date; $details[$counter][31] = $time; $counter++; } if(!empty($details)) { return $details; } return false; } } } function category_name_by_id($id) { if($stmt_select = $this->con->prepare("Select `category` from `category` where `id` = ? ")) { $stmt_select->bind_param("i",$id); $stmt_select->bind_result($result_password); if($stmt_select->execute()) { if($stmt_select->fetch()) { return $result_password; } } return false; } } function get_all_category_department_wise($department) { if($stmt_select = $this->con->prepare("SELECT `id`,`department`,`category`,`icons` FROM `category` where `department`= ?")) { $stmt_select->bind_param("s",$department); $stmt_select->bind_result($id,$department,$section,$images); if($stmt_select->execute()) { $counter = 0; $details = array(); while($stmt_select->fetch()) { $details[$counter][0] = $id; $details[$counter][1] = $department; $details[$counter][2] = $section; $details[$counter][3] = $images; $counter++; } if(!empty($details)) { return $details; } return false; } } } function add_class_time_table($department,$semester,$division,$days,$subject,$periods) { $date = date("Y-m-d"); $time = date("H-i-s A"); if($stmt_insert = $this->con->prepare("INSERT INTO `class_time_table`(`department`, `semester`, `division`, `days`, `subject`, ` periods`, `date`, `time`) VALUES (?,?,?,?,?,?,?,?)")) { $stmt_insert->bind_param("ssssssss",$department,$semester,$division,$days,$subject,$periods,$date,$time); if($stmt_insert->execute()) { return true; } return false; } } function get_all_class_time_table($department,$semester) { if($department == "Select Department") { $department = ""; } if($semester == "Select Semester") { $semester = ""; } if($stmt_insert = $this->con->prepare("SELECT `id`,`department`, `semester`, `division`, `days`, `subject`, ` periods` FROM `class_time_table` Where `department` LIKE '%$department%' AND `semester` LIKE '%$semester%' ORDER BY `id` DESC")) { $stmt_insert->bind_result($id,$department,$semester,$division,$days,$subject,$periods); if($stmt_insert->execute()) { $counter = 0; $details = array(); while($stmt_insert->fetch()) { $details[$counter][0] = $id; $details[$counter][1] = $department; $details[$counter][2] = $semester; $details[$counter][3] = $division; $details[$counter][4] = $days; $details[$counter][5] = $subject; $details[$counter][6] = $periods; $counter++; } if(!empty($details)) { return $details; } return false; } } } function delete_class_time_table($del_id) { if($stmt_select = $this->con->prepare("Delete from `class_time_table` where `id`=?")) { $stmt_select->bind_param("i",$del_id); if($stmt_select->execute()) { return true; } return false; } } function add_exam_time_table($department,$semester,$exam_name,$division) { $date = date("Y-m-d"); $time = date("H-i-s A"); if($stmt_insert = $this->con->prepare("INSERT INTO `exam_time_table`(`department`, `semester`, `exam_name`, `date`, `time`,`division`) VALUES (?,?,?,?,?,?)")) { $stmt_insert->bind_param("ssssss",$department,$semester,$exam_name,$date,$time,$division); if($stmt_insert->execute()) { return true; } return false; } } function add_exam_names_for_mark($department,$semester,$exam_name,$division) { $date = date("Y-m-d"); $time = date("H-i-s A"); if($stmt_insert = $this->con->prepare("INSERT INTO `exam_names_for_mark`(`department`, `semester`, `exam_name`, `date`, `time`,`division`) VALUES (?,?,?,?,?,?)")) { $stmt_insert->bind_param("ssssss",$department,$semester,$exam_name,$date,$time,$division); if($stmt_insert->execute()) { return true; } return false; } } function delete_exam_time_table($del_id) { if($stmt_select = $this->con->prepare("Delete from `exam_time_table` where `id`=?")) { $stmt_select->bind_param("i",$del_id); if($stmt_select->execute()) { return true; } return false; } } function delete_exam_names_for_mark($del_id) { if($stmt_select = $this->con->prepare("Delete from `exam_names_for_mark` where `id`=?")) { $stmt_select->bind_param("i",$del_id); if($stmt_select->execute()) { return true; } return false; } } function get_all_exam_time_table($department,$semester) { if($department == "Select Department") { $department = ""; } if($semester == "Select Semester") { $semester = ""; } if($stmt_insert = $this->con->prepare("SELECT `id`,`department`, `semester`, `exam_name` FROM `exam_time_table` Where `department` LIKE '%$department%' AND `semester` LIKE '%$semester%' ORDER BY `id` DESC")) { $stmt_insert->bind_result($id,$department,$semester,$exam_name); if($stmt_insert->execute()) { $counter = 0; $details = array(); while($stmt_insert->fetch()) { $details[$counter][0] = $id; $details[$counter][1] = $department; $details[$counter][2] = $semester; $details[$counter][3] = $exam_name; $counter++; } if(!empty($details)) { return $details; } return false; } } } function get_all_exam_category_for_marks($department,$semester) { if($department == "Select Department") { $department = ""; } if($semester == "Select Semester") { $semester = ""; } if($stmt_insert = $this->con->prepare("SELECT `id`,`department`, `semester`, `exam_name` FROM `exam_names_for_mark` Where `department` LIKE '%$department%' AND `semester` LIKE '%$semester%' ORDER BY `id` DESC")) { $stmt_insert->bind_result($id,$department,$semester,$exam_name); if($stmt_insert->execute()) { $counter = 0; $details = array(); while($stmt_insert->fetch()) { $details[$counter][0] = $id; $details[$counter][1] = $department; $details[$counter][2] = $semester; $details[$counter][3] = $exam_name; $counter++; } if(!empty($details)) { return $details; } return false; } } } function get_all_academic_calender() { if($stmt_insert = $this->con->prepare("SELECT `id`,`department`,`title`,`attachment` FROM `academic_calender`")) { $stmt_insert->bind_result($id,$department,$title,$images); if($stmt_insert->execute()) { $counter = 0; $details = array(); while($stmt_insert->fetch()) { $details[$counter][0] = $id; $details[$counter][1] = $department; $details[$counter][2] = $title; $details[$counter][3] = $images; $counter++; } if(!empty($details)) { return $details; } return false; } } } function get_academic_calender_for_app() { if($stmt_insert = $this->con->prepare("SELECT `attachment` FROM `academic_calender`")) { $stmt_insert->bind_result($images); if($stmt_insert->execute()) { if($stmt_insert->fetch()) { return $images; } return false; } } } function delete_academic_calender($del_id) { if($stmt_select = $this->con->prepare("Delete from `academic_calender` where `id`=?")) { $stmt_select->bind_param("i",$del_id); if($stmt_select->execute()) { return true; } return false; } } function add_academic_calender($department,$title,$actual_image_name) { $date = date("Y-m-d"); $time = date("H-i-s A"); if($stmt_insert = $this->con->prepare("INSERT INTO `academic_calender`(`department`, `title`,`attachment`, `date`, `time`) VALUES (?,?,?,?,?)")) { $stmt_insert->bind_param("sssss",$department,$title,$actual_image_name,$date,$time); if($stmt_insert->execute()) { return true; } return false; } } function add_time_table($e_name,$subject,$s_date,$f_time,$t_time,$exam_id) { $date = date("Y-m-d"); $time = date("H-i-s A"); if($stmt_insert = $this->con->prepare("INSERT INTO `time_table`(`exam_name`, `s_date`, `subject`, `from_time`,`to_time`,`date`, `time`,`exam_id`) VALUES (?,?,?,?,?,?,?,?)")) { $stmt_insert->bind_param("ssssssss",$e_name,$s_date,$subject,$f_time,$t_time,$date,$time,$exam_id); if($stmt_insert->execute()) { return true; } return false; } } function get_all_time_table() { if($stmt_insert = $this->con->prepare("SELECT `id`,`exam_name`, `s_date`, `subject`, `from_time`, `to_time` FROM `time_table` ORDER BY `id` DESC")) { $stmt_insert->bind_result($id,$exam_name,$s_date,$subject,$from_time,$to_time); if($stmt_insert->execute()) { $counter = 0; $details = array(); while($stmt_insert->fetch()) { $details[$counter][0] = $id; $details[$counter][1] = $exam_name; $details[$counter][2] = $s_date; $details[$counter][3] = $subject; $details[$counter][4] = $from_time; $details[$counter][5] = $to_time; $counter++; } if(!empty($details)) { return $details; } return false; } } } function delete_time_table($del_id) { if($stmt_select = $this->con->prepare("Delete from `time_table` where `id`=?")) { $stmt_select->bind_param("i",$del_id); if($stmt_select->execute()) { return true; } return false; } } function add_contact_details($department,$semester,$actual_image_name,$f_name,$designation,$contact,$email_id) { $date = date("Y-m-d"); $time = date("H-i-s A"); if($stmt_insert = $this->con->prepare("INSERT INTO `contact_info`(`department`, `semester`, `profile`, `name`, `designation`,`contact`, `email_id`, `date`, `time`) VALUES (?,?,?,?,?,?,?,?,?)")) { $stmt_insert->bind_param("sssssssss",$department,$semester,$actual_image_name,$f_name,$designation,$contact,$email_id,$date,$time); if($stmt_insert->execute()) { return true; } return false; } } function delete_contact_details($del_id) { if($stmt_select = $this->con->prepare("Delete from `contact_info` where `id`=?")) { $stmt_select->bind_param("i",$del_id); if($stmt_select->execute()) { return true; } return false; } } function get_all_contact_details($department,$semester) { if($department == "Select Department") { $department = ""; } if($semester == "Select Semester") { $semester = ""; } if($stmt_insert = $this->con->prepare("SELECT `id`,`department`, `semester`, `profile`, `name`, `designation`,`contact`, `email_id` FROM `contact_info` Where `department` LIKE '%$department%' AND `semester` LIKE '%$semester%' ORDER BY `id` DESC")) { $stmt_insert->bind_result($id,$department,$semester,$profile,$name,$designation,$contact,$email_id); if($stmt_insert->execute()) { $counter = 0; $details = array(); while($stmt_insert->fetch()) { $details[$counter][0] = $id; $details[$counter][1] = $department; $details[$counter][2] = $semester; $details[$counter][3] = $profile; $details[$counter][4] = $name; $details[$counter][5] = $designation; $details[$counter][6] = $contact; $details[$counter][7] = $email_id; $counter++; } if(!empty($details)) { return $details; } return false; } } } function check_email_exist_or_not_in_staff($email) { if($stmt_select = $this->con->prepare("Select `id` from `staff_data` 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 check_email_exist_or_not_in_student($email) { if($stmt_select = $this->con->prepare("Select `id` from `student_data` where `email` = ? ")) { $stmt_select->bind_param("s",$email); $stmt_select->bind_result($result_password); if($stmt_select->execute()) { if($stmt_select->fetch()) { return $result_password; } } return false; } } function get_password_from_staff_name($email) { if($stmt_select = $this->con->prepare("Select `password` from `staff_data` 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 change_staff_password($email,$password) { $date = date("Y-m-d"); $time = date("H:i:s A"); if($stmt_select = $this->con->prepare("update `staff_data` set `password`='".$password."' where `email_id` = ?")) { $stmt_select->bind_param("s",$email); if($stmt_select->execute()) { return true; } return false; } } function get_password_from_student_name($email) { if($stmt_select = $this->con->prepare("Select `password` from `student_data` where `email` = ? ")) { $stmt_select->bind_param("s",$email); $stmt_select->bind_result($result_password); if($stmt_select->execute()) { if($stmt_select->fetch()) { return $result_password; } } return false; } } function get_all_student_info_by_email($email) { if($stmt_insert = $this->con->prepare("SELECT `id`,`prn`, `first_name`, `last_name`, `department`, `semester`, `division`, `roll_no`, `email`, `gender`, `address`, `dob`, `contact_no`, `profile_picture`,`password` FROM `student_data` Where `email` = ? ")) { $stmt_insert->bind_result($id,$prn,$full_name,$last_name,$department,$semster,$division,$email_id,$roll_no,$gender,$address,$dob,$contact_no,$actual_image_name,$password); $stmt_insert->bind_param("s",$email); if($stmt_insert->execute()) { $counter = 0; $details = array(); while($stmt_insert->fetch()) { $details[$counter][0] = $id; $details[$counter][1] = $prn; $details[$counter][2] = $full_name; $details[$counter][3] = $last_name; $details[$counter][4] = $department; $details[$counter][5] = $semster; $details[$counter][6] = $division; $details[$counter][7] = $email_id; $details[$counter][8] = $roll_no; $details[$counter][9] = $gender; $details[$counter][10] = $address; $details[$counter][11] = $dob; $details[$counter][12] = $contact_no; $details[$counter][13] = $actual_image_name; $details[$counter][14] = $password; $counter++; } if(!empty($details)) { return $details; } return false; } } } function change_student_password($email,$password) { $date = date("Y-m-d"); $time = date("H:i:s A"); if($stmt_select = $this->con->prepare("update `student_data` set `password`='".$password."' where ` email` = ?")) { $stmt_select->bind_param("s",$email); if($stmt_select->execute()) { return true; } return false; } } function get_all_notice_deptwise_semester($dept,$sem) { if($stmt_insert = $this->con->prepare("SELECT `id`,`department`,`semester`,`title`,`description` FROM `circulars_notices` Where `department` = ? And `semester` = ? ORDER BY `id` DESC")) { $stmt_insert->bind_param("ss",$dept,$sem); $stmt_insert->bind_result($id,$department,$semester,$title,$images); if($stmt_insert->execute()) { $counter = 0; $details = array(); while($stmt_insert->fetch()) { $details[$counter][0] = $id; $details[$counter][1] = $department; $details[$counter][2] = $semester; $details[$counter][3] = $title; $details[$counter][4] = $images; $counter++; } if(!empty($details)) { return $details; } return false; } } } function fetch_department_name_by_email($email) { if($stmt_select = $this->con->prepare("Select `department` from `student_data` where `email` = ? ")) { $stmt_select->bind_param("s",$email); $stmt_select->bind_result($result_password); if($stmt_select->execute()) { if($stmt_select->fetch()) { return $result_password; } } return false; } } function fetch_semester_name_by_email($email) { if($stmt_select = $this->con->prepare("Select `semester` from `student_data` where `email` = ? ")) { $stmt_select->bind_param("s",$email); $stmt_select->bind_result($result_password); if($stmt_select->execute()) { if($stmt_select->fetch()) { return $result_password; } } return false; } } function get_all_home_work_by_deptwise_semester($dept,$sem) { if($stmt_insert = $this->con->prepare("SELECT `id`,`department`,`semester`,`division`,`selected_date`,`description` FROM `home_work` Where `department` = ? And `semester` = ? ORDER BY `id` DESC")) { $stmt_insert->bind_param("ss",$dept,$sem); $stmt_insert->bind_result($id,$department,$semester,$division,$selected_date,$description); if($stmt_insert->execute()) { $counter = 0; $details = array(); while($stmt_insert->fetch()) { $details[$counter][0] = $id; $details[$counter][1] = $department; $details[$counter][2] = $semester; $details[$counter][3] = $division; $details[$counter][4] = $selected_date; $details[$counter][5] = $description; $counter++; } if(!empty($details)) { return $details; } return false; } } } function get_all_class_work_deptwise_semester($dept,$sem) { if($stmt_insert = $this->con->prepare("SELECT `id`,`department`,`semester`,`division`,`selected_date`,`description` FROM `class_work` Where `department` = ? And `semester` = ? ORDER BY `id` DESC")) { $stmt_insert->bind_param("ss",$dept,$sem); $stmt_insert->bind_result($id,$department,$semester,$division,$selected_date,$description); if($stmt_insert->execute()) { $counter = 0; $details = array(); while($stmt_insert->fetch()) { $details[$counter][0] = $id; $details[$counter][1] = $department; $details[$counter][2] = $semester; $details[$counter][3] = $division; $details[$counter][4] = $selected_date; $details[$counter][5] = $description; $counter++; } if(!empty($details)) { return $details; } return false; } } } function get_all_class_time_table_deptwise_semester($dept,$sem) { if($stmt_insert = $this->con->prepare("SELECT `id`,`department`, `semester`, `division`, `days`, `subject`, ` periods` FROM `class_time_table` Where `department` = ? And `semester` = ? ORDER BY `id` DESC")) { $stmt_insert->bind_param("ss",$dept,$sem); $stmt_insert->bind_result($id,$department,$semester,$division,$days,$subject,$periods); if($stmt_insert->execute()) { $counter = 0; $details = array(); while($stmt_insert->fetch()) { $details[$counter][0] = $id; $details[$counter][1] = $department; $details[$counter][2] = $semester; $details[$counter][3] = $division; $details[$counter][4] = $days; $details[$counter][5] = $subject; $details[$counter][6] = $periods; $counter++; } if(!empty($details)) { return $details; } return false; } } } function get_all_exam_time_table_deptwise_semester($dept,$sem) { if($stmt_insert = $this->con->prepare("SELECT `id`,`department`, `semester`, `exam_name` FROM `exam_time_table` Where `department` = ? And `semester` = ? ORDER BY `id` DESC")) { $stmt_insert->bind_param("ss",$dept,$sem); $stmt_insert->bind_result($id,$department,$semester,$exam_name); if($stmt_insert->execute()) { $counter = 0; $details = array(); while($stmt_insert->fetch()) { $details[$counter][0] = $id; $details[$counter][1] = $department; $details[$counter][2] = $semester; $details[$counter][3] = $exam_name; $counter++; } if(!empty($details)) { return $details; } return false; } } } function get_all_academic_calender_deptwise_semester($dept) { if($stmt_insert = $this->con->prepare("SELECT `id`,`department`,`title`,`attachment` FROM `academic_calender` Where `department` = ?")) { $stmt_insert->bind_param("s",$dept); $stmt_insert->bind_result($id,$department,$title,$images); if($stmt_insert->execute()) { $counter = 0; $details = array(); while($stmt_insert->fetch()) { $details[$counter][0] = $id; $details[$counter][1] = $department; $details[$counter][2] = $title; $details[$counter][3] = $images; $counter++; } if(!empty($details)) { return $details; } return false; } } } function get_all_contact_details_deptwise($dept,$sem) { if($stmt_insert = $this->con->prepare("SELECT `id`,`department`, `semester`, `profile`, `name`, `designation`,`contact`, `email_id` FROM `contact_info` Where `department` = ? And `semester` = ? ORDER BY `id` DESC")) { $stmt_insert->bind_param("ss",$dept,$sem); $stmt_insert->bind_result($id,$department,$semester,$profile,$name,$designation,$contact,$email_id); if($stmt_insert->execute()) { $counter = 0; $details = array(); while($stmt_insert->fetch()) { $details[$counter][0] = $id; $details[$counter][1] = $department; $details[$counter][2] = $semester; $details[$counter][3] = $profile; $details[$counter][4] = $name; $details[$counter][5] = $designation; $details[$counter][6] = $contact; $details[$counter][7] = $email_id; $counter++; } if(!empty($details)) { return $details; } return false; } } } function get_ex_name_from_id($exam_id) { if($stmt_insert = $this->con->prepare("SELECT `exam_name` FROM `exam_time_table` where `id` = ? ORDER BY `id` DESC")) { $stmt_insert->bind_param("i",$exam_id); $stmt_insert->bind_result($exam_name); if($stmt_insert->execute()) { if($stmt_insert->fetch()) { return $exam_name; } return false; } } } function get_all_student_info_by_id($up_id) { if($stmt_insert = $this->con->prepare("SELECT `id`,`prn`, `first_name`, `last_name`, `department`, `semester`, `division`, `roll_no`, `email`, `gender`, `address`, `dob`, `contact_no`, `profile_picture`,`password` FROM `student_data` Where `id` = ?")) { $stmt_insert->bind_param("i",$up_id); $stmt_insert->bind_result($id,$prn,$full_name,$last_name,$department,$semster,$division,$email_id,$roll_no,$gender,$address,$dob,$contact_no,$actual_image_name,$password); if($stmt_insert->execute()) { $counter = 0; $details = array(); while($stmt_insert->fetch()) { $details[$counter][0] = $id; $details[$counter][1] = $prn; $details[$counter][2] = $full_name; $details[$counter][3] = $last_name; $details[$counter][4] = $department; $details[$counter][5] = $semster; $details[$counter][6] = $division; $details[$counter][7] = $email_id; $details[$counter][8] = $roll_no; $details[$counter][9] = $gender; $details[$counter][10] = $address; $details[$counter][11] = $dob; $details[$counter][12] = $contact_no; $details[$counter][13] = $actual_image_name; $details[$counter][14] = $password; $counter++; } if(!empty($details)) { return $details; } return false; } } } function check_email_exist_or_not_in_student_for_update($email,$up_id) { if($stmt_select = $this->con->prepare("Select `id` from `student_data` where `email` = ? AND `id` != ? ")) { $stmt_select->bind_param("si",$email,$up_id); $stmt_select->bind_result($result_password); if($stmt_select->execute()) { if($stmt_select->fetch()) { return $result_password; } } return false; } } function updates_student_data($up_id,$prn,$full_name,$last_name,$department,$semster,$division,$email_id,$roll_no,$gender,$address,$dob,$contact_no,$password) { if($stmt_insert = $this->con->prepare("Update `student_data` set `prn` = ?, `first_name` = ?, `last_name` = ?, `department` = ?, `semester` = ?, `division` = ?, `roll_no` = ?, `email` = ?, `gender` = ?, `address` = ?, `dob` = ?, `contact_no` = ?, `password` = ? Where `id` = ?")) { $stmt_insert->bind_param("sssssssssssssi",$prn,$full_name,$last_name,$department,$semster,$division,$email_id,$roll_no,$gender,$address,$dob,$contact_no,$password,$up_id); if($stmt_insert->execute()) { return true; } return false; } } function update_student_profile($up_id) { $actual_image_name=""; if($stmt_insert = $this->con->prepare("UPDATE `student_data` set `profile_picture` = ? Where `id`=?")) { $stmt_insert->bind_param("si",$actual_image_name,$up_id); if($stmt_insert->execute()) { return true; } return false; } } function get_student_image_name_by_id($id) { if($stmt_select = $this->con->prepare("Select `profile_picture` from `student_data` where `id` = ? ")) { $stmt_select->bind_param("i",$id); $stmt_select->bind_result($result_password); if($stmt_select->execute()) { if($stmt_select->fetch()) { return $result_password; } } return false; } } function update_student_image_info($up_id,$image) { if($stmt_insert = $this->con->prepare("UPDATE `student_data` set `profile_picture` = ? Where `id`=?")) { $stmt_insert->bind_param("si",$image,$up_id); if($stmt_insert->execute()) { return true; } return false; } } function get_all_staff_info_by_id($up_id) { if($stmt_insert = $this->con->prepare("SELECT `id`,`first_name`, `last_name`, `department`, `gender`, `address`, `dob`, `contact_no`, `email_id`, `password`, `profile`,`sequence`,`appionement_date`,`qualification`,`staff_profile` FROM `staff_data` Where `id` = ?")) { $stmt_insert->bind_param("i",$up_id); $stmt_insert->bind_result($id,$full_name,$last_name,$department,$gender,$address,$dob,$contact_no,$email_id,$password,$actual_image_name,$sequence,$appionement_date,$qualification,$staff_profile); if($stmt_insert->execute()) { $counter = 0; $details = array(); while($stmt_insert->fetch()) { $details[$counter][0] = $id; $details[$counter][1] = $full_name; $details[$counter][2] = $last_name; $details[$counter][3] = $department; $details[$counter][4] = $gender; $details[$counter][5] = $address; $details[$counter][6] = $dob; $details[$counter][7] = $contact_no; $details[$counter][8] = $email_id; $details[$counter][9] = $password; $details[$counter][10] = $actual_image_name; $details[$counter][11] = $sequence; $details[$counter][12] = $appionement_date; $details[$counter][13] = $qualification; $details[$counter][14] = $staff_profile; $counter++; } if(!empty($details)) { return $details; } return false; } } } function check_email_exist_or_not_in_staff_in_update($email,$up_id) { if($stmt_select = $this->con->prepare("Select `id` from `staff_data` where `email_id` = ? AND `id` != ? ")) { $stmt_select->bind_param("si",$email,$up_id); $stmt_select->bind_result($result_password); if($stmt_select->execute()) { if($stmt_select->fetch()) { return $result_password; } } return false; } } function update_staff_data($up_id,$full_name,$last_name,$department,$gender,$address,$dob,$contact_no,$email_id,$password,$staff_type,$qualification,$sequance_no,$appionement_date) { $date = date("Y-m-d"); $time = date("H-i-s A"); if($stmt_insert = $this->con->prepare("Update `staff_data` set `first_name` = ?, `last_name` = ?, `department` = ?, `gender` = ?, `address` = ?, `dob` = ?, `contact_no` = ?, `email_id` = ?, `password` = ?,`staff_type` = ?,`qualification` = ?,`sequence` =? ,`appionement_date`=? where `id` = ? ")) { $stmt_insert->bind_param("sssssssssssisi",$full_name,$last_name,$department,$gender,$address,$dob,$contact_no,$email_id,$password,$staff_type,$qualification,$sequance_no,$appionement_date,$up_id); if($stmt_insert->execute()) { return true; } return false; } } function update_staff_profile($up_id) { $actual_image_name=""; if($stmt_insert = $this->con->prepare("UPDATE `staff_data` set `profile` = ? Where `id`=?")) { $stmt_insert->bind_param("si",$actual_image_name,$up_id); if($stmt_insert->execute()) { return true; } return false; } } function get_staff_image_name_by_id($id) { if($stmt_select = $this->con->prepare("Select `profile` from `staff_data` where `id` = ? ")) { $stmt_select->bind_param("i",$id); $stmt_select->bind_result($result_password); if($stmt_select->execute()) { if($stmt_select->fetch()) { return $result_password; } } return false; } } function update_staff_image_info($up_id,$image) { if($stmt_insert = $this->con->prepare("UPDATE `staff_data` set `profile` = ? Where `id`=?")) { $stmt_insert->bind_param("si",$image,$up_id); if($stmt_insert->execute()) { return true; } return false; } } function get_all_class_work_by_id($up_id) { if($stmt_insert = $this->con->prepare("SELECT `id`,`department`,`semester`,`division`,`news_date`,`description` FROM `class_work` Where `id` = ?")) { $stmt_insert->bind_param("i",$up_id); $stmt_insert->bind_result($id,$department,$semester,$division,$selected_date,$description); if($stmt_insert->execute()) { $counter = 0; $details = array(); while($stmt_insert->fetch()) { $details[$counter][0] = $id; $details[$counter][1] = $department; $details[$counter][2] = $semester; $details[$counter][3] = $division; $details[$counter][4] = $selected_date; $details[$counter][5] = $description; $counter++; } if(!empty($details)) { return $details; } return false; } } } function update_class_work($up_id,$department,$semester,$division,$s_date,$description) { if($stmt_insert = $this->con->prepare("Update `class_work` set `department` = ?, `semester` = ?, `division` = ?, `selected_date` = ?, `description` = ? Where `id` = ? ")) { $stmt_insert->bind_param("sssssi",$department,$semester,$division,$s_date,$description,$up_id); if($stmt_insert->execute()) { return true; } return false; } } function get_all_home_work_by_id($up_id) { if($stmt_insert = $this->con->prepare("SELECT `id`,`department`,`semester`,`division`,`selected_date`,`description` FROM `home_work` Where `id` = ?")) { $stmt_insert->bind_param("i",$up_id); $stmt_insert->bind_result($id,$department,$semester,$division,$selected_date,$description); if($stmt_insert->execute()) { $counter = 0; $details = array(); while($stmt_insert->fetch()) { $details[$counter][0] = $id; $details[$counter][1] = $department; $details[$counter][2] = $semester; $details[$counter][3] = $division; $details[$counter][4] = $selected_date; $details[$counter][5] = $description; $counter++; } if(!empty($details)) { return $details; } return false; } } } function get_all_contact_details_by_id($up_id) { if($stmt_insert = $this->con->prepare("SELECT `id`,`department`, `semester`, `profile`, `name`, `designation`,`contact`, `email_id` FROM `contact_info` Where `id` = ?")) { $stmt_insert->bind_param("i",$up_id); $stmt_insert->bind_result($id,$department,$semester,$profile,$name,$designation,$contact,$email_id); if($stmt_insert->execute()) { $counter = 0; $details = array(); while($stmt_insert->fetch()) { $details[$counter][0] = $id; $details[$counter][1] = $department; $details[$counter][2] = $semester; $details[$counter][3] = $profile; $details[$counter][4] = $name; $details[$counter][5] = $designation; $details[$counter][6] = $contact; $details[$counter][7] = $email_id; $counter++; } if(!empty($details)) { return $details; } return false; } } } function update_contact_details($up_id,$department,$semester,$f_name,$designation,$contact,$email_id) { if($stmt_insert = $this->con->prepare("Update `contact_info` set `department` = ?, `semester` = ?, `name` = ?, `designation` = ?,`contact` = ?, `email_id` = ? Where `id` = ?")) { $stmt_insert->bind_param("ssssssi",$department,$semester,$f_name,$designation,$contact,$email_id,$up_id); if($stmt_insert->execute()) { return true; } return false; } } function update_contact_image_info($up_id,$image) { if($stmt_insert = $this->con->prepare("UPDATE `contact_info` set `profile` = ? Where `id`=?")) { $stmt_insert->bind_param("si",$image,$up_id); if($stmt_insert->execute()) { return true; } return false; } } function get_contact_image_name_by_id($id) { if($stmt_select = $this->con->prepare("Select `profile` from `contact_info` where `id` = ? ")) { $stmt_select->bind_param("i",$id); $stmt_select->bind_result($result_password); if($stmt_select->execute()) { if($stmt_select->fetch()) { return $result_password; } } return false; } } function update_contact_profile($up_id) { $actual_image_name=""; if($stmt_insert = $this->con->prepare("UPDATE `contact_info` set `profile` = ? Where `id`=?")) { $stmt_insert->bind_param("si",$actual_image_name,$up_id); if($stmt_insert->execute()) { return true; } return false; } } function fetch_staff_name() { if($stmt_insert = $this->con->prepare("SELECT `id`,`first_name`, `last_name`, `email_id` FROM `staff_data` ORDER BY `id` DESC")) { $stmt_insert->bind_result($id,$first_name,$last_name,$email_id); if($stmt_insert->execute()) { $counter = 0; $details = array(); while($stmt_insert->fetch()) { $details[$counter][0] = $id; $details[$counter][1] = $first_name; $details[$counter][2] = $last_name; $details[$counter][3] = $email_id; $counter++; } if(!empty($details)) { return $details; } return false; } } } function get_staff_name_from_id($exam_id) { if($stmt_insert = $this->con->prepare("SELECT `first_name` FROM `staff_data` where `id` = ? ORDER BY `id` DESC")) { $stmt_insert->bind_param("i",$exam_id); $stmt_insert->bind_result($exam_name); if($stmt_insert->execute()) { if($stmt_insert->fetch()) { return $exam_name; } return false; } } } function add_leave_application($email,$staff_id,$description) { $status = "Pending"; $date = date("Y-m-d"); $time = date("H-i-s A"); if($stmt_insert = $this->con->prepare("INSERT INTO `leave_application`(`student_email`,`staff_id`, `description`, `status`, `date`, `time`) VALUES (?,?,?,?,?,?)")) { $stmt_insert->bind_param("ssssss",$email,$staff_id,$description,$status,$date,$time); if($stmt_insert->execute()) { return true; } return false; } } function get_leave_application_by_email($email) { if($stmt_insert = $this->con->prepare("SELECT `id`, `staff_id`, `description`, `status` FROM `leave_application` Where `student_email` = ? ORDER BY `id` DESC")) { $stmt_insert->bind_param("s",$email); $stmt_insert->bind_result($id,$staff_id,$description,$status); if($stmt_insert->execute()) { $counter = 0; $details = array(); while($stmt_insert->fetch()) { $details[$counter][0] = $id; $details[$counter][1] = $staff_id; $details[$counter][2] = $description; $details[$counter][3] = $status; $counter++; } if(!empty($details)) { return $details; } return false; } } } function fetch_id_by_email($email) { if($stmt_insert = $this->con->prepare("SELECT `id` FROM `staff_data` where `email_id` = ?")) { $stmt_insert->bind_param("s",$email); $stmt_insert->bind_result($exam_name); if($stmt_insert->execute()) { if($stmt_insert->fetch()) { return $exam_name; } return false; } } } function get_leave_application_by_id($id) { if($stmt_insert = $this->con->prepare("SELECT `id`, `staff_id`, `description`, `status` FROM `leave_application` Where `staff_id` = ?")) { $stmt_insert->bind_param("s",$id); $stmt_insert->bind_result($id,$staff_id,$description,$status); if($stmt_insert->execute()) { $counter = 0; $details = array(); while($stmt_insert->fetch()) { $details[$counter][0] = $id; $details[$counter][1] = $staff_id; $details[$counter][2] = $description; $details[$counter][3] = $status; $counter++; } if(!empty($details)) { return $details; } return false; } } } function delete_leave_application($del_id) { if($stmt_select = $this->con->prepare("Delete from `activities` where `id`=?")) { $stmt_select->bind_param("i",$del_id); if($stmt_select->execute()) { return true; } return false; } } function update_leave_application_status($id) { $status = "Approve"; if($stmt_insert = $this->con->prepare("Update `leave_application` set `status` = ? Where `id` = ?")) { $stmt_insert->bind_param("si",$status,$id); if($stmt_insert->execute()) { return true; } return false; } } //New Functions function add_batch_creation($department,$semester,$division,$b_name,$f_roll,$t_roll) { $date = date("Y-m-d"); $time = date("H-i-s A"); if($stmt_insert = $this->con->prepare("INSERT INTO `batch_creation`(`department`, `semester`, `division`, `batch_name`, `from_roll_no`,`to_roll_no`, `date`, `time`) VALUES (?,?,?,?,?,?,?,?)")) { $stmt_insert->bind_param("ssssssss",$department,$semester,$division,$b_name,$f_roll,$t_roll,$date,$time); if($stmt_insert->execute()) { return true; } return false; } } function get_all_batch_creation_data($department,$semester) { if($department == "Select Department") { $department = ""; } if($semester == "Select Semester") { $semester = ""; } if($stmt_insert = $this->con->prepare("SELECT `id`,`department`,`semester`,`division`,`batch_name`, `from_roll_no`,`to_roll_no` FROM `batch_creation` Where `department` LIKE '%$department%' AND `semester` LIKE '%$semester%' ORDER BY `id` DESC")) { $stmt_insert->bind_result($id,$department,$semester,$division,$batch_name,$from_roll_no,$to_roll_no); if($stmt_insert->execute()) { $counter = 0; $details = array(); while($stmt_insert->fetch()) { $details[$counter][0] = $id; $details[$counter][1] = $department; $details[$counter][2] = $semester; $details[$counter][3] = $division; $details[$counter][4] = $batch_name; $details[$counter][5] = $from_roll_no; $details[$counter][6] = $to_roll_no; $counter++; } if(!empty($details)) { return $details; } return false; } } } function delete_batch_creation($del_id) { if($stmt_select = $this->con->prepare("Delete from `batch_creation` where `id`=?")) { $stmt_select->bind_param("i",$del_id); if($stmt_select->execute()) { return true; } return false; } } function get_all_batch_creation_data_by_id($up_id) { if($stmt_insert = $this->con->prepare("SELECT `id`,`department`,`semester`,`division`,`batch_name`, `from_roll_no`,`to_roll_no` FROM `batch_creation` Where `id` = ?")) { $stmt_insert->bind_param("i",$up_id); $stmt_insert->bind_result($id,$department,$semester,$division,$batch_name,$from_roll_no,$to_roll_no); if($stmt_insert->execute()) { $counter = 0; $details = array(); while($stmt_insert->fetch()) { $details[$counter][0] = $id; $details[$counter][1] = $department; $details[$counter][2] = $semester; $details[$counter][3] = $division; $details[$counter][4] = $batch_name; $details[$counter][5] = $from_roll_no; $details[$counter][6] = $to_roll_no; $counter++; } if(!empty($details)) { return $details; } return false; } } } function update_batch_creation($up_id,$department,$semester,$division,$b_name,$f_roll,$t_roll) { if($stmt_insert = $this->con->prepare("Update `batch_creation` set `department` = ?, `semester` = ?, `division` = ?, `batch_name` = ?, `from_roll_no` = ?,`to_roll_no` = ? Where `id` = ?")) { $stmt_insert->bind_param("ssssssi",$department,$semester,$division,$b_name,$f_roll,$t_roll,$up_id); if($stmt_insert->execute()) { return true; } return false; } } function add_class_subject_creation($department,$semester,$s_name,$abbrivation,$s_type) { $date = date("Y-m-d"); $time = date("H-i-s A"); if($stmt_insert = $this->con->prepare("INSERT INTO `class_subject`(`department`, `semester`, `subject_name`, `abbreviation`, `subject_type`, `date`, `time`) VALUES (?,?,?,?,?,?,?)")) { $stmt_insert->bind_param("sssssss",$department,$semester,$s_name,$abbrivation,$s_type,$date,$time); if($stmt_insert->execute()) { return true; } return false; } } function get_all_class_subject_data($department,$semester) { if($department == "Select Department") { $department = ""; } if($semester == "Select Semester") { $semester = ""; } if($stmt_insert = $this->con->prepare("SELECT `id`,`department`,`semester`,`subject_name`,`abbreviation`, `subject_type` FROM `class_subject` Where `department` LIKE '%$department%' AND `semester` LIKE '%$semester%' ORDER BY `id` DESC")) { $stmt_insert->bind_result($id,$department,$semester,$subject_name,$abbreviation,$subject_type); if($stmt_insert->execute()) { $counter = 0; $details = array(); while($stmt_insert->fetch()) { $details[$counter][0] = $id; $details[$counter][1] = $department; $details[$counter][2] = $semester; $details[$counter][3] = $subject_name; $details[$counter][4] = $abbreviation; $details[$counter][5] = $subject_type; $counter++; } if(!empty($details)) { return $details; } return false; } } } function delete_class_subject_creation($del_id) { if($stmt_select = $this->con->prepare("Delete from `class_subject` where `id`=?")) { $stmt_select->bind_param("i",$del_id); if($stmt_select->execute()) { return true; } return false; } } function get_all_class_subject_data_by_id($up_id) { if($stmt_insert = $this->con->prepare("SELECT `id`,`department`,`semester`,`subject_name`,`abbreviation`, `subject_type` FROM `class_subject` Where `id` = ? ")) { $stmt_insert->bind_param("i",$up_id); $stmt_insert->bind_result($id,$department,$semester,$subject_name,$abbreviation,$subject_type); if($stmt_insert->execute()) { $counter = 0; $details = array(); while($stmt_insert->fetch()) { $details[$counter][0] = $id; $details[$counter][1] = $department; $details[$counter][2] = $semester; $details[$counter][3] = $subject_name; $details[$counter][4] = $abbreviation; $details[$counter][5] = $subject_type; $counter++; } if(!empty($details)) { return $details; } return false; } } } function update_class_subject_creation($up_id,$department,$semester,$s_name,$abbrivation,$s_type) { if($stmt_insert = $this->con->prepare("Update `class_subject` set `department` = ?, `semester` = ?, `subject_name` = ?, `abbreviation` = ?, `subject_type` = ? Where `id` = ?")) { $stmt_insert->bind_param("sssssi",$department,$semester,$s_name,$abbrivation,$s_type,$up_id); if($stmt_insert->execute()) { return true; } return false; } } function fetch_class_subject_data() { if($stmt_insert = $this->con->prepare("SELECT `id`,`subject_name` FROM `class_subject`")) { $stmt_insert->bind_result($id,$subject_name); if($stmt_insert->execute()) { $counter = 0; $details = array(); while($stmt_insert->fetch()) { $details[$counter][0] = $id; $details[$counter][1] = $subject_name; $counter++; } if(!empty($details)) { return $details; } return false; } } } function fetch_class_subject_data_only() { if($stmt_insert = $this->con->prepare("SELECT DISTINCT(`subject_name`) FROM `class_subject`")) { $stmt_insert->bind_result($subject_name); if($stmt_insert->execute()) { $counter = 0; $details = array(); while($stmt_insert->fetch()) { $details[$counter][1] = $subject_name; $counter++; } if(!empty($details)) { return $details; } return false; } } } function fetch_batch_creation_data() { if($stmt_insert = $this->con->prepare("SELECT `id`,`department`,`semester`,`division`,`batch_name`, `from_roll_no`,`to_roll_no` FROM `batch_creation`")) { $stmt_insert->bind_result($id,$department,$semester,$division,$batch_name,$from_roll_no,$to_roll_no); if($stmt_insert->execute()) { $counter = 0; $details = array(); while($stmt_insert->fetch()) { $details[$counter][0] = $id; $details[$counter][1] = $department; $details[$counter][2] = $semester; $details[$counter][3] = $division; $details[$counter][4] = $batch_name; $details[$counter][5] = $from_roll_no; $details[$counter][6] = $to_roll_no; $counter++; } if(!empty($details)) { return $details; } return false; } } } function fetch_batches_data() { if($stmt_insert = $this->con->prepare("SELECT DISTINCT(`batch_name`) FROM `batch_creation`")) { $stmt_insert->bind_result($batch_name); if($stmt_insert->execute()) { $counter = 0; $details = array(); while($stmt_insert->fetch()) { $details[$counter][0] = $batch_name; $counter++; } if(!empty($details)) { return $details; } return false; } } } function add_staff_subject_creation($department,$semester,$s_name,$staff,$s_type,$batch,$division) { $date = date("Y-m-d"); $time = date("H-i-s A"); if($stmt_insert = $this->con->prepare("INSERT INTO `staff_subject_creation`(`department`, `semester`, `subject_name`, `staff`, `s_type`,`batch`, `date`, `time`,`division`) VALUES (?,?,?,?,?,?,?,?,?)")) { $stmt_insert->bind_param("sssssssss",$department,$semester,$s_name,$staff,$s_type,$batch,$date,$time,$division); if($stmt_insert->execute()) { return true; } return false; } } function get_all_staff_subject_data($department,$semester) { if($department == "Select Department") { $department = ""; } if($semester == "Select Semester") { $semester = ""; } if($stmt_insert = $this->con->prepare("SELECT `id`,`department`,`semester`,`subject_name`,`staff`, `s_type`, `batch`,`division` FROM `staff_subject_creation` Where `department` LIKE '%$department%' AND `semester` LIKE '%$semester%' ORDER BY `id` DESC")) { $stmt_insert->bind_result($id,$department,$semester,$subject_name,$staff,$s_type,$batch,$division); if($stmt_insert->execute()) { $counter = 0; $details = array(); while($stmt_insert->fetch()) { $details[$counter][0] = $id; $details[$counter][1] = $department; $details[$counter][2] = $semester; $details[$counter][3] = $subject_name; $details[$counter][4] = $staff; $details[$counter][5] = $s_type; $details[$counter][6] = $batch; $details[$counter][7] = $division; $counter++; } if(!empty($details)) { return $details; } return false; } } } function delete_staff_subject($del_id) { if($stmt_select = $this->con->prepare("Delete from `staff_subject_creation` where `id`=?")) { $stmt_select->bind_param("i",$del_id); if($stmt_select->execute()) { return true; } return false; } } function get_all_staff_subject_data_by_id($up_id) { if($stmt_insert = $this->con->prepare("SELECT `id`,`department`,`semester`,`subject_name`,`staff`, `s_type`, `batch`,`division` FROM `staff_subject_creation` Where `id` = ? ")) { $stmt_insert->bind_param("i",$up_id); $stmt_insert->bind_result($id,$department,$semester,$subject_name,$staff,$s_type,$batch,$division); if($stmt_insert->execute()) { $counter = 0; $details = array(); while($stmt_insert->fetch()) { $details[$counter][0] = $id; $details[$counter][1] = $department; $details[$counter][2] = $semester; $details[$counter][3] = $subject_name; $details[$counter][4] = $staff; $details[$counter][5] = $s_type; $details[$counter][6] = $batch; $details[$counter][7] = $division; $counter++; } if(!empty($details)) { return $details; } return false; } } } function update_staff_subject_creation($up_id,$department,$semester,$s_name,$staff,$s_type,$batch,$division) { if($stmt_insert = $this->con->prepare("UPDATE `staff_subject_creation` set `department` = ?, `semester` = ?, `subject_name` = ?, `staff` = ?, `s_type` = ?,`batch` = ?,`division`=? Where `id` = ?")) { $stmt_insert->bind_param("sssssssi",$department,$semester,$s_name,$staff,$s_type,$batch,$division,$up_id); if($stmt_insert->execute()) { return true; } return false; } } function add_result_category($title) { $date = date("Y-m-d"); $time = date("H-i-s A"); if($stmt_insert = $this->con->prepare("INSERT INTO `results_category`(`category_name`, `date`, `time`) VALUES (?,?,?)")) { $stmt_insert->bind_param("sss",$title,$date,$time); if($stmt_insert->execute()) { return true; } return false; } } function check_result_category_exist_or_not($category) { if($stmt_select = $this->con->prepare("Select `id` from `results_category` where `category_name` = ?")) { $stmt_select->bind_param("s",$category); $stmt_select->bind_result($result_password); if($stmt_select->execute()) { if($stmt_select->fetch()) { return $result_password; } } return false; } } function delete_result_category($del_id) { if($stmt_select = $this->con->prepare("Delete from `results_category` where `id`=?")) { $stmt_select->bind_param("i",$del_id); if($stmt_select->execute()) { return true; } return false; } } function get_all_result_category() { if($stmt_insert = $this->con->prepare("SELECT `id`,`category_name` FROM `results_category` ORDER BY `id` DESC")) { $stmt_insert->bind_result($id,$title); if($stmt_insert->execute()) { $counter = 0; $details = array(); while($stmt_insert->fetch()) { $details[$counter][0] = $id; $details[$counter][1] = $title; $counter++; } if(!empty($details)) { return $details; } return false; } } } function add_results_data($department,$semester,$category,$rank,$actual_image_name,$f_name,$marks) { $date = date("Y-m-d"); $time = date("H-i-s A"); if($stmt_insert = $this->con->prepare("INSERT INTO `results`(`department`, `semester`, `category`, `rank`, `attachment`,`name`,`marks`, `date`, `time`) VALUES (?,?,?,?,?,?,?,?,?)")) { $stmt_insert->bind_param("sssssssss",$department,$semester,$category,$rank,$actual_image_name,$f_name,$marks,$date,$time); if($stmt_insert->execute()) { return true; } return false; } } function delete_result_data($del_id) { if($stmt_select = $this->con->prepare("Delete from `results` where `id`=?")) { $stmt_select->bind_param("i",$del_id); if($stmt_select->execute()) { return true; } return false; } } function get_all_result_data($department,$semester) { if($department == "Select Department") { $department = ""; } if($semester == "Select Semester") { $semester = ""; } if($stmt_insert = $this->con->prepare("SELECT `id`,`department`,`semester`,`category`,`rank`, `attachment`,`name`,`marks` FROM `results` Where `department` LIKE '%$department%' AND `semester` LIKE '%$semester%' ORDER BY `id` DESC")) { $stmt_insert->bind_result($id,$department,$semester,$category,$rank,$attachment,$name,$marks); if($stmt_insert->execute()) { $counter = 0; $details = array(); while($stmt_insert->fetch()) { $details[$counter][0] = $id; $details[$counter][1] = $department; $details[$counter][2] = $semester; $details[$counter][3] = $category; $details[$counter][4] = $rank; $details[$counter][5] = $attachment; $details[$counter][6] = $name; $details[$counter][7] = $marks; $counter++; } if(!empty($details)) { return $details; } return false; } } } function get_all_result_data_by_id($up_id) { if($stmt_insert = $this->con->prepare("SELECT `id`,`department`,`semester`,`category`,`rank`, `attachment`,`name`,`marks` FROM `results` Where `id` = ?")) { $stmt_insert->bind_param("i",$up_id); $stmt_insert->bind_result($id,$department,$semester,$category,$rank,$attachment,$name,$marks); if($stmt_insert->execute()) { $counter = 0; $details = array(); while($stmt_insert->fetch()) { $details[$counter][0] = $id; $details[$counter][1] = $department; $details[$counter][2] = $semester; $details[$counter][3] = $category; $details[$counter][4] = $rank; $details[$counter][5] = $attachment; $details[$counter][6] = $name; $details[$counter][7] = $marks; $counter++; } if(!empty($details)) { return $details; } return false; } } } function update_results_data($up_id,$department,$semester,$category,$rank,$f_name,$marks) { if($stmt_insert = $this->con->prepare("Update `results` set `department` = ?, `semester` = ?, `category` = ?, `rank` = ?,`name` = ?,`marks` = ? Where `id` = ?")) { $stmt_insert->bind_param("ssssssi",$department,$semester,$category,$rank,$f_name,$marks,$up_id); if($stmt_insert->execute()) { return true; } return false; } } function update_result_profile($up_id) { $actual_image_name=""; if($stmt_insert = $this->con->prepare("UPDATE `results` set `attachment` = ? Where `id`=?")) { $stmt_insert->bind_param("si",$actual_image_name,$up_id); if($stmt_insert->execute()) { return true; } return false; } } function get_result_image_name_by_id($id) { if($stmt_select = $this->con->prepare("Select `attachment` from `results` where `id` = ? ")) { $stmt_select->bind_param("i",$id); $stmt_select->bind_result($result_password); if($stmt_select->execute()) { if($stmt_select->fetch()) { return $result_password; } } return false; } } function update_result_image_info($up_id,$image) { if($stmt_insert = $this->con->prepare("UPDATE `results` set `attachment` = ? Where `id`=?")) { $stmt_insert->bind_param("si",$image,$up_id); if($stmt_insert->execute()) { return true; } return false; } } function new_alumni_slider($actual_image_name) { $date = date("Y-m-d"); $time = date("H-i-s A"); if($stmt_insert = $this->con->prepare("INSERT INTO `alumni_slider`(`images`, `date`, `time`) VALUES (?,?,?)")) { $stmt_insert->bind_param("sss",$actual_image_name,$date,$time); if($stmt_insert->execute()) { return true; } return false; } } function delete_alumni_slider($del_id) { if($stmt_select = $this->con->prepare("Delete from `alumni_slider` where `id`=?")) { $stmt_select->bind_param("i",$del_id); if($stmt_select->execute()) { return true; } return false; } } function get_all_alumni_slider() { if($stmt_insert = $this->con->prepare("SELECT `id`,`images` FROM `alumni_slider`")) { $stmt_insert->bind_result($id,$images); if($stmt_insert->execute()) { $counter = 0; $details = array(); while($stmt_insert->fetch()) { $details[$counter][0] = $id; $details[$counter][1] = $images; $counter++; } if(!empty($details)) { return $details; } return false; } } } function add_alumni_record($f_name,$mobile,$u_email,$actual_image_name) { $date = date("Y-m-d"); $time = date("H-i-s A"); if($stmt_insert = $this->con->prepare("INSERT INTO `alumni_registration`(`name`,`mobile`,`email`,`attachment`,`date`, `time`) VALUES (?,?,?,?,?,?)")) { $stmt_insert->bind_param("ssssss",$f_name,$mobile,$u_email,$actual_image_name,$date,$time); if($stmt_insert->execute()) { return true; } return false; } } function get_all_result_data_deptwise($department) { if($stmt_insert = $this->con->prepare("SELECT `id`,`department`,`semester`,`category`,`rank`, `attachment`,`name`,`marks` FROM `results` Where `department` = ?")) { $stmt_insert->bind_param("s",$department); $stmt_insert->bind_result($id,$department,$semester,$category,$rank,$attachment,$name,$marks); if($stmt_insert->execute()) { $counter = 0; $details = array(); while($stmt_insert->fetch()) { $details[$counter][0] = $id; $details[$counter][1] = $department; $details[$counter][2] = $semester; $details[$counter][3] = $category; $details[$counter][4] = $rank; $details[$counter][5] = $attachment; $details[$counter][6] = $name; $details[$counter][7] = $marks; $counter++; } if(!empty($details)) { return $details; } return false; } } } function get_all_category_info_deptwise($department) { if($stmt_insert = $this->con->prepare("SELECT `id`,`department`,`category`,`icons` FROM `category` Where `department` = ? ")) { $stmt_insert->bind_param("s",$department); $stmt_insert->bind_result($id,$department,$category,$attachment); if($stmt_insert->execute()) { $counter = 0; $details = array(); while($stmt_insert->fetch()) { $details[$counter][0] = $id; $details[$counter][1] = $department; $details[$counter][2] = $category; $details[$counter][3] = $attachment; $counter++; } if(!empty($details)) { return $details; } return false; } } } function get_all_gallery_images_deptwise_categorywise($department,$section) { if($stmt_insert = $this->con->prepare("SELECT `id`,`departmentt`,`section`,`images`,`description` FROM `gallery` where `departmentt` = ? AND `section` = ?")) { $stmt_insert->bind_param("ss",$department,$section); $stmt_insert->bind_result($id,$department,$section,$images,$description); if($stmt_insert->execute()) { $counter = 0; $details = array(); while($stmt_insert->fetch()) { $details[$counter][0] = $id; $details[$counter][1] = $department; $details[$counter][2] = $section; $details[$counter][3] = $images; $details[$counter][4] = $description; $counter++; } if(!empty($details)) { return $details; } return false; } } } function get_all_category_info_gallery() { if($stmt_insert = $this->con->prepare("SELECT `id`,`department`,`category`,`icons` FROM `category`")) { $stmt_insert->bind_result($id,$department,$category,$attachment); if($stmt_insert->execute()) { $counter = 0; $details = array(); while($stmt_insert->fetch()) { $details[$counter][0] = $id; $details[$counter][1] = $department; $details[$counter][2] = $category; $details[$counter][3] = $attachment; $counter++; } if(!empty($details)) { return $details; } return false; } } } function new_alumni_images($title,$actual_image_name) { $date = date("Y-m-d"); $time = date("H-i-s A"); if($stmt_insert = $this->con->prepare("INSERT INTO `alumni_gallery`(`title`,`attachment`, `date`, `time`) VALUES (?,?,?,?)")) { $stmt_insert->bind_param("ssss",$title,$actual_image_name,$date,$time); if($stmt_insert->execute()) { return true; } return false; } } function delete_alumni_images($del_id) { if($stmt_select = $this->con->prepare("Delete from `alumni_gallery` where `id`=?")) { $stmt_select->bind_param("i",$del_id); if($stmt_select->execute()) { return true; } return false; } } function get_all_alumni_gallery() { if($stmt_insert = $this->con->prepare("SELECT `id`,`title`,`attachment` FROM `alumni_gallery` ORDER BY `id` DESC")) { $stmt_insert->bind_result($id,$title,$images); if($stmt_insert->execute()) { $counter = 0; $details = array(); while($stmt_insert->fetch()) { $details[$counter][0] = $id; $details[$counter][1] = $title; $details[$counter][2] = $images; $counter++; } if(!empty($details)) { return $details; } return false; } } } function new_testimonials($u_name,$message,$actual_image_name) { $date = date("Y-m-d"); $time = date("H-i-s A"); if($stmt_insert = $this->con->prepare("INSERT INTO `testimonials`(`name`,`message`,`attachment`, `date`, `time`) VALUES (?,?,?,?,?)")) { $stmt_insert->bind_param("sssss",$u_name,$message,$actual_image_name,$date,$time); if($stmt_insert->execute()) { return true; } return false; } } function delete_testimonials($del_id) { if($stmt_select = $this->con->prepare("Delete from `testimonials` where `id`=?")) { $stmt_select->bind_param("i",$del_id); if($stmt_select->execute()) { return true; } return false; } } function get_all_testimonials() { if($stmt_insert = $this->con->prepare("SELECT `id`,`name`,`message`,`attachment` FROM `testimonials` ORDER BY `id` DESC")) { $stmt_insert->bind_result($id,$name,$message,$attachment); if($stmt_insert->execute()) { $counter = 0; $details = array(); while($stmt_insert->fetch()) { $details[$counter][0] = $id; $details[$counter][1] = $name; $details[$counter][2] = $message; $details[$counter][3] = $attachment; $counter++; } if(!empty($details)) { return $details; } return false; } } } function new_semester_controller($semester) { $date = date("Y-m-d"); $time = date("H-i-s A"); if($stmt_insert = $this->con->prepare("INSERT INTO `semester`(`semester_name`,`date`, `time`) VALUES (?,?,?)")) { $stmt_insert->bind_param("sss",$semester,$date,$time); if($stmt_insert->execute()) { return true; } return false; } } function check_semester_exists_or_not($semester) { if($stmt_select = $this->con->prepare("Select `id` from `semester` where `semester_name` = ? ")) { $stmt_select->bind_param("s",$semester); $stmt_select->bind_result($result_password); if($stmt_select->execute()) { if($stmt_select->fetch()) { return $result_password; } } return false; } } function get_all_semester() { if($stmt_insert = $this->con->prepare("SELECT `id`,`semester_name` FROM `semester` ORDER BY `id` DESC")) { $stmt_insert->bind_result($id,$semester_name); if($stmt_insert->execute()) { $counter = 0; $details = array(); while($stmt_insert->fetch()) { $details[$counter][0] = $id; $details[$counter][1] = $semester_name; $counter++; } if(!empty($details)) { return $details; } return false; } } } function delete_semester($del_id) { if($stmt_select = $this->con->prepare("Delete from `semester` where `id`=?")) { $stmt_select->bind_param("i",$del_id); if($stmt_select->execute()) { return true; } return false; } } function check_department_exists_or_not($semester) { if($stmt_select = $this->con->prepare("Select `id` from `departments` where `department_name` = ? ")) { $stmt_select->bind_param("s",$semester); $stmt_select->bind_result($result_password); if($stmt_select->execute()) { if($stmt_select->fetch()) { return $result_password; } } return false; } } function new_department_controller($semester) { $date = date("Y-m-d"); $time = date("H-i-s A"); if($stmt_insert = $this->con->prepare("INSERT INTO `departments`(`department_name`,`date`, `time`) VALUES (?,?,?)")) { $stmt_insert->bind_param("sss",$semester,$date,$time); if($stmt_insert->execute()) { return true; } return false; } } function get_all_department() { if($stmt_insert = $this->con->prepare("SELECT `id`,`department_name` FROM `departments` ORDER BY `id` DESC")) { $stmt_insert->bind_result($id,$semester_name); if($stmt_insert->execute()) { $counter = 0; $details = array(); while($stmt_insert->fetch()) { $details[$counter][0] = $id; $details[$counter][1] = $semester_name; $counter++; } if(!empty($details)) { return $details; } return false; } } } function delete_department($del_id) { if($stmt_select = $this->con->prepare("Delete from `departments` where `id`=?")) { $stmt_select->bind_param("i",$del_id); if($stmt_select->execute()) { return true; } return false; } } function delete_student_feedback($del_id) { if($stmt_select = $this->con->prepare("Delete from `feedback` where `id`=?")) { $stmt_select->bind_param("i",$del_id); if($stmt_select->execute()) { return true; } return false; } } function check_section_exists_or_not($semester) { if($stmt_select = $this->con->prepare("Select `id` from `section` where `section_name` = ? ")) { $stmt_select->bind_param("s",$semester); $stmt_select->bind_result($result_password); if($stmt_select->execute()) { if($stmt_select->fetch()) { return $result_password; } } return false; } } function new_section_controller($semester) { $date = date("Y-m-d"); $time = date("H-i-s A"); if($stmt_insert = $this->con->prepare("INSERT INTO `section`(`section_name`,`date`, `time`) VALUES (?,?,?)")) { $stmt_insert->bind_param("sss",$semester,$date,$time); if($stmt_insert->execute()) { return true; } return false; } } function get_all_section() { if($stmt_insert = $this->con->prepare("SELECT `id`,`section_name` FROM `section` ORDER BY `id` DESC")) { $stmt_insert->bind_result($id,$semester_name); if($stmt_insert->execute()) { $counter = 0; $details = array(); while($stmt_insert->fetch()) { $details[$counter][0] = $id; $details[$counter][1] = $semester_name; $counter++; } if(!empty($details)) { return $details; } return false; } } } function delete_section($del_id) { if($stmt_select = $this->con->prepare("Delete from `section` where `id`=?")) { $stmt_select->bind_param("i",$del_id); if($stmt_select->execute()) { return true; } return false; } } function new_class_coordinator($department,$semester,$division,$staff) { $date = date("Y-m-d"); $time = date("H-i-s A"); if($stmt_insert = $this->con->prepare("INSERT INTO `class_coordinator`(`department`,`semester`,`division`,`staff`,`date`, `time`) VALUES (?,?,?,?,?,?)")) { $stmt_insert->bind_param("ssssss",$department,$semester,$division,$staff,$date,$time); if($stmt_insert->execute()) { return true; } return false; } } function get_all_class_coordinator() { if($stmt_insert = $this->con->prepare("SELECT `id`,`department`,`semester`,`division`,`staff` FROM `class_coordinator` ORDER BY `id` DESC")) { $stmt_insert->bind_result($id,$department,$semester,$division,$staff); if($stmt_insert->execute()) { $counter = 0; $details = array(); while($stmt_insert->fetch()) { $details[$counter][0] = $id; $details[$counter][1] = $department; $details[$counter][2] = $semester; $details[$counter][3] = $division; $details[$counter][4] = $staff; $counter++; } if(!empty($details)) { return $details; } return false; } } } function delete_class_coordinator($del_id) { if($stmt_select = $this->con->prepare("Delete from `class_coordinator` where `id`=?")) { $stmt_select->bind_param("i",$del_id); if($stmt_select->execute()) { return true; } return false; } } function check_designation_exists_or_not($semester) { if($stmt_select = $this->con->prepare("Select `id` from `designation_master` where `designation_name` = ? ")) { $stmt_select->bind_param("s",$semester); $stmt_select->bind_result($result_password); if($stmt_select->execute()) { if($stmt_select->fetch()) { return $result_password; } } return false; } } function new_designation_controller($semester) { $date = date("Y-m-d"); $time = date("H-i-s A"); if($stmt_insert = $this->con->prepare("INSERT INTO `designation_master`(`designation_name`,`date`, `time`) VALUES (?,?,?)")) { $stmt_insert->bind_param("sss",$semester,$date,$time); if($stmt_insert->execute()) { return true; } return false; } } function delete_designation($del_id) { if($stmt_select = $this->con->prepare("Delete from `designation_master` where `id`=?")) { $stmt_select->bind_param("i",$del_id); if($stmt_select->execute()) { return true; } return false; } } function get_all_designations() { if($stmt_insert = $this->con->prepare("SELECT `id`,`designation_name` FROM `designation_master` ORDER BY `id` DESC")) { $stmt_insert->bind_result($id,$semester_name); if($stmt_insert->execute()) { $counter = 0; $details = array(); while($stmt_insert->fetch()) { $details[$counter][0] = $id; $details[$counter][1] = $semester_name; $counter++; } if(!empty($details)) { return $details; } return false; } } } //20-11 function new_iqac_info($title,$actual_image_name) { $date = date("Y-m-d"); $time = date("H-i-s A"); if($stmt_insert = $this->con->prepare("INSERT INTO `iqac_info`(`title`,`attachment`, `date`, `time`) VALUES (?,?,?,?)")) { $stmt_insert->bind_param("ssss",$title,$actual_image_name,$date,$time); if($stmt_insert->execute()) { return true; } return false; } } function delete_iqac_info($del_id) { if($stmt_select = $this->con->prepare("Delete from `iqac_info` where `id`=?")) { $stmt_select->bind_param("i",$del_id); if($stmt_select->execute()) { return true; } return false; } } function get_all_iqac_info() { if($stmt_insert = $this->con->prepare("SELECT `id`,`title`,`attachment` FROM `iqac_info` ORDER BY `id` ASC")) { $stmt_insert->bind_result($id,$title,$images); if($stmt_insert->execute()) { $counter = 0; $details = array(); while($stmt_insert->fetch()) { $details[$counter][0] = $id; $details[$counter][1] = $title; $details[$counter][2] = $images; $counter++; } if(!empty($details)) { return $details; } return false; } } } //ia function new_iqac_min_info($title,$actual_image_name) { $date = date("Y-m-d"); $time = date("H-i-s A"); if($stmt_insert = $this->con->prepare("INSERT INTO `iqac_minutes_and_atr`(`title`,`attachment`, `date`, `time`) VALUES (?,?,?,?)")) { $stmt_insert->bind_param("ssss",$title,$actual_image_name,$date,$time); if($stmt_insert->execute()) { return true; } return false; } } function delete_iqac_min_info($del_id) { if($stmt_select = $this->con->prepare("Delete from `iqac_minutes_and_atr` where `id`=?")) { $stmt_select->bind_param("i",$del_id); if($stmt_select->execute()) { return true; } return false; } } function get_all_iqac_min_info() { if($stmt_insert = $this->con->prepare("SELECT `id`,`title`,`attachment` FROM `iqac_minutes_and_atr` ORDER BY `id` ASC")) { $stmt_insert->bind_result($id,$title,$images); if($stmt_insert->execute()) { $counter = 0; $details = array(); while($stmt_insert->fetch()) { $details[$counter][0] = $id; $details[$counter][1] = $title; $details[$counter][2] = $images; $counter++; } if(!empty($details)) { return $details; } return false; } } } //28-11-2019feedback function add_alumni_feedback($name,$email_id,$contact_no,$passing,$department,$occupation,$activities,$development,$facilities,$c_activities,$learning,$counselling,$library,$communication,$career,$p_facilities,$suggestion) { $date = date("Y-m-d"); $time = date("H-i-s A"); if($stmt_insert = $this->con->prepare("INSERT INTO `alumni_feedback`(`name`, `email`, `contact`, `passing_year`, `department`, `occupation`, `development_activities`, `clg_development`, `infrastructure`, `sports`, `teaching_learning`, `student_counselling`, `library`, `communication`, `career`, `other_facilities`, `suggestion`, `date`, `time`) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)")) { $stmt_insert->bind_param("sssssssssssssssssss",$name,$email_id,$contact_no,$passing,$department,$occupation,$activities,$development,$facilities,$c_activities,$learning,$counselling,$library,$communication,$career,$p_facilities,$suggestion,$date,$time); if($stmt_insert->execute()) { return true; } return false; } } function get_all_alumni_feedback($date_from,$date_to) { $date_from = date("Y-m-d" , strtotime($date_from)); $date_to = date("Y-m-d" , strtotime($date_to)); if($stmt_insert = $this->con->prepare("SELECT `id`,`name`,`email`,`contact`,`passing_year`,`department`,`occupation`,`development_activities`,`clg_development`,`infrastructure`,`sports`,`teaching_learning`,`student_counselling`,`library`,`communication`,`career`,`other_facilities`,`suggestion` FROM `alumni_feedback` Where `date` BETWEEN '$date_from' AND '$date_to'")) { $stmt_insert->bind_result($id,$name,$email,$contact,$passing_year,$department,$occupation,$development_activities,$clg_development,$infrastructure,$sports,$teaching_learning,$student_counselling,$library,$communication,$career,$other_facilities,$suggestion); if($stmt_insert->execute()) { $counter = 0; $details = array(); while($stmt_insert->fetch()) { $details[$counter][0] = $id; $details[$counter][1] = $name; $details[$counter][2] = $email; $details[$counter][3] = $contact; $details[$counter][4] = $passing_year; $details[$counter][5] = $department; $details[$counter][6] = $occupation; $details[$counter][7] = $development_activities; $details[$counter][8] = $clg_development; $details[$counter][9] = $infrastructure; $details[$counter][10] = $sports; $details[$counter][11] = $teaching_learning; $details[$counter][12] = $student_counselling; $details[$counter][13] = $library; $details[$counter][14] = $communication; $details[$counter][15] = $career; $details[$counter][16] = $other_facilities; $details[$counter][17] = $suggestion; $counter++; } if(!empty($details)) { return $details; } return false; } } } function delete_alumni_feedback($del_id) { if($stmt_select = $this->con->prepare("Delete from `alumni_feedback` where `id`=?")) { $stmt_select->bind_param("i",$del_id); if($stmt_select->execute()) { return true; } return false; } } function add_parents_feedback($name,$contact_no,$ward,$department,$passing,$occupation,$activities,$facilities,$c_activities,$learning,$counselling,$library,$communication,$career,$p_facilities,$suggestion) { $date = date("Y-m-d"); $time = date("H-i-s A"); if($stmt_insert = $this->con->prepare("INSERT INTO `parents_feedback`(`name`, `contact_no`, `ward`, `department`, `academic_year`, `course`, `admission_procedure`, `infrastructure`, `sports`, `teaching`, `student_counselling`, `library`, `communication`, `career`, `other_facilities`, `suggestion`, `date`, `time`) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)")) { $stmt_insert->bind_param("ssssssssssssssssss",$name,$contact_no,$ward,$department,$passing,$occupation,$activities,$facilities,$c_activities,$learning,$counselling,$library,$communication,$career,$p_facilities,$suggestion,$date,$time); if($stmt_insert->execute()) { return true; } return false; } } function get_all_parents_feedback($date_from,$date_to) { $date_from = date("Y-m-d" , strtotime($date_from)); $date_to = date("Y-m-d" , strtotime($date_to)); if($stmt_insert = $this->con->prepare("SELECT `id`, `name`, `contact_no`, `ward`, `department`, `academic_year`, `course`, `admission_procedure`, `infrastructure`, `sports`, `teaching`, `student_counselling`, `library`, `communication`, `career`, `other_facilities`, `suggestion` FROM `parents_feedback` Where `date` BETWEEN '$date_from' AND '$date_to'")) { $stmt_insert->bind_result($id,$name,$contact,$ward,$department,$academic_year,$course,$admission_procedure,$infrastructure,$sports,$teaching_learning,$student_counselling,$library,$communication,$career,$other_facilities,$suggestion); if($stmt_insert->execute()) { $counter = 0; $details = array(); while($stmt_insert->fetch()) { $details[$counter][0] = $id; $details[$counter][1] = $name; $details[$counter][2] = $contact; $details[$counter][3] = $ward; $details[$counter][4] = $department; $details[$counter][5] = $academic_year; $details[$counter][6] = $course; $details[$counter][7] = $admission_procedure; $details[$counter][8] = $infrastructure; $details[$counter][9] = $sports; $details[$counter][10] = $teaching_learning; $details[$counter][11] = $student_counselling; $details[$counter][12] = $library; $details[$counter][13] = $communication; $details[$counter][14] = $career; $details[$counter][15] = $other_facilities; $details[$counter][16] = $suggestion; $counter++; } if(!empty($details)) { return $details; } return false; } } } function delete_parents_feedback($del_id) { if($stmt_select = $this->con->prepare("Delete from `parents_feedback` where `id`=?")) { $stmt_select->bind_param("i",$del_id); if($stmt_select->execute()) { return true; } return false; } } function add_evaluation_form($department,$class,$semester,$teacher,$taught,$time1,$time2,$time3,$time4,$subject1,$subject2,$subject3,$subject4,$subject5,$subject6,$subject7,$subject8,$use1,$use2,$use3,$use4,$use5,$helping1,$helping2,$helping3,$helping4,$helping5,$helping6,$helping7,$class1,$class2,$class3,$class4,$class5,$class6,$remark) { $date = date("Y-m-d"); $time = date("H-i-s A"); if($stmt_insert = $this->con->prepare("INSERT INTO `evaluation_form`(`department`, `class`, `semester`, `teacher`, `taught`, `time1`, `time2`, `time3`, `time4`, `subject1`, `subject2`, `subject3`, `subject4`, `subject5`, `subject6`, `subject7`, `subject8`, `method1`, `method2`, `method3`, `method4`, `method5`, `helping1`, `helping2`, `helping3`, `helping4`, `helping5`, `helping6`, `helping7`, `class1`, `class2`, `class3`, `class4`, `class5`, `class6`, `remark`, `date`, `time`) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)")) { $stmt_insert->bind_param("ssssssssssssssssssssssssssssssssssssss",$department,$class,$semester,$teacher,$taught,$time1,$time2,$time3,$time4,$subject1,$subject2,$subject3,$subject4,$subject5,$subject6,$subject7,$subject8,$use1,$use2,$use3,$use4,$use5,$helping1,$helping2,$helping3,$helping4,$helping5,$helping6,$helping7,$class1,$class2,$class3,$class4,$class5,$class6,$remark,$date,$time); if($stmt_insert->execute()) { return true; } return false; } } function get_all_evaluation_feedback() { if($stmt_insert = $this->con->prepare("SELECT `id`,`department`, `class`, `semester`, `teacher`, `taught`, `time1`, `time2`, `time3`, `time4`, `subject1`, `subject2`, `subject3`, `subject4`, `subject5`, `subject6`, `subject7`, `subject8`, `method1`, `method2`, `method3`, `method4`, `method5`, `helping1`, `helping2`, `helping3`, `helping4`, `helping5`, `helping6`, `helping7`, `class1`, `class2`, `class3`, `class4`, `class5`, `class6`, `remark` FROM `evaluation_form` ORDER BY `id` DESC")) { $stmt_insert->bind_result($id,$department,$class,$semester,$teacher,$taught,$time1,$time2, $time3,$time4,$subject1,$subject2,$subject3,$subject4,$subject5,$subject6,$subject7,$subject8, $method1,$method2,$method3,$method4,$method5,$helping1,$helping2,$helping3,$helping4, $helping5,$helping6,$helping7,$class1,$class2,$class3,$class4,$class5,$class6,$remark); if($stmt_insert->execute()) { $counter = 0; $details = array(); while($stmt_insert->fetch()) { $details[$counter][0] = $id; $details[$counter][1] = $department; $details[$counter][2] = $class; $details[$counter][3] = $semester; $details[$counter][4] = $teacher; $details[$counter][5] = $taught; $details[$counter][6] = $time1; $details[$counter][7] = $time2; $details[$counter][8] = $time3; $details[$counter][9] = $time4; $details[$counter][10] = $subject1; $details[$counter][11] = $subject2; $details[$counter][12] = $subject3; $details[$counter][13] = $subject4; $details[$counter][14] = $subject5; $details[$counter][15] = $subject6; $details[$counter][16] = $subject7; $details[$counter][17] = $subject8; $details[$counter][18] = $method1; $details[$counter][19] = $method2; $details[$counter][20] = $method3; $details[$counter][21] = $method4; $details[$counter][22] = $method5; $details[$counter][23] = $helping1; $details[$counter][24] = $helping2; $details[$counter][25] = $helping3; $details[$counter][26] = $helping4; $details[$counter][27] = $helping5; $details[$counter][28] = $helping6; $details[$counter][29] = $helping7; $details[$counter][30] = $class1; $details[$counter][31] = $class2; $details[$counter][32] = $class3; $details[$counter][33] = $class4; $details[$counter][34] = $class5; $details[$counter][35] = $class6; $details[$counter][36] = $remark; $counter++; } if(!empty($details)) { return $details; } return false; } } } function delete_evaluation_feedback($del_id) { if($stmt_select = $this->con->prepare("Delete from `evaluation_form` where `id`=?")) { $stmt_select->bind_param("i",$del_id); if($stmt_select->execute()) { return true; } return false; } } function save_teacher_detail($teacher_name,$email,$contact,$department,$subject,$qt1,$qt2,$qt3,$qt4,$qt5,$qt6,$qt7,$suggestion,$qt8,$qt9,$qt10,$qt11,$qt12,$qt13,$qt14,$qt15,$qt16,$qt17,$qt18,$qt19,$qt20,$qt21,$qt22,$qt23,$qt24,$qt25,$qt26,$qt27) { $date = date("Y-m-d"); $time = date("H:i:s t"); if($stmt = $this->con->prepare("INSERT INTO `teacher_feedback_info`(`teacher_name`, `email`, `contact`, `department`, `subject`, `qt1`, `qt2`, `qt3`, `qt4`, `qt5`, `qt6`, `qt7`, `suggestion`, `qt8`, `qt9`, `qt10`, `qt11`, `qt12`, `qt13`, `qt14`, `qt15`, `qt16`, `qt17`, `qt18`, `qt19`, `qt20`, `qt21`, `qt22`, `qt23`, `qt24`, `qt25`, `qt26`, `qt27`, `date`, `time`) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)")) { $stmt->bind_param("sssssssssssssssssssssssssssssssssss",$teacher_name,$email,$contact,$department,$subject,$qt1,$qt2,$qt3,$qt4,$qt5,$qt6,$qt7,$suggestion,$qt8,$qt9,$qt10,$qt11,$qt12,$qt13,$qt14,$qt15,$qt16,$qt17,$qt18,$qt19,$qt20,$qt21,$qt22,$qt23,$qt24,$qt25,$qt26,$qt27,$date,$time); if($stmt->execute()) { return true; } return false; } } 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 add_online_feedback($full_name,$sclass,$syllabus,$classes,$communication,$approach,$evaluation,$performance,$internship,$process,$opportunities,$programme,$task,$concepts,$challenges,$help,$review,$centric,$encourage,$skills,$sreview,$quality,$txtcno,$txtcno1,$txtcno2) { $date = date("Y-m-d"); $time = date("H-i-s A"); if($stmt_insert = $this->con->prepare("INSERT INTO `online_feedback_info`(`full_name`, `sclass`, `syllabus`, `classes`, `communication`, `approach`, `evaluation`, `performance`, `internship`, `process`, `oppertunties`, `programme`, `task`, `concepts`, `challenges`, `help`, `review`, `centric`, `encourage`, `skills`, `sreview`, `quality`, `txtcno`, `txtcno1`, `txtcno2`, `date`, `time`) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)")) { $stmt_insert->bind_param("sssssssssssssssssssssssssss",$full_name,$sclass,$syllabus,$classes,$communication,$approach,$evaluation,$performance,$internship,$process,$opportunities,$programme,$task,$concepts,$challenges,$help,$review,$centric,$encourage,$skills,$sreview,$quality,$txtcno,$txtcno1,$txtcno2,$date,$time); if($stmt_insert->execute()) { return true; } return false; } } function delete_online_feedback($del_id) { if($stmt = $this->con->prepare("DELETE FROM `online_feedback_info` WHERE `id`=?")) { $stmt->bind_param("i",$del_id); if($stmt->execute()) { return true; } return False; } } function get_all_online_feedback() { if($stmt = $this->con->prepare("SELECT `id`, `full_name`, `sclass`, `syllabus`, `classes`, `communication`, `approach`, `evaluation`, `performance`, `internship`, `process`, `oppertunties`, `programme`, `task`, `concepts`, `challenges`, `help`, `review`, `centric`, `encourage`, `skills`, `sreview`, `quality`, `txtcno`, `txtcno1`, `txtcno2` FROM `online_feedback_info`")) { $stmt->bind_result($res_id,$full_name,$sclass,$syllabus,$classes,$communication,$approach,$evaluation,$performance,$internship,$process,$opportunities,$programme,$task,$concepts,$challenges,$help,$review,$centric,$encourage,$skills,$sreview,$quality,$txtcno,$txtcno1,$txtcno2); if($stmt->execute()) { $data = array(); $row_counter = 0; while($stmt->fetch()) { $data[$row_counter][0] = $res_id; $data[$row_counter][1] = $full_name; $data[$row_counter][2] = $sclass; $data[$row_counter][3] = $syllabus; $data[$row_counter][4] = $classes; $data[$row_counter][5] = $communication; $data[$row_counter][6] = $approach; $data[$row_counter][7] = $evaluation; $data[$row_counter][8] = $performance; $data[$row_counter][9] = $internship; $data[$row_counter][10] = $process; $data[$row_counter][11] = $opportunities; $data[$row_counter][12] = $programme; $data[$row_counter][13] = $task; $data[$row_counter][14] = $concepts; $data[$row_counter][15] = $challenges; $data[$row_counter][16] = $help; $data[$row_counter][17] = $sreview; $data[$row_counter][18] = $centric; $data[$row_counter][19] = $encourage; $data[$row_counter][20] = $skills; $data[$row_counter][21] = $review; $data[$row_counter][22] = $quality; $data[$row_counter][23] = $txtcno; $data[$row_counter][24] = $txtcno; $data[$row_counter][25] = $txtcno; $row_counter++; } if(!empty($data)) { return $data; } else { return false; } } } } function get_all_teacher_data() { if($stmt = $this->con->prepare("SELECT `id`, `teacher_name`, `email`, `contact`, `department`, `subject`,`date`, `time` FROM `teacher_feedback_info`")) { $stmt->bind_result($res_id,$teacher_name,$email,$contact,$department,$subject,$date,$time); if($stmt->execute()) { $data = array(); $row_counter = 0; while($stmt->fetch()) { $data[$row_counter][0] = $res_id; $data[$row_counter][1] = $teacher_name; $data[$row_counter][2] = $email; $data[$row_counter][3] = $contact; $data[$row_counter][4] = $department; $data[$row_counter][5] = $subject; $row_counter++; } if(!empty($data)) { return $data; } else { return false; } } } } function get_all_teacher_feedback_detail($edit_id) { if($stmt = $this->con->prepare("SELECT `id`, `teacher_name`, `email`, `contact`, `department`, `subject`, `qt1`, `qt2`, `qt3`, `qt4`, `qt5`, `qt6`, `qt7`, `suggestion`, `qt8`, `qt9`, `qt10`, `qt11`, `qt12`, `qt13`, `qt14`, `qt15`, `qt16`, `qt17`, `qt18`, `qt19`, `qt20`, `qt21`, `qt22`, `qt23`, `qt24`, `qt25`, `qt26`, `qt27`, `date`, `time` FROM `teacher_feedback_info` WHERE `id`=?")) { $stmt->bind_param("i",$edit_id); $stmt->bind_result($res_id,$teacher_name,$email,$contact,$department,$subject,$qt1,$qt2,$qt3,$qt4,$qt5,$qt6,$qt7,$suggestion,$qt8,$qt9,$qt10,$qt11,$qt12,$qt13,$qt14,$qt15,$qt16,$qt17,$qt18,$qt19,$qt20,$qt21,$qt22,$qt23,$qt24,$qt25,$qt26,$qt27,$date,$time); if($stmt->execute()) { $data = array(); $row_counter = 0; if($stmt->fetch()) { $data[0] = $res_id; $data[1] = $teacher_name; $data[2] = $email; $data[3] = $contact; $data[4] = $department; $data[5] = $subject; $data[6] = $qt1; $data[7] = $qt2; $data[8] = $qt3; $data[9] = $qt4; $data[10] = $qt5; $data[11] = $qt6; $data[12] = $qt7; $data[13] = $suggestion; $data[14] = $qt8; $data[15] = $qt9; $data[16] = $qt9; $data[17] = $qt10; $data[18] = $qt11; $data[19] = $qt12; $data[20] = $qt13; $data[21] = $qt14; $data[22] = $qt15; $data[23] = $qt16; $data[24] = $qt17; $data[25] = $qt18; $data[26] = $qt19; $data[27] = $qt20; $data[28] = $qt21; $data[29] = $qt22; $data[30] = $qt23; $data[31] = $qt24; $data[32] = $qt25; $data[33] = $qt26; $data[34] = $qt27; $row_counter++; } if(!empty($data)) { return $data; } else { return false; } } } } //29 function insert_details($tabel,$serial_no,$title,$cfile,$sequence,$year) { $date= date("y-m-d"); $time=date("h:i:s"); if($stmt= $this->con->prepare("INSERT INTO `panel`(`table`, `serial_no`, `title`, `cfile`, `date`, `time`,`sequence`,`year`) VALUES (?,?,?,?,?,?,?,?)")) { $stmt->bind_param("ssssssis",$tabel,$serial_no,$title,$cfile,$date,$time,$sequence,$year); if($stmt->execute()) { return true; } } else { return false; } } function insert_dvv_details($tabel,$serial_no,$title,$cfile,$sequence,$year) { $date= date("y-m-d"); $time=date("h:i:s"); if($stmt= $this->con->prepare("INSERT INTO `dvv_docs`(`table`, `serial_no`, `title`, `cfile`, `date`, `time`,`sequence`,`year`) VALUES (?,?,?,?,?,?,?,?)")) { $stmt->bind_param("ssssssis",$tabel,$serial_no,$title,$cfile,$date,$time,$sequence,$year); if($stmt->execute()) { return true; } } else { return false; } } function get_details($year) { $year_stmt = ""; if($year!="-") { $year_stmt = " where `year`='$year'"; } if($stmt=$this->con->prepare("SELECT `id`, `table`, `serial_no`, `title`, `cfile`, `date`, `time`,`sequence`,`year` FROM `panel`".$year_stmt)) { $stmt->bind_result($res_id,$table,$serial_no,$title,$cfile,$date,$time,$sequence,$year); if($stmt->execute()) { $data=array(); $counter=0; while($stmt->fetch()) { $data[$counter][0] = $res_id; $data[$counter][1] = $table; $data[$counter][2] = $serial_no; $data[$counter][3] = $title; $data[$counter][4] = $cfile; $data[$counter][5] = $date; $data[$counter][6] = $time; $data[$counter][7] = $sequence; $data[$counter][8] = $year; $counter ++; } if(!empty($data)) { return $data; } } else { return false; } } } function get_dvv_details($year) { $year_stmt = ""; if($year!="-") { $year_stmt = " where `year`='$year'"; } if($stmt=$this->con->prepare("SELECT `id`, `table`, `serial_no`, `title`, `cfile`, `date`, `time`,`sequence`,`year` FROM `dvv_docs`".$year_stmt)) { $stmt->bind_result($res_id,$table,$serial_no,$title,$cfile,$date,$time,$sequence,$year); if($stmt->execute()) { $data=array(); $counter=0; while($stmt->fetch()) { $data[$counter][0] = $res_id; $data[$counter][1] = $table; $data[$counter][2] = $serial_no; $data[$counter][3] = $title; $data[$counter][4] = $cfile; $data[$counter][5] = $date; $data[$counter][6] = $time; $data[$counter][7] = $sequence; $data[$counter][8] = $year; $counter ++; } if(!empty($data)) { return $data; } } else { return false; } } } function delete_detail($del_id) { if($stmt = $this->con->prepare("DELETE FROM `panel` WHERE `id`=?")) { $stmt->bind_param("i",$del_id); if($stmt->execute()) { return true; } return False; } } function delete_dvv_detail($del_id) { if($stmt = $this->con->prepare("DELETE FROM `dvv_docs` WHERE `id`=?")) { $stmt->bind_param("i",$del_id); if($stmt->execute()) { return true; } return False; } } function update_detail($table,$serial_no,$title,$edit_id,$sequence,$year) { if($stmt = $this->con->prepare("UPDATE `panel` SET `table`=?,`serial_no`= ?,`title`= ?,`sequence`=?,`year`=? WHERE `id`=?")) { $stmt->bind_param("sssisi",$table,$serial_no,$title,$sequence,$year,$edit_id); if($stmt->execute()) { return true; } return False; } } function get_detail_for_edit($edit_id) { if($stmt=$this->con->prepare("SELECT `table`, `serial_no`, `title`,`sequence`,`year` FROM `panel` WHERE `id`=?")) { $stmt->bind_param("i",$edit_id); $stmt->bind_result($table,$serial_no,$title,$sequence,$year); if($stmt->execute()) { $data=array(); $counter=0; if($stmt->fetch()) { $data[0] = $table; $data[1] = $serial_no; $data[2] = $title; $data[3] = $sequence; $data[4] = $year; return $data; } return false; } } } function get_added_data_for_criterion($cht,$table) { if($stmt_select = $this->con->prepare("SELECT `id`, `table`, `serial_no`, `title`, `cfile`, `date`, `time` FROM `panel` WHERE `table`=? AND `serial_no`=? ORDER BY `sequence` ASC")) { $stmt_select->bind_param("ss",$table,$cht); $stmt_select->bind_result($id,$table,$serial_no,$title,$cfile,$date,$time); if($stmt_select->execute()) { $data = array(); $counter = 0; while($stmt_select->fetch()) { $data[$counter][0] = $id; $data[$counter][1] = $table; $data[$counter][2] = $serial_no; $data[$counter][3] = $title; $data[$counter][4] = $cfile; $data[$counter][5] = $date; $data[$counter][6] = $time; $counter++; } if(!empty($data)) { return $data; } else { return false; } } } } function get_image($edit_id) { if($stmt=$this->con->prepare("SELECT `cfile` FROM `panel` WHERE `id`=?")) { $stmt->bind_param("i",$edit_id); $stmt->bind_result($cfile); if($stmt->execute()) { $data=array(); $counter=0; if($stmt->fetch()) { $data[0] = $cfile; return $data; } return false; } } } function update_image($cfile2,$edit_id) { if($stmt = $this->con->prepare("UPDATE `panel` SET `cfile`=? WHERE `id`=?")) { $stmt->bind_param("si",$cfile2,$edit_id); if($stmt->execute()) { return true; } return False; } } //3-12-2019 function new_aishe_info($title,$actual_image_name) { $date = date("Y-m-d"); $time = date("H-i-s A"); if($stmt_insert = $this->con->prepare("INSERT INTO `aishe_info`(`title`,`attachment`, `date`, `time`) VALUES (?,?,?,?)")) { $stmt_insert->bind_param("ssss",$title,$actual_image_name,$date,$time); if($stmt_insert->execute()) { return true; } return false; } } function delete_aishe_info($del_id) { if($stmt_select = $this->con->prepare("Delete from `aishe_info` where `id`=?")) { $stmt_select->bind_param("i",$del_id); if($stmt_select->execute()) { return true; } return false; } } function get_all_aishe_info() { if($stmt_insert = $this->con->prepare("SELECT `id`,`title`,`attachment` FROM `aishe_info` ORDER BY `id` ASC")) { $stmt_insert->bind_result($id,$title,$images); if($stmt_insert->execute()) { $counter = 0; $details = array(); while($stmt_insert->fetch()) { $details[$counter][0] = $id; $details[$counter][1] = $title; $details[$counter][2] = $images; $counter++; } if(!empty($details)) { return $details; } return false; } } } //5-12-2019 function new_nirf_info($title,$actual_image_name) { $date = date("Y-m-d"); $time = date("H-i-s A"); if($stmt_insert = $this->con->prepare("INSERT INTO `nirf_info`(`title`,`attachment`, `date`, `time`) VALUES (?,?,?,?)")) { $stmt_insert->bind_param("ssss",$title,$actual_image_name,$date,$time); if($stmt_insert->execute()) { return true; } return false; } } function delete_nirf_info($del_id) { if($stmt_select = $this->con->prepare("Delete from `nirf_info` where `id`=?")) { $stmt_select->bind_param("i",$del_id); if($stmt_select->execute()) { return true; } return false; } } function get_all_nirf_info() { if($stmt_insert = $this->con->prepare("SELECT `id`,`title`,`attachment` FROM `nirf_info` ORDER BY `id` ASC")) { $stmt_insert->bind_result($id,$title,$images); if($stmt_insert->execute()) { $counter = 0; $details = array(); while($stmt_insert->fetch()) { $details[$counter][0] = $id; $details[$counter][1] = $title; $details[$counter][2] = $images; $counter++; } if(!empty($details)) { return $details; } return false; } } } //6-12-2019 function new_award_images($title,$actual_image_name) { $date = date("Y-m-d"); $time = date("H-i-s A"); if($stmt_insert = $this->con->prepare("INSERT INTO `award_images`(`title`,`images`, `date`, `time`) VALUES (?,?,?,?)")) { $stmt_insert->bind_param("ssss",$title,$actual_image_name,$date,$time); if($stmt_insert->execute()) { return true; } else { echo $stmt_insert->error; } return false; } } function delete_award_images($del_id) { if($stmt_select = $this->con->prepare("Delete from `award_images` where `id`=?")) { $stmt_select->bind_param("i",$del_id); if($stmt_select->execute()) { return true; } return false; } } function get_all_award_images() { if($stmt_insert = $this->con->prepare("SELECT `id`,`images`,`title` FROM `award_images`")) { $stmt_insert->bind_result($id,$images,$title); if($stmt_insert->execute()) { $counter = 0; $details = array(); while($stmt_insert->fetch()) { $details[$counter][0] = $id; $details[$counter][1] = $images; $details[$counter][2] = $title; $counter++; } if(!empty($details)) { return $details; } return false; } } } //2-1-2020 function add_activity_title($title) { $date = date("Y-m-d"); $time = date("H-i-s A"); if($stmt_insert = $this->con->prepare("INSERT INTO `activity_titles`(`title`, `date`, `time`) VALUES (?,?,?)")) { $stmt_insert->bind_param("sss",$title,$date,$time); if($stmt_insert->execute()) { return true; } return false; } } function get_all_activity_title() { if($stmt_insert = $this->con->prepare("SELECT `id`,`title` FROM `activity_titles` ORDER BY `id` DESC")) { $stmt_insert->bind_result($id,$title); if($stmt_insert->execute()) { $counter = 0; $details = array(); while($stmt_insert->fetch()) { $details[$counter][0] = $id; $details[$counter][1] = $title; $counter++; } if(!empty($details)) { return $details; } return false; } } } function delete_activity_title($del_id) { if($stmt_select = $this->con->prepare("Delete from `activity_titles` where `id`=?")) { $stmt_select->bind_param("i",$del_id); if($stmt_select->execute()) { return true; } return false; } } function new_images($titles,$actual_image_name) { $date = date("Y-m-d"); $time = date("H-i-s A"); if($stmt_insert = $this->con->prepare("INSERT INTO `gallery`(`titles`,`images`, `date`, `time`) VALUES (?,?,?,?)")) { $stmt_insert->bind_param("ssss",$titles,$actual_image_name,$date,$time); if($stmt_insert->execute()) { return true; } return false; } } function get_all_gallery_images_for_display($t_id) { if($stmt_insert = $this->con->prepare("SELECT `id`,`titles`,`images` FROM `gallery` Where `titles` = ?")) { $stmt_insert->bind_param("s",$t_id); $stmt_insert->bind_result($id,$title,$images); if($stmt_insert->execute()) { $counter = 0; $details = array(); while($stmt_insert->fetch()) { $details[$counter][0] = $id; $details[$counter][1] = $title; $details[$counter][2] = $images; $counter++; } if(!empty($details)) { return $details; } return false; } } } function get_all_gallery_images() { if($stmt_insert = $this->con->prepare("SELECT `id`,`titles`,`images` FROM `gallery` ORDER BY `id` DESC")) { $stmt_insert->bind_result($id,$title,$images); if($stmt_insert->execute()) { $counter = 0; $details = array(); while($stmt_insert->fetch()) { $details[$counter][0] = $id; $details[$counter][1] = $title; $details[$counter][2] = $images; $counter++; } if(!empty($details)) { return $details; } return false; } } } function delete_gallery_images($del_id) { if($stmt_select = $this->con->prepare("Delete from `gallery` where `id`=?")) { $stmt_select->bind_param("i",$del_id); if($stmt_select->execute()) { return true; } return false; } } //3-1-2019 function get_all_our_news_paper_image() { if($stmt_insert = $this->con->prepare("SELECT `id`,`title`,`attachment` FROM `newspaper-clippingimage` ORDER BY `id` DESC")) { $stmt_insert->bind_result($id,$title,$images); if($stmt_insert->execute()) { $counter = 0; $details = array(); while($stmt_insert->fetch()) { $details[$counter][0] = $id; $details[$counter][1] = $title; $details[$counter][2] = $images; $counter++; } if(!empty($details)) { return $details; } return false; } } } function add_news_paper_clipping($title,$actual_image_name) { $date = date("Y-m-d"); $time = date("H-i-s A"); if($stmt_insert = $this->con->prepare("INSERT INTO `newspaper-clippingimage`(`title`,`attachment`, `date`, `time`) VALUES (?,?,?,?)")) { $stmt_insert->bind_param("ssss",$title,$actual_image_name,$date,$time); if($stmt_insert->execute()) { return true; } return false; } } function delete_news_paper_clipping($del_id) { if($stmt_select = $this->con->prepare("Delete from `newspaper-clippingimage` where `id`=?")) { $stmt_select->bind_param("i",$del_id); if($stmt_select->execute()) { return true; } return false; } } //4-1-2020 function new_downloads_images($department,$title,$actual_image_name) { $date = date("Y-m-d"); $time = date("H-i-s A"); if($stmt_insert = $this->con->prepare("INSERT INTO `department_downloads`(`department`,`title`,`images`, `date`, `time`) VALUES (?,?,?,?,?)")) { $stmt_insert->bind_param("sssss",$department,$title,$actual_image_name,$date,$time); if($stmt_insert->execute()) { return true; } return false; } } function get_all_downloads_images() { if($stmt_insert = $this->con->prepare("SELECT `id`,`department`,`title`,`images` FROM `department_downloads` ORDER BY `department` ASC")) { $stmt_insert->bind_result($id,$department,$title,$images); if($stmt_insert->execute()) { $counter = 0; $details = array(); while($stmt_insert->fetch()) { $details[$counter][0] = $id; $details[$counter][1] = $department; $details[$counter][2] = $title; $details[$counter][3] = $images; $counter++; } if(!empty($details)) { return $details; } return false; } } } function delete_downloads_images($del_id) { if($stmt_select = $this->con->prepare("Delete from `department_downloads` where `id`=?")) { $stmt_select->bind_param("i",$del_id); if($stmt_select->execute()) { return true; } return false; } } function get_all_downloads_images_departmentwise($dept) { if($stmt_insert = $this->con->prepare("SELECT `id`,`department`,`title`,`images` FROM `department_downloads` Where `department` = ? OR `department` = 'All Department'")) { $stmt_insert->bind_param("s",$dept); $stmt_insert->bind_result($id,$department,$title,$images); if($stmt_insert->execute()) { $counter = 0; $details = array(); while($stmt_insert->fetch()) { $details[$counter][0] = $id; $details[$counter][1] = $department; $details[$counter][2] = $title; $details[$counter][3] = $images; $counter++; } if(!empty($details)) { return $details; } return false; } } } function get_all_staff_data_by_department($department) { if($stmt_insert = $this->con->prepare("SELECT `id`,`profile`,`first_name`,`last_name`,`designation`,`department`,`qualification`,`appionement_date` FROM `staff_data` WHERE `department`=? ORDER BY `sequence` ASC")) { $stmt_insert->bind_param("s",$department); $stmt_insert->bind_result($id,$image,$first_name,$last_name,$designation,$department,$qualification,$appionement_date); if($stmt_insert->execute()) { $counter = 0; $details = array(); while($stmt_insert->fetch()) { $details[$counter][0] = $id; $details[$counter][1] = $image; $details[$counter][2] = $first_name; $details[$counter][3] = $last_name; $details[$counter][4] = $designation; $details[$counter][5] = $department; $details[$counter][6] = $qualification; $details[$counter][7] = $appionement_date; $counter++; } if(!empty($details)) { return $details; } return false; } } } function new_rti_info($title,$actual_image_name,$menu) { $date = date("Y-m-d"); $time = date("H-i-s A"); if($stmt_insert = $this->con->prepare("INSERT INTO `rti_info`(`title`,`attachment`, `date`, `time`,`menu`) VALUES (?,?,?,?,?)")) { $stmt_insert->bind_param("sssss",$title,$actual_image_name,$date,$time,$menu); if($stmt_insert->execute()) { return true; } return false; } } function delete_rti_info($del_id) { if($stmt_select = $this->con->prepare("Delete from `rti_info` where `id`=?")) { $stmt_select->bind_param("i",$del_id); if($stmt_select->execute()) { return true; } return false; } } function get_all_rti_info() { if($stmt_insert = $this->con->prepare("SELECT `id`,`title`,`attachment`,`menu` FROM `rti_info` ORDER BY `id` ASC")) { $stmt_insert->bind_result($id,$title,$images,$menu); if($stmt_insert->execute()) { $counter = 0; $details = array(); while($stmt_insert->fetch()) { $details[$counter][0] = $id; $details[$counter][1] = $title; $details[$counter][2] = $images; $details[$counter][3] = $menu; $counter++; } if(!empty($details)) { return $details; } return false; } } } function get_all_rti_info_by_menu($menu) { if($stmt_insert = $this->con->prepare("SELECT `id`,`title`,`attachment`,`menu` FROM `rti_info` WHERE `menu` ='".$menu."'ORDER BY `id` ASC")) { $stmt_insert->bind_result($id,$title,$images,$menu); if($stmt_insert->execute()) { $counter = 0; $details = array(); while($stmt_insert->fetch()) { $details[$counter][0] = $id; $details[$counter][1] = $title; $details[$counter][2] = $images; $details[$counter][3] = $menu; $counter++; } if(!empty($details)) { return $details; } return false; } } } function get_all_gallery_images_for_display1() { if($stmt_insert = $this->con->prepare("SELECT `id`,`titles`,`images` FROM `gallery` ORDER BY `id` DESC ")) { $stmt_insert->bind_result($id,$title,$images); if($stmt_insert->execute()) { $counter = 0; $details = array(); while($stmt_insert->fetch()) { $details[$counter][0] = $id; $details[$counter][1] = $title; $details[$counter][2] = $images; $counter++; } if(!empty($details)) { return $details; } return false; } } } //update function update_staff_profile_info($up_id,$image) { if($stmt_insert = $this->con->prepare("UPDATE `staff_data` set `staff_profile` = ? Where `id`=?")) { $stmt_insert->bind_param("si",$image,$up_id); if($stmt_insert->execute()) { return true; } return false; } } //20-2-2020 function add_ecorner($menu,$title,$link) { $date = date("Y-m-d"); $time = date("H-i-s A"); if($stmt_insert = $this->con->prepare("INSERT INTO `ecorner`(`department`, `title`, `link`, `date`, `time`) VALUES (?,?,?,?,?)")) { $stmt_insert->bind_param("sssss",$menu,$title,$link,$date,$time); if($stmt_insert->execute()) { return true; } return false; } } function delete_ecorner_info($del_id) { if($stmt_select = $this->con->prepare("Delete from `ecorner` where `id`=?")) { $stmt_select->bind_param("i",$del_id); if($stmt_select->execute()) { return true; } return false; } } function get_all_ecorner_info() { if($stmt_insert = $this->con->prepare("SELECT `id`, `department`, `title`, `link`, `date`, `time` FROM `ecorner`")) { $stmt_insert->bind_result($id,$department,$title,$link,$date,$time); if($stmt_insert->execute()) { $counter = 0; $details = array(); while($stmt_insert->fetch()) { $details[$counter][0] = $id; $details[$counter][1] = $department; $details[$counter][2] = $title; $details[$counter][3] = $link; $details[$counter][4] = $date; $details[$counter][5] = $time; $counter++; } if(!empty($details)) { return $details; } return false; } } } function get_all_ecorner_info_by_department($department) { if($stmt_insert = $this->con->prepare("SELECT `id`, `department`, `title`, `link`, `date`, `time` FROM `ecorner` WHERE `department` = ? ")) { $stmt_insert->bind_param("s",$department); $stmt_insert->bind_result($id,$department,$title,$link,$date,$time); if($stmt_insert->execute()) { $counter = 0; $details = array(); while($stmt_insert->fetch()) { $details[$counter][0] = $id; $details[$counter][1] = $department; $details[$counter][2] = $title; $details[$counter][3] = $link; $details[$counter][4] = $date; $details[$counter][5] = $time; $counter++; } if(!empty($details)) { return $details; } return false; } } } function get_all_ecorner_info_by_id($edit_id) { if($stmt = $this->con->prepare("SELECT `id`, `department`, `title`, `link` FROM `ecorner` WHERE `id`=?")) { $stmt->bind_param("i",$edit_id); $stmt->bind_result($res_id,$department,$title,$link); if($stmt->execute()) { $data = array(); $row_counter = 0; if($stmt->fetch()) { $data[0] = $res_id; $data[1] = $department; $data[2] = $title; $data[3] = $link; if(!empty($data)) { return $data; } else { return false; } } } } } function update_ecorner($menu,$title,$actual_video_name,$up_id) { if($stmt_insert = $this->con->prepare("UPDATE `ecorner` SET `department`=?,`title`=?,`link`=? WHERE `id`=?")) { $stmt_insert->bind_param("sssi",$menu,$title,$actual_video_name,$up_id); if($stmt_insert->execute()) { return true; } return false; } } //19-3-2021 function new_gov_uni_guideliness($title,$actual_image_name) { $date = date("Y-m-d"); $time = date("H-i-s A"); if($stmt_insert = $this->con->prepare("INSERT INTO `gov_uni_guideliness`(`title`,`attachment`, `date`, `time`) VALUES (?,?,?,?)")) { $stmt_insert->bind_param("ssss",$title,$actual_image_name,$date,$time); if($stmt_insert->execute()) { return true; } return false; } } function delete_gov_uni_guideliness($del_id) { if($stmt_select = $this->con->prepare("Delete from `gov_uni_guideliness` where `id`=?")) { $stmt_select->bind_param("i",$del_id); if($stmt_select->execute()) { return true; } return false; } } function get_gov_uni_guideliness() { if($stmt_insert = $this->con->prepare("SELECT `id`,`title`,`attachment` FROM `gov_uni_guideliness` ORDER BY `id` DESC")) { $stmt_insert->bind_result($id,$title,$images); if($stmt_insert->execute()) { $counter = 0; $details = array(); while($stmt_insert->fetch()) { $details[$counter][0] = $id; $details[$counter][1] = $title; $details[$counter][2] = $images; $counter++; } if(!empty($details)) { return $details; } return false; } } } //20-3 function new_college_activities($title,$actual_image_name) { $date = date("Y-m-d"); $time = date("H-i-s A"); if($stmt_insert = $this->con->prepare("INSERT INTO `college_activities`(`title`,`attachment`, `date`, `time`) VALUES (?,?,?,?)")) { $stmt_insert->bind_param("ssss",$title,$actual_image_name,$date,$time); if($stmt_insert->execute()) { return true; } return false; } } function delete_college_activities($del_id) { if($stmt_select = $this->con->prepare("Delete from `college_activities` where `id`=?")) { $stmt_select->bind_param("i",$del_id); if($stmt_select->execute()) { return true; } return false; } } function get_college_activities() { if($stmt_insert = $this->con->prepare("SELECT `id`,`title`,`attachment` FROM `college_activities` ORDER BY `id` DESC")) { $stmt_insert->bind_result($id,$title,$images); if($stmt_insert->execute()) { $counter = 0; $details = array(); while($stmt_insert->fetch()) { $details[$counter][0] = $id; $details[$counter][1] = $title; $details[$counter][2] = $images; $counter++; } if(!empty($details)) { return $details; } return false; } } } // function new_video_links($title,$url) { $date = date("Y-m-d"); $time = date("H-i-s A"); if($stmt_insert = $this->con->prepare("INSERT INTO `corona_videos`(`title`,`attachment`, `date`, `time`) VALUES (?,?,?,?)")) { $stmt_insert->bind_param("ssss",$title,$url,$date,$time); if($stmt_insert->execute()) { return true; } return false; } } function get_all_video_links() { if($stmt_insert = $this->con->prepare("SELECT `id`,`title`,`attachment` FROM `corona_videos` ORDER BY `id` DESC")) { $stmt_insert->bind_result($id,$title,$url); if($stmt_insert->execute()) { $counter = 0; $details = array(); while($stmt_insert->fetch()) { $details[$counter][0] = $id; $details[$counter][1] = $title; $details[$counter][2] = $url; $counter++; } if(!empty($details)) { return $details; } return false; } } } function delete_video_links($del_id) { if($stmt_select = $this->con->prepare("Delete from `corona_videos` where `id`=?")) { $stmt_select->bind_param("i",$del_id); if($stmt_select->execute()) { return true; } return false; } } // function add_womens_hostel_information($title,$url) { $date = date("Y-m-d"); $time = date("H-i-s A"); if($stmt_insert = $this->con->prepare("INSERT INTO `womens_hostel`(`title`,`attachment`, `date`, `time`) VALUES (?,?,?,?)")) { $stmt_insert->bind_param("ssss",$title,$url,$date,$time); if($stmt_insert->execute()) { return true; } return false; } } function get_all_womens_hostel_information() { if($stmt_insert = $this->con->prepare("SELECT `id`,`title`,`attachment` FROM `womens_hostel` ORDER BY `id` DESC")) { $stmt_insert->bind_result($id,$title,$url); if($stmt_insert->execute()) { $counter = 0; $details = array(); while($stmt_insert->fetch()) { $details[$counter][0] = $id; $details[$counter][1] = $title; $details[$counter][2] = $url; $counter++; } if(!empty($details)) { return $details; } return false; } } } function delete_womens_hostel_information($del_id) { if($stmt_select = $this->con->prepare("Delete from `womens_hostel` where `id`=?")) { $stmt_select->bind_param("i",$del_id); if($stmt_select->execute()) { return true; } return false; } } function update_crm_contents($var_title,$var_contents,$var_edit_id) { $current_date = date("Y-m-d"); $current_time = date("h:i:s A"); if($stmt = $this->con->prepare("UPDATE `crm_contents` SET `title`=?,`contents`=?,`date`=?,`time`=? WHERE `page_id`=?")) { $stmt->bind_param("ssssi",$var_title,$var_contents,$current_date,$current_time,$var_edit_id); if($stmt->execute()) { return true; } return false; } } function get_page1_data_from_id($var_edit_id) { if($stmt = $this->con->prepare("SELECT `title`, `contents`, `date`, `time` FROM `crm_contents` WHERE `id`=?")) { $stmt->bind_param("i",$var_edit_id); $stmt->bind_result($res_title,$res_contents,$res_date,$res_time); if($stmt->execute()) { $data1 = array(); if($stmt->fetch()) { /*$data1[0] = $res_id; $data1[1] = $res_page_id; $data1[2] = $res_page_name;*/ $data1[3] = $res_title; $data1[4] = $res_contents; $data1[5] = $res_date; $data1[6] = $res_time; return $data1; } return false; } } } function add_crm_contents($page_id,$page_name,$title,$contents) { $current_date = date("Y-m-d"); $current_time = date("h:i:s A"); if($stmt = $this->con->prepare("INSERT INTO `crm_contents`(`page_id`, `page_name`, `title`, `contents`, `date`, `time`) VALUES (?,?,?,?,?,?)")) { $stmt->bind_param("ssssss",$page_id,$page_name,$title,$contents,$current_date,$current_time); if($stmt->execute()) { return true; } return false; } } function get_google_link1() { if($stmt_select = $this->con->prepare("Select `link` from `social_media` where `name` = 'Youtube' ")) { $stmt_select->bind_result($result_link); if($stmt_select->execute()) { if($stmt_select->fetch()) { return $result_link; } } return false; } } function get_tt_link() { if($stmt_select = $this->con->prepare("Select `link` from `social_media` where `name` = 'tt' ")) { $stmt_select->bind_result($result_link); if($stmt_select->execute()) { if($stmt_select->fetch()) { return $result_link; } } return false; } } }//End ?>
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