├── _config.yml
├── user.png
├── user2.png
├── js
├── usr_login.js
├── admin_login.js
├── add_book.js
├── user_main.js
├── user_login.js
└── admin_portal.js
├── Readme.md
├── css
├── main_page.css
├── user_main.css
├── admin_portal.css
├── usr_login.css
├── admin_login.css
├── add_book.css
└── buy_book.css
├── admin_login.html
├── 404.html
├── usr_login.html
├── user_portal.html
├── buy_book.html
├── index.html
├── admin_portal.html
└── add_book.html
/_config.yml:
--------------------------------------------------------------------------------
1 | theme: jekyll-theme-cayman
--------------------------------------------------------------------------------
/user.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rajpra808/Library-Management-System/HEAD/user.png
--------------------------------------------------------------------------------
/user2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rajpra808/Library-Management-System/HEAD/user2.png
--------------------------------------------------------------------------------
/js/usr_login.js:
--------------------------------------------------------------------------------
1 |
2 | $(document).ready(function () {
3 | $('.message a').click(function(){
4 | $('form').animate({height: "toggle", opacity: "toggle"}, "slow");
5 | });
6 | //your code here
7 | });
8 |
--------------------------------------------------------------------------------
/Readme.md:
--------------------------------------------------------------------------------
1 | # Library Management System
2 |
3 |
4 |
5 | # Programming Language and Tools
6 |
7 | - HTML
8 | - CSS
9 | - JavaScript
10 | - Firebase
11 | - Firestore
12 | ---
13 | # How to check
14 | 1. clone the Repo or download Zip file
15 | 2. open index.html
16 | 3. for admin use
17 | - Username : admin@gmail.com
18 | - Password : admin@123
19 |
20 | 4. for user account register a new user
21 | ---
22 |
23 | # direct link
24 |
25 | https://rajpra786.github.io/Library-Management-System/index.html
26 |
27 | ---
28 | # Contributors
29 | - ##### Rajendra Prajapat
30 | - ##### Dheeraj Chaudhary
31 | - ##### Priya Tiru
32 | - ##### Rajdeep Das
33 | - ##### Shashank N S
34 |
35 | ##### Supervised By- Prof. Channappa B AKKI
36 | ###### Academic Year: 2018-2019
37 |
--------------------------------------------------------------------------------
/css/main_page.css:
--------------------------------------------------------------------------------
1 | body{
2 | text-align: center;
3 |
4 | }
5 |
6 | .main_user_block{
7 | max-width: 500px;
8 | background: white;
9 | padding: 10px;
10 | border-style: groove;
11 | color: #cfcfd1;
12 | width: 20%;
13 | height: 30%;
14 | text-align: center;
15 | display: inline-block;
16 | margin:auto;
17 | border-radius: 5px;
18 | }
19 | #portal{
20 | font-size:300%;
21 | font-family: "Trebuchet MS", Helvetica, sans-serif;
22 | }
23 | #user{
24 | position: fixed;
25 | top: 50%;
26 | left: 50%;
27 |
28 | }
29 | #admin{
30 | position: fixed;
31 | top: 50%;
32 | left: 25%;
33 | }
34 |
35 | .login_button{
36 | background-color: #c3c6cc; /* white */
37 | border: none;
38 | border-radius: 5px;
39 | color: white;
40 | text-align: center;
41 | text-decoration: none;
42 | display: inline-block;
43 | font-size: 16px;
44 | margin: 4px 2px;
45 | cursor: pointer;
46 | padding: 15px;
47 | }
48 |
--------------------------------------------------------------------------------
/admin_login.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
18 |
19 |
20 | Admin Authentication
21 |
22 |
23 |
24 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
--------------------------------------------------------------------------------
/css/user_main.css:
--------------------------------------------------------------------------------
1 | body
2 | {
3 | background: #D0CFCE;
4 | }
5 |
6 | .image_user{
7 | float: right;
8 | padding-right: 5%;
9 | }
10 |
11 | .heading{
12 | position: relative;
13 | display: inline-block;
14 | text-align: center;
15 | }
16 | .main_header{
17 | text-align: center;
18 | }
19 |
20 | .right {
21 | background: white;
22 | padding: 10px;
23 | border-style: dotted;
24 | color: black;
25 | display: block;
26 | margin-left: 100px;
27 | width: auto;
28 | height: 50%;
29 | }
30 | #Result{
31 | overflow-x: hidden;
32 | overflow-x: auto;
33 | text-align:justify;
34 | }
35 |
36 | .left {
37 | background: white;
38 | padding: 10px;
39 | border-style: dotted;
40 | color: black;
41 | width: 60%;
42 | height: 50%;
43 | float: left;
44 | display: inline-block;
45 | margin:auto;
46 | }
47 |
48 | #portal{
49 | font-size:300%;
50 | font-family: "Trebuchet MS", Helvetica, sans-serif;
51 | }
52 |
53 | #log_button {
54 | width: 85px;
55 | background-color: #4CAF50;
56 | }
57 |
58 | .BUTTON{
59 | font-size: 15px;
60 | color: black;
61 | padding: 15px;
62 | -webkit-transition-duration: 0.4s; /* Safari */
63 | transition-duration: 0.4s;
64 | text-decoration: none;
65 | overflow: hidden;
66 | cursor: pointer;
67 | }
68 |
69 |
70 | @import url('https://fonts.googleapis.com/css?family=Bangers');
71 | *,*::before,*::after{
72 | margin:0;
73 | box-sizing:border-box;
74 | }
75 |
76 | #header-file{
77 | margin: 50px;
78 | }
79 |
80 | body{
81 | margin: 10px;
82 | font-family: 'Bangers', cursive;
83 | }
--------------------------------------------------------------------------------
/404.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
26 |
404
27 |
Page Not Found
28 |
The specified file was not found on this website. Please check the URL for mistakes and try again.
29 |
Why am I seeing this?
30 |
This page was generated by the Firebase Command-Line Interface. To modify it, edit the 404.html file in your project's configured public directory.
31 |
32 |
33 |
34 |
--------------------------------------------------------------------------------
/js/admin_login.js:
--------------------------------------------------------------------------------
1 | //admin@123
2 |
3 | $(document).ready(function(){
4 | var firebaseConfig = {
5 | apiKey: "AIzaSyBin1evT-H6jfR49WIhtVPsGMLzbEklIQY",
6 | authDomain: "library-management-syste-f2a85.firebaseapp.com",
7 | databaseURL: "https://library-management-syste-f2a85.firebaseio.com",
8 | projectId: "library-management-syste-f2a85",
9 | storageBucket: "library-management-syste-f2a85.appspot.com",
10 | messagingSenderId: "914416876417",
11 | appId: "1:914416876417:web:bf9e7762c1c283ba"
12 | };
13 | // Initialize Firebase
14 | firebase.initializeApp(firebaseConfig);
15 | var db = firebase.firestore();
16 |
17 | $("#login-form").submit(function(e) {
18 | e.preventDefault();
19 | });
20 |
21 | $('#submit_data').click(function() {
22 | login();
23 | });
24 |
25 | $('#back_button').click(function()
26 | {
27 | logout();
28 | });
29 |
30 | firebase.auth().onAuthStateChanged(user => {
31 | if(user) {
32 | window.location = 'admin_portal.html'; //After successful login, user will be redirected to home.html
33 | }
34 | });
35 |
36 | });
37 |
38 | function login(){
39 | var email = document.getElementById("username").value;
40 | var password = document.getElementById("password").value;
41 |
42 | if(email === "admin@gmail.com")
43 | {
44 | firebase.auth().signInWithEmailAndPassword(email, password).catch(function(error) {
45 | // Handle Errors here.
46 | var errorCode = error.code;
47 | var errorMessage = error.message;
48 | window.alert(errorMessage);
49 | });
50 | }
51 |
52 | }
53 | function logout()
54 | {
55 | firebase.auth().signOut().then(function() {
56 | // Sign-out successful.
57 | }).catch(function(error) {
58 | // An error happened.
59 | });
60 | }
61 |
--------------------------------------------------------------------------------
/js/add_book.js:
--------------------------------------------------------------------------------
1 | $(document).ready(function() {
2 | var firebaseConfig = {
3 | apiKey: "AIzaSyBin1evT-H6jfR49WIhtVPsGMLzbEklIQY",
4 | authDomain: "library-management-syste-f2a85.firebaseapp.com",
5 | databaseURL: "https://library-management-syste-f2a85.firebaseio.com",
6 | projectId: "library-management-syste-f2a85",
7 | storageBucket: "library-management-syste-f2a85.appspot.com",
8 | messagingSenderId: "914416876417",
9 | appId: "1:914416876417:web:bf9e7762c1c283ba"
10 | };
11 | // Initialize Firebase
12 | firebase.initializeApp(firebaseConfig);
13 |
14 | var db = firebase.firestore();
15 |
16 | $("#book-form").submit(function(e) {
17 | e.preventDefault();
18 | });
19 |
20 | $('#submit').click(function() {
21 | add_this();
22 | });
23 |
24 | firebase.auth().onAuthStateChanged(user => {
25 | if(!user) {
26 | window.location = 'index.html';
27 | }
28 | });
29 |
30 | });
31 |
32 | function add_this()
33 | {
34 | var BookCode = document.getElementById("book_code").value;
35 | var BookName = document.getElementById("book_name").value;
36 | var Author1 = document.getElementById("author1").value;
37 | var Author2 = document.getElementById("author2").value;
38 | var Subject = document.getElementById("Subject").value;
39 | var tags = document.getElementById("tags").value;
40 | var db = firebase.firestore();
41 |
42 | db.collection("books").doc(BookCode).set({
43 | bookcode: BookCode,
44 | bookname : BookName,
45 | author1: Author1,
46 | author2: Author2,
47 | subject : Subject,
48 | tags : tags
49 | })
50 | .then(function() {
51 | console.log("Document successfully written!");
52 | window.alert("Successfully Book Added");
53 | window.location = 'admin_portal.html';
54 | })
55 | .catch(function(error) {
56 | console.error("Error writing document: ", error);
57 | });
58 | }
59 |
--------------------------------------------------------------------------------
/css/admin_portal.css:
--------------------------------------------------------------------------------
1 | body{
2 | background: #D0CFCE;
3 | }
4 | .image_user{
5 | float: right;
6 | padding-right: 5%;
7 | }
8 |
9 | .heading{
10 | position: relative;
11 | display: inline-block;
12 | text-align: center;
13 | }
14 | .main_header{
15 | text-align: center;
16 | }
17 |
18 | .main_user_block{
19 | max-width: 1000px;
20 | background: white;
21 | padding: 10px;
22 | border-style: dotted;
23 | color: #cfcfd1;
24 | width: 50%;
25 | height: 50%;
26 | text-align: center;
27 | display: inline-block;
28 | margin:auto;
29 | border-radius: 5px;
30 | }
31 | #portal{
32 | font-size:300%;
33 | font-family: "Trebuchet MS", Helvetica, sans-serif;
34 | }
35 | #Result{
36 | position: fixed;
37 | top: 40%;
38 | left: 25%;
39 | color:black;
40 | overflow-x: hidden;
41 | overflow-x: auto;
42 | text-align:justify;
43 | }
44 | .Search{
45 | position: fixed;
46 | width: 20%;
47 | display: block;
48 | margin: 0 auto;
49 | }
50 |
51 | #Students_search{
52 | top:32%;
53 | left:25%;
54 | }
55 | #Books_search{
56 | top:32%;
57 | left:55%;
58 | }
59 |
60 | input#search-bar{
61 | margin: 0 auto;
62 | width: 80%;
63 | height: 25px;
64 | padding: 0 20px;
65 | font-size: 1rem;
66 | border: 1px solid #D0CFCE;
67 | outline: none;
68 | }
69 |
70 | .search-icon{
71 | position: relative;
72 | float: right;
73 | width: 50px;
74 | height: 50px;
75 | top: -37px;
76 |
77 | }
78 |
79 |
80 | #log_button {
81 | width: 85px;
82 | background-color: #4CAF50;
83 | }
84 |
85 | .BUTTON{
86 | font-size: 15px;
87 | color: black;
88 | padding: 15px;
89 | -webkit-transition-duration: 0.4s; /* Safari */
90 | transition-duration: 0.4s;
91 | text-decoration: none;
92 | overflow: hidden;
93 | cursor: pointer;
94 | }
95 |
96 | #add_book_button{
97 | border: ridge;
98 | margin-left: 7%;
99 | margin-top: 8%;
100 | width: 12%;
101 | }
102 | #buy_book{
103 | width: 12%;
104 | border: ridge;
105 | margin-left: 7%;
106 | margin-top: 5%;
107 | }
108 |
109 |
110 | ul{
111 | padding-left: 10px;
112 | padding-right: 10px;
113 | }
114 |
--------------------------------------------------------------------------------
/css/usr_login.css:
--------------------------------------------------------------------------------
1 | @import url(https://fonts.googleapis.com/css?family=Roboto:300);
2 |
3 | #portal{
4 | text-align: center;
5 | font-size:300%;
6 | font-family: "Trebuchet MS", Helvetica, sans-serif;
7 | }
8 |
9 | .login-page {
10 | width: 360px;
11 | padding: 8% 0 0;
12 | margin-left: 35%;
13 | margin-top: -10%;
14 | }
15 | .form {
16 | position: relative;
17 | z-index: 1;
18 | max-width: 360px;
19 | background: #FFFFFF;
20 | margin: 0 auto 100px;
21 | padding: 45px;
22 | text-align: center;
23 | box-shadow: 0 0 20px 0 rgba(0, 0, 0, 0.2), 0 5px 5px 0 rgba(0, 0, 0, 0.24);
24 | }
25 | .form input {
26 | font-family: "Roboto", sans-serif;
27 | outline: 0;
28 | background: #f2f2f2;
29 | width: 100%;
30 | border: 0;
31 | margin: 0 0 15px;
32 | padding: 15px;
33 | box-sizing: border-box;
34 | font-size: 14px;
35 | }
36 | button {
37 | background-color: #86d1e0; /* white */
38 | border: solid;
39 | border-radius: 5px;
40 | color: white;
41 | text-align: center;
42 | text-decoration: none;
43 | display: inline-block;
44 | font-size: 16px;
45 | margin: 4px 2px;
46 | cursor: pointer;
47 | padding: 15px;
48 | }
49 |
50 | #back_button:hover{
51 | background: green;
52 | }
53 | .form button:hover,.form button:active,.form button:focus {
54 | background: green;
55 | width: 100%;
56 | }
57 | .form .message {
58 | margin: 15px 0 0;
59 | color: #b3b3b3;
60 | font-size: 12px;
61 | }
62 | .form .message a {
63 | color: #4CAF50;
64 | text-decoration: none;
65 | }
66 | .form .register-form {
67 | display: none;
68 | }
69 | .container {
70 | position: relative;
71 | z-index: 1;
72 | max-width: 300px;
73 | margin: 0 auto;
74 | }
75 | .container:before, .container:after {
76 | content: "";
77 | display: block;
78 | clear: both;
79 | }
80 | .container .info {
81 | margin: 50px auto;
82 | text-align: center;
83 | }
84 | .container .info h1 {
85 | margin: 0 0 15px;
86 | padding: 0;
87 | font-size: 36px;
88 | font-weight: 300;
89 | color: #1a1a1a;
90 | }
91 | .container .info span {
92 | color: #4d4d4d;
93 | font-size: 12px;
94 | }
95 | .container .info span a {
96 | color: #000000;
97 | text-decoration: none;
98 | }
99 | .container .info span .fa {
100 | color: #EF3B3A;
101 | }
102 | body {
103 | font-family: "Roboto", sans-serif;
104 | }
105 |
--------------------------------------------------------------------------------
/css/admin_login.css:
--------------------------------------------------------------------------------
1 | @import url(https://fonts.googleapis.com/css?family=Roboto:300);
2 |
3 | #portal{
4 | text-align: center;
5 | font-size:300%;
6 | font-family: "Trebuchet MS", Helvetica, sans-serif;
7 | }
8 |
9 | .login-page {
10 | width: 360px;
11 | padding: 8% 0 0;
12 | margin-left: 35%;
13 | margin-top: -10%;
14 | }
15 | .form {
16 | position: relative;
17 | z-index: 1;
18 | background: #FFFFFF;
19 | max-width: 360px;
20 | margin: 0 auto 100px;
21 | padding: 45px;
22 | text-align: center;
23 | box-shadow: 0 0 20px 0 rgba(0, 0, 0, 0.2), 0 5px 5px 0 rgba(0, 0, 0, 0.24);
24 | }
25 | .form input {
26 | font-family: "Roboto", sans-serif;
27 | outline: 0;
28 | background: #f2f2f2;
29 | width: 100%;
30 | border: 0;
31 | margin: 0 0 15px;
32 | padding: 15px;
33 | box-sizing: border-box;
34 | font-size: 14px;
35 | }
36 | button {
37 | background-color: #86d1e0; /* white */
38 | border: solid;
39 | border-radius: 5px;
40 | color: white;
41 | text-align: center;
42 | text-decoration: none;
43 | display: inline-block;
44 | font-size: 16px;
45 | margin: 4px 2px;
46 | cursor: pointer;
47 | padding: 15px;
48 | }
49 |
50 | #back_button:hover{
51 | background: green;
52 | }
53 | .form button:hover,.form button:active,.form button:focus {
54 | background: green;
55 | width: 100%;
56 | }
57 | .form .message {
58 | margin: 15px 0 0;
59 | color: #b3b3b3;
60 | font-size: 12px;
61 | }
62 | .form .message a {
63 | color: #4CAF50;
64 | text-decoration: none;
65 | }
66 | .form .register-form {
67 | display: none;
68 | }
69 | .container {
70 | position: relative;
71 | z-index: 1;
72 | max-width: 300px;
73 | margin: 0 auto;
74 | }
75 | .container:before, .container:after {
76 | content: "";
77 | display: block;
78 | clear: both;
79 | }
80 | .container .info {
81 | margin: 50px auto;
82 | text-align: center;
83 | }
84 | .container .info h1 {
85 | margin: 0 0 15px;
86 | padding: 0;
87 | font-size: 36px;
88 | font-weight: 300;
89 | color: #1a1a1a;
90 | }
91 | .container .info span {
92 | color: #4d4d4d;
93 | font-size: 12px;
94 | }
95 | .container .info span a {
96 | color: #000000;
97 | text-decoration: none;
98 | }
99 | .container .info span .fa {
100 | color: #EF3B3A;
101 | }
102 | body {
103 | font-family: "Roboto", sans-serif;
104 | }
105 |
--------------------------------------------------------------------------------
/usr_login.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
16 |
17 |
18 |
22 |
My Profile
23 |
24 |
25 |
26 |
Online Library (Admin) Portal
27 |
28 |
29 |
30 |
31 |
19 |
20 |
21 |
25 |
My Profile
26 |
27 |
28 |
29 |
Online Library (Admin) Portal
30 |
31 |
32 |
33 |
34 |