<?php require('menu.inc.php') ?>
<main id="main" class="main">
  <div class="pagetitle">
    <h1>Dolandyryş paneli</h1>
    <nav>
      <ol class="breadcrumb">
        <li class="breadcrumb-item"><a href="home.php">Baş sahypa </a></li>
        <li class="breadcrumb-item active">Dolandyryş paneli</li>
      </ol>
    </nav>
  </div><!-- End Page Title -->

  <section class="section dashboard">
    <div class="row">

      <!-- Left side columns -->
      <div class="col-lg-8">
        <div class="row">
          <!-- Sales Card -->
          <div class="col-xxl-4 col-md-6">
            <div class="card info-card sales-card">
              <div class="card-body">
                <h5 class="card-title"> <span> </span></h5>

                <div class="d-flex align-items-center">
                  <div class="card-icon rounded-circle d-flex align-items-center justify-content-center">
                    <i class="bi bi-cart"></i>
                  </div>
                  <div class="ps-3">
                    <h6>145</h6>
                    <span class="text-success small pt-1 fw-bold">12%</span> <span class="text-muted small pt-2 ps-1">artdyrmak</span>

                  </div>
                </div>
              </div>

            </div>
          </div>
          <!-- End Sales Card -->

          <!-- Revenue Card -->
          <div class="col-xxl-4 col-md-6">
            <div class="card info-card revenue-card">

              <div class="card-body">
                <h5 class="card-title">Girdeji <span>| Bu aý</span></h5>

                <div class="d-flex align-items-center">
                  <div class="card-icon rounded-circle d-flex align-items-center justify-content-center">
                    <i class="bi bi-currency-dollar"></i>
                  </div>
                  <div class="ps-3">
                    <h6>TMT 3,264</h6>
                    <span class="text-success small pt-1 fw-bold">8%</span> <span class="text-muted small pt-2 ps-1">artdyrmak</span>

                  </div>
                </div>
              </div>

            </div>
          </div><!-- End Revenue Card -->

          <!-- Customers Card -->
          <div class="col-xxl-4 col-xl-12">

            <div class="card info-card customers-card">
              <div class="card-body">
                <h5 class="card-title">Müşderiler <span>| Bu ýyl</span></h5>

                <div class="d-flex align-items-center">
                  <div class="card-icon rounded-circle d-flex align-items-center justify-content-center">
                    <i class="bi bi-people"></i>
                  </div>
                  <div class="ps-3">
                    <h6>1244</h6>
                    <span class="text-danger small pt-1 fw-bold">12%</span> <span class="text-muted small pt-2 ps-1">azalmagy</span>

                  </div>
                </div>

              </div>
            </div>

          </div><!-- End Customers Card -->


          <!-- City table -->
          <?php
          $sql = "SELECT * FROM `retailcenter`";
          $res = mysqli_query($conn, $sql);
          ?>
          <div class="col-12">
            <div class="card recent-sales overflow-auto">



             <!-- <div class="card-body">
                <h5 class="card-title">Maglumatlar</h5>

                 Table with stripped rows 
                <table class="table datatable">
                  <thead>
                    <tr>
                      <th scope="col">#</th>
                      <th scope="col">Bölek satuw merkezi ID</th>
                      <th scope="col">Bölek satuw merkeziniň ady</th>
                      <th scope="col">şäher_id </th>
                      <th scope="col">ulanyjy _id </th>
                      <th scope="col">Salgysy </th>
                       <th scope="col">Actions</th> 
                    </tr>

                  </thead>
                  <tbody>
                    <?php
                   // $srno = 1;
                    //while ($rows = mysqli_fetch_assoc($res)) {
                      //echo "<tr>";
                    ?>
                      <td>
                       <?php// echo $srno; ?>
                      </td>
                      <td>
                        <?php //echo $rows['center_id']; ?>
                      </td>
                      <td>
                        <?php //echo $rows['center_name']; ?>
                      </td>
                      <td>
                        <?php //echo $rows['city_id']; ?>
                      </td>
                      <td>
                        <?php //echo $rows['user_id']; ?>
                      </td>

                      <td>
                        <?php //echo $rows['center_address']; ?>
                      </td>

                    <?php
                     // $srno++;
                      //echo "</tr>";
                  //  }
                    ?>
                  </tbody>
                </table>
                 End Table with stripped rows 

              </div>-->

            </div>
          </div>
          <!-- End City table -->
        </div>
      </div><!-- End Left side columns -->

      <!-- Right side columns -->
      <div class="col-lg-4">
        <!-- Budget Report -->
        <div class="card">
          <div class="card-body pb-0">
            <h5 class="card-title">Býudjet hasabaty <span>| Bu aý</span></h5>

            <div id="budgetChart" style="min-height: 400px;" class="echart"></div>

            <script>
              document.addEventListener("DOMContentLoaded", () => {
                var budgetChart = echarts.init(document.querySelector("#budgetChart")).setOption({
                  legend: {
                    data: ['Allocated Budget', 'Actual Spending']
                  },
                  radar: {
                    // shape: 'circle',
                    indicator: [{
                        name: 'Sales',
                        max: 6500
                      },
                      {
                        name: 'Administration',
                        max: 16000
                      },
                      {
                        name: 'Information Technology',
                        max: 30000
                      },
                      {
                        name: 'Customer Support',
                        max: 38000
                      },
                      {
                        name: 'Development',
                        max: 52000
                      },
                      {
                        name: 'Marketing',
                        max: 25000
                      }
                    ]
                  },
                  series: [{
                    name: 'Budget vs spending',
                    type: 'radar',
                    data: [{
                        value: [4200, 3000, 20000, 35000, 50000, 18000],
                        name: 'Allocated Budget'
                      },
                      {
                        value: [5000, 14000, 28000, 26000, 42000, 21000],
                        name: 'Actual Spending'
                      }
                    ]
                  }]
                });
              });
            </script>

          </div>
        </div><!-- End Budget Report -->

        <!-- Website Traffic -->
        <div class="card">
          <div class="card-body pb-0">
            <h5 class="card-title">Sahypanyň traffigi <span>| Şu gün</span></h5>

            <div id="trafficChart" style="min-height: 400px;" class="echart"></div>

            <script>
              document.addEventListener("DOMContentLoaded", () => {
                echarts.init(document.querySelector("#trafficChart")).setOption({
                  tooltip: {
                    trigger: 'item'
                  },
                  legend: {
                    top: '5%',
                    left: 'center'
                  },
                  series: [{
                    name: 'Access From',
                    type: 'pie',
                    radius: ['40%', '70%'],
                    avoidLabelOverlap: false,
                    label: {
                      show: false,
                      position: 'center'
                    },
                    emphasis: {
                      label: {
                        show: true,
                        fontSize: '18',
                        fontWeight: 'bold'
                      }
                    },
                    labelLine: {
                      show: false
                    },
                    data: [{
                        value: 1048,
                        name: 'Search Engine'
                      },
                      {
                        value: 735,
                        name: 'Direct'
                      },
                      {
                        value: 580,
                        name: 'Email'
                      },
                      {
                        value: 484,
                        name: 'Union Ads'
                      },
                      {
                        value: 300,
                        name: 'Video Ads'
                      }
                    ]
                  }]
                });
              });
            </script>

          </div>
        </div><!-- End Website Traffic -->



      </div><!-- End Right side columns -->

    </div>
  </section>

</main><!-- End #main -->

<?php
require('footer.inc.php');
?>