Вход Регистрация
Файл: adultscript-2.0.3-pro/files/admin/templates/default/extend/ajax/static_preview.plugin.php
Строк: 23
<?php
defined
('_VALID') or die('Restricted Access!');
function 
ajax_plugin_static_preview()
{
    
$data = array('status' => 0'msg' => '''code' => '''debug' => '');
    if (isset(
$_POST['title']) && isset($_POST['content'])) {
        
$title        VF::factory('filter')->get('title');
        
$content    trim($_POST['content']);
        
        
$tpl VF::factory('template');
        
$tpl->meta_title     $title;
        
$tpl->title            $title;
        
$tpl->content        $content;
        
$tpl->load(array('header''static''footer'));
        
ob_start();
        
$tpl->display();
        
$data['code'] = ob_get_contents();
        
ob_end_clean();
    } else {
        
$data['code'] = 'Invalid ajax request!';
    }
    
    return 
json_encode($data);
}
Онлайн: 1
Реклама