function get_jumlah_hari_kerja($m, $y) { $bulan = $y . "-" . $m; $jumlah_hari = jumlah_hari($m, $y); $tgl = $bulan . "-" . $jumlah_hari; $hari_kerja = 0; #$date_until = last_import($u); #if ($tgl >= date("Y-m-d") or $tgl >= $date_until) $jumlah_hari = substr($date_until,8,2) + 0; for ($x = 1; $x <= $jumlah_hari; $x++) { if ($x < 10) { $x = "0" . $x; } $tgl = $bulan . "-" . $x; #$oLibur = libur("tanggal = '".$tgl."'"); #$nLibur = mysql_num_rows($oLibur); $s_libur = "SELECT * FROM libur WHERE tanggal = '" . $tgl . "'"; $q_libur = mysql_query($s_libur); $n_libur = mysql_fetch_array($q_libur); $hari = strtolower(nama_hari($tgl)); if ($hari != "sabtu" and $hari != "minggu" and $nLibur == 0) { $hari_kerja++; } } return $hari_kerja; }
public function index() { $result['data'] = $this->session->flashdata('error'); $result['data']['success'] = false; $dataType = $this->input->get('dataType'); $this->error->error = $result['data']; if ($dataType == 'json') { $this->load->view('cpanelx/library/json', $result); } else { if (!$this->error->isError()) { $this->error->error['date'] = nama_hari('Y-m-d') . ', ' . tgl_indo('Y-m-d') . date(' h:i'); $this->error->set(anchor(base_url(), $this->error_lang['back'])); } show_error($this->error->get_html()); } }
?> <a style="float:right" class="btn btn-success komentar edit" title="Edit" href="<?php echo base_url(); ?> c_diskusi/edit_diskusi/<?php echo $row->id_diskusi; ?> " ><i class='fa fa-pencil'></i> Edit</a> <?php } ?> <h2 class="blue"><?php echo $row->judul; ?> </br><small><?php echo nama_hari($row->tanggal) . ' ' . tgl_indo($row->tanggal); ?> </small></h2> <hr> <?php echo $row->konten; ?> </div> </div> </div> </div> </div> <script type="text/javascript" src="<?php echo base_url(); ?> asset/assets/js/tinymce/tinymce.min.js"></script>
"><?php echo $l; ?> </td> <td align="center" rowspan="<?php echo $rowspan; ?> "><?php echo dmy($col['tanggal'][$k]); ?> </td> <td align="center" rowspan="<?php echo $rowspan; ?> "><?php echo strtoupper(nama_hari($col['tanggal'][$k])); ?> </td><?php #$x = 1; $x = 0; #} ?> <td align="center" nowrap="nowrap"><?php if ($col['status'][$k] == 0) { $status = "LIBUR"; } else { if ($col['status'][$k] == 1) { $status = "TIDAK HADIR"; } else { if ($col['status'][$k] == 2) {
c_request/laporan_fix/<?php echo $row->id_request; ?> ">Baca Laporan</a> <?php } ?> </br> <h3></h3> <small><?php echo nama_hari($row->tanggal_event) . ' ' . tgl_indo($row->tanggal_event); ?> - <?php echo nama_hari($row->tanggal_akhir) . ' ' . tgl_indo($row->tanggal_akhir); ?> | <?php echo $row->no; ?> | <?php echo $row->EO; ?> </small></h2> <hr> <?php echo $row->konten; ?> <hr> <div id="accordion2" class="accordion"> <div class="accordion-group">
$row = mysql_fetch_array($qu); #hapus dulu datanya $sql = "DELETE FROM mst_aktivitas WHERE tahun = '{$tahun}' and bulan = '{$bulan}' and nib = '{$xusername}'"; mysql_query($sql); $sql_mst = "INSERT INTO mst_aktivitas(id,tahun,bulan,nib,kdunitkerja,kdjabatan,kdgol,nib_atasan,jabatan_atasan,kdgol_atasan) VALUES ('','{$row['tahun']}','{$bulan}','{$row['nib']}','{$row['kdunitkerja']}','{$row['kdjabatan']}','{$row['kdgol']}','{$row['nib_atasan']}','{$row['jabatan_atasan']}','{$row['kdgol_atasan']}')"; # echo $sql.";<br>"; mysql_query($sql_mst); for ($i = 1; $i <= days_in_month($tahun, $bulan); $i++) { if (strlen($i) == 1) { $tgl = '0' . $i; } if (strlen($i) == 2) { $tgl = $i; } $tanggal = $tahun . '-' . $bulan . '-' . $tgl; $namahari = nama_hari($tanggal); echo 'nama hari ' . $namahari . '<br>'; $ket = '0'; if ($namahari == 'Sabtu') { $ket = '1'; } if ($namahari == 'Minggu') { $ket = '2'; } if (status_libur($tanggal) == 'L') { $ket = '3'; } $sql_dtl = "INSERT INTO dtl_aktivitas(id,tahun,bulan,tgl,nib,ket) VALUES ('','{$tahun}','{$bulan}','{$tgl}','{$row['nib']}','{$ket}')"; # echo $sql.";<br>"; mysql_query($sql_dtl); }
$l = 0; while ($List = mysql_fetch_object($oList)) { foreach ($field as $k => $val) { $col[$k][] = $List->{$val}; } $ed[] = $ed_link . "&q=" . $List->{$field}[0]; $rowspan[] = $count; $d = substr($List->tanggal, 8, 2) + 0; if ($d % 2 == 1) { $class[] = "row1"; } else { $class[] = "row0"; } } } else { $Hari = nama_hari($date); if ($Hari == "Sabtu" or $Hari == "Minggu") { $col[0][] = "-"; $col[1][] = "-"; $col[2][] = $date; $col[3][] = "-"; $col[4][] = "-"; $col[5][] = "-"; $col[6][] = "-"; $col[7][] = $Hari; $ed[] = "#"; $rowspan[] = "1"; $class[] = "row2"; } else { $col[0][] = ""; $col[1][] = "";
default: if ($Key != 1) { $log_txt .= $Key . " | " . $Row[0] . " | " . $Row[1] . " | " . $Row[2] . " | " . $Row[3] . " | " . $Row[4] . " | " . $Row[6] . "\n"; $nip = $Row[0]; $tgl = $Row[2]; $tgl = explode("-", $tgl); $y = $tgl[2]; $m = $tgl[1]; $d = $tgl[0]; #if ($m <= 9) $m = '0'.$m; #if ($d <= 9) $d = '0'.$d; $tanggal = $y . "-" . $m . "-" . $d; $sql = "SELECT * FROM jadwal_kerja WHERE kode = 'N'"; $o_jadwal = mysql_query($sql); $jadwal = mysql_fetch_array($o_jadwal); $hari = strtolower(nama_hari($tanggal)); $sql = "SELECT * FROM jam_kerja WHERE kode = '" . $jadwal[$hari] . "'"; $o_jam = mysql_query($sql); $jam = mysql_fetch_array($o_jam); $batas_masuk = $jam['jam_masuk']; $batas_keluar = $jam['jam_keluar']; #echo $hari."<BR>"; if ($hari == 'sabtu') { $status = 0; $keterangan = 'Sabtu'; } else { if ($hari == 'minggu') { $status = 0; $keterangan = 'Minggu'; } else { if ($Row[6] == "Libur Nasional") {
<article class="post-content"> <div class="event-description"> <?php echo $row->maps; ?> <div class="spacer-20"></div> <div class="row"> <div class="col-md-8"> <div class="panel panel-default"> <div class="panel-heading"> <h3 class="panel-title">Event details</h3> </div> <div class="panel-body"> <ul class="info-table"> <li><i class="fa fa-calendar"></i> <strong><?php echo nama_hari($row->tanggal); ?> </strong> | <?php echo tgl_indo($row->tanggal); ?> </li> <li><i class="fa fa-clock-o"></i> <?php echo $row->jam; ?> </li> </ul> </div> </div> </div> </div> <p><?php
"><?php echo $i++; ?> </td> <td align="center" rowspan="<?php echo $rowspan; ?> "><?php echo dmy($List['tanggal']); ?> </td> <td align="center" rowspan="<?php echo $rowspan; ?> "><?php echo strtoupper(nama_hari($List['tanggal'])); ?> </td> <td align="center" nowrap="nowrap"><?php if ($List['status'] == 0) { $status = "LIBUR"; } else { if ($List['status'] == 1) { $status = "TIDAK HADIR"; } else { if ($List['status'] == 2) { $status = "DATANG"; } else { if ($List['status'] == 3) { $status = "CUTI BERSAMA"; } else {
if ($adacuti > 0) { if (!empty($que_cuti['nip'])) { echo "<tr bgcolor='yellow'>"; $keterangan = "Cuti"; $total_cuti++; } else { echo "<tr>"; } } /*if ($adalibur > 0) { $tlibur = mysql_fetch_array($qlibur); $keterangan = $tlibur[keterangan]; }*/ $nhari = date('w', mktime(0, 0, 0, $bulan, $hr, $tahun)); $hari = nama_hari($nhari); $jammasuk = $tabsen[masuk]; $jampulang = $tabsen[pulang]; if (empty($jampulang)) { $jampulang = "17:30:00"; } if ($nhari == 0 or $adalibur > 0) { echo "<tr bgcolor='red'>"; } else { if (empty($tabsen[tanggal])) { echo "<tr bgcolor='yellow'>"; $tidakmasuk++; } else { echo "<tr>"; } }
function get_jumlah_hari_kerja($u, $m, $y) { $bulan = $y . "-" . $m; $jumlah_hari = jumlah_hari($m, $y); $tgl = $bulan . "-" . $jumlah_hari; $hari_kerja = 0; $date_until = last_import($u); if ($tgl >= date("Y-m-d") or $tgl >= $date_until) { $jumlah_hari = substr($date_until, 8, 2) + 0; } for ($x = 1; $x <= $jumlah_hari; $x++) { if ($x < 10) { $x = "0" . $x; } $tgl = $bulan . "-" . $x; $oLibur = libur("tanggal = '" . $tgl . "'"); $nLibur = mysql_num_rows($oLibur); $hari = strtolower(nama_hari($tgl)); if ($hari != "sabtu" and $hari != "minggu" and $nLibur == 0) { $hari_kerja++; } } return $hari_kerja; }
function get_nama_hari($id) { $data = nama_hari(); return $data[$id]; }
public function save_keluar() { $cek = $this->session->userdata('logged_in'); if (!empty($cek)) { date_default_timezone_set("Asia/Jakarta"); $datetime = date('H:i:s'); $date = date('Y-m-d'); $keterangan = 'Hadir'; $this->form_validation->set_rules('password', 'password', 'trim|required|xss_clean|callback_valid_password'); if ($this->form_validation->run() == TRUE) { $waktu_keluar['waktu_keluar'] = $datetime; $pegawai_nip['pegawai_nip'] = $this->input->post('pegawai_nip'); $tanggal_masuk['tanggal_masuk'] = $this->input->post('tanggal_masuk'); $hari['hari'] = $this->input->post('hari'); $akademik_idakademik['akademik_idakademik'] = $this->input->post('akademik_idakademik'); if ($this->main_m->get_waktu_keluar($pegawai_nip['pegawai_nip'], $tanggal_masuk['tanggal_masuk']) == TRUE) { header('location:' . base_url() . 'main/filed_output'); return FALSE; } else { $this->main_m->updateKehadiranKeluar($waktu_keluar, $pegawai_nip, $tanggal_masuk, $hari, $akademik_idakademik); $data['title'] = 'Dashboard - SISTEM INFORMASI ABSENSI'; $waktu_keluar['waktu_keluar'] = $datetime; $data['nip'] = $this->main_m->getNama(); $this->load->view('main/global/success_keluar', $waktu_keluar); $this->load->view('main/global/bg_header', $data); $this->load->view('main/bg_pilihan'); $this->load->view('main/global/bg_footer'); return TRUE; } } else { $data['waktu_masuk'] = date('Y-m-d'); $data['title'] = 'Dashboard - SISTEM INFORMASI ABSENSI'; $data['hari'] = nama_hari(date('Y-m-d')); $data['nip'] = $this->main_m->getNama(); $data['akademik'] = $this->main_m->getTahunAkademik(); $this->load->view('main/global/filed'); $this->load->view('main/global/bg_header', $data); $this->load->view('main/bg_content_keluar'); $this->load->view('main/global/bg_footer'); } } else { $st = $this->session->userdata('status'); if ($st == 'admin') { header('location:' . base_url() . 'app'); } else { header('location:' . base_url() . 'auth'); } } }
$pesan = "sore"; } } } } if (gmdate("H", time() + 60 * 60 * 7) > 18) { $pesan = "malam"; } ?> <strong>Selamat <?php echo $pesan; ?> ...</strong> <?php $tgl = explode("-", gmdate("Y-m-d", time() + 60 * 60 * 7)); echo nama_hari($tgl[2], $tgl[1], $tgl[0]) . ', ' . tgl_indo(gmdate("Y-m-d", time() + 60 * 60 * 7)) . ' - ' . gmdate("H:i:s", time() + 60 * 60 * 7); ?> WIB <h1><a href="#">Rumah Sakit Bargawastra Wijaya</a></h1> <h3><a href="#">Rumah Sakit Bargawastra Wijaya</a></h3> </header> <!-- end of header --> <!-- navigation --> <nav id="navigation"> <a href="<?php echo base_url(); ?> " class="nav-btn">HOME<span class="arr"></span></a> <?php echo $menu_atas; ?>
} else { foreach ($data as $data) { ?> <li> <time class="cbp_tmtime" datetime="{{ date('F-m-d H:i:s') }}"><span><?php echo substr($data['tanggal'], 11, 5); ?> </span> <?php $today = date('d'); $tg_dt = substr($data['tanggal'], 8, 2); $tgls = substr($data['tanggal'], 0, 10); if ($today == $tg_dt) { echo "<span title='" . tgl_indo($tgls) . "'>Today</span>"; } else { echo "<span title='" . tgl_indo($tgls) . "'>" . nama_hari($tgls) . "</span>"; } ?> </time> <div class="cbp_tmicon timeline-bg-primary"> <i class="fa-quote-left"></i> </div> <div class="cbp_tmlabel"> <!-- ini buat quotes --> <h2><a href="#"><?php //echo strip_tags($data['nama']); ?> </a> <span>posted a quote update</span></h2> <p class="noselect" style="font-family: 'Indie Flower', cursive;font-size:25px;"><?php
echo $bio; echo $menu; ?> <div class="cleaner_h10"></div> <a href="<?php echo base_url(); ?> admin/tambah_info/" rel="example_group" class="link" style="float:left;">Tambah Info</a> <?php foreach ($info->result_array() as $i) { ?> <table border="0" cellpadding="5" cellspacing="0" width="100%"> <tr> <td> <h5><?php echo nama_hari($i['waktu_post']) . ', ' . tgl_indo($i['waktu_post']); ?> </h5> <h4><?php echo $i['judul']; ?> </h4> <?php echo $i['isi']; ?> </td> </tr> <tr> <td> <?php echo '<a href="' . base_url() . 'admin/edit_info/' . $i['kd_info'] . '" rel="example_group" class="link" style="float:left;">Edit</a>
public function __CONSTRUCT() { $this->error = array(); $this->error['date'] = nama_hari('Y-m-d') . ', ' . tgl_indo('Y-m-d') . date(' h:i'); }
function tgl_jam_indo($tgl) { if ($tgl) { $ubah = gmdate($tgl, time()); $pecah2 = explode(" ", $ubah); $pecah = explode("-", $pecah2[0]); $tanggal = $pecah[2]; $bulan = bulan($pecah[1]); $tahun = $pecah[0]; $hari = nama_hari($tgl); return $hari . ', ' . $tanggal . ' ' . $bulan . ' ' . $tahun; } }
public function tambah() { $cek = $this->session->userdata('logged_in'); if (!empty($cek)) { date_default_timezone_set("Asia/Jakarta"); $breadcrumb = array("Kehadiran" => base_url() . "kehadiran", "Tambah Data Kehadiran" => ""); $data['breadcrumb'] = $breadcrumb; $data['title'] = 'Tambah Data Kehadiran - SISTEM INFORMASI ABSENSI'; $data['nama_pegawai'] = $this->kehadiran_m->getNama(); $data['tanggal'] = date('Y-m-d'); $data['hari'] = nama_hari(date('Y-m-d')); $data['akademik'] = $this->kehadiran_m->getTahunAkademik(); $this->load->view('kehadiran/tambah_kehadiran', $data); } else { $st = $this->session->userdata('status'); if ($st == 'admin') { header('location:' . base_url() . 'app'); } else { header('location:' . base_url() . 'auth'); } } }