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/ |
<?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 * FROM `page` WHERE id='" . $_GET['id'] . "' 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 seo WHERE id='" . $_GET['id'] . "' 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");
}
$sql = "SELECT `id`, `page`, `page_php`, `language`, `keyword`, `meta_keyword`, `outgoing_link`, `anchor`, `meta_value`, `created_at`, `updated_at` FROM `seo` WHERE id='" . $_GET['id'] . "' and language = '$lang_site_main_lang'";
$result = mysqli_query($connection, $sql);
if (mysqli_num_rows($result) > 0) {
// output data of each row
$a=0;
while($row = mysqli_fetch_assoc($result)) {
$id = $row["id"];
$page = $row["page"];
$page_php = $row["page_php"];
$language = $row["language"];
$keyword = $row["keyword"];
$meta_keyword = $row["meta_keyword"];
$outgoing_link = $row["outgoing_link"];
$anchor = $row["anchor"];
$meta_value = $row["meta_value"];
$created_at = $row["created_at"];
$updated_at = $row["updated_at"];
$a++;
}
}
?>
<!-- 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 ">Seo</li>
<li class="breadcrumb-item">Keyword</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">keyword</label>
<input type="text" class="form-control" id="page" name="page" placeholder="Enter Page Name" required value="<?php if (!empty($keyword)) {echo $keyword; } ?>">
</div>
<div class="form-group">
<label for="usrname">meta keyword</label>
<input type="text" class="form-control" id="page" name="page" placeholder="Enter Page Name" required value="<?php if (!empty($meta_keyword)) {echo $meta_keyword; } ?>">
</div>
<div class="form-group">
<label for="usrname">anchor</label>
<input type="text" class="form-control" id="page" name="page" placeholder="Enter Page Name" required value="<?php if (!empty($anchor)) {echo $anchor; } ?>">
</div>
<div class="form-group">
<label for="usrname">Outgoin Link</label>
<input type="text" class="form-control" id="page" name="page" placeholder="Enter Page Name" required value="<?php if (!empty($outgoing_link)) {echo $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" />
<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">Details</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>
</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 + '" /> ' + '<input name = "DynamicTextBox" type="text" value = "' + value + '" /> ' +'<input id="btnAdd" type="button" value="Add" />'
// +'<input type="button" value="Remove" class="remove" />'
}
</script>