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/page_edit.php
<?php
$error = "";
$message = "";
include "db_connection.php";
include "sessioncheck.php";
mysqli_set_charset('utf8',$connection); 

$error = "";
$message = "";


if (!empty($_POST["Process"]) && trim($_POST["Process"]) == "EditNow") {
    $page = array();
    $page['page'] = test_input($_POST['page']);
    $old_page = test_input($_POST['old_page']);
    $page['page_php_name'] = test_input($_POST['page_php_name']);
    $page['page_url'] = trim($_POST['page_url']);
    $page['page_title'] = test_input($_POST['page_title']);
    $page['page_keyword'] = test_input($_POST['page_keyword']);
    $page['page_description'] = test_input($_POST['page_description']);
    $page['page_da_title'] = test_input($_POST['page_da_title']);
    $page['page_da_keyword'] = test_input($_POST['page_da_keyword']);
    $page['page_da_description'] = test_input($_POST['page_da_description']);
    $page['language'] = test_input($_POST['language']);
    $page['footer_title'] = stxt($_POST['footer_title']);
    $page['meta_description'] = stxt($_POST['meta_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_title'] = stxt($_POST['h1_title']);
    $page['h1_discription'] = stxt($_POST['h1_discription']);
    $page['h1_status'] = stxt($_POST['h1_status']);
    $page['Section_City_status'] = stxt($_POST['Section_City_status']);
    $page['Section_City_title'] = stxt($_POST['Section_City_title']);
    $page['Section_City_sub_title'] = stxt($_POST['Section_City_sub_title']);
    $page['Section_Region_Status'] = stxt($_POST['Section_Region_Status']);
    $page['Section_Region_title'] = stxt($_POST['Section_Region_title']);
    $page['Section_Region_sub_title'] = stxt($_POST['Section_Region_sub_title']);
    $page['section_keyword_status'] = stxt($_POST['section_keyword_status']);
    $page['section_keyword_title'] = stxt($_POST['section_keyword_title']);
    $page['section_keyword_sub_title'] = stxt($_POST['section_keyword_sub_title']);
    // $page['footer_title_section_1'] = $_POST['footer_title_section_1'];
    // $page['meta_description_section_1'] = $_POST['meta_description_section_1'];

    $lang_site_main_lang = $page['language'];
    ////////////////////////////page detail ////////////////////////
    $sqll_del = "DELETE FROM `page_detail` WHERE `page` = '" . $_GET['page'] . "' and `language` = '$lang_site_main_lang' and `key` = 'footer_section_1'";
    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 `page_detail`( `language`, `page`, `key`, `value`, `value1`) VALUES ('" . addslashes($page['language']) . "','" . $_GET['page'] . "' ,'footer_section_1','$footer_title_section_1', '$meta_description_section_1')";
            mysqli_query($connection, $sqlinst);
            $l++;
    }

    
    ////////////////////////////page detail ////////////////////////


    $lang_site_main_lang = $page['language'];
    if ($old_page != $page['page']) {
        #check if email already exist
        $query = "SELECT * from page WHERE page='" . $page['page'] . "'";
        $result = mysqli_query($connection, $query);
        if (mysqli_num_rows($result)) {
            $error = "Page already exist";
        }   
    }
    // $val = array_map('utf8_encode', $page);
    $val = json_encode($page,JSON_UNESCAPED_UNICODE);
// print_r($val);
// die();exit;

    if (empty($error)) {

$sql = "SELECT `page_id`, `page`, `page_php_name`, `page_url`, `page_title`, `page_keyword`, `page_description`, `page_top_content`, `page_middle_content`, `page_bottom_content`, `meta_values`, `language` FROM `page` WHERE page='" . $_GET['page'] . "' and language = '$lang_site_main_lang'";
$result = mysqli_query($connection, $sql);
if (mysqli_num_rows($result) > 0) {
// output data of each row
$query = "UPDATE page SET page='" . addslashes($page['page']) . "', page_php_name='" . addslashes($page['page_php_name']) . "', page_url='" . addslashes($page['page_url']) . "',page_title='" . addslashes($page['page_title']) . "', page_keyword='" . addslashes($page['page_keyword']) . "', page_description='" . addslashes($page['page_description']) . "',`meta_values`= '$val',`language`= '" . addslashes($page['language']) . "'  WHERE page='" . $_GET['page'] . "' and language = '$lang_site_main_lang'";
        $usrresult = mysqli_query($connection, $query);
        $message = "Page updated successfully";

} else {



$page_main = addslashes($page['page']) ;
$page_php_name = addslashes($page['page_php_name']);
$page_url = addslashes($page['page_url']);
$page_title = addslashes($page['page_title']);
$page_keyword = addslashes($page['page_keyword']);
$page_description = addslashes($page['page_description']);
$page_top_content = '';
$page_middle_content = '';
$page_bottom_content = '';
$meta_values = $val;
$language = $lang_site_main_lang;





$sql = "INSERT INTO `page`( `page`, `page_php_name`, `page_url`, `page_title`, `page_keyword`, `page_description`, `page_top_content`, `page_middle_content`, `page_bottom_content`, `meta_values`, `language`) VALUES ('$page_main','$page_php_name','$page_url','$page_title','$page_keyword','$page_description','$page_top_content','$page_middle_content','$page_bottom_content','$meta_values','$language')";


if (mysqli_query($connection, $sql)) {
$message = "Page updated successfully";
$last_id = mysqli_insert_id($con);
} else {
$msg = "Error: " 
 . mysqli_error($connection);
}


}


}
    
}


if (!empty($_GET["id"])) {
    $query = "SELECT * from page WHERE page='" . $_GET['page'] . "' and language = '$lang_site_main_lang'";
    $result = mysqli_query($connection, $query);
    $row = mysqli_fetch_assoc($result);
      $tmp_array = json_decode($row["meta_values"], true);

    if (!empty($row["page_id"])) {
    } else {
        header("Location:pages_list");
    }
} else {
    header("Location:pages_list");
}
?>
<!-- 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 ">All Pages</li>
            <li class="breadcrumb-item">Edit Page</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">
                    <!-- /.card-header -->
                    <div class="card-body">
                       
                       
                            <div class="form-group">
                                <label for="usrname">Page Name</label>
                                <input type="text" class="form-control" id="page" name="page" placeholder="Enter Page Name" required value="<?php if (!empty($row["page"])) {
                                                                                                                                                echo $row["page"];
                                                                                                                                            } ?>">
                            </div>
                            <div class="form-group">
                                <label for="email">PHP Page Name</label>
                                <input type="text" class="form-control" id="page_php_name" name="page_php_name" placeholder="Enter PHP Page Name" value="<?php if (!empty($row["page_php_name"])) {
                                                                                                                                                                echo $row["page_php_name"];
                                                                                                                                                            } ?>">
                            </div>
                            <div class="form-group">
                                <label for="email">Url [Start with /, for example /home]</label>
                                <input type="text" class="form-control" id="page_url" name="page_url" placeholder="Enter url without Domain" value="<?php if (!empty($row["page_url"])) {
                                                                                                                                                        echo $row["page_url"];
                                                                                                                                                    } ?>">
                            </div>

                            <div class="form-group">
                                <label for="email">Meta TITLE</label>
                                <textarea class="form-control" name="page_title" placeholder="Enter Meta TITLE"><?php if (!empty($row["page_title"])) {
                                                                                                                            echo $row["page_title"];
                                                                                                                        } ?></textarea>
                            </div>

                            <div class="form-group">
                                <label for="email">Meta Keyword</label>
                                <textarea class="form-control" name="page_keyword" placeholder="Enter Meta Keyword"><?php if (!empty($row["page_keyword"])) {
                                                                                                                                echo $row["page_keyword"];
                                                                                                                            } ?></textarea>
                            </div>

                            <div class="form-group">
                                <label for="email">Meta Description</label>
                                <textarea class="form-control" name="page_description" placeholder="Enter Meta Description"><?php if (!empty($row["page_description"])) {
                                                                                                                                        echo $row["page_description"];
                                                                                                                                    } ?></textarea>
                            </div>

                         
                            <button type="submit" id="submit" class="btn btn-primary d-none">Edit</button>
                            <input type="hidden" name="Process" id="Process" value="EditNow" />
                            <input type="hidden" class="form-control" id="old_page" name="old_page" value="<?php if (!empty($row["page"])) {
                                                                                                                echo $row["page"];
                                                                                                            } ?>">
                      
                    </div>
                    <!-- /.card-body -->
                </div>









                <!-- /.card -->
                  <div class="card">
                        <div class="card-header">
                            <h3 class="card-title"> H1</h3>  
                            <div class="float-right">
                            <?php 
                            if($_GET['page'] != 'Home'){
                            ?>
                            <button type="button" class="btn btn-secondary copytext" data-clipboard-text="%%total%%">total</button>
                   
                            <?php
                            } 

                            if($_GET['page'] == 'Nationalities'){
                            ?>
                            <button type="button" class="btn btn-secondary copytext" data-clipboard-text="%%category%%">category</button>
                            <button type="button" class="btn btn-secondary copytext" data-clipboard-text="%%nationality%%">nationality</button>
                            <?php
                            } 
                            if($_GET['page'] == 'Cities'){
                            ?>
                            <button type="button" class="btn btn-secondary copytext" data-clipboard-text="%%category%%">category</button>
                            <button type="button" class="btn btn-secondary copytext" data-clipboard-text="%%city%%">city</button>
                            <?php
                            }  
                            if($_GET['page'] == 'Adservices'){
                            ?>
                            <button type="button" class="btn btn-secondary copytext" data-clipboard-text="%%category%%">category</button>
                            <button type="button" class="btn btn-secondary copytext" data-clipboard-text="%%adservice%%">adservice</button>
                            <?php
                            }   
                            if($_GET['page'] == 'Category'){
                            ?>
                            <button type="button" class="btn btn-secondary copytext" data-clipboard-text="%%category%%">category</button>

                            <?php
                            } 
                            if($_GET['page'] == 'Search'){
                            ?>
                            <button type="button" class="btn btn-secondary copytext" data-clipboard-text="%%search%%">search</button>

                            <?php
                            }   
                            ?>                    
                            <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="<?php echo rtxt(@$tmp_array["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_discription" title="Meta Description" placeholder=" Description" ><?php echo rtxt(@$tmp_array["h1_discription"]); ?></textarea>
                            </div>


                          
                          
                            </div>
                        </div>


                   <!-- /.card -->
                  <div class="card">
                        <div class="card-header">
                            <h3 class="card-title"> Section City</h3>  
                            <div class="float-right">
                            <button type="button" class="btn btn-secondary copytext" data-clipboard-text="%%category%%">category</button>                  
                            <label class="switch">
                                

                              <input type="checkbox" class="switch-input" value="1" name="Section_City_status" <?php if($tmp_array["Section_City_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" name="Section_City_title" placeholder="Title" value="<?php echo rtxt(@$tmp_array["Section_City_title"]); ?>">
                            </div>

                            <div class="form-group">
                                <label for="country">Sub Title</label>
                                <input type="text" class="form-control" id="meta_keyword" name="Section_City_sub_title" placeholder="Title" value="<?php echo rtxt(@$tmp_array["Section_City_sub_title"]); ?>">
                            </div>


                          
                          
                            </div>
                        </div>

                            <!-- /.card -->
                  <div class="card">
                        <div class="card-header">
                            <h3 class="card-title"> Section Region</h3>  
                            <div class="float-right">
                             <button type="button" class="btn btn-secondary copytext" data-clipboard-text="%%category%%">category</button>      
                            <label class="switch">
                                

                              <input type="checkbox" class="switch-input" value="1" name="Section_Region_Status" <?php if($tmp_array["Section_Region_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" name="Section_Region_title" placeholder="Title" value="<?php echo rtxt(@$tmp_array["Section_Region_title"]); ?>">
                            </div>

                            <div class="form-group">
                                <label for="country">Sub Title</label>
                                <input type="text" class="form-control" id="meta_keyword" name="Section_Region_sub_title" placeholder="Title" value="<?php echo rtxt(@$tmp_array["Section_Region_sub_title"]); ?>">
                            </div>


                          
                          
                            </div>
                        </div>



           <!-- /.card -->
                  <div class="card">
                        <div class="card-header">
                            <h3 class="card-title"> Section Keyword</h3>  
                            <div class="float-right">
                             <button type="button" class="btn btn-secondary copytext" data-clipboard-text="%%category%%">category</button>      
                            <label class="switch">
                                

                              <input type="checkbox" class="switch-input" value="1" name="section_keyword_status" <?php if($tmp_array["section_keyword_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" name="section_keyword_title" placeholder="Title" value="<?php echo rtxt(@$tmp_array["section_keyword_title"]); ?>">
                            </div>

                            <div class="form-group">
                                <label for="country">Sub Title</label>
                                <input type="text" class="form-control" id="meta_keyword" name="section_keyword_sub_title" placeholder="Title" value="<?php echo rtxt(@$tmp_array["section_keyword_sub_title"]); ?>">
                            </div>


                          
                          
                            </div>
                        </div>







                <div class="card">
                        <div class="card-header">
                            <h3 class="card-title">Above Footer (section 1)</h3>  
                            <div class="float-right">
                            <?php 
                                 if($_GET['page'] == 'Nationalities'){
                            ?>
                            <button type="button" class="btn btn-secondary copytext" data-clipboard-text="%%category%%">category</button>
                            <button type="button" class="btn btn-secondary copytext" data-clipboard-text="%%nationality%%">nationality</button>
                            <?php
                                 } 
                                   if($_GET['page'] == 'Cities'){
                            ?>
                            <button type="button" class="btn btn-secondary copytext" data-clipboard-text="%%category%%">category</button>
                            <button type="button" class="btn btn-secondary copytext" data-clipboard-text="%%city%%">city</button>
                            <?php
                                 }  
                                   if($_GET['page'] == 'Adservices'){
                            ?>
                            <button type="button" class="btn btn-secondary copytext" data-clipboard-text="%%category%%">category</button>
                            <button type="button" class="btn btn-secondary copytext" data-clipboard-text="%%adservice%%">adservice</button>
                            <?php
                                 }   
                                      if($_GET['page'] == 'Category'){
                            ?>
                            <button type="button" class="btn btn-secondary copytext" data-clipboard-text="%%category%%">category</button>

                            <?php
                                 } 
                                 if($_GET['page'] == 'Search'){
                            ?>
                            <button type="button" class="btn btn-secondary copytext" data-clipboard-text="%%search%%">search</button>

                            <?php
                                 }   
                            ?>                    

                                


                            <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 `page_detail` WHERE `page` = '" . $_GET['page'] . "' and `language` = '$lang_site_main_lang' and `key` = 'footer_section_1'";
                                $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++;
                                ?>
                            <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="<?PHP ECHO $value ; ?>">
                                
                           
                                <label for="country">Description</label>
                                <textarea class="form-control input_border_radius input-sm" id="footer_description" rows="5" name="meta_description_section_1[]" title="Meta Description" placeholder="Meta Description" ><?php echo $value1 ?></textarea>
                            </div>

                        <?php

                        }
                        } else {
                        $S_MSG = "0 results";
                        }
                                                            ?>
                                    
                          
                                
                            
                            


                           
                                
                            </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">
                            <?php 
                            if($_GET['page'] == 'Nationalities'){
                            ?>
                            <button type="button" class="btn btn-secondary copytext" data-clipboard-text="%%category%%">category</button>
                            <button type="button" class="btn btn-secondary copytext" data-clipboard-text="%%nationality%%">nationality</button>
                            <?php
                            } 
                            if($_GET['page'] == 'Cities'){
                            ?>
                            <button type="button" class="btn btn-secondary copytext" data-clipboard-text="%%category%%">category</button>
                            <button type="button" class="btn btn-secondary copytext" data-clipboard-text="%%city%%">city</button>
                            <?php
                            }  
                            if($_GET['page'] == 'Adservices'){
                            ?>
                            <button type="button" class="btn btn-secondary copytext" data-clipboard-text="%%category%%">category</button>
                            <button type="button" class="btn btn-secondary copytext" data-clipboard-text="%%adservice%%">adservice</button>
                            <?php
                            }   
                            if($_GET['page'] == 'Category'){
                            ?>
                            <button type="button" class="btn btn-secondary copytext" data-clipboard-text="%%category%%">category</button>

                            <?php
                            } 
                            if($_GET['page'] == 'Search'){
                            ?>
                            <button type="button" class="btn btn-secondary copytext" data-clipboard-text="%%search%%">search</button>

                            <?php
                            }   
                            ?>                    
                            <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" 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="meta_description" title="Meta Description" placeholder="Meta Description" ><?php echo @$tmp_array["meta_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>
                      </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();
      var xhr = new XMLHttpRequest();
      xhr.onreadystatechange = function(s) {
        if (xhr.readyState === 4) {
          document.getElementById('content_back').innerHTML = xhr.responseText;
          // alert('working');
          // console.log('data',this.responseText)
          document.getElementById('language').value = $(this).val();
        }
      };
      xhr.open('POST', 'service/ajax_page?slang=' + $(this).val()+"&id=<?php echo $id ?>"+"&page=<?php echo $page ?>");
      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) {
     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="footer_description" 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