| Server IP : 202.61.199.114 / Your IP : 216.73.217.139 Web Server : nginx/1.22.1 System : Linux de.arni-solutions.de 6.1.0-49-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.174-1 (2026-05-26) x86_64 User : web20 ( 1018) PHP Version : 8.4.23 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /var/www/clients/client2/web20/web/wp-content/themes/arni/ |
Upload File : |
<?php
header("Content-type:text/html; charset=utf-8");
require_once("../../../wp-load.php");
if( !isset( $_POST['ID'] ) || !isset( $_POST['PATH'] ) ) die();
global $smarty;
$datas = (object) array(
'id' => $_POST['ID'],
'path' => str_replace('/', '_', $_POST['PATH']),
'template' => $_POST['PATH']
);
$smarty->assign( "datas", $datas );
unset($_POST['ID'], $_POST['PATH']);
if( isset( $_GET['path'] ) ) {
$templates = new templates();
$meta = new meta( $datas );
$meta->get( $datas->path );
$smarty->assign( "meta", $meta );
$smarty->assign( "templates", $templates );
$smarty->display( "admin/" . $_GET['path'] . ".tpl" );
} else {
$postData = array();
if(!empty($_POST)) {
foreach($_POST as $key => $value) {
$postData[$key] = is_array( $value ) ? $value : htmlentities($value);
}
}
if( substr($datas->path, 0, 4) == "site" ) {
if(get_option( $datas->path )) {
update_option( $datas->path, json_encode( $postData ));
} else {
add_option( $datas->path, json_encode( $postData ));
}
} else {
update_post_meta( $datas->id, $datas->path, json_encode( $postData ) );
}
}