<!DOCTYPE html>
<html lang="tr">

<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css" rel="stylesheet">
    <script src="ckeditor5/build/ckeditor.js"></script>
    <title>Kitap Ekle</title>
</head>

<body>
    <div class="col text-center" style="margin-top: 20px">
        <a href="index.php"><button class="btn btn-primary" style="margin:auto;">Geri Dön</button></a>
    </div>

    <form action="kitap-kaydet.php" method="post" style="max-width: 1000px; margin: 20px auto" enctype="multipart/form-data">
        <label class="mt-3">Kitap Adı</label>
        <input class="form-control" type="text" name="kitap_ad" required>

        <label class="mt-3">Yazar Adı</label>
        <input class="form-control" type="text" name="yazar_ad" required>

        <label class="mt-3">Yazar Soyadı</label>
        <input class="form-control" type="text" name="yazar_soyad" required>

        <label class="mt-3">isbn</label>
        <input class="form-control" type="text" name="isbn" required>

        <label class="mt-3">Yayınevi</label>
        <input class="form-control" type="text" name="yayinevi" required>

        <label class="mt-3">Basım Yılı</label>
        <input class="form-control" type="number" name="basim_yili" required>

        <label class="mt-3">Sayfa Sayısı</label>
        <input class="form-control" type="number" name="sayfa_sayisi" required>

        <label class="mt-3">Tür</label>
        <input class="form-control" type="text" name="tur" required>

        <label class="mt-3">Fiyat</label>
        <input class="form-control" type="text" name="fiyat" required>

        <label class="mt-3">Kitap Hakkında</label>
        <textarea name="kitap_hakkinda" id="kitap_hakkinda" class="form-control" rows="4"></textarea> 

        <label class="mt-3">Kapak Resmi</label>
        <input class="form-control" type="file" name="resim" required>

        <br>
        <input type="submit" value="Kitap Ekle" class="btn btn-success form-control">
    </form>
    <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/js/bootstrap.bundle.min.js"></script>
    <script>
        ClassicEditor
            .create( document.querySelector( '#kitap_hakkinda' ) )
            .catch( error => {
                console.error( error );
            } );
    </script>
</body>

</html>