<?php
/*
 MailBeez Automatic Trigger Email Campaigns
 http://www.mailbeez.com

 Copyright (c) 2010, 2011 MailBeez

 Licensing Terms & Other Conditions of this
 Mailbeez Module:

 Unless you have our prior written consent, you must NOT directly or indirectly license,
 sub-license, sell, resell, or provide for free or make an offer to do any of these things.
 All of these things are strictly prohibited with this MailBeez Pro Module.

 One Purchase for one Shop - please contact cord@mailbeez.com for volume discounts and
 reseller agreements.

 OpenSource but not free - please respect this license agreement.

*/
$load_start_time = microtime(true);


require_once(MH_DIR_CONFIG . 'config_customer_insight.php');

require_once(MH_DIR_CONFIG . 'config_customer_insight/functions/general.php');

//error_reporting(E_ALL & ~E_NOTICE);
//ini_set('display_errors', 1);

mh_define('MH_BYPASS_TEMPLATE', TRUE);
require_once(MH_DIR_CONFIG . 'config_customer_insight/classes/viewbeez.php');

$context_view_info = new viewbeez();

//print_r($context_view_info); exit();

// not customer found
$no_customer_found = !isset($context_view_info->customer);

$returnpage = mh_get('returnpage') ? base64_decode(mh_get('returnpage')) : false;

list($view_menu, $mInfo, $mailbeez_insight_all_modules) = mh_insight_view(mh_get('view_module'));

if ($mInfo->is_dashboard) {
    // we are running the dashboard
    list($dashboard_menu, $dashboard_mInfo) = mh_insight_dashboard(mh_get('dashboard_module'));
}

?>
    <!DOCTYPE html>
    <html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=<?php echo mh_cfg('CHARSET'); ?>">
        <meta name="viewport" content="width=device-width, initial-scale=1">
        <title>BeezDesk <?php echo mh_lng('MAILBEEZ_INSIGHT_CONTEXT_VIEW_TITLE'); ?></title>

        <link rel="stylesheet"
              href="<?php echo mh_cfg('MH_CATALOG_SERVER') . mh_cfg('MH_DIR_WS_CATALOG') . mh_cfg('MH_ROOT_PATH'); ?>configbeez/config_customer_insight/js/jqm/jquery.mobile-1.3.1.min.css"/>
        <script type="text/javascript"
                src="<?php echo mh_cfg('MH_CATALOG_SERVER') . mh_cfg('MH_DIR_WS_CATALOG') . mh_cfg('MH_ROOT_PATH'); ?>configbeez/config_customer_insight/js/jqm/jquery-1.9.1.min.js"></script>

        <script type="text/javascript">
            $(document).bind("mobileinit", function () {
                $.mobile.defaultPageTransition = 'none';
//            $.mobile.ignoreContentEnabled = true;
            });

            $(document).ready(function () {
                $(".ceebox").ceebox({
                    overlayOpacity: 0.2,
                    animSpeed: 100,
                    fadeIn: 0,
                    titles: false,
                    borderColor: '#666'
                });
            });

            function openCeeboxPopup(popup_link, cbwidth) {
                var cbwstr;
                cbwstr = '';
                if (cbwidth) {
                    cbwstr = 'width:' + cbwidth;
                }
                $.fn.ceebox.popup('<a href="' + popup_link + '" rel="iframe ' + cbwstr + '">link</a>', {
                    overlayOpacity: 0.2,
                    animSpeed: 100,
                    fadeIn: 0,
                    titles: false,
                    borderColor: '#666'
                });
                return false;
            }


            function customInit() {
                $.timeago.settings.allowFuture = true;
                $("abbr.timeago").timeago();

                nameBadgeSize = 42;
                nameBadgeText = '#fff';

                // generated with /tools/pleasingColorsJS/index.htm
                nameBadgeColorsCustomer = ["#56d868", "#56d8d4", "#8ed856", "#56d1d8", "#56d868", "#d5d856", "#9fd856", "#565ad8", "#5687d8", "#56aad8", "#56a4d8", "#d86456", "#5693d8", "#d556d8", "#d85662", "#d86a56", "#cc56d8", "#56d874", "#d86756", "#d85956", "#56d87c", "#56d871", "#86d856", "#d8566a", "#72d856", "#d856bf", "#a8d856", "#d8c256", "#d88456", "#d85c56", "#6fd856", "#d856d3", "#d88f56", "#5b56d8", "#56d7d8", "#9cd856", "#d8d856", "#56d8d1", "#d8d656", "#d8566a", "#c1d856", "#d87b56", "#566bd8", "#d8568c", "#58d856", "#8ed856", "#d256d8", "#5bd856", "#56d857", "#cfd856", "#7dd856", "#ccd856", "#56d86e", "#d88f56", "#ca56d8", "#56d8b8", "#9456d8", "#8856d8", "#80d856", "#d87856", "#56c6d8", "#d8565f", "#7dd856", "#d86756"];
                nameBadgeColorsCustomer2 = ["#1abc9c", "#16a085", "#f1c40f", "#f39c12", "#2ecc71", "#27ae60", "#e67e22", "#d35400", "#3498db", "#2980b9", "#e74c3c", "#c0392b", "#9b59b6", "#8e44ad", "#bdc3c7", "#34495e", "#2c3e50", "#95a5a6", "#7f8c8d", "#ec87bf", "#d870ad", "#f69785", "#9ba37e", "#b49255", "#b49255", "#a94136"];
                nameBadgeMargin = 0;
                middlename = false;
                nameBadgeUppercase = true;

                $(".nameBadgeCustomer").nameBadge({
                    size: nameBadgeSize,
                    middlename: middlename,
                    colors: nameBadgeColorsCustomer,
                    text: nameBadgeText,
                    margin: nameBadgeMargin,
                    uppercase: nameBadgeUppercase
                });
                $(".nameBadgeCustomerLarge").nameBadge({
                    size: 100,
                    middlename: middlename,
                    colors: nameBadgeColorsCustomer,
                    text: nameBadgeText,
                    margin: nameBadgeMargin,
                    uppercase: nameBadgeUppercase
                });
                $(".nameBadgeCustomersList").nameBadge({
                    size: nameBadgeSize,
                    middlename: middlename,
                    colors: nameBadgeColorsCustomer,
                    text: nameBadgeText,
                    margin: 15,
                    uppercase: nameBadgeUppercase
                });
                $(".nameBadgeProspects").nameBadge({
                    size: nameBadgeSize,
                    middlename: middlename,
                    colors: nameBadgeColorsCustomer,
                    text: nameBadgeText,
                    margin: nameBadgeMargin,
                    uppercase: nameBadgeUppercase
                });

                $(".nameBadgeProspectLarge").nameBadge({
                    size: 100,
                    middlename: middlename,
                    colors: nameBadgeColorsCustomer,
                    text: nameBadgeText,
                    margin: nameBadgeMargin,
                    uppercase: nameBadgeUppercase
                });
                $(".nameBadgeProspectsList").nameBadge({
                    size: nameBadgeSize,
                    middlename: middlename,
                    colors: nameBadgeColorsCustomer,
                    text: nameBadgeText,
                    margin: 15,
                    uppercase: nameBadgeUppercase
                });

            }

            $(document).ready(function () {
                customInit();
            });

            // todo
            $(document).on('pagechange', function () {
                customInit();
            });
            /*
             function showSuccess(message) {
             $("<div class='ui-loader ui-overlay-shadow ui_body_success ui-corner-all'><h1>" + message + "</h1></div>").css({ "display":"block", "opacity":0.96, top:$(window).scrollTop() + 100 })
             .appendTo($.mobile.pageContainer)
             .delay(2000)
             .fadeOut(400, function () {
             $(this).remove();
             });
             }


             function showError(message) {
             $("<div class='ui-loader ui-overlay-shadow ui_body_error ui-corner-all'><h1>" + message + "</h1></div>").css({ "display":"block", "opacity":0.96, top:$(window).scrollTop() + 100 })
             .appendTo($.mobile.pageContainer)
             .delay(2000)
             .fadeOut(400, function () {
             $(this).remove();
             });
             }

             */

        </script>
        <script type="text/javascript"
                src="<?php echo mh_cfg('MH_CATALOG_SERVER') . mh_cfg('MH_DIR_WS_CATALOG') . mh_cfg('MH_ROOT_PATH'); ?>configbeez/config_customer_insight/js/jqm/jquery.mobile-1.3.1.min.js"></script>

        <script type="text/javascript"
                src="<?php echo mh_cfg('MH_CATALOG_SERVER') . mh_cfg('MH_DIR_WS_CATALOG') . mh_cfg('MH_ROOT_PATH'); ?>configbeez/config_customer_insight/js/jqm-docs.js"></script>
        <link rel="stylesheet"
              href="<?php echo mh_cfg('MH_CATALOG_SERVER') . mh_cfg('MH_DIR_WS_CATALOG') . mh_cfg('MH_ROOT_PATH'); ?>configbeez/config_customer_insight/css/jqm-docs.css"/>

        <link rel="stylesheet"
              href="<?php echo mh_cfg('MH_CATALOG_SERVER') . mh_cfg('MH_DIR_WS_CATALOG') . mh_cfg('MH_ROOT_PATH'); ?>configbeez/config_customer_insight/css/table.bootstrap.min.css"/>

        <link rel="stylesheet"
              href="<?php echo mh_cfg('MH_CATALOG_SERVER') . mh_cfg('MH_DIR_WS_CATALOG') . mh_cfg('MH_ROOT_PATH'); ?>configbeez/config_customer_insight/css/gui.css"/>

        <style>

            .ui-bar-d {
                background: linear-gradient(#ddd, #ddd) repeat scroll 0 0 #ddd;
            }

            .ui-btn-icon-left > .ui-btn-inner > .ui-icon, .ui-btn-icon-right > .ui-btn-inner > .ui-icon {
                margin-top: -10px;
            }

            .ui-shadow {
                box-shadow: 0 0px 0px rgba(0, 0, 0, 0.2);
            }

            .ui-header .ui-title, .ui-footer .ui-title {
                font-weight: normal;
            }

            #navigation a {
                background: none no-repeat scroll 1em center;
                padding-left: 57px;
            }

            .list_header {
                margin-top: 0px
            }

            .ui-page {
            }

            .type-interior .content-secondary:after {
                /*background-color: transparent;*/
            }

            #fullcontent .content-secondary {
                /*border-right: 1px solid #ff0000;*/
            }

            #menu-divider.ui-li-divider {
                padding: 0px;
                padding-top: 5px;
                height: 45px;
            }

            #menu-divider > .ui-btn-inner.ui-li {
                height: 50px;
            }

            #menu-divider > .ui-btn-inner {
                font-size: 14px;
            }

            #menu-divider > .ui-btn-inner.ui-li > .ui-btn-text {
                height: 60px;
            }

            #fullcontent * .content-primary {
                width: 87%;
                padding: 0px;
                padding-right: 15px;
                /*left: 120;*/
                /*background-color: #fff;*/
            }

            #fullcontent {
                /*<!-- background-image : url ( "-->

            <?php //echo MH_CATALOG_SERVER . MH_DIR_WS_CATALOG;?>            <!--mailhive/configbeez/config_customer_insight/images/ios-linen.jpg" );
    --> height : auto;
    */

            }

            #fullcontent > .ui-content {
                padding: 15px;
                padding: 0px;
                /*padding-left: 100px;*/
            }

            #fullcontent > .ui-header {
                /*top: 0px;*/
            }

            #fullcontent * .content-secondary {
                width: 10%;
                margin: 0px;
                /*position: fixed;*/
                /*position: absolute;*/
                /*left: 0px;*/
                margin-bottom: -9999px;
                padding-bottom: 9999px;
                background: #e7e7e7;
                text-align: center;
                font-size: 12px;

                /*color: #ddd;*/
                text-shadow: none;
            <!-- background-image: url ( "-->      <?php //echo MH_CATALOG_SERVER . MH_DIR_WS_CATALOG;?>            <!--mailhive/configbeez/config_customer_insight/images/ios-linen.jpg" );
            -->
            }

            .ui-header {
                background: none !important;
                background-color: transparent;
                border-color: transparent;
                color: #606060;
                margin-bottom: 10px;
            }

            .ui-corner-all, .ui-btn-corner-all {
                border-radius: 0.3em;
            }

            .ui-li-count.ui-btn-corner-all {
                border-radius: 9em;
            }

            .ui-li-count.ui-btn-active.ui-btn-up-c.ui-btn-corner-all {
                background-color: #DA4F49;

                /*background-image: -webkit-gradient(linear, left top, left bottom, from(#EE5F5B), to(#BD362F)); !* Saf4+, Chrome *!*/
                /*background-image: -webkit-linear-gradient(#EE5F5B, #BD362F); !* Chrome 10+, Saf5.1+ *!*/
                /*background-image: -moz-linear-gradient(#EE5F5B, #BD362F); !* FF3.6 *!*/
                /*background-image: -ms-linear-gradient(#EE5F5B, #BD362F); !* IE10 *!*/
                /*background-image: -o-linear-gradient(#EE5F5B, #BD362F); !* Opera 11.10+ *!*/
                /*background-image: linear-gradient(#EE5F5B, #BD362F);*/

                border: 2px solid #FFFFFF;
                margin-top: -2px;
            }

            .ui-li-aside > .ui-li-count.ui-btn-active.ui-btn-up-c.ui-btn-corner-all {
                margin-top: -0.95em;
            }

            .ui-bar-c {
                background-image: none;
                background: white;
            }

            .ui-btn-hover-c {
                background-image: none;
                text-shadow: none;
            }

            .ui-btn-active {
                text-shadow: none;
                background-color: #5393C5;
                /*background-image: none;*/
                background-image: -webkit-gradient(linear, left top, left bottom, from(#5393C5), to(#5385b9)); /* Saf4+, Chrome */
                background-image: -webkit-linear-gradient(#5393C5, #5385b9); /* Chrome 10+, Saf5.1+ */
                background-image: -moz-linear-gradient(#5393C5, #5385b9); /* FF3.6 */
                background-image: -ms-linear-gradient(#5393C5, #5385b9); /* IE10 */
                background-image: -o-linear-gradient(#5393C5, #5385b9); /* Opera 11.10+ */
                background: linear-gradient(#5393C5, #5385b9) repeat scroll 0 0 #5393C5;

            }

            .ui-btn-up-b {
                background-color: #5393C5;
                background-image: none;
                /*background-image: -webkit-gradient(linear, left top, left bottom, from(#5393C5), to(#5385b9)); !* Saf4+, Chrome *!*/
                /*background-image: -webkit-linear-gradient(#5393C5, #5385b9); !* Chrome 10+, Saf5.1+ *!*/
                /*background-image: -moz-linear-gradient(#5393C5, #5385b9); !* FF3.6 *!*/
                /*background-image: -ms-linear-gradient(#5393C5, #5385b9); !* IE10 *!*/
                /*background-image: -o-linear-gradient(#5393C5, #5385b9); !* Opera 11.10+ *!*/
                /*background: linear-gradient(#5393C5, #5385b9) repeat scroll 0 0 #5393C5;*/
            }

            .ui-title {
                overflow: visible !important;
            }

            .ui-body-c, .ui-overlay-c {
                background: #fff none repeat scroll 0 0;
            }

            .ui-bar-b {
                background: #5385b9 none repeat scroll 0 0;

            }

            .ui-btn-up-c {
                background: none;
                background-image: none;
            }

            .ui-btn-active.ui-btn-up-c {
                background-image: none;
                    background-color: #5393C5;
            }
            /*

            .ui-btn-hover-c {
                background: #dfdfdf none repeat scroll 0 0;
            }
            .ui-btn-active {
                text-shadow: none;
            }
            .ui-btn-active:visited, .ui-btn-active:hover, .ui-btn-active a.ui-link-inherit {
                color: #333;
            }
        */

            #fullcontent > .ui-header {
                background: none;
                background-color: transparent;
                border-color: transparent;
            }

            #fullcontent.type-interior .content-secondary:after {
                background-color: #ccc;
            }

            /*

            .ui_body_success {
              border: 1px solid #24AF11;
              color: #333;
              text-shadow: 0 1px 0 #fff;
              background: #89F07C;
              background-image: -webkit-gradient(linear, left top, left bottom, from(#fff), to(#89F07C));
              background-image: -webkit-linear-gradient(top, #fff, #89F07C);
              background-image: -moz-linear-gradient(top, #fff, #89F07C);
              background-image: -ms-linear-gradient(top, #fff, #89F07C);
              background-image: -o-linear-gradient(top, #fff, #89F07C);
              background-image: linear-gradient(top, #fff, #89F07C);
            }

            .ui_body_error {
              border: 1px solid #F7503A;
              color: #333;
              text-shadow: 0 1px 0 #fff;
              background: #FBB99E;
              background-image: -webkit-gradient(linear, left top, left bottom, from(#fff), to(#FBB99E));
              background-image: -webkit-linear-gradient(top, #fff, #FBB99E);
              background-image: -moz-linear-gradient(top, #fff, #FBB99E);
              background-image: -ms-linear-gradient(top, #fff, #FBB99E);
              background-image: -o-linear-gradient(top, #fff, #FBB99E);
              background-image: linear-gradient(top, #fff, #FBB99E);
            }
        */

            /*Dashboard menue*/

            .dashboard_menu, .dashboard_menu > span {
                text-decoration: none;
                color: inherit;
                opacity: .4;
            }

            .dashboard_menu .dashboard_menu_title {
                overflow: hidden;
                text-overflow: ellipsis;
                display: block;
                padding-left: 10px;
                padding-right: 10px;
                margin: auto;
            }

            .dashboard_menu img {
                padding-top: 5px;;
                padding-bottom: 1px;
            }

            .dashboard_menu.active, .dashboard_menu.active:hover, .dashboard_menu.active > span, .dashboard_menu.active:hover > span {
                opacity: 1;
            }

            a.dashboard_menu:hover, .dashboard_menu:hover > span {
                opacity: .75;
            }

            .nameBadgeCustomer, .nameBadgeCustomersList, .nameBadgeProspects, .nameBadgeProspectsList {
                width: 0px;
                overflow: hidden;
                text-shadow: none !important;
                font-weight: normal;
            }

            .type-interior .content-secondary::after {
                content: none;
            }

            .content-secondary {
                background-color: transparent !important;
            }
        </style>
        <style>
            .engagement_badge.opened {
                background-color: <?php echo mh_cfg('MH_COLOR_BLUE'); ?>;
            }

            .engagement_badge.clicked {
                background-color: <?php echo mh_cfg('MH_COLOR_ORANGE'); ?>;
            }

            .engagement_badge.ordered {
                background-color: <?php echo mh_cfg('MH_COLOR_GREEN'); ?>;
            }

            .engagement_badge.bounced {
                background-color: <?php echo mh_cfg('MH_COLOR_PINK'); ?>;
            }

            .engagement_badge.blocked {
                background-color: #9e9e9e;
            }

            .mode_badge.simulation {
                background-color: <?php echo mh_cfg('MH_COLOR_ORANGE'); ?>;
            }

            .mode_badge.production {
                background-color: <?php echo mh_cfg('MH_COLOR_GREEN'); ?>;
            }
        </style>
        <script language="javascript"
                src="<?php echo mh_cfg('MH_CATALOG_SERVER') . mh_cfg('MH_DIR_WS_CATALOG') . mh_cfg('MH_ROOT_PATH'); ?>common/js/jquery-migrate-1.2.1.min.js"></script>
        <script language="javascript"
                src="<?php echo mh_cfg('MH_CATALOG_SERVER') . mh_cfg('MH_DIR_WS_CATALOG') . mh_cfg('MH_ROOT_PATH'); ?>common/js/ceebox/js/jquery.ceebox.min.js"></script>
        <script language="javascript"
                src="<?php echo mh_cfg('MH_CATALOG_SERVER') . mh_cfg('MH_DIR_WS_CATALOG') . mh_cfg('MH_ROOT_PATH'); ?>common/js/timeago/jquery.timeago.js"></script>
        <script language="javascript"
                src="<?php echo mh_cfg('MH_CATALOG_SERVER') . mh_cfg('MH_DIR_WS_CATALOG') . mh_cfg('MH_ROOT_PATH'); ?>common/js/jquery.nameBadges.js"></script>

        <?php if ($context_view_info->language == 'german') { ?>
            <script language="javascript"
                    src="<?php echo mh_cfg('MH_CATALOG_SERVER') . mh_cfg('MH_DIR_WS_CATALOG') . mh_cfg('MH_ROOT_PATH'); ?>common/js/timeago/locales/jquery.timeago.de.js"></script>
        <?php } ?>

        <link rel="stylesheet" type="text/css"
              href="<?php echo mh_cfg('MH_CATALOG_SERVER') . mh_cfg('MH_DIR_WS_CATALOG') . mh_cfg('MH_ROOT_PATH'); ?>common/js/ceebox/css/ceebox_mh.css"/>


    </head>
    <body>
    <div data-role="page" class="type-interior" <?php if ($mInfo->is_dashboard) { ?>id="fullcontent"<?php } ?>>
        <div data-role="header" data-theme="b">
            <h1 style="text-shadow: none;">BeezDesk
                <img
                    src="<?php echo mh_cfg('MH_CATALOG_SERVER') . mh_cfg('MH_DIR_WS_CATALOG') . mh_cfg('MH_ROOT_PATH'); ?>configbeez/config_customer_insight/images/mailbeez_icon.png"
                    alt="" width="22"
                    style="position: relative; margin-top:-6px; top: 3px; left:0px;"> <?php echo MAILBEEZ_INSIGHT_CONTEXT_VIEW_TITLE ?>
            </h1>

            <?php if (!$mInfo->is_dashboard) { ?>
                <a id="header_button_dashboard"
                    <?php if ($returnpage) { ?>
                        href="<?php echo $returnpage; ?>"
                    <?php } else { ?>
                        href="<?php echo mh_cfg('MAILBEEZ_CONTEXT_VIEW_URL') . '&view_module=view_dashboard'; ?>"
                    <?php } ?>
                   data-icon="arrow-l"
                   data-ajax="true" data-direction="reverse" data-transition="slide"
                   style="margin-left:0px;margin-top: 3px;">Dashboard</a>
            <?php } else { ?>

            <?php } ?>

            <?php if (mh_get('popup') == 'true') { ?>
                <a id="top_nav" data-icon="forward" data-iconpos="right" data-mini="true" class="ui-btn-right"
                   href="<?php echo $_SERVER['REQUEST_URI']; ?>&popup=false"
                   target="_blank"
                   style="margin-right: 10px;margin-top: 3px;"><?php echo mh_lng('MAILBEEZ_INSIGHT_VIEW_NEW_WINDOW'); ?></a>
            <?php } ?>
        </div>
        <!-- /header -->

        <div data-role="content">
            <?php if ($mInfo->is_dashboard) { ?>
                <div class="content-secondary">
                    <br/>
                    <br/>
                    <?php echo $dashboard_menu; ?>
                </div>
            <?php } elseif ($no_customer_found) {
                ?>
            <?php } else { ?>
                <div class="content-secondary">
                    <div data-role="collapsible" data-collapsed="true" data-theme="b" data-content-theme="d">
                        <h3>Menu</h3>
                        <ul data-role="listview" data-theme="c" data-dividertheme="d" id="navigation">
                            <?php echo $view_menu; ?>
                        </ul>
                    </div>
                </div>
            <?php } ?>


            <div class="content-primary">
                <?php

                if ($mInfo->is_dashboard) {
                    echo $dashboard_mInfo->view_content;
                } elseif ($no_customer_found) {
                    ?>
                    <?php echo mh_lng('MAILBEEZ_INSIGHT_CUSTOMER_NOT_FOUND'); ?>
                    <br><br>

                    <?php if (mh_get('cID')) { ?>
                        cID: <?php echo mh_get('cID'); ?><br>
                    <?php }
                    if (mh_get('oID')) { ?>
                        oID: <?php echo mh_get('oID'); ?><br>
                    <?php }
                    if (mh_get('email',  null, 'email_string')) { ?>
                        email: <?php echo mh_get('email',  null, 'email_string'); ?><br>
                    <?php }
                    if (mh_get('username',  null, 'email_string')) { ?>
                        username: <?php echo mh_get('username',  null, 'email_string'); ?><br>
                    <?php } ?>
                    <?php
                } else {
                    echo $mInfo->view_content;
                }
                ?>

            </div>
            <!--/content-primary -->
        </div>
        <!-- /content -->
        <?php if (!$mInfo->is_dashboard) { ?>
            <div data-role="footer" class="footer-docs" data-theme="c" data-position="fixed">
                <p>&copy;
                    <a href="http://www.beezdesk.com">BeezDesk CRM</a> V3.0 by MailBeez -
                    Admin: <?php echo $context_view_info->admin->email; ?>
                </p>
            </div>
        <?php } ?>
    </div>
    <!-- /page -->
    </body>
    </html>
<?php
$load_end_time = microtime(true);
mh_log("BeezDesk CRM Customer Insight load time: %s", $load_end_time - $load_start_time);
