Download Code – Air Conditioner Repair and Maintenance System using PHP and MySQL Source Code
AC Repair and Services System using PHP and MySQL – Free Download
This project is titled AC Repair and Services System
How does the AC Repair and Services System work?
Management Site:
This section is only accessible to the company’s management team. Users must log in with valid credentials to access the system’s features. The system has two user roles:
- Administrator: Has full access to all the features and functionalities of the system.
- Staff: Has limited permissions and can perform tasks such as managing services, bookings, and inquiries.
The management team can:
- Manage the list of services and bookings.
- Update page content of the public site dynamically.
Public Site:
On the public side, clients or potential clients can explore the services offered by the company. Visitors can view details about different services, make bookings, and submit inquiries to the management. To submit a booking request, clients need to fill in all required fields in the booking form.
Features and Functionalities
Management Site:
- Login and Logout functionality
- Dashboard displaying an overview
- Services Summary
- Booking Summary
- Image Slider to display featured services
- Services Management: Add, view, update, and delete services
- Booking Management: Manage and update booking details
- Inquiries Management: View and respond to inquiries
- User Management: Add, update, and delete users
- Company Contact Information management
- System Information and Account Details Update
Public Site:
- Home Page showcasing available services
- Service List and detailed information about each service
- About Us page
- Booking Request Form for clients to submit service requests
- Contact Page for inquiries or messages to the management
Technologies Used
The AC Repair and Services System was developed using the following technologies:
- XAMPP
- VS Code Editor
- PHP
- MySQL Database
- HTML
- CSS
- JavaScript
- jQuery
- Ajax
- Bootstrap Framework
- NiceAdmin Template
How to Run the System?
Requirements:
- Download and install a local web server such as XAMPP.
- Download the provided source code zip file.
System Installation/Setup:
- Enable the GD Library in your php.ini file.
- Open the XAMPP Control Panel and start Apache and MySQL.
- Extract the downloaded source code zip file.
- Copy the extracted folder and paste it into the htdocs directory of XAMPP.
- Open PHPMyAdmin in your browser (http://localhost/phpmyadmin).
- Create a new database named acrss_db.
- Import the acrss_db.sql file from the database folder.
- Open the AC Repair and Services System in your browser (http://localhost/php-acrss/).
Default Admin Access:
- Username: admin
- Password: sourcecodester&123
Conclusion
This AC Repair and Services System project, developed using PHP and MySQL, is available for free download. You are welcome to modify the source code according to your requirements. Please note that this project is intended for educational purposes only.
I hope this project will assist you in your PHP learning journey, and you find it useful for both current and future PHP projects.
index PHP
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 |
<?php require_once('./config.php'); ?> <!DOCTYPE html> <html lang="en"> <?php require_once('inc/header.php') ?> <body class="toggle-sidebar"> <style> #banner-slider{ height: 400px; } #banner-slider .carousel-inner { height: 100%; } #banner-slider img.d-block.w-100 { object-fit: cover; object-position: center center; } </style> <?php $page = isset($_GET['page']) ? $_GET['page'] : 'home'; ?> <?php $pageSplit = explode("/",$page); if(isset($pageSplit[1])) $pageSplit[1] = (strtolower($pageSplit[1]) == 'list') ? $pageSplit[0].' List' : $pageSplit[1]; ?> <?php require_once('inc/topBarNav.php') ?> <!-- Content Wrapper. Contains page content --> <main id="main" class="main"> <?php if(in_array($page, ['home'])): ?> <div class="col-12"> <div id="site-header" style="--bg: url(<?= validate_image($_settings->info('cover')) ?>)"> <div class="header-content"> <div class="siteTitle"><?= $_settings->info('name') ?></div> <hr class="border-light opacity-100 mx-auto" style="width:100px;border-width:3px"> <a href="<?= base_url.'?page=booking' ?>" class="btn btn-lg btn-primary rounded-pill col-lg-3 col-md-5 col-sm-7 col-10 mx-auto d-block">Book Now</a> </div> </div> </div> <?php endif; ?> <div class="container-xl px-4"> <div id="msg-container"> <?php if($_settings->chk_flashdata('success')): ?> <script> alert_toast("<?php echo $_settings->flashdata('success') ?>",'success') </script> <?php endif;?> </div> <?php if(!file_exists($page.".php") && !is_dir($page)){ include '404.html'; }else{ if(is_dir($page)) include $page.'/index.php'; else include $page.'.php'; } ?> </div> </main> <div class="modal fade" id="uni_modal" role='dialog'> <div class="modal-dialog modal-md modal-dialog-centered rounded-0" role="document"> <div class="modal-content rounded-0"> <div class="modal-header"> <h5 class="modal-title"></h5> </div> <div class="modal-body"> </div> <div class="modal-footer"> <button type="button" class="btn btn-primary bg-gradient-teal border-0 rounded-0" id='submit' onclick="$('#uni_modal form').submit()">Save</button> <button type="button" class="btn btn-secondary rounded-0" data-dismiss="modal">Cancel</button> </div> </div> </div> </div> <div class="modal fade" id="uni_modal_right" role='dialog'> <div class="modal-dialog modal-full-height modal-md rounded-0" role="document"> <div class="modal-content rounded-0"> <div class="modal-header"> <h5 class="modal-title"></h5> <button type="button" class="close" data-dismiss="modal" aria-label="Close"> <span class="fa fa-arrow-right"></span> </button> </div> <div class="modal-body"> </div> </div> </div> </div> <div class="modal fade" id="confirm_modal" role='dialog'> <div class="modal-dialog modal-md modal-dialog-centered rounded-0" role="document"> <div class="modal-content rounded-0"> <div class="modal-header"> <h5 class="modal-title">Confirmation</h5> </div> <div class="modal-body"> <div id="delete_content"></div> </div> <div class="modal-footer"> <button type="button" class="btn btn-primary bg-gradient-teal border-0 rounded-0" id='confirm' onclick="">Continue</button> <button type="button" class="btn btn-secondary rounded-0" data-dismiss="modal">Close</button> </div> </div> </div> </div> <div class="modal fade" id="viewer_modal" role='dialog'> <div class="modal-dialog modal-md" role="document"> <div class="modal-content"> <button type="button" class="btn-close" data-dismiss="modal"><span class="fa fa-times"></span></button> <img src="" alt=""> </div> </div> </div> <?php require_once('inc/footer.php') ?> </body> </html> |
login PHP
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 |
<?php require_once('../config.php') ?> <!DOCTYPE html> <html lang="en" class="" style="height: auto;"> <?php require_once('inc/header.php') ?> <body> <style> body{ background-image: url("<?php echo validate_image($_settings->info('cover')) ?>"); background-size:cover; background-repeat:no-repeat; backdrop-filter: brightness(.7); overflow-x:hidden; } /* #page-title{ text-shadow: 6px 4px 7px black; font-size: 3.5em; color: #fff4f4 !important; background: #8080801c; } */ .logo img { max-height: 55px; margin-right: 25px; } .logo span{ color: #fff; text-shadow:0px 0px 10px #000; } </style> <main> <div class="container"> <section class="section register min-vh-100 d-flex flex-column align-items-center justify-content-center py-4"> <div class="container"> <div class="row justify-content-center"> <div class="col-lg-4 col-md-6 d-flex flex-column align-items-center justify-content-center"> <div class="d-flex justify-content-center py-4"> <a href="index.html" class="logo d-flex align-items-center w-auto"> <img src="<?= validate_image($_settings->info('logo')) ?>" alt=""> <span class="d-none d-lg-block text-center"><?= $_settings->info('name') ?></span> </a> </div><!-- End Logo --> <div class="card mb-3"> <div class="card-body"> <div class="pt-4 pb-2"> <h5 class="card-title text-center pb-0 fs-4">Login to Your Account</h5> <p class="text-center small">Enter your username & password to login</p> </div> <form class="row g-3 needs-validation" novalidate id="login-frm"> <div class="col-12"> <label for="yourUsername" class="form-label">Username</label> <div class="input-group has-validation"> <span class="input-group-text" id="inputGroupPrepend">@</span> <input type="text" name="username" class="form-control" id="yourUsername" required> <div class="invalid-feedback">Please enter your username.</div> </div> </div> <div class="col-12"> <label for="yourPassword" class="form-label">Password</label> <input type="password" name="password" class="form-control" id="yourPassword" required> <div class="invalid-feedback">Please enter your password!</div> </div> <!-- <div class="col-12"> <div class="form-check"> <input class="form-check-input" type="checkbox" name="remember" value="true" id="rememberMe"> <label class="form-check-label" for="rememberMe">Remember me</label> </div> </div> --> <div class="col-12"> <button class="btn btn-primary w-100" type="submit">Login</button> </div> <!-- <div class="col-12"> <p class="small mb-0">Don't have account? <a href="pages-register.html">Create an account</a></p> </div> --> </form> </div> </div> <div class="credits"> <!-- All the links in the footer should remain intact. --> <!-- You can delete the links only if you purchased the pro version. --> <!-- Licensing information: https://bootstrapmade.com/license/ --> <!-- Purchase the pro version with working PHP/AJAX contact form: https://bootstrapmade.com/nice-admin-bootstrap-admin-html-template/ --> Template Designed by <a href="https://bootstrapmade.com/">BootstrapMade</a> </div> </div> </div> </div> </section> </div> </main> <a href="#" class="back-to-top d-flex align-items-center justify-content-center"><i class="bi bi-arrow-up-short"></i></a> <!-- jQuery --> <script src="<?= base_url ?>assets/js/jquery-3.6.4.min.js"></script> <script src="<?= base_url ?>assets/vendor/apexcharts/apexcharts.min.js"></script> <script src="<?= base_url ?>assets/vendor/bootstrap/js/bootstrap.bundle.min.js"></script> <script src="<?= base_url ?>assets/vendor/chart.js/chart.umd.js"></script> <script src="<?= base_url ?>assets/vendor/echarts/echarts.min.js"></script> <script src="<?= base_url ?>assets/vendor/quill/quill.min.js"></script> <script src="<?= base_url ?>assets/vendor/simple-datatables/simple-datatables.js"></script> <script src="<?= base_url ?>assets/vendor/tinymce/tinymce.min.js"></script> <script src="<?= base_url ?>assets/vendor/php-email-form/validate.js"></script> <script src="<?= base_url ?>assets/js/main.js"></script> <script> $(document).ready(function(){ end_loader(); }) </script> </body> </html> |
acrss_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 |
-- phpMyAdmin SQL Dump -- version 5.1.3 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Apr 28, 2023 at 07:00 AM -- Server version: 10.4.24-MariaDB -- PHP Version: 8.1.5 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; -- -- Database: `acrss_db` -- -- -------------------------------------------------------- -- -- Table structure for table `book_list` -- CREATE TABLE `book_list` ( `id` bigint(30) NOT NULL, `code` varchar(50) NOT NULL, `fullname` text NOT NULL, `contact` text NOT NULL, `email` text DEFAULT NULL, `address` text DEFAULT NULL, `status` tinyint(1) NOT NULL DEFAULT 0, `created_at` datetime NOT NULL DEFAULT current_timestamp(), `updated_at` datetime NOT NULL DEFAULT '0000-00-00 00:00:00' ON UPDATE current_timestamp() ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; -- -- Dumping data for table `book_list` -- INSERT INTO `book_list` (`id`, `code`, `fullname`, `contact`, `email`, `address`, `status`, `created_at`, `updated_at`) VALUES (1, '', 'Mark Cooper', '09123456789', 'mcooper@mail.com', 'Sample Address', 0, '2023-04-28 10:56:47', '2023-04-28 11:31:15'); -- -------------------------------------------------------- -- -- Table structure for table `book_services` -- CREATE TABLE `book_services` ( `id` bigint(30) NOT NULL, `book_id` bigint(30) NOT NULL, `service_id` bigint(30) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; -- -- Dumping data for table `book_services` -- INSERT INTO `book_services` (`id`, `book_id`, `service_id`) VALUES (0, 1, 1), (0, 1, 2), (0, 1, 1), (0, 1, 2), (0, 1, 1), (0, 1, 2), (0, 1, 1), (0, 1, 2), (0, 1, 1), (0, 1, 2); -- -------------------------------------------------------- -- -- Table structure for table `inquiry_list` -- CREATE TABLE `inquiry_list` ( `id` bigint(30) NOT NULL, `fullname` text NOT NULL, `contact` text NOT NULL, `email` text NOT NULL, `message` text NOT NULL, `status` 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; -- -- Dumping data for table `inquiry_list` -- INSERT INTO `inquiry_list` (`id`, `fullname`, `contact`, `email`, `message`, `status`, `created_at`, `updated_at`) VALUES (1, 'Mark Cooper', '09123456789', 'mcooper@mail.com', 'Sample address', 1, '2023-04-28 11:25:07', '2023-04-28 11:29:02'); -- -------------------------------------------------------- -- -- Table structure for table `service_list` -- CREATE TABLE `service_list` ( `id` bigint(30) NOT NULL, `name` text NOT NULL, `description` text NOT NULL, `price` float(12,2) NOT NULL DEFAULT 0.00, `image_path` text DEFAULT NULL, `status` tinyint(1) NOT NULL DEFAULT 1, `created_at` datetime NOT NULL DEFAULT current_timestamp(), `updated_at` datetime NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; -- -- Dumping data for table `service_list` -- INSERT INTO `service_list` (`id`, `name`, `description`, `price`, `image_path`, `status`, `created_at`, `updated_at`) VALUES (1, 'AC Split Type Repair', '<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean nec mi vitae nisl vehicula tempus. Aliquam nec tempor dui, id condimentum est. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Donec venenatis nulla vel tellus porta, ut pellentesque elit semper.</p>\r\n<p>Duis finibus vel elit id posuere. Phasellus et varius orci. Nunc sollicitudin semper lectus, eu lacinia turpis dictum ac. Nulla nec felis vitae diam eleifend accumsan eget elementum orci. Maecenas vitae tristique ex, venenatis ornare sapien. Donec mattis gravida leo, ut iaculis mauris scelerisque vel.</p>\r\n<p>Phasellus augue lectus, ultrices ac nisi ut, elementum vestibulum lorem. Curabitur leo velit, fringilla non mi quis, congue facilisis ex. Nunc hendrerit lectus in ante elementum, sit amet tempor lectus aliquet.</p>', 3800.00, 'uploads/services/1.png?v=1682645421', 1, '2023-04-28 09:30:20', '0000-00-00 00:00:00'), (2, 'AC Window Type Repair', '<p>Sed non lacus quis sapien cursus volutpat. Nam dignissim nulla pretium, sodales nunc vitae, iaculis nulla. Curabitur erat sapien, mattis vitae consectetur imperdiet, ultrices sed magna. Phasellus vel porttitor nisi. Maecenas ac ipsum ligula. Aliquam erat volutpat. Fusce eget urna nisl.</p>\r\n<p>Sed ante sem, rutrum vitae elit sed, facilisis pharetra purus. Mauris dictum metus sed massa bibendum tempor. Sed quis elementum metus, ac euismod enim. Curabitur semper nisi justo, id faucibus nisi sagittis eget. Pellentesque mollis metus ut auctor pulvinar.</p>\r\n<p>Aliquam malesuada eleifend eleifend. Curabitur pulvinar vehicula augue eu tincidunt. Aliquam accumsan metus ac eros pulvinar elementum.</p>', 2500.00, 'uploads/services/2.png?v=1682646346', 1, '2023-04-28 09:45:46', '0000-00-00 00:00:00'), (3, 'Central AC Repair', '<p>Donec mi mi, ullamcorper posuere leo et, faucibus ultrices sapien. Donec rhoncus sem lacinia, vestibulum metus a, blandit purus. Integer massa felis, pretium at nulla ut, tempor tempus mi. Pellentesque tincidunt sem sit amet maximus ultrices. Aliquam fringilla vitae dui vitae dapibus.</p>\r\n<p>Cras aliquet risus eget nisi imperdiet convallis. Cras sit amet massa a nunc hendrerit suscipit. Nulla sapien ipsum, faucibus condimentum scelerisque at, facilisis ac metus. Mauris pretium lacinia dui, ac vehicula lectus scelerisque sed. Donec convallis eros enim, et finibus metus faucibus et.</p>', 4500.00, 'uploads/services/3.png?v=1682646441', 1, '2023-04-28 09:47:21', '0000-00-00 00:00:00'); -- -------------------------------------------------------- -- -- 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; -- -- Dumping data for table `system_info` -- INSERT INTO `system_info` (`id`, `meta_field`, `meta_value`) VALUES (1, 'name', 'AC Repair and Services System'), (6, 'short_name', 'PHP - ACRSS'), (11, 'logo', 'uploads/logo.png?v=1682644082'), (13, 'user_avatar', 'uploads/user_avatar.jpg'), (14, 'cover', 'uploads/cover.png?v=1682644550'), (17, 'phone', '456-888-111'), (18, 'mobile', '09456555112'), (19, 'email', 'info@acrepairaservice.com'), (20, 'address', '553 Haul Road, Mountain View, CA, 94041'); -- -------------------------------------------------------- -- -- 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 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', '$2y$10$lu9Lz9d61nsRRq5aXGOrmuik6tzhMif.AIQTmxgj4LTHf3M9hyGtW', 'uploads/avatars/1.png?v=1678760026', NULL, 1, '2021-01-20 14:02:37', '2023-04-26 16:01:02'), (9, 'Claire', '', 'Blake', 'cblake', '$2y$10$DFEet3AmXnsVKls912SbHey87bsXauL7nannya2CjtV7m37dNZhNe', 'uploads/avatars/9.png?v=1682495668', NULL, 2, '2023-04-26 15:54:27', '2023-04-26 16:02:36'); -- -- Indexes for dumped tables -- -- -- Indexes for table `book_list` -- ALTER TABLE `book_list` ADD PRIMARY KEY (`id`); -- -- Indexes for table `book_services` -- ALTER TABLE `book_services` ADD KEY `book_id_fk` (`book_id`), ADD KEY `service_id_fk` (`service_id`); -- -- Indexes for table `inquiry_list` -- ALTER TABLE `inquiry_list` ADD PRIMARY KEY (`id`); -- -- Indexes for table `service_list` -- ALTER TABLE `service_list` ADD PRIMARY KEY (`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 `book_list` -- ALTER TABLE `book_list` MODIFY `id` bigint(30) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2; -- -- AUTO_INCREMENT for table `inquiry_list` -- ALTER TABLE `inquiry_list` MODIFY `id` bigint(30) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2; -- -- AUTO_INCREMENT for table `service_list` -- ALTER TABLE `service_list` MODIFY `id` bigint(30) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4; -- -- 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=10; -- -- Constraints for dumped tables -- -- -- Constraints for table `book_services` -- ALTER TABLE `book_services` ADD CONSTRAINT `book_id_fk` FOREIGN KEY (`book_id`) REFERENCES `book_list` (`id`) ON DELETE CASCADE ON UPDATE NO ACTION, ADD CONSTRAINT `service_id_fk` FOREIGN KEY (`service_id`) REFERENCES `service_list` (`id`) ON DELETE CASCADE ON UPDATE NO ACTION; COMMIT; |