📁 PHP Dosya Yöneticisi
/
/
home
/
demodesigncom
/
makalesatisscripti.demodesign.com.tr
/
adminp
/
system
/
ajax
📝
login.php
← Geri Dön
<?php include ('../../config.php'); $Login['Unexpected'] = array( 'Code' => 999, 'Text' => 'System Error' ); $Login['mustFilled'] = array( 'Code' => 999, 'Text' => 'Fill all the blanks' ); $Login['Novpn'] = array( 'Code' => 999, 'Text' => 'You can not log in by using VPN' ); $Login['Failed'] = array( 'Code' => 404, 'Text' => 'Invalid Informations.' ); $Register['gecerSiz'] = array( 'Code' => 999, 'Text' => 'Invalid Characters.' ); if (!isset($_POST['username'], $_POST['password'])){ Output($Login['Unexpected']); die; } foreach($_POST as $index => $value){ if (strlen($value) < 1){ Output($Login['mustFilled']); die; } } $username = $_POST['username']; $password = $_POST['password']; //SQL KORUMA if(strstr($username,"'") || strstr($username,"*") || strstr($username,"/") || strstr($username,"#") || strstr($username,"$") || strstr($username,"%") || strstr($username,"&") || strstr($username,"(") || strstr($username,")")){ Output($Register['gecerSiz']); die; } //SQL KORUMA if(strstr($password,"'") || strstr($password,"*") || strstr($password,"/") || strstr($password,"#") || strstr($password,"$") || strstr($password,"%") || strstr($password,"&") || strstr($password,"(") || strstr($password,")")){ Output($Register['gecerSiz']); die; } $Login['Success'] = array( 'Code' => 200, 'Text' => 'Başarıyla girş yaptınız.' ); $query = mysqli_query($connect, "SELECT * FROM adminp WHERE username = '$username' AND password = '$password'"); if (mysqli_affected_rows($connect)){ $fetch = mysqli_fetch_array($query); $_SESSION['login'] = true; $_SESSION['userid'] = $fetch['id']; Output($Login['Success']); }else{ Output($Login['Failed']); die; } ?>
💾 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