how to add ckeditor cdn implementation

 <?php 

//session_start();

session_start();

error_reporting(1);

if(empty($_SESSION['user_email'])){

    header('Location:login.php');

}

include("database/admin_confi.php");

$id=$_GET['id'];


$sqlCate=mysqli_query($conn,"SELECT*FROM maincategor WHERE id='$id'");

$fetchCate=mysqli_fetch_assoc($sqlCate);

 ?>


<!DOCTYPE html>

<html lang="en">

    


<head>


        <meta charset="utf-8" />

        <title>Welcome Admin </title>

        <meta name="viewport" content="width=device-width, initial-scale=1.0">

        <meta content="A fully featured admin theme which can be used to build CRM, CMS, etc." name="description" />

        <meta content="Coderthemes" name="author" />

        <meta http-equiv="X-UA-Compatible" content="IE=edge" />

        <!-- App favicon -->

        <link rel="shortcut icon" href="https://coderthemes.com/ubold/layouts/assets/images/favicon.ico">


        <!-- plugin css -->

        <link href="assets/libs/admin-resources/jquery.vectormap/jquery-jvectormap-1.2.2.css" rel="stylesheet" type="text/css" />


        <!-- App css -->

        <link href="assets/css/bootstrap.min.css" rel="stylesheet" type="text/css" id="bs-default-stylesheet" />

        <link href="assets/css/app.min.css" rel="stylesheet" type="text/css" id="app-default-stylesheet" />


        <link href="assets/css/bootstrap-dark.min.css" rel="stylesheet" type="text/css" id="bs-dark-stylesheet" />

        <link href="assets/css/app-dark.min.css" rel="stylesheet" type="text/css" id="app-dark-stylesheet" />

 <script src="https://cdn.ckeditor.com/4.16.1/full/ckeditor.js"></script>

       

        <!-- icons -->

        <link href="assets/css/icons.min.css" rel="stylesheet" type="text/css" />


    </head>


    <body class="loading" data-layout-mode="horizontal" data-layout='{"mode": "light", "width": "fluid", "menuPosition": "fixed", "topbar": {"color": "dark"}, "showRightSidebarOnPageLoad": true}'>


        <!-- Begin page -->

        <div id="wrapper">


            <!-- Topbar Start -->

<?php include('header.php');?>

<?php include('menu.php');?>


            <!-- ============================================================== -->

            <!-- Start Page Content here -->

            <!-- ============================================================== -->


            <div class="content-page">

                <div class="content">


                    <!-- Start Content-->

                    <div class="container-fluid">

                        

                        <!-- start page title -->

                        <div class="row">

                            <div class="col-12">

                                <div class="page-title-box">

                                    <div class="page-title-right">

                                       

                                    </div>

                                    <h4 class="page-title">Add Category</h4>

                                </div>

                            </div>

                        </div>     

                        <!-- end page title --> 

 <div class="row">

                            <div class="col-lg-12">


                                <div class="card-box">

                                   

                                 <?php 

if(isset($_POST['submit']))

{

     date_default_timezone_set("Asia/Calcutta");

$today = date("F j, Y, g:i a");     

$College=$_POST['College'];

$content=mysqli_escape_string($conn,$_POST['content']);

$image=$_FILES['image']['name'];

$temp_image=$_FILES['image']['tmp_name'];

move_uploaded_file($temp_image,"../product/$image");

// $bannername="derma-pcd-company-in-$College";

//$file=$_

    $text=$College;


$text = preg_replace('~[^\\pL\d]+~u', '-', $text);


        // trim

        $text = trim($text, '-');


        // transliterate

        $text = iconv('utf-8', 'us-ascii//TRANSLIT', $text);


        // lowercase

        $text = strtolower($text);


        // remove unwanted characters

        $text = preg_replace('~[^-\w]+~', '', $text);


        if (empty($text))

        {

          return 'n-a';

        }

        

        if($id!=''){

            if($image!=''){

                $imgsql=",image='$image'";

            }

              $query="UPDATE maincategor SET catname='$College'".$imgsql." ,content='$content' WHERE id='$id'";

        }else{

  $query="INSERT INTO maincategor(catname,image,content)VALUES('$College','$image','$content')";

        }

$run=mysqli_query($conn,$query);

if($run){

echo '<div class="alert alert-success alert-dismissible">

  <a href="#" class="close" data-dismiss="alert" aria-label="close">&times;</a>

  <strong>Success!</strong> Category  added.

</div>';

}

}

?> 

                                    <form method="post"  enctype="multipart/form-data">

<div class="row">

<div class="col-md-12">

                                        <div class="form-group">

                                            <label for="userName">Category <span class="text-danger">*</span></label>

                                         

                                          

                                         <input type="text" class="form-control" placeholder="Category" name="College" value="<?php echo $fetchCate['catname']; ?>">

                                        </div>

  

                                        </div>

                                        

<div class="col-md-12">

                                        <div class="form-group">

                                            <label for="userName">Small Image <span class="text-danger">*</span></label>

                                         

                                          <img src="../product/<?php echo $fetchCate['image']; ?>" width="200" height="100">

                                         <input type="file" class="form-control" placeholder="Category" name="image">

                                        </div>

  

                                        </div>

                                        

                                        

                                        <div class="col-md-12">

                                        <div class="form-group">

                                            <label for="userName">Big Image <span class="text-danger">*</span></label>

                                         

                                          <img src="../product/<?php echo $fetchCate['image']; ?>" width="200" height="100">

                                         <input type="file" class="form-control" placeholder="Category" name="image">

                                        </div>

  

                                        </div>

                                        

                                        

 

<div class="col-md-12">

                                        <div class="form-group">

                                            <label for="userName">Content<span class="text-danger">*</span></label>

                                         

                                          

                                         <textarea type="file" class="form-control" placeholder="content" name="content" value=""><?php echo $fetchCate['content'];?></textarea>

                                        </div>

  

                                        </div>  

</div>

                                  

                                  


                                        <div class="form-group text-right m-b-0">

                                            <button class="btn btn-primary waves-effect waves-light" name="submit" type="submit">

                                                Submit

                                            </button>

                                            <button type="reset" class="btn btn-secondary waves-effect m-l-5">

                                                Cancel

                                            </button>

                                        </div>


                                    </form>

                                </div> <!-- end card-box -->

                            </div>

                            <!-- end col -->


                           

                        </div>

                        <!-- end row -->


              

                        <!-- end row -->


                       

                        <!-- end row -->

                        

                    </div> <!-- container -->


                </div> <!-- content -->


                <!-- Footer Start -->

             <?php include('footer.php');?>

                <!-- end Footer -->


            </div>


            <!-- ============================================================== -->

            <!-- End Page content -->

            <!-- ============================================================== -->



        </div>

        <!-- END wrapper -->


        <!-- Right Sidebar -->

        

        <!-- /Right-bar -->


        <!-- Right bar overlay-->

        <div class="rightbar-overlay"></div>

  <script>

                        CKEDITOR.replace( 'content' );

                </script>

                <script>

                        CKEDITOR.replace( 'editor2' );

                </script>

        <!-- Vendor js -->

        <script src="assets/js/vendor.min.js"></script>


        <!-- Plugins js-->

        <script src="assets/libs/jquery-sparkline/jquery.sparkline.min.js"></script>

        <script src="assets/libs/admin-resources/jquery.vectormap/jquery-jvectormap-1.2.2.min.js"></script>

        <script src="assets/libs/admin-resources/jquery.vectormap/maps/jquery-jvectormap-world-mill-en.js"></script>


        <!-- Dashboard 2 init -->

        <script src="assets/js/pages/dashboard-2.init.js"></script>


        <!-- App js -->

        <script src="assets/js/app.min.js"></script>

        

    </body>


</html>

Comments

Popular posts from this blog

how manage leads mangement system user and manager auto assign in php how manage leads mangement system user and manager auto assign in php how manage leads mangement system user and manager auto assign in php

How to add date filter in php How to add date filter in php How to add date filter in php How to add date filter in php How to add date filter in php How to add date filter in php How to add date filter in php How to add date filter in php How to add date filter in php How to add date filter in php How to add date filter in php How to add date filter in php How to add date filter in php How to add date filter in php How to add date filter in php How to add date filter in php How to add date filter in php How to add date filter in php How to add date filter in php How to add date filter in php How to add date filter in php How to add date filter in php How to add date filter in php How to add date filter in php How to add date filter in php How to add date filter in php How to add date filter in php How to add date filter in php How to add date filter in php

How to Run a Flask framework in Python How to Run a Flask framework in Python How to Run a Flask framework in Python How to Run a Flask framework in Python How to Run a Flask framework in Python How to Run a Flask framework in Python How to Run a Flask framework in Python