예제 #1
0
	</div>
	<div class="formcolumn">
		<div name="basicform" id="basicform">
			<div class="frm isian">
				<div class="multistep">
					<div class="form-group field-isian">
						<?php 
if (isset($notif)) {
    echo $notif;
}
?>

						<?php 
if ($this->session->userdata('status_lap_periodik') == 1) {
    echo '<h3>*Mohon agar Anda melakukan proses pelaporan periodik di menu Laporan Berkala</h3>';
    $notif_lap_berkala = selects('*', 'pelaporan_periodik', array('id_perusahaan' => $this->session->userdata('id_perusahaan')));
    echo "<table border=1>";
    echo "<tr><th>Semseter</th>";
    echo "<th>Bidang</th><th>Status</th>\n\t\t\t\t\t\t</tr>";
    foreach ($notif_lap_berkala as $key => $lap_berkala) {
        $permohonan = select('*', 'permohonan', array('id_permohonan' => $lap_berkala->id_permohonan));
        $semester = select('*', 'ref_semester', array('id_semester' => $lap_berkala->semester));
        if ($lap_berkala->status_laporan == 3) {
            $sts = 'Diterima';
        } elseif ($lap_berkala->status_laporan == 4) {
            $sts = 'Ditolak, ulangi pengajuan Anda!';
        }
        echo "<tr>";
        echo "<td>" . $semester->semester . "</td>";
        echo "<td>" . $permohonan->sub_bagian_sub_bidang . "</td>";
        echo "<td>" . $sts . "</td>";
예제 #2
0
<span id="keterangan" style="color:red; font-size:12px"></span>
<div id="pilihan_bidang">

	<div class="column-bidang">
		<ul class="option" style="list-style: none;">
			<li style="display: inline;"><label class="bidang">Jenis Permohonan</label>:  </li>

			<li style="display: inline;"><input name="jenis_permohonan" id="rdbtn1" type="radio" value="SKT Baru"> Baru
				<input name="jenis_permohonan" id="rdbtn2" type="radio" value="Perpanjangan SKT"> Perpanjangan
			</li></ul>
			<div class="list-bidang">
				<label class="bidang">Bidang Usaha</label>:  
				<select id="bidang_usaha" name="bidang_usaha" onchange="bidang_usaha123();">
					<option value="kosong" selected="selected">Pilih Bidang Usaha</option>
					<?php 
$selects_bidang_usaha = selects('*', 'ref_bidang_usaha');
foreach ($selects_bidang_usaha as $key => $bidang_usaha) {
    ?>

					<option id="<?php 
    echo $bidang_usaha->id_bidang_usaha;
    ?>
"  value="<?php 
    echo $bidang_usaha->id_bidang_usaha;
    ?>
"><?php 
    echo $bidang_usaha->bidang_usaha;
    ?>
</option>
				<?php 
}
예제 #3
0
 public function daftar_semua_pengajuan_skt($value = '')
 {
     $select_permohonan = selects('*', 'permohonan', array('selesai' => 1));
     view('test/test', array('data' => $select_permohonan));
 }
예제 #4
0
    public function total_pengajuan_admin()
    {
        $level = $this->session->userdata('level');
        if ($level == 2) {
            $where = 2;
            $where_revisi = 3;
            $where_naik = 13;
        } elseif ($level == 3) {
            $where = 4;
            $where_revisi = NULL;
            $where_naik = 12;
        } elseif ($level == 4) {
            $where = 6;
            $where_revisi = NULL;
            $where_naik = 11;
        } elseif ($level == 5) {
            $where = 7;
            $where_revisi = 10;
            $where_naik = 9;
        } elseif ($level == 6) {
            $where = 8;
            $where_revisi = 102;
            $where_naik = 8;
        } elseif ($level == 8 || $level == 7) {
            $where = NULL;
            $where_revisi = NULL;
            $where_naik = NULL;
        }
        $data = selects('*', 'permohonan', array('selesai' => 1));
        $skt_masuk = 0;
        if ($data != NULL) {
            foreach ($data as $permohonan) {
                if ($permohonan->jenis_permohonan == 'SKT Baru' || $permohonan->jenis_permohonan == 'Perpanjangan SKT') {
                    $select_last_disposisi_by_id_permohonan = select('*', 'disposisi', array('id_permohonan' => $permohonan->id_permohonan), array('id_disposisi', 'DESC'));
                    if ($select_last_disposisi_by_id_permohonan != NULL) {
                        if ($select_last_disposisi_by_id_permohonan->status_progress == $where && $select_last_disposisi_by_id_permohonan->user_tujuan == $this->session->userdata('id_user')) {
                            $skt_masuk++;
                        }
                    }
                }
            }
        }
        $skt_naik = 0;
        if ($data != NULL) {
            foreach ($data as $permohonan) {
                if ($permohonan->jenis_permohonan == 'SKT Baru' || $permohonan->jenis_permohonan == 'Perpanjangan SKT') {
                    $select_last_disposisi_by_id_permohonan = select('*', 'disposisi', array('id_permohonan' => $permohonan->id_permohonan), array('id_disposisi', 'DESC'));
                    if ($select_last_disposisi_by_id_permohonan != NULL) {
                        if ($select_last_disposisi_by_id_permohonan->status_progress == $where_naik && $select_last_disposisi_by_id_permohonan->user_tujuan == $this->session->userdata('id_user')) {
                            $skt_naik++;
                        }
                    }
                }
            }
        }
        $skp_masuk = 0;
        if ($data != NULL) {
            foreach ($data as $permohonan) {
                if ($permohonan->jenis_permohonan == 'SK Penunjukkan Baru' || $permohonan->jenis_permohonan == 'Perpanjangan SK Penunjukkan') {
                    $select_last_disposisi_by_id_permohonan = select('*', 'disposisi', array('id_permohonan' => $permohonan->id_permohonan), array('id_disposisi', 'DESC'));
                    if ($select_last_disposisi_by_id_permohonan != NULL) {
                        if ($select_last_disposisi_by_id_permohonan->status_progress == $where && $select_last_disposisi_by_id_permohonan->user_tujuan == $this->session->userdata('id_user')) {
                            $skp_masuk++;
                        }
                    }
                }
            }
        }
        $skp_naik = 0;
        if ($data != NULL) {
            foreach ($data as $permohonan) {
                if ($permohonan->jenis_permohonan == 'SK Penunjukkan Baru' || $permohonan->jenis_permohonan == 'Perpanjangan SK Penunjukkan') {
                    $select_last_disposisi_by_id_permohonan = select('*', 'disposisi', array('id_permohonan' => $permohonan->id_permohonan), array('id_disposisi', 'DESC'));
                    if ($select_last_disposisi_by_id_permohonan != NULL) {
                        if ($select_last_disposisi_by_id_permohonan->status_progress == $where_naik && $select_last_disposisi_by_id_permohonan->user_tujuan == $this->session->userdata('id_user')) {
                            $skp_naik++;
                        }
                    }
                }
            }
        }
        $revisi = 0;
        if ($data != NULL && $where_revisi != NULL) {
            foreach ($data as $permohonan) {
                $select_last_disposisi_by_id_permohonan = select('*', 'disposisi', array('id_permohonan' => $permohonan->id_permohonan), array('id_disposisi', 'DESC'));
                if ($select_last_disposisi_by_id_permohonan != NULL) {
                    if ($level != 8) {
                        if ($select_last_disposisi_by_id_permohonan->status_progress == $where_revisi) {
                            $revisi++;
                        }
                    } else {
                        if ($select_last_disposisi_by_id_permohonan->status_progress == 3 || $select_last_disposisi_by_id_permohonan->status_progress == 10 || $select_last_disposisi_by_id_permohonan->status_progress == 102) {
                            $revisi++;
                        }
                    }
                }
            }
        }
        $register = $this->model->selects('*', 'registrasi');
        $all_skt = count(selects('*', 'permohonan', array('selesai' => 1, 'jenis_permohonan' => 'SKT Baru'), array('jenis_permohonan' => 'Perpanjangan SKT')));
        $all_skp = count(selects('*', 'permohonan', array('selesai' => 1, 'jenis_permohonan' => 'SK Penunjukkan Baru'), array('jenis_permohonan' => 'Perpanjangan SK Penunjukkan')));
        $temps = count(selects('*', 'temp_skt', array('status_disetujui' => 1)));
        $total_register = count($register);
        $output = '<div class="tablesection" style="width:250px;font-family:sans-serif;font-size:14px;text-shadow:#666;margin:0px 20px 0px 20px!important;border: #fff 2px solid;border-radius: 3px 30px;box-shadow: 7px 4px 13px #888888;padding:20px"><b>Jumlah Pengajuan (' . date('d M Y') . ') </b><hr style="margin:7px 0px 7px 0px;width:230px; border-bottom:1px dashed #888"/>
			<table>';
        if ($level == 2 || $level == 9) {
            $output .= '<tr><td style="padding-right:15px">Register Baru</td><td style="padding-right:15px">:</td><td>' . $total_register . '</td><tr>';
        }
        if ($level != 8 && $level != 7) {
            $output .= '<tr><td style="padding-right:15px">Pengajuan SKT</td><td style="padding-right:15px">:</td><td>' . $skt_masuk . '</td><tr>
			<tr><td style="padding-right:15px">Pengajuan SK Penunjukkan</td><td style="padding-right:15px">:</td><td>' . $skp_masuk . '</td><tr>';
        } elseif ($level != 7) {
            $output .= '<tr><td style="padding-right:15px">Pengajuan SKT</td><td style="padding-right:15px">:</td><td>' . $all_skt . '</td><tr>
			<tr><td style="padding-right:15px">Pengajuan SK Penunjukkan</td><td style="padding-right:15px">:</td><td>' . $all_skp . '</td><tr>';
        }
        if ($level != 2 && $level != 8 && $level != 6 && $level != 7) {
            $output .= '<tr><td style="padding-right:15px">Pengajuan SKT Disetujui</td><td style="padding-right:15px">:</td><td>' . $skt_naik . '</td><tr>
			<tr><td style="padding-right:15px">Pengajuan SK Penunjukkan Disetujui</td><td style="padding-right:15px">:</td><td>' . $skp_naik . '</td><tr>';
        }
        if ($level != 3 && $level != 4 && $level != 7) {
            $output .= '<tr><td style="padding-right:15px">Pengajuan Sedang Direvisi</td><td>:</td><td>' . $revisi . '</td><tr>';
        }
        if ($level == 7) {
            $output .= '<tr><td style="padding-right:15px">Dokumen siap cetak</td><td>:</td><td>' . $temps . '</td><tr>';
        }
        $output .= '</table></div>';
        return $output;
    }
예제 #5
0
 public function pilih_template_skt($id_permohonan)
 {
     setlocale(LC_ALL, 'IND');
     $template_skt = $this->model->selects('*', 'ref_template_skt', array('id_template_skt' => 1));
     $dok_skt = selects('*', 'dt_dokumen_skt');
     $permohonan = $this->model->select('*', 'permohonan', array('id_permohonan' => $id_permohonan));
     $biodata_perusahaan = $this->model->select('*', 'biodata_perusahaan', array('id_perusahaan' => $permohonan->id_perusahaan));
     $bidang_usaha = select('*', 'ref_bidang_usaha', array('id_bidang_usaha' => $permohonan->bidang_usaha));
     $sub_bidang = select('*', 'ref_sub_bidang', array('id_sub_bidang' => $permohonan->sub_bidang));
     $last_id = 0;
     if ($dok_skt != NULL) {
         foreach ($dok_skt as $key => $dok) {
             $last_skt_id = explode('/', $dok->no_dokumen);
             if ($last_skt_id[3] == date('Y')) {
                 $last_id = $last_skt_id[0] + 1;
             }
         }
     } else {
         $last_id = 1;
     }
     if ($last_id <= 99) {
         if ($last_id <= 9) {
             $last_id = '00' . $last_id;
         } else {
             $last_id = '0' . $last_id;
         }
     }
     if ($template_skt != NULL) {
         $template_skt_obj = '';
         foreach ($template_skt as $key => $template) {
             $template_skt_obj = $template->head;
             $template_skt_obj .= $last_id . '/SKT-' . $permohonan->bidang_usaha . '/DMT/' . date('Y');
             $template_skt_obj .= $template->body1;
             $template_skt_obj .= $biodata_perusahaan->nama_perusahaan;
             $template_skt_obj .= $template->body2;
             $template_skt_obj .= $biodata_perusahaan->alamat;
             $template_skt_obj .= $template->body3;
             $template_skt_obj .= '<b>' . $bidang_usaha->bidang_usaha . '</b> sub bidang <b>' . $sub_bidang->sub_bidang . '</b> dengan bagian sub bidang:</p>';
             $template_skt_obj .= '<table align="center" border="1" bordercolor="#000" cellpadding="5" cellspacing="0" style="border-collapse:collapse;">';
             if ($permohonan->bagian_sub_bidang != NULL) {
                 $bagiansubbidang = explode(',', $permohonan->bagian_sub_bidang);
                 foreach ($bagiansubbidang as $key => $bsb) {
                     $bagian_sub_bidang = select('*', 'ref_bagian_sub_bidang', array('id_bagian_sub_bidang' => $bsb));
                     if ($permohonan->sub_bagian_sub_bidang != NULL) {
                         $subbagiansubbidang = explode('#', $permohonan->sub_bagian_sub_bidang);
                         $array_sbsb = '';
                         foreach ($subbagiansubbidang as $key2 => $sbsb) {
                             $id_sbsb = explode('.', $sbsb);
                             //$sub_bagian_sub_bidang = select('*','ref_sub_bagian_sub_bidang', array('id_sub_bagian_sub_bidang' => $id_sbsb[0]));
                             if ($id_sbsb[0] == $bsb) {
                                 //$temp2[$key] = $sub_bagian_sub_bidang->sub_bagian_sub_bidang;
                                 //$hsil[$key] = $id_sbsb[1][$key];
                                 $array_sbsb .= $key2 + 1 . '. ' . $id_sbsb[1] . '<br/>';
                             }
                         }
                         if ($array_sbsb != '') {
                             $template_skt_obj .= '<tr><td><b>' . $bagian_sub_bidang->bagian_sub_bidang . '</b></td><td>' . $array_sbsb . '</td></tr>';
                         } else {
                             $template_skt_obj .= '<tr><td style="text-align:center;" colspan="2"><b>' . $bagian_sub_bidang->bagian_sub_bidang . '</b></td></tr>';
                         }
                     } else {
                         $temp[$key] = $bagian_sub_bidang->bagian_sub_bidang;
                         $template_skt_obj .= '<tr><td style="text-align:center">' . implode(', ', $temp) . '</td></tr>';
                     }
                 }
             }
             $template_skt_obj .= '';
             $template_skt_obj .= '</table>';
             $template_skt_obj .= $template->body4;
             $template_skt_obj .= $biodata_perusahaan->nama_perusahaan;
             $template_skt_obj .= $template->body5;
             $template_skt_obj .= strftime('%d %B %Y');
             $template_skt_obj .= $template->foot;
         }
     } else {
         $template_skt_obj = '';
     }
     $output = array('konsep_skt' => $template_skt_obj, 'no_skt_sementara' => $last_id . '/SKT-' . $permohonan->bidang_usaha . '/DMT/' . date('Y'));
     return $output;
     //$json['menu'] = '';
     // echo json_encode($json);
 }
예제 #6
0
function seldef(array $keys, $list, $filter = null)
{
    $function = compose(filters($filter), selects($keys));
    return $function($list);
}