├── ecommerce ├── checlout.php ├── add-product.php ├── Assets │ └── images │ │ ├── cbe.jpg │ │ ├── slide1.jpg │ │ ├── slide2.jpg │ │ ├── slide3.jpg │ │ ├── download (2).jpg │ │ ├── profileImage.jpg │ │ ├── 1_dDsuXIBb0jo1BKKikuBy6w.jpg │ │ ├── 65e60dfa36538_1709575674_1.jpg │ │ ├── HMaQFGZFaUU38awnOgW8KaFIpqlR5BtVnH6NY8zC.png │ │ ├── IU1h5iGQmTnr7KxrrtF2s7r9LW1SCWhPRucAFUDz.jpg │ │ └── TVS-Apache-RTR-160-4v-price-in-Bangladesh.jpg ├── about.php ├── contact.php ├── all-orders.php ├── all-products.php ├── single-product.php ├── all-completed-orders.php ├── logout.php ├── classes │ ├── db.php │ ├── navbar.php │ ├── addOrders.php │ ├── cart-info.php │ ├── loginClass.php │ ├── registrationClass.php │ ├── sessionClass.php │ ├── orders.php │ └── updateProfile.php ├── index.php ├── database.txt ├── customers.php ├── dashboard.php ├── settings.php ├── pages.txt ├── cart.php ├── components │ ├── latestProduct.php │ ├── sidebar.php │ ├── slider.php │ └── navbar.php ├── search.php ├── change-profile-image.php ├── login.php ├── update-profile.php ├── signup.php ├── change-password.php ├── users-orders.php ├── header.php ├── orders.php ├── checkout.php ├── footer.php └── products.php ├── test.txt ├── crud ├── footer.php ├── db.php ├── nav.php ├── uploads │ ├── 65aea4f5bad468.47565028.jpg │ └── 65b29f3dddc718.41669264.jpg ├── header.php ├── deleteStudent.php ├── index.php ├── addStudent.php └── editStudent.php ├── test.php ├── test2.txt ├── session3.php ├── first_code.php ├── file upload ├── uploads │ └── 65ae9a9302dcc5.08892587.jpg └── index.php ├── hw2 ├── uploads │ └── n1a174andnu20MPy3520yM22MJ14aoro65a55b4f87a3a0.26222765.png ├── shakil.php ├── jamal.php ├── mamun.php ├── sarwer.php ├── motiar-rahman.php └── sobuj.php ├── uploads ├── e088ac22TbT6r1u3r2MuehdP32D32hyesm2658daf0ec6a712.79012462.jpg └── m5rh2raubs2e2eT13u0T2yDe3h6c832dP8M658daf2c372820.75895565.jpg ├── get.php ├── session.php ├── try-catch.php ├── oopCrud ├── footer.php ├── header.php ├── db.php ├── navbar.php ├── add-student.php ├── delete.php ├── edit.php ├── index.php └── studentClass.php ├── session2.php ├── function.php ├── oop ├── commonClass.php ├── class.php ├── inheritenceClass.php ├── folder1 │ └── myclass.php ├── folder2 │ └── myclass.php ├── interface.php ├── static.php ├── type.php ├── abstract.php ├── accessmodifire.php └── magicFunction.php ├── randompass.php ├── email.php ├── post.php ├── json.php ├── ajaxCrud ├── db.php ├── header.php ├── index.php ├── crud.php └── footer.php ├── mathFunc.php ├── superglobals.php ├── ajax ├── backend.php └── frontend.php ├── operators.php ├── loop.php ├── revice └── index.html ├── regex.php ├── date.php ├── data-types.php ├── php-File-system.php ├── fileupload.php ├── arrayfunction.php ├── conditions.php ├── arrayproblems.php ├── array.php ├── hw1 ├── solution.php └── kanti.php ├── hw3 └── shorif │ └── index.php ├── cmbd.sql └── formvalidation.php /ecommerce/checlout.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test.txt: -------------------------------------------------------------------------------- 1 | Hello World -------------------------------------------------------------------------------- /ecommerce/add-product.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /crud/footer.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /test.php: -------------------------------------------------------------------------------- 1 | "; 5 | echo $personName; 6 | -------------------------------------------------------------------------------- /ecommerce/Assets/images/cbe.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asif-daffodil/cmbd/HEAD/ecommerce/Assets/images/cbe.jpg -------------------------------------------------------------------------------- /crud/nav.php: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /ecommerce/Assets/images/slide1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asif-daffodil/cmbd/HEAD/ecommerce/Assets/images/slide1.jpg -------------------------------------------------------------------------------- /ecommerce/Assets/images/slide2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asif-daffodil/cmbd/HEAD/ecommerce/Assets/images/slide2.jpg -------------------------------------------------------------------------------- /ecommerce/Assets/images/slide3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asif-daffodil/cmbd/HEAD/ecommerce/Assets/images/slide3.jpg -------------------------------------------------------------------------------- /crud/uploads/65aea4f5bad468.47565028.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asif-daffodil/cmbd/HEAD/crud/uploads/65aea4f5bad468.47565028.jpg -------------------------------------------------------------------------------- /crud/uploads/65b29f3dddc718.41669264.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asif-daffodil/cmbd/HEAD/crud/uploads/65b29f3dddc718.41669264.jpg -------------------------------------------------------------------------------- /ecommerce/Assets/images/download (2).jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asif-daffodil/cmbd/HEAD/ecommerce/Assets/images/download (2).jpg -------------------------------------------------------------------------------- /ecommerce/Assets/images/profileImage.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asif-daffodil/cmbd/HEAD/ecommerce/Assets/images/profileImage.jpg -------------------------------------------------------------------------------- /ecommerce/about.php: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | 7 | 10 | -------------------------------------------------------------------------------- /ecommerce/contact.php: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | 7 | 10 | -------------------------------------------------------------------------------- /ecommerce/all-orders.php: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | 7 | 10 | -------------------------------------------------------------------------------- /ecommerce/all-products.php: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | 7 | 10 | -------------------------------------------------------------------------------- /file upload/uploads/65ae9a9302dcc5.08892587.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asif-daffodil/cmbd/HEAD/file upload/uploads/65ae9a9302dcc5.08892587.jpg -------------------------------------------------------------------------------- /ecommerce/single-product.php: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | 7 | 10 | -------------------------------------------------------------------------------- /ecommerce/Assets/images/1_dDsuXIBb0jo1BKKikuBy6w.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asif-daffodil/cmbd/HEAD/ecommerce/Assets/images/1_dDsuXIBb0jo1BKKikuBy6w.jpg -------------------------------------------------------------------------------- /ecommerce/all-completed-orders.php: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | 7 | 10 | -------------------------------------------------------------------------------- /ecommerce/Assets/images/65e60dfa36538_1709575674_1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asif-daffodil/cmbd/HEAD/ecommerce/Assets/images/65e60dfa36538_1709575674_1.jpg -------------------------------------------------------------------------------- /ecommerce/Assets/images/HMaQFGZFaUU38awnOgW8KaFIpqlR5BtVnH6NY8zC.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asif-daffodil/cmbd/HEAD/ecommerce/Assets/images/HMaQFGZFaUU38awnOgW8KaFIpqlR5BtVnH6NY8zC.png -------------------------------------------------------------------------------- /ecommerce/Assets/images/IU1h5iGQmTnr7KxrrtF2s7r9LW1SCWhPRucAFUDz.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asif-daffodil/cmbd/HEAD/ecommerce/Assets/images/IU1h5iGQmTnr7KxrrtF2s7r9LW1SCWhPRucAFUDz.jpg -------------------------------------------------------------------------------- /ecommerce/Assets/images/TVS-Apache-RTR-160-4v-price-in-Bangladesh.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asif-daffodil/cmbd/HEAD/ecommerce/Assets/images/TVS-Apache-RTR-160-4v-price-in-Bangladesh.jpg -------------------------------------------------------------------------------- /hw2/uploads/n1a174andnu20MPy3520yM22MJ14aoro65a55b4f87a3a0.26222765.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asif-daffodil/cmbd/HEAD/hw2/uploads/n1a174andnu20MPy3520yM22MJ14aoro65a55b4f87a3a0.26222765.png -------------------------------------------------------------------------------- /uploads/e088ac22TbT6r1u3r2MuehdP32D32hyesm2658daf0ec6a712.79012462.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asif-daffodil/cmbd/HEAD/uploads/e088ac22TbT6r1u3r2MuehdP32D32hyesm2658daf0ec6a712.79012462.jpg -------------------------------------------------------------------------------- /uploads/m5rh2raubs2e2eT13u0T2yDe3h6c832dP8M658daf2c372820.75895565.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asif-daffodil/cmbd/HEAD/uploads/m5rh2raubs2e2eT13u0T2yDe3h6c832dP8M658daf2c372820.75895565.jpg -------------------------------------------------------------------------------- /get.php: -------------------------------------------------------------------------------- 1 | 4 | 5 |
6 | 7 | 8 |
-------------------------------------------------------------------------------- /ecommerce/logout.php: -------------------------------------------------------------------------------- 1 | unsetSession('user'); 8 | header('Location: index.php'); 9 | -------------------------------------------------------------------------------- /session.php: -------------------------------------------------------------------------------- 1 | "; 10 | -------------------------------------------------------------------------------- /ecommerce/classes/db.php: -------------------------------------------------------------------------------- 1 | "; 6 | } catch (Exception $e) { 7 | echo "Message : " . $e->getMessage() . "
"; 8 | } finally { 9 | echo "Finally block"; 10 | } 11 | -------------------------------------------------------------------------------- /oopCrud/footer.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /session2.php: -------------------------------------------------------------------------------- 1 | "; 7 | echo $_SESSION['city'] . "
"; 8 | echo $_SESSION['country'] . "
"; 9 | echo $_SESSION['kakku'] . "
"; 10 | -------------------------------------------------------------------------------- /function.php: -------------------------------------------------------------------------------- 1 | "; 5 | } 6 | 7 | echo personInfo("Hello", "World"); 8 | echo personInfo("Hi", "Universe"); 9 | echo personInfo(); 10 | echo personInfo("Oi"); 11 | echo personInfo(w: "Brother"); 12 | -------------------------------------------------------------------------------- /oop/commonClass.php: -------------------------------------------------------------------------------- 1 | "; 10 | echo folder2::myStaticFunction(); 11 | -------------------------------------------------------------------------------- /randompass.php: -------------------------------------------------------------------------------- 1 | 6 |
7 | 8 | 9 | -------------------------------------------------------------------------------- /ecommerce/index.php: -------------------------------------------------------------------------------- 1 | 5 | 6 |
7 |
8 | 9 |
10 |
11 | 12 | 13 | -------------------------------------------------------------------------------- /ecommerce/classes/navbar.php: -------------------------------------------------------------------------------- 1 | myName; 17 | echo "
"; 18 | echo $myObject->myFunction(); 19 | -------------------------------------------------------------------------------- /ecommerce/database.txt: -------------------------------------------------------------------------------- 1 | users 2 | - name 3 | - email 4 | - password 5 | - img 6 | - role 7 | - city 8 | 9 | products 10 | - name 11 | - regular_price 12 | - discount_price 13 | - brand 14 | - description 15 | - img 16 | 17 | orders 18 | - user_id 19 | - product_id 20 | - quantity 21 | - total_price -------------------------------------------------------------------------------- /crud/header.php: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | Document 11 | 12 | 13 | 14 | 15 |

16 |
17 |

-------------------------------------------------------------------------------- /email.php: -------------------------------------------------------------------------------- 1 | grandpaName . " " . $this->fatherName; 14 | } 15 | } 16 | 17 | $obj = new myFather; 18 | echo $obj->myGurdience(); 19 | -------------------------------------------------------------------------------- /ecommerce/customers.php: -------------------------------------------------------------------------------- 1 | 4 |
5 |
6 | 9 |
10 |

Dashboard

11 |
12 |
13 |
14 | 15 | 16 | -------------------------------------------------------------------------------- /ecommerce/dashboard.php: -------------------------------------------------------------------------------- 1 | 4 |
5 |
6 | 9 |
10 |

Dashboard

11 |
12 |
13 |
14 | 15 | 16 | -------------------------------------------------------------------------------- /ecommerce/settings.php: -------------------------------------------------------------------------------- 1 | 4 |
5 |
6 | 9 |
10 |

Dashboard

11 |
12 |
13 |
14 | 15 | 16 | -------------------------------------------------------------------------------- /oop/folder1/myclass.php: -------------------------------------------------------------------------------- 1 | "; 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /oop/folder2/myclass.php: -------------------------------------------------------------------------------- 1 | "; 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /post.php: -------------------------------------------------------------------------------- 1 | 7 |
" method="post"> 8 | 9 | 10 |
11 | -------------------------------------------------------------------------------- /oop/interface.php: -------------------------------------------------------------------------------- 1 | "Asif", 5 | "email" => "asif@dti.ac", 6 | "gender" => "Male", 7 | "city" => "Dhaka", 8 | ]; 9 | 10 | // convert PHP data into json data 11 | $jsonData = json_encode($data); 12 | echo $jsonData; 13 | 14 | // convert json data into PHP data 15 | $phpData = json_decode($jsonData); 16 | echo "
";
17 | print_r($phpData);
18 | echo "
"; 19 | -------------------------------------------------------------------------------- /ecommerce/pages.txt: -------------------------------------------------------------------------------- 1 | home page 2 | about 3 | single product 4 | cart 5 | checkout page 6 | contact 7 | 8 | user panel 9 | - change password 10 | - change profile image 11 | - update-profile 12 | - logout 13 | 14 | Account 15 | - login page 16 | - signup page 17 | 18 | Admin panel 19 | - dashboard 20 | - all products 21 | - add product 22 | - all orders 23 | - edit orders 24 | - delete orders 25 | - all completed orders 26 | 27 | -------------------------------------------------------------------------------- /ajaxCrud/db.php: -------------------------------------------------------------------------------- 1 | conn = mysqli_connect($this->host, $this->user, $this->password, $this->database); 16 | } 17 | 18 | public function __destruct() 19 | { 20 | $this->conn->close(); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /oop/static.php: -------------------------------------------------------------------------------- 1 | "; 14 | } 15 | } 16 | 17 | // $myStaticInstance = new myStaticClass; 18 | // echo myStaticClass::$myStaticName; 19 | echo "
"; 20 | echo myStaticClass::myStaticFunction(); 21 | -------------------------------------------------------------------------------- /oop/type.php: -------------------------------------------------------------------------------- 1 | "; 5 | echo ceil($y) . "
"; 6 | echo floor($y) . "
"; 7 | echo pi() . "
"; 8 | echo min(0, 150, 30, 20, -8, -200) . "
"; 9 | echo max(0, 150, 30, 20, -8, -200, 200) . "
"; 10 | echo abs(-6.7) . "
"; 11 | 12 | // get two value after decimal point 13 | echo number_format(pi(), 2) . "
"; 14 | echo rand() . "
"; 15 | echo uniqid() . "
"; 16 | echo rand(1, 100) . "
"; 17 | echo mt_rand(1, 100) . "
"; 18 | echo sqrt(100) . "
"; 19 | echo pow(2, 3) . "
"; 20 | -------------------------------------------------------------------------------- /oopCrud/header.php: -------------------------------------------------------------------------------- 1 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | Bootstrap demo 15 | 16 | 17 | -------------------------------------------------------------------------------- /superglobals.php: -------------------------------------------------------------------------------- 1 | "; 16 | 17 | // $_SERVER superglobal 18 | echo $_SERVER['PHP_SELF'] . "
"; 19 | echo $_SERVER['SERVER_NAME'] . "
"; 20 | echo $_SERVER['SCRIPT_FILENAME'] . "
"; 21 | echo $_SERVER['SERVER_PORT'] . "
"; 22 | echo $_SERVER['REQUEST_URI'] . "
"; 23 | echo $_SERVER['SCRIPT_NAME'] . "
"; 24 | 25 | echo "
";
26 | print_r($_SERVER);
27 | echo "
"; 28 | -------------------------------------------------------------------------------- /ajax/backend.php: -------------------------------------------------------------------------------- 1 | query("SElECT * FROM students WHERE name LIKE '%{$_GET['search']}%'"); 22 | echo json_encode($result->fetch_all()); 23 | } 24 | -------------------------------------------------------------------------------- /ajaxCrud/header.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Document 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /oop/abstract.php: -------------------------------------------------------------------------------- 1 | myTraitFunction(); 35 | } 36 | } 37 | 38 | $myObject = new myOtherClass; 39 | echo $myObject->myOtherFunction(); 40 | -------------------------------------------------------------------------------- /ecommerce/classes/addOrders.php: -------------------------------------------------------------------------------- 1 | createOrder($user_id, $product_id, $quantity, $total_price, $payment_method, $receiver_name, $email, $receiver_phone, $receiver_address); 19 | echo json_encode(['message' => 'Order placed successfully!']); 20 | exit; 21 | } 22 | -------------------------------------------------------------------------------- /operators.php: -------------------------------------------------------------------------------- 1 | not equal 26 | * < less than 27 | * > greater than 28 | * <= less than or equal to 29 | * >= greater than or equal to 30 | */ 31 | 32 | // asignement operators 33 | /** 34 | * = equal 35 | * += add and assign 36 | * -= subtract and assign 37 | * *= multiply and assign 38 | * /= divide and assign 39 | * %= modulus and assign 40 | * .= concatenate and assign 41 | */ 42 | 43 | $fname = "Akram"; 44 | $fname .= " Khan"; 45 | 46 | echo $fname; 47 | -------------------------------------------------------------------------------- /ecommerce/classes/cart-info.php: -------------------------------------------------------------------------------- 1 | query($query); 10 | $products = []; 11 | if ($result->num_rows > 0) { 12 | while ($row = $result->fetch_assoc()) { 13 | $row['count'] = $cart[$row['id']]; // Add product count to each product 14 | $products[] = $row; 15 | } 16 | } 17 | // calculate total price 18 | $total = 0; 19 | foreach ($products as $product) { 20 | $total += $product['discount_price'] * $product['count']; // Use product count in calculation 21 | } 22 | echo json_encode(['products' => $products, 'total' => $total]); 23 | -------------------------------------------------------------------------------- /oopCrud/db.php: -------------------------------------------------------------------------------- 1 | conn = mysqli_connect($this->dbhost, $this->dbuser, $this->dbpass); 17 | // create database if not exists 18 | $sql = "CREATE DATABASE IF NOT EXISTS $this->dbname"; 19 | $this->conn->query($sql); 20 | $this->conn->select_db($this->dbname); 21 | } 22 | 23 | public function __destruct() 24 | { 25 | $this->conn->close(); 26 | } 27 | 28 | public function checkActive($pageName) 29 | { 30 | if (basename($_SERVER['PHP_SELF']) === $pageName) { 31 | echo 'active'; 32 | } 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /loop.php: -------------------------------------------------------------------------------- 1 | "; 15 | 16 | // do while loop 17 | $y = 35; 18 | do { 19 | echo $y . ", "; 20 | $y++; 21 | } while ($y < 10); 22 | 23 | echo "
"; 24 | 25 | for ($i = 6; $i <= 100; $i += 6) { 26 | if ($i == 42) { 27 | continue; 28 | } 29 | if ($i % 6 == 0) { 30 | echo $i . ", "; 31 | } 32 | if ($i >= 66) { 33 | break; 34 | } 35 | } 36 | 37 | echo "
"; 38 | 39 | // foreach loop 40 | $colors = ["red", "green", "blue", "yellow"]; 41 | foreach ($colors as $value) { 42 | echo $value . ", "; 43 | } 44 | echo "
"; 45 | 46 | $ghor = 15; 47 | for ($i = 1; $i <= 10; $i++) { 48 | echo $ghor . " x " . $i . " = " . $ghor * $i . "
"; 49 | } 50 | -------------------------------------------------------------------------------- /revice/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Document 8 | 9 | 10 | 11 |
12 | 13 |

14 | Show password 15 |

16 | 17 |
18 | 19 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /oop/accessmodifire.php: -------------------------------------------------------------------------------- 1 | name . " " . $this->age . " " . $this->email; 13 | } 14 | 15 | public function __construct() 16 | { 17 | echo "This is constructor
"; 18 | } 19 | 20 | public function __destruct() 21 | { 22 | echo "
This is destructor"; 23 | } 24 | } 25 | 26 | $testObject = new testClass; 27 | echo $testObject->name; 28 | echo "
"; 29 | echo testClass::dob; 30 | echo "
"; 31 | echo $testObject::dob . "
"; 32 | 33 | // echo $testObject->age; 34 | 35 | 36 | class otherTestClass extends testClass 37 | { 38 | public function myOtherFunction() 39 | { 40 | return $this->name . " " . $this->age; 41 | } 42 | } 43 | 44 | $otherTestObject = new otherTestClass; 45 | -------------------------------------------------------------------------------- /ecommerce/classes/loginClass.php: -------------------------------------------------------------------------------- 1 | real_escape_string($email); 16 | $password = $conn->real_escape_string($password); 17 | $sql = "SELECT * FROM users WHERE email = '$email'"; 18 | $result = $conn->query($sql); 19 | 20 | if ($result->num_rows > 0) { 21 | $row = $result->fetch_assoc(); 22 | if (password_verify($password, $row['password'])) { 23 | // set session 24 | $session = new session(); 25 | $session->setSession('user', $row); 26 | return true; 27 | } else { 28 | return false; 29 | } 30 | } else { 31 | return false; 32 | } 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /ecommerce/classes/registrationClass.php: -------------------------------------------------------------------------------- 1 | query($sql); 17 | if ($result->num_rows > 0) { 18 | return false; 19 | } else { 20 | return true; 21 | } 22 | } 23 | } 24 | 25 | public function register($name, $email, $password) 26 | { 27 | global $conn; 28 | $sql = "INSERT INTO users (name, email, password) VALUES ('$name', '$email', '$password')"; 29 | if ($conn->query($sql) === TRUE) { 30 | return true; 31 | } else { 32 | return false; 33 | } 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /crud/deleteStudent.php: -------------------------------------------------------------------------------- 1 | real_escape_string($id); 5 | $sql = "SELECT * FROM `users` WHERE `id`='$id'"; 6 | $result = $conn->query($sql); 7 | $result->num_rows == 0 ? header("location:./") : null; 8 | $obj = $result->fetch_object(); 9 | if (isset($_POST['dst'])) { 10 | $result = $conn->query("DELETE FROM `users` WHERE `id`=$id"); 11 | if ($result) { 12 | $delFile = unlink("./uploads/" . $obj->img); 13 | if ($delFile) { 14 | echo "Student Deleted Successfully"; 15 | echo ""; 16 | } 17 | } else { 18 | echo "Student Not Deleted"; 19 | } 20 | } 21 | ?> 22 |
23 |

Are you sure you want to delete this student?

24 | 25 | 26 |
27 | -------------------------------------------------------------------------------- /oopCrud/navbar.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ecommerce/cart.php: -------------------------------------------------------------------------------- 1 | 4 | 5 |
6 |
7 |
8 |

Cart

9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 |
ProductImagePriceQuantityTotalAction
24 |
25 |

Total:

26 | Checkout 27 |
28 |
29 |
30 |
31 | 32 | -------------------------------------------------------------------------------- /ecommerce/classes/sessionClass.php: -------------------------------------------------------------------------------- 1 | "; 7 | 8 | // preg_match_all() function 9 | $str = "Hello World. Hello Bangladesh."; 10 | $pattern = "/hello/i"; 11 | echo preg_match_all($pattern, $str); 12 | 13 | echo "
"; 14 | 15 | // preg_replace() function 16 | $str = "Hello World. Hello Bangladesh."; 17 | $pattern = "/hello/i"; 18 | $replace = "Hi"; 19 | echo preg_replace($pattern, $replace, $str); 20 | 21 | echo "
"; 22 | 23 | // regex pattern 24 | // [] - character classes 25 | // {} - quantifiers 26 | // () - group 27 | $mobile = "01700123056"; 28 | $pattern = "/^01[0-9]{9}$/"; 29 | echo preg_match($pattern, $mobile); 30 | 31 | echo "
"; 32 | 33 | // regex strong password with spetial carrecter 34 | $password = "Asif@123"; 35 | $pattern = "/^(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[!@#$%^&*]).{8,}$/"; 36 | echo preg_match($pattern, $password); 37 | 38 | echo "
"; 39 | 40 | // regex email validation 41 | $email = "kuddus@boyati.com"; 42 | $pattern = "/^[a-zA-Z0-9._-]+@[a-zA-Z0-9-]+\.[a-zA-Z.]{2,5}$/"; 43 | echo preg_match($pattern, $email); 44 | -------------------------------------------------------------------------------- /date.php: -------------------------------------------------------------------------------- 1 | "; 7 | 8 | // strtotime(time) 9 | 10 | $myBirthday2 = strtotime("10 September 2024"); 11 | echo Date("F-d-Y h:i:s A l", $myBirthday2) . "
"; 12 | 13 | $myStrTime = strtotime("tomorrow"); 14 | echo Date("F-d-Y h:i:s A l", $myStrTime) . "
"; 15 | 16 | $myStrTime2 = strtotime("next Sunday"); 17 | echo Date("F-d-Y h:i:s A l", $myStrTime2) . "
"; 18 | 19 | $myStrTime3 = strtotime("+2 Months"); 20 | echo Date("F-d-Y h:i:s A l", $myStrTime3) . "
"; 21 | 22 | $myStrTime4 = strtotime("+2 Years +3 Months -5 Days"); 23 | echo Date("F-d-Y h:i:s A l", $myStrTime4) . "
"; 24 | 25 | $myStrTime5 = strtotime("+1 Week", $myBirthday2); 26 | echo Date("F-d-Y h:i:s A l", $myStrTime5) . "
"; 27 | 28 | // Next 7 fridays 29 | $startDate = strtotime("next Friday"); 30 | $endDate = strtotime("+6 Weeks", $startDate); 31 | 32 | while ($startDate <= $endDate) { 33 | echo Date("F-d-Y /l;", $startDate) . "
"; 34 | $startDate = strtotime("+1 Week", $startDate); 35 | } 36 | -------------------------------------------------------------------------------- /oop/magicFunction.php: -------------------------------------------------------------------------------- 1 | unknownProperty[$name])) { 10 | echo $this->unknownProperty[$name]; 11 | } else { 12 | echo "You are trying to access non-existing or private property ($name)"; 13 | } 14 | } 15 | 16 | public function __set($name, $value) 17 | { 18 | $this->unknownProperty[$name] = $value; 19 | } 20 | 21 | public function __call($name, $arguments) 22 | { 23 | echo "You are calling an undefined function $name"; 24 | } 25 | 26 | public static function __callStatic($name, $arguments) 27 | { 28 | echo "You are calling an undefined static function $name"; 29 | } 30 | } 31 | 32 | $magicObject = new magicClass; 33 | echo $magicObject->myName; 34 | echo "
"; 35 | echo $magicObject->myAge; 36 | echo "
"; 37 | $magicObject->myAge = 36; 38 | echo $magicObject->myAge; 39 | $magicObject->myCity = "Dhaka"; 40 | echo "
"; 41 | echo $magicObject->myCity; 42 | echo "
"; 43 | $magicObject->myFunction(); 44 | echo "
"; 45 | magicClass::myStaticFunction(); 46 | -------------------------------------------------------------------------------- /data-types.php: -------------------------------------------------------------------------------- 1 | "; 7 | 8 | // integer 9 | $personAge = 25; 10 | var_dump($personAge); 11 | 12 | echo "
"; 13 | 14 | // float 15 | $personHeight = 5.8; 16 | var_dump($personHeight); 17 | 18 | echo "
"; 19 | 20 | // boolean 21 | $personIsMale = true; 22 | var_dump($personIsMale); 23 | 24 | echo "
"; 25 | 26 | // array 27 | // $personHobbies = array("Reading", "Coding", "Gaming"); 28 | $personHobbies = ["Reading", 123, true]; 29 | var_dump($personHobbies); 30 | 31 | echo "
"; 32 | 33 | // object 34 | class personInfo 35 | { 36 | public $personName = "Akram Khan"; 37 | } 38 | $obj = new personInfo; 39 | var_dump($obj); 40 | 41 | echo "
"; 42 | 43 | // null 44 | $personName = null; 45 | var_dump($personName); 46 | 47 | echo "
"; 48 | 49 | // resource 50 | $personName = fopen("data-types.php", "r"); 51 | var_dump($personName); 52 | 53 | // single line comment 54 | # this is also a single line comments 55 | /* 56 | this is 57 | a multi line 58 | comment 59 | */ 60 | /** 61 | * this is a doc block 62 | * this is also a multi line comment 63 | * this is also a multi line comment 64 | */ 65 | 66 | /* kiasdsad 67 | asdasd 68 | addslashesasdas 69 | asdasd */ 70 | 71 | $x = 123; 72 | $x = 231; 73 | 74 | define("y", 321); 75 | -------------------------------------------------------------------------------- /php-File-system.php: -------------------------------------------------------------------------------- 1 | "; 6 | 7 | // dirname 8 | echo dirname($path); 9 | 10 | // copy 11 | // copy('test.txt', 'test2.txt'); 12 | 13 | // file() 14 | $data = file('test.txt'); 15 | echo "
";
16 | print_r($data);
17 | echo "
"; 18 | 19 | // file_exists 20 | if (file_exists('test.txt')) { 21 | echo "File exists"; 22 | } else { 23 | echo "File not exists"; 24 | } 25 | echo "
"; 26 | 27 | // file_put_contents 28 | file_put_contents('test.txt', 'Hello World'); 29 | 30 | // file_get_contents 31 | $data = file_get_contents('test.txt'); 32 | echo $data . "
"; 33 | 34 | // filesize 35 | echo filesize('test.txt') . "
"; 36 | 37 | // filetype 38 | echo filetype('uploads') . "
"; 39 | 40 | // is_dir 41 | if (is_dir('uploads')) { 42 | echo "It is a directory"; 43 | } else { 44 | echo "It is not a directory"; 45 | } 46 | echo "
"; 47 | 48 | // is_file 49 | if (is_file('test.txt')) { 50 | echo "It is a file"; 51 | } else { 52 | echo "It is not a file"; 53 | } 54 | 55 | // link 56 | // link('test.txt', 'test3.txt'); 57 | 58 | // unlink 59 | // unlink('test3.txt'); 60 | 61 | // mkdir 62 | if (!is_dir('test')) { 63 | mkdir('test'); 64 | } 65 | 66 | // rmdir 67 | rmdir('test'); 68 | 69 | // move_uploaded_file() 70 | 71 | // pathinfo 72 | echo "
";
73 | print_r(pathinfo($path));
74 | echo "
"; 75 | 76 | echo pathinfo($path)['extension']; 77 | -------------------------------------------------------------------------------- /ajaxCrud/index.php: -------------------------------------------------------------------------------- 1 | 4 |
5 |
6 |
7 | Student Management System 8 |
9 |
10 | 11 |
12 |
13 | 14 | 15 |
16 |
17 | 18 |
    19 | 20 |
21 | 22 |
23 |
24 | 25 | 26 |
27 | Back 28 |
29 |
30 |
31 |
32 | -------------------------------------------------------------------------------- /fileupload.php: -------------------------------------------------------------------------------- 1 | Please select a file to upload"; 13 | } elseif (!in_array($fileActualExt, $allowed)) { 14 | $errFile = "Please select a valid file format"; 15 | } else { 16 | // check dir uploads 17 | if (!is_dir('uploads')) { 18 | mkdir('uploads'); 19 | } 20 | 21 | // crete new name 22 | $fileNewName = str_shuffle(date('HisAFdYDyl')) . uniqid('', true) . '.' . $fileActualExt; 23 | 24 | // upload file 25 | $fileUpload = move_uploaded_file($fileTmpName, 'uploads/' . $fileNewName); 26 | if ($fileUpload) { 27 | echo "File uploaded successfully"; 28 | } else { 29 | echo "Something went wrong"; 30 | } 31 | } 32 | } 33 | ?> 34 | 35 |
36 | 37 | 38 |
39 |
40 | -------------------------------------------------------------------------------- /arrayfunction.php: -------------------------------------------------------------------------------- 1 | "; 5 | $cities = ["Dahaka", "Bogura"]; 6 | var_dump(is_array($cities)); 7 | echo "
"; 8 | var_dump(in_array("kamal", $names)); 9 | echo "
"; 10 | $NameAndCity = array_merge($names, $cities); 11 | print_r($NameAndCity); 12 | echo "
"; 13 | $myInfo = ["Name" => "Asif", "Gender" => "Male", "City" => "Dhaka"]; 14 | $allKeys = array_keys($myInfo); 15 | print_r($allKeys); 16 | echo "
"; 17 | var_dump(array_key_exists("City", $myInfo)); 18 | echo "
"; 19 | array_shift($names); 20 | print_r($names); 21 | array_unshift($names, "Akmal", "Kuddus"); 22 | echo "
"; 23 | print_r($names); 24 | echo "
"; 25 | array_push($names, "Babul", "Kabul"); 26 | print_r($names); 27 | echo "
"; 28 | array_pop($names); 29 | print_r($names); 30 | $allVal = array_values($myInfo); 31 | echo "
"; 32 | print_r($allVal); 33 | echo "
"; 34 | array_map(function ($n) { 35 | echo $n . "
"; 36 | }, $names); 37 | $persons = ["Aslam", "Mia", "Selim", "Aslam", "Selim"]; 38 | $unique_person = array_unique($persons); 39 | echo "
"; 40 | print_r($unique_person); 41 | echo "
"; 42 | $nameSlice = array_slice($names, 1, 3); 43 | print_r($nameSlice); 44 | echo "
"; 45 | $nameDif = array_diff($names, $nameSlice); 46 | print_r($nameDif); 47 | echo "
"; 48 | $as = array_search("Akmal", $nameDif); 49 | var_dump($as); 50 | echo "
"; 51 | $reversName = array_reverse($names); 52 | print_r($reversName); 53 | -------------------------------------------------------------------------------- /crud/index.php: -------------------------------------------------------------------------------- 1 | query($sql); 5 | 6 | if ($result->num_rows == 0) { 7 | echo "No Students Found"; 8 | } else { 9 | ?> 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | fetch_object()) { 24 | ?> 25 | 26 | 27 | 30 | 31 | 32 | 33 | 34 | 35 | 39 | 40 | 41 |
SNImageNameCityGenderSubjectSkillsActions
28 | 29 | name ?>city ?>gender ?>subject ?>skill ?> 36 | 37 | 38 |
42 | 45 | 46 | 47 | -------------------------------------------------------------------------------- /ecommerce/components/latestProduct.php: -------------------------------------------------------------------------------- 1 | query($sql); 6 | $product = $result->fetch_all(MYSQLI_ASSOC); 7 | ?> 8 |
9 |
10 |
11 | Latest Products 12 |
13 |
14 |
15 | 16 |
17 |
18 | ... 19 |
20 |
21 | 22 |
23 | 24 | 25 | 26 |
27 | 28 |
29 |
30 |
31 | 32 |
33 |
-------------------------------------------------------------------------------- /ecommerce/search.php: -------------------------------------------------------------------------------- 1 | 4 |
5 |
6 |
7 | Search Results 8 |
9 |
10 |
11 | query($sql); 16 | $product = $result->fetch_all(MYSQLI_ASSOC); 17 | ?> 18 | 19 |
20 |
21 | ... 22 |
23 |
24 | 25 |
26 | 27 | 28 | 29 |
30 | Add to Cart 31 |
32 |
33 |
34 | 35 |
36 |
37 | 38 | 39 | -------------------------------------------------------------------------------- /oopCrud/add-student.php: -------------------------------------------------------------------------------- 1 | clean($_POST['name']); 11 | if ($student->vallidation($name)) { 12 | if ($student->addStudent($name)) { 13 | $bsAlert = ""; 14 | } else { 15 | $bsAlert = ""; 16 | } 17 | } 18 | } 19 | ?> 20 |
21 |
22 |
23 |

Add New Student

24 |
25 |
26 | 27 | 28 |
29 | errName ?> 30 |
31 |
32 | 33 |
34 | 35 |
36 |
37 |
38 | 39 | -------------------------------------------------------------------------------- /ecommerce/change-profile-image.php: -------------------------------------------------------------------------------- 1 | getSession('user')['id']; 11 | $img = $_FILES['image']; 12 | if ($updateProfile->validateProfileImg($img)) { 13 | if ($updateProfile->updateProfileImg($img, $id)) { 14 | $msg = "
Profile image updated successfully
"; 15 | } else { 16 | $msg = "
Profile image update failed
"; 17 | } 18 | } else { 19 | $msg = "
Invalid file type
"; 20 | } 21 | } 22 | ?> 23 | 24 |
25 |
26 |
27 |

Change profile image

28 | 29 |
30 |
31 | profile image 32 |
33 | 34 |
35 |
36 | 37 |
38 | 39 |
40 |
41 |
42 | 43 | -------------------------------------------------------------------------------- /conditions.php: -------------------------------------------------------------------------------- 1 | 50) { 13 | echo "You are an old person"; 14 | } else { 15 | echo "You are not eligible to vote"; 16 | } 17 | 18 | echo "
"; 19 | 20 | // switch statement 21 | $day = "Saturday"; 22 | 23 | switch ($day) { 24 | case "Saturday": 25 | echo "Today is Saturday"; 26 | break; 27 | case "Sunday": 28 | echo "Today is Sunday"; 29 | break; 30 | case "Monday": 31 | echo "Today is Monday"; 32 | break; 33 | case "Tuesday": 34 | echo "Today is Tuesday"; 35 | break; 36 | case "Wednesday": 37 | echo "Today is Wednesday"; 38 | break; 39 | case "Thursday": 40 | echo "Today is Thursday"; 41 | break; 42 | case "Friday": 43 | echo "Today is Friday"; 44 | break; 45 | default: 46 | echo "Invalid day"; 47 | } 48 | 49 | echo "
"; 50 | 51 | $myAge = 38; 52 | switch ($myAge) { 53 | case ($myAge <= 30): 54 | echo "Your are a young person"; 55 | break; 56 | default: 57 | echo "Your are an old person"; 58 | } 59 | 60 | $myCity = "Dhaka"; 61 | if ($myCity == "Dhaka") { 62 | echo "You are from Dhaka"; 63 | } else { 64 | echo "You are not from Dhaka"; 65 | } 66 | 67 | echo ($myCity == "Dhaka") ? "You are from Dhaka" : "You are not from Dhaka"; 68 | 69 | if (isset($country)) { 70 | echo $country; 71 | } else { 72 | echo "Country is not set"; 73 | } 74 | 75 | echo (isset($country)) ? $country : "Country is not set"; 76 | 77 | echo $country ?? "Country is not set"; 78 | -------------------------------------------------------------------------------- /hw2/shakil.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Form Validation 5 | 6 | 7 | 8 | 35 | 36 |
"> 37 | 38 | 39 |

40 | 41 | 42 | 43 |

44 | 45 | 46 | 47 |

48 | 49 | 50 |
51 | 52 | 53 | 54 | -------------------------------------------------------------------------------- /oopCrud/delete.php: -------------------------------------------------------------------------------- 1 | getSingleData('students', $id); 10 | $studentData->num_rows != 1 ? header('Location: ./') : null; 11 | $data = $studentData->fetch_object(); 12 | 13 | 14 | if (isset($_POST['delStudent'])) { 15 | $id = $student->clean($_POST['id']); 16 | if ($student->deleteStudent($id)) { 17 | $bsAlert = ""; 18 | echo ""; 19 | } else { 20 | $bsAlert = ""; 21 | } 22 | } 23 | ?> 24 | 25 |
26 |
27 |
28 |

Delete Student

29 |

Do you raly want to delete name ?>

30 |
31 |
32 | 33 | 34 |
35 | No 36 |
37 | 38 |
39 |
40 |
41 | 42 | -------------------------------------------------------------------------------- /arrayproblems.php: -------------------------------------------------------------------------------- 1 | "; 7 | 8 | // Find 2nd max number from an array: 9 | rsort($numbers); 10 | $uniqueNumbers = array_values(array_unique($numbers)); 11 | echo $uniqueNumbers[1]; 12 | echo "
"; 13 | 14 | // Sort array from min to max: 15 | $smallnum = [2, 3, 4, 7]; 16 | sort($smallnum); 17 | print_r($smallnum); 18 | echo "
"; 19 | 20 | // Calculate average number of an array: 21 | $avg = array_sum($smallnum) / count($smallnum); 22 | echo $avg; 23 | echo "
"; 24 | 25 | strtolower("HELLO WORLD"); 26 | 27 | $username = 'john_doe'; 28 | $existingUsernames = array('jane_doe', 'john_doe', 'user123'); 29 | $isUnique = !in_array($username, $existingUsernames); 30 | echo $isUnique ? 'Username is unique.' : 'Username already exists.'; 31 | echo "
"; 32 | 33 | $list1 = 'apple, orange, banana'; 34 | $listArr = explode(',', $list1); 35 | print_r($listArr); 36 | echo "
"; 37 | 38 | $names = ['John', 'Jane', 'James']; 39 | $namesStr = implode(' ', $names); 40 | echo $namesStr; 41 | 42 | // Check if all values are string or not: 43 | $names = ['John', 'Jane', 'James', 123]; 44 | echo "
"; 45 | 46 | $allString = array_filter($names, 'is_string'); 47 | echo count($names) === count($allString) ? 'All values are string.' : 'All values are not string.'; 48 | echo "
"; 49 | 50 | $data = array('name' => 'John', 'age' => 25, 'city' => 'New York'); 51 | $allowedKeys = array('name', 'city'); 52 | $filteredData = array_intersect_key($data, array_flip($allowedKeys)); 53 | print_r($filteredData); 54 | -------------------------------------------------------------------------------- /ecommerce/login.php: -------------------------------------------------------------------------------- 1 | login($email, $password)) { 14 | $msg = ''; 15 | echo ""; 16 | } else { 17 | $msg = ''; 18 | } 19 | } 20 | 21 | if ($session->getSession('user')) { 22 | header('location: index.php'); 23 | exit; 24 | } 25 | 26 | ?> 27 |
28 |
29 |
30 |
31 |

Login

32 | 33 |
34 |
35 | 36 | 37 |
38 |
39 | 40 | 41 |
42 | 43 |
44 | 45 |

Don't have an account? Sign up

46 |
47 |
48 |
49 | 50 | -------------------------------------------------------------------------------- /ecommerce/classes/orders.php: -------------------------------------------------------------------------------- 1 | conn = $GLOBALS['conn']; 13 | } 14 | 15 | public function createOrder($user_id, $product_id, $quantity, $total_price, $payment_method, $receiver_name, $email, $receiver_phone, $receiver_address) 16 | { 17 | $query = "INSERT INTO orders (user_id, product_id, quantity, total_price, payment_method, receiver_name, email, receiver_phone, receiver_address) VALUES ('$user_id', '$product_id', '$quantity', '$total_price', '$payment_method', '$receiver_name', '$email', '$receiver_phone', '$receiver_address')"; 18 | if ($this->conn->query($query) === TRUE) { 19 | return true; 20 | } else { 21 | return false; 22 | } 23 | } 24 | 25 | public function getOrders() 26 | { 27 | $query = "SELECT orders.id As orderId, orders.user_id, orders.quantity, orders. total_price, orders.payment_method, orders.status, orders.receiver_name, orders.email, orders.receiver_phone, orders.receiver_address, products.name FROM orders INNER JOIN products ON orders.product_id = products.id ORDER BY orders.id DESC"; 28 | $result = $this->conn->query($query); 29 | $orders = []; 30 | if ($result->num_rows > 0) { 31 | while ($row = $result->fetch_assoc()) { 32 | $orders[] = $row; 33 | } 34 | } 35 | return $orders; 36 | } 37 | 38 | public function updateOrderStatus($status, int $orderId) 39 | { 40 | $query = "UPDATE `orders` SET `status` = '$status' WHERE `id` = $orderId"; 41 | $update = $this->conn->query($query); 42 | if ($update) { 43 | // retuen mysql result 44 | return $orderId; 45 | } else { 46 | return false; 47 | } 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /ecommerce/update-profile.php: -------------------------------------------------------------------------------- 1 | getSession('user')['id']; 14 | if ($updateProfile->updateProfile($name, $email, $address, $id)) { 15 | $msg = "
Profile updated successfully
"; 16 | } else { 17 | $msg = "
Profile update failed
"; 18 | } 19 | } 20 | ?> 21 |
22 |
23 |
24 |

Update profile

25 | 26 |
27 |
28 | 29 | 30 |
31 |
32 | 33 | 34 |
35 |
36 | 37 | 38 |
39 |
40 | 41 |
42 |
43 |
44 |
45 |
46 | 47 | -------------------------------------------------------------------------------- /oopCrud/edit.php: -------------------------------------------------------------------------------- 1 | getSingleData('students', $id); 13 | $studentData->num_rows != 1 ? header('Location: ./') : null; 14 | return $studentData->fetch_object(); 15 | } 16 | 17 | $data = getStudentData(); 18 | 19 | if (isset($_POST['upStudent'])) { 20 | $name = $student->clean($_POST['name']); 21 | if ($student->vallidation($name)) { 22 | if ($student->updateStudent($name, $id)) { 23 | $bsAlert = ""; 24 | $data = getStudentData(); 25 | } else { 26 | $bsAlert = ""; 27 | } 28 | } 29 | } 30 | ?> 31 | 32 |
33 |
34 |
35 |

Update Student

36 |
37 |
38 | 39 | 40 |
41 | errName ?> 42 |
43 |
44 | 45 |
46 | 47 |
48 |
49 |
50 | 51 | -------------------------------------------------------------------------------- /ecommerce/components/sidebar.php: -------------------------------------------------------------------------------- 1 |
2 | 3 |
4 | 5 | Dashboard 6 | 7 |
8 | 40 |
41 | 42 | 50 |
51 |
-------------------------------------------------------------------------------- /ecommerce/components/slider.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /file upload/index.php: -------------------------------------------------------------------------------- 1 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | Document 41 | 42 | 43 | 44 |
45 | 46 | Male 47 | Female 48 | 49 |
50 | 51 | 52 | 67 | 68 | 69 | -------------------------------------------------------------------------------- /array.php: -------------------------------------------------------------------------------- 1 | "; 7 | var_dump($studentInfo); 8 | print_r($studentInfo); 9 | echo ""; 10 | echo gettype($studentInfo) . "
"; 11 | 12 | echo $studentInfo[0] . "
"; 13 | echo $studentInfo[1] . "
"; 14 | echo $studentInfo[2] . "
"; 15 | echo $studentInfo[3] . "
"; 16 | 17 | for ($i = 0; $i < count($studentInfo); $i++) { 18 | echo $studentInfo[$i] . "
"; 19 | } 20 | 21 | foreach ($studentInfo as $value) { 22 | echo $value . "
"; 23 | } 24 | 25 | // echo $studentInfo; 26 | 27 | // associative array 28 | $studentData = [ 29 | "name" => "Md Kamal", 30 | "age" => 35, 31 | "isMale" => true, 32 | "assets" => 0, 33 | "address" => "Jourpurhat" 34 | ]; 35 | 36 | echo "
";
37 | print_r($studentData);
38 | echo "
"; 39 | echo $studentData["age"] . "
"; 40 | 41 | foreach ($studentData as $k => $val) { 42 | echo "
" . ucfirst($k) . " : " . $val . "
"; 43 | } 44 | 45 | // multidimensional array 46 | $students = [ 47 | ["Rahim", 25, "Dhaka"], 48 | ["Karim", 35, "Rajshahi"], 49 | ["Rafiq", 45, "Khulna"], 50 | ["Jabbar", 55, "Rongpur"], 51 | ["Kamal", 65, "Dinajpur", "Kustia", "Faridpur", "Chittagong"] 52 | ]; 53 | 54 | echo "
";
55 | print_r($students);
56 | echo "
"; 57 | 58 | echo $students[3][2] . "
"; 59 | 60 | foreach ($students as $student) { 61 | foreach ($student as $key => $value) { 62 | if ($key == count($student) - 1) { 63 | echo $value; 64 | } else { 65 | echo $value . ", "; 66 | } 67 | } 68 | echo "
"; 69 | } 70 | // Bangladeshi all cities in array 71 | $bangladeshiCities = [ 72 | "Dhaka", 73 | "Rajshahi", 74 | "Khulna", 75 | "Rongpur", 76 | "Dinajpur", 77 | "Kustia", 78 | "Faridpur", 79 | "Chittagong", 80 | "Barishal", 81 | "Sylhet", 82 | "Mymensingh", 83 | ]; 84 | 85 | is_array($bangladeshiCities); 86 | 87 | ?> 88 | 89 |
90 | 96 |
-------------------------------------------------------------------------------- /ecommerce/signup.php: -------------------------------------------------------------------------------- 1 | validation($name, $email, $password)) { 14 | if ($registration->register($name, $email, $password)) { 15 | $msg = ''; 16 | echo ""; 17 | } else { 18 | $msg = ''; 19 | } 20 | } else { 21 | $msg = ''; 22 | } 23 | } 24 | 25 | if ($session->getSession('user')) { 26 | header('location: index.php'); 27 | exit; 28 | } 29 | 30 | ?> 31 |
32 |
33 |
34 |

Sign Up

35 | 36 |
37 |
38 | 39 | 40 |
41 |
42 | 43 | 44 |
45 |
46 | 47 | 48 |
49 | 50 |
51 |

Already have an account? Log in

52 |
53 |
54 |
55 | 56 | 57 | -------------------------------------------------------------------------------- /ecommerce/change-password.php: -------------------------------------------------------------------------------- 1 | getSession('user')['id']; 14 | if ($updateProfile->validatePassword($currentPassword, $newPassword, $confirmPassword, $id)) { 15 | if ($updateProfile->updatePassword($newPassword, $id)) { 16 | $msg = "
Password updated successfully
"; 17 | } else { 18 | $msg = "
Password update failed
"; 19 | } 20 | } else { 21 | $msg = "
Invalid password
"; 22 | } 23 | } 24 | ?> 25 |
26 |
27 |
28 |

Change password

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 | -------------------------------------------------------------------------------- /ecommerce/users-orders.php: -------------------------------------------------------------------------------- 1 | query($query); 6 | $orders = []; 7 | if ($result->num_rows > 0) { 8 | while ($row = $result->fetch_assoc()) { 9 | $orders[] = $row; 10 | } 11 | } 12 | ?> 13 |
14 |
15 |
16 | 0) { ?> 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 |
Order IDProduct NameQuantityTotal PricePayment MethodStatusReceiver NameEmailReceiver PhoneReceiver Address
49 | 50 |

No Orders Found

51 | 52 |
53 |
54 |
55 | 56 | -------------------------------------------------------------------------------- /oopCrud/index.php: -------------------------------------------------------------------------------- 1 | getAllData('students'); 12 | $totalPage = ceil($totalStudents->num_rows / $limit); 13 | $allStudents = $student->getAllData('students', $startPoint, $limit); 14 | ?> 15 | 16 |
17 |
18 |
19 | num_rows > 0) { ?> 20 | 21 | 22 | 23 | 24 | 25 | 26 | fetch_object()) { ?> 28 | 29 | 30 | 31 | 35 | 36 | 37 |
S.N.Student NameAction
name; ?> 32 | Edit 33 | Delete 34 |
38 | 47 | 48 | 51 | 52 |
53 |
54 |
55 | 56 | -------------------------------------------------------------------------------- /hw1/solution.php: -------------------------------------------------------------------------------- 1 | '; 16 | 17 | // A PHP calculator using switch case (Addition, Subtraction, Multiplication, Division) 18 | 19 | $num1 = 2; 20 | $num2 = 3; 21 | $operator = '*'; 22 | 23 | switch ($operator) { 24 | case '+': 25 | echo $num1 + $num2; 26 | break; 27 | case '-': 28 | echo $num1 - $num2; 29 | break; 30 | case '*': 31 | echo $num1 * $num2; 32 | break; 33 | case '/': 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 | -------------------------------------------------------------------------------- /ecommerce/header.php: -------------------------------------------------------------------------------- 1 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | Document 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 46 | 47 | 48 | 49 | -------------------------------------------------------------------------------- /ajax/frontend.php: -------------------------------------------------------------------------------- 1 |
2 | 3 | 4 | 5 |

6 |
7 | 8 |
9 | 10 |
11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /hw1/kanti.php: -------------------------------------------------------------------------------- 1 |

i. Electric bill calculation

'; 7 | 8 | $eBill = 200; 9 | if ($eBill <= 50) { 10 | echo 'Total used unit ' . $eBill . ' * 3.50 (unit price) : BDT = ' . $eBill * 3.50; 11 | } elseif ($eBill <= 100) { 12 | echo 'Total used unit ' . $eBill . ' * 4 (unit price) : BDT = ' . $eBill * 4; 13 | } elseif ($eBill <= 150) { 14 | echo 'Total used unit ' . $eBill . ' * 5.20 (unit price) : BDT = ' . $eBill * 5.20; 15 | } elseif ($eBill <= 250) { 16 | echo 'Total used unit ' . $eBill . ' * 6.50 (unit price) : BDT = ' . $eBill * 6.50; 17 | } else { 18 | echo 'Total used unit ' . $eBill . ' * undefine (unit price) : BDT = ' . $eBill * 7.50; 19 | } 20 | 21 | 22 | //ii. A PHP calculator using switch case... 23 | 24 | echo '

ii. A PHP calculator using switch case...

'; 25 | 26 | $myMarks = 80; 27 | switch ($myMarks) { 28 | case ($myMarks >= 33 && $myMarks < 60): 29 | echo "You passed"; 30 | break; 31 | case ($myMarks >= 60 && $myMarks < 75): 32 | echo "You are pased with Grade - B"; 33 | break; 34 | case ($myMarks >= 75 && $myMarks < 80): 35 | echo "You passed with Grade - A"; 36 | break; 37 | case ($myMarks >= 80): 38 | echo "Congratulations! You apassed with Grade - A+"; 39 | break; 40 | default: 41 | echo "Sorry, You are failed"; 42 | } 43 | 44 | 45 | //iii. Check if a person is eligible to vote by age.... 46 | 47 | echo '

iii. Check if a person is eligible to vote by age....

'; 48 | 49 | $voterAge = 18; 50 | 51 | if ($voterAge >= 18) { 52 | echo "You are eligible voter!"; 53 | } else { 54 | echo "Sorry, You are not eligible voter"; 55 | } 56 | 57 | 58 | //iv. Check if a person is eligible to marriage in BD by gender... 59 | 60 | echo '

iv. Check if a person is eligible to marriage in BD by gender...

'; 61 | 62 | $myGender1 = "Male"; 63 | $myGender2 = "Female"; 64 | if ($myGender1 == "Male" && $myGender2 == "Female") { 65 | echo "Congratulation! You are eligible to marriage."; 66 | } else { 67 | echo "Sorry! You are not eligible to marriage."; 68 | } 69 | 70 | 71 | //v. Check if number is positive or negetive... 72 | 73 | echo '

v. Check if number is positive or negetive...

'; 74 | 75 | $myNum = -55.33; 76 | if (isset($myNum)) { 77 | if (substr(strval($myNum), 0, 1) == "-") { 78 | echo "Your number is negetive"; 79 | } else { 80 | echo "Your number is positive"; 81 | } 82 | } 83 | 84 | // vi. Check if number is odd or even... 85 | 86 | echo '

vi. Check if number is odd or even...

'; 87 | 88 | $myNumber = 77; 89 | 90 | if ($myNumber % 2 == 0) { 91 | echo "Even"; 92 | } else { 93 | echo "Odd"; 94 | } 95 | 96 | 97 | // vii. Check if data is interger or sting... 98 | 99 | echo '

vii. Check if data is interger or sting...

'; 100 | 101 | 102 | $checkNumber = "Jamal"; 103 | 104 | var_dump($checkNumber); 105 | -------------------------------------------------------------------------------- /oopCrud/studentClass.php: -------------------------------------------------------------------------------- 1 | oldName = $data; 24 | if (empty($data)) { 25 | $this->errName = "Please write your name"; 26 | return false; 27 | } elseif (!preg_match("/^[A-Za-z. ]*$/", $data)) { 28 | $this->errName = "Invalid name format"; 29 | return false; 30 | } else { 31 | $this->errName = null; 32 | return true; 33 | } 34 | } 35 | 36 | public function addStudent($name) 37 | { 38 | $db = new database(); 39 | $conn = $db->conn; 40 | $name = $conn->real_escape_string($name); 41 | $sql = "INSERT INTO students (name) VALUES ('$name')"; 42 | if ($conn->query($sql) === TRUE) { 43 | $this->msg = "New record created successfully"; 44 | $this->oldName = null; 45 | return true; 46 | } else { 47 | $this->msg = "Error: " . $sql . "
" . $conn->error; 48 | return false; 49 | } 50 | } 51 | 52 | public function getAllData($table, $startPoint = 0, $limit = null) 53 | { 54 | $db = new database(); 55 | $conn = $db->conn; 56 | if ($limit == null) { 57 | $sql = "SELECT * FROM $table"; 58 | $result = $conn->query($sql); 59 | return $result; 60 | } 61 | $sql = "SELECT * FROM $table LIMIT $startPoint, $limit"; 62 | $result = $conn->query($sql); 63 | return $result; 64 | } 65 | 66 | public function getSingleData($table, $id) 67 | { 68 | $db = new database(); 69 | $conn = $db->conn; 70 | $sql = "SELECT * FROM $table WHERE id = $id"; 71 | $result = $conn->query($sql); 72 | return $result; 73 | } 74 | 75 | public function updateStudent($name, $id) 76 | { 77 | $db = new database(); 78 | $conn = $db->conn; 79 | $name = $conn->real_escape_string($name); 80 | $sql = "UPDATE students SET name = '$name' WHERE id = $id"; 81 | if ($conn->query($sql) === TRUE) { 82 | $this->msg = "Record updated successfully"; 83 | $this->oldName = null; 84 | return true; 85 | } else { 86 | $this->msg = "Error: " . $sql . "
" . $conn->error; 87 | return false; 88 | } 89 | } 90 | 91 | public function deleteStudent($id) 92 | { 93 | $db = new database(); 94 | $conn = $db->conn; 95 | $sql = "DELETE FROM students WHERE id = $id"; 96 | if ($conn->query($sql) === TRUE) { 97 | $this->msg = "Record deleted successfully"; 98 | return true; 99 | } else { 100 | $this->msg = "Error: " . $sql . "
" . $conn->error; 101 | return false; 102 | } 103 | } 104 | } 105 | -------------------------------------------------------------------------------- /ajaxCrud/crud.php: -------------------------------------------------------------------------------- 1 | conn->query($sql); 24 | if ($insert) { 25 | $msg['success'] = "Student Added Successfully"; 26 | } else { 27 | $msg['err'] = "Student Not Added"; 28 | } 29 | } 30 | echo json_encode($msg); 31 | } 32 | } 33 | 34 | public function getAllStudents() 35 | { 36 | if ($_SERVER['REQUEST_METHOD'] == "GET" && isset($_GET['getAllStudents'])) { 37 | $sql = "SELECT * FROM users ORDER BY id DESC"; 38 | $result = $this->conn->query($sql); 39 | if ($result->num_rows > 0) { 40 | echo json_encode($result->fetch_all(MYSQLI_ASSOC)); 41 | } 42 | } 43 | } 44 | 45 | public function getSingleStudent() 46 | { 47 | if ($_SERVER['REQUEST_METHOD'] == "GET" && isset($_GET['getSingleStudent'])) { 48 | $id = $_GET['id']; 49 | $sql = "SELECT * FROM users WHERE id = $id"; 50 | $result = $this->conn->query($sql); 51 | if ($result->num_rows > 0) { 52 | echo json_encode($result->fetch_assoc()); 53 | } 54 | } 55 | } 56 | 57 | public function updateStudent() 58 | { 59 | if ($_SERVER['REQUEST_METHOD'] == "POST" && isset($_POST['updateStudnet'])) { 60 | $id = $_POST['id']; 61 | $studentName = $_POST['studentName']; 62 | $msg = []; 63 | if (empty($studentName)) { 64 | $msg['err'] = "Student Name is required"; 65 | return; 66 | } else { 67 | $sql = "UPDATE users SET name = '$studentName' WHERE id = $id"; 68 | $update = $this->conn->query($sql); 69 | if ($update) { 70 | $msg['success'] = "Student Updated Successfully"; 71 | } else { 72 | $msg['err'] = "Student Not Updated"; 73 | } 74 | } 75 | echo json_encode($msg); 76 | } 77 | } 78 | 79 | public function deleteStudent() 80 | { 81 | if ($_SERVER['REQUEST_METHOD'] == "POST" && isset($_POST['deleteStudnet'])) { 82 | $id = $_POST['id']; 83 | $msg = []; 84 | $sql = "DELETE FROM users WHERE id = $id"; 85 | $delete = $this->conn->query($sql); 86 | if ($delete) { 87 | $msg['success'] = "Student Deleted Successfully"; 88 | } else { 89 | $msg['err'] = "Student Not Deleted"; 90 | } 91 | echo json_encode($msg); 92 | } 93 | } 94 | } 95 | 96 | $crud = new crud(); 97 | $crud->addStudent(); 98 | $crud->getAllStudents(); 99 | $crud->getSingleStudent(); 100 | $crud->updateStudent(); 101 | $crud->deleteStudent(); 102 | -------------------------------------------------------------------------------- /ecommerce/orders.php: -------------------------------------------------------------------------------- 1 | updateOrderStatus($status, $orderId); 13 | if ($upStatus) { 14 | echo ""; 15 | } 16 | } 17 | ?> 18 |
19 |
20 | 23 |
24 |

All Orders

25 | getOrders()) > 0) { ?> 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | getOrders() as $order) { ?> 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 65 | 66 | 67 | 68 |
ProductQuantityTotal PricePayment MethodReceiver NameEmailReceiver PhoneReceiver Addressupdate Status
52 |
53 | 54 | 60 | 63 |
64 |
69 | 70 |
No orders found
71 | 72 |
73 |
74 |
75 | 76 | 77 | -------------------------------------------------------------------------------- /ecommerce/classes/updateProfile.php: -------------------------------------------------------------------------------- 1 | query($sql)) { 17 | $session = new session(); 18 | $user = $session->getSession('user'); 19 | $user['name'] = $name; 20 | $user['email'] = $email; 21 | $user['city'] = $address; 22 | $session->setSession('user', $user); 23 | return true; 24 | } else { 25 | return false; 26 | } 27 | } 28 | 29 | public function validateProfileImg($file) 30 | { 31 | $fileType = strtolower(pathinfo($file["name"], PATHINFO_EXTENSION)); 32 | if ($fileType != "jpg" && $fileType != "png" && $fileType != "jpeg") { 33 | return false; 34 | } else { 35 | return true; 36 | } 37 | } 38 | 39 | public function updateProfileImg($file, $id) 40 | { 41 | $target_dir = "./Assets/images"; 42 | // get file extension 43 | $fileType = strtolower(pathinfo($file["name"], PATHINFO_EXTENSION)); 44 | // new file name 45 | $newFileName = uniqid() . '_' . time() . '_' . $id . '.' . $fileType; 46 | $target_file = $target_dir . '/' . $newFileName; 47 | if (move_uploaded_file($file["tmp_name"], $target_file)) { 48 | global $conn; 49 | $sql = "UPDATE users SET img = '$newFileName' WHERE id = $id"; 50 | if ($conn->query($sql)) { 51 | $session = new session(); 52 | $user = $session->getSession('user'); 53 | // delete old image if exists 54 | if ($user['img'] != null) { 55 | unlink($target_dir . '/' . $user['img']); 56 | } 57 | $user['img'] = $newFileName; 58 | $session->setSession('user', $user); 59 | 60 | return true; 61 | } else { 62 | return false; 63 | } 64 | } else { 65 | return false; 66 | } 67 | } 68 | 69 | public function validatePassword($oldPassword, $newPassword, $confirmPassword, $id) 70 | { 71 | if (empty($oldPassword) || empty($newPassword) || empty($confirmPassword)) { 72 | return false; 73 | } 74 | 75 | if (strlen($newPassword) < 6) { 76 | return false; 77 | } 78 | 79 | if ($newPassword != $confirmPassword) { 80 | return false; 81 | } 82 | 83 | global $conn; 84 | $sql = "SELECT * FROM users WHERE id = $id"; 85 | $result = $conn->query($sql); 86 | if ($result->num_rows > 0) { 87 | $row = $result->fetch_assoc(); 88 | if (password_verify($oldPassword, $row['password'])) { 89 | if ($newPassword == $confirmPassword) { 90 | return true; 91 | } else { 92 | return false; 93 | } 94 | } else { 95 | return false; 96 | } 97 | } else { 98 | return false; 99 | } 100 | } 101 | 102 | public function updatePassword($newPassword, $id) 103 | { 104 | global $conn; 105 | $newPassword = password_hash($newPassword, PASSWORD_DEFAULT); 106 | $sql = "UPDATE users SET password = '$newPassword' WHERE id = $id"; 107 | if ($conn->query($sql)) { 108 | return true; 109 | } else { 110 | return false; 111 | } 112 | } 113 | } 114 | -------------------------------------------------------------------------------- /crud/addStudent.php: -------------------------------------------------------------------------------- 1 | query("SELECT * FROM `users` WHERE `name` = '$name'"); 23 | 24 | if ($checkNameQuery->num_rows > 0) { 25 | echo "Student Already Exists"; 26 | echo ""; 27 | exit; 28 | } else { 29 | if (in_array($picActualExt, $allowed)) { 30 | if ($picError === 0) { 31 | if ($picSize < 10000000) { 32 | $picNameNew = uniqid('', true) . "." . $picActualExt; 33 | $picDestination = "./uploads/" . $picNameNew; 34 | $move = move_uploaded_file($picTmpName, $picDestination); 35 | if ($move) { 36 | $name = $conn->real_escape_string($name); 37 | $city = $conn->real_escape_string($city); 38 | 39 | $sql = "INSERT INTO `users`(`name`, `city`, `img`, `gender`, `subject`, `skill` ) VALUES ('$name','$city', '$picNameNew', '$gender', '$subject', '$skillsStr' )"; 40 | $result = $conn->query($sql); 41 | if ($result) { 42 | echo "Student Added Successfully"; 43 | echo ""; 44 | } else { 45 | echo "Student Not Added"; 46 | } 47 | } else { 48 | echo "File Not Uploaded"; 49 | } 50 | } else { 51 | echo "Your file is too big"; 52 | } 53 | } else { 54 | echo "There was an error uploading your file"; 55 | } 56 | } else { 57 | echo "You cannot upload files of this type"; 58 | } 59 | } 60 | } 61 | ?> 62 |
63 | 64 |

65 | 66 |

67 | 68 |

69 | Gender: 70 | Male 71 | Female 72 |

73 | 79 |

80 | Skills : 81 | PHP 82 | Python 83 | Java 84 |

85 | 86 |
87 | 88 | 89 | 100 | -------------------------------------------------------------------------------- /ecommerce/components/navbar.php: -------------------------------------------------------------------------------- 1 | 9 | -------------------------------------------------------------------------------- /hw3/shorif/index.php: -------------------------------------------------------------------------------- 1 |

01

2 | displayString(); 14 | ?> 15 |
16 |

02

17 | displayMessage("Hadi"); 29 | ?> 30 |
31 |

03

32 | calculateFactorial($number); 55 | ?> 56 |
57 |

04

58 | sortArray($array); 75 | 76 | // Display the sorted array 77 | print_r($sortedArray); 78 | ?> 79 |
80 |

05

81 | diff($dateTime2); 89 | 90 | $difference = array( 91 | 'years' => $interval->y, 92 | 'months' => $interval->m, 93 | 'days' => $interval->d 94 | ); 95 | 96 | return $difference; 97 | } 98 | } 99 | 100 | // Sample dates 101 | $date1 = '1981-11-03'; 102 | $date2 = '2013-09-04'; 103 | 104 | // Instantiate the class and call the calculateDateDifference method 105 | $calculator = new DateDifferenceCalculator(); 106 | $difference = $calculator->calculateDateDifference($date1, $date2); 107 | 108 | // Display the difference 109 | echo "Difference: {$difference['years']} years, {$difference['months']} months, {$difference['days']} days"; 110 | ?> 111 |
112 |

06

113 | num1 = $num1; 122 | $this->num2 = $num2; 123 | } 124 | 125 | public function add() 126 | { 127 | return $this->num1 + $this->num2; 128 | } 129 | 130 | public function subtract() 131 | { 132 | return $this->num1 - $this->num2; 133 | } 134 | 135 | public function multiply() 136 | { 137 | return $this->num1 * $this->num2; 138 | } 139 | 140 | public function divide() 141 | { 142 | if ($this->num2 == 0) { 143 | return "Cannot divide by zero."; 144 | } else { 145 | return $this->num1 / $this->num2; 146 | } 147 | } 148 | } 149 | 150 | // Example usage: 151 | $mycalc = new MyCalculator(12, 6); 152 | echo $mycalc->add(); // Displays 18 153 | echo "
"; 154 | echo $mycalc->multiply(); // Displays 72 155 | ?> 156 |
157 |

07

158 | format('Y-m-d'); 164 | echo "Date: $dateFormatted"; 165 | 166 | echo "
"; 167 | 168 | // Convert string to DateTime format (d-m-Y) 169 | $dateTime = DateTime::createFromFormat('d-m-Y', $dateString); 170 | $dateTimeFormatted = $dateTime->format('Y-m-d H:i:s'); 171 | echo "DateTime: $dateTimeFormatted"; 172 | ?> -------------------------------------------------------------------------------- /cmbd.sql: -------------------------------------------------------------------------------- 1 | -- phpMyAdmin SQL Dump 2 | -- version 5.2.1 3 | -- https://www.phpmyadmin.net/ 4 | -- 5 | -- Host: 127.0.0.1 6 | -- Generation Time: Jan 08, 2024 at 06:48 PM 7 | -- Server version: 10.4.28-MariaDB 8 | -- PHP Version: 8.2.4 9 | 10 | SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; 11 | START TRANSACTION; 12 | SET time_zone = "+00:00"; 13 | 14 | 15 | /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; 16 | /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; 17 | /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; 18 | /*!40101 SET NAMES utf8mb4 */; 19 | 20 | -- 21 | -- Database: `cmbd` 22 | -- 23 | 24 | -- -------------------------------------------------------- 25 | 26 | -- 27 | -- Table structure for table `students` 28 | -- 29 | 30 | CREATE TABLE `students` ( 31 | `id` int(11) NOT NULL, 32 | `name` varchar(100) NOT NULL, 33 | `city` varchar(100) NOT NULL, 34 | `gender` varchar(6) NOT NULL, 35 | `phone` varchar(15) NOT NULL, 36 | `subject_id` int(11) NOT NULL, 37 | `created_at` timestamp NOT NULL DEFAULT current_timestamp() 38 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; 39 | 40 | -- 41 | -- Dumping data for table `students` 42 | -- 43 | 44 | INSERT INTO `students` (`id`, `name`, `city`, `gender`, `phone`, `subject_id`, `created_at`) VALUES 45 | (1, 'Abdullah Al Mamun', 'Magura', 'Male', '01712121212', 1, '2024-01-08 17:26:10'), 46 | (2, 'Golam Sarwer', 'Dhaka', 'Male', '01946464646', 2, '2024-01-08 17:27:58'), 47 | (3, 'Jamal', 'Dhaka', 'Male', '01625252525', 1, '2024-01-08 17:27:58'); 48 | 49 | -- -------------------------------------------------------- 50 | 51 | -- 52 | -- Table structure for table `subjects` 53 | -- 54 | 55 | CREATE TABLE `subjects` ( 56 | `id` int(11) NOT NULL, 57 | `name` varchar(100) NOT NULL, 58 | `teacher_id` int(11) NOT NULL, 59 | `created_at` timestamp NOT NULL DEFAULT current_timestamp() 60 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; 61 | 62 | -- 63 | -- Dumping data for table `subjects` 64 | -- 65 | 66 | INSERT INTO `subjects` (`id`, `name`, `teacher_id`, `created_at`) VALUES 67 | (1, 'PHP', 2, '2024-01-08 17:41:51'), 68 | (2, 'WordPress', 1, '2024-01-08 17:41:51'); 69 | 70 | -- -------------------------------------------------------- 71 | 72 | -- 73 | -- Table structure for table `teachers` 74 | -- 75 | 76 | CREATE TABLE `teachers` ( 77 | `id` int(11) NOT NULL, 78 | `name` varchar(100) NOT NULL, 79 | `mobile` varchar(20) NOT NULL, 80 | `created_at` timestamp NOT NULL DEFAULT current_timestamp() 81 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; 82 | 83 | -- 84 | -- Dumping data for table `teachers` 85 | -- 86 | 87 | INSERT INTO `teachers` (`id`, `name`, `mobile`, `created_at`) VALUES 88 | (1, 'Minhaz', '01711223344', '2024-01-08 17:35:02'), 89 | (2, 'Asif', '01955517560', '2024-01-08 17:35:02'); 90 | 91 | -- 92 | -- Indexes for dumped tables 93 | -- 94 | 95 | -- 96 | -- Indexes for table `students` 97 | -- 98 | ALTER TABLE `students` 99 | ADD PRIMARY KEY (`id`), 100 | ADD KEY `subject_id` (`subject_id`); 101 | 102 | -- 103 | -- Indexes for table `subjects` 104 | -- 105 | ALTER TABLE `subjects` 106 | ADD PRIMARY KEY (`id`), 107 | ADD KEY `teacher_id` (`teacher_id`); 108 | 109 | -- 110 | -- Indexes for table `teachers` 111 | -- 112 | ALTER TABLE `teachers` 113 | ADD PRIMARY KEY (`id`); 114 | 115 | -- 116 | -- AUTO_INCREMENT for dumped tables 117 | -- 118 | 119 | -- 120 | -- AUTO_INCREMENT for table `students` 121 | -- 122 | ALTER TABLE `students` 123 | MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4; 124 | 125 | -- 126 | -- AUTO_INCREMENT for table `subjects` 127 | -- 128 | ALTER TABLE `subjects` 129 | MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3; 130 | 131 | -- 132 | -- AUTO_INCREMENT for table `teachers` 133 | -- 134 | ALTER TABLE `teachers` 135 | MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3; 136 | 137 | -- 138 | -- Constraints for dumped tables 139 | -- 140 | 141 | -- 142 | -- Constraints for table `students` 143 | -- 144 | ALTER TABLE `students` 145 | ADD CONSTRAINT `students_ibfk_1` FOREIGN KEY (`subject_id`) REFERENCES `subjects` (`id`); 146 | 147 | -- 148 | -- Constraints for table `subjects` 149 | -- 150 | ALTER TABLE `subjects` 151 | ADD CONSTRAINT `subjects_ibfk_1` FOREIGN KEY (`teacher_id`) REFERENCES `teachers` (`id`); 152 | COMMIT; 153 | 154 | /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; 155 | /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; 156 | /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; 157 | -------------------------------------------------------------------------------- /ajaxCrud/footer.php: -------------------------------------------------------------------------------- 1 | 2 | 116 | 117 | 118 | -------------------------------------------------------------------------------- /hw2/jamal.php: -------------------------------------------------------------------------------- 1 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | Form Validation Part-1 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 |

Select your gender

113 | 114 | 115 | 116 | 117 | 118 | 119 |
120 | 121 |
122 |
123 | 124 | 125 | 126 |

Please write your comments here

127 | 128 | 129 | 130 |
131 |
132 |
133 | 134 |
135 |
136 |
137 | 138 |
139 |
140 | 141 | 142 | 143 | Your given inputs are as below:"; 147 | echo "Your name is : ". $name ?? null; 148 | } 149 | 150 | echo "
"; 151 | 152 | if(!empty($_POST["email"])){ 153 | echo "Your email is : ". $email ?? null; 154 | } 155 | 156 | echo "
"; 157 | 158 | if(!empty($_POST["gender"])){ 159 | echo "Your gender is : ". $gender ?? null; 160 | } 161 | 162 | echo "
"; 163 | 164 | if(!empty($_POST["mobile"])){ 165 | echo "Your mobile is : ". $mobile ?? null; 166 | } 167 | 168 | echo "
"; 169 | 170 | if(!empty($_POST["dob"])){ 171 | echo "Your date of birth is : ". $dob ?? null; 172 | } 173 | 174 | echo "
"; 175 | 176 | if(!empty($_POST["user_message"])){ 177 | echo "Your message is as below :
". $user_message ?? null; 178 | } 179 | 180 | ?> 181 | 182 | 183 | 184 | -------------------------------------------------------------------------------- /crud/editStudent.php: -------------------------------------------------------------------------------- 1 | real_escape_string($id); 5 | $sql = "SELECT * FROM `users` WHERE `id`='$id'"; 6 | $result = $conn->query($sql); 7 | $result->num_rows == 0 ? header("location:./") : null; 8 | $row = $result->fetch_object(); 9 | if (isset($_POST['ust'])) { 10 | $name = $_POST['name']; 11 | $city = $_POST['city']; 12 | $gender = $_POST['gender']; 13 | $subject = $_POST['subject']; 14 | $skills = $_POST['skills'] ?? []; 15 | $skillsStr = implode(", ", $skills); 16 | 17 | $name = $conn->real_escape_string($name); 18 | $city = $conn->real_escape_string($city); 19 | 20 | $result = $conn->query("UPDATE `users` SET `name`='$name',`city`='$city', `gender` = '$gender', `subject` = '$subject', `skill` = '$skillsStr' WHERE `id`= $id"); 21 | 22 | if ($result) { 23 | echo "Student Updated Successfully"; 24 | echo ""; 25 | } else { 26 | echo "Student Not Updated"; 27 | } 28 | } 29 | 30 | if (isset($_POST['ustp'])) { 31 | $pic = $_FILES['pic']; 32 | $picName = $pic['name']; 33 | $picTmpName = $pic['tmp_name']; 34 | $picSize = $pic['size']; 35 | $picError = $pic['error']; 36 | $picType = $pic['type']; 37 | 38 | $picExt = explode('.', $picName); 39 | $picActualExt = strtolower(end($picExt)); 40 | 41 | $allowed = ['jpg', 'jpeg', 'png', 'gif']; 42 | 43 | if (in_array($picActualExt, $allowed)) { 44 | if ($picError === 0) { 45 | if ($picSize < 10000000) { 46 | $picNameNew = uniqid('', true) . "." . $picActualExt; 47 | $picDestination = "./uploads/" . $picNameNew; 48 | $move = move_uploaded_file($picTmpName, $picDestination); 49 | if ($move) { 50 | $result = $conn->query("UPDATE `users` SET `img`='$picNameNew' WHERE `id`= $id"); 51 | if ($result) { 52 | $delFile = unlink("./uploads/" . $row->img); 53 | if ($delFile) { 54 | echo "Student Updated Successfully"; 55 | echo ""; 56 | } 57 | } else { 58 | echo "Student Not Updated"; 59 | } 60 | } else { 61 | echo "File Not Uploaded"; 62 | } 63 | } else { 64 | echo "Your file is too big"; 65 | } 66 | } else { 67 | echo "There was an error uploading your file"; 68 | } 69 | } else { 70 | echo "You cannot upload files of this type"; 71 | } 72 | } 73 | 74 | ?> 75 |

Edit Stident

76 |
77 | 78 |

79 | 80 |

81 | Gender: 82 | gender == "Male" ? "checked" : null ?> required>Male 83 | gender == "Female" ? "checked" : null ?> required>Female 84 |

85 | 91 |

92 | Skills : 93 | skill)) ? "checked" : null) ?>>PHP 94 | skill)) ? "checked" : null) ?>>Python 95 | skill))) { 99 | echo "checked"; 100 | } 101 | ?>>Java 102 |

103 | 104 |
105 |

106 |

Change Image

107 | 110 |
111 | 112 |

113 | 114 |
115 | 116 | 126 | 127 | -------------------------------------------------------------------------------- /hw2/mamun.php: -------------------------------------------------------------------------------- 1 | 43 | 44 | 45 | 46 | 47 | 48 | Form Validation 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 | 121 |
122 | 123 |
124 |
125 |
126 |
127 | 128 | 129 | 130 | 131 | 132 | -------------------------------------------------------------------------------- /hw2/sarwer.php: -------------------------------------------------------------------------------- 1 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | Hello, world! 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 | 108 | 109 |
"> 110 | 111 |
112 | 113 |
114 | 115 |
"> 116 |
117 | Skills: 118 |
119 |
120 | > 121 | 122 |
123 |
124 | > 125 | 126 |
127 |
128 | > 129 | 130 |
131 |
132 | > 133 | 134 |
135 | 136 |
137 | 138 |
139 | 140 | 148 | 149 |
150 | 151 | 152 |
153 |
154 |
155 |
156 | 157 | 158 | 159 | 160 | 162 | 164 | 165 | 166 | -------------------------------------------------------------------------------- /hw2/motiar-rahman.php: -------------------------------------------------------------------------------- 1 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | Bootstrap demo 54 | 55 | 56 | 57 |

Form Valiadition!

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 | Skill: 102 |
103 |
104 | > 105 | 106 |
107 |
108 | > 109 | 110 |
111 |
112 | > 113 | 114 |
115 |
116 | > 117 | 118 |
119 | 120 |
121 |
122 | 123 | 124 | 132 |
133 | 134 | 135 | 136 |
137 |
138 |
139 |
140 | 141 | 142 | 143 | 144 | 145 | 146 | 147 | -------------------------------------------------------------------------------- /ecommerce/checkout.php: -------------------------------------------------------------------------------- 1 | 5 |
6 |
7 |
8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 |
ProductImagePriceQuantityTotalAction
22 |
23 |

Total:

24 |
25 |
26 |
27 |
Delivery Address
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 | 55 |
56 |
57 |
58 |
59 |
60 | 61 | 62 | 159 | -------------------------------------------------------------------------------- /hw2/sobuj.php: -------------------------------------------------------------------------------- 1 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | From Validation 53 | 54 | 55 | 56 | 57 | 58 |
59 |
60 |
61 |
62 | 63 |
64 |

From Validation

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 | name="gender"> 96 | 97 |
98 |
99 | name="gender"> 100 | 101 |
102 |
103 |
mb-3"> 104 | 105 |
106 |
107 |
108 | Skills : 109 |
110 |
111 | > 112 | 113 |
114 |
115 | > 116 | 117 |
118 |
119 | > 120 | 121 |
122 |
123 | > 124 | 125 |
126 |
127 |
mb-3"> 128 | 129 | 136 |
137 | 138 | 139 |
140 | 141 |
142 |
143 |
144 | 145 | 146 | 147 | 148 | 149 | -------------------------------------------------------------------------------- /ecommerce/footer.php: -------------------------------------------------------------------------------- 1 | 2 |
3 | 4 | 5 | 121 | 122 | 123 |
124 | 125 | 126 | 208 | 209 | 210 | 211 | -------------------------------------------------------------------------------- /ecommerce/products.php: -------------------------------------------------------------------------------- 1 | query($sql) === TRUE) { 14 | echo ""; 15 | } else { 16 | echo "Error: " . $sql . "
" . $conn->error; 17 | } 18 | } 19 | 20 | // get data from products table 21 | $sql = "SELECT * FROM products"; 22 | $result = $conn->query($sql); 23 | 24 | // edit product 25 | if (isset($_GET['eid'])) { 26 | $eid = $_GET['eid']; 27 | $sql = "SELECT * FROM products WHERE id = '$eid'"; 28 | $result = $conn->query($sql); 29 | if ($result->num_rows > 0) { 30 | $row = $result->fetch_assoc(); 31 | } else { 32 | header('location: products.php'); 33 | } 34 | } 35 | 36 | // update product 37 | if (isset($_POST['update'])) { 38 | $name = $_POST['name']; 39 | $regular_price = $_POST['regular_price']; 40 | $discount_price = $_POST['discount_price']; 41 | $brand = $_POST['brand']; 42 | $description = $_POST['description']; 43 | $eid = $_POST['eid']; 44 | $sql = "UPDATE products SET `name` = '$name', `regular_price` = '$regular_price', `discount_price` = '$discount_price', `brand` = '$brand', `description` = '$description' WHERE id = '$eid'"; 45 | if ($conn->query($sql) === TRUE) { 46 | echo ""; 47 | } else { 48 | echo "Error: " . $sql . "
" . $conn->error; 49 | } 50 | } 51 | 52 | // upload image and delete the previous image 53 | if (isset($_POST['uploadImg'])) { 54 | $img = $_FILES['img']['name']; 55 | $img_tmp = $_FILES['img']['tmp_name']; 56 | move_uploaded_file($img_tmp, "./Assets/images/$img"); 57 | $sql = "UPDATE products SET `img` = '$img' WHERE id = '$eid'"; 58 | if ($conn->query($sql) === TRUE) { 59 | unlink("./Assets/images/" . $row['img']); 60 | echo ""; 61 | } else { 62 | echo "Error: " . $sql . "
" . $conn->error; 63 | } 64 | } 65 | 66 | // delete product 67 | if (isset($_GET['did'])) { 68 | $did = $_GET['did']; 69 | // get the image and delete it from the folder 70 | $sql = "SELECT * FROM products WHERE id = '$did'"; 71 | $result = $conn->query($sql); 72 | $row = $result->fetch_assoc(); 73 | unlink("./Assets/images/" . $row['img']); 74 | $sql = "DELETE FROM 75 | products WHERE id = '$did'"; 76 | if ($conn->query($sql) === TRUE) { 77 | echo ""; 78 | } else { 79 | echo "Error: " . $sql . "
" . $conn->error; 80 | } 81 | } 82 | 83 | ?> 84 |
85 |
86 | 89 |
90 |

Products

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 | num_rows > 0) { 138 | while ($row = $result->fetch_assoc()) { 139 | ?> 140 | 141 | 142 | 143 | 144 | 145 | 149 | 150 | 154 | 155 |
IdNameDiscount priceBrandAction
146 | Edit 147 | Delete 148 |
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 | 196 |
197 | Click on image to upload a new product image 198 |
199 | 200 |
201 | 202 |
203 |
204 |
205 | 206 | 207 | 212 | -------------------------------------------------------------------------------- /formvalidation.php: -------------------------------------------------------------------------------- 1 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | Document 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 | name="gender"> 116 | 117 |
118 |
119 |
mb-3"> 120 | 121 |
122 |
123 |
124 | Skills : 125 |
126 |
127 | > 128 | 129 |
130 |
131 | > 132 | 133 |
134 |
135 | > 136 | 137 |
138 |
139 | > 140 | 141 |
142 |
143 |
mb-3"> 144 | 145 | 152 |
153 |
154 | 155 | 165 |
166 |
mb-3"> 167 | 168 | 169 |
170 |
171 | " value=""> 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 | --------------------------------------------------------------------------------