Şuanki Dizin: /home/wwwdreamtechnolo/public_html/uesmahilamahavidyalaya.org/lib/ |
Şuanki Dosya : /home/wwwdreamtechnolo/public_html/uesmahilamahavidyalaya.org/lib/functions.php |
<?php session_start(); $project_title = "UES Mahila Mahavidyalay"; $project_main_name = "UES Mahila Mahavidyalay"; date_default_timezone_set('Asia/Kolkata'); class login_function { private $con; function __construct() { $this->con = new mysqli("localhost","bravemy8_sbpmanu","2)KSuLt(lud6","bravemy8_sbpcollege_mandrup"); //$this->con = new mysqli("localhost","root","","bravemy8_sbpcollege_mandrup"); } 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($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 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 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 get_all_slider_images() { if($stmt_insert = $this->con->prepare("SELECT `id`,`images` FROM `slider_images` 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 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_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 new_downloads_images($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`,`images`, `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_downloads_images() { if($stmt_insert = $this->con->prepare("SELECT `id`,`title`,`images` 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 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 new_ict_record($title,$actual_image_name,$sequence) { $date = date("Y-m-d"); $time = date("H-i-s A"); if($stmt_insert = $this->con->prepare("INSERT INTO `ict`(`title`,`attachment`, `date`, `time`,`sequence`) VALUES (?,?,?,?,?)")) { $stmt_insert->bind_param("sssss",$title,$actual_image_name,$date,$time,$sequence); 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 delete_ict_info($del_id) { if($stmt_select = $this->con->prepare("Delete from `ict` 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`")) { $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_ict_info() { if($stmt_insert = $this->con->prepare("SELECT `id`,`title`,`attachment`,`sequence` FROM `ict` ORDER BY `sequence` ASC")) { $stmt_insert->bind_result($id,$title,$images,$sequence); 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] = $sequence; $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 get_all_ict_info_by_id($up_id) { if($stmt_insert = $this->con->prepare("SELECT `id`,`title`,`attachment`,`sequence` FROM `ict` Where `id` = ?")) { $stmt_insert->bind_param("i",$up_id); $stmt_insert->bind_result($id,$title,$images,$sequence); 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] = $sequence; $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_ict_info($up_id,$title,$sequence) { $date = date("Y-m-d"); $time = date("H-i-s A"); if($stmt_insert = $this->con->prepare("UPDATE `ict` set `title` =?,`sequence`=? Where `id` =?")) { $stmt_insert->bind_param("ssi",$title,$sequence,$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 update_ict_attachement($up_id) { $actual_image_name=""; if($stmt_insert = $this->con->prepare("UPDATE `ict` 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 get_ict_n_info_by_id($id) { if($stmt_select = $this->con->prepare("Select `attachment` from `ict` 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 update_ict_image($up_id,$image) { if($stmt_insert = $this->con->prepare("UPDATE `ict` 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 new_placement_cell($title,$actual_image_name) { $date = date("Y-m-d"); $time = date("H-i-s A"); if($stmt_insert = $this->con->prepare("INSERT INTO `placement_cell`(`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_placement_cell() { if($stmt_insert = $this->con->prepare("SELECT `id`,`title`,`attachment` FROM `placement_cell` 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_placement_cell($del_id) { if($stmt_select = $this->con->prepare("Delete from `placement_cell` where `id`=?")) { $stmt_select->bind_param("i",$del_id); if($stmt_select->execute()) { return true; } return false; } } function update_placement_cell($up_id,$title) { if($stmt_insert = $this->con->prepare("UPDATE `placement_cell` set `title` =? Where `id`=?")) { $stmt_insert->bind_param("si",$title,$up_id); if($stmt_insert->execute()) { return true; } return false; } } function get_all_placement_cell_by_id($up_id) { if($stmt_insert = $this->con->prepare("SELECT `id`,`title`,`attachment` FROM `placement_cell` 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_placement_attachments($up_id) { $actual_image_name=""; if($stmt_insert = $this->con->prepare("UPDATE `placement_cell` set `attachment` = ? Where `id`=?")) { $stmt_insert->bind_param("si",$actual_image_name,$up_id); if($stmt_insert->execute()) { return true; } return false; } } function get_placement_image_name_by_id($id) { if($stmt_select = $this->con->prepare("Select `attachment` from `placement_cell` 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_placement_cell_info($up_id,$image) { if($stmt_insert = $this->con->prepare("UPDATE `placement_cell` set `attachment` = ? Where `id`=?")) { $stmt_insert->bind_param("si",$image,$up_id); if($stmt_insert->execute()) { return true; } return false; } } function add_faculty($full_name,$designation,$qualification,$subject,$experience,$email,$department,$staff,$actual_image_name,$attachment) { $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`,`attachment`, `date`, `time`) VALUES (?,?,?,?,?,?,?,?,?,?,?,?)")) { $stmt_insert->bind_param("ssssssssssss",$full_name,$designation,$qualification,$subject,$experience,$email,$department,$staff,$actual_image_name,$attachment,$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`,`attachment` FROM `faculty_information`")) { $stmt_insert->bind_result($id,$full_name,$designation,$qualification,$subject,$experience,$email,$department,$staff,$profile,$attachment); 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] = $attachment; $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`,`attachment` 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,$attachment); 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] = $attachment; $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_teaching_staff() { if($stmt_insert = $this->con->prepare("SELECT `id`,`full_name`,`designation`,`qualification`,`subject`,`experience`,`email`,`department`,`staff`,`profile` FROM `faculty_information` Where `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_non_teaching_staff() { if($stmt_insert = $this->con->prepare("SELECT `id`,`full_name`,`designation`,`qualification`,`subject`,`experience`,`email`,`department`,`staff`,`profile` FROM `faculty_information` Where `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 add_departments($title) { $date = date("Y-m-d"); $time = date("H-i-s A"); if($stmt_insert = $this->con->prepare("INSERT INTO `departments`(`title`, `date`, `time`) VALUES (?,?,?)")) { $stmt_insert->bind_param("sss",$title,$date,$time); if($stmt_insert->execute()) { return true; } return false; } } function get_all_department() { if($stmt_insert = $this->con->prepare("SELECT `id`,`title` FROM `departments` 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_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 get_faculty_image_name_by_id1($id) { if($stmt_select = $this->con->prepare("Select `attachment` 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_info1($up_id,$image) { if($stmt_insert = $this->con->prepare("UPDATE `faculty_information` set `attachment` = ? Where `id`=?")) { $stmt_insert->bind_param("si",$image,$up_id); if($stmt_insert->execute()) { return true; } return false; } } function update_faculty_profile1($up_id) { $attachment=""; if($stmt_insert = $this->con->prepare("UPDATE `faculty_information` set `attachment` = ? Where `id`=?")) { $stmt_insert->bind_param("si",$attachment,$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 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 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 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 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 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 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 A"); if($stmt_insert = $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_insert->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_insert->execute()) { return true; } return false; } } function add_complaint_feedback_form($stud_name,$roll_no,$class,$remark,$contact_no) { $date = date("Y-m-d"); $time = date("H:i:s t"); if($stmt_insert = $this->con->prepare("INSERT INTO `student_complaint_feedback`( `stud_name`, `roll_no`, `class`, `feedback`, `date`, `time`,`contact_no`) VALUES (?,?,?,?,?,?,?)")) { $stmt_insert->bind_param("sssssss",$stud_name,$roll_no,$class,$remark,$date,$time,$contact_no); if($stmt_insert->execute()) { return true; } else { return false; } } } function get_all_complaint_feedback_of_student() { if($stmt_insert = $this->con->prepare("SELECT `id`, `stud_name`, `roll_no`, `class`, `feedback`, `date`, `time`,`contact_no` FROM `student_complaint_feedback`")) { $stmt_insert->bind_result($id,$stud_name,$roll_no,$class,$feedback,$date,$time,$contact_no); if($stmt_insert->execute()) { $counter = 0; $complaint_details = array(); while($stmt_insert->fetch()) { $complaint_details[$counter][0] = $id; $complaint_details[$counter][1] = $stud_name; $complaint_details[$counter][2] = $roll_no; $complaint_details[$counter][3] = $class; $complaint_details[$counter][4] = $feedback; $complaint_details[$counter][5] = $date; $complaint_details[$counter][6] = $time; $complaint_details[$counter][7] = $contact_no; $counter++; } if(!empty($complaint_details)) { return $complaint_details; } return false; } } } function delete_student_complaint_feedback($del_id) { if($stmt_select = $this->con->prepare("Delete from `student_complaint_feedback` where `id`=?")) { $stmt_select->bind_param("i",$del_id); if($stmt_select->execute()) { return true; } return false; } } //21-11-2020 function new_sports_details($menu,$title,$actual_image_name) { $date = date("Y-m-d"); $time = date("H-i-s A"); if($stmt_insert = $this->con->prepare("INSERT INTO `sports_details`(`menu`, `title`, `attachment`, `date`, `time`) VALUES (?,?,?,?,?)")) { $stmt_insert->bind_param("sssss",$menu,$title,$actual_image_name,$date,$time); if($stmt_insert->execute()) { return true; } return false; } } function get_all_sports_details() { if($stmt_insert = $this->con->prepare("SELECT `id`, `menu`, `title`, `attachment`, `date`, `time` FROM `sports_details` ORDER BY `id` DESC")) { $stmt_insert->bind_result($id,$menu,$title,$images,$date,$time); if($stmt_insert->execute()) { $counter = 0; $details = array(); while($stmt_insert->fetch()) { $details[$counter][0] = $id; $details[$counter][1] = $menu; $details[$counter][2] = $title; $details[$counter][3] = $images; $details[$counter][4] = $date; $details[$counter][5] = $time; $counter++; } if(!empty($details)) { return $details; } return false; } } } function delete_sports_detail($del_id) { if($stmt_select = $this->con->prepare("Delete from `sports_details` where `id`=?")) { $stmt_select->bind_param("i",$del_id); if($stmt_select->execute()) { return true; } return false; } } function get_all_sports_details_by_menu($menu) { if($stmt_insert = $this->con->prepare("SELECT `id`, `menu`, `title`, `attachment`, `date`, `time` FROM `sports_details` WHERE `menu`=? ORDER BY `id` DESC")) { $stmt_insert->bind_param("s",$menu); $stmt_insert->bind_result($id,$menu,$title,$images,$date,$time); if($stmt_insert->execute()) { $counter = 0; $details = array(); while($stmt_insert->fetch()) { $details[$counter][0] = $id; $details[$counter][1] = $menu; $details[$counter][2] = $title; $details[$counter][3] = $images; $details[$counter][4] = $date; $details[$counter][5] = $time; $counter++; } if(!empty($details)) { return $details; } return false; } } } //20-02-21 function get_title_id($page_id) { if($stmt_select = $this->con->prepare("SELECT `id` FROM `library` WHERE `page_id`=?")) { $stmt_select->bind_param("i",$page_id); $stmt_select->bind_result($result_page_id); if($stmt_select->execute()) { if($stmt_select->fetch()) { return $result_page_id; } } return false; } } function insert_home_contents($title,$content,$page_id) { $date = date("Y-m-d"); $time = date("H-i-s A"); if($stmt_insert = $this->con->prepare("INSERT INTO `library`( `page_id`, `title`, `content`, `date_modified`, `time_modified`) VALUES (?,?,?,?,?)")) { $stmt_insert->bind_param("issss",$page_id,$title,$content,$date,$time); if($stmt_insert->execute()) { return true; } return false; } } function update_home_contents($title,$content,$db_id) { if($stmt_insert = $this->con->prepare("UPDATE `library` SET `title`=?,`content`=? WHERE `id`=?")) { $stmt_insert->bind_param("ssi",$title,$content,$db_id); if($stmt_insert->execute()) { return true; } return false; } } function get_library_details($page_id) { if($stmt = $this->con->prepare("SELECT `title`,`content` FROM `library` WHERE `page_id`=?")) { $stmt->bind_param("i",$page_id); $stmt->bind_result($result_title,$res_content); if($stmt->execute()) { $details = array(); if($stmt->fetch()) { $details[0] = $result_title; $details[1] = $res_content; return $details; } return false; } } } function new_library_images($actual_image_name) { $date = date("Y-m-d"); $time = date("H-i-s A"); if($stmt_insert = $this->con->prepare("INSERT INTO `library_images`(`images`, `date`, `time`) VALUES (?,?,?)")) { $stmt_insert->bind_param("sss",$actual_image_name,$date,$time); if($stmt_insert->execute()) { return true; } return false; } } function delete_library_images($del_id) { if($stmt_select = $this->con->prepare("Delete from `library_images` where `id`=?")) { $stmt_select->bind_param("i",$del_id); if($stmt_select->execute()) { return true; } return false; } } function get_all_library_images() { if($stmt_insert = $this->con->prepare("SELECT `id`,`images` FROM `library_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 add_library_feedback($name,$department,$member_ship_no,$class,$roll_no,$email_id,$contact_no,$visit,$available,$satisfied,$reading_space,$helpful,$services,$resources,$timing,$suggestion) { $date = date("Y-m-d"); $time = date("H-i-s A"); if($stmt_insert = $this->con->prepare("INSERT INTO `library_feedback`(`name`, `department`, `member_ship_no`, `class`, `roll_no`, `email_id`, `contact_no`, `visit`, `available`, `satisfied`, `reading_space`, `helpful`, `services`, `resources`, `timing`, `suggestion`, `date`, `time`) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)")) { $stmt_insert->bind_param("ssssssssssssssssss",$name,$department,$member_ship_no,$class,$roll_no,$email_id,$contact_no,$visit,$available,$satisfied,$reading_space,$helpful,$services,$resources,$timing,$suggestion,$date,$time); if($stmt_insert->execute()) { return true; } return false; } } function get_all_library_feedback() { if($stmt_insert = $this->con->prepare("SELECT `id`, `name`, `department`, `member_ship_no`, `class`, `roll_no`, `email_id`, `contact_no`, `visit`, `available`, `satisfied`, `reading_space`, `helpful`, `services`, `resources`, `timing`, `suggestion`, `date`, `time` FROM `library_feedback` ")) { $stmt_insert->bind_result($id,$name,$department,$member_ship_no,$class,$roll_no,$email_id,$contact_no,$visit,$available,$satisfied,$reading_space,$helpful,$services,$resources,$timing,$suggestion,$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] = $department; $details[$counter][3] = $member_ship_no; $details[$counter][4] = $class; $details[$counter][5] = $roll_no; $details[$counter][6] = $email_id; $details[$counter][7] = $contact_no; $details[$counter][8] = $visit; $details[$counter][9] = $available; $details[$counter][10] = $satisfied; $details[$counter][11] = $reading_space; $details[$counter][12] = $helpful; $details[$counter][13] = $services; $details[$counter][14] = $resources; $details[$counter][15] = $timing; $details[$counter][16] = $suggestion; $details[$counter][17] = $date; $details[$counter][18] = $time; $counter++; } if(!empty($details)) { return $details; } return false; } } } function delete_lib_feedback($del_id) { if($stmt_select = $this->con->prepare("Delete from `library_feedback` where `id`=?")) { $stmt_select->bind_param("i",$del_id); if($stmt_select->execute()) { return true; } 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