📁 PHP Dosya Yöneticisi
/
/
home
/
demodesigncom
/
otogaleriscripti.demodesign.com.tr
/
includes
/
models
📝
UserTypes.php
← Geri Dön
<? class UserBireysel extends User{ public $tcno,$dogumtarihi,$adres; public function __construct($uname="",$pw="",$fullname="",$email="",$phone="",$tcno="",$dogumtarihi="",$adres="") { parent::__construct($uname,$pw,$fullname,$email,$phone,UserTypes::HIZMETVERENBIREYSEL); $this->tcno=$tcno; $this->dogumtarihi=$dogumtarihi; $this->adres=$adres; } public function insert() { parent::insert(); /** @var PDO $dbh */ global $dbh; $sth = $dbh->prepare("insert into user_info set id=:id, tcno=:tcno ,dogumtarihi=:dogumtarihi ,adres=:adres "); $sth->execute(array( "id"=>$this->id, "tcno"=>$this->tcno, "dogumtarihi"=>$this->dogumtarihi, "adres"=>$this->adres, )); $error=$sth->errorInfo(); if(!isset($error[1])){ $this->id = $dbh->lastInsertId(); return $this; }else{ return false; } return $this->id; } public function get($id){ global $dbh; if($this->id==""){ parent::get($id); } $sth = $dbh->prepare("select * from user_info where id=:id"); $sth->execute(array("id"=>$id)); $user = $sth->fetch(PDO::FETCH_OBJ); if(isset($user->id)){ /** @var UserBireysel $user */ // $this->set($user->uname,$user->pw,$user->fullname,$user->email,$user->phone,$user->type); $this->tcno=$user->tcno; $this->dogumtarihi=$user->dogumtarihi; $this->adres=$user->adres; return $this; }else{ return false; } } } class UserKurumsal extends User{ public $adres,$firmaunvan,$vergidaire,$vergino; public function __construct($uname="",$pw="",$fullname="",$email="",$phone="",$firmaunvan="",$vergidaire="",$vergino="",$adres="") { parent::__construct($uname,$pw,$fullname,$email,$phone,UserTypes::HIZMETVERENKURUMSAL); $this->firmaunvan=$firmaunvan; $this->vergidaire=$vergidaire; $this->vergino=$vergino; $this->adres=$adres; } public function get($id){ global $dbh; if(!isset($this->id)){ parent::get($id); } $sth = $dbh->prepare("select * from user_info where id=:id"); $sth->execute(array("id"=>$id)); $user = $sth->fetch(PDO::FETCH_OBJ); if(isset($user->id)){ /** @var UserKurumsal $user */ //$this->set($this->uname,$user->pw,$user->fullname,$user->email,$user->phone,$user->type); $this->firmaunvan=$user->firmaunvan; $this->vergidaire=$user->vergidaire; $this->vergino=$user->vergino; return $this; }else{ return false; } } public function insert() { parent::insert(); /** @var PDO $dbh */ global $dbh; $sth = $dbh->prepare("insert into user_info set id=:id, adres=:adres, firmaunvan=:firmaunvan ,vergidairesi=:vergidairesi ,verginosu=:verginosu "); $sth->execute(array( "id"=>$this->id, "vergidairesi"=>$this->vergidaire, "firmaunvan"=>$this->firmaunvan, "verginosu"=>$this->vergino, "adres"=>$this->adres, )); $error=$sth->errorInfo(); if(!isset($error[1])){ $this->id = $dbh->lastInsertId(); return $this; }else{ return false; } return $this->id; } } class hizmetverenbireysel extends UserBireysel{ public function _construct($uname="",$pw="",$fullname="",$email="",$phone="",$tcno="",$dogumtarihi="",$adres="") { parent::__construct($uname="",$pw="",$fullname="",$email="",$phone="",$tcno="",$dogumtarihi="",$adres=""); $this->setType(UserTypes::HIZMETVERENBIREYSEL); } } class hizmetverenkurumsal extends UserKurumsal{ public function __construct($uname="",$pw="",$fullname="",$email="",$phone="",$firmaunvan="",$vergidaire="",$vergino="",$adres="") { parent::__construct($uname="",$pw="",$fullname="",$email="",$phone="",$firmaunvan="",$vergidaire="",$vergino="",$adres=""); $this->setType(UserTypes::HIZMETVERENKURUMSAL); } } class hizmetarayanbireysel extends UserBireysel{ public function __construct($uname="",$pw="",$fullname="",$email="",$phone="",$tcno="",$dogumtarihi="",$adres="") { parent::__construct($uname="",$pw="",$fullname="",$email="",$phone="",$tcno="",$dogumtarihi="",$adres=""); $this->setType(UserTypes::HIZMETALANBIREYSEL); } } class hizmetarayankurumsal extends UserKurumsal{ public function __construct($uname="",$pw="",$fullname="",$email="",$phone="",$firmaunvan="",$vergidaire="",$vergino="",$adres="") { parent::__construct($uname="",$pw="",$fullname="",$email="",$phone="",$firmaunvan="",$vergidaire="",$vergino="",$adres=""); $this->setType(UserTypes::HIZMETALANKURUMSAL); } }
💾 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