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

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//ID" "http://www.w3.org/TR/html4/frameset.dtd">
<html lang="id">
<head>
	<title>CATATAN 01</title>
	<meta charset="utf-8">
	<meta name="viewport" content="width=device-width, initial-scale=1">
	<link href="../css/style.css" rel="stylesheet" type="text/css">
	<link href="../css/new.css" rel="stylesheet" type="text/css">
	<link href="../images/balance.ico" rel="icon" type="image/icon"/>

	<style>

        body {
            color : #fff;
            }    
        input[type=text],input[type=password]
		{
		width:60%;
		padding:8px;
		margin-top:8px;
		margin-bottom:8px;
		border:1px solid #ccc;
		padding-left:5px;
		font-size:18px;
		}

		input[type=submit]
		{
		width:35%;
		background-color:#8baca4;
		color:#FFFFFF;
		border:2px solid #8baca4;
		padding:6px;
		font-size:18px;
		cursor:pointer;
		border-radius:5px;
		}
		img {
            width: 100%;
            max-width: 500px;
            height: auto;
        }
        h1 {
            color:#B61A1A;
            text-align: center;
            font-family: "Times New Roman";
            text-shadow:1px 1px 0px #CCC;
        }
	    
    </style>	
</head>
<body>
<br>
<a href="../coding/coding_main.php" title="Lihat Keuangan Hari ini"><button style="padding : 10px; width:100%; background-color:#546E7A;">CODING</button></a>
<br>
<br>
    <div><a href="../index.php"><img src="../images/logo_blue.png" alt="Deskripsi Gambar" width="100%" height="auto"></a></div>
    <div><img src="../images/Lari_01.jpg" alt="Deskripsi Gambar" width="100%" height="auto"></div>
    <div><img src="" alt="" width="" height=""></div>
    <br>

	</table>
	<table width="100%" cellpadding="5">
		<tr class="dua">
			<td colspan="4" style="padding-top : 10px;">
				<form action="../index.php" method="get" align="center">
					<input type="text" name="cari" size="15" maxlength="33" placeholder=<?php echo $cari ?>>
					<input type="submit" value="Lacak Pasien">
				</form>
			</td>
		</tr>
	</table>
	<br>
    <h1>Tulisan Indah</h1>
    <br>
    <?php echo "Nama = ".$userini_name; ?>
    <br>CATATAN
	<br>
	<a href="https://www.drrocky.skin">Klinik Dr Rocky</a>
	<br>
	Warna : 
	29434E
    546E7A
    819CA9
    A6B7C1
    C7D2D9
    <br>
	<button class="btn-soft-lavender"><a href="visit-yearly.php?tanggal=" title="Lihat Pasien Tahunan">Pasien <br>Tahunan</a></button>

	<button class="btn-soft-yellow"><a href="visit-monthly.php?tanggal=" title="Lihat Pasien bulanan">Pasien <br>Bulanan</a></button>

	<button class="btn-soft-skyblue"><a href="visit-daily.php?tanggal=" title="Lihat Pasien Harian">Pasien <br>Harian</a></button>

	<button class="btn-soft-blue"><a href="visit-yearly.php?tanggal=" title="Lihat Pasien Tahunan">Pasien <br>Tahunan</a></button>

	<button class="btn-pastel-green"><a href="visit-monthly.php?tanggal=" title="Lihat Pasien bulanan">Pasien <br>Bulanan</a></button>

	<button class="btn-golden-pink"><a href="visit-daily.php?tanggal=" title="Lihat Pasien Harian">Pasien <br>Harian</a></button>

    <br>
	
	
    <?php
        //---Data harus angka dan bukan angka 0
        $harga = 5;
        if (!is_numeric($harga) || $harga == 0) {
        	echo "<script>alert('Harga masih kosong');document.location='catatan_01.php'</script>"; 
        }
        //---end
    ?>
    <br>
    <?php 
    $sql = "SELECT * FROM novia_abc_users ORDER BY id ASC";
    $result = $conn->query($sql);
    if ($result->num_rows > 0) {
        while($row = $result->fetch_assoc()) {
    		//--------
    	?>
    	<button class="btn-soft-lavender"><a href="visit-daily.php?tanggal=" title="Lihat Pasien Harian"><?php echo $row['name'] ?></a></button>
	    
    <?php
        }
    }
    ?>
<br>
<br>
<button class="btn-pastel-green" onclick="window.history.back()">"window.history.back()"</button>
<br>
<button class="btn-pastel-green" onclick="location.reload()">"location.reload()"</button>
<br>
<button class="btn-pastel-green" onclick="goBack()">"goBack()"</button>
    <script>
        function goBack() {
            window.history.back();
        }
    </script>
<br>
<br>

<?php
//echo "<script>window.history.back();</script>";

$string = "buku-baju-rumah";

// Memisahkan string berdasarkan tanda -
$array = explode("-", $string);

// Menampilkan hasil pemisahan
foreach ($array as $item) {
    echo $item . " > ";
}
echo "<br>";
// Contoh akses ke elemen tertentu
echo $array[0]."<br>"; // Output: buku
echo $array[1]."<br>"; // Output: baju
echo $array[2]."<br>"; // Output: rumah

$code=  $_GET['code'];
$array = explode("-", $code);
$id = $array[0];
$userid= $array[1];

?>
<br>
ALTER TABLE `novia_abc_todo`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=1;
  <input type="hidden" name="id" value="hidden">
</body>
</html>

