├── project ├── shop.php ├── logout.php ├── assets │ ├── images │ │ ├── pp.jpg │ │ ├── images.jpeg │ │ ├── slide1.jpg │ │ ├── slide2.jpg │ │ ├── slide3.jpg │ │ ├── oppo-a60.png │ │ ├── Realme-C53.jpg │ │ ├── Samsung-A55.jpg │ │ ├── nokia 3310.png │ │ ├── xiaomi-poco-x2.jpg │ │ ├── Motorola_RAZR_V3i_01.jpeg │ │ ├── 1_dDsuXIBb0jo1BKKikuBy6w.jpg │ │ ├── 675723e272c176.30855434.jpg │ │ └── 06Id58TJW8pkzAkqmSi7hjU-1.webp │ └── css │ │ ├── styele.min.css.map │ │ ├── styele.scss │ │ └── styele.min.css ├── admin │ ├── assets │ │ ├── demo │ │ │ ├── datatables-demo.js │ │ │ ├── chart-pie-demo.js │ │ │ ├── chart-bar-demo.js │ │ │ └── chart-area-demo.js │ │ └── img │ │ │ └── error-404-monochrome.svg │ ├── js │ │ ├── datatables-simple-demo.js │ │ └── scripts.js │ ├── ajax │ │ ├── edit-product.php │ │ └── change-status.php │ ├── footer.php │ ├── dashboard.php │ ├── header.php │ ├── navbar.php │ ├── sidebar.php │ ├── add-new-product.php │ ├── all-orders.php │ ├── all-products.php │ └── charts.html ├── index.php ├── header.php ├── components │ ├── homeProducts.php │ └── homeSlider.php ├── footer.php ├── profile-picture.php ├── sign-in.php ├── change-password.php ├── navbar.php ├── checkout.php ├── sign-up.php └── update-profile.php ├── test.txt ├── L2 - Variables.php ├── L4 - Constants.php ├── uploads ├── img-66ec5a289026d1.79365555.jpg └── img-66ec5a60449be3.75220238.jpg ├── problems-1 ├── js │ └── script.js ├── css │ ├── style.min.css.map │ ├── style.min.css │ └── style.scss └── index.php ├── L6 - Uses-of-Quotes.php ├── jquery ├── ajax.php └── index.php ├── L5 - Comments.php ├── L25 - File-inclusion.php ├── L34 - phpApi.php ├── L1 - Hallo-world.php ├── L19 - revice.php ├── L21 - _SESSION __COOKIE.php ├── L27 - try-catch.php ├── L26 - Sending-mail.php ├── L15 - numericFunctions.php ├── L11 - loops.php ├── L29 - JSON.php ├── L17 - function.php ├── L3 - Data-types.php ├── L28 - date-time.php ├── L16 - stringFunction.php ├── L14 - random-password-generator.php ├── L31 - api.php ├── L20 - superglobals.php ├── L12 - arrays.php ├── L8 - mathematical-functions.php ├── api.php ├── L24 - file-upload.php ├── L30 - File-system.php ├── L30 - File-system-copy.php ├── L18 - regex.php ├── L36 - oop1.php ├── L9 - control-statements.php ├── L10 - solution-01.php ├── L7 - operators.php ├── L13 - array-functions.php ├── L35 - crud.php ├── L37 - oop2.php ├── L22 - form-validation.php └── L23 - form-validation.php /project/shop.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test.txt: -------------------------------------------------------------------------------- 1 | ha ha ha -------------------------------------------------------------------------------- /L2 - Variables.php: -------------------------------------------------------------------------------- 1 | { 3 | alert('Hello, world!'); 4 | }); -------------------------------------------------------------------------------- /project/assets/images/Motorola_RAZR_V3i_01.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asif-daffodil/cmbd245/HEAD/project/assets/images/Motorola_RAZR_V3i_01.jpeg -------------------------------------------------------------------------------- /L6 - Uses-of-Quotes.php: -------------------------------------------------------------------------------- 1 | "; // Double quotes 5 | echo '$msg
'; // Single quotes -------------------------------------------------------------------------------- /jquery/ajax.php: -------------------------------------------------------------------------------- 1 | $name]); 5 | } 6 | -------------------------------------------------------------------------------- /project/assets/images/1_dDsuXIBb0jo1BKKikuBy6w.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asif-daffodil/cmbd245/HEAD/project/assets/images/1_dDsuXIBb0jo1BKKikuBy6w.jpg -------------------------------------------------------------------------------- /project/assets/images/675723e272c176.30855434.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asif-daffodil/cmbd245/HEAD/project/assets/images/675723e272c176.30855434.jpg -------------------------------------------------------------------------------- /project/admin/assets/demo/datatables-demo.js: -------------------------------------------------------------------------------- 1 | // Call the dataTables jQuery plugin 2 | $(document).ready(function() { 3 | $('#dataTable').DataTable(); 4 | }); 5 | -------------------------------------------------------------------------------- /project/assets/images/06Id58TJW8pkzAkqmSi7hjU-1.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asif-daffodil/cmbd245/HEAD/project/assets/images/06Id58TJW8pkzAkqmSi7hjU-1.webp -------------------------------------------------------------------------------- /L5 - Comments.php: -------------------------------------------------------------------------------- 1 | 6 | 9 | -------------------------------------------------------------------------------- /problems-1/css/style.min.css: -------------------------------------------------------------------------------- 1 | *{margin:0;padding:0;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.container>h1{color:red;text-align:center;padding:30px}/*# sourceMappingURL=style.min.css.map */ -------------------------------------------------------------------------------- /L34 - phpApi.php: -------------------------------------------------------------------------------- 1 | 'GET request' 8 | ]); 9 | } 10 | -------------------------------------------------------------------------------- /project/assets/css/styele.min.css: -------------------------------------------------------------------------------- 1 | .carousel-caption{background:rgba(0,0,0,.6)}.carousel-indicators [data-bs-target]{width:20px;height:20px;-webkit-border-radius:50%;-moz-border-radius:50%;border-radius:50%}/*# sourceMappingURL=styele.min.css.map */ -------------------------------------------------------------------------------- /problems-1/css/style.scss: -------------------------------------------------------------------------------- 1 | *{ 2 | margin: 0; 3 | padding: 0; 4 | box-sizing: border-box; 5 | } 6 | 7 | .container{ 8 | >h1{ 9 | color: #f00; 10 | text-align: center; 11 | padding: 30px; 12 | } 13 | } -------------------------------------------------------------------------------- /L1 - Hallo-world.php: -------------------------------------------------------------------------------- 1 | 4 | 5 |

This is a heading!

6 | 7 | 10 | 11 | " . $studentName . "
"; 14 | ?> -------------------------------------------------------------------------------- /L19 - revice.php: -------------------------------------------------------------------------------- 1 | "; 5 | 6 | echo strlen(trim($name)) . "
"; 7 | 8 | // stripslashes 9 | $str = "Hello, I\'m Kamal Hossain"; 10 | echo stripslashes($str) . "
"; 11 | -------------------------------------------------------------------------------- /L21 - _SESSION __COOKIE.php: -------------------------------------------------------------------------------- 1 | "; 8 | 9 | session_unset(); 10 | 11 | // cookie 12 | 13 | setcookie("name", "Kamal", time() + 10); 14 | -------------------------------------------------------------------------------- /L27 - try-catch.php: -------------------------------------------------------------------------------- 1 | getMessage(); 12 | } finally { 13 | echo "
Finally block executed."; 14 | } 15 | -------------------------------------------------------------------------------- /project/admin/js/datatables-simple-demo.js: -------------------------------------------------------------------------------- 1 | window.addEventListener('DOMContentLoaded', event => { 2 | // Simple-DataTables 3 | // https://github.com/fiduswriter/Simple-DataTables/wiki 4 | 5 | const datatablesSimple = document.getElementById('datatablesSimple'); 6 | if (datatablesSimple) { 7 | new simpleDatatables.DataTable(datatablesSimple); 8 | } 9 | }); 10 | -------------------------------------------------------------------------------- /L26 - Sending-mail.php: -------------------------------------------------------------------------------- 1 | "; 4 | echo ceil(4.3) . "
"; 5 | echo floor(4.7) . "
"; 6 | echo round(4.5) . "
"; 7 | echo round(4.2) . "
"; 8 | echo max(1, 2, 3, 4, 5) . "
"; 9 | echo min(1, 2, 3, 4, 5) . "
"; 10 | echo pow(2, 3) . "
"; 11 | echo sqrt(16) . "
"; 12 | echo rand(1000, 9999) . "
"; 13 | $n = 5; 14 | $n++; 15 | echo $n . "
"; 16 | -------------------------------------------------------------------------------- /project/admin/ajax/edit-product.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /L11 - loops.php: -------------------------------------------------------------------------------- 1 | "; 11 | $starPoint = $starPoint + 1; 12 | } 13 | 14 | echo "
"; 15 | 16 | for ($i = 0; $i <= 9; $i++) { 17 | echo $i . "
"; 18 | } 19 | 20 | echo "
"; 21 | 22 | $x = 20; 23 | do { 24 | echo $x . "
"; 25 | $x++; 26 | } while ($x <= 9); 27 | -------------------------------------------------------------------------------- /problems-1/index.php: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | Document 11 | 12 | 13 | 14 | 15 |
16 |

Hello World

17 | 20 |
21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /L29 - JSON.php: -------------------------------------------------------------------------------- 1 | 10 | 11 | "John Doe", 14 | "email" => "john.doe@gmail", 15 | "password" => "JohnDoe123" 16 | ]; 17 | 18 | $myInfoJson = json_encode($myInfo); 19 | echo $myInfoJson; 20 | 21 | echo "
"; 22 | 23 | $myInfoArr = json_decode($myInfoJson, true); 24 | echo "
";
25 | print_r($myInfoArr);
26 | echo "
"; 27 | ?> -------------------------------------------------------------------------------- /project/admin/ajax/change-status.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /L17 - function.php: -------------------------------------------------------------------------------- 1 | "; 8 | echo myFunc("Assalamuoyalaikum", "shobaike") . "
"; 9 | echo myFunc() . "
"; 10 | echo myFunc("Wow") . "
"; 11 | echo myFunc(name: "wow", msg: "Shobai") . "
"; 12 | 13 | // recursive function 14 | function decrementTo1($n) 15 | { 16 | if ($n <= 1) { 17 | echo 1 . "
"; 18 | } else { 19 | echo $n . "
"; 20 | decrementTo1($n - 1); 21 | } 22 | } 23 | 24 | decrementTo1(10); 25 | -------------------------------------------------------------------------------- /L3 - Data-types.php: -------------------------------------------------------------------------------- 1 | "; 6 | 7 | // integer 8 | var_dump(123); 9 | 10 | echo "
"; 11 | 12 | // float 13 | var_dump(12.3); 14 | 15 | echo "
"; 16 | 17 | // boolean 18 | var_dump(true); 19 | 20 | echo "
"; 21 | 22 | // array 23 | var_dump(["apple", "banana", "cherry"]); 24 | 25 | echo "
"; 26 | 27 | // object 28 | class myInfo 29 | { 30 | public $name = "Asif"; 31 | } 32 | 33 | $myInfo = new myInfo; 34 | var_dump($myInfo); 35 | 36 | echo "
"; 37 | 38 | // NULL 39 | var_dump(null); 40 | 41 | echo "
"; 42 | 43 | // resource 44 | $myfile = fopen("test.txt", "r"); 45 | var_dump($myfile); 46 | -------------------------------------------------------------------------------- /project/admin/assets/demo/chart-pie-demo.js: -------------------------------------------------------------------------------- 1 | // Set new default font family and font color to mimic Bootstrap's default styling 2 | Chart.defaults.global.defaultFontFamily = '-apple-system,system-ui,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif'; 3 | Chart.defaults.global.defaultFontColor = '#292b2c'; 4 | 5 | // Pie Chart Example 6 | var ctx = document.getElementById("myPieChart"); 7 | var myPieChart = new Chart(ctx, { 8 | type: 'pie', 9 | data: { 10 | labels: ["Blue", "Red", "Yellow", "Green"], 11 | datasets: [{ 12 | data: [12.21, 15.58, 11.25, 8.32], 13 | backgroundColor: ['#007bff', '#dc3545', '#ffc107', '#28a745'], 14 | }], 15 | }, 16 | }); 17 | -------------------------------------------------------------------------------- /L28 - date-time.php: -------------------------------------------------------------------------------- 1 | "; 6 | 7 | // mktime(hour, minute, second, month, day, year); 8 | 9 | $mydate = mktime(0, 0, 0, 1, 1, 2026); 10 | echo date('d/F/Y l', $mydate); 11 | 12 | echo "
"; 13 | 14 | // strtotime(time, now); 15 | 16 | $mydate = strtotime('+3 years +2 months +5 days'); 17 | echo date('d/F/Y l', $mydate); 18 | 19 | echo "
"; 20 | 21 | // date-time object 22 | 23 | // my dob is 1987-10-9. find my age 24 | $mydob = new DateTime('1987-9-10'); 25 | $now = new DateTime(); 26 | $diff = $now->diff($mydob); 27 | echo $diff->format('I am %Y years, %m months, %d days old.'); 28 | 29 | // print php version 30 | echo "
"; 31 | echo phpversion(); 32 | -------------------------------------------------------------------------------- /L16 - stringFunction.php: -------------------------------------------------------------------------------- 1 | "; 4 | 5 | // Concatenating strings 6 | $y = "Hello"; 7 | $z = "World!"; 8 | echo $y . " " . $z . "
"; 9 | 10 | // Trimming strings 11 | $trim = " Hello World! "; 12 | echo trim($trim) . "
"; 13 | 14 | 15 | // Removing slashes 16 | $slash = "hi / World!"; 17 | echo stripslashes($slash) . "
"; 18 | 19 | // String functions 20 | echo strlen($x) . "
"; 21 | echo str_word_count($x) . "
"; 22 | echo strrev($x) . "
"; 23 | echo strpos($x, "world") . "
"; 24 | echo str_replace("world", "Dolly", $x) . "
"; 25 | echo strtolower($x) . "
"; 26 | echo strtoupper($x) . "
"; 27 | echo ucfirst($x) . "
"; 28 | echo ucwords($x) . "
"; 29 | echo substr($x, -6) . "
"; 30 | -------------------------------------------------------------------------------- /project/admin/footer.php: -------------------------------------------------------------------------------- 1 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /L14 - random-password-generator.php: -------------------------------------------------------------------------------- 1 | "; 4 | echo uniqid('pass_', true) . "
"; 5 | echo md5(uniqid()) . "
"; 6 | $chars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"; 7 | $elomeloChar = str_shuffle($chars); 8 | $pass = substr($elomeloChar, 0, 8); 9 | echo $pass . "
"; 10 | // strong password 11 | $capitalLetter = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"; 12 | $smallLetter = "abcdefghijklmnopqrstuvwxyz"; 13 | $number = "0123456789"; 14 | $specialChar = "!@#$%^&*()_+"; 15 | $strongPass = str_shuffle(substr($capitalLetter, 0, 2) . substr($smallLetter, 0, 2) . substr($number, 0, 2) . substr($specialChar, 0, 2)); 16 | echo $strongPass . "
"; 17 | ?> 18 | 19 | 20 | -------------------------------------------------------------------------------- /project/admin/dashboard.php: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | 7 |
8 |
9 | 10 |
11 |
12 |
13 |
14 |

Dashboard

15 | 18 | 19 |
20 |
21 | 22 |
23 |
24 | 25 | 26 | -------------------------------------------------------------------------------- /L31 - api.php: -------------------------------------------------------------------------------- 1 | 1000) { 25 | echo "./uploads/img-66ec5a289026d1.79365555.jpg"; 26 | } else { 27 | echo "Payment successful"; 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /L20 - superglobals.php: -------------------------------------------------------------------------------- 1 | "; 11 | 12 | // $_SERVER 13 | echo $_SERVER['PHP_SELF'] . "
"; 14 | echo $_SERVER['SERVER_NAME'] . "
"; 15 | echo $_SERVER['HTTP_HOST'] . "
"; 16 | echo $_SERVER['HTTP_USER_AGENT'] . "
"; 17 | echo $_SERVER['SCRIPT_NAME'] . "
"; 18 | echo $_SERVER['SERVER_ADDR'] . "
"; 19 | 20 | // #_REQUEST 21 | echo $_REQUEST['name'] ?? "Request not found" . "
"; 22 | 23 | // $_POST 24 | echo $_POST['uname'] ?? "Post not found" . "
"; 25 | 26 | // $_GET 27 | echo $_GET['sname'] ?? "Get not found" . "
"; 28 | 29 | ?> 30 | 31 |
32 | 33 | 34 |
35 | 36 | "; 40 | ?> -------------------------------------------------------------------------------- /L12 - arrays.php: -------------------------------------------------------------------------------- 1 | "; 8 | print_r($arr); 9 | echo ""; 10 | 11 | for ($i = 0; $i < count($arr); $i++) { 12 | echo $arr[$i] . "
"; 13 | } 14 | 15 | foreach ($arr as $value) { 16 | echo $value . "
"; 17 | } 18 | 19 | // associative array 20 | $person = ["name" => "John Doe", "age" => 30]; 21 | echo $person["name"]; 22 | echo "
";
23 | print_r($person);
24 | echo "
"; 25 | 26 | foreach ($person as $key => $value) { 27 | echo $key . " : " . $value . "
"; 28 | } 29 | 30 | // multidimensional array 31 | $persons = [ 32 | ["kamla", 20, "Dhaka"], 33 | ["Jamla", 30, "Chittagong"], 34 | ["Ramla", 40, "Sylhet"], 35 | ["Samla", 50, "Khulna"], 36 | ]; 37 | 38 | echo $persons[1][2]; 39 | echo "
";
40 | print_r($persons);
41 | echo "
"; 42 | 43 | foreach ($persons as $person) { 44 | foreach ($person as $value) { 45 | echo $value . " "; 46 | } 47 | echo "
"; 48 | } 49 | -------------------------------------------------------------------------------- /project/admin/js/scripts.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * Start Bootstrap - SB Admin v7.0.7 (https://startbootstrap.com/template/sb-admin) 3 | * Copyright 2013-2023 Start Bootstrap 4 | * Licensed under MIT (https://github.com/StartBootstrap/startbootstrap-sb-admin/blob/master/LICENSE) 5 | */ 6 | // 7 | // Scripts 8 | // 9 | 10 | window.addEventListener('DOMContentLoaded', event => { 11 | 12 | // Toggle the side navigation 13 | const sidebarToggle = document.body.querySelector('#sidebarToggle'); 14 | if (sidebarToggle) { 15 | // Uncomment Below to persist sidebar toggle between refreshes 16 | // if (localStorage.getItem('sb|sidebar-toggle') === 'true') { 17 | // document.body.classList.toggle('sb-sidenav-toggled'); 18 | // } 19 | sidebarToggle.addEventListener('click', event => { 20 | event.preventDefault(); 21 | document.body.classList.toggle('sb-sidenav-toggled'); 22 | localStorage.setItem('sb|sidebar-toggle', document.body.classList.contains('sb-sidenav-toggled')); 23 | }); 24 | } 25 | 26 | }); 27 | -------------------------------------------------------------------------------- /L8 - mathematical-functions.php: -------------------------------------------------------------------------------- 1 | "; // 6.7 18 | echo ceil(4.2) . "
"; // 5 19 | echo floor(4.6) . "
"; // 4 20 | echo round(4.6) . "
"; // 5 21 | echo round(4.4) . "
"; // 4 22 | echo rand() . "
"; // Random number 23 | echo rand(1, 10) . "
"; // Random number between 1 and 10 24 | echo uniqid() . "
"; // Unique ID 25 | echo uniqid("Hello_") . "
"; // Unique ID with prefix 26 | echo pi() . "
"; // 3.1415926535898 27 | echo max(0, 150, 30, 20, -8, -200) . "
"; // 150 28 | echo min(0, 150, 30, 20, -8, -200) . "
"; // -200 29 | echo sqrt(64) . "
"; // 8 30 | echo pow(2, 3) . "
"; // 8 31 | -------------------------------------------------------------------------------- /project/admin/assets/demo/chart-bar-demo.js: -------------------------------------------------------------------------------- 1 | // Set new default font family and font color to mimic Bootstrap's default styling 2 | Chart.defaults.global.defaultFontFamily = '-apple-system,system-ui,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif'; 3 | Chart.defaults.global.defaultFontColor = '#292b2c'; 4 | 5 | // Bar Chart Example 6 | var ctx = document.getElementById("myBarChart"); 7 | var myLineChart = new Chart(ctx, { 8 | type: 'bar', 9 | data: { 10 | labels: ["January", "February", "March", "April", "May", "June"], 11 | datasets: [{ 12 | label: "Revenue", 13 | backgroundColor: "rgba(2,117,216,1)", 14 | borderColor: "rgba(2,117,216,1)", 15 | data: [4215, 5312, 6251, 7841, 9821, 14984], 16 | }], 17 | }, 18 | options: { 19 | scales: { 20 | xAxes: [{ 21 | time: { 22 | unit: 'month' 23 | }, 24 | gridLines: { 25 | display: false 26 | }, 27 | ticks: { 28 | maxTicksLimit: 6 29 | } 30 | }], 31 | yAxes: [{ 32 | ticks: { 33 | min: 0, 34 | max: 15000, 35 | maxTicksLimit: 5 36 | }, 37 | gridLines: { 38 | display: true 39 | } 40 | }], 41 | }, 42 | legend: { 43 | display: false 44 | } 45 | } 46 | }); 47 | -------------------------------------------------------------------------------- /project/admin/header.php: -------------------------------------------------------------------------------- 1 | window.location.href = '../sign-in.php';"; 7 | exit(); 8 | } 9 | ?> 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | Admin Panel 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /api.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /L24 - file-upload.php: -------------------------------------------------------------------------------- 1 | Please select a file to upload'; 11 | } elseif (!in_array($fileActualExt, $allowedExt)) { 12 | $errImg = '
Invalid file type. Please upload a jpg, jpeg, png or gif file
'; 13 | } elseif ($imgFile['size'] > 1000000) { 14 | $errImg = '
File size is too large. Please upload a file less than 1MB
'; 15 | } else { 16 | // create if upload directory is not exist 17 | if (!file_exists('uploads')) { 18 | mkdir('uploads'); 19 | } 20 | $newFileName = uniqid('img-', true) . '.' . $fileActualExt; 21 | $imgUploadPath = 'uploads/' . $newFileName; 22 | $move = move_uploaded_file($imgFileTmpName, $imgUploadPath); 23 | if ($move) { 24 | $errImg = '
File uploaded successfully
'; 25 | } else { 26 | $errImg = '
File upload failed
'; 27 | } 28 | } 29 | } 30 | ?> 31 | 32 |
33 | 34 | 35 |
36 | 37 | -------------------------------------------------------------------------------- /project/admin/navbar.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /project/header.php: -------------------------------------------------------------------------------- 1 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | Bootstrap demo 18 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /L30 - File-system.php: -------------------------------------------------------------------------------- 1 | "; 7 | 8 | // dirname() 9 | echo dirname($path); 10 | 11 | // copy() 12 | copy('./L30 - File-system.php', './L30 - File-system-copy.php'); 13 | 14 | // file() 15 | /* echo "
";
16 | print_r(file('./L30 - File-system.php'));
17 | echo "
"; */ 18 | 19 | echo "
"; 20 | // file_exists() 21 | echo file_exists('./L30 - File-system.php') ? "File exists" : "File does not exist"; 22 | 23 | // file_get_contents() 24 | /* echo "
";
25 | echo file_get_contents('./L30 - File-system.php');
26 | echo "
"; */ 27 | 28 | // file_put_contents() 29 | // file_put_contents('./L30 - File-system.php', 'Hello World'); 30 | 31 | echo "
"; 32 | // filesize() 33 | echo filesize('./L30 - File-system.php'); 34 | 35 | echo "
"; 36 | // filetype() 37 | echo filetype('./L30 - File-system.php'); 38 | 39 | echo "
"; 40 | // is_dir() 41 | echo is_dir('./L30 - File-system.php') ? "It is a directory" : "It is not a directory"; 42 | 43 | echo "
"; 44 | // is_file() 45 | echo is_file('./L30 - File-system.php') ? "It is a file" : "It is not a file"; 46 | 47 | echo "
"; 48 | // link() 49 | // echo link('./L30 - File-system.php', './L30 - File-system-link.php'); 50 | 51 | // unlink() 52 | // unlink('./L30 - File-system-link.php'); 53 | 54 | // mkdir() 55 | mkdir('./new-dir'); 56 | 57 | // rmdir() 58 | rmdir('./new-dir'); 59 | 60 | // move_uploaded_file() 61 | // move_uploaded_file($_FILES['file']['tmp_name'], './new-dir/' . $_FILES['file']['name']); 62 | 63 | echo "
"; 64 | // pathinfo() 65 | echo "
";
66 | print_r(pathinfo('./L30 - File-system.php'));
67 | echo "
"; 68 | -------------------------------------------------------------------------------- /L30 - File-system-copy.php: -------------------------------------------------------------------------------- 1 | "; 7 | 8 | // dirname() 9 | echo dirname($path); 10 | 11 | // copy() 12 | copy('./L30 - File-system.php', './L30 - File-system-copy.php'); 13 | 14 | // file() 15 | /* echo "
";
16 | print_r(file('./L30 - File-system.php'));
17 | echo "
"; */ 18 | 19 | echo "
"; 20 | // file_exists() 21 | echo file_exists('./L30 - File-system.php') ? "File exists" : "File does not exist"; 22 | 23 | // file_get_contents() 24 | /* echo "
";
25 | echo file_get_contents('./L30 - File-system.php');
26 | echo "
"; */ 27 | 28 | // file_put_contents() 29 | // file_put_contents('./L30 - File-system.php', 'Hello World'); 30 | 31 | echo "
"; 32 | // filesize() 33 | echo filesize('./L30 - File-system.php'); 34 | 35 | echo "
"; 36 | // iletype() 37 | echo filetype('./L30 - File-system.php'); 38 | 39 | echo "
"; 40 | // is_dir() 41 | echo is_dir('./L30 - File-system.php') ? "It is a directory" : "It is not a directory"; 42 | 43 | echo "
"; 44 | // is_file() 45 | echo is_file('./L30 - File-system.php') ? "It is a file" : "It is not a file"; 46 | 47 | echo "
"; 48 | // link() 49 | // echo link('./L30 - File-system.php', './L30 - File-system-link.php'); 50 | 51 | // unlink() 52 | // unlink('./L30 - File-system-link.php'); 53 | 54 | // mkdir() 55 | mkdir('./new-dir'); 56 | 57 | // rmdir() 58 | rmdir('./new-dir'); 59 | 60 | // move_uploaded_file() 61 | // move_uploaded_file($_FILES['file']['tmp_name'], './new-dir/' . $_FILES['file']['name']); 62 | 63 | echo "
"; 64 | // pathinfo() 65 | echo "
";
66 | print_r(pathinfo('./L30 - File-system.php'));
67 | echo "
"; 68 | -------------------------------------------------------------------------------- /L18 - regex.php: -------------------------------------------------------------------------------- 1 | "; 6 | $subject = "Mr hello World"; 7 | echo preg_match($pattern, $subject) . "
"; 8 | 9 | $pattern = "/[0-9]/"; 10 | $subject = "Mr Hello World 123"; 11 | echo preg_match($pattern, $subject) . "
"; 12 | 13 | // ^ - start 14 | $pattern = "/^Hello/i"; 15 | $subject = "Hello Mr Hello World"; 16 | echo preg_match($pattern, $subject) . "
"; 17 | 18 | // $ - end 19 | $pattern = "/World$/i"; 20 | $subject = "Hello Mr Hello World"; 21 | echo preg_match($pattern, $subject) . "
"; 22 | 23 | // . - any character 24 | $pattern = "/W.rld$/i"; 25 | $subject = "Hello Mr Hello Warld"; 26 | echo preg_match($pattern, $subject) . "
"; 27 | 28 | // * - 0 or more 29 | $pattern = "/W*rld$/i"; 30 | $subject = "Hello Mr Hello Waarld"; 31 | echo preg_match($pattern, $subject) . "
"; 32 | 33 | // + - 1 or more 34 | $pattern = "/W+rld$/i"; 35 | $subject = "Hello Mr Hello Wrld"; 36 | echo preg_match($pattern, $subject) . "
"; 37 | 38 | // ? - 0 or 1 39 | $pattern = "/W?rld$/i"; 40 | $subject = "Hello Mr Hello World"; 41 | echo preg_match($pattern, $subject) . "
"; 42 | 43 | // {n} - exactly n 44 | $pattern = "/W{3}rld/i"; 45 | $subject = "Hello WWWrld Wrld Wrld"; 46 | echo preg_match($pattern, $subject) . "
"; 47 | 48 | // strong password 49 | $pattern = "/^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[@$!%*?&])[A-Za-z\d@$!%*?&]{8,}$/"; 50 | $subject = "HelloWWW1@"; 51 | echo preg_match($pattern, $subject) . "
"; 52 | 53 | // email 54 | $pattern = "/^([a-zA-Z0-9\._]+)@([a-zA-Z0-9]+)\.([a-zA-Z]{2,5})$/"; 55 | $subject = "kamal@jamal.com"; 56 | echo preg_match($pattern, $subject) . "
"; 57 | 58 | 59 | -------------------------------------------------------------------------------- /L36 - oop1.php: -------------------------------------------------------------------------------- 1 | name . " and phone number is : " . $this->phone; 20 | } 21 | 22 | public function __construct() 23 | { 24 | echo "This is a constructor
"; 25 | } 26 | 27 | public function __destruct() 28 | { 29 | echo "This is a destructor
"; 30 | } 31 | 32 | public static function studentAge() 33 | { 34 | return "Student age is : " . self::$age; 35 | } 36 | } 37 | 38 | $student = new studentInfo(); 39 | echo $student->name . "
"; 40 | // echo $student->area . "
"; 41 | // echo $student->phone . "
"; 42 | $student->name = "Md Rubel"; 43 | echo $student->studentName() . "
"; 44 | echo $student::gender . "
"; 45 | echo $student::$age . "
"; 46 | echo $student::studentAge() . "
"; 47 | 48 | // inheritance 49 | class studentInfo2 extends studentInfo 50 | { 51 | 52 | public function address() 53 | { 54 | // echo $this->phone; 55 | return $this->area . ", " . $this->city . ", " . $this->country; 56 | } 57 | 58 | public function __construct() 59 | { 60 | return; 61 | } 62 | 63 | public function __destruct() 64 | { 65 | return; 66 | } 67 | } 68 | 69 | $student2 = new studentInfo2(); 70 | echo $student2->address() . "
"; 71 | -------------------------------------------------------------------------------- /project/admin/assets/demo/chart-area-demo.js: -------------------------------------------------------------------------------- 1 | // Set new default font family and font color to mimic Bootstrap's default styling 2 | Chart.defaults.global.defaultFontFamily = '-apple-system,system-ui,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif'; 3 | Chart.defaults.global.defaultFontColor = '#292b2c'; 4 | 5 | // Area Chart Example 6 | var ctx = document.getElementById("myAreaChart"); 7 | var myLineChart = new Chart(ctx, { 8 | type: 'line', 9 | data: { 10 | labels: ["Mar 1", "Mar 2", "Mar 3", "Mar 4", "Mar 5", "Mar 6", "Mar 7", "Mar 8", "Mar 9", "Mar 10", "Mar 11", "Mar 12", "Mar 13"], 11 | datasets: [{ 12 | label: "Sessions", 13 | lineTension: 0.3, 14 | backgroundColor: "rgba(2,117,216,0.2)", 15 | borderColor: "rgba(2,117,216,1)", 16 | pointRadius: 5, 17 | pointBackgroundColor: "rgba(2,117,216,1)", 18 | pointBorderColor: "rgba(255,255,255,0.8)", 19 | pointHoverRadius: 5, 20 | pointHoverBackgroundColor: "rgba(2,117,216,1)", 21 | pointHitRadius: 50, 22 | pointBorderWidth: 2, 23 | data: [10000, 30162, 26263, 18394, 18287, 28682, 31274, 33259, 25849, 24159, 32651, 31984, 38451], 24 | }], 25 | }, 26 | options: { 27 | scales: { 28 | xAxes: [{ 29 | time: { 30 | unit: 'date' 31 | }, 32 | gridLines: { 33 | display: false 34 | }, 35 | ticks: { 36 | maxTicksLimit: 7 37 | } 38 | }], 39 | yAxes: [{ 40 | ticks: { 41 | min: 0, 42 | max: 40000, 43 | maxTicksLimit: 5 44 | }, 45 | gridLines: { 46 | color: "rgba(0, 0, 0, .125)", 47 | } 48 | }], 49 | }, 50 | legend: { 51 | display: false 52 | } 53 | } 54 | }); 55 | -------------------------------------------------------------------------------- /L9 - control-statements.php: -------------------------------------------------------------------------------- 1 | = 0) { 6 | echo "You are a baby"; 7 | } elseif ($age <= 19 && $age > 12) { 8 | echo "You are a teenager"; 9 | } elseif ($age <= 29 && $age > 19) { 10 | echo "You are a young adult"; 11 | } elseif ($age <= 59 && $age > 29) { 12 | echo "You are an adult"; 13 | } elseif ($age <= 130 && $age > 59) { 14 | echo "You are an elder"; 15 | } else { 16 | echo "You are not in this world"; 17 | } 18 | 19 | echo "
"; 20 | 21 | if ($gender == "Female") { 22 | if ($age >= 18) { 23 | echo "You are eligible for marriage"; 24 | } else { 25 | echo "You are not eligible for marriage"; 26 | } 27 | } elseif ($gender == "Male") { 28 | if ($age >= 21) { 29 | echo "You are eligible for marriage"; 30 | } else { 31 | echo "You are not eligible for marriage"; 32 | } 33 | } 34 | 35 | echo "
"; 36 | 37 | // switch statement 38 | $day = "Thursday"; 39 | 40 | switch ($day) { 41 | case "Monday": 42 | echo "Today is Monday"; 43 | break; 44 | case "Tuesday": 45 | echo "Today is Tuesday"; 46 | break; 47 | case "Wednesday": 48 | echo "Today is Wednesday"; 49 | break; 50 | case "Thursday": 51 | echo "Today is Thursday"; 52 | break; 53 | case "Friday": 54 | echo "Today is Friday"; 55 | break; 56 | case "Saturday": 57 | echo "Today is Saturday"; 58 | break; 59 | case "Sunday": 60 | echo "Today is Sunday"; 61 | break; 62 | } 63 | 64 | echo "
"; 65 | 66 | // ternary operator 67 | $city = "Dhaka"; 68 | 69 | /* if ($city == "Dhaka") { 70 | echo "You are in Dhaka"; 71 | } else { 72 | echo "You are not in Dhaka"; 73 | } */ 74 | 75 | echo $city == "Dhaka" ? "You are in Dhaka" : "You are not in Dhaka"; 76 | echo $cmbd ?? null; 77 | -------------------------------------------------------------------------------- /project/admin/sidebar.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /project/components/homeProducts.php: -------------------------------------------------------------------------------- 1 |
2 |

Latest Products

3 |
4 | query("SELECT * FROM products ORDER BY id DESC LIMIT 8"); 6 | if (isset($_POST['addToCart'])) { 7 | $product_id = $_POST['product_id']; 8 | if (isset($_SESSION['cart'])) { 9 | if (array_key_exists($product_id, $_SESSION['cart'])) { 10 | $_SESSION['cart'][$product_id]++; 11 | } else { 12 | $_SESSION['cart'][$product_id] = 1; 13 | } 14 | } else { 15 | $_SESSION['cart'][$product_id] = 1; 16 | } 17 | 18 | echo ""; 19 | } 20 | ?> 21 | fetch_assoc()): ?> 22 |
23 |
24 | <?= $product['product_name'] ?> 26 |
27 |
28 |

Price:

29 |
30 | 31 | 34 |
35 | 36 | 37 | 38 |
39 |
40 |
41 | 42 |
43 |
-------------------------------------------------------------------------------- /project/components/homeSlider.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /project/footer.php: -------------------------------------------------------------------------------- 1 | 2 |
3 |
4 |
Offcanvas right
5 | 6 |
7 |
8 | 9 | 10 | $quantity){ ?> 11 | query("SELECT * FROM products WHERE id = $product_id")->fetch_assoc(); 13 | ?> 14 |
15 |
16 | <?= $product['product_name'] ?> 18 |
19 |
20 |
21 |

Price:

22 |

Quantity:

23 |

Total:

24 |
25 |
26 | 27 | 28 |
29 |
30 |
Total: $query("SELECT * FROM products WHERE id = $product_id")->fetch_assoc(); 32 | return $product['product_price'] * $quantity; 33 | }, array_keys($_SESSION['cart']), $_SESSION['cart'])) ?>
34 |
35 |
36 |
37 |
38 | Checkout 39 |
40 |
41 | 42 | 43 |
44 |
45 | 46 | 47 | -------------------------------------------------------------------------------- /jquery/index.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Document 8 | 9 | 10 | 11 |

PHP

12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 71 | 72 | 73 | -------------------------------------------------------------------------------- /project/profile-picture.php: -------------------------------------------------------------------------------- 1 | toastr.success('Profile picture upload successfully')"; 23 | } 24 | } else { 25 | $errPp = 'Your file is too big!'; 26 | } 27 | } else { 28 | $errPp = 'There was an error uploading your file!'; 29 | } 30 | } else { 31 | $errPp = 'You cannot upload files of this type!'; 32 | } 33 | } 34 | ?> 35 |
36 |
37 |
38 |
39 | 44 | 45 |
46 |
47 |
48 |
49 | 59 | -------------------------------------------------------------------------------- /L10 - solution-01.php: -------------------------------------------------------------------------------- 1 | '; 16 | 17 | // A PHP calculator using switch case (Addition, Subtraction, Multiplication, Division) 18 | 19 | $num1 = 2; 20 | $num2 = 3; 21 | $operator = 'Multiplication'; 22 | 23 | switch ($operator) { 24 | case 'Addition': 25 | echo $num1 + $num2; 26 | break; 27 | case 'Subtraction': 28 | echo $num1 - $num2; 29 | break; 30 | case 'Multiplication': 31 | echo $num1 * $num2; 32 | break; 33 | case 'Division': 34 | echo $num1 / $num2; 35 | break; 36 | default: 37 | echo "Invalid operator"; 38 | } 39 | 40 | echo '
'; 41 | 42 | // Check if a person is eligible to vote by age (18 or more than 18) 43 | 44 | $age = 18; 45 | 46 | if ($age >= 18) { 47 | echo "You are eligible voter!"; 48 | } else { 49 | echo "Sorry, You are not eligible voter"; 50 | } 51 | 52 | echo '
'; 53 | 54 | // Check if a person is eligible for marriage in BD by gender. 55 | $gender = "Female"; 56 | $age = 18; 57 | 58 | if ($gender == "Female") { 59 | if ($age >= 18) { 60 | echo "You are eligible for marriage"; 61 | } else { 62 | echo "You are not eligible for marriage"; 63 | } 64 | } elseif ($gender == "Male") { 65 | if ($age >= 21) { 66 | echo "You are eligible for marriage"; 67 | } else { 68 | echo "You are not eligible for marriage"; 69 | } 70 | } 71 | 72 | echo '
'; 73 | 74 | // Check if a number is positive, negative or zero. 75 | 76 | $num = 0; 77 | 78 | if ($num > 0) { 79 | echo "Positive"; 80 | } elseif ($num < 0) { 81 | echo "Negative"; 82 | } else { 83 | echo "Zero"; 84 | } 85 | 86 | echo '
'; 87 | 88 | // Check if number is odd or even. 89 | 90 | $num = 0; 91 | 92 | if ($num % 2 == 0) { 93 | echo "Even"; 94 | } else { 95 | echo "Odd"; 96 | } 97 | 98 | echo '
'; 99 | 100 | // Check if data is integer or string 101 | 102 | $data = "5"; 103 | 104 | if (is_int($data)) { 105 | echo "Integer"; 106 | } elseif (is_string($data)) { 107 | echo "String"; 108 | } else { 109 | echo "Invalid data"; 110 | } 111 | -------------------------------------------------------------------------------- /project/sign-in.php: -------------------------------------------------------------------------------- 1 | window.location.href = 'index.php';"; 5 | exit(); 6 | } 7 | if (isset($_POST['signin'])) { 8 | $email = cleanData($_POST['email']); 9 | $password = cleanData($_POST['password']); 10 | 11 | if (empty($email)) { 12 | $errEmail = "Email is required"; 13 | } elseif (!filter_var($email, FILTER_VALIDATE_EMAIL)) { 14 | $errEmail = "Invalid email format"; 15 | } else { 16 | $crrEmail = $email; 17 | } 18 | 19 | if (empty($password)) { 20 | $errPassword = "Password is required"; 21 | } else { 22 | $crrPassword = $password; 23 | } 24 | 25 | if (empty($errEmail) && empty($errPassword)) { 26 | $sql = "SELECT * FROM `users` WHERE `email` = '$email'"; 27 | $result = mysqli_query($conn, $sql); 28 | if (mysqli_num_rows($result) > 0) { 29 | $row = mysqli_fetch_assoc($result); 30 | if (password_verify($password, $row['password'])) { 31 | $_SESSION['user'] = $row; 32 | // toastr success message then redirect to index.php after 2 seconds 33 | echo ""; 34 | header("refresh:2;url=index.php"); 35 | } else { 36 | $errPassword = "Invalid password"; 37 | } 38 | } else { 39 | $errEmail = "Email not found"; 40 | } 41 | } 42 | } 43 | ?> 44 |
45 |
46 |
47 |

Sign-in

48 |
49 |
50 | " value=""> 51 |
52 | 53 |
54 |
55 |
56 | "> 57 |
58 | 59 |
60 |
61 |
62 | 63 |
64 |
65 | don't have an account? Sign-up 66 |
67 |
68 |
69 |
70 |
71 | -------------------------------------------------------------------------------- /L7 - operators.php: -------------------------------------------------------------------------------- 1 | "; // 15 17 | echo $x - $y . "
"; // 5 18 | echo $x * $y . "
"; // 50 19 | echo $x / $y . "
"; // 2s 20 | echo $x % $y . "
"; // 0 21 | echo $x ** $y . "
"; // 100000 22 | 23 | // Assignment Operators 24 | /** 25 | * = Assign 26 | * += Add and assign 27 | * -= Subtract and assign 28 | * *= Multiply and assign 29 | * /= Divide and assign 30 | * %= Modulus and assign 31 | */ 32 | 33 | $x = 10; 34 | $y = 5; 35 | 36 | $x += $y; // $x = $x + $y = 15 37 | echo $x . "
"; 38 | 39 | $x -= $y; // $x = $x - $y = 10 40 | echo $x . "
"; 41 | 42 | $x *= $y; // $x = $x * $y = 50 43 | echo $x . "
"; 44 | 45 | $x /= $y; // $x = $x / $y = 10 46 | echo $x . "
"; 47 | 48 | $x %= $y; // $x = $x % $y = 0 49 | echo $x . "
"; 50 | 51 | // Comparison Operators 52 | /** 53 | * == Equal 54 | * === Identical 55 | * != Not equal 56 | * <> Not equal 57 | * !== Not identical 58 | * > Greater than 59 | * < Less than 60 | * >= Greater than or equal to 61 | * <= Less than or equal to 62 | */ 63 | 64 | $x = 5; 65 | $y = "5"; 66 | 67 | var_dump($x == $y); // true 68 | echo "
"; 69 | 70 | var_dump($x === $y); // false 71 | echo "
"; 72 | 73 | var_dump($x != $y); // false 74 | echo "
"; 75 | 76 | var_dump($x !== $y); // true 77 | echo "
"; 78 | 79 | var_dump($x > $y); // false 80 | echo "
"; 81 | 82 | var_dump($x < $y); // false 83 | echo "
"; 84 | 85 | var_dump($x >= $y); // true 86 | echo "
"; 87 | 88 | var_dump($x <= $y); // true 89 | echo "
"; 90 | 91 | // Increment/Decrement Operators 92 | /** 93 | * ++$x Pre-increment 94 | * $x++ Post-increment 95 | * --$x Pre-decrement 96 | * $x-- Post-decrement 97 | */ 98 | 99 | $x = 5; 100 | 101 | echo ++$x . "
"; // 6 102 | echo $x++ . "
"; // 6 103 | echo $x . "
"; // 7 104 | 105 | echo --$x . "
"; // 6 106 | echo $x-- . "
"; // 6 107 | echo $x . "
"; // 5 108 | 109 | // Logical Operators 110 | /** 111 | * and, && 112 | * or, || 113 | * xor 114 | */ 115 | 116 | $x = 100; 117 | $y = 50; 118 | 119 | if ($x == 100 && $y == 50) { 120 | echo "Hello World!
"; 121 | } 122 | 123 | if ($x == 100 || $y == 80) { 124 | echo "Hello World!
"; 125 | } 126 | 127 | if ($x == 100 xor $y == 50) { 128 | echo "Hello World!
"; 129 | } 130 | 131 | // String Operators 132 | /** 133 | * . Concatenation 134 | * .= Concatenation assignment 135 | */ 136 | 137 | $x = "Hello"; 138 | $y = "World!"; 139 | echo $x . " " . $y . "
"; // Hello World! 140 | 141 | $x .= " $y"; // $x = $x . $y 142 | echo $x . "
"; // Hello World! 143 | 144 | // Operator precedence 145 | /** 146 | * 1. () 147 | * 2. ++ 148 | * 3. ** 149 | * 4. * / % 150 | * 5. + - 151 | * 6. = += -= *= /= %= 152 | */ 153 | 154 | $x = (10 + 5) * 10; 155 | -------------------------------------------------------------------------------- /L13 - array-functions.php: -------------------------------------------------------------------------------- 1 | "; 28 | } else { 29 | echo "This is not an array.
"; 30 | } 31 | 32 | // iii. in_array() 33 | if (in_array("Dhaka", $cities)) { 34 | echo "Dhaka is in the array.
"; 35 | } else { 36 | echo "Dhaka is not in the array.
"; 37 | } 38 | 39 | 40 | // iv. array_merge() 41 | $otherCities = array("Rajshahi", "Barishal", "Rangpur"); 42 | $allCities = array_merge($cities, $otherCities); 43 | echo "
";
 44 | print_r($allCities);
 45 | echo "
"; 46 | 47 | // v. array_keys() 48 | $person = ["name" => "John Doe", "age" => 30]; 49 | $keys = array_keys($person); 50 | echo "
";
 51 | print_r($keys);
 52 | echo "
"; 53 | 54 | // vi. array_key_exists() 55 | if (array_key_exists("name", $person)) { 56 | echo "Key exists.
"; 57 | } else { 58 | echo "Key does not exist.
"; 59 | } 60 | 61 | // vii. array_shift() 62 | $firstCity = array_shift($cities); 63 | echo $firstCity . "
"; 64 | echo "
";
 65 | print_r($cities);
 66 | echo "
"; 67 | 68 | // viii. array_unshift() 69 | array_unshift($cities, "Dhaka", "Chuyadanga"); 70 | echo "
";
 71 | print_r($cities);
 72 | echo "
"; 73 | 74 | // ix. array_push() 75 | array_push($cities, "Rajshahi", "Barishal"); 76 | echo "
";
 77 | print_r($cities);
 78 | echo "
"; 79 | 80 | // x. array_pop() 81 | $lastCity = array_pop($cities); 82 | echo $lastCity . "
"; 83 | echo "
";
 84 | print_r($cities);
 85 | echo "
"; 86 | 87 | // xi. array_values() 88 | $values = array_values($person); 89 | echo "
";
 90 | print_r($values);
 91 | echo "
"; 92 | 93 | // xii. array_map() 94 | function cityCapitalize($city) 95 | { 96 | return strtoupper($city); 97 | } 98 | 99 | $capCities = array_map("cityCapitalize", $cities); 100 | echo "
";
101 | print_r($capCities);
102 | echo "
"; 103 | 104 | // xiii. array_unique() 105 | $dupCities = ["Dhaka", "Chittagong", "Sylhet", "Khulna", "Dhaka", "Chittagong"]; 106 | $uniqueCities = array_unique($dupCities); 107 | echo "
";
108 | print_r($uniqueCities);
109 | echo "
"; 110 | 111 | // xiv. array_slice() 112 | $someCities = array_slice($cities, 1, 3); 113 | echo "
";
114 | print_r($someCities);
115 | echo "
"; 116 | 117 | // xv. array_diff() 118 | $diffCities = array_diff($cities, $otherCities); 119 | echo "
";
120 | print_r($diffCities);
121 | echo "
"; 122 | 123 | // xvi. array_search() 124 | $cityIndex = array_search("Sylhet", $cities); 125 | echo $cityIndex . "
"; 126 | 127 | // xvii. array_reverse() 128 | $revCities = array_reverse($cities); 129 | echo "
";
130 | print_r($revCities);
131 | echo "
"; 132 | -------------------------------------------------------------------------------- /project/change-password.php: -------------------------------------------------------------------------------- 1 | window.location.href = 'sign-in.php';"; 5 | exit(); 6 | } 7 | if (isset($_POST['changePassword'])) { 8 | $currentPassword = cleanData($_POST['currentPassword']); 9 | $newPassword = cleanData($_POST['newPassword']); 10 | $confirmPassword = cleanData($_POST['confirmPassword']); 11 | $id = $_SESSION['user']['id']; 12 | $sql = "SELECT * FROM `users` WHERE `id` = '$id'"; 13 | $query = $conn->query($sql); 14 | $userData = $query->fetch_assoc(); 15 | if (empty($currentPassword)) { 16 | $errCurrentPassword = "Current Password is required"; 17 | } elseif (!password_verify($currentPassword, $userData['password'])) { 18 | $errCurrentPassword = "Current Password is incorrect"; 19 | } else { 20 | $crrCurrentPassword = $currentPassword; 21 | } 22 | if (empty($newPassword)) { 23 | $errNewPassword = "New Password is required"; 24 | } elseif (strlen($newPassword) < 8) { 25 | $errNewPassword = "Password must be at least 8 characters"; 26 | } else { 27 | $crrNewPassword = $newPa ssword; 28 | } 29 | if (empty($confirmPassword)) { 30 | $errConfirmPassword = "Confirm Password is required"; 31 | } elseif ($newPassword !== $confirmPassword) { 32 | $errConfirmPassword = "Password does not match"; 33 | } else { 34 | $crrConfirmPassword = $confirmPassword; 35 | } 36 | if (isset($crrCurrentPassword) && isset($crrNewPassword) && isset($crrConfirmPassword)) { 37 | $newPassword = password_hash($newPassword, PASSWORD_DEFAULT); 38 | $sql = "UPDATE users SET password = '$newPassword' WHERE id = '$id'"; 39 | if (mysqli_query($conn, $sql)) { 40 | echo ""; 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 | -------------------------------------------------------------------------------- /project/admin/add-new-product.php: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | 7 | real_escape_string($_POST['product-description']); 12 | $productImage = $_FILES['product-image']['name']; 13 | $productImageTmp = $_FILES['product-image']['tmp_name']; 14 | move_uploaded_file($productImageTmp, "../assets/images/$productImage"); 15 | $query = "INSERT INTO products (product_name, product_price, product_description, product_image) VALUES ('$productName', '$productPrice', '$productDescription', '$productImage')"; 16 | $result = mysqli_query($conn, $query); 17 | if($result){ 18 | echo ""; 19 | }else{ 20 | echo ""; 21 | } 22 | } 23 | ?> 24 |
25 |
26 | 27 |
28 |
29 |
30 |
31 |

Add New Product

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 | -------------------------------------------------------------------------------- /L35 - crud.php: -------------------------------------------------------------------------------- 1 | query("INSERT INTO users (name, email, gender, password) VALUES ('$name', '$email', '$gender', '$password')"); 15 | 16 | if ($insert) { 17 | echo "User added successfully"; 18 | // header("Refresh:0"); 19 | } else { 20 | echo "Failed to add user"; 21 | } 22 | } 23 | 24 | if (isset($_GET['did'])) { 25 | $id = $_GET['did']; 26 | $delete = $conn->query("DELETE FROM users WHERE id = $id"); 27 | 28 | if ($delete) { 29 | header("Location: ./L35%20-%20crud.php"); 30 | } else { 31 | echo "Failed to delete user"; 32 | } 33 | } 34 | 35 | 36 | $users = $conn->query("SELECT * FROM users"); 37 | $userArr = $users->fetch_all(MYSQLI_ASSOC); 38 | 39 | ?> 40 |

Add User

41 |
42 |

43 |

44 | Male 45 | Female 46 | Others 47 |

48 | 49 |

50 | 51 |
52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | $user) : ?> 62 | 63 | 64 | 65 | 66 | 67 | 71 | 72 | 73 |
SNNameEmailgenderActions
68 | Edit 69 | Delete 70 |
74 | 75 | query("UPDATE `users` SET `name` = '$name', `email` = '$email', `gender` = '$gender' WHERE id = $id"); 83 | 84 | if ($update) { 85 | header("locAtion: ./L35%20-%20crud.php"); 86 | } else { 87 | echo "Failed to update user"; 88 | } 89 | } 90 | 91 | if (isset($_GET['eid'])) { 92 | $id = $_GET['eid']; 93 | $user = $conn->query("SELECT * FROM users WHERE id = $id")->fetch_assoc(); 94 | ?> 95 |

Edit User

96 |
97 |

98 |

99 | required>Male 100 | required>Female 101 | required>Others 102 |

103 | 104 |
105 | -------------------------------------------------------------------------------- /L37 - oop2.php: -------------------------------------------------------------------------------- 1 | age; 21 | } 22 | 23 | public function studentName(): string 24 | { 25 | return "Student name is : " . $this->name . " and phone number is : " . $this->phone . " and " . $this->studentAge(); 26 | } 27 | 28 | public function __construct() 29 | { 30 | echo "This is a constructor
"; 31 | } 32 | 33 | public function __destruct() 34 | { 35 | echo "This is a destructor
"; 36 | } 37 | 38 | // Magic methods 39 | public function __get(string $property): void 40 | { 41 | echo "You are trying to access non-existing or private property ($property)"; 42 | } 43 | 44 | public function __set(string $property, string $value): void 45 | { 46 | echo "You are trying to set non-existing or private property ($property) with value ($value)
"; 47 | } 48 | 49 | // abstract method 50 | abstract public function address(): string; 51 | } 52 | 53 | 54 | 55 | $student = new class extends studentInfo2 56 | { 57 | public string $area = "Dhanmondi"; 58 | public string $city = "Dhaka"; 59 | public string $country = "Bangladesh"; 60 | 61 | public function address(): string 62 | { 63 | return $this->area . ", " . $this->city . ", " . $this->country; 64 | } 65 | }; 66 | 67 | $student->name = "Md Rubel"; 68 | echo $student->studentName() . "
"; 69 | echo $student->city . "
"; 70 | $student->city = "Dhaka"; 71 | echo $student->address() . "
"; 72 | 73 | // Final 74 | final class studentInfo3 extends studentInfo2 75 | { 76 | final public function address(): string 77 | { 78 | return "This is a final method"; 79 | } 80 | 81 | public function __construct() 82 | { 83 | return; 84 | } 85 | 86 | public function __destruct() 87 | { 88 | return; 89 | } 90 | } 91 | 92 | $student2 = new studentInfo3(); 93 | 94 | // Object Cloning 95 | $student3 = clone $student2; 96 | echo $student3->address() . "
"; 97 | 98 | // Comparing Objects 99 | 100 | $student4 = new studentInfo3(); 101 | $student5 = new studentInfo3(); 102 | 103 | if ($student4 == $student5) { 104 | echo "Both objects are equal
"; 105 | } else { 106 | echo "Both objects are not equal
"; 107 | } 108 | 109 | // Late Static Bindings 110 | class studentInfo4 111 | { 112 | public static function studentAge(): string 113 | { 114 | return "Student age is : " . static::$age; 115 | } 116 | } 117 | 118 | class studentInfo5 extends studentInfo4 119 | { 120 | public static int $age = 25; 121 | } 122 | 123 | echo studentInfo5::studentAge() . "
"; 124 | 125 | // Objects and references 126 | $student6 = new studentInfo5(); 127 | $student7 = $student6; 128 | $student7::$age = 30; 129 | echo studentInfo5::studentAge() . "
"; 130 | 131 | // Object Serialization 132 | $student8 = new studentInfo5(); 133 | $student8 = serialize($student8); 134 | echo $student8 . "
"; 135 | 136 | // Traits 137 | trait studentInfo6 138 | { 139 | public function studentName(): string 140 | { 141 | return "Student name is : " . $this->name; 142 | } 143 | 144 | public function studentAge(): string 145 | { 146 | return "Student age is : " . $this->age; 147 | } 148 | } 149 | 150 | class studentInfo7 151 | { 152 | use studentInfo6; 153 | public string $name = "Md Alamin"; 154 | public int $age = 25; 155 | } 156 | -------------------------------------------------------------------------------- /project/navbar.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /project/admin/all-orders.php: -------------------------------------------------------------------------------- 1 | 29 | 30 | 31 | 32 |
33 |
34 | 35 |
36 |
37 |
38 |
39 |

All Orders

40 |
41 |
42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 81 | 82 | 83 | 84 |
Order IDProduct NameProduct PriceQuantityOrder DateAddressPhonePayment MethodTransaction IDStatus
72 | 80 |
85 |
86 |
87 | 108 | 109 |
110 |
111 | 112 | 113 | -------------------------------------------------------------------------------- /project/admin/assets/img/error-404-monochrome.svg: -------------------------------------------------------------------------------- 1 | error-404-monochrome -------------------------------------------------------------------------------- /project/checkout.php: -------------------------------------------------------------------------------- 1 | query("SELECT * FROM products WHERE id = $product_id")->fetch_assoc(); 10 | return $product['product_price'] * $quantity; 11 | }, array_keys($_SESSION['cart']), $_SESSION['cart'])); 12 | 13 | $query = "INSERT INTO orders (address, phone, payment_method, transaction_id, total) VALUES ('$address', '$phone', '$payment_method', '$transaction_id', $total)"; 14 | $result = $conn->query($query); 15 | if ($result) { 16 | $order_id = $conn->insert_id; 17 | foreach ($_SESSION['cart'] as $product_id => $quantity) { 18 | $query = "INSERT INTO order_items (order_id, product_id, quantity) VALUES ($order_id, $product_id, $quantity)"; 19 | $conn->query($query); 20 | } 21 | unset($_SESSION['cart']); 22 | echo ""; 26 | 27 | } else { 28 | echo ""; 29 | } 30 | } 31 | ?> 32 | 33 | 34 |
35 |

Checkout

36 |
37 |
38 |
39 |
40 |
Customer Address
41 |
42 |
43 | 44 | 45 |
46 |
47 | 48 | 49 |
50 | 51 | 52 |
Payment Method
53 |
54 | 55 | 58 |
59 |
60 | 61 | 64 |
65 |
66 | 67 | 68 |
69 | 70 | 71 |
Cart
72 | 73 | $quantity) : ?> 74 | query("SELECT * FROM products WHERE id = $product_id")->fetch_assoc(); 76 | ?> 77 |
78 |
79 | <?= $product['product_name'] ?> 80 |
81 |
82 |
83 |

Price:

84 |

Quantity:

85 |

Total:

86 |
87 |
88 | 89 | 90 | 91 |
92 |
93 |
Total: $query("SELECT * FROM products WHERE id = $product_id")->fetch_assoc(); 95 | return $product['product_price'] * $quantity; 96 | }, array_keys($_SESSION['cart']), $_SESSION['cart'])) ?>
97 |
98 |
99 | 100 | 101 |
102 |
103 |
104 |
105 |
106 |
107 | 108 |
109 |

No items in cart

110 |
111 | 112 | 115 | -------------------------------------------------------------------------------- /L22 - form-validation.php: -------------------------------------------------------------------------------- 1 | 76 |

Sign-up Form

77 |
78 | 79 | 80 |

81 | 82 | 83 |

84 | 85 | 86 |

87 | 88 |

89 | 90 | 93 | 96 | 97 |

98 | 99 | 102 | 105 | 108 | 111 | 112 |

113 | 114 | 123 | 124 |

125 | Show Password 126 |

127 | 128 |
129 | 130 | Your Information"; 133 | echo "Name: " . $crrName . "
"; 134 | echo "Email: " . $crrEmail . "
"; 135 | echo "Gender: " . $crrGender . "
"; 136 | echo "Skills: " . implode(", ", $crrSkills) . "
"; 137 | echo "Country: " . $crrCountry . "
"; 138 | } 139 | ?> 140 | 141 | -------------------------------------------------------------------------------- /project/sign-up.php: -------------------------------------------------------------------------------- 1 | window.location.href = 'index.php';"; 5 | exit(); 6 | } 7 | if (isset($_POST['signup123'])) { 8 | $fname = cleanData($_POST['fname']); 9 | $lname = cleanData($_POST['lname']); 10 | $email = cleanData($_POST['email']); 11 | $gender = isset($_POST['gender']) ? cleanData($_POST['gender']) : null; 12 | $password = cleanData($_POST['password']); 13 | $cpassword = cleanData($_POST['cpassword']); 14 | 15 | if (empty($fname)) { 16 | $errFname = "First Name is required"; 17 | } elseif (!preg_match("/^[a-zA-Z-.' ]*$/", $fname)) { 18 | $errFname = "Only letters and white space allowed"; 19 | } else { 20 | $crrFname = $fname; 21 | } 22 | 23 | if (empty($lname)) { 24 | $errLname = "Last Name is required"; 25 | } elseif (!preg_match("/^[a-zA-Z-.' ]*$/", $lname)) { 26 | $errLname = "Only letters and white space allowed"; 27 | } else { 28 | $crrLname = $lname; 29 | } 30 | 31 | if (empty($email)) { 32 | $errEmail = "Email is required"; 33 | } elseif (!filter_var($email, FILTER_VALIDATE_EMAIL)) { 34 | $errEmail = "Invalid email format"; 35 | } else { 36 | // check if email already exists 37 | $sql = "SELECT * FROM `users` WHERE `email` = '$email'"; 38 | $result = mysqli_query($conn, $sql); 39 | if (mysqli_num_rows($result) > 0) { 40 | $errEmail = "Email already exists"; 41 | } else { 42 | $crrEmail = $email; 43 | } 44 | } 45 | 46 | if (empty($gender)) { 47 | $errGender = "Please select your gender"; 48 | } else { 49 | $crrGender = $gender; 50 | } 51 | 52 | if (empty($password)) { 53 | $errPassword = "Password is required"; 54 | } elseif (strlen($password) < 8) { 55 | $errPassword = "Password must be at least 8 characters"; 56 | } else { 57 | $crrPassword = $password; 58 | } 59 | 60 | if (empty($cpassword)) { 61 | $errCpassword = "Confirm Password is required"; 62 | } elseif ($cpassword != $password) { 63 | $errCpassword = "Password does not match"; 64 | } else { 65 | $crrCpassword = $cpassword; 66 | } 67 | 68 | if (isset($crrFname) && isset($crrLname) && isset($crrEmail) && isset($crrGender) && isset($crrPassword) && isset($crrCpassword)) { 69 | $password = password_hash($crrPassword, PASSWORD_DEFAULT); 70 | $sql = "INSERT INTO `users` (`fname`, `lname`, `email`, `password`, `gender`) VALUES ('$crrFname', '$crrLname', '$crrEmail', '$password', '$crrGender')"; 71 | if (mysqli_query($conn, $sql)) { 72 | echo ""; 73 | header("refresh:2;url=sign-in.php"); 74 | } else { 75 | echo ""; 76 | } 77 | } 78 | } 79 | ?> 80 |
81 |
82 |
83 |

Sign Up

84 |
85 |
86 |
87 | " value=""> 88 |
89 | 90 |
91 |
92 |
93 | " value=""> 94 |
95 | 96 |
97 |
98 |
99 |
100 | " value=""> 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 | already have an account? Sign-in 144 |
145 |
146 |
147 |
148 |
149 | -------------------------------------------------------------------------------- /project/update-profile.php: -------------------------------------------------------------------------------- 1 | window.location.href = 'sign-in.php';"; 5 | exit(); 6 | } 7 | $id = $_SESSION['user']['id']; 8 | $sql = "SELECT * FROM `users` WHERE `id` = '$id'"; 9 | $query = $conn->query($sql); 10 | $userData = $query->fetch_assoc(); 11 | if (isset($_POST['update123'])) { 12 | $fname = cleanData($_POST['fname']); 13 | $lname = cleanData($_POST['lname']); 14 | $email = cleanData($_POST['email']); 15 | $gender = isset($_POST['gender']) ? cleanData($_POST['gender']) : null; 16 | $mobile = cleanData($_POST['mobile']); 17 | $address_line_1 = cleanData($_POST['address_line_1']); 18 | $address_line_2 = cleanData($_POST['address_line_2']); 19 | $city = cleanData($_POST['city']); 20 | $zip = cleanData($_POST['zip']); 21 | 22 | if (empty($fname)) { 23 | $errFname = "First Name is required"; 24 | } elseif (!preg_match("/^[a-zA-Z-.' ]*$/", $fname)) { 25 | $errFname = "Only letters and white space allowed"; 26 | } else { 27 | $crrFname = $fname; 28 | } 29 | 30 | if (empty($lname)) { 31 | $errLname = "Last Name is required"; 32 | } elseif (!preg_match("/^[a-zA-Z-.' ]*$/", $lname)) { 33 | $errLname = "Only letters and white space allowed"; 34 | } else { 35 | $crrLname = $lname; 36 | } 37 | 38 | if (empty($email)) { 39 | $errEmail = "Email is required"; 40 | } elseif (!filter_var($email, FILTER_VALIDATE_EMAIL)) { 41 | $errEmail = "Invalid email format"; 42 | } else { 43 | $crrEmail = $email; 44 | } 45 | 46 | if (empty($gender)) { 47 | $errGender = "Please select your gender"; 48 | } else { 49 | $crrGender = $gender; 50 | } 51 | 52 | if (empty($mobile)) { 53 | $errMobile = "Mobile is required"; 54 | } elseif (!preg_match("/^[0-9]*$/", $mobile)) { 55 | $errMobile = "Only numbers allowed"; 56 | } else { 57 | $crrMobile = $mobile; 58 | } 59 | 60 | if (empty($address_line_1)) { 61 | $errAddressLine1 = "Address Line 1 is required"; 62 | } else { 63 | $crrAddressLine1 = $address_line_1; 64 | } 65 | 66 | if ($address_line_1 == $address_line_2) { 67 | $errAddressLine2 = "Address Line 2 should not be same as Address Line 1"; 68 | } else { 69 | $crrAddressLine2 = $address_line_2; 70 | } 71 | 72 | if (empty($city)) { 73 | $errCity = "City is required"; 74 | } else { 75 | $crrCity = $city; 76 | } 77 | 78 | if (empty($zip)) { 79 | $errZip = "Zip is required"; 80 | } elseif (!preg_match("/^[0-9]*$/", $zip)) { 81 | $errZip = "Only numbers allowed"; 82 | } else { 83 | $crrZip = $zip; 84 | } 85 | 86 | if (empty($errFname) && empty($errLname) && empty($errEmail) && empty($errGender) && empty($errMobile) && empty($errAddressLine1) && empty($errAddressLine2) && empty($errCity) && empty($errZip)) { 87 | $sql = "UPDATE `users` SET `fname` = '$fname', `lname` = '$lname', `email` = '$email', `gender` = '$gender', `mobile` = '$mobile', `address_line_1` = '$address_line_1', `address_line_2` = '$address_line_2', `city` = '$city', `zip` = '$zip' WHERE `id` = '$id'"; 88 | $query = $conn->query($sql); 89 | if ($query) { 90 | echo ""; 91 | } else { 92 | echo ""; 24 | }else{ 25 | echo ""; 26 | } 27 | } 28 | 29 | if(isset($_POST['deleteProduct'])){ 30 | $id = $_POST['id']; 31 | $query = "DELETE FROM products WHERE id = $id"; 32 | $result = mysqli_query($conn, $query); 33 | if($result){ 34 | echo ""; 35 | }else{ 36 | echo ""; 37 | } 38 | } 39 | ?> 40 | 41 |
42 |
43 | 44 |
45 |
46 |
47 |
48 |

All Products

49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 66 | 67 | 68 | 69 | 70 | 71 | 80 | 81 | 85 | 86 |
Product IDProduct NameProduct PriceProduct ImageAction
<?= $row['product_name'] ?> 72 | 73 | 76 | 79 |
87 |
88 |
89 | 90 |
91 |
92 | 95 | 96 | 97 | 98 | 140 | 141 | 142 | 161 | 162 | 198 | 199 | 200 | 201 | -------------------------------------------------------------------------------- /L23 - form-validation.php: -------------------------------------------------------------------------------- 1 | "; 61 | print_r($_POST); 62 | echo ""; 63 | } 64 | } 65 | 66 | ?> 67 | 68 | 69 | 70 | 71 | 72 | 73 | Bootstrap demo 74 | 75 | 76 | 77 | 78 |
79 |
80 |
81 |

Registration Form

82 |
83 |
84 | " name="name"> 85 |
86 | 87 |
88 |
89 |
90 | " name="email"> 91 |
92 | 93 |
94 |
95 |
96 | " name="password"> 97 |
98 | 99 |
100 |
101 |
rounded py-1"> 102 |
103 | 104 |
105 |
106 | 109 |
110 |
111 | 114 |
115 |
116 |
117 | 118 |
119 |
rounded py-1"> 120 |
121 | 122 |
123 |
124 | 127 |
128 |
129 | 132 |
133 |
134 | 137 |
138 |
139 | 142 |
143 |
144 |
145 | 146 |
147 |
148 | 158 |
159 | 160 |
161 |
162 |
163 | 164 |
165 |
166 |
167 |
168 |
169 | 170 | 171 | 172 | -------------------------------------------------------------------------------- /project/admin/charts.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | Charts - SB Admin 10 | 11 | 12 | 13 | 14 | 39 |
40 |
41 | 108 |
109 |
110 |
111 |
112 |

Charts

113 | 117 |
118 |
119 | Chart.js is a third party plugin that is used to generate the charts in this template. The charts below have been customized - for further customization options, please visit the official 120 | Chart.js documentation 121 | . 122 |
123 |
124 |
125 |
126 | 127 | Area Chart Example 128 |
129 |
130 | 131 |
132 |
133 |
134 |
135 |
136 | 137 | Bar Chart Example 138 |
139 |
140 | 141 |
142 |
143 |
144 |
145 |
146 | 147 | Pie Chart Example 148 |
149 |
150 | 151 |
152 |
153 |
154 |
155 |
156 | 168 |
169 |
170 | 171 | 172 | 173 | 174 | 175 | 176 | 177 | 178 | --------------------------------------------------------------------------------