├── README.md ├── lab ├── Lab 00 - Setup environment.doc ├── Lab 06-1 - Styling with CSS.doc ├── Lab 06-2 - Layout with CSS.doc ├── Lab 07 - XML & XHTML.doc ├── Lab 1 - Basic HTML.doc ├── Lab 2-1 - PHP Variables & HTML Input Form.doc ├── Lab 2-2 - Conditional Statements.doc ├── Lab 3 - Javascript.doc ├── Lab 4 - MVC Architecture & PHP Framework.doc └── Lab 5 - MySQL & PHP.doc ├── lab0 ├── README.md └── pic │ └── ide.png ├── lab1 ├── ex1-BuiVietHoang.html ├── ex2-20183594.html ├── ex2-BuiVietHoang.html ├── example.html ├── exe1.html ├── exe2-20183554.html ├── htmlstypeexamples.html ├── icon │ ├── facebook.png │ ├── github.png │ ├── global.png │ ├── linkedin.png │ ├── reddit.png │ └── twitter.png └── pic │ ├── _MG_7393.jpg │ ├── avatar.jpg │ └── hust.png ├── lab2.1 ├── Exercise.html ├── Exercise.php ├── basicform-control.php ├── basicform.php ├── expression.php ├── form4radio.html └── form4radion.php ├── lab2.2 ├── ConditionalTest │ ├── .project │ ├── ConditionalTest.html │ └── ConditionalTest.php ├── DateTime.php └── SquareCube.php ├── lab3 ├── DOM │ ├── cookie.js │ ├── index.html │ ├── left.html │ └── right.html ├── Validate inputs.html ├── colors.html ├── ex1.html ├── ex2.html ├── ex3.html ├── ex4.html ├── ex5.html └── ex6.html ├── lab4 ├── README.md ├── e-commerce │ ├── .DS_Store │ ├── .htaccess │ ├── application │ │ ├── controllers │ │ │ ├── .DS_Store │ │ │ ├── categoriescontroller.php │ │ │ └── productscontroller.php │ │ ├── models │ │ │ ├── .DS_Store │ │ │ ├── admin.php │ │ │ ├── category.php │ │ │ └── product.php │ │ └── views │ │ │ ├── .DS_Store │ │ │ ├── categories │ │ │ ├── .DS_Store │ │ │ ├── index.php │ │ │ └── view.php │ │ │ ├── footer.php │ │ │ ├── header.php │ │ │ └── products │ │ │ └── view.php │ ├── config │ │ ├── config.php │ │ ├── inflection.php │ │ └── routing.php │ ├── db │ │ ├── .DS_Store │ │ └── framework-20090330111635.sql │ ├── index.php │ ├── library │ │ ├── .htaccess │ │ ├── bootstrap.php │ │ ├── cache.class.php │ │ ├── html.class.php │ │ ├── inflection.class.php │ │ ├── shared.php │ │ ├── sqlquery.class.php │ │ ├── template.class.php │ │ ├── vanillacontroller.class.php │ │ └── vanillamodel.class.php │ ├── public │ │ ├── .DS_Store │ │ ├── .htaccess │ │ ├── css │ │ │ └── .DS_Store │ │ ├── img │ │ │ └── .DS_Store │ │ ├── index.php │ │ └── js │ │ │ ├── .DS_Store │ │ │ └── generic.js │ ├── scripts │ │ └── dbexport.php │ └── tmp │ │ ├── cache │ │ ├── .DS_Store │ │ ├── describecategories │ │ └── describeproducts │ │ └── logs │ │ └── .DS_Store ├── mvc │ ├── .buildpath │ ├── .project │ ├── controller │ │ └── Controller.php │ ├── index.php │ ├── model │ │ ├── Book.php │ │ └── Model.php │ └── view │ │ ├── booklist.php │ │ └── viewbook.php └── todo-list │ ├── .DS_Store │ ├── .gitignore │ ├── .htaccess │ ├── application │ ├── .DS_Store │ ├── controllers │ │ └── itemscontroller.php │ ├── models │ │ └── item.php │ └── views │ │ ├── .DS_Store │ │ └── items │ │ ├── .DS_Store │ │ ├── add.php │ │ ├── delete.php │ │ ├── footer.php │ │ ├── header.php │ │ ├── view.php │ │ └── viewall.php │ ├── config │ └── config.php │ ├── db │ └── todo.sql │ ├── index.php │ ├── library │ ├── bootstrap.php │ ├── controller.class.php │ ├── model.class.php │ ├── shared.php │ ├── sqlquery.class.php │ └── template.class.php │ ├── nbproject │ ├── project.properties │ └── project.xml │ ├── public │ ├── .DS_Store │ ├── .htaccess │ ├── css │ │ └── empty │ ├── img │ │ └── empty │ ├── index.php │ ├── js │ │ └── empty │ └── swf │ │ └── empty │ ├── scripts │ └── empty │ └── tmp │ ├── cache │ └── empty │ ├── logs │ └── empty │ └── sessions │ └── empty ├── lab5 ├── 5_3 │ ├── create_table.php │ ├── insert.html │ ├── insert_table.php │ ├── query.php │ ├── sale.php │ ├── search.html │ ├── search.php │ └── startsale.php ├── 5_5 │ ├── addcategory.php │ ├── admin.php │ └── business_service.sql ├── 5_6 │ ├── add_biz.php │ └── business.sql ├── 5_7 │ ├── biz_listings.php │ └── business.sql └── README.md ├── lab6 ├── 6.1 │ ├── Bates.css │ ├── Bates.html │ ├── Cabinets.css │ ├── Cabinets.html │ ├── Fizzics1.html │ ├── Fizzics2.html │ └── images │ │ ├── bond-paper.jpg │ │ ├── bords.jpg │ │ ├── bricks.jpg │ │ └── confetti-background.png └── 6.2 │ ├── 6.2.1.html │ ├── 6.2.2.html │ ├── 6.2.3.html │ ├── 6.2.4.html │ ├── 6.2.5.html │ ├── 6.2.6.html │ ├── 6.2.7.css │ ├── 6.2.7.html │ ├── 6.3.2.1.html │ ├── 6.3.2.2.html │ ├── 6.3.4.html │ ├── 6.3.5.html │ ├── 6.3.6.html │ ├── 6.3.7.html │ ├── 6.3.8.html │ ├── 6.3.9.html │ ├── Exercise1.css │ ├── Exercise1.html │ ├── Exercise2.1.html │ ├── Exercise2.2.html │ └── Exercise2.3.html └── lab7 ├── 7.1.xml ├── 7.2.html ├── 7.3.xml ├── 7.4.xml ├── Exercise 1 ├── 7.5.4.html ├── 7.5.5.docx └── SO SÁNH DTD VÀ XML SCHEMA.docx └── Exercise 2 ├── 57.xml ├── 7.6.2.1.php ├── 7.6.2.2.php ├── 7.6.3.1.php ├── 7.6.3.2.php ├── 7.6.4.php ├── 7.6.5.1.php ├── 7.6.5.2.php ├── 7.6.6.php ├── ingredients.xml ├── pet.xml └── sins.xml /README.md: -------------------------------------------------------------------------------- 1 | ## Bài tập môn công nghệ web và dịch vụ trực tuyến 2 | ### Nhóm : MTHH 3 | - Thành viên 1 : Nguyễn Quang Huy 4 | - Thành viên 2 : Bùi Việt Hoàng 5 | - Thành viên 3 : Nguyễn Văn Thanh 6 | - Thành viên 4 : Trần Quang Minh 7 | 8 | Xem đề bài tại: [https://github.com/trannguyenhan/html-css-js-workspace/tree/master/lab](https://github.com/trannguyenhan/html-css-js-workspace/tree/master/lab) 9 | -------------------------------------------------------------------------------- /lab/Lab 00 - Setup environment.doc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/trannguyenhan/html-css-js-workspace/69a5af6010baba3ab1123695aa3c911657e7a2b9/lab/Lab 00 - Setup environment.doc -------------------------------------------------------------------------------- /lab/Lab 06-1 - Styling with CSS.doc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/trannguyenhan/html-css-js-workspace/69a5af6010baba3ab1123695aa3c911657e7a2b9/lab/Lab 06-1 - Styling with CSS.doc -------------------------------------------------------------------------------- /lab/Lab 06-2 - Layout with CSS.doc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/trannguyenhan/html-css-js-workspace/69a5af6010baba3ab1123695aa3c911657e7a2b9/lab/Lab 06-2 - Layout with CSS.doc -------------------------------------------------------------------------------- /lab/Lab 07 - XML & XHTML.doc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/trannguyenhan/html-css-js-workspace/69a5af6010baba3ab1123695aa3c911657e7a2b9/lab/Lab 07 - XML & XHTML.doc -------------------------------------------------------------------------------- /lab/Lab 1 - Basic HTML.doc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/trannguyenhan/html-css-js-workspace/69a5af6010baba3ab1123695aa3c911657e7a2b9/lab/Lab 1 - Basic HTML.doc -------------------------------------------------------------------------------- /lab/Lab 2-1 - PHP Variables & HTML Input Form.doc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/trannguyenhan/html-css-js-workspace/69a5af6010baba3ab1123695aa3c911657e7a2b9/lab/Lab 2-1 - PHP Variables & HTML Input Form.doc -------------------------------------------------------------------------------- /lab/Lab 2-2 - Conditional Statements.doc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/trannguyenhan/html-css-js-workspace/69a5af6010baba3ab1123695aa3c911657e7a2b9/lab/Lab 2-2 - Conditional Statements.doc -------------------------------------------------------------------------------- /lab/Lab 3 - Javascript.doc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/trannguyenhan/html-css-js-workspace/69a5af6010baba3ab1123695aa3c911657e7a2b9/lab/Lab 3 - Javascript.doc -------------------------------------------------------------------------------- /lab/Lab 4 - MVC Architecture & PHP Framework.doc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/trannguyenhan/html-css-js-workspace/69a5af6010baba3ab1123695aa3c911657e7a2b9/lab/Lab 4 - MVC Architecture & PHP Framework.doc -------------------------------------------------------------------------------- /lab/Lab 5 - MySQL & PHP.doc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/trannguyenhan/html-css-js-workspace/69a5af6010baba3ab1123695aa3c911657e7a2b9/lab/Lab 5 - MySQL & PHP.doc -------------------------------------------------------------------------------- /lab0/README.md: -------------------------------------------------------------------------------- 1 | # IDE 2 | ### IDE : Eclipse
3 | ### Web server : Apache2, PHP7.4
4 | ![](pic/ide.png) 5 | -------------------------------------------------------------------------------- /lab0/pic/ide.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/trannguyenhan/html-css-js-workspace/69a5af6010baba3ab1123695aa3c911657e7a2b9/lab0/pic/ide.png -------------------------------------------------------------------------------- /lab1/ex1-BuiVietHoang.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 |

My first HTML exercise

5 |
6 |

My name is Bui Viet Hoang

7 |
8 |

9 | 10 | This is my team. 4 members 11 | Tran Quang Minh, 12 | Nguyen Quang Huy, 13 | Nguyen Van Thanh, 14 | and me 15 | 16 |

17 |
18 |

19 | We are going to build a website on our own. Let' s just wait for our demo. 20 |

21 |
22 |
Stay tuned
23 |
24 |
Thanks
25 | 26 | 27 | -------------------------------------------------------------------------------- /lab1/ex2-20183594.html: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | My Homepage 7 | 8 | 9 |

10 | Welcome to my homepage! 11 |

12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 |
Personal detailImage
NameTran Quang MinhTrần Quang Minh
AddressMinh Khai, Hai Ba Trung, Ha Noi City
Phone+84976575218
E-mailquangminhtran22@gmail.com
minh.tq183594@sis.hust.edu.vn
FacebookTrần Quang Minh
Education processComputer Science, Hanoi University of Sciene and Technology
SkillsC/C++, Java, Python Programming, Algorithms, English
Certifications600 TOEIC
HobbiesFootball, Tennis, Music, Movie
DesireData scientist
63 | 64 | -------------------------------------------------------------------------------- /lab1/ex2-BuiVietHoang.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Document 7 | 8 | 9 | 10 |

Welcome to my website!

11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 |
Personal infoImages
NameBui Viet Hoang
Address
237 Hoang Van Thai, Khuong Trung, Thanh Xuan, Ha Noi
Phone0794112293
Emailbuiviethoang12062000@gmail.com
Hoang.bv183540@sis.hust.edu.vn
FacebookBuiVietHoang
SkillsC++, JAVA, Python
HobbiesWatching movies, music
AmbitionsAI reseacher
53 | 54 | -------------------------------------------------------------------------------- /lab1/example.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 |

This is my first paragraph

5 | Hello name attribute HTML link! 6 |
7 | 8 | 9 |

This is a heading

10 |

This is a heading

11 |

This is a heading

12 |
13 | 14 | 15 |

This is a paragraph

16 |
17 |

This is a paragraph

18 |
19 |

This is a paragraph

20 |
21 | 22 | 23 |

This is a paragraph

24 |

This is another paragraph

25 |
26 | 27 | 28 |

This is
a para
graph with line breaks

29 |
30 | 31 | 32 | This is a link 33 |
34 | 35 | 36 |
37 |
38 |
39 |
40 | 41 | 42 | This is a link 43 |
44 | 45 | 46 | Visit W3Schools! 47 |
48 | 49 | 50 | Any content 51 | Any content 52 |
53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 |
row 1, cell 1row 1, cell 2
row 2, cell 1row 2, cell 2
65 |
66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 |
HeadingAnother Heading
row 1, cell 1row 1, cell 2
row 2, cell 1row 2, cell 2
82 |
83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 |
row 1, cell 1row 1, cell 2
row 2, cell 1
95 |
96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 |
row 1, cell 1row 1, cell 2
row 2, cell 1 
108 |
109 | 110 | 111 | 115 |
116 | 117 |
    118 |
  1. Coffee
  2. 119 |
  3. Milk
  4. 120 |
121 |
122 | 123 |
124 |
Coffee
125 |
Black hot drink
126 |
Milk
127 |
White cold drink
128 |
129 |
130 | 131 | 132 | 133 | Here is a short quotation here is a short quotation 134 | 135 |
136 | Here is a long quotation here is a long quotation here is a long quotation here is a long quotation here is a long quotation here is a long quotation here is a long quotation here is a long quotation here is a long quotation. 137 |
138 | 139 | -------------------------------------------------------------------------------- /lab1/exe1.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 |

This is a HTML practice exercise

5 |
6 | 7 |

8 | The heading above is aligned to the center of this page. The heading above is aligned to the center of this page. The heading above is aligned to the center of this page. 9 |

10 |
11 | 12 |

13 | This paragraph 14 | contains a lot of lines 15 | in the source code, 16 | but the browser 17 | ignores it. 18 |

19 |
20 | 21 |

22 | This paragraph 23 | contains a lot of spaces 24 | in the source code, 25 | but the browser 26 | ignores it. 27 |

28 |
29 | 30 |
This is heading 5
31 |
32 | 33 |
This is heading 6
34 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /lab1/exe2-20183554.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 |
10 | Name : Nguyen Quang Huy
11 | Age : 20
12 | Email : trannguyenhan01092000@gmail.com
13 | Live : Luc Ngan, Bac Giang
14 |
Education process

Luc Ngan 1 High school, HUST

Working process

HUST : 80%

Society activities

Join clubs, social activities such as blood donation, ...

Skills

C++, Java, Ubuntu, ...

Experiences

4 months

Certifications

HUST

Hobbies

Football, Computer, Write blogs, Make money, Technology, Robot, ...

Contact
50 | 51 |

© in group One

52 | 53 | -------------------------------------------------------------------------------- /lab1/htmlstypeexamples.html: -------------------------------------------------------------------------------- 1 | 2 | 3 |

Look! Styles and colors

4 |

5 | This text is in Verdana and red

6 |

7 | This text is in Times and green

8 |

This text is 30 pixels high

9 | 10 | -------------------------------------------------------------------------------- /lab1/icon/facebook.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/trannguyenhan/html-css-js-workspace/69a5af6010baba3ab1123695aa3c911657e7a2b9/lab1/icon/facebook.png -------------------------------------------------------------------------------- /lab1/icon/github.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/trannguyenhan/html-css-js-workspace/69a5af6010baba3ab1123695aa3c911657e7a2b9/lab1/icon/github.png -------------------------------------------------------------------------------- /lab1/icon/global.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/trannguyenhan/html-css-js-workspace/69a5af6010baba3ab1123695aa3c911657e7a2b9/lab1/icon/global.png -------------------------------------------------------------------------------- /lab1/icon/linkedin.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/trannguyenhan/html-css-js-workspace/69a5af6010baba3ab1123695aa3c911657e7a2b9/lab1/icon/linkedin.png -------------------------------------------------------------------------------- /lab1/icon/reddit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/trannguyenhan/html-css-js-workspace/69a5af6010baba3ab1123695aa3c911657e7a2b9/lab1/icon/reddit.png -------------------------------------------------------------------------------- /lab1/icon/twitter.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/trannguyenhan/html-css-js-workspace/69a5af6010baba3ab1123695aa3c911657e7a2b9/lab1/icon/twitter.png -------------------------------------------------------------------------------- /lab1/pic/_MG_7393.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/trannguyenhan/html-css-js-workspace/69a5af6010baba3ab1123695aa3c911657e7a2b9/lab1/pic/_MG_7393.jpg -------------------------------------------------------------------------------- /lab1/pic/avatar.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/trannguyenhan/html-css-js-workspace/69a5af6010baba3ab1123695aa3c911657e7a2b9/lab1/pic/avatar.jpg -------------------------------------------------------------------------------- /lab1/pic/hust.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/trannguyenhan/html-css-js-workspace/69a5af6010baba3ab1123695aa3c911657e7a2b9/lab1/pic/hust.png -------------------------------------------------------------------------------- /lab2.1/Exercise.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Survey 5 | 6 | 7 |
8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 |
Your name
Class
University
Hobby 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 |
YesNo
Cat
Cooking
Dog
Math
Web
Facebook
Youtube
66 |
75 |
76 | 77 | -------------------------------------------------------------------------------- /lab2.1/Exercise.php: -------------------------------------------------------------------------------- 1 | "; 29 | print "You are studing at $class, $university
"; 30 | print "Your hobby is :
"; 31 | foreach ($hobbies as $i) { 32 | print "- $i
"; 33 | } 34 | ?> -------------------------------------------------------------------------------- /lab2.1/basicform-control.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /lab2.1/basicform.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Basic Form 5 | 6 | 7 |
8 | Click submit to start our initial PHP program 9 |
10 |
11 | 12 |
13 | 14 | -------------------------------------------------------------------------------- /lab2.1/expression.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Expression 5 | 6 | 7 | 15 | 16 | -------------------------------------------------------------------------------- /lab2.1/form4radio.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Form for Radio 5 | 6 | 7 |
8 | Enter your email :
9 | May we contact you? 10 | 11 | 12 |
13 | 14 | 15 |
16 | 17 | -------------------------------------------------------------------------------- /lab2.1/form4radion.php: -------------------------------------------------------------------------------- 1 | "; 6 | echo "contact preference is $contact"; 7 | ?> -------------------------------------------------------------------------------- /lab2.2/ConditionalTest/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | ConditionalTest 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /lab2.2/ConditionalTest/ConditionalTest.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | A Simple Form 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 |
First name :
Middle name :
Last name :
Enter mid-term score
Enter final-exem score
35 |
36 | 37 | -------------------------------------------------------------------------------- /lab2.2/ConditionalTest/ConditionalTest.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Conditional Test 5 | 6 | 7 | "; 13 | if($first == $last){ 14 | print "$first and $last are equal
"; 15 | } 16 | if($first < $last){ 17 | print "$first is less than $last
"; 18 | } 19 | if($first > $last){ 20 | print "$first is greater than $last
"; 21 | } 22 | 23 | $grade1 = $_GET["grade1"]; 24 | $grade2 = $_GET["grage2"]; 25 | $final = (2 * $grade1 + 3 * $grade2) / 5; 26 | $rate = "A"; 27 | 28 | if($final > 89){ 29 | print "Your final grade is $final. You got A. Congratulation!"; 30 | $rate = "A"; 31 | } elseif ($final > 79) { 32 | print "Your final grade is $final. You got B"; 33 | $rate = "B"; 34 | } elseif ($final > 69) { 35 | print "Your final grade is $final. You got C"; 36 | $rate = "C"; 37 | } elseif ($final > 59) { 38 | print "Your final grade is $final. You got D"; 39 | $rate = "D"; 40 | } elseif ($final >= 0) { 41 | print "Your grade final is $final. You got F"; 42 | $rate = "F"; 43 | } else { 44 | print "Iillegal grade less than 0. Final grade = $final"; 45 | $rate = "Iillegal"; 46 | } 47 | 48 | print "

"; 49 | 50 | switch ($rate) { 51 | case "A": 52 | print "Excellent!
"; 53 | break; 54 | case "B": 55 | print "Good!
"; 56 | break; 57 | case "C": 58 | print "Not bad!
"; 59 | break; 60 | case "D": 61 | print "Normal!
"; 62 | break; 63 | case "F": 64 | print "You have a try again!
"; 65 | break; 66 | 67 | default: 68 | print "Iillegal grage!
"; 69 | } 70 | ?> 71 | 72 | -------------------------------------------------------------------------------- /lab2.2/DateTime.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Date time processing 5 | 6 | 7 |
8 | Enter your name and select data and time for the appointment 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 42 | 43 | 44 | 45 | 70 | 71 | 72 | 73 | 74 | 75 |
Your name :
Date : 17 | 24 | 25 | 32 | 33 | 40 | 41 |
Time : 46 | 53 | 54 | 61 | 62 | 69 |
76 |
77 | "; 88 | print "You have choose to have an appointment on $time_hour:$time_minus:$time_second, $date_day/$date_month/$date_year
"; 89 | print "More information
In 12 hours, the time and date is "; 90 | 91 | $date=date_create("$date_year-$date_month-$date_day $time_hour:$time_minus:$time_second"); 92 | echo date_format($date,"Y-m-d h:i:sa"); 93 | echo "
"; 94 | 95 | if($date_month == 1 || $date_month == 3 || $date_month == 5 || $date_month == 7 || $date_month == 8 || $date_month == 10 || $date_month == 12){ 96 | echo "This month has 31 days"; 97 | } elseif ($date_month != 2){ 98 | echo "This month has 30 days"; 99 | } else { 100 | if($date_year % 100 == 0 && $date_year % 400 == 0){ 101 | echo "This month has 29 days"; 102 | } elseif ($date_year % 4 == 0 && $date_year % 10 != 0) { 103 | echo "This month has 29 days"; 104 | } else { 105 | echo "This month has 28 days"; 106 | } 107 | } 108 | 109 | } 110 | ?> 111 | 112 | -------------------------------------------------------------------------------- /lab2.2/SquareCube.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Square and Cube 5 | 6 | Generate Square and Cube 7 |
8 |
"> 9 | 10 | 11 | 12 | 21 | 22 | 23 | 24 | 33 | 34 | 35 | 36 | 37 | 38 |
Select Start Number : 13 | 20 |
Select end Number : 25 | 32 |
39 | 40 | 41 | "; 51 | $i = $i + 1; 52 | } 53 | } 54 | ?> 55 |
NumberSquareCube
$i$sqr$cube
56 |
57 | 58 | 59 | -------------------------------------------------------------------------------- /lab3/DOM/cookie.js: -------------------------------------------------------------------------------- 1 | function getCookie(name) { 2 | var cookieArr = document.cookie.split(";"); 3 | 4 | for(var i = 0; i < cookieArr.length; i++) { 5 | var cookiePair = cookieArr[i].split("="); 6 | 7 | if(name == cookiePair[0].trim()) { 8 | return decodeURIComponent(cookiePair[1]); 9 | } 10 | } 11 | 12 | return null; 13 | } 14 | 15 | function addCookie () { 16 | var data = document.myform.textarea.value; 17 | 18 | if(data == ""){ 19 | return false; 20 | } else { 21 | var oldCookie = getCookie("cookie"); 22 | var cookievalue = ""; 23 | if(oldCookie != null){ 24 | cookievalue= encodeURIComponent(oldCookie + " " + data); 25 | } else { 26 | cookievalue = encodeURIComponent(data); 27 | } 28 | var maxAge = "; max-age=" + 1*24*60*60 + ";"; 29 | document.cookie="cookie=" + cookievalue + maxAge; 30 | document.myform.textarea.value = ""; 31 | } 32 | } 33 | 34 | function loadCookie () { 35 | var allCookie = getCookie("cookie") 36 | let start = 0; 37 | let stop = allCookie.length; 38 | let i = 0; 39 | while(true){ 40 | for (i=start; i"); 46 | start = i + 1; 47 | if(start >= stop) break; 48 | } 49 | } -------------------------------------------------------------------------------- /lab3/DOM/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | INDEX 5 | 6 | 7 | 8 | 9 | 12 | 15 | 16 | 17 | 20 | 23 | 24 |
10 | STORAGE THE BLOGS 11 | 13 | FEED 14 |
18 | 19 | 21 | 22 |
25 | 26 | -------------------------------------------------------------------------------- /lab3/DOM/left.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | STORAGE THE BLOGS 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /lab3/DOM/right.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | FEED 5 | 6 | 7 | 8 |
9 |

10 | 11 |
12 | 13 | -------------------------------------------------------------------------------- /lab3/Validate inputs.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Document 8 | 9 | 10 |
11 | username: 12 | email: 13 | phone: 14 | 15 |
16 | 17 | 18 | 19 | 48 | -------------------------------------------------------------------------------- /lab3/colors.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Document 8 | 9 | 10 | RED 11 |

hãy di chuột qua link RED màu văn bản sẽ chuyển red

12 | 13 | GREEN 14 |

hãy di chuột qua link GREEN màu văn bản sẽ chuyển green

15 | 16 | BLUE 17 |

hãy di chuột qua link BLUE màu văn bản sẽ chuyển blue

18 | 19 | 46 | -------------------------------------------------------------------------------- /lab3/ex1.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Document 9 | 10 | 11 | 12 | 50 | 51 | 52 | -------------------------------------------------------------------------------- /lab3/ex2.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Document 8 | 9 | 10 | 16 | 17 | -------------------------------------------------------------------------------- /lab3/ex3.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Document 8 | 9 | 17 | 18 | 19 |
20 | 21 |
22 | 23 | -------------------------------------------------------------------------------- /lab3/ex4.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Document 8 | 9 | 15 | 16 | 17 | 18 |
19 | 24 | 25 |
26 |

27 | This is some sample text. 28 |

29 | 30 | 31 | -------------------------------------------------------------------------------- /lab3/ex5.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Example Message Box Page 6 | 33 | 34 | 35 | 36 |
37 | 38 |
39 | Add Text Field 40 | 41 | 42 | 43 | -------------------------------------------------------------------------------- /lab3/ex6.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | ex6 5 | 28 | 29 | 30 |
31 | Postal Code : 32 |
33 | Money : $ 34 |
35 | 36 | -------------------------------------------------------------------------------- /lab4/README.md: -------------------------------------------------------------------------------- 1 | # Với các project : 2 | - Các bạn phải import database vào mysql sau đó thay đổi file cấu hình trong thư mục config phù hợp với cấu hình trên máy bạn. 3 | 4 | # Với prject mvc : 5 | - Vào như bình thường, project sẽ tự chuyển hướng tới file index.php 6 | 7 | # Với project todo-list : 8 | - Truy cập vào đường dẫn `localhost/[path_project]/todo-list/items/viewall`
9 | Trong đó [path_project] là đường dẫn tới thư mục đặt project `todo-list`, ví dụ mình để project này trong thư mục `html-css-js-workspace/lab4` thì [path_project] chính là cái này. 10 | 11 | # Với project e-commerce : 12 | - Truy cập vào đường dẫn `localhost/[path_project]/e-commerce/categories` 13 | 14 | # Note : 15 | - Với 2 project `todo-list` và `e-commerce` nhiều bạn sẽ gặp vấn đề về máy chủ apache2 không thể đọc file `.htacess` nên không thể chuyển hướng tên miền về file `index.php` thì có thể xem lại file config của apache2 và để `AllowOverride All` thay cho `AllowOverride Node`. Nếu chưa được thì hãy thử khởi động lại mod_rewrite. 16 | - Nêu có bất cứ thư mục nào bị từ chối truy cập, hãy phân lại quyền truy cập thư mục của thư mục đó cho user 17 | 18 | Ấn vào ảnh dưới để xem demo :
19 | 20 | [![Watch the video](https://i.pinimg.com/564x/f2/b2/15/f2b2150c459544a6589c36ae7fcef9c6.jpg)](https://youtu.be/hI-_C--20iM) 21 | -------------------------------------------------------------------------------- /lab4/e-commerce/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/trannguyenhan/html-css-js-workspace/69a5af6010baba3ab1123695aa3c911657e7a2b9/lab4/e-commerce/.DS_Store -------------------------------------------------------------------------------- /lab4/e-commerce/.htaccess: -------------------------------------------------------------------------------- 1 | 2 | RewriteEngine on 3 | RewriteRule ^$ public/ [L] 4 | RewriteRule (.*) public/$1 [L] 5 | 6 | -------------------------------------------------------------------------------- /lab4/e-commerce/application/controllers/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/trannguyenhan/html-css-js-workspace/69a5af6010baba3ab1123695aa3c911657e7a2b9/lab4/e-commerce/application/controllers/.DS_Store -------------------------------------------------------------------------------- /lab4/e-commerce/application/controllers/categoriescontroller.php: -------------------------------------------------------------------------------- 1 | Category->where('parent_id',$categoryId); 11 | $this->Category->showHasOne(); 12 | $this->Category->showHasMany(); 13 | $subcategories = $this->Category->search(); 14 | 15 | $this->Category->id = $categoryId; 16 | $this->Category->showHasOne(); 17 | $this->Category->showHasMany(); 18 | $category = $this->Category->search(); 19 | 20 | $this->set('subcategories',$subcategories); 21 | $this->set('category',$category); 22 | 23 | } 24 | 25 | 26 | function index() { 27 | $this->Category->orderBy('name','ASC'); 28 | $this->Category->showHasOne(); 29 | $this->Category->showHasMany(); 30 | $this->Category->where('parent_id','0'); 31 | $categories = $this->Category->search(); 32 | $this->set('categories',$categories); 33 | 34 | } 35 | 36 | function afterAction() { 37 | 38 | } 39 | 40 | 41 | } -------------------------------------------------------------------------------- /lab4/e-commerce/application/controllers/productscontroller.php: -------------------------------------------------------------------------------- 1 | Product->id = $id; 11 | $this->Product->showHasOne(); 12 | $this->Product->showHMABTM(); 13 | $product = $this->Product->search(); 14 | $this->set('product',$product); 15 | 16 | } 17 | 18 | 19 | function afterAction() { 20 | 21 | } 22 | 23 | 24 | } -------------------------------------------------------------------------------- /lab4/e-commerce/application/models/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/trannguyenhan/html-css-js-workspace/69a5af6010baba3ab1123695aa3c911657e7a2b9/lab4/e-commerce/application/models/.DS_Store -------------------------------------------------------------------------------- /lab4/e-commerce/application/models/admin.php: -------------------------------------------------------------------------------- 1 | 'Product'); 5 | var $hasOne = array('Parent' => 'Category'); 6 | 7 | } -------------------------------------------------------------------------------- /lab4/e-commerce/application/models/product.php: -------------------------------------------------------------------------------- 1 | 'Category'); 5 | var $hasManyAndBelongsToMany = array('Tag' => 'Tag'); 6 | } -------------------------------------------------------------------------------- /lab4/e-commerce/application/views/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/trannguyenhan/html-css-js-workspace/69a5af6010baba3ab1123695aa3c911657e7a2b9/lab4/e-commerce/application/views/.DS_Store -------------------------------------------------------------------------------- /lab4/e-commerce/application/views/categories/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/trannguyenhan/html-css-js-workspace/69a5af6010baba3ab1123695aa3c911657e7a2b9/lab4/e-commerce/application/views/categories/.DS_Store -------------------------------------------------------------------------------- /lab4/e-commerce/application/views/categories/index.php: -------------------------------------------------------------------------------- 1 |

Please select a category

2 | 3 |
4 | 5 | link($category['Category']['name'],'categories/view/'.$category['Category']['id'].'/'.$category['Category']['name'])?> 6 | 7 |
8 | 9 |
-------------------------------------------------------------------------------- /lab4/e-commerce/application/views/categories/view.php: -------------------------------------------------------------------------------- 1 |

2 |

3 | 4 | 5 |

Please select a sub-category

6 | 7 |
8 | 9 | link($subcategory['Category']['name'],'categories/view/'.$subcategory['Category']['id'].'/'.$subcategory['Category']['name'])?> 10 | 11 |
12 | 13 |
14 | 15 | 16 | 17 |

Please select a product

18 | 19 |
20 | 21 | link($product['Product']['name'],'products/view/'.$product['Product']['id'].'/'.$product['Product']['name'])?> 22 | 23 |
24 | 25 |
26 | -------------------------------------------------------------------------------- /lab4/e-commerce/application/views/footer.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /lab4/e-commerce/application/views/header.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | My E-Commerce Website 6 | 111 | 112 | 113 | 114 | "; 21 | print "
Insert into $table_name was succesful!
"; 22 | } else { 23 | die ("Insert into $table_name failed SQLcmd=$SQLcmd"); 24 | } 25 | mysqli_close($connect); 26 | } 27 | ?> 28 | 29 | -------------------------------------------------------------------------------- /lab5/5_3/query.php: -------------------------------------------------------------------------------- 1 | Table Output 2 | 3 | Products Data'; 14 | $SQLcmd = "SELECT * from $table_name"; 15 | print "
The Query is $SQLcmd
"; 16 | $result = mysqli_query($connect, $SQLcmd); 17 | print ""; 18 | print " 19 | 20 | 21 | 22 | 23 | 24 | "; 25 | if(mysqli_num_rows($result) > 0) { 26 | while($row = mysqli_fetch_assoc($result)) { 27 | print " 28 | 29 | 30 | 31 | 32 | 33 | "; 34 | } 35 | } 36 | print "
NumProductCostWeightCount
".$row['ProductID']."".$row['Product_desc']."".$row['Cost']."".$row['Weight']."".$row['Numb']."
"; 37 | mysqli_close($connect); 38 | } 39 | ?> 40 | 41 | -------------------------------------------------------------------------------- /lab5/5_3/sale.php: -------------------------------------------------------------------------------- 1 | Product Update Results 2 | 3 | Update Results for Table Products'; 15 | $SQLcmd = "UPDATE $table_name SET Numb = Numb-1 WHERE (Product_desc = '$product_desc')"; 16 | print "
The query is $SQLcmd
"; 17 | print "
"; 18 | mysqli_query($connect, $SQLcmd); 19 | $getdatasql = "SELECT * from $table_name"; 20 | $result = mysqli_query($connect, $getdatasql); 21 | print ""; 22 | print " 23 | 24 | 25 | 26 | 27 | 28 | "; 29 | if(mysqli_num_rows($result) > 0) { 30 | while($row = mysqli_fetch_assoc($result)) { 31 | print " 32 | 33 | 34 | 35 | 36 | 37 | "; 38 | } 39 | } 40 | print "
NumProductCostWeightCount
".$row['ProductID']."".$row['Product_desc']."".$row['Cost']."".$row['Weight']."".$row['Numb']."
"; 41 | mysqli_close($connect); 42 | } 43 | ?> 44 | 45 | -------------------------------------------------------------------------------- /lab5/5_3/search.html: -------------------------------------------------------------------------------- 1 | 2 | Inventory Search 3 | 4 |
Inventory Search
5 |
6 | 7 | 8 | 9 | 10 | 11 |
Enter product to search for:
12 | 13 | 14 |
15 | 16 | -------------------------------------------------------------------------------- /lab5/5_3/search.php: -------------------------------------------------------------------------------- 1 | Search Results 2 | 3 | Products Data'; 14 | $num = 0; 15 | $product_desc = $_POST["product_desc"]; 16 | $SQLcmd = "SELECT * FROM $table_name WHERE (Product_desc = '$product_desc')"; 17 | print "
The query is $SQLcmd
"; 18 | $result = mysqli_query($connect, $SQLcmd); 19 | print "
"; 20 | print ""; 21 | print " 22 | 23 | 24 | 25 | 26 | 27 | "; 28 | if(mysqli_num_rows($result) > 0) { 29 | while($row = mysqli_fetch_assoc($result)) { 30 | print " 31 | 32 | 33 | 34 | 35 | 36 | "; 37 | $num ++; 38 | } 39 | } 40 | print "
NumProductCostWeightCount
$num".$row['Product_desc']."".$row['Cost']."".$row['Weight']."".$row['Numb']."
"; 41 | } 42 | ?> 43 | 44 | -------------------------------------------------------------------------------- /lab5/5_3/startsale.php: -------------------------------------------------------------------------------- 1 | 2 | Inventory Management 3 | 4 |
Select Product We Just Sold
5 |
6 |
7 | Hammer 8 | Screw Driver 9 | Wrench 10 |
11 | 12 | 13 |
14 | Products Data'; 25 | $SQLcmd = "SELECT * from $table_name"; 26 | print "
The query is $SQLcmd
"; 27 | $result = mysqli_query($connect, $SQLcmd); 28 | print ""; 29 | print " 30 | 31 | 32 | 33 | 34 | 35 | "; 36 | if(mysqli_num_rows($result) > 0) { 37 | while($row = mysqli_fetch_assoc($result)) { 38 | print " 39 | 40 | 41 | 42 | 43 | 44 | "; 45 | } 46 | } 47 | print "
NumProductCostWeightCount
".$row['ProductID']."".$row['Product_desc']."".$row['Cost']."".$row['Weight']."".$row['Numb']."
"; 48 | mysqli_close($connect); 49 | } 50 | ?> 51 | 52 | -------------------------------------------------------------------------------- /lab5/5_5/addcategory.php: -------------------------------------------------------------------------------- 1 | Category Administration 2 | 3 |
Category Administration
4 |
5 | '; 16 | $catid = $_POST['CatID']; 17 | $title = $_POST['Title']; 18 | $description = $_POST['Description']; 19 | $SQLcmd = "INSERT INTO $table_name (CategoryID, Title, Description) VALUES('$catid', '$title', '$description')"; 20 | echo $SQLcmd; 21 | if(mysqli_query($connect, $SQLcmd)) { 22 | print "
Insert into $table_name was succesful!
"; 23 | } else { 24 | print "
Insert into $table_name failed
"; 25 | } 26 | mysqli_close($connect); 27 | print ''; 28 | } 29 | ?> 30 |
31 | 32 | -------------------------------------------------------------------------------- /lab5/5_5/admin.php: -------------------------------------------------------------------------------- 1 | Category Administration 2 | 3 |
Category Administration
4 |
5 | '; 16 | $SQLcmd = "SELECT * from $table_name"; 17 | $result = mysqli_query($connect, $SQLcmd); 18 | print ""; 19 | print " 20 | 21 | 22 | 23 | "; 24 | if(mysqli_num_rows($result) > 0) { 25 | while($row = mysqli_fetch_assoc($result)) { 26 | print " 27 | 28 | 29 | 30 | "; 31 | } 32 | } 33 | print ''; 34 | print ''; 35 | print ''; 36 | //print ''; 37 | print "
CatIDTitleDescription
".$row['CategoryID']."".$row['Title']."".$row['Description']."
"; 38 | print ''; 39 | mysqli_close($connect); 40 | } 41 | ?> 42 |
43 | 44 | -------------------------------------------------------------------------------- /lab5/5_5/business_service.sql: -------------------------------------------------------------------------------- 1 | -- phpMyAdmin SQL Dump 2 | -- version 5.1.0 3 | -- https://www.phpmyadmin.net/ 4 | -- 5 | -- Máy chủ: 127.0.0.1 6 | -- Thời gian đã tạo: Th4 26, 2021 lúc 07:42 PM 7 | -- Phiên bản máy phục vụ: 10.4.18-MariaDB 8 | -- Phiên bản PHP: 7.4.16 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 | -- Cơ sở dữ liệu: `business_service` 22 | -- 23 | 24 | -- -------------------------------------------------------- 25 | 26 | -- 27 | -- Cấu trúc bảng cho bảng `biz_categories` 28 | -- 29 | 30 | CREATE TABLE `biz_categories` ( 31 | `BusinessID` varchar(50) NOT NULL, 32 | `CategoryID` varchar(50) NOT NULL 33 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; 34 | 35 | -- -------------------------------------------------------- 36 | 37 | -- 38 | -- Cấu trúc bảng cho bảng `businesses` 39 | -- 40 | 41 | CREATE TABLE `businesses` ( 42 | `BusinessID` varchar(50) NOT NULL, 43 | `Name` varchar(50) NOT NULL, 44 | `Address` varchar(50) NOT NULL, 45 | `City` varchar(50) NOT NULL, 46 | `Telephone` varchar(10) NOT NULL, 47 | `URL` varchar(50) NOT NULL 48 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; 49 | 50 | -- -------------------------------------------------------- 51 | 52 | -- 53 | -- Cấu trúc bảng cho bảng `categories` 54 | -- 55 | 56 | CREATE TABLE `categories` ( 57 | `CategoryID` varchar(50) NOT NULL, 58 | `Title` varchar(50) NOT NULL, 59 | `Description` varchar(50) NOT NULL 60 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; 61 | 62 | -- 63 | -- Đang đổ dữ liệu cho bảng `categories` 64 | -- 65 | 66 | INSERT INTO `categories` (`CategoryID`, `Title`, `Description`) VALUES 67 | ('AUTO', 'Automotive Parts and Supplies', 'Accessories for your car'), 68 | ('FISH', 'Seafood Stores and Restaurants', 'Place to get your fish'), 69 | ('HEALTH', 'Heath And Beauty', 'Everything for the body'), 70 | ('SCHOOL', 'Schools and Colleges', 'Public and Private Learning'), 71 | ('SPORTS', 'Community Sports and Recreations', 'Guide to Parks and Leagues'); 72 | 73 | -- 74 | -- Chỉ mục cho các bảng đã đổ 75 | -- 76 | 77 | -- 78 | -- Chỉ mục cho bảng `biz_categories` 79 | -- 80 | ALTER TABLE `biz_categories` 81 | ADD PRIMARY KEY (`BusinessID`,`CategoryID`), 82 | ADD KEY `CategoryID` (`CategoryID`); 83 | 84 | -- 85 | -- Chỉ mục cho bảng `businesses` 86 | -- 87 | ALTER TABLE `businesses` 88 | ADD PRIMARY KEY (`BusinessID`); 89 | 90 | -- 91 | -- Chỉ mục cho bảng `categories` 92 | -- 93 | ALTER TABLE `categories` 94 | ADD PRIMARY KEY (`CategoryID`); 95 | 96 | -- 97 | -- Các ràng buộc cho các bảng đã đổ 98 | -- 99 | 100 | -- 101 | -- Các ràng buộc cho bảng `biz_categories` 102 | -- 103 | ALTER TABLE `biz_categories` 104 | ADD CONSTRAINT `biz_categories_ibfk_1` FOREIGN KEY (`BusinessID`) REFERENCES `businesses` (`BusinessID`), 105 | ADD CONSTRAINT `biz_categories_ibfk_2` FOREIGN KEY (`CategoryID`) REFERENCES `categories` (`CategoryID`); 106 | COMMIT; 107 | 108 | /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; 109 | /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; 110 | /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; 111 | -------------------------------------------------------------------------------- /lab5/5_6/add_biz.php: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | 7 | Business Registration 8 | 27 | 58 | 59 | 60 |

Business Registration

61 |
62 | Click on one or control click on multiple catetories

63 |
64 | 65 | 74 | > 75 | 76 | 77 | 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 |
Business name
Adress
City
Telephone
URL
107 |

108 | 109 | 110 |
111 |
112 | 163 | 164 | -------------------------------------------------------------------------------- /lab5/5_6/business.sql: -------------------------------------------------------------------------------- 1 | -- MySQL dump 10.13 Distrib 8.0.23, for Linux (x86_64) 2 | -- 3 | -- Host: localhost Database: business 4 | -- ------------------------------------------------------ 5 | -- Server version 8.0.23-0ubuntu0.20.10.1 6 | 7 | /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; 8 | /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; 9 | /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; 10 | /*!50503 SET NAMES utf8mb4 */; 11 | /*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; 12 | /*!40103 SET TIME_ZONE='+00:00' */; 13 | /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; 14 | /*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; 15 | /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; 16 | /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; 17 | 18 | -- 19 | -- Table structure for table `biz_listings` 20 | -- 21 | 22 | DROP TABLE IF EXISTS `biz_listings`; 23 | /*!40101 SET @saved_cs_client = @@character_set_client */; 24 | /*!50503 SET character_set_client = utf8mb4 */; 25 | CREATE TABLE `biz_listings` ( 26 | `id_info` int NOT NULL, 27 | `id_category` int NOT NULL, 28 | PRIMARY KEY (`id_info`,`id_category`), 29 | KEY `id_category` (`id_category`), 30 | CONSTRAINT `biz_listings_ibfk_1` FOREIGN KEY (`id_info`) REFERENCES `info` (`id`), 31 | CONSTRAINT `biz_listings_ibfk_2` FOREIGN KEY (`id_category`) REFERENCES `category` (`id`) 32 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; 33 | /*!40101 SET character_set_client = @saved_cs_client */; 34 | 35 | -- 36 | -- Dumping data for table `biz_listings` 37 | -- 38 | 39 | LOCK TABLES `biz_listings` WRITE; 40 | /*!40000 ALTER TABLE `biz_listings` DISABLE KEYS */; 41 | INSERT INTO `biz_listings` VALUES (1,1),(3,1),(2,9),(4,9),(5,9); 42 | /*!40000 ALTER TABLE `biz_listings` ENABLE KEYS */; 43 | UNLOCK TABLES; 44 | 45 | -- 46 | -- Table structure for table `category` 47 | -- 48 | 49 | DROP TABLE IF EXISTS `category`; 50 | /*!40101 SET @saved_cs_client = @@character_set_client */; 51 | /*!50503 SET character_set_client = utf8mb4 */; 52 | CREATE TABLE `category` ( 53 | `id` int NOT NULL AUTO_INCREMENT, 54 | `category` varchar(500) DEFAULT NULL, 55 | PRIMARY KEY (`id`) 56 | ) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; 57 | /*!40101 SET character_set_client = @saved_cs_client */; 58 | 59 | -- 60 | -- Dumping data for table `category` 61 | -- 62 | 63 | LOCK TABLES `category` WRITE; 64 | /*!40000 ALTER TABLE `category` DISABLE KEYS */; 65 | INSERT INTO `category` VALUES (1,'Automotive Parts and Suppliers'),(2,'Seafood Stores and Restaurants'),(3,'Health and Beauty'),(4,'Schools and Colleges'),(9,'technical'); 66 | /*!40000 ALTER TABLE `category` ENABLE KEYS */; 67 | UNLOCK TABLES; 68 | 69 | -- 70 | -- Table structure for table `info` 71 | -- 72 | 73 | DROP TABLE IF EXISTS `info`; 74 | /*!40101 SET @saved_cs_client = @@character_set_client */; 75 | /*!50503 SET character_set_client = utf8mb4 */; 76 | CREATE TABLE `info` ( 77 | `id` int NOT NULL AUTO_INCREMENT, 78 | `name_biz` varchar(50) DEFAULT NULL, 79 | `adress_biz` varchar(50) DEFAULT NULL, 80 | `city_biz` varchar(50) DEFAULT NULL, 81 | `telephone_biz` varchar(50) DEFAULT NULL, 82 | `url_biz` varchar(50) DEFAULT NULL, 83 | PRIMARY KEY (`id`) 84 | ) ENGINE=InnoDB AUTO_INCREMENT=35 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; 85 | /*!40101 SET character_set_client = @saved_cs_client */; 86 | 87 | -- 88 | -- Dumping data for table `info` 89 | -- 90 | 91 | LOCK TABLES `info` WRITE; 92 | /*!40000 ALTER TABLE `info` DISABLE KEYS */; 93 | INSERT INTO `info` VALUES (1,'HUST Corp','1 Dai co viet','Ha Noi','0987361812','hust.edu.vn'),(2,'VC Corp','85 Vu Trong Phung','Ha Noi','0912354123','vccorp.com'),(3,'PiGroup','Ngo goc de','Hanoi','0987361811','pigroup.tk'),(4,'VNG','Quan 1','TPHCM','0123456789','vng.com'),(5,'Viettel','Hoa lac','Hanoi','0999123553','viettel.com'); 94 | /*!40000 ALTER TABLE `info` ENABLE KEYS */; 95 | UNLOCK TABLES; 96 | 97 | -- 98 | -- Dumping routines for database 'business' 99 | -- 100 | /*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; 101 | 102 | /*!40101 SET SQL_MODE=@OLD_SQL_MODE */; 103 | /*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; 104 | /*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */; 105 | /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; 106 | /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; 107 | /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; 108 | /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; 109 | 110 | -- Dump completed on 2021-04-29 1:32:28 111 | -------------------------------------------------------------------------------- /lab5/5_7/biz_listings.php: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | 7 | Business Listings 8 | 41 | 57 | 58 | 59 |
60 |

Business Listings



61 |
62 | 63 | 72 | > 73 | 74 | 75 | 78 |
79 |
80 |
81 |
82 | 83 | 97 | > 98 | 99 | 100 | 101 | 102 | 103 | 104 | 114 | 115 | 116 | 119 |
105 | 113 |
120 |
121 | 122 | 130 | 131 | 132 | -------------------------------------------------------------------------------- /lab5/5_7/business.sql: -------------------------------------------------------------------------------- 1 | -- MySQL dump 10.13 Distrib 8.0.23, for Linux (x86_64) 2 | -- 3 | -- Host: localhost Database: business 4 | -- ------------------------------------------------------ 5 | -- Server version 8.0.23-0ubuntu0.20.10.1 6 | 7 | /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; 8 | /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; 9 | /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; 10 | /*!50503 SET NAMES utf8mb4 */; 11 | /*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; 12 | /*!40103 SET TIME_ZONE='+00:00' */; 13 | /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; 14 | /*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; 15 | /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; 16 | /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; 17 | 18 | -- 19 | -- Table structure for table `biz_listings` 20 | -- 21 | 22 | DROP TABLE IF EXISTS `biz_listings`; 23 | /*!40101 SET @saved_cs_client = @@character_set_client */; 24 | /*!50503 SET character_set_client = utf8mb4 */; 25 | CREATE TABLE `biz_listings` ( 26 | `id_info` int NOT NULL, 27 | `id_category` int NOT NULL, 28 | PRIMARY KEY (`id_info`,`id_category`), 29 | KEY `id_category` (`id_category`), 30 | CONSTRAINT `biz_listings_ibfk_1` FOREIGN KEY (`id_info`) REFERENCES `info` (`id`), 31 | CONSTRAINT `biz_listings_ibfk_2` FOREIGN KEY (`id_category`) REFERENCES `category` (`id`) 32 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; 33 | /*!40101 SET character_set_client = @saved_cs_client */; 34 | 35 | -- 36 | -- Dumping data for table `biz_listings` 37 | -- 38 | 39 | LOCK TABLES `biz_listings` WRITE; 40 | /*!40000 ALTER TABLE `biz_listings` DISABLE KEYS */; 41 | INSERT INTO `biz_listings` VALUES (1,1),(3,1),(2,9),(4,9),(5,9); 42 | /*!40000 ALTER TABLE `biz_listings` ENABLE KEYS */; 43 | UNLOCK TABLES; 44 | 45 | -- 46 | -- Table structure for table `category` 47 | -- 48 | 49 | DROP TABLE IF EXISTS `category`; 50 | /*!40101 SET @saved_cs_client = @@character_set_client */; 51 | /*!50503 SET character_set_client = utf8mb4 */; 52 | CREATE TABLE `category` ( 53 | `id` int NOT NULL AUTO_INCREMENT, 54 | `category` varchar(500) DEFAULT NULL, 55 | PRIMARY KEY (`id`) 56 | ) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; 57 | /*!40101 SET character_set_client = @saved_cs_client */; 58 | 59 | -- 60 | -- Dumping data for table `category` 61 | -- 62 | 63 | LOCK TABLES `category` WRITE; 64 | /*!40000 ALTER TABLE `category` DISABLE KEYS */; 65 | INSERT INTO `category` VALUES (1,'Automotive Parts and Suppliers'),(2,'Seafood Stores and Restaurants'),(3,'Health and Beauty'),(4,'Schools and Colleges'),(9,'technical'); 66 | /*!40000 ALTER TABLE `category` ENABLE KEYS */; 67 | UNLOCK TABLES; 68 | 69 | -- 70 | -- Table structure for table `info` 71 | -- 72 | 73 | DROP TABLE IF EXISTS `info`; 74 | /*!40101 SET @saved_cs_client = @@character_set_client */; 75 | /*!50503 SET character_set_client = utf8mb4 */; 76 | CREATE TABLE `info` ( 77 | `id` int NOT NULL AUTO_INCREMENT, 78 | `name_biz` varchar(50) DEFAULT NULL, 79 | `adress_biz` varchar(50) DEFAULT NULL, 80 | `city_biz` varchar(50) DEFAULT NULL, 81 | `telephone_biz` varchar(50) DEFAULT NULL, 82 | `url_biz` varchar(50) DEFAULT NULL, 83 | PRIMARY KEY (`id`) 84 | ) ENGINE=InnoDB AUTO_INCREMENT=35 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; 85 | /*!40101 SET character_set_client = @saved_cs_client */; 86 | 87 | -- 88 | -- Dumping data for table `info` 89 | -- 90 | 91 | LOCK TABLES `info` WRITE; 92 | /*!40000 ALTER TABLE `info` DISABLE KEYS */; 93 | INSERT INTO `info` VALUES (1,'HUST Corp','1 Dai co viet','Ha Noi','0987361812','hust.edu.vn'),(2,'VC Corp','85 Vu Trong Phung','Ha Noi','0912354123','vccorp.com'),(3,'PiGroup','Ngo goc de','Hanoi','0987361811','pigroup.tk'),(4,'VNG','Quan 1','TPHCM','0123456789','vng.com'),(5,'Viettel','Hoa lac','Hanoi','0999123553','viettel.com'); 94 | /*!40000 ALTER TABLE `info` ENABLE KEYS */; 95 | UNLOCK TABLES; 96 | 97 | -- 98 | -- Dumping routines for database 'business' 99 | -- 100 | /*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; 101 | 102 | /*!40101 SET SQL_MODE=@OLD_SQL_MODE */; 103 | /*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; 104 | /*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */; 105 | /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; 106 | /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; 107 | /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; 108 | /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; 109 | 110 | -- Dump completed on 2021-04-29 1:32:28 111 | -------------------------------------------------------------------------------- /lab5/README.md: -------------------------------------------------------------------------------- 1 | # Với các project : 2 | - Các bạn phải import database vào mysql sau đó thay đổi file cấu hình trong thư mục config phù hợp với cấu hình trên máy bạn. 3 | 4 | 5 | Xem video demo ở dưới đây :
6 | [![Watch the video](https://i.pinimg.com/236x/95/d9/29/95d929405ccaa2721d32ef12b3c4f195.jpg)](https://youtu.be/vN7ubWGOi6c) 7 | -------------------------------------------------------------------------------- /lab6/6.1/Bates.css: -------------------------------------------------------------------------------- 1 | span { 2 | float: left; 3 | font-family: "Cushing Book"; 4 | font-size: 75pt; 5 | } 6 | 7 | p { 8 | margin-top: 5px; 9 | } 10 | 11 | p.rhead{ 12 | text-align: right; 13 | margin-right: 0.5in; 14 | font-family: sans-serif; 15 | } 16 | 17 | p.lhead{ 18 | font-family: sans-serif; 19 | } 20 | 21 | p.body { 22 | text-align: justify; 23 | text-indent: 0.5in; 24 | } 25 | p.foot{ 26 | margin-left: 60%; 27 | line-height: 300%; 28 | } -------------------------------------------------------------------------------- /lab6/6.1/Bates.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | An Open Letter to the IRS 5 | 6 | 7 | 8 |

9 | April 1, 2001 10 |


11 |

12 | William A. Bates
13 | Macrosoft Corporation
14 | Blumond, WA 12345 15 |

16 | Internal Revenue Service
17 | Philadelphia, PA 67890 18 |

19 |
20 | Dear Sirs, 21 |

22 | I am writing to inform you that, due to financial difficulties, I will be unable to pay my taxes this year. 23 |

24 | You see, my company has had reduced profits this year. In fact gross revenues have now dropped below the GDP of twelve foreign countries! Given this intolerable situation, I am sure you will understand. 25 |

26 | The 23rd Psalm (King James Version)

27 | The LORD is my shepherd; I shall not want. 28 |

He made me to lie down in green pastures: he led me beside the still waters. He restoreth my soul: he leadeth me in the paths of righteousness for his name's sake. Yea, though I walk through the valley of the shadow of death, I will fear no evil: for thou art with me; thy rod and thy staff they comfort me. Thou preparest a table before me in the presence of mine enemies: thou anointest my head with oil; my cup runneth over. Surely goodness and mercy shall follow me all the days of my life: and I will dwell in the house of the LORD for ever. 29 |

30 | Sincerely,
31 | William A. Bates 32 | 33 | 34 | -------------------------------------------------------------------------------- /lab6/6.1/Cabinets.css: -------------------------------------------------------------------------------- 1 | h1 { 2 | text-align: center; 3 | } 4 | 5 | p { 6 | margin: 0.25in; 7 | border: 0.25 in solid black; 8 | padding: 0.25in; 9 | background: URL(images/bond-paper.jpg); 10 | } 11 | 12 | body { 13 | background: url(images/bricks.jpg); 14 | } 15 | 16 | .banner { 17 | background: url(images/bords.jpg) repeat-x; 18 | font-size: 50pt; 19 | font-family: Arial Rounded MT Bold; 20 | } -------------------------------------------------------------------------------- /lab6/6.1/Cabinets.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Joe's Cabinets 8 | 9 | 10 | 11 |

12 | 13 | 16 |
17 |
18 |

19 | The margin is where the bricks show through. 20 | The border is the solid black line. 21 | The padding is the space around the text in the bond-paper background. 22 |

23 |

24 | Welcome to Joe's Cabinets. We specialize in 25 |

26 | 30 | 31 | -------------------------------------------------------------------------------- /lab6/6.1/Fizzics1.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | New Advances in Physics 5 | 6 | 7 |

New Advances in Physics

8 |

Turning Gold into Lead

9 | In a startling breakthrough, scientist B.O. "Gus" Fizzics has invented a practical technique for transmutation! For more details, please see our transmutation thesis. 10 |

Perpetual Inactivity Machine

11 | In a radical approach that turned traditional attempts to develop perpetual motion machines on their heads, Prof. Fizzics has developed a verified, bona fide perpetual inaction machine. To purchase your own for only $99.00 (plus $43.29 shipping and handling), please see our order form. 12 | 13 | 14 | -------------------------------------------------------------------------------- /lab6/6.1/Fizzics2.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | New Advances in Physics 5 | 20 | 21 | 22 |

New Advances in Physics

23 |

Turning Gold into Lead

24 | In a startling breakthrough, scientist B.O. "Gus" Fizzics has invented a practical technique for transmutation! For more details, please see our transmutation thesis. 25 |

Perpetual Inactivity Machine

26 | In a radical approach that turned traditional attempts to develop perpetual motion machines on their heads, Prof. Fizzics has developed a verified, bona fide perpetual inaction machine. To purchase your own for only $99.00 (plus $43.29 shipping and handling), please see our order form. 27 | 28 | 29 | -------------------------------------------------------------------------------- /lab6/6.1/images/bond-paper.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/trannguyenhan/html-css-js-workspace/69a5af6010baba3ab1123695aa3c911657e7a2b9/lab6/6.1/images/bond-paper.jpg -------------------------------------------------------------------------------- /lab6/6.1/images/bords.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/trannguyenhan/html-css-js-workspace/69a5af6010baba3ab1123695aa3c911657e7a2b9/lab6/6.1/images/bords.jpg -------------------------------------------------------------------------------- /lab6/6.1/images/bricks.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/trannguyenhan/html-css-js-workspace/69a5af6010baba3ab1123695aa3c911657e7a2b9/lab6/6.1/images/bricks.jpg -------------------------------------------------------------------------------- /lab6/6.1/images/confetti-background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/trannguyenhan/html-css-js-workspace/69a5af6010baba3ab1123695aa3c911657e7a2b9/lab6/6.1/images/confetti-background.png -------------------------------------------------------------------------------- /lab6/6.2/6.2.1.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | My first styled page 5 | 6 | 7 | 8 | 9 | 10 | 16 | 17 | 18 |

My first styled page

19 | 20 |

Welcome to my styled page! 21 | 22 |

It lacks images, but at least it has style. And it has links, even if they don't go anywhere… 23 | 24 |

There should be more here, but I don't know what yet. 25 | 26 | 27 |

Made 15 October 2009
28 | by myself.
29 | 30 | 31 | -------------------------------------------------------------------------------- /lab6/6.2/6.2.2.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | My first styled page 5 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 25 | 26 | 27 |

My first styled page

28 | 29 |

Welcome to my styled page! 30 | 31 |

It lacks images, but at least it has style. And it has links, even if they don't go anywhere… 32 | 33 |

There should be more here, but I don't know what yet. 34 | 35 | 36 |

Made 15 October 2009
37 | by myself.
38 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /lab6/6.2/6.2.3.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | My first styled page 5 | 15 | 16 | 17 | 18 | 19 | 20 | 26 | 27 | 28 |

My first styled page

29 | 30 |

Welcome to my styled page! 31 | 32 |

It lacks images, but at least it has style. And it has links, even if they don't go anywhere… 33 | 34 |

There should be more here, but I don't know what yet. 35 | 36 | 37 |

Made 15 October 2009
38 | by myself.
39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /lab6/6.2/6.2.4.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | My first styled page 5 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 33 | 34 | 35 |

My first styled page

36 | 37 |

Welcome to my styled page! 38 | 39 |

It lacks images, but at least it has style. And it has links, even if they don't go anywhere… 40 | 41 |

There should be more here, but I don't know what yet. 42 | 43 | 44 |

Made 15 October 2009
45 | by myself.
46 | 47 | 48 | 49 | -------------------------------------------------------------------------------- /lab6/6.2/6.2.5.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | My first styled page 5 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 47 | 48 | 49 |

My first styled page

50 | 51 |

Welcome to my styled page! 52 | 53 |

It lacks images, but at least it has style. And it has links, even if they don't go anywhere… 54 | 55 |

There should be more here, but I don't know what yet. 56 | 57 | 58 |

Made 15 October 2009
59 | by myself.
60 | 61 | 62 | 63 | -------------------------------------------------------------------------------- /lab6/6.2/6.2.6.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | My first styled page 5 | 39 | 40 | 41 | 42 | 43 | 44 | 50 | 51 | 52 |

My first styled page

53 | 54 |

Welcome to my styled page! 55 | 56 |

It lacks images, but at least it has style. And it has links, even if they don't go anywhere… 57 | 58 |

There should be more here, but I don't know what yet. 59 | 60 | 61 |

Made 15 October 2009
62 | by myself.
63 | 64 | 65 | 66 | -------------------------------------------------------------------------------- /lab6/6.2/6.2.7.css: -------------------------------------------------------------------------------- 1 | body { 2 | padding-left: 11em; 3 | font-family: Georgia, "Times New Roman", 4 | Times, serif; 5 | color: purple; 6 | background-color: #d8da3d } 7 | ul.navbar { 8 | list-style-type: none; 9 | padding: 0; 10 | margin: 0; 11 | position: absolute; 12 | top: 2em; 13 | left: 1em; 14 | width: 9em } 15 | h1 { 16 | font-family: Helvetica, Geneva, Arial, 17 | SunSans-Regular, sans-serif } 18 | ul.navbar li { 19 | background: white; 20 | margin: 0.5em 0; 21 | padding: 0.3em; 22 | border-right: 1em solid black } 23 | ul.navbar a { 24 | text-decoration: none } 25 | a:link { 26 | color: blue } 27 | a:visited { 28 | color: purple } 29 | address { 30 | margin-top: 1em; 31 | padding-top: 1em; 32 | border-top: thin dotted } 33 | -------------------------------------------------------------------------------- /lab6/6.2/6.2.7.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | My first styled page 5 | 6 | 7 | 8 | 9 | 10 | 11 | 17 | 18 | 19 |

My first styled page

20 | 21 |

Welcome to my styled page! 22 | 23 |

It lacks images, but at least it has style. And it has links, even if they don't go anywhere… 24 | 25 |

There should be more here, but I don't know what yet. 26 | 27 | 28 |

Made 15 October 2009
29 | by myself.
30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /lab6/6.2/6.3.2.1.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Document 8 | 9 | 10 | 11 | 12 | 13 | 14 |
Navigation links are placed here
15 | 16 | 17 | 18 | 19 |
Main content is placed here
20 | 21 | -------------------------------------------------------------------------------- /lab6/6.2/6.3.2.2.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Document 8 | 9 | 10 | 11 | 12 | 13 | 14 |
Main content is placed here
15 | 16 | 17 | 18 | 19 |
Navigation Links are placed here
20 | 21 | -------------------------------------------------------------------------------- /lab6/6.2/6.3.4.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | TWO-COLUM FIXED LAYOUT WITH FIXED BOXES 4 | 39 | 40 | 41 | 42 |
Left Section
43 |
Content Section
44 | 45 | 46 | 47 | -------------------------------------------------------------------------------- /lab6/6.2/6.3.5.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | THREE-COLUMN FIXED LAYOUT WITH FIXED BOXES 4 | 48 | 49 | 50 | 51 |
Left Section
52 |
Content Section
53 |
Right Section
54 | 55 | 56 | 57 | -------------------------------------------------------------------------------- /lab6/6.2/6.3.6.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | TWO-COLUMN FIXED LAYOUT WITH FLOATING BOXES 4 | 35 | 36 | 37 | 38 |
Left Section
39 |
Content Section
40 | 41 | 42 | 43 | -------------------------------------------------------------------------------- /lab6/6.2/6.3.7.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | THREE-COLUMN FIXED LAYOUT WITH FLOATING BOXES 4 | 40 | 41 | 42 | 43 |
Left Section
44 |
Content Section
45 |
Left Section
46 | 47 | 48 | 49 | -------------------------------------------------------------------------------- /lab6/6.2/6.3.8.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | TWO-COLUMN LIQUID LAYOUT WITH FLOATING BOXES 4 | 32 | 33 | 34 | 35 |
Left Section
36 |
Content Section
37 | 38 | 39 | 40 | -------------------------------------------------------------------------------- /lab6/6.2/6.3.9.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | THREE-COLUMN LIQUID LAYOUT WITH FLOATING BOXES 4 | 38 | 39 | 40 | 41 |
Left Section
42 |
Right Section
43 |
Content Section
44 | 45 | 46 | 47 | -------------------------------------------------------------------------------- /lab6/6.2/Exercise1.css: -------------------------------------------------------------------------------- 1 | body { 2 | font-family: Georgia, "Times New Roman", 3 | Times, serif; 4 | color: purple; 5 | background-color: #d8da3d } 6 | 7 | .leftcol{ 8 | float: left; 9 | width: 15%; 10 | padding-top: 20px; 11 | } 12 | 13 | .rightcol{ 14 | float: right; 15 | width: 84%; 16 | } 17 | 18 | ul.navbar { 19 | list-style-type: none; 20 | padding: 0; 21 | margin: 0; 22 | top: 2em; 23 | left: 1em; 24 | width: 9em } 25 | h1 { 26 | font-family: Helvetica, Geneva, Arial, 27 | SunSans-Regular, sans-serif } 28 | ul.navbar li { 29 | background: white; 30 | margin: 0.5em 0; 31 | padding: 0.3em; 32 | border-right: 1em solid black } 33 | ul.navbar a { 34 | text-decoration: none } 35 | a:link { 36 | color: blue } 37 | a:visited { 38 | color: purple } 39 | address { 40 | margin-top: 1em; 41 | padding-top: 1em; 42 | border-top: thin dotted } 43 | 44 | 45 | -------------------------------------------------------------------------------- /lab6/6.2/Exercise1.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | My first styled page 5 | 6 | 7 | 8 | 9 | 10 | 11 |
12 | 18 |
19 | 20 |
21 |

My first styled page

22 | 23 |

Welcome to my styled page! 24 | 25 |

It lacks images, but at least it has style. And it has links, even if they don't go anywhere… 26 | 27 |

There should be more here, but I don't know what yet. 28 | 29 | 30 |

Made 15 October 2009
by myself.
31 |
32 | 33 | 34 | -------------------------------------------------------------------------------- /lab6/6.2/Exercise2.1.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Document 8 | 9 | 10 |
11 | Header content 12 |
13 |
14 | Main content 15 |
16 |
Sidebar content
17 |
Footer content
18 | 19 | -------------------------------------------------------------------------------- /lab6/6.2/Exercise2.2.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Document 8 | 24 | 25 | 26 | 29 |
30 | Main content 31 |
32 | 33 | 34 | 35 | 57 | 58 | -------------------------------------------------------------------------------- /lab6/6.2/Exercise2.3.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Document 8 | 24 | 25 | 26 | 29 |
30 |
31 | Main content 32 |
33 | 34 |
35 | 36 | 37 | -------------------------------------------------------------------------------- /lab7/7.1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 20183632 5 | Nguyễn Văn Thanh 6 | khmt04-k63 7 |
Hà Nội
8 | 0967648120 9 |
10 | 11 | 12 | 20183554 13 | Nguyễn Quang Huy 14 | khmt03-k63 15 |
Hà Nội
16 | 0999999999 17 |
18 |
19 | -------------------------------------------------------------------------------- /lab7/7.2.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | MathML 6 | 7 | 8 | 9 | 10 | 11 | 12 | x 13 | = 14 | 15 | 16 | 17 | - 18 | b 19 | 20 | ± 21 | 22 | 23 | 24 | b 25 | 2 26 | 27 | - 28 | 29 | 4 30 | 31 | a 32 | 33 | c 34 | 35 | 36 | 37 | 38 | 39 | 2 40 | 41 | a 42 | 43 | 44 | 45 | 46 | 47 | -------------------------------------------------------------------------------- /lab7/7.3.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Hoàng Văn Thụ Hoàng Mai Hà Nội Việt Nam 5 | nhà mình 6 | 7 | 105.8612147911079,20.98705359848218,12.30347463558939 8 | 9 | 10 | -------------------------------------------------------------------------------- /lab7/7.4.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 7 | 10 | 11 | 14 | 15 | -------------------------------------------------------------------------------- /lab7/Exercise 1/7.5.4.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /lab7/Exercise 1/7.5.5.docx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/trannguyenhan/html-css-js-workspace/69a5af6010baba3ab1123695aa3c911657e7a2b9/lab7/Exercise 1/7.5.5.docx -------------------------------------------------------------------------------- /lab7/Exercise 1/SO SÁNH DTD VÀ XML SCHEMA.docx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/trannguyenhan/html-css-js-workspace/69a5af6010baba3ab1123695aa3c911657e7a2b9/lab7/Exercise 1/SO SÁNH DTD VÀ XML SCHEMA.docx -------------------------------------------------------------------------------- /lab7/Exercise 2/57.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Moulin Rouge 4 | Baz Luhrmann's over-the-top vision of Paris at the turn of the century is witty, sexy...and completely unforgettable 5 | 6 | Nicole Kidman 7 | Ewan McGregor 8 | John Leguizamo 9 | Jim Broadbent 10 | Richard Roxburgh 11 | 12 | 13 | Baz Luhrmann 14 | 120 15 | Romance/Comedy 16 | 2001 17 | A stylishly spectacular extravaganza, Moulin Rouge is hard to categorize; it is, at different times, a love story, a costume drama, a musical, and a comedy. Director Baz Luhrmann (well-known for the very hip William Shakespeare's Romeo + Juliet) has taken some simple themes - love, jealousy and obsession - and done something completely new and different with them by setting them to music. 18 | 5 19 | -------------------------------------------------------------------------------- /lab7/Exercise 2/7.6.2.1.php: -------------------------------------------------------------------------------- 1 | name . "\n"; 8 | echo "Age: " . $xml->age . "\n"; 9 | echo "Species: " . $xml->species . "\n"; 10 | echo "Parents: " . $xml->parents->mother . " and " . $xml->parents->father . "\n"; 11 | ?> -------------------------------------------------------------------------------- /lab7/Exercise 2/7.6.2.2.php: -------------------------------------------------------------------------------- 1 | name = "Sammy Snail"; 8 | $xml->age = 4; 9 | $xml->species = "snail"; 10 | $xml->parents->mother = "Sue Snail"; 11 | $xml->parents->father = "Sid Snail"; 12 | // write new data to file 13 | file_put_contents($file, $xml->asXML()); 14 | ?> -------------------------------------------------------------------------------- /lab7/Exercise 2/7.6.3.1.php: -------------------------------------------------------------------------------- 1 | 7 | echo $xml->sin[0] . "\n"; 8 | echo $xml->sin[1] . "\n"; 9 | echo $xml->sin[2] . "\n"; 10 | echo $xml->sin[3] . "\n"; 11 | echo $xml->sin[4] . "\n"; 12 | echo $xml->sin[5] . "\n"; 13 | echo $xml->sin[6] . "\n"; 14 | ?> -------------------------------------------------------------------------------- /lab7/Exercise 2/7.6.3.2.php: -------------------------------------------------------------------------------- 1 | element collection 7 | foreach ($xml->sin as $sin) { 8 | echo "$sin\n"; 9 | } 10 | ?> -------------------------------------------------------------------------------- /lab7/Exercise 2/7.6.4.php: -------------------------------------------------------------------------------- 1 | '; 3 | // load string 4 | $xml = simplexml_load_string($str) or die ("Unable to load XML string!"); 5 | // for each shape 6 | // calculate area 7 | foreach ($xml->shape as $shape) { 8 | if ($shape['type'] == "circle") { 9 | $area = pi() * $shape['radius'] * $shape['radius']; 10 | } 11 | elseif ($shape['type'] == "rectangle") { 12 | $area = $shape['length'] * $shape['width']; 13 | } 14 | elseif ($shape['type'] == "square") { 15 | $area = $shape['length'] * $shape['length']; 16 | } 17 | echo $area."\n"; 18 | } 19 | ?> -------------------------------------------------------------------------------- /lab7/Exercise 2/7.6.5.1.php: -------------------------------------------------------------------------------- 1 | elements and print 7 | foreach ($xml->xpath('//desc') as $desc) { echo "$desc\n"; } 8 | ?> -------------------------------------------------------------------------------- /lab7/Exercise 2/7.6.5.2.php: -------------------------------------------------------------------------------- 1 | elements and print 7 | foreach ($xml->xpath('//item[quantity > 1]/desc') as $desc) { echo "$desc\n"; } 8 | ?> -------------------------------------------------------------------------------- /lab7/Exercise 2/7.6.6.php: -------------------------------------------------------------------------------- 1 | 7 | 8 | 9 | 10 | 11 | 12 |

title; ?> (year; ?>)

13 | 14 |

teaser; ?>

15 | 16 | body; ?> 17 | 18 |

19 | Director: director; ?>
Duration: duration; ?> min
Cast: cast->person as $person) { echo "$person "; } ?>
Rating: rating; ?> 20 |
21 | 22 | -------------------------------------------------------------------------------- /lab7/Exercise 2/ingredients.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Boneless chicken breasts 5 | 2 6 | 7 | 8 | Chopped onions 9 | 2 10 | 11 | 12 | Ginger 13 | 1 14 | 15 | 16 | Garlic 17 | 1 18 | 19 | 20 | Red chili powder 21 | 1 22 | 23 | 24 | Coriander seeds 25 | 1 26 | 27 | 28 | Lime juice 29 | 2 30 | 31 | -------------------------------------------------------------------------------- /lab7/Exercise 2/pet.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Polly Parrot 4 | 3 5 | parrot 6 | 7 | Pia Parrot 8 | Peter Parrot 9 | 10 | -------------------------------------------------------------------------------- /lab7/Exercise 2/sins.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | pride 4 | envy 5 | anger 6 | greed 7 | sloth 8 | gluttony 9 | lust 10 | --------------------------------------------------------------------------------