Sindbad~EG File Manager

Current Path : /home/beghelic/www/admin/pages/
Upload File :
Current File : /home/beghelic/www/admin/pages/blog-duzenle.php

<?php
include "../kod/baglan.php";
session_start();
if(@$_SESSION["oturum"] == 1){
?>
<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
    <title>Yönetim Paneli</title>
    <!-- Favicon-->
    <link rel="icon" href="" type="image/x-icon">

    <!-- Google Fonts -->
    <link href="https://fonts.googleapis.com/css?family=Roboto:400,700&subset=latin,cyrillic-ext" rel="stylesheet" type="text/css">
    <link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet" type="text/css">

    <!-- Bootstrap Core Css -->
    <link href="../plugins/bootstrap/css/bootstrap.css" rel="stylesheet">

    <!-- Waves Effect Css -->
    <link href="../plugins/node-waves/waves.css" rel="stylesheet" />

    <!-- Animation Css -->
    <link href="../plugins/animate-css/animate.css" rel="stylesheet" />

    <!-- Sweet Alert Css -->
    <link href="../plugins/sweetalert/sweetalert.css" rel="stylesheet" />

    <!-- Custom Css -->
    <link href="../css/style.css" rel="stylesheet">

    <!-- AdminBSB Themes. You can choose a theme from css/themes instead of get all themes -->
    <link href="../css/themes/all-themes.css" rel="stylesheet" />

    <script type="text/javascript" src="../editor/ckeditor/ckeditor.js"></script>
<script type="text/javascript" src="../editor/ckfinder/ckfinder.js"></script>
</head>

<body class="theme-red">

    <!-- Overlay For Sidebars -->
    <div class="overlay"></div>
    <!-- #END# Overlay For Sidebars -->

    <!-- Top Bar -->
    <nav class="navbar">
        <div class="container-fluid">
            <div class="navbar-header">
                <a href="javascript:void(0);" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar-collapse" aria-expanded="false"></a>
                <a href="javascript:void(0);" class="bars"></a>
                <a class="navbar-brand" href="javascript:void(0);">YÖNETİM PANELİ</a>
            </div>
            <div class="collapse navbar-collapse" id="navbar-collapse">
                <ul class="nav navbar-nav navbar-right">

                    <!-- #END# Tasks -->
                    <li class="pull-right"><a href="javascript:void(0);" class="js-right-sidebar" data-close="true"><i class="material-icons">more_vert</i></a></li>
                </ul>
            </div>
        </div>
    </nav>
    <!-- #Top Bar -->
    <section>
        <!-- Left Sidebar -->
        <aside id="leftsidebar" class="sidebar">
            <!-- User Info -->

            <!-- #User Info -->
            <!-- Menu -->
            <div class="menu">
                <ul class="list">
                    <li class="header">MENÜ</li>
                    <?php include "menu.php"; ?>
                </ul>
            </div>
            <!-- #Menu -->
            <!-- Footer -->
            <div class="legal">
                <div class="version">
                    <b>Version: </b> 1.0.0
                </div>
            </div>
            <!-- #Footer -->
        </aside>
        <!-- #END# Left Sidebar -->
    </section>

    <section class="content">
        <div class="container-fluid">
            <div class="block-header">
                <h2>YENİ EKLE</h2>
            </div>

            <!-- Vertical Layout -->
            <div class="row clearfix">
                <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
                    <div class="card">
                        <div class="body">



                          <?php
                            $id = $_GET['s'];

                            if(empty(@$_GET['lang'])){
                              $lang = null;
                              $rootid = 0;
                              $urunler = $db->query('SELECT * FROM blog where id = "'.$id.'"');
                              $say = 1;
                            }else{
                              $lang = @$_GET['lang'];
                              $rootid = $id;
                              $urunler = $db->query('SELECT * FROM blog where id = "'.$id.'" AND lang = "'.$lang.'"');
                              $sorgu = $db->prepare('SELECT COUNT(*) FROM blog where id = "'.$id.'" AND lang = "'.$lang.'" ');
                              $sorgu->execute();
                              $say = $sorgu->fetchColumn();
                            }
                            $ucek = $urunler->fetch(PDO::FETCH_OBJ);

                          ?>

                          <?php
                            if(@$_GET['lang']){
                              echo '<form action="../kod/blog'.($say == 0 ? "-ekle" : "duzenle").'.php?s='.($say == 0 ? $id : @$ucek->id).'&lang='.@$lang.'" method="post" enctype="multipart/form-data">';
                            }else{
                              echo '<form action="../kod/blogduzenle.php?s='.$ucek->id.'" method="post" enctype="multipart/form-data">';
                            }
                          ?>


                            <input type="hidden" name="lang" class="form-control" value="<?php echo $lang  ?>">
                            <input type="hidden" name="root_id" class="form-control" value="<?php echo $rootid  ?>">
                            <label for="password">Resim</label>
                              <div class="form-group">
                                  <div class="form-line">
                                      <input type="file" name="file" class="form-control">
                                  </div>
                              </div>
                              <label for="email_address">Title (Max 255 Karakter)</label>
                              <div class="form-group">
                                  <div class="form-line">
                                      <input type="text" name="title" class="form-control" value="<?php echo @$ucek->title ?>">
                                  </div>
                              </div>
                              <label for="password">Keywords (Max 255 Karakter)</label>
                              <div class="form-group">
                                  <div class="form-line">
                                      <input type="text" name="keywords" class="form-control" value="<?php echo @$ucek->keywords ?>">
                                  </div>
                              </div>
                              <label for="password">Description (Max 320 Karakter)</label>
                              <div class="form-group">
                                  <div class="form-line">
                                      <input type="text" name="description" class="form-control" value="<?php echo @$ucek->description ?>">
                                  </div>
                              </div>
                              <label for="password">Blog Kategori</label>
                              <div class="form-group">
                                  <div class="form-line">
                                      <select class="form-control" name="kate">
                                        <?php
                                          $blogkate = $db->query('SELECT * FROM blogkate order by sira asc');
                                          While($bkc = $blogkate->fetch(PDO::FETCH_OBJ)){
                                            echo '<option value="'.$bkc->id.'" id="'.$bkc->url.'">'.$bkc->baslik.'</option>';
                                          }
                                        ?>
                                      </select>




                                  </div>
                              </div>
                              <label for="password">Anasayfa Sıra</label>
                              <div class="form-group">
                                  <div class="form-line">
                                      <input type="text" name="sira" class="form-control" value="<?php echo @$ucek->sira ?>">
                                  </div>
                              </div>
                              <label for="password">Anasayfa Durumu</label>
                              <div class="form-group">
                                  <div class="form-line">
                                      <select name="durumu" class="form-control">
                                        <?php
                                          if(@$ucek->durumu == 0){
                                            echo '
                                            <option value="0">Pasif</option>
                                            <option value="1">Aktif</option>
                                            ';
                                          }else{
                                            echo '
                                            <option value="1">Aktif</option>
                                            <option value="0">Pasif</option>
                                            ';
                                          }
                                        ?>
                                      </select>
                                  </div>
                              </div>
                              <label for="password">Başlık</label>
                              <div class="form-group">
                                  <div class="form-line">
                                      <input type="text" name="baslik" class="form-control" value="<?php echo @$ucek->baslik ?>">
                                  </div>
                              </div>
                              <label for="password" style="display:none;">Beğeni Sayısı</label>
                              <div class="form-group" style="display:none;">
                                  <div class="form-line">
                                      <input type="text" name="begen" class="form-control" value="<?php echo @$ucek->begen ?>">
                                  </div>
                              </div>
                              <label for="password">İçerik</label>
                              <div class="form-group" id="aciklamabolum" style="display:inline-block; width:100%;">

            								  <textarea class="icerik" cols="80" id="icerik" name="icerik" rows="10"><?php echo @$ucek->icerik ?></textarea>
            							    </div>


                              <button type="submit" class="btn btn-primary m-t-15 waves-effect">Güncelle</button>
                          </form>
                        </div>
                    </div>
                </div>
            </div>
            <!-- #END# Vertical Layout -->



        </div>
    </section>

    <!-- Jquery Core Js -->
    <script src="../plugins/jquery/jquery.min.js"></script>

    <!-- Bootstrap Core Js -->
    <script src="../plugins/bootstrap/js/bootstrap.js"></script>

    <!-- Select Plugin Js -->
    <script src="../plugins/bootstrap-select/js/bootstrap-select.js"></script>

    <!-- Slimscroll Plugin Js -->
    <script src="../plugins/jquery-slimscroll/jquery.slimscroll.js"></script>

    <!-- Waves Effect Plugin Js -->
    <script src="../plugins/node-waves/waves.js"></script>

    <!-- Custom Js -->
    <script src="../js/admin.js"></script>

    <!-- Demo Js -->
    <script src="../js/demo.js"></script>

    <script type="text/javascript">

    <?php
    $blogactive = $db->query('SELECT * FROM blogkate where id = "'.$ucek->kate.'"');
    $sonca = $blogactive->fetch(PDO::FETCH_OBJ);
    ?>

    setTimeout(function(){
      document.getElementById("<?php echo $sonca->url ?>").selected = true;
    }, 100);



    </script>

    <script language="javascript" type="text/javascript">
	var editor = CKEDITOR.replace( 'icerik' );
	CKFinder.setupCKEditor( editor, '../editor/ckfinder/' ) ;
	</script>
</body>
 <?php }else{ header('Location: ../index.php'); } ?>
</html>

Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists