本文整理汇总了PHP中something_wrong函数的典型用法代码示例。如果您正苦于以下问题:PHP something_wrong函数的具体用法?PHP something_wrong怎么用?PHP something_wrong使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了something_wrong函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: success
echo "\n <script type='text/javascript'>\n window.parent.window.something_wrong(\"" . $what_is_wrong . "\");\n </script>\n ";
}
function success()
{
echo "\n <script type='text/javascript'>\n window.parent.window.success();\n </script>\n ";
}
// SIMPAN DATANYA
$obj = new RiwayatSatyaLancana_Model();
$obj->id_pegawai = $_POST["id_pegawai"];
$obj->no_sk = $_POST["no_sk"];
$obj->tgl_sk = $_POST["tgl_sk"];
$obj->nama_pejabat_ttd_sk = $_POST["nama_pejabat_ttd_sk"];
$obj->nip_pejabat_ttd_sk = $_POST["nip_pejabat_ttd_sk"];
$obj->jabatan_pejabat_ttd_sk = $_POST["jabatan_pejabat_ttd_sk"];
$obj->id_pangkat_pejabat_ttd_sk = $_POST["id_pangkat_pejabat_ttd_sk"];
$obj->no_piagam = $_POST["no_piagam"];
$obj->tgl_piagam = $_POST["tgl_piagam"];
$obj->nama_presiden = $_POST["nama_presiden"];
$obj->jenis_satya = $_POST["jenis_satya"];
$obj->scan_sk = $_POST["scan_sk"];
$val_res = $obj->Validation();
if ($val_res != "") {
something_wrong($val_res);
} else {
$obj->Insert();
// UBAH STATUS JADI 3 DI DETAIL USULAN GAJI BERKALA
$sql_edit = "UPDATE tbl_usulan_satya_lancana_detail SET status='3' WHERE id_detail_satya_lencana='" . $_POST["id_detail_satya_lancana"] . "'";
mysql_query($sql_edit);
success();
}
//echo("Data usulan telah disimpan");
开发者ID:suryamanik15,项目名称:sistem_2014,代码行数:31,代码来源:sl_daftar_sk_diproses_lanjut.php
示例2: something_wrong
<?php
include "../koneksi.php";
include "../fungsi.php";
// notification process function
function something_wrong($what_is_wrong)
{
echo "\n <script type='text/javascript'>\n window.parent.window.something_wrong(\"" . $what_is_wrong . "\");\n </script>\n ";
}
function success()
{
echo "\n <script type='text/javascript'>\n window.parent.window.success();\n </script>\n ";
}
// all the variables
$id_data = get_maks_id_sk_pangkat();
$no_sk = mysql_real_escape_string($_POST['no_sk']);
$tgl_sk = mysql_real_escape_string($_POST['tgl_sk']);
$nama_ttd = mysql_real_escape_string($_POST['nama_ttd_sk']);
$nip_ttd = mysql_real_escape_string($_POST['nip_ttd_sk']);
$jabatan_ttd = mysql_real_escape_string($_POST['jabatan_ttd_sk']);
$id_pangkat_ttd = mysql_real_escape_string($_POST['id_pangkat_ttd_sk']);
$status = 1;
// insert query
$sql = "INSERT INTO tbl_sk_kenpang VALUES('{$id_data}', '{$no_sk}', '{$tgl_sk}', '{$jabatan_ttd}', '{$nama_ttd}', '{$nip_ttd}', '{$id_pangkat_ttd}', \n\t\t\t'-', '-', '{$status}')";
$q = mysql_query($sql);
if ($q) {
success();
} else {
something_wrong("Maaf data gagal disimpan !!");
}
开发者ID:suryamanik15,项目名称:sistem_2014,代码行数:30,代码来源:daftar_sk_tambah.php
示例3: something_wrong
<?php
include "../koneksi.php";
include "../fungsi.php";
// notification process function
function something_wrong($what_is_wrong)
{
echo "\n <script type='text/javascript'>\n window.parent.window.something_wrong(\"" . $what_is_wrong . "\");\n </script>\n ";
}
function success()
{
echo "\n <script type='text/javascript'>\n window.parent.window.success();\n </script>\n ";
}
// all the variables
$id_data = mysql_real_escape_string($_POST['id_sk']);
$no_sk = mysql_real_escape_string($_POST['no_sk']);
$tgl_sk = mysql_real_escape_string($_POST['tgl_sk']);
$nama_ttd = mysql_real_escape_string($_POST['nama_ttd_sk']);
$nip_ttd = mysql_real_escape_string($_POST['nip_ttd_sk']);
$jabatan_ttd = mysql_real_escape_string($_POST['jabatan_ttd_sk']);
$id_pangkat_ttd = mysql_real_escape_string($_POST['id_pangkat_ttd_sk']);
$status = 1;
// insert query
$sql = "UPDATE tbl_sk_kenpang SET no_sk = '{$no_sk}', tgl_sk = '{$tgl_sk}', jabatan_ttd_sk = '{$jabatan_ttd}', nama_ttd_sk = '{$nama_ttd}',\n\t\t\tnip_ttd_sk = '{$nip_ttd}', id_pangkat_ttd_sk = '{$id_pangkat_ttd}' WHERE id_data = '{$id_data}'";
$q = mysql_query($sql);
if ($q) {
success();
} else {
something_wrong("Maaf, update data SK usulan kenaikan data gagal diubah !!");
}
mysql_close();
开发者ID:suryamanik15,项目名称:sistem_2014,代码行数:31,代码来源:kenpang_daftar_sk_edit.php
示例4: debug
}
function debug($what_is_wrong)
{
echo "\n <script type='text/javascript'>\n window.parent.window.debug(\"" . $what_is_wrong . "\");\n </script>\n ";
}
function success()
{
echo "\n <script type='text/javascript'>\n window.parent.window.success_upload();\n </script>\n ";
}
$scan_sk = $_FILES["scan_sk"];
$id_surat = $_POST["id_surat"];
if ($scan_sk["tmp_name"] == "") {
something_wrong("Pilih file yang akan diupload");
} else {
if (strtolower(ekstensi($scan_sk["name"])) != "pdf") {
something_wrong("Maaf, file yang diupload harus berformat PDF");
} else {
$path = "../../sk_uploaded/cuti/";
$nama_file_baru = "sk_cuti_" . $id_surat . ".pdf";
move_uploaded_file($scan_sk["tmp_name"], $path . $nama_file_baru);
//echo($scan_sk["tmp_name"] . "<br />");
//echo($path . $nama_file_baru . "<br />");
// EDIT DATA SCAN SK PADA TABLE SK DAN RIWAYAT CUTI
$sql_edit_1 = "UPDATE tbl_sk_cuti SET scan_sk='" . $nama_file_baru . "' WHERE id_surat='" . $id_surat . "'";
$sql_edit_2 = "UPDATE tbl_riwayat_cuti SET scan_sk='" . $nama_file_baru . "' WHERE id_surat='" . $id_surat . "'";
mysql_query($sql_edit_1);
mysql_query($sql_edit_2);
//echo($sql_edit_1 . "<br />" . $sql_edit_2);
success();
}
}
开发者ID:suryamanik15,项目名称:sistem_2014,代码行数:31,代码来源:cuti_sk_scan_sk.php
示例5: something_wrong
<?php
include "../koneksi.php";
include "../fungsi.php";
function something_wrong($what_is_wrong)
{
echo "\n <script type='text/javascript'>\n alert(\"" . $pesan . "\", 'HAPUS GAGAL');\n\t\t\t\tdocument.location.href='../../?mod=cuti_daftar_usulan';\n </script>\n ";
}
function success($pesan)
{
echo "\n <script type='text/javascript'>\n alert(\"" . $pesan . "\", 'KONFIRMASI');\n\t\t\t\tdocument.location.href='../../?mod=cuti_daftar_usulan';\n </script>\n ";
}
$id_usulan = $_GET['id_usulan'];
$no_usul = getNoUsulFromUsulanCuti($id_usulan);
$sql = "DELETE FROM tbl_usulan_cuti WHERE no_usulan = '" . $no_usul . "'";
$query = mysql_query($sql);
if ($query) {
$pesan = "Data dengan no usulan " . $no_usul . " telah dihapus";
success($pesan);
} else {
$pesan = "Maaf, terjadi kesalahan, data gagal dihapus !!";
something_wrong($pesan);
}
mysql_close();
开发者ID:suryamanik15,项目名称:sistem_2014,代码行数:24,代码来源:cuti_daftar_usulan_hapus.php
示例6: session_start
<?php
session_start();
include "../koneksi.php";
include "../fungsi.php";
function something_wrong($what_is_wrong)
{
echo "\n <script type='text/javascript'>\n window.parent.window.something_wrong(\"" . $what_is_wrong . "\");\n </script>\n ";
}
function success()
{
echo "\n <script type='text/javascript'>\n window.parent.window.success();\n </script>\n ";
}
if ($_POST["id_jenis_cuti"] != "0" && $_POST["lama"] != "" && $_POST["dari"] != "") {
$id_riwayat_cuti = $_POST["id_riwayat_cuti"];
$id_jenis_cuti = $_POST["id_jenis_cuti"];
$lama = $_POST["lama"];
$dari = $_POST["dari"];
$sampai = $_POST["sampai"];
$keterangan = $_POST["keterangan"];
mysql_query("UPDATE tbl_riwayat_cuti SET id_jenis_cuti='" . $id_jenis_cuti . "', lama='" . $lama . "', dari='" . $dari . "', sampai='" . $sampai . "', keterangan='" . $keterangan . "' WHERE id_riwayat_cuti='" . $id_riwayat_cuti . "'");
success();
} else {
something_wrong("Maaf, input anda belum lengkap");
}
开发者ID:suryamanik15,项目名称:sistem_2014,代码行数:25,代码来源:cuti_sk_daftar_pegawai_edit.php
示例7: getNoUsulFromUsulanCuti
// di cek apakah request dengan metode POST atau GET
if (isset($_POST['id_usulan']) && isset($_POST['no_usulan']) && isset($_POST['catatan'])) {
$id_usulan = $_POST['id_usulan'];
$no_usul = $_POST['no_usulan'];
$catatan = $_POST['catatan'];
} else {
if (isset($_GET['id_usulan'])) {
$id_usulan = $_GET['id_usulan'];
$no_usul = getNoUsulFromUsulanCuti($id_usulan);
}
}
$sql = "";
if ($mode == 1) {
$sql = "UPDATE tbl_usulan_cuti SET diproses = '1' WHERE no_usulan = '" . $no_usul . "' AND diproses = '0'";
$query = mysql_query($sql);
if ($query) {
success("Usulan Izin Cuti dengan No Usul. " . $no_usul . " telah diterima (ACC)");
} else {
something_wrong("Terjadi kesalahan, proses ACC gagal !!");
}
mysql_close();
} else {
$sql = "UPDATE tbl_usulan_cuti SET diproses = '2', catatan_penolakan = '{$catatan}' WHERE no_usulan = '" . $no_usul . "' AND diproses = '0'";
$query = mysql_query($sql);
if ($query) {
success("Usulan Izin Cuti dengan No Usul. " . $no_usul . " ditolak");
} else {
something_wrong("Terjadi kesalahan, proses gagal !!");
}
mysql_close();
}
开发者ID:suryamanik15,项目名称:sistem_2014,代码行数:31,代码来源:konfirmasi_usulan_cuti.php
示例8: move_uploaded_file
// copy kan dulu file yang diupload nya kedalam folder jika filenya sudah PDF
$path = "../../sk_uploaded/bpjs/";
$nama_file_baru = "bpjs_" . $id_pegawai . ".pdf";
move_uploaded_file($scan_bpjs["tmp_name"], $path . $nama_file_baru);
$sql_insert = "INSERT INTO tbl_bpjs(id_pegawai, no_bpjs, scan_bpjs) VALUES('" . $id_pegawai . "', '" . $no_bpjs . "', '" . $nama_file_baru . "')";
mysql_query($sql_insert);
success();
}
}
} else {
// Berarti sudah pernah diisi dan ingin diedit
if ($scan_bpjs["tmp_name"] == "") {
$sql_edit = "UPDATE tbl_bpjs SET no_bpjs='" . $no_bpjs . "' WHERE id_pegawai='" . $id_pegawai . "'";
mysql_query($sql_edit);
success();
} else {
// cek filenya. Harus PDF
if (strtolower(ekstensi($scan_bpjs["name"])) != "pdf") {
something_wrong("File yang diupload harus PDF");
} else {
// copy kan dulu file yang diupload nya kedalam folder jika filenya sudah PDF
$path = "../../sk_uploaded/bpjs/";
$nama_file_baru = "bpjs_" . $id_pegawai . ".pdf";
move_uploaded_file($scan_bpjs["tmp_name"], $path . $nama_file_baru);
$sql_edit = "UPDATE tbl_bpjs SET no_bpjs='" . $no_bpjs . "', scan_bpjs='" . $nama_file_baru . "' WHERE id_pegawai='" . $id_pegawai . "'";
mysql_query($sql_edit);
success();
}
}
}
}
开发者ID:suryamanik15,项目名称:sistem_2014,代码行数:31,代码来源:bpjs_proses.php
示例9: session_start
<?php
session_start();
include "../koneksi.php";
include "../fungsi.php";
// notification process function
function something_wrong($what_is_wrong)
{
echo "\n <script type='text/javascript'>\n window.parent.window.something_wrong(\"" . $what_is_wrong . "\");\n </script>\n ";
}
function success($pesan_sukses)
{
echo "\n <script type='text/javascript'>\n window.parent.window.sukses(\"" . $pesan_sukses . "\");\n </script>\n ";
}
$id_surat = mysql_real_escape_string($_GET['id_sk']);
$sql = "DELETE FROM tbl_sk_pmk WHERE id_surat = '" . $id_surat . "'";
$query = mysql_query($sql);
if ($query) {
$pesan = "Data SK PMK dengan ID " . $id_usul . " telah dihapus ";
success($pesan);
} else {
something_wrong("QUERY ERROR, proses delete data SK PMK gagal !! ");
}
mysql_close();
开发者ID:suryamanik15,项目名称:sistem_2014,代码行数:24,代码来源:pmk_daftar_sk_hapus.php
示例10: something_wrong
<?php
include "../koneksi.php";
include "../fungsi.php";
include "../mysqli_connect.php";
// notification process function
function something_wrong($what_is_wrong)
{
echo "\n <script type='text/javascript'>\n window.parent.window.something_wrong(\"" . $what_is_wrong . "\");\n </script>\n ";
}
function success($pesan)
{
echo "\n <script type='text/javascript'>\n window.parent.window.sukses(\"" . $pesan . "\");\n </script>\n ";
}
$id_surat = $_GET['id_sk'];
$sql = "DELETE FROM tbl_sk_pmk WHERE id_surat = ? ";
$stm = $con->prepare($sql);
$stm->bind_param('i', $id_surat);
$query = $stm->execute();
if ($query) {
success("Data SK PMK dengan ID " . $id_surat . " telah dihapus");
} else {
something_wrong("Delete Data Gagal, Error Query !!");
}
$stm->close();
开发者ID:suryamanik15,项目名称:sistem_2014,代码行数:25,代码来源:hapus_sk_pmk.php
示例11: something_wrong
function something_wrong($what_is_wrong)
{
echo "\n <script type='text/javascript'>\n window.parent.window.something_wrong(\"" . $what_is_wrong . "\");\n </script>\n ";
}
function success()
{
echo "\n <script type='text/javascript'>\n window.parent.window.success();\n </script>\n ";
}
$id_pegawai = $_POST["id_pegawai"];
$tgl_lapor = $_POST["tgl_lapor"];
$jenis_form = $_POST["jenis_form"];
$no_nhk = $_POST["no_nhk"];
if ($id_pegawai == 0) {
something_wrong("Maaf, pegawai dengan NIP " . $_POST["nip"] . " tidak ditemukan");
} else {
if ($tgl_lapor == "") {
something_wrong("Maaf, Tanggal Lapor harus diisi");
} else {
// Cari profil pangkat, jabatan, dan SKPD nya
$sql_profil = "SELECT id_pangkat, id_jabatan, id_satuan_organisasi FROM tbl_pegawai WHERE id_pegawai = '" . $id_pegawai . "'";
$res_profil = mysql_query($sql_profil);
$ds_profil = mysql_fetch_array($res_profil);
$id_pangkat = $ds_profil["id_pangkat"];
$id_skpd = $ds_profil["id_satuan_organisasi"];
$id_jabatan = $ds_profil["id_jabatan"];
// Simpan datanya
$sql_insert = "INSERT INTO tbl_lhkpn(id_pegawai, id_pangkat, id_skpd, id_jabatan, tgl_lapor, jenis_form, no_nhk)\n VALUES('" . $id_pegawai . "', '" . $id_pangkat . "', '" . $id_skpd . "', '" . $id_jabatan . "', '" . $tgl_lapor . "', '" . $jenis_form . "', '" . $no_nhk . "')";
mysql_query($sql_insert);
success();
}
}
开发者ID:suryamanik15,项目名称:sistem_2014,代码行数:31,代码来源:lhkpn_proses_tambah.php
示例12: session_start
<?php
session_start();
include "../koneksi.php";
include "../fungsi.php";
function something_wrong($what_is_wrong)
{
echo "\n <script type='text/javascript'>\n window.parent.window.something_wrong(\"" . $what_is_wrong . "\");\n </script>\n ";
}
function success()
{
echo "\n <script type='text/javascript'>\n window.parent.window.success();\n </script>\n ";
}
$id_pegawai = $_POST["id_pegawai"];
$tgl_lapor = $_POST["tgl_lapor"];
if ($tgl_lapor == "") {
something_wrong("Maaf, tanggal lapor harus diisi");
} else {
// Hapus data bapertarum sebelumnya
mysql_query("DELETE FROM tbl_bapertarum WHERE id_pegawai='" . $_POST["id_pegawai"] . "'");
// Simpan data yang baru
mysql_query("INSERT INTO tbl_bapertarum(id_pegawai, tgl_lapor) VALUES('" . $id_pegawai . "', '" . $tgl_lapor . "')");
success();
}
开发者ID:suryamanik15,项目名称:sistem_2014,代码行数:24,代码来源:bapertarum_proses.php
示例13: session_start
<?php
session_start();
include "../koneksi.php";
include "../fungsi.php";
$id_usulan = mysql_real_escape_string($_POST['id_usulan']);
$no_usulan = getNoUsul("tbl_usulan_pangkat", $id_usulan);
// notification process function
/* function something_wrong($what_is_wrong){
echo("
<script type='text/javascript'>
window.parent.window.something_wrong(\"" . $what_is_wrong . "\");
</script>
");
}
function success($pesan){
echo("
<script type='text/javascript'>
window.parent.window.sukses_konfirmasi(\"" . $pesan. "\");
</script>
");
}*/
$sql = "UPDATE tbl_usulan_pangkat SET status_proses = '3' WHERE no_usulan = '{$no_usulan}'";
$query = mysql_query($sql);
if ($query) {
header("Location:../../?mod=daftar_usulan_kpk_sedang_diproses");
} else {
$err = "QUERY ERROR, proses ACC BKD gagal !!";
something_wrong($err);
}
开发者ID:suryamanik15,项目名称:sistem_2014,代码行数:30,代码来源:konfirmasi_usulan_pangkat.php
示例14: session_start
<?php
session_start();
include "../koneksi.php";
include "../fungsi.php";
function something_wrong($what_is_wrong)
{
echo "\n <script type='text/javascript'>\n window.parent.window.something_wrong(\"" . $what_is_wrong . "\");\n </script>\n ";
}
function success()
{
echo "\n <script type='text/javascript'>\n window.parent.window.success();\n </script>\n ";
}
// CARI. APAKAH NOMOR USULAN YANG DIMASUKKAN UDAH ADA
$ds_udah_ada = mysql_fetch_array(mysql_query("SELECT COUNT(*) AS jumlah FROM tbl_usulan_cuti WHERE no_usulan = '" . $_GET["no_usulan"] . "'"));
if ($ds_udah_ada["jumlah"] == 0) {
// AMBIL DAFTAR USULAN SKPD YANG BERSANGKUTAN
$sql_list_pegawai = "SELECT\n \te.id_usulan\n FROM\n \ttbl_pegawai a\n \tLEFT JOIN ref_pangkat b ON a.id_pangkat = b.id_pangkat\n \tLEFT JOIN ref_jabatan c ON a.id_jabatan = c.id_jabatan\n \tLEFT JOIN ref_skpd d ON a.id_satuan_organisasi = d.id_skpd\n \tLEFT JOIN tbl_usulan_cuti e ON (a.id_pegawai = e.id_pegawai AND e.no_usulan IS NULL)\n WHERE\n \td.kode_skpd LIKE '" . $_SESSION["simpeg_kode_skpd"] . "%' AND e.id_pegawai IS NOT NULL\n ORDER BY\n \t\ta.nama_pegawai ASC";
$res_list_pegawai = mysql_query($sql_list_pegawai);
while ($ds_list_pegawai = mysql_fetch_array($res_list_pegawai)) {
$id_usulan = $ds_list_pegawai["id_usulan"];
mysql_query("UPDATE tbl_usulan_cuti SET no_usulan='" . $_GET["no_usulan"] . "', tgl_usulan='" . $_GET["tgl_usulan"] . "', pejabat_usulan='" . $_GET["pejabat_usulan"] . "', diproses=4 WHERE id_usulan='" . $id_usulan . "'");
}
success();
} else {
something_wrong("Maaf, nomor usulan <b>" . $_GET["no_usulan"] . "</b> sudah ada");
}
//header("location:../../?mod=cuti_daftar_usulan");
开发者ID:suryamanik15,项目名称:sistem_2014,代码行数:28,代码来源:cuti_daftar_usulan_tambah.php
示例15: session_start
<?php
session_start();
include "../koneksi.php";
include "../fungsi.php";
require_once "../model/usulan_pg_model.php";
function something_wrong($what_is_wrong)
{
echo "\n <script type='text/javascript'>\n window.parent.window.something_wrong(\"" . $what_is_wrong . "\");\n </script>\n ";
}
function success()
{
echo "\n <script type='text/javascript'>\n window.parent.window.success();\n </script>\n ";
}
$obj = new UsulanPG_Model();
$obj->Record($_POST["id_usulan"]);
$obj->no_usulan = $_POST["no_usulan"];
$obj->tgl_usulan = $_POST["tgl_usulan"];
$obj->jabatan_ttd_usulan = $_POST["jabatan_ttd_usulan"];
$obj->nama_ttd_usulan = $_POST["nama_ttd_usulan"];
$obj->nip_ttd_usulan = $_POST["nip_ttd_usulan"];
$obj->id_pangkat_ttd_usulan = $_POST["id_pangkat_ttd_usulan"];
$validation_result = $obj->Validation();
if ($validation_result == "") {
$obj->Update();
success();
} else {
something_wrong($validation_result);
}
//echo("Data usulan telah disimpan");
开发者ID:suryamanik15,项目名称:sistem_2014,代码行数:30,代码来源:pg_daftar_usulan_edit.php
示例16: success
{
echo "\n <script type='text/javascript'>\n window.parent.window.something_wrong(\"" . $what_is_wrong . "\");\n </script>\n ";
}
function success()
{
echo "\n <script type='text/javascript'>\n window.parent.window.success();\n </script>\n ";
}
//$id_pegawai = detail_pegawai_by_nip($_POST["nip"], "id_pegawai");
$kode_skpd = $_POST["kode_skpd_input"];
$jabatan_list = $_POST["jabatan_list"];
$tahun = $_POST["tahun_lhkpn"];
if ($jabatan_list == "") {
something_wrong("Maaf, pilih jabatan yang akan di simpan sebagai wajib LHKPN");
} else {
if ($tahun == "") {
something_wrong("Maaf, tahun harus diisi");
} else {
/* DISINI CODING LAMA
// Cari profil pangkat, jabatan, dan SKPD nya
$sql_profil = "SELECT id_pangkat, id_jabatan, id_satuan_organisasi FROM tbl_pegawai WHERE id_pegawai = '" . $id_pegawai . "'";
$res_profil = mysql_query($sql_profil);
$ds_profil = mysql_fetch_array($res_profil);
$id_pangkat = $ds_profil["id_pangkat"];
$id_skpd = $ds_profil["id_satuan_organisasi"];
$id_jabatan = $ds_profil["id_jabatan"];
// Simpan datanya
$sql_insert = "INSERT INTO tbl_lhkpn_wajib(id_pegawai, id_pangkat, id_skpd, id_jabatan, tahun)
VALUES('" . $id_pegawai . "', '" . $id_pangkat . "', '" . $id_skpd . "', '" . $id_jabatan . "', '" . $tahun . "')";
mysql_query($sql_insert);*/
开发者ID:suryamanik15,项目名称:sistem_2014,代码行数:31,代码来源:lhkpn_push_wajib.php
示例17: session_start
<?php
session_start();
include "../koneksi.php";
include "../fungsi.php";
// notification process function
function something_wrong($what_is_wrong)
{
echo "\n <script type='text/javascript'>\n window.parent.window.something_wrong(\"" . $what_is_wrong . "\");\n </script>\n ";
}
function success($pesan_sukses)
{
echo "\n <script type='text/javascript'>\n window.parent.window.sukses_hapus(\"" . $pesan_sukses . "\");\n </script>\n ";
}
$id_usul = mysql_real_escape_string($_GET['id_usulan']);
$sql = "DELETE FROM tbl_usulan_pangkat WHERE id_usulan = '" . $id_usul . "'";
$query = mysql_query($sql);
if ($query) {
$pesan = "Data usulan kenaikan pangkat dengan ID " . $id_usul . " telah dihapus ";
success($pesan);
} else {
something_wrong("QUERY ERROR, proses delete data usulan kenaikan pangkat gagal !! ");
}
开发者ID:suryamanik15,项目名称:sistem_2014,代码行数:23,代码来源:hapus_usulan_pangkat.php
示例18: session_start
<?php
session_start();
include "../koneksi.php";
include "../fungsi.php";
// notification process function
function something_wrong($pesan)
{
echo "\n <script type='text/javascript'>\n alert(\"" . $pesan . "\");\n\t\t\t\tdocument.location.href='../../?mod=daftar_kpk'\n </script>\n ";
}
function success($pesan)
{
echo "\n <script type='text/javascript'>\n alert(\"" . $pesan . "\");\n\t\t\t\tdocument.location.href='../../?mod=daftar_kpk'\n </script>\n ";
}
// all variables
$no_usul = mysql_real_escape_string($_POST['no_usulan']);
$tgl_usulan = mysql_real_escape_string($_POST['tgl_usulan']);
$pejabat_ttd = mysql_real_escape_string($_POST['nama_pejabat_ttd']);
$nip_ttd = mysql_real_escape_string($_POST['nip_pejabat_ttd']);
$jabatan = mysql_real_escape_string($_POST['jabatan_ttd']);
$id_usul = get_maks_id_pangkat();
$id_pangkat_ttd = $_POST['id_pangkat_ttd'];
// status proses
$status = 1;
$sql = "INSERT INTO tbl_usulan_pangkat VALUES('{$id_usul}', '{$no_usul}', '{$tgl_usulan}', '{$pejabat_ttd}', '{$nip_ttd}', '{$jabatan}', \n\t\t\t'{$id_pangkat_ttd}', '{$status}', '')";
$query = mysql_query($sql) or die(mysql_error());
if ($query) {
success("Tambah Data Usulan Kenaikan Pangkat Sukses !!");
} else {
something_wrong("Maaf, insert data surat usulan kenaikan pangkat gagal !!");
}
开发者ID:suryamanik15,项目名称:sistem_2014,代码行数:31,代码来源:usulan_pangkat_tambah.php
示例19: session_start
session_start();
include "../koneksi.php";
include "../fungsi.php";
function something_wrong($what_is_wrong)
{
echo "\n <script type='text/javascript'>\n window.parent.window.something_wrong(\"" . $what_is_wrong . "\");\n </script>\n ";
}
function success()
{
echo "\n <script type='text/javascript'>\n window.parent.window.success();\n </script>\n ";
}
$ctr = 0;
$id_sk = $_POST["id_usulan"];
$sql_daftar = "SELECT * FROM tbl_usulan_satya_lancana_detail WHERE status = 1";
$res_daftar = mysql_query($sql_daftar);
while ($ds_daftar = mysql_fetch_array($res_daftar)) {
// jika dia diceklist
if (isset($_POST["chk_" . $ds_daftar["id_detail_satya_lencana"]])) {
$ctr++;
// editlah datanya sesuai dengan kebutuhan
$id_detail_satya_lencana = $ds_daftar["id_detail_satya_lencana"];
$sql_edit = "UPDATE tbl_usulan_satya_lancana_detail SET id_sk='" . $id_sk . "', status='2' WHERE id_detail_satya_lencana='" . $id_detail_satya_lencana . "'";
mysql_query($sql_edit);
}
}
if ($ctr == 0) {
something_wrong("Tidak data usulan yang dipilih");
} else {
success();
}
//echo("Data usulan telah disimpan");
开发者ID:suryamanik15,项目名称:sistem_2014,代码行数:31,代码来源:sl_daftar_sk_diusulkan_push.php
示例20: mysql_real_escape_string
// all POST data
$no_usul = mysql_real_escape_string($_POST['no_usul']);
$no_sk = mysql_real_escape_string($_POST['no_sk']);
// file info
$fname = $_FILES['scan_sk_kenpang']['name'];
$ftype = $_FILES['scan_sk_kenpang']['type'];
$des = $_FILES['scan_sk_kenpang']['tmp_name'];
// dir destination
$tujuan = "../../sk_uploaded/kepangkatan/" . $fname;
// cek validasi file
if ($ftype == "application/pdf" || $ftype == "application/msword" || $ftype == "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet") {
$pangkat_list = get_id_pangkat_baru($no_usul);
$ids = get_id_pegawai_baru($no_usul);
$sql = "";
$i = 0;
foreach ($pangkat_list as $pangkat) {
$sql .= "UPDATE tbl_pegawai SET id_pangkat = '" . $pangkat . "' WHERE id_pegawai = '" . $ids[$i] . "';";
$sql .= "UPDATE tbl_sk_kenpang SET scan_sk = '" . $fname . "' WHERE no_sk = '" . $no_sk . "';";
$i++;
}
// proses upload file
$upload = move_uploaded_file($des, $tujuan);
if ($upload) {
$query = $con->multi_query($sql);
success();
} else {
something_wrong("Maaf, proses upload dan update data gagal !!");
}
} else {
something_wrong("Tipe data file tidak valid !!");
}
开发者ID:suryamanik15,项目名称:sistem_2014,代码行数:31,代码来源:upload_sk_kenpang.php
注:本文中的something_wrong函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论