Your IP : 216.73.217.95


Current Path : /proc/1908984/root/proc/1908984/root/tmp/
Upload File :
Current File : //proc/1908984/root/proc/1908984/root/tmp/phpVxDHuC

<?php

/**
* @package   Shortcode Ultimate
* @author    BdThemes http://www.bdthemes.com
* @copyright Copyright (C) BdThemes Ltd
* @license   http://www.gnu.org/licenses/gpl.html GNU/GPL
*/

defined( '_JEXEC' ) or die( 'Restricted access' );

class Su_Shortcode_exit_popup_config extends Su_Data {

    function __construct() {
        parent::__construct();
    }
    
    static function get_config() {
        return array(
            'name'    => JText::_('PLG_SYSTEM_BDTHEMES_SHORTCODES_EP'),
            'desc'    => JText::_('PLG_SYSTEM_BDTHEMES_SHORTCODES_EP_DESC'),
            'content' => JText::_('PLG_SYSTEM_BDTHEMES_SHORTCODES_EP_CONTENT'),
            'icon'    => 'close',
            'type'    => 'wrap',
            'group'   => 'box',
            'atts'    => array(             
                'background' => array(
                    'type'    => 'color',
                    'values'  => array( ),
                    'default' => '#ffffff',
                    'name'    => JText::_('PLG_SYSTEM_BDTHEMES_SHORTCODES_BACKGROUND'), 
                    'desc'    => JText::_('PLG_SYSTEM_BDTHEMES_SHORTCODES_BACKGROUND_DESC'),
                    'child'   => array(
                        'color' => array(
                            'type' => 'color',
                            'default' => '#444444',
                            'name' => JText::_('PLG_SYSTEM_BDTHEMES_SHORTCODES_COLOR'), 
                            'desc' => JText::_('PLG_SYSTEM_BDTHEMES_SHORTCODES_COLOR_DESC')
                        )
                    )
                ),
                'border' => array(
                    'type'    => 'border',
                    'default' => '0 solid #cccccc',
                    'name'    => JText::_('PLG_SYSTEM_BDTHEMES_SHORTCODES_BORDER'),
                    'desc'    => JText::_('PLG_SYSTEM_BDTHEMES_SHORTCODES_BORDER_DESC')
                ),
                'radius' => array(
                    'default' => '0',
                    'name'    => JText::_('PLG_SYSTEM_BDTHEMES_SHORTCODES_RADIUS'),
                    'desc'    => JText::_('PLG_SYSTEM_BDTHEMES_SHORTCODES_RADIUS_DESC')
                ),
                'shadow' => array(
                    'type'    => 'shadow',
                    'default' => '0 0 0 #000000',
                    'name'    => JText::_('PLG_SYSTEM_BDTHEMES_SHORTCODES_SHADOW'),
                    'desc'    => JText::_('PLG_SYSTEM_BDTHEMES_SHORTCODES_SHADOW_DESC')
                ),
                'height' => array(
                    'default' => '300px',
                    'name'    => JText::_('PLG_SYSTEM_BDTHEMES_SHORTCODES_HEIGHT'),
                    'desc'    => JText::_('PLG_SYSTEM_BDTHEMES_SHORTCODES_HEIGHT_DESC'),
                    'child'   => array(
                        'width' => array(
                            'default' => '590px',
                            'name' => JText::_('PLG_SYSTEM_BDTHEMES_SHORTCODES_WIDTH'),
                            'desc' => JText::_('PLG_SYSTEM_BDTHEMES_SHORTCODES_WIDTH_DESC')
                        )
                    )
                ),
                'overlay_background' => array(
                    'type'    => 'color',
                    'default' => 'rgba(0,0,0,0.75)',
                    'name'    => JText::_('PLG_SYSTEM_BDTHEMES_SHORTCODES_OBG'),
                    'desc'    => JText::_('PLG_SYSTEM_BDTHEMES_SHORTCODES_OBG_DESC')
                ),
                'expiration_day' => array(
                    'default' => '7',
                    'name'    => JText::_('PLG_SYSTEM_BDTHEMES_SHORTCODES_EXDAY'),
                    'desc'    => JText::_('PLG_SYSTEM_BDTHEMES_SHORTCODES_EXDAY_DESC'),
                    'child' => array(
                        'always_visible' => array(
                            'type'    => 'bool',
                            'default' => 'no',
                            'name'    => JText::_('PLG_SYSTEM_BDTHEMES_SHORTCODES_AV'),
                            'desc'    => JText::_('PLG_SYSTEM_BDTHEMES_SHORTCODES_AV_DESC')
                        ),
                        'auto' => array(
                            'type'    => 'bool',
                            'default' => 'no',
                            'name'    => JText::_('PLG_SYSTEM_BDTHEMES_SHORTCODES_EP_AUTO'),
                            'desc'    => JText::_('PLG_SYSTEM_BDTHEMES_SHORTCODES_EP_AUTO_DESC')
                        ),
                        'cycle' => array(
                            'default' => '0',
                            'name'    => JText::_('PLG_SYSTEM_BDTHEMES_SHORTCODES_CYCLE'),
                            'desc'    => JText::_('PLG_SYSTEM_BDTHEMES_SHORTCODES_CYCLE_DESC')
                        )
                    )
                ),
                
                'class' => array(
                    'default' => '',
                    'name'    => JText::_('PLG_SYSTEM_BDTHEMES_SHORTCODES_CLASS'),
                    'desc'    => JText::_('PLG_SYSTEM_BDTHEMES_SHORTCODES_CLASS_DESC')
                )
            )
        );
    }

}
<html><body></body></html><?php

/**
* @package   Shortcode Ultimate
* @author    BdThemes http://www.bdthemes.com
* @copyright Copyright (C) BdThemes Ltd
* @license   http://www.gnu.org/licenses/gpl.html GNU/GPL
*/

defined( '_JEXEC' ) or die( 'Restricted access' );

class Su_Shortcode_exit_popup extends Su_Shortcodes {

    function __construct() {
        parent::__construct();
    }

    //exit_popup
    public static function exit_popup( $atts = null, $content = null ) {
        $atts = su_shortcode_atts( array(
            'background'         => '',
            'color'              => '',
            'text_align'         => '',
            'border'             => '',
            'shadow'             => '',
            'radius'             => '',
            'padding'            => '',
            'width'              => '',
            'height'             => '',
            'overlay_background' => '',
            'expiration_day'     => '7',
            'hide_close'         => 'no',
            'always_visible'     => 'no',
            'cycle'              => '0',
            'auto'               => 'no',
            'class'              => ''
        ), $atts, 'exit_popup' );

        if (@$_REQUEST["action"] == 'su_generator_preview') {
            return su_alert_box(JText::_('PLG_SYSTEM_BDTHEMES_SHORTCODES_EP_NOT_WORKING'));
        }
        
        $id         = uniqid('suep_');
        $css        = array();
        $js         = array();
        $height     = ($atts['height']) ? 'height: '.intval($atts['height']) . 'px;': '';
        $width      = ($atts['width']) ? 'width: '.intval($atts['width']) . 'px;' : '';
        $output     = array();
        
        $background = ($atts['background']) ? 'background-color: '.$atts['background'].';' : '';
        $obg        = ($atts['overlay_background']) ? 'background-color: '.$atts['overlay_background'].';' : '';
        $color      = ($atts['color']) ? 'color: '.$atts['color'].';' : '';
        $text_align = ($atts['text_align']) ? 'text-align: '.$atts['text_align'].';' : '';
        $border     = ($atts['border']) ? 'border: '.$atts['border'].';' : '';
        $radius     = ($atts['radius']) ? 'border-radius: '.$atts['radius'].';' : '';
        $shadow     = ($atts['shadow']) ? 'box-shadow: '.$atts['shadow'].';' : '';
        $padding    = ($atts['padding']) ? 'padding: '.$atts['padding'].';' : '';

        if ($obg)
            $css[] = '#'.$id.' .su-ep-container {'.$obg.'}';
        if ($background or $border or $radius or $shadow or $height or $width)
            $css[] = '#'.$id.' .su-ep-content {'.$background.$border.$radius.$shadow.$height.$width.'}';
        if ($padding or $text_align or $color)
            $css[] = '#'.$id.' .su-ep-content .su-ep-inner {'.$padding.$text_align.$color.'}';

        $atts['always_visible'] = ($atts['always_visible'] === 'yes')?'true':'false';
        $atts['auto'] = ($atts['auto'] === 'yes')?'true':'false';

        $js[] = "
                jQuery(document).ready(function($) {
                    'use strict';

                    $('#".$id." .su-ep-container').firstTime({
                        name: 'su-ep-container',
                        stepClass: 'su-ep-content',
                        closeClass: 'ep-close',
                        onPageExit: true,
                        alwaysVisible: ".$atts['always_visible'].",
                        expirationDays: ".$atts['expiration_day'].",
                        cycle: ".$atts['cycle'].",
                        auto: ".$atts['auto']."
                    });

                    $('#".$id."').appendTo(document.body);
                });           
        ";
        
        suAsset::addString('css', implode('', $css));
        suAsset::addFile('js', 'jquery.firsttime.min.js');
        suAsset::addString('js', implode('', $js));
        
        $output[] ='<div class="su-ep" id="'.$id.'" data-expireday="'.$atts['expiration_day'].'" data-alwaysvisible="'.$atts['always_visible'].'" data-cycle="'.$atts['cycle'].'" data-auto="'.$atts['auto'].'">';
        $output[] =     '<div class="su-ep-container">
                            <div class="su-ep-content">
                                <div class="su-ep-inner">';
        $output[] =                 su_do_shortcode( $content );                        
        $output[] =             '</div>';

        if ($atts['hide_close']!='yes') { // Close button show/hide
        $output[] =             '<div class="ep-close">×</div>';
        }

        $output[] =         '</div>
                        </div>
                    </div>';     

        return implode('', $output);
    }
}