<?

$_SESSION['mod'] = 32;
?><!DOCTYPE html>
<html lang="en" xml:lang="en">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<link rel="icon" type="image/x-icon" href="<?=SERVER_ROOT?>public/assets/images/login/erp_favicon-32x32.png"> 

<title><?='Procurement '?></title>

<?
require_once SERVER_ROOT."public/assets/js/inc.all.js.php";
require_once SERVER_ROOT."public/assets/css/inc.all.css.php";

?>


</head>
<body>

<div class="wrapper" style=" background-color: #ffffff;">
			<div class="body_box">
                <?php
                $sql = "SELECT * FROM config_template WHERE status=1";
                $template = db_query($sql);
                $temp = mysqli_fetch_object($template);

                if($temp->template_id==1){?>

                    <style type="text/css">

                        .silverheader,.submenu{
                            text-align: left !important;
                        }
                        .menu_bg{
                            margin-top:0px !important;
                        }
                        .page_title{
                            border-radius: 5px;
                            background: transparent;
                            border: 0px;
                            float: left;
                            top: 3px;
                            margin-bottom: 15px;
                        }

                        .breadcrumb {
                            background-color: transparent;
                            border: none;
                            padding: 9px 13px;
                            margin-bottom: 0px;
                            padding-left: 0;
                            padding-bottom: 0;
                        }

                        .ol{
                            list-style-position: outside;
                            padding-left: 22px;
                        }

                        ol, ul {
                            margin-top: 0;
                            margin-bottom: 10px;
                        }

                        * {
                            -webkit-box-sizing: border-box;
                            -moz-box-sizing: border-box;
                            box-sizing: border-box;
                        }
               
                        ol {
                            display: block;
                            list-style-type: decimal;
                            margin-block-start: 1em;
                            margin-block-end: 1em;
                            margin-inline-start: 0px;
                            margin-inline-end: 0px;
                            padding-inline-start: 40px;
                        }

                        .sidebar::before, .off-canvas-sidebar nav .navbar-collapse::before{
                            height:auto!important;
                        }

                        @media only screen and (max-width: 1023px) {
                            .main_content {
                                position: relative;
                                float: left;
                                width: 100%;
                            }
                            .sidebar{width:50%;}
                        }


                        @media only screen and (max-width: 3000px) {
                            .main_content{
                                position: relative;
                                float:right;
                                width: 83%;
                            }

                            .sidebar{width:17%;}
                        }

                        .sidebar::-webkit-scrollbar {
                            width: .2em;
                            height: .0em;
                        }

                        .sidebar::-webkit-scrollbar-track {
                            box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.3);
                        }

                        .sidebar::-webkit-scrollbar-thumb {
                            background-color: green;
                            outline: 1px solid slategrey;
                        }

                        .sidebar{
                            height:100%; overflow:scroll;scrollbar-width: none;
                            background: white !important;

                        }

                        .main_content{
                            position: relative; float: right;
                        }

                        #collapse_sidebar{
                            display: none;
                        }

                        @media only screen and (max-width: 991px)  {
                            .main_content{
                                width: 100% !important;
                            }
                            .navbar-brand{
                                margin-left: 50px !important;
                            }
                            .navbar .navbar-toggler{
                                margin-top:7px;
                                z-index: 1000;
                                background: #c5c5d2;
                                color: white;
                                padding: 5px;
                            }

                        }

                        @media only screen and (max-width: 700px)  {
                            #user-settings-overlay{
                                display: none !important;
                            }

                            #clock{
                                display: none !important;
                            }

                            #avatar-upload{
                                display: none !important;
                            }
                            .help_tooltip{
                                display: none !important;
                            }

                            .sidebar{
                                width: 260px !important;
                            }

                        }

                        @media only screen and (min-width: 992px)  {
                            .sidebar{
                                width: 17% !important;
                            }

                            .main_content{
                                width: 83% !important;
                            }
                        }

                        .nav-open .sidebar{
                            left:0px !important;
                            z-index: 10;
                        }

                    </style>

                    <div class="sidebar" style=" height:100%; overflow:scroll; scrollbar-width: none;" >
                        <div class="title-image text-center" style="padding: 5px;">
                            <span class="title-image text-center" style="padding: 5px;">
                                <img alt="this is img" src="../../../logo/<?=$_SESSION['user']['group']?>.png" style="width:65%;"></span>
                            <? include_once("../../../controllers/routing/main_layout_menu.php");?>
                        </div>
                    </div>


                <?php
                }

                elseif($temp->template_id==2){?>
				<style>
					#collapse_sidebar {
						display: none;
					}
				</style>

			

                <?php
                }
				
                elseif($temp->template_id==3){?>
						<? include_once("../../../controllers/routing/main_layout_menu3.php");?>


                <?php
                }

                else{

                        echo "No records matching.";
                    }
                ?>

            
			
		
							
				<?php  if($temp->template_id==3){?>
				
				<style>
					.all-bg {
						background: #fbfbfb;
						padding: 15px 10px;
						border-radius: 10px;
					}
				</style>
				
				<div class="main_content" style=" width: 100%; ">
				
                            <div class="sr-main-content">

                                <div class="sr-main-content-padding pt-3">
								     <div class="container-fluid pt-3 all-bg">
										<?=$main_content?>
									</div>
					
                                </div>
                            </div>
                        </div>
				
				
                <?php
                }
				
                else{
					?>
                        
						<div class="main_content"  style="position: relative; width:100%; float: right;">
<? require_once "../../../controllers/routing/inc.header.php"; ?>		  

<div class="sr-main-content">

<div class="sr-main-content-padding pt-4">

 <?=$main_content?>

      <nav class="navbar navbar-expand-lg navbar-transparent navbar-absolute fixed-top ">
<div class="container-fluid">
          <button class="navbar-toggler" type="button" data-toggle="collapse" aria-controls="navigation-index" aria-expanded="false" aria-label="Toggle navigation">
            <span class="sr-only">Toggle navigation</span>
            <span class="navbar-toggler-icon icon-bar"></span>
            <span class="navbar-toggler-icon icon-bar"></span>
            <span class="navbar-toggler-icon icon-bar"></span>
          </button>
        </div>
      </nav>

    
	</div>
</div>
    </div>
						
				<?  }   ?>

				 
				 	










</div>
</div>
</div>
</div>

<script>
    const currentLocation = location.href;
    const menuItem = document.querySelectorAll('.dashboard1-nav-dropdown-menu a');

    const menuLength = menuItem.length
    var element = document.querySelector('.dashboard1-nav-dropdown');


    for (let i=0; i<menuLength; i++){
        if(menuItem[i].href === currentLocation){
            menuItem[i].classList.add('active1')

            var parentDiv = menuItem[i].parentNode;
            var parentDiv2 = parentDiv.parentNode;
            parentDiv2.classList.add('show')

        }
    }


</script>



 
 






  <script language="javascript">
var clock = new Vue({
    el: '#clock',
    data: {
        time: '',
        date: ''
    }
});

var months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'June', 'July', 'Aug', 'Sept', 'Oct', 'Nov', 'Dec'];
var week = ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'];
var timerID = setInterval(updateTime, 1000);
updateTime();
function updateTime() {
    var cd = new Date();
    clock.time =  zeroPadding(cd.getHours(), 2) + ' : ' + zeroPadding(cd.getMinutes(), 2) + ' : ' + zeroPadding(cd.getSeconds(), 2);
/   
    clock.date = week[cd.getDay()] + ','+' '+ zeroPadding(cd.getDate(), 2)+'.' + ' ' + months[cd.getMonth()] + ' ' + zeroPadding(cd.getFullYear(), 4);
};

function zeroPadding(num, digit) {
    var zero = '';
    for(var i = 0; i < digit; i++) {
        zero += '0';
    }
    return (zero + num).slice(-digit);
}
</script>


</body>
</html>