📁 PHP Dosya Yöneticisi
/
/
home
/
demodesigncom
/
e-ticaretv9.demodesign.com.tr
/
adminco
/
inc
📝
default.php
← Geri Dön
<?php if(!defined('ADMIN_INCLUDED')) { exit; } ?> <?php $shop_currency_type = currency_types(m_setting('currency_type'),'value'); $total_orders = number_format($db->table('orders')->count()); $total_products = number_format($db->table('products')->count()); $total_customers = number_format($db->table('customers')->count()); $total_wait_orders = number_format($db->table('orders')->where('status','=','0')->count()); $total_daily_users = number_format($db->table('customers')->where_set('DATE(register_date)','=','CURDATE()')->count()); $total_wait_tickets = number_format($db->table('support_tickets')->where('status','=','0')->count()); $total_wait_messages = number_format($db->table('contact')->where('status','=','0')->count()); $total_orders_amount = $db->select('sum(total) as total')->table('orders')->get(); $total_orders_amount = m_currency($total_orders_amount['data'][0]['total']); ?> <div class="container-fluid"> <div class="row"> <div class="col-12"> <div class="page-title-box d-sm-flex align-items-center justify-content-between"> <h4 class="mb-sm-0 font-size-18"><?php echo LGA_WELCOME; ?></h4> </div> </div> </div> <div class="row"> <div class="col-xl-3 col-md-6"> <div class="card card-h-80"> <div class="card-body"> <div class="d-flex align-items-center"> <div class="flex-grow-1"> <span class="mb-3 lh-1 d-block text-truncate"><?php echo LGA_ORDERS; ?></span> <h4 class="mb-3"> <span><?php echo $total_orders; ?></span> </h4> </div> <div class="flex-shrink-0 text-end dash-widget"> <i class="fa fa-shopping-cart fa-5x text-primary"></i> </div> </div> </div> </div> </div> <div class="col-xl-3 col-md-6"> <div class="card card-h-80"> <div class="card-body"> <div class="d-flex align-items-center"> <div class="flex-grow-1"> <span class="mb-3 lh-1 d-block text-truncate"><?php echo LGA_TOTAL_SALES; ?></span> <h4 class="mb-3"> <span><?php echo $total_orders_amount; ?></span> <?php echo $shop_currency_type; ?> </h4> </div> <div class="flex-shrink-0 text-end dash-widget"> <i class="fa fa-wallet fa-5x text-success"></i> </div> </div> </div> </div> </div> <div class="col-xl-3 col-md-6"> <div class="card card-h-80"> <div class="card-body"> <div class="d-flex align-items-center"> <div class="flex-grow-1"> <span class="mb-3 lh-1 d-block text-truncate"><?php echo LGA_PRODUCTS; ?></span> <h4 class="mb-3"> <span><?php echo $total_products; ?></span> </h4> </div> <div class="flex-shrink-0 text-end dash-widget"> <i class="fa fa-cubes fa-5x text-warning"></i> </div> </div> </div> </div> </div> <div class="col-xl-3 col-md-6"> <div class="card card-h-80"> <div class="card-body"> <div class="d-flex align-items-center"> <div class="flex-grow-1"> <span class="mb-3 lh-1 d-block text-truncate"><?php echo LGA_CUSTOMERS; ?></span> <h4 class="mb-3"> <span><?php echo $total_customers; ?></span> </h4> </div> <div class="flex-shrink-0 text-end dash-widget"> <i class="fa fa-users fa-5x text-danger"></i> </div> </div> </div> </div> </div> <div class="col-xl-3 col-md-6"> <div class="card card-h-80"> <div class="card-body"> <div class="d-flex align-items-center"> <div class="flex-grow-1"> <span class="mb-3 lh-1 d-block text-truncate"><?php echo LGA_WAIT_ORDERS; ?></span> <h4 class="mb-3"> <span><?php echo $total_wait_orders; ?></span> </h4> </div> <div class="flex-shrink-0 text-end dash-widget"> <i class="fa fa-clock fa-5x text-warning"></i> </div> </div> </div> </div> </div> <div class="col-xl-3 col-md-6"> <div class="card card-h-80"> <div class="card-body"> <div class="d-flex align-items-center"> <div class="flex-grow-1"> <span class="mb-3 lh-1 d-block text-truncate"><?php echo LGA_WAIT_TICKETS; ?></span> <h4 class="mb-3"> <span><?php echo $total_wait_tickets; ?></span> </h4> </div> <div class="flex-shrink-0 text-end dash-widget"> <i class="fa fa-question-circle fa-5x text-danger"></i> </div> </div> </div> </div> </div> <div class="col-xl-3 col-md-6"> <div class="card card-h-80"> <div class="card-body"> <div class="d-flex align-items-center"> <div class="flex-grow-1"> <span class="mb-3 lh-1 d-block text-truncate"><?php echo LGA_WAIT_MESSAGES; ?></span> <h4 class="mb-3"> <span><?php echo $total_wait_messages; ?></span> </h4> </div> <div class="flex-shrink-0 text-end dash-widget"> <i class="fa fa-envelope fa-5x text-info"></i> </div> </div> </div> </div> </div> <div class="col-xl-3 col-md-6"> <div class="card card-h-80"> <div class="card-body"> <div class="d-flex align-items-center"> <div class="flex-grow-1"> <span class="mb-3 lh-1 d-block text-truncate"><?php echo LGA_DAILY_REGISTERED_CUSTOMERS; ?></span> <h4 class="mb-3"> <span><?php echo $total_daily_users; ?></span> </h4> </div> <div class="flex-shrink-0 text-end dash-widget"> <i class="fa fa-user-plus fa-5x text-success"></i> </div> </div> </div> </div> </div> </div> <div class="row"> <div class="col-xl-12"> <div class="card"> <div class="card-body"> <div class="d-flex flex-wrap align-items-center mb-4"> <h5 class="card-title me-2"><?php echo LGA_ORDER_STATISTICS; ?></h5> </div> <div class="row"> <div class="col-xl-7"> <div> <div id="line-chart" data-colors='["#34c38f", "#ccc"]' class="e-charts" style="width:100%;"></div> </div> </div> <div class="col-xl-5"> <h5 class="card-title me-2"><?php echo LGA_TOP_SALES_PRODUCTS; ?></h5> <div class="p-4"> <?php $top_sales_products = $db->select('product_id,sum(product_quantity) as total_sales')->table('order_products')->group('product_id')->order('total_sales','desc')->limit(5)->get(); $n= 1; foreach($top_sales_products['data'] as $product) { echo ' <div class="mb-3"> <div class="d-flex align-items-center"> <div class="avatar-sm m-auto"> <span class="avatar-title rounded-circle bg-light text-dark font-size-13"> '.$n.' </span> </div> <div class="flex-grow-1 ms-3"> <span class="font-size-14">'.$db->table('products')->where('id','=',$product['product_id'])->get_var('title').'</span> </div> <div class="flex-shrink-0"> <span class="badge rounded-pill badge-soft-success font-size-12 fw-medium">'.$product['total_sales'].'</span> </div> </div> </div>'; $n++; } ?> </div> </div> </div> </div> </div> <div class="card"> <div class="card-body"> <h2>Ciro Raporu</h2> <form action="https://sihirlihali.com/includes/modules/PHPExcel/excel2.php" action="get"> <div class="row"> <div class="form-group col-md-2 mb-2"> <label>İlk Tarih</label> <input class="form-control" name="ilktarih" type="date"> </div> <div class="form-group col-md-2 mb-2"> <label>Son Tarih</label> <input class="form-control" name="sontarih" type="date"> </div> <div class="form-group col-md-2 mb-2"> <label>Oluştur</label> <button type="submit" class="btn btn-success mb-4 d-block"><i class="fa fa-file-excel" style="font-size:16px;"></i> Raporları İndir</button> </div> </div> </form> </div> </div> </div> </div> </div> <script> <?php $days = ''; $orders_day = ''; $max_orders = $db->select('COUNT(*) as total_order,date FROM orders')->table('orders')->group('DATE(date)')->order('total_order','desc')->limit(1)->get(); $max_orders = $max_orders[0]['total_order']; $start_day = strtotime('-7 days'); for ($x = 1; $x <= 7; $x++) { $date = date('d.m.Y',strtotime('+'.$x.' days',$start_day)); $db_date = date('Y-m-d',strtotime('+'.$x.' days',$start_day)); $days.= '"'.$date.'",'; $ordered_day = $db->table('orders')->where_set('DATE(date)','=',"'".$db_date."'")->count(); $orders_day.= ''.$ordered_day.','; } $days = trim($days,','); $orders_day = trim($orders_day,','); ?> function getChartColorsArray(e) { e = $(e).attr("data-colors"); return (e = JSON.parse(e)).map(function(e) { e = e.replace(" ", ""); if (-1 == e.indexOf("--")) return e; e = getComputedStyle(document.documentElement).getPropertyValue(e); return e || void 0 }) } document.addEventListener("DOMContentLoaded", function(){ var lineColors = getChartColorsArray("#line-chart"), dom = document.getElementById("line-chart"), myChart = echarts.init(dom); window.onresize = function() { myChart.resize(); }; app = {}; option = null, option = { grid: { zlevel: 0, x: 50, x2: 50, y: 30, y2: 30, borderWidth: 0, backgroundColor: "rgba(0,0,0,0)", borderColor: "rgba(0,0,0,0)" }, xAxis: { type: "category", data: [<?php echo $days; ?>], axisLine: { lineStyle: { color: "#858d98" } } }, yAxis: { type: "value", min:0, max:<?php echo $max_orders; ?>, splitNumber: 1, scale: false, axisLine: { lineStyle: { color: "#858d98" } }, splitLine: { lineStyle: { color: "rgba(133, 141, 152, 0.1)" } } }, series: [{ data: [<?php echo $orders_day; ?>], type: "line" }], color: lineColors }, option && "object" == typeof option && myChart.setOption(option, !0); }); </script>
💾 Kaydet
İptal
📝 Yeniden Adlandır
İptal
Kaydet
🔐 Dosya İzinleri (chmod)
İzin Değeri:
Hızlı Seçim:
777
755
644
600
777
= Herkes okur/yazar/çalıştırır
755
= Sahip tam, diğerleri okur/çalıştırır
644
= Sahip okur/yazar, diğerleri okur
600
= Sadece sahip okur/yazar
İptal
Uygula