%PDF- %PDF-
Direktori : /home/ugotscom/public_html/dg/application/modules/bdashboard/views/ |
Current File : /home/ugotscom/public_html/dg/application/modules/bdashboard/views/bdash2.php |
<script src="https:cdnjs.cloudflare.com/ajax/libs/Chart.js/2.9.3/Chart.min.js"></script> <script type="text/javascript" src="http://code.jquery.com/jquery-1.7.1.min.js"></script> <div class="content-wrapper"> <section class="content-header"> <h1>Dashboard</h1> </section> <section class="content"> <div class="row"> <div class="col-lg-4 col-xs-6"> <div class="small-box bg-yellow"> <div class="inner"> <h3><?=$details;?></h3> <p>Leads</p> </div> <div class="icon"> <i class="ion ion-person-add"></i> </div> <a href="<?=base_url();?>emp/" class="small-box-footer">More info <i class="fa fa-arrow-circle-right"></i></a> </div> </div> <div class="col-lg-4 col-xs-6"> <div class="small-box bg-green"> <div class="inner"> <h3><?=$hot_leads;?></h3> <p>Hot Leads</p> </div> <div class="icon"> <i class="fa fa-tag"></i> </div> <a href="<?=base_url();?>user" class="small-box-footer">More info <i class="fa fa-arrow-circle-right"></i></a> </div> </div> <div class="col-lg-4 col-xs-6"> <div class="small-box bg-blue"> <div class="inner"> <h3><?=$todaysfollowup;?></h3> <p>Followup Today</p> </div> <div class="icon"> <i class="fa fa-shopping-cart"></i> </div> <a href="<?=base_url();?>followup" class="small-box-footer">More info <i class="fa fa-arrow-circle-right"></i></a> </div> </div> </div> <div class="row"> <div class="col-md-6"> <canvas id="myChart"></canvas> </div> <div class="col-md-6"> <canvas id="pie"></canvas> </div> </div> <div class="row"> <div class="col-md-4"> <p>Total Leads Generated by Each Staff</p> <table id="example1" class="table table-bordered table-striped"> <thead> <tr> <th class="text-center">Name</th> <th class="text-center">Leads Generated</th> </tr> </thead> <tbody> <?php $i=1; foreach ($totalno as $value) { ?> <tr> <td class="text-center"><?=$value['name'];?></td> <td class="text-center"><?=$value['total'];?></td> </tr> <?php } ?> </tbody> </table> </div> <div class="col-md-4"> <p>Total Leads Closed by Each Staff</p> <table id="example1" class="table table-bordered table-striped"> <thead> <tr> <th class="text-center">Name</th> <th class="text-center">Leads Closed</th> </tr> </thead> <tbody> <?php $i=1; foreach ($closedtotalno as $value) { ?> <tr> <td class="text-center"><?=$value['name'];?></td> <td class="text-center"><?=$value['total'];?></td> </tr> <?php } ?> </tbody> </table> </div> <div class="col-md-4"> <p>Most Leads Generated</p> <table id="example1" class="table table-bordered table-striped"> <thead> <tr> <th class="text-center">Enquiry Source</th> <th class="text-center">Leads Generated</th> </tr> </thead> <tbody> <?php $i=1; foreach ($enquirytotal as $value) { ?> <tr> <td class="text-center"><?=$value['source'];?></td> <td class="text-center"><?=$value['total'];?></td> </tr> <?php } ?> </tbody> </table> </div> </div> <script type="text/javascript"> var paramNombres = []; var paramEdades = []; $.post("<?php echo base_url();?>chart/totalno", function(data){ var obj = JSON.parse(data); paramNombres = []; paramEdades = []; $.each(obj, function(i,item){ paramNombres.push(item.name); paramEdades.push(item.total); }); var ctx = $("#myChart"); var myChart = new Chart(ctx, { type: 'bar', data: { labels: paramNombres, datasets: [ { label: "Leads Generated", fill: true, lineTension: 0.1, backgroundColor: ["#3e95cd", "#8e5ea2","#3cba9f","#e8c3b9","#c45850"], borderColor: "rgba(75,192,192,1)", borderCapStyle: 'butt', borderDash: [], borderDashOffset: 0.0, borderJoinStyle: 'miter', pointBorderColor: "rgba(75,192,192,1)", pointBackgroundColor: "#fff", pointBorderWidth: 10, pointHoverRadius: 5, pointHoverBackgroundColor: "rgba(75,192,192,1)", pointHoverBorderColor: "rgba(220,220,220,1)", pointHoverBorderWidth: 5, pointRadius: 1, pointHitRadius: 10, data: paramEdades, spanGaps: false, } ] }, options: { scales: { yAxes: [{ ticks: { beginAtZero:true } }] } } }); }); </script> <script type="text/javascript"> var paramNombres = []; var paramEdades = []; $.post("<?php echo base_url();?>chart/enquirytotal", function(data){ var obj = JSON.parse(data); //console.log(data); paramNombres = []; paramEdades = []; $.each(obj, function(i,item){ paramNombres.push(item.source); paramEdades.push(item.total); }); var ctx = $("#pie"); var myChart = new Chart(ctx, { type: 'doughnut', data: { labels: paramNombres, datasets: [ { label: "Leads Generated", fill: true, lineTension: 0.1, backgroundColor: ["#3e95cd", "#8e5ea2","#3cba9f","#e8c3b9","#c45850"], borderCapStyle: 'butt', borderDash: [], borderDashOffset: 0.0, borderJoinStyle: 'miter', pointBorderColor: "rgba(75,192,192,1)", pointBackgroundColor: "#fff", pointBorderWidth: 10, pointHoverRadius: 5, pointHoverBackgroundColor: "rgba(75,192,192,1)", pointHoverBorderColor: "rgba(220,220,220,1)", pointHoverBorderWidth: 5, pointRadius: 1, pointHitRadius: 10, data: paramEdades, spanGaps: false, } ] }, options: { title: { display: true, text: 'Most Leads Generated Source' } } }); }); </script> </section> </div>