$ugbd = array();
$sql_ugbd = "SELECT\n                    \ta.*, b.id_pangkat\n                    FROM\n                    \ttbl_usulan_satya_lancana_detail a\n                    \tLEFT JOIN tbl_pegawai b ON a.id_pegawai = b.id_pegawai\n                    WHERE\n                    \tid_detail_satya_lencana='" . $_GET["id_detail_satya_lancana"] . "'";
$res_ugbd = mysql_query($sql_ugbd);
$ds_ugbd = mysql_fetch_array($res_ugbd);
$ugbd["id_detail_satya_lancana"] = $ds_ugbd["id_detail_satya_lencana"];
$ugbd["id_usulan"] = $ds_ugbd["id_usulan"];
$ugbd["id_sk"] = $ds_ugbd["id_sk"];
$ugbd["id_pegawai"] = $ds_ugbd["id_pegawai"];
$ugbd["status"] = $ds_ugbd["status"];
$ugbd["jenis_satya"] = $ds_ugbd["jenis_satya"];
$ugbd["id_pangkat"] = $ds_ugbd["id_pangkat"];
$ugbd["pangkat"] = apa_pangkat($ds_ugbd["id_pangkat"]);
echo "var ugbd = " . json_encode($ugbd) . ";\n";
// DATA : sk_satya_lancana
require_once "php/model/sk_satya_lancana_model.php";
$obj = new SKSatyaLancana_Model();
$obj->Record($ugbd["id_sk"]);
$sk["id_sk"] = $obj->id_usulan;
$sk["no_sk"] = $obj->no_usulan;
$sk["tgl_sk"] = $obj->tgl_usulan;
$sk["jabatan_ttd_sk"] = $obj->jabatan_ttd_usulan;
$sk["nama_ttd_sk"] = $obj->nama_ttd_usulan;
$sk["nip_ttd_sk"] = $obj->nip_ttd_usulan;
$sk["id_pangkat_ttd_sk"] = $obj->id_pangkat_ttd_usulan;
echo "var sk = " . json_encode($sk) . ";\n";
?>
</script>
<!-- END OF CONTROLLER -->

<!-- JAVASCRIPT PAGE -->
<script type="text/javascript">
<?php

session_start();
include "../koneksi.php";
include "../fungsi.php";
require_once "../model/sk_satya_lancana_model.php";
$obj = new SKSatyaLancana_Model();
$obj->Record($_GET["id_usulan"]);
$obj->Delete();
$sql = "UPDATE tbl_usulan_satya_lancana_detail SET id_sk=null, status='1' WHERE id_sk='" . $_GET["id_usulan"] . "'";
mysql_query($sql);
header("location:../../?mod=sl_daftar_sk");
//echo("Data usulan telah disimpan");
Ejemplo n.º 3
0
<!-- CONTROLLER -->
<script type="text/javascript">
<?php 
require_once "php/model/sk_satya_lancana_model.php";
$pangkat = array();
$sql_pangkat = "SELECT * FROM ref_pangkat";
$res_pangkat = mysql_query($sql_pangkat);
while ($ds_pangkat = mysql_fetch_array($res_pangkat)) {
    $row_pangkat["id_pangkat"] = $ds_pangkat["id_pangkat"];
    $row_pangkat["gol_ruang"] = $ds_pangkat["gol_ruang"];
    $row_pangkat["pangkat"] = $ds_pangkat["pangkat"];
    array_push($pangkat, $row_pangkat);
}
echo "var pangkat = " . json_encode($pangkat) . ";\n";
$obj = new SKSatyaLancana_Model();
$obj->Record($_GET["id_usulan"]);
$record["id_usulan"] = $obj->id_usulan;
$record["no_usulan"] = $obj->no_usulan;
$record["tgl_usulan"] = $obj->tgl_usulan;
$record["jabatan_ttd_usulan"] = $obj->jabatan_ttd_usulan;
$record["nama_ttd_usulan"] = $obj->nama_ttd_usulan;
$record["nip_ttd_usulan"] = $obj->nip_ttd_usulan;
$record["id_pangkat_ttd_usulan"] = $obj->id_pangkat_ttd_usulan;
echo "var record = " . json_encode($record) . ";\n";
?>
</script>
<!-- END OF CONTROLLER -->

<!-- JAVASCRIPT PAGE -->
<script type="text/javascript">
<?php

session_start();
include "../koneksi.php";
include "../fungsi.php";
require_once "../model/sk_satya_lancana_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 SKSatyaLancana_Model();
$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"];
$obj->status = 1;
$validation_result = $obj->Validation();
if ($validation_result == "") {
    $obj->Insert();
    success();
} else {
    something_wrong($validation_result);
}
//echo("Data usulan telah disimpan");
Ejemplo n.º 5
0
<?php

session_start();
include "../koneksi.php";
include "../fungsi.php";
require_once "../model/sk_satya_lancana_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 SKSatyaLancana_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");
Ejemplo n.º 6
0
<?php

ob_start();
session_start();
require_once "../../../php/dompdf_config.inc.php";
require_once "../../../php/koneksi.php";
require_once "../../../php/fungsi.php";
require_once "../../../php/model/sk_satya_lancana_model.php";
date_default_timezone_set("America/New_York");
/* CONTROLLER */
$sk = new SKSatyaLancana_Model();
$sk->Record($_GET["id_usulan"]);
$no_sk = $sk->no_usulan == "" ? "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;" : $sk->no_usulan;
$tgl_sk = $sk->tgl_usulan == "0000-00-00" ? "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;" : tglpjgindonesia($sk->tgl_usulan);
$daftar = array();
$sql_daftar = "SELECT\n                    \ta.id_pegawai, a.nama_pegawai, a.nip,\n                    \tCASE\n                    \t\tWHEN a.gelar_depan <> '' THEN CONCAT(a.gelar_depan, '. ')\n                    \t\tELSE ''\n                    \tEND AS gelar_depan,\n                    \tCASE\n                    \t\tWHEN a.gelar_belakang <> '' THEN CONCAT(', ', a.gelar_belakang)\n                    \t\tELSE ''\n                    \tEND AS gelar_belakang,\n                    \tb.status_kepegawaian, c.jenis_kepegawaian, d.kedudukan_kepegawaian,\n                    \te.jenis_kelamin, a.alamat, a.tanggal_lahir, f.skpd, g.pangkat, g.gol_ruang, h.jabatan,\n                    \ti.id_detail_satya_lencana, i.jenis_satya, i.status\n                    FROM\n                    \ttbl_pegawai a\n                    \tLEFT JOIN ref_status_kepegawaian b ON a.id_status_kepegawaian = b.id_status_kepegawaian\n                    \tLEFT JOIN ref_jenis_kepegawaian c ON a.id_jenis_kepegawaian = c.id_jenis_kepegawaian\n                    \tLEFT JOIN ref_kedudukan_kepegawaian d ON a.id_kedudukan_kepegawaian = d.id_kedudukan_kepegawaian\n                    \tLEFT JOIN ref_jenis_kelamin e ON a.id_jenis_kelamin = e.id_jenis_kelamin\n                    \tLEFT JOIN ref_skpd f ON a.id_satuan_organisasi = f.id_skpd\n                    \tLEFT JOIN ref_pangkat g ON a.id_pangkat = g.id_pangkat\n                    \tLEFT JOIN ref_jabatan h ON a.id_jabatan = h.id_jabatan\n                    \tINNER JOIN tbl_usulan_satya_lancana_detail i ON (a.id_pegawai = i.id_pegawai AND i.id_sk = '" . $_GET["id_usulan"] . "')\n                    ORDER BY\n                    \ti.id_detail_satya_lencana ASC";
$res_daftar = mysql_query($sql_daftar);
while ($ds_daftar = mysql_fetch_array($res_daftar)) {
    $row_daftar["nama_pegawai"] = $ds_daftar["nama_pegawai"];
    $row_daftar["gelar_depan"] = $ds_daftar["gelar_depan"];
    $row_daftar["gelar_belakang"] = $ds_daftar["gelar_belakang"];
    $row_daftar["nip"] = $ds_daftar["nip"];
    $row_daftar["pangkat"] = $ds_daftar["pangkat"];
    $row_daftar["gol_ruang"] = $ds_daftar["gol_ruang"];
    $row_daftar["jabatan"] = $ds_daftar["jabatan"];
    $row_daftar["jenis_satya"] = $ds_daftar["jenis_satya"];
    array_push($daftar, $row_daftar);
}
/* END OF CONTROLLER */
$html = "<div style='font-family: sans-serif; font-size: 9pt;'>";
$html .= "<div style='height: 1cm;'>&nbsp;</div>";