%PDF-1.4
Directory : /var/www/vhosts/lautnusantara.com/httpdocs/mis/app/Views/theme/BeyondAdmin/halaman/ |
<!-- <div class="page-body"> --> <div class="row"> <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12"> <div class="row"> <div class="col-lg-3 col-md-3 col-sm-6 col-xs-12"> <div class="databox bg-white radius-bordered"> <div class="databox-left bg-themesecondary"> <i class="fa fa-pencil-square-o" style="color: white;font-size: 35px;margin-top: 7px;"></i> <!-- <div class="databox-piechart"> <div data-toggle="easypiechart" class="easyPieChart" data-barcolor="#fff" data-linecap="butt" data-percent="50" data-animate="500" data-linewidth="3" data-size="47" data-trackcolor="rgba(255,255,255,0.1)"> <!-- <span class="white font-90">50%</span> </div> </div>--> </div> <div class="databox-right"> <span class="databox-number themesecondary" style="font-size: 32px;"><?= $jml_artikel_bln ?></span> <div class="databox-text darkgray" style="margin-top: 8px">Artikel Bulan Ini </div> <!--<div class="databox-stat themesecondary radius-bordered"> <i class="stat-icon icon-lg fa fa-tasks"></i> </div>--> </div> </div> </div> <div class="col-lg-3 col-md-3 col-sm-6 col-xs-12"> <div class="databox bg-white radius-bordered"> <div class="databox-left bg-themethirdcolor"> <i class="fa fa-calendar" style="color: white;font-size: 35px;margin-top: 7px;"></i> <!-- <div class="databox-piechart"> <div data-toggle="easypiechart" class="easyPieChart" data-barcolor="#fff" data-linecap="butt" data-percent="50" data-animate="500" data-linewidth="3" data-size="47" data-trackcolor="rgba(255,255,255,0.1)"> <!-- <span class="white font-90">50%</span> </div> </div>--> </div> <div class="databox-right"> <span class="databox-number themethirdcolor" style="font-size: 32px;"><?= $jml_artikel_thn ?></span> <div class="databox-text darkgray" style="margin-top: 8px">Artikel Tahun Ini </div> <!--<div class="databox-stat themethirdcolor radius-bordered"> <i class="stat-icon icon-lg fa fa-tasks"></i> </div>--> </div> </div> </div> <!-- <div class="col-lg-3 col-md-3 col-sm-6 col-xs-12"> <div class="databox bg-white radius-bordered"> <div class="databox-left bg-themethirdcolor"> <div class="databox-piechart"> <div data-toggle="easypiechart" class="easyPieChart" data-barcolor="#fff" data-linecap="butt" data-percent="15" data-animate="500" data-linewidth="3" data-size="47" data-trackcolor="rgba(255,255,255,0.2)"> <span class="white font-90">15%</span> </div> </div> </div> <div class="databox-right"> <span class="databox-number themethirdcolor">5</span> <div class="databox-text darkgray">NEW MESSAGE</div> <div class="databox-stat themethirdcolor radius-bordered"> <i class="stat-icon icon-lg fa fa-envelope-o"></i> </div> </div> </div> </div> --> <div class="col-lg-3 col-md-3 col-sm-6 col-xs-12"> <div class="databox bg-white radius-bordered"> <div class="databox-left bg-themeprimary"> <i class="fa fa-users" style="color: white;font-size: 35px;margin-top: 7px;"></i> <!--<div class="databox-piechart"> <div id="users-pie" data-toggle="easypiechart" class="easyPieChart" data-barcolor="#fff" data-linecap="butt" data-percent="76" data-animate="500" data-linewidth="3" data-size="47" data-trackcolor="rgba(255,255,255,0.1)"> <span class="white font-90">76%</span> </div> </div>--> </div> <div class="databox-right"> <span class="databox-number themeprimary" style="font-size: 30px;"><?= $unik_user ?></span> <div class="databox-text darkgray" style="margin-top: 8px">Unik Users Bulan ini </div> <!--<div class="databox-state bg-themeprimary"> <i class="fa fa-check"></i> </div>--> </div> </div> </div> <div class="col-lg-3 col-md-3 col-sm-6 col-xs-12"> <div class="databox bg-white radius-bordered"> <div class="databox-left no-padding"> <img src="<?= session()->get('url_image') ?>" style="width:65px; height:65px;"> </div> <div class="databox-right"> <!-- <div class="databox-stat palegreen"> <i style="color:red;" class="stat-icon icon-xlg fa fa-heart"></i> </div> --> <i style="color:red;" class="stat-icon icon-xlg fa fa-heart"></i> <div class="databox-text darkgray"> <em> " Belajar dari hari kemarin, hidup untuk hari ini, bermimpi untuk hari esok ~ " </em> </div> <div class="databox-text darkgray" style="float:right">- <?= substr(base_url(), 14, ) ?> <i style="color:red;" class="stat-icon icon-xlg fa fa-heart"></i> </div> </div> </div> </div> </div> </div> </div> <div class="row"> <div class="col-lg-9 col-md-9 col-sm-12 col-xs-12"> <div class="row"> <div class="col-xs-12"> <div class="dashboard-box"> <div class="box-header"> <div class="deadline">Tanggal : <?php $date = date_create(); echo date_format($date, "d-M-Y"); ?> </div> </div> <?php $pros = (date_format($date, "H") / 24) * 100 ?> <div class="box-progress"> <div class="progress-handle" style="width: 75px;left: calc(<?= $pros ?>% - 35px);">Jam : <?= date_format($date, "H:i"); ?> </div> <div class="progress progress-xs progress-no-radius bg-whitesmoke"> <div class="progress-bar" role="progressbar" aria-valuenow="60" aria-valuemin="0" aria-valuemax="100" style="width: <?= $pros ?>%"> </div> </div> </div> <div class="box-tabbs"> <div class="tabbable"> <ul class="nav nav-tabs tabs-flat nav-justified" id="myTab11"> <!-- <li class="active"> <a data-toggle="tab" href="index.html#realtime">Real-Time</a> </li> --> <li class="active"> <a data-toggle="tab" href="index.html#visits">Visits this month</a> </li> </ul> <div class="tab-content tabs-flat no-padding"> <!-- <div id="realtime" class="tab-pane active padding-5 animated fadeInUp"> <div class="row"> <div class="col-lg-12"> <div id="dashboard-chart-realtime" class="chart chart-lg no-margin" style="height: 370px;"> </div> </div> </div> </div> --> <div id="visits" class="tab-pane active animated fadeInUp"> <div class="row"> <div class="col-lg-12 chart-container"> <div id="dashboard-chart-visits" class="chart chart-lg" style="width:100%;height: 480px;"> </div> </div> </div> </div> </div> </div> </div> </div> </div> </div> </div> <div class="col-lg-3 col-md-3 col-sm-12 col-xs-12"> <div class="orders-container"> <div class="orders-header"> <h6>Tips Terbaru</h6> </div> <ul class="orders-list"> <?php $no = 0; foreach ($new_artikel as $data): $no++; $date = date_create($data->publish_up); $tgl = date_format($date, "d-M-Y"); if ($data->active == 1 && $data->published == 1) { $parsed_url = parse_url(base_url()); // Mendapatkan host $host = $parsed_url['host']; // Mencari tanda '.' pertama untuk menentukan domain utama $dot_position = strpos($host, '.'); // Jika ada subdomain, maka indeks "." akan ada if ($dot_position !== false) { // Mengambil domain utama $main_domain = substr($host, $dot_position + 1); } else { // Jika tidak ada subdomain, domain adalah host itu sendiri $main_domain = $host; } // Membuat URL domain utama $main_domain_url = $parsed_url['scheme'] . '://' . $main_domain . '/detail/artikel/' . $data->id . '/' . $data->alias; $link = '<a href="' . $main_domain_url . '" target="_blank">' . $data->title . '</a>'; } else { $link = $data->title; } ?> <li class="order-item"> <div class="row"> <div class="col-lg-8 col-md-8 col-sm-8 col-xs-8 item-left"> <div class="item-booker"><?= $link ?></div> <div class="item-time"> <i class="fa fa-calendar"></i> <span><?= $tgl ?></span> </div> </div> <div class="col-lg-4 col-md-4 col-sm-4 col-xs-4 item-right"> <div class="item-price"> <img src="<?= $data->url_image ?>" alt="img" width="100%"> </div> </div> </div> </li> <?php endforeach; ?> </ul> <div class="orders-footer"> <a class="show-all" href="/artikel"> <i class="fa fa-angle-down"></i> Show All </a> <div class="help"> <a href="/artikel"> <i class="fa fa-question"></i> </a> </div> </div> </div> </div> </div> <?php $total = 0; $hari_ini = 0; $hari_kmrn = 0; // $bln_ini = ''; $kemarin = date_add(date_create(), date_interval_create_from_date_string('-1 days')); foreach ($jml_view_thn as $data): $total = $total + $data->jml; endforeach; foreach ($jml_view_bln as $data): if (date_format($kemarin, "Ymd") == $data->tgl) { $hari_kmrn = $data->jml; } if (date_format(date_create(), "Ymd") == $data->tgl) { $hari_ini = $data->jml; } endforeach; ?> <div class="row"> <div class="col-lg-6 col-md-12 col-sm-12 col-xs-12"> <div class="databox databox-xxlg databox-vertical databox-inverted"> <div class="databox-top bg-whitesmoke no-padding"> <div class="databox-row row-2 bg-orange no-padding"> <div class="databox-cell cell-1 text-align-center no-padding padding-top-5"> <span class="databox-number white"> <i class="fa fa-bar-chart-o no-margin"></i> </span> </div> <div class="databox-cell cell-8 no-padding padding-top-5 text-align-left"> <span class="databox-number white">ARTICLE VISITS</span> </div> <div class="databox-cell cell-3 text-align-right padding-10"> <span class="databox-text white"><?php $date = date_create(); echo date_format($date, "d-M-Y"); ?></span> </div> </div> <div class="databox-row row-4"> <div class="databox-cell cell-6 no-padding padding-10 padding-left-20 text-align-left"> <span class="databox-number orange no-margin"><?= $total ?></span> <span class="databox-text sky no-margin">OVERAL VIEWS THIS YEAR</span> </div> <!-- <div class="databox-cell cell-2 no-padding padding-10 text-align-left"> <span class="databox-number orange no-margin">4,129</span> <span class="databox-text darkgray no-margin">THIS WEEK</span> </div> --> <div class="databox-cell cell-2 no-padding padding-10 text-align-left"> <span class="databox-number orange no-margin"><?= $hari_kmrn ?></span> <span class="databox-text darkgray no-margin">YESTERDAY</span> </div> <div class="databox-cell cell-2 no-padding padding-10 text-align-left"> <span class="databox-number orange no-margin"><?= $hari_ini ?></span> <span class="databox-text darkgray no-margin">TODAY</span> </div> </div> <div class="databox-row row-12 no-padding"> <div class="databox-sparkline"> <span data-sparkline="line" data-height="126px" data-width="100%" data-fillcolor="#37c2e2" data-linecolor="#37c2e2" data-spotcolor="" data-minspotcolor="red" data-maxspotcolor="green" data-highlightspotcolor="blue" data-highlightlinecolor="#f5f5f5" data-linewidth="2" data-spotradius="4"> <?php for ($i = 1; $i <= 12; $i++) { $cek = 0; foreach ($jml_view_thn as $data) { if ($data->ntgl == $i) { echo $data->jml . ','; $cek = 1; } } if ($cek == 0 && $i != 12) { echo '0,'; } else { echo '0'; } } ?> </span> </div> </div> </div> <div class="databox-bottom bg-sky no-padding"> <div class="databox-cell cell-1 text-align-center no-padding padding-top-5"> <span class="databox-header white">Jan</span> </div> <div class="databox-cell cell-1 text-align-center no-padding padding-top-5"> <span class="databox-header white">Feb</span> </div> <div class="databox-cell cell-1 text-align-center no-padding padding-top-5"> <span class="databox-header white">Mar</span> </div> <div class="databox-cell cell-1 text-align-center no-padding padding-top-5"> <span class="databox-header white">Apr</span> </div> <div class="databox-cell cell-1 text-align-center no-padding padding-top-5"> <span class="databox-header white">Mei</span> </div> <div class="databox-cell cell-1 text-align-center no-padding padding-top-5"> <span class="databox-header white">Jun</span> </div> <div class="databox-cell cell-1 text-align-center no-padding padding-top-5"> <span class="databox-header white">Jul</span> </div> <div class="databox-cell cell-1 text-align-center no-padding padding-top-5"> <span class="databox-header white">Aug</span> </div> <div class="databox-cell cell-1 text-align-center no-padding padding-top-5"> <span class="databox-header white">Sep</span> </div> <div class="databox-cell cell-1 text-align-center no-padding padding-top-5"> <span class="databox-header white">Oct</span> </div> <div class="databox-cell cell-1 text-align-center no-padding padding-top-5"> <span class="databox-header white">Nov</span> </div> <div class="databox-cell cell-1 text-align-center no-padding padding-top-5"> <span class="databox-header white">Dec</span> </div> </div> </div> </div> <div class="col-lg-6 col-md-12 col-sm-12 col-xs-12"> <div class="databox databox-xxlg databox-vertical databox-shadowed bg-white radius-bordered padding-5"> <div class="databox-top"> <div class="databox-row row-12"> <div class="databox-cell cell-11 text-left"> <?php // $jml=0; // foreach($data_browser as $data_x): // $jml = $jml+$data_x->jml; // endforeach; ?> <div class="databox-number number-xxlg sonic-silver" style="font-size: 18px;"> Browser yang digunakan</div> <div class="databox-text storm-cloud"></div> </div> <div class="databox-cell cell-1 text-align-center"> <!--<div class="databox-row row-6 text-left"> <span class="badge badge-palegreen badge-empty margin-left-5"></span> <span class="databox-inlinetext uppercase darkgray margin-left-5">NEW</span> <span class="badge badge-yellow badge-empty margin-left-5"></span> <span class="databox-inlinetext uppercase darkgray margin-left-5">RETURNING</span> </div> <div class="databox-row row-6"> <div class="progress bg-yellow progress-no-radius"> <div class="progress-bar progress-bar-palegreen" role="progressbar" aria-valuenow="20" aria-valuemin="0" aria-valuemax="100" style="width: 78%"></div> </div> </div>--> </div> </div> </div> <div class="databox-bottom"> <div class="databox-row row-12"> <div class="databox-cell cell-7 text-center padding-5"> <div id="dashboard-pie-chart-sources" class="chart"></div> </div> <div class="databox-cell cell-5 text-center no-padding-left padding-bottom-30"> <div class="databox-row row-2 bordered-bottom bordered-ivory padding-10"> <span class="databox-text sonic-silver pull-left no-margin">Browser</span> <span class="databox-text sonic-silver pull-right no-margin ">Jml</span> </div> <?php $no = 0; $jml = 0; foreach ($data_browser as $data): $no++; if ($no < 5) { ?> <div class="databox-row row-2 bordered-bottom bordered-ivory padding-10"> <span class="badge <?php if ($no == 1) { echo 'badge-blue '; } elseif ($no == 2) { echo 'badge-orange '; } elseif ($no == 3) { echo 'badge-pink '; } else { echo 'badge-palegreen '; } ?> badge-empty pull-left margin-5"></span> <span class="databox-text darkgray pull-left no-margin hidden-xs"><?= $data->browser ?></span> <span class="databox-text darkgray pull-right no-margin uppercase"><?= $data->jml ?></span> </div> <?php } else { $jml = $jml + $data->jml; } endforeach; ?> <?php if ($no >= 5) { ?> <div class="databox-row row-2 bordered-bottom bordered-ivory padding-10"> <span class="badge badge-yellow badge-empty pull-left margin-5"></span> <span class="databox-text darkgray pull-left no-margin hidden-xs">Browser Lainnya</span> <span class="databox-text darkgray pull-right no-margin uppercase"><?= $jml ?></span> </div> <?php } ?> </div> </div> </div> </div> </div> </div> <div class="row"> <div class="col-lg-6 col-md-12 col-sm-12 col-xs-12"> <div class="databox databox-xxlg databox-vertical databox-inverted"> <div class="databox-top bg-whitesmoke no-padding"> <div class="databox-row row-2 no-padding" style="background-color:#a154ff"> <div class="databox-cell cell-1 text-align-center no-padding padding-top-5"> <span class="databox-number white"> <i class="fa fa-comments fa-lg no-margin"></i> </span> </div> <div class="databox-cell cell-8 no-padding padding-top-5 text-align-left"> <span class="databox-number white">WA HITS</span> </div> <div class="databox-cell cell-3 text-align-right padding-10"> <span class="databox-text white">Tahun <?= date('Y'); ?></span> </div> </div> <?php $total = 0; foreach ($wa_hits_jml as $data) { $total = $total + $data->jml_hits; } ?> <div class="databox-row row-4"> <div class="databox-cell cell-6 no-padding padding-10 padding-left-20 text-align-left"> <span class="databox-number orange no-margin"><?= $total ?></span> <span class="databox-text sky no-margin">OVERAL HITS THIS YEAR</span> </div> <div class="databox-cell cell-2 no-padding padding-10 text-align-left"> <span class="databox-number orange no-margin"><?= $wa_hits_jml_kemarin[0]->jml_hits; ?></span> <span class="databox-text darkgray no-margin">YESTERDAY</span> </div> <div class="databox-cell cell-2 no-padding padding-10 text-align-left"> <span class="databox-number orange no-margin"><?= $wa_hits_jml_hari[0]->jml_hits; ?></span> <span class="databox-text darkgray no-margin">TODAY</span> </div> <div class="databox-cell cell-2 no-padding padding-10 text-align-left"> <span class="databox-number orange no-margin"></span> <span class="databox-text darkgray no-margin"></span> </div> </div> <div class="databox-row row-12 no-padding"> <div class="databox-sparkline"> <span data-sparkline="line" data-height="126px" data-width="100%" data-fillcolor="#37c2e2" data-linecolor="#37c2e2" data-spotcolor="" data-minspotcolor="red" data-maxspotcolor="green" data-highlightspotcolor="blue" data-highlightlinecolor="#f5f5f5" data-linewidth="2" data-spotradius="4"> <?php for ($i = 1; $i <= 12; $i++) { $cek = 0; foreach ($wa_hits as $hw) { if ($hw['bln'] == $i) { echo $hw['jml_hits'] . ','; $cek = 1; } } if ($cek == 0 && $i != 12) { echo '0,'; } else { echo '0'; } } ?> </span> </div> </div> </div> <div class="databox-bottom bg-sky no-padding"> <div class="databox-cell cell-1 text-align-center no-padding padding-top-5"> <span class="databox-header white">Jan</span> </div> <div class="databox-cell cell-1 text-align-center no-padding padding-top-5"> <span class="databox-header white">Feb</span> </div> <div class="databox-cell cell-1 text-align-center no-padding padding-top-5"> <span class="databox-header white">Mar</span> </div> <div class="databox-cell cell-1 text-align-center no-padding padding-top-5"> <span class="databox-header white">Apr</span> </div> <div class="databox-cell cell-1 text-align-center no-padding padding-top-5"> <span class="databox-header white">Mei</span> </div> <div class="databox-cell cell-1 text-align-center no-padding padding-top-5"> <span class="databox-header white">Jun</span> </div> <div class="databox-cell cell-1 text-align-center no-padding padding-top-5"> <span class="databox-header white">Jul</span> </div> <div class="databox-cell cell-1 text-align-center no-padding padding-top-5"> <span class="databox-header white">Aug</span> </div> <div class="databox-cell cell-1 text-align-center no-padding padding-top-5"> <span class="databox-header white">Sep</span> </div> <div class="databox-cell cell-1 text-align-center no-padding padding-top-5"> <span class="databox-header white">Oct</span> </div> <div class="databox-cell cell-1 text-align-center no-padding padding-top-5"> <span class="databox-header white">Nov</span> </div> <div class="databox-cell cell-1 text-align-center no-padding padding-top-5"> <span class="databox-header white">Dec</span> </div> </div> </div> </div> </div> <!-- </div> --> <!--Page Dashboard Related Scripts--> <!--Sparkline Charts Needed Scripts--> <script src="<?= base_url(); ?>/assets/theme/BeyondAdmin/js/charts/sparkline/jquery.sparkline.js"> </script> <script src="<?= base_url(); ?>/assets/theme/BeyondAdmin/js/charts/sparkline/sparkline-init.js"> </script> <!--Easy Pie Charts Needed Scripts--> <script src="<?= base_url(); ?>/assets/theme/BeyondAdmin/js/charts/easypiechart/jquery.easypiechart.js"> </script> <script src="<?= base_url(); ?>/assets/theme/BeyondAdmin/js/charts/easypiechart/easypiechart-init.js"> </script> <!--Flot Charts Needed Scripts--> <script src="<?= base_url(); ?>/assets/theme/BeyondAdmin/js/charts/flot/jquery.flot.js"></script> <script src="<?= base_url(); ?>/assets/theme/BeyondAdmin/js/charts/flot/jquery.flot.resize.js"></script> <script src="<?= base_url(); ?>/assets/theme/BeyondAdmin/js/charts/flot/jquery.flot.pie.js"></script> <script src="<?= base_url(); ?>/assets/theme/BeyondAdmin/js/charts/flot/jquery.flot.tooltip.js"> </script> <script src="<?= base_url(); ?>/assets/theme/BeyondAdmin/js/charts/flot/jquery.flot.orderBars.js"> </script> <script> // If you want to draw your charts with Theme colors you must run initiating charts after that current skin is loaded $(window).bind("load", function() { /*Sets Themed Colors Based on Themes*/ themeprimary = getThemeColorFromCss('themeprimary'); themesecondary = getThemeColorFromCss('themesecondary'); themethirdcolor = getThemeColorFromCss('themethirdcolor'); themefourthcolor = getThemeColorFromCss('themefourthcolor'); themefifthcolor = getThemeColorFromCss('themefifthcolor'); //Sets The Hidden Chart Width $('#dashboard-bandwidth-chart') .data('width', $('.box-tabbs') .width() - 20); //-------------------------Visitor Sources Pie Chart----------------------------------------// <?php $jml = 0; $no = 0; $data5 = 0; foreach ($data_browser as $data_x): $no++; if ($no == 1) { $data1 = $data_x->jml; } elseif ($no == 2) { $data2 = $data_x->jml; } elseif ($no == 3) { $data3 = $data_x->jml; } elseif ($no == 4) { $data4 = $data_x->jml; } else { $data5 = $data5 + $data_x->jml; } endforeach; ?> var data = [{ data: [ [1, <?= $data2 ?>] ], color: '#fb6e52' }, { data: [ [1, <?= $data3 ?>] ], color: '#e75b8d' }, { data: [ [1, <?= $data4 ?>] ], color: '#a0d468' }, { data: [ [1, <?= $data5 ?>] ], color: '#ffce55' }, { data: [ [1, <?= $data1 ?>] ], color: '#5db2ff' } ]; var placeholder = $("#dashboard-pie-chart-sources"); placeholder.unbind(); $.plot(placeholder, data, { series: { pie: { innerRadius: 0.45, show: true, stroke: { width: 4 } } } }); //------------------------------Visit Chart------------------------------------------------// var data2 = [{ color: themesecondary, label: "Kunjungan Produk", data: [ <?php $month = intval(date_format(date_create(), 'm')); $year = intval(date_format(date_create(), 'Y')); $jml_hari = cal_days_in_month(CAL_GREGORIAN, $month, $year); $x = 0; if ($jml_view_produk_bln != null) { for ($i = 1; $i <= $jml_hari; $i++) { $cek = 0; $x++; if ($x > 1) { echo ','; } foreach ($jml_view_produk_bln as $data): if ($data->ntgl == $i) { echo '[' . $i . ',' . $data->jml . ']'; $cek = 1; } endforeach; if ($cek == 0) { echo '[' . $i . ',' . 0 . ']'; } } } else { for ($i = 1; $i <= $jml_hari; $i++) { $x++; if ($x > 1) { echo ','; } echo '[' . $i . ',' . 0 . ']'; } } ?> ], lines: { show: true, fill: true, lineWidth: .8, fillColor: { colors: [{ opacity: 0.8 }, { opacity: 0.8 }] } }, points: { show: true }, shadowSize: 0 }, { color: themeprimary, label: "Kunjungan Artikel", data: [ <?php $month = intval(date_format(date_create(), 'm')); $year = intval(date_format(date_create(), 'Y')); $jml_hari = cal_days_in_month(CAL_GREGORIAN, $month, $year); $x = 0; if ($jml_view_bln != null) { for ($i = 1; $i <= $jml_hari; $i++) { $cek = 0; $x++; if ($x > 1) { echo ','; } foreach ($jml_view_bln as $data): if ($data->ntgl == $i) { echo '[' . $i . ',' . $data->jml . ']'; $cek = 1; } endforeach; if ($cek == 0) { echo '[' . $i . ',' . 0 . ']'; } } } else { for ($i = 1; $i <= $jml_hari; $i++) { $x++; if ($x > 1) { echo ','; } echo '[' . $i . ',' . 0 . ']'; } } ?> ], bars: { order: 1, show: true, borderWidth: 0, barWidth: 0.4, lineWidth: .5, fillColor: { colors: [{ opacity: 0.4 }, { opacity: 0.4 }] } } }, { color: themethirdcolor, label: "Kunjungan Video", data: [ <?php $month = intval(date_format(date_create(), 'm')); $year = intval(date_format(date_create(), 'Y')); $jml_hari = cal_days_in_month(CAL_GREGORIAN, $month, $year); $x = 0; if ($jml_view_video_bln != null) { for ($i = 1; $i <= $jml_hari; $i++) { $cek = 0; $x++; if ($x > 1) { echo ','; } foreach ($jml_view_video_bln as $data): if ($data->ntgl == $i) { echo '[' . $i . ',' . $data->jml . ']'; $cek = 1; } endforeach; if ($cek == 0) { echo '[' . $i . ',' . 0 . ']'; } } } else { for ($i = 1; $i <= $jml_hari; $i++) { $x++; if ($x > 1) { echo ','; } echo '[' . $i . ',' . 0 . ']'; } } ?> ], lines: { show: true, fill: false, fillColor: { colors: [{ opacity: 0.8 }, { opacity: 0 }] } }, points: { show: true } } ]; var options = { legend: { show: false }, xaxis: { tickDecimals: 0, color: '#f3f3f3' }, yaxis: { min: 0, color: '#f3f3f3', tickFormatter: function(val, axis) { return ""; }, }, grid: { hoverable: true, clickable: false, borderWidth: 0, aboveData: false, color: '#fbfbfb' }, tooltip: true, tooltipOpts: { defaultTheme: false, content: " <b>%x <?= date_format(date_create(), "M"); ?></b> , <b>%s</b> : <span>%y</span>", } }; var placeholder = $("#dashboard-chart-visits"); var plot = $.plot(placeholder, data2, options); //-------------------------Initiates Easy Pie Chart instances in page--------------------// InitiateEasyPieChart.init(); //-------------------------Initiates Sparkline Chart instances in page------------------// InitiateSparklineCharts.init(); //------------------------------Real-Time Chart-------------------------------------------// var realTimedata = [], realTimedata2 = [], totalPoints = 300; var getSeriesObj = function() { return [{ data: getRandomData(), lines: { show: true, lineWidth: 1, fill: true, fillColor: { colors: [{ opacity: 0 }, { opacity: 1 }] }, steps: false }, shadowSize: 0 }, { data: getRandomData2(), lines: { lineWidth: 0, fill: true, fillColor: { colors: [{ opacity: .5 }, { opacity: 1 }] }, steps: false }, shadowSize: 0 }]; }; function getRandomData() { if (realTimedata.length > 0) realTimedata = realTimedata.slice(1); // Do a random walk while (realTimedata.length < totalPoints) { var prev = realTimedata.length > 0 ? realTimedata[realTimedata.length - 1] : 50, y = prev + Math.random() * 10 - 5; if (y < 0) { y = 0; } else if (y > 100) { y = 100; } realTimedata.push(y); } // Zip the generated y values with the x values var res = []; for (var i = 0; i < realTimedata.length; ++i) { res.push([i, realTimedata[i]]); } return res; } function getRandomData2() { if (realTimedata2.length > 0) realTimedata2 = realTimedata2.slice(1); // Do a random walk while (realTimedata2.length < totalPoints) { var prev = realTimedata2.length > 0 ? realTimedata[realTimedata2.length] : 50, y = prev - 25; if (y < 0) { y = 0; } else if (y > 100) { y = 100; } realTimedata2.push(y); } var res = []; for (var i = 0; i < realTimedata2.length; ++i) { res.push([i, realTimedata2[i]]); } return res; } // Set up the control widget var updateInterval = 500; var plot = $.plot("#dashboard-chart-realtime", getSeriesObj(), { yaxis: { color: '#f3f3f3', min: 0, max: 100, tickFormatter: function(val, axis) { return ""; } }, xaxis: { color: '#f3f3f3', min: 0, max: 100, tickFormatter: function(val, axis) { return ""; } }, grid: { hoverable: true, clickable: false, borderWidth: 0, aboveData: false }, colors: ['#eee', themeprimary], }); function update() { plot.setData(getSeriesObj()); plot.draw(); setTimeout(update, updateInterval); } update(); }); </script> <!-- EOF Page Dashboard related Script-->