Tambah Gambar Obyek Wisata Edit Data Wisata

d. Tambah Gambar Obyek Wisata

Tampilan berikut ini keluar ketika user sudah menyimpan obyek wisata yang di daftarkan. Gambar 4. 8 Halaman Tambah Gambar Wisata. Listing program untuk menambahkan gambar obyek wisata 1. if empty_FILES[nama_file][tmp_name] { 2. jenis_gambar = _FILES[nama_file][type]; 3. judul_gambar = _SESSION[Nama_pengelola]; 4. if jenis_gambar == imagejpeg || jenis_gambar == imagejpg || jenis_gambar == imagegif || jenis_gambar == imagex-png { 5. gambar = namafolder . basename_FILES[nama_file][name]; 6. if move_uploaded_file_FILES[nama_file][tmp_name], gambar { 7. echo script language=javascriptalertGambar Berhasil Ditambahkan, klik OK untuk menambah gambar lainscript; 8. echo script language=javascriptwindow.location = TambahGambarWisata.phpscript; 9. sql = insert into Gambarwisata judul_gambar,nama_file values judul_gambar,gambar; 10. res = mysql_querysql or diemysql_error; 11. } else { 12. echo script language=javascript; 13. echo alertGambar gagal dikirim; 14. echo script; 15. echo script language=javascriptwindow.location = TambahGambarWisata.phpscript;

e. Edit Data Wisata

Tampilan berikut ini keluar ketika user memilih menu wisata dan mengklik menu “Edit Wisata”. Halaman ini menampilkan semua data wisata yang di miliki oleh pengelola Gambar 4. 9 Halaman Edit Data Wisata Listing program untuk menampilkan dan merubah data obyek wisata 16. } 17. } else { 18. echo script language=javascript; 19. echo alertJenis gambar yang anda kirim salah. Harus .jpg; 20. echo script; 21. echo script language=javascriptwindow.location = TambahGambarWisata.phpscript; 22. } 23. } else { 24. echo script language=javascript; 25. echo alertanda belum memilih gambar; 26. echo script; 27. echo script language=javascriptwindow.location = TambahGambarWisata.phpscript; 28. } 1. div class=col-md-12 2. table class=table border=1 3. thead 4. tr 5. thId Wisatath 6. thNama Tempat wisatath 7. thAlamatth 8. thBiaya Masukth 9. thTlp Pengelolath 10. thKeteranganth 11. thLongtitudeth 12. thLatitudeth 13. tr Setelah pengelola memilih data wisata yang akan dirubah maka akan muncul pada tampilan berikut. Dan pada tampilan ini pengelola bisa merubah data yang akan dirubah. Gambar 4. 10 Halaman Form Edit Data Wisata. 1. ?php 2. include ....KoneksiConeksi.php; 3. Session = _SESSION[Nama_pengelola]; 4. 5. query = mysql_queryselect from Wisata where Nama_pengelola=Session; 6. while row = mysql_fetch_arrayquery { 7. echo tr; 8. echo thspan . row[Id_wisata] . th; 9. echo thspan . row[Nama_wisata] . th; 10. echo thspan . row[Alamat] . th; 11. echo thspan . row[Harga] . th; 12. echo thspan . row[No_tlp] . th; 13. echo thspan . row[Keterangan] . th; 14. echo thspan . row[Longtitude] . th; 15. echo thspan . row[Latitude] . th; 16. echo tddiv align=centera rel=facebox href=Edit_datawisataPengelola.php?Id_wisata= . row[Id_wisata] . editadivtd; 17. echo tr; 18. } 19. ? 20. thead 21. table 22. div

f. Hapus Data Wisata