<?php require view('theme/header'); ?>
    <div class="app-content">
        <div class="container-fluid">

            <div class="d-card dc-dash">
                <div class="row">
                    <?php if ($user["user_balance"] < 1): ?>
                        <div class="col-md-12">
                            <div class="alert alert-dismissible alert-danger">
                                <b>Uyarı!</b>
                                <p style="margin:0">Sevgili müşterimiz, bakiyeniz azalmış gibi gözüküyor, sorunsuz
                                    sipariş verebilmek için lütfen bakiye yüklemeyi unutmayınız.</p>
                            </div>
                        </div>
                    <?php endif; ?>
                    <div class="col-lg-6 col-md-8 col-12">
                        <div class="py-3 px-5">
                            <div class="dch-title">
                                Bayilik Paneli
                            </div>
                            <div class="dch-text">
                                Aşağıdaki formu doldurarak bayimiz olabilirsiniz.
                            </div>
                        </div>
                    </div>
                </div>
            </div>

            <section class="neworder">

                <div class="row">
                    <div class="col-lg-6 col-12 mb-5 mb-lg-0">
                        <div class="d-card">

                            <div class="d-card-head">
                                <div class="dch-body">
                                    <i class="icon fas fa-info me-3"></i>
                                    <span class="ml-3">Bayilik Bilgileri</span>
                                </div>
                            </div>

                            <div class="d-card-body" id="dc-body">

                                <div class="d-card mb-5 mt-3" style="background: #ff5252; border-radius: 10px;">
                                    <?php if ($child): ?>
                                        <div class="d-card-body">
                                            <div class="row my-4 py-3">
                                                <div class="col-auto mt-4 mt-md-0 d-none d-md-block align-self-center">
                                                    <img src="<?=theme("assets/img/server.png");?>" alt="">
                                                </div>
                                                <div class="col align-self-center">
                                                    <div style="font-size:15px">Paneliniz sipariş verdiğiniz tarihten
                                                        itibaren sistem yöneticinizin onayı durumunda 24 saat içerisinde
                                                        kurulacaktır. Lütfen alan adınızı aşağıdaki nameserver
                                                        adreslerine yönlendiriniz;
                                                    </div>
                                                    <div style="font-size: 19px;" class="mt-2">
                                                        <p class="mb-0" style="color: #fff; font-weight: 600">
                                                            ns1.elinsoft.net</p>
                                                        <p class="mb-0" style="color: #fff; font-weight: 600">
                                                            ns2.elinsoft.net</p>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                    <?php else: ?>
                                        <div class="d-card-body">
                                            <div class="row my-4 py-3">
                                                <div class="col-auto mt-4 mt-md-0 d-none d-md-block align-self-center">
                                                    <img src="<?=theme("assets/img/server.png");?>" alt="">
                                                </div>
                                                <div class="col align-self-center">
                                                    <div style="font-size:15px">Lütfen sitenizi aşağıda ki NS'lere
                                                        yönlendiriniz:
                                                    </div>
                                                    <div style="font-size: 19px;" class="mt-2">
                                                        <p class="mb-0" style="color: #fff; font-weight: 600">
                                                            ns1.elinsoft.net</p>
                                                        <p class="mb-0" style="color: #fff; font-weight: 600">
                                                            ns2.elinsoft.net</p>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>

                                    <?php endif; ?>
                                </div>

                                <div class="d-card mt-5" style="position: relative;">
                                    <div class="d-card-body">
                                        <div class="row my-3 py-0">
                                            <div class="col-md-12 col-12 text-center align-self-center">
											<span class="rep-wo-text">
												Aklınıza takılan bir soru mu var?
											</span>
                                                <br>
                                                <a href="/tickets" class="btn btn-outline mt-3">
                                                    Hemen İletişime Geçin
                                                </a>
                                            </div>
                                        </div>
                                    </div>
                                </div>

                            </div>
                        </div>
                    </div>
                    <?php if ($child): ?>

                        <div class="col-lg-6 col-12 mb-5 mb-lg-0">
                            <div class="d-card">
                                <div class="d-card-head">
                                    <div class="dch-body">
                                        <i class="icon far fa-hand-point-up me-3"></i>
                                        <span class="ml-3">Başvurunuz</span>
                                    </div>
                                </div>
                                <div class="d-card-body">


                                    <div class="row">
                                        <div class="col-lg-12">
                                            <div class="form-group">
                                                <label for="formDomain">Kurulacak Domain Adı</label>
                                                <div class="input-group">
                                                    <div class="input-group-icon">
                                                        <i class="fas fa-globe"></i>
                                                    </div>
                                                    <input type="text" class="form-control" id="domain"
                                                           name="domain"
                                                           value="<?= $child['panel_domain'] ?>" readonly>
                                                </div>
                                            </div><!-- form-group end -->
                                            <div class="form-group">
                                                <label for="formDomain">Admin Giriş Url</label>
                                                <div class="input-group">
                                                    <div class="input-group-icon">
                                                        <i class="fas fa-globe"></i>
                                                    </div>
                                                    <input type="text" class="form-control" id="domain"
                                                           name="domain"
                                                           value="<?= $child['panel_domain'] ?>/admin" readonly>
                                                </div>
                                            </div><!-- form-group end -->
                                            <div class="form-group">
                                                <label for="formDomain">Ödenen Ücret</label>
                                                <div class="input-group">
                                                    <div class="input-group-icon">
                                                        <i class="fas fa-coins"></i>
                                                    </div>
                                                    <input type="text" class="form-control" id="domain"
                                                           name="domain"
                                                           value="<?= $child['panel_price'] ?>" readonly>
                                                </div>
                                            </div><!-- form-group end -->
                                            <div class="form-group">
                                                <label for="formOdemeYontemi">Para Birimi</label>
                                                <div class="input-group">
                                                    <div class="input-group-icon">
                                                        <i class="fas fa-database"></i>
                                                    </div>
                                                    <select id="createorderform-currency" class="form-control"
                                                            name="currency">
                                                        <option value="<?= $child['panel_currency'] ?>" selected
                                                                disabled><?= $child['panel_currency'] ?></option>
                                                    </select>
                                                </div>
                                            </div><!-- form-group end -->
                                            <div class="form-group">
                                                <label for="formDomain">Aylık Bayilik Bedeli</label>
                                                <div class="input-group">
                                                    <div class="input-group-icon">
                                                        <i class="fas fa-coins"></i>
                                                    </div>
                                                    <input type="text" class="form-control" id="price" name="price"
                                                           value="<?= $cp->price ?>"
                                                           readonly>
                                                </div>
                                            </div><!-- form-group end -->
                                        </div>
                                        <div class="col-lg-12">
                                            <div class="form-group">
                                                <label for="formAdminUsername">Admin Kullanıcı Adı</label>
                                                <div class="input-group">
                                                    <div class="input-group-icon">
                                                        <i class="fas fa-user"></i>
                                                    </div>
                                                    <input type="text" class="form-control"
                                                           name="username" value="<?= $childadmin->username ?>"
                                                           readonly>
                                                </div>
                                            </div><!-- form-group end -->
                                            <div class="form-group">
                                                <label for="formAdminPass">Admin Şifre</label>
                                                <div class="input-group">
                                                    <div class="input-group-icon">
                                                        <i class="fas fa-lock"></i>
                                                    </div>
                                                    <input type="text" id="createorderform-password"
                                                           class="form-control" name="password"
                                                           value="<?= $childadmin->password ?>"
                                                           aria-required="true">
                                                </div>
                                            </div><!-- form-group end -->
                                        </div>
                                    </div>


                                </div>
                            </div>
                        </div>
                    <?php else: ?>
                        <div class="col-lg-6 col-12 mb-5 mb-lg-0">
                            <div class="d-card">
                                <div class="d-card-head">
                                    <div class="dch-body">
                                        <i class="icon far fa-hand-point-up me-3"></i>
                                        <span class="ml-3">Hemen Başvuru Yapın</span>
                                    </div>
                                </div>
                                <div class="d-card-body">

                                    <form id="child_order" onsubmit="return false;">
                                        <div class="row">
                                            <div class="col-lg-12">
                                                <div class="form-group">
                                                    <label for="formDomain">Kurulacak Domain Adı</label>
                                                    <div class="input-group">
                                                        <div class="input-group-icon">
                                                            <i class="fas fa-globe"></i>
                                                        </div>
                                                        <input type="text" class="form-control" id="domain"
                                                               name="domain"
                                                               value="">
                                                    </div>
                                                </div><!-- form-group end -->
                                                <div class="form-group">
                                                    <label for="formOdemeYontemi">Para Birimi</label>
                                                    <div class="input-group">
                                                        <div class="input-group-icon">
                                                            <i class="fas fa-database"></i>
                                                        </div>
                                                        <select id="createorderform-currency" class="form-control"
                                                                name="currency">
                                                            <option value="try">TRY</option>
                                                            <option value="usd">USD</option>
                                                            <option value="eur">EUR</option>
                                                        </select>
                                                    </div>
                                                </div><!-- form-group end -->
                                                <div class="form-group">
                                                    <label for="formDomain">Aylık Bayilik Bedeli</label>
                                                    <div class="input-group">
                                                        <div class="input-group-icon">
                                                            <i class="fas fa-coins"></i>
                                                        </div>
                                                        <input type="text" class="form-control" id="price" name="price"
                                                               value="<?= $cp->price ?>"
                                                               readonly>
                                                    </div>
                                                </div><!-- form-group end -->
                                            </div>
                                            <div class="col-lg-12">
                                                <div class="form-group">
                                                    <label for="formAdminUsername">Admin Kullanıcı Adı</label>
                                                    <div class="input-group">
                                                        <div class="input-group-icon">
                                                            <i class="fas fa-user"></i>
                                                        </div>
                                                        <input type="text" class="form-control"
                                                               name="username" value="admin">
                                                    </div>
                                                </div><!-- form-group end -->
                                                <div class="form-group">
                                                    <label for="formAdminPass">Admin Şifre</label>
                                                    <div class="input-group">
                                                        <div class="input-group-icon">
                                                            <i class="fas fa-lock"></i>
                                                        </div>
                                                        <input type="password" id="createorderform-password"
                                                               class="form-control" name="password" value="123456789"
                                                               aria-required="true">
                                                    </div>
                                                </div><!-- form-group end -->
                                            </div>
                                        </div>
                                        <button class="btn btn-primary btn-block mt-3">Sipariş Oluştur</button>
                                    </form>

                                </div>
                            </div>
                        </div>
                    <?php endif; ?>

                </div>

            </section>

        </div>
    </div>
<?php require view('theme/footer'); ?>