├── Installation Instructions └── installation-steps.txt ├── add-author.php ├── add-book-issue.php ├── add-book.php ├── add-category.php ├── add-publisher.php ├── add-student.php ├── author.php ├── book-issue.php ├── book.php ├── category.php ├── change-password.php ├── config.php ├── css ├── bootstrap.css └── style.css ├── dashboard.php ├── date-report.php ├── delete-author.php ├── delete-book.php ├── delete-category.php ├── delete-issue-book.php ├── delete-publisher.php ├── delete-student.php ├── footer.php ├── header.php ├── images ├── library-img.png └── library.png ├── index.php ├── js ├── bootstrap.min.js ├── jquery-3.6.0.min.js └── popper.min.js ├── logout.php ├── month-report.php ├── not-returned.php ├── publisher.php ├── reports.php ├── setting.php ├── sql └── library_system.sql.zip ├── student.php ├── update-author.php ├── update-book.php ├── update-category.php ├── update-issue-book.php ├── update-publisher.php ├── update-student.php └── view-student.php /Installation Instructions/installation-steps.txt: -------------------------------------------------------------------------------- 1 | Installation Steps 2 | ================ 3 | 4 | 1. Download zip file and Unzip file on your local server. 5 | 2. Put this file inside "c:/wamp/www/" OR "c:/xamp/htdocs/" . 6 | 7 | Database Configuration: 8 | ================== 9 | 10 | 1. Open phpmyadmin 11 | 2. Create New Database named "library_system". 12 | 3. Import database tables in newly created database "library_system" from downloaded folder -> sql -> library_system.sql.zip. 13 | 4. In "PROJECT-FOLDER/config.php" change the value of $conn (hostname,db_username,db_pasword,db_name). 14 | 5. Open Your browser put inside URL: "http://localhost/library-system/" 15 | 16 | login details: 17 | ==================== 18 | Login Id : admin 19 | Password : admin 20 | 21 | -------------------------------------------------------------------------------- /add-author.php: -------------------------------------------------------------------------------- 1 | 2 |
3 |
4 |
5 |
6 |

Add Author

7 |
8 |
9 | All Authors 10 |
11 |
12 |
13 |
14 |
15 |
16 | 17 | 18 |
19 | 20 |
21 | Author name required.
"; 25 | }else{ 26 | $author_name = mysqli_real_escape_string($conn, $_POST['authorname']); 27 | //query for check author name exists or not 28 | $sql = "SELECT author_name FROM author WHERE author_name = '{$author_name}'"; 29 | $result = mysqli_query($conn, $sql) or die("Sql query failed."); 30 | //check result rows 31 | if(mysqli_num_rows($result) > 0){ 32 | echo "
Author name already exist.
"; 33 | }else{ 34 | // insert query 35 | $sql1 = "INSERT INTO author(author_name) VALUES ('{$author_name}')"; 36 | if(mysqli_query($conn, $sql1)){ 37 | header("$base_url/author.php"); // redirect 38 | } 39 | } 40 | } 41 | } ?> 42 |
43 |
44 |
45 | 46 | 47 | -------------------------------------------------------------------------------- /add-book-issue.php: -------------------------------------------------------------------------------- 1 | 2 |
3 |
4 |
5 |
6 |

Add Book Issue

7 |
8 |
9 | All Issue List 10 |
11 |
12 |
13 |
14 | 0){ 21 | $return_days = 0; 22 | while($row = mysqli_fetch_assoc($result)){ 23 | $return_days = $row['return_days']; 24 | } 25 | } 26 | // -------------------- 27 | if(empty($_POST['student_name']) || empty($_POST['book_name'])){ 28 | echo "
Please Fill All the Fields.
"; 29 | }else{ 30 | // validate inputs 31 | $issue_name = mysqli_real_escape_string($conn, $_POST['student_name']); 32 | $issue_book = mysqli_real_escape_string($conn, $_POST['book_name']); 33 | $issue_date = date('Y-m-d'); 34 | $return_date = date('Y-m-d',strtotime("+".$return_days." days")); 35 | //insert query 36 | $sql = "INSERT INTO book_issue(issue_name,issue_book,issue_date,return_date,issue_status) VALUES ('{$issue_name}','{$issue_book}','{$issue_date}','$return_date','N')"; 37 | if(mysqli_query($conn, $sql)){ 38 | $update = "UPDATE book SET book_status = 'N' WHERE book_id = {$issue_book}"; 39 | $result = mysqli_query($conn, $update); 40 | header("$base_url/book-issue.php"); //redirect 41 | }else{ 42 | echo "
Query failed.
"; 43 | } 44 | } 45 | } ?> 46 |
47 |
48 | 49 | 60 |
61 |
62 | 63 | 74 |
75 | 76 |
77 |
78 |
79 |
80 |
81 | 82 | -------------------------------------------------------------------------------- /add-book.php: -------------------------------------------------------------------------------- 1 | 2 |
3 |
4 |
5 |
6 |

Add Book

7 |
8 |
9 | All Books 10 |
11 |
12 |
13 |
14 | Please Fill All the Fields.
"; 18 | }else{ 19 | //validate inputs 20 | $book_name = mysqli_real_escape_string($conn, $_POST['book_name']); 21 | $book_category = mysqli_real_escape_string($conn, $_POST['category']); 22 | $book_author = mysqli_real_escape_string($conn, $_POST['author']); 23 | $book_publisher = mysqli_real_escape_string($conn, $_POST['publisher']); 24 | // query for check book name exists or not 25 | $sql = "SELECT book_name FROM book WHERE book_name = '{$book_name}'"; 26 | $result = mysqli_query($conn, $sql); 27 | if(mysqli_num_rows($result) > 0){ //check result rows 28 | echo "
Book name already exist.
"; 29 | }else{ 30 | //insert query 31 | $sql1 ="INSERT INTO book(book_name,book_category,book_author,book_publisher,book_status) VALUES ('{$book_name}','{$book_category}','{$book_author}','{$book_publisher}','Y')"; 32 | if(mysqli_query($conn, $sql1)){ 33 | header("$base_url/book.php"); // redirect 34 | } 35 | } 36 | } 37 | } ?> 38 |
39 |
40 | 41 | 42 |
43 |
44 | 45 | 56 |
57 |
58 | 59 | 70 |
71 |
72 | 73 | 84 |
85 | 86 |
87 |
88 |
89 |
90 | 91 | 92 | -------------------------------------------------------------------------------- /add-category.php: -------------------------------------------------------------------------------- 1 | 2 |
3 |
4 |
5 |
6 |

Add Category

7 |
8 |
9 | All Categories 10 |
11 |
12 |
13 |
14 |
15 |
16 | 17 | 18 |
19 | 20 |
21 | Category name required.
"; 25 | }else{ 26 | //validate input 27 | $category_name = mysqli_real_escape_string($conn, $_POST['categoryname']); 28 | // select query for check category name already exists 29 | $sql = "SELECT category_name FROM category WHERE category_name = '{$category_name}'"; 30 | $result = mysqli_query($conn, $sql) or die("SQL query failed"); 31 | 32 | if(mysqli_num_rows($result) > 0){ // check result rows 33 | echo "
Category name already exist.
"; 34 | }else{ 35 | //insert query 36 | $sql1 = "INSERT INTO category(category_name) VALUES ('{$category_name}')"; 37 | if(mysqli_query($conn, $sql1)){ 38 | header("$base_url/category.php"); //redirect 39 | } 40 | } 41 | } 42 | } ?> 43 |
44 |
45 |
46 | 47 | 48 | -------------------------------------------------------------------------------- /add-publisher.php: -------------------------------------------------------------------------------- 1 | 2 |
3 |
4 |
5 |
6 |

Add Publisher

7 |
8 |
9 | All Publishers 10 |
11 |
12 |
13 |
14 |
15 |
16 | 17 | 18 |
19 | 20 |
21 | Publisher name required.
"; 25 | }else{ 26 | // validate input 27 | $publisher_name = mysqli_real_escape_string($conn, $_POST['publishername']); 28 | //check publisher name already exists in table 29 | $sql = "SELECT publisher_name FROM publisher WHERE publisher_name = '{$publisher_name}'"; 30 | $result = mysqli_query($conn, $sql) or die("SQL query failed"); 31 | 32 | if(mysqli_num_rows($result) > 0){ // check result rows 33 | echo "
Publisher name already exist.
"; 34 | }else{ 35 | //insert query 36 | $sql1 = "INSERT INTO publisher(publisher_name) VALUES ('{$publisher_name}')"; 37 | if(mysqli_query($conn, $sql1)){ 38 | header("$base_url/publisher.php"); // redirect 39 | } 40 | } 41 | } 42 | } ?> 43 |
44 |
45 |
46 | 47 | 48 | -------------------------------------------------------------------------------- /add-student.php: -------------------------------------------------------------------------------- 1 | 2 |
3 |
4 |
5 |
6 |

Add Student

7 |
8 |
9 | All Students 10 |
11 |
12 |
13 |
14 | Please Fill All the Fields.
"; 18 | }else{ 19 | //validate inputs 20 | $student_name = mysqli_real_escape_string($conn, $_POST['studentname']); 21 | $student_address = mysqli_real_escape_string($conn, $_POST['address']); 22 | $student_gender = mysqli_real_escape_string($conn, $_POST['gender']); 23 | $student_class = mysqli_real_escape_string($conn, $_POST['class']); 24 | $student_age = mysqli_real_escape_string($conn, $_POST['age']); 25 | $student_phone = mysqli_real_escape_string($conn, $_POST['phone']); 26 | $student_email = mysqli_real_escape_string($conn, $_POST['email']); 27 | //insert query 28 | $sql = "INSERT INTO student(student_name,student_address,student_gender,student_class,student_age,student_phone,student_email) 29 | VALUES ('{$student_name}','$student_address','$student_gender','$student_class','$student_age','$student_phone','$student_email')"; 30 | 31 | if(mysqli_query($conn, $sql)){ 32 | header("$base_url/student.php"); //redirect 33 | }else{ 34 | echo "
Query failed.
"; 35 | } 36 | } 37 | } ?> 38 |
39 |
40 | 41 | 42 |
43 |
44 | 45 | 46 |
47 |
48 | 49 | 53 |
54 |
55 | 56 | 57 |
58 |
59 | 60 | 61 |
62 |
63 | 64 | 65 |
66 |
67 | 68 | 69 |
70 | 71 |
72 |
73 |
74 |
75 | 76 | 77 | -------------------------------------------------------------------------------- /author.php: -------------------------------------------------------------------------------- 1 | 2 |
3 |
4 |
5 |
6 |

All Authors

7 |
8 |
9 | Add Author 10 |
11 |
12 |
13 |
14 |
15 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 0){ 33 | $serial = $offset + 1; 34 | while($row= mysqli_fetch_assoc($result)){ ?> 35 | 36 | 37 | 38 | 41 | 44 | 45 | 48 | 49 | 50 | 51 | 52 | 53 |
S.NoAuthor NameEditDelete
39 | Edit 40 | 42 | >Delete 43 |
No Authors Found
54 | 0){ 58 | $total_records = mysqli_num_rows($result); 59 | 60 | $total_page = ceil($total_records / $limit); 61 | // show pagination 62 | if($total_page > 1){ 63 | $pagination = "
    "; 64 | if($page > 1){ // show previous button 65 | $pagination .= '
  • Prev
  • '; 66 | } 67 | for($i = 1; $i <= $total_page; $i++){ 68 | if($i == $page){ 69 | $active = "active"; 70 | }else{ 71 | $active = ""; 72 | } 73 | $pagination .= '
  • '.$i.'
  • '; 74 | } 75 | if($total_page > $page){ //show next button 76 | $pagination .= '
  • Next
  • '; 77 | } 78 | $pagination .= "
"; 79 | echo $pagination; 80 | } 81 | } ?> 82 |
83 |
84 |
85 |
86 | 87 | 88 | 103 | 104 | -------------------------------------------------------------------------------- /book-issue.php: -------------------------------------------------------------------------------- 1 | 2 |
3 |
4 |
5 |
6 |

All Book Issue

7 |
8 |
9 | Add Book Issue 10 |
11 |
12 |
13 |
14 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 0){ 43 | $serial = $offset + 1; 44 | while($row = mysqli_fetch_assoc($result)) { 45 | if((date('Y-m-d') > $row['return_date']) && $row['issue_status'] == "N"){ 46 | $over = 'style="background:rgba(255,0,0,0.2)"'; 47 | }else{ $over = ''; } ?> 48 | > 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 63 | 66 | 69 | 70 | 74 | 75 | 76 | 77 | 78 | 79 |
S.NoStudent NameBook NamePhoneEmailIssue DateReturn DateStatusEditDelete
57 | Returned"; 59 | }else{ 60 | echo "Issued"; 61 | } ?> 62 | 64 | Edit 65 | 67 | Delete 68 |
No Books Issued
80 | 0){ 84 | $total_records = mysqli_num_rows($result1); 85 | $total_page = ceil($total_records / $limit); 86 | if($total_page > 1){ 87 | $pagination = "
    "; 88 | if($page > 1){ // show previous button 89 | $pagination .= '
  • Prev
  • '; 90 | } 91 | for($i = 1; $i <= $total_page; $i++){ 92 | if($i == $page){ 93 | $active = "active"; 94 | }else{ 95 | $active = ""; 96 | } 97 | $pagination .= '
  • '.$i.'
  • '; 98 | } 99 | if($total_page > $page){ //show next button 100 | $pagination .= '
  • Next
  • '; 101 | } 102 | $pagination .= "
"; 103 | echo $pagination; 104 | } 105 | } ?> 106 |
107 |
108 |
109 |
110 | 111 | -------------------------------------------------------------------------------- /book.php: -------------------------------------------------------------------------------- 1 | 2 |
3 |
4 |
5 |
6 |

All Books

7 |
8 |
9 | Add Book 10 |
11 |
12 |
13 |
14 |
15 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 0){ 44 | $serial = $offset + 1; 45 | while($row = mysqli_fetch_assoc($result)) { ?> 46 | 47 | 48 | 49 | 50 | 51 | 52 | 60 | 63 | 66 | 67 | 71 | 72 | 73 | 74 | 75 | 76 |
S.NoBook NameCategoryAuthorPublisherStatusEditDelete
53 | Available"; 56 | }else{ 57 | echo "Issued"; 58 | } ?> 59 | 61 | Edit 62 | 64 | >Delete 65 |
No Books Found
77 | 0){ 81 | $total_records = mysqli_num_rows($result1); 82 | $total_page = ceil($total_records / $limit); 83 | if($total_page > 1){ 84 | $pagination = "
    "; 85 | if($page > 1){ 86 | $pagination .= '
  • Prev
  • '; 87 | } 88 | for($i = 1; $i <= $total_page; $i++){ 89 | if($i == $page){ 90 | $active = "active"; 91 | }else{ 92 | $active = ""; 93 | } 94 | $pagination .= '
  • '.$i.'
  • '; 95 | } 96 | if($total_page > $page){ 97 | $pagination .= '
  • Next
  • '; 98 | } 99 | $pagination .= "
"; 100 | echo $pagination; 101 | } 102 | } ?> 103 |
104 |
105 |
106 |
107 | 108 | 109 | 124 | 125 | -------------------------------------------------------------------------------- /category.php: -------------------------------------------------------------------------------- 1 | 2 |
3 |
4 |
5 |
6 |

All categories

7 |
8 |
9 | Add category 10 |
11 |
12 |
13 |
14 |
15 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 0){ 34 | $serial = $offset + 1; 35 | while($row = mysqli_fetch_assoc($result)) { ?> 36 | 37 | 38 | 39 | 42 | 45 | 46 | 49 | 50 | 51 | 52 | 53 | 54 |
S.NoCategory NameEditDelete
40 | Edit 41 | 43 | >Delete 44 |
No Categories Found
55 | 0){ 59 | $total_records = mysqli_num_rows($result1); 60 | $total_page = ceil($total_records / $limit); 61 | if($total_page > 1){ 62 | $pagination = "
    "; 63 | if($page > 1){ //show previous button 64 | $pagination .= '
  • Prev
  • '; 65 | } 66 | for($i = 1; $i <= $total_page; $i++){ 67 | if($i == $page){ 68 | $active = "active"; 69 | }else{ 70 | $active = ""; 71 | } 72 | $pagination .= '
  • '.$i.'
  • '; 73 | } 74 | if($total_page > $page){ // show next button 75 | $pagination .= '
  • Next
  • '; 76 | } 77 | $pagination .= "
"; 78 | echo $pagination; 79 | } 80 | } ?> 81 |
82 |
83 |
84 |
85 | 86 | 87 | 102 | 103 | -------------------------------------------------------------------------------- /change-password.php: -------------------------------------------------------------------------------- 1 | 2 |
3 |
4 |
5 |
6 |

Change Password

7 |
8 |
9 |
10 |
11 |
12 |
13 | 14 |
15 |
16 | 17 | 18 |
19 |
20 | 21 | 22 |
23 | 24 |
25 | Password changed successfully.
"; 35 | }else{ 36 | echo "
Failed to changed password.
"; 37 | } 38 | } ?> 39 |
40 |
41 |
42 | 43 | 44 | -------------------------------------------------------------------------------- /config.php: -------------------------------------------------------------------------------- 1 | 8 | -------------------------------------------------------------------------------- /css/style.css: -------------------------------------------------------------------------------- 1 | /* COMMOM CSS */ 2 | body{ 3 | background: #F6F6F6; 4 | font-family: 'Open Sans', sans-serif; 5 | } 6 | a, 7 | a:hover, 8 | a:focus{ 9 | text-decoration: none; 10 | outline: none; 11 | } 12 | ul{ 13 | margin:0; 14 | padding:0; 15 | list-style:none; 16 | } 17 | /* Header Styling */ 18 | #header{ 19 | background: #F6F6F6; 20 | } 21 | .logo img{ 22 | width: 100%; 23 | } 24 | .dropdown{ 25 | text-align: right; 26 | padding: 34px 0; 27 | } 28 | .dropdown button{ 29 | background: #A00000; 30 | border: none; 31 | opacity: 0.9; 32 | } 33 | .dropdown button:hover{ 34 | background: #A00000; 35 | opacity: 0.9; 36 | } 37 | .btn-secondary:not(:disabled):not(.disabled):active:focus, .btn-secondary:not(:disabled):not(.disabled).active:focus, .show > .btn-secondary.dropdown-toggle:focus{ 38 | box-shadow: none; 39 | } 40 | .btn-secondary:not(:disabled):not(.disabled):active, .btn-secondary:not(:disabled):not(.disabled).active, .show > .btn-secondary.dropdown-toggle{ 41 | background: #A00000; 42 | opacity: 0.9; 43 | } 44 | .btn-secondary:focus, .btn-secondary.focus{ 45 | border: none; 46 | background: #A00000; 47 | box-shadow: none; 48 | opacity: 0.9; 49 | } 50 | #menubar{ 51 | background: #A00000; 52 | text-align: center; 53 | opacity: 0.9; 54 | } 55 | .menu li{ 56 | display: inline-block; 57 | } 58 | .menu li a{ 59 | color: #fff; 60 | font-size: 16px; 61 | font-weight: 600; 62 | text-transform: uppercase; 63 | padding: 10px 13px; 64 | display: block; 65 | transition: all 0.3s; 66 | } 67 | .menu li a:hover{ 68 | background: #fff; 69 | color: #A00000; 70 | } 71 | /* Footer Styling */ 72 | #footer{ 73 | background: #A00000; 74 | color: #fff; 75 | text-align: center; 76 | padding: 10px 0; 77 | opacity: 0.9; 78 | } 79 | #footer span, 80 | #footer a{ 81 | color: #fff; 82 | } 83 | /* ADMIN CONTENT */ 84 | #admin-content{ 85 | min-height: 80vh; 86 | padding: 20px 0 40px; 87 | } 88 | #admin-content .admin-heading{ 89 | color: #0E0E0E; 90 | font-size: 30px; 91 | font-weight: 600; 92 | margin: 0 0 40px; 93 | position: relative; 94 | } 95 | #admin-content .admin-heading:after{ 96 | content : ""; 97 | background: #A00000; 98 | width: 100%; 99 | height: 3px; 100 | opacity: 0.9; 101 | position: absolute; 102 | left: 0; 103 | bottom: -10px; 104 | } 105 | #admin-content .add-new{ 106 | background: #A00000; 107 | color: #fff; 108 | font-size: 15px; 109 | font-weight: 600; 110 | text-align: center; 111 | text-transform: uppercase; 112 | border: 2px solid transparent; 113 | padding: 7px 15px; 114 | display: block; 115 | opacity: 0.9; 116 | transition: all 0.3s; 117 | } 118 | #admin-content .add-new:hover{ 119 | background: #fff; 120 | color: #A00000; 121 | border: 2px solid #A00000; 122 | opacity: 0.9; 123 | } 124 | #admin-content .content-table{ 125 | width: 100%; 126 | margin: 0 0 20px; 127 | } 128 | #admin-content .content-table thead{ 129 | background: #444; 130 | color: #fff; 131 | } 132 | #admin-content .content-table th{ 133 | text-align: center; 134 | text-transform: uppercase; 135 | border: 1px solid #000; 136 | padding: 10px; 137 | } 138 | #admin-content .content-table tbody tr:nth-child(odd){ 139 | background: #e7e7e7; 140 | } 141 | #admin-content .content-table tbody tr:nth-child(even){ 142 | background: transparent; 143 | } 144 | #admin-content .content-table tbody td{ 145 | text-align: center; 146 | border: 1px solid #000; 147 | padding: 10px; 148 | } 149 | #admin-content .content-table tbody td:nth-child(2), 150 | #admin-content .content-table tbody td:nth-child(5){ 151 | text-align: left; 152 | } 153 | .pagination{ 154 | text-align: center; 155 | display: block; 156 | } 157 | .pagination li{ 158 | display: inline-block; 159 | margin-right: 8px; 160 | } 161 | .pagination li a{ 162 | background: #A00000; 163 | color: #fff; 164 | font-size: 14px; 165 | padding: 6px 12px; 166 | opacity: 0.9; 167 | } 168 | .pagination li.active > a{ 169 | background: #A00000; 170 | opacity: 0.7; 171 | } 172 | /* ADD AUTHOR */ 173 | .yourform{ 174 | background: lightgrey; 175 | padding: 25px; 176 | box-shadow: 0 4px 5px rgba(0,0,0,0.5); 177 | } 178 | .form-group label{ 179 | color: #0E0E0E; 180 | font-weight: 600; 181 | } 182 | .form-group .form-control{ 183 | font-size: 14px; 184 | } 185 | /* ADD CATEGORY */ 186 | .radio{ 187 | padding: 3px 0; 188 | } 189 | .radio input[type="radio"]{ 190 | margin-right: 8px; 191 | } 192 | /* ADMIN LOGIN */ 193 | #wrapper-admin{ 194 | padding: 100px 0 0; 195 | } 196 | .border.border-danger{ 197 | border: 5px solid #A00000 !important; 198 | opacity: 0.9; 199 | margin: 0 0 20px; 200 | } 201 | .heading{ 202 | font-size: 20px; 203 | margin: 0 0 20px; 204 | display: inline-block; 205 | position: relative; 206 | } 207 | .heading:after{ 208 | content: ""; 209 | background: #A00000; 210 | width: 100%; 211 | height: 2px; 212 | position: absolute; 213 | left: 0; 214 | bottom: -10px; 215 | } 216 | /* MODAL BOX */ 217 | #modal{ 218 | background: rgba(0,0,0,0.7); 219 | position: fixed; 220 | left: 0; 221 | top: 0; 222 | width: 100%; 223 | height: 100%; 224 | z-index: 100; 225 | display: none; 226 | } 227 | #modal-form{ 228 | background: #fff; 229 | width: 30%; 230 | position: relative; 231 | top: 20%; 232 | left: calc(50% - 15%); 233 | padding: 15px; 234 | border-radius: 4px; 235 | } 236 | #modal-form h2{ 237 | margin: 0 0 15px; 238 | padding-bottom: 10px; 239 | border-bottom: 1px solid #000; 240 | display: block; 241 | } 242 | #close-btn{ 243 | background: red; 244 | color: #fff; 245 | width: 30px; 246 | height: 30px; 247 | line-height: 30px; 248 | text-align: center; 249 | border-radius: 50%; 250 | position: absolute; 251 | top: -15px; 252 | right: -15px; 253 | cursor: pointer; 254 | } 255 | 256 | .card-body{ 257 | background: #A00000; 258 | opacity: 0.9; 259 | padding: 40px 20px; 260 | } 261 | 262 | .card-body .card-text{ 263 | color: #fff; 264 | font-size: 40px; 265 | font-weight: 600; 266 | line-height: 40px; 267 | margin: 0 0 10px; 268 | } 269 | .card-body .card-title{ 270 | color: #fff; 271 | } 272 | 273 | #modal-form table tr{ 274 | border-bottom: 1px solid grey; 275 | } 276 | -------------------------------------------------------------------------------- /dashboard.php: -------------------------------------------------------------------------------- 1 | 2 |
3 |
4 |
5 |
6 |

Dashboard

7 |
8 |
9 |
10 |
11 | 0){ 15 | while($row = mysqli_fetch_assoc($result)){ ?> 16 |
17 |
18 |

19 |
Authors Listed
20 |
21 |
22 | 24 |
25 |
26 | 0){ 30 | while($row = mysqli_fetch_assoc($result)){ ?> 31 |
32 |
33 |

34 |
Publishers Listed
35 |
36 |
37 | 39 |
40 |
41 | 0){ 45 | while($row = mysqli_fetch_assoc($result)){ ?> 46 |
47 |
48 |

49 |
Categories Listed
50 |
51 |
52 | 54 |
55 |
56 | 0){ 60 | while($row = mysqli_fetch_assoc($result)){ ?> 61 |
62 |
63 |

64 |
Books Listed
65 |
66 |
67 | 69 |
70 |
71 | 0){ 75 | while($row = mysqli_fetch_assoc($result)){ ?> 76 |
77 |
78 |

79 |
Register Students
80 |
81 |
82 | 84 |
85 |
86 | 0){ 90 | while($row = mysqli_fetch_assoc($result)){ ?> 91 |
92 |
93 |

94 |
Book Issued
95 |
96 |
97 | 99 |
100 |
101 |
102 |
103 | 104 | -------------------------------------------------------------------------------- /date-report.php: -------------------------------------------------------------------------------- 1 | 2 |
3 |
4 |
5 |
6 |

Date Wise Book Issue Report

7 |
8 |
9 |
10 |
11 |
12 |
13 | 14 |
15 | 16 |
17 |
18 |
19 | 0){ ?> 30 |
31 |
32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | $row['return_date']) && $row['issue_status'] == "N"){ 46 | $over = 'style="background:rgba(255,0,0,0.2)"'; 47 | }else{ $over = ''; } ?> 48 | > 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 |
S.NoStudent NameBook NamePhoneEmailIssue DateReturn Date
60 |
61 |
62 | 64 |
65 |
66 | 67 | -------------------------------------------------------------------------------- /delete-author.php: -------------------------------------------------------------------------------- 1 | 0){ 8 | echo "
Cant't delete author record this author is used in books.
"; 9 | }else{ 10 | //delete query 11 | $sql = "DELETE FROM author WHERE author_id = '{$author_id}'"; 12 | 13 | if(mysqli_query($conn, $sql)){ 14 | echo "
Author deleted successfully.
"; 15 | }else{ 16 | echo "
Server side error.
"; 17 | } 18 | } 19 | mysqli_close($conn); 20 | ?> 21 | -------------------------------------------------------------------------------- /delete-book.php: -------------------------------------------------------------------------------- 1 | 0){ 10 | echo "
Cant't delete book record this is used in book issue.
"; 11 | }else{ 12 | //delete query 13 | $sql = "DELETE FROM book WHERE book_id = '{$book_id}'"; 14 | 15 | if(mysqli_query($conn, $sql)){ 16 | echo "
Book record deleted successfully.
"; 17 | }else{ 18 | echo "

Server side error.

"; 19 | } 20 | } 21 | mysqli_close($conn); 22 | ?> 23 | -------------------------------------------------------------------------------- /delete-category.php: -------------------------------------------------------------------------------- 1 | 0){ 9 | echo "
Cant't delete category record this category is used in books.
"; 10 | }else{ 11 | //delete query 12 | $sql = "DELETE FROM category WHERE category_id = '{$category_id}'"; 13 | if(mysqli_query($conn, $sql)){ 14 | echo "
Publisher deleted successfully.
"; 15 | }else{ 16 | echo "

Server side error.

"; 17 | } 18 | } 19 | mysqli_close($conn); 20 | ?> 21 | -------------------------------------------------------------------------------- /delete-issue-book.php: -------------------------------------------------------------------------------- 1 | Cant't delete book issue record.

"; 11 | } 12 | mysqli_close($conn); 13 | ?> 14 | -------------------------------------------------------------------------------- /delete-publisher.php: -------------------------------------------------------------------------------- 1 | 0){ 9 | echo "
Cant't delete publisher record this publisher is used in books.
"; 10 | }else{ 11 | //delete query 12 | $sql = "DELETE FROM publisher WHERE publisher_id = '{$publisher_id}'"; 13 | if(mysqli_query($conn, $sql)){ 14 | echo "
Publisher deleted successfully.
"; 15 | }else{ 16 | echo "

Server side error.

"; 17 | } 18 | } 19 | mysqli_close($conn); 20 | ?> 21 | -------------------------------------------------------------------------------- /delete-student.php: -------------------------------------------------------------------------------- 1 | 0){ 9 | echo "
Cant't delete this student. Book issued to this student.
"; 10 | }else{ 11 | //delete query 12 | $sql = "DELETE FROM student WHERE student_id = '{$student_id}'"; 13 | if(mysqli_query($conn, $sql)){ 14 | echo "
Student deleted successfully.
"; 15 | }else{ 16 | echo "

Server side error.

"; 17 | } 18 | } 19 | mysqli_close($conn); 20 | ?> 21 | -------------------------------------------------------------------------------- /footer.php: -------------------------------------------------------------------------------- 1 | 2 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /header.php: -------------------------------------------------------------------------------- 1 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | Library System 14 | 15 | 16 | 17 | 18 | 40 | 59 | -------------------------------------------------------------------------------- /images/library-img.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/abdullahthewebbee/library-system/5f01240cf0dcbf9423a16292d7c0cb0a3e7d5aa3/images/library-img.png -------------------------------------------------------------------------------- /images/library.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/abdullahthewebbee/library-system/5f01240cf0dcbf9423a16292d7c0cb0a3e7d5aa3/images/library.png -------------------------------------------------------------------------------- /index.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | LOGIN | Library System 6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 |
14 |
15 |
16 | 19 |
20 |

Admin Login

21 |
22 | 23 | 24 |
25 |
26 | 27 | 28 |
29 | 30 |
31 | 0){ 41 | session_start(); //session start 42 | while($row = mysqli_fetch_assoc($result)){ 43 | $_SESSION["username"] = $row['username']; 44 | $_SESSION["user_id"] = $row['id']; 45 | } 46 | header("$base_url/dashboard.php"); // redirect 47 | }else{ 48 | echo "
Username and Password are not matched.
"; 49 | } 50 | } ?> 51 |
52 |
53 |
54 |
55 | 56 | 57 | -------------------------------------------------------------------------------- /js/bootstrap.min.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * Bootstrap v4.0.0 (https://getbootstrap.com) 3 | * Copyright 2011-2018 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) 4 | * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) 5 | */ 6 | !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("jquery"),require("popper.js")):"function"==typeof define&&define.amd?define(["exports","jquery","popper.js"],e):e(t.bootstrap={},t.jQuery,t.Popper)}(this,function(t,e,n){"use strict";function i(t,e){for(var n=0;n0?i:null}catch(t){return null}},reflow:function(t){return t.offsetHeight},triggerTransitionEnd:function(n){t(n).trigger(e.end)},supportsTransitionEnd:function(){return Boolean(e)},isElement:function(t){return(t[0]||t).nodeType},typeCheckConfig:function(t,e,n){for(var s in n)if(Object.prototype.hasOwnProperty.call(n,s)){var r=n[s],o=e[s],a=o&&i.isElement(o)?"element":(l=o,{}.toString.call(l).match(/\s([a-zA-Z]+)/)[1].toLowerCase());if(!new RegExp(r).test(a))throw new Error(t.toUpperCase()+': Option "'+s+'" provided type "'+a+'" but expected type "'+r+'".')}var l}};return e=("undefined"==typeof window||!window.QUnit)&&{end:"transitionend"},t.fn.emulateTransitionEnd=n,i.supportsTransitionEnd()&&(t.event.special[i.TRANSITION_END]={bindType:e.end,delegateType:e.end,handle:function(e){if(t(e.target).is(this))return e.handleObj.handler.apply(this,arguments)}}),i}(e),L=(a="alert",h="."+(l="bs.alert"),c=(o=e).fn[a],u={CLOSE:"close"+h,CLOSED:"closed"+h,CLICK_DATA_API:"click"+h+".data-api"},f="alert",d="fade",_="show",g=function(){function t(t){this._element=t}var e=t.prototype;return e.close=function(t){t=t||this._element;var e=this._getRootElement(t);this._triggerCloseEvent(e).isDefaultPrevented()||this._removeElement(e)},e.dispose=function(){o.removeData(this._element,l),this._element=null},e._getRootElement=function(t){var e=P.getSelectorFromElement(t),n=!1;return e&&(n=o(e)[0]),n||(n=o(t).closest("."+f)[0]),n},e._triggerCloseEvent=function(t){var e=o.Event(u.CLOSE);return o(t).trigger(e),e},e._removeElement=function(t){var e=this;o(t).removeClass(_),P.supportsTransitionEnd()&&o(t).hasClass(d)?o(t).one(P.TRANSITION_END,function(n){return e._destroyElement(t,n)}).emulateTransitionEnd(150):this._destroyElement(t)},e._destroyElement=function(t){o(t).detach().trigger(u.CLOSED).remove()},t._jQueryInterface=function(e){return this.each(function(){var n=o(this),i=n.data(l);i||(i=new t(this),n.data(l,i)),"close"===e&&i[e](this)})},t._handleDismiss=function(t){return function(e){e&&e.preventDefault(),t.close(this)}},s(t,null,[{key:"VERSION",get:function(){return"4.0.0"}}]),t}(),o(document).on(u.CLICK_DATA_API,'[data-dismiss="alert"]',g._handleDismiss(new g)),o.fn[a]=g._jQueryInterface,o.fn[a].Constructor=g,o.fn[a].noConflict=function(){return o.fn[a]=c,g._jQueryInterface},g),R=(m="button",E="."+(v="bs.button"),T=".data-api",y=(p=e).fn[m],C="active",I="btn",A="focus",b='[data-toggle^="button"]',D='[data-toggle="buttons"]',S="input",w=".active",N=".btn",O={CLICK_DATA_API:"click"+E+T,FOCUS_BLUR_DATA_API:"focus"+E+T+" blur"+E+T},k=function(){function t(t){this._element=t}var e=t.prototype;return e.toggle=function(){var t=!0,e=!0,n=p(this._element).closest(D)[0];if(n){var i=p(this._element).find(S)[0];if(i){if("radio"===i.type)if(i.checked&&p(this._element).hasClass(C))t=!1;else{var s=p(n).find(w)[0];s&&p(s).removeClass(C)}if(t){if(i.hasAttribute("disabled")||n.hasAttribute("disabled")||i.classList.contains("disabled")||n.classList.contains("disabled"))return;i.checked=!p(this._element).hasClass(C),p(i).trigger("change")}i.focus(),e=!1}}e&&this._element.setAttribute("aria-pressed",!p(this._element).hasClass(C)),t&&p(this._element).toggleClass(C)},e.dispose=function(){p.removeData(this._element,v),this._element=null},t._jQueryInterface=function(e){return this.each(function(){var n=p(this).data(v);n||(n=new t(this),p(this).data(v,n)),"toggle"===e&&n[e]()})},s(t,null,[{key:"VERSION",get:function(){return"4.0.0"}}]),t}(),p(document).on(O.CLICK_DATA_API,b,function(t){t.preventDefault();var e=t.target;p(e).hasClass(I)||(e=p(e).closest(N)),k._jQueryInterface.call(p(e),"toggle")}).on(O.FOCUS_BLUR_DATA_API,b,function(t){var e=p(t.target).closest(N)[0];p(e).toggleClass(A,/^focus(in)?$/.test(t.type))}),p.fn[m]=k._jQueryInterface,p.fn[m].Constructor=k,p.fn[m].noConflict=function(){return p.fn[m]=y,k._jQueryInterface},k),j=function(t){var e="carousel",n="bs.carousel",i="."+n,o=t.fn[e],a={interval:5e3,keyboard:!0,slide:!1,pause:"hover",wrap:!0},l={interval:"(number|boolean)",keyboard:"boolean",slide:"(boolean|string)",pause:"(string|boolean)",wrap:"boolean"},h="next",c="prev",u="left",f="right",d={SLIDE:"slide"+i,SLID:"slid"+i,KEYDOWN:"keydown"+i,MOUSEENTER:"mouseenter"+i,MOUSELEAVE:"mouseleave"+i,TOUCHEND:"touchend"+i,LOAD_DATA_API:"load"+i+".data-api",CLICK_DATA_API:"click"+i+".data-api"},_="carousel",g="active",p="slide",m="carousel-item-right",v="carousel-item-left",E="carousel-item-next",T="carousel-item-prev",y={ACTIVE:".active",ACTIVE_ITEM:".active.carousel-item",ITEM:".carousel-item",NEXT_PREV:".carousel-item-next, .carousel-item-prev",INDICATORS:".carousel-indicators",DATA_SLIDE:"[data-slide], [data-slide-to]",DATA_RIDE:'[data-ride="carousel"]'},C=function(){function o(e,n){this._items=null,this._interval=null,this._activeElement=null,this._isPaused=!1,this._isSliding=!1,this.touchTimeout=null,this._config=this._getConfig(n),this._element=t(e)[0],this._indicatorsElement=t(this._element).find(y.INDICATORS)[0],this._addEventListeners()}var C=o.prototype;return C.next=function(){this._isSliding||this._slide(h)},C.nextWhenVisible=function(){!document.hidden&&t(this._element).is(":visible")&&"hidden"!==t(this._element).css("visibility")&&this.next()},C.prev=function(){this._isSliding||this._slide(c)},C.pause=function(e){e||(this._isPaused=!0),t(this._element).find(y.NEXT_PREV)[0]&&P.supportsTransitionEnd()&&(P.triggerTransitionEnd(this._element),this.cycle(!0)),clearInterval(this._interval),this._interval=null},C.cycle=function(t){t||(this._isPaused=!1),this._interval&&(clearInterval(this._interval),this._interval=null),this._config.interval&&!this._isPaused&&(this._interval=setInterval((document.visibilityState?this.nextWhenVisible:this.next).bind(this),this._config.interval))},C.to=function(e){var n=this;this._activeElement=t(this._element).find(y.ACTIVE_ITEM)[0];var i=this._getItemIndex(this._activeElement);if(!(e>this._items.length-1||e<0))if(this._isSliding)t(this._element).one(d.SLID,function(){return n.to(e)});else{if(i===e)return this.pause(),void this.cycle();var s=e>i?h:c;this._slide(s,this._items[e])}},C.dispose=function(){t(this._element).off(i),t.removeData(this._element,n),this._items=null,this._config=null,this._element=null,this._interval=null,this._isPaused=null,this._isSliding=null,this._activeElement=null,this._indicatorsElement=null},C._getConfig=function(t){return t=r({},a,t),P.typeCheckConfig(e,t,l),t},C._addEventListeners=function(){var e=this;this._config.keyboard&&t(this._element).on(d.KEYDOWN,function(t){return e._keydown(t)}),"hover"===this._config.pause&&(t(this._element).on(d.MOUSEENTER,function(t){return e.pause(t)}).on(d.MOUSELEAVE,function(t){return e.cycle(t)}),"ontouchstart"in document.documentElement&&t(this._element).on(d.TOUCHEND,function(){e.pause(),e.touchTimeout&&clearTimeout(e.touchTimeout),e.touchTimeout=setTimeout(function(t){return e.cycle(t)},500+e._config.interval)}))},C._keydown=function(t){if(!/input|textarea/i.test(t.target.tagName))switch(t.which){case 37:t.preventDefault(),this.prev();break;case 39:t.preventDefault(),this.next()}},C._getItemIndex=function(e){return this._items=t.makeArray(t(e).parent().find(y.ITEM)),this._items.indexOf(e)},C._getItemByDirection=function(t,e){var n=t===h,i=t===c,s=this._getItemIndex(e),r=this._items.length-1;if((i&&0===s||n&&s===r)&&!this._config.wrap)return e;var o=(s+(t===c?-1:1))%this._items.length;return-1===o?this._items[this._items.length-1]:this._items[o]},C._triggerSlideEvent=function(e,n){var i=this._getItemIndex(e),s=this._getItemIndex(t(this._element).find(y.ACTIVE_ITEM)[0]),r=t.Event(d.SLIDE,{relatedTarget:e,direction:n,from:s,to:i});return t(this._element).trigger(r),r},C._setActiveIndicatorElement=function(e){if(this._indicatorsElement){t(this._indicatorsElement).find(y.ACTIVE).removeClass(g);var n=this._indicatorsElement.children[this._getItemIndex(e)];n&&t(n).addClass(g)}},C._slide=function(e,n){var i,s,r,o=this,a=t(this._element).find(y.ACTIVE_ITEM)[0],l=this._getItemIndex(a),c=n||a&&this._getItemByDirection(e,a),_=this._getItemIndex(c),C=Boolean(this._interval);if(e===h?(i=v,s=E,r=u):(i=m,s=T,r=f),c&&t(c).hasClass(g))this._isSliding=!1;else if(!this._triggerSlideEvent(c,r).isDefaultPrevented()&&a&&c){this._isSliding=!0,C&&this.pause(),this._setActiveIndicatorElement(c);var I=t.Event(d.SLID,{relatedTarget:c,direction:r,from:l,to:_});P.supportsTransitionEnd()&&t(this._element).hasClass(p)?(t(c).addClass(s),P.reflow(c),t(a).addClass(i),t(c).addClass(i),t(a).one(P.TRANSITION_END,function(){t(c).removeClass(i+" "+s).addClass(g),t(a).removeClass(g+" "+s+" "+i),o._isSliding=!1,setTimeout(function(){return t(o._element).trigger(I)},0)}).emulateTransitionEnd(600)):(t(a).removeClass(g),t(c).addClass(g),this._isSliding=!1,t(this._element).trigger(I)),C&&this.cycle()}},o._jQueryInterface=function(e){return this.each(function(){var i=t(this).data(n),s=r({},a,t(this).data());"object"==typeof e&&(s=r({},s,e));var l="string"==typeof e?e:s.slide;if(i||(i=new o(this,s),t(this).data(n,i)),"number"==typeof e)i.to(e);else if("string"==typeof l){if("undefined"==typeof i[l])throw new TypeError('No method named "'+l+'"');i[l]()}else s.interval&&(i.pause(),i.cycle())})},o._dataApiClickHandler=function(e){var i=P.getSelectorFromElement(this);if(i){var s=t(i)[0];if(s&&t(s).hasClass(_)){var a=r({},t(s).data(),t(this).data()),l=this.getAttribute("data-slide-to");l&&(a.interval=!1),o._jQueryInterface.call(t(s),a),l&&t(s).data(n).to(l),e.preventDefault()}}},s(o,null,[{key:"VERSION",get:function(){return"4.0.0"}},{key:"Default",get:function(){return a}}]),o}();return t(document).on(d.CLICK_DATA_API,y.DATA_SLIDE,C._dataApiClickHandler),t(window).on(d.LOAD_DATA_API,function(){t(y.DATA_RIDE).each(function(){var e=t(this);C._jQueryInterface.call(e,e.data())})}),t.fn[e]=C._jQueryInterface,t.fn[e].Constructor=C,t.fn[e].noConflict=function(){return t.fn[e]=o,C._jQueryInterface},C}(e),H=function(t){var e="collapse",n="bs.collapse",i="."+n,o=t.fn[e],a={toggle:!0,parent:""},l={toggle:"boolean",parent:"(string|element)"},h={SHOW:"show"+i,SHOWN:"shown"+i,HIDE:"hide"+i,HIDDEN:"hidden"+i,CLICK_DATA_API:"click"+i+".data-api"},c="show",u="collapse",f="collapsing",d="collapsed",_="width",g="height",p={ACTIVES:".show, .collapsing",DATA_TOGGLE:'[data-toggle="collapse"]'},m=function(){function i(e,n){this._isTransitioning=!1,this._element=e,this._config=this._getConfig(n),this._triggerArray=t.makeArray(t('[data-toggle="collapse"][href="#'+e.id+'"],[data-toggle="collapse"][data-target="#'+e.id+'"]'));for(var i=t(p.DATA_TOGGLE),s=0;s0&&(this._selector=o,this._triggerArray.push(r))}this._parent=this._config.parent?this._getParent():null,this._config.parent||this._addAriaAndCollapsedClass(this._element,this._triggerArray),this._config.toggle&&this.toggle()}var o=i.prototype;return o.toggle=function(){t(this._element).hasClass(c)?this.hide():this.show()},o.show=function(){var e,s,r=this;if(!this._isTransitioning&&!t(this._element).hasClass(c)&&(this._parent&&0===(e=t.makeArray(t(this._parent).find(p.ACTIVES).filter('[data-parent="'+this._config.parent+'"]'))).length&&(e=null),!(e&&(s=t(e).not(this._selector).data(n))&&s._isTransitioning))){var o=t.Event(h.SHOW);if(t(this._element).trigger(o),!o.isDefaultPrevented()){e&&(i._jQueryInterface.call(t(e).not(this._selector),"hide"),s||t(e).data(n,null));var a=this._getDimension();t(this._element).removeClass(u).addClass(f),this._element.style[a]=0,this._triggerArray.length>0&&t(this._triggerArray).removeClass(d).attr("aria-expanded",!0),this.setTransitioning(!0);var l=function(){t(r._element).removeClass(f).addClass(u).addClass(c),r._element.style[a]="",r.setTransitioning(!1),t(r._element).trigger(h.SHOWN)};if(P.supportsTransitionEnd()){var _="scroll"+(a[0].toUpperCase()+a.slice(1));t(this._element).one(P.TRANSITION_END,l).emulateTransitionEnd(600),this._element.style[a]=this._element[_]+"px"}else l()}}},o.hide=function(){var e=this;if(!this._isTransitioning&&t(this._element).hasClass(c)){var n=t.Event(h.HIDE);if(t(this._element).trigger(n),!n.isDefaultPrevented()){var i=this._getDimension();if(this._element.style[i]=this._element.getBoundingClientRect()[i]+"px",P.reflow(this._element),t(this._element).addClass(f).removeClass(u).removeClass(c),this._triggerArray.length>0)for(var s=0;s0&&t(n).toggleClass(d,!i).attr("aria-expanded",i)}},i._getTargetFromElement=function(e){var n=P.getSelectorFromElement(e);return n?t(n)[0]:null},i._jQueryInterface=function(e){return this.each(function(){var s=t(this),o=s.data(n),l=r({},a,s.data(),"object"==typeof e&&e);if(!o&&l.toggle&&/show|hide/.test(e)&&(l.toggle=!1),o||(o=new i(this,l),s.data(n,o)),"string"==typeof e){if("undefined"==typeof o[e])throw new TypeError('No method named "'+e+'"');o[e]()}})},s(i,null,[{key:"VERSION",get:function(){return"4.0.0"}},{key:"Default",get:function(){return a}}]),i}();return t(document).on(h.CLICK_DATA_API,p.DATA_TOGGLE,function(e){"A"===e.currentTarget.tagName&&e.preventDefault();var i=t(this),s=P.getSelectorFromElement(this);t(s).each(function(){var e=t(this),s=e.data(n)?"toggle":i.data();m._jQueryInterface.call(e,s)})}),t.fn[e]=m._jQueryInterface,t.fn[e].Constructor=m,t.fn[e].noConflict=function(){return t.fn[e]=o,m._jQueryInterface},m}(e),W=function(t){var e="dropdown",i="bs.dropdown",o="."+i,a=".data-api",l=t.fn[e],h=new RegExp("38|40|27"),c={HIDE:"hide"+o,HIDDEN:"hidden"+o,SHOW:"show"+o,SHOWN:"shown"+o,CLICK:"click"+o,CLICK_DATA_API:"click"+o+a,KEYDOWN_DATA_API:"keydown"+o+a,KEYUP_DATA_API:"keyup"+o+a},u="disabled",f="show",d="dropup",_="dropright",g="dropleft",p="dropdown-menu-right",m="dropdown-menu-left",v="position-static",E='[data-toggle="dropdown"]',T=".dropdown form",y=".dropdown-menu",C=".navbar-nav",I=".dropdown-menu .dropdown-item:not(.disabled)",A="top-start",b="top-end",D="bottom-start",S="bottom-end",w="right-start",N="left-start",O={offset:0,flip:!0,boundary:"scrollParent"},k={offset:"(number|string|function)",flip:"boolean",boundary:"(string|element)"},L=function(){function a(t,e){this._element=t,this._popper=null,this._config=this._getConfig(e),this._menu=this._getMenuElement(),this._inNavbar=this._detectNavbar(),this._addEventListeners()}var l=a.prototype;return l.toggle=function(){if(!this._element.disabled&&!t(this._element).hasClass(u)){var e=a._getParentFromElement(this._element),i=t(this._menu).hasClass(f);if(a._clearMenus(),!i){var s={relatedTarget:this._element},r=t.Event(c.SHOW,s);if(t(e).trigger(r),!r.isDefaultPrevented()){if(!this._inNavbar){if("undefined"==typeof n)throw new TypeError("Bootstrap dropdown require Popper.js (https://popper.js.org)");var o=this._element;t(e).hasClass(d)&&(t(this._menu).hasClass(m)||t(this._menu).hasClass(p))&&(o=e),"scrollParent"!==this._config.boundary&&t(e).addClass(v),this._popper=new n(o,this._menu,this._getPopperConfig())}"ontouchstart"in document.documentElement&&0===t(e).closest(C).length&&t("body").children().on("mouseover",null,t.noop),this._element.focus(),this._element.setAttribute("aria-expanded",!0),t(this._menu).toggleClass(f),t(e).toggleClass(f).trigger(t.Event(c.SHOWN,s))}}}},l.dispose=function(){t.removeData(this._element,i),t(this._element).off(o),this._element=null,this._menu=null,null!==this._popper&&(this._popper.destroy(),this._popper=null)},l.update=function(){this._inNavbar=this._detectNavbar(),null!==this._popper&&this._popper.scheduleUpdate()},l._addEventListeners=function(){var e=this;t(this._element).on(c.CLICK,function(t){t.preventDefault(),t.stopPropagation(),e.toggle()})},l._getConfig=function(n){return n=r({},this.constructor.Default,t(this._element).data(),n),P.typeCheckConfig(e,n,this.constructor.DefaultType),n},l._getMenuElement=function(){if(!this._menu){var e=a._getParentFromElement(this._element);this._menu=t(e).find(y)[0]}return this._menu},l._getPlacement=function(){var e=t(this._element).parent(),n=D;return e.hasClass(d)?(n=A,t(this._menu).hasClass(p)&&(n=b)):e.hasClass(_)?n=w:e.hasClass(g)?n=N:t(this._menu).hasClass(p)&&(n=S),n},l._detectNavbar=function(){return t(this._element).closest(".navbar").length>0},l._getPopperConfig=function(){var t=this,e={};return"function"==typeof this._config.offset?e.fn=function(e){return e.offsets=r({},e.offsets,t._config.offset(e.offsets)||{}),e}:e.offset=this._config.offset,{placement:this._getPlacement(),modifiers:{offset:e,flip:{enabled:this._config.flip},preventOverflow:{boundariesElement:this._config.boundary}}}},a._jQueryInterface=function(e){return this.each(function(){var n=t(this).data(i);if(n||(n=new a(this,"object"==typeof e?e:null),t(this).data(i,n)),"string"==typeof e){if("undefined"==typeof n[e])throw new TypeError('No method named "'+e+'"');n[e]()}})},a._clearMenus=function(e){if(!e||3!==e.which&&("keyup"!==e.type||9===e.which))for(var n=t.makeArray(t(E)),s=0;s0&&r--,40===e.which&&rdocument.documentElement.clientHeight;!this._isBodyOverflowing&&t&&(this._element.style.paddingLeft=this._scrollbarWidth+"px"),this._isBodyOverflowing&&!t&&(this._element.style.paddingRight=this._scrollbarWidth+"px")},p._resetAdjustments=function(){this._element.style.paddingLeft="",this._element.style.paddingRight=""},p._checkScrollbar=function(){var t=document.body.getBoundingClientRect();this._isBodyOverflowing=t.left+t.right
',trigger:"hover focus",title:"",delay:0,html:!1,selector:!1,placement:"top",offset:0,container:!1,fallbackPlacement:"flip",boundary:"scrollParent"},f="show",d="out",_={HIDE:"hide"+o,HIDDEN:"hidden"+o,SHOW:"show"+o,SHOWN:"shown"+o,INSERTED:"inserted"+o,CLICK:"click"+o,FOCUSIN:"focusin"+o,FOCUSOUT:"focusout"+o,MOUSEENTER:"mouseenter"+o,MOUSELEAVE:"mouseleave"+o},g="fade",p="show",m=".tooltip-inner",v=".arrow",E="hover",T="focus",y="click",C="manual",I=function(){function a(t,e){if("undefined"==typeof n)throw new TypeError("Bootstrap tooltips require Popper.js (https://popper.js.org)");this._isEnabled=!0,this._timeout=0,this._hoverState="",this._activeTrigger={},this._popper=null,this.element=t,this.config=this._getConfig(e),this.tip=null,this._setListeners()}var I=a.prototype;return I.enable=function(){this._isEnabled=!0},I.disable=function(){this._isEnabled=!1},I.toggleEnabled=function(){this._isEnabled=!this._isEnabled},I.toggle=function(e){if(this._isEnabled)if(e){var n=this.constructor.DATA_KEY,i=t(e.currentTarget).data(n);i||(i=new this.constructor(e.currentTarget,this._getDelegateConfig()),t(e.currentTarget).data(n,i)),i._activeTrigger.click=!i._activeTrigger.click,i._isWithActiveTrigger()?i._enter(null,i):i._leave(null,i)}else{if(t(this.getTipElement()).hasClass(p))return void this._leave(null,this);this._enter(null,this)}},I.dispose=function(){clearTimeout(this._timeout),t.removeData(this.element,this.constructor.DATA_KEY),t(this.element).off(this.constructor.EVENT_KEY),t(this.element).closest(".modal").off("hide.bs.modal"),this.tip&&t(this.tip).remove(),this._isEnabled=null,this._timeout=null,this._hoverState=null,this._activeTrigger=null,null!==this._popper&&this._popper.destroy(),this._popper=null,this.element=null,this.config=null,this.tip=null},I.show=function(){var e=this;if("none"===t(this.element).css("display"))throw new Error("Please use show on visible elements");var i=t.Event(this.constructor.Event.SHOW);if(this.isWithContent()&&this._isEnabled){t(this.element).trigger(i);var s=t.contains(this.element.ownerDocument.documentElement,this.element);if(i.isDefaultPrevented()||!s)return;var r=this.getTipElement(),o=P.getUID(this.constructor.NAME);r.setAttribute("id",o),this.element.setAttribute("aria-describedby",o),this.setContent(),this.config.animation&&t(r).addClass(g);var l="function"==typeof this.config.placement?this.config.placement.call(this,r,this.element):this.config.placement,h=this._getAttachment(l);this.addAttachmentClass(h);var c=!1===this.config.container?document.body:t(this.config.container);t(r).data(this.constructor.DATA_KEY,this),t.contains(this.element.ownerDocument.documentElement,this.tip)||t(r).appendTo(c),t(this.element).trigger(this.constructor.Event.INSERTED),this._popper=new n(this.element,r,{placement:h,modifiers:{offset:{offset:this.config.offset},flip:{behavior:this.config.fallbackPlacement},arrow:{element:v},preventOverflow:{boundariesElement:this.config.boundary}},onCreate:function(t){t.originalPlacement!==t.placement&&e._handlePopperPlacementChange(t)},onUpdate:function(t){e._handlePopperPlacementChange(t)}}),t(r).addClass(p),"ontouchstart"in document.documentElement&&t("body").children().on("mouseover",null,t.noop);var u=function(){e.config.animation&&e._fixTransition();var n=e._hoverState;e._hoverState=null,t(e.element).trigger(e.constructor.Event.SHOWN),n===d&&e._leave(null,e)};P.supportsTransitionEnd()&&t(this.tip).hasClass(g)?t(this.tip).one(P.TRANSITION_END,u).emulateTransitionEnd(a._TRANSITION_DURATION):u()}},I.hide=function(e){var n=this,i=this.getTipElement(),s=t.Event(this.constructor.Event.HIDE),r=function(){n._hoverState!==f&&i.parentNode&&i.parentNode.removeChild(i),n._cleanTipClass(),n.element.removeAttribute("aria-describedby"),t(n.element).trigger(n.constructor.Event.HIDDEN),null!==n._popper&&n._popper.destroy(),e&&e()};t(this.element).trigger(s),s.isDefaultPrevented()||(t(i).removeClass(p),"ontouchstart"in document.documentElement&&t("body").children().off("mouseover",null,t.noop),this._activeTrigger[y]=!1,this._activeTrigger[T]=!1,this._activeTrigger[E]=!1,P.supportsTransitionEnd()&&t(this.tip).hasClass(g)?t(i).one(P.TRANSITION_END,r).emulateTransitionEnd(150):r(),this._hoverState="")},I.update=function(){null!==this._popper&&this._popper.scheduleUpdate()},I.isWithContent=function(){return Boolean(this.getTitle())},I.addAttachmentClass=function(e){t(this.getTipElement()).addClass("bs-tooltip-"+e)},I.getTipElement=function(){return this.tip=this.tip||t(this.config.template)[0],this.tip},I.setContent=function(){var e=t(this.getTipElement());this.setElementContent(e.find(m),this.getTitle()),e.removeClass(g+" "+p)},I.setElementContent=function(e,n){var i=this.config.html;"object"==typeof n&&(n.nodeType||n.jquery)?i?t(n).parent().is(e)||e.empty().append(n):e.text(t(n).text()):e[i?"html":"text"](n)},I.getTitle=function(){var t=this.element.getAttribute("data-original-title");return t||(t="function"==typeof this.config.title?this.config.title.call(this.element):this.config.title),t},I._getAttachment=function(t){return c[t.toUpperCase()]},I._setListeners=function(){var e=this;this.config.trigger.split(" ").forEach(function(n){if("click"===n)t(e.element).on(e.constructor.Event.CLICK,e.config.selector,function(t){return e.toggle(t)});else if(n!==C){var i=n===E?e.constructor.Event.MOUSEENTER:e.constructor.Event.FOCUSIN,s=n===E?e.constructor.Event.MOUSELEAVE:e.constructor.Event.FOCUSOUT;t(e.element).on(i,e.config.selector,function(t){return e._enter(t)}).on(s,e.config.selector,function(t){return e._leave(t)})}t(e.element).closest(".modal").on("hide.bs.modal",function(){return e.hide()})}),this.config.selector?this.config=r({},this.config,{trigger:"manual",selector:""}):this._fixTitle()},I._fixTitle=function(){var t=typeof this.element.getAttribute("data-original-title");(this.element.getAttribute("title")||"string"!==t)&&(this.element.setAttribute("data-original-title",this.element.getAttribute("title")||""),this.element.setAttribute("title",""))},I._enter=function(e,n){var i=this.constructor.DATA_KEY;(n=n||t(e.currentTarget).data(i))||(n=new this.constructor(e.currentTarget,this._getDelegateConfig()),t(e.currentTarget).data(i,n)),e&&(n._activeTrigger["focusin"===e.type?T:E]=!0),t(n.getTipElement()).hasClass(p)||n._hoverState===f?n._hoverState=f:(clearTimeout(n._timeout),n._hoverState=f,n.config.delay&&n.config.delay.show?n._timeout=setTimeout(function(){n._hoverState===f&&n.show()},n.config.delay.show):n.show())},I._leave=function(e,n){var i=this.constructor.DATA_KEY;(n=n||t(e.currentTarget).data(i))||(n=new this.constructor(e.currentTarget,this._getDelegateConfig()),t(e.currentTarget).data(i,n)),e&&(n._activeTrigger["focusout"===e.type?T:E]=!1),n._isWithActiveTrigger()||(clearTimeout(n._timeout),n._hoverState=d,n.config.delay&&n.config.delay.hide?n._timeout=setTimeout(function(){n._hoverState===d&&n.hide()},n.config.delay.hide):n.hide())},I._isWithActiveTrigger=function(){for(var t in this._activeTrigger)if(this._activeTrigger[t])return!0;return!1},I._getConfig=function(n){return"number"==typeof(n=r({},this.constructor.Default,t(this.element).data(),n)).delay&&(n.delay={show:n.delay,hide:n.delay}),"number"==typeof n.title&&(n.title=n.title.toString()),"number"==typeof n.content&&(n.content=n.content.toString()),P.typeCheckConfig(e,n,this.constructor.DefaultType),n},I._getDelegateConfig=function(){var t={};if(this.config)for(var e in this.config)this.constructor.Default[e]!==this.config[e]&&(t[e]=this.config[e]);return t},I._cleanTipClass=function(){var e=t(this.getTipElement()),n=e.attr("class").match(l);null!==n&&n.length>0&&e.removeClass(n.join(""))},I._handlePopperPlacementChange=function(t){this._cleanTipClass(),this.addAttachmentClass(this._getAttachment(t.placement))},I._fixTransition=function(){var e=this.getTipElement(),n=this.config.animation;null===e.getAttribute("x-placement")&&(t(e).removeClass(g),this.config.animation=!1,this.hide(),this.show(),this.config.animation=n)},a._jQueryInterface=function(e){return this.each(function(){var n=t(this).data(i),s="object"==typeof e&&e;if((n||!/dispose|hide/.test(e))&&(n||(n=new a(this,s),t(this).data(i,n)),"string"==typeof e)){if("undefined"==typeof n[e])throw new TypeError('No method named "'+e+'"');n[e]()}})},s(a,null,[{key:"VERSION",get:function(){return"4.0.0"}},{key:"Default",get:function(){return u}},{key:"NAME",get:function(){return e}},{key:"DATA_KEY",get:function(){return i}},{key:"Event",get:function(){return _}},{key:"EVENT_KEY",get:function(){return o}},{key:"DefaultType",get:function(){return h}}]),a}();return t.fn[e]=I._jQueryInterface,t.fn[e].Constructor=I,t.fn[e].noConflict=function(){return t.fn[e]=a,I._jQueryInterface},I}(e),x=function(t){var e="popover",n="bs.popover",i="."+n,o=t.fn[e],a=new RegExp("(^|\\s)bs-popover\\S+","g"),l=r({},U.Default,{placement:"right",trigger:"click",content:"",template:''}),h=r({},U.DefaultType,{content:"(string|element|function)"}),c="fade",u="show",f=".popover-header",d=".popover-body",_={HIDE:"hide"+i,HIDDEN:"hidden"+i,SHOW:"show"+i,SHOWN:"shown"+i,INSERTED:"inserted"+i,CLICK:"click"+i,FOCUSIN:"focusin"+i,FOCUSOUT:"focusout"+i,MOUSEENTER:"mouseenter"+i,MOUSELEAVE:"mouseleave"+i},g=function(r){var o,g;function p(){return r.apply(this,arguments)||this}g=r,(o=p).prototype=Object.create(g.prototype),o.prototype.constructor=o,o.__proto__=g;var m=p.prototype;return m.isWithContent=function(){return this.getTitle()||this._getContent()},m.addAttachmentClass=function(e){t(this.getTipElement()).addClass("bs-popover-"+e)},m.getTipElement=function(){return this.tip=this.tip||t(this.config.template)[0],this.tip},m.setContent=function(){var e=t(this.getTipElement());this.setElementContent(e.find(f),this.getTitle());var n=this._getContent();"function"==typeof n&&(n=n.call(this.element)),this.setElementContent(e.find(d),n),e.removeClass(c+" "+u)},m._getContent=function(){return this.element.getAttribute("data-content")||this.config.content},m._cleanTipClass=function(){var e=t(this.getTipElement()),n=e.attr("class").match(a);null!==n&&n.length>0&&e.removeClass(n.join(""))},p._jQueryInterface=function(e){return this.each(function(){var i=t(this).data(n),s="object"==typeof e?e:null;if((i||!/destroy|hide/.test(e))&&(i||(i=new p(this,s),t(this).data(n,i)),"string"==typeof e)){if("undefined"==typeof i[e])throw new TypeError('No method named "'+e+'"');i[e]()}})},s(p,null,[{key:"VERSION",get:function(){return"4.0.0"}},{key:"Default",get:function(){return l}},{key:"NAME",get:function(){return e}},{key:"DATA_KEY",get:function(){return n}},{key:"Event",get:function(){return _}},{key:"EVENT_KEY",get:function(){return i}},{key:"DefaultType",get:function(){return h}}]),p}(U);return t.fn[e]=g._jQueryInterface,t.fn[e].Constructor=g,t.fn[e].noConflict=function(){return t.fn[e]=o,g._jQueryInterface},g}(e),K=function(t){var e="scrollspy",n="bs.scrollspy",i="."+n,o=t.fn[e],a={offset:10,method:"auto",target:""},l={offset:"number",method:"string",target:"(string|element)"},h={ACTIVATE:"activate"+i,SCROLL:"scroll"+i,LOAD_DATA_API:"load"+i+".data-api"},c="dropdown-item",u="active",f={DATA_SPY:'[data-spy="scroll"]',ACTIVE:".active",NAV_LIST_GROUP:".nav, .list-group",NAV_LINKS:".nav-link",NAV_ITEMS:".nav-item",LIST_ITEMS:".list-group-item",DROPDOWN:".dropdown",DROPDOWN_ITEMS:".dropdown-item",DROPDOWN_TOGGLE:".dropdown-toggle"},d="offset",_="position",g=function(){function o(e,n){var i=this;this._element=e,this._scrollElement="BODY"===e.tagName?window:e,this._config=this._getConfig(n),this._selector=this._config.target+" "+f.NAV_LINKS+","+this._config.target+" "+f.LIST_ITEMS+","+this._config.target+" "+f.DROPDOWN_ITEMS,this._offsets=[],this._targets=[],this._activeTarget=null,this._scrollHeight=0,t(this._scrollElement).on(h.SCROLL,function(t){return i._process(t)}),this.refresh(),this._process()}var g=o.prototype;return g.refresh=function(){var e=this,n=this._scrollElement===this._scrollElement.window?d:_,i="auto"===this._config.method?n:this._config.method,s=i===_?this._getScrollTop():0;this._offsets=[],this._targets=[],this._scrollHeight=this._getScrollHeight(),t.makeArray(t(this._selector)).map(function(e){var n,r=P.getSelectorFromElement(e);if(r&&(n=t(r)[0]),n){var o=n.getBoundingClientRect();if(o.width||o.height)return[t(n)[i]().top+s,r]}return null}).filter(function(t){return t}).sort(function(t,e){return t[0]-e[0]}).forEach(function(t){e._offsets.push(t[0]),e._targets.push(t[1])})},g.dispose=function(){t.removeData(this._element,n),t(this._scrollElement).off(i),this._element=null,this._scrollElement=null,this._config=null,this._selector=null,this._offsets=null,this._targets=null,this._activeTarget=null,this._scrollHeight=null},g._getConfig=function(n){if("string"!=typeof(n=r({},a,n)).target){var i=t(n.target).attr("id");i||(i=P.getUID(e),t(n.target).attr("id",i)),n.target="#"+i}return P.typeCheckConfig(e,n,l),n},g._getScrollTop=function(){return this._scrollElement===window?this._scrollElement.pageYOffset:this._scrollElement.scrollTop},g._getScrollHeight=function(){return this._scrollElement.scrollHeight||Math.max(document.body.scrollHeight,document.documentElement.scrollHeight)},g._getOffsetHeight=function(){return this._scrollElement===window?window.innerHeight:this._scrollElement.getBoundingClientRect().height},g._process=function(){var t=this._getScrollTop()+this._config.offset,e=this._getScrollHeight(),n=this._config.offset+e-this._getOffsetHeight();if(this._scrollHeight!==e&&this.refresh(),t>=n){var i=this._targets[this._targets.length-1];this._activeTarget!==i&&this._activate(i)}else{if(this._activeTarget&&t0)return this._activeTarget=null,void this._clear();for(var s=this._offsets.length;s--;){this._activeTarget!==this._targets[s]&&t>=this._offsets[s]&&("undefined"==typeof this._offsets[s+1]||t=4)throw new Error("Bootstrap's JavaScript requires at least jQuery v1.9.1 but less than v4.0.0")}(e),t.Util=P,t.Alert=L,t.Button=R,t.Carousel=j,t.Collapse=H,t.Dropdown=W,t.Modal=M,t.Popover=x,t.Scrollspy=K,t.Tab=V,t.Tooltip=U,Object.defineProperty(t,"__esModule",{value:!0})}); 7 | //# sourceMappingURL=bootstrap.min.js.map 8 | -------------------------------------------------------------------------------- /js/popper.min.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) Federico Zivolo 2017 3 | Distributed under the MIT License (license terms are at http://opensource.org/licenses/MIT). 4 | */(function(e,t){'object'==typeof exports&&'undefined'!=typeof module?module.exports=t():'function'==typeof define&&define.amd?define(t):e.Popper=t()})(this,function(){'use strict';function e(e){return e&&'[object Function]'==={}.toString.call(e)}function t(e,t){if(1!==e.nodeType)return[];var o=getComputedStyle(e,null);return t?o[t]:o}function o(e){return'HTML'===e.nodeName?e:e.parentNode||e.host}function n(e){if(!e)return document.body;switch(e.nodeName){case'HTML':case'BODY':return e.ownerDocument.body;case'#document':return e.body;}var i=t(e),r=i.overflow,p=i.overflowX,s=i.overflowY;return /(auto|scroll)/.test(r+s+p)?e:n(o(e))}function r(e){var o=e&&e.offsetParent,i=o&&o.nodeName;return i&&'BODY'!==i&&'HTML'!==i?-1!==['TD','TABLE'].indexOf(o.nodeName)&&'static'===t(o,'position')?r(o):o:e?e.ownerDocument.documentElement:document.documentElement}function p(e){var t=e.nodeName;return'BODY'!==t&&('HTML'===t||r(e.firstElementChild)===e)}function s(e){return null===e.parentNode?e:s(e.parentNode)}function d(e,t){if(!e||!e.nodeType||!t||!t.nodeType)return document.documentElement;var o=e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_FOLLOWING,i=o?e:t,n=o?t:e,a=document.createRange();a.setStart(i,0),a.setEnd(n,0);var l=a.commonAncestorContainer;if(e!==l&&t!==l||i.contains(n))return p(l)?l:r(l);var f=s(e);return f.host?d(f.host,t):d(e,s(t).host)}function a(e){var t=1=o.clientWidth&&i>=o.clientHeight}),l=0i[e]&&!t.escapeWithReference&&(n=_(p[o],i[e]-('right'===e?p.width:p.height))),pe({},o,n)}};return n.forEach(function(e){var t=-1===['left','top'].indexOf(e)?'secondary':'primary';p=se({},p,s[t](e))}),e.offsets.popper=p,e},priority:['left','right','top','bottom'],padding:5,boundariesElement:'scrollParent'},keepTogether:{order:400,enabled:!0,fn:function(e){var t=e.offsets,o=t.popper,i=t.reference,n=e.placement.split('-')[0],r=X,p=-1!==['top','bottom'].indexOf(n),s=p?'right':'bottom',d=p?'left':'top',a=p?'width':'height';return o[s]r(i[s])&&(e.offsets.popper[d]=r(i[s])),e}},arrow:{order:500,enabled:!0,fn:function(e,o){var i;if(!F(e.instance.modifiers,'arrow','keepTogether'))return e;var n=o.element;if('string'==typeof n){if(n=e.instance.popper.querySelector(n),!n)return e;}else if(!e.instance.popper.contains(n))return console.warn('WARNING: `arrow.element` must be child of its popper element!'),e;var r=e.placement.split('-')[0],p=e.offsets,s=p.popper,d=p.reference,a=-1!==['left','right'].indexOf(r),l=a?'height':'width',f=a?'Top':'Left',m=f.toLowerCase(),h=a?'left':'top',g=a?'bottom':'right',u=L(n)[l];d[g]-us[g]&&(e.offsets.popper[m]+=d[m]+u-s[g]),e.offsets.popper=c(e.offsets.popper);var b=d[m]+d[l]/2-u/2,w=t(e.instance.popper),y=parseFloat(w['margin'+f],10),E=parseFloat(w['border'+f+'Width'],10),v=b-e.offsets.popper[m]-y-E;return v=J(_(s[l]-u,v),0),e.arrowElement=n,e.offsets.arrow=(i={},pe(i,m,Math.round(v)),pe(i,h,''),i),e},element:'[x-arrow]'},flip:{order:600,enabled:!0,fn:function(e,t){if(k(e.instance.modifiers,'inner'))return e;if(e.flipped&&e.placement===e.originalPlacement)return e;var o=y(e.instance.popper,e.instance.reference,t.padding,t.boundariesElement),i=e.placement.split('-')[0],n=x(i),r=e.placement.split('-')[1]||'',p=[];switch(t.behavior){case le.FLIP:p=[i,n];break;case le.CLOCKWISE:p=q(i);break;case le.COUNTERCLOCKWISE:p=q(i,!0);break;default:p=t.behavior;}return p.forEach(function(s,d){if(i!==s||p.length===d+1)return e;i=e.placement.split('-')[0],n=x(i);var a=e.offsets.popper,l=e.offsets.reference,f=X,m='left'===i&&f(a.right)>f(l.left)||'right'===i&&f(a.left)f(l.top)||'bottom'===i&&f(a.top)f(o.right),g=f(a.top)f(o.bottom),b='left'===i&&h||'right'===i&&c||'top'===i&&g||'bottom'===i&&u,w=-1!==['top','bottom'].indexOf(i),y=!!t.flipVariations&&(w&&'start'===r&&h||w&&'end'===r&&c||!w&&'start'===r&&g||!w&&'end'===r&&u);(m||b||y)&&(e.flipped=!0,(m||b)&&(i=p[d+1]),y&&(r=K(r)),e.placement=i+(r?'-'+r:''),e.offsets.popper=se({},e.offsets.popper,S(e.instance.popper,e.offsets.reference,e.placement)),e=C(e.instance.modifiers,e,'flip'))}),e},behavior:'flip',padding:5,boundariesElement:'viewport'},inner:{order:700,enabled:!1,fn:function(e){var t=e.placement,o=t.split('-')[0],i=e.offsets,n=i.popper,r=i.reference,p=-1!==['left','right'].indexOf(o),s=-1===['top','left'].indexOf(o);return n[p?'left':'top']=r[o]-(s?n[p?'width':'height']:0),e.placement=x(t),e.offsets.popper=c(n),e}},hide:{order:800,enabled:!0,fn:function(e){if(!F(e.instance.modifiers,'hide','preventOverflow'))return e;var t=e.offsets.reference,o=T(e.instance.modifiers,function(e){return'preventOverflow'===e.name}).boundaries;if(t.bottomo.right||t.top>o.bottom||t.right 14 | -------------------------------------------------------------------------------- /month-report.php: -------------------------------------------------------------------------------- 1 | 2 |
3 |
4 |
5 |
6 |

Monthwise Book Issue Report

7 |
8 |
9 |
10 |
11 |
12 |
13 | 14 |
15 | 16 |
17 |
18 |
19 | 0){ ?> 32 |
33 |
34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | $row['return_date']) && $row['issue_status'] == "N"){ 48 | $over = 'style="background:rgba(255,0,0,0.2)"'; 49 | }else{ $over = ''; } ?> 50 | > 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 |
S.NoStudent NameBook NamePhoneEmailIssue DateReturn Date
62 |
63 |
64 | 67 |
68 |
69 | 70 | -------------------------------------------------------------------------------- /not-returned.php: -------------------------------------------------------------------------------- 1 | 2 |
3 |
4 |
5 |
6 |

Not Returned Books

7 |
8 |
9 | 0){ ?> 19 |
20 |
21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | $row['return_date']) && $row['issue_status'] == "N"){ 36 | $over = 'style="background:rgba(255,0,0,0.2)"'; 37 | }else{ $over = ''; }?> 38 | > 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 57 | 58 | 59 | 60 |
S.NoStudent NameBook NamePhoneEmailIssue DateReturn DateOver Days
47 | $date2){ 51 | $diff = date_diff($date1,$date2); 52 | echo $days = $diff->format('%a days'); 53 | }else{ 54 | echo '0 days'; 55 | } ?> 56 |
61 |
62 |
63 | 64 |
65 |
66 | 67 | -------------------------------------------------------------------------------- /publisher.php: -------------------------------------------------------------------------------- 1 | 2 |
3 |
4 |
5 |
6 |

All Publishers

7 |
8 |
9 | Add Publisher 10 |
11 |
12 |
13 |
14 |
15 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 0){ 34 | $serial = $offset + 1; 35 | while($row = mysqli_fetch_assoc($result)) { ?> 36 | 37 | 38 | 39 | 42 | 45 | 46 | 49 | 50 | 51 | 52 | 53 | 54 |
S.NoPublisher NameEditDelete
40 | Edit 41 | 43 | >Delete 44 |
No Publishers Found
55 | 0){ 59 | $total_records = mysqli_num_rows($result1); 60 | $total_page = ceil($total_records / $limit); 61 | if($total_page > 1){ 62 | $pagination = "
    "; 63 | if($page > 1){ 64 | $pagination .= '
  • Prev
  • '; 65 | } 66 | for($i = 1; $i <= $total_page; $i++){ 67 | if($i == $page){ 68 | $active = "active"; 69 | }else{ 70 | $active = ""; 71 | } 72 | $pagination .= '
  • '.$i.'
  • '; 73 | } 74 | if($total_page > $page){ 75 | $pagination .= '
  • Next
  • '; 76 | } 77 | $pagination .= "
"; 78 | echo $pagination; 79 | } 80 | } ?> 81 |
82 |
83 |
84 |
85 | 86 | 102 | 103 | -------------------------------------------------------------------------------- /reports.php: -------------------------------------------------------------------------------- 1 | 2 |
3 |
4 |
5 |
6 |

Reports

7 |
8 |
9 |
10 |
11 |
12 |
13 |
Date Wise Report
14 |
15 |
16 |
17 |
18 |
19 | 22 |
23 |
24 |
25 |
26 |
27 |
Not Returned
28 |
29 |
30 |
31 |
32 |
33 |
34 | 35 | -------------------------------------------------------------------------------- /setting.php: -------------------------------------------------------------------------------- 1 | Updated successfully."; 11 | }else{ 12 | echo "
Updated not successfully.
"; 13 | } 14 | } ?> 15 |
16 |
17 |
18 |
19 |

Setting

20 |
21 |
22 |
23 |
24 | 0){ 28 | while($row = mysqli_fetch_assoc($result)){ ?> 29 |
30 |
31 | 32 |
33 |
34 | 35 | 36 |
37 |
38 | 39 | 40 |
41 | 42 |
43 | 45 |
46 |
47 |
48 |
49 | 50 | -------------------------------------------------------------------------------- /sql/library_system.sql.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/abdullahthewebbee/library-system/5f01240cf0dcbf9423a16292d7c0cb0a3e7d5aa3/sql/library_system.sql.zip -------------------------------------------------------------------------------- /student.php: -------------------------------------------------------------------------------- 1 | 2 |
3 |
4 |
5 |
6 |

All Students

7 |
8 |
9 | Add Student 10 |
11 |
12 |
13 |
14 | 24 |
25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 0){ 38 | $serial = $offset + 1; 39 | while($row = mysqli_fetch_assoc($result)) { ?> 40 | 41 | 42 | 43 | 44 | 45 | 46 | 49 | 52 | 55 | 56 | 59 | 60 | 61 | 62 | 63 | 64 |
S.NoStudent NameGenderPhoneEmailViewEditDelete
47 | 48 | 50 | Edit 51 | 53 | Delete 54 |
No Students Found
65 | 71 | 0){ 75 | $total_records = mysqli_num_rows($result1); 76 | $total_page = ceil($total_records / $limit); 77 | if($total_page > 1){ 78 | $pagination = "
    "; 79 | if($page > 1){ 80 | $pagination .= '
  • Prev
  • '; 81 | } 82 | for($i = 1; $i <= $total_page; $i++){ 83 | if($i == $page){ 84 | $active = "active"; 85 | }else{ 86 | $active = ""; 87 | } 88 | $pagination .= '
  • '.$i.'
  • '; 89 | } 90 | if($total_page > $page){ 91 | $pagination .= '
  • Next
  • '; 92 | } 93 | $pagination .= "
"; 94 | echo $pagination; 95 | } 96 | } ?> 97 |
98 |
99 |
100 |
101 | 102 | 136 | 137 | -------------------------------------------------------------------------------- /update-author.php: -------------------------------------------------------------------------------- 1 | 13 |
14 |
15 |
16 |
17 |

Update Author

18 |
19 |
20 |
21 |
22 | 0){ 27 | while($row = mysqli_fetch_assoc($result)){ ?> 28 |
29 |
30 | 31 |
32 |
33 | 34 | 35 |
36 | 37 |
38 | 41 |
42 |
43 |
44 |
45 | 46 | -------------------------------------------------------------------------------- /update-book.php: -------------------------------------------------------------------------------- 1 | 16 |
17 |
18 |
19 |
20 |

Update Book

21 |
22 |
23 |
24 |
25 | 0){ 36 | while($row = mysqli_fetch_assoc($result)){ ?> 37 |
38 |
39 | 40 |
41 |
42 | 43 | 44 |
45 |
46 | 47 | 63 |
64 |
65 | 66 | 82 |
83 |
84 | 85 | 101 |
102 | 103 |
104 | 106 |
107 |
108 |
109 |
110 | 111 | -------------------------------------------------------------------------------- /update-category.php: -------------------------------------------------------------------------------- 1 | 14 |
15 |
16 |
17 |
18 |

UpdateCategory

19 |
20 |
21 |
22 |
23 | 0){ 29 | while($row = mysqli_fetch_assoc($result)){ ?> 30 |
31 |
32 | 33 |
34 |
35 | 36 | 37 |
38 | 39 |
40 | 42 |
43 |
44 |
45 |
46 | 47 | -------------------------------------------------------------------------------- /update-issue-book.php: -------------------------------------------------------------------------------- 1 | 15 |
16 |
17 |
18 |
19 |

Return Book

20 |
21 |
22 |
23 |
24 | 0){ 30 | $fine = 0; 31 | while($r = mysqli_fetch_assoc($rq)){ 32 | $fine = $r['fine']; 33 | } 34 | } 35 | // ---------------- 36 | $issue_id = $_GET['iid']; 37 | //select query 38 | $sql = "SELECT book_issue.issue_id,book_issue.issue_name,book_issue.issue_book,book_issue.issue_status,book_issue.return_day, 39 | book_issue.issue_date,book_issue.return_date,student.student_id,student.student_phone,student.student_email,student.student_name,book.book_name FROM book_issue 40 | LEFT JOIN student ON book_issue.issue_name = student.student_id 41 | LEFT JOIN book ON book_issue.issue_book = book.book_id 42 | WHERE issue_id = {$issue_id} 43 | ORDER BY book_issue.issue_id DESC"; 44 | $result = mysqli_query($conn, $sql) or die("SQL query failed."); 45 | if(mysqli_num_rows($result) > 0){ 46 | while($row = mysqli_fetch_assoc($result)){ ?> 47 |
48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | $row['return_date']){ ?> 85 | 86 | 87 | format('%a'); 92 | ?> 93 | 94 | 95 | 96 | 97 |
Student Name :
Book Name :
Phone :
Email :
Issue Date :
Return Date :
StatusReturned
Returned On
Fine
99 |
100 | 101 | 102 |
103 | 104 |
105 | 107 |
108 |
109 |
110 |
111 | 112 | -------------------------------------------------------------------------------- /update-publisher.php: -------------------------------------------------------------------------------- 1 | 13 |
14 |
15 |
16 |
17 |

Update Publisher

18 |
19 |
20 |
21 |
22 | 0){ 28 | while($row = mysqli_fetch_assoc($result)){ 29 | 30 | ?> 31 |
32 |
33 | 34 |
35 |
36 | 37 | 38 |
39 | 40 |
41 | 43 |
44 |
45 |
46 |
47 | 48 | -------------------------------------------------------------------------------- /update-student.php: -------------------------------------------------------------------------------- 1 | 21 |
22 |
23 |
24 |
25 |

Update Student

26 |
27 |
28 |
29 |
30 | 0){ 36 | while($row = mysqli_fetch_assoc($result)){ ?> 37 |
38 |
39 | 40 |
41 |
42 | 43 | 44 |
45 |
46 | 47 | 48 |
49 |
50 | 51 | 55 |
56 |
57 | 58 | 59 |
60 |
61 | 62 | 63 |
64 |
65 | 66 | 67 |
68 |
69 | 70 | 71 |
72 | 73 |
74 | 76 |
77 |
78 |
79 |
80 | 81 | -------------------------------------------------------------------------------- /view-student.php: -------------------------------------------------------------------------------- 1 | 0){ 11 | while($row = mysqli_fetch_assoc($result)){ 12 | $output .= " 13 | Student Name : 14 | 15 | {$row['student_name']} 16 | 17 | 18 | 19 | Address : 20 | 21 | {$row['student_address']} 22 | 23 | 24 | 25 | Gender : 26 | 27 | {$row['student_gender']} 28 | 29 | 30 | 31 | Class : 32 | 33 | {$row['student_class']} 34 | 35 | 36 | 37 | Age : 38 | 39 | {$row['student_age']} 40 | 41 | 42 | 43 | Phone : 44 | 45 | {$row['student_phone']} 46 | 47 | 48 | 49 | Email : 50 | 51 | {$row['student_email']} 52 | 53 | "; 54 | } 55 | 56 | mysqli_close($conn); 57 | 58 | echo $output; 59 | }else{ 60 | echo "

No record found.

"; 61 | } ?> 62 | --------------------------------------------------------------------------------