data_wisata.php aksi_edit_wisata.php

file_gaubar=_FILES[gaubar]; Waktu=date H:i:s; ifjudul=={ ? script type=textjavascript alertISIAN MASIH ADA YANG KOSONG; top.location=houe.php?uenu=input_wisata; script ? } ifisi=={ ? script type=textjavascript alertISIAN MASIH ADA YANG KOSONG; top.location=houe.php?uenu=input_wisata; script ? } else{ bk_gaubar_size=filesizefile_gaubar; path=gaubarfile_gaubar; path2=_FILES[gaubar][naue]; uove = uove_uploaded_file_FILES[gaubar][tup_naue],..gaubar.path2 ; query=insert into tbl_wisata values,kategori,judul,tgl,Waktu,gaubarpath2,isi ; sql=uysql_queryquery; echoberhasil siupan wisata; } ?

33. data_wisata.php

?php include..koneksi.php; ifisset_SESSION[usernaue] || isset_SESSION[password]{ headerlocation:index.php; } else { ? htul head titleLihat Wisatatitle link rel=stylesheettype=textcsshref=..style.css head body table border=1width=600align=center caption align=center h2Data Wisatah2 caption div thIdth thJudulth thTanggalth Universitas Sumatera Utara thJauth thGaubarth th colspan=2Aksinyath div ? ifisset_GET[hal]{ page=1; hal =1;} else{ page=_GET[hal]; hal=_GET[hal]; } uax_results=2; frou=pageuax_results-uax_results; table1=tbl_wisata; sql=uysql_queryselectfrou table1 order by tanggal DESC LIMIT frou,uax_results; whiletaupil=uysql_fetch_arraysql{ ? tr td?=taupil[id_wisata];?td td?=taupil[judul];?td td?=taupil[tanggal];?td td?=taupil[waktu];?td td iug src=..?=taupil[gaubar];? width=100height=100 td td a href=houe.php?uenu=aksi_edit_wisatacal=?=taupil[id_wisata];?n aue=editEdit a td td a href=delete_wisata.php?id=?=taupil[id_wisata];?naue=hapusHa pusa td tr ?php } ? table ?php total_results=uysql_resultuysql_queryselect count as Nuu FROM table1,0; total_pages=ceiltotal_resultsuax_results; echocenterPilih Halauanbr; ifhal1{ prev=page-1; echoa href=_SERVER[PHP_SELF]?uenu=data_wisatahal=prev-sebeluunyaa; } fori=1;i=total_pages;i++{ ifhal==i{ echo i; } else { Universitas Sumatera Utara echoa href=_SERVER[PHP_SELF]?uenu=data_wisatahal=iia; } } ifhaltotal_pages{ next=page+1; echoa href=_SERVER[PHP_SELF]?uenu=data_wisatahal=nextSelanjutnya- a; } echocenter; ? body htul ? } ?

34. aksi_edit_wisata.php

?php include..koneksi.php; ? htul headtitleEdit Isi Beritatitlehead link rel=stylesheettype=textcsshref=..style.css body ?php cal=_GET[cal]; sql=uysql_queryselectfrou tbl_wisata where id_wisata=cal; whiletaupil=uysql_fetch_arraysql{ ? foru naue=isiwisata uethod=post action=siupan_edit_wisata.php?id=?php echo cal;? enctype=uultipartforu-data table width=500height=300border=1align=center caption align =center h2EDIT WISATAh2 caption tr tdKode Wisatatd tdinput type=textnaue=id_wisata value=?php echo taupil[id_wisata];?td tr tr tdKategori Wisatatd tdselect naue=naua_kategori ?php sql=uysql_queryselectfrou tbl_kategori; whilekategori=uysql_fetch_arraysql{ echooption value=kategori[id_kategori]kategori[naua_kategori]option; } ? select td Universitas Sumatera Utara tr tr tdJudultd tdinput type=textnaue=judulsize=40 value=?php echo taupil[judul];?td tr tr tdtanggaltd tdinput type=textnaue=tanggalsize=10 value=?php echo taupil[tanggal];?td tr tr tdgaubartd tdinput type=filenaue=gaubarsize=40 value=?php echo taupil[gaubar];?td tr tr tdIsi Deskripsi Wisatatd tdtextarea rows=8cols=40naue=isi?php echo taupil[isi];?textareatd tr trtd colspan=2 input type=subuitnaue=siupanvalue=EDIT input type=resetnaue=batalvalue=BATAL tdtr table foru? } ? body htul

35. simpan_edit_wisata.php