Пример #1
0
	<td><input type="text" name="kotalahir" value="' . $kotalahir . '" size="30" class="form-control"></td>
</tr>
<tr>
	<td>Tanggal Lahir</td>
	<td><input type="text" name="tgllahir" id="tgllahir" value="' . $tgllahir . '" size="30" class="form-control"></td>
</tr>
<tr>
	<td>Jenis Kelamin</td>
	<td><select name="kelamin" class="form-control">';
    $hasil = $koneksi_db->sql_query("SELECT * FROM hrd_kelamin ORDER BY kelamin");
    $admin .= '<option value="-">== Jenis Kelamin ==</option>';
    while ($datas = $koneksi_db->sql_fetchrow($hasil)) {
        $pilihan = $datas['id'] == $kelamin ? "selected" : '';
        $admin .= '<option value="' . $datas['id'] . '" ' . $pilihan . '>' . $datas['kelamin'] . '</option>';
    }
    $admin .= '</select></td>
</tr>
<tr>
	<td>Agama</td>
	<td><select name="agama" class="form-control">';
    $hasil = $koneksi_db->sql_query("SELECT * FROM hrd_agama ORDER BY nama");
    $admin .= '<option value="-">== Agama ==</option>';
    while ($datas = $koneksi_db->sql_fetchrow($hasil)) {
        $pilihan = $datas['id'] == $agama ? "selected" : '';
        $admin .= '<option value="' . $datas['id'] . '" ' . $pilihan . '>' . $datas['nama'] . '</option>';
    }
    $admin .= '</select></td>
</tr>
<tr>
	<td>Menikah</td>
	<td><select name="menikah" class="form-control">';
$optSupp = makeOption($dbname, 'log_5supplier', 'kodetimbangan,namasupplier');
$optNm = makeOption($dbname, 'organisasi', 'kodeorganisasi,namaorganisasi');
$dateDt = dates_inbetween($tgl_1, $tgl_2);
$intex = array('1' => 'Internal', '2' => 'Afiliasi', '0' => 'External');
//if($tipeIntex=='3'&&$unit==''){
function daysBetween($s, $e)
{
    $s = strtotime($s);
    $e = strtotime($e);
    return ($e - $s) / (24 * 3600);
}
$erd = explode("-", checkPostGet('tgl_1', '00-00-0000'));
$erd2 = explode("-", checkPostGet('tgl_2', '00-00-0000'));
$tgl1 = $erd[2] . "-" . $erd[1] . "-" . $erd[0];
$tgl2 = $erd2[2] . "-" . $erd2[1] . "-" . $erd2[0];
$archeck = daysBetween($tgl1, $tgl2);
if ($pilTamp == 0) {
    if ($archeck > 31) {
        exit("error: max 31 days");
    }
}
if ($pilTamp == 1) {
    if ($archeck > 7) {
        exit("error: max 7 days");
    }
}
//}
switch ($proses) {
    case 'preview':
        if ($unit != "") {
            if ($tipeIntex == 0) {
     if (!mysql_query($sins, $conn)) {
         exit("error:" . mysql_error($conn) . "__" . $sins);
     }
     break;
 case 'updateDt':
     $scek2 = "select distinct * from " . $dbname . ".sdm_permintaansdm \r\n           where notransaksi='" . $param['notransaksi'] . "'";
     //exit("error:".$scek2);
     $qcek2 = mysql_query($scek2) or die(mysql_error($conn));
     $rcek2 = mysql_fetch_assoc($qcek2);
     if ($rcek2['stpersetujuanhrd'] != 0) {
         exit("error: Data Sudah Ada Perrsetujuan");
     }
     $tgl = explode("-", $param['tglTakhir']);
     $param['tglTakhir'] = $tgl[2] . "-" . $tgl[1] . "-" . $tgl[0];
     //     exit("error:".$param['tglTakhir']);
     $slisihhari = daysBetween($rcek2['tgldibutuhkan'], $param['tglTakhir']);
     //    exit("error:".$slisihhari);
     if ($slisihhari < 0) {
         exit("Error: Tanggal Display Lowongan Tidak Boleh Lebih Kecil dari Tanggal Di butuhkan");
     }
     #koneksi dtbase
     $sdtip = "select distinct * from " . $dbname . ".setup_remotetimbangan where lokasi='HRDJKRT'";
     $qdtip = mysql_query($sdtip) or die(mysql_error($conn));
     $rdtip = mysql_fetch_assoc($qdtip);
     $dbserver2 = $rdtip['ip'];
     $dbport2 = $rdtip['port'];
     $dbname2 = $rdtip['dbname'];
     $uname2 = $rdtip['username'];
     $passwd2 = $rdtip['password'];
     //print_r($rdtip);
     $conn2 = mysql_connect($dbserver2 . ":" . $dbport2, $uname2, $passwd2) or die("Error/Gagal :Unable to Connect to database " . $dbserver2);
Пример #4
0
                $rcptError[] = $artist->email;
            }
            continue;
        }
    }
    // Check that the image file exists
    if (!$wotd->imageExists()) {
        addError($date, sprintf("Definiția '%s' are imaginea asociată '%s', dar fișierul nu există", $def->lexicon, $wotd->image));
        continue;
    }
}
log_scriptLog("checkWotd: collected " . count($messages) . " messages");
if (count($messages)) {
    if ($firstErrorDate) {
        $today = date("Y-m-d", strtotime("today"));
        $days = daysBetween($today, $firstErrorDate);
        switch ($days) {
            case 0:
            case 1:
                $subject = 'ACUM';
                break;
            case 2:
                $subject = 'ASTĂZI';
                break;
            case 3:
                $subject = 'cel târziu mâine';
                break;
            default:
                $subject = sprintf("în %s zile", $days - 1);
        }
        $subject = 'Cuvântul zilei: acțiune necesară ' . $subject;
Пример #5
0
        $tengah .= '</div>';
        /////////////////////////////////////////////////////////////////////////////////////////////
        $tengah .= '<div class="col-xs-6">';
        $hasil = $koneksi_db->sql_query("SELECT * FROM hrd_karyawan ");
        $tengah .= '<div class="panel panel-info">
<div class="panel-heading"><h3 class="panel-title">Reminder Status</h3></div>
<table class="table">';
        while ($data = $koneksi_db->sql_fetchrow($hasil)) {
            $id = $data['id'];
            $nip = $data['nip'];
            $nama = $data['nama'];
            $date1 = $data['tglpercobaan'];
            $date2 = $data['tglkontrak'];
            $date3 = date("Y-m-d");
            $telatkontrak = daysBetween($date3, $date2);
            $telatpercobaan = daysBetween($date3, $date1);
            $tglpercobaan = datetimes($date1, False, False);
            $tglkontrak = datetimes($date2, False, False);
            if ($telatkontrak <= 90 and $telatkontrak >= 0) {
                $tengah .= "<tr><td>{$nama} - {$telatkontrak} Hari ({$tglkontrak}) - Kontrak</td></tr>";
            }
            if ($telatpercobaan <= 14 and $telatpercobaan >= 0) {
                $tengah .= "<tr><td>{$nama} - {$telatpercobaan} Hari ({$tglpercobaan}) - Percobaan</td></tr>";
            }
        }
        $tengah .= '</table>';
        $tengah .= '</div>';
        $tengah .= '</div>';
        ///////////////////////////////////////////////////////////////////////////
        $tengah .= '<div class="col-xs-6">';
        $hasil = $koneksi_db->sql_query("SELECT * FROM hrd_karyawan ");
 $thndt = date("Y");
 $thnLalu = intval($thndt) - 1;
 $thnDatalalu = $thnLalu . "-12-31";
 //exit("Error:".$thnDatalalu);
 $sql = "select distinct a.karyawanid,b.namakaryawan,b.tanggalmasuk,idkomponen,bagian,b.nik,b.kodegolongan,COALESCE(ROUND(DATEDIFF('" . $thnDatalalu . "',b.tanggalmasuk)/365,2),0) as masakerja,tipekaryawan from " . $dbname . ".sdm_5gajipokok a left join " . $dbname . ".datakaryawan \n            b on a.karyawanid=b.karyawanid where tahun='" . $thn . "' and idkomponen in (select id from " . $dbname . ".sdm_ho_component where type='basic') and lokasitugas in (select distinct kodeorganisasi from " . $dbname . ".organisasi where induk='" . $_SESSION['empl']['kodeorganisasi'] . "') order by idkomponen";
 // exit("Error:".$sql);
 function daysBetween($s, $e)
 {
     $s = strtotime($s);
     $e = strtotime($e);
     return ($e - $s) / (24 * 3600);
 }
 if (mysql_query($sql)) {
     $res = mysql_query($sql);
     while ($bar = mysql_fetch_assoc($res)) {
         $masakerja = daysBetween($bar['tanggalmasuk'], $thnDatalalu);
         $no += 1;
         $stream .= "<tr>";
         $stream .= "<td>" . $no . "</td>";
         $stream .= "<td>'" . $bar['nik'] . "</td>";
         $stream .= "<td>" . $bar['namakaryawan'] . "</td>";
         $stream .= "<td>" . $optBagian[$bar['bagian']] . "</td>";
         $stream .= "<td>" . $bar['kodegolongan'] . "</td>";
         $stream .= "<td>" . $optTipekary[$bar['tipekaryawan']] . "</td>";
         $stream .= "<td>" . tanggalnormal($bar['tanggalmasuk']) . "</td>";
         $stream .= "<td>" . number_format($bar['masakerja'], 0) . "</td>";
         foreach ($idKom as $lstKom) {
             $stream .= "<td>" . number_format($barGapok[$lstKom][$bar['karyawanid']], 0) . "</td>";
             //$stream.="<td>".number_format($barGapok[2][$bar['karyawanid']],0)."</td>";
             //$stream.="<td>".number_format($barGapok[30][$bar['karyawanid']],0)."</td>";
             //$stream.="<td>".number_format($barGapok[31][$bar['karyawanid']],0)."</td>";
Пример #7
0
        ///////////////////////////////////////////////////////////////////////////
        if (isset($_SESSION['LevelAkses']) && $_SESSION['LevelAkses'] == "HRD" || $_SESSION['LevelAkses'] == "Administrator") {
            /////////////////////////////////////////////////////////////////////////////////////////////
            $tengah .= '<div class="col-xs-6">';
            $hasil = $koneksi_db->sql_query("SELECT * FROM hrd_karyawan order by tglnaikgolongan asc");
            $tengah .= '<div class="panel panel-info">
<div class="panel-heading"><h3 class="panel-title">Reminder Kenaikan Golongan</h3></div>
<table class="table">';
            while ($data = $koneksi_db->sql_fetchrow($hasil)) {
                $id = $data['id'];
                $nip = $data['nip'];
                $nama = $data['nama'];
                $golongan = getgolongan($data['golongan']);
                $date1 = $data['tglnaikgolongan'];
                $date3 = date("Y-m-d");
                $telatnaikgolongan = daysBetween($date3, $date1);
                $tglnaikgolongan = datetimes($date1, False, False);
                if ($telatnaikgolongan <= 90 and $telatnaikgolongan >= 0) {
                    $tengah .= "<tr><td>{$nama} - {$telatnaikgolongan} Hari ({$tglnaikgolongan}) - {$golongan}</td></tr>";
                }
            }
            $tengah .= '</table>';
            $tengah .= '</div>';
            $tengah .= '</div>';
            ///////////////////////////////////////////////////////////////////////////
        }
        $tengah .= '</div>';
    }
} else {
    $style_include[] = '<meta http-equiv="refresh" content="1; url=admin.php?pilih=penggajian&mod=yes" />';
}