$email = anti_injection($_POST["email"]); $username = anti_injection($_POST["username"]); $password = md5(anti_injection($_POST["password"])); if ($nama == '' and $username == '') { ?> <script type="text/javascript"> alert('nama dan username tidak boleh kosong'); document.location.href='./index.php?mod=home&opt=profil&opts=list'; </script> <?php exit; } if ($email != '') { cek_email($email, "./index.php?mod=home&opt=profil&opts=list"); } if ($telepon != '') { cek_telepon($telepon, "./index.php?mod=home&opt=profil&opts=list"); } if (${$_POST}["password"] == "") { $d = mysql_query("update tbl_user set nama='{$nama}', alamat='{$alamat}', telepon='{$telepon}', email='{$email}', username='******' where username='******'"); } else { $d = mysql_query("update tbl_user set nama='{$nama}', alamat='{$alamat}', telepon='{$telepon}', email='{$email}', username='******', password='******' where username='******'"); } if ($d) { benar("./index.php?mod=home&opt=profil&opts=list"); $_SESSION["username"] == $username; exit; } else { salah("./index.php?mod=home&opt=profil&opts=list"); exit; }
'; </script> <?php } else { $d = mysql_query("update ref_kelurahan set kelurahan='{$nama}' where id_kelurahan='" . $_GET["id_prov"] . "'"); if ($d) { benar("./index.php?mod=home&opt=kel&opts=list"); } else { salah("./index.php?mod=home&opt=kel&opts=edit&id_wilayah=" . $_GET["id_prov"]); } } } else { failed(); } } else { if ((int) $_GET["mode"] == 3) { if ($_GET["id_prov"] != 0) { $d = mysql_query("delete from ref_kelurahan where id_kelurahan='" . $_GET["id_prov"] . "'"); if ($d) { benar("./index.php?mod=home&opt=kel&opts=list"); } else { salah("./index.php?mod=home&opt=kel&opts=list"); } } else { failed(); } } else { failed(); } } }
'; </script> <?php } else { $d = mysql_query("update ref_akses set id_submenu='{$nama}' where id_akses='" . (int) $_GET["id_akses"] . "'"); if ($d) { benar("./index.php?mod=home&opt=akses&opts=list"); } else { salah("./index.php?mod=home&opt=akses&opts=edit&id_akses=" . (int) $_GET["id_akses"]); } } } else { failed(); } } else { if ((int) $_GET["mode"] == 3) { if ((int) $_GET["id_akses"] != 0) { $d = mysql_query("delete from ref_akses where id_akses='" . (int) $_GET["id_akses"] . "'"); if ($d) { benar("./index.php?mod=home&opt=akses&opts=list"); } else { salah("./index.php?mod=home&opt=akses&opts=list"); } } else { failed(); } } else { failed(); } } }
'; </script> <?php } else { $d = mysql_query("update tbl_jurusan set nama='{$nama}' where id_jurusan='" . (int) $_GET["id_jurusan"] . "'"); if ($d) { benar("./index.php?mod=home&opt=jurusan&opts=list"); } else { salah("./index.php?mod=home&opt=jurusan&opts=edit&id_jurusan=" . (int) $_GET["id_jurusan"]); } } } else { failed(); } } else { if ((int) $_GET["mode"] == 3) { if ((int) $_GET["id_jurusan"] != 0) { $d = mysql_query("delete from tbl_jurusan where id_jurusan='" . (int) $_GET["id_jurusan"] . "'"); if ($d) { benar("./index.php?mod=home&opt=jurusan&opts=list"); } else { salah("./index.php?mod=home&opt=jurusan&opts=list"); } } else { failed(); } } else { failed(); } } }
'; </script> <?php } else { $d = mysql_query("update tbl_bungkus set nama='{$nama}' where id_bungkus='" . (int) $_GET["id_bungkus"] . "'"); if ($d) { benar("./index.php?mod=home&opt=bungkus&opts=list"); } else { salah("./index.php?mod=home&opt=bungkus&opts=edit&id_bungkus=" . (int) $_GET["id_bungkus"]); } } } else { failed(); } } else { if ((int) $_GET["mode"] == 3) { if ((int) $_GET["id_bungkus"] != 0) { $d = mysql_query("delete from tbl_bungkus where id_bungkus='" . (int) $_GET["id_bungkus"] . "'"); if ($d) { benar("./index.php?mod=home&opt=bungkus&opts=list"); } else { salah("./index.php?mod=home&opt=bungkus&opts=list"); } } else { failed(); } } else { failed(); } } }
} if ($nama_pemohon == '' or $alamat_pemohon == '' or $nama_lembaga == '' or $id_per == '' or $no_akte == '' or $nama_penanggung_jawab == '' or $bentuk_usaha == '' or $sumber_siswa == '' or $sumber_biaya == '' or $sifat == '') { $tes = '1' . $nama_pemohon . '2' . $alamat_pemohon . '3' . $nama_lembaga . '4' . $id_per . '5' . $no_akte . '6' . $nama_penanggung_jawab . '7' . $bentuk_usaha . '8' . $sumber_siswa . '9' . $sumber_biaya . '10' . $sifat; ?> <script type="text/javascript"> alert('<?php echo $tes; ?> '); document.location.href='./index.php?mod=loket&opt=proses_permohonan&opts=edit_iplk&no_resi=<?php echo $no_resi; ?> '; </script> <?php } $qryupdate = "update tbl_berkas_iplk set nama_pemohon='{$nama_pemohon}',alamat_pemohon='{$alamat_pemohon}',no_hp='{$no_hp}',nama_lembaga='{$nama_lembaga}',no_akte='{$no_akte}',nama_penanggung_jawab='{$nama_penanggung_jawab}',bentuk_usaha='{$bentuk_usaha}',sumber_biaya='{$sumber_biaya}',sumber_siswa='{$sumber_siswa}',sifat='{$sifat}' where no_resi='{$no_resi}'"; $qupdate = "update tbl_info_berkas set pemohon='{$nama_pemohon}',alamat_pemohon='{$alamat_pemohon}',id_proses_skrg='11',id_proses_sblm='12',isDisposisi='3' where no_resi='{$no_resi}'"; $e = mysql_query($qupdate); $d = mysql_query($qryupdate); if ($d) { benar("./index.php?mod=loket&opt=proses_permohonan&opts=main_iplk&no_resi=" . $no_resi); exit; } else { salah("./index.php?mod=loket&opt=proses_permohonan&opts=edit_iplk&no_resi=" . $no_resi); exit; } } else { failed(); } }
$d = mysql_query("update tbl_user set nama='{$nama}', alamat='{$alamat}', telepon='{$telepon}', email='{$email}', username='******', password='******', izin='{$izin}', level='{$level}' where id_user='******'"); } if ($d) { benar("./index.php?mod=home&opt=member&opts=list"); if ($_GET["username"] == $_SESSION["username"]) { $_SESSION["username"] == $username; } } else { salah("./index.php?mod=home&opt=member&opts=edit&id_user="******"id_user"]); } } } else { failed(); } } else { if ((int) $_GET["mode"] == 3) { if ((int) $_GET["id_user"] != 0) { $d = mysql_query("delete from tbl_user where id_user='******'"); if ($d) { benar("./index.php?mod=home&opt=member&opts=list"); } else { salah("./index.php?mod=home&opt=member&opts=list"); } } else { failed(); } } else { failed(); } } }
<?php $nama = anti_injection($_POST["nama"]); $nip = anti_injection($_POST["nip"]); $jabatan = anti_injection($_POST["jabatan"]); $pangkat = anti_injection($_POST["pangkat"]); if ($nama == '' and $nip == '') { ?> <script type="text/javascript"> alert('nama dan nip tidak boleh kosong'); document.location.href='./index.php?mod=home&opt=ttd&opts=list'; </script> <?php exit; } $d = mysql_query("update tbl_ttd set nama='{$nama}', nip='{$nip}', jabatan='{$jabatan}', pangkat='{$pangkat}'"); if ($d) { benar("./index.php?mod=home&opt=ttd&opts=list"); exit; } else { salah("./index.php?mod=home&opt=ttd&opts=list"); exit; }
'; </script> <?php } else { $d = mysql_query("update tbl_siup set no_sk='{$surat}',tgl_sk='{$tgl1}',masa_berlaku='{$tgl2}',nama_perusahaan='{$perusahaan}',\n\t\t\t\t\t\t\t pemilik='{$pemilik}',alamat='{$alamat}',id_provinsi='{$provinsi}',id_kabupaten='{$kabupaten}',\n\t\t\t\t\t\t\t npwp='{$npwp}',modal='{$modal}',bidang='{$bidang}',kelembagaan='{$kelembagaan}',alamat_pemilik='{$alamat_pemilik}',\n\t\t\t\t\t\t\t id_kecamatan='{$kecamatan}',kecamatan_lain='{$kecamatan_lain}',\n\t\t\t\t\t\t\t id_kelurahan='{$kelurahan}',kelurahan_lain='{$kelurahan_lain}',\n\t\t\t\t\t\t\t id_kotak='{$id_kotak}',id_bungkus='{$id_bungkus}',id_jenis='{$jenis}',kegiatan='{$kegiatan}' \n\t\t\t\t\t\t\t where id_siup='" . $_GET["id_siup"] . "'"); if ($d) { benar("./index.php?mod=home&opt=siup&opts=list"); } else { salah("./index.php?mod=home&opt=siup&opts=edit&id_siup=" . $_GET["id_siup"]); } } } else { failed(); } } else { if ((int) $_GET["mode"] == 3) { if ((int) $_GET["id_siup"] != 0) { $d = mysql_query("delete from tbl_siup where id_siup='" . $_GET["id_siup"] . "'"); if ($d) { benar("./index.php?mod=home&opt=siup&opts=list"); } else { salah("./index.php?mod=home&opt=siup&opts=list"); } } else { failed(); } } else { failed(); } } }