<!DOCTYPE html> <html > <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Untitled Document</title> <style type="text/css"> <!-- body { font: 100% Verdana, Arial, Helvetica, sans-serif; background: #666666; margin: 0; /* it's good practice to zero the margin and padding of the body element to account for differing browser defaults */ padding: 0; text-align: center; /* this centers the container in IE 5* browsers. The text is then set to the left aligned default in the #container selector */ color: #000000; } .oneColFixCtrHdr #container { width: auto; /* using 20px less than a full 800px width allows for browser chrome and avoids a horizontal scroll bar */ background: #FFFFFF; margin: 0 auto; /* the auto margins (in conjunction with a width) center the page */ border: 1px solid #000000; text-align: left; /* this overrides the text-align: center on the body element. */ } .oneColFixCtrHdr #header { background: #DDDDDD; padding: 0 10px 0 20px; /* this padding matches the left alignment of the elements in the divs that appear beneath it. If an image is used in the #header instead of text, you may want to remove the padding. */ } .oneColFixCtrHdr #header h1 { margin: 0; /* zeroing the margin of the last element in the #header div will avoid margin collapse - an unexplainable space between divs. If the div has a border around it, this is not necessary as that also avoids the margin collapse */ padding: 10px 0; /* using padding instead of margin will allow you to keep the element away from the edges of the div */ } .oneColFixCtrHdr #mainContent { padding: 0 20px; /* remember that padding is the space inside the div box and margin is the space outside the div box */ background: #FFFFFF; } .oneColFixCtrHdr #footer { padding: 0 10px; /* this padding matches the left alignment of the elements in the divs that appear above it. */ background:#DDDDDD; } .oneColFixCtrHdr #footer p { margin: 0; /* zeroing the margins of the first element in the footer will avoid the possibility of margin collapse - a space between divs */ padding: 10px 0; /* padding on this element will create space, just as the the margin would have, without the margin collapse issue */ } --> </style></head> <body class="oneColFixCtrHdr"> <div id="container"> <div id="header"> <h1>Resume</h1> <!-- end #header --></div> <div id="mainContent"> <h1>HASIL</h1> <?php error_reporting("E_ALL ^ E_NOTICE"); mysql_connect("localhost", "root", ""); mysql_select_db("datapx"); $bagianWhere = ""; if (isset($_POST['medrec'])) { $medrec = $_POST['medrec']; if (empty($bagianWhere)) { $bagianWhere .= "medrec = '$medrec'"; } else { $bagianWhere .= " AND medrec LIKE '$medrec'"; } } $query = "SELECT kunjungan.idkunjung, kunjungan.medrec, kunjungan.masuk, kunjungan.keluar, kunjungan.jnsrawat, kunjungan.jnskunjung, kunjungan.carakeluar, kunjungan.diagutama, kunjungan.diasekunder, datasosial.nama, datasosial.tglahir, datasosial.umurthn, datasosial.umurhari, datasosial.jnskelamin, datasosial.bblahir, icd10.penyakit AS diagnosautama, icd10b.penyakit AS diagnosasekunder FROM kunjungan, datasosial, icd10, icd10b WHERE kunjungan.diagutama=icd10.kd_penyakit AND kunjungan.diasekunder=icd10b.kd_penyakit AND datasosial.medrec=kunjungan.medrec AND kunjungan.medrec=".$bagianWhere; $hasil = mysql_query($query) or die (mysql_error()); echo "<table border='1' cellpadding = '2' cellspacing = '1' align = 'left'>"; echo "<tr><td>id kunjungan</td><td><tr><td>MEDREC</td><td>NAMA</td></td><td>TGL MASUK</td><td>TGL KELUAR</td><td>JENIS KELAMIN</td><td>TGL Lahir</td><td>UMUR TAHUN</td> <td>UMUR HARI</td><td>JENIS KUNJUNGAN</td><td>JENIS PERAWATAN</td><td>CARA KELUAR RS</td><td>BERAT BADAN LAHIR</td><td>DIAGNOSA UTAMA</td> <td>ICD10</td><td>DIAGNOSA SEKUNDER</td><td>IC10</td></tr>"; while ($data = mysql_fetch_array($hasil)) { echo "<tr><td>".$data['idkunjung']."</td><td>".$data['medrec']."</td><td>".$data['nama']."</td><td>".$data['masuk']."</td><td>".$data['keluar']."</td><td>".$data['jnskelamin']."</td><td>".$data['tglahir']."</td> <td>".$data['umurthn']."</td><td>".$data['umurhari']."</td><td>".$data['jnskunjung']."</td><td>".$data['jnsrawat']."</td><td>".$data['carakeluar']."</td><td>".$data['bblahir']."</td><td>".$data['penyakit']."</td> <td>".$data['kd_penyakit']."</td><td>".$data['diasekunder']."</td><td>".$data['kd_penyakit']."</td></tr>"; } echo "</table>"; ?> <!-- end #mainContent --></div> <div id="footer"> <table width="317" border="1" > <tr> <th width="107" height="32" align="left" scope="row">TANGGAL : </th> <td width="199"><span id="date"><?php print date('d-m-Y'); ?></span></td> </tr> <tr> <th height="40" align="left" scope="row">JAM :</th> <td><script type="text/javascript"> //set timezone <?php date_default_timezone_set('Asia/Jakarta'); ?> //buat object date berdasarkan waktu di server var serverTime = new Date(<?php print date('Y, m, d, H, i, s, 0'); ?>); //buat object date berdasarkan waktu di client var clientTime = new Date(); //hitung selisih var Diff = serverTime.getTime() - clientTime.getTime(); //fungsi displayTime yang dipanggil di bodyOnLoad dieksekusi tiap 1000ms = 1detik function displayServerTime(){ //buat object date berdasarkan waktu di client var clientTime = new Date(); //buat object date dengan menghitung selisih waktu client dan server var time = new Date(clientTime.getTime() + Diff); //ambil nilai jam var sh = time.getHours().toString(); //ambil nilai menit var sm = time.getMinutes().toString(); //ambil nilai detik var ss = time.getSeconds().toString(); //tampilkan jam:menit:detik dengan menambahkan angka 0 jika angkanya cuma satu digit (0-9) document.getElementById("clock").innerHTML = (sh.length==1?"0"+sh:sh) + ":" + (sm.length==1?"0"+sm:sm) + ":" + (ss.length==1?"0"+ss:ss); } </script> <body onload="setInterval('displayServerTime()', 1000);"> <br/> <span id="clock"><?php print date('H:i:s'); ?></span></td> </tr> </table> <a href="/ridha/index.php">Kembali ke halaman Sebelumnya</a> <!-- end #footer --></div> <!-- end #container --></div> </body> </html>
<?php if ($_GET[mode]=="hapus"){ $xx = getData("id_reg","tb_medik","id_reg='$_GET[id]'"); if (!$xx[0]==""){ mysql_query("DELETE tb_medik, tb_resep, tb_transaksi FROM tb_medik LEFT JOIN tb_resep ON tb_medik.id_reg=tb_resep.id_reg LEFT JOIN tb_transaksi ON tb_medik.id_reg=tb_transaksi.id_reg WHERE tb_medik.id_reg='$_GET[id]'"); echo "<script> notifsukses('Success,'Data Telah Dihapus..!!'); setTimeout('window.location.href=\"media.php?page=$page\"', 2000) </script>"; }else{ echo "<script>window.location=('media.php?page=$page')</script>"; } } ?> <div class="table-header"> DATA REKAM MEDIK </div> <div class="row-fluid"> <table id="myTable" class="table table-striped table-bordered table-hover"> <thead> <tr> <th class="center" width="35px">No</th> <th class="center" width="90px">No. Registrasi</th> <th class="hidden-480 center">Nama Pasien</th> <th class="center" width="100px">Tanggal</th> <th class="hidden-480 center">Nama Dokter</th> <th class="hidden-480 center">Poliklinik</th> <th class="hidden-480 center">Diagnosa</th> <th class="center" width="100px">Pembayaran</th> <th class="hidden-480 center" width="40px">Aksi</th> </tr> </thead> <tbody> <?php $qry = mysql_query("SELECT a.*, b.nm_pasien, c.nm_dokter FROM tb_medik a LEFT JOIN tb_pasien b ON a.id_pasien=b.id_pasien LEFT JOIN m_dokter c ON a.id_dokter=c.id_dokter ORDER BY a.id_reg DESC"); while ($d = mysql_fetch_array($qry)){ $tgl = getTglIndo($d[tgl_reg]); $cSP = getNumRows("SELECT * FROM tb_medik WHERE diagnosa !=0"); $spAlert = array( "0"=>"<a href='?page=$page&act=resep&id=$d[id_reg]'> <button class='btn btn-mini btn-success' class='tooltip-info' data-rel='tooltip' data-original-title='Resep'> <span class='white'> <i class='icon-leaf bigger-120'></i> </span> </button> </a>", "1"=>"".$d['diagnosa']."</span>" ); $aSP = ($cSP>0 ? $spAlert["1"] : $spAlert["0"]); $pRS = getNumRows("SELECT * FROM tb_medik WHERE jasa !=0"); $psAlert = array( "0"=>"<a href='?page=$page&act=bayar&id=$d[id_reg]'> <button class='btn btn-mini btn-info' class='tooltip-success' data-rel='tooltip' data-original-title='Bayar'> <span class='white'> <i class='icon-dollar bigger-120'></i> </span> </button> </a>", "1"=>"".rupiah($d['jasa'])."</span>" ); $pCS = ($pRS>0 ? $psAlert["1"] : $psAlert["0"]); ?> <tr> <?php $no++; echo " <td class='center'>$no</td> <td class='center'>$d[id_reg]</td> <td class='center'>$d[nm_pasien]</td> <td class='center'>$tgl</td> <td class='center'>$d[nm_dokter]</td> <td class='center'>$d[nm_poli]</td> <td class='center'>$aSP</td> <td class='center'>$pCS</td> <td class='center'> <a href='?page=$page&mode=hapus&id=$d[id_reg]'><button class='btn btn-mini btn-yellow' onclick='return qh();' class='tooltip-error' data-rel='tooltip' data-original-title='Hapus'> <span class='red'><i class='icon-trash bigger-120'></i></span> </button></a></td>"; ?> </tr> <?php } ?> </tbody> </table> </div>
$opsi = 4; For ($i=0; $i<opsi; $i++){ Echo" <tr> <td><inout type='radio' name='jawaban$i'><textearea name='option[]'></textarea> </td> </tr>"; }
<?php error_reporting(0); error_reporting(E_ERROR | E_WARNING | E_PARSE); error_reporting(E_ALL); ini_set("error_reporting", E_ALL); error_reporting(E_ALL & ~E_NOTICE); ?> <?php //kondisi jika data SES_USER masih kosong maka... if (isset($_SESSION['SES_USER'])=="") { //merefresh halaman ke index.php echo"<meta http-equiv='refresh' content='0;url=index.php'>"; } else { //jika SES_USER tidak kosong maka... include "koneksi.php"; //memanggil koneksi ?> <?php mysql_connect("localhost","root",""); mysql_select_db("dbstok"); $query = "select max(id_trans_klr) as Kode from brg_klr"; $hasil = mysql_query($query); $data = mysql_fetch_array($hasil); $kode = $data['Kode']; $nourut = (int) substr($kode, 3, 3); $nourut++; //karakter tetap $char = "OUT"; //mengatur 02 karakter berubah-ubah $IdBaru = $char.sprintf("%03s",$nourut); ?> <style type="text/css"> caption {font-size:x-large} </style> <!-- link ke jQuery-1.4.4 --> <link rel="stylesheet" href="jQuery-1.4.4/bundle/themes/base/jquery.ui.all.css"> <script type="text/javascript" src="jQuery-1.4.4/jscript/jquery-1.4.4.min.js"></script> <script type="text/javascript" src="jQuery-1.4.4/jscript/jquery-ui-1.8.9.custom.min.js"></script> <script type="text/javascript" src="jQuery-1.4.4/bundle/ui/jquery.ui.datepicker.js"></script> <script> <!-- Javascript untuk fungsi kalender --> $(function() { $( "#tanggal" ).datepicker({ changeMonth: true, changeYear: true, dateFormat:'yy-mm-dd', yearRange: '1980:c+9' }); }); </script> <style type="text/css"> a { text-decoration: none; } .inputnonaktif { background-color:#6F9; } </style> <link href="thickbox/thickbox.css" rel="stylesheet" type="text/css" /> <script language="javascript" src="jquery/jquery-1.2.6.js"></script> <script language="javascript" src="thickbox/thickbox.js"></script> <script language="javascript"> var $jnoc = jQuery.noConflict(); $jnoc(document).ready(function(){ $jnoc("a.slick").click(function(){ $jnoc(".active").removeClass("active"); $jnoc(this).addClass("active"); $jnoc(".content-slick").slideUp(); var content_show = $jnoc(this).attr("title"); $jnoc("#" +content_show).slideDown(); }); }); function selectbarang(kode_brg,nama_brg,kualitas,id_suplier){ $jnoc('input[@name=kode_brg]').val(kode_brg); $jnoc('input[@name=nama_brg]').val(nama_brg); $jnoc('input[@name=kualitas]').val(kualitas); $jnoc('input[@name=id_suplier]').val(id_suplier); tb_remove(); // hilangkan dialog thickbox } function selectbrg_klr(kode_brg,nama_brg,kualitas,id_suplier){ $jnoc('input[@name=kode_brg]').val(kode_brg); $jnoc('input[@name=nama_brg]').val(nama_brg); $jnoc('input[@name=kualitas]').val(kualitas); $jnoc('input[@name=id_suplier]').val(id_suplier); tb_remove(); // hilangkan dialog thickbox } </script> <form name="frmSimpan" method="post" action="" enctype="multipart/form-data"> <table width="450" align="center"> <caption>INPUT BARANG KELUAR<br><br></caption> <tr> <td width="50%">ID Transaksi Keluar</td> <td width="2%">:</td> <td width="66%"> <!-- echo $data['nim']; digunakan untuk menampilkan data dari field nim --> <input type="text" name="id_trans_klr" maxlength="15" size="9" required="" value="<?php echo $IdBaru; ?>" readonly> </td> </tr> <tr> <td width="50%">Kode Barang</td> <td width="2%">:</td> <td width="66%"> <input type="text" name="kode_brg" size="30" class="inputnonaktif" maxlength="8" required="" readonly id="kode_brg"><a href="cari_barang.php?width=400&height=400" class="thickbox"><input type="submit" name="browse" id="browse3" value="Browse" /></a> *cari kode barang</tr></td> <tr> <td width="50%">Nama Barang</td> <td width="2%">:</td> <td width="66%"> <input name="nama_brg" size="30" maxlength="30" required="" readonly> </td> </tr> <!--<input type="text" name="id_daftar" size="30" class="inputnonaktif" maxlength="8" required="" readonly id="id_daftar"><a href="cari_daftar.php?width=600&height=400" class="thickbox"><input type="submit" name="browse" id="browse3" value="Browse" /></a> *cari id pendaftaran</tr></td> --> <tr> <td width="50%">Kualitas</td> <td width="2%">:</td> <td width="66%"> <!-- echo $data['nama']; digunakan untuk menampilkan data dari field nama --> <input name="kualitas" size="30" maxlength="30" required="" readonly> </td> </tr> <tr> <td width="50%">ID Suplier</td> <td width="2%">:</td> <td width="66%"> <!-- echo $data['nama']; digunakan untuk menampilkan data dari field nama --> <input name="id_suplier" size="30" maxlength="30" required="" readonly> </td> </tr> <tr> <td width="32%">Tanggal Keluar</td> <td width="2%">:</td> <td width="66%"> <input type="text" name="tgl_klr" id="tanggal"/> </td> </tr> <tr> <td width="32%">Jumlah Keluar</td> <td width="2%">:</td> <td width="66%"> <input name="jml_klr" size="30" maxlength="30" required="" > </td> </tr> <tr> <td width="32%"> </td> <td width="2%"> </td> <td width="66%"> <input name="btnSimpan" type="submit" value="Simpan"> <!-- membuat link ke mahasiswa_tampil.php pada tombol Batal --> <input name="btnBatal" type="reset" onclick="window.location.href='?page=barang_keluar&hal=1'" value="Batal" /> </td> </tr> </table> </form> <?php //jika tombol Simpan di klik maka... if (isset($_POST['btnSimpan'])) { /* eksekusi query untuk memasukkan data pada tb_mahasiswa dengan field yang diisi nim,nama,jekel,alamat,sts_mhs ".$_POST['txtNIM']." digunakan menampung data dari txtNIM ... dst */ $sql_insert = "INSERT INTO brg_klr (id_trans_klr,tgl_klr,kode_brg,nama_brg,jml_klr,id_suplier) VALUES ( '".$_POST['id_trans_klr']."', '".$_POST['tgl_klr']."', '".$_POST['kode_brg']."', '".$_POST['nama_brg']."', '".$_POST['jml_klr']."', '".$_POST['id_suplier']."')"; $query_insert = mysql_query($sql_insert) or die (mysql_error()); //mengcopy file gambar ke lokasi yang ditentukan [folder=imgFoto] //jika proses penyimpanan berhasil maka... if ($query_insert) { //menampilkan pesan data berhasil disimpan echo"<script>alert('Simpan data berhasil !')</script>"; //merefresh halaman ke mahasiswa_tampil.php echo "<meta http-equiv='refresh' content='0; url=?page=barang_keluar&hal=1'>"; } } }//menutup kondisi jika SES_USER tidak kosong di atas ?>