Skip to content
This repository has been archived by the owner on Oct 16, 2021. It is now read-only.

Commit

Permalink
Fix ajax-pinjam.php
Browse files Browse the repository at this point in the history
  • Loading branch information
suciptoid committed May 25, 2015
1 parent 97a54e0 commit 17cb03a
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions ajax/ajax-pinjam.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
//**tgl kembali**//
$waktu = date("d-n-Y", mktime(0,0,0,date("m"),date("d")+get_sistem("lama"),date("Y")));
$x=explode('-', $waktu);
$hari2=$x['0'];
$hari2=$x['0'];
$bulan2=$x['1'];
$tahun2=date('Y');
$bln2=$indo[$bulan2-1];
Expand Down Expand Up @@ -52,7 +52,7 @@
//Petugas
$ptgs=$_SESSION['uid'];
//Sql Query
$peminjaman=mysql_query("INSERT INTO tbl_peminjaman SET siswa=\"$dsiswa\", buku=\"$dbuku\", tgl_tempo=\"$tgl_kembali\", tgl_pinjam=\"$tgl_pinjam\", id_petugas=\"$ptgs\"");
$peminjaman=mysql_query("INSERT INTO tbl_peminjaman SET siswa=\"$dsiswa\", buku=\"$dbuku\", tgl_tempo=\"$tgl_kembali\", tgl_pinjam=\"$tgl_pinjam\", id_petugas=\"$ptgs\"");
//Debug
// echo "INSERT INTO tbl_peminjaman SET siswa=\"$dsiswa\", buku=\"$dbuku\", tgl_kembali=\"2013-01-01\", tgl_pinjam=\"2013-01-01\", id_petugas=\"99\"";
if($peminjaman){
Expand Down Expand Up @@ -95,7 +95,7 @@
<?php

if($_POST["siswa"] or $_GET["siswa"]){

$siswa->setInduk($_POST["siswa"]);
?>
<?php if($siswa->cekAda()){ ?>
Expand All @@ -106,7 +106,7 @@
</tr>
<tr>
<td>Kelas / Jurusan</td><td>:</td><td><?php echo $siswa->getKelas()." ".$siswa->getJurusan(); ?></td>
</tr>
</tr>
</table>
<?php
$siswa_ada=true;
Expand Down Expand Up @@ -150,17 +150,17 @@
})
</script>
<a href="#" class="btn btn-primary" id="tmbl-pinjam">Pinjam</a> <a class="btn" href="#" data-dismiss="modal" aria-hidden="true">Batal</a>
<?
<?php
}
?>
<?php }else{ ?>
<script type='text/javascript'>
$("#pop-pinjam").on('shown',function(){
$('input[name="siswa"]').focus();
})

</script>
<?php
}; //end if $_POST["siswa"]
}; //end if $_POST["siswa"]
?>
</div><!--div content-->

0 comments on commit 17cb03a

Please sign in to comment.