Пример #1
0
    public static function hook_header_print_js_demo()
    {
        if (self::$_header_demo_js_done) {
            return;
        }
        self::$_header_demo_js_done = true;
        $u = preg_replace('#.demo_theme=\\w+#', '', $_SERVER['REQUEST_URI']);
        ?>

    <script type="text/javascript">
        $(function(){
            $('#profile_info').append('<div id="demo_theme" style="position:absolute; top:0; margin-left: -223px; color:#000; background: #FFF; border-right:1px solid #CCC; border-left:1px solid #CCC; border-bottom:1px solid #CCC; border-bottom-left-radius:5px; border-bottom-right-radius:5px; opacity: 0.5; padding:5px; text-align: center;">' +
                'Change <a href="http://codecanyon.net/item/ultimate-client-manager-crm-pro-edition/2621629?ref=dtbaker&utm_source=Demo&utm_medium=Header&utm_campaign=DemoClicks&utm_content=<?php 
        echo htmlspecialchars(self::$current_theme);
        ?>
" target="_blank" style="color:#000;">UCM Pro</a> Theme: ' +
                '<a href="<?php 
        echo htmlspecialchars($u);
        echo strpos($u, '?') === false ? '?' : '&';
        ?>
demo_theme=pro" style="display:inline-block; border:2px solid #<?php 
        echo self::$current_theme == 'pro' ? '000' : 'FFF';
        ?>
; padding:0px 6px; background: #555; color:#FFF; margin:0 3px;" title="UCM Pro - Dark Theme Preview">1</a>' +
                '<a href="<?php 
        echo htmlspecialchars($u);
        echo strpos($u, '?') === false ? '?' : '&';
        ?>
demo_theme=blue" style="display:inline-block; border:2px solid #<?php 
        echo self::$current_theme == 'blue' ? '000' : 'FFF';
        ?>
; padding:0px 6px; background: #DBEFF5; color:#0079C2; margin:0 3px;" title="UCM Pro - Blue Theme Preview">2</a>' +
                '<a href="<?php 
        echo htmlspecialchars($u);
        echo strpos($u, '?') === false ? '?' : '&';
        ?>
demo_theme=left" style="display:inline-block; border:2px solid #<?php 
        echo self::$current_theme == 'left' ? '000' : 'FFF';
        ?>
; padding:0px 6px; background: #555; color:#FFF; margin:0 3px;" title="UCM Pro - Left Menu Theme Preview">3</a>' +
                '<a href="<?php 
        echo htmlspecialchars($u);
        echo strpos($u, '?') === false ? '?' : '&';
        ?>
demo_theme=default" style="display:inline-block; border:2px solid #<?php 
        echo self::$current_theme == 'default' ? '000' : 'FFF';
        ?>
; padding:0px 6px; background: #A7A5A5; color:#FFF; margin:0 3px;" title="UCM Pro - Default Theme Preview">4</a>' +
                '<a href="<?php 
        echo htmlspecialchars($u);
        echo strpos($u, '?') === false ? '?' : '&';
        ?>
demo_theme=whitelabel1" style="display:inline-block; border:2px solid #<?php 
        echo self::$current_theme == 'whitelabel1' ? '000' : 'FFF';
        ?>
; padding:0px 6px; background: #f3f3f3; color:#95cd00; margin:0 3px;" title="UCM Pro - White Label Theme Preview">5</a>' +
                '<a href="<?php 
        echo htmlspecialchars($u);
        echo strpos($u, '?') === false ? '?' : '&';
        ?>
demo_theme=metis" style="display:inline-block; border:2px solid #<?php 
        echo self::$current_theme == 'metis' ? '000' : 'FFF';
        ?>
; padding:0px 6px; background: #333; color:#FFF; margin:0 3px;" title="UCM Pro - Metis Theme Preview">6</a>' +
                '<a href="<?php 
        echo htmlspecialchars($u);
        echo strpos($u, '?') === false ? '?' : '&';
        ?>
demo_theme=theme_adminlte" style="display:inline-block; border:2px solid #<?php 
        echo self::$current_theme == 'theme_adminlte' ? '000' : 'FFF';
        ?>
; padding:0px 6px; background: #333; color:#FFF; margin:0 3px;" title="UCM Pro - AdminLTE Theme Preview">7</a>' +
                '<br/>' +
                'Like this software? <a href="http://codecanyon.net/item/ultimate-client-manager-crm-pro-edition/2621629?ref=dtbaker&utm_source=Demo&utm_medium=Header&utm_campaign=DemoClicks&utm_content=<?php 
        echo htmlspecialchars(self::$current_theme);
        ?>
" title="Download Ultimate Client Manager Pro Edition" target="_blank" style="color:#000; text-decoration: underline;">Click here</a> to get it!' +
                '</div>');
            $('#demo_theme').hover(function(){
                $(this).stop().animate({"opacity": 1});
            },function(){
                $(this).stop().animate({"opacity": 0.5});
            });
        });
    </script>
    <?php 
    }