<repo_name>bootiful-podcast/bootiful-podcast.github.io<file_sep>/assets/js/custom 2.js



$(document).ready(function () {

  $('.mobile-nav-btn').on('click', function () {
    $('.hamburger-menu').toggleClass('open');
  });

});


$(document).ready(function () {
/* var navheight = $('#navbar').height(); */

	$("#scrollTop, .btn-slide").click(function() {
	    // get the destination
	    var destination = $(this).attr('href');
	    
	    $('html, body').stop().animate({
	        scrollTop: $(destination).offset().top
	    }, 700);
	    
	    // override the default link click behavior
	    return false;
	});

});


<file_sep>/assets/soundplugin/download_header.php
<?php



$path = 'sounds/adg3.mp3';
$name = 'song.mp3';


if(isset($_GET['path'])){
    $path = $_GET['path'];
}
if(isset($_GET['name'])){
    $name = $_GET['name'];
}

if(strpos($path,'sounds/')!==0 && strpos($path,'Demos/')!==0){
    die("NOT ALLOWED!");
}


header('Content-Description: File Transfer');
header('Content-Disposition: attachment; filename="'.$name.'"');
header('Content-Transfer-Encoding: binary');
header('Expires: 0');
header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
header('Pragma: public');
header('Content-Length: ' . filesize($path));

echo file_get_contents($path);<file_sep>/assets/soundplugin/immediate_pcm_load.php
<?php
  error_reporting(E_ALL);
  ini_set('display_errors', 1);
  ini_set('display_startup_errors',1);
  include_once "publisher.php";
?><!doctype html>
<html lang="en">
<head>
    <meta charset="utf-8" />
    <title>WordPress ZoomSounds DZS Preview Page</title>
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=2">
    <link href="./bootstrap/bootstrap.min.css" rel="stylesheet">
    <link rel='stylesheet' type="text/css" href="style/style.css"/>
    <script src="js/jquery.js" type="text/javascript"></script>

    <link rel='stylesheet' type="text/css" href="dzstooltip/dzstooltip.css"/>
    <link rel='stylesheet' type="text/css" href="audioplayer/audioplayer.css"/>
    <script src="audioplayer/audioplayer.js" type="text/javascript"></script>
    <link href='http://fonts.googleapis.com/css?family=Open+Sans:400,700' rel='stylesheet' type='text/css'>
</head>
<body>
<div class="mwrap-wrapper">





    <!--

    ===end mainmenu


    -->


    <section class="mcon-otherdemos shadow-top">
        <div class="container" style="padding-top: 100px;">
            <div class="row">
                <div class="col-md-12 border-box" style="padding:0 30px;">
                    <h2 class="hero-heading">The audio player you have been waiting for.</h2>
                </div>
            </div>
        </div>
    </section>



    <section class="mcon-otherdemos">
        <!--
        <div class="pat-bg">
            <div class="pat-bg-inner">

            </div>
        </div>
        -->
        <div class="container">
            <div class="row">
                <div class="col-md-6">
                    <h2>Choose a demo.</h2>
                    <div class="separator-short m20"><figure class="the-graphic"></figure></div>
                </div>
            </div>


            <script>

                function test(){
                    console.log('player ended event');
                }
                </script>
            <div class="row">




                <div data-thumb="img/adg3.jpg"  data-type="audio" class="aptest-with-play skin-wave-mode-small audioplayer-tobe skin-wave button-aspect-noir     " data-source="http://devsite/wpfactory/dzsap/wp-content/uploads/sites/4/2017/10/Jama.m4a"   data-playfrom="last" data-fakeplayer=".dzsap_footer" data-pcm="<?php echo get_pcm('','http://devsite/wpfactory/dzsap/wp-content/uploads/sites/4/2017/10/Jama.m4a'); ?>">
                    <div class="meta-artist">
                        <span class="the-artist"><NAME> - Revenge</span><span class="the-name"><a href="#">Buy now!</a></span>
                    </div>
                </div>



                <script>
                    jQuery(document).ready(function ($) {



                        dzsap_init(".aptest-with-play", {
                            autoplay: "off"
                            ,cue: "on"
                            ,init_each: "on"
                            ,disable_volume: "on"
                            ,skinwave_mode: 'normal'
//            ,sample_time_start: '30' // --- if this is a sample to a complete song, you can write here start times, if not, leave to 0.
//            ,sample_time_end: '87'
//            ,sample_time_total: '120'
                            ,settings_backup_type: 'light' // == light or full
                            ,skinwave_: 'light' // == light or full
                            ,skinwave_enableSpectrum: "off"
                            ,embed_code: 'light' // == light or full
                            ,skinwave_wave_mode_canvas_waves_number: "3"
                            ,skinwave_wave_mode_canvas_waves_padding: "1"
                            ,skinwave_wave_mode_canvas_reflection_size: '0' // == light or full
                            ,design_color_bg: '999999,ffffff' // --  light or full
                            ,skinwave_wave_mode_canvas_mode: 'reflecto' // --  light or full
                            ,preview_on_hover: 'off' // --  light or full
                            ,preload_method: 'metadata' // --  light or full
                            ,design_wave_color_progress: 'ff657a,ffffff' // -- light or full
                            ,settings_php_handler:'publisher.php'
                            ,pcm_data_try_to_generate:'on'
                            ,pcm_data_try_to_generate_wait_for_real_pcm:'on'
//            ,controls_external_scrubbar:'.zoomsounds-external-scrubbar-for-with-play'
                            ,skinwave_comments_enable: 'on' // -- enable the comments, publisher.php must be in the same folder as this html, also if you want the comments to automatically be taken from the database remember to set skinwave_comments_retrievefromajax to ON
                            ,skinwave_comments_retrievefromajax: 'on'// --- retrieve the comment form ajax
                            ,failsafe_repair_media_element: 500 // == light or full

                            ,settings_extrahtml_in_float_right: '<div class="player-but dzstooltip-con" style=";"><div class="the-icon-bg"></div> <span class="dzstooltip arrow-from-start transition-slidein arrow-bottom skin-black align-right" style="width: auto; white-space: nowrap;">Add to Cart</span><i class=" svg-icon fa fa-shopping-cart"></i></div>  <div class="player-but dzstooltip-con" style=";"><div class="the-icon-bg"></div>  <span class="dzstooltip arrow-from-start transition-slidein arrow-bottom skin-black align-right" style="width: auto; white-space: nowrap;">Download</span>  <i class="svg-icon fa fa-download"></i>  </div>'
                        });

                        setTimeout(function(){
//            $('.the-media').html('alceva');
                        },100);
                    });
                </script>



            </div>
            <div class="row">
            </div>
        </div>
    </section>


<section class="mcon-otherdemos">
    <div class="container">
        <div class="row">
            <div class="col-md-6 border-box" style="padding: 0px 60px 20px; "></div>
            <div class="col-md-6">
                <h2>Multiple Skins</h2>
                <div class="separator-short m20"><figure class="the-graphic"></figure></div>
                <p>It takes just 3 minutes to install, activate and setup your first pricing table like the one above. It's all possible because of a smart WYSIWYG shortcode generator and premade examples so you can customize from there to your needs.</p>
                <p>



                </p>
                <br>
                <p><a href="skins.html" class="dzs-button skin-emerald">Check out skins!</a></p>
                <br/>
            </div>
        </div>


    </div>
</section>


    <section class="mcon-otherdemos-alt" style="padding-bottom: 0;">
        <div class="container">
            <div class="row" style="margin-bottom: 0;">
                <div class="col-md-6">
                    <h2>Responsive</h2>
                    <div class="separator-short m20"><figure class="the-graphic"></figure></div>
                    <p>Mobile ready! Retina ready! Tested on iOS and Android 4.0+. Responsive from mobile to HD due to CSS 3 Media Queries. Retina ready due to use of font icons and no images. Scales to any dimension!</p>
                </div>
                <div class="col-md-6 border-box" style="padding: 0px 60px 0px; "></div>
            </div>


        </div>
    </section>


    <section class="mcon-features">

        <div class="pat-bg">
            <div class="pat-bg-inner">

            </div>
        </div>
        <div class="container">
            <div class="row">
                <div class="col-md-3">
                    <div class="bigfeature"><i class="icon-thumbs-up"></i></div>
                    <h4>Easy Install</h4>
                    <p style="text-align: center">Install WordPress Pricing Tables in just a couple of minutes. <a href="http://digitalzoomstudio.net/docs/wppricingtables/" target="_blank">Docs</a> are also there.</p>
                </div>
                <div class="col-md-3">
                    <div class="bigfeature"><i class="icon-desktop"></i></div>
                    <h4>Responsive</h4>
                    <p style="text-align: center">From mobile to HD, pricing tables are ultra responsive. Also has retina graphics.</p>
                </div>
                <div class="col-md-3">
                    <div class="bigfeature"><i class="icon-pencil"></i></div>
                    <h4>Customizable</h4>
                    <p style="text-align: center">Customize Pricing Tables with the awesome Builder included.</p>
                </div>
                <div class="col-md-3">
                    <div class="bigfeature"><i class="icon-briefcase"></i></div>
                    <h4>SEO Friendly</h4>
                    <p style="text-align: center">Built with SEO in mind, Pricing Tables parses html content into working magic.</p>
                </div>
            </div>
        </div>
    </section>


    <section class="mcon-footer">
        <div class="container">
            <div class="row">

            </div>
            <div class="row">
                <div class="col-md-6">
                    &copy; copyright <a href="http://bit.ly/nM4R6u">ZoomIt</a> 2013

                </div>
                <div class="col-md-6" style="text-align: right">
                    <iframe src="//www.facebook.com/plugins/like.php?href=https%3A%2F%2Fwww.facebook.com%2Fdigitalzoomstudio&amp;width=150&amp;height=21&amp;colorscheme=light&amp;layout=button_count&amp;action=like&amp;show_faces=true&amp;send=false&amp;appId=569360426428348" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:150px; height:21px;" allowTransparency="true"></iframe>
                </div>
            </div>
        </div>
</section>
<div class="dzsap-sticktobottom-placeholder"></div>
    <section class="dzsap-sticktobottom  dzsap-sticktobottom-for-skin-wave-small">

        <style>.audioplayer.skin-wave#dzsap_footer .ap-controls .con-playpause .playbtn, .audioplayer.skin-wave#dzsap_footer .btn-embed-code, .audioplayer.skin-wave#dzsap_footer .ap-controls .con-playpause .pausebtn { background-color: #111111;}  </style>


        <div class="audioplayer-tobe dzsap_footer theme-dark button-aspect-noir button-aspect-noir--stroked skinvariation-wave-righter" style="" id="ap_footer"   data-type="fake" data-source="fake" data-thumb="img/adg3.jpg"  >
            <span class="meta-artist"><span class="the-artist"><NAME></span><span class="the-name"><a href="http://codecanyon.net/item/zoomsounds-wordpress-audio-player/6181433?ref=ZoomIt" target="_blank">Eco2 the Boost</a></span>
                </span>
        </div>

        <script>(function(){
            var auxap = jQuery("#ap_footer");
            jQuery(document).ready(function ($){
                var settings_ap = {
                    design_skin: "skin-wave"
                    ,autoplay: "on"
                    ,disable_volume:"off"
                    ,cue: "on"
                    ,embedded: "off"
                    ,skinwave_dynamicwaves:"off"
                    ,skinwave_enableSpectrum:"off"
                    ,settings_backup_type:"full"
                    ,skinwave_enableReflect:"on",playfrom:"off",soundcloud_apikey:""
                    ,skinwave_comments_enable:"off"

                    ,skinwave_mode:"small"
                    ,skinwave_comments_playerid:""
                    ,php_retriever:"./soundcloudretriever.php"
                    ,swf_location:"./ap.swf"
                    ,settings_php_handler: './publisher.php' // -- the path of the publisher.php file, this is used to handle comments, likes etc.

                    ,swffull_location:"./apfull.swf"
                    ,design_wave_color_bg:'ffffff'
                    ,design_wave_color_prog:'52cd92'


                    ,player_navigation : "on"
                    ,action_audio_end: test
                    ,pcm_data_try_to_generate: 'on' // --- try to find out the pcm data and sent it via ajax ( maybe send it via php_handler
                    ,pcm_data_try_to_generate_wait_for_real_pcm: 'on' // --- if set to on, the fake pcm data will not be generated

                };

//                console.info(settings_ap);
                dzsap_init(auxap,settings_ap);
            });
        })();</script></section>

</div>



<script>

    jQuery(document).ready(function ($) {

        var settings_ap = {
            disable_volume: 'off'
            ,autoplay: 'off'
            ,cue: 'on'
            ,disable_scrub: 'default'
            ,design_skin: 'skin-silver'
            ,skinwave_dynamicwaves:'on'
            ,skinwave_enableSpectrum: "off"
            ,settings_backup_type:'full'
            ,settings_useflashplayer:'auto'
            ,skinwave_spectrummultiplier: '4'
            ,skinwave_comments_enable:'off'
            ,skinwave_mode: 'small'
        };
//        dzsap_init('#ap_footer',settings_ap);
    });
</script>
<link rel="stylesheet" href="fontawesome/font-awesome.min.css">
<script type="text/javascript" src="js/main.js"></script>
<link rel="stylesheet" href="zoombox/zoombox.css">
<script type="text/javascript" src="zoombox/zoombox.js"></script>
</body>
</html>
<file_sep>/assets/soundplugin/index-readrss.php
<?php
function ag_read_rss($arg, $str_opts){
    $fout = '';
    $entries = simplexml_load_file($arg);
    $namespaces = $entries->getNamespaces(true);
//        print_r($entries);
//        $data = $entries->xpath ('channel/item');



//    print_r($entries);

    $fout.='<div class="audiogallery auto-init" style="opacity:0; margin-top: 70px;" data-options="'.$str_opts.'"><div class="items">';

foreach ($entries->channel->item as $item) {
//    print_r($item);

    //  data-thumb_link="img/adg3.jpg" data-bgimage="img/bgminion.jpg"
    $fout.=' <div class="audioplayer-tobe " data-thumb="'.$item->image->url.'" style="width:100%; " data-scrubbg="waves/scrubbg.png" data-scrubprog="waves/scrubprog.png" data-videoTitle="'.$item->title.'" data-type="audio" data-source="';
    foreach($item->enclosure->attributes() as $lab => $val){
        if($lab==='url'){
            $fout.=($val);
        }
    }

    $fout.='">';

    $fout.='<div class="meta-artist">
<span class="the-artist">'.$item->title.'</span>
</div>';
    $fout.='<div class="menu-description">
<div class="menu-item-thumb-con"><div class="menu-item-thumb" style="background-image: url('.$item->image->url.')"></div></div>
<span class="the-artist">'.$item->title.'</span>
<span class="the-name">'.$item->description.'</span>
</div>';

    $fout.='</div>';
}

    $fout.='</div></div>';


    return $fout;
}

?><!doctype html>
<html lang="en">
<head>
    <meta charset="utf-8"/>
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <meta http-equiv="X-UA-COMPATIBLE" content="IE=EDGE">
    <title>Audio Player Preview</title>
    <script src="js/jquery.js"></script>
    <link href="./bootstrap/bootstrap.css" rel="stylesheet">
    <link href="./bootstrap/bootstrap-responsive.css" rel="stylesheet">
    <link rel='stylesheet' type="text/css" href="style/style.css"/>
    <link rel='stylesheet' type="text/css" href="audioplayer/audioplayer.css"/>
    <script src="audioplayer/audioplayer.js" type="text/javascript"></script>
    <link href='http://fonts.googleapis.com/css?family=Open+Sans' rel='stylesheet' type='text/css'>


    <!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
    <!--[if lt IE 9]>
    <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
    <script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->

</head>
<body>
<div class="content-wrapper">

    <section class="mcon-mainmenu" style="position: absolute; z-index: 5; width:100%;">

        <!--
        -->
        <div class="container">
            <div class="row">
                <div class="logo-con col-md-3">
                    <img src="img/dzsplugins.png" alt="wordpress video gallery" style="margin:0 auto"/>
                </div>
                <div class="main-menu-con col-md-9">
                    <ul id="menu-main-menu" class="menu sf-menu" style="top: 9px;">
                    </ul>
                </div>
            </div>
        </div>
    </section>


    <div class="con-maindemo" id="a-demo">
        <div class="ap-wrapper center-ap" style="width:100%;">
            <div class="the-bg" style=" background-image: url(img/bg.jpg);"></div>
            <?php echo ag_read_rss('demorss.xml', "{
            'transition':'fade'
            ,'cueFirstMedia' : 'off'
            ,'autoplay' : 'on'
            ,'autoplayNext' : 'on'
            ,design_menu_position:'bottom'
            ,'settings_ap':{
                disable_volume: 'off'
                ,disable_scrub: 'default'
                ,design_skin: 'skin-wave'
                ,skinwave_dynamicwaves:'off'
                ,skinwave_enableSpectrum:'off'
                ,settings_backup_type:'full'
                ,skinwave_enableReflect:'on'
                ,skinwave_comments_enable:'on'
                ,skinwave_timer_static:'off'
                ,disable_player_navigation: 'on'
//            ,skinwave_mode: 'small'
                ,skinwave_comments_retrievefromajax:'on'
                ,soundcloud_apikey:'be48604d903aebd628b5bac968ffd14d'//insert api key here https://soundcloud.com/you/apps/
                ,settings_extrahtml:''
            }
            ,design_menu_state:'open'
            ,design_menu_show_player_state_button: 'off'
            ,embedded: 'off'

        }");
?>
        </div>

    </div>
    <div class="con-otherdemos">
        <div class="container">
            <div class="separator"></div>
            <div class="row">
                <div class="col-md-12">

                    <h1 class="hero-heading">The Audio Player. Reinvented.</h1>
                    <h2 class="row-title">Choose a demo.</h2>
                    <div class="simple-hr mb10"></div>
                    <br/>
                </div>
                <div class="col-md-4">
                    <a href="index.html" target=""><img class="example-button active" src="img/e1.jpg" style="width:100%;"/></a>
                </div>
                <div class="col-md-4">
                    <a href="index-minion.html" target=""><img class="example-button " src="img/e2.jpg" style="width:100%;"/>
                    </a>
                </div>
                <div class="col-md-4">
                    <a href="index-player.html" target=""><img class="example-button " src="img/e3.jpg" style="width:100%;"/>
                    </a>
                </div>
                <div class="clear"></div><br/>
            </div>
        </div>
    </div>


    <div class="mcon-otherdemos">

        <div class="container">
            <div class="row">
                <a href="#" onclick='document.getElementById("ap1").api_set_playback_speed(0.5); return false;'>Reduce speed to 0.5</a>,
                <a href="#" onclick='document.getElementById("ap1").api_set_playback_speed(2); return false;'>Reduce speed to 2</a>
            </div>
        </div>
    </div>



    <section class="mcon-features">
        <div class="container">
            <div class="row">
                <div class="col-md-3">
                    <div class="bigfeature"><i class="icon-thumbs-up"></i></div>
                    <h4>Easy Install</h4>
                    <p style="text-align: center">Install ZoomSounds in just a couple of minutes. <a href="http://digitalzoomstudio.net/docs/zoomsounds/" target="_blank">Docs</a> are also there.</p>
                </div>
                <div class="col-md-3">
                    <div class="bigfeature"><i class="icon-desktop"></i></div>
                    <h4>Responsive</h4>
                    <p style="text-align: center">From mobile to HD, this gallery is ultra responsive. Also has retina graphics.</p>
                </div>
                <div class="col-md-3">
                    <div class="bigfeature"><i class="icon-pencil"></i></div>
                    <h4>Customizable</h4>
                    <p style="text-align: center">Customize ZoomSounds to your needs. The possibilities are endless.</p>
                </div>
                <div class="col-md-3">
                    <div class="bigfeature"><i class="icon-briefcase"></i></div>
                    <h4>SEO Friendly</h4>
                    <p style="text-align: center">Built with SEO in mind, ZoomSounds parses html content into working magic.</p>
                </div>
            </div>
        </div>
    </section>





    <div class="con-footer">
        <div class="container">
            <div class="row">
                <div class="col-md-6">
                    &copy; copyright <a href="http://bit.ly/nM4R6u">ZoomIt</a> 2013

                </div>
                <div class="col-md-6" style="text-align: right">

                </div>
            </div>
        </div>
    </div>




</div>
<script>
    jQuery(document).ready(function ($) {
        var playerid = 'ag1';
        var settings_ap = {
            disable_volume: 'off'
            ,disable_scrub: 'default'
            ,design_skin: 'skin-wave'
            ,skinwave_dynamicwaves:'off'
            ,skinwave_enableSpectrum:'off'
            ,settings_backup_type:'full'
            ,skinwave_enableReflect:'on'
            ,skinwave_comments_enable:'on'
            ,skinwave_timer_static:'off'
            ,disable_player_navigation: 'on'
//            ,skinwave_mode: 'small'
            ,skinwave_comments_retrievefromajax:'on'
            ,soundcloud_apikey:"be48604d903aebd628b5bac968ffd14d"//insert api key here https://soundcloud.com/you/apps/
            ,settings_extrahtml:'<div class="btn-like"><span class="the-icon"></span>Like</div><div class="star-rating-con"><div class="star-rating-bg"></div><div class="star-rating-set-clip" style="width: 96.6px;"><div class="star-rating-prog"></div></div><div class="star-rating-prog-clip"><div class="star-rating-prog"></div></div></div><a class="wave-download" href="#"><span class="center-it">&#x25BC;</span></a><div class="counter-hits"><span class="the-number">{{get_plays}}</span> plays</div><div class="counter-likes"><span class="the-number">{{get_likes}}</span> likes</div><div class="counter-rates"><span class="the-number">{{get_rates}}</span> rates</div>'
        };
        dzsag_init('#'+playerid,{
            'transition':'fade'
            ,'cueFirstMedia' : 'off'
            ,'autoplay' : 'on'
            ,'autoplayNext' : 'on'
            ,design_menu_position:'bottom'
            ,'settings_ap':{
                disable_volume: 'off'
                ,disable_scrub: 'default'
                ,design_skin: 'skin-wave'
                ,skinwave_dynamicwaves:'off'
                ,skinwave_enableSpectrum:'off'
                ,settings_backup_type:'full'
                ,skinwave_enableReflect:'on'
                ,skinwave_comments_enable:'on'
                ,skinwave_timer_static:'off'
                ,disable_player_navigation: 'on'
//            ,skinwave_mode: 'small'
                ,skinwave_comments_retrievefromajax:'on'
                ,soundcloud_apikey:'be48604d903aebd628b5bac968ffd14d'//insert api key here https://soundcloud.com/you/apps/
                ,settings_extrahtml:'<div class=\'btn-like\'><span class=\'the-icon\'></span>Like</div><div class=\'star-rating-con\'><div class=\'star-rating-bg\'></div><div class=\'star-rating-set-clip\' style=\'width: 96.6px;\'><div class=\'star-rating-prog\'></div></div><div class=\'star-rating-prog-clip\'><div class=\'star-rating-prog\'></div></div></div><a class=\'wave-download\' href=\'#\'><span class=\'center-it\'>&#x25BC;</span></a><div class=\'counter-hits\'><span class=\'the-number\'>{{get_plays}}</span> plays</div><div class=\'counter-likes\'><span class=\'the-number\'>{{get_likes}}</span> likes</div><div class=\'counter-rates\'><span class=\'the-number\'>{{get_rates}}</span> rates</div>'
            }
            ,design_menu_state:'open'
            ,design_menu_show_player_state_button: 'off'
            ,embedded: 'off'

        });


//        setTimeout(function(){
//            document.getElementById('ap1').api_destroy();
//        }, 3000);
    });
</script>
<link rel="stylesheet" href="fontawesome/font-awesome.min.css">
</body>
</html><file_sep>/assets/soundplugin/waveformgenerator_onlypcm.php
<!DOCTYPE HTML>
<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">

    <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.1.1/jquery.js" integrity="<KEY> crossorigin="anonymous"></script>
    <title>Video / Youtube Player / AS3</title><link rel="stylesheet" type="text/css" href="style/style.css">

<style>
    .mwrap{
        padding: 10px;
    }

    .setting{
        margin-bottom: 21px;;
    }
    .setting .setting-label{
        margin-bottom: 7px;;
        font-weight: bold;
    }
    .setting .sidenote{
        margin-top: 7px;
        font-style: italic;;

    }
    .output:empty{
        display: none;
    }
    .output{
        white-space: normal;

        font-size: 11px;
        background-color: #dadada;
        color: #444444;

        padding: 15px;
        word-break: break-all;
    }
    </style>
<body>
<div class="mwrap">

<?php
    if(isset($_POST['media'])) {

        ?>

    <form method="post">
        <button class="button-secondary">Clear Data</button>
        </form>
        <br>
        <div id="flashcon1" style="position: absolute; width:1px; height:1px; top:0; left:0;">
            <object type="application/x-shockwave-flash" data="wavegenerator.swf" width="1" height="1"
                    id="flashcontent" style="visibility: visible; ">
                <param name="movie" value="wavegenerator.swf">
                <param name="menu" value="false">
                <param name="allowScriptAccess" value="always">
                <param name="scale" value="noscale">
                <param name="allowFullScreen" value="true">
                <param name="wmode" value="opaque">
                <param name="flashvars"
                       value="media=<?php echo $_POST['media']; ?>&wave_generation=wavearr">
            </object>


        </div>
        <div class="output"></div>
        <script>
            window.api_wavesentfromflash = function (arg) {
                if (window.console) {
                    console.info(arg);
                }
                ;
            }
            window.api_wave_data = function (arg) {
                if (window.console) {
                    console.info(arg);
                }

                var str = '['+arg+']';


                ;

                jQuery('.output').text(str);
            }
        </script>

    <?php
    }else{

?>

        <form method="post">
            <div class="setting">
                <div class="setting-label">
                    Media
                </div>
                <input type="text" name="media" value="song.mp3">
            </div>
            <div class="">
                <button class="button-primary">Submit</button>
            </div>
        </form>

<?php

    }

?>
</div>
</body></html>
<?php
//sleep(5);<file_sep>/assets/soundplugin/bridge.php
<?php

include_once(dirname(__FILE__).'/class-portal.php');
$dzsap_portal = new DZSAP_Portal();
?>
<!doctype html>
<html>
<head>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js" type="text/javascript"></script>
<link rel="stylesheet" type="text/css" href="<?php echo $dzsap_portal->url_base; ?>audioplayer/audioplayer.css"/>
<link rel="stylesheet" type="text/css" href="<?php echo $dzsap_portal->url_base; ?>dzstooltip/dzstooltip.css"/>
</head>
<body>
<?php
$args = array();
if(isset($_GET['type']) && $_GET['type']=='gallery'){
    
    $args = array(
        'id' => $_GET['id'],
        'embedded' => 'on',
    );


            if(isset($_GET['db'])){
                $args['db'] = $_GET['db'];
            };
    echo $dzsap_portal->show_shortcode($args);

}

//print_r($_GET);

if(isset($_GET['type']) && $_GET['type']=='player'){
    
    
//    echo $_GET['margs'];
    $args = unserialize(stripslashes($_GET['margs']));
//    print_r($args);
    $args['embedded']='on';


    echo $dzsap_portal->shortcode_player($args);

}


?>
<script type="text/javascript" src="<?php echo $dzsap_portal->url_base; ?>audioplayer/audioplayer.js"></script>
</body>
</html><file_sep>/assets/soundplugin/soundcloudretriever.php
<?php

if(!function_exists('dzs_get_contents')){
    function dzs_get_contents($url, $pargs = array()) {
        $margs = array(
            'force_file_get_contents' => 'off',
        );
        $margs = array_merge($margs, $pargs);
        if (function_exists('curl_init') && $margs['force_file_get_contents'] == 'off') { // if cURL is available, use it...
            $ch = curl_init($url);
            curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
            curl_setopt($ch, CURLOPT_HEADER, 0);
            curl_setopt($ch, CURLOPT_TIMEOUT, 10);
            curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
            $cache = curl_exec($ch);
            curl_close($ch);
        } else {
            $cache = @file_get_contents($url); // ...if not, use the common file_get_contents()
        }
        return $cache;
    }
}

if ( isset ( $_GET["scurl"] )) {
    $aux =  dzs_get_contents($_GET["scurl"]);

//    echo $_GET['scurl'];
    $aux = json_decode($aux);
    //print_r($aux);
    if(is_object($aux)){
        $aux2 = dzs_get_contents($aux->location);
        echo $aux2;
    }else{
        echo 'aux is not array ';
        print_r($aux);
    }
}<file_sep>/assets/soundplugin/shoutcast_now_playing.php
<?php
error_reporting(E_ALL);
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);


function shoutcast_get_now_playing($arg){


  $final_metadata = array();
  $source = $arg;
  $url_vars = parse_url($source);
  $host = $url_vars['host'];
  $path = isset($url_vars['path'])?$url_vars['path']:'/';


  $url = $source;
  $ch = curl_init($url);

  $headers = array(
    'GET '.$path.' HTTP/1.0',
    'Host: ' . $url_vars['host'] . '',
    'Connection: Close',
    'User-Agent: Winamp',
    'Accept: */*',
    'icy-metadata: 1',
    'icy-prebuffer: 2314',
  );

  $construct_url = $url_vars['scheme'] . '://'. $url_vars['host'] . $path;


  $err_no = '';
  $err_str = '';

  $fp = @fsockopen($url_vars['host'], $url_vars['port'], $err_no, $err_str, 10);


//  print_r($url_vars); echo '<br><br>';
//  print_r($fp); echo '<br><br>';

  if ($fp) {


    $headers_str = '';

    foreach ($headers as $key=>$val){
      $headers_str.=$val.'\r\n';
    }



//    echo $headers_str . '<-headers_str<br><br>';

    define('CRLF', "\r\n");


    $headers_str = 'GET '.$path.' HTTP/1.0' . CRLF .
      'Host: ' . $url_vars['host'] . CRLF .
      'Connection: Close' . CRLF .
      'User-Agent: Winamp 2.51' . CRLF .
      'Accept: */*' . CRLF .
      'icy-metadata: 1'.CRLF.
      'icy-prebuffer: 65536'.CRLF. CRLF;


    fwrite($fp, $headers_str);

    stream_set_timeout($fp, 2, 0);
    $response = "";

    while (!feof($fp)){



      $line = fgets($fp, 4096);
      if('' == trim($line)){
        break;
      }
      $response .= $line;
    }

//    echo 'response ->> <pre>'; print_r($response); echo '</pre><--';


    preg_match_all('/(.*?):(.*)[^|$]/', $response, $fout_arr);

//    echo 'response ->> <pre>'; print_r($fout_arr); echo '</pre><--';

    if(isset($fout_arr[1])){

      $final_arr = array();
      foreach ($fout_arr[1] as $key=>$val){
        $final_arr[$val] = $fout_arr[2][$key];
      }


//      echo '$final_arr ->> <pre>'; print_r($final_arr); echo '</pre><--';









      // -- snippet from https://stackoverflow.com/questions/15803441/php-script-to-extract-artist-title-from-shoutcast-icecast-stream
      if (!isset($final_arr['icy-metaint'])){
        $data = ''; $metainterval = 512;
        while(!feof($fp)){
          $data .= fgetc($fp);
          if (strlen($data) >= $metainterval) break;
        }
        $this->print_data($data);
        $matches = array();
        preg_match_all('/([\x00-\xff]{2})\x0\x0([a-z]+)=/i', $data, $matches, PREG_OFFSET_CAPTURE);
        preg_match_all('/([a-z]+)=([a-z0-9\(\)\[\]., ]+)/i', $data, $matches, PREG_SPLIT_NO_EMPTY);


//        echo '<pre>';var_dump($matches);echo '</pre>';


        $title = $artist = '';
        foreach ($matches[0] as $nr => $values){
          $offset = $values[1];
          $length = ord($values[0]{0}) +
            (ord($values[0]{1}) * 256)+
            (ord($values[0]{2}) * 256*256)+
            (ord($values[0]{3}) * 256*256*256);
          $info = substr($data, $offset + 4, $length);
          $seperator = strpos($info, '=');
          $final_metadata[substr($info, 0, $seperator)] = substr($info, $seperator + 1);
          if (substr($info, 0, $seperator) == 'title') $title = substr($info, $seperator + 1);
          if (substr($info, 0, $seperator) == 'artist') $artist = substr($info, $seperator + 1);
        }
        $final_metadata['streamtitle'] = $artist . ' - ' . $title;
      }else{
        $metainterval = $final_arr['icy-metaint'];
        $intervals = 0;
        $metadata = '';
        while(1){
          $data = '';
          while(!feof($fp)){
            $data .= fgetc($fp);
            if (strlen($data) >= $metainterval) break;
          }
          //$this->print_data($data);
          $len = join(unpack('c', fgetc($fp))) * 16;
          if ($len > 0){
            $metadata = str_replace("\0", '', fread($fp, $len));
            break;
          }else{
            $intervals++;
            if ($intervals > 100) break;
          }
        }
        $metarr = explode(';', $metadata);
        foreach ($metarr as $meta){
          $t = explode('=', $meta);
          if (isset($t[0]) && trim($t[0]) != ''){
            $name = preg_replace('/[^a-z][^a-z0-9]*/i','', strtolower(trim($t[0])));
            array_shift($t);
            $value = trim(implode('=', $t));
            if (substr($value, 0, 1) == '"' || substr($value, 0, 1) == "'"){
              $value = substr($value, 1);
            }
            if (substr($value, -1) == '"' || substr($value, -1) == "'"){
              $value = substr($value, 0, -1);
            }
            if ($value != ''){
              $final_metadata[$name] = $value;
            }
          }
        }
      }



//      echo '$final_metadata ->> <pre>'; print_r($final_metadata); echo '</pre><--';
    }

    fclose($fp);
  }


  if(isset($final_metadata) && isset($final_metadata['streamtitle'])){
    return $final_metadata['streamtitle'];


  }else{
    return 'Song name not found';
  }


}


//$source = 'http://masterv2.shoutcast.com:8000/stream/102843/';
//echo ''.shoutcast_get_now_playing($source);
//echo 'resp - '; print_r(shoutcast_get_now_playing($source)); echo '<-';






<file_sep>/assets/soundplugin/dzs_functions.php
<?php

if (!function_exists('dzs_savemeta')) {

    function dzs_savemeta($id, $arg2, $arg3 = '') {
        //echo htmlentities($_POST[$arg2]);
        if ($arg3 == 'html') {
            update_post_meta($id, $arg2, htmlentities($_POST[$arg2]));
            return;
        }


        if (isset($_POST[$arg2]))
            update_post_meta($id, $arg2, esc_attr(strip_tags($_POST[$arg2])));
        else
        if ($arg3 == 'checkbox')
            update_post_meta($id, $arg2, "off");
    }

}



if (!function_exists('dzs_checked')) {

    function dzs_checked($arg1, $arg2, $arg3 = 'checked', $echo = true) {
        $func_output = '';
        if (isset($arg1) && $arg1 == $arg2) {
            $func_output = $arg3;
        }
        if ($echo == true)
            echo $func_output;
        else
            return $func_output;
    }

}

if (!function_exists('dzs_find_string')) {

    function dzs_find_string($arg, $arg2) {
        $pos = strpos($arg, $arg2);

        if ($pos === false)
            return false;

        return true;
    }

}


if (!function_exists('dzs_get_excerpt')) {

    //echo 'dzs_get_excerpt 
    //version 1.2';
    function dzs_get_excerpt($pid = 0, $pargs = array()) {
        //print_r($pargs);
        global $post;
        $fout = '';
        $excerpt = '';
        if ($pid == 0 && isset($post->ID)) {
            $pid = $post->ID;
        }
        //echo $pid;
        if(function_exists('get_post')){
            $po = (get_post($pid));
        }
        

        $args = array(
            'maxlen' => 400
            , 'striptags' => false
            , 'stripshortcodes' => false
            , 'forceexcerpt' => false //if set to true will ignore the manual post excerpt
            , 'readmore' => 'auto'
            , 'readmore_markup' => ''
            , 'content' => ''
        );
        $args = array_merge($args, $pargs);

        if ($args['content'] != '') {
            $args['readmore'] = 'off';
            $args['forceexcerpt'] = true;
        }


        if (isset($po->post_excerpt) && $po->post_excerpt != '' && $args['forceexcerpt'] == false) {
            $fout = $po->post_excerpt;


            //==== replace the read more with given markup or theme function or default
            if ($args['readmore_markup'] != '') {
                $fout = str_replace('{readmore}', $args['readmore_markup'], $fout);
            } else {
                if (function_exists('continue_reading_link')) {
                    $fout = str_replace('{readmore}', continue_reading_link($pid), $fout);
                } else {
                    $fout = str_replace('{readmore}', '<div class="readmore-con"><a href="' . get_permalink($pid) . '">' . __('Read More') . '</a></div>', $fout);
                }
            }
            //==== replace the read more with given markup or theme function or default END
            return $fout;
        }

        $content = '';
        if ($args['content'] != '') {
            $content = $args['content'];
        } else {
            if ($args['striptags'] != 'on') {
                $content = $po->post_content;
            } else {
                $content = strip_tags($po->post_content);
                ;
            }
        }


        $maxlen = intval($args['maxlen']);

        if (strlen($content) > $maxlen) {
            //===if the content is longer then the max limit
            $excerpt.=substr($content, 0, $maxlen);

            if ($args['striptags'] == true) {
                $excerpt = strip_tags($excerpt);
            }
            
            if ($args['stripshortcodes'] == false && function_exists('do_shortcode')) {
                $excerpt = do_shortcode(stripslashes($excerpt));
            } else {
                $excerpt = stripslashes($excerpt);
                if(function_exists('strip_shortcodes')){
                    $excerpt = strip_shortcodes($excerpt);
                }
                $excerpt = str_replace('[/one_half]', '', $excerpt);
                $excerpt = str_replace("\n", " ", $excerpt);
                $excerpt = str_replace("\r", " ", $excerpt);
                $excerpt = str_replace("\t", " ", $excerpt);
            }

            $fout.=$excerpt;
            if ($args['readmore'] == 'auto') {
                $fout .= '{readmore}';
            }
        } else {
            //===if the content is not longer then the max limit just add the content
            $fout.=$content;
            if ($args['readmore'] == 'on') {
                $fout .= '{readmore}';
            }
        }

        //==== replace the read more with given markup or theme function or default
        if ($args['readmore_markup'] != '') {
            $fout = str_replace('{readmore}', $args['readmore_markup'], $fout);
        } else {
            if (function_exists('continue_reading_link')) {
                $fout = str_replace('{readmore}', continue_reading_link($pid), $fout);
            } else {
                if(function_exists('get_permalink')){
                    $fout = str_replace('{readmore}', '<div class="readmore-con"><a href="' . get_permalink($pid) . '">' . __('read more') . ' &raquo;</a></div>', $fout);
                }
                
            }
        }
        //==== replace the read more with given markup or theme function or default END
        return $fout;
    }

}


if (!function_exists('dzs_print_menu')) {

    function dzs_print_menu() {
        $args = array('menu' => 'mainnav', 'menu_class' => 'menu sf-menu', 'container' => false, 'theme_location' => 'primary', 'echo' => '0');
        $aux = wp_nav_menu($args);
        $aux = preg_replace('/<ul>/', '<ul class="sf-menu">', $aux, 1);
        if (preg_match('/<div class="sf-menu">/', $aux)) {
            $aux = preg_replace('/<div class="sf-menu">/', '', $aux, 1);
            $aux = $rest = substr($aux, 0, -7);
        }
        // $aux_char = '/';
        //$aux = preg_replace('/<div>/', '', $aux, 1);
        print_r($aux);
    }

}
if (!function_exists('dzs_post_date')) {

    function dzs_post_date($pid) {
        $po = get_post($pid);
        //print_r($po);
        if ($po) {
            echo mysql2date('l M jS, Y', $po->post_date);
        }
    }

}


if (!function_exists('dzs_pagination')) {

    function dzs_pagination($pages = '', $range = 2) {
        global $paged;
        $fout = '';
        $showitems = ($range * 2) + 1;

        if (empty($paged))
            $paged = 1;

        if ($pages == '') {
            global $wp_query;
            $pages = $wp_query->max_num_pages;
            if (!$pages) {
                $pages = 1;
            }
        }

        if (1 != $pages) {
            $fout.= "<div class='dzs-pagination'>";
            if ($paged > 2 && $paged > $range + 1 && $showitems < $pages)
                $fout.= "<a href='" . get_pagenum_link(1) . "'>&laquo;</a>";
            if ($paged > 1 && $showitems < $pages)
                $fout.= "<a href='" . get_pagenum_link($paged - 1) . "'>&lsaquo;</a>";

            for ($i = 1; $i <= $pages; $i++) {
                if (1 != $pages && (!($i >= $paged + $range + 1 || $i <= $paged - $range - 1) || $pages <= $showitems )) {
                    $fout.= ( $paged == $i) ? "<span class='current'>" . $i . "</span>" : "<a href='" . get_pagenum_link($i) . "' class='inactive' >" . $i . "</a>";
                }
            }

            if ($paged < $pages && $showitems < $pages)
                $fout.= "<a href='" . get_pagenum_link($paged + 1) . "'>&rsaquo;</a>";
            if ($paged < $pages - 1 && $paged + $range - 1 < $pages && $showitems < $pages)
                $fout.= "<a href='" . get_pagenum_link($pages) . "'>&raquo;</a>";
            $fout.= '<div class="clearfix"></div>';
            $fout.= "</div>
                ";
        }
        return $fout;
    }

}


if (!function_exists('replace_in_matrix')) {

    function replace_in_matrix($arg1, $arg2, &$argarray) {
        foreach ($argarray as &$newi) {
            //print_r($newi);
            if (is_array($newi)) {
                foreach ($newi as &$newj) {
                    if (is_array($newj)) {
                        foreach ($newj as &$newk) {
                            if (!is_array($newk)) {
                                $newk = str_replace($arg1, $arg2, $newk);
                            }
                        }
                    } else {
                        $newj = str_replace($arg1, $arg2, $newj);
                    }
                }
            } else {
                $newi = str_replace($arg1, $arg2, $newi);
            }
        }
    }

}


if (!function_exists('dzs_curr_url')) {

    function dzs_curr_url() {
        if (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on') {
            $page_url .= "https://";
        } else {
            $page_url = 'http://';
        }
        if ($_SERVER["SERVER_PORT"] != "80") {
            $page_url .= $_SERVER["SERVER_NAME"] . ":" . $_SERVER["SERVER_PORT"] . $_SERVER["REQUEST_URI"];
        } else {
            $page_url .= $_SERVER["SERVER_NAME"] . $_SERVER["REQUEST_URI"];
        }
        return $page_url;
    }

}


if (!function_exists('dzs_addAttr')) {

    function dzs_addAttr($arg1, $arg2) {
        $fout = '';
        //$arg2 = str_replace('\\', '', $arg2);
        if (isset($arg2) && $arg2 != "undefined" && $arg2 != '')
            $fout.= ' ' . $arg1 . "='" . $arg2 . "' ";
        return $fout;
    }

}


if(!function_exists('dzs_addSwfAttr')){
    function dzs_addSwfAttr($arg1, $arg2, $first=false) {
        $fout='';
        //$arg2 = str_replace('\\', '', $arg2);

        //sanitaze for object input
        $lb   = array('"' ,"\r\n", "\n", "\r", "&", "`", '???', "'");
        $arg2 = str_replace(' ', '%20', $arg2);
        //$arg2 = str_replace('<', '', $arg2);
        $arg2 = str_replace($lb, '', $arg2);

        if (isset ($arg2)  && $arg2 != "undefined" && $arg2 != ''){
            if($first==false){
                $fout.='&amp;';
            }
            $fout.= $arg1 . "=" . $arg2 . "";
        }
        return $fout;
    }
}


if (!function_exists('dzs_clean')) {

    function dzs_clean($var) {
        if (!function_exists('sanitize_text_field')) {
            return $var;
        } else {
            return sanitize_text_field($var);
        }
    }

}

if (!class_exists('DZSHelpers')) {

    class DZSHelpers {

        static function get_contents($url, $pargs = array()) {
            $margs = array(
                'force_file_get_contents' => 'off',
            );
            $margs = array_merge($margs, $pargs);
            if (function_exists('curl_init') && $margs['force_file_get_contents'] == 'off') { // if cURL is available, use it...
                $ch = curl_init($url);
                curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
                curl_setopt($ch, CURLOPT_HEADER, 0);
                curl_setopt($ch, CURLOPT_TIMEOUT, 10);
                curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
                $cache = curl_exec($ch);
                curl_close($ch);
            } else {
                $cache = @file_get_contents($url); // ...if not, use the common file_get_contents()
            }
            return $cache;
        }
        
        static function remove_wpautop( $content, $autop = false ) {

            if ($autop && function_exists('wpautop')){
                $content = wpautop( preg_replace( '/<\/?p\>/', "\n", $content ) . "\n" );
            }
            if(function_exists('shortcode_unautop')){
                return do_shortcode( shortcode_unautop( $content) );
            }else{
                return $content;
            }
            
        }

        static function wp_savemeta($id, $arg2, $arg3 = '') {
            //echo htmlentities($_POST[$arg2]);
            if ($arg3 == 'html') {
                update_post_meta($id, $arg2, htmlentities($_POST[$arg2]));
                return;
            }


            if (isset($_POST[$arg2]))
                update_post_meta($id, $arg2, esc_attr(strip_tags($_POST[$arg2])));
            else
            if ($arg3 == 'checkbox')
                update_post_meta($id, $arg2, "off");
        }

        static function wp_get_excerpt($pid = 0, $pargs = array()) {
//            print_r($pargs);
            global $post;
            $fout = '';
            $excerpt = '';
            if ($pid == 0) {
                $pid = $post->ID;
            } else {
                $pid = $pid;
            }

//            echo $pid;
            $po = (get_post($pid));

            $margs = array(
                'maxlen' => 400
                , 'striptags' => false
                , 'stripshortcodes' => false
                , 'forceexcerpt' => false //if set to true will ignore the manual post excerpt
                , 'aftercutcontent_html' => '' // you can put here something like [..]
                , 'readmore' => 'auto'
                , 'readmore_markup' => ''
                , 'content' => '' // forced content
            );
            $margs = array_merge($margs, $pargs);

            if ($margs['content'] != '') {
                $margs['readmore'] = 'off';
                $margs['forceexcerpt'] = true;
            }

            
            
//                print_r($margs);

            if ($po->post_excerpt != '' && $margs['forceexcerpt'] == false) {
                $fout = do_shortcode($po->post_excerpt);


                //==== replace the read more with given markup or theme function or default
                if ($margs['readmore_markup'] != '') {
                    $fout = str_replace('{readmore}', $margs['readmore_markup'], $fout);
                } else {
                    if (function_exists('continue_reading_link')) {
                        $fout = str_replace('{readmore}', continue_reading_link($pid), $fout);
                    } else {
                        if (function_exists('dzs_excerpt_read_more')) {
                            $fout = str_replace('{readmore}', dzs_excerpt_read_more($pid), $fout);
                        } else {
                            //===maybe in the original function you can parse readmore
                            //$fout = str_replace('{readmore}', '<div class="readmore-con"><a href="' . get_permalink($pid) . '">' . __('read more') . ' &raquo;</a></div>', $fout);
                        }
                    }
                }
                //==== replace the read more with given markup or theme function or default END
                return $fout;
            }
            
            

            $content = '';
            if ($margs['content'] != '') {
                $content = $margs['content'];
            } else {
                if ($margs['striptags'] == false) {
                    if ($margs['stripshortcodes'] == false) {
                        $content = do_shortcode($po->post_content);
                    }else{
                        $content = $po->post_content;
                    }
                    
                } else {
//                    echo 'pastcontent'.$content;
                    $content = strip_tags($po->post_content);
//                    echo 'nowcontent'.$content;
                }
            }

//            echo 'nowcontent'.$content.'/nowcontent';

            $maxlen = intval($margs['maxlen']);
            
//            echo 'maxlen'.$maxlen;

            if (strlen($content) > $maxlen) {
                //===if the content is longer then the max limit
                $excerpt.=substr($content, 0, $maxlen);

                if ($margs['striptags'] == true) {
                    $excerpt = strip_tags($excerpt);
                    //echo $excerpt;
                }
                if ($margs['stripshortcodes'] == false) {
                    $excerpt = do_shortcode(stripslashes($excerpt));
                } else {
                    $excerpt = strip_shortcodes(stripslashes($excerpt));
                    $excerpt = str_replace('[/one_half]', '', $excerpt);
                    $excerpt = str_replace("\n", " ", $excerpt);
                    $excerpt = str_replace("\r", " ", $excerpt);
                    $excerpt = str_replace("\t", " ", $excerpt);
                }

                $fout.=$excerpt.$margs['aftercutcontent_html'];
                if ($margs['readmore'] == 'auto') {
                    $fout .= '{readmore}';
                }
            } else {
                //===if the content is not longer then the max limit just add the content
                $fout.=$content;
                if ($margs['readmore'] == 'on') {
                    $fout .= '{readmore}';
                }
            }

            //==== replace the read more with given markup or theme function or default
            if ($margs['readmore_markup'] != '') {
                $fout = str_replace('{readmore}', $args['readmore_markup'], $fout);
            } else {
                if (function_exists('continue_reading_link')) {
                    $fout = str_replace('{readmore}', continue_reading_link($pid), $fout);
                } else {
                    if (function_exists('dzs_excerpt_read_more')) {
                        $fout = str_replace('{readmore}', dzs_excerpt_read_more($pid), $fout);
                    } else {
                        //===maybe in the original function you can parse readmore
                        //$fout = str_replace('{readmore}', '<div class="readmore-con"><a href="' . get_permalink($pid) . '">' . __('read more') . ' &raquo;</a></div>', $fout);
                    }
                }
            }
            //echo $fout;
            //==== replace the read more with given markup or theme function or default END
            return $fout;
        }

        static function generate_input_text($argname, $otherargs = array()) {
            $fout = '';
            $fout.='<input type="text"';
            $fout.=' name="' . $argname . '"';

            $margs = array(
                'class' => '',
                'val' => '', // === default value
                'seekval' => '', // ===the value to be seeked
                'type' => '',
                'extraattr'=>'',
            );
            $margs = array_merge($margs, $otherargs);

            if ($margs['type'] == 'colorpicker') {
                $margs['class'].=' with_colorpicker';
            }



            if ($margs['class'] != '') {
                $fout.=' class="' . $margs['class'] . '"';
            }
            if (isset($margs['seekval']) && $margs['seekval'] != '') {
                //echo $argval;
                $fout.=' value="' . $margs['seekval'] . '"';
            } else {
                $fout.=' value="' . $margs['val'] . '"';
            }
            
            
            if ($margs['extraattr'] != '') {
                $fout.='' . $margs['extraattr'] . '';
            }
            
            $fout.='/>';



            //print_r($args); print_r($otherargs);
            if ($margs['type'] == 'slider') {
                $fout.='<div id="' . $argname . '_slider" style="width:200px;"></div>';
                $fout.='<script>
jQuery(document).ready(function($){
$( "#' . $argname . '_slider" ).slider({
range: "max",
min: 8,
max: 72,
value: 15,
stop: function( event, ui ) {
//console.log($( "*[name=' . $argname . ']" ));
$( "*[name=' . $argname . ']" ).val( ui.value );
$( "*[name=' . $argname . ']" ).trigger( "change" );
}
});
});</script>';
            }
            if ($margs['type'] == 'colorpicker') {
                $fout.='<div class="picker-con"><div class="the-icon"></div><div class="picker"></div></div>';
                $fout.='<script>
jQuery(document).ready(function($){
jQuery(".with_colorpicker").each(function(){
        var _t = jQuery(this);
        if(_t.hasClass("treated")){
            return;
        }
        if(jQuery.fn.farbtastic){
        //console.log(_t);
        _t.next().find(".picker").farbtastic(_t);
            
        }else{ if(window.console){ console.info("declare farbtastic..."); } };
        _t.addClass("treated");

        _t.bind("change", function(){
            //console.log(_t);
            jQuery("#customstyle_body").html("body{ background-color:" + $("input[name=color_bg]").val() + "} .dzsportfolio, .dzsportfolio a{ color:" + $("input[name=color_main]").val() + "} .dzsportfolio .portitem:hover .the-title, .dzsportfolio .selector-con .categories .a-category.active { color:" + $("input[name=color_high]").val() + " }");
        });
        _t.trigger("change");
        _t.bind("click", function(){
            if(_t.next().hasClass("picker-con")){
                _t.next().find(".the-icon").eq(0).trigger("click");
            }
        })
    });
});</script>';
            }

            return $fout;
        }

        static function generate_input_checkbox($argname, $argopts) {
            $fout = '';
            $auxtype = 'checkbox';

            if (isset($argopts['type'])) {
                if ($argopts['type'] == 'radio') {
                    $auxtype = 'radio';
                }
            }
            $fout.='<input type="' . $auxtype . '"';
            $fout.=' name="' . $argname . '"';
            if (isset($argopts['class'])) {
                $fout.=' class="' . $argopts['class'] . '"';
            }

            if (isset($argopts['id'])) {
                $fout.=' id="' . $argopts['id'] . '"';
            }
            $theval = 'on';
            if (isset($argopts['val'])) {
                $fout.=' value="' . $argopts['val'] . '"';
                $theval = $argopts['val'];
            } else {
                $fout.=' value="on"';
            }
            //print_r($this->mainoptions); print_r($argopts['seekval']);
            if (isset($argopts['seekval'])) {
                $auxsw = false;
                if (is_array($argopts['seekval'])) {
                    //echo 'ceva'; print_r($argopts['seekval']);
                    foreach ($argopts['seekval'] as $opt) {
                        //echo 'ceva'; echo $opt; echo 
                        if ($opt == $argopts['val']) {
                            $auxsw = true;
                        }
                    }
                } else {
                    //echo $argopts['seekval']; echo $theval;
                    if ($argopts['seekval'] == $theval) {
                        //echo $argval;
                        $auxsw = true;
                    }
                }
                if ($auxsw == true) {
                    $fout.=' checked="checked"';
                }
            }
            $fout.='/>';
            return $fout;
        }

        static function generate_input_textarea($argname, $otherargs = array()) {
            $fout = '';
            $fout.='<textarea';
            $fout.=' name="' . $argname . '"';

            $margs = array(
                'class' => '',
                'val' => '', // === default value
                'seekval' => '', // ===the value to be seeked
                'type' => '',
                'extraattr'=>'',
            );
            $margs = array_merge($margs, $otherargs);



            if ($margs['class'] != '') {
                $fout.=' class="' . $margs['class'] . '"';
            }
            if ($margs['extraattr'] != '') {
                $fout.='' . $margs['extraattr'] . '';
            }
            $fout.='>';
            if (isset($margs['seekval']) && $margs['seekval'] != '') {
                $fout.='' . $margs['seekval'] . '';
            } else {
                $fout.='' . $margs['val'] . '';
            }
            $fout.='</textarea>';

            return $fout;
        }
        static function generate_select($argname, $pargopts) {
            //-- DZSHelpers::generate_select('label', array('options' => array('peritem','off', 'on'), 'class' => 'styleme', 'seekval' => $this->mainoptions[$lab]));
            
            $fout = '';
            $auxtype = 'select';

            if($pargopts==false){
                $pargopts = array();
            }
            
            $margs = array(
                'options' => array(),
                'class' => '',
                'seekval' => '',
                'extraattr'=>'',
            );

            $margs = array_merge($margs, $pargopts);

            $fout.='<select';
            $fout.=' name="' . $argname . '"';
            if (isset($margs['class'])) {
                $fout.=' class="'.$margs['class'].'"';
            }
            if ($margs['extraattr'] != '') {
                $fout.='' . $margs['extraattr'] . '';
            }
            
            $fout.='>';

            //print_r($margs['options']);

            foreach ($margs['options'] as $opt) {
                $val = '';
                $lab = '';


                
                if (is_array($opt) && isset($opt['lab']) && isset($opt['val'])) {
                    $val = $opt['val'];
                    $lab = $opt['lab'];
                } else {
                    $val = $opt;
                    $lab = $opt;
                }
                

                $fout.='<option value="' . $val . '"';
                if ($margs['seekval'] != '' && $margs['seekval'] == $val) {
                    $fout.=' selected';
                }

                $fout.='>' . $lab . '</option>';
            }
            $fout.='</select>';
            return $fout;
        }

    }

}