Şuanki Dizin: /home/wwwdreamtechnolo/www/kpmim.org/lib/ |
Şuanki Dosya : /home/wwwdreamtechnolo/www/kpmim.org/lib/functions.php |
<?php session_start(); //date_default_timezone_set('Asia/Kolkata'); class login_function { private $con; function __construct() { //$this->con = new mysqli("localhost","bravemy8_spmsou","^9LI+3zk!R#@","mim_college"); $this->con = new mysqli("localhost","root","","mim_college"); } function get_alumni_email_from_email_id($userid) { if($stmt_select = $this->con->prepare("Select `email_id` from `alumni_stdents` where `userid` = ? ")) { $stmt_select->bind_param("s",$userid); $stmt_select->bind_result($result_email); if($stmt_select->execute()) { if($stmt_select->fetch()) { return $result_email; } } return false; } } function get_all_grivience_data($complain_no,$full_name,$category_of_complainant,$course_of_study,$section,$roll_no,$mobile_no1,$email1,$category_of_grievance,$others_please_specify,$address_for_communication,$brief_subject_of_grievance,$complete_details_of_grievance,$upload_documents_if_any,$i_hereby_declare) { $currentdate = date("Y-m-d"); $currenttime = date("H:i:s A"); if ($stmt = $this->con->prepare("INSERT INTO `grivience_table`(`complain_no`, `full_name`, `category_of_complainant`, `course_of_study`, `section`, `roll_no`, `mobile_no1`, `email1`, `category_of_grievance`, `others_please_specify`, `address_for_communication`, `brief_subject_of_grievance`, `complete_details_of_grievance`, `upload_documents_if_any`, `i_hereby_declare`, `date`, `time`) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)")) { $stmt->bind_param("sssssssssssssssss", $complain_no,$full_name,$category_of_complainant,$course_of_study,$section,$roll_no,$mobile_no1,$email1,$category_of_grievance,$others_please_specify,$address_for_communication,$brief_subject_of_grievance,$complete_details_of_grievance,$upload_documents_if_any,$i_hereby_declare,$currentdate,$currenttime); if ($stmt->execute()) { return true; } else { 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_images($department,$description,$actual_image_name) { $date = date("Y-m-d"); $time = date("H-i-s A"); if($stmt_insert = $this->con->prepare("INSERT INTO `gallery`(`department`,`description`,`images`, `date`, `time`) VALUES (?,?,?,?,?)")) { $stmt_insert->bind_param("sssss",$department,$description,$actual_image_name,$date,$time); if($stmt_insert->execute()) { return true; } return false; } } function new_videos($actual_image_name) { $date = date("Y-m-d"); $time = date("H-i-s A"); if($stmt_insert = $this->con->prepare("INSERT INTO `videos`(`images`, `date`, `time`) VALUES (?,?,?)")) { $stmt_insert->bind_param("sss",$actual_image_name,$date,$time); if($stmt_insert->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 new_mous_attachment($actual_image_name) { $date = date("Y-m-d"); $time = date("H-i-s A"); if($stmt_insert = $this->con->prepare("INSERT INTO `mous_recruiters`(`images`, `date`, `time`) VALUES (?,?,?)")) { $stmt_insert->bind_param("sss",$actual_image_name,$date,$time); if($stmt_insert->execute()) { return true; } return false; } } function get_all_gallery_images() { if($stmt_insert = $this->con->prepare("SELECT `id`,`department`,`images`,`description` FROM `gallery` ORDER BY `id` DESC")) { $stmt_insert->bind_result($id,$department,$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] = $images; $details[$counter][3] = $description; $counter++; } if(!empty($details)) { return $details; } return false; } } } function get_all_gallery_videos() { if($stmt_insert = $this->con->prepare("SELECT `id`,`images` FROM `videos`")) { $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 get_all_slider_images() // { // if($stmt_insert = $this->con->prepare("SELECT `id`, `images`, `image_name` FROM `slider_images` ")) // { // $stmt_insert->bind_result($id,$images,$image_name); // if($stmt_insert->execute()) // { // $counter = 0; // $details = array(); // while($stmt_insert->fetch()) // { // $details[$counter][0] = $id; // $details[$counter][1] = $images; // $details[$counter][2] = $image_name; // $counter++; // } // if(!empty($details)) // { // return $details; // } // return false; // } // } // } function get_all_slider_images() { if($stmt_insert = $this->con->prepare("SELECT `id`, `images`, `image_name` FROM `slider_images` ")) { $stmt_insert->bind_result($id,$images,$image_name); if($stmt_insert->execute()) { $counter = 0; $details = array(); while($stmt_insert->fetch()) { $details[$counter][0] = $id; $details[$counter][1] = $images; $details[$counter][2] = $image_name; $counter++; } if(!empty($details)) { return $details; } return false; } } } function get_all_mous_images() { if($stmt_insert = $this->con->prepare("SELECT `id`,`images` FROM `mous_recruiters`")) { $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_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; } } function delete_gallery_video($del_id) { if($stmt_select = $this->con->prepare("Delete from `videos` where `id`=?")) { $stmt_select->bind_param("i",$del_id); if($stmt_select->execute()) { return true; } 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 delete_mous_images($del_id) { if($stmt_select = $this->con->prepare("Delete from `mous_recruiters` where `id`=?")) { $stmt_select->bind_param("i",$del_id); if($stmt_select->execute()) { return true; } return false; } } 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 `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 `downloads` ORDER BY `id` DESC")) { $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 `downloads` where `id`=?")) { $stmt_select->bind_param("i",$del_id); if($stmt_select->execute()) { return true; } return false; } } function new_achievements_images($title,$actual_image_name) { $date = date("Y-m-d"); $time = date("H-i-s A"); if($stmt_insert = $this->con->prepare("INSERT INTO `student_staff_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 delete_achievements_images($del_id) { if($stmt_select = $this->con->prepare("Delete from `student_staff_achievements` where `id`=?")) { $stmt_select->bind_param("i",$del_id); if($stmt_select->execute()) { return true; } return false; } } function get_all_achievement_images() { if($stmt_insert = $this->con->prepare("SELECT `id`,`title`,`attachment` FROM `student_staff_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_achievement_images_by_id($up_id) { if($stmt_insert = $this->con->prepare("SELECT `id`,`title`,`attachment` FROM `student_staff_achievements` 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_attachments($up_id) { $actual_image_name=""; if($stmt_insert = $this->con->prepare("UPDATE `student_staff_achievements` set `attachment` = ? Where `id`=?")) { $stmt_insert->bind_param("si",$actual_image_name,$up_id); if($stmt_insert->execute()) { return true; } return false; } } function get_image_name_by_id($id) { if($stmt_select = $this->con->prepare("Select `attachment` from `student_staff_achievements` 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_image_info($up_id,$image) { if($stmt_insert = $this->con->prepare("UPDATE `student_staff_achievements` set `attachment` = ? Where `id`=?")) { $stmt_insert->bind_param("si",$image,$up_id); if($stmt_insert->execute()) { return true; } return false; } } function update_achievements_images($up_id,$title) { if($stmt_insert = $this->con->prepare("UPDATE `student_staff_achievements` set `title` = ? Where `id` = ?")) { $stmt_insert->bind_param("si",$title,$up_id); if($stmt_insert->execute()) { return true; } 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 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 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 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_circular_notice($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`(`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_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() { if($stmt_insert = $this->con->prepare("SELECT `id`,`title`,`attachment` FROM `circulars_notices` 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_notice_by_id($up_id) { if($stmt_insert = $this->con->prepare("SELECT `id`,`title`,`attachment` FROM `circulars_notices` 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_notices($up_id) { $actual_image_name=""; if($stmt_insert = $this->con->prepare("UPDATE `circulars_notices` set `attachment` = ? Where `id`=?")) { $stmt_insert->bind_param("si",$actual_image_name,$up_id); if($stmt_insert->execute()) { return true; } return false; } } function update_circular_notice($up_id,$title) { $date = date("Y-m-d"); $time = date("H-i-s A"); if($stmt_insert = $this->con->prepare("UPDATE `circulars_notices` set `title`=? Where `id` =?")) { $stmt_insert->bind_param("si",$title,$up_id); if($stmt_insert->execute()) { return true; } return false; } } function get_circular_image_by_id($id) { if($stmt_select = $this->con->prepare("Select `attachment` from `circulars_notices` 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_circular_image($up_id,$image) { if($stmt_insert = $this->con->prepare("UPDATE `circulars_notices` set `attachment` = ? Where `id`=?")) { $stmt_insert->bind_param("si",$image,$up_id); if($stmt_insert->execute()) { return true; } return false; } } function new_library_info($title,$actual_image_name) { $date = date("Y-m-d"); $time = date("H-i-s A"); if($stmt_insert = $this->con->prepare("INSERT INTO `library_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_library_info($del_id) { if($stmt_select = $this->con->prepare("Delete from `library_info` where `id`=?")) { $stmt_select->bind_param("i",$del_id); if($stmt_select->execute()) { return true; } return false; } } function get_all_library_info() { if($stmt_insert = $this->con->prepare("SELECT `id`,`title`,`attachment` FROM `library_info` 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_library_info($up_id) { $actual_image_name=""; if($stmt_insert = $this->con->prepare("UPDATE `library_info` set `attachment` = ? Where `id`=?")) { $stmt_insert->bind_param("si",$actual_image_name,$up_id); if($stmt_insert->execute()) { return true; } return false; } } function update_library_title($up_id,$title) { if($stmt_insert = $this->con->prepare("UPDATE `library_info` set `title`=? Where `id` =?")) { $stmt_insert->bind_param("si",$title,$up_id); if($stmt_insert->execute()) { return true; } return false; } } function get_all_library_info_by_id($up_id) { if($stmt_insert = $this->con->prepare("SELECT `id`,`title`,`attachment` FROM `library_info` 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 get_library_info_by_id($id) { if($stmt_select = $this->con->prepare("Select `attachment` from `library_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_library_image($up_id,$image) { if($stmt_insert = $this->con->prepare("UPDATE `library_info` set `attachment` = ? Where `id`=?")) { $stmt_insert->bind_param("si",$image,$up_id); if($stmt_insert->execute()) { return true; } return false; } } 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` 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_iqac_info_by_id($up_id) { if($stmt_insert = $this->con->prepare("SELECT `id`,`title`,`attachment` FROM `iqac_info` 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_iqac_info($up_id,$title) { $date = date("Y-m-d"); $time = date("H-i-s A"); if($stmt_insert = $this->con->prepare("UPDATE `iqac_info` set `title` =? Where `id` =?")) { $stmt_insert->bind_param("si",$title,$up_id); if($stmt_insert->execute()) { return true; } return false; } } function update_iqac_attachement($up_id) { $actual_image_name=""; if($stmt_insert = $this->con->prepare("UPDATE `iqac_info` set `attachment` = ? Where `id`=?")) { $stmt_insert->bind_param("si",$actual_image_name,$up_id); if($stmt_insert->execute()) { return true; } return false; } } function get_iqac_info_by_id($id) { if($stmt_select = $this->con->prepare("Select `attachment` from `iqac_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_iqac_image($up_id,$image) { if($stmt_insert = $this->con->prepare("UPDATE `iqac_info` set `attachment` = ? Where `id`=?")) { $stmt_insert->bind_param("si",$image,$up_id); if($stmt_insert->execute()) { return true; } return false; } } function add_feedback($name,$email,$phone,$feedback) { $date = date("Y-m-d"); $time = date("H-i-s A"); if($stmt_insert = $this->con->prepare("INSERT INTO `feedback`(`name`,`email`,`contact`,`feedback`, `date`, `time`) VALUES (?,?,?,?,?,?)")) { $stmt_insert->bind_param("ssssss",$name,$email,$phone,$feedback,$date,$time); if($stmt_insert->execute()) { return true; } return false; } } function get_all_feedback() { if($stmt_insert = $this->con->prepare("SELECT `id`,`name`,`email`,`contact`,`feedback` FROM `feedback`")) { $stmt_insert->bind_result($id,$name,$email,$contact,$feedback); 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] = $feedback; $counter++; } if(!empty($details)) { return $details; } return false; } } } function delete_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 get_all_feedback_for_show() { if($stmt_insert = $this->con->prepare("SELECT `id`,`name`,`email`,`contact`,`feedback`,`date`,`time` FROM `feedback`")) { $stmt_insert->bind_result($id,$name,$email,$contact,$feedback,$date,$time); if($stmt_insert->execute()) { $counter = 0; $details = array(); while($stmt_insert->fetch()) { $details[$counter][0] = $id; $details[$counter][1] = $name; $details[$counter][2] = $email; $details[$counter][3] = $contact; $details[$counter][4] = $feedback; $details[$counter][5] = $date; $details[$counter][6] = $time; $counter++; } if(!empty($details)) { return $details; } return false; } } } function new_research($title,$actual_image_name) { $date = date("Y-m-d"); $time = date("H-i-s A"); if($stmt_insert = $this->con->prepare("INSERT INTO `research_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_research_images($del_id) { if($stmt_select = $this->con->prepare("Delete from `research_info` where `id`=?")) { $stmt_select->bind_param("i",$del_id); if($stmt_select->execute()) { return true; } return false; } } function get_all_research_images() { if($stmt_insert = $this->con->prepare("SELECT `id`,`title`,`attachment` FROM `research_info` 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_research_attachement($up_id) { $actual_image_name=""; if($stmt_insert = $this->con->prepare("UPDATE `research_info` set `attachment` = ? Where `id`=?")) { $stmt_insert->bind_param("si",$actual_image_name,$up_id); if($stmt_insert->execute()) { return true; } return false; } } function update_research($up_id,$title) { if($stmt_insert = $this->con->prepare("UPDATE `research_info` set `title`=? Where `id` = ?")) { $stmt_insert->bind_param("si",$title,$up_id); if($stmt_insert->execute()) { return true; } return false; } } function get_all_research_images_by_id($up_id) { if($stmt_insert = $this->con->prepare("SELECT `id`,`title`,`attachment` FROM `research_info` 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 get_research_info_by_id($id) { if($stmt_select = $this->con->prepare("Select `attachment` from `research_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_research_image($up_id,$image) { if($stmt_insert = $this->con->prepare("UPDATE `research_info` set `attachment` = ? Where `id`=?")) { $stmt_insert->bind_param("si",$image,$up_id); if($stmt_insert->execute()) { return true; } return false; } } function add_admission_dates($title,$actual_image_name) { $date = date("Y-m-d"); $time = date("H-i-s A"); if($stmt_insert = $this->con->prepare("INSERT INTO `admission_procedure_first_year`(`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 get_all_admission_procedure() { if($stmt_insert = $this->con->prepare("SELECT `id`,`title`,`attachment` FROM `admission_procedure_first_year`")) { $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_admission_procedure($del_id) { if($stmt_select = $this->con->prepare("Delete from `admission_procedure_first_year` where `id`=?")) { $stmt_select->bind_param("i",$del_id); if($stmt_select->execute()) { return true; } return false; } } function add_academic_calender($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`(`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 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 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_anti_ragging($title,$actual_image_name) { $date = date("Y-m-d"); $time = date("H-i-s A"); if($stmt_insert = $this->con->prepare("INSERT INTO `anti_ragging`(`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 get_all_anti_ragging() { if($stmt_insert = $this->con->prepare("SELECT `id`,`title`,`attachment` FROM `anti_ragging`")) { $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_anti_ragging($del_id) { if($stmt_select = $this->con->prepare("Delete from `anti_ragging` where `id`=?")) { $stmt_select->bind_param("i",$del_id); if($stmt_select->execute()) { return true; } return false; } } function add_training_placement($title,$actual_image_name) { $date = date("Y-m-d"); $time = date("H-i-s A"); if($stmt_insert = $this->con->prepare("INSERT INTO `training_placement`(`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 get_all_training_placement() { if($stmt_insert = $this->con->prepare("SELECT `id`,`title`,`attachment` FROM `training_placement`")) { $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_training_placement($del_id) { if($stmt_select = $this->con->prepare("Delete from `training_placement` where `id`=?")) { $stmt_select->bind_param("i",$del_id); if($stmt_select->execute()) { return true; } return false; } } function add_results($title,$actual_image_name) { $date = date("Y-m-d"); $time = date("H-i-s A"); if($stmt_insert = $this->con->prepare("INSERT INTO `results`(`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 get_all_results() { if($stmt_insert = $this->con->prepare("SELECT `id`,`title`,`attachment` FROM `results`")) { $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_results($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 add_faculty($full_name,$designation,$qualification,$subject,$experience,$email,$department,$staff,$actual_image_name) { $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`, `date`, `time`) VALUES (?,?,?,?,?,?,?,?,?,?,?)")) { echo 55; $stmt_insert->bind_param("sssssssssss",$full_name,$designation,$qualification,$subject,$experience,$email,$department,$staff,$actual_image_name,$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` FROM `faculty_information` ")) { $stmt_insert->bind_result($id,$full_name,$designation,$qualification,$subject,$experience,$email,$department,$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] = $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; $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` 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); 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; $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) { $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`=? Where `id`=?")) { $stmt_insert->bind_param("ssssssssi",$full_name,$designation,$qualification,$subject,$experience,$email,$department,$staff,$up_id); if($stmt_insert->execute()) { return true; } return false; } } function get_all_computer_field_teaching() { if($stmt_insert = $this->con->prepare("SELECT `id`,`full_name`,`designation`,`qualification`,`subject`,`experience`,`email`,`department`,`staff`,`profile` FROM `faculty_information` Where `department` ='Computer Engineering' And `staff` ='teaching'")) { $stmt_insert->bind_result($id,$full_name,$designation,$qualification,$subject,$experience,$email,$department,$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] = $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; $counter++; } if(!empty($details)) { return $details; } return false; } } } function get_all_computer_field_nonteaching() { if($stmt_insert = $this->con->prepare("SELECT `id`,`full_name`,`designation`,`qualification`,`subject`,`experience`,`email`,`department`,`staff`,`profile` FROM `faculty_information` Where `department` ='Computer Engineering' And `staff` ='non-teaching'")) { $stmt_insert->bind_result($id,$full_name,$designation,$qualification,$subject,$experience,$email,$department,$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] = $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; $counter++; } if(!empty($details)) { return $details; } return false; } } } function get_all_civil_field_teaching() { if($stmt_insert = $this->con->prepare("SELECT `id`,`full_name`,`designation`,`qualification`,`subject`,`experience`,`email`,`department`,`staff`,`profile` FROM `faculty_information` Where `department` ='Civil Engineering' And `staff` ='teaching'")) { $stmt_insert->bind_result($id,$full_name,$designation,$qualification,$subject,$experience,$email,$department,$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] = $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; $counter++; } if(!empty($details)) { return $details; } return false; } } } function get_all_civil_field_nonteaching() { if($stmt_insert = $this->con->prepare("SELECT `id`,`full_name`,`designation`,`qualification`,`subject`,`experience`,`email`,`department`,`staff`,`profile` FROM `faculty_information` Where `department` ='Civil Engineering' And `staff` ='non-teaching'")) { $stmt_insert->bind_result($id,$full_name,$designation,$qualification,$subject,$experience,$email,$department,$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] = $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; $counter++; } if(!empty($details)) { return $details; } return false; } } } function get_all_mechanical_field_teaching() { if($stmt_insert = $this->con->prepare("SELECT `id`,`full_name`,`designation`,`qualification`,`subject`,`experience`,`email`,`department`,`staff`,`profile` FROM `faculty_information` Where `department` ='Mechanical Engineering' And `staff` ='teaching'")) { $stmt_insert->bind_result($id,$full_name,$designation,$qualification,$subject,$experience,$email,$department,$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] = $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; $counter++; } if(!empty($details)) { return $details; } return false; } } } function get_all_mechanical_field_nonteaching() { if($stmt_insert = $this->con->prepare("SELECT `id`,`full_name`,`designation`,`qualification`,`subject`,`experience`,`email`,`department`,`staff`,`profile` FROM `faculty_information` Where `department` ='Mechanical Engineering' And `staff` ='non-teaching'")) { $stmt_insert->bind_result($id,$full_name,$designation,$qualification,$subject,$experience,$email,$department,$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] = $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; $counter++; } if(!empty($details)) { return $details; } return false; } } } function get_all_e_and_tc_field_teaching() { if($stmt_insert = $this->con->prepare("SELECT `id`,`full_name`,`designation`,`qualification`,`subject`,`experience`,`email`,`department`,`staff`,`profile` FROM `faculty_information` Where `department` ='Electronic & Telecommunication Engineering' And `staff` ='teaching'")) { $stmt_insert->bind_result($id,$full_name,$designation,$qualification,$subject,$experience,$email,$department,$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] = $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; $counter++; } if(!empty($details)) { return $details; } return false; } } } function get_all_e_and_tc_field_nonteaching() { if($stmt_insert = $this->con->prepare("SELECT `id`,`full_name`,`designation`,`qualification`,`subject`,`experience`,`email`,`department`,`staff`,`profile` FROM `faculty_information` Where `department` ='Electronic & Telecommunication Engineering' And `staff` ='non-teaching'")) { $stmt_insert->bind_result($id,$full_name,$designation,$qualification,$subject,$experience,$email,$department,$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] = $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; $counter++; } if(!empty($details)) { return $details; } return false; } } } function get_all_science_field_teaching() { if($stmt_insert = $this->con->prepare("SELECT `id`,`full_name`,`designation`,`qualification`,`subject`,`experience`,`email`,`department`,`staff`,`profile` FROM `faculty_information` Where `department` ='General Science' And `staff` ='teaching'")) { $stmt_insert->bind_result($id,$full_name,$designation,$qualification,$subject,$experience,$email,$department,$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] = $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; $counter++; } if(!empty($details)) { return $details; } return false; } } } function get_all_science_field_nonteaching() { if($stmt_insert = $this->con->prepare("SELECT `id`,`full_name`,`designation`,`qualification`,`subject`,`experience`,`email`,`department`,`staff`,`profile` FROM `faculty_information` Where `department` ='General Science' And `staff` ='non-teaching'")) { $stmt_insert->bind_result($id,$full_name,$designation,$qualification,$subject,$experience,$email,$department,$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] = $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; $counter++; } if(!empty($details)) { return $details; } return false; } } } function get_all_administrative_field_teaching() { if($stmt_insert = $this->con->prepare("SELECT `id`,`full_name`,`designation`,`qualification`,`subject`,`experience`,`email`,`department`,`staff`,`profile` FROM `faculty_information` Where `department` ='Administrative' And `staff` ='teaching'")) { $stmt_insert->bind_result($id,$full_name,$designation,$qualification,$subject,$experience,$email,$department,$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] = $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; $counter++; } if(!empty($details)) { return $details; } return false; } } } function get_all_administrative_field_nonteaching() { if($stmt_insert = $this->con->prepare("SELECT `id`,`full_name`,`designation`,`qualification`,`subject`,`experience`,`email`,`department`,`staff`,`profile` FROM `faculty_information` Where `department` ='Administrative' And `staff` ='non-teaching'")) { $stmt_insert->bind_result($id,$full_name,$designation,$qualification,$subject,$experience,$email,$department,$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] = $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; $counter++; } if(!empty($details)) { return $details; } return false; } } } function get_facebook_link() { if($stmt_select = $this->con->prepare("Select `link` from `social_media` where `name` = 'facebook' ")) { $stmt_select->bind_result($result_link); if($stmt_select->execute()) { if($stmt_select->fetch()) { return $result_link; } } return false; } } function get_twitter_link() { if($stmt_select = $this->con->prepare("Select `link` from `social_media` where `name` = 'twitter' ")) { $stmt_select->bind_result($result_link); if($stmt_select->execute()) { if($stmt_select->fetch()) { return $result_link; } } return false; } } function get_linked_link() { if($stmt_select = $this->con->prepare("Select `link` from `social_media` where `name` = 'linked in' ")) { $stmt_select->bind_result($result_link); if($stmt_select->execute()) { if($stmt_select->fetch()) { return $result_link; } } return false; } } function get_google_link() { if($stmt_select = $this->con->prepare("Select `link` from `social_media` where `name` = 'google+' ")) { $stmt_select->bind_result($result_link); if($stmt_select->execute()) { if($stmt_select->fetch()) { return $result_link; } } return false; } } function get_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_youtube_link() { 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 update_social_media($facebook) { if($stmt_insert = $this->con->prepare("UPDATE `social_media` set `link` = ? Where `name` = 'facebook' ")) { $stmt_insert->bind_param("s",$facebook); if($stmt_insert->execute()) { return true; } return false; } } function update_social_media1($twitter) { if($stmt_insert = $this->con->prepare("UPDATE `social_media` set `link` = ? Where `name` = 'twitter' ")) { $stmt_insert->bind_param("s",$twitter); if($stmt_insert->execute()) { return true; } return false; } } function update_social_media2($facebook) { if($stmt_insert = $this->con->prepare("UPDATE `social_media` set `link` = ? Where `name` = 'linked in' ")) { $stmt_insert->bind_param("s",$facebook); if($stmt_insert->execute()) { return true; } return false; } } function update_social_media3($twitter) { if($stmt_insert = $this->con->prepare("UPDATE `social_media` set `link` = ? Where `name` = 'google+' ")) { $stmt_insert->bind_param("s",$twitter); if($stmt_insert->execute()) { return true; } return false; } } function update_social_media4($twitter) { if($stmt_insert = $this->con->prepare("UPDATE `social_media` set `link` = ? Where `name` = 'Youtube' ")) { $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 new_important_links($title,$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`, `date`, `time`) VALUES (?,?,?,?)")) { $stmt_insert->bind_param("ssss",$title,$actual_image_name,$date,$time); if($stmt_insert->execute()) { return true; } 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 get_all_important_links() { if($stmt_insert = $this->con->prepare("SELECT `id`,`title`,`attachment` FROM `important_links` 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_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 add_time_table($department,$title,$actual_image_name) { $date = date("Y-m-d"); $time = date("H-i-s A"); if($stmt_insert = $this->con->prepare("INSERT INTO `time_table`(`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 get_all_time_table() { if($stmt_insert = $this->con->prepare("SELECT `id`,`department`,`title`,`attachment` FROM `time_table`")) { $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_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_media_release($actual_image_name) { $date = date("Y-m-d"); $time = date("H-i-s A"); if($stmt_insert = $this->con->prepare("INSERT INTO `media_release`(`attachment`, `date`, `time`) VALUES (?,?,?)")) { $stmt_insert->bind_param("sss",$actual_image_name,$date,$time); if($stmt_insert->execute()) { return true; } return false; } } function get_all_media_release() { if($stmt_insert = $this->con->prepare("SELECT `id`,`attachment` FROM `media_release`")) { $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_media_release($del_id) { if($stmt_select = $this->con->prepare("Delete from `media_release` where `id`=?")) { $stmt_select->bind_param("i",$del_id); if($stmt_select->execute()) { return true; } return false; } } function fetch_academic_calender_departmentwise($department) { if($stmt_insert = $this->con->prepare("SELECT `id`,`department`,`title`,`attachment` FROM `academic_calender` Where `department` = ?")) { $stmt_insert->bind_param("s",$department); $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 fetch_time_table_departmentwise($department) { if($stmt_insert = $this->con->prepare("SELECT `id`,`department`,`title`,`attachment` FROM `time_table` Where `department` = ?")) { $stmt_insert->bind_param("s",$department); $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 fetch_gallery_data_departmentwise($department) { if($stmt_insert = $this->con->prepare("SELECT `id`,`department`,`images`,`description` FROM `gallery` Where `department` = ? ORDER BY `id` DESC")) { $stmt_insert->bind_param("s",$department); $stmt_insert->bind_result($id,$department,$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] = $images; $details[$counter][3] = $description; $counter++; } if(!empty($details)) { return $details; } return false; } } } function add_answer_papers($department,$title,$actual_image_name) { $date = date("Y-m-d"); $time = date("H-i-s A"); if($stmt_insert = $this->con->prepare("INSERT INTO `model_answer_paper`(`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 get_all_answer_paper() { if($stmt_insert = $this->con->prepare("SELECT `id`,`department`,`title`,`attachment` FROM `model_answer_paper`")) { $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_answer_paper($del_id) { if($stmt_select = $this->con->prepare("Delete from `model_answer_paper` where `id`=?")) { $stmt_select->bind_param("i",$del_id); if($stmt_select->execute()) { return true; } return false; } } function fetch_answer_paper_department($department) { if($stmt_insert = $this->con->prepare("SELECT `id`,`department`,`title`,`attachment` FROM `model_answer_paper` Where `department` =?")) { $stmt_insert->bind_param("s",$department); $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 fetch_downloads_images_departmentwise($department) { if($stmt_insert = $this->con->prepare("SELECT `id`,`department`,`title`,`images` FROM `downloads` Where `department` = ? ORDER BY `id` DESC")) { $stmt_insert->bind_param("s",$department); $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; } } } /*Comapny-report*/ function companylogo($actual_image_name,$description) { $date = date("Y-m-d"); $time = date("H-i-s A"); if($stmt_insert = $this->con->prepare("INSERT INTO `company_report`(`image`,`title`, `date`, `time`) VALUES (?,?,?,?)")) { $stmt_insert->bind_param("ssss",$actual_image_name,$description,$date,$time); if($stmt_insert->execute()) { return true; } return false; } } /*fetch company logo*/ function get_all_logo_images() { if($stmt_insert = $this->con->prepare("SELECT `id`,`image`,`title` FROM `company_report`")) { $stmt_insert->bind_result($id,$images,$description); if($stmt_insert->execute()) { $counter = 0; $details = array(); while($stmt_insert->fetch()) { $details[$counter][0] = $id; $details[$counter][1] = $images; $details[$counter][2] = $description; $counter++; } if(!empty($details)) { return $details; } return false; } } } /*delete logo*/ function delete_logo_images($del_id) { if($stmt_select = $this->con->prepare("Delete from `company_report` where `id`=?")) { $stmt_select->bind_param("i",$del_id); if($stmt_select->execute()) { return true; } return false; } } /*Add placed students*/ function add_students_images($department,$description,$actual_image_name) { $date = date("Y-m-d"); $time = date("H-i-s A"); if($stmt_insert = $this->con->prepare("INSERT INTO `selected_student`(`company`,`name`,`image`, `date`, `time`) VALUES (?,?,?,?,?)")) { $stmt_insert->bind_param("sssss",$department,$description,$actual_image_name,$date,$time); if($stmt_insert->execute()) { return true; } return false; } } function get_all_selected_student_images() { if($stmt_insert = $this->con->prepare("SELECT `id`,`company`,`name`,`image` FROM `selected_student`")) { $stmt_insert->bind_result($id,$department,$description,$images); if($stmt_insert->execute()) { $counter = 0; $details = array(); while($stmt_insert->fetch()) { $details[$counter][0] = $id; $details[$counter][1] = $department; $details[$counter][2] = $description; $details[$counter][3] = $images; $counter++; } if(!empty($details)) { return $details; } return false; } } } /*delete added students*/ function delete_addedstudent_images($del_id) { if($stmt_select = $this->con->prepare("Delete from `selected_student` where `id`=?")) { $stmt_select->bind_param("i",$del_id); if($stmt_select->execute()) { return true; } return false; } } function get_students($title) { if($stmt_insert = $this->con->prepare("SELECT `id`,`name`,`image` FROM `selected_student` where `company` =?")) { $stmt_insert->bind_param("s",$title); $stmt_insert->bind_result($id,$description,$images); if($stmt_insert->execute()) { $counter = 0; $details = array(); while($stmt_insert->fetch()) { $details[$counter][0] = $id; $details[$counter][1] = $description; $details[$counter][2] = $images; $counter++; } if(!empty($details)) { return $details; } return false; } } } function new_laborateries_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 `laborateries`(`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_laborateries_images() { if($stmt_insert = $this->con->prepare("SELECT `id`,`department`,`title`,`images` FROM `laborateries` ORDER BY `id` DESC")) { $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_laborateries_images($del_id) { if($stmt_select = $this->con->prepare("Delete from `laborateries` where `id`=?")) { $stmt_select->bind_param("i",$del_id); if($stmt_select->execute()) { return true; } return false; } } function fetch_laborateries_data_departmentwise($department) { if($stmt_insert = $this->con->prepare("SELECT `id`,`department`,`title`,`images` FROM `laborateries` Where `department` = ? ORDER BY `id` DESC")) { $stmt_insert->bind_param("s",$department); $stmt_insert->bind_result($id,$department,$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] = $images; $details[$counter][3] = $description; $counter++; } if(!empty($details)) { return $details; } return false; } } } //slider for event function new_slider_images_event($actual_image_name) { $date = date("Y-m-d"); $time = date("H-i-s A"); if($stmt_insert = $this->con->prepare("INSERT INTO `slider_images_event`(`images`, `date`, `time`) VALUES (?,?,?)")) { $stmt_insert->bind_param("sss",$actual_image_name,$date,$time); if($stmt_insert->execute()) { return true; } return false; } } // function get_all_slider_images_event() // { // if($stmt_insert = $this->con->prepare("SELECT `id`, `images`, `image_name` FROM `slider_images_event` ")) // { // $stmt_insert->bind_result($id,$images,$image_name); // if($stmt_insert->execute()) // { // $counter = 0; // $details = array(); // while($stmt_insert->fetch()) // { // $details[$counter][0] = $id; // $details[$counter][1] = $images; // $details[$counter][2] = $image_name; // $counter++; // } // if(!empty($details)) // { // return $details; // } // return false; // } // } // } function get_all_slider_images_event() { if($stmt_insert = $this->con->prepare("SELECT `id`, `images`, `image_name` FROM `slider_images_event` ")) { $stmt_insert->bind_result($id,$images,$image_name); if($stmt_insert->execute()) { $counter = 0; $details = array(); while($stmt_insert->fetch()) { $details[$counter][0] = $id; $details[$counter][1] = $images; $details[$counter][2] = $image_name; $counter++; } if(!empty($details)) { return $details; } return false; } } } function delete_slider_images_event($del_id) { if($stmt_select = $this->con->prepare("Delete from `slider_images_event` where `id`=?")) { $stmt_select->bind_param("i",$del_id); if($stmt_select->execute()) { return true; } return false; } } //slider for eminant visitors function new_slider_images_eminant_visitors($actual_image_name) { $date = date("Y-m-d"); $time = date("H-i-s A"); if($stmt_insert = $this->con->prepare("INSERT INTO `slider_eminant_visitors`(`images`, `date`, `time`) VALUES (?,?,?)")) { $stmt_insert->bind_param("sss",$actual_image_name,$date,$time); if($stmt_insert->execute()) { return true; } return false; } } // function get_all_slider_images_eminant_visitors() // { // if($stmt_insert = $this->con->prepare("SELECT `id`, `images`, `image_name` FROM `slider_eminant_visitors` ")) // { // $stmt_insert->bind_result($id,$images,$image_name); // if($stmt_insert->execute()) // { // $counter = 0; // $details = array(); // while($stmt_insert->fetch()) // { // $details[$counter][0] = $id; // $details[$counter][1] = $images; // $details[$counter][2] = $image_name; // $counter++; // } // if(!empty($details)) // { // return $details; // } // return false; // } // } // } function get_all_slider_images_eminant_visitors() { if($stmt_insert = $this->con->prepare("SELECT `id`, `images`, `image_name` FROM `slider_eminant_visitors` ")) { $stmt_insert->bind_result($id,$images,$image_name); if($stmt_insert->execute()) { $counter = 0; $details = array(); while($stmt_insert->fetch()) { $details[$counter][0] = $id; $details[$counter][1] = $images; $details[$counter][2] = $image_name; $counter++; } if(!empty($details)) { return $details; } return false; } } } function delete_slider_images_eminant_visitors($del_id) { if($stmt_select = $this->con->prepare("Delete from `slider_eminant_visitors` where `id`=?")) { $stmt_select->bind_param("i",$del_id); if($stmt_select->execute()) { return true; } return false; } } } ?>
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