<!-- 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="data-table-toolbar">
                        <div class="row">
                            <div class="col-md-4">
                                <h4><strong><?php echo $viewTitle;?> içeriği </strong> ekliyorsunuz...</h4>
                            </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 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
                            }
                            ?>

                            <form role="form" action="<?php echo base_url("backend/ekstrasayfalar/formKaydet");?>" 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-tarihsaat" data-toggle="tab">Tarih/Saat</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" id="icerikturu">
                                                <option value="">.... İçerik Türü Seçiniz ...</option>
                                                <?php
                                                foreach ($icerikturu as $itur)
                                                    {?>
                                                        <option value="<?php echo $itur->icerikkodu;?>"><?php echo $itur->icerikadi;?></option>
                                                    <?php
                                                    }
                                                    ?>
                                            </select>    
                                        </div>

                                        <!-- include summernote css/js -->
                                        <script src="https://cdn.ckeditor.com/4.7.3/standard/ckeditor.js"></script>
                                        <?php
                                        for ($i=1;$i<=1;$i++)
                                        {
                                            if ($i == 1) {$dil = "TR"; $dkod = "tr";}
                                            /*if ($i == 2) {$dil = "EN"; $dkod = "en";}
                                            if ($i == 3) {$dil = "AR"; $dkod = "ar";}
                                            if ($i == 4) {$dil = "RU"; $dkod = "ru";}
                                            if ($i == 5) {$dil = "FR"; $dkod = "fr";}
                                            /*if ($i == 6) {$dil = "DL"; $dkod = "dl";}
                                            if ($i == 7) {$dil = "ES"; $dkod = "es";}*/
                                        ?>
                                        <div class="form-group">
                                            <h4><strong>Başlık</strong> </h4>
                                            <input type="text" class="form-control" name="title_<?php echo $dkod;?>">
                                            <?php if (isset($form_hatasi)) {?>
                                                <small class="pull-right input-form-error"><?php echo form_error("title_tr");?></small>
                                            <?php }?>
                                        </div>
                                        <?php
                                        }
                                        ?>

                                        <div class="form-group">
                                            <h5><strong>Video Adresi</strong> </h5>
                                            <input type="text" class="form-control" placeholder="Youtube'dan video eklemek için bu alanı kullanabilirsiniz" name="video" value="<?php echo isset($form_hatasi) ? set_value("video") : "";?>">
                                        </div>

                                        <div class="form-group">
                                            <h5><strong>Farklı Adres</strong> </h5>
                                            <input type="text" class="form-control" placeholder="Farklı Bir sayfaya yönlendirme yapmak istiyorsanız buraya adresi yapıştırın" name="farkliadres"  value="<?php echo isset($form_hatasi) ? set_value("farkliadres") : "";?>">
                                        </div>
                                        <div class="form-group">
                                            <h5><strong>Harita Kodu(Varsa)</strong> </h5>
                                            <input type="text" class="form-control" placeholder="Harita kodunuz varsa buraya yapıştırın" name="haritakodu"  value="<?php echo isset($form_hatasi) ? set_value("haritakodu") : "";?>">
                                        </div>
                                    </div> <!-- / .tab-pane -->


                                    <div class="tab-pane fade" id="demo5-aciklama">
                                                <!-- include summernote css/js -->
                                                <script src="https://cdn.ckeditor.com/4.7.3/standard/ckeditor.js"></script>

                                                <br />
                                                <?php
                                                for ($i=1;$i<=1;$i++)
                                                {
                                                    if ($i == 1) {$dil = "TR"; $dkod = "tr";}
                                                    /*if ($i == 2) {$dil = "EN"; $dkod = "en";}
                                                    if ($i == 3) {$dil = "AR"; $dkod = "ar";}
                                                    if ($i == 4) {$dil = "RU"; $dkod = "ru";}
                                                    if ($i == 5) {$dil = "FR"; $dkod = "fr";}
                                                    if ($i == 6) {$dil = "DL"; $dkod = "dl";}
                                                    if ($i == 7) {$dil = "ES"; $dkod = "es";}*/
                                                ?>                                                
                                                <div class="form-group">
                                                    <h4><strong>Açıklama </strong></h4>
                                                    <textarea name="aciklama_<?php echo $dkod?>"></textarea>
                                                    <script>
                                                    CKEDITOR.replace( 'aciklama_<?php echo $dkod?>' );
                                                    </script>
                                                </div>    

                                                <br /><br />
                                                <?php
                                                }
                                                ?>
                                              
                                                <br />
                                    </div> <!-- / .tab-pane -->


                                    <div class="tab-pane fade" id="demo5-tarihsaat">
                                       <div class="form-group">
                                            <h4><strong>Tarih 1</strong> </h4>
                                            <input type="date" class="form-control" placeholder="Tarih 1" name="tarih1" value="<?php echo isset($form_hatasi) ? set_value("tarih1") : "";?>">
                                        </div>
                                        <div class="form-group">
                                            <h4><strong>Tarih 2</strong> </h4>
                                            <input type="date" class="form-control" placeholder="Tarih 2" name="tarih2" value="<?php echo isset($form_hatasi) ? set_value("tarih2") : "";?>">
                                        </div>
                                        <div class="form-group">
                                            <h4><strong>Saat 1</strong> </h4>
                                            <input type="time" class="form-control" placeholder="Saat 1" name="saat1" value="<?php echo isset($form_hatasi) ? set_value("saat1") : "";?>">
                                        </div>
                                        <div class="form-group">
                                            <h4><strong>Saat 2</strong> </h4>
                                            <input type="time" class="form-control" placeholder="Saat 2" name="saat2" value="<?php echo isset($form_hatasi) ? set_value("saat2") : "";?>">
                                        </div>
                                    </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") : "";?>">
                                        </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") : "";?></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") : "";?></textarea>
                                        </div>
                                    </div> <!-- / .tab-pane -->


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



                                <div class="form-group pull-right">
                                    <button type="submit" class="btn btn-warning">Kaydet</button>
                                </div>
                            </form>
                        </div>
                    </div>
                </div>

            </div>

        </div>




        <?php $this->load->view("includes/footer");?>

        <script>
            $(document).ready(function(){   
                $('#musteri').hide();
                $('#icerikturu').change(function () 
                {
                    if($(this).val()=='referanslar') {
                        $('#musteri').show();
                    } else {
                        $('#musteri').hide();
                    }
                });
            });
        </script>

        
    </div>
    <!-- ============================================================== -->
    <!-- End content here -->
    <!-- ============================================================== -->

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