Mini Shell

Direktori : /home2/aravindar/public_html/admin/
Upload File :
Current File : /home2/aravindar/public_html/admin/text-editor.php

<?php
/* Database connection */
include("config.php");
$conn = dbconnect();
session_start();

// login or not
if ($_SESSION['name'] == '' || $_SESSION['admin_id'] == '') {
    header('location:logout.php');
    die();
}

$name = $_SESSION['name'];
$admin_id = $_SESSION['admin_id'];
$query  = "SELECT * FROM tb1_admin WHERE name='" . $name . "' AND admin_id='" . $admin_id . "'";
$res_query = mysqli_query($conn, $query);
$fetch = mysqli_fetch_object($res_query);
$username = $fetch->user_name;
$phone = $fetch->phone;
$adminposition = $fetch->position;
if ($adminposition == 1) {
    $type = 'Main Admin';
} elseif ($adminposition == 2) {
    $type = 'HR Team';
} elseif ($adminposition == 3) {
    $type = 'Marketing';
} else {
    $type = 'Others';
}

$url_query  = "SELECT * FROM tb1_url WHERE url_title='news'";
$res_url = mysqli_query($conn, $url_query);
$fetch_url = mysqli_fetch_object($res_url);
$url_path = $fetch_url->url_path;

?>
<!DOCTYPE html>
<html lang="en">
<meta http-equiv="content-type" content="text/html;charset=UTF-8" />
<title>Admin - Sri Aravindar Arts & Science College </title>
<!-- Meta -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=0, minimal-ui">
<meta http-equiv="X-UA-Compatible" content="IE=edge" />

<!-- Favicon icon -->
<link rel="icon" href="assets/images/favicon.png" type="image/x-icon">
<!-- Google font-->
<link href="https://fonts.googleapis.com/css?family=Open+Sans:400,600,800" rel="stylesheet">
<!-- Required Fremwork -->
<link rel="stylesheet" type="text/css" href="plugin/bootstrap/dist/css/bootstrap.min.css">
<!-- feather Awesome -->
<link rel="stylesheet" type="text/css" href="assets/icon/feather/css/feather.css">
<!-- Font Awesome -->
<link rel="stylesheet" type="text/css" href="assets/icon/font-awesome/css/font-awesome.min.css">
<!-- themify-icons line icon -->
<link rel="stylesheet" type="text/css" href="assets/icon/themify-icons/themify-icons.css">
<!-- ico font -->
<link rel="stylesheet" type="text/css" href="assets/icon/icofont/css/icofont.css">
<!-- feather Awesome -->
<!-- Style.css -->
<link rel="stylesheet" type="text/css" href="assets/css/style.css">
<link rel="stylesheet" type="text/css" href="assets/css/jquery.mCustomScrollbar.css">
<!-- jquery file upload Frame work -->


</head>
<!-- Menu sidebar static layout -->

<body>

    <!-- Pre-loader start -->
    <div class="theme-loader">
        <div class="ball-scale">
            <div class='contain'>
                <div class="ring">
                    <div class="frame"></div>
                </div>
                <div class="ring">
                    <div class="frame"></div>
                </div>
                <div class="ring">
                    <div class="frame"></div>
                </div>
                <div class="ring">
                    <div class="frame"></div>
                </div>
                <div class="ring">
                    <div class="frame"></div>
                </div>
                <div class="ring">
                    <div class="frame"></div>
                </div>
                <div class="ring">
                    <div class="frame"></div>
                </div>
                <div class="ring">
                    <div class="frame"></div>
                </div>
                <div class="ring">
                    <div class="frame"></div>
                </div>
                <div class="ring">
                    <div class="frame"></div>
                </div>
            </div>
        </div>
    </div>
    <!-- Pre-loader end -->
    <div id="pcoded" class="pcoded">
        <div class="pcoded-overlay-box"></div>
        <div class="pcoded-container navbar-wrapper">

            <?php include('static-header.php') ?>

            <div class="pcoded-main-container">
                <div class="pcoded-wrapper">

                    <?php include('static-sidebar.php') ?>

                    <div class="pcoded-content">
                        <div class="pcoded-inner-content">
                            <div class="main-body">
                                <!-- Inline Editor start -->
                                <div class="card">
                                    <div class="card-header">
                                        <h5>Inline Editor</h5>
                                        <span>Click on textbox to type </span>
                                        <div class="card-header-right">
                                            <ul class="list-unstyled card-option">
                                                <li><i class="feather icon-maximize full-card"></i></li>
                                                <li><i class="feather icon-minus minimize-card"></i></li>
                                                <li><i class="feather icon-trash-2 close-card"></i></li>
                                            </ul>
                                        </div>
                                    </div>
                                    <div class="card-block">
                                        <div id="header">

                                            <div id="headerRight" style="border: 1pt solid #b2b9b3;height: auto;">
                                                <div contenteditable="true" id="editor-text">

                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="card-block">
                                        <div class="form-group col-md-12 mt-3">
                                            <textarea class="form-control" rows="10" id="text_edit" name="text_edit"></textarea>
                                        </div>
                                    </div>
                                </div>
                                <!-- Inline Editor end -->
                                <div id="styleSelector">

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


    <!-- Required Jquery -->
    <script type="text/javascript" src="plugin/jquery/dist/jquery.min.js"></script>
    <script type="text/javascript" src="plugin/jquery-ui/jquery-ui.min.js"></script>
    <script type="text/javascript" src="plugin/popper.js/dist/umd/popper.min.js"></script>
    <script type="text/javascript" src="plugin/bootstrap/dist/js/bootstrap.min.js"></script>
    <!-- jquery slimscroll js -->
    <script type="text/javascript" src="plugin/jquery-slimscroll/jquery.slimscroll.js"></script>
    <!-- modernizr js -->
    <script type="text/javascript" src="plugin/modernizr/modernizr.js"></script>
    <script type="text/javascript" src="plugin/modernizr/feature-detects/css-scrollbars.js"></script>
    <!-- ck editor -->
    <script src="assets/pages/ckeditor/ckeditor.js"></script>
    <!-- Custom js -->
    <script type="text/javascript" src="assets/pages/ckeditor/ckeditor-custom.js"></script>
    <script src="assets/js/pcoded.min.js"></script>
    <script src="assets/js/vartical-layout.min.js"></script>
    <script src="assets/js/jquery.mCustomScrollbar.concat.min.js"></script>
    <script src="assets/js/sweetalert.min.js"></script>
    <script type="text/javascript" src="assets/js/script.js"></script>

    <script type="text/javascript">
        $(document).ready(function() {
            $("#editor-text").on('mouseover', function() {
                var editor_text = $('#editor-text').html();
                console.log(editor_text);
                $('#text_edit').val(editor_text);
            });
        });
    </script>
</body>

</html>

Zerion Mini Shell 1.0