<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xml:lang="en" xmlns="http://www.w3.org/1999/xhtml" lang="en">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"></meta>
    <title><?php echo $this->gPageTitle; ?></title>
    <link rel="Shortcut Icon" href="../favicon.ico"/>
    <script type="text/javascript">
        var gFuse = "<?php echo $this->gFuse; ?>";
        var gView = "<?php echo $this->gView; ?>";
        var gDateFormat = "<?php echo $this->gDateFormat;?>";
        var showCustomerDropdown=<?php echo $this->gShowCustomerDropDown; ?>;
        var showLastSeen=<?php echo $this->gShowLastSeen; ?>;
        var relativePath = "<?php echo $this->gRelativePath; ?>";
    </script>
    <link rel="stylesheet" type="text/css" href="../newedge/utilities/min/index.php?g=admincss" />
    <?php if ($this->gCSSFiles != "") { ?>
    <link type="text/css" rel="stylesheet" href="../newedge/utilities/min/index.php?f=<?php echo $this->gCSSFiles;?>" />
    <?php } ?>
    <script type="text/javascript" src="../newedge/utilities/min/index.php?g=adminjs&debug"></script>
    <script type="text/javascript" src="../newedge/utilities/min/index.php?f=javascript/language/<?php echo $this->gLanguage; ?>.js,<?php echo $this->gJSFiles;?>"></script>
</head>

<body class="darkgray">
<div style="font-weight: bold; color:red; position:absolute;left:110px;top:7px;" id="mainsitenotice"><?php echo $this->gUserLoginDisabledNotice;?></div>
<div id="msg-div" class="msg-div-wrapper" style="display:none;"><div id="msg-div-inner" class="msg-div-inner"></div></div>
<div id="header">
    <div id="nav"> <!-- Starts Main Menu -->
        <ul>
        <?php foreach ($this->menus as $menu) {?>
            <li class="<?php echo $menu['class'];?>">
                <span><a href="<?php echo $menu['modulelink'];?>"><?php echo $menu['modulename'];?></a></span>
                <div class="<?php echo $menu['submenutype'];?>">
                    <ul>
                     <?php foreach($menu['submenu'] as $submenu) {
                         $class = "";
                         if (in_array($this->gView, $submenu->getViews()))
                         {
                            if($secondarytagname = $submenu->getSecondaryTagName()){
                                //we have a secondary name (like plugin=) that we need to check
                                if((isset($_GET[$secondarytagname])) && ($_GET[$secondarytagname] == $submenu->getSecondaryTagValue()) ){
                                    $class = "active";
                                }
                            }else{
                                $class = "active";
                            }
                         }
                         ?>
                            <li class="<?php echo $class;?>"><?php echo $submenu->getURL();?></li>
                     <?php } ?>
                    </ul>
                </div>
            </li>
        <?php } ?>
        </ul>
    </div> <!-- Ends Main Menu -->
    <div class="user-box">
            <div class="user-box-name">
                <a href="index.php?fuse=admin&amp;view=EditAddAdminAccount"><?php echo $this->lang("Welcome")." ".$this->gUserFirstName;?></a>
            </div>
            <ul class="user-nav">
                <li>
                  <a id="session_count" class="session_count" href="index.php?fuse=home&view=ViewEvents&startdate=today"><?php echo $this->cache_eventcount_session; ?></a><a id="day_count" class="day_count" href="index.php?fuse=home&view=ViewEvents&startdate=today"><?php echo $this->cache_eventcount_day; ?></a>
                </li>
                <li><a onclick="showNotes()"><?php echo $this->lang("My Notes");?></a></li>
                <li><a onclick="addTeamStatus()"><?php echo $this->lang("My Status");?></a></li>
                <li><a onclick="loadHelp();" qtip="Context Help" href="javascript:void(0);"><?php echo $this->lang("Help");?></a></li>
                <li><a href="index.php?fuse=newedge&amp;action=Logout"><?php echo $this->lang("Logout");?></a></li>
            </ul>
    </div>
    <div class="searchquery">
        <input id="searchquerytextfield" type="text" name="searchquerytextfield" />
    </div>
    <!-- change #header h1 to with your logo in main.css -->
    <h1 class="mainlogo"><a href="#"></a></h1>
</div>

<div id="main">

    <div id="getting-started-wrapper" style="display:none;">
        <div id="getting-started-close"><a href="">close</a></div>
        <ul id="getting-started">
            <li class="basics"><a href="index.php?fuse=admin&view=viewProducts"><span>1</span>General Settings</a></li>
            <li class="editing"><a href="index.php?fuse=admin&view=ViewSettings&group=general"><span>2</span>Customize Plugins</a></li>
            <li class="customizing"><a href="index.php?fuse=admin&view=ThirdPartyBilling"><span>3</span>Create Products</a></li>
            <li class="launch"><a href="/prepare-for-launch/"><span>4</span>Prepare to Launch!</a></li>
            <div class="clearer"></div>
        </ul>
    </div>

    <div id="left-col">
        <div class="container" style="min-height: 206px;">
            <div class="heading"><a id="sidebaropengear" onclick="showSideBarSettings();" href="javascript:void(0);"><img width=16" height="16" src="../templates/admin/images/gear.png" alt="" /></a><?php echo $this->lang("Action Menu");?></div>
            <div id="selectedcustomernav" class="inside" style="padding-bottom:0px !important;">
                <input type="text" id="remote-users" style="width:143px !important;display:none"/>
                <div class="selectedcustomer" style="text-align:<?php echo $this->gSelectedCustomerTextAlign;?>;">
                    <?php if ($this->gShowProfileCard) { ?>
                        <a class="staff-note" href="javascript:void();" onclick="ce.addNote();return false;"></a>
                        <span id="activecustomermenuselector" style="padding-top:2px;float:right; <?php echo $this->gMenuSelector;?>"><img src="../templates/admin/images/open_black.gif" /></span>
                    <?php } ?>
                    <span id="selectedcustomer"><?php echo $this->gActiveProfile;?></span>
                </div>

                <?php if ($this->showCustomerSubMenu) { ?>
                <div class="dropdown">
                    <ul>
                        <li class="first">&nbsp;&nbsp;<a href="index.php?fuse=clients&view=Admin_Profile_Contact"><?php echo $this->lang("Profile");?></a></li>
                        <?php
                        if ($this->user->hasPermission('clients_view_domains')) {
                            echo '<li>&nbsp;&nbsp;<a href="index.php?fuse=clients&view=Admin_Profile_Products">'.$this->lang("Products").'</a></li>';
                        }
                        ?>
                        <li>&nbsp;&nbsp;<a href="index.php?fuse=clients&view=Admin_Profile_Billing"><?php echo $this->lang("Billing");?></a></li>
                        <?php
                        if ($this->user->hasPermission('billing_recurring_overview')) {
                            echo '<li>&nbsp;&nbsp;<a href="index.php?fuse=clients&view=Admin_Profile_RecurringCharges">'.$this->lang("Recurring").'</a></li>';
                        }
                        ?>
                        <?php
                        if ($this->user->hasPermission('billing_view')) {
                            echo '<li>&nbsp;&nbsp;<a href="index.php?fuse=clients&view=Admin_Profile_Invoices">'.$this->lang("Invoices").'</a></li>';
                        }
                        ?>
                        <li>&nbsp;&nbsp;<a href="index.php?fuse=clients&view=Admin_Profile_Accounts"><?php echo $this->lang("Alt Accounts");?></a></li>
                        <li>&nbsp;&nbsp;<a href="index.php?fuse=clients&view=Admin_Profile_Notes"><?php echo $this->lang("Notes");?></a></li>
                        <li>&nbsp;&nbsp;<a href="index.php?fuse=clients&view=Admin_Profile_Password"><?php echo $this->lang("Password");?></a></li>
                        <?php
                        if ($this->user->hasPermission('clients_view_eventlog')) {
                            echo '<li>&nbsp;&nbsp;<a href="index.php?fuse=clients&view=Admin_Profile_Events">'.$this->lang("Events").'</a></li>';
                        }
                        ?>

                    </ul>
                </div>
                <?php } ?>

            </div>

            <div id="viewactionitems"></div>

            <div class="inside" style="padding-top:0px; padding-bottom:0px;">
                <ul class="links" style="margin-left:0px !important;">
                    <li id='blankforvalidation1' style="display:none">&nbsp;</li>
                    <?php
                    foreach($this->gOpenItems as $openitem) { ?>
                    <li><?php echo $openitem['openitemname'];?></li>
                    <?php } ?>
                </ul>
            </div>
            
            <div class="inside" style="padding-top:0px; padding-bottom:0px;<?php echo $this->gViewActionsDisplayStyle;?>">
                <h5 style="padding-left:11px;"><?php echo $this->lang("Available Actions");?></h5>
                <ul class="links" style="margin-left:0px !important;">
                    <li id='blankforvalidation2' style="display:none">&nbsp;</li>
                    <?php foreach($this->gViewActions as $viewaction) { ?>
                    <li><?php echo $viewaction['viewactionlink'];?></li>
                    <?php } ?>
                </ul>
            </div>

            <div id="supportticketsummary"><?php echo $this->cache_supportticket; ?></div>

        </div>
        <div class="container" style="margin-bottom:5px !important;">
            <div class="inside" id="whoisonline">
                <?php echo $this->lang("Who's Online");?>
                <ul class="dots" id="onlineusers">
                  <?php echo $this->rawOnlineUsers; ?>
                </ul>
                <span id='lastxseen' style="<?php echo $this->lastXSeenStyle;?>">Last <?php echo $this->gLastXLimit;?> Seen</span>
                <ul class="dots" id="offlineusers" style="margin-bottom:4px;">
                  <?php if ($this->gShowLastSeen == true) { echo $this->rawOfflineUsers;}?>
                </ul>
            </div>
        </div>
        <div style="text-align:center;font-size:10px;margin-left:3px;color:#919191; margin-bottom:45px;">
            Installed Version: <?php echo $this->gInstalledVersion;?><br/>
            <span style="color:red;"><?php echo $this->gLatestVersion;?><br/></span>
            <a style="color:#A80000;" href="#" onclick="UserVoice.Popin.show(uservoiceOptions); return false;">Give us feedback!</a>
        </div>
    </div>

    <div id="right-col">

        <div class="wrap">
            <div class="container">
                <div class="heading"><span style="float:right;" id="headinglabelright"></span><span id="headinglabel"></span><span style="float:right;" ><a onclick="loadHelp();" qTip="Context Help" href="javascript:void(0);"><img alt="help" id="headinglabelhelp" style="mouse:pointer;padding-right:5px;" width="16" height="16" src="../templates/admin/images/question-frame.png" border="0" /></a></span></div>
                <div id="breadcrumb" style="display:none;"><span style="padding-left:10px;font-size:10px;color:#777777;" id="alsoviewing"></span></div>
                    <div class="inside">

                        <!-- do not touch -->
                        <?php echo $this->gContents;?>

                    </div><!-- inside -->
               </div><!-- container -->
            </div><!-- wrap -->
            <div id="copyright" style="clear:both;margin-right:232px;">
            Copyright &copy; 2002-<?php echo $this->gCurrentYear;?> ClientExec, LLC. All Rights Reserved.<br/>
            <?php echo $this->gExecutionTime;?>
        </div>
        </div> <!-- left-col -->
    </div> <!-- main -->

    <div id="footer">
        <ul id="activechats">
            <li>
                <select id="onlineStatus" name="onlineStatus" onchange="changeChatStatus();">
                    <option value="0"><?php echo $this->lang("Available");?></option>
                    <option value="2"><?php echo $this->lang("Away");?></option>
                    <option value="1"><?php echo $this->lang("Busy");?></option>
                </select>
            </li>
        </ul>
    </div>
    <div id="advancedsearch-win" class="x-hidden">
        <div class="x-window-header"><?php echo $this->lang("Search Options");?></div>
        <div id="advancedsearchcontent" class="x-hidden"></div>
    </div>

    <script type="text/javascript">
        if(navigator.platform == 'iPad' || navigator.platform == 'iPhone' || navigator.platform == 'iPod')
        {
            document.getElementById('footer').style.position = "static";
            document.getElementById('activechats').style.paddingTop = "13px";
        }
        $("#nav .dropdown ul li:first-child").css("border-top", "0 none");
    </script>

    <script type="text/javascript">
    <!--
    	document.getElementById('headinglabel').innerHTML = "<?php echo $this->gHeaderLabelLeft;?>";
        //document.getElementById('viewactionitems').innerHTML = html_entity_decode("{clean_actionmenuitems}");
    	document.getElementById('headinglabelright').innerHTML = html_entity_decode("<?php echo $this->gHeaderLabelRight;?>");
    	processOnLoadFunctions();

        <?php
            if ($this->gShowTicketSummary) {
                echo "getTicketSummaries();";
            }
        ?>
        getEventCounts();
        //process clicking of filters from side bar
        //will determine if we need a page refresh or not
        processFilterClick = function(searchfilter) {
            if ( ('<?php echo $this->gView;?>' == 'ViewTickets') && ('<?php echo $this->gFuse;?>' == "support") ){
                viewtickets.searchfilter = searchfilter;
                viewtickets.FilterGrid(searchfilter,"");
                viewtickets.PopulateTicketFilters();
            } else {
                window.location.href = "index.php?fuse=support&view=ViewTickets&searchfilter="+searchfilter;
            }
        }

        $(document).ready(function() {
            $('#searchquerytextfield').focus(function() {
                 $('#searchquerytextfield').val('');
                 $('#searchquerytextfield').css("color","white");
            });

            /*show any messages provided from actions performed*/
            <?php $alertMsg =""; if (count($this->gMessages)>0) { ?>
                <?php foreach ($this->gMessages as $message) {
                    $alertMsg .= addslashes($message)." ";
                } ?>
            <?php } ?>

            <?php if (count($this->gErrorMessages)>0) { ?>
                <?php foreach ($this->gErrorMessages as $message) {
                    $alertMsg .= addslashes($message)." ";
                } ?>
            <?php } ?>

            <?php
                if ( ($alertMsg!="") && (count($this->gErrorMessages)>0) ) {
                    echo "ce.errormsg('".addslashes($alertMsg)."');";
                } else if ($alertMsg!="") {
                    echo "ce.msg('".addslashes($alertMsg)."');"; 
                }
            ?>

        });
    //-->
    </script>

    <script type="text/javascript">
      var uservoiceOptions = {
        key: 'supportexec',
        host: 'feedback.clientexec.com',
        forum: '93655',
        lang: 'en',
        showTab: false
      };
      function _loadUserVoice() {
        var s = document.createElement('script');
        s.src = ("https:" == document.location.protocol ? "https://" : "http://") + "cdn.uservoice.com/javascripts/widgets/tab.js";
        document.getElementsByTagName('head')[0].appendChild(s);
      }
      _loadSuper = window.onload;
      window.onload = (typeof window.onload != 'function') ? _loadUserVoice : function() { _loadSuper(); _loadUserVoice(); };
    </script>

  </body>
</html>
