function profilBilgileri() { //$profilList = array(); try { if (!empty($_SESSION['doktor_id'])) { $profil = new Doktor(); $d = 0; $id = $_SESSION['doktor_id']; $sql = "Select *from doktor where id='{$id}'"; } else { if (!empty($_SESSION['admin_id'])) { $profil = new Admin(); $d = 1; $id = $_SESSION['admin_id']; $sql = "Select *from admin where id='{$id}'"; } } $profil = new Doktor(); $baglanti = new VeriTabaniBaglanti(); $conn = $baglanti->pdo_baglanti(); $sorgu = $conn->query($sql); $sonuc = $sorgu->fetch(PDO::FETCH_LAZY); if ($sonuc) { $profil->setAd($sonuc->ad); $profil->setSoyad($sonuc->soyad); $profil->setEmail($sonuc->email); $profil->setTel($sonuc->tel); $profil->setDogumTarihi($sonuc->dogumTarihi); if (isset($_SESSION['admin_id'])) { $profil->setUsername($sonuc->username); } } else { echo 'Verilere Ulaşılmadı'; } } catch (Exception $ex) { die($ex->getMessage()); } finally { if ($conn != null) { $conn = $baglanti->pdo_sonlandir(); } } return $profil; }
<td>Doğum Tarihi</td> <td><input type="date" value="<?php echo $_POST['dogumTarihi']; ?> " name="dogumTarihi" required autofocus/></td> </tr> <tr> <td></td> <td><input type="submit" value="Güncelle"></td> </tr> </table> </form> <?php if (isset($_POST['id1'])) { $doktor = new Doktor(); $doktordao = new DoktorDAO(); $doktor->setDoktorId(trim($_POST['id1'])); $doktor->setAd(trim($_POST['ad'])); $doktor->setSoyad(trim($_POST['soyad'])); $doktor->setEmail(trim($_POST['email'])); $doktor->setTel(trim($_POST['tel'])); $doktor->setDogumTarihi(trim($_POST['dogumTarihi'])); $doktordao->DoktorGuncelle($doktor); } ?> </div> </div> </body> </html> <?php
<html> <head> <meta charset="UTF-8"> <title>Admin Ekleme</title> <?php $bootstrap = new Bootstrap(); $bootstrap->controller_vb(); ?> </head> <body> <?php if ($_POST) { $header = new Header(); $header->kokSayfa_header(); $doktorInclude->doktorEkle_controller_include(); $doktor = new Doktor(); $doktor->setAd(trim($_POST['ad'])); $doktor->setSoyad(trim($_POST['soyad'])); $doktor->setDogumTarihi(trim($_POST['dogumTarihi'])); $doktor->setTel(trim($_POST['tel'])); $doktor->setEmail(trim($_POST['email'])); $ekle = new DoktorDAO(); $ekle->DoktoEkle($doktor); } ?> </body> </html> <?php } ob_end_flush();
<?php $header = new Header(); $header->setDizin('../'); $header->kokSayfa_header(); $maxtarih = date("Y-m-d", mktime(0, 0, 0, date("m"), date("d"), date("Y") - 21)); $mintarih = date("Y-m-d", mktime(0, 0, 0, date("m"), date("d"), date("Y") - 70)); $kuldao = new KullaniciGirisDAO(); $profil = $kuldao->profilBilgileri(); ?> <div class = "container"> <div class="wrapper"> <?php if ($_POST) { $kulgirisdao = new KullaniciGirisDAO(); if (isset($_SESSION['doktor_id'])) { $doktor = new Doktor(); $doktor->setAd(trim($_POST['ad'])); $doktor->setSoyad(trim($_POST['soyad'])); $doktor->setDogumTarihi(trim($_POST['dogumTarihi'])); $doktor->setTel(trim($_POST['tel'])); $doktor->setDoktorId($_SESSION['doktor_id']); ?> <div class="form-signin" style="background-color: pink;"> <?php $kuldao->profilGuncelle($doktor); ?> </div> <?php } else { if (isset($_SESSION['admin_id'])) { $admin = new Admin();
function DoktorMusteri(Doktor $doktor) { $id = $doktor->getDoktorId(); $musteriList = array(); try { $baglanti = new VeriTabaniBaglanti(); $conn = $baglanti->pdo_baglanti(); $sorgu = $conn->query("Select *from musteri where doktor_id={$id} and randevuOnay=1"); $rows = $sorgu->fetchAll(PDO::FETCH_CLASS); foreach ($rows as $row) { $musteri = new Musteri(); $musteri->setAd($row->musteriAd); $musteri->setSoyad($row->musteriSoyad); $musteri->setRandevuTarihi($row->randevuTarihi); $musteri->setSaatId($row->saat_id); $musteri->setEmail($row->email); $musteri->setTel($row->tel); array_push($musteriList, $musteri); } } catch (Exception $ex) { die($ex->getMessage()); } finally { if ($conn != null) { $conn = $baglanti->pdo_sonlandir(); } } return $musteriList; }
<html> <head> <meta charset="UTF-8"> <title>Doktor Müşteri</title> <?php $bootstrap = new Bootstrap(); $bootstrap->controller_vb(); ?> </head> <body> <?php if ($_POST) { $header = new Header(); $header->setDizin('../'); $header->kokSayfa_header(); $doktor = new Doktor(); $durum = $_POST['durum']; $doktor->setDoktorId(trim($_POST['id'])); $doktor->setEmail(trim($_POST['email'])); $doktordao = new DoktorDAO(); if ($durum == 0) { $doktordao->DoktorSil($doktor); } else { $doktordao->DoktorProfilSil($doktor); } } ?> </body> </html> <?php }
$bootstrap->controller_vb(); ?> <script> $(document).ready(function () { $("#hclick").click(function () { $("#pclick").slideToggle("slow"); }); }); </script> </head> <body> <?php if ($_POST) { $header = new Header(); $header->kokSayfa_header(); $doktor = new Doktor(); $doktor->setDoktorId(trim($_POST['id'])); $doktordao = new DoktorDAO(); $musteriList = $doktordao->DoktorMusteri($doktor); ?> <div class="container"> <div class="panel-group"> <div class="panel panel-primary"> <div class="panel-heading" id="hclick" ><center>Randevu Listesi</center></div> <div class="panel-body" id="pclick" style="display: none;"> <table class="table table-striped table-hover table-responsive"> <tr> <th>Adı</th> <th>Soyadı</th> <th>Telefonu</th>