M-LV-02 TRIIONG DAI HOC TAY OO -o^' KHOA KY THUAT CONG NGHE ca r.t ]t o# HqcrAY KHOA LUAN T6T NGHIEP DAI HQC A.^: xAv DI.ING HE THONG MANG LTIOI CIIA HANG TRUC TUYEN THEO MO \t- HiNHMANGXAHOI C5n b0 hudng d6n Ths Huj,nh Qu6c Thinh KS Vucrng Huj,nh Long Sinh vi6n thgc hiEn Nguy6n Thi Kim Chi MSSV: 085 1010004 C6n bQ ph6n biQn Ths L6 Thi Thu Lan a ::::::::::::::[n3i',louifl:;r;:u^m,:n*'J81"-fl":iil,"3;;;" I ngdy th6ng n[m Md C6 the tim hit-lu kh6a luQn tgi: Thu viQn: Trubng Dgi hgc TAy D6 Website: http://tdu.edu.vn L.O037OS sO AC tai: KLDH Di tdi: H€ thiSn7 Msng ludi Crba hdng trqc nydn dp dang m6 hinh Mqngxd h\i lor cAnn crN Tdi xin chdn thdnh cdm on Trudng Dqi hoc Tdy D6 Khoa C6ng nghe - K! thuQt Trudng Dqi hoc Tdy E6 dd vun ddp ki\n ththc vd tqo diiu ki€n thuqn lqi ae tAi hodn thdnh luqn vdn ndy T6i xin bdy td ldng Th.S Hu)nh Quiic Thinh, biil on sdu siic ddn KS Vuong Huynh Long dd tqn tinh hudng ddn t6i hodn thdnh luQn vdn ndy T6i xin chdn thdnh cdm on cha mg, bqn bi, ngudi thdn dd lu6n quan tdm, nhdc nh&, t)ng hO ttnh thdn ae tA cd dil nghi ltrc hodn thdnh tiit luqn vdn ndy Xin kinh tfing thdnh qud ndy ddn quy thdy c6, cha mg, bqn bd, Bang ttit cd tinh cdm yAu thuong vd chdn thdnh nhiit Nguydn Thi Kim Chi Mim hs, 2012 SV thuc hiQn: NguyEn Thi Kim Chi Trang I Di tdi: H€ thiins Mqng lu6i C*a hdng trqc tuydn dp dqng m6 hinh Mqng NHAN xrr xd h1i cua crAo vttx HtIoNG oAx -u5 [E p Cin Thcr, ngdy th6ng ndm 2Ol2 Gi6o vi6n Hu6nrg Din ThS Hulnh Qudc Thinh SV thuc hiQn: Nguy6n Thi Kim Chi Trang2 Oi tai: He thiins Msng ludi Ctca hdng trqc tuyAn dp dang m6 hinh Mqng xd hAi A' NHAN XET CUA GIAO VIEN PHAN BIEN os @ p Cin Tho, ngAy thring ndm 2012 Gi6o vi6n Phfln BiGn ThS LC Thi Thu Lan SV thsc hiQn: Nguy6n Thi Kim Chi Trang Di tdi: H€ thiSn7 Mq.ng ludi C*a hdng tn;c tuy1n dp damg m6 hinh Msng xd h\i MUC LUC TAT ABSTRACT TOM cHuoNG r roNG DAC TA DE 11 12 QUAN 13 TAr LICH Su crAr QUYET VAN t4 DE ls raI .16 MUC TrEU CUA Op PHTIONG PHAP NGHIEN 1.4.1 V6 ly CUU thuyiSt l.4.2V}thuc hinh CAU TRUC BAO CAO CHUONG CA SO LV THUYET riu Htpu vp wBssrrE 17 r7 .17 18 .I9 .20 2.1.1 Website ld gi? 2.1.2Y€ucAu tdi thii5u cta mdt Website 2.1.3 T6n miAn vd Web 20 .20 hosting 21 mi6n 2.1.3.2 Web hostin9 2.1.4 Quy trinh thitit k6 mQt website 2.1.3.1 T€n rONc euAN vE set, & MyseI- 21 .22 SERVER .22 24 24 2.2.1Tdngquan vd SQL 2.2.1.1 Dinh nghia 24 2.2.1.2 C6c lo4i c6u lQnh .24 24 2.2.1.3 Qui tic sri dpng t0n SQL 2.2.1.4 MQt s6 ki6u dt liQu SQL 25 2.2.2 ci6i tfriQu MySQL Server 26 2.2.2.1 Kh6i niQm 26 2.2.2.2 phpMyAdmin - c6ng cp quin trf MySQL 26 2.2.2.3 Cric tinh nang n6i bat 27 .28 cAc KHAr NrEM pHAN ricu rHrET KE HE 2.3.1 M6 hinh thuc th€ - k€t hqp (Entity - Relationship Model ERM) THONG 28 2.3.2 2.3.3 6ntity) MOi ket hep (Relationship) Thuc the : SV thuc hiQn: Nguy6n Thi Kim Chi 28 28 Trang4 Oi tdi; HQ thiing Mqng ludi C*a hdng trqc tuydn dp dung m6 hinh 2.3.4 ThuQc tinh Mqng xd (Attribute) 2.3.5 Bin sd 2.3.6 Kh6a .29 29 .29 1hC hqrp 2.3.6.LKh6a cria thgc 2.3.6.2 Kh6a cria mQt m5i t6t 2.3.7 Phu thuQc hdm gifra c6c thuc thC 2.3.7.1 Dinh 2.3.7.2 Trinh bdy tr6n 2.3.7.3 Li6n quan gita php thuQc hdm vdi bin nghia 29 30 30 30 CMD HTML h\i .30 s6 .30 .32 2.4.lETl\/tr ld gi? .32 HTML HTML 2.4.4 Cdc the HTML co bin 2.4.2 Cdutruc cria mQt trang 2.4.3 Thinh phAn cria css 2.5.1 CSS ld gi .32 .32 .33 .34 ? 34 JAVASCRrPT 2.6.1Javascript ld gi? 2.6.2 Ngdn ngft javascript 2.6.3 Built-in Object javascript 2.6.4 Nhtng JavaScript vdo t4p tin HTML 2.6.5 Sri dUng t4p tin JavaScript b€n ngodi PHP 2.7.1 Gi6i thi€u 2.7.2 Lich sri phrit tri6n PHP 2.7.2.1 pHp/FI 2.7.2.2 PHP 2.7.2.3 PHp 2.7.3 Cdcthanh phAn co bin cria PHP 2.5.2 Cnph6p cria CSS 34 36 36 .36 36 .37 37 .38 38 .38 .38 39 39 40 2.7.4 Khrii ni6m bi6n, hing, chudi vd c6c ki6u dt 1iQu .41 2.7.4.1 Bitin PHP .41 2.7.4.2 Kh6i niQm vC tring PHP .41 2.7.4.3 Khrii niQm vC chu6i 41 2.7.4.4 Ki6u dt liQu PHP 42 Form 2.7.6 Di6u hudng Menu 2.7.5 PHP vi 2.7.7 Thao t6c CSDL PHP SV thuc hiQn: Nguy6n Thi Kim Chi 42 .43 .44 Trang Di tdi: HQ thiing Mq.ng ludi Ctra hdng trqc tuydn dp dung m6 hinh Msng xd h\i GOOGLE MAPS API 2.8.1 Tim hi€u Google Maps 2.8.2 Google Maps API la gi? CHT.IONG NQr DUNG .45 2.7.8 Session PHP KET QUA DIEU TRA, THU THAP THoNG TIN puAN rics 48 48 48 49 s2 3.2.1.1 OOi vOi khrich vdng lai 3.2.1.2 OOi vOi vi6n trang web 3.2.1.3 OOi vOi ngudi qu6n tri cria hdng 3.2.1.4 OOi vOi ngudi quin trf trang web 3.2.2 So t16 phdn c6p chr?c ndng hQ th6ng 3.2.3 MOt sO luu d6 3.2J 50 ChAc n5ng, y6u cAu d{t niNn d6 THrET KE M0 3.3.1 DAn o6t v6n c1i6n 3.3.1.2 MO hinh Website 3.3.2 MO hinh MCD 3.3.3 M6 hinh ludn ly (MLD) 3.3.4 Circ ring buQc tham chi6u KEr QUA DAr DUQC 3.4.1 Trang chri 3.4.1.1 Form dAng ky 3.4.1.2 Form dAng nhflp 3.4.2Trang qu6n tri Website 3.4.2.1 Form ctang nhAp quin tr! 3.4.2.2 Giao diQn chfnh trang quan tri 3.4.2.3 Form th6m (Th6m sin phAm) 3.4.3 Trang cta hdng 3.3.1.1 MO hinh c6 52 52 .52 52 53 54 55 s8 58 58 .60 61 .61 .62 6e 69 .70 71 72 72 .73 74 76 3.4.3.1 Giao di€n chinh trang cira hdng cria mQt cria hdng (QuAn 6o): 76 SV thuc hiQn: Nguy6n Thi Kim Chi Trang Ei tdi: HQ th6ns Mqng lu6i cira hdng tn;c tuy6n dp &4ng m6 hinh Mqng xd h1i dugc 4.l.2H4nchti 4.1.1 Ktit qui d4t 4.2 CACOB NCsr RUT RA Tu CHUoNG PHU LUC TAI LrEU THAM 81 81 rnimr 82 83 KHAO SV thUc hiQn: Nguy6n Thi Kim Chi 85 TrangT Di tdi: HQ th6ng Mqng ladi Cua hdng trqc ruydn dp dqng md hinh Mgngxd h\i DANH MUC niNn Hinh 2-l Thgc th6 Hinh 2-2Vi ds m6i t