<?php include("header.php");?>
<?php 
$mesajSorgu = Sorgu("SELECT * FROM iletisim");
$mesajSonuc = Sonuc($mesajSorgu);
?>
<?php
$duzenlenecek_id = g('id');
$mesajlar	=	Sonuc(Sorgu("SELECT * FROM iletisim WHERE id = '$duzenlenecek_id'"));
if($_GET['islem']=="sil")
{
	$id = g('id');	
	$mesajsil = mysql_query("DELETE FROM iletisim WHERE id='$id'");
	 header("Location:mesajlar.php");
	   $bilgi = '   <div class="alert alert-success alert-block fade in">
                                  <button data-dismiss="alert" class="close close-sm" type="button">
                                      <i class="fa fa-times"></i>
                                  </button>
                                  <h4>
                                      <i class="fa fa-ok-sign"></i>
                                      Başarılı!
                                  </h4>
                                  <p>Başarıyla silinmiştir...</p>
                              </div>
	' ;
	
}
?>
 <!--main content start-->
      <section id="main-content">
          <section class="wrapper">
              <!--mail inbox start-->
              <div class="mail-box">
   
                  <aside class="lg-side">
                      <div class="inbox-head">
                          <h3>Mesaj Oku</h3>
                       
                      </div>
                      <div class="inbox-body">
                              <div class="heading-inbox row">
                                  <div class="col-md-8">
                                      <div class="compose-btn">
                                          <a class="btn btn-sm btn-primary" onclick="return confirm('Silmek istediğinize emin misiniz ?')" href="?islem=sil&id=<?php echo $mesajlar->id;?>"><i class="fa fa-reply"></i> Sil</a>
                                  
                                      
                                      </div>

                                  </div>
                                  <div class="col-md-4 text-right">
                                      <p class="date"><?php echo $mesajlar->tarih;?></p>
                                  </div>
                                  <div class="col-md-12">
                                      <h4> <?php echo $mesajlar->konu;?></h4>
                                  </div>
                              </div>
                              <div class="sender-info">
                                  <div class="row">
                                      <div class="col-md-12">
                                          <img alt="" width="30px" height="30px" src="../resimler/logo/<?php echo $ayar->firma_logo; ?>">
                                          <strong><?php echo $mesajlar->isim;?></strong>
                                          <span><?php echo $mesajlar->email;?></span>
                                     
                                      </div>
                                  </div>
                              </div>
                              <div class="view-mail">
                                  <p><?php echo $mesajlar->mesaj;?></p>
                              </div>
                   
                              <div class="compose-btn pull-left">
                                  <a class="btn btn-sm btn-primary" onclick="return confirm('Silmek istediğinize emin misiniz ?')" href="?islem=sil&id=<?php echo $mesajlar->id;?>"><i class="fa fa-reply"></i> Sil</a>
                          
               
                                
                              </div>
                          </div>
                  </aside>
              </div>
              <!--mail inbox end-->
          </section>
      </section>
 

<?php include("footer.php");?>