Laporan Praktikum Perancangan Sistem Informasi

...

2246 downloads 4411 Views 4MB Size

Recommend Documents

LAPORAN TAHUNAN (ANNUAL REPORT) BERBASIS WEB PADA

Laporan hasil praktikum mata kuliah Sistem Informasi Manajemen, berisi tentang praktikum menggunakan microsoft access dan google form.Full description

Skripsi Teknik InformatikaDeskripsi lengkap

praktikum sistem informasi akuntansiDeskripsi lengkap

praktikum sistem informasi akuntansi

Makalah Analisis Sistem Informasi PenggajianDeskripsi lengkap

sistem informasi pengelolaan futsal berbasis website PHP dan MySQL dengan konsep UML download aplikasinya lapor dulu gan => [email protected]

Contoh Proposal Perancangan Sistem Informasi, baik dari segi software, server, juga standar ruang serverFull description

tugas, kelompok, sik, model, input, outputDeskripsi lengkap

model keamanan cnssFull description

sistem informasi penjadwalan laporatorium

Tugas Laporan Akhir untuk memenuhi Praktikum Perancangan Pabrik Pengolahan PanganFull description

Fisiologi HewanFull description

Laporan Praktikum Sistem KendaliDeskripsi lengkap

sistem komunikasiFull description



IV-72

9. Halaman Data Riwayat Pembayar Infaq dan sodaqoh

Gambar 4.26 Halaman Data Riwayat Pembayar Infaq dan Sodaqoh Source Code (Update):
// ** Logout the current user. ** $logoutAction = $_SERVER['PHP_SELF']."?doLogout=true"; if ((isset($_SERVER['QUERY_STRING'])) && ($_SERVER['QUERY_STRING'] != "")){ $logoutAction .="&". htmlentities($_SERVER['QUERY_STRING']); }

if ((isset($_GET['doLogout'])) &&($_GET['doLogout']=="true")){ //to fully log out a visitor we need to clear the session varialbles

IV-73

$_SESSION['MM_Username'] = NULL; $_SESSION['MM_UserGroup'] = NULL; $_SESSION['PrevUrl'] = NULL; unset($_SESSION['MM_Username']); unset($_SESSION['MM_UserGroup']); unset($_SESSION['PrevUrl']);

$logoutGoTo = "index.php"; if ($logoutGoTo) { header("Location: $logoutGoTo"); exit; } } ?>
$theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);

switch ($theType) { case "text": $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL"; break;

IV-74

case "long": case "int": $theValue = ($theValue != "") ? intval($theValue) : "NULL"; break; case "double": $theValue = ($theValue != "") ? doubleval($theValue) : "NULL"; break; case "date": $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL"; break; case "defined": $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue; break; } return $theValue; } }

$editFormAction = $_SERVER['PHP_SELF']; if (isset($_SERVER['QUERY_STRING'])) { $editFormAction .= "?" . htmlentities($_SERVER['QUERY_STRING']); }

if ((isset($_POST["MM_update"])) && ($_POST["MM_update"] == "form2")) { $updateSQL = sprintf("UPDATE infaq SET nama=%s, jns_donasi=%s, jumlah=%s, jns_bayar=%s, asal_bank=%s, no_rek=%s, tgl_bayar=%s, bank_tujuan=%s, pesan=%s WHERE NIS=%s", GetSQLValueString($_POST['nama'], "text"), GetSQLValueString($_POST['jns_donasi'], "text"),

IV-75

GetSQLValueString($_POST['jumlah'], "int"), GetSQLValueString($_POST['jns_bayar'], "text"), GetSQLValueString($_POST['asal_bank'], "text"), GetSQLValueString($_POST['no_rek'], "text"), GetSQLValueString($_POST['tgl_bayar'], "text"), GetSQLValueString($_POST['bank_tujuan'], "text"), GetSQLValueString($_POST['pesan'], "text"), GetSQLValueString($_POST['NIS'], "text"));

mysql_select_db($database_konek4, $konek4); $Result1 = mysql_query($updateSQL, $konek4) or die(mysql_error());

$updateGoTo = "lihat_infaq.php"; if (isset($_SERVER['QUERY_STRING'])) { $updateGoTo .= (strpos($updateGoTo, '?')) ? "&" : "?"; $updateGoTo .= $_SERVER['QUERY_STRING']; } header(sprintf("Location: %s", $updateGoTo)); }

mysql_select_db($database_konek4, $konek4); $query_Recordset1 = "SELECT * FROM infaq"; $Recordset1 = mysql_query($query_Recordset1, $konek4) or die(mysql_error()); $row_Recordset1 = mysql_fetch_assoc($Recordset1); $totalRows_Recordset1 = mysql_num_rows($Recordset1); ?>

IV-76

SIPMA <meta charset="utf-8" /> <meta name="viewport" content="width=device-width, initial-scale=1" />


IV-77



IV-78

Nama:
NIS:
Jns_donasi:
Jumlah:
Jns_bayar:
Asal_bank:
No_rek:
Tgl_bayar:
Bank_tujuan:
Pesan:
 

 





<script src="assets/js/jquery.min.js_2"> <script src="assets/js/jquery-2.1.4.js"> <script src="assets/js/velocity.min.js"> <script src="assets/js/main.js"> <script src="assets/js/jquery.min.js"> <script src="assets/js/skel.min.js"> <script src="assets/js/util.js">

IV-80

<script src="assets/js/main2.js"> <script src="assets/js/popup/jquery-1.11.1.min.js">
Source Code (Delete):
$theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);

switch ($theType) { case "text": $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL"; break; case "long": case "int": $theValue = ($theValue != "") ? intval($theValue) : "NULL";

IV-81

break; case "double": $theValue = ($theValue != "") ? doubleval($theValue) : "NULL"; break; case "date": $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL"; break; case "defined": $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue; break; } return $theValue; } }

if ((isset($_GET['NIS'])) && ($_GET['NIS'] != "")) { $deleteSQL = sprintf("DELETE FROM infaq WHERE NIS=%s", GetSQLValueString($_GET['NIS'], "text"));

mysql_select_db($database_konek4, $konek4); $Result1 = mysql_query($deleteSQL, $konek4) or die(mysql_error());

$deleteGoTo = "lihat_infaq.php"; if (isset($_SERVER['QUERY_STRING'])) { $deleteGoTo .= (strpos($deleteGoTo, '?')) ? "&" : "?"; $deleteGoTo .= $_SERVER['QUERY_STRING']; } header(sprintf("Location: %s", $deleteGoTo)); }

IV-82

?> SIPMA <meta charset="utf-8" /> <meta name="viewport" content="width=device-width, initial-scale=1" />





<script src="assets/js/jquery.min.js_2"> <script src="assets/js/jquery-2.1.4.js"> <script src="assets/js/velocity.min.js"> <script src="assets/js/main.js"> <script src="assets/js/jquery.min.js"> <script src="assets/js/skel.min.js"> <script src="assets/js/util.js"> <script src="assets/js/main2.js"> <script src="assets/js/popup/jquery-1.11.1.min.js">
Source Code (Read):
IV-84

if (!function_exists("GetSQLValueString")) { function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "") { if (PHP_VERSION < 6) { $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue; }

$theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);

switch ($theType) { case "text": $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL"; break; case "long": case "int": $theValue = ($theValue != "") ? intval($theValue) : "NULL"; break; case "double": $theValue = ($theValue != "") ? doubleval($theValue) : "NULL"; break; case "date": $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL"; break; case "defined": $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue; break; }

IV-85

return $theValue; } }

mysql_select_db($database_konek4, $konek4); $query_wisuda = "SELECT * FROM wisuda"; $wisuda = mysql_query($query_wisuda, $konek4) or die(mysql_error()); $row_wisuda = mysql_fetch_assoc($wisuda); $totalRows_wisuda = mysql_num_rows($wisuda);

mysql_select_db($database_konek4, $konek4); $query_infaq = "SELECT * FROM wisuda"; $infaq = mysql_query($query_infaq, $konek4) or die(mysql_error()); $row_infaq = mysql_fetch_assoc($infaq); $totalRows_infaq = mysql_num_rows($infaq); ?> SIPMA <meta charset="utf-8" /> <meta name="viewport" content="width=device-width, initial-scale=1" />


IV-86



IV-87

Nama NIS Jenis Donasi Jumlah Jenis Bayar Asal Bank No Rek Tgl Bayar Bank Tujuan Pesan ID Transaksi
Edit ">Delete






<script src="assets/js/jquery.min.js_2"> <script src="assets/js/jquery-2.1.4.js"> <script src="assets/js/velocity.min.js"> <script src="assets/js/main.js"> <script src="assets/js/jquery.min.js"> <script src="assets/js/skel.min.js"> <script src="assets/js/util.js"> <script src="assets/js/main2.js"> <script src="assets/js/popup/jquery-1.11.1.min.js">


?>

IV-89

10. Halaman Cetak Kwitansi

Gambar 4.27 Halaman Cetak Kwitansi Source Code:
$theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);

switch ($theType) { case "text": $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL"; break;

IV-90

case "long": case "int": $theValue = ($theValue != "") ? intval($theValue) : "NULL"; break; case "double": $theValue = ($theValue != "") ? doubleval($theValue) : "NULL"; break; case "date": $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL"; break; case "defined": $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue; break; } return $theValue; } }

$editFormAction = $_SERVER['PHP_SELF']; if (isset($_SERVER['QUERY_STRING'])) { $editFormAction .= "?" . htmlentities($_SERVER['QUERY_STRING']); }

if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "form")) { $insertSQL = sprintf("INSERT INTO infaq (nama, NIS, jns_donasi, jumlah, jns_bayar, asal_bank, no_rek, tgl_bayar, bank_tujuan) VALUES (%s, %s, %s, %s, %s, %s, %s, %s, %s)", GetSQLValueString($_POST['nama'], "text"), GetSQLValueString($_POST['nis'], "text"), GetSQLValueString($_POST['Jns_donasi'], "text"),

IV-91

GetSQLValueString($_POST['jumlah'], "int"), GetSQLValueString($_POST['jns_bayar'], "text"), GetSQLValueString($_POST['asal_bank'], "text"), GetSQLValueString($_POST['no_rek'], "text"), GetSQLValueString($_POST['tgl_bayar'], "text"), GetSQLValueString($_POST['bank_tujuan'], "text")); //$nis = $_GET['nis'];

mysql_select_db($database_konek4, $konek4); $Result1 = mysql_query($insertSQL, $konek4) or die(mysql_error()); }

//Mulai untuk menampilkan dalama tabel

// Mulai untuk print mysql_select_db($database_konek4, $konek4); $query_Recordset1 = "SELECT * FROM infaq WHERE idtrx=(SELECT MAX(idtrx) FROM infaq);"; $Recordset1 = mysql_query($query_Recordset1, $konek4) or die(mysql_error()); $row_Recordset1 = mysql_fetch_assoc($Recordset1); $totalRows_Recordset1 = mysql_num_rows($Recordset1); $number = $row_Recordset1['jumlah']; $jumlah_fr = number_format($number,0,',','.');

$tgl=date('d-m-Y'); $nk2=date('dmY');

IV-92

function terbilang($x) { $x = abs($x); $angka = array("", "satu", "dua", "tiga", "empat", "lima", "enam", "tujuh", "delapan", "sembilan", "sepuluh", "sebelas"); $temp = ""; if ($x <12) { $temp = " ". $angka[$x]; } else if ($x <20) { $temp = terbilang($x - 10). " belas"; } else if ($x <100) { $temp = terbilang($x/10)." puluh". terbilang($x % 10); } else if ($x <200) { $temp = " seratus" . terbilang($x - 100); } else if ($x <1000) { $temp = terbilang($x/100) . " ratus" . terbilang($x % 100); } else if ($x <2000) { $temp = " seribu" . terbilang($x - 1000); } else if ($x <1000000) { $temp = terbilang($x/1000) . " ribu" . terbilang($x % 1000); } else if ($x <1000000000) { $temp = terbilang($x/1000000) . " juta" . terbilang($x % 1000000); } else if ($x <1000000000000) { $temp = terbilang($x/1000000000) . " milyar" . terbilang(fmod($x,1000000000)); } else if ($x <1000000000000000) { $temp = terbilang($x/1000000000000) . " trilyun" . terbilang(fmod($x,1000000000000)); } return $temp; }

IV-93

require('phpfpdf/fpdf.php'); // intance object dan memberikan pengaturan halaman PDF $pdf = new FPDF('L','mm','A5'); // membuat halaman baru $pdf->AddPage(); // setting jenis font yang akan digunakan $pdf->SetFont('Arial','B',14); // mencetak string $pdf->SetFont('Arial','B',14); $pdf->Cell(40,6,'Lembaga Pendidikan Islam Nurul Iman',0,1,'c'); $pdf->SetFont('Arial','',11); $pdf->Cell(0,5,'Raudhatul Anfal, Madrasah Ibtidaiyah, Madrasah Tsanawiyah',0,1,'c'); $pdf->SetFont('Arial','B',10); $pdf->Cell(120,6,'Jl. H.S Ronggowaluyo Telukjambe Timur, Karawang',0,0,'L'); $pdf->SetFont('Arial','',10); $pdf->Cell(28,7,'No. Kwitansi : ',0,0,'L'); $pdf->SetFont('Courier','',12); $pdf->Cell(0,7,$row_Recordset1['idtrx'].$nk2,0,1,'L'); $pdf->SetFillColor(95, 95, 95); $pdf->Rect(5, 27.5, 198, 3, 'FD');

// Memberikan space kebawah agar tidak terlalu rapat $pdf->Cell(10,7,'',0,1);

$pdf->Cell(40);

IV-94

$pdf->SetFont('Courier','','13'); $pdf->Cell(110,8,'K w i t a n s i P e m b a y a r a n',1,0,'C'); $pdf->ln(10); $pdf->Cell(20); $pdf->SetFont('Arial','B',14); $pdf->Cell(40,8,'Terima Dari : ',0,0,'R'); $pdf->SetFont('Courier','',14); $pdf->Cell(16,8,$row_Recordset1['nama'],0,1,'L'); $pdf->Cell(20); $pdf->SetFont('Arial','B',14); $pdf->Cell(40,8,'NIS : ',0,0,'R'); $pdf->SetFont('Courier','',14); $pdf->Cell(16,8,$row_Recordset1['NIS'],0,1,'L'); $pdf->Cell(20); $pdf->SetFont('Arial','B',14); $pdf->Cell(40,8,'Uang Sejumlah : ',0,0,'R'); $pdf->SetFillColor(255, 255, 255); $pdf->SetFont('Courier','',12); $pdf->MultiCell(180,8,terbilang($row_Recordset1['jumlah']),0,'L'); $pdf->SetFont('Arial','B',14); $pdf->Cell(20); $pdf->Cell(40,8,'Untuk Pembayaran : ',0,0,'R'); $pdf->SetFont('Courier','',12); $pdf->MultiCell(120,8,$row_Recordset1['jns_donasi'],0,'L'); $pdf->SetY(-50);

$pdf->SetY(-60); $pdf->SetFont('Courier','B','16'); $pdf->Cell(60,12,'Rp '.$jumlah_fr ,1,0,'C');

IV-95

$pdf->SetY(-50); $pdf->SetFont('Courier','',12); $pdf->Cell(130); $pdf->Cell(0,6,'Karawang, '.$tgl,0,1,'C'); $pdf->Ln(10); $pdf->SetFont('Courier','B',12); $pdf->Cell(130); $pdf->Cell(0,6,'(Admin)' ,0,1,'C');

$pdf->Output(); ?>

DAFTAR PUSTAKA

Achmad, Rizki D., 2016. BASIS DATA. Universitas Singaperbangsa Karawang. Herwanto, Dene. 2016. Modul Praktikum Perancangan Sistem Informasi.Universitas Singaperbangsa Karawang.