download code- PHP Project – Employee management system
Computer Laboratory Management System Overview
The Computer Laboratory Management System is a web application built using PHP and MySQL. It is designed to simplify the process of managing and tracking the borrowing of equipment and supplies in a school’s computer lab. The system provides a user-friendly interface with several features that make it easy for staff to use.
What is the Computer Laboratory Management System?
This system is exclusively for registered staff in the school’s computer lab. It allows users to manage and store information about lab supplies, track borrowed items, and monitor inventory levels.
Features and Functionalities
The Computer Laboratory Management System offers a variety of functions to make the management of the lab efficient and organized. Below are its key features:
- Login Page: Secure login for authorized users.
- Dashboard Page: A central page to overview the lab’s status.
- Total Supply Category: Manage different types of supplies in the lab.
- Pending Borrowed Items: Track items that are yet to be returned.
- Category Management:
- Add new categories.
- List, edit, view, and delete category details.
- Item Management:
- Add, edit, view, and delete items.
- Keep track of all items in the system.
- Borrows Management:
- Record borrowed items.
- Edit, view, and delete borrow records.
- Damage Management:
- Record damaged items.
- Edit, view, and delete damage records.
- Items Inventory: Monitor the availability of supplies.
- User Management:
- Add, edit, and delete user accounts.
- Update system and account information.
Technologies Used
The system is developed using the following technologies:
- PHP: For server-side scripting.
- MySQL Database: For managing data storage.
- HTML, CSS: For creating the structure and styling the pages.
- JavaScript, jQuery: For adding interactivity.
- DataTables: For handling table data efficiently.
- Bootstrap Framework: For responsive design.
- AdminLTE Template: For the admin panel layout.
- Select2 Library: For enhancing select boxes.
- FontAwesome Icons: For visual icons.
How to Run the System
Requirements:
- Install a local web server like XAMPP.
System Installation/Setup:
- Enable the GD Library in your php.ini file.
- Open the XAMPP Control Panel and start Apache and MySQL.
- Download and extract the provided source code zip file.
- Copy the extracted folder to the XAMPP “htdocs” directory.
- Go to PHPMyAdmin in your browser (http://localhost/phpmyadmin).
- Create a new database called
lms_db
. - Import the SQL file (
lms_db.sql
) found in thedatabase
folder of the extracted code. - Open the system in your browser at (http://localhost/php-lms/).
index.php
1 2 3 4 |
<?php require_once('config.php'); redirect('admin') ?> |
initialize.php
1 2 3 4 5 6 7 8 9 10 |
<?php $dev_data = array('id'=>'-1','firstname'=>'Developer','lastname'=>'','username'=>'dev_oretnom','password'=>'5da283a2d990e8d8512cf967df5bc0d0','last_login'=>'','date_updated'=>'','date_added'=>''); if(!defined('base_url')) define('base_url','http://localhost/php-lms/'); if(!defined('base_app')) define('base_app', str_replace('\\','/',__DIR__).'/' ); // if(!defined('dev_data')) define('dev_data',$dev_data); if(!defined('DB_SERVER')) define('DB_SERVER',"localhost"); if(!defined('DB_USERNAME')) define('DB_USERNAME',"root"); if(!defined('DB_PASSWORD')) define('DB_PASSWORD',""); if(!defined('DB_NAME')) define('DB_NAME',"lms_db"); ?> |
lms_db.sql
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 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 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 |
-- phpMyAdmin SQL Dump -- version 5.2.1 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Mar 27, 2024 at 09:32 AM -- Server version: 10.4.32-MariaDB -- PHP Version: 8.2.12 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; -- -- Database: `lms_db` -- -- -------------------------------------------------------- -- -- Table structure for table `category_list` -- CREATE TABLE `category_list` ( `id` int(11) NOT NULL, `name` text NOT NULL, `description` text NOT NULL, `image_path` text DEFAULT NULL, `status` tinyint(1) NOT NULL DEFAULT 1, `delete_flag` tinyint(1) NOT NULL DEFAULT 0, `created_at` datetime NOT NULL DEFAULT current_timestamp(), `updated_at` datetime DEFAULT NULL ON UPDATE current_timestamp() ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; -- -- Dumping data for table `category_list` -- INSERT INTO `category_list` (`id`, `name`, `description`, `image_path`, `status`, `delete_flag`, `created_at`, `updated_at`) VALUES (1, 'Mouse', 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer molestie ipsum ornare nunc pellentesque, ut iaculis diam facilisis.', 'uploads/category_images/1.png?v=1711442416', 1, 0, '2024-03-26 16:40:16', '2024-03-26 16:40:16'), (2, 'Projector', 'Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Duis sed suscipit nulla, ac aliquam metus.', 'uploads/category_images/2.png?v=1711442909', 1, 0, '2024-03-26 16:48:27', '2024-03-26 16:52:17'); -- -------------------------------------------------------- -- -- Table structure for table `damage_list` -- CREATE TABLE `damage_list` ( `id` int(11) NOT NULL, `code` varchar(20) NOT NULL, `item_id` int(11) NOT NULL, `description` text NOT NULL, `status` tinyint(1) NOT NULL DEFAULT 0 COMMENT '0=damage,\r\n1= fixed', `delete_flag` tinyint(1) NOT NULL DEFAULT 0, `created_at` datetime NOT NULL DEFAULT current_timestamp(), `updated_at` datetime DEFAULT NULL ON UPDATE current_timestamp() ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; -- -- Dumping data for table `damage_list` -- INSERT INTO `damage_list` (`id`, `code`, `item_id`, `description`, `status`, `delete_flag`, `created_at`, `updated_at`) VALUES (1, 'D-0000000002', 6, 'test 123', 0, 0, '2024-03-27 15:47:25', '2024-03-27 15:49:06'); -- -------------------------------------------------------- -- -- Table structure for table `item_list` -- CREATE TABLE `item_list` ( `id` int(11) NOT NULL, `category_id` int(11) NOT NULL, `code` varchar(15) NOT NULL, `description` text NOT NULL, `status` tinyint(1) NOT NULL DEFAULT 1, `delete_flag` tinyint(1) NOT NULL DEFAULT 0, `created_at` datetime NOT NULL DEFAULT current_timestamp(), `updated_at` datetime DEFAULT NULL ON UPDATE current_timestamp() ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; -- -- Dumping data for table `item_list` -- INSERT INTO `item_list` (`id`, `category_id`, `code`, `description`, `status`, `delete_flag`, `created_at`, `updated_at`) VALUES (1, 1, 'M-1001', 'Duis sed suscipit nulla, ac aliquam metus.', 1, 0, '2024-03-27 11:21:36', '2024-03-27 11:47:20'), (2, 1, 'M-1002', 'nteger hendrerit nibh eu est cursus mollis. In aliquam lobortis ipsum.', 1, 0, '2024-03-27 11:23:38', '2024-03-27 11:47:28'), (3, 1, 'M-1003', 'N/A', 1, 0, '2024-03-27 11:23:50', '2024-03-27 11:47:36'), (4, 2, 'P-1001', 'N/A', 1, 0, '2024-03-27 11:24:04', '2024-03-27 11:47:43'), (5, 2, 'P-1002', 'N/A', 1, 0, '2024-03-27 11:24:16', '2024-03-27 11:47:51'), (6, 2, 'P-1003', 'N/A', 1, 0, '2024-03-27 11:24:26', '2024-03-27 11:47:57'); -- -------------------------------------------------------- -- -- Table structure for table `record_item_list` -- CREATE TABLE `record_item_list` ( `id` bigint(30) NOT NULL, `record_id` int(11) NOT NULL, `item_id` int(11) NOT NULL, `created_at` datetime NOT NULL DEFAULT current_timestamp(), `updated_at` datetime DEFAULT NULL ON UPDATE current_timestamp() ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; -- -- Dumping data for table `record_item_list` -- INSERT INTO `record_item_list` (`id`, `record_id`, `item_id`, `created_at`, `updated_at`) VALUES (3, 1, 1, '2024-03-27 14:45:24', NULL); -- -------------------------------------------------------- -- -- Table structure for table `record_list` -- CREATE TABLE `record_list` ( `id` int(11) NOT NULL, `code` varchar(20) NOT NULL, `type` tinyint(5) NOT NULL COMMENT '1=Borrowed\r\n2=Damaged', `availability` tinyint(1) NOT NULL COMMENT '1 = available\r\n0 = unavailable', `user_id` int(11) NOT NULL, `delete_flag` tinyint(1) NOT NULL DEFAULT 0 COMMENT '0 = not deleted\r\n1 = deleted', `created_at` datetime NOT NULL DEFAULT current_timestamp(), `updated_at` datetime DEFAULT NULL ON UPDATE current_timestamp() ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; -- -- Dumping data for table `record_list` -- INSERT INTO `record_list` (`id`, `code`, `type`, `availability`, `user_id`, `delete_flag`, `created_at`, `updated_at`) VALUES (1, 'REC-0000000001', 1, 1, 1, 0, '2024-03-27 14:25:02', '2024-03-27 16:23:03'); -- -------------------------------------------------------- -- -- Table structure for table `record_meta` -- CREATE TABLE `record_meta` ( `id` bigint(30) NOT NULL, `record_id` int(11) NOT NULL, `meta_name` text NOT NULL, `meta_value` text NOT NULL, `created_at` datetime NOT NULL DEFAULT current_timestamp(), `updated_at` datetime DEFAULT NULL ON UPDATE current_timestamp() ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; -- -- Dumping data for table `record_meta` -- INSERT INTO `record_meta` (`id`, `record_id`, `meta_name`, `meta_value`, `created_at`, `updated_at`) VALUES (1, 1, 'borrower', 'Student', '2024-03-27 14:25:03', NULL), (2, 1, 'borrower_name', 'John Smith', '2024-03-27 14:25:03', NULL), (3, 1, 'faculty_department', '', '2024-03-27 14:25:03', NULL), (4, 1, 'student_year_sec', 'BSIS 4A', '2024-03-27 14:25:03', NULL), (5, 1, 'staff_department', '', '2024-03-27 14:25:03', NULL), (6, 1, 'borrowed_date', '2024-03-27', '2024-03-27 14:25:03', NULL), (7, 1, 'remarks', 'test', '2024-03-27 14:25:03', NULL), (8, 1, 'returned_date', '2024-03-27', '2024-03-27 14:45:24', '2024-03-27 16:23:03'); -- -------------------------------------------------------- -- -- Table structure for table `system_info` -- CREATE TABLE `system_info` ( `id` int(30) NOT NULL, `meta_field` text NOT NULL, `meta_value` text NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; -- -- Dumping data for table `system_info` -- INSERT INTO `system_info` (`id`, `meta_field`, `meta_value`) VALUES (1, 'name', 'Simple Laboratory Management System'), (6, 'short_name', 'LMS - PHP'), (11, 'logo', 'uploads/logo.png?v=1711440657'), (13, 'user_avatar', 'uploads/user_avatar.jpg'), (14, 'cover', 'uploads/cover.png?v=1711440657'), (17, 'phone', '456-987-1231'), (18, 'mobile', '09123456987 / 094563212222 '), (19, 'email', 'info@musicschool.com'), (20, 'address', 'Here St, Down There City, Anywhere Here, 2306 -updated'); -- -------------------------------------------------------- -- -- Table structure for table `users` -- CREATE TABLE `users` ( `id` int(50) NOT NULL, `firstname` varchar(250) NOT NULL, `middlename` text DEFAULT NULL, `lastname` varchar(250) NOT NULL, `username` text NOT NULL, `password` text NOT NULL, `avatar` text DEFAULT NULL, `last_login` datetime DEFAULT NULL, `type` tinyint(1) NOT NULL DEFAULT 0, `date_added` datetime NOT NULL DEFAULT current_timestamp(), `date_updated` datetime DEFAULT current_timestamp() ON UPDATE current_timestamp() ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='2'; -- -- Dumping data for table `users` -- INSERT INTO `users` (`id`, `firstname`, `middlename`, `lastname`, `username`, `password`, `avatar`, `last_login`, `type`, `date_added`, `date_updated`) VALUES (1, 'Adminstrator', '', 'Admin', 'admin', '0192023a7bbd73250516f069df18b500', 'uploads/avatars/1.png?v=1649834664', NULL, 1, '2021-01-20 14:02:37', '2022-05-16 14:17:49'), (6, 'Mike', '', 'Williams', 'mwilliams', '3cc93e9a6741d8b40460457139cf8ced', 'uploads/avatars/6.png?v=1653980749', NULL, 2, '2022-05-31 15:05:49', '2022-05-31 15:05:49'); -- -- Indexes for dumped tables -- -- -- Indexes for table `category_list` -- ALTER TABLE `category_list` ADD PRIMARY KEY (`id`); -- -- Indexes for table `damage_list` -- ALTER TABLE `damage_list` ADD PRIMARY KEY (`id`); -- -- Indexes for table `item_list` -- ALTER TABLE `item_list` ADD PRIMARY KEY (`id`), ADD KEY `item_category_id_fk` (`category_id`); -- -- Indexes for table `record_item_list` -- ALTER TABLE `record_item_list` ADD PRIMARY KEY (`id`), ADD KEY `record_item_rid_fk` (`record_id`), ADD KEY `item_list_id_fk` (`item_id`); -- -- Indexes for table `record_list` -- ALTER TABLE `record_list` ADD PRIMARY KEY (`id`), ADD KEY `record_user_id_fk` (`user_id`); -- -- Indexes for table `record_meta` -- ALTER TABLE `record_meta` ADD PRIMARY KEY (`id`), ADD KEY `record_id_fk` (`record_id`); -- -- Indexes for table `system_info` -- ALTER TABLE `system_info` ADD PRIMARY KEY (`id`); -- -- Indexes for table `users` -- ALTER TABLE `users` ADD PRIMARY KEY (`id`); -- -- AUTO_INCREMENT for dumped tables -- -- -- AUTO_INCREMENT for table `category_list` -- ALTER TABLE `category_list` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4; -- -- AUTO_INCREMENT for table `damage_list` -- ALTER TABLE `damage_list` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2; -- -- AUTO_INCREMENT for table `item_list` -- ALTER TABLE `item_list` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=8; -- -- AUTO_INCREMENT for table `record_item_list` -- ALTER TABLE `record_item_list` MODIFY `id` bigint(30) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4; -- -- AUTO_INCREMENT for table `record_list` -- ALTER TABLE `record_list` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2; -- -- AUTO_INCREMENT for table `record_meta` -- ALTER TABLE `record_meta` MODIFY `id` bigint(30) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=9; -- -- AUTO_INCREMENT for table `system_info` -- ALTER TABLE `system_info` MODIFY `id` int(30) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=21; -- -- AUTO_INCREMENT for table `users` -- ALTER TABLE `users` MODIFY `id` int(50) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=7; -- -- Constraints for dumped tables -- -- -- Constraints for table `item_list` -- ALTER TABLE `item_list` ADD CONSTRAINT `item_category_id_fk` FOREIGN KEY (`category_id`) REFERENCES `category_list` (`id`) ON DELETE CASCADE ON UPDATE NO ACTION; -- -- Constraints for table `record_item_list` -- ALTER TABLE `record_item_list` ADD CONSTRAINT `item_list_id_fk` FOREIGN KEY (`item_id`) REFERENCES `item_list` (`id`) ON DELETE CASCADE ON UPDATE NO ACTION, ADD CONSTRAINT `record_item_rid_fk` FOREIGN KEY (`record_id`) REFERENCES `record_list` (`id`) ON DELETE CASCADE ON UPDATE NO ACTION; -- -- Constraints for table `record_list` -- ALTER TABLE `record_list` ADD CONSTRAINT `record_user_id_fk` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE ON UPDATE NO ACTION; -- -- Constraints for table `record_meta` -- ALTER TABLE `record_meta` ADD CONSTRAINT `record_id_fk` FOREIGN KEY (`record_id`) REFERENCES `record_list` (`id`) ON DELETE CASCADE ON UPDATE NO ACTION; COMMIT; |