<?php if($puser["id"]!=Null){
	header("Location: ".$site."panel/home");
	exit;
}
?>
    <main>
        <section id="login">
            <div class="container">
                <div class="login__body">
                    <div class="login__content">
                        <div class="login__top">
                            <span><i class="ri-login-box-line"></i>Giriş Yap</span>
                            <h5>Hoş geldiniz.</h5>
                        </div>
                        <div class="form__body">
						<?php if(@$_GET["i"]=="err"){
							echo '<div class="alert alert-danger">Hatalı bilgi girildi</div>';
						} if(@$_GET["i"]=="bas"){
							echo '<div class="alert alert-success">Üyelik başarıyla tamamlandı. Giriş yapabilirsiniz.</div>';
						}
						?>
                            <form action="" method="post">
							<input type="hidden" name="islem" value="login">
                                <div class="row">
                                    <div class="form-group col-md-12">
                                        <label for="">E-Posta Adresiniz</label>
                                        <i class="ri-mail-line xt-left"></i>
                                        <input type="email" name="mail" required id="" value="<?=$_COOKIE["pmail"];?>" class="form-control" placeholder="E-Posta Adresiniz">
                                    </div>
                                    <div class="form-group col-md-12">
                                        <label class="control-label">Şifreniz</label>
                                        <i class="ri-key-2-line xt-left"></i>
                                        <input id="password-available" required value="<?=$_COOKIE["ppass"];?>" type="password" class="form-control" name="pass" placeholder="Şifreniz">
                                        <span toggle="#password-available" class="ri-eye-line field-icon toggle-password"></span>
                                    </div>
                                    <div class="form-group col-md-12">
                                        <div class="d-flex justify-content-between border-xl">
                                            <div class="check-form">
                                                <input type="checkbox"  class="form-checkbox" name="hatirla" id="checkbox">
                                                <label class="form-label"  for="checkbox">Beni Hatırla</label>
                                            </div>
                                            <div class="forgot-pass-text">
                                                <h6>
                                                    <a href="<?=$site;?>panel/passreset">
                                                            Şifremi Hatırlamıyorum
                                                        </a>
                                                </h6>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="form-group col-md-12 mb-0">
                                        <button type="submit" class="btn">
                                                Giriş Yap <i class="ri-arrow-right-line"></i>
                                            </button>
                                    </div>
                                </div>
                            </form>
                        </div>
                    </div>
                    <div class="login__bottom">
                        <p>Henüz Üye Değil Misin? <a href="<?=$site;?>panel/register">Hemen Üye Ol!</a></p>
                    </div>
                </div>
                <div class="footer">
                    <div class="footer__container">
                        <div class="footer__top">
                            <div class="item">
                                <div class="logo">
                                    <img src="<?=$site;?>upload/<?=settings("site_logo");?>" alt="">
                                </div>
                                <div class="copyright">
                                    <p>
                                       <?=settings("footer");?>
                                    </p>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </section>
    </main>
