<!-- 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> Site Ayarlarını </strong> güncelliyorsunuz...</h2>
                                </div>
                                <div class="col-md-8">
                                    <div class="toolbar-btn-action">
                                        
                                    </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 
                                        echo form_error("companyname")."<br />";
                                        echo form_error("email")."<br />";
                                        echo form_error("pagetitle")."<br />";
                                        echo form_error("metadesc")."<br />";
                                        echo form_error("metakey")."<br />";
                                    ?>
                                </div>
                            <?php
                            }
                            ?>

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


                                <ul id="demo5" class="nav nav-tabs nav-simple">
                                    <li class="active">
                                        <a href="#demo5-home" data-toggle="tab"> Site Bilgileri</a>
                                    </li>
                                    <li class="">
                                        <a href="#demo5-adresbilgisi" data-toggle="tab">Adres Bilgisi</a>
                                    </li>
                                    <li class="">
                                        <a href="#demo5-smedya" data-toggle="tab">Sosyal Medya</a>
                                    </li>
                                    <li class="">
                                        <a href="#demo5-logo" data-toggle="tab">Logo</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">
                                            <h5><strong>Site yada Şirket Adı</strong> </h5>
                                            <input type="text" class="form-control" placeholder="Kullanıcı Adı" name="companyname" value="<?php echo isset($form_hatasi) ? set_value("companyname") : $item->company_name;?>">
                                        </div>

                                        <div class="form-group">
                                            <h5><strong>Telefon 1</strong> </h5>
                                            <input type="text" class="form-control" placeholder="Telefon 1" name="telefon_one" value="<?php echo isset($form_hatasi) ? set_value("telefon_one") : $item->phone1;?>">
                                        </div>

                                        <div class="form-group">
                                            <h5><strong>Telefon 2</strong> </h5>
                                            <input type="text" class="form-control" placeholder="Telefon 2" name="telefon_two" value="<?php echo isset($form_hatasi) ? set_value("telefon_two") : $item->phone2;?>">
                                        </div>

                                        <div class="form-group">
                                            <h5><strong>Mobil</strong> </h5>
                                            <input type="text" class="form-control" placeholder="Cep Telefonu" name="mobile" value="<?php echo isset($form_hatasi) ? set_value("mobile") : $item->phone3;?>">
                                        </div>

                                        <div class="form-group">
                                            <h5><strong>Faks</strong> </h5>
                                            <input type="text" class="form-control" placeholder="Faks" name="faks" value="<?php echo isset($form_hatasi) ? set_value("faks") : $item->faks;?>">
                                        </div>

                                        <div class="form-group">
                                            <h5><strong>E-Posta Adresi</strong> </h5>
                                            <input type="email" class="form-control" placeholder="E-Posta Adresi" name="eposta" value="<?php echo isset($form_hatasi) ? set_value("eposta") : $item->email;?>">
                                        </div>
                                    </div> <!-- / .tab-pane -->



                                    <div class="tab-pane fade" id="demo5-adresbilgisi">
                                        <div class="form-group">
                                            <h4>Adres</h4>
                                            <textarea class="form-control" name="adres" id="editor4" style="height: 140px; resize: none;"><?php echo $item->adress;?></textarea>
                                            <script>
                                                CKEDITOR.replace( 'editor4' );
                                            </script>
                                         </div>
                                    </div> <!-- / .tab-pane -->











                                    <div class="tab-pane fade" id="demo5-smedya">
                                        <div class="form-group">
                                            <h5><strong>Twitter</strong> </h5>
                                            <input type="text" class="form-control" placeholder="Twitter Hesabı" name="twitter" value="<?php echo isset($form_hatasi) ? set_value("twitter") : $item->twitter;?>">
                                        </div>

                                        <div class="form-group">
                                            <h5><strong>Facebook</strong> </h5>
                                            <input type="text" class="form-control" placeholder="Facebook Hesabı" name="facebook" value="<?php echo isset($form_hatasi) ? set_value("facebook") : $item->facebook;?>">
                                        </div>

                                        <div class="form-group">
                                            <h5><strong>Instagram</strong> </h5>
                                            <input type="text" class="form-control" placeholder="İnstagram Hesabı" name="instagram" value="<?php echo isset($form_hatasi) ? set_value("instagram") : $item->instagram;?>">
                                        </div>

                                        <div class="form-group">
                                            <h5><strong>Youtube</strong> </h5>
                                            <input type="text" class="form-control" placeholder="Youtube Hesabı" name="youtube" value="<?php echo isset($form_hatasi) ? set_value("youtube") : $item->youtube;?>">
                                        </div>
                                        <div class="form-group">
                                            <h5><strong>Pinterest</strong> </h5>
                                            <input type="text" class="form-control" placeholder="Pinterest Hesabı" name="pinterest" value="<?php echo isset($form_hatasi) ? set_value("pinterest") : $item->pinterest;?>">
                                        </div>
                                    </div> <!-- / .tab-pane -->


                                    <div class="tab-pane fade" id="demo5-logo">
                                        <div class="form-group">
                                            <input type="hidden" name="eskiresim" value="<?php echo $item->logo;?>">

                                            <?php if ($item->logo <> "") { echo "<img src='".base_url()."uploads/{$viewFolder}/{$item->logo}' style='width:300px; border:none;'>";} ?> &nbsp;&nbsp;&nbsp;
                                            <input type="file" name="file" class="btn btn-default" title="Logoyu Değiştirmek İçin Buraya Tıklayın">
                                            <p class="help-block"></p>
                                        </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 $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 $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 $item->metakey?></textarea>
                                        </div>
                                    </div> <!-- / .tab-pane -->


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

                                <div class="form-group pull-right">
                                    <button type="submit" class="btn btn-danger">Değişiklikleri Kaydet</button>
                                </div>

                            </form>
                        </div>
                    </div>
                </div>

            </div>

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

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