Online Computer and Laptop Store – Project Overview
This project, titled Online Computer and Laptop Store, is a web application designed to offer an online platform for a computer store or business. It allows potential customers to browse and order products. The application is built using PHP and MySQL, with a user-friendly interface created with the Bootstrap framework and AdminLTE template. It features multiple functionalities that enhance the user experience.
How the Online Computer and Laptop Store Works
The Online Computer and Laptop Store is divided into two main modules: the Management Site and the Client Site. Public visitors can browse the store’s product offerings.
Management Site:
This part of the system is restricted to store management. The admin can manage:
- Product list
- Product categories and sub-categories
- Inventory
- Orders
- Generate sales reports
All of these features support CRUD operations (Create, Read, Update, Delete). The management can also update the status of orders and payments.
Client Site:
The Client Site allows customers to explore products available in the store. Customers can:
- Search for products
- Filter products by category, sub-category, or brand
- View detailed product information, including price and availability
- Add products to their shopping cart for checkout
The system also integrates PayPal sandbox API for cashless payments. The management can update dynamic site information like the site name, logo, and banners.
Features and Functionalities
Administrator Features:
- Login and logout
- Dashboard page
- Manage product categories, sub-categories, and brands
- Manage the product list and inventory
- Handle order management
- Generate date-wise sales reports
- Update system information
- Manage user accounts
Client-Side Features:
- View product list
- Filter products by brand, category, and sub-category
- Search for products
- User registration and login
- Add products to shopping cart
- Checkout and make payments via PayPal API
- View order list
- Logout
Technologies Used
- XAMPP (Local web server)
- VS Code Editor
- PHP
- MySQL Database
- HTML
- JavaScript
- jQuery
- Ajax Requests
- Bootstrap Framework
- AdminLTE Template
Download and Installation Instructions
Requirements:
- Download and install a local web server like XAMPP.
- Download the provided source code zip file.
System Setup:
- Enable the GD Library in your php.ini file.
- Start Apache and MySQL from the XAMPP Control Panel.
- Extract the downloaded source code zip file.
- Copy the extracted folder into the htdocs directory of XAMPP.
- Open PHPMyAdmin in your browser (http://localhost/phpmyadmin).
- Create a new database called
ocls_db
. - Import the SQL file (
ocls_db.sql
) found in the database folder. - Access the Online Computer and Laptop Store in your browser at:
- Client Site:
http://localhost/php-ocls/
- Management Site:
http://localhost/php-ocls/admin/
- Client Site:
Default Admin Access:
- Username: admin
- Password: admin&123
Conclusion
This Online Computer and Laptop Store project is created for educational purposes and can be modified to meet your specific needs. Feel free to download, edit, and use the source code for your personal or future 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 |
<?php require_once('../config.php'); ?> <!DOCTYPE html> <html lang="en" class="" style="height: auto;"> <?php require_once('inc/header.php') ?> <body class="sidebar-mini layout-fixed control-sidebar-slide-open layout-navbar-fixed sidebar-mini-md sidebar-mini-xs text-sm" data-new-gr-c-s-check-loaded="14.991.0" data-gr-ext-installed="" style="height: auto;"> <div class="wrapper"> <?php require_once('inc/topBarNav.php') ?> <?php require_once('inc/navigation.php') ?> <?php $page = isset($_GET['page']) ? $_GET['page'] : 'home'; ?> <!-- Content Wrapper. Contains page content --> <div class="content-wrapper pt-3" style="min-height: 567.854px;"> <!-- Main content --> <section class="content text-dark"> <div class="container-fluid"> <?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> </section> <!-- /.content --> <div class="modal fade" id="confirm_modal" role='dialog'> <div class="modal-dialog modal-md modal-dialog-centered" role="document"> <div class="modal-content"> <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" id='confirm' onclick="">Continue</button> <button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button> </div> </div> </div> </div> <div class="modal fade" id="uni_modal" role='dialog'> <div class="modal-dialog modal-md modal-dialog-centered" role="document"> <div class="modal-content"> <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" id='submit' onclick="$('#uni_modal form').submit()">Save</button> <button type="button" class="btn btn-secondary" 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" role="document"> <div class="modal-content"> <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="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> </div> <!-- /.content-wrapper --> <?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 |
<?php require_once('../config.php') ?> <!DOCTYPE html> <html lang="en" class="" style="height: auto;"> <?php require_once('inc/header.php') ?> <body class="hold-transition login-page"> <script> start_loader() </script> <style> body{ background-image: url("<?php echo validate_image($_settings->info('cover')) ?>"); background-size:cover; background-repeat:no-repeat; backdrop-filter: contrast(1); } #page-title{ text-shadow: 6px 4px 7px black; font-size: 3.5em; color: #fff4f4 !important; background: #8080801c; } </style> <h1 class="text-center text-white px-4 py-5" id="page-title"><b><?php echo $_settings->info('name') ?></b></h1> <div class="login-box"> <!-- /.login-logo --> <div class="card card-primary my-2"> <div class="card-body"> <p class="login-box-msg">Please enter your credentials</p> <form id="login-frm" action="" method="post"> <div class="input-group mb-3"> <input type="text" class="form-control" name="username" autofocus placeholder="Username"> <div class="input-group-append"> <div class="input-group-text"> <span class="fas fa-user"></span> </div> </div> </div> <div class="input-group mb-3"> <input type="password" class="form-control" name="password" placeholder="Password"> <div class="input-group-append"> <div class="input-group-text"> <span class="fas fa-lock"></span> </div> </div> </div> <div class="row"> <div class="col-8"> <a href="<?php echo base_url ?>">Go to Website</a> </div> <!-- /.col --> <div class="col-4"> <button type="submit" class="btn btn-primary btn-block">Sign In</button> </div> <!-- /.col --> </div> </form> <!-- /.social-auth-links --> <!-- <p class="mb-1"> <a href="forgot-password.html">I forgot my password</a> </p> --> </div> <!-- /.card-body --> </div> <!-- /.card --> </div> <!-- /.login-box --> <!-- jQuery --> <script src="plugins/jquery/jquery.min.js"></script> <!-- Bootstrap 4 --> <script src="plugins/bootstrap/js/bootstrap.bundle.min.js"></script> <!-- AdminLTE App --> <script src="dist/js/adminlte.min.js"></script> <script> $(document).ready(function(){ end_loader(); }) </script> </body> </html> |
ocls_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 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 |
-- phpMyAdmin SQL Dump -- version 5.1.3 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Apr 03, 2023 at 07:49 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: `ocls_db` -- -- -------------------------------------------------------- -- -- Table structure for table `brands` -- CREATE TABLE `brands` ( `id` int(30) NOT NULL, `name` varchar(250) NOT NULL, `description` text DEFAULT NULL, `status` tinyint(1) NOT NULL DEFAULT 1, `date_created` datetime NOT NULL DEFAULT current_timestamp() ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; -- -- Dumping data for table `brands` -- INSERT INTO `brands` (`id`, `name`, `description`, `status`, `date_created`) VALUES (1, 'Asus', 'AZUS Brand', 1, '2023-04-03 09:25:50'), (2, 'Acer', 'Acer Brand', 1, '2023-04-03 09:26:04'), (3, 'Alienware', 'Alienware Brand', 1, '2023-04-03 09:26:32'), (4, 'Dell', 'Dell Brand', 1, '2023-04-03 09:28:59'), (5, 'HP', 'HP Brand', 1, '2023-04-03 09:29:24'), (6, 'Lenovo', 'Lenovo Brand', 1, '2023-04-03 09:29:53'); -- -------------------------------------------------------- -- -- Table structure for table `cart` -- CREATE TABLE `cart` ( `id` int(30) NOT NULL, `client_id` int(30) NOT NULL, `inventory_id` int(30) NOT NULL, `price` double NOT NULL, `quantity` int(30) NOT NULL, `date_created` datetime NOT NULL DEFAULT current_timestamp() ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; -- -------------------------------------------------------- -- -- Table structure for table `categories` -- CREATE TABLE `categories` ( `id` int(30) NOT NULL, `category` varchar(250) NOT NULL, `description` text DEFAULT NULL, `status` tinyint(1) NOT NULL DEFAULT 1, `date_created` datetime NOT NULL DEFAULT current_timestamp() ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; -- -- Dumping data for table `categories` -- INSERT INTO `categories` (`id`, `category`, `description`, `status`, `date_created`) VALUES (1, 'Personal Computers', 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut rutrum, elit sit amet iaculis eleifend, risus enim accumsan libero, vel commodo ante neque at mi. Donec consectetur magna turpis, ac tempor sapien tristique eget.', 1, '2023-04-03 09:32:09'), (2, 'Minicomputer', 'Suspendisse porta aliquet finibus. Interdum et malesuada fames ac ante ipsum primis in faucibus', 1, '2023-04-03 09:33:26'), (3, 'Mainframe Computers', 'Donec rhoncus diam nisi. Cras vehicula lorem et leo dignissim pharetra nec ac nisl. Curabitur scelerisque scelerisque felis, a lacinia odio elementum id.', 1, '2023-04-03 09:33:45'), (4, 'Super Computers', 'Praesent sollicitudin quam vitae lorem finibus, at feugiat est lobortis. Etiam vitae imperdiet neque. In magna ligula, lobortis sed porta quis, sodales vel libero.', 1, '2023-04-03 09:34:22'); -- -------------------------------------------------------- -- -- Table structure for table `clients` -- CREATE TABLE `clients` ( `id` int(30) NOT NULL, `firstname` varchar(250) NOT NULL, `lastname` varchar(250) NOT NULL, `gender` varchar(20) NOT NULL, `contact` varchar(15) NOT NULL, `email` varchar(250) NOT NULL, `password` text NOT NULL, `default_delivery_address` text NOT NULL, `date_created` datetime NOT NULL DEFAULT current_timestamp() ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; -- -- Dumping data for table `clients` -- INSERT INTO `clients` (`id`, `firstname`, `lastname`, `gender`, `contact`, `email`, `password`, `default_delivery_address`, `date_created`) VALUES (1, 'Mark', 'Cooper', 'Male', '09123654789', 'mcooper@mail.com', '$2y$10$GfYNgIJ8E86XdO6ZA5qwW.55KzSqyl9FDOpVCEZVYmaqwKjCCezKa', 'Sample Address Only', '2023-04-03 13:05:15'); -- -------------------------------------------------------- -- -- Table structure for table `inventory` -- CREATE TABLE `inventory` ( `id` int(30) NOT NULL, `product_id` int(30) NOT NULL, `quantity` double NOT NULL, `date_created` datetime NOT NULL DEFAULT current_timestamp(), `date_updated` datetime DEFAULT NULL ON UPDATE current_timestamp() ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; -- -- Dumping data for table `inventory` -- INSERT INTO `inventory` (`id`, `product_id`, `quantity`, `date_created`, `date_updated`) VALUES (1, 1, 10, '2023-04-03 11:30:20', NULL), (2, 2, 15, '2023-04-03 13:48:35', NULL); -- -------------------------------------------------------- -- -- Table structure for table `orders` -- CREATE TABLE `orders` ( `id` int(30) NOT NULL, `client_id` int(30) NOT NULL, `delivery_address` text NOT NULL, `payment_method` varchar(100) NOT NULL, `order_type` tinyint(1) NOT NULL COMMENT '1= pickup,2= deliver', `amount` double NOT NULL, `status` tinyint(2) NOT NULL DEFAULT 0, `paid` tinyint(1) NOT NULL DEFAULT 0, `date_created` datetime NOT NULL DEFAULT current_timestamp(), `date_updated` datetime DEFAULT NULL ON UPDATE current_timestamp() ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; -- -- Dumping data for table `orders` -- INSERT INTO `orders` (`id`, `client_id`, `delivery_address`, `payment_method`, `order_type`, `amount`, `status`, `paid`, `date_created`, `date_updated`) VALUES (3, 1, 'Sample Address Only', 'cod', 1, 99999, 3, 1, '2023-04-03 13:09:19', '2023-04-03 13:14:47'); -- -------------------------------------------------------- -- -- Table structure for table `order_list` -- CREATE TABLE `order_list` ( `id` int(30) NOT NULL, `order_id` int(30) NOT NULL, `product_id` int(30) NOT NULL, `quantity` int(30) NOT NULL, `price` double NOT NULL, `total` double NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; -- -- Dumping data for table `order_list` -- INSERT INTO `order_list` (`id`, `order_id`, `product_id`, `quantity`, `price`, `total`) VALUES (1, 3, 1, 1, 99999, 99999); -- -------------------------------------------------------- -- -- Table structure for table `products` -- CREATE TABLE `products` ( `id` int(30) NOT NULL, `brand_id` int(30) NOT NULL, `category_id` int(30) NOT NULL, `sub_category_id` int(30) NOT NULL, `name` varchar(250) NOT NULL, `price` float(12,2) NOT NULL DEFAULT 0.00, `status` tinyint(1) NOT NULL DEFAULT 1, `date_created` datetime NOT NULL DEFAULT current_timestamp() ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; -- -- Dumping data for table `products` -- INSERT INTO `products` (`id`, `brand_id`, `category_id`, `sub_category_id`, `name`, `price`, `status`, `date_created`) VALUES (1, 2, 1, 0, 'Acer Predator Helios 300 PH315-52 (PH315-52-581R)', 99999.00, 1, '2023-04-03 10:48:32'), (2, 2, 1, 2, 'Acer Aspire 3 A315-24P (A315-24P-R5XG)', 31349.00, 1, '2023-04-03 13:46:54'); -- -------------------------------------------------------- -- -- Table structure for table `sales` -- CREATE TABLE `sales` ( `id` int(30) NOT NULL, `order_id` int(30) NOT NULL, `total_amount` double NOT NULL, `date_created` datetime NOT NULL DEFAULT current_timestamp() ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; -- -- Dumping data for table `sales` -- INSERT INTO `sales` (`id`, `order_id`, `total_amount`, `date_created`) VALUES (1, 3, 99999, '2023-04-03 13:09:19'); -- -------------------------------------------------------- -- -- Table structure for table `specification_list` -- CREATE TABLE `specification_list` ( `id` int(30) NOT NULL, `product_id` int(30) NOT NULL, `meta_field` text NOT NULL, `meta_value` text NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; -- -- Dumping data for table `specification_list` -- INSERT INTO `specification_list` (`id`, `product_id`, `meta_field`, `meta_value`) VALUES (27, 1, 'processor', 'Intel i5-9300H'), (28, 1, 'clock_speed', '2.4GHz'), (29, 1, 'GPU', 'NVIDIA GeForce RTX 2060 6GB GDDR6'), (30, 1, 'RAM', '8GB DDR4 SDRAM'), (31, 1, 'RAM_slot', '2'), (32, 1, 'SSD_OR_HDD', 'SSD 512GB'), (33, 1, 'OS', 'Windows 10 Home'), (34, 1, 'display_size', '15.6\" Full HD 1920 x 1080, 144 Hz'), (35, 1, 'display_type', 'ComfyView, In-plane Switching (IPS) Technology'), (36, 1, 'display_touch', 'N/A'), (37, 1, 'power_adapter', '180 W'), (38, 1, 'battery_capacity', '4-cell Battery Lithium Polymer, 3815 mAh'), (39, 1, 'battery_hour', '6 Hour'), (40, 1, 'dimension', '23.15 x 361.4 x 254.2 mm'), (41, 1, 'weight', '2.4Kg'), (42, 1, 'colors', 'Black'), (43, 1, 'IO_ports', '3x USB Ports\r\n1x Network (RJ-45)\r\n1x HDMI'), (44, 1, 'fingerprint_sensor', 'N/A'), (45, 1, 'camera', 'N/A'), (46, 1, 'keyboard', 'Yes, Keyboard Backlight'), (47, 1, 'touchpad', 'Yes'), (48, 1, 'WIFI', 'IEEE 802.11 a/b/g/n/ac/ax Gigabit Ethernet'), (49, 1, 'bluetooth', 'N/A'), (50, 1, 'speaker', 'Stereo 2 Speakers'), (51, 1, 'mic', 'Yes'), (52, 1, 'other', 'Sample Other Information'), (53, 2, 'processor', 'AMD Athlon™ Gold 7220U dual-core processor'), (54, 2, 'clock_speed', '2.4 GHz (MAX 3.7 GHz)'), (55, 2, 'GPU', 'AMD Radeon Graphics'), (56, 2, 'RAM', '8GB of onboard LPDDR5'), (57, 2, 'RAM_slot', '(No Extra Slot)'), (58, 2, 'SSD_OR_HDD', '256GB PCIe NVMe SSD'), (59, 2, 'OS', ' Windows 11 Home'), (60, 2, 'display_size', '39.6 cm (15.6\") LED 1920 x 1080'), (61, 2, 'display_type', 'Acer ComfyView'), (62, 2, 'display_touch', 'N/A'), (63, 2, 'power_adapter', 'N/A'), (64, 2, 'battery_capacity', '2-cell Li-ion battery 37 Wh 4810 mAh 7.7 V'), (65, 2, 'battery_hour', 'Up to 6.50 Hour'), (66, 2, 'dimension', '18.9 x 237.5 x 362.9 mm'), (67, 2, 'weight', '1.8 kg'), (68, 2, 'colors', 'Pure Silver'), (69, 2, 'IO_ports', 'USB : Yes\r\nNumber of USB 2.0 Ports : 1\r\nNumber of USB 3.2 Gen 1 Port : 2\r\nNetwork (RJ-45) : Yes'), (70, 2, 'fingerprint_sensor', 'N/A'), (71, 2, 'camera', 'Yes'), (72, 2, 'keyboard', 'Yes'), (73, 2, 'touchpad', 'Yes'), (74, 2, 'WIFI', 'IEEE 802.11ac/a/b/g/n'), (75, 2, 'bluetooth', 'Bluetooth® 5.2'), (76, 2, 'speaker', 'Yes'), (77, 2, 'mic', 'Yes'), (78, 2, 'other', 'N/A'); -- -------------------------------------------------------- -- -- Table structure for table `sub_categories` -- CREATE TABLE `sub_categories` ( `id` int(30) NOT NULL, `parent_id` int(30) NOT NULL, `sub_category` varchar(250) NOT NULL, `description` text NOT NULL, `status` tinyint(1) NOT NULL DEFAULT 1, `date_created` datetime NOT NULL DEFAULT current_timestamp() ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; -- -- Dumping data for table `sub_categories` -- INSERT INTO `sub_categories` (`id`, `parent_id`, `sub_category`, `description`, `status`, `date_created`) VALUES (1, 1, 'Desktop', 'Pellentesque congue dui at leo ullamcorper rutrum. Sed semper hendrerit lectus, at varius diam pretium id. Proin vel metus in orci pulvinar condimentum.', 1, '2023-04-03 09:36:53'), (2, 1, 'Laptop', 'Donec nibh lorem, convallis eu libero sit amet, porttitor molestie neque.', 1, '2023-04-03 09:37:12'), (3, 1, 'Tablets', 'Integer ante velit, porta ac magna vitae, maximus semper dui. Integer vitae nisi et erat tincidunt luctus. Proin condimentum aliquet quam vel interdum.', 1, '2023-04-03 09:37:42'); -- -------------------------------------------------------- -- -- 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', 'Mobile Store Management System - PHP'), (6, 'short_name', 'MSMS-PHP'), (11, 'logo', 'uploads/1680484800_logo.png'), (13, 'user_avatar', 'uploads/user_avatar.jpg'), (14, 'cover', 'uploads/1680484800_bg.jpg'); -- -------------------------------------------------------- -- -- Table structure for table `users` -- CREATE TABLE `users` ( `id` int(50) NOT NULL, `firstname` varchar(250) NOT 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 NULL ON UPDATE current_timestamp() ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; -- -- Dumping data for table `users` -- INSERT INTO `users` (`id`, `firstname`, `lastname`, `username`, `password`, `avatar`, `last_login`, `type`, `date_added`, `date_updated`) VALUES (1, 'Adminstrator', 'Admin', 'admin', '$2y$10$y0p7spgiauysy1J.XC8/3u9nV58HFab64sSKckQpVySGydVODKbme', 'uploads/1624240500_avatar.png', NULL, 1, '2021-01-20 14:02:37', '2023-04-03 13:26:20'); -- -- Indexes for dumped tables -- -- -- Indexes for table `brands` -- ALTER TABLE `brands` ADD PRIMARY KEY (`id`); -- -- Indexes for table `cart` -- ALTER TABLE `cart` ADD PRIMARY KEY (`id`); -- -- Indexes for table `categories` -- ALTER TABLE `categories` ADD PRIMARY KEY (`id`); -- -- Indexes for table `clients` -- ALTER TABLE `clients` ADD PRIMARY KEY (`id`); -- -- Indexes for table `inventory` -- ALTER TABLE `inventory` ADD PRIMARY KEY (`id`); -- -- Indexes for table `orders` -- ALTER TABLE `orders` ADD PRIMARY KEY (`id`); -- -- Indexes for table `order_list` -- ALTER TABLE `order_list` ADD PRIMARY KEY (`id`); -- -- Indexes for table `products` -- ALTER TABLE `products` ADD PRIMARY KEY (`id`); -- -- Indexes for table `sales` -- ALTER TABLE `sales` ADD PRIMARY KEY (`id`); -- -- Indexes for table `specification_list` -- ALTER TABLE `specification_list` ADD PRIMARY KEY (`id`), ADD KEY `product_id_fk` (`product_id`); -- -- Indexes for table `sub_categories` -- ALTER TABLE `sub_categories` 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 `brands` -- ALTER TABLE `brands` MODIFY `id` int(30) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=8; -- -- AUTO_INCREMENT for table `cart` -- ALTER TABLE `cart` MODIFY `id` int(30) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2; -- -- AUTO_INCREMENT for table `categories` -- ALTER TABLE `categories` MODIFY `id` int(30) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5; -- -- AUTO_INCREMENT for table `clients` -- ALTER TABLE `clients` MODIFY `id` int(30) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2; -- -- AUTO_INCREMENT for table `inventory` -- ALTER TABLE `inventory` MODIFY `id` int(30) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3; -- -- AUTO_INCREMENT for table `orders` -- ALTER TABLE `orders` MODIFY `id` int(30) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4; -- -- AUTO_INCREMENT for table `order_list` -- ALTER TABLE `order_list` MODIFY `id` int(30) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2; -- -- AUTO_INCREMENT for table `products` -- ALTER TABLE `products` MODIFY `id` int(30) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3; -- -- AUTO_INCREMENT for table `sales` -- ALTER TABLE `sales` MODIFY `id` int(30) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2; -- -- AUTO_INCREMENT for table `specification_list` -- ALTER TABLE `specification_list` MODIFY `id` int(30) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=79; -- -- AUTO_INCREMENT for table `sub_categories` -- ALTER TABLE `sub_categories` MODIFY `id` int(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=15; -- -- AUTO_INCREMENT for table `users` -- ALTER TABLE `users` MODIFY `id` int(50) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2; -- -- Constraints for dumped tables -- -- -- Constraints for table `specification_list` -- ALTER TABLE `specification_list` ADD CONSTRAINT `product_id_fk` FOREIGN KEY (`product_id`) REFERENCES `products` (`id`) ON DELETE CASCADE ON UPDATE NO ACTION; COMMIT; |