示例#1
0
><?php 
        echo $Unit->nama;
        ?>
</option><?php 
    }
    ?>
					</select>
				</td>
			</tr><?php 
}
?>
		<tr>
			<td class="key">Nama</td>
			<td>
				<div id="pegawai-view"><?php 
$oPegawai = pegawai_list($u, "nama");
$num = mysql_num_rows($oPegawai);
if ($num != 0) {
    ?>
						<select name="q">
							<option></option><?php 
    while ($Pegawai = mysql_fetch_object($oPegawai)) {
        ?>
								<option value="<?php 
        echo $Pegawai->nip;
        ?>
" <?php 
        if ($Pegawai->nip == $q) {
            echo "selected";
        }
        ?>
示例#2
0
文件: siapp.php 项目: abbeet/server39
function isi_absensi($kode_unit)
{
    $hari_ini = date("Y-m-d");
    $kekurangan = 0;
    $oImport = import("`" . $kode_unit . "` = '0'");
    while ($Import = mysql_fetch_array($oImport)) {
        if ($Import['date_from'] < $hari_ini) {
            $src = $Import['id'];
            $date_from = strtotime($Import['date_from']);
            $date_until = strtotime($Import['date_until']);
            for ($date = $date_from; $date <= $date_until; $date += 86400) {
                $tanggal = date("Y-m-d", $date);
                $y = substr($tanggal, 0, 4);
                $m = substr($tanggal, 0, 7);
                $oPegawai = pegawai_list($kode_unit, "", "1", "nip");
                while ($Pegawai = mysql_fetch_array($oPegawai)) {
                    $nip = $Pegawai['nip'];
                    $u = substr($Pegawai['kode_bidang'], 0, 2);
                    cek_rekapitulasi($nip, $m, $u);
                    $kode_jadwal_kerja = $Pegawai['jadwal_kerja'];
                    $oJadwalKerja = jadwal_kerja_id($kode_jadwal_kerja);
                    if (mysql_num_rows($oJadwalKerja) != 0) {
                        $oJadwalKerja2 = jadwal_kerja("date_from <= '" . $tanggal . "' AND date_until >= '" . $tanggal . "'");
                        $nJadwalKerja2 = mysql_num_rows($oJadwalKerja2);
                        if ($nJadwalKerja2 == 0) {
                            $JadwalKerja = mysql_fetch_array($oJadwalKerja);
                        } else {
                            $JadwalKerja = mysql_fetch_array($oJadwalKerja2);
                        }
                        $NamaHari = strtolower(nama_hari($tanggal));
                        $JamKerja = $JadwalKerja[$NamaHari];
                        $oLibur = libur("tanggal = '" . $tanggal . "'");
                        $nLibur = mysql_num_rows($oLibur);
                        $hari = strtolower(nama_hari($tanggal));
                        if ($nLibur == 0 and $hari != "sabtu" and $hari != "minggu") {
                            $oPresensi = presensi($u, "nip = '" . $nip . "' AND tanggal = '" . $tanggal . "'");
                            $num = mysql_num_rows($oPresensi);
                            if ($num == 0) {
                                if ($Pegawai['status'] == '01' or $Pegawai['status'] == '02') {
                                    $jam = "00:00:00";
                                    $status = "";
                                    $kode_alasan = "TK";
                                    $kekurangan = get_kekurangan($nip, $tanggal, $jam, $status, $kode_alasan);
                                    $tidak_hadir = 1;
                                    $tanpa_keterangan = 1;
                                    $TK = 1;
                                    $sql = "\r\n\t\t\t\t\t\t\t\t\t\t\tINSERT INTO presensi_" . $u . " (nip,tanggal,status,kekurangan,tidak_hadir,tanpa_keterangan,TK,\r\n\t\t\t\t\t\t\t\t\t\t\tjam_kerja,src,cek) \r\n\t\t\t\t\t\t\t\t\t\t\tVALUES ('" . $nip . "','" . $tanggal . "','" . $status . "','" . $kekurangan . "','" . $tidak_hadir . "',\r\n\t\t\t\t\t\t\t\t\t\t\t'" . $tanpa_keterangan . "','" . $TK . "','" . $JamKerja . "','" . $src . "','50')\r\n\t\t\t\t\t\t\t\t\t\t";
                                    $query = mysql_query($sql);
                                } else {
                                    if ($Pegawai['status'] == '06' or $Pegawai['status'] == '07') {
                                        $jam = "00:00:00";
                                        $status = "";
                                        $kode_alasan = "DPK/DPB";
                                        $kekurangan = get_kekurangan($nip, $tanggal, $jam, $status, $kode_alasan);
                                        $tidak_hadir = 1;
                                        $dpk_dpb = 1;
                                        $sql = "\r\n\t\t\t\t\t\t\t\t\t\t\tINSERT INTO presensi_" . $u . " (nip,tanggal,status,kekurangan,tidak_hadir,dpk_dpb,jam_kerja,src,cek) \r\n\t\t\t\t\t\t\t\t\t\t\tVALUES ('" . $nip . "','" . $tanggal . "','" . $status . "','" . $kekurangan . "','" . $tidak_hadir . "','" . $dpk_dpb . "',\r\n\t\t\t\t\t\t\t\t\t\t\t'" . $JamKerja . "','" . $src . "','51')\r\n\t\t\t\t\t\t\t\t\t\t";
                                        $query = mysql_query($sql);
                                    } else {
                                        if ($Pegawai['status'] == '16') {
                                            $jam = "00:00:00";
                                            $status = "";
                                            $kode_alasan = "TB";
                                            $kekurangan = get_kekurangan($nip, $tanggal, $jam, $status, $kode_alasan);
                                            $tidak_hadir = 1;
                                            $tugas_belajar = 1;
                                            $TBplus = 1;
                                            $sql = "\r\n\t\t\t\t\t\t\t\t\t\t\tINSERT INTO presensi_" . $u . " (nip,tanggal,status,kekurangan,tidak_hadir,tugas_belajar,TBplus,jam_kerja,src,\r\n\t\t\t\t\t\t\t\t\t\t\tcek) \r\n\t\t\t\t\t\t\t\t\t\t\tVALUES ('" . $nip . "','" . $tanggal . "','" . $status . "','" . $kekurangan . "','" . $tidak_hadir . "',\r\n\t\t\t\t\t\t\t\t\t\t\t'" . $tugas_belajar . "','" . $TBplus . "','" . $JamKerja . "','" . $src . "','52')\r\n\t\t\t\t\t\t\t\t\t\t";
                                            $query = mysql_query($sql);
                                        }
                                    }
                                }
                            } else {
                                if ($num == 1) {
                                    $Presensi = mysql_fetch_array($oPresensi);
                                    if ($Presensi['jam'] != '00:00:00') {
                                        $jam = "00:00:00";
                                        $status = "9";
                                        $kode_alasan = "";
                                        $jam = "00:00:00";
                                        $kekurangan = get_kekurangan($nip, $tanggal, $jam, $status, $kode_alasan);
                                        $PSW[1] = 0;
                                        $PSW[2] = 0;
                                        $PSW[3] = 0;
                                        $PSW[4] = 0;
                                        $PSW = cek_1234($kekurangan);
                                        $sql = "\r\n\t\t\t\t\t\t\t\t\t\t\tINSERT INTO presensi_" . $u . " (nip,tanggal,status,kekurangan,PSW1,PSW2,PSW3,PSW4,jam_kerja,src,cek) \r\n\t\t\t\t\t\t\t\t\t\t\tVALUES ('" . $nip . "','" . $tanggal . "','" . $status . "','" . $kekurangan . "','" . $PSW[1] . "','" . $PSW[2] . "',\r\n\t\t\t\t\t\t\t\t\t\t\t'" . $PSW[3] . "','" . $PSW[4] . "','" . $JamKerja . "','" . $src . "','53')\r\n\t\t\t\t\t\t\t\t\t\t";
                                        $query = mysql_query($sql);
                                    }
                                }
                            }
                        }
                    } else {
                        $oJadwalShift = jadwal_shift("nip = '" . $nip . "' AND tanggal = '" . $tanggal . "' AND jam_kerja != 'L' AND cek = '0'", "jam_masuk");
                        $nJadwalShift = mysql_num_rows($oJadwalShift);
                        if ($nJadwalShift != 0) {
                            while ($JadwalShift = mysql_fetch_array($oJadwalShift)) {
                                if ($JadwalShift['cek_masuk'] == '0') {
                                    $status = "";
                                    $kode_alasan = "TK";
                                    $kekurangan = 450;
                                    $tidak_hadir = 1;
                                    $tanpa_keterangan = 1;
                                    $TK = 1;
                                    $sql = "\r\n\t\t\t\t\t\t\t\t\t\t\tINSERT INTO presensi_" . $u . " (nip,tanggal,status,kekurangan,tidak_hadir,tanpa_keterangan,TK,\r\n\t\t\t\t\t\t\t\t\t\t\tjam_kerja,src,cek) \r\n\t\t\t\t\t\t\t\t\t\t\tVALUES ('" . $nip . "','" . $tanggal . "','" . $status . "','" . $kekurangan . "','" . $tidak_hadir . "',\r\n\t\t\t\t\t\t\t\t\t\t\t'" . $tanpa_keterangan . "','" . $TK . "','" . $JadwalShift['id'] . "','" . $src . "','71')\r\n\t\t\t\t\t\t\t\t\t\t";
                                    $query = mysql_query($sql);
                                    $sql = "UPDATE jadwal_shift SET cek = '1' WHERE id = '" . $JadwalShift['id'] . "'";
                                    $query = mysql_query($sql);
                                } else {
                                    if ($JadwalShift['cek_keluar'] == '0') {
                                        $oPresensi = presensi($u, "nip = '" . $nip . "' AND jam_kerja = '" . $JadwalShift['id'] . "' AND status = '1'");
                                        $Presensi = mysql_fetch_array($oPresensi);
                                        $status = "9";
                                        $kode_alasan = "";
                                        $jam = "00:00:00";
                                        $kekurangan = 450 - $Presensi['kekurangan'];
                                        $PSW[1] = 0;
                                        $PSW[2] = 0;
                                        $PSW[3] = 0;
                                        $PSW[4] = 0;
                                        $PSW = cek_1234($kekurangan);
                                        $sql = "\r\n\t\t\t\t\t\t\t\t\t\t\tINSERT INTO presensi_" . $u . " (nip,tanggal,status,kekurangan,PSW1,PSW2,PSW3,PSW4,jam_kerja,src,cek) \r\n\t\t\t\t\t\t\t\t\t\t\tVALUES ('" . $nip . "','" . $tanggal . "','" . $status . "','" . $kekurangan . "','" . $PSW[1] . "','" . $PSW[2] . "',\r\n\t\t\t\t\t\t\t\t\t\t\t'" . $PSW[3] . "','" . $PSW[4] . "','" . $JadwalShift['id'] . "','" . $src . "','72')\r\n\t\t\t\t\t\t\t\t\t\t";
                                        $query = mysql_query($sql);
                                        $sql = "UPDATE jadwal_shift SET cek = '1' WHERE id = '" . $JadwalShift['id'] . "'";
                                        $query = mysql_query($sql);
                                    }
                                }
                            }
                        }
                    }
                }
            }
            $sql = "UPDATE import SET `" . $kode_unit . "` = '1' WHERE id = '" . $Import['id'] . "'";
            $rs = mysql_query($sql);
        }
    }
}
示例#3
0
<?php

include "../../includes/includes.php";
$id = $_GET['id'];
$oPegawai = pegawai_list($id, "nama");
$num = mysql_num_rows($oPegawai);
if ($num != 0) {
    ?>
	
		<select name="q">
			<option value=""></option><?php 
    while ($Pegawai = mysql_fetch_object($oPegawai)) {
        ?>
				<option value="<?php 
        echo $Pegawai->nip;
        ?>
"><?php 
        echo $Pegawai->nama;
        ?>
</option><?php 
    }
    ?>
		</select><?php 
}
?>


示例#4
0
    $subbidang = $b . "0";
}
if (substr($subbidang, 2, 2) == "00") {
    $bidang = $u;
} else {
    if (substr($subbidang, 3, 1) == "0") {
        $bidang = $b;
    } else {
        $bidang = $subbidang;
    }
}
$table = "pegawai";
$field = get_field($table);
$ed_link = "index.php?p=" . get_edit_link($p) . "&u=" . $u . "&b=" . $b . "&subbidang=" . $subbidang;
$del_link = "index.php?p=" . get_delete_link($p) . "&u=" . $u . "&b=" . $b . "&subbidang=" . $subbidang;
$oList = pegawai_list($bidang, "kode_bidang,status_jab DESC,nip");
$count = mysql_num_rows($oList);
while ($List = mysql_fetch_object($oList)) {
    foreach ($field as $k => $val) {
        $col[$k][] = $List->{$val};
    }
    $ed[] = $ed_link . "&q=" . $List->{$field}[0];
    $del[] = $del_link . "&q=" . $List->{$field}[0];
}
?>

<script language="javascript" src="js/autocombo.js"></script>
<form action="" method="get" name="form">
	<input name="p" type="hidden" value="<?php 
echo $p;
?>