├── 1.jpg ├── 2.jpg ├── 3.jpg ├── 4.jpg ├── 5.jpg ├── 6.jpg ├── 7.jpg ├── logout.php ├── style.css ├── loginstyle.css ├── login.php ├── home.php ├── README.md ├── book_store.php ├── search.php ├── index.php ├── add_member.php ├── delete_member.php ├── delete_book.php ├── update_member.php ├── members.php ├── add_book.php ├── update_book.php ├── issue.php └── reserve.php /1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MuhammadHasham23/Library-Management-Sytem/HEAD/1.jpg -------------------------------------------------------------------------------- /2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MuhammadHasham23/Library-Management-Sytem/HEAD/2.jpg -------------------------------------------------------------------------------- /3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MuhammadHasham23/Library-Management-Sytem/HEAD/3.jpg -------------------------------------------------------------------------------- /4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MuhammadHasham23/Library-Management-Sytem/HEAD/4.jpg -------------------------------------------------------------------------------- /5.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MuhammadHasham23/Library-Management-Sytem/HEAD/5.jpg -------------------------------------------------------------------------------- /6.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MuhammadHasham23/Library-Management-Sytem/HEAD/6.jpg -------------------------------------------------------------------------------- /7.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MuhammadHasham23/Library-Management-Sytem/HEAD/7.jpg -------------------------------------------------------------------------------- /logout.php: -------------------------------------------------------------------------------- 1 | 5 |

You have been signed out

-------------------------------------------------------------------------------- /style.css: -------------------------------------------------------------------------------- 1 | .wrapper { 2 | margin-top: 80px; 3 | margin-bottom: 20px; 4 | } 5 | 6 | .form-signin { 7 | max-width: 420px; 8 | padding: 30px 38px 66px; 9 | margin: 0 auto; 10 | background-color: #eee; 11 | border: 3px dotted rgba(0,0,0,0.1); 12 | } 13 | 14 | .form-signin-heading { 15 | text-align:center; 16 | margin-bottom: 30px; 17 | } 18 | 19 | .form-control { 20 | position: relative; 21 | font-size: 16px; 22 | height: auto; 23 | padding: 10px; 24 | } 25 | 26 | input[type="text"] { 27 | margin-bottom: 0px; 28 | border-bottom-left-radius: 0; 29 | border-bottom-right-radius: 0; 30 | } 31 | 32 | input[type="password"] { 33 | margin-bottom: 20px; 34 | border-top-left-radius: 0; 35 | border-top-right-radius: 0; 36 | } 37 | 38 | .colorgraph { 39 | height: 7px; 40 | border-top: 0; 41 | background: #c4e17f; 42 | border-radius: 5px; 43 | background-image: -webkit-linear-gradient(left, #c4e17f, #c4e17f 12.5%, #f7fdca 12.5%, #f7fdca 25%, #fecf71 25%, #fecf71 37.5%, #f0776c 37.5%, #f0776c 50%, #db9dbe 50%, #db9dbe 62.5%, #c49cde 62.5%, #c49cde 75%, #669ae1 75%, #669ae1 87.5%, #62c2e4 87.5%, #62c2e4); 44 | background-image: -moz-linear-gradient(left, #c4e17f, #c4e17f 12.5%, #f7fdca 12.5%, #f7fdca 25%, #fecf71 25%, #fecf71 37.5%, #f0776c 37.5%, #f0776c 50%, #db9dbe 50%, #db9dbe 62.5%, #c49cde 62.5%, #c49cde 75%, #669ae1 75%, #669ae1 87.5%, #62c2e4 87.5%, #62c2e4); 45 | background-image: -o-linear-gradient(left, #c4e17f, #c4e17f 12.5%, #f7fdca 12.5%, #f7fdca 25%, #fecf71 25%, #fecf71 37.5%, #f0776c 37.5%, #f0776c 50%, #db9dbe 50%, #db9dbe 62.5%, #c49cde 62.5%, #c49cde 75%, #669ae1 75%, #669ae1 87.5%, #62c2e4 87.5%, #62c2e4); 46 | background-image: linear-gradient(to right, #c4e17f, #c4e17f 12.5%, #f7fdca 12.5%, #f7fdca 25%, #fecf71 25%, #fecf71 37.5%, #f0776c 37.5%, #f0776c 50%, #db9dbe 50%, #db9dbe 62.5%, #c49cde 62.5%, #c49cde 75%, #669ae1 75%, #669ae1 87.5%, #62c2e4 87.5%, #62c2e4); 47 | } -------------------------------------------------------------------------------- /loginstyle.css: -------------------------------------------------------------------------------- 1 | .wrapper { 2 | margin-top: 80px; 3 | margin-bottom: 20px; 4 | } 5 | 6 | .form-signin { 7 | max-width: 420px; 8 | padding: 30px 38px 66px; 9 | margin: 0 auto; 10 | background-color: #eee; 11 | border: 3px dotted rgba(0,0,0,0.1); 12 | } 13 | 14 | .form-signin-heading { 15 | text-align:center; 16 | margin-bottom: 30px; 17 | } 18 | 19 | .form-control { 20 | position: relative; 21 | font-size: 16px; 22 | height: auto; 23 | padding: 10px; 24 | } 25 | 26 | input[type="text"] { 27 | margin-bottom: 0px; 28 | border-bottom-left-radius: 0; 29 | border-bottom-right-radius: 0; 30 | } 31 | 32 | input[type="password"] { 33 | margin-bottom: 20px; 34 | border-top-left-radius: 0; 35 | border-top-right-radius: 0; 36 | } 37 | 38 | .colorgraph { 39 | height: 7px; 40 | border-top: 0; 41 | background: #c4e17f; 42 | border-radius: 5px; 43 | background-image: -webkit-linear-gradient(left, #c4e17f, #c4e17f 12.5%, #f7fdca 12.5%, #f7fdca 25%, #fecf71 25%, #fecf71 37.5%, #f0776c 37.5%, #f0776c 50%, #db9dbe 50%, #db9dbe 62.5%, #c49cde 62.5%, #c49cde 75%, #669ae1 75%, #669ae1 87.5%, #62c2e4 87.5%, #62c2e4); 44 | background-image: -moz-linear-gradient(left, #c4e17f, #c4e17f 12.5%, #f7fdca 12.5%, #f7fdca 25%, #fecf71 25%, #fecf71 37.5%, #f0776c 37.5%, #f0776c 50%, #db9dbe 50%, #db9dbe 62.5%, #c49cde 62.5%, #c49cde 75%, #669ae1 75%, #669ae1 87.5%, #62c2e4 87.5%, #62c2e4); 45 | background-image: -o-linear-gradient(left, #c4e17f, #c4e17f 12.5%, #f7fdca 12.5%, #f7fdca 25%, #fecf71 25%, #fecf71 37.5%, #f0776c 37.5%, #f0776c 50%, #db9dbe 50%, #db9dbe 62.5%, #c49cde 62.5%, #c49cde 75%, #669ae1 75%, #669ae1 87.5%, #62c2e4 87.5%, #62c2e4); 46 | background-image: linear-gradient(to right, #c4e17f, #c4e17f 12.5%, #f7fdca 12.5%, #f7fdca 25%, #fecf71 25%, #fecf71 37.5%, #f0776c 37.5%, #f0776c 50%, #db9dbe 50%, #db9dbe 62.5%, #c49cde 62.5%, #c49cde 75%, #669ae1 75%, #669ae1 87.5%, #62c2e4 87.5%, #62c2e4); 47 | } -------------------------------------------------------------------------------- /login.php: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 |
14 |
15 | 24 | 0){ 34 | $_SESSION['user'] = $username; 35 | $_SESSION['pass'] = $password; 36 | echo ""; 40 | 41 | } 42 | else{ 43 | echo ""; 46 | } 47 | } 48 | 49 | } 50 | 51 | 52 | ?> 53 |
54 |
55 | -------------------------------------------------------------------------------- /home.php: -------------------------------------------------------------------------------- 1 | 6 | window.location.href='login.php'; 7 | 8 | "; 9 | } 10 | ?> 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 40 |
41 |
42 | 43 |
44 |
45 |

Welcome to admin area

46 |
47 |
48 | 49 |
50 |
51 | 52 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Project Title 2 | 3 | This is a library mangement system made in core php, the following technologies were used: 4 | 5 | * HTML 6 | * CSS 7 | * Bootstrap 8 | * PHP 9 | * JS 10 | * SQL 11 | 12 | ## Getting Started 13 | 14 | Just download the project and deploy on a server if working locally download (XAMPP,WAMPP etc).And use SQL 15 | 16 | ### Prerequisites 17 | 18 | * XAMPP (if localhost) 19 | 20 | * Any Server 21 | 22 | You would also need SQL to manage backend. 23 | 24 | ### Installing 25 | 26 | Download and run on server. 27 | 28 | 29 | 30 | ## Functions: 31 | 32 | The project has two interfaces in general 33 | 34 | 1) User interface 35 | 36 | 2) Admin interface 37 | 38 | 3) Login interface for both above. 39 | 40 | ### User Interface: 41 | 42 | ![alt text](http://i.imgur.com/k6wglxr.png) 43 | 44 | The user interface deals with 45 | 46 | * Displaying available books 47 | 48 | * Searching for books 49 | 50 | * Issue Books (it is ensured that the book is already not issued). 51 | 52 | * Reserve Books (it is ensured that the book is not reserved before, and to let the user reserve it on a future date). 53 | 54 | * Search books ( based on query entered the book is searched). 55 | 56 | ### Admin Interface: 57 | 58 | ![alt text](http://i.imgur.com/nTJT6it.png) 59 | 60 | The admin interface deals with 61 | 62 | * Displaying all member records (includes member with reserved books,issued books etc). 63 | 64 | * Displaying all book records. 65 | 66 | * Update Book Records. 67 | 68 | * Delete Book Records 69 | 70 | * Add Book Records 71 | 72 | * Add Member Records 73 | 74 | * Delete Member Records 75 | 76 | * Update Member Records. 77 | 78 | ### Login/Logout Interface: 79 | 80 | ![alt text](http://i.imgur.com/CA7yHAo.png) 81 | 82 | The user cannot bypass login page.Sessions have been used for that. 83 | 84 | ## Contributing 85 | 86 | Please read [CONTRIBUTING.md](https://gist.github.com/PurpleBooth/b24679402957c63ec426) for details on our code of conduct, and the process for submitting pull requests to us. 87 | 88 | ## Versioning 89 | 90 | We use [SemVer](http://semver.org/) for versioning. For the versions available, see the [tags on this repository](https://github.com/your/project/tags). 91 | 92 | ## Authors 93 | 94 | * **Mohammad Hasham** - Complete Project. 95 | 96 | ## License 97 | 98 | This project is licensed under the MIT License - see the [LICENSE.md](LICENSE.md) file for details 99 | 100 | 101 | -------------------------------------------------------------------------------- /book_store.php: -------------------------------------------------------------------------------- 1 | 6 | window.location.href='login.php'; 7 | 8 | "; 9 | } 10 | ?> 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 40 |
41 |
42 | 43 |
44 |
45 |
46 |
47 |

Welcome to book store!

48 |
49 |
50 |
51 | 60 | 61 |

'$name'

62 |
63 | "; 64 | } 65 | ?> 66 | 67 | 68 | -------------------------------------------------------------------------------- /search.php: -------------------------------------------------------------------------------- 1 | 6 | window.location.href='login.php'; 7 | 8 | "; 9 | } 10 | ?> 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 44 | 45 | 46 |
47 |
48 | 49 |
50 |
51 | 52 |
53 |
54 |

Please select a book

55 |
56 |
57 |
58 | 69 | 70 | 71 | 72 |
73 | "; 74 | } 75 | } 76 | ?> 77 | 78 | 79 | -------------------------------------------------------------------------------- /index.php: -------------------------------------------------------------------------------- 1 | 6 | window.location.href='login.php'; 7 | 8 | "; 9 | } 10 | ?> 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 44 | 45 | 46 |
47 |
48 | 49 |
50 |
51 | 52 |
53 |
54 |

Please select a book

55 |
56 |
57 |
58 | 67 | 68 | 69 | 70 |
71 | "; 72 | } 73 | ?> 74 | 75 | 76 | 83 | 84 | -------------------------------------------------------------------------------- /add_member.php: -------------------------------------------------------------------------------- 1 | 6 | window.location.href='login.php'; 7 | 8 | "; 9 | } 10 | ?> 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 40 |
41 |
42 | 43 |
44 |
45 |

Add A Member

46 |
47 |
48 | 49 | 50 |
51 | 52 |
53 | 63 | alert('Member has been added'); 64 | 65 | "; 66 | } 67 | else{ 68 | echo " 69 | 72 | "; 73 | } 74 | 75 | } 76 | else echo "Something went wrong"; 77 | ?> 78 | 79 | -------------------------------------------------------------------------------- /delete_member.php: -------------------------------------------------------------------------------- 1 | 6 | window.location.href='login.php'; 7 | 8 | "; 9 | } 10 | ?> 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 40 |
41 |
42 | 43 |
44 |
45 |

Delete A Member

46 |
47 |
48 | 49 | 50 |
51 |
52 | 53 |
54 |
55 | 64 | alert('Member has been deleted'); 65 | 66 | "; 67 | } 68 | else{ 69 | echo " 70 | 73 | "; 74 | } 75 | 76 | } 77 | else echo "Something went wrong"; 78 | ?> 79 | 80 | -------------------------------------------------------------------------------- /delete_book.php: -------------------------------------------------------------------------------- 1 | 6 | window.location.href='login.php'; 7 | 8 | "; 9 | } 10 | ?> 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 40 |
41 |
42 | 43 |
44 |
45 |

Delete A Book

46 |
47 |
48 | 49 | 50 |
51 |
52 | 53 |
54 |
55 | 64 | alert('Book has been deleted'); 65 | 66 | "; 67 | } 68 | else{ 69 | echo " 70 | 73 | "; 74 | echo "oho prito meray naal wya karlay"; 75 | } 76 | 77 | } 78 | else echo "Something went wrong"; 79 | ?> 80 | 81 | -------------------------------------------------------------------------------- /update_member.php: -------------------------------------------------------------------------------- 1 | 6 | window.location.href='login.php'; 7 | 8 | "; 9 | } 10 | ?> 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 40 |
41 |
42 | 43 |
44 |
45 |

Update A Book

46 |
47 |
48 | 49 | 50 |
51 |
52 | 53 | 54 |
55 | 56 |
57 | 71 | alert('Member has been updated'); 72 | 73 | "; 74 | } 75 | else{ 76 | echo " 77 | 80 | "; 81 | } 82 | 83 | } 84 | else echo "Something went wrong"; 85 | ?> 86 | 87 | -------------------------------------------------------------------------------- /members.php: -------------------------------------------------------------------------------- 1 | 6 | window.location.href='login.php'; 7 | 8 | "; 9 | } 10 | ?> 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 40 |
41 |
42 | 43 |
44 |
45 |
46 |

Member Records

47 |
48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | "; 66 | echo ""; 67 | echo ""; 68 | 69 | $query = "select book_name from issue_table 70 | where issue_table.person_name = '$name'"; 71 | $result = mysqli_query($conn,$query); 72 | 73 | foreach ($result as $value) { 74 | echo ""; 75 | } 76 | $query = "select book_name from reserve 77 | where reserve.person_name = '$name'"; 78 | $resulty = mysqli_query($conn,$query); 79 | 80 | foreach ($resulty as $value) { 81 | echo ""; 82 | } 83 | echo ""; 84 | } 85 | ?> 86 | 87 |
#Member NameBooks IssuedBooks Reserved
".$value['member_id'] . "".$value['member_name'] . "" . $value['book_name'] . "
" . "
" . $value['book_name'] . "
" . "
88 |
89 |
90 | 91 | 92 | 93 | 94 | 95 | 96 | -------------------------------------------------------------------------------- /add_book.php: -------------------------------------------------------------------------------- 1 | 6 | window.location.href='login.php'; 7 | 8 | "; 9 | } 10 | ?> 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 41 |
42 |
43 | 44 |
45 |
46 |

Add A Book

47 |
48 |
49 | 50 | 51 |
52 |
53 | 54 | 55 |
56 |
57 | 58 | 59 |
60 |
61 | 62 | 63 |
64 | 65 | 66 |
67 | 82 | alert('Book has been entered'); 83 | 84 | "; 85 | } 86 | else{ 87 | echo " 88 | 91 | "; 92 | echo "something went wrong"; 93 | } 94 | 95 | } 96 | else echo "Something went wrong"; 97 | ?> 98 | 99 | 100 | -------------------------------------------------------------------------------- /update_book.php: -------------------------------------------------------------------------------- 1 | 6 | window.location.href='login.php'; 7 | 8 | "; 9 | } 10 | ?> 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 40 |
41 |
42 | 43 |
44 |
45 |

Update A Book

46 |
47 |
48 | 49 | 50 |
51 |
52 | 53 | 54 |
55 |
56 | 57 | 58 |
59 |
60 | 61 | 62 |
63 |
64 | 65 | 66 |
67 | 68 |
69 | 91 | alert('Book has been updated'); 92 | 93 | "; 94 | } 95 | else{ 96 | echo " 97 | 100 | "; 101 | } 102 | 103 | } 104 | else echo "Something went wrong"; 105 | ?> 106 | 107 | -------------------------------------------------------------------------------- /issue.php: -------------------------------------------------------------------------------- 1 | 6 | window.location.href='login.php'; 7 | 8 | "; 9 | } 10 | ?> 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 43 | 44 | 45 |
46 |
47 | 48 |
49 |
50 | 51 |
52 |
53 |

Please enter details to issue book :

54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 | 62 | 63 |
64 |
65 | Enter Book Name : 74 | 75 |
76 | "; 77 | } 78 | 79 | if(!$id){ 80 | echo " 81 | 82 | 83 |
84 | 85 | "; 86 | } 87 | 88 | 89 | ?> 90 | 91 | 92 |
93 |
94 | 95 | 102 | 103 | 113 | alert('Book not available!'); 114 | 115 | "; 116 | die(); 117 | } 118 | $query = "select * from issue_table where book_name = '$user_book'"; 119 | $q = mysqli_query($con,$query); 120 | $r = mysqli_num_rows($q); 121 | if($r>0){ 122 | echo " 123 | 126 | "; 127 | die(); 128 | } 129 | 130 | $user = $_POST['name']; 131 | $book_name = $_POST['book']; 132 | $result = mysqli_query($con,"insert into issue_table(person_name,book_name) values('$user','$book_name') "); 133 | 134 | if($result == false){ 135 | echo ""; 138 | } 139 | } 140 | else{ 141 | echo ""; 142 | } 143 | 144 | ?> 145 | -------------------------------------------------------------------------------- /reserve.php: -------------------------------------------------------------------------------- 1 | 6 | window.location.href='login.php'; 7 | 8 | "; 9 | } 10 | ?> 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 43 | 44 | 45 |
46 |
47 | 48 |
49 |
50 | 51 |
52 |
53 |

Please enter details to reserve book :

54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 | 62 | 63 |
64 |
65 | 66 | Enter Book Name : 75 | 76 |
77 | "; 78 | } 79 | 80 | if(!$id){ 81 | echo " 82 | 83 | 84 |
85 | 86 | "; 87 | } 88 | 89 | 90 | ?> 91 |
92 |
93 | 94 | 95 |
96 | 97 | 98 |
99 | 100 | 101 | 108 | 121 | 122 | 131 | alert('Book not available!'); 132 | 133 | "; 134 | die(); 135 | } 136 | $query = "select * from reserve where book_name = '$user_book'"; 137 | $q = mysqli_query($con,$query); 138 | $r = mysqli_num_rows($q); 139 | if($r>0){ 140 | echo " 141 | 144 | "; 145 | die(); 146 | } 147 | $user = $_POST['name']; 148 | $book_name = $_POST['book']; 149 | $date = $_POST['date']; 150 | $result = mysqli_query($con,"insert into reserve(person_name,book_name,date) values('$user','$book_name','$date') "); 151 | if($result == true){ 152 | echo ""; 155 | } 156 | else{ 157 | echo ""; 160 | } 161 | } 162 | else{ 163 | echo ""; 164 | } 165 | 166 | ?> 167 | --------------------------------------------------------------------------------