<!-- Start right content -->
<div class="content-page">
    <!-- ============================================================== -->
    <!-- Start Content here -->
    <!-- ============================================================== -->
    <div class="content">
        <!-- Page Heading Start -->
        <?php /*<div class="page-heading">
            <h1><i class='fa fa-file'></i> <?php echo $viewTitle;?></h1>
            <h3><?php echo $viewTitle;?></h3>
        </div>*/?>
        <!-- Page Heading End-->

        <div class="row">

            <div class="col-sm-12 portlets">

                <div class="widget">
                    <div class="widget-header transparent">
                        <div class="data-table-toolbar">
                            <div class="row">
                                <div class="col-md-4">
                                    <h2><strong> <?php echo $item->baslik_tr;?> Kaydını </strong> güncelliyorsunuz...</h2>
                                </div>
                                <div class="col-md-8">
                                    <div class="toolbar-btn-action">
                                        <a href="<?php echo base_url("backend/ekstrasayfalar");?>" class="btn btn-red-1"><i class="fa fa-list"></i> <?php echo $viewTitle;?> Liste</a>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="widget-content padding">
                        <div id="basic-form">

                            <?php
                            if (isset($form_hatasi))
                            {
                            ?>
                                <div class="alert alert-danger alert-dismissable">
                                    <button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
                                    <?php 
                                        $titleError         = form_error("title_tr");
                                        $aciklamaError      = form_error("aciklama_Tr");
                                        $pageTitleerror     = form_error("pagetitle");
                                        $metadescError      = form_error("metadesc");
                                        $metakeyError       = form_error("metakey");
                                        $icerikturuError    = form_error("icerikturu");

                                        if ($titleError <> "")      {echo form_error("title_tr")."<br />";}
                                        if ($aciklamaError <> "")   {echo form_error("aciklama_tr")."<br />";}
                                        if ($pageTitleerror <> "")  {echo form_error("pagetitle")."<br />";}
                                        if ($metadescError <> "")   {echo form_error("metadesc")."<br />";}
                                        if ($metakeyError <> "")    {echo form_error("metakey")."<br />";}
                                        if ($icerikturuError <> "") {echo form_error("icerikturu")."<br />";}
                                    ?>
                                </div>
                            <?php
                            }
                            ?>


                            <!-- include summernote css/js -->
                            <script src="https://cdn.ckeditor.com/4.7.3/standard/ckeditor.js"></script>

                            <form role="form" action="<?php echo base_url("backend/ekstrasayfalar/guncellemeformKaydet/$item->id");?>" method="post">

                                 <ul id="demo5" class="nav nav-tabs nav-simple">
                                    <li class="active">
                                        <a href="#demo5-home" data-toggle="tab"> Sayfa Bilgileri</a>
                                    </li>
                                    <li class="">
                                        <a href="#demo5-aciklama" data-toggle="tab">Açıklama</a>
                                    </li>
                                    <li class="">
                                        <a href="#demo5-seo" data-toggle="tab">SEO Ayarları</a>
                                    </li>
                                </ul>

                                <div class="tab-content">

                                    <div class="tab-pane fade active in" id="demo5-home">
                                        <div class="form-group">
                                            <h4><strong>İçerik Türü</strong> </h4>
                                            <select class="form-control" name="icerikturu">
                                                <?php
                                                foreach ($icerikturu as $itur)
                                                    {?>
                                                        <option <?php echo ($itur->icerikkodu == $item->icerikkodu) ? "selected": "";?> value="<?php echo $itur->icerikkodu;?>"><?php echo $itur->icerikadi;?></option>
                                                    <?php
                                                    }
                                                    ?>
                                            </select>    
                                        </div>

                                        <div class="form-group">
                                            <h4><strong>Müşteri</strong> </h4>
                                            <select class="form-control" name="musteri">
                                                <?php
                                                foreach ($musteriler as $musteri)
                                                    {?>
                                                        <option <?php echo ($musteri->id == $item->alan1) ? "selected": "";?> value="<?php echo $musteri->id;?>"><?php echo $musteri->baslik;?></option>
                                                    <?php
                                                    }
                                                    ?>
                                            </select>    
                                        </div>

                                        <div class="form-group">
                                            <h4><strong>Başlık - TR</strong> </h4>
                                            <input type="text" class="form-control" placeholder="Başlık" name="title_tr" value="<?php echo isset($form_hatasi) ? set_value("title_tr") : $item->baslik_tr;?>">
                                        </div>
                                        <div class="form-group">
                                            <h4><strong>Başlık -EN </strong> </h4>
                                            <input type="text" class="form-control" placeholder="Başlık" name="title_en" value="<?php echo isset($form_hatasi) ? set_value("title_en") : $item->baslik_en;?>">
                                        </div>
                                        <div class="form-group">
                                            <h4><strong>Başlık - AR</strong> </h4>
                                            <input type="text" class="form-control" placeholder="Başlık" name="title_ar" value="<?php echo isset($form_hatasi) ? set_value("title_ar") : $item->baslik_ar;?>">
                                        </div>
                                        <div class="form-group">
                                            <h4><strong>Başlık - RU</strong> </h4>
                                            <input type="text" class="form-control" placeholder="Başlık" name="title_ru" value="<?php echo isset($form_hatasi) ? set_value("title_ru") : $item->baslik_ru;?>">
                                        </div>
                                        <div class="form-group">
                                            <h4><strong>Başlık - FR</strong> </h4>
                                            <input type="text" class="form-control" placeholder="Başlık" name="title_fr" value="<?php echo isset($form_hatasi) ? set_value("title_fr") : $item->baslik_fr;?>">
                                        </div>

                                    </div> <!-- / .tab-pane -->


                                    <div class="tab-pane fade" id="demo5-aciklama">                
                                         <div class="form-group">
                                            <h4><strong>Açıklama - TR</strong></h4>
                                            <textarea name="aciklama_tr"><?php echo isset($form_hatasi) ? set_value("aciklama_tr") : $item->aciklama_tr;?></textarea>
                                            <script>
                                                CKEDITOR.replace( 'aciklama_tr' );
                                            </script>
                                        </div><br /><br />
                                         <div class="form-group">
                                            <h4><strong>Açıklama - EN</strong></h4>
                                            <textarea name="aciklama_en"><?php echo isset($form_hatasi) ? set_value("aciklama_en") : $item->aciklama_en;?></textarea>
                                            <script>
                                                CKEDITOR.replace( 'aciklama_en' );
                                            </script>
                                        </div><br /><br />
                                        <div class="form-group">
                                            <h4><strong>Açıklama - AR</strong></h4>
                                            <textarea name="aciklama_ar"><?php echo isset($form_hatasi) ? set_value("aciklama_ar") : $item->aciklama_ar;?></textarea>
                                            <script>
                                                CKEDITOR.replace( 'aciklama_ar' );
                                            </script>
                                        </div><br /><br />

                                        <div class="form-group">
                                            <h4><strong>Açıklama - RU</strong></h4>
                                            <textarea name="aciklama_ru"><?php echo isset($form_hatasi) ? set_value("aciklama_ru") : $item->aciklama_ru;?></textarea>
                                            <script>
                                                CKEDITOR.replace( 'aciklama_ru' );
                                            </script>
                                        </div><br /><br />
                                        <div class="form-group">
                                            <h4><strong>Açıklama - FR</strong></h4>
                                            <textarea name="aciklama_fr"><?php echo isset($form_hatasi) ? set_value("aciklama_fr") : $item->aciklama_fr;?></textarea>
                                            <script>
                                                CKEDITOR.replace( 'aciklama_fr' );
                                            </script>
                                        </div><br /><br />
                                        
                                    </div> <!-- / .tab-pane -->
                                    <div class="tab-pane fade" id="demo5-seo">
                                        <div class="form-group">
                                            <h5><strong>Title</strong> </h5>
                                            <input type="text" class="form-control" placeholder="Başlık" name="pagetitle" value="<?php echo isset($form_hatasi) ? set_value("pagetitle") : $item->pagetitle;?>">
                                        </div>
                                        <div class="form-group">
                                            <label><h5><strong>Meta Description</strong> </h5></label>
                                            <textarea class="form-control" name="metadesc" style="height: 140px; resize: none;" placeholder="Meta Description Açıklamaları"><?php echo isset($form_hatasi) ? set_value("metadesc") : $item->metadesc;?></textarea>
                                        </div>
                                        <div class="form-group">
                                            <label><h5><strong>Meta Keywords</strong> </h5></label>
                                            <textarea class="form-control" name="metakey" style="height: 140px; resize: none;" placeholder="Meta Keywords Kelimeler"><?php echo isset($form_hatasi) ? set_value("metakey") : $item->metakey;?></textarea>
                                        </div>
                                    </div> <!-- / .tab-pane -->


                                </div><!-- / .tab-content -->

                                <div class="form-group">
                                    <button type="submit" class="btn btn-success">Kaydet</button>
                                </div>
                            </form>
                        </div>
                    </div>
                </div>

            </div>

        </div>
        <?php $this->load->view("includes/footer");?>
    </div>
    <!-- ============================================================== -->
    <!-- End content here -->
    <!-- ============================================================== -->

</div>
<!-- End right content -->