ok

Mini Shell

Direktori : /proc/self/root/proc/thread-self/root/proc/self/root/home2/selectio/www/vijay-gases/
Upload File :
Current File : //proc/self/root/proc/thread-self/root/proc/self/root/home2/selectio/www/vijay-gases/header.php

    <?php 
	ob_start();
	session_start();
	$base_url=""; 
	$assets="assets/";
	$error=0;$warning=0;$message=0;
	$site_name=$_SESSION['setting']['name'];
	$current_page=basename($_SERVER['PHP_SELF']);
	include"config/config.php";
	
	$logo=$_SESSION['setting']['logo'];
	$theme_color="#3c8dbc;";
	$theme_text_color="color:#10152e;";
	
	if(!isset($_SESSION['vijay_gases'])) {
		header('location: login.php'); 
		exit;
	}
	
	
	$session_id = $_SESSION['vijay_gases']['id'];
	?>
<html>
	<head>
		<meta charset="UTF-8">
		<title>Dashboard | <?=$site_name?></title>
		<link rel="shortcut icon" href="images/icon.png"/>
		<meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
		<link href="<?= $assets ?>dist/css/styles.css" rel="stylesheet" type="text/css" />
		<script src="<?= $assets ?>plugins/jQuery/jQuery-2.1.4.min.js"></script>
		<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
		<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.10.5/font/bootstrap-icons.css">
	</head>
	<style>
		.center-screen {
		display: flex;
		justify-content: center;
		align-items: center;
		text-align: center;
		min-height: 100vh;
		}
		
		table.table tbody tr:hover td {
        background-color: #abe2eb !important;
    }
    
    	    @media only screen and (min-width: 998px){
                body.pos1 {
                    min-width: 1024px;
                    overflow: visible;
                }
                .pos1 {
                    min-width: 1020px;
                }
            }
            
            
            @media screen and (min-width: 1200px) {
              .content-wrapper, .main-footer, .right-side {
                            margin-left: 162px;
            }
            }
            
            
            
            
	</style>
	<!-- Like POS -> skin-blue sidebar-collapse sidebar-mini pos1-->
	<!--skin-green sidebar-collapse sidebar-mini pos-->
	<!--<body class="skin-blue fixed sidebar-mini" style="background:white;">-->
	<!--skin-blue fixed sidebar-mini sidebar-collapse-->
	<style>
	    /*@media only screen and (max-width: 998px){
            body.pos {
    min-width: 1024px;
    overflow: visible;
        }
            }
        }*/
	</style>
	
	<?php
    if($current_page=="bookings-create.php" || $current_page=="bookings-update.php" || $current_page=="bookings-passenger-info.php" || $current_page=="bookings-list.php" || $current_page=="booking-tickets-list.php")
    {
        $class="skin-blue sidebar-collapse sidebar-mini pos1";
    }else{
        $class="skin-blue fixed sidebar-mini";
    }
	?>
	<body class="skin-blue sidebar-collapse sidebar-mini pos1" style="background:white;">
		<div class="wrapper rtl rtl-inv">
		<header class="main-header">
			<a href="<?=$base_url?>" class="logo" style="background-color:<?=$theme_color?>">
			<span class="logo-mini"><b>VG</b></span>
			<span class="logo-lg"><b><?=$site_name?></b></span>
			</a>
			<nav class="navbar navbar-static-top" role="navigation">
				<a href="#" class="sidebar-toggle" data-toggle="offcanvas" role="button">
				<span class="sr-only">Toggle navigation</span>
				<span class="icon-bar"></span>
				<span class="icon-bar"></span>
				<span class="icon-bar"></span>
				</a>
				<div class="navbar-custom-menu">
					<ul class="nav navbar-nav">
					    
					    
					    <?php if($_SESSION['vijay_gases']['id']!=1){ ?>
    						<!--<li class="hidden-xs" id="checkin_li" style="display: none;">
    							<a href="ownattendance.php"  class="blinking" data-toggle="tooltip" data-placement="bottom" title="Checkin Now"><i  style="background: green;padding: 3px;border-radius: 7px 7px 7px 7px;" class="fa fa-check"></i><span class="label label-warning" id="alert_checkin"></span> Click here to Checkin</a>
    						</li>
    						<li class="hidden-xs" id="checkout_li" style="display: none;">
    							<a href="ownattendance.php"  class="blinking" data-toggle="tooltip" data-placement="bottom" title="Checkin Now"><i  style="background: red;padding: 3px;border-radius: 7px 7px 7px 7px;" class="fa fa-check"></i><span class="label label-warning" id="alert_checkout"></span> Click here to Check Out</a>
    						</li>-->
						<?php }?>
						
						<li class="hidden-xs hidden-sm"><a href="#" style="padding: 15px 0px;"><?=date('d-m-Y')?></a></li>
						<li class="hidden-xs hidden-sm"><a href="#" style="padding: 15px 10px;" class="clock"></a></li>
						
						<!-- Notifications Starts Here -->
						
<li class="dropdown user user-menu" style="padding-right:10px;">
<button type="button" class="icon-button dropdown-toggle" data-toggle="dropdown">
    <span class="material-icons"><i class="fa fa-bell"></i></span>
    <!-- Icon Count Starts Here -->
    
    
                     <?php 
                     
                     $sql = "SELECT 
    tbl_product.id as product_id, tbl_product.cylinder_no, tbl_product.product_type, tbl_gas.gas_name, tbl_customer.customer_name, tbl_sell.sell_date, tbl_customer.mobile_number,
    DATEDIFF(NOW(), tbl_sell.sell_date) AS days_difference
    FROM `tbl_product` 
    INNER JOIN tbl_sell_items ON tbl_sell_items.product_id=tbl_product.id 
    INNER JOIN tbl_sell ON tbl_sell.id=tbl_sell_items.sell_id 
    INNER JOIN tbl_gas ON tbl_gas.id=tbl_product.product_name 
    LEFT JOIN tbl_customer ON tbl_customer.id=tbl_product.customer_id 
    WHERE 
    tbl_sell_items.type=2";
    
    
    
                        $statement = $pdo->prepare($sql);
                        $statement->execute();
                        $datas_count = $statement->rowCount();
                        $query = $statement->fetchAll(PDO::FETCH_ASSOC);
                        $counts_expiry_cylinder = 0;
                        
                        if($datas_count!=0){
                                foreach($query as $data){ 
                                    
                                    $currentDate = date('Y-m-d');
                                    $sell_date = $data['sell_date'];
                                    $Expiry_Date = date('Y-m-d', strtotime($sell_date . ' +30 days'));
                                    
                                    if ($currentDate>=$Expiry_Date) {
                        	            $counts_expiry_cylinder++;
                                    }
                                }
                        }
?>
                            <span class="icon-button__badge"><?=$counts_expiry_cylinder?></span>
    <!-- Icon Count Ends Here -->
                
</button>
<div class="dropdown-menu" style="margin-top: 6px;border: 1px solid #afa4a4;border-radius: 6px;background: #e8f1ee;">
<div style="padding: 0px 0px 0px 12px;">
    <h4 style="color: black; font-weight: 600;">Notifications (<?=$counts_expiry_cylinder?>)</h4>
</div>

<div class="scrollable-menu">
<?php
    
    $statement = $pdo->prepare($sql);
    $statement->execute();
    $datas_count = $statement->rowCount();
    $query = $statement->fetchAll(PDO::FETCH_ASSOC);
    
    if($datas_count!=0){
    
    
        foreach($query as $data){ 
            
            $currentDate = date('Y-m-d');
            $sell_date = $data['sell_date'];
            $Expiry_Date = date('Y-m-d', strtotime($sell_date . ' +30 days'));
            
            if ($currentDate>=$Expiry_Date) {
	?>
        
        
        <div class="alertt alert-success">
          <div class="text">
            <strong><i class="fa fa-dot-circle-o" style="font-size: 7px;vertical-align: middle;"></i>&nbsp;&nbsp;<?php echo "Customer Name"; ?>: <?=$data['customer_name']?></strong><br>
            <strong>
                <i class="bi bi-telephone"></i> <a href="tel:<?=$data['mobile_number']?>" style="color: white;"><?=$data['mobile_number']?></a>
                <span>&nbsp;&nbsp;&nbsp;&nbsp;<i class="bi bi-calendar-plus"></i>&nbsp;Days : <b><?=$data['days_difference']?></b></span>
            </strong>
            <p>
                <span class="btn btn-danger" style="padding: 0px 6px 0px 6px; font-size: 12px; font-weight: 700;">Sell Date: <?=date('d-m-Y', strtotime($data['sell_date']))?> </span> 
            
                <span class="btn btn-info" style="padding: 0px 6px 0px 6px; font-size: 12px; font-weight: 700;">Cylinder No: <?=$data['cylinder_no']?> </span> 
          </div>
        </div>
        
        
<?php  }}}else{  ?>


        <div class="alertt alert-danger">
          <div class="text">
            <strong><i class="fa fa-times"></i> No Data Found</strong>
          </div>
        </div>
        
        
<?php  }  ?>

<!--<div style="padding: 8px;">
    <center style="color: black; font-weight: 500;"><a href="notifications.php">Show All</a></center>
</div>-->

</div>
</div>
</li>
<!-- Notifications Endss Here -->
						
						
						
						<?php if($_SESSION['vijay_gases']['id']==1){ ?>
    						<li class="hidden-xs">
    							<a href="bookings-list.php" data-toggle="tooltip" data-placement="bottom" title="Today Bookings"><i class="fa fa-bell-o"></i><span class="label label-warning" id="today_bookings_count"></span></a>
    						</li>
						<?php }?>
						
						
						
						<li class="dropdown user user-menu" style="padding-right:5px;">
							<a href="#" class="dropdown-toggle" data-toggle="dropdown">
							<img src="<?=$_SESSION['setting']['logo']?>" class="user-image" alt="Avatar" style="background: white;"/>
							<span class="hidden-xs"><?=$_SESSION['vijay_gases']['username']?></span>
							</a>
							<ul class="dropdown-menu" style="padding-right:3px;">
								<li class="user-header">
									<img src="<?=$_SESSION['setting']['logo']?>" alt="Avatar" style="width: 220px;border:0px;" />
									<p>
										<?=$_SESSION['vijay_gases']['username']?>  <small></small>
									</p>
								</li>
								<li class="user-footer">
									<div class="pull-left">
										<!--<a href="profile.php" class="btn btn-warning btn-sm"><i class="fa fa-user" aria-hidden="true"></i> Profile</a>-->
									</div>
									<div class="pull-right">
										<a href="logout.php" class="btn btn-danger btn-sm "><i class="fa fa-sign-out" aria-hidden="true"></i> Sign Out</a>
									</div>
								</li>
							</ul>
						</li>
					</ul>
				</div>
			</nav>
		</header>
		
		<aside class="main-sidebar" >
			<section class="sidebar">
				<ul class="sidebar-menu">
				    
				    <!-- Dashboard Starts Here -->
					<li class="mm_welcome <?php if($current_page=="index.php"){echo "active";}?>">
					    <a href="index.php"><i class="fa fa-dashboard"></i> &nbsp; <span>Dashboard</span></a>
					</li>
					<!-- Dashboard Endss Here -->
				
<!-- Admin Login Starts Here -->
<?php if($_SESSION['vijay_gases']['id']==1 || 1==1){ ?>

                <!-- Products Starts Here -->
				    <li class="mm_welcome <?php if($current_page=="product.php" || $current_page=="product-add.php"){echo "active";}?>">
				        <a href="product.php"><i class="bi bi-pass-fill"></i> &nbsp; <span>Product</span></a>
				    </li>
				<!-- Products Endsss Here -->
				
                <!-- Users Starts Here -->
				    <li class="mm_welcome <?php if($current_page=="users.php" || $current_page=="users-add.php"|| $current_page=="users-edit.php"){echo "active";}?>">
				        <a href="users.php"><i class="bi bi-people-fill"></i> &nbsp; <span style="color:white">Users</span></a>
				    </li>
				<!-- Users Endsss Here -->
				
				<!-- Create Customer Starts Here--> 
					<li class="mm_welcome <?php if($current_page=="customer.php" || $current_page=="customer-add.php"){echo "active";}?>">
					    <a href="customer.php"><i class="bi bi-clipboard-plus-fill"></i> &nbsp; <span>Customers</span></a>
					</li>
				<!-- Create Customer Ends Here--> 
				
				
				
				<!-- Supplier Starts Here -->
					<li class="mm_welcome <?php if($current_page=="supplier-add.php" || $current_page=="supplier.php"){echo "active";}?>">
					    <a href="supplier.php"><i class="bi bi-people-fill"></i> &nbsp; <span>Purchaser List</span></a>
					</li>
				<!-- Supplier Enddss Here -->
				
				
				
				
				
				<!-- Purchase Starts Here -->
				    <li class="mm_welcome <?php if($current_page=="purchase.php" || $current_page=="purchase-add.php"){echo "active";}?>">
				        <a href="purchase.php"><i class="bi bi-check2-square"></i> &nbsp; <span>Purchase Add</span></a>
				    </li>
				<!-- Purchase Endsss Here -->
				
					<!-- Sell Starts Here -->
				    <li class="mm_welcome <?php if($current_page=="sales.php" || $current_page=="sale-add.php"){echo "active";}?>">
				        <a href="sales.php"><i class="bi bi-check2-square"></i> &nbsp; <span>Sell</span></a>
				    </li>
				<!-- Sell Endsss Here -->

			
				
				<!---Reports Section Ends here ---------->
				    <li class="mm_welcome <?php if($current_page=="cylinder-report.php"){echo "active";}?>">
				        <a href="cylinder-report.php"><i class="bi bi-check2-square"></i> &nbsp; <span>Reports</span></a>
				    </li>
				
				<!---Reports Section Ends here ---------->
				
				
				
				
			  
				
			
<?php } ?>			
<!-- Admin Login Endss Here -->

<!-- Notifications Starts Here -->
    <!--<li class="mm_welcome <?php if($current_page=="notifications.php"){echo "active";}?>"><a href="notifications.php"><i class="fa fa-bell"></i> <span>Notifications</span></a></li>-->
<!-- Notifications Ends Here -->


<!-- Gas Type Starts Here -->
<?php if($_SESSION['vijay_gases']['id']==1){ ?>
    <li class="mm_welcome <?php if($current_page=="create-gas-type.php" || $current_page=="gas-type.php"){echo "active";}?>">
	    <a href="gas-type.php"><i class="bi bi-people-fill"></i> &nbsp; <span>Gas Type</span></a>
	</li>
<?php } ?>
<!-- Gas Type Enddss Here -->
				
				

<!---GST Section Starts here ---------->
<?php if($_SESSION['vijay_gases']['id']==1){ ?>
    <li class="mm_welcome <?php if($current_page=="gst.php"){echo "active";}?>">
        <a href="gst.php"><i class="bi bi-check2-square"></i> &nbsp; <span>Gst</span></a>
    </li>
<?php } ?>
<!---GST Section Ends here ---------->


<!---GST Section Starts here ---------->
<?php if($_SESSION['vijay_gases']['id']==1){ ?>
    <li class="mm_welcome <?php if($current_page=="location.php"){echo "active";}?>">
        <a href="location.php"><i class="bi bi-check2-square"></i> &nbsp; <span>Location</span></a>
    </li>
<?php } ?>

<!---GST Section Ends here ---------->












<!-- Agent Login Starts Here -->
<?php if($_SESSION['vijay_gases']['usertype_id']==2){	?>
                <!-- Create Bookings Starts Here--> 
				    <li class="mm_welcome <?php if($current_page=="bookings-create.php" || $current_page=="bookings-update.php" || $current_page=="bookings-passenger-info.php"){echo "active";}?>">
					    <a href="bookings-create.php"><i class="bi bi-clipboard-plus-fill"></i> &nbsp; <span>Create Bookings</span></a>
					</li>
				<!-- Create Bookings Starts Here--> 
				
				
				<!-- Bookings History & Details Starts Here -->
				    <li class="mm_welcome <?php if($current_page=="bookings-list.php"){echo "active";}?>">
					    <a href="bookings-list.php"><i class="bi bi-people-fill"></i> &nbsp; <span>Bookings History</span></a>
					</li>
				<!-- Bookings History & Details Enddss Here -->
				
				<!-- PNR Number Starts Here--> 
        				<li class="mm_welcome <?php if($current_page=="pnr-search.php"){echo "active";}?>">
    					    <a href="pnr-search.php"><i class="bi bi-folder-check"></i> &nbsp; <span>PNR Number</span></a>
    					</li>
    			<!-- PNR Number Endsss Here--> 
				
				
				<!-- Trackings Starts Here -->
				    <li class="mm_welcome <?php if($current_page=="tracking.php"){echo "active";}?>">
				        <a href="tracking.php"><i class="bi bi-geo-alt-fill"></i> &nbsp; <span>Tracking</span></a>
				    </li>
				<!-- Trackings Endsss Here -->


<?php } ?>
<!-- Agent Login Endss Here -->



					
			</ul>
			</section>
		</aside>
		<script>
			/*setInterval(function(){ 
			    $.ajax({
			            url: 'api/api-leave-requesting.php',
			            type: 'post',
			            data: {type:'error_log'},
			            dataType: 'json',
			             success:function(response){
			                 $('#leave_requesting_count').empty();
			               if(response[0]['count']!=0){ $('#leave_requesting_count').text(response[0]['count']);}
			               
			               
			               if(response[0]['counts']==1){
			                   $('#checkin_li').hide();
			                   $('#checkout_li').show();
			               }else{
			                   $('#checkin_li').show();
			                   $('#checkout_li').hide();
			               }
			               
			            }
			    
			        });    
			}, 500);*/
		</script>
		<style>
			.blinking{
			animation:blinkingText 1.0s infinite;
			}
			@keyframes blinkingText{
			0%{		color: green;	}
			40%{	color: yellow;	}
			50%{	color: pink;	}
			99%{	color:red;	}
			100%{	color: #000;	}
			}
		</style>
		<script>
			$( document ).ready(function() {
			       $('.float-numbers').keypress(function(event) {
			        if ((event.which != 46 || $(this).val().indexOf('.') != -1) && (event.which < 48 || event.which > 57)) {
			            event.preventDefault();
			        }
			    });
			});
			   
		</script>
<style>
    .scrollable-menu {
    height: auto;
    max-height: 230px;
    overflow-x: hidden;
}
.icon-button {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 35px;
    height: 35px;
    color: #333333;
    background: #dddddd;
    border: none;
    outline: none;
    border-radius: 50%;
    margin-top: 9px;
}
.icon-button__badge {
    position: absolute;
    top: -7px;
    right: -10px;
    width: 23px;
    height: 23px;
    background: red;
    color: #ffffff;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
    font-weight: 900;
}
.alertt {
    border-radius: 0px;
    margin-bottom: 0px;
    padding: 10px 5px 5px 10px;
    border-bottom: 1px solid lightgray;
}
@media (max-width: 767px){
.skin-blue .main-header .navbar .dropdown-menu li a {
    color: black;
}
}
</style>

Zerion Mini Shell 1.0