📁 PHP Dosya Yöneticisi
/
/
home
/
demodesigncom
/
hesapsatisv1.demodesign.com.tr
/
application
/
models
📝
Auth_Model.php
← Geri Dön
<?php class Auth_Model extends CI_Model { public function getUser($email, $password) { $d = $this->db->get_where('users', array('email' => $email, 'password' => hash('sha256',$password)))->result_array(); return count($d) > 0 ? $d[0] : null; } public function getUserByEmail($email) { $d = $this->db->get_where('users', array('email' => $email))->result_array(); return count($d) > 0 ? $d[0] : null; } function insertUser($name, $email, $password) { $this->db->insert('users', array( 'name' => strip_tags($name), 'email' => $email, 'password' => hash('sha256', $password), 'balance' => 0, 'created_date' => time(), 'role' => 0 )); return $this->db->insert_id(); } function resetPassword($key, $password) { $this->db->query('UPDATE users SET password = "'.hash('sha256', $password).'" WHERE MD5(CONCAT(email,password,"'.date("d-m-Y").'")) = "'.$key.'"'); } } ?>
💾 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