Exemplo n.º 1
0
                 $row['s3 date'] = improvement::getImprovementStatus($status);
                 $row['desc'] = '<a href="?open=improvement&amp;id=' . $mid . '&amp;hidemenu=true" class="view_webpage">' . $m['name'] . '</a>';
                 $row['s4 date'] = $m['pic'];
                 $kpi_table[] = $row;
             }
         }
         //echo "<pre>";var_dump($mims_internal[1]);
         $result .= '<h3 style="margin-top:20px;">Internal MIMS</h3>';
         $result .= tep_draw_table('', $kpi_table);
     }
     $result .= '</div>';
     //#kpi-mims
 } elseif ($_GET['week-sum'] == 'MWALL') {
     $wall = new wall('0');
     $result .= '<div style="float:left;padding:20px 0;">';
     $result .= $wall->draw(5, 'width:650px;');
     $result .= '</div>';
     //RIGHT PART - Begin
     $result .= '<div style="margin-left:680px;padding:20px;">';
     //DISPLAY RED ALERT MESSAGE WHEN STOCK CHECKING CRON IS DISABLED
     if (!is_file('cron/process-open-orders.php')) {
         $result .= '<div id="mw-scs" class="box ui-corner-all" style="width:480px;margin-bottom:25px;border:1px solid #fff;background:#f00;color:#fff;">';
         $result .= '<h3 class="tac" style="margin:0;">!!! STOCK CHECKING CRON IS CURRENTLY DISABLED !!!</h3>';
         $result .= '</div>';
         //#mw-scs
     }
     $result .= '<div id="mw-nots" style="width:500px;margin-left:2px;">';
     $result .= '<div id="mw-nots-nfb" class="box ui-corner-all red pointer" style="height:87px;border-color:#c00;background:#fff top right url(images/need-feedback-level-1.jpg) no-repeat;font-weight:bold;font-size:1.7em;display:none;">';
     $result .= '<div class="tac" style="width:310px;margin:3px 0 0 15px;">You have <span style="font-size:2em;"></span> Notifications<br />waiting for your feedback!</div>';
     $result .= '</div>';
     //#mw-nots-nfb
Exemplo n.º 2
0
$sales_lw = displayCurrency(CURRENCY_DEFAULT, $daily_data['total_price'], false);
$grossprofit_lw = number_format($daily_data['average_gross_profit_percent'] * 100, 1) . ' %';
//last month
$date_start = date('Y-m-01', strtotime('last month'));
$date_end = date('Y-m-t', strtotime('last month'));
$daily_data = ReportCOGS::retrieveSummary($jng_sp_id, $date_start, $date_end);
$sales_lm = displayCurrency(CURRENCY_DEFAULT, $daily_data['total_price'], false);
$grossprofit_lm = number_format($daily_data['average_gross_profit_percent'] * 100, 1) . ' %';
//bestseller
$q = "SELECT COUNT(products_id) AS total FROM products WHERE active_status=1 AND stars=3";
$r = tep_db_query($q);
$row = tep_db_fetch_array($r);
$total_bestseller = $row['total'];
//Draw content
$wall = new wall('0');
$content .= '<div id="dashboard">' . '<div id="db-block-left" style="position:absolute;">' . '<div id="db-block-sales" style="margin-bottom:40px">' . '<h2>Sales Summary (' . CURRENCY_DEFAULT . ')</h2>' . '<ul class="table-list">' . '<li><span class="label">Yesterday</span><span class="value">' . $sales_ld . '</span></li>' . '<li><span class="label">Last Week</span><span class="value">' . $sales_lw . '</span></li>' . '<li><span class="label">Last Month</span><span class="value">' . $sales_lm . '</span></li>' . '</ul>' . '</div>' . '<div id="db-block-grossprofit" style="margin-bottom:40px">' . '<h2>Gross Profit Margin</h2>' . '<ul class="table-list">' . '<li><span class="label">Yesterday</span><span class="value">' . $grossprofit_ld . '</span></li>' . '<li><span class="label">Last Week</span><span class="value">' . $grossprofit_lw . '</span></li>' . '<li><span class="label">Last Month</span><span class="value">' . $grossprofit_lm . '</span></li>' . '</ul>' . '</div>' . '<div id="db-block-bestseller" style="margin-bottom:40px">' . '<h2>Bestseller Management</h2>' . '<ul class="table-list">' . '<li><span class="value" style="">' . $total_bestseller . '</span><span class="label">Total 3 stars products</span></li>' . '<li><span class="value" title="coming soon!">NA</span><span class="label">Bestseller not on stock</span></li>' . '</ul>' . '</div>' . '</div>' . '<div id="db-block-middle" style="position:absolute;left:320px;margin-bottom:20px;">' . '<h1>News</h1>' . $wall->draw(2, 'width:500px;margin-bottom:20px;', true, 'Share something new...') . '</div>' . '<div id="db-block-right" class="w500" style="position:absolute;left:870px;">' . '<h2>Recent Orders</h2>' . '<div id="recent-bought"></div>' . '</div>' . '</div>';
#dashboard
$javascript = wall::drawWallJSaction() . '
            var recent_bought_firstload = true;
            function compareProduct(xmlResult, txtStatus) {
                if(txtStatus=="success") {
                    recent_bought_firstload = false;
                    var container_is_empty = ($("#recent-bought").find("div:eq(0)").attr("id")==undefined);
                    var products_id = $("products_id", xmlResult).text();
                    if(products_id=="none") {
                        if(container_is_empty) $("#recent-bought").html("<div id=\'rb-empty\' class=\'notice\'>No Recent Orders found</div>");
                    } else {
                        products_id = products_id.split(",");
                        $("#rb-empty").remove();
                        if(container_is_empty) {
                            $("#recent-bought").find("img").remove();