สอนทำระบบ POS (ระบบขายหน้าร้าน) Ep 6. สร้างไฟล์ที่ต้องใช้ร่วมกัน ก่อนการ Login เข้าใช้งาน
สอนทำระบบ POS (ระบบขายหน้าร้าน) Ep 6.
สร้างไฟล์ที่ต้องใช้ร่วมกัน ก่อนการ Login เข้าใช้งาน
ระบบ บริหารจัดการร้านกาแฟ PHP | FD22-Cafe (Coffee AND Bakery)
ระบบบริหารจัดการ รีสอร์ท | Booking Resort System PHP
CART&POS (ระบบจัดการงานขายหน้าร้านและ ออนไลน์ สำหรับร้านค้าขนาดกลาง,SME)
ระบบ POS (Point of Sale) ระบบขายหน้าร้าน ตัวเต็ม
(มีระบบ BarCode และ QR-Code รองรับเครื่องแสกน)
สอนทำระบบ POS (ระบบขายหน้าร้าน) Ep 6. สร้างไฟล์ที่ต้องใช้ร่วมกัน ก่อนการ Login เข้าใช้งาน
head.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 |
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <title>POS System | By fordev22.com</title> <!-- Tell the browser to be responsive to screen width --> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="icon" type="" href="../assets/img/t.png" /> <!-- Font Awesome --> <!-- http://fordev22.com/ --> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.3/css/all.min.css"> <!-- Ionicons --> <link rel="stylesheet" href="https://code.ionicframework.com/ionicons/2.0.1/css/ionicons.min.css"> <!-- iCheck for checkboxes and radio inputs --> <!-- http://fordev22.com/ --> <link rel="stylesheet" href="../assets/icheck-bootstrap.min.css"> <!-- DataTables --> <link rel="stylesheet" href="../assets/dataTables.bootstrap4.css"> <!-- overlayScrollbars --> <link rel="stylesheet" href="../assets/adminlte.min.css"> <!-- Select2 --> <link rel="stylesheet" href="../assets/select2.min.css"> <link rel="stylesheet" href="../assets/select2-bootstrap4.min.css"> <!-- Google Font: Source Sans Pro --> <link href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,400i,700" rel="stylesheet"> <link href="https://fonts.googleapis.com/css?family=Kanit:400" rel="stylesheet"> <link href="../assets/tagsinput.css?v=11" rel="stylesheet" type="text/css"> <!-- ckeditor --> <script src="../assets/ckeditor.js"></script> <style> body { font-family: 'Kanit', sans-serif; font-size: 14px; } </style> <style type="text/css"> @media print{ .btn{ display: none; /* ซ่อน */ } } </style> </head> |
header.php
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
<!-- http://fordev22.com/ --> <?php include ("head.php"); ?> <!-- <body class="hold-transition sidebar-mini layout-fixed layout-navbar-fixed text-sm sidebar-collapse"> --> <body class="hold-transition sidebar-mini layout-fixed layout-navbar-fixed text-sm"> <!-- Site wrapper --> <div class="wrapper"> <?php include ("navbar.php"); ?> <?php include ("sidebar.php"); ?> <!-- Content Wrapper. Contains page content --> <div class="content-wrapper"> |
navbar.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 |
<nav class="main-header navbar navbar-expand navbar-gray navbar-dark"> <ul class="navbar-nav"> <li class="nav-item"> <a class="nav-link" data-widget="pushmenu" href="#"><i class="fas fa-bars"></i></a> </li> <li class="nav-item"> <a class="nav-link <?php if ($menu == "index"){echo "active";} ?>" href="index.php"><i class="fas fa-home"></i> Home</a> </li> </ul> <!-- Right navbar links --> <ul class="navbar-nav ml-auto"> <li class="nav-item "> <a href="../logout.php" class="nav-link "> <i class="fa fa-power-off"></i> Logout </a> </li> </ul> </nav> <!-- http://fordev22.com/ --> <!-- /.navbar --> |
sidebar.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 |
<!-- Main Sidebar Container --> <!-- http://fordev22.com/ --> <aside class="main-sidebar sidebar-dark-gray elevation-4"> <!-- Brand Logo --> <!-- <a href="" class="brand-link bg-gray"> <img src="../assets/img/FD22.png" alt="AdminLTE Logo" class="brand-image img-circle elevation-3" style="opacity: .8"> <span class="brand-text font-weight-light">FD22 | POS System</span> </a> --> <a href="" class="brand-link bg-gray"> <img src="../assets/img/ffd2222.png" alt="AdminLTE Logo" class="brand-image" > <span class="brand-text font-weight-light">FD22 | POS System</span> </a> <!-- Sidebar --> <div class="sidebar"> <!-- Sidebar user (optional) --> <div class="user-panel mt-3 pb-3 mb-3 d-flex"> <div class="image"> <!-- <img src="../mem_img/<?php echo $_SESSION['mem_img'];?>" class="img-circle elevation-2" alt="User Image"> --> <img src="../assets/img/FD22.png" class="img-circle elevation-2" alt="User Image"> </div> <div class="info"> <a href="edit_profile.php" target="" class="d-block"> Test | Edit Profile</a> </div> </div> <!-- Sidebar Menu --> <nav class="mt-2"> <!-- nav-compact --> <ul class="nav nav-pills nav-sidebar nav-child-indent flex-column" data-widget="treeview" role="menu" data-accordion="false"> <!-- Add icons to the links using the .nav-icon class with font-awesome or any other icon font library --> <li class="nav-header">เมนูสำหรับการขาย</li> <li class="nav-item"> <a href="index.php" class="nav-link <?php if($menu=="index"){echo "active";} ?> "> <i class="nav-icon fas fa-clipboard-list"></i> <p>รายการขาย </p> </a> </li> <hr> <li class="nav-item"> <a href="../logout.php" class="nav-link text-danger"> <i class="nav-icon fas fa-power-off"></i> <p>ออกจากระบบ</p> </a> </li> </ul> </nav> <!-- /.sidebar-menu --> <!-- http://fordev22.com/ --> </div> <!-- /.sidebar --> </aside> |
footer.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 |
</div> <!-- /.content-wrapper --> <footer class="main-footer"> <div class="float-right d-none d-sm-block"> <b>Version</b> 2.2.0 </div> <strong>Copyright © 2021 POS System<a href="http://fordev22.com/">fordev22</a>.</strong> All rights reserved. </footer> <!-- Control Sidebar --> <aside class="control-sidebar control-sidebar-dark"> <!-- Control sidebar content goes here --> </aside> <!-- /.control-sidebar --> </div> <!-- ./wrapper --> <!-- jQuery --> <script src="../assets/jquery.min.js"></script> <!-- Bootstrap 4 --> <script src="../assets/bootstrap.bundle.min.js"></script> <!-- Select2 --> <script src="../assets/select2.full.min.js"></script> <!-- DataTables --> <script src="../assets/jquery.dataTables.js"></script> <script src="../assets/dataTables.bootstrap4.js"></script> <script src="../assets/tagsinput.js?v=1"></script> <script src="../assets/sweetalert2@9.js"></script> <script src="../assets/adminlte.min.js"></script> <!-- AdminLTE App --> <script src="../assets/demo.js"></script> <!-- AdminLTE for demo purposes --> <!-- <script src="assets/dist/js/demo.js"></script> --> <!-- http://fordev22.com/ --> <script> $(document).ready(function () { //$('.sidebar-menu').tree(); //$('.select2').select2(); //Initialize Select2 Elements $('.select2').select2({ theme: 'bootstrap4' }) }) </script> <script> $(function() { // cb(start, end); // $('#createContactModal').modal('show') $('#example1').DataTable({ "order": [ [0, "desc"] ], "lengthMenu": [ [10 ,25, 50, -1], [10 ,25, 50, "All"] ], }); }); </script> <!-- http://fordev22.com/ --> |
footer2.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 |
</div> <!-- /.content-wrapper --> <footer class="main-footer"> <div class="float-right d-none d-sm-block"> <b>Version</b> 2.2.0 </div> <strong>Copyright © 2021 POS System<a href="http://fordev22.com/">fordev22</a>.</strong> All rights reserved. </footer> <!-- Control Sidebar --> <aside class="control-sidebar control-sidebar-dark"> <!-- Control sidebar content goes here --> </aside> <!-- /.control-sidebar --> </div> <!-- ./wrapper --> <!-- jQuery --> <!-- Bootstrap 4 --> <!-- http://fordev22.com/ --> <script src="../assets/bootstrap.bundle.min.js"></script> <!-- DataTables --> <script src="../assets/jquery.dataTables.js"></script> <script src="../assets/dataTables.bootstrap4.js"></script> <script src="../assets/tagsinput.js?v=1"></script> <!-- Select2 --> <!-- http://fordev22.com/ --> <script src="../assets/sweetalert2@9.js"></script> <!-- AdminLTE App --> <script src="../assets/adminlte.min.js"></script> <!-- AdminLTE for demo purposes --> <!-- <script src="assets/dist/js/demo.js"></script> --> <!-- http://fordev22.com/ --> <script> $(document).ready(function () { //$('.sidebar-menu').tree(); //$('.select2').select2(); //Initialize Select2 Elements $('.select2').select2({ theme: 'bootstrap4' }) }) </script> <script> $(function () { $('#example1').DataTable() $('#example2').DataTable({ 'paging' : true, 'lengthChange': false, 'searching' : false, 'ordering' : true, 'info' : true, 'autoWidth' : false }) }) </script> <!-- http://fordev22.com/ --> |
index.php (ตัวอย่าง include มาใช้)
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 |
<?php include("header.php"); ?> <!-- Content Header (Page header) --> <section class="content-header"> <div class="container-fluid"> <h1>Index</h1> </div><!-- /.container-fluid --> </section> <!-- Main content --> <section class="content"> <div class="card card-gray"> <div class="card-header "> <h3 class="card-title">....</h3> <div align="right"> </div> </div> <br> <div class="card-body"> <div class="row"> <div class="col-md-6"> </div> </div> </div> <div class="card-footer"> </div> </div> </section> <!-- /.content --> <?php include('footer.php'); ?> <script> $(function () { $(".datatable").DataTable(); // $('#example2').DataTable({ // "paging": true, // "lengthChange": false, // "searching": false, // "ordering": true, // "info": true, // "autoWidth": false, // http://fordev22.com/ // }); }); </script> </body> </html> <!-- http://fordev22.com/ --> |