function LoginKontrol(KullaniciGiris $kul) { try { $eposta = $kul->getEmail(); $sifre = $kul->getSifre(); $baglanti = new VeriTabaniBaglanti(); $conn = $baglanti->pdo_baglanti(); $sorgu = $conn->query("Select *from kullanicigiris where email='{$eposta}' and sifre='{$sifre}' and yetki_id=0 "); $sonuc = $sorgu->fetch(PDO::FETCH_LAZY); if ($sonuc) { $doktordao = new DoktorDAO(); $id = $doktordao->DoktorIdBul($sonuc->email); if (isset($_SESSION['yetki'])) { unset($_SESSION['yetki']); unset($_SESSION['doktor_id']); unset($_SESSION['admin_id']); unset($_SESSION['email']); } $_SESSION['yetki'] = $sonuc->yetki_id; $_SESSION['doktor_id'] = $id; $_SESSION['email'] = $eposta; //echo '<p style="color: green;">Giriş Başarılı</p>'; header("Location:doktor.php"); } else { ?> <div class="form-signin alert alert-danger" style="background-color: pink;"> Geçersiz email veya şifre girdiniz. </div> <?php } /* foreach ($rows as $row) { echo $row->sifre.' '.$row->email.' '.$row->yetki_id.'<br>'; }*/ } catch (Exception $ex) { die($ex->getMessage()); } finally { if ($conn != null) { $conn = $baglanti->pdo_sonlandir(); } } }
<?php /* $saatList = $saatdao->saatGoster(); foreach ($saatList as $list) { echo '<option value="'.$list->getSaatId().'">'.$list->getSaatAdi().'</option>'; }*/ ?> </select> </td> </tr> <tr> <td>Doktor</td> <td> <select name="doktor" class="form-control" > <?php $doktordao = new DoktorDAO(); //$doktorList = $doktordao->DoktorListele(); if ($_POST['doktorId'] != null) { echo '<option value="' . $_POST['doktorId'] . '">' . $doktordao->DoktorIdGoster($_POST['doktorId']) . '</option>'; } /* foreach ($doktorList as $list) { echo '<option value="'.$list->getDoktorId().'">'.$list->getAd().' '.$list->getSoyad().'</option>'; }*/ ?> </select> </td> </tr> <tr> <td>Yapılan İşlem</td> <td>
echo $list->getRandevuTarihi(); ?> </td> <td> <?php $saatdao = new SaatDAO(); echo $saatdao->saatIdGoster($list->getSaatId()); ?> </td> <td> <?php if ($list->getDoktorId() == null) { echo "Atanmadı"; } else { $doktordao = new DoktorDAO(); echo $doktordao->DoktorIdGoster($list->getDoktorId()); } ?> </td> <td> <form action="../controller/musteriDetay_controller.php" method="post"> <input type="text" value="<?php echo $list->getAd(); ?> " name="ad" style="display: none;"/> <input type="text" value="<?php echo $list->getSoyad(); ?> " name="soyad" style="display: none;"/>
<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 $header->footer();
$resimList = $kuldao->DoktorGoster(); foreach ($resimList as $list) { if ($list->getResim() != null) { $resim = $list->getResim(); } else { $resim = "dist/resimler/bos-resim/bos-profil.png"; } ?> <div class="col-lg-4"> <center><img class="img-thumbnail" src="<?php echo $resim; ?> " alt="" style="width: 100px; height: 150px;"/></center> <?php $doktordao = new DoktorDAO(); ?> <center><h3><strong><?php echo $doktordao->DoktorEmailAdBul($list->getEmail()); ?> </strong> </h3></center> <center><h3>Diş Hekimi</h3></center> <center><p><a class="btn btn-primary" role="button">Daha Ayrıntılı Bilgi</a></p></center><hr> </div> <?php } ?> </div> </div> <?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();
<div class="container"> <div class="panel-group"> <div class="panel panel-primary"> <div class="panel-heading" id="hclick"><center>Doktor Listesi</center></div> <div class="panel-body" id="pclick" style="display: none;"> <table class="table table-hover table-responsive table-striped"> <tr> <th>Adı</th> <th>Soyadı</th> <th>Eposta</th> <th>Telefonu</th> <th>Doğum Tarihi</th> <th colspan="4"><center>İşlemler</center></th> </tr> <?php $doktordao = new DoktorDAO(); $doktorList = $doktordao->DoktorListele(); foreach ($doktorList as $list) { echo '<tr>'; echo '<td>' . $list->getAd() . '</td>'; echo '<td>' . $list->getSoyad() . '</td>'; echo '<td>' . $list->getEmail() . '</td>'; echo '<td>' . $list->getTel() . '</td>'; echo '<td>' . $list->getDogumTarihi() . '</td>'; ?> <th> <form action="controller/doktorGuncelle_controller.php" method="post"> <input type="number" value="<?php echo $list->getDoktorId(); ?> " name="id" class="hidden"/>
function kokSayfa_header() { $activeList = array('Hak' => 'Hakkımızda', 'Hiz' => 'Hizmetlerimiz', 'Onl' => 'Online Randevu', 'Ils' => 'İletişim', 'Yet' => 'Yetkili Girişi'); $hrefList = array('Hak' => 'hakkimizda.php', 'Hiz' => 'hizmet.php', 'Onl' => 'musteriekle.php', 'Ils' => 'iletisim.php', 'Yet' => 'login.php'); $gorevliActiveList = array('Dok' => 'Doktor Paneli', 'Adm' => 'Admin Paneli'); $gorevliHrefList = array('Dok' => 'doktor.php', 'Adm' => 'admin.php'); ?> <nav class="navbar navbar-default navbar-fixed-top"> <div class="container"> <div class="navbar-header"> <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#myNavbar"> <span class="icon-bar"></span> <span class="icon-bar"></span> <span class="icon-bar"></span> </button> <a class="navbar-brand" href="<?php echo $this->dizin; ?> index.php">Anasayfa</a> </div> <div class="collapse navbar-collapse" id="myNavbar"> <ul class="nav navbar-nav navbar-left"> <?php if (isset($_SESSION['admin_id'])) { if ($this->key == 'Adm') { $active1 = "active"; } ?> <li class="<?php echo $active1; ?> "><a href="<?php echo $this->dizin . $gorevliHrefList['Adm']; ?> "><?php echo $gorevliActiveList['Adm']; ?> </a></li> <?php } else { if (isset($_SESSION['doktor_id'])) { if ($this->key == 'Dok') { $active2 = "active"; } ?> <li class="<?php echo $active2; ?> "><a href="<?php echo $this->dizin . $gorevliHrefList['Dok']; ?> "><?php echo $gorevliActiveList['Dok']; ?> </a></li> <?php } } ?> </ul> <ul class="nav navbar-nav navbar-right"> <?php //reset($activeList); while (list($anahtar, $deger) = each($activeList)) { if ($anahtar == $this->key) { $active = "active"; } else { $active = null; } ?> <?php if ($anahtar == 'Yet') { if (isset($_SESSION['doktor_id']) || isset($_SESSION['admin_id'])) { ?> <li class="dropdown <?php echo $active; ?> "> <a class="dropdown-toggle" data-toggle="dropdown" href="#"> <?php if (isset($_SESSION['doktor_id'])) { $doktordao = new DoktorDAO(); $ad_soyad = $doktordao->DoktorAdBul($_SESSION['doktor_id']); } else { if (isset($_SESSION['admin_id'])) { $admindao = new AdminDAO(); $ad_soyad = $admindao->AdminAdBul($_SESSION['admin_id']); } } echo $ad_soyad; ?> <span class="caret"></span></a> <ul class="dropdown-menu" style="background-color: grey; "> <li><a href="<?php echo $this->dizin . 'profil/profilGoruntule.php'; ?> ">Profil Ayarları</a></li> <li><a href="<?php echo $this->dizin . 'profil/resimEkle.php'; ?> ">Resim Ekle</a></li> <li><a href="<?php echo $this->dizin . 'profil/oturumKapat.php'; ?> ">Oturumu Kapat</a></li> </ul> </li> <?php } else { ?> <li class="<?php echo $active; ?> "><a href="<?php echo $this->dizin . $hrefList[$anahtar]; ?> "><?php echo $deger; ?> </a></li> <?php } ?> <?php } else { ?> <li class="<?php echo $active; ?> "><a href="<?php echo $this->dizin . $hrefList[$anahtar]; ?> "><?php echo $deger; ?> </a></li> <?php } } ?> </ul> </div> </div> </nav> <div class="jumbotron text-center"> <h1>Karadeniz Diş Hastanesi</h1> </div> <?php }
<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 } ob_end_flush();
<?php include_once '../veritabani/veritabaniAyar.php'; include_once '../dao/doktorDAO.php'; include_once '../dao/kullaniciGirisDAO.php'; $doktordao = new DoktorDAO(); $dkontrol = $doktordao->DoktorEmailKontrol(trim($_POST['email'])); $kuldao = new KullaniciGirisDAO(); $kkontrol = $kuldao->profilKontrol(trim($_POST['email'])); if ($dkontrol == 1 || $kkontrol == 1) { echo 1; } else { echo 0; } ?>
<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> <th>Eposta</th> <th>Randevu Tarihi</th>