<html>
<!DOCTYPE html>
<head>
<title></title>
</head>
<body>
<style type="text/css">
.table-data{
width: 100%;
border-collapse: collapse;
}
.table-data tr th,
.table-data tr td{
border:1px solid black;
font-size: 10pt;
}
</style>
<h3>Laporan Data Buku Perputakaan Online</h3>
<br/>
<table class="table-data">
<thead>
<tr>
<th>No</th>
<th>Judul Buku</th>
<th>Pengarang</th>
<th>Tahun Terbit</th>
<th>Penerbit</th>
<th>ISBN</th>
<th>Jumlah Buku</th>
<th>Lokalisasi</th>
</tr>
</thead>
<tbody>
<?php
$no = 1;
foreach($buku as $b){
?>
<tr>
<td><?php echo $no++; ?></td>
<td><?php echo $b->judul_buku; ?></td>
<td><?php echo $b->pengarang; ?></td>
<td><?php echo $b->thn_terbit; ?></td>
<td><?php echo $b->penerbit; ?></td>
<td><?php echo $b->isbn; ?></td>
<td><?php echo $b->jumlah_buku; ?></td>
<td><?php echo $b->lokasi; ?></td>
</tr>
<?php
}
?>
</tbody>
</table>
</body>
</html>
Tuesday, March 19, 2019
laporan_print_buku.php
<!DOCTYPE html>
<html>
<head>
<title></title>
</head>
<body>
<style type="text/css">
.table-data{
width: 100%;
border-collapse: collapse;
}
.table-data tr th,
.table-data tr td{
border:1px solid black;
font-size: 10pt;
}
</style>
<h3>Laporan Data Buku Perputakaan Online</h3>
<br/>
<table class="table-data">
<thead>
<tr>
<th>No</th>
<th>Gambar</th>
<th>Judul Buku</th>
<th>Pengarang</th>
<th>Tahun Terbit</th>
<th>Penerbit</th>
<th>ISBN</th>
<th>Jumlah Buku</th>
<th>Lokasi</th>
</tr>
</thead>
<tbody>
<?php
$no = 1;
foreach($buku as $b){
?>
<tr>
<td><?php echo $no++; ?></td>
<td><img src="<?php echo base_url().'/assets/upload/'.$b->gambar; ?>"
width="80" height="80" alt="gambar tidak ada"></td>
<td><?php echo $b->judul_buku; ?></td>
<td><?php echo $b->pengarang; ?></td>
<td><?php echo $b->thn_terbit; ?></td>
<td><?php echo $b->penerbit; ?></td>
<td><?php echo $b->isbn; ?></td>
<td><?php echo $b->jumlah_buku; ?></td>
<td><?php echo $b->lokasi; ?></td>
</tr>
<?php
}
?>
</tbody>
</table>
<script type="text/javascript">
window.print();
</script>
</body>
</html>
<html>
<head>
<title></title>
</head>
<body>
<style type="text/css">
.table-data{
width: 100%;
border-collapse: collapse;
}
.table-data tr th,
.table-data tr td{
border:1px solid black;
font-size: 10pt;
}
</style>
<h3>Laporan Data Buku Perputakaan Online</h3>
<br/>
<table class="table-data">
<thead>
<tr>
<th>No</th>
<th>Gambar</th>
<th>Judul Buku</th>
<th>Pengarang</th>
<th>Tahun Terbit</th>
<th>Penerbit</th>
<th>ISBN</th>
<th>Jumlah Buku</th>
<th>Lokasi</th>
</tr>
</thead>
<tbody>
<?php
$no = 1;
foreach($buku as $b){
?>
<tr>
<td><?php echo $no++; ?></td>
<td><img src="<?php echo base_url().'/assets/upload/'.$b->gambar; ?>"
width="80" height="80" alt="gambar tidak ada"></td>
<td><?php echo $b->judul_buku; ?></td>
<td><?php echo $b->pengarang; ?></td>
<td><?php echo $b->thn_terbit; ?></td>
<td><?php echo $b->penerbit; ?></td>
<td><?php echo $b->isbn; ?></td>
<td><?php echo $b->jumlah_buku; ?></td>
<td><?php echo $b->lokasi; ?></td>
</tr>
<?php
}
?>
</tbody>
</table>
<script type="text/javascript">
window.print();
</script>
</body>
</html>
dari view(header.php) ke controller(admin.php) balik lg ke view(laporan.php)
tambahkan skrip ini di file admin.php seblm tutup kurawal paling bawah.
function cetak_laporan_buku(){
$data['buku'] = $this->M_perpus->get_data('buku')->result();
$this->load->view('admin/header');
$this->load->view('admin/laporan_buku', $data);
$this->load->view('admin/footer');
}
function laporan_print_buku(){
$data['buku'] = $this->M_perpus->get_data('buku')->result();
$this->load->view('admin/laporan_print_buku',$data);
}
function laporan_pdf_buku(){
$this->load->library('dompdf_gen');
$data['buku'] = $this->M_perpus->get_data('buku')->result();
$this->load->view('admin/laporan_pdf_buku', $data);
$paper_size = 'A4'; // ukuran kertas
$orientation = 'landscape'; //tipe format kertas potrait atau landscape
$html = $this->output->get_output();
$this->dompdf->set_paper($paper_size, $orientation);
//Convert to PDF
$this->dompdf->load_html($html);
$this->dompdf->render();
$this->dompdf->stream("laporan_data_buku.pdf", array('Attachment'=>0));
// nama file pdf yang di hasilkan
}
Function cetak_laporan_anggota(){
$data['anggota'] = $this->M_perpus->get_data('anggota')->result();
$this->load->view('admin/header');
$this->load->view('admin/laporan_anggota', $data);
$this->load->view('admin/footer');
}
function laporan_print_anggota(){
$data['anggota'] = $this->M_perpus->get_data('anggota')->result();
$this->load->view('admin/laporan_print_anggota',$data);
}
function laporan_pdf_anggota(){
$this->load->library('dompdf_gen');
$data['anggota'] = $this->M_perpus->get_data('anggota')->result();
$this->load->view('admin/laporan_pdf_anggota', $data);
$paper_size = 'A4'; // ukuran kertas
$orientation = 'landscape'; //tipe format kertas potrait atau landscape
$html = $this->output->get_output();
$this->dompdf->set_paper($paper_size, $orientation);
//Convert to PDF
$this->dompdf->load_html($html);
$this->dompdf->render();
$this->dompdf->stream("laporan_data_anggota.pdf", array('Attachment'=>0));
// nama file pdf yang di hasilkan
}
function laporan_transaksi(){
$dari = $this->input->post('dari');
$sampai = $this->input->post('sampai');
$this->form_validation->set_rules('dari','Dari Tanggal','required');
$this->form_validation->set_rules('sampai','Sampai Tanggal','required');
if($this->form_validation->run() != false){
$data['laporan'] = $this->db->query("select * from peminjaman p,detail_pinjam d,
buku b,anggota a where d.id_buku=b.id_buku and p.id_anggota=a.id_anggota
and p.id_pinjam=d.id_pinjam and date(tanggal_input) >= '$dari'")->result();
$this->load->view('admin/header');
$this->load->view('admin/laporan_filter_transaksi',$data);
$this->load->view('admin/footer');
}else{
$this->load->view('admin/header');
$this->load->view('admin/laporan_transaksi');
$this->load->view('admin/footer');
}
}
function laporan_print_transaksi(){
$dari = $this->input->get('dari');
$sampai = $this->input->get('sampai');
if($dari != "" && $sampai != ""){
$data['laporan'] = $this->db->query("select * from peminjaman p,detail_pinjam d,buku b,anggota a where d.id_buku=b.id_buku and p.id_anggota=a.id_anggota and p.id_pinjam=d.id_pinjam and date(tanggal_input) >= '$dari'")->result();
$this->load->view('admin/laporan_print_transaksi',$data);
}else{
redirect("admin/laporan_transaksi");
}
}
function laporan_pdf_transaksi(){
$this->load->library('dompdf_gen');
$dari = $this->input->get('dari');
$sampai = $this->input->get('sampai');
$data['laporan'] = $this->db->query("select * from peminjaman p,detail_pinjam d,buku b,anggota a
where d.id_buku=b.id_buku and p.id_anggota=a.id_anggota and p.id_pinjam=d.id_pinjam and date(tanggal_input)
>= '$dari'")->result();
$this->load->view('admin/laporan_pdf_transaksi', $data);
$paper_size = 'A4'; // ukuran kertas
$orientation = 'landscape'; //tipe format kertas potrait atau landscape
$html = $this->output->get_output();
$this->dompdf->set_paper($paper_size, $orientation);
//Convert to PDF
$this->dompdf->load_html($html);
$this->dompdf->render();
$this->dompdf->stream("laporan_data_transaksi.pdf", array('Attachment'=>0));
}
laporan_buku.php
<div class="page-header">
<h3>Cetak Data Buku</h3>
</div>
<a class="btn btn-default btn-md" href="<?php echo base_url().'admin/laporan_print_buku' ?>">
<span class="glyphicon glyphicon-print"></span>
Print</a>
<a class="btn btn-warning btn-md" href="<?php echo base_url().'admin/laporan_pdf_buku' ?>">
<span class="glyphicon glyphicon-print"></span>
Cetak PDF</a>
<br><br>
<div class="table-responsive">
<table class="table table-bordered table-striped table-hover">
<thead>
<tr>
<th>No</th>
<th>Judul Buku</th>
<th>Pengarang</th>
<th>Penerbit</th>
<th>Tahun Terbit</th>
<th>ISBN</th>
<th>Lokasi</th>
</tr>
</thead>
<tbody>
<?php
$no = 1;
foreach ($buku as $b) {
?>
<tr>
<td><?php echo $no++; ?></td>
<td><?php echo $b->judul_buku ?></td>
<td><?php echo $b->pengarang ?></td>
<td><?php echo $b->penerbit ?></td>
<td><?php echo $b->thn_terbit ?></td>
<td><?php echo $b->isbn ?></td>
<td><?php echo $b->lokasi ?></td>
</tr>
<?php } ?>
</tbody>
</table>
</div>
<h3>Cetak Data Buku</h3>
</div>
<a class="btn btn-default btn-md" href="<?php echo base_url().'admin/laporan_print_buku' ?>">
<span class="glyphicon glyphicon-print"></span>
Print</a>
<a class="btn btn-warning btn-md" href="<?php echo base_url().'admin/laporan_pdf_buku' ?>">
<span class="glyphicon glyphicon-print"></span>
Cetak PDF</a>
<br><br>
<div class="table-responsive">
<table class="table table-bordered table-striped table-hover">
<thead>
<tr>
<th>No</th>
<th>Judul Buku</th>
<th>Pengarang</th>
<th>Penerbit</th>
<th>Tahun Terbit</th>
<th>ISBN</th>
<th>Lokasi</th>
</tr>
</thead>
<tbody>
<?php
$no = 1;
foreach ($buku as $b) {
?>
<tr>
<td><?php echo $no++; ?></td>
<td><?php echo $b->judul_buku ?></td>
<td><?php echo $b->pengarang ?></td>
<td><?php echo $b->penerbit ?></td>
<td><?php echo $b->thn_terbit ?></td>
<td><?php echo $b->isbn ?></td>
<td><?php echo $b->lokasi ?></td>
</tr>
<?php } ?>
</tbody>
</table>
</div>
Monday, March 18, 2019
TAMBAH SUB MENU LAPORAN
file header.php
<li class="dropdown"><a href="<?php echo base_url().'#'; ?>" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" ariaexpanded="false"> <span class="glyphicon glyphicon-list-alt"></span>Laporan<span class="caret"></span></a>
<ul class="dropdown-menu">
<li><a href="<?php echo base_url().'admin/cetak_laporan_buku' ?>">
<i class="glyphicon glyphicon-lock"></i>Laporan Data Buku</a></li>
<li><a href="<?php echo base_url().'admin/cetak_laporan_anggota' ?>">
<i class="glyphicon glyphicon-lock"></i>Laporan Data Anggota</a></li>
<li><a href="<?php echo base_url().'admin/laporan_transaksi' ?>">
<i class="glyphicon glyphicon-lock"></i>Laporan Data Transaksi</a></li>
</ul>
</li>
<li class="dropdown"><a href="<?php echo base_url().'#'; ?>" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" ariaexpanded="false"> <span class="glyphicon glyphicon-list-alt"></span>Laporan<span class="caret"></span></a>
<ul class="dropdown-menu">
<li><a href="<?php echo base_url().'admin/cetak_laporan_buku' ?>">
<i class="glyphicon glyphicon-lock"></i>Laporan Data Buku</a></li>
<li><a href="<?php echo base_url().'admin/cetak_laporan_anggota' ?>">
<i class="glyphicon glyphicon-lock"></i>Laporan Data Anggota</a></li>
<li><a href="<?php echo base_url().'admin/laporan_transaksi' ?>">
<i class="glyphicon glyphicon-lock"></i>Laporan Data Transaksi</a></li>
</ul>
</li>
Monday, March 11, 2019
Subscribe to:
Posts (Atom)
logika algo: deret hitung suku ke n
#include <conio.h> #include <iostream> #include <stdio> main(){ int n=6,i,bil; for(i=1;i<=n;i++) { ...
-
Alergi = Punya keinginan yang kuat di barengi dengan kejengkelan, ada amalan salah untuk keselamatan = Ambisi tinggi, ambisi untuk diseg...
-
Jwban dikirim via mail ke mail esyamsul@gmail.com paling lambat pertemuan berikutnya