<?php
session_start();
$adminemailid=$_SESSION['emailid'];
$companyname=$_SESSION['companyname'];
$companytype=$_SESSION['companytype'];
include ('sesssion_clear.php');
require_once ('../Control/sales.php');
$sales_ctrl_obj=new salesctrl();
$sales_sign_res=$sales_ctrl_obj->salesselectall($companyname, $adminemailid, "signupdetails", "no");
$sales_status_res=$sales_ctrl_obj->salesselectall($companyname, $adminemailid, "sales_status", "no");
$sales_lead_res=$sales_ctrl_obj->salesselectall($companyname, $adminemailid, "sales_lead_source", "no");
$sales_tag_res=$sales_ctrl_obj->salesselectall($companyname, $adminemailid, "sales_tag", "no");
$sales_filter_res=$sales_ctrl_obj->salesselectall($companyname, $adminemailid, "sales_filter", "no");

$result_contact=$sales_ctrl_obj->salesselectall($companyname, $adminemailid, "viewcontact", "star");
$star_count=$result_contact->rowCount();
?>
<html>
    
    <head>
        <link rel="icon" href="../../Images/cloud-icon-27.png">
        <meta charset="utf-8">
        <meta name="viewport" content="width=device-width, initial-scale=1">
        <link rel="stylesheet" href="../../Bootstrap/css/bootstrap.min.css">
        <script src="../../Bootstrap/jquery.min.js"></script>
        <script src="../../Bootstrap/js/bootstrap.min.js"></script>
        <script src="../../Bootbox/bootbox.min.js"></script>
        <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-sweetalert/1.0.1/sweetalert.min.css">
        <script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-sweetalert/1.0.1/sweetalert.min.js"></script>
        <script src="../../Js/bootstrapAlert.js"></script>
        <link href="../../font-awesome-4.7.0/css/font-awesome.min.css" rel="stylesheet">
        <link href="deal_action_stream.css" rel="stylesheet">
        <script src="deal_action_stream.js"></script>
        
        <link href="../../Clockpicker/bootstrap-clockpicker.min.css" rel="stylesheet" type="text/css" />
        <link href="../../Clockpicker/github.min.css" rel="stylesheet" type="text/css" />
        <script src="../../Clockpicker/jquery-clockpicker.min.js"></script>
    
        <link href="../../Datepicker/bootstrap-datepicker.css" rel="stylesheet" type="text/css" />
        <script src="../../Datepicker/bootstrap-datepicker.js"></script>
    
        
        <link rel="stylesheet" href="../../Selectpicker/bootstrap-select.min.css">
        <link rel="stylesheet" href="../../Selectpicker/bootstrap-select.css.map">
        <script src="../../Selectpicker/bootstrap-select.js"></script>
        <script src="../../Selectpicker/bootstrap-select.js.map"></script>
        
<style>
    .row{
        margin:0px;
        padding:0px;
    }
::-webkit-scrollbar {
    width: .1em;
    height: .1em
}
</style>
        <style>
            body {
                min-width: 1030px;
                height: 97%;
                width: 100%;
            }
            
            html, body {
                margin: 0;
                padding: 0;
                width: 100%;
                height: 95%;
                font-family: "Open Sans", Arial, Helvetica, sans-serif;
                font-size: 14px;
                line-height: 130%;
                color: #333;
                background-color: #fff;
                -webkit-user-select: auto;
            }
             .menu>li.sales a:hover:before{
                background-position: -40px 0;
            }
            .menu>li.sales a.active:before {
                background-position: -40px 0;
            }
             .menu>li.sales a:before {
                width: 13px;
                height: 11px;
                background-position: -20px 0;
                top: 5px;
                left: 27px;
            }
             .menu>li.sales a:after {
                width: 13px;
                height: 11px;
                background-position: -20px 0;
                top: 5px;
                left: 27px;
            }
             .menu>li.activity a:hover:before{
                background-position: -80px 0;
            }
            .menu>li.activity a.active:before {
                background-position: -80px 0;
            }
             .menu>li.activity a:before {
                width: 13px;
                height: 11px;
                background-position: -20px 0;
                top: 3px;
                left: 23px;
            }
            .menu>li.sales a:before {
                background: url(Image/pipelinemenu.png) no-repeat 0 0 transparent;
                width: 18px;
                height: 18px;
                display: block;
                position: absolute;
                content: "";
                background-position: -20px 0;
            }
            .menu>li.activity a:before {
                background: url(Image/pipelinemenu.png) no-repeat 0 0 transparent;
                width: 18px;
                height: 18px;
                display: block;
                position: absolute;
                content: "";
                background-position: -60px 0px;
            }
             .menu>li.user a:hover:before{
                background-position: -80px 0;
            }
            .menu>li.user a.active:before {
                background-position: -80px 0;
            }
             .menu>li.user a:before {
                width: 13px;
                height: 11px;
                background-position: -20px 0;
                top: 3px;
                left: 23px;
            }
            .menu>li.user a:before {
                background: url(Image/activity_icons.png) no-repeat 0 0 transparent;
                width: 18px;
                height: 18px;
                display: block;
                position: absolute;
                content: "";
                background-position: -78px 0px;
            }
            .left-link {
                width: 183px;
                padding: 7px 0px 7px 0px;
                width: 135px;
                display: block;
                white-space: nowrap;
                overflow: hidden;
                text-overflow: ellipsis;
            }
            .left-link:hover{
                background: #ecf6fd;
                cursor:pointer;
            }
            .my_team{
                max-height:100%;
                background-color: #F5F5F5;
            }
             iframe
            {
                border:none;
                overflow-x: hidden;
            }
            @media only screen and (max-width: 1000px)  {
                body {
                    overflow-x: visible;
                }
            }
        </style>
    </head>
    
    <body scrolling="no">
        <nav id="mainNav" class="navbar navbar-inverse  navbar-fixed-top">
        <div class="container">
            <!-- Brand and toggle get grouped for better mobile display -->
            <div class="navbar-header page-scroll">
                 <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>                        
      </button>
                <a href="#page-top"><img alt="Cloud" src="http://fieldcloud.in/Web/Images/cloud-icon-27.png" width="50px" height="50px"> <span style="font-size:2em;color: White;"> Field</span><span style="font-size:2em;color: orange;">Cloud</span></a>
            </div>

            <!-- Collect the nav links, forms, and other content for toggling -->
            <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
                
                 <ul class="nav navbar-nav navbar-right menu">
                    <li>
                        <a class="page-scroll pull-left" href="dashboard.php">Action Stream</a>
                    </li>
                    <li>
                        <a class="page-scroll pull-left" href="dashboard_contact.php">Contact</a>
                    </li>
                    <li class="sales">
                        <a style="top:5px;" href="pipeline_view.php">Pipeline</a>
                    </li>
                    <li class="activity">
                        <a style="top:5px;"  href="activity_all.php">Activity</a>
                    </li>
                    <li class="user" style="color:white;">
                        <a style="top:5px;" style="color:white;"  href="user_dashboard.php">User</a>
                    </li>
                    
                    
                    <li>
                    <a href="../../../logout.php">Logout</a>
                    </li>
                    <li>
                    <a  href="../../../home.php">Switch to Home</a>
                    </li>
                    </ul>
                    
                    </li>
                    </ul>
            </div>
            <!-- /.navbar-collapse -->
        </div>
        <!-- /.container-fluid -->
    </nav>
        <div class="" style="">
            <div class="row" style="height:100%;width:100%;margin-top:60px;padding:0px;">
                <div class="col-md-1 hidden-sm"></div>
                <div class="col-xs-2">
                    <div class="navbar-header page-scroll">
                        <input type="button" name="adduser" id="adduser" class="btn btn-default" value="Add User"> 
                        <span class="my_team">
                            <div class="left-link" id="allemployee"><b>Employee</b></div>
                			<div class="left-link" id="consolidate">Consolidate Daily List</div>
                            <div class="left-link" id="today">Today</div>
                            <div class="left-link" id="monthattendance">Month Attendance</div>
                            <div class="left-link" id="timesheet">Timesheet</div>
                        </span>
                    </div>
                </div>
                <div class="col-md-9 col-xs-10">
                    <iframe  height="98%" width="100%" src="all_employee.php" name="loadpage" id="loadpage"></iframe>
                </div>
            </div>
        </div>
        
        <?php
        $y1=date("Y");
        $month=date("m");
        $days=date("Y-m-1");
        $date =date("Y-m-d");
        ?>
        
        <script>
            $(document).on("click", "#adduser", function(){
                $("#loadpage").attr("src", "addemployee.php?pagefrom=user_dashboard");
            });
            $(document).on("click", "#allemployee", function(){
                $("#loadpage").attr("src", "all_employee.php");
            });
            $(document).on("click", "#today", function(){
                $("#loadpage").attr("src", "../../Attendance/attendancepage.php");
            });
            $(document).on("click", "#timesheet", function(){
                $("#loadpage").attr("src", "../../Attendance/timesheetlist.php");
            });
            $(document).on("click", "#monthattendance", function(){
                $("#loadpage").attr("src", "../../Attendance/consolidate.php");
            });
            $(document).on("click", "#consolidate", function(){
            month1=<?php echo $month;?>;
            year1=<?php echo $y1;?>;
            var days="<?php echo $days;?>";
            date1=<?php echo $date;?>;
            var d12 = "<?php echo $date;?>";
            path="../../Attendance/dailylist.php?startdate="+d12+"&days="+days;
                $("#loadpage").attr("src", path);
            });
            $(document).on("click", "#waitingcontact", function(){
                $("#loadpage").attr("src", "waiting_active_stream.php");
            });
            $(document).on("click", "#asapcontact", function(){
                $("#loadpage").attr("src", "asap_active_stream.php");
            });
        </script>
    </body>
</html>