<?php
$parse_uri = explode('wp-content', $_SERVER['SCRIPT_FILENAME']);
$wp_load = $parse_uri[0] . 'wp-load.php';
require_once($wp_load);
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" style="margin: 0 !important;">
    <head>
        <meta http-equiv="Content-type" content="text/html; charset=utf-8" />
        <title>Shortcode Preview</title>
        <link rel='stylesheet' href='<?php echo bloginfo('stylesheet_url') ?>' type='text/css' media='all' />
        <style type="text/css" >html{margin:0 !important;} #wpadminbar{display:none; visibility: hidden;}</style>
        <script type="text/javascript" src="http://www.google.com/jsapi"></script>
        <?php echo ThemeMakersHelperFonts::get_google_fonts_link() ?>
        <?php
        wp_deregister_script('jquery');
        wp_register_script('jquery', THEMEMAKERS_THEME_URI . '/js/jquery172.js', array(), '1.7.2');
        wp_print_scripts('jquery');
        ?>
        <script type="text/javascript">

            var template_directory = "<?php echo THEMEMAKERS_THEME_URI; ?>/";
            var ajaxurl = "<?php echo admin_url('admin-ajax.php'); ?>";
            //translations
            var lang_enter_correctly = "<?php _e('Please enter correct', THEMEMAKERS_THEME_FOLDER_NAME); ?>";
            var lang_sended_succsessfully = "<?php _e('Your message have been sent successfully!', THEMEMAKERS_THEME_FOLDER_NAME); ?>";
            var lang_server_failed = "<?php _e('Server failed. Send later', THEMEMAKERS_THEME_FOLDER_NAME); ?>";
        </script>
        <?php
        $_REQUEST['excerpt_symbols_count'] = ThemeMakersThemeModel::get_option("excerpt_symbols_count");
        if (!$_REQUEST['excerpt_symbols_count']) {
            $_REQUEST['excerpt_symbols_count'] = 140;
        }

        $_REQUEST['show_full_content'] = ThemeMakersThemeModel::get_option("show_full_content");
        $_REQUEST['disable_author'] = ThemeMakersThemeModel::get_option("disable_author");
        $_REQUEST['disable_blog_comments'] = ThemeMakersThemeModel::get_option("disable_blog_comments");
        $_REQUEST['disable_categories'] = ThemeMakersThemeModel::get_option("disable_categories");
        $_REQUEST['disable_tags'] = ThemeMakersThemeModel::get_option("disable_tags");
        $_REQUEST['sidebar_position'] = 'no_sidebar';
        ?>
        <?php wp_head() ?>

        <style type="text/css">

            .entry-shortcode { padding: 20px ;}

        </style>
    </head>

    <body style="background: #ddd;">

        <div class="entry-shortcode">

            <?php
            if (isset($_GET['shortcode'])) {
                $shortcode = base64_decode($_GET['shortcode']);
                $shortcode = ThemeMakersHelper::db_quotes_shield(array('shortcode' => $shortcode));
                $shortcode = $shortcode['shortcode'];
                echo do_shortcode($shortcode);
            }
            ?>			

        </div><!--/ .entry-shortcode-->

        <?php wp_footer() ?>
    </body>
</html>

