📁 PHP Dosya Yöneticisi
/
/
home
/
demodesigncom
/
blogscripti.demodesign.com.tr
/
admin
📝
giris.php
← Geri Dön
<?php session_start(); $dosyaAdi = 'install.php'; $dizin = '../'; $dosyaYolu = $dizin . $dosyaAdi; if (file_exists($dosyaYolu)) { echo 'install.php dosyasını siliniz'; exit(); } include('inc/config.php'); if ($_SESSION['id']) { header('location:index'); } if (isset($_POST)) { if ($turnstile['durum'] == '0') { if (isset($_POST['email'])) { // Check if the security code is correct // Check if the email and password fields are not empty if (isset($_POST['email'], $_POST['password']) && !empty($_POST['email']) && !empty($_POST['password'])) { // Trim the email and password $email = trim($_POST['email']); $password = trim($_POST['password']); // Prepare the SQL statement $sql = "select * from yonetim where email = :email "; $handle = $db->prepare($sql); $params = ['email' => $email]; $handle->execute($params); // Check if the user exists if ($handle->rowCount() > 0) { // Fetch the user data $getRow = $handle->fetch(PDO::FETCH_ASSOC); // Verify the password if (password_verify($password, $getRow['password'])) { // Unset the password unset($getRow['password']); // Set the session variables $_SESSION = $getRow; // Redirect to the index page header('location:index'); exit(); } else { $errors[] = "Hatalı Kullanıcı adı veya Şifre"; } } else { $errors[] = "Hatalı Kullanıcı adı veya Şifre"; } } else { $errors[] = "Boş alan bırakmayınız"; } } } else { if ($_SERVER['REQUEST_METHOD'] == 'POST') { $captcha = $_POST['cf-turnstile-response']; if (!$captcha) { // CAPTCHA yanlış girildiğinde ne olacağını belirtin echo '<h2>Lütfen CAPTCHA formunu kontrol edin.</h2>'; exit; } $secretKey = $siteayar['turnsecret']; $ip = $_SERVER['REMOTE_ADDR']; $url = 'https://challenges.cloudflare.com/turnstile/v0/siteverify'; $data = array( 'secret' => $secretKey, 'response' => $captcha, 'remoteip' => $ip ); $options = array( 'http' => array( 'method' => 'POST', 'header' => 'Content-Type: application/x-www-form-urlencoded', 'content' => http_build_query($data) ) ); $context = stream_context_create($options); $result = file_get_contents($url, false, $context); if ($result === false) { // Hata durumunda ne olacağını belirtin echo '<h2>Bir hata oluştu. CAPTCHA doğrulama başarısız.</h2>'; exit; } $response = json_decode($result, true); if (intval($response["success"]) !== 1) { // CAPTCHA doğrulama başarısız olduğunda ne olacağını belirtin echo "<div class='alert alert-danger'>Spam algılandı!</div> "; exit; } else { if (isset($_POST['email'])) { // Check if the security code is correct // Check if the email and password fields are not empty if (isset($_POST['email'], $_POST['password']) && !empty($_POST['email']) && !empty($_POST['password'])) { // Trim the email and password $email = trim($_POST['email']); $password = trim($_POST['password']); // Prepare the SQL statement $sql = "select * from yonetim where email = :email "; $handle = $db->prepare($sql); $params = ['email' => $email]; $handle->execute($params); // Check if the user exists if ($handle->rowCount() > 0) { // Fetch the user data $getRow = $handle->fetch(PDO::FETCH_ASSOC); // Verify the password if (password_verify($password, $getRow['password'])) { // Unset the password unset($getRow['password']); // Set the session variables $_SESSION = $getRow; // Redirect to the index page header('location:index'); exit(); } else { $errors[] = "Hatalı Kullanıcı adı veya Şifre"; } } else { $errors[] = "Hatalı Kullanıcı adı veya Şifre"; } } else { $errors[] = "Boş alan bırakmayınız"; } } } } } } // Check if the form has been submitted ?> <!DOCTYPE html> <html lang="tr" class="light-style customizer-hide" dir="ltr" data-theme="theme-default" data-assets-path="assets/" data-template="horizontal-menu-template" > <head> <meta charset="utf-8" /> <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0" /> <title>CSA Digital - Yönetim Paneli</title> <meta name="description" content="" /> <!-- Favicon --> <!-- Fonts --> <link rel="preconnect" href="https://fonts.googleapis.com" /> <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin /> <link href="https://fonts.googleapis.com/css2?family=Public+Sans:ital,wght@0,300;0,400;0,500;0,600;0,700;1,300;1,400;1,500;1,600;1,700&display=swap" rel="stylesheet" /> <!-- Icons --> <link rel="stylesheet" href="assets/vendor/fonts/fontawesome.css" /> <link rel="stylesheet" href="assets/vendor/fonts/tabler-icons.css" /> <link rel="stylesheet" href="assets/vendor/fonts/flag-icons.css" /> <script src="https://challenges.cloudflare.com/turnstile/v0/api.js" async defer></script> <link rel="stylesheet" href="assets/vendor/css/rtl/core.css" class="template-customizer-core-css" /> <link rel="stylesheet" href="assets/vendor/css/rtl/theme-default.css" class="template-customizer-theme-css" /> <link rel="stylesheet" href="assets/css/demo.css" /> <!-- Vendors CSS --> <link rel="stylesheet" href="assets/vendor/libs/perfect-scrollbar/perfect-scrollbar.css" /> <link rel="stylesheet" href="assets/vendor/libs/node-waves/node-waves.css" /> <link rel="stylesheet" href="assets/vendor/libs/typeahead-js/typeahead.css" /> <!-- Vendor --> <link rel="stylesheet" href="assets/vendor/libs/formvalidation/dist/css/formValidation.min.css" /> <!-- Page CSS --> <!-- Page --> <link rel="stylesheet" href="assets/vendor/css/pages/page-auth.css" /> <!-- Helpers --> <script src="assets/vendor/js/helpers.js"></script> <!--! Template customizer & Theme config files MUST be included after core stylesheets and helpers.js in the <head> section --> <!--? Template customizer: To hide customizer set displayCustomizer value false in config.js. --> <body> <!-- Content --> <div class="container-xxl"> <div class="authentication-wrapper authentication-basic container-p-y"> <div class="authentication-inner py-4"> <!-- Login --> <div class="card"> <div class="card-body"> <!-- Logo --> <h4 class="mb-1 pt-2">Hoşgeldiniz! 👋</h4> <p class="mb-4">Bilgilerinizi girerek giriş yapabilirsiniz</p> <?php if (isset($errors) && count($errors) > 0) { foreach ($errors as $error_msg) { echo '<div class="alert alert-solid alert-danger"> ' . $error_msg . ' </div>'; } } ?> <form id="formAuthentication" class="mb-3" action="" method="POST"> <div class="mb-3"> <label for="email" class="form-label">E-Posta ya da Kullanıcı</label> <input type="text" class="form-control" id="xx" name="email" placeholder="E-Posta ya da Kullanıcı Giriniz" /> </div> <div class="mb-3 form-password-toggle"> <div class="d-flex justify-content-between"> <label class="form-label" for="password">Şifre</label> </div> <div class="input-group input-group-merge"> <input type="password" id="a" class="form-control" name="password" placeholder="············" /> <span class="input-group-text cursor-pointer"><i class="ti ti-eye-off"></i></span> </div> </div> <div class="mb-3"> <?php if ($turnstile['durum'] == '1') { ?> <span class="comment-form-email col-md-6" style="margin-top: 15px"> <div class="cf-turnstile" data-sitekey="<?php echo $siteayar['turnsite']; ?>"></div> </span> <?php } ?> </div> <div class="mb-3"> <button class="btn btn-primary d-grid w-100" type="submit">Giriş Yap</button> </div> </form> </div> </div> <!-- /Register --> </div> </div> </div> <!-- Main JS --> <script src="assets/js/main.js"></script> <!-- Page JS --> <script src="assets/js/pages-auth.js"></script> </body> </html>
💾 Kaydet
İptal
📝 Yeniden Adlandır
İptal
Kaydet
🔐 Dosya İzinleri (chmod)
İzin Değeri:
Hızlı Seçim:
777
755
644
600
777
= Herkes okur/yazar/çalıştırır
755
= Sahip tam, diğerleri okur/çalıştırır
644
= Sahip okur/yazar, diğerleri okur
600
= Sadece sahip okur/yazar
İptal
Uygula