<?php 

	       $user=$this->session->userdata('secret_admin');

			$id=$user['id'];

			

			 $previous_week = strtotime("-1 week +1 day");



			$start_week = strtotime("last sunday midnight",$previous_week);

			$end_week = strtotime("next saturday",$start_week);

			$present_day = date("Y-m-d");

			$end_week = date("Y-m-d",$end_week);

          			

            $query="SELECT * FROM `position` WHERE `date` > '$end_week 00:00' AND `date` <  '$present_day 23:59' AND `notification` NOT LIKE '%$id,%' AND `status`='Open'";

			

			



			$data1=$this->db->query($query)->result_array(); 

			

			

			$query="SELECT * FROM `candidate` WHERE `date` > '$end_week 00:00' AND `date` <  '$present_day 23:59' AND `notification` NOT LIKE '%$id,%'";

			

			$data2=$this->db->query($query)->result_array();

?>



<!doctype html>

<html lang=en>

<head>

<meta http-equiv=Content-Type content="text/html; charset=utf-8">

<meta name=viewport content="width=device-width, initial-scale=1, maximum-scale=1">

<link href="<?= base_url('public/')?>images/fav.png" rel="shortcut icon" />

<title>Myrecruiter.in </title>

<link href="<?= base_url('public/')?>css/my-css.css" rel="stylesheet" type="text/css" />

<link href="<?= base_url('public/')?>css/bootstrap.min.css" rel="stylesheet" type="text/css" />

<link href="<?= base_url('public/')?>css/my-css.css" rel="stylesheet" type="text/css" />

<link href="https://fonts.googleapis.com/css?family=Montserrat:100i,200,200i,300,300i,400,400i,500,500i" rel="stylesheet">

<link href="<?= base_url('public/')?>css/ace-responsive-menu.css" rel="stylesheet" type="text/css" />

<link rel="stylesheet" type="text/css" href="<?= base_url('public/')?>css/easy-responsive-tabs.css " />

<link rel="stylesheet" type="text/css" href="<?= base_url('public/')?>css/dashboard.css " />



</head>



<body>



<div class="dashboardss">



<div class="container">



<div class="row">



<div class="col-md-4 col-xs-4"><a href="<?= base_url('admin')?>"><img src="<?= base_url('public/')?>images/the-hr-logo.png" width="230" height="51"></a></div>

<div class="col-md-4 col-xs-4">

    <h3 class="text-center">Boss Dashboard</h3>

</div>



<div class="col-md-4 col-xs-4"><div class="navbar-custom-menu dash-right">

<ul class="nav navbar-nav">



<li class="dropdown dropdown-settings" id="li">

<a href="#" class="dropdown-toggle bubbly-button" data-toggle="dropdown" id="a"> <i class="fa fa-bell-o"></i><span class="badge fadeAnim" id="notification_badge"><?= count($data1)+count($data2)?></span></a>

<div class="notification-box dropdown-menu animated bounceIn">

<!--<div class="notification-header">

<h4>2 new notifications</h4>

<a href="#">clear all</a>

</div>-->

<div class="notification-body">

<div class="slimScrollDiv" style="position: relative; overflow: hidden; width: auto; height: 251px; overflow:auto;"><ul class="notification_inner" style="overflow: hidden; width: auto; height: 251px;">





<?php if(empty($data1)){?>

<li><a href="#">No Jobs Notification</a>

</li>

<?php } ?>

<?php foreach($data1 as $p){ ?>

<li><a href="<?= base_url('Admin/positions/').$p['id']?>?msg=notification" class="single-notification"><div class="notification-img"><i class="fa fa-commenting"></i></div><div class="notification-txt"><h4><?=$p['position']?>  Job Added</h4><span></span></div></a></li>

<?php }?>



<?php if(empty($data2)){?>

<li><a href="#">No Candidate Notification</a>

</li>

<?php } ?>

<?php foreach($data2 as $c){ ?>

<li><a href="<?= base_url('Admin/candidates/').$c['id']?>?msg=notification" class="single-notification"><div class="notification-img"><i class="fa fa-commenting"></i></div><div class="notification-txt"><h4>Candidate Added This<?=$c['job_id']?></h4><span></span></div></a></li>

<?php }?>







</ul>

<div class="slimScrollBar" style="background: rgb(0, 0, 0); width: 3px; position: absolute; top: 0px; opacity: 0.4; display: block; border-radius: 7px; z-index: 99; right: 1px;"></div><div class="slimScrollRail" style="width: 3px; height: 100%; position: absolute; top: 0px; display: none; border-radius: 7px; background: rgb(51, 51, 51); opacity: 0.2; z-index: 90; right: 1px;"></div></div>

</div>

<!--<div class="notification-footer">

<a href="#">see all notification<i class="fa fa-long-arrow-right"></i></a>

</div>-->

</div>

</li>





<li class="dropdown dropdown-user">

<a href="#" class="dropdown-toggle" data-toggle="dropdown"> <i class="fa fa-user-circle-o"></i> 

</a>

<ul class="dropdown-menu">

<li><a href="<?= base_url('admin/profile')?>"><i class="ti-user"></i> User Profile</a></li>



<li><a href="<?= base_url('admin/logout')?>"><i class="ti-key"></i> Logout</a></li>

</ul>

</li>

</ul>

</div> 

</div>

</div>

</div>

</div>



