public function inbox()
    {
        //http://mail.tbsgroup.co.id
        ?>
<style>
            .webapps{
                padding: 10px;
                cursor: pointer;
                border-bottom: 1px solid #dedede;
            }
            .borderless{
                border-bottom: 0px;
            }
            .fullscreen {
                width: 100%;
                height: 80%;
                position: fixed;
                z-index: 100;
                top:0;
                left: 0;
             }
        </style>
        <script>
            function getwidth(){
                return window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth||0;
             }
             function getheight(){
                return window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight||0;
             }
             function callfullscreen() {
                $('.fullscreen').css({
                        width: getwidth(),
                        height: getheight()
                    });
             }
            /*$(document).ready(function(){
                callfullscreen();
            });*/
            
        </script>
        <div onclick="$('#wepapps_menu').fadeToggle();$('#webapps_iframe').toggleClass('fullscreen').toggleClass('col-md-9');" style="position: fixed; padding: 10px; bottom: 0; right: 0; color:white; background-color: rgba(0,0,0,0.3); z-index: 200;"><i class="glyphicon glyphicon-fullscreen"></i></div>
        <?php 
        $wp = new WebAppsPortal();
        $wp->getByID(1);
        ?>
        <div id="webapps_iframe">
            <div class="embed-responsive embed-responsive-4by3">
                <iframe class="embed-responsive-item" src="<?php 
        echo $wp->webapps_url;
        ?>
"></iframe>
            </div>
        </div>
<?php 
    }
    public static function portalIndex()
    {
        //global $template;
        //$template->addTextToHead("<script src='"._SPPATH."app/BPlugin/Twitter/js/jquery-1.11.1.js'></script>");
        //pr($template);
        /*
         * print breadcrumbs
         */
        $t = time();
        $getID = TextP::getP("id");
        ?>
        
        <style>
            .webapps{
                padding: 10px;
                cursor: pointer;
                border-bottom: 1px solid #dedede;
            }
            .borderless{
                border-bottom: 0px;
            }
            .fullscreen {
                width: 100%;
                height: 100%;
                position: absolute;
                z-index: 10000;
                top:0;
                left: 0;
             }
             .iframeasli{
                 width: 100%;
                 height: 650px;
             }
        </style>
        <script>
            function getwidth(){
                return window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth||0;
             }
             function getheight(){
                return window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight||0;
             }
             function callfullscreen() {
                 var heit = $(window).height();
                 var wit = $(window).width(); 
                $('.fullscreen').css({
                        width: getwidth(),
                        height: getheight()
                    });
                   // alert('resize');
             }
            /*$(document).ready(function(){
                callfullscreen();
            });*/
            function kerjakanFullScreen(){
                $('#wepapps_menu').fadeToggle();
                $('#webapps_iframe').toggleClass('col-md-9');
                $('#iframeholder').toggleClass('fullscreen').toggleClass('iframeasli');
            }
            //$('#wepapps_menu').fadeToggle();$('#webapps_iframe').toggleClass('fullscreen').toggleClass('col-md-9');
        </script>
        <?php 
        ?>
        <div onclick="kerjakanFullScreen();" style="position: fixed; padding: 10px; bottom: 0; right: 0; color:white; background-color: rgba(0,0,0,0.3); z-index: 10001;"><i class="glyphicon glyphicon-fullscreen"></i></div>
        <div class="col-md-3" id="wepapps_menu">
            <div style="padding: 10px; background-color: #efefef; border-radius: 5px; margin-right: 10px;">
                <?php 
        $wb = new WebAppsPortal();
        $chan = Account::getMyChannels();
        $all = $wb->getByMyChannels($chan, " AND webapps_tech = 'web' ORDER BY webapps_name ASC");
        //$all = $wb->get
        //pr($chan);
        //pr($all);
        foreach ($all as $num => $wp) {
            $num++;
            ?>
                    <div id="webapps_<?php 
            echo $wp->webapps_id;
            ?>
_<?php 
            echo $t;
            ?>
" class="webapps <?php 
            if ($num >= count($all)) {
                ?>
borderless<?php 
            }
            ?>
"><?php 
            echo $wp->webapps_name;
            ?>
</div>
                    <script>
                        $('#webapps_<?php 
            echo $wp->webapps_id;
            ?>
_<?php 
            echo $t;
            ?>
').click(function(){
                            <?php 
            //if webmail
            if ($wp->webapps_id == 1) {
                ?>
                                    var url = '<?php 
                echo $wp->webapps_url;
                ?>
';
                                    var win = window.open(url, '_blank');
                                    win.focus();
                            <?php 
            } else {
                ?>
                            $("#webapps_iframe").empty().html('<iframe id="iframeholder" class="iframeasli" src="<?php 
                echo $wp->webapps_url;
                ?>
"></iframe> ');
                            <?php 
            }
            ?>
                        });
                    <?php 
            if ($getID == $wp->webapps_id) {
                ?>
   
                    $(document).ready(function(){
                        $("#webapps_iframe").empty().html('<iframe id="iframeholder" class="iframeasli" src="<?php 
                echo $wp->webapps_url;
                ?>
"></iframe> ');                  
                    });
                    <?php 
            }
            ?>
                    </script>
                     <?php 
        }
        ?>
            </div> 
        </div>
        <div class="col-md-9" id="webapps_iframe">
            
            <?php 
        //pr($_SESSION);
        ?>
        </div> 
         <?php 
    }