$nambiggie[slices] = "slices/forsumberdatakapal.jpg";
?>

<?php 
if ($_POST["namsubmitproses"]) {
    if (!empty($_FILES["namtextlokasifile"]["name"]) && !empty($namtextshipsailstatus)) {
        if ($_FILES["namtextlokasifile"]["type"] == "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" || $_FILES["namtextlokasifile"]["type"] == "application/vnd.ms-excel") {
            funplog($_SERVER['REMOTE_ADDR'], $_SESSION["penggunaid"], "Sumber Data: Impor XLS", "RUN", "1", "", "");
            require_once $deflink . "class/phpexcel/PHPExcel/IOFactory.php";
            $inputFileType = PHPExcel_IOFactory::identify($_FILES["namtextlokasifile"]["tmp_name"]);
            $objReader = PHPExcel_IOFactory::createReader($inputFileType);
            $objReader->setReadDataOnly(true);
            $objReader->setLoadSheetsOnly("template");
            $objPHPExcel = $objReader->load($_FILES["namtextlokasifile"]["tmp_name"]);
            $objWorksheet = $objPHPExcel->getActiveSheet();
            $buatsumberid = funtheid("xls");
            $buatsumbertimeimported = date("Y-m-d H:i:s");
            $buatshipname = trim(strip_tags(funbuangkarakteraneh($objWorksheet->getCell('D1')->getValue())));
            if (!empty($buatshipname)) {
                $buatshipdepartureport = trim(strip_tags(funbuangkarakteraneh($objWorksheet->getCell('D2')->getValue())));
                $buatshipdestinationport = trim(strip_tags(funbuangkarakteraneh($objWorksheet->getCell('D3')->getValue())));
                $buatshipdeparturedate = funkoreksiexceldate($objWorksheet->getCell('D4')->getValue());
                $buatshipdestinationdate = funkoreksiexceldate($objWorksheet->getCell('D5')->getValue());
                if ($namtextshipsailstatus == "D" && !empty($buatshipdeparturedate)) {
                    $lanjut = 1;
                }
                if ($namtextshipsailstatus == "A" && !empty($buatshipdestinationdate)) {
                    $lanjut = 1;
                }
                $highestRow = $objWorksheet->getHighestRow();
                for ($row = 8; $row <= $highestRow; ++$row) {
$filefetchercarrierubah = "ffswubahcase=saatproses&" . "namsubmitubahdatapribadipenumpang=ok&" . "namtextubahpenumpangnama='+document.getElementById('namtextubahpenumpangnama').value+'&" . "namtextubahpenumpangjeniskelamin='+document.getElementById('namtextubahpenumpangjeniskelamin').value+'&" . "namtextubahpenumpangtempatlahir='+document.getElementById('namtextubahpenumpangtempatlahir').value+'&" . "namtextubahpenumpangwaktulahirtanggal='+document.getElementById('namtextubahpenumpangwaktulahirtanggal').value+'&" . "namtextubahpenumpangwaktulahirbulan='+document.getElementById('namtextubahpenumpangwaktulahirbulan').value+'&" . "namtextubahpenumpangwaktulahirtahun='+document.getElementById('namtextubahpenumpangwaktulahirtahun').value+'&" . "namtextubahpenumpangagama='+document.getElementById('namtextubahpenumpangagama').value+'&" . "namtextubahpenumpangalamatjalan='+encodeURI(document.getElementById('namtextubahpenumpangalamatjalan').value)+'&" . "namtextubahpenumpangalamatkota='+document.getElementById('namtextubahpenumpangalamatkota').value+'&" . "namtextubahpenumpangalamatkodepos='+document.getElementById('namtextubahpenumpangalamatkodepos').value+'&" . "namtextubahpenumpangalamatnotel='+document.getElementById('namtextubahpenumpangalamatnotel').value+'&" . "namtextubahpenumpangatensistatus='+document.getElementById('namtextubahpenumpangatensistatus').value+'&" . "namtextubahpenumpangatensiketerangan='+encodeURI(document.getElementById('namtextubahpenumpangatensiketerangan').value)+'&" . "namtextubahpenumpangpasporno='+document.getElementById('namtextubahpenumpangpasporno').value+'&" . "namtextubahpenumpangpasporpoi='+document.getElementById('namtextubahpenumpangpasporpoi').value+'&" . "namtextubahpenumpangpaspordoitanggal='+document.getElementById('namtextubahpenumpangpaspordoitanggal').value+'&" . "namtextubahpenumpangpaspordoibulan='+document.getElementById('namtextubahpenumpangpaspordoibulan').value+'&" . "namtextubahpenumpangpaspordoitahun='+document.getElementById('namtextubahpenumpangpaspordoitahun').value+'&" . "namtextubahpenumpangkebangsaan='+document.getElementById('namtextubahpenumpangkebangsaan').value+'&" . "namtextubahpenumpangciriciri='+encodeURI(document.getElementById('namtextubahpenumpangciriciri').value)+'&" . "namtexttmplokasifotobinary1='+document.getElementById('namiframefoto').contentWindow.document.getElementById('namtexttmplokasifotobinary1').value+'&" . "namtexttmplokasifotobinary2='+document.getElementById('namiframefoto').contentWindow.document.getElementById('namtexttmplokasifotobinary2').value+'&" . "namtexttypefoto='+document.getElementById('namiframefoto').contentWindow.document.getElementById('namtexttypefoto').value+'&" . "namtexttmplokasifotopasporbinary1='+document.getElementById('namiframefotopaspor').contentWindow.document.getElementById('namtexttmplokasifotopasporbinary1').value+'&" . "namtexttmplokasifotopasporbinary2='+document.getElementById('namiframefotopaspor').contentWindow.document.getElementById('namtexttmplokasifotopasporbinary2').value+'&" . "namtexttypefotopaspor='+document.getElementById('namiframefotopaspor').contentWindow.document.getElementById('namtexttypefotopaspor').value+'";
$loadingtime = 0;
$pesanpesan = ijinkan("namsubmitbuatdatapribadipenumpang=1,2;" . "namsubmitubahdatapribadipenumpang=1,2;" . "tandahapus=1");
?>

<?php 
$nambiggie[text] = "Identifikasi Penumpang";
$nambiggie[slices] = "slices/foridentifikasipenumpang.jpg";
?>

<?php 
if ($_POST["namsubmitbuatdatapribadipenumpang"] == "ok") {
    sleep($loadingtime);
    if (!empty($_POST["namtextbuatpenumpangnama"]) && !empty($_POST["namtextbuatpenumpangjeniskelamin"])) {
        funplog($_SERVER['REMOTE_ADDR'], $_SESSION["penggunaid"], "Data Penumpang: Buat Baru", "RUN", "1", "", "");
        $buatpenumpangid = funtheid("pnp");
        $buatpenumpangnama = trim(strip_tags(funbuangkarakteraneh($_POST["namtextbuatpenumpangnama"])));
        $buatpenumpangnama = ucwords($buatpenumpangnama);
        $buatpenumpangjeniskelamin = $_POST["namtextbuatpenumpangjeniskelamin"];
        $buatpenumpangtempatlahir = trim(strip_tags(funbuangkarakteraneh($_POST["namtextbuatpenumpangtempatlahir"])));
        $buatpenumpangtempatlahir = ucwords($buatpenumpangtempatlahir);
        $buatpenumpangwaktulahirtahun = $_POST["namtextbuatpenumpangwaktulahirtahun"];
        $buatpenumpangwaktulahirbulan = $_POST["namtextbuatpenumpangwaktulahirbulan"];
        $buatpenumpangwaktulahirtanggal = $_POST["namtextbuatpenumpangwaktulahirtanggal"];
        $buatpenumpangwaktulahir = $buatpenumpangwaktulahirtahun . "-" . $buatpenumpangwaktulahirbulan . "-" . $buatpenumpangwaktulahirtanggal;
        $buatpenumpangagama = trim(strip_tags(funbuangkarakteraneh($_POST["namtextbuatpenumpangagama"])));
        $buatpenumpangagama = ucwords($buatpenumpangagama);
        $buatpenumpangalamatjalan = trim(strip_tags(funbuangkarakteraneh($_POST["namtextbuatpenumpangalamatjalan"])));
        $buatpenumpangalamatjalan = ucwords($buatpenumpangalamatjalan);
        $buatpenumpangalamatkota = trim(strip_tags(funbuangkarakteraneh($_POST["namtextbuatpenumpangalamatkota"])));
        $buatpenumpangalamatkota = ucwords($buatpenumpangalamatkota);