<?php
    include('loginsession.php');
    error_reporting(E_ALL);
    $filename = __FILE__;  //---Nama file saat ini
    if (strlen(__FILE__) > 48) {$filename = substr(__FILE__, 48);}
    $save = mysqli_query($conn, "INSERT INTO novia_abc_user_logs (userid,filename) VALUES ('$userini_id','$filename')");
//-------------
?>

<!doctype html public "-//W3C//DTD HTML 4.0 //EN">
<html>
	<head>
	   <title>PASIEN BARU</title>
		<meta charset="utf-8">
		<meta name="viewport" content="width=device-width, initial-scale=1">
		<link rel="stylesheet" type="text/css" href="css/style.css">
		<link href="images/balance.ico" rel="icon" type="image/icon" />
	</head>
<body>

<?php
//ambil data berdasarkan parameter GET id
$b = mysqli_fetch_array(mysqli_query($conn, "SELECT id, mr, name FROM novia_abc_biodata where mr='$_GET[mr]'"));
?>

	<table width="100%" max-width="600px"" cellpadding="5" align="center">
		<tbody>
			<tr>
				<td><a href="status-view.php?id=<?php echo $b["id"];?>"" title="KEMBALI"><button style="padding : 10px; width:100%">BATALKAN PENDAFTARAN</button></a></td>
			</tr>
		</tbody>
	</table>

<form  method="post"  action="daftar_mundur_insert.php">
	<table width="100%" max-width="600px" cellpadding="5" align="center">
    <tbody>
    <tr class="satu">
		<td colspan="3" style='text-transform:uppercase' align="center">
			<h1><?php echo $b['mr']; ?> - <?php echo $b['name'];?></h1>
		</td>
	</tr>
    <tr class="head" align="left">
		<th width="150">Parameter</th>
        <th>Data Pasien</th>
    </tr>
    <tr class="satu"><td colspan="3"><?php echo $error;?></td></tr>
    <tr class="satu">
        <td>MR</td>
        <td><input type="text" name="mr" placeholder="mr" size="20" maxlength="30" autocomplete="off" autofocus value="<?php echo $b["mr"]; ?>"/></td>
    </tr>
    <tr class="dua">
        <td>Tanggal Datang</td>
        <td><input type="text" name="tgl_datang" placeholder="tgl_datang" size="20" maxlength="30" autocomplete="off" autofocus value="2024-10-01"/></td>
    </tr>		    <tr class="satu">        <td>SISTOLE - TDA</td>        <td><input type="text" name="sistole" placeholder="" size="1" maxlength="3" autocomplete="off" autofocus value="" /></td>    </tr>	    <tr class="satu">        <td>DIASTOLE - TDB</td>        <td><input type="text" name="diastole" placeholder="" size="1" maxlength="3" autocomplete="off" autofocus value="" /></td>    </tr>	    <tr class="satu">        <td>NADI</td>        <td><input type="text" name="pulse" placeholder="" size="1" maxlength="3" autocomplete="off" autofocus value="" /></td>    </tr>	    <tr class="satu">        <td>BB</td>        <td><input type="text" name="weight" placeholder="" size="1" maxlength="3" autocomplete="off" autofocus value="" /></td>    </tr>				
    <tr class="satu">
        <td>ANAMNESA<BR>PEMERIKSAAN<BR>DIAGNOSA</td>
		<td><textarea name="anamnesa" placeholder="anamnesa" rows="3" cols="23"/></textarea></td>
    </tr>
    <tr class="dua">
        <td>TINDAKAN</td>
		<td><textarea name="tindakan" placeholder="tindakan" rows="3" cols="23"/></textarea></td>
    </tr>
    <tr class="satu">
        <td>BIAYA</td>
        <td><input type="text" name="biaya" placeholder="biaya" size="20" maxlength="30" autocomplete="off" autofocus value=""/></td>
    </tr>
    <tr class="dua">
		<td><input type="text" name="password" placeholder="Masukkan Password" size="15" maxlength="30" value=""/></td>
        <td colspan="1"><button type="submit" name="simpan" style="padding: 10px; width: 100%">DAFTARKAN UNTUK HARI INI</button</td>
    </tr>
</tbody>
</table>
</form>
</body>
</html>