$versions{'header_footer_mgr.pl'} = '06.6.00.0000';

# Contains all sub routines (functions) for the headers and
# footers that the store admin/manager uses.

#######################################################################
#
# AgoraCart and all associated files, except where noted, are
# Copyright 2001 to Present jointly by K-Factor Technologies, Inc.
# and by C E Mayo (aka Mister Ed) at AgoraCart.com & K-Factor.net
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at

# http://www.apache.org/licenses/LICENSE-2.0

# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# This copyright notice may not be removed or altered in any way.
#
#######################################################################

sub dash66_manager_footer_code {
    # future feature
}

#######################################################################

sub std_manager_footer_code {
    local ($text);
    $text = <<ENDOFTEXT;
</div><!-- END content inside main -->
</div><!-- END main div -->
</div><!-- END container-fluid -->
<footer class="footer row copyright col-xs-12 col-sm-12 col-md-12 col-lg-12 navbar-fixed-bottom">
<div class="col-xs-0 col-sm-4 col-md-3 col-lg-3"></div>
<div class="col-xs-12 col-sm-8 col-md-9 col-lg-9">
<p>&copy; Copyright 2001 to 2020 by CE Mayo, "Mister Ed" and K-Factor Technologies Inc. at <a class="copybuttons" href="https://agoracart.com" target="_blank">AgoraCart.com</a> &
<a class="copybuttons" href="https://k-factor.net" target="_blank">K-Factor Technologies, Inc.</a></p>
</div>
</footer>
ENDOFTEXT

    codehook( 'manager_footer_code' );
    $text .= qq{
    <script src="assets/jquery-3.x.slim.min.js"></script>
    <script src="assets/bootstrap-3.3.7.min.js"></script>
    <script src="assets/jquery-ui.min.js"></script>
    <!-- IE10 viewport hack for Surface/desktop Windows 8 bug -->
    <script src="assets/ie10-viewport-bug-workaround.js"></script>
    <script src="assets/offcanvas.js"></script>
    <script src="assets/opt_ins.js"></script>
</body>\n</html>\n};
    return $text;
}

#######################################################################

sub dash66_manager_header_code {
    # future feature
}

#######################################################################

sub std_manager_header_code {
    local ( $ztitle, $header_code, $body_tag, $messages, $err_msgs ) = @_;
    local ($my_header);
    local ($errs) = html_eval_settings();

    $title = 'AgoraCart Community Version Store Manager';
    if ( $ztitle ) {
        $title .= ' - ' . $ztitle;
    }
    if ( $body_tag eq '' ) {
        $body_tag = $mc_standard_body_tag;
    }

    my $temp_manager_cgi_version = "$versions{'manager.cgi'}";
    $temp_manager_cgi_version =~ s/Gold//i;
    $mgr_session_length_message =~ s/\[\[mcsessiontimesetting\]\]/$mc_session_time_setting/;

    $my_header = <<ENDOFTEXT;
    <!DOCTYPE html>
    <html lang="en">
    <head>
    <title>$title</title>

$header_code

    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <!-- Bootstrap core CSS -->
    <link href="assets/jquery-ui.min.css">
    <link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
    <link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet" integrity="sha384-wvfXpqpZZVQGK6TAh5PVlGOfQNHSoD2xbE+QkPxCAFlNEevoEH3Sl0sibVcOQVnN" crossorigin="anonymous">

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

    <link rel='icon' href='favicon.ico' type='image/x-icon'>

    <!-- Custom styles for this template -->
    <link href="assets/agc_mgr2.css" rel="stylesheet">

    <style>
    /* ~~~ Copyright ~~~ */
    .copyright{
        background: url($imageURLthingy/background.gif);
    }


    /* ~~~ BEGIN Header  ~~~ */
    #header {
        background: url($imageURLthingy/background.gif);
    }
    /* ~~~ END Header ~~~ */

    #sortable-4, #sortable-Zone1, #sortable-Zone2,
    #sortable-Zone3, #sortable-Zone4 li, #sortable-Zone5,
    #sortable-Zone6, #sortable-Zone7, #sortable-Zone9, #sortable-ZoneHome {
        list-style-type: none;
        margin: 0;
        border: 1px solid #000;
        padding-top: 20px;
        padding-bottom: 20px;
        padding-left: 5px;
        padding-right: 15px;
        width: 100%;
        border-radius:6px;
        -moz-border-radius:6px;
        box-shadow: 3px 6px #c0c0c0;
    }
    #sortable-4 li, #sortable-Zone1 li, #sortable-Zone2 li,
    #sortable-Zone3 li, #sortable-Zone4 li, #sortable-Zone5 li,
    #sortable-Zone6 li, #sortable-Zone7 li, #sortable-Zone9 li, #sortable-ZoneHome li {
        margin: 5px; padding: .25em;
        padding-left: 1em; border: 1px solid #DDDDDD; width: 100%; font-weight: bold;}
    .highlight {
       font-weight: bold;
       font-size: 20px;
       background-color: #c0c0c0;
    }
</style>

</head>
<body $body_tag>

<nav class="navbar navbar-default navbar-fixed-top">
  <div id="header" class="container-fluid">
      <div id="logo">
          <a href="https://AgoraCart.com" target="_new"><img src="$imageURLthingy/Agora-logo-white2.gif" width="286" height="55" border="0" alt="AgoraCart eCommerce Shopping Cart System"></a>
      </div>
      <div id="left_top" class="hidden-xs hidden-sm">
           <img src="$imageURLthingy/header.gif" width="534" height="72" border="0" alt="AgoraCart eCommerce Shopping Cart System">
      </div>
  </div>
  <div class="container-fluid mgr-bar-width mgr-bar-back">
    <div class="navbar-header mgr-bar-back">
      <button type="button" class="navbar-toggle collapsed mgr-header-clpse-btn" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
        <span class="sr-only">Toggle navigation</span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
      </button>
      <a class="navbar-brand hidden-xs"><font id="top_product">Route 66</font><font id="top_version">Community Version $temp_manager_cgi_version ($sc_mgr_upgrade_tier tier)</font></a>
      <a class="navbar-brand visible-xs"><font id="top_product">AgoraCart</font><font id="top_version"> $temp_manager_cgi_version</font></a>
    </div>
    <div id="navbar" class="navbar-collapse collapse ">
      <ul class="nav navbar-nav navbar-right">
        <li><a href="$sc_store_url" target="_blank">View Your Store</a></li>
        <li><a href="manager.cgi?mgr_seshun=$mgr_seshun&log_out=yes">Log Out</a></li>
      </ul>
    </div><!--/.nav-collapse -->
  </div>
</nav>

<div class="container-fluid">
    <div class="row row-leftoffcanvas row-leftoffcanvas-left">
         <div class="col-xs-6 col-sm-4 col-md-3 col-lg-3 sidebar-leftoffcanvas sidebar">
           <ul class="nav nav-sidebar">
             <li><a href="manager.cgi?mgr_seshun=$mgr_seshun&login_screen=yes">
                 <i class="fa fa-lg fa-home left_mgr_menu_icon"></i>
                 <span class="left_mgr_menu_link hidden-xs hidden-sm">&nbsp; Home</span>
                 <span class="left_mgr_menu_link hidden-md hidden-lg">&nbsp; Home</span></a>
             </li>
             <li><a href="manager.cgi?mgr_seshun=$mgr_seshun&order_log=yes">
                 <i class="fa fa-lg fa-cart-plus fa-spin left_mgr_menu_icon left_mgr_menu_icon_hot"></i>
                 <span class="left_mgr_menu_link hidden-xs hidden-sm">&nbsp; View New Orders</span>
                 <span class="left_mgr_menu_link hidden-md hidden-lg">&nbsp; New Orders</span></a>
             </li>
             <li><a href="manager.cgi?mgr_seshun=$mgr_seshun&order_management_settings_screen=yes">
                 <i class="fa fa-lg fa-shopping-cart left_mgr_menu_icon left_mgr_menu_icon_green1"></i>
                 <span class="left_mgr_menu_link hidden-xs hidden-sm">&nbsp; Order Logs &amp; Sales</span>
                 <span class="left_mgr_menu_link hidden-md hidden-lg">&nbsp; Order Logs</span></a>
             </li>
             <li><a href="manager.cgi?mgr_seshun=$mgr_seshun&store_performance_metrics=yes">
                 <i class="fa fa-lg fa-tachometer left_mgr_menu_icon2"></i>
                 <span class="left_mgr_menu_link hidden-xs hidden-sm hidden-md">&nbsp; Performance &amp; Metrics</span>
                 <span class="left_mgr_menu_link hidden-lg">&nbsp; Store Metrics</span></a>
             </li>
             <li><a href="manager.cgi?mgr_seshun=$mgr_seshun&edit_screen=yes">
                 <i class="fa fa-lg fa-pencil left_mgr_menu_icon"></i>
                 <span class="left_mgr_menu_link">&nbsp; Edit Products</span></a>
             </li>
             <li><a href="manager.cgi?mgr_seshun=$mgr_seshun&add_screen=yes">
                 <i class="fa fa-lg fa-plus left_mgr_menu_icon left_mgr_menu_icon_green1"></i>
                 <span class="left_mgr_menu_link">&nbsp; Add Products</span></a>
             </li>
             <li><a href="manager.cgi?mgr_seshun=$mgr_seshun&delete_screen=yes">
                 <i class="fa fa-lg fa-scissors left_mgr_menu_icon2"></i>
                 <span class="left_mgr_menu_link hidden-xs hidden-sm">&nbsp; Delete Products</span>
                 <span class="left_mgr_menu_link hidden-md hidden-lg">&nbsp; Delete Prod.</span></a>
             </li>
             <li><a href="manager.cgi?mgr_seshun=$mgr_seshun&content_management_settings_screen=yes">
                 <i class="fa fa-lg fa-file-code-o left_mgr_menu_icon"></i>
                 <span class="left_mgr_menu_link hidden-xs hidden-sm">&nbsp; Templates &amp; Content</span>
                 <span class="left_mgr_menu_link hidden-md hidden-lg">&nbsp; Temp &amp; Content</span></a>
             </li>
             <li><a href="manager.cgi?mgr_seshun=$mgr_seshun&change_settings_screen=yes">
                 <i class="fa fa-lg fa-cog fa-spin left_mgr_menu_icon left_mgr_menu_icon_gray"></i>
                 <span class="left_mgr_menu_link">&nbsp; Store Settings</span></a>
             </li>
             <li><a href="manager.cgi?mgr_seshun=$mgr_seshun&error_log=yes">
                 <i class="fa fa-lg fa-exclamation-triangle left_mgr_menu_icon left_mgr_menu_icon_dkyellow"></i>
                 <span class="left_mgr_menu_link">&nbsp; Error Log</span></a>
             </li>
             <li><a href="manager.cgi?mgr_seshun=$mgr_seshun&display_HelpTools_screen=yes">
                 <i class="fa fa-lg fa-info-circle left_mgr_menu_icon"></i>
                 <span class="left_mgr_menu_link">&nbsp; Info & Help</span></a>
             </li>
             <li><a href="manager.cgi?mgr_seshun=$mgr_seshun&display_AgoraCart_Updates_screen=yes">
                 <i class="fa fa-lg fa-list  left_mgr_menu_icon"></i>
                 <span class="left_mgr_menu_link">&nbsp; AgoraCart To Do Lists</span></a>
             </li>
           </ul>
           <br><br><br>
           <div id="hotscripts" style="padding-left: 30px;">
                <a href="http://www.hotscripts.com/rate/11562/?RID=4267" title="Rate our Script at Hot Scripts" target="_blank" style="display: block; width: 88px; height: 31px;"><img src="$imageURLthingy/btn_88x31-2.gif" alt="Vote for us on Hot Scripts" style="border: 0;"></a>
          </div>
          <br><br>
          <p style="padding: 20px;"><font color="#FF0000">$mgr_session_length_message</font></p>
         </div>
         <div class="row row-offcanvas-right col-sm-offset-4 col-md-offset-3 col-lg-offset-3 main">
           <div class="col-xs-12 col-sm-12 col-md-12 col-lg-12">
              $manager_menu
              $errs
              $messages
              <p class="pull-left visible-xs">
                <button type="button" class="btn btn-primary btn-xs" data-toggle="leftoffcanvas">Toggle nav</button>
              </p>
              $mgr_loaded_libs
ENDOFTEXT

    return $my_header;
}

#######################################################################

1;
