<?php 

error_reporting(E_ALL);
ini_set("display_errors", 1);
include 'header.php'; 


$personelsor=$db->prepare("SELECT * FROM personel where personel_id=:id");
$personelsor->execute(array(
    'id' => $_GET['personel_id']
    ));
$say=$personelsor->rowCount();
$personelcek=$personelsor->fetch(PDO::FETCH_ASSOC);
?>
<script src="https://cdn.ckeditor.com/4.15.1/standard/ckeditor.js"></script>
<div class="col-sm-9 col-sm-offset-3 col-lg-10 col-lg-offset-2 main">
   <div class="row">
       <ol class="breadcrumb">
           <li><a href="#">
               <em class="fa fa-home"></em>
           </a></li>
           <li class="active">Ürün Ayarlar</li>
       </ol>
   </div><!--/.row-->
   
   <div class="row">
       <div class="col-lg-12">
           <h1 class="page-header">Ürün Ayarlar</h1>
       </div>
   </div><!--/.row-->

   <div class="row">
       <div class="col-md-15">
           <div class="panel panel-default articles">

           <div class="panel panel-default">
               <div class="panel-heading">
                   Ürün Ekle
                   <?php
if (isset($_GET['durum'])) {
$durum = $_GET['durum'];

if ($durum == "ok") {
   echo '<b style="color:green;">İşlem Başarılı</b>';
} elseif ($durum == "no") {
   echo '<b style="color:red;">İşlem Başarısız</b>';
} else {
   echo '<b style="color:orange;">Geçersiz durum</b>';
}
}  
?>
                   
                   </div>
                   
                   
                <div class="panel-body">
                    <form action="../kariyersoft/control.php" method="POST" enctype="multipart/form-data"  data-parsley-validate class="form-horizontal form-label-left">
                        
                    

                       <fieldset>
                           <!-- Name input-->
                           <div class="form-group">
                               <label class="col-md-3 control-label" for="name">Personel İsmi *</label>
                               <div class="col-md-9">
                                   <input id="name" name="personel_ad" value="<?php echo $personelcek['personel_ad'] ?>" type="text" placeholder="Başlık" class="form-control">
                               </div>
                           </div>
                           <!-- Email input-->
                       <div class="form-group">
                               <label class="col-md-3 control-label" for="message">Personel Bilgisi *</label>
                               <div class="col-md-9">
                                  <textarea  class="ckeditor" id="editor1" name="personel_detay"><?php echo $personelcek['personel_detay']; ?></textarea>
                               </div>
                           </div>
                            <script type="text/javascript">

          CKEDITOR.replace( 'editor1',

          {

           filebrowserBrowseUrl : 'ckfinder/ckfinder.html',

           filebrowserImageBrowseUrl : 'ckfinder/ckfinder.html?type=Images',

           filebrowserFlashBrowseUrl : 'ckfinder/ckfinder.html?type=Flash',

           filebrowserUploadUrl : 'ckfinder/core/connector/php/connector.php?command=QuickUpload&type=Files',

           filebrowserImageUploadUrl : 'ckfinder/core/connector/php/connector.php?command=QuickUpload&type=Images',

           filebrowserFlashUploadUrl : 'ckfinder/core/connector/php/connector.php?command=QuickUpload&type=Flash',

           forcePasteAsPlainText: true

         } 

         );

       </script>
                       
                     
                           
                       
                           
                                            
                 </select>
             <!-- En Çok Satılan Bitiş -->
             
         
                           
             <div class="form-group">
<label class="col-md-3 control-label" for="email">Personel Durum *</label>
<div class="col-md-9">
   <select id="text" class="form-control" name="personel_durum" required>
       <option value="1" <?php echo $personelcek['personel_durum'] == '1' ? 'selected' : ''; ?>>Aktif</option>
       <option value="0" <?php echo $personelcek['personel_durum'] == '0' ? 'selected' : ''; ?>>Pasif</option>
   </select>
</div>
</div>
<input type="hidden" name="personel_id" value="<?php echo $personelcek['personel_id'] ?>">
<!-- Form actions -->
<div class="form-group">
<div class="col-md-12 widget-right">
   <button type="submit" name="personelduzenle" class="btn btn-default btn-md pull-right">Güncelle</button>
</div>
</div>
                       </fieldset>
                   </form>
               </div>
           </div>
       </div><!--/.col-->
       
   </div><!--/.row-->
</div>	<!--/.main-->
<?php include 'footer.php'; ?>

</body>
</html>
