<!DOCTYPE html>
<html>
    <head>
        <title><?php echo CHtml::encode($this->pageTitle); ?></title>
        <link rel="shortcut icon" href="<?php echo Yii::app()->request->baseUrl; ?>/favicon.png">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <?php
        Yii::app()->bootstrap->register();
        //cs()->registerCssFile(Yii::app()->request->baseUrl . '/css/style.css');
        cs()->registerCssFile(Yii::app()->request->baseUrl . '/css/theme_' . cfg('UI_THEME') . '.css');
        ?>

    </head>
    <script>var ws;</script>
    <body>
        <div class="equal contentWrapper" style="padding:0;">
            <div class="row" style="padding: 0;margin: 0;border: solid 10px transparent;display: block;">
                <div class="one" style="display:none;"></div>
                <div class="two" style="display: block;">
                    <div id="content">
                        <div><?php echo $content; ?></div>
                    </div><!-- content -->       
                </div>


                <!--[if IE]>
                <div class="ieclearer"></div>
                <![endif]-->
            </div>
        </div>
    </body>
</html>


<?php
if (!app()->user->isGuest) {
//script for logViewer fullscreen
    cs()->registerScriptFile(Yii::app()->baseUrl . '/js/plWebSocket.js', CClientScript::POS_HEAD);
    $sudoUser = app()->user->sudoUserInstance;
    cs()->registerScript(
            'WebSocket', "ws = $.WebSocket ('" . getWebSocketCTIUrl() . "', null, {
            user:'" . $sudoUser->name . "',
            pass:'" . $sudoUser->password . "',
            debug: true,
            logData: true
        });", CClientScript::POS_BEGIN
    );
}